@cueframe/kernel 0.2.15 → 0.2.16
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/animate.js +3 -1
- package/dist/{chunk-A74FZCPY.js → chunk-5NGYBI5Z.js} +2 -1
- package/dist/{chunk-IUIG5N6M.js → chunk-HA4S2ZGH.js} +78 -1
- package/dist/{chunk-6BZZWF5B.js → chunk-LQRW5UPR.js} +212 -80
- package/dist/{chunk-KBMKQGFR.js → chunk-QWIK3HKM.js} +34 -8
- package/dist/{chunk-RKDXNYLE.js → chunk-WTGUORWJ.js} +1 -1
- package/dist/{chunk-MDFKDTPF.js → chunk-YROOHMJG.js} +1 -1
- package/dist/{chunk-QLHATEZI.js → chunk-ZFI3N2ID.js} +4 -4
- package/dist/component-runtime/importPolicy.js +1 -1
- package/dist/component-runtime/render.js +2 -2
- package/dist/component-runtime.js +9 -3
- package/dist/compose.js +11 -11
- package/dist/composition-ops.js +2 -2
- package/dist/core/render.js +2 -2
- package/dist/core.js +2 -2
- package/dist/primitives/effects.js +3 -3
- package/dist/primitives/layouts.js +2 -2
- package/dist/primitives/scenes.js +2 -2
- package/dist/primitives/ui-blocks.js +4 -4
- package/dist/primitives.js +11 -11
- package/dist/render-harness.js +5 -5
- package/package.json +23 -19
- package/dist/{chunk-5DSHDRPQ.js → chunk-HBT2OCUB.js} +4 -4
- package/dist/{chunk-B3GSTQLR.js → chunk-VLJOIUHL.js} +6 -6
|
@@ -17,7 +17,7 @@ export { Arrow, makeArrowPath } from './mobjects/Arrow.js';
|
|
|
17
17
|
export { BrandBox } from './mobjects/BrandBox.js';
|
|
18
18
|
export { Graph } from './mobjects/Graph.js';
|
|
19
19
|
export { DiGraph } from './mobjects/DiGraph.js';
|
|
20
|
-
export { ThreeCanvas, StageCameraRig, useImageTexture, StudioRig, DeviceMesh, deviceDimensions, laptopLayout, lidRotationX, DEVICE_GLASS_OPACITY_ENCODED, DEVICE_GLASS_OPACITY_LINEAR, DEVICE_LIT_MATERIALS, DEVICE_PLANE_OFFSETS, SELF_TONE_MAPPED, UNLIT_COLOUR_MANAGED, makeDefaultScreenTexture, defaultScreenLayout, STUDIO_EDGE_LIGHTS, STUDIO_EDGE_INTENSITY, studioEdgeLightCount, DEFAULT_LIGHTING_PROFILE, LIGHTING_PROFILES, studioShadowFrustum, type StudioRigProps, type DeviceKind, type DeviceMeshProps, type DeviceDimensions, type LaptopLayout, type ScreenLayout, type SceneLightingProfile, } from './three/index.js';
|
|
20
|
+
export { ThreeCanvas, FrameDepthOfField, type FrameDepthOfFieldProps, StageCameraRig, useImageTexture, StudioRig, DeviceMesh, deviceDimensions, laptopLayout, lidRotationX, DEVICE_GLASS_OPACITY_ENCODED, DEVICE_GLASS_OPACITY_LINEAR, DEVICE_LIT_MATERIALS, DEVICE_PLANE_OFFSETS, SELF_TONE_MAPPED, UNLIT_COLOUR_MANAGED, makeDefaultScreenTexture, defaultScreenLayout, STUDIO_EDGE_LIGHTS, STUDIO_EDGE_INTENSITY, studioEdgeLightCount, DEFAULT_LIGHTING_PROFILE, LIGHTING_PROFILES, studioShadowFrustum, type StudioRigProps, type DeviceKind, type DeviceMeshProps, type DeviceDimensions, type LaptopLayout, type ScreenLayout, type SceneLightingProfile, } from './three/index.js';
|
|
21
21
|
export { solveFlex, flexReady, isFlexReady, leafIds, flexBoxToThree, fitBox, FlexLayout, useFlexReady, buildTree, unionTracks, weightsAt, type FlexCell, type FlexBox, type FlexSize, type FlexDir, type Fit, type FitMode, type FitResult, type FlexTrack, type FlexTrackSpec, type FlexLayoutProps, } from './layout/index.js';
|
|
22
22
|
export * from './stage/index.js';
|
|
23
23
|
export { MediaTileScene, mediaTileFramesReady, ImageTileScene, MEDIA_TILE_SCENE_LIMITS, assertMediaTileScene, mediaTileCropUvs, mediaTileFogDistances, type MediaTile, type MediaTileAsset, type MediaTileCamera, type MediaTileFog, type MediaTileSceneProps, type MediaTileStream, } from './media/MediaTileScene.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FrameDepthOfFieldProps } from './depthOfFieldPipeline.js';
|
|
2
|
+
export type { FrameDepthOfFieldProps } from './depthOfFieldPipeline.js';
|
|
3
|
+
/**
|
|
4
|
+
* Mount once inside ThreeCanvas, not inside SceneShotV2 (which owns another output pass).
|
|
5
|
+
* Evaluate all props from useCurrentFrame in the parent. This trusted render bridge only
|
|
6
|
+
* replaces R3F's draw on a Remotion advance; it never uses the R3F clock to animate anything.
|
|
7
|
+
*/
|
|
8
|
+
export declare function FrameDepthOfField(props: FrameDepthOfFieldProps): null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DepthOfFieldEffect, EffectComposer } from 'postprocessing';
|
|
2
|
+
import { type PerspectiveCamera, type Scene, type WebGLRenderer } from 'three';
|
|
3
|
+
export interface FrameDepthOfFieldProps {
|
|
4
|
+
/** Radial distance from the camera in scene units (not normalized depth or axial Z). */
|
|
5
|
+
focusDistance: number;
|
|
6
|
+
/** Distance falloff from perfect focus to maximum blur, in scene units. */
|
|
7
|
+
focusRange: number;
|
|
8
|
+
/** Nonnegative blur strength. Zero keeps the same color pipeline with no blur. */
|
|
9
|
+
bokehScale?: number;
|
|
10
|
+
/** Resolution of internal blur buffers; (0, 1]. Default 0.5. */
|
|
11
|
+
resolutionScale?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function validateFrameFocus(props: FrameDepthOfFieldProps): void;
|
|
14
|
+
/** A single canvas-owned, non-temporal pipeline. Never shares GPU resources between roots. */
|
|
15
|
+
export declare class FrameFocusPipeline {
|
|
16
|
+
private readonly gl;
|
|
17
|
+
private readonly camera;
|
|
18
|
+
readonly composer: EffectComposer;
|
|
19
|
+
readonly focus: DepthOfFieldEffect;
|
|
20
|
+
private readonly effectPass;
|
|
21
|
+
private readonly viewport;
|
|
22
|
+
private readonly scissor;
|
|
23
|
+
private disposed;
|
|
24
|
+
private readonly toneMapping;
|
|
25
|
+
constructor(gl: WebGLRenderer, scene: Scene, camera: PerspectiveCamera, resolutionScale: number);
|
|
26
|
+
resize(width: number, height: number): void;
|
|
27
|
+
draw(props: FrameDepthOfFieldProps): void;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { ThreeCanvas } from './ThreeCanvas.js';
|
|
2
|
+
export { FrameDepthOfField, type FrameDepthOfFieldProps } from './FrameDepthOfField.js';
|
|
2
3
|
export { StageCameraRig } from './StageCameraRig.js';
|
|
3
4
|
export { SceneCameraRig } from './SceneCameraRig.js';
|
|
4
5
|
export { useImageTexture } from './useImageTexture.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Public component imports shared by admission and desktop dependency staging. */
|
|
2
|
-
export declare const COMPONENT_IMPORT_ALLOWLIST: readonly ["react", "react/jsx-runtime", "remotion", "@remotion/media", "@remotion/layout-utils", "@remotion/transitions", "@remotion/motion-blur", "@remotion/noise", "@remotion/paths", "@remotion/shapes", "@remotion/three", "three", "three/webgpu", "three/tsl", "@react-three/fiber", "@cueframe/animate", "gsap"];
|
|
2
|
+
export declare const COMPONENT_IMPORT_ALLOWLIST: readonly ["react", "react/jsx-runtime", "remotion", "@remotion/media", "@remotion/layout-utils", "@remotion/transitions", "@remotion/motion-blur", "@remotion/noise", "@remotion/paths", "@remotion/shapes", "@remotion/three", "three", "three/webgpu", "three/tsl", "@react-three/fiber", "@cueframe/animate", "gsap", "postprocessing"];
|
|
3
3
|
//# sourceMappingURL=allowedImports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowedImports.d.ts","sourceRoot":"","sources":["../src/allowedImports.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"allowedImports.d.ts","sourceRoot":"","sources":["../src/allowedImports.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,eAAO,MAAM,0BAA0B,4UAmB5B,CAAC"}
|
|
@@ -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;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;
|
|
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,MA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3
|
export * from './importPolicy.js';
|
|
4
4
|
export * from './sceneAdmission.js';
|
|
5
5
|
export * from './sourceWorkspace.js';
|
|
6
|
+
export * from './sourceAdmission.js';
|
|
6
7
|
export * from './render.js';
|
|
7
8
|
export * from './browserOptions.js';
|
|
8
9
|
export * from './webglProbe.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
@@ -2,6 +2,16 @@ import { type Workspace } from '../primitives/workspace.js';
|
|
|
2
2
|
export declare const LOCAL_ROOT_FILENAME = "Root.local.tsx";
|
|
3
3
|
export declare const LOCAL_ENTRY_FILENAME = "entry.local.tsx";
|
|
4
4
|
export declare const LOCAL_COMPOSITION_ID = "CueFrameLocalStill";
|
|
5
|
+
/** Monitor the lifetime of each displayed GL surface, not the whole React root.
|
|
6
|
+
* R3F deliberately loses a removed canvas's context during delayed disposal. */
|
|
7
|
+
export declare function createWebGlSurfaceMonitor(onLost: () => void): {
|
|
8
|
+
watch(canvas: {
|
|
9
|
+
isConnected: boolean;
|
|
10
|
+
addEventListener(type: string, listener: () => void): void;
|
|
11
|
+
removeEventListener(type: string, listener: () => void): void;
|
|
12
|
+
}): void;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
};
|
|
5
15
|
type LiveTransport = {
|
|
6
16
|
frame: number;
|
|
7
17
|
playing: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localRoot.d.ts","sourceRoot":"","sources":["../src/localRoot.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,gCAAgC,CAAC;AAOxC,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAEtD,eAAO,MAAM,oBAAoB,uBAAuB,CAAC;AAEzD,KAAK,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnF;sFACsF;AACtF,wBAAgB,4BAA4B,CAAC,SAAS,EAAE;IACtD,cAAc,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CACzE;
|
|
1
|
+
{"version":3,"file":"localRoot.d.ts","sourceRoot":"","sources":["../src/localRoot.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,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C;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5F,GACA,MAAM,CAkbR"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentManifestV2, type ComponentSourceV2 } from './contracts.js';
|
|
2
|
+
/**
|
|
3
|
+
* Return literal slots read through `assets.<slot>.handle` (dot or bracket
|
|
4
|
+
* spelling). The AST is the contract boundary: comments, strings, regexes and
|
|
5
|
+
* type annotations are not runtime reads. Dynamic and aliased access is
|
|
6
|
+
* intentionally not proof that every declared slot is consumed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function sourceAssetHandleReads(tsxSource: string): ReadonlySet<string>;
|
|
9
|
+
export declare function missingDeclaredAssetHandleReads(tsxSource: string, manifest: Pick<ComponentManifestV2, 'assets'>): string[];
|
|
10
|
+
/** Refuse a component before bundling when its declared media cannot reach the mount. */
|
|
11
|
+
export declare function assertSourceReadsDeclaredAssets(source: Pick<ComponentSourceV2, 'componentId' | 'tsxSource' | 'manifest'>): void;
|
|
12
|
+
//# sourceMappingURL=sourceAdmission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceAdmission.d.ts","sourceRoot":"","sources":["../src/sourceAdmission.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAgBxB;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAuC7E;AAED,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,GAC5C,MAAM,EAAE,CAKV;AAED,yFAAyF;AACzF,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC,GACxE,IAAI,CAoBN"}
|
package/dist/animate.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
DiGraph,
|
|
10
10
|
FadeIn,
|
|
11
11
|
FlexLayout,
|
|
12
|
+
FrameDepthOfField,
|
|
12
13
|
Graph,
|
|
13
14
|
GrowArrow,
|
|
14
15
|
GrowFromCenter,
|
|
@@ -101,7 +102,7 @@ import {
|
|
|
101
102
|
useStage,
|
|
102
103
|
weightsAt,
|
|
103
104
|
worldTransform
|
|
104
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-LQRW5UPR.js";
|
|
105
106
|
import {
|
|
106
107
|
DEFAULT_LIGHTING_PROFILE,
|
|
107
108
|
DEVICE_GLASS_OPACITY_ENCODED,
|
|
@@ -205,6 +206,7 @@ export {
|
|
|
205
206
|
DiGraph,
|
|
206
207
|
FadeIn,
|
|
207
208
|
FlexLayout,
|
|
209
|
+
FrameDepthOfField,
|
|
208
210
|
Graph,
|
|
209
211
|
GrowArrow,
|
|
210
212
|
GrowFromCenter,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
assertSceneShotParamsAdmitted,
|
|
4
4
|
materializeComponentSource,
|
|
5
5
|
renderComponentAlpha
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QWIK3HKM.js";
|
|
7
7
|
import {
|
|
8
8
|
componentArtifactId,
|
|
9
9
|
componentBundleId,
|
|
@@ -24,6 +24,79 @@ import {
|
|
|
24
24
|
assertRendererReceiptMatches
|
|
25
25
|
} from "./chunk-ZVG446DJ.js";
|
|
26
26
|
|
|
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
|
+
|
|
27
100
|
// ../execution/component-runtime/src/assetServer.ts
|
|
28
101
|
import { createHash, randomBytes } from "crypto";
|
|
29
102
|
import { createReadStream, realpathSync, statSync } from "fs";
|
|
@@ -285,6 +358,7 @@ async function bakeComponentAlphaV2(options) {
|
|
|
285
358
|
assets: assetServer.bindings
|
|
286
359
|
});
|
|
287
360
|
assertAssetBindingsMatch(request);
|
|
361
|
+
assertSourceReadsDeclaredAssets(request.source);
|
|
288
362
|
const materialized = materializeComponentSource(options.workspaceRoot, request.source);
|
|
289
363
|
const allowedAssetOrigins = /* @__PURE__ */ new Set([assetServer.origin]);
|
|
290
364
|
if (scene) {
|
|
@@ -391,6 +465,9 @@ function sourceIdentityForBake(request) {
|
|
|
391
465
|
}
|
|
392
466
|
|
|
393
467
|
export {
|
|
468
|
+
sourceAssetHandleReads,
|
|
469
|
+
missingDeclaredAssetHandleReads,
|
|
470
|
+
assertSourceReadsDeclaredAssets,
|
|
394
471
|
startComponentAssetServer,
|
|
395
472
|
parseAlphaOpaqueFractions,
|
|
396
473
|
bakeOpacityContradictsPolicy,
|