@cueframe/kernel 0.1.4 → 0.2.0
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/account-model/validators/contextFile.d.ts +3 -21
- package/dist/_members/account-model/validators/conversation.d.ts +12 -42
- package/dist/_members/account-model/validators/dashboardInsight.d.ts +3 -17
- package/dist/_members/account-model/validators/sessionToken.d.ts +10 -36
- package/dist/_members/account-model/validators/uploadToken.d.ts +11 -21
- package/dist/_members/account-model/validators/userSettings.d.ts +3 -13
- package/dist/_members/account-model/validators/workingComposition.d.ts +3 -19
- package/dist/_members/authoring/capabilities.d.ts +0 -9
- package/dist/_members/authoring/index.d.ts +1 -1
- package/dist/_members/authoring/models/defaultModels.d.ts +12 -0
- package/dist/_members/authoring/models/modelFactory.d.ts +1 -0
- package/dist/_members/authoring/motion/materializeMotionPresetOps.d.ts +1 -7
- package/dist/_members/authoring/types.d.ts +0 -1
- package/dist/_members/component-runtime/assetServer.d.ts +18 -0
- package/dist/_members/component-runtime/assetServer.d.ts.map +1 -0
- package/dist/_members/component-runtime/bake.d.ts +12 -0
- package/dist/_members/component-runtime/bake.d.ts.map +1 -0
- package/dist/_members/component-runtime/browserFirewall.d.ts +21 -0
- package/dist/_members/component-runtime/browserFirewall.d.ts.map +1 -0
- package/dist/_members/component-runtime/browserIdentity.d.ts +14 -0
- package/dist/_members/component-runtime/browserIdentity.d.ts.map +1 -0
- package/dist/_members/component-runtime/browserOptions.d.ts +8 -0
- package/dist/_members/component-runtime/browserOptions.d.ts.map +1 -0
- package/dist/_members/component-runtime/canonicalIdentity.d.ts +14 -0
- package/dist/_members/component-runtime/canonicalIdentity.d.ts.map +1 -0
- package/dist/_members/component-runtime/contracts.d.ts +443 -0
- package/dist/_members/component-runtime/contracts.d.ts.map +1 -0
- package/dist/_members/component-runtime/determinism.d.ts +18 -0
- package/dist/_members/component-runtime/determinism.d.ts.map +1 -0
- package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts +9 -0
- package/dist/_members/component-runtime/fixtures/webgpuTiledRefraction.d.ts.map +1 -0
- package/dist/_members/component-runtime/identity.d.ts +16 -0
- package/dist/_members/component-runtime/identity.d.ts.map +1 -0
- package/dist/_members/component-runtime/importPolicy.d.ts +3 -0
- package/dist/_members/component-runtime/importPolicy.d.ts.map +1 -0
- package/dist/_members/component-runtime/index.d.ts +11 -0
- package/dist/_members/component-runtime/index.d.ts.map +1 -0
- package/dist/_members/component-runtime/outputVerifier.d.ts +29 -0
- package/dist/_members/component-runtime/outputVerifier.d.ts.map +1 -0
- package/dist/_members/{render-harness/localRender.d.ts → component-runtime/render.d.ts} +22 -15
- package/dist/_members/component-runtime/render.d.ts.map +1 -0
- package/dist/_members/component-runtime/sourceWorkspace.d.ts +10 -0
- package/dist/_members/component-runtime/sourceWorkspace.d.ts.map +1 -0
- package/dist/_members/compose/index.d.ts +0 -5
- package/dist/_members/composition/graphics-plan/schemas.d.ts +299 -1309
- package/dist/_members/composition/primitive-catalog/index.d.ts +2 -2
- package/dist/_members/composition/primitive-catalog/projection.d.ts +0 -14
- package/dist/_members/composition/reframe/index.d.ts +56 -528
- package/dist/_members/composition/validators/brandKit.d.ts +247 -1208
- package/dist/_members/composition/validators/composePlan.d.ts +106 -818
- package/dist/_members/composition/validators/composition.d.ts +1338 -5856
- package/dist/_members/composition/validators/font.d.ts +35 -91
- package/dist/_members/composition/validators/project.d.ts +15 -46
- package/dist/_members/composition/validators/registry.d.ts +53 -135
- package/dist/_members/composition/validators/render.d.ts +803 -7273
- package/dist/_members/composition/validators/session.d.ts +38 -76
- package/dist/_members/composition/validators/webhook.d.ts +23 -50
- package/dist/_members/composition-ops/alphaLayers.d.ts +3 -2
- package/dist/_members/composition-ops/index.d.ts +409 -4309
- package/dist/_members/core/render/compositionAudioAndDepth.d.ts +6 -0
- package/dist/_members/core/render/compositionRender.d.ts +3 -4
- package/dist/_members/core/render/compositionValidation.d.ts +4 -0
- package/dist/_members/core/render/index.d.ts +2 -2
- package/dist/_members/core/render/types.d.ts +16 -8
- package/dist/_members/director/ai-sdk/messages.d.ts +67 -217
- package/dist/_members/director/domain/chat.d.ts +70 -293
- package/dist/_members/director/testing/contract.d.ts +11 -11
- package/dist/_members/errors/registry.d.ts +189 -3
- package/dist/_members/foundation/primitives/index.d.ts +1 -1
- package/dist/_members/mcp/adapter.d.ts +3 -0
- package/dist/_members/mcp/burnedNames.d.ts +0 -1
- package/dist/_members/mcp/core.d.ts +6 -3
- package/dist/_members/mcp/curation.d.ts +3 -38
- package/dist/_members/mcp/curationTypes.d.ts +34 -0
- package/dist/_members/mcp/generated/harness.d.ts +1 -1
- package/dist/_members/mcp/generated/operations.d.ts +10 -0
- package/dist/_members/mcp/main.d.ts +1 -0
- package/dist/_members/mcp/mediaContextFormat.d.ts +4 -0
- package/dist/_members/mcp/prompts.d.ts +1 -1
- package/dist/_members/mcp/query.d.ts +4 -0
- package/dist/_members/mcp/resources.d.ts +1 -1
- package/dist/_members/mcp/server.d.ts +1 -2
- package/dist/_members/mcp/wireSchema.d.ts +13 -0
- package/dist/_members/media-model/api.d.ts +114 -662
- package/dist/_members/media-model/generation.d.ts +141 -228
- package/dist/_members/plane/contract.d.ts +16 -19
- package/dist/_members/primitives/backgrounds/animated-bar-chart/config.d.ts +3 -27
- package/dist/_members/primitives/backgrounds/animated-line-chart/config.d.ts +2 -26
- package/dist/_members/primitives/backgrounds/dither-gradient-bg/config.d.ts +1 -17
- package/dist/_members/primitives/backgrounds/dynamic-grid/config.d.ts +6 -14
- package/dist/_members/primitives/backgrounds/ecosystem-constellation/config.d.ts +1 -11
- package/dist/_members/primitives/backgrounds/infinite-marquee/config.d.ts +1 -21
- package/dist/_members/primitives/backgrounds/mesh-gradient-bg/config.d.ts +2 -12
- package/dist/_members/primitives/backgrounds/perspective-marquee/config.d.ts +2 -26
- package/dist/_members/primitives/backgrounds/silk-flow-bg/config.d.ts +2 -22
- package/dist/_members/primitives/backgrounds/vector-field/config.d.ts +1 -17
- package/dist/_members/primitives/backgrounds/volumetric-rays/config.d.ts +1 -19
- package/dist/_members/primitives/effects/blur/config.d.ts +5 -14
- package/dist/_members/primitives/effects/color-grade/config.d.ts +10 -18
- package/dist/_members/primitives/effects/grain/config.d.ts +9 -12
- package/dist/_members/primitives/effects/parallax/config.d.ts +8 -12
- package/dist/_members/primitives/effects/particles/config.d.ts +9 -20
- package/dist/_members/primitives/effects/pulsing-indicator/config.d.ts +1 -13
- package/dist/_members/primitives/effects/spotlight-card/config.d.ts +1 -25
- package/dist/_members/primitives/effects/spring-pop-in/config.d.ts +1 -15
- package/dist/_members/primitives/effects/success-confetti/config.d.ts +2 -26
- package/dist/_members/primitives/effects/vignette/config.d.ts +5 -12
- package/dist/_members/primitives/hero-text/config.d.ts +9 -24
- package/dist/_members/primitives/layouts/chat-to-preview-layout/config.d.ts +1 -11
- package/dist/_members/primitives/layouts/infinite-bento-pan/config.d.ts +1 -9
- package/dist/_members/primitives/layouts/letterbox/config.d.ts +1 -9
- package/dist/_members/primitives/layouts/photo-grid/config.d.ts +2 -12
- package/dist/_members/primitives/layouts/picture-in-picture/config.d.ts +7 -12
- package/dist/_members/primitives/layouts/split-screen/config.d.ts +1 -7
- package/dist/_members/primitives/layouts/staggered-bento-grid/config.d.ts +3 -51
- package/dist/_members/primitives/lib/schema.d.ts +1 -1
- package/dist/_members/primitives/scenes/changelog-bite/config.d.ts +7 -24
- package/dist/_members/primitives/scenes/hero-device-assemble/config.d.ts +5 -14
- package/dist/_members/primitives/scenes/landing-code-showcase/config.d.ts +1 -7
- package/dist/_members/primitives/scenes/live-code-compilation/config.d.ts +1 -7
- package/dist/_members/primitives/scenes/pricing-tier-focus/config.d.ts +2 -12
- package/dist/_members/primitives/scenes/product-launch-trailer/config.d.ts +1 -19
- package/dist/_members/primitives/scenes/terminal-to-browser-deploy/config.d.ts +1 -11
- package/dist/_members/primitives/text/blur-reveal/config.d.ts +1 -17
- package/dist/_members/primitives/text/cinematic-title/config.d.ts +13 -73
- package/dist/_members/primitives/text/inline-highlight/config.d.ts +1 -21
- package/dist/_members/primitives/text/karaoke/config.d.ts +10 -93
- package/dist/_members/primitives/text/kinetic-type/config.d.ts +14 -49
- package/dist/_members/primitives/text/lower-third/config.d.ts +8 -70
- package/dist/_members/primitives/text/marker-highlight/config.d.ts +1 -23
- package/dist/_members/primitives/text/masked-slide-reveal/config.d.ts +1 -17
- package/dist/_members/primitives/text/matrix-decode/config.d.ts +1 -19
- package/dist/_members/primitives/text/quote-card/config.d.ts +1 -11
- package/dist/_members/primitives/text/rgb-glitch-text/config.d.ts +1 -23
- package/dist/_members/primitives/text/shimmer-sweep/config.d.ts +1 -17
- package/dist/_members/primitives/text/slot-machine-roll/config.d.ts +1 -17
- package/dist/_members/primitives/text/staggered-fade-up/config.d.ts +2 -24
- package/dist/_members/primitives/text/stat-counter/config.d.ts +6 -20
- package/dist/_members/primitives/text/strikethrough-replace/config.d.ts +1 -19
- package/dist/_members/primitives/text/text-effect/config.d.ts +10 -15
- package/dist/_members/primitives/text/text-fade-replace/config.d.ts +1 -17
- package/dist/_members/primitives/text/token-stream/config.d.ts +1 -11
- package/dist/_members/primitives/text/tracking-in/config.d.ts +1 -19
- package/dist/_members/primitives/text/typewriter/config.d.ts +1 -21
- package/dist/_members/primitives/transitions/chromatic-aberration-wipe/config.d.ts +5 -8
- package/dist/_members/primitives/transitions/code-diff-wipe/config.d.ts +1 -21
- package/dist/_members/primitives/transitions/directional-wipe/config.d.ts +7 -6
- package/dist/_members/primitives/transitions/frosted-glass-wipe/config.d.ts +1 -5
- package/dist/_members/primitives/transitions/glitch-cut/config.d.ts +1 -7
- package/dist/_members/primitives/transitions/grid-pixelate-wipe/config.d.ts +6 -12
- package/dist/_members/primitives/transitions/ink-wipe/config.d.ts +7 -8
- package/dist/_members/primitives/transitions/kinetic-type-mask/config.d.ts +1 -7
- package/dist/_members/primitives/transitions/light-leak/config.d.ts +1 -7
- package/dist/_members/primitives/transitions/luma-matte/config.d.ts +6 -6
- package/dist/_members/primitives/transitions/morph/config.d.ts +5 -6
- package/dist/_members/primitives/transitions/spatial-push/config.d.ts +7 -6
- package/dist/_members/primitives/transitions/swipe-transition-wipe/config.d.ts +5 -10
- package/dist/_members/primitives/transitions/zoom-through/config.d.ts +2 -30
- package/dist/_members/primitives/transitions/zoom-through-transition/config.d.ts +1 -13
- package/dist/_members/primitives/ui-blocks/ai-generate-overlay/config.d.ts +1 -29
- package/dist/_members/primitives/ui-blocks/ai-generation-canvas/config.d.ts +1 -11
- package/dist/_members/primitives/ui-blocks/badge-pop/config.d.ts +8 -16
- package/dist/_members/primitives/ui-blocks/before-after-slider/config.d.ts +1 -11
- package/dist/_members/primitives/ui-blocks/benchmark-bars/config.d.ts +3 -73
- package/dist/_members/primitives/ui-blocks/bounding-box-selector/config.d.ts +1 -15
- package/dist/_members/primitives/ui-blocks/browser-flow/config.d.ts +1 -7
- package/dist/_members/primitives/ui-blocks/brush-stroke-simulator/config.d.ts +1 -21
- package/dist/_members/primitives/ui-blocks/chat-exchange/config.d.ts +1 -15
- package/dist/_members/primitives/ui-blocks/code-accordion/config.d.ts +2 -26
- package/dist/_members/primitives/ui-blocks/context-meter/config.d.ts +1 -13
- package/dist/_members/primitives/ui-blocks/cursor-flow/config.d.ts +2 -66
- package/dist/_members/primitives/ui-blocks/dashboard-populate/config.d.ts +1 -9
- package/dist/_members/primitives/ui-blocks/data-flow-pipes/config.d.ts +3 -97
- package/dist/_members/primitives/ui-blocks/device-mockup-zoom/config.d.ts +5 -14
- package/dist/_members/primitives/ui-blocks/drag-and-drop-flow/config.d.ts +1 -13
- package/dist/_members/primitives/ui-blocks/eval-scorecard/config.d.ts +2 -36
- package/dist/_members/primitives/ui-blocks/glass-code-block/config.d.ts +1 -23
- package/dist/_members/primitives/ui-blocks/image-expand-to-fullscreen/config.d.ts +3 -113
- package/dist/_members/primitives/ui-blocks/metric-gauge/config.d.ts +2 -34
- package/dist/_members/primitives/ui-blocks/morphing-modal/config.d.ts +3 -113
- package/dist/_members/primitives/ui-blocks/pipeline-journey/config.d.ts +1 -9
- package/dist/_members/primitives/ui-blocks/progress-steps/config.d.ts +6 -37
- package/dist/_members/primitives/ui-blocks/reasoning-trace/config.d.ts +2 -12
- package/dist/_members/primitives/ui-blocks/simulated-cursor/config.d.ts +2 -54
- package/dist/_members/primitives/ui-blocks/terminal-simulator/config.d.ts +9 -48
- package/dist/_members/primitives/ui-blocks/toast-notification/config.d.ts +7 -20
- package/dist/_members/primitives/ui-blocks/tool-call-stack/config.d.ts +2 -42
- package/dist/_members/primitives/ui-blocks/tool-menu-slide-in/config.d.ts +1 -19
- package/dist/_members/primitives/ui-blocks/visual-docs-snippet/config.d.ts +3 -71
- package/dist/_members/primitives/ui-blocks/voice-waveform/config.d.ts +5 -14
- package/dist/_members/primitives/workspace.d.ts +1 -5
- package/dist/_members/render-harness/cardAssetAdmission.d.ts +3 -0
- package/dist/_members/render-harness/cardAssetAdmission.d.ts.map +1 -0
- package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
- package/dist/_members/render-harness/index.d.ts +1 -5
- package/dist/_members/render-harness/index.d.ts.map +1 -1
- package/dist/_members/render-harness/materializeSources.d.ts.map +1 -1
- package/dist/_members/render-harness/remotion-runtime.d.ts +20 -0
- package/dist/_members/render-harness/renderInputAssets.d.ts +2 -1
- package/dist/_members/render-harness/renderInputAssets.d.ts.map +1 -1
- package/dist/_members/render-harness/resolveAssets.d.ts.map +1 -1
- package/dist/authoring/build-tools.js +8 -8
- package/dist/authoring/context.js +5 -5
- package/dist/authoring/models.js +3 -1
- package/dist/authoring/resource-routing.js +1 -1
- package/dist/authoring/resources.js +1 -1
- package/dist/authoring/tools.js +7 -7
- package/dist/authoring.js +15 -31
- package/dist/{chunk-R5BMJ2NX.js → chunk-4FOOBSEE.js} +33 -2
- package/dist/{chunk-YXEZ75MB.js → chunk-4JRUGT2Y.js} +43 -108
- package/dist/{chunk-FMODQD5P.js → chunk-4ZE564YF.js} +16 -9
- package/dist/chunk-5OTQ7M43.js +718 -0
- package/dist/{chunk-O7GNE4BQ.js → chunk-6ID2J64H.js} +4 -4
- package/dist/{chunk-RXCEPCAQ.js → chunk-6XI57FZZ.js} +280 -191
- package/dist/{chunk-2SNY75AR.js → chunk-7KEUL3FI.js} +4 -2
- package/dist/{chunk-WTT3GGCA.js → chunk-AD5HWBCE.js} +1 -1
- package/dist/{chunk-JY26PIRP.js → chunk-C5SEPOWD.js} +163 -171
- package/dist/chunk-CGHTMZNC.js +6 -0
- package/dist/chunk-DHKQ47Q6.js +57 -0
- package/dist/{chunk-3PM6VICZ.js → chunk-DQKSCHFC.js} +4 -4
- package/dist/{chunk-D6S3ZKIY.js → chunk-EEXCDFY5.js} +1 -1
- package/dist/{chunk-ZT7MHRQU.js → chunk-GCQ7Z7S7.js} +15 -5
- package/dist/{chunk-ZBRPF6GV.js → chunk-GEGRJKKO.js} +1 -1
- package/dist/chunk-HHFDHJ3I.js +392 -0
- package/dist/{chunk-JRIPQ7DN.js → chunk-IBMJ33EL.js} +3 -3
- package/dist/{chunk-JTVFIN6H.js → chunk-IHFREGFA.js} +10 -4
- package/dist/chunk-IJ7PVJTK.js +114 -0
- package/dist/{chunk-6ABIXGLO.js → chunk-KKEY5MIW.js} +8 -8
- package/dist/{chunk-7TQCR7AB.js → chunk-LNBVTDFR.js} +1 -1
- package/dist/chunk-LQUWKBST.js +195 -0
- package/dist/chunk-M2TLRXEO.js +41 -0
- package/dist/{chunk-7V3F5HO4.js → chunk-NOEBAV2G.js} +58 -2
- package/dist/{chunk-RQ2G4DXI.js → chunk-QBKDEO7J.js} +1502 -1314
- package/dist/chunk-RFXR7ATW.js +244 -0
- package/dist/chunk-SIAXP3ZO.js +131 -0
- package/dist/{chunk-MCBUX5XV.js → chunk-SLN5UKLT.js} +2 -2
- package/dist/{chunk-GH27OS5S.js → chunk-VCBLGZQQ.js} +19 -4
- package/dist/{chunk-TLVPDT4R.js → chunk-XHUYWVYK.js} +1 -1
- package/dist/{chunk-D2EGO543.js → chunk-XVBOSPZI.js} +15 -17
- package/dist/{chunk-YE3F4LNJ.js → chunk-Y3QGYASW.js} +18 -18
- package/dist/{chunk-LSP4HN5N.js → chunk-ZCAQHNPI.js} +1 -1
- package/dist/{chunk-PJ4R4N4Q.js → chunk-ZN6P3KOJ.js} +70 -93
- package/dist/chunk-ZZRBKGDA.js +109 -0
- package/dist/component-runtime/browserOptions.d.ts +1 -0
- package/dist/component-runtime/browserOptions.js +7 -0
- package/dist/component-runtime/contracts.d.ts +1 -0
- package/dist/component-runtime/contracts.js +49 -0
- package/dist/component-runtime/identity/browser.d.ts +1 -0
- package/dist/component-runtime/identity/browser.js +35 -0
- package/dist/component-runtime/identity.d.ts +1 -0
- package/dist/component-runtime/identity.js +21 -0
- package/dist/component-runtime/importPolicy.d.ts +1 -0
- package/dist/component-runtime/importPolicy.js +10 -0
- package/dist/component-runtime/render.d.ts +1 -0
- package/dist/component-runtime/render.js +34 -0
- package/dist/component-runtime.d.ts +1 -0
- package/dist/component-runtime.js +132 -0
- package/dist/compose.js +17 -31
- package/dist/composition/graphics-plan.js +1 -1
- package/dist/composition/ops.js +4 -4
- package/dist/composition/primitive-catalog.js +1 -3
- package/dist/composition/projection.js +2 -2
- package/dist/composition/timeline.js +2 -2
- package/dist/composition/validators.js +2 -2
- package/dist/composition-ops.js +23 -17
- package/dist/composition.js +15 -15
- package/dist/{context-XWNT6QZH.js → context-4GSDBFT3.js} +5 -5
- package/dist/core/render.js +8 -8
- package/dist/core/select.js +2 -2
- package/dist/core.js +6 -6
- package/dist/director/ai-sdk.js +3 -3
- package/dist/director/domain.js +2 -2
- package/dist/director.js +3 -3
- package/dist/errors.js +1 -1
- package/dist/mcp/adapter.js +22 -29
- package/dist/mcp/core.js +1 -1
- package/dist/mcp/curation.js +1 -1
- package/dist/mcp/executor.js +1 -1
- package/dist/mcp/server.js +4 -6
- package/dist/mcp/wire-schema.d.ts +1 -0
- package/dist/mcp/wire-schema.js +37 -0
- package/dist/mcp.js +6 -29
- package/dist/nle-export.js +16 -25
- package/dist/plane/conformance.js +1 -1
- package/dist/plane/contract.js +7 -0
- package/dist/plane.js +1 -1
- package/dist/primitives/backgrounds.js +2 -2
- package/dist/primitives/captions.js +3 -3
- package/dist/primitives/effects.js +2 -2
- package/dist/primitives/layouts.js +2 -2
- package/dist/primitives/lib/index.js +8 -8
- package/dist/primitives/lib/schema.js +1 -1
- package/dist/primitives/lib.js +8 -8
- package/dist/primitives/text.js +2 -2
- package/dist/primitives/ui-blocks.js +2 -2
- package/dist/primitives.js +18 -18
- package/dist/render-harness/cardAssetAdmission.d.ts +1 -0
- package/dist/render-harness/cardAssetAdmission.js +8 -0
- package/dist/render-harness/renderInputAssets.d.ts +1 -0
- package/dist/render-harness/renderInputAssets.js +17 -0
- package/dist/render-harness.js +44 -574
- package/package.json +69 -36
- package/dist/_members/authoring/transpileComponent.d.ts +0 -6
- package/dist/_members/authoring/transpileHelper.d.ts +0 -8
- package/dist/_members/compose/CompositionRenderer.d.ts +0 -6
- package/dist/_members/compose/sceneToRenderInput.d.ts +0 -25
- package/dist/_members/compose/schema.d.ts +0 -30
- package/dist/_members/compose/tokenResolver.d.ts +0 -17
- package/dist/_members/render-harness/browserOptions.d.ts +0 -11
- package/dist/_members/render-harness/browserOptions.d.ts.map +0 -1
- package/dist/_members/render-harness/contractRender.d.ts +0 -27
- package/dist/_members/render-harness/contractRender.d.ts.map +0 -1
- package/dist/_members/render-harness/localRender.d.ts.map +0 -1
- package/dist/_members/render-harness/sandboxGlobalSpecs.d.ts +0 -9
- package/dist/_members/render-harness/sandboxGlobalSpecs.d.ts.map +0 -1
- package/dist/authoring/transpileComponent.d.ts +0 -1
- package/dist/authoring/transpileComponent.js +0 -31
- package/dist/authoring/transpileHelper.d.ts +0 -1
- package/dist/authoring/transpileHelper.js +0 -9
- package/dist/chunk-MHOQTPOB.js +0 -124
- package/dist/chunk-QSDFTYKV.js +0 -85
- package/dist/chunk-RHVLQNYF.js +0 -20
- package/dist/chunk-V24L35GM.js +0 -61
- package/dist/compose/renderer.d.ts +0 -1
- package/dist/compose/renderer.js +0 -170
- package/dist/render-harness/sandboxGlobalSpecs.d.ts +0 -1
- package/dist/render-harness/sandboxGlobalSpecs.js +0 -13
- package/dist/{chunk-THJAY7QS.js → chunk-BKHGL4MB.js} +4 -4
- package/dist/{chunk-XATRRDVG.js → chunk-G5BFI32U.js} +3 -3
- package/dist/{chunk-23HFEKV7.js → chunk-QISFYLBB.js} +4 -4
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FitText
|
|
3
|
+
} from "./chunk-XHGZ2E77.js";
|
|
1
4
|
import {
|
|
2
5
|
ACCENT,
|
|
3
6
|
ACCENT_STRONG,
|
|
@@ -12,9 +15,6 @@ import {
|
|
|
12
15
|
VIOLET,
|
|
13
16
|
WARNING
|
|
14
17
|
} from "./chunk-CX2IIQ4R.js";
|
|
15
|
-
import {
|
|
16
|
-
FitText
|
|
17
|
-
} from "./chunk-XHGZ2E77.js";
|
|
18
18
|
|
|
19
19
|
// ../execution/primitives/src/effects/blur/index.tsx
|
|
20
20
|
import React2 from "react";
|
|
@@ -977,7 +977,7 @@ var config3 = {
|
|
|
977
977
|
// ../execution/primitives/src/effects/parallax/config.ts
|
|
978
978
|
import { z as z4 } from "zod";
|
|
979
979
|
var paramsSchema4 = z4.object({
|
|
980
|
-
src: z4.string().url().describe("Image URL. Pair with high-resolution sources \u2014 the zoom amplifies aliasing."),
|
|
980
|
+
src: z4.string().url().meta({ cueframeAsset: true }).describe("Image URL. Pair with high-resolution sources \u2014 the zoom amplifies aliasing."),
|
|
981
981
|
zoom: z4.number().min(1).max(2).default(1.2).describe("End zoom factor. 1.2\u20131.4 reads as a gentle Ken Burns; >1.5 starts feeling aggressive."),
|
|
982
982
|
pan: z4.enum(["left", "right", "up", "down", "none"]).default("left").describe("Direction of the slow pan."),
|
|
983
983
|
speed: z4.number().min(0.25).max(4).default(1).describe("Playback speed multiplier.")
|
|
@@ -3,10 +3,6 @@ import {
|
|
|
3
3
|
buildEasedZooms,
|
|
4
4
|
buildPannedCenters
|
|
5
5
|
} from "./chunk-QH3YI3ND.js";
|
|
6
|
-
import {
|
|
7
|
-
flattenCompoundClips,
|
|
8
|
-
hasCompoundClips
|
|
9
|
-
} from "./chunk-23HFEKV7.js";
|
|
10
6
|
import {
|
|
11
7
|
DOMINANCE_WEIGHTS,
|
|
12
8
|
ENTER_SEC,
|
|
@@ -24,7 +20,11 @@ import {
|
|
|
24
20
|
scoreAndRank,
|
|
25
21
|
segmentShots,
|
|
26
22
|
stabilizeSelectionHysteresis
|
|
27
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LNBVTDFR.js";
|
|
24
|
+
import {
|
|
25
|
+
flattenCompoundClips,
|
|
26
|
+
hasCompoundClips
|
|
27
|
+
} from "./chunk-QISFYLBB.js";
|
|
28
28
|
import {
|
|
29
29
|
compositionHasVo,
|
|
30
30
|
roleDefaultGainDb
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
CueframeError,
|
|
38
38
|
encodeError
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-4FOOBSEE.js";
|
|
40
40
|
|
|
41
41
|
// ../execution/core/src/render/emphasis.ts
|
|
42
42
|
function buildEmphasisSet(emphasisWords) {
|
|
@@ -177,47 +177,10 @@ function resolveBookendTimeline(brandKit, bodyFrames, fps) {
|
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
// ../execution/core/src/render/
|
|
180
|
+
// ../execution/core/src/render/compositionValidation.ts
|
|
181
181
|
function renderInputError(code, message, locator) {
|
|
182
182
|
return new CueframeError(code, message, void 0, locator);
|
|
183
183
|
}
|
|
184
|
-
function projectClipEffects(clip, renderClipId) {
|
|
185
|
-
const effects = clip.effects;
|
|
186
|
-
if (!effects || effects.length === 0) return [];
|
|
187
|
-
return effects.map((e, idx) => ({
|
|
188
|
-
id: `${renderClipId}::effect:${idx}`,
|
|
189
|
-
primitiveId: e.primitiveId,
|
|
190
|
-
params: e.params ?? {},
|
|
191
|
-
target: { kind: "clip", clipId: renderClipId }
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
function compositionFormatDimensions(format) {
|
|
195
|
-
const fps = format.fps ?? 30;
|
|
196
|
-
const resolution = format.resolution ?? "fhd";
|
|
197
|
-
const dims = {
|
|
198
|
-
"9:16": {
|
|
199
|
-
hd: { width: 720, height: 1280 },
|
|
200
|
-
fhd: { width: 1080, height: 1920 },
|
|
201
|
-
"4k": { width: 2160, height: 3840 }
|
|
202
|
-
},
|
|
203
|
-
"1:1": {
|
|
204
|
-
hd: { width: 720, height: 720 },
|
|
205
|
-
fhd: { width: 1080, height: 1080 },
|
|
206
|
-
"4k": { width: 2160, height: 2160 }
|
|
207
|
-
},
|
|
208
|
-
"4:5": {
|
|
209
|
-
hd: { width: 720, height: 900 },
|
|
210
|
-
fhd: { width: 1080, height: 1350 },
|
|
211
|
-
"4k": { width: 2160, height: 2700 }
|
|
212
|
-
},
|
|
213
|
-
"16:9": {
|
|
214
|
-
hd: { width: 1280, height: 720 },
|
|
215
|
-
fhd: { width: 1920, height: 1080 },
|
|
216
|
-
"4k": { width: 3840, height: 2160 }
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
return { ...dims[format.aspectRatio][resolution], fps };
|
|
220
|
-
}
|
|
221
184
|
function validateComposition(raw) {
|
|
222
185
|
if (!raw || typeof raw !== "object") {
|
|
223
186
|
throw renderInputError("invalid_composition", "composition: expected object, got " + typeof raw, {
|
|
@@ -289,11 +252,11 @@ function validateComposition(raw) {
|
|
|
289
252
|
});
|
|
290
253
|
}
|
|
291
254
|
if (c.style !== void 0) {
|
|
292
|
-
const
|
|
293
|
-
if (
|
|
255
|
+
const fontSize = c.style.fontSize;
|
|
256
|
+
if (fontSize !== void 0 && (typeof fontSize !== "number" || fontSize < 1 || fontSize > 15)) {
|
|
294
257
|
throw renderInputError(
|
|
295
258
|
"invalid_composition",
|
|
296
|
-
`composition.captions.style.fontSize: PERCENT of composition height (1-15, default 5) \u2014 got ${String(
|
|
259
|
+
`composition.captions.style.fontSize: PERCENT of composition height (1-15, default 5) \u2014 got ${String(fontSize)}. px values are not accepted; a px-intent value renders giant band-overflowing captions. Re-author the style with a percent value.`,
|
|
297
260
|
{ compositionPath: "composition.captions.style.fontSize" }
|
|
298
261
|
);
|
|
299
262
|
}
|
|
@@ -301,6 +264,189 @@ function validateComposition(raw) {
|
|
|
301
264
|
}
|
|
302
265
|
return obj;
|
|
303
266
|
}
|
|
267
|
+
|
|
268
|
+
// ../execution/core/src/render/compositionAudioAndDepth.ts
|
|
269
|
+
function buildCaptionSpeechSpans(composition, fps) {
|
|
270
|
+
const words = (composition.captions?.segments ?? []).flatMap((seg) => seg.words).filter((w) => w.endMs > w.startMs).sort((a, b) => a.startMs - b.startMs);
|
|
271
|
+
if (words.length === 0) return [];
|
|
272
|
+
const MERGE_GAP_MS = 300;
|
|
273
|
+
const MIN_SPAN_MS = 200;
|
|
274
|
+
const spans = [];
|
|
275
|
+
let cur = { startMs: words[0].startMs, endMs: words[0].endMs };
|
|
276
|
+
for (let i = 1; i < words.length; i++) {
|
|
277
|
+
const w = words[i];
|
|
278
|
+
if (w.startMs - cur.endMs < MERGE_GAP_MS) {
|
|
279
|
+
if (w.endMs > cur.endMs) cur.endMs = w.endMs;
|
|
280
|
+
} else {
|
|
281
|
+
spans.push(cur);
|
|
282
|
+
cur = { startMs: w.startMs, endMs: w.endMs };
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
spans.push(cur);
|
|
286
|
+
return spans.filter((s) => s.endMs - s.startMs >= MIN_SPAN_MS).map((s) => ({
|
|
287
|
+
startFrame: Math.round(s.startMs / 1e3 * fps),
|
|
288
|
+
endFrame: Math.round(s.endMs / 1e3 * fps)
|
|
289
|
+
}));
|
|
290
|
+
}
|
|
291
|
+
function applyRoleDefaultGains(audioTracks, composition) {
|
|
292
|
+
let voPresent;
|
|
293
|
+
for (const track of composition.tracks) {
|
|
294
|
+
if (track.kind !== "audio" || track.enabled === false) continue;
|
|
295
|
+
for (const c of track.contents) {
|
|
296
|
+
if (!("source" in c)) continue;
|
|
297
|
+
const src = c.source;
|
|
298
|
+
if (src.kind !== "media") continue;
|
|
299
|
+
const role = src.audioRole;
|
|
300
|
+
if (!role) continue;
|
|
301
|
+
if (src.volumeDb !== void 0 || src.volume !== void 0) continue;
|
|
302
|
+
if (voPresent === void 0) voPresent = compositionHasVo(composition);
|
|
303
|
+
const gain = Math.pow(10, roleDefaultGainDb(role, voPresent) / 20);
|
|
304
|
+
for (const t of audioTracks) {
|
|
305
|
+
if (t.id === c.id || t.id.startsWith(`${c.id}#`)) t.volume = gain;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function applyDuckEnvelopes(audioTracks, composition, fps) {
|
|
311
|
+
const captionSpansFrames = buildCaptionSpeechSpans(composition, fps);
|
|
312
|
+
for (const track of composition.tracks) {
|
|
313
|
+
if (track.kind !== "audio" || track.enabled === false) continue;
|
|
314
|
+
for (const c of track.contents) {
|
|
315
|
+
if (!("source" in c)) continue;
|
|
316
|
+
const src = c.source;
|
|
317
|
+
if (src.kind !== "media") continue;
|
|
318
|
+
const duck = src.duck;
|
|
319
|
+
const role = src.audioRole;
|
|
320
|
+
if (!duck || role !== "music" && role !== "vo") continue;
|
|
321
|
+
const absWindows = duck.windows && duck.windows.length > 0 ? duck.windows.map((w) => ({
|
|
322
|
+
startFrame: Math.round(w.startMs / 1e3 * fps),
|
|
323
|
+
endFrame: Math.round(w.endMs / 1e3 * fps)
|
|
324
|
+
})) : captionSpansFrames;
|
|
325
|
+
if (absWindows.length === 0) continue;
|
|
326
|
+
const duckVolume = Math.pow(10, duck.duckDb / 20);
|
|
327
|
+
const attackFrames = Math.max(0, Math.round(duck.attackMs / 1e3 * fps));
|
|
328
|
+
const releaseFrames = Math.max(0, Math.round(duck.releaseMs / 1e3 * fps));
|
|
329
|
+
for (const t of audioTracks) {
|
|
330
|
+
if (t.id !== c.id && !t.id.startsWith(`${c.id}#`)) continue;
|
|
331
|
+
const rel = [];
|
|
332
|
+
for (const w of absWindows) {
|
|
333
|
+
const s = Math.max(0, w.startFrame - t.startFrame);
|
|
334
|
+
const e = Math.min(t.durationInFrames, w.endFrame - t.startFrame);
|
|
335
|
+
if (e > s) rel.push({ startFrame: s, endFrame: e });
|
|
336
|
+
}
|
|
337
|
+
if (rel.length === 0) continue;
|
|
338
|
+
t.duckWindows = rel;
|
|
339
|
+
t.duckVolume = duckVolume;
|
|
340
|
+
t.duckAttackFrames = attackFrames;
|
|
341
|
+
t.duckReleaseFrames = releaseFrames;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
function bindBehindSubjectHosts(overlays, clips) {
|
|
347
|
+
const packedClips = clips.filter((clip) => clip.packedUrl !== void 0);
|
|
348
|
+
for (const overlay of overlays) {
|
|
349
|
+
if (overlay.zPlane !== "behind-subject") continue;
|
|
350
|
+
const overlayEnd = overlay.startFrame + overlay.durationInFrames;
|
|
351
|
+
const covering = packedClips.filter((clip) => {
|
|
352
|
+
const clipEnd = clip.timelineStartFrames + clip.durationInFrames;
|
|
353
|
+
return clip.timelineStartFrames <= overlay.startFrame && clipEnd >= overlayEnd;
|
|
354
|
+
});
|
|
355
|
+
if (covering.length === 1) {
|
|
356
|
+
overlay.hostClipId = covering[0].id;
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
const overlapping = packedClips.filter((clip) => {
|
|
360
|
+
const clipEnd = clip.timelineStartFrames + clip.durationInFrames;
|
|
361
|
+
return clip.timelineStartFrames < overlayEnd && clipEnd > overlay.startFrame;
|
|
362
|
+
});
|
|
363
|
+
const candidates = covering.length > 1 ? covering : overlapping;
|
|
364
|
+
const code = candidates.length > 1 ? "behind_subject_host_ambiguous" : "behind_subject_host_missing";
|
|
365
|
+
throw renderInputError(
|
|
366
|
+
code,
|
|
367
|
+
candidates.length > 1 ? `Behind-subject overlay '${overlay.id}' is covered by multiple packed clips (${candidates.map((clip) => clip.id).join(", ")}); host selection must be unambiguous.` : `Behind-subject overlay '${overlay.id}' is not fully covered by one packed clip; bake an exact matte for its host interval.`,
|
|
368
|
+
{
|
|
369
|
+
trackId: overlay.trackId,
|
|
370
|
+
clipId: overlay.id,
|
|
371
|
+
compositionPath: `composition.tracks[${overlay.trackId}]`,
|
|
372
|
+
candidateClipIds: candidates.map((clip) => clip.id)
|
|
373
|
+
}
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
function assertBehindSubjectCaptionCoverage(captionSegments, clips, fps) {
|
|
378
|
+
const packed = clips.filter((clip) => clip.packedUrl !== void 0);
|
|
379
|
+
for (const segment of captionSegments ?? []) {
|
|
380
|
+
for (const word of segment) {
|
|
381
|
+
const startFrame = Math.round(word.startMs / 1e3 * fps);
|
|
382
|
+
const endFrame = Math.max(startFrame + 1, Math.round(word.endMs / 1e3 * fps));
|
|
383
|
+
const covering = packed.filter((clip) => {
|
|
384
|
+
const clipEnd = clip.timelineStartFrames + clip.durationInFrames;
|
|
385
|
+
return clip.timelineStartFrames <= startFrame && clipEnd >= endFrame;
|
|
386
|
+
});
|
|
387
|
+
if (covering.length === 1) continue;
|
|
388
|
+
const overlapping = packed.filter((clip) => {
|
|
389
|
+
const clipEnd = clip.timelineStartFrames + clip.durationInFrames;
|
|
390
|
+
return clip.timelineStartFrames < endFrame && clipEnd > startFrame;
|
|
391
|
+
});
|
|
392
|
+
const candidates = covering.length > 1 ? covering : overlapping;
|
|
393
|
+
const code = candidates.length > 1 ? "behind_subject_caption_host_ambiguous" : "behind_subject_caption_host_missing";
|
|
394
|
+
throw renderInputError(
|
|
395
|
+
code,
|
|
396
|
+
candidates.length > 1 ? `Behind-subject caption word '${word.text}' is covered by multiple packed clips (${candidates.map((clip) => clip.id).join(", ")}).` : `Behind-subject caption word '${word.text}' is not fully covered by one packed clip; an exact matte is required for its entire interval.`,
|
|
397
|
+
{ candidateClipIds: candidates.map((clip) => clip.id), startFrame, endFrame }
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// ../execution/core/src/render/compositionRender.ts
|
|
404
|
+
function projectClipEffects(clip, renderClipId, identity) {
|
|
405
|
+
const effects = clip.effects;
|
|
406
|
+
if (!effects || effects.length === 0) return [];
|
|
407
|
+
return effects.map((e, idx) => ({
|
|
408
|
+
...identity,
|
|
409
|
+
id: `${renderClipId}::effect:${idx}`,
|
|
410
|
+
primitiveId: e.primitiveId,
|
|
411
|
+
params: e.params ?? {},
|
|
412
|
+
target: { kind: "clip", clipId: renderClipId }
|
|
413
|
+
}));
|
|
414
|
+
}
|
|
415
|
+
function visualIdentity(track, trackIndex, trackCount, contentIndex) {
|
|
416
|
+
return {
|
|
417
|
+
trackId: track.id,
|
|
418
|
+
trackIndex,
|
|
419
|
+
layerIndex: trackCount - trackIndex,
|
|
420
|
+
contentIndex
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function compositionFormatDimensions(format) {
|
|
424
|
+
const fps = format.fps ?? 30;
|
|
425
|
+
const resolution = format.resolution ?? "fhd";
|
|
426
|
+
const dims = {
|
|
427
|
+
"9:16": {
|
|
428
|
+
hd: { width: 720, height: 1280 },
|
|
429
|
+
fhd: { width: 1080, height: 1920 },
|
|
430
|
+
"4k": { width: 2160, height: 3840 }
|
|
431
|
+
},
|
|
432
|
+
"1:1": {
|
|
433
|
+
hd: { width: 720, height: 720 },
|
|
434
|
+
fhd: { width: 1080, height: 1080 },
|
|
435
|
+
"4k": { width: 2160, height: 2160 }
|
|
436
|
+
},
|
|
437
|
+
"4:5": {
|
|
438
|
+
hd: { width: 720, height: 900 },
|
|
439
|
+
fhd: { width: 1080, height: 1350 },
|
|
440
|
+
"4k": { width: 2160, height: 2700 }
|
|
441
|
+
},
|
|
442
|
+
"16:9": {
|
|
443
|
+
hd: { width: 1280, height: 720 },
|
|
444
|
+
fhd: { width: 1920, height: 1080 },
|
|
445
|
+
"4k": { width: 3840, height: 2160 }
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
return { ...dims[format.aspectRatio][resolution], fps };
|
|
449
|
+
}
|
|
304
450
|
function frames(seconds, fps) {
|
|
305
451
|
return Math.max(0, Math.round(seconds * fps));
|
|
306
452
|
}
|
|
@@ -354,7 +500,7 @@ function playableSpans(trimStart, trimEnd, excluded) {
|
|
|
354
500
|
if (cursor < trimEnd) out.push({ start: cursor, end: trimEnd });
|
|
355
501
|
return out;
|
|
356
502
|
}
|
|
357
|
-
function projectMediaTrack(track, fps, srcUrls, trajectoryUrls, coViewUrls, trajectories) {
|
|
503
|
+
function projectMediaTrack(track, trackIndex, trackCount, fps, srcUrls, trajectoryUrls, coViewUrls, trajectories) {
|
|
358
504
|
const clips = [];
|
|
359
505
|
const audio = [];
|
|
360
506
|
const effects = [];
|
|
@@ -374,12 +520,26 @@ function projectMediaTrack(track, fps, srcUrls, trajectoryUrls, coViewUrls, traj
|
|
|
374
520
|
clipId: c.id,
|
|
375
521
|
compositionPath: `composition.tracks[${track.id}].contents[${i}].source.mediaId`
|
|
376
522
|
});
|
|
377
|
-
const packedUrl = coViewUrls?.[c.id]
|
|
378
|
-
|
|
523
|
+
const packedUrl = coViewUrls?.[c.id];
|
|
524
|
+
const packedEnvelopeFields = packedUrl === void 0 ? [] : [
|
|
525
|
+
c.region !== void 0 && !(c.region.x === 0 && c.region.y === 0 && c.region.w === 1 && c.region.h === 1) ? "region" : null,
|
|
526
|
+
c.fit !== void 0 && c.fit !== "cover" ? "fit" : null,
|
|
527
|
+
c.opacity !== void 0 && c.opacity !== 1 ? "opacity" : null,
|
|
528
|
+
c.scale !== void 0 && c.scale !== 1 ? "scale" : null,
|
|
529
|
+
c.rotation !== void 0 && c.rotation !== 0 ? "rotation" : null,
|
|
530
|
+
c.animate !== void 0 ? "animate" : null,
|
|
531
|
+
c.transitionIn !== void 0 && c.transitionIn.type !== "none" && c.transitionIn.type !== "cut" ? "transitionIn" : null
|
|
532
|
+
].filter((field) => field !== null);
|
|
533
|
+
if (packedEnvelopeFields.length > 0) {
|
|
379
534
|
throw renderInputError(
|
|
380
|
-
"
|
|
381
|
-
`composition.tracks[${track.id}].contents[${i}] (clip ${c.id}):
|
|
382
|
-
{
|
|
535
|
+
"packed_visual_envelope_unsupported",
|
|
536
|
+
`composition.tracks[${track.id}].contents[${i}] (clip ${c.id}): the packed co-view render path cannot yet preserve ${packedEnvelopeFields.join(", ")}. Remove those fields or render without behind-subject depth; ignoring them would produce false evidence.`,
|
|
537
|
+
{
|
|
538
|
+
trackId: track.id,
|
|
539
|
+
clipId: c.id,
|
|
540
|
+
compositionPath: `composition.tracks[${track.id}].contents[${i}]`,
|
|
541
|
+
fields: packedEnvelopeFields
|
|
542
|
+
}
|
|
383
543
|
);
|
|
384
544
|
}
|
|
385
545
|
if (track.kind === "audio") {
|
|
@@ -431,7 +591,9 @@ function projectMediaTrack(track, fps, srcUrls, trajectoryUrls, coViewUrls, traj
|
|
|
431
591
|
const subId = spans.length === 1 ? c.id : `${c.id}#${s}`;
|
|
432
592
|
if (firstEmittedSubId === void 0) firstEmittedSubId = subId;
|
|
433
593
|
clips.push({
|
|
594
|
+
...visualIdentity(track, trackIndex, trackCount, i),
|
|
434
595
|
id: subId,
|
|
596
|
+
...spans.length > 1 ? { parentId: c.id } : {},
|
|
435
597
|
src,
|
|
436
598
|
sourceInFrames,
|
|
437
599
|
sourceOutFrames: sourceInFrames + subDurationFrames,
|
|
@@ -458,28 +620,16 @@ function projectMediaTrack(track, fps, srcUrls, trajectoryUrls, coViewUrls, traj
|
|
|
458
620
|
});
|
|
459
621
|
}
|
|
460
622
|
if (firstEmittedSubId !== void 0) {
|
|
461
|
-
effects.push(...projectClipEffects(
|
|
623
|
+
effects.push(...projectClipEffects(
|
|
624
|
+
c,
|
|
625
|
+
firstEmittedSubId,
|
|
626
|
+
visualIdentity(track, trackIndex, trackCount, i)
|
|
627
|
+
));
|
|
462
628
|
}
|
|
463
629
|
}
|
|
464
|
-
for (let i = 1; i < clips.length; i++) {
|
|
465
|
-
const prev = clips[i - 1];
|
|
466
|
-
const cur = clips[i];
|
|
467
|
-
if (prev.src !== cur.src) continue;
|
|
468
|
-
if ((prev.playbackRate ?? 1) !== (cur.playbackRate ?? 1)) continue;
|
|
469
|
-
if (JSON.stringify(prev.region) !== JSON.stringify(cur.region)) continue;
|
|
470
|
-
if ((prev.fit ?? "cover") !== (cur.fit ?? "cover")) continue;
|
|
471
|
-
if (prev.cropTrajectoryUrl !== cur.cropTrajectoryUrl) continue;
|
|
472
|
-
if (prev.cropTrajectory !== cur.cropTrajectory) continue;
|
|
473
|
-
if ((prev.trimStartFrames ?? 0) !== (cur.trimStartFrames ?? 0)) continue;
|
|
474
|
-
const prevEnd = prev.timelineStartFrames + prev.durationInFrames;
|
|
475
|
-
if (Math.abs(prevEnd - cur.timelineStartFrames) > 1) continue;
|
|
476
|
-
const parent = prev.parentId ?? prev.id;
|
|
477
|
-
cur.parentId = parent;
|
|
478
|
-
if (prev.parentId === void 0) prev.parentId = parent;
|
|
479
|
-
}
|
|
480
630
|
return { clips, audio, effects };
|
|
481
631
|
}
|
|
482
|
-
function projectImageTrack(track, fps, srcUrls) {
|
|
632
|
+
function projectImageTrack(track, trackIndex, trackCount, fps, srcUrls) {
|
|
483
633
|
const clips = [];
|
|
484
634
|
const effects = [];
|
|
485
635
|
for (let i = 0; i < track.contents.length; i++) {
|
|
@@ -505,6 +655,7 @@ function projectImageTrack(track, fps, srcUrls) {
|
|
|
505
655
|
);
|
|
506
656
|
if (durationInFrames === 0) continue;
|
|
507
657
|
clips.push({
|
|
658
|
+
...visualIdentity(track, trackIndex, trackCount, i),
|
|
508
659
|
id: c.id,
|
|
509
660
|
src,
|
|
510
661
|
sourceInFrames: 0,
|
|
@@ -521,7 +672,11 @@ function projectImageTrack(track, fps, srcUrls) {
|
|
|
521
672
|
...c.region !== void 0 ? { region: c.region } : {},
|
|
522
673
|
...c.fit !== void 0 ? { fit: c.fit } : {}
|
|
523
674
|
});
|
|
524
|
-
effects.push(...projectClipEffects(
|
|
675
|
+
effects.push(...projectClipEffects(
|
|
676
|
+
c,
|
|
677
|
+
c.id,
|
|
678
|
+
visualIdentity(track, trackIndex, trackCount, i)
|
|
679
|
+
));
|
|
525
680
|
}
|
|
526
681
|
return { clips, effects };
|
|
527
682
|
}
|
|
@@ -535,11 +690,18 @@ function clipTransformChannel(c) {
|
|
|
535
690
|
...c.animate !== void 0 ? { animate: c.animate } : {}
|
|
536
691
|
};
|
|
537
692
|
}
|
|
538
|
-
function projectOverlayTrack(track,
|
|
693
|
+
function projectOverlayTrack(track, trackIndex, trackCount, fps, alphaUrls = {}) {
|
|
539
694
|
const overlays = [];
|
|
540
695
|
for (let i = 0; i < track.contents.length; i++) {
|
|
541
696
|
const c = track.contents[i];
|
|
542
697
|
if (!("source" in c) || !c.source) continue;
|
|
698
|
+
if (c.effects && c.effects.length > 0) {
|
|
699
|
+
throw renderInputError(
|
|
700
|
+
"clip_effect_scope_unsupported",
|
|
701
|
+
`Overlay clip '${c.id}' has clip effects that cannot yet preserve the overlay alpha/region envelope. Move the effect to an effect track or remove it.`,
|
|
702
|
+
{ trackId: track.id, clipId: c.id, compositionPath: `composition.tracks[${track.id}].contents[${i}].effects` }
|
|
703
|
+
);
|
|
704
|
+
}
|
|
543
705
|
if (c.source.kind === "alpha-layer") {
|
|
544
706
|
const { startFrame: startFrame2, durationInFrames: durationInFrames2 } = timelineSpanFrames(
|
|
545
707
|
c.startTime,
|
|
@@ -561,6 +723,7 @@ function projectOverlayTrack(track, fps, alphaUrls = {}, jsSourceByClipId = {})
|
|
|
561
723
|
);
|
|
562
724
|
}
|
|
563
725
|
overlays.push({
|
|
726
|
+
...visualIdentity(track, trackIndex, trackCount, i),
|
|
564
727
|
id: c.id,
|
|
565
728
|
template: "alpha-layer",
|
|
566
729
|
startFrame: startFrame2,
|
|
@@ -582,6 +745,7 @@ function projectOverlayTrack(track, fps, alphaUrls = {}, jsSourceByClipId = {})
|
|
|
582
745
|
);
|
|
583
746
|
if (durationInFrames2 === 0) continue;
|
|
584
747
|
overlays.push({
|
|
748
|
+
...visualIdentity(track, trackIndex, trackCount, i),
|
|
585
749
|
id: c.id,
|
|
586
750
|
template: "card",
|
|
587
751
|
startFrame: startFrame2,
|
|
@@ -613,21 +777,14 @@ function projectOverlayTrack(track, fps, alphaUrls = {}, jsSourceByClipId = {})
|
|
|
613
777
|
if (durationInFrames === 0) continue;
|
|
614
778
|
let overlayParams = c.source.params ?? {};
|
|
615
779
|
if (c.source.primitiveId === "custom") {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
`composition.tracks[${track.id}].contents[${i}].source: custom overlay has no sourceCode (no fresh jsSource for clip '${c.id}' and no inline params.sourceCode) \u2014 mirror code 'custom_missing_sourcecode'`,
|
|
622
|
-
{ trackId: track.id, clipId: c.id, compositionPath: `composition.tracks[${track.id}].contents[${i}].source` }
|
|
623
|
-
);
|
|
624
|
-
}
|
|
625
|
-
const { componentId: _cid, sourceCode: _sc, ...props } = overlayParams;
|
|
626
|
-
void _cid;
|
|
627
|
-
void _sc;
|
|
628
|
-
overlayParams = { sourceCode: sc, ...props };
|
|
780
|
+
throw renderInputError(
|
|
781
|
+
"invalid_composition",
|
|
782
|
+
`composition.tracks[${track.id}].contents[${i}].source: custom overlays must be baked to a verified alpha-layer before rendering`,
|
|
783
|
+
{ trackId: track.id, clipId: c.id, compositionPath: `composition.tracks[${track.id}].contents[${i}].source` }
|
|
784
|
+
);
|
|
629
785
|
}
|
|
630
786
|
overlays.push({
|
|
787
|
+
...visualIdentity(track, trackIndex, trackCount, i),
|
|
631
788
|
id: c.id,
|
|
632
789
|
template: c.source.primitiveId,
|
|
633
790
|
startFrame,
|
|
@@ -644,7 +801,7 @@ function projectOverlayTrack(track, fps, alphaUrls = {}, jsSourceByClipId = {})
|
|
|
644
801
|
}
|
|
645
802
|
return overlays;
|
|
646
803
|
}
|
|
647
|
-
function projectEffectTrack(track, fps) {
|
|
804
|
+
function projectEffectTrack(track, trackIndex, trackCount, fps) {
|
|
648
805
|
const effects = [];
|
|
649
806
|
for (let i = 0; i < track.contents.length; i++) {
|
|
650
807
|
const c = track.contents[i];
|
|
@@ -663,6 +820,7 @@ function projectEffectTrack(track, fps) {
|
|
|
663
820
|
);
|
|
664
821
|
if (durationInFrames === 0) continue;
|
|
665
822
|
effects.push({
|
|
823
|
+
...visualIdentity(track, trackIndex, trackCount, i),
|
|
666
824
|
id: c.id,
|
|
667
825
|
primitiveId: c.source.primitiveId,
|
|
668
826
|
params: c.source.params ?? {},
|
|
@@ -673,83 +831,6 @@ function projectEffectTrack(track, fps) {
|
|
|
673
831
|
}
|
|
674
832
|
return effects;
|
|
675
833
|
}
|
|
676
|
-
function buildCaptionSpeechSpans(composition, fps) {
|
|
677
|
-
const words = (composition.captions?.segments ?? []).flatMap((seg) => seg.words).filter((w) => w.endMs > w.startMs).sort((a, b) => a.startMs - b.startMs);
|
|
678
|
-
if (words.length === 0) return [];
|
|
679
|
-
const MERGE_GAP_MS = 300;
|
|
680
|
-
const MIN_SPAN_MS = 200;
|
|
681
|
-
const spans = [];
|
|
682
|
-
let cur = { startMs: words[0].startMs, endMs: words[0].endMs };
|
|
683
|
-
for (let i = 1; i < words.length; i++) {
|
|
684
|
-
const w = words[i];
|
|
685
|
-
if (w.startMs - cur.endMs < MERGE_GAP_MS) {
|
|
686
|
-
if (w.endMs > cur.endMs) cur.endMs = w.endMs;
|
|
687
|
-
} else {
|
|
688
|
-
spans.push(cur);
|
|
689
|
-
cur = { startMs: w.startMs, endMs: w.endMs };
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
spans.push(cur);
|
|
693
|
-
return spans.filter((s) => s.endMs - s.startMs >= MIN_SPAN_MS).map((s) => ({
|
|
694
|
-
startFrame: Math.round(s.startMs / 1e3 * fps),
|
|
695
|
-
endFrame: Math.round(s.endMs / 1e3 * fps)
|
|
696
|
-
}));
|
|
697
|
-
}
|
|
698
|
-
function applyRoleDefaultGains(audioTracks, composition) {
|
|
699
|
-
let voPresent;
|
|
700
|
-
for (const track of composition.tracks) {
|
|
701
|
-
if (track.kind !== "audio" || track.enabled === false) continue;
|
|
702
|
-
for (const c of track.contents) {
|
|
703
|
-
if (!("source" in c)) continue;
|
|
704
|
-
const src = c.source;
|
|
705
|
-
if (src.kind !== "media") continue;
|
|
706
|
-
const role = src.audioRole;
|
|
707
|
-
if (!role) continue;
|
|
708
|
-
if (src.volumeDb !== void 0 || src.volume !== void 0) continue;
|
|
709
|
-
if (voPresent === void 0) voPresent = compositionHasVo(composition);
|
|
710
|
-
const gain = Math.pow(10, roleDefaultGainDb(role, voPresent) / 20);
|
|
711
|
-
for (const t of audioTracks) {
|
|
712
|
-
if (t.id === c.id || t.id.startsWith(`${c.id}#`)) t.volume = gain;
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
function applyDuckEnvelopes(audioTracks, composition, fps) {
|
|
718
|
-
const captionSpansFrames = buildCaptionSpeechSpans(composition, fps);
|
|
719
|
-
for (const track of composition.tracks) {
|
|
720
|
-
if (track.kind !== "audio" || track.enabled === false) continue;
|
|
721
|
-
for (const c of track.contents) {
|
|
722
|
-
if (!("source" in c)) continue;
|
|
723
|
-
const src = c.source;
|
|
724
|
-
if (src.kind !== "media") continue;
|
|
725
|
-
const duck = src.duck;
|
|
726
|
-
const role = src.audioRole;
|
|
727
|
-
if (!duck || role !== "music" && role !== "vo") continue;
|
|
728
|
-
const absWindows = duck.windows && duck.windows.length > 0 ? duck.windows.map((w) => ({
|
|
729
|
-
startFrame: Math.round(w.startMs / 1e3 * fps),
|
|
730
|
-
endFrame: Math.round(w.endMs / 1e3 * fps)
|
|
731
|
-
})) : captionSpansFrames;
|
|
732
|
-
if (absWindows.length === 0) continue;
|
|
733
|
-
const duckVolume = Math.pow(10, duck.duckDb / 20);
|
|
734
|
-
const attackFrames = Math.max(0, Math.round(duck.attackMs / 1e3 * fps));
|
|
735
|
-
const releaseFrames = Math.max(0, Math.round(duck.releaseMs / 1e3 * fps));
|
|
736
|
-
for (const t of audioTracks) {
|
|
737
|
-
if (t.id !== c.id && !t.id.startsWith(`${c.id}#`)) continue;
|
|
738
|
-
const rel = [];
|
|
739
|
-
for (const w of absWindows) {
|
|
740
|
-
const s = Math.max(0, w.startFrame - t.startFrame);
|
|
741
|
-
const e = Math.min(t.durationInFrames, w.endFrame - t.startFrame);
|
|
742
|
-
if (e > s) rel.push({ startFrame: s, endFrame: e });
|
|
743
|
-
}
|
|
744
|
-
if (rel.length === 0) continue;
|
|
745
|
-
t.duckWindows = rel;
|
|
746
|
-
t.duckVolume = duckVolume;
|
|
747
|
-
t.duckAttackFrames = attackFrames;
|
|
748
|
-
t.duckReleaseFrames = releaseFrames;
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
834
|
function referencedMediaIds(composition) {
|
|
754
835
|
const ids = /* @__PURE__ */ new Set();
|
|
755
836
|
for (const track of composition.tracks) {
|
|
@@ -762,24 +843,7 @@ function referencedMediaIds(composition) {
|
|
|
762
843
|
}
|
|
763
844
|
return [...ids];
|
|
764
845
|
}
|
|
765
|
-
function
|
|
766
|
-
const refs = {};
|
|
767
|
-
for (const track of composition.tracks) {
|
|
768
|
-
if (track.kind !== "overlay") continue;
|
|
769
|
-
for (const c of track.contents) {
|
|
770
|
-
if (!("source" in c) || !c.source) continue;
|
|
771
|
-
const src = c.source;
|
|
772
|
-
if (src.kind !== "overlay" || src.primitiveId !== "custom") continue;
|
|
773
|
-
const params = src.params ?? {};
|
|
774
|
-
if (typeof params.sourceCode === "string" && params.sourceCode.length > 0) continue;
|
|
775
|
-
if (typeof params.componentId === "string" && params.componentId.length > 0) {
|
|
776
|
-
refs[c.id] = params.componentId;
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
return refs;
|
|
781
|
-
}
|
|
782
|
-
function compositionToRenderInput(composition, srcUrls, trajectoryUrls, coViewUrls, alphaUrls, jsSourceByClipId, subCompositions, trajectories) {
|
|
846
|
+
function compositionToRenderInput(composition, srcUrls, trajectoryUrls, coViewUrls, alphaUrls, subCompositions, trajectories) {
|
|
783
847
|
const flattened = hasCompoundClips(composition) ? flattenCompoundClips(composition, (id) => subCompositions?.[id]) : composition;
|
|
784
848
|
composition = flattened;
|
|
785
849
|
const { width, height, fps } = compositionFormatDimensions(composition.format);
|
|
@@ -787,23 +851,46 @@ function compositionToRenderInput(composition, srcUrls, trajectoryUrls, coViewUr
|
|
|
787
851
|
const overlays = [];
|
|
788
852
|
const audioTracks = [];
|
|
789
853
|
const effects = [];
|
|
790
|
-
|
|
854
|
+
const trackCount = composition.tracks.length;
|
|
855
|
+
for (const [trackIndex, track] of composition.tracks.entries()) {
|
|
791
856
|
if (track.enabled === false) continue;
|
|
792
857
|
if (track.kind === "video" || track.kind === "audio") {
|
|
793
|
-
const { clips: c, audio, effects: clipEffects } = projectMediaTrack(
|
|
858
|
+
const { clips: c, audio, effects: clipEffects } = projectMediaTrack(
|
|
859
|
+
track,
|
|
860
|
+
trackIndex,
|
|
861
|
+
trackCount,
|
|
862
|
+
fps,
|
|
863
|
+
srcUrls,
|
|
864
|
+
trajectoryUrls,
|
|
865
|
+
coViewUrls,
|
|
866
|
+
trajectories
|
|
867
|
+
);
|
|
794
868
|
clips.push(...c);
|
|
795
869
|
audioTracks.push(...audio);
|
|
796
870
|
effects.push(...clipEffects);
|
|
797
871
|
} else if (track.kind === "image") {
|
|
798
|
-
const { clips: c, effects: clipEffects } = projectImageTrack(
|
|
872
|
+
const { clips: c, effects: clipEffects } = projectImageTrack(
|
|
873
|
+
track,
|
|
874
|
+
trackIndex,
|
|
875
|
+
trackCount,
|
|
876
|
+
fps,
|
|
877
|
+
srcUrls
|
|
878
|
+
);
|
|
799
879
|
clips.push(...c);
|
|
800
880
|
effects.push(...clipEffects);
|
|
801
881
|
} else if (track.kind === "overlay") {
|
|
802
|
-
overlays.push(...projectOverlayTrack(
|
|
882
|
+
overlays.push(...projectOverlayTrack(
|
|
883
|
+
track,
|
|
884
|
+
trackIndex,
|
|
885
|
+
trackCount,
|
|
886
|
+
fps,
|
|
887
|
+
alphaUrls ?? {}
|
|
888
|
+
));
|
|
803
889
|
} else if (track.kind === "effect") {
|
|
804
|
-
effects.push(...projectEffectTrack(track, fps));
|
|
890
|
+
effects.push(...projectEffectTrack(track, trackIndex, trackCount, fps));
|
|
805
891
|
}
|
|
806
892
|
}
|
|
893
|
+
bindBehindSubjectHosts(overlays, clips);
|
|
807
894
|
if (audioTracks.length > 0) {
|
|
808
895
|
applyRoleDefaultGains(audioTracks, composition);
|
|
809
896
|
}
|
|
@@ -834,6 +921,9 @@ function compositionToRenderInput(composition, srcUrls, trajectoryUrls, coViewUr
|
|
|
834
921
|
}
|
|
835
922
|
const bodyDurationInFrames = maxBackgroundEndFrames > 0 ? Math.min(maxEndFrames, maxBackgroundEndFrames) : maxEndFrames;
|
|
836
923
|
const captionSegments = composition.captions?.segments.map((seg) => seg.words).filter((words) => words.length > 0);
|
|
924
|
+
if (composition.captions?.zPlane === "behind-subject") {
|
|
925
|
+
assertBehindSubjectCaptionCoverage(captionSegments, clips, fps);
|
|
926
|
+
}
|
|
837
927
|
const brandKit = composition.brandKit;
|
|
838
928
|
const { totalFrames: durationInFrames } = resolveBookendTimeline(
|
|
839
929
|
brandKit,
|
|
@@ -899,8 +989,7 @@ function assembleRenderInput(composition, resolved) {
|
|
|
899
989
|
resolved.srcUrls,
|
|
900
990
|
resolved.trajectoryUrls ?? {},
|
|
901
991
|
resolved.coViewUrls ?? {},
|
|
902
|
-
resolved.alphaUrls ?? {}
|
|
903
|
-
resolved.jsSourceByClipId ?? {}
|
|
992
|
+
resolved.alphaUrls ?? {}
|
|
904
993
|
);
|
|
905
994
|
if (renderInput.brandKit && resolved.fontAssets && resolved.fontAssets.length > 0) {
|
|
906
995
|
renderInput.brandKit.fontAssets = resolved.fontAssets;
|
|
@@ -1885,11 +1974,11 @@ export {
|
|
|
1885
1974
|
VIDEO_BOOKEND_DEFAULT_MS,
|
|
1886
1975
|
bookendFrames,
|
|
1887
1976
|
resolveBookendTimeline,
|
|
1888
|
-
compositionFormatDimensions,
|
|
1889
1977
|
validateComposition,
|
|
1978
|
+
assertBehindSubjectCaptionCoverage,
|
|
1979
|
+
compositionFormatDimensions,
|
|
1890
1980
|
playableSpans,
|
|
1891
1981
|
referencedMediaIds,
|
|
1892
|
-
componentRefsByClipId,
|
|
1893
1982
|
compositionToRenderInput,
|
|
1894
1983
|
assembleRenderInput,
|
|
1895
1984
|
DEFAULT_FPS,
|