@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.
Files changed (68) hide show
  1. package/dist/_members/animate/index.d.ts +1 -1
  2. package/dist/_members/animate/three/FrameDepthOfField.d.ts +8 -0
  3. package/dist/_members/animate/three/depthOfFieldPipeline.d.ts +29 -0
  4. package/dist/_members/animate/three/index.d.ts +1 -0
  5. package/dist/_members/component-runtime/allowedImports.d.ts +1 -1
  6. package/dist/_members/component-runtime/allowedImports.d.ts.map +1 -1
  7. package/dist/_members/component-runtime/bake.d.ts.map +1 -1
  8. package/dist/_members/component-runtime/index.d.ts +1 -0
  9. package/dist/_members/component-runtime/index.d.ts.map +1 -1
  10. package/dist/_members/component-runtime/localRoot.d.ts +10 -0
  11. package/dist/_members/component-runtime/localRoot.d.ts.map +1 -1
  12. package/dist/_members/component-runtime/sourceAdmission.d.ts +12 -0
  13. package/dist/_members/component-runtime/sourceAdmission.d.ts.map +1 -0
  14. package/dist/_members/composition/fonts/bundledFaces.d.ts +15 -0
  15. package/dist/animate.js +4 -2
  16. package/dist/authoring/build-tools.js +6 -6
  17. package/dist/authoring/context.js +5 -5
  18. package/dist/authoring/tools.js +5 -5
  19. package/dist/authoring.js +9 -9
  20. package/dist/{chunk-RKDXNYLE.js → chunk-26MBA3WH.js} +1 -1
  21. package/dist/{chunk-IUIG5N6M.js → chunk-2R35PKNK.js} +5 -1
  22. package/dist/{chunk-MDFKDTPF.js → chunk-3BCGHUJS.js} +1 -1
  23. package/dist/{chunk-S3PZFAF5.js → chunk-3IUVVVFE.js} +1 -1
  24. package/dist/{chunk-X6U6XVU4.js → chunk-4GSIXJ3I.js} +4 -4
  25. package/dist/{chunk-A74FZCPY.js → chunk-5NGYBI5Z.js} +2 -1
  26. package/dist/{chunk-TARKDVP6.js → chunk-BAC7DKQZ.js} +5 -0
  27. package/dist/{chunk-QLHATEZI.js → chunk-CG2E43AN.js} +1 -1
  28. package/dist/{chunk-KBMKQGFR.js → chunk-D3GMN4WL.js} +35 -9
  29. package/dist/{chunk-5DSHDRPQ.js → chunk-DEOP3TWR.js} +9 -9
  30. package/dist/{chunk-C4P4NC66.js → chunk-ENMY25I3.js} +1 -1
  31. package/dist/{chunk-IGP2CA7C.js → chunk-KSGREMGC.js} +1 -1
  32. package/dist/{chunk-O7G2NXUJ.js → chunk-MAD6MSXA.js} +1 -1
  33. package/dist/{chunk-TAXZ4KBF.js → chunk-MQO5T32S.js} +2 -2
  34. package/dist/{chunk-5CNS7IXO.js → chunk-OXHF3O5T.js} +1 -1
  35. package/dist/{chunk-QZR4JCFY.js → chunk-URUOXC3Z.js} +1 -1
  36. package/dist/chunk-WXHD6OUT.js +82 -0
  37. package/dist/{chunk-6BZZWF5B.js → chunk-ZYGUHMX6.js} +213 -81
  38. package/dist/component-runtime/importPolicy.js +1 -1
  39. package/dist/component-runtime/render.js +3 -3
  40. package/dist/component-runtime/sourceAdmission.d.ts +1 -0
  41. package/dist/component-runtime/sourceAdmission.js +12 -0
  42. package/dist/component-runtime.js +12 -4
  43. package/dist/compose.js +12 -12
  44. package/dist/composition/fonts.js +3 -1
  45. package/dist/composition/graphics-plan.js +3 -3
  46. package/dist/composition/ops.js +4 -4
  47. package/dist/composition/projection.js +3 -3
  48. package/dist/composition/validators.js +3 -3
  49. package/dist/composition-ops.js +6 -6
  50. package/dist/composition.js +5 -5
  51. package/dist/{context-VHBMKP65.js → context-UE255PMJ.js} +5 -5
  52. package/dist/core/render.js +3 -3
  53. package/dist/core.js +3 -3
  54. package/dist/mcp/adapter.js +3 -3
  55. package/dist/mcp/server.js +2 -2
  56. package/dist/mcp.js +2 -2
  57. package/dist/primitives/captions.js +1 -1
  58. package/dist/primitives/effects.js +3 -3
  59. package/dist/primitives/layouts.js +3 -3
  60. package/dist/primitives/lib/index.js +11 -11
  61. package/dist/primitives/lib.js +11 -11
  62. package/dist/primitives/scenes.js +3 -3
  63. package/dist/primitives/ui-blocks.js +4 -4
  64. package/dist/primitives.js +10 -10
  65. package/dist/render-harness.js +10 -9
  66. package/package.json +25 -17
  67. package/dist/{chunk-XMAA2HYI.js → chunk-2P4NHHKR.js} +3 -3
  68. 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-QZR4JCFY.js";
7
+ } from "./chunk-URUOXC3Z.js";
8
8
  import {
9
9
  brandKitCaptionFaceIssues
10
- } from "./chunk-TARKDVP6.js";
10
+ } from "./chunk-BAC7DKQZ.js";
11
11
 
12
12
  // ../composition/src/validators/composePlan.ts
13
13
  import { z } from "zod";
@@ -2,7 +2,7 @@ import {
2
2
  COMPOSE_PLANNER_TOOLS,
3
3
  COMPOSE_ROLE_TOOLS,
4
4
  dispatchComposeRoleTool
5
- } from "./chunk-X6U6XVU4.js";
5
+ } from "./chunk-4GSIXJ3I.js";
6
6
 
7
7
  // ../authoring/src/agent/buildTools.ts
8
8
  import { tool } from "ai";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-B7J5UUUV.js";
4
4
  import {
5
5
  captionFaceIssues
6
- } from "./chunk-TARKDVP6.js";
6
+ } from "./chunk-BAC7DKQZ.js";
7
7
 
8
8
  // ../composition/src/validators/opaqueId.ts
9
9
  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
+ };