@cueframe/kernel 0.2.58 → 0.2.59-rc.1
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/testing/conversationStoreContract.d.ts +3 -4
- package/dist/_members/account-model/testing/restorePointStoreContract.d.ts +3 -4
- package/dist/_members/account-model/validators/index.d.ts +0 -1
- package/dist/_members/animate/index.d.ts +0 -2
- package/dist/_members/authoring/index.d.ts +1 -1
- package/dist/_members/authoring/prompts/index.d.ts +0 -1
- package/dist/_members/authoring/resources.d.ts +2 -11
- package/dist/_members/cloud-import/CloudImportService.d.ts +0 -1
- package/dist/_members/cloud-import/index.d.ts +0 -2
- package/dist/_members/component-runtime/allowedImports.d.ts +6 -0
- package/dist/_members/component-runtime/allowedImports.d.ts.map +1 -1
- package/dist/_members/component-runtime/browserIdentity.d.ts +2 -12
- package/dist/_members/component-runtime/browserIdentity.d.ts.map +1 -1
- package/dist/_members/component-runtime/canonicalIdentity.d.ts +8 -1
- package/dist/_members/component-runtime/canonicalIdentity.d.ts.map +1 -1
- package/dist/_members/component-runtime/contracts.d.ts +2 -1
- package/dist/_members/component-runtime/contracts.d.ts.map +1 -1
- package/dist/_members/component-runtime/identity.d.ts +2 -3
- package/dist/_members/component-runtime/identity.d.ts.map +1 -1
- package/dist/_members/component-runtime/importPolicy.d.ts +5 -0
- package/dist/_members/component-runtime/importPolicy.d.ts.map +1 -1
- package/dist/_members/component-runtime/template/checks.d.ts +71 -0
- package/dist/_members/component-runtime/template/checks.d.ts.map +1 -0
- package/dist/_members/component-runtime/template/extract.d.ts +4 -0
- package/dist/_members/component-runtime/template/extract.d.ts.map +1 -1
- package/dist/_members/component-runtime/template/index.d.ts +1 -0
- package/dist/_members/component-runtime/template/index.d.ts.map +1 -1
- package/dist/_members/component-runtime/template/schema.d.ts +14 -13
- package/dist/_members/component-runtime/template/schema.d.ts.map +1 -1
- package/dist/_members/component-runtime/template/testing/templateApplyContract.d.ts +3 -4
- package/dist/_members/component-runtime/template/testing/templateApplyContract.d.ts.map +1 -1
- package/dist/_members/component-runtime/testing/sourcePolicyCases.d.ts +15 -0
- package/dist/_members/component-runtime/testing/sourcePolicyCases.d.ts.map +1 -0
- package/dist/_members/component-runtime/webglProbe.d.ts.map +1 -1
- package/dist/_members/compose/index.d.ts +1 -1
- package/dist/_members/compose/primitiveRegistry.d.ts +0 -2
- package/dist/_members/composition/audio/audioMix.d.ts +0 -1
- package/dist/_members/composition/audio/mixStaging.d.ts +0 -5
- package/dist/_members/composition/fixtures/index.d.ts +0 -1
- package/dist/_members/composition/graphics-plan/index.d.ts +0 -2
- package/dist/_members/composition/graphics-plan/schemas.d.ts +4 -4
- package/dist/_members/composition/invariants/etag.d.ts +0 -1
- package/dist/_members/composition/invariants/index.d.ts +0 -1
- package/dist/_members/composition/ops/compositionOps.d.ts +0 -1
- package/dist/_members/composition/ops/compositionOps.shared.d.ts +6 -0
- package/dist/_members/composition/ops/index.d.ts +2 -1
- package/dist/_members/composition/primitive-catalog/index.d.ts +0 -2
- package/dist/_members/composition/projection/behind-readiness.d.ts +0 -6
- package/dist/_members/composition/timeline/link.d.ts +0 -4
- package/dist/_members/composition/timeline/plan.d.ts +0 -1
- package/dist/_members/composition/validators/brandKit.d.ts +4 -4
- package/dist/_members/composition/validators/brandKitBody.d.ts +8 -8
- package/dist/_members/composition/validators/cardHtml.d.ts +11 -0
- package/dist/_members/composition/validators/composition.d.ts +2 -5
- package/dist/_members/composition/validators/css-tree-subpaths.d.ts +16 -0
- package/dist/_members/composition/validators/index.d.ts +0 -3
- package/dist/_members/composition/validators/session.d.ts +3 -3
- package/dist/_members/composition/validators/webhook.d.ts +4 -4
- package/dist/_members/composition-ops/alphaLayers.d.ts +0 -5
- package/dist/_members/composition-ops/index.d.ts +2 -2
- package/dist/_members/composition-ops/opRecorder.d.ts +23 -3
- package/dist/_members/core/render/exportSettings.d.ts +4 -2
- package/dist/_members/core/render/index.d.ts +1 -1
- package/dist/_members/core/render/vcam/requiredRegion.d.ts +0 -1
- package/dist/_members/director/ai-sdk/index.d.ts +0 -1
- package/dist/_members/director/ai-sdk/messages.d.ts +0 -1
- package/dist/_members/director/domain/chat.d.ts +0 -78
- package/dist/_members/director/domain/index.d.ts +0 -1
- package/dist/_members/errors/registry.d.ts +6 -0
- package/dist/_members/foundation/canonical/index.d.ts +14 -0
- package/dist/_members/foundation/index.d.ts +1 -1
- package/dist/_members/foundation/primitives/index.d.ts +0 -2
- package/dist/_members/foundation/testing/index.d.ts +1 -0
- package/dist/_members/foundation/testing/knownRed.d.ts +13 -0
- package/dist/_members/mcp/adapter.d.ts +21 -0
- package/dist/_members/mcp/compositionOps.d.ts +10 -0
- package/dist/_members/mcp/server.d.ts +0 -5
- package/dist/_members/mcp/wait.d.ts +3 -1
- package/dist/_members/media-model/generation.d.ts +0 -25
- package/dist/_members/nle-export/xml-utils.d.ts +0 -8
- package/dist/_members/plane/conformance.d.ts +20 -0
- package/dist/_members/primitives/index.d.ts +1 -11
- package/dist/_members/primitives/lib/index.d.ts +1 -1
- package/dist/_members/primitives/lib/tokens.d.ts +0 -16
- package/dist/_members/render-harness/cardAssetAdmission.d.ts +1 -0
- package/dist/_members/render-harness/cardAssetAdmission.d.ts.map +1 -1
- package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
- package/dist/_members/render-harness/materializeSources.d.ts.map +1 -1
- package/dist/_members/render-harness/mediaServer.d.ts +6 -1
- package/dist/_members/render-harness/mediaServer.d.ts.map +1 -1
- package/dist/account-model/testing.js +15 -5
- package/dist/account-model/validators.js +5 -7
- package/dist/account-model.js +5 -7
- package/dist/animate/preparation-facts.js +1 -1
- package/dist/animate.js +2 -6
- package/dist/authoring/composer.js +1 -1
- package/dist/authoring/context.js +8 -7
- package/dist/authoring/models/defaults.d.ts +1 -0
- package/dist/authoring/models/defaults.js +7 -0
- package/dist/authoring/models.js +5 -3
- package/dist/authoring/motion.d.ts +1 -0
- package/dist/authoring/motion.js +25 -0
- package/dist/authoring/prompts.js +4 -14
- package/dist/authoring/providers.js +1 -1
- package/dist/authoring/resource-routing.js +2 -2
- package/dist/authoring/resources.js +4 -22
- package/dist/authoring/scene.js +3 -2
- package/dist/authoring.js +662 -219
- package/dist/brand-derivation/constants.js +1 -1
- package/dist/brand-derivation.js +1 -1
- package/dist/{chunk-LBJ5LI5V.js → chunk-2K2GBFLU.js} +17 -8
- package/dist/{chunk-RAXHCRVV.js → chunk-2PAP5LO5.js} +1 -1
- package/dist/{chunk-MNO6AO2J.js → chunk-3HLDIIWA.js} +1 -1
- package/dist/{chunk-PTVTWQ4T.js → chunk-3JEUNKDK.js} +2 -2
- package/dist/chunk-3VWJ3H4X.js +68 -0
- package/dist/{chunk-S5H6GH6M.js → chunk-3Z7CN54H.js} +1 -1
- package/dist/{chunk-FVDFPJHT.js → chunk-46WBCUPE.js} +1 -1
- package/dist/chunk-4VBLQIM5.js +30 -0
- package/dist/{chunk-N2OZDD44.js → chunk-6HA55CRU.js} +4 -5
- package/dist/{chunk-WL2MLKWU.js → chunk-6HPEMDQW.js} +1 -1
- package/dist/{chunk-PWWZTY3G.js → chunk-6KZCXAYL.js} +5 -2
- package/dist/{chunk-IEXAKOEX.js → chunk-6QGARSV6.js} +2 -15
- package/dist/{chunk-3YVIAWET.js → chunk-7II5OM7R.js} +13 -1
- package/dist/{chunk-UFD4EZHM.js → chunk-AFUITAH6.js} +4 -5
- package/dist/{chunk-HGCYZMII.js → chunk-AK6QPX7A.js} +9 -9
- package/dist/{chunk-EC6VFQE6.js → chunk-BZVOCVQV.js} +1 -0
- package/dist/{chunk-RBWS5XHE.js → chunk-CAF7BRNE.js} +2 -2
- package/dist/{chunk-TR53N6HB.js → chunk-CEO47DIE.js} +6 -3
- package/dist/chunk-CIOUDOGN.js +12 -0
- package/dist/{chunk-GQ6XGAFB.js → chunk-DCKADD5B.js} +1 -1
- package/dist/{chunk-4NIJWK45.js → chunk-EISHFHU5.js} +0 -8
- package/dist/chunk-EQH37KNZ.js +224 -0
- package/dist/{chunk-EXY4JJPH.js → chunk-F6PLDBAK.js} +2 -11
- package/dist/{chunk-DAARYRNT.js → chunk-FKSXKS35.js} +6 -6
- package/dist/{chunk-KBDUEU4W.js → chunk-FZB7UX44.js} +1 -1
- package/dist/chunk-H2ZZXISB.js +24 -0
- package/dist/{chunk-WSMCZRJ2.js → chunk-I2HNC4PQ.js} +1 -1
- package/dist/{chunk-NVXSKKRN.js → chunk-IUJABAG2.js} +14 -10
- package/dist/{chunk-7NIOFHMH.js → chunk-IVFMOHAC.js} +1 -9
- package/dist/{chunk-UKDBU7HM.js → chunk-JNBNDHEF.js} +3 -3
- package/dist/{chunk-JWMWVP64.js → chunk-KC4LNZL5.js} +4 -9
- package/dist/{chunk-GCQ7Z7S7.js → chunk-KKATUGRU.js} +3 -9
- package/dist/{chunk-Q5P5UFOP.js → chunk-KLQ53NX3.js} +13 -1
- package/dist/{chunk-UMXES6ED.js → chunk-LVMWPFV4.js} +1 -1
- package/dist/{chunk-TKFLSGAS.js → chunk-MMJYII7Y.js} +5 -5
- package/dist/{chunk-REST55RC.js → chunk-NECN7TT4.js} +5 -4
- package/dist/{chunk-4ZE564YF.js → chunk-NM7NWXGF.js} +0 -146
- package/dist/{chunk-5T655LYZ.js → chunk-NY6EI5YW.js} +4 -4
- package/dist/{chunk-UXRSEMJJ.js → chunk-ONSGT6UJ.js} +66 -35
- package/dist/{chunk-VZ7TYX6Z.js → chunk-P3EFZDM5.js} +0 -17
- package/dist/{chunk-BEFSJMFF.js → chunk-P6RVYHLT.js} +9 -9
- package/dist/{chunk-TBHSOEYK.js → chunk-PLWDYWK6.js} +4 -34
- package/dist/{chunk-KYRDKK2D.js → chunk-Q6CJ6HCU.js} +1 -6
- package/dist/{chunk-FWSJLHSV.js → chunk-R642352J.js} +1 -1
- package/dist/{chunk-XELS2BGA.js → chunk-R6HTIP3N.js} +1 -3
- package/dist/{chunk-RL5SO653.js → chunk-RQRPSSRT.js} +1 -1
- package/dist/chunk-RR7UBEBV.js +172 -0
- package/dist/{chunk-FHMTAZD4.js → chunk-RWJHZCOR.js} +1 -71
- package/dist/{chunk-73DQTUWY.js → chunk-TIAJMEQ4.js} +2 -22
- package/dist/{chunk-2ESYSVXG.js → chunk-U67V476Y.js} +2 -15
- package/dist/{chunk-3VLDQE26.js → chunk-U7KSOA2L.js} +4 -21
- package/dist/{chunk-VLJOIUHL.js → chunk-UGEUB763.js} +6 -6
- package/dist/{chunk-K66NLMGX.js → chunk-UGWJC4GA.js} +62 -18
- package/dist/chunk-VBYINB74.js +136 -0
- package/dist/{chunk-W2245F6G.js → chunk-WTQRLFR2.js} +1 -1
- package/dist/{chunk-JN3GF36B.js → chunk-X2RTLS6K.js} +2 -23
- package/dist/chunk-XHMKPTHV.js +20 -0
- package/dist/{chunk-2L33CKIY.js → chunk-XOT2VWCO.js} +18 -31
- package/dist/{chunk-AK5QBHOB.js → chunk-XQGQ5EFS.js} +10 -1
- package/dist/chunk-XR76OZKC.js +21 -0
- package/dist/chunk-ZCEYEIRB.js +179 -0
- package/dist/{chunk-IMIUHG2E.js → chunk-ZPJQ3TQL.js} +1 -3
- package/dist/cloud-import.js +1 -16
- package/dist/component-runtime/browserOptions.js +4 -3
- package/dist/component-runtime/contracts.js +2 -2
- package/dist/component-runtime/identity/browser.js +2 -17
- package/dist/component-runtime/identity.js +5 -7
- package/dist/component-runtime/importPolicy.js +3 -3
- package/dist/component-runtime/mediaResolution.js +1 -1
- package/dist/component-runtime/render.js +8 -7
- package/dist/component-runtime/sourceAdmission.js +3 -3
- package/dist/component-runtime/template/testing.js +15 -12
- package/dist/component-runtime/template.js +165 -13
- package/dist/component-runtime.js +27 -28
- package/dist/compose.js +30 -47
- package/dist/composition/audio.js +4 -8
- package/dist/composition/brand-kit.js +1 -1
- package/dist/composition/brief.js +1 -1
- package/dist/composition/card-html.d.ts +1 -0
- package/dist/composition/card-html.js +15 -0
- package/dist/composition/depth.js +1 -1
- package/dist/composition/floors.js +2 -2
- package/dist/composition/fonts.js +1 -1
- package/dist/composition/graphics-plan.js +4 -44
- package/dist/composition/invariants.js +5 -12
- package/dist/composition/ops.js +7 -6
- package/dist/composition/primitive-catalog.js +2 -6
- package/dist/composition/projection.js +3 -5
- package/dist/composition/reframe/coverage.js +1 -1
- package/dist/composition/reframe/kenBurns.js +1 -1
- package/dist/composition/reframe/shotScale.js +1 -1
- package/dist/composition/reframe/trajectory.js +1 -1
- package/dist/composition/reframe.js +1 -1
- package/dist/composition/scene/budget-policy.js +1 -1
- package/dist/composition/scene.js +1 -1
- package/dist/composition/timeline.js +4 -8
- package/dist/composition/validators/brand-kit-body.js +5 -4
- package/dist/composition/validators/graphic-kinds.js +1 -1
- package/dist/composition/validators.js +8 -65
- package/dist/composition-ops.js +17 -16
- package/dist/composition.js +13 -79
- package/dist/context-7SWSVJ6Z.js +17 -0
- package/dist/core/render.js +13 -9
- package/dist/core/select.js +3 -3
- package/dist/core.js +9 -9
- package/dist/director/ai-sdk.js +7 -11
- package/dist/director/domain.js +9 -17
- package/dist/director.js +9 -21
- package/dist/{dist-LAJ2363K.js → dist-6FO67KVA.js} +1 -1
- package/dist/errors.js +2 -2
- package/dist/foundation/canonical.d.ts +1 -0
- package/dist/foundation/canonical.js +7 -0
- package/dist/foundation/primitives.js +4 -6
- package/dist/foundation/testing.d.ts +1 -0
- package/dist/foundation/testing.js +7 -0
- package/dist/foundation.js +7 -9
- package/dist/{magic-string.es-SDTMJBWP.js → magic-string.es-KVSW34UD.js} +1 -1
- package/dist/mcp/adapter.js +11 -19
- package/dist/mcp/composition-ops.d.ts +1 -0
- package/dist/mcp/composition-ops.js +11 -0
- package/dist/mcp/core.js +2 -2
- package/dist/mcp/curation.js +1 -1
- package/dist/mcp/executor.js +1 -1
- package/dist/mcp/scene-shot.js +3 -3
- package/dist/mcp/server.js +6 -7
- package/dist/mcp/wire-schema.js +13 -2
- package/dist/mcp.js +11 -10
- package/dist/media-model/generation.js +6 -8
- package/dist/media-model/media-kind.js +1 -1
- package/dist/media-model/testing.js +2 -2
- package/dist/media-model/transcriptSearch.js +1 -1
- package/dist/media-model.js +6 -8
- package/dist/nle-export/xml.js +1 -1
- package/dist/nle-export.js +2 -2
- package/dist/perception.js +1 -1
- package/dist/plane/conformance.js +8 -4
- package/dist/plane/contract.js +1 -1
- package/dist/plane.js +8 -4
- package/dist/primitives/backgrounds.js +3 -3
- package/dist/primitives/captions.js +2 -2
- package/dist/primitives/effects.js +5 -5
- package/dist/primitives/hero-text.js +4 -4
- package/dist/primitives/layouts.js +4 -4
- package/dist/primitives/lib/easings.js +1 -1
- package/dist/primitives/lib/frameScale.js +1 -1
- package/dist/primitives/lib/index.js +7 -13
- package/dist/primitives/lib/palette.js +2 -2
- package/dist/primitives/lib/preview.js +1 -1
- package/dist/primitives/lib/schema.js +1 -1
- package/dist/primitives/lib/seeded-random.js +1 -1
- package/dist/primitives/lib/text/contrast.js +3 -3
- package/dist/primitives/lib/text/fill.js +1 -1
- package/dist/primitives/lib/text/fitText.js +1 -1
- package/dist/primitives/lib/text/marker.js +1 -1
- package/dist/primitives/lib/text/motion.js +1 -1
- package/dist/primitives/lib/text/recolor.js +1 -1
- package/dist/primitives/lib/text/stage.js +1 -1
- package/dist/primitives/lib/text/typeface.js +1 -1
- package/dist/primitives/lib/tokens.js +4 -11
- package/dist/primitives/lib.js +7 -13
- package/dist/primitives/scenes.js +5 -5
- package/dist/primitives/subject-foreground.js +1 -1
- package/dist/primitives/text.js +4 -4
- package/dist/primitives/transitions.js +3 -3
- package/dist/primitives/ui-blocks.js +6 -6
- package/dist/primitives/workspace.js +1 -1
- package/dist/primitives.js +26 -40
- package/dist/render-harness/cardAssetAdmission.js +4 -4
- package/dist/render-harness/cardFonts.js +3 -3
- package/dist/render-harness/renderInputAssets.js +4 -4
- package/dist/render-harness.js +104 -86
- package/dist/{src-ZP6727AA.js → src-XI5MULKD.js} +17 -16
- package/package.json +38 -60
- package/dist/_members/account-model/validators/workingComposition.d.ts +0 -11
- package/dist/_members/animate/animations/index.d.ts +0 -9
- package/dist/_members/animate/easing/index.d.ts +0 -3
- package/dist/_members/animate/mobjects/index.d.ts +0 -4
- package/dist/_members/animate/scene/internal.d.ts +0 -29
- package/dist/_members/authoring/prompts/graphics.d.ts +0 -9
- package/dist/_members/cloud-import/cloudConfig.d.ts +0 -2
- package/dist/_members/composition/autozoom/index.d.ts +0 -25
- package/dist/_members/composition/graphics-plan/instantiateMotif.d.ts +0 -34
- package/dist/_members/composition/invariants/time.d.ts +0 -14
- package/dist/_members/composition/types/index.d.ts +0 -8
- package/dist/_members/composition/validators/font.d.ts +0 -58
- package/dist/_members/composition/validators/registry.d.ts +0 -79
- package/dist/_members/composition/validators/render.d.ts +0 -2068
- package/dist/_members/director/ai-sdk/chunks.d.ts +0 -14
- package/dist/_members/director/domain/ports.d.ts +0 -32
- package/dist/_members/director/testing/contract.d.ts +0 -52
- package/dist/_members/director/testing/index.d.ts +0 -1
- package/dist/_members/foundation/codes/index.d.ts +0 -10
- package/dist/_members/nle-export/server/index.d.ts +0 -1
- package/dist/_members/nle-export/server/pack-zip.d.ts +0 -6
- package/dist/_members/render-harness/assetRefs.d.ts +0 -26
- package/dist/_members/render-harness/assetRefs.d.ts.map +0 -1
- package/dist/_members/render-harness/remotion-runtime.d.ts +0 -87
- package/dist/authoring/build-tools.d.ts +0 -1
- package/dist/authoring/build-tools.js +0 -28
- package/dist/authoring/capabilities.d.ts +0 -1
- package/dist/authoring/capabilities.js +0 -11
- package/dist/authoring/pipelineTrace.d.ts +0 -1
- package/dist/authoring/pipelineTrace.js +0 -7
- package/dist/authoring/tools.d.ts +0 -1
- package/dist/authoring/tools.js +0 -31
- package/dist/chunk-6UZYUWBX.js +0 -197
- package/dist/chunk-7EDLPIUN.js +0 -384
- package/dist/chunk-GF52TW4I.js +0 -51
- package/dist/chunk-IG3YAOUZ.js +0 -418
- package/dist/chunk-JOURGVOR.js +0 -27
- package/dist/chunk-MFMR3LHO.js +0 -116
- package/dist/chunk-OSMXQV5V.js +0 -18
- package/dist/chunk-QDBVYZSF.js +0 -128
- package/dist/chunk-U3JPILZS.js +0 -15
- package/dist/chunk-Y4HPN4BC.js +0 -364
- package/dist/composition/autozoom.d.ts +0 -1
- package/dist/composition/autozoom.js +0 -76
- package/dist/composition/fixtures.d.ts +0 -1
- package/dist/composition/fixtures.js +0 -154
- package/dist/composition/types.d.ts +0 -1
- package/dist/composition/types.js +0 -0
- package/dist/context-4WSFPRLX.js +0 -16
- package/dist/director/testing.d.ts +0 -1
- package/dist/director/testing.js +0 -22
- package/dist/foundation/codes.d.ts +0 -1
- package/dist/foundation/codes.js +0 -7
- package/dist/nle-export/server.d.ts +0 -1
- package/dist/nle-export/server.js +0 -25856
- /package/dist/{chunk-FTVZF4GO.js → chunk-S432RE6G.js} +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cssLayoutVars
|
|
3
|
+
} from "./chunk-DKBFAQCW.js";
|
|
4
|
+
|
|
5
|
+
// ../authoring/src/motion/shell.ts
|
|
6
|
+
var MOTION_PRESETS = [
|
|
7
|
+
"fade-up",
|
|
8
|
+
"slide-in-left",
|
|
9
|
+
"slide-in-right",
|
|
10
|
+
"scale-pop",
|
|
11
|
+
"stagger-reveal"
|
|
12
|
+
];
|
|
13
|
+
var PRESET_FROM = {
|
|
14
|
+
"fade-up": { dx: 0, dy: 24, scale: 1 },
|
|
15
|
+
"slide-in-left": { dx: -48, dy: 0, scale: 1 },
|
|
16
|
+
"slide-in-right": { dx: 48, dy: 0, scale: 1 },
|
|
17
|
+
"scale-pop": { dx: 0, dy: 0, scale: 0.92 },
|
|
18
|
+
"stagger-reveal": { dx: 0, dy: 12, scale: 1 }
|
|
19
|
+
};
|
|
20
|
+
var PRESET_SUSTAIN = {
|
|
21
|
+
"fade-up": { dx: 0, dy: -6, scale: 0.012 },
|
|
22
|
+
"slide-in-left": { dx: 14, dy: 0, scale: 8e-3 },
|
|
23
|
+
"slide-in-right": { dx: -14, dy: 0, scale: 8e-3 },
|
|
24
|
+
"scale-pop": { dx: 0, dy: -4, scale: 0.012 },
|
|
25
|
+
"stagger-reveal": { dx: 0, dy: -4, scale: 0.01 }
|
|
26
|
+
};
|
|
27
|
+
var POP_WOBBLE = { amp: 8e-3, tau: 0.45, hz: 1.8 };
|
|
28
|
+
var STAGGER_BREATHE = { amp: 2, periodS: 3.4, phase: 0.9 };
|
|
29
|
+
var MAX_STAGGER_CHILDREN = 8;
|
|
30
|
+
function generateMotionShell(cardHtml, opts) {
|
|
31
|
+
if (!cardHtml.trim()) throw new Error("generateMotionShell: empty card markup");
|
|
32
|
+
const enterMs = opts.enterMs ?? 300;
|
|
33
|
+
const exitMs = opts.exitMs ?? 300;
|
|
34
|
+
const staggerMs = opts.staggerMs ?? 120;
|
|
35
|
+
const from = PRESET_FROM[opts.preset];
|
|
36
|
+
if (!from) throw new Error(`generateMotionShell: unknown preset '${opts.preset}'`);
|
|
37
|
+
const sustain = PRESET_SUSTAIN[opts.preset];
|
|
38
|
+
const tokenVars = cssLayoutVars(opts.tokens, void 0);
|
|
39
|
+
const staggerBlock = opts.preset === "stagger-reveal" ? `
|
|
40
|
+
const staggerF = Math.max(1, Math.round((${staggerMs} / 1000) * fps));
|
|
41
|
+
const staggerRules = Array.from({ length: ${MAX_STAGGER_CHILDREN} }, (_, i) => {
|
|
42
|
+
const s = enterF + i * staggerF;
|
|
43
|
+
const o = interpolate(frame, [s, s + enterF], [0, 1], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
|
|
44
|
+
const breathe = ${STAGGER_BREATHE.amp} * Math.sin((tSec / ${STAGGER_BREATHE.periodS}) * Math.PI * 2 + i * ${STAGGER_BREATHE.phase});
|
|
45
|
+
return '[data-stagger] > *:nth-child(' + (i + 1) + ') { opacity: ' + o + '; translate: 0 ' + breathe.toFixed(3) + 'px; }';
|
|
46
|
+
}).join('\\n');` : "";
|
|
47
|
+
const staggerStyleEl = opts.preset === "stagger-reveal" ? `<style>{staggerRules}</style>` : "";
|
|
48
|
+
return `// generated by @cueframe/authoring generateMotionShell \u2014 preset: ${opts.preset}
|
|
49
|
+
import { Easing, interpolate, useCurrentFrame, useVideoConfig } from 'remotion';
|
|
50
|
+
|
|
51
|
+
export default function CardMotionShell({ durationInFrames, params }) {
|
|
52
|
+
const frame = useCurrentFrame();
|
|
53
|
+
const { fps } = useVideoConfig();
|
|
54
|
+
const CARD_HTML = ${JSON.stringify(cardHtml)};
|
|
55
|
+
const enterF = Math.max(1, Math.round((${enterMs} / 1000) * fps));
|
|
56
|
+
const exitF = Math.max(1, Math.round((${exitMs} / 1000) * fps));
|
|
57
|
+
const enter = interpolate(frame, [0, enterF], [0, 1],
|
|
58
|
+
{ easing: Easing.out(Easing.cubic), extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
|
|
59
|
+
const exit = interpolate(frame,
|
|
60
|
+
[Math.max(enterF + 1, durationInFrames - exitF), durationInFrames], [1, 0],
|
|
61
|
+
{ easing: Easing.in(Easing.cubic), extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
|
|
62
|
+
const opacity = Math.min(enter, exit);
|
|
63
|
+
const hold = interpolate(frame, [enterF, durationInFrames], [0, 1],
|
|
64
|
+
{ extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
|
|
65
|
+
const tSec = Math.max(0, frame - enterF) / fps;
|
|
66
|
+
const wobble = ${opts.preset === "scale-pop" ? `${POP_WOBBLE.amp} * Math.exp(-tSec / ${POP_WOBBLE.tau}) * Math.sin(tSec * Math.PI * 2 * ${POP_WOBBLE.hz})` : "0"};
|
|
67
|
+
const dx = ${from.dx} * (1 - enter) + ${sustain.dx} * hold;
|
|
68
|
+
const dy = ${from.dy} * (1 - enter) + ${sustain.dy} * hold;
|
|
69
|
+
const scale = ${from.scale} + (1 - ${from.scale}) * enter + ${sustain.scale} * hold + wobble;${staggerBlock}
|
|
70
|
+
const TOKEN_VARS = ${JSON.stringify(tokenVars)};
|
|
71
|
+
return (
|
|
72
|
+
<div style={{ position: 'absolute', inset: 0, ...TOKEN_VARS,
|
|
73
|
+
opacity, transform: 'translate(' + dx + 'px,' + dy + 'px) scale(' + scale + ')' }}>
|
|
74
|
+
${staggerStyleEl}<div style={{ width: '100%', height: '100%' }}
|
|
75
|
+
dangerouslySetInnerHTML={{ __html: CARD_HTML }} />
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// ../authoring/src/motion/applyMotionPreset.ts
|
|
83
|
+
var MotionPresetError = class extends Error {
|
|
84
|
+
constructor(code, message, opIndex) {
|
|
85
|
+
super(message);
|
|
86
|
+
this.code = code;
|
|
87
|
+
this.opIndex = opIndex;
|
|
88
|
+
this.name = "MotionPresetError";
|
|
89
|
+
}
|
|
90
|
+
code;
|
|
91
|
+
opIndex;
|
|
92
|
+
};
|
|
93
|
+
function resolveMotionPresetCard(composition, input) {
|
|
94
|
+
if (!MOTION_PRESETS.includes(input.preset)) {
|
|
95
|
+
throw new MotionPresetError(
|
|
96
|
+
"motion_preset_unknown",
|
|
97
|
+
`unknown motion preset '${input.preset}' \u2014 pick one of: ${MOTION_PRESETS.join(", ")}`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
const tracks = composition.tracks ?? [];
|
|
101
|
+
const sourced = tracks.flatMap((t) => t?.contents ?? []).filter((c) => !!c && typeof c === "object" && "source" in c && "id" in c);
|
|
102
|
+
const clip = sourced.find((c) => c.id === input.clipId);
|
|
103
|
+
if (!clip) {
|
|
104
|
+
const cards = sourced.filter((c) => c.source.kind === "card").map((c) => `'${c.id}'`);
|
|
105
|
+
throw new MotionPresetError(
|
|
106
|
+
"motion_preset_target_invalid",
|
|
107
|
+
`applyMotionPreset: no clip '${input.clipId}' in the composition. ` + (cards.length > 0 ? `Static card clip ids present: ${cards.join(", ")}.` : `No static card clips remain (already shelled or none authored).`)
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
if (clip.source.kind !== "card" || !clip.source.html) {
|
|
111
|
+
throw new MotionPresetError(
|
|
112
|
+
"motion_preset_target_invalid",
|
|
113
|
+
`applyMotionPreset targets only static card clips \u2014 clip '${input.clipId}' is '${clip.source.kind}'. Library overlays already move (update them directly); components already carry their authored motion.`
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
cardHtml: clip.source.html,
|
|
118
|
+
...clip.source.tokens !== void 0 ? { tokens: clip.source.tokens } : {},
|
|
119
|
+
...clip.source.zPlane !== void 0 ? { zPlane: clip.source.zPlane } : {}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// ../authoring/src/motion/materializeMotionPresetOps.ts
|
|
124
|
+
var isMotionPresetOp = (op) => !!op && typeof op === "object" && op.type === "applyMotionPreset";
|
|
125
|
+
var hasMotionPresetOp = (ops) => ops.some(isMotionPresetOp);
|
|
126
|
+
async function materializeMotionPresetOpsCore(composition, ops, deps) {
|
|
127
|
+
const out = [];
|
|
128
|
+
let current = composition;
|
|
129
|
+
for (let i = 0; i < ops.length; i++) {
|
|
130
|
+
const op = ops[i];
|
|
131
|
+
if (!isMotionPresetOp(op)) {
|
|
132
|
+
out.push(op);
|
|
133
|
+
if (deps.apply) current = deps.apply(current, op);
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
let card;
|
|
137
|
+
try {
|
|
138
|
+
card = resolveMotionPresetCard(current, { clipId: op.clipId, preset: op.preset });
|
|
139
|
+
} catch (err) {
|
|
140
|
+
if (err instanceof MotionPresetError) err.opIndex = i;
|
|
141
|
+
throw err;
|
|
142
|
+
}
|
|
143
|
+
const componentId = `motion-shell-${op.clipId}`;
|
|
144
|
+
const tsxSource = generateMotionShell(card.cardHtml, {
|
|
145
|
+
preset: op.preset,
|
|
146
|
+
...op.params?.enterMs !== void 0 ? { enterMs: op.params.enterMs } : {},
|
|
147
|
+
...op.params?.exitMs !== void 0 ? { exitMs: op.params.exitMs } : {},
|
|
148
|
+
...op.params?.staggerMs !== void 0 ? { staggerMs: op.params.staggerMs } : {},
|
|
149
|
+
...card.tokens !== void 0 ? { tokens: card.tokens } : {}
|
|
150
|
+
});
|
|
151
|
+
const materialized = await deps.sink({
|
|
152
|
+
componentId,
|
|
153
|
+
clipId: op.clipId,
|
|
154
|
+
preset: op.preset,
|
|
155
|
+
tsxSource,
|
|
156
|
+
...card.zPlane !== void 0 ? { zPlane: card.zPlane } : {}
|
|
157
|
+
});
|
|
158
|
+
out.push(materialized);
|
|
159
|
+
if (deps.apply) current = deps.apply(current, materialized);
|
|
160
|
+
}
|
|
161
|
+
return out;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export {
|
|
165
|
+
MOTION_PRESETS,
|
|
166
|
+
generateMotionShell,
|
|
167
|
+
MotionPresetError,
|
|
168
|
+
resolveMotionPresetCard,
|
|
169
|
+
isMotionPresetOp,
|
|
170
|
+
hasMotionPresetOp,
|
|
171
|
+
materializeMotionPresetOpsCore
|
|
172
|
+
};
|
|
@@ -4386,74 +4386,6 @@ function gridToHeroRecipe(input) {
|
|
|
4386
4386
|
return { tiles };
|
|
4387
4387
|
}
|
|
4388
4388
|
|
|
4389
|
-
// ../execution/animate/src/index.ts
|
|
4390
|
-
var sandboxScope = {
|
|
4391
|
-
smooth,
|
|
4392
|
-
smootherstep,
|
|
4393
|
-
rushInto,
|
|
4394
|
-
rushFrom,
|
|
4395
|
-
Create,
|
|
4396
|
-
GrowFromCenter,
|
|
4397
|
-
FadeIn,
|
|
4398
|
-
Write,
|
|
4399
|
-
Indicate,
|
|
4400
|
-
Wiggle,
|
|
4401
|
-
LaggedStart,
|
|
4402
|
-
AnimationGroup,
|
|
4403
|
-
Succession,
|
|
4404
|
-
Transform,
|
|
4405
|
-
MoveAlongPath,
|
|
4406
|
-
GrowArrow,
|
|
4407
|
-
Arrow,
|
|
4408
|
-
makeArrowPath,
|
|
4409
|
-
BrandBox,
|
|
4410
|
-
Graph,
|
|
4411
|
-
DiGraph,
|
|
4412
|
-
ThreeCanvas,
|
|
4413
|
-
FrameDepthOfField,
|
|
4414
|
-
StageCameraRig,
|
|
4415
|
-
useImageTexture,
|
|
4416
|
-
StudioRig,
|
|
4417
|
-
DeviceMesh,
|
|
4418
|
-
deviceDimensions,
|
|
4419
|
-
lidRotationX,
|
|
4420
|
-
makeDefaultScreenTexture,
|
|
4421
|
-
defaultScreenLayout,
|
|
4422
|
-
solveFlex,
|
|
4423
|
-
flexReady,
|
|
4424
|
-
isFlexReady,
|
|
4425
|
-
leafIds,
|
|
4426
|
-
flexBoxToThree,
|
|
4427
|
-
fitBox,
|
|
4428
|
-
FlexLayout,
|
|
4429
|
-
useFlexReady,
|
|
4430
|
-
PerspectiveStage,
|
|
4431
|
-
StageLayer,
|
|
4432
|
-
ContactShadow,
|
|
4433
|
-
useStage,
|
|
4434
|
-
resolveCamera,
|
|
4435
|
-
cameraToThree,
|
|
4436
|
-
perspectiveFor,
|
|
4437
|
-
worldTransform,
|
|
4438
|
-
dofBlur,
|
|
4439
|
-
CAMERA_PRESETS,
|
|
4440
|
-
dollyIn,
|
|
4441
|
-
dollyOut,
|
|
4442
|
-
drift,
|
|
4443
|
-
tiltReveal,
|
|
4444
|
-
orbit,
|
|
4445
|
-
DEFAULT_CAMERA,
|
|
4446
|
-
MediaTileScene,
|
|
4447
|
-
ImageTileScene,
|
|
4448
|
-
driftWallRecipe,
|
|
4449
|
-
infiniteSpiralRecipe,
|
|
4450
|
-
depthJourneyRecipe,
|
|
4451
|
-
infiniteCanvasRecipe,
|
|
4452
|
-
gridToHeroRecipe,
|
|
4453
|
-
SceneShotV2
|
|
4454
|
-
};
|
|
4455
|
-
var sandboxScopeNames = Object.keys(sandboxScope);
|
|
4456
|
-
|
|
4457
4389
|
export {
|
|
4458
4390
|
smooth,
|
|
4459
4391
|
smootherstep,
|
|
@@ -4555,7 +4487,5 @@ export {
|
|
|
4555
4487
|
infiniteSpiralRecipe,
|
|
4556
4488
|
depthJourneyRecipe,
|
|
4557
4489
|
infiniteCanvasRecipe,
|
|
4558
|
-
gridToHeroRecipe
|
|
4559
|
-
sandboxScope,
|
|
4560
|
-
sandboxScopeNames
|
|
4490
|
+
gridToHeroRecipe
|
|
4561
4491
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EntityId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R6HTIP3N.js";
|
|
4
4
|
|
|
5
5
|
// ../data-models/media-model/src/generation.ts
|
|
6
6
|
import { z } from "zod";
|
|
@@ -91,25 +91,6 @@ var GenerationCapability = z.object({
|
|
|
91
91
|
supportsQuote: z.boolean()
|
|
92
92
|
});
|
|
93
93
|
var GenerationCapabilities = z.array(GenerationCapability);
|
|
94
|
-
function deriveGenerationStatus(sources) {
|
|
95
|
-
const { attempt, resource, materialisation } = sources;
|
|
96
|
-
if (attempt.status === "failed") {
|
|
97
|
-
return { status: "failed", placementReady: false, ...attempt.failure ? { failure: attempt.failure } : {} };
|
|
98
|
-
}
|
|
99
|
-
if (attempt.status === "cancelled") return { status: "cancelled", placementReady: false };
|
|
100
|
-
if (attempt.status === "cancelling") return { status: "cancelling", placementReady: false };
|
|
101
|
-
if (materialisation.status === "failed") {
|
|
102
|
-
return { status: "failed", placementReady: false, ...materialisation.failure ? { failure: materialisation.failure } : {} };
|
|
103
|
-
}
|
|
104
|
-
if (!resource.durable) return { status: attempt.status, placementReady: false };
|
|
105
|
-
if (materialisation.required && (!materialisation.verifiedBytes || materialisation.status !== "complete")) {
|
|
106
|
-
return { status: "materialising", placementReady: false };
|
|
107
|
-
}
|
|
108
|
-
if (!resource.decodable || !resource.metadataReady) {
|
|
109
|
-
return { status: "processing", placementReady: false };
|
|
110
|
-
}
|
|
111
|
-
return { status: "ready", placementReady: resource.placementReady };
|
|
112
|
-
}
|
|
113
94
|
|
|
114
95
|
export {
|
|
115
96
|
MediaId,
|
|
@@ -126,6 +107,5 @@ export {
|
|
|
126
107
|
GenerationFailure,
|
|
127
108
|
GenerationArtifact,
|
|
128
109
|
GenerationCapability,
|
|
129
|
-
GenerationCapabilities
|
|
130
|
-
deriveGenerationStatus
|
|
110
|
+
GenerationCapabilities
|
|
131
111
|
};
|
|
@@ -4,16 +4,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
8
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
-
}) : x)(function(x) {
|
|
10
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
-
});
|
|
13
|
-
var __esm = (fn, res) => function __init() {
|
|
14
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
15
|
-
};
|
|
16
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
17
8
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
18
9
|
};
|
|
19
10
|
var __export = (target, all) => {
|
|
@@ -36,13 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
27
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
37
28
|
mod
|
|
38
29
|
));
|
|
39
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
40
30
|
|
|
41
31
|
export {
|
|
42
|
-
__require,
|
|
43
|
-
__esm,
|
|
44
32
|
__commonJS,
|
|
45
33
|
__export,
|
|
46
|
-
__toESM
|
|
47
|
-
__toCommonJS
|
|
34
|
+
__toESM
|
|
48
35
|
};
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
GenerationArtifact,
|
|
3
2
|
MediaId,
|
|
4
3
|
ProjectHome
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
EntityId
|
|
8
|
-
} from "./chunk-XELS2BGA.js";
|
|
4
|
+
} from "./chunk-TIAJMEQ4.js";
|
|
9
5
|
import {
|
|
10
6
|
decodeError,
|
|
11
7
|
scrubSensitive
|
|
12
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XQGQ5EFS.js";
|
|
13
9
|
|
|
14
10
|
// ../director/src/domain/chat.ts
|
|
15
11
|
import { z } from "zod";
|
|
16
|
-
var ConversationId = EntityId("conversation");
|
|
17
|
-
var DirectorRunId = EntityId("directorRun");
|
|
18
12
|
var ProjectRef = z.object({
|
|
19
13
|
id: z.string().min(1),
|
|
20
14
|
home: ProjectHome
|
|
@@ -34,7 +28,7 @@ var ChatErrorView = z.object({
|
|
|
34
28
|
title: z.string().min(1),
|
|
35
29
|
recovery: z.string().optional(),
|
|
36
30
|
retryable: z.boolean(),
|
|
37
|
-
source: z.enum(["provider", "generation", "
|
|
31
|
+
source: z.enum(["provider", "generation", "agent", "transport"]).optional(),
|
|
38
32
|
correlationId: z.string().optional(),
|
|
39
33
|
details: z.string().max(4e3).optional()
|
|
40
34
|
});
|
|
@@ -71,23 +65,12 @@ function chatErrorViewFromUnknown(error, source = "agent") {
|
|
|
71
65
|
...details ? { details } : {}
|
|
72
66
|
};
|
|
73
67
|
}
|
|
74
|
-
var DirectorEvent = z.discriminatedUnion("type", [
|
|
75
|
-
z.object({ type: z.literal("text-delta"), text: z.string() }),
|
|
76
|
-
z.object({ type: z.literal("reasoning-delta"), text: z.string() }),
|
|
77
|
-
z.object({ type: z.literal("phase"), phase: z.string(), detail: z.string().optional() }),
|
|
78
|
-
z.object({ type: z.literal("generation"), artifact: GenerationArtifact }),
|
|
79
|
-
z.object({ type: z.literal("error"), error: ChatErrorView }),
|
|
80
|
-
z.object({ type: z.literal("finish") })
|
|
81
|
-
]);
|
|
82
68
|
|
|
83
69
|
export {
|
|
84
|
-
ConversationId,
|
|
85
|
-
DirectorRunId,
|
|
86
70
|
ProjectRef,
|
|
87
71
|
DirectorTurnContext,
|
|
88
72
|
DirectorTurnEnvelope,
|
|
89
73
|
ChatErrorView,
|
|
90
74
|
chatErrorViewFromEnvelope,
|
|
91
|
-
chatErrorViewFromUnknown
|
|
92
|
-
DirectorEvent
|
|
75
|
+
chatErrorViewFromUnknown
|
|
93
76
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DashboardPopulate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
useFrameScale
|
|
6
|
-
} from "./chunk-QAGGJHAF.js";
|
|
3
|
+
} from "./chunk-3Z7CN54H.js";
|
|
7
4
|
import {
|
|
8
5
|
resolveTypeface
|
|
9
6
|
} from "./chunk-LT4PWSR2.js";
|
|
10
7
|
import {
|
|
11
8
|
FLOOR_SHADOW
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R642352J.js";
|
|
13
10
|
import {
|
|
14
11
|
FitText,
|
|
15
12
|
resolveFitFontSize
|
|
16
13
|
} from "./chunk-XHGZ2E77.js";
|
|
14
|
+
import {
|
|
15
|
+
useFrameScale
|
|
16
|
+
} from "./chunk-QAGGJHAF.js";
|
|
17
17
|
import {
|
|
18
18
|
ACCENT,
|
|
19
19
|
ACCENT_DEEP,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
TEXT_MUTED,
|
|
44
44
|
VIOLET,
|
|
45
45
|
WARNING
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-WTQRLFR2.js";
|
|
47
47
|
|
|
48
48
|
// ../execution/primitives/src/ui-blocks/glass-code-block/index.tsx
|
|
49
49
|
import { Sequence, interpolate, useCurrentFrame } from "remotion";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComponentRuntimeError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BZVOCVQV.js";
|
|
4
4
|
|
|
5
5
|
// ../execution/component-runtime/src/allowedImports.ts
|
|
6
6
|
var COMPONENT_IMPORT_ALLOWLIST = Object.freeze([
|
|
@@ -23,10 +23,12 @@ var COMPONENT_IMPORT_ALLOWLIST = Object.freeze([
|
|
|
23
23
|
"gsap",
|
|
24
24
|
"postprocessing"
|
|
25
25
|
]);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
var DENIED_AMBIENT_CALLS = /* @__PURE__ */ new Set([
|
|
27
|
+
"Date",
|
|
28
|
+
"requestAnimationFrame",
|
|
29
|
+
"setTimeout",
|
|
30
|
+
"setInterval"
|
|
31
|
+
]);
|
|
30
32
|
var DENIED_NONDETERMINISTIC_MEMBERS = /* @__PURE__ */ new Set([
|
|
31
33
|
"Math.random",
|
|
32
34
|
"Date.now",
|
|
@@ -34,13 +36,17 @@ var DENIED_NONDETERMINISTIC_MEMBERS = /* @__PURE__ */ new Set([
|
|
|
34
36
|
"crypto.getRandomValues",
|
|
35
37
|
"crypto.randomUUID"
|
|
36
38
|
]);
|
|
37
|
-
var
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
39
|
+
var GUARDED_MEDIA_EXPORTS = /* @__PURE__ */ new Set([
|
|
40
|
+
"Audio",
|
|
41
|
+
"Html5Audio",
|
|
42
|
+
"Html5Video",
|
|
43
|
+
"OffthreadVideo",
|
|
44
|
+
"Video"
|
|
42
45
|
]);
|
|
43
|
-
|
|
46
|
+
|
|
47
|
+
// ../execution/component-runtime/src/importPolicy.ts
|
|
48
|
+
import { parse } from "@babel/parser";
|
|
49
|
+
var ALLOWED_IMPORTS = new Set(COMPONENT_IMPORT_ALLOWLIST);
|
|
44
50
|
function importedName(specifier) {
|
|
45
51
|
const imported = specifier.imported;
|
|
46
52
|
if (specifier.type !== "ImportSpecifier" || !imported) return null;
|
|
@@ -68,9 +74,43 @@ function denied(specifier) {
|
|
|
68
74
|
`Component import is not allowed: ${JSON.stringify(specifier)}.`
|
|
69
75
|
);
|
|
70
76
|
}
|
|
77
|
+
var IGNORED_KEYS = /* @__PURE__ */ new Set(["loc", "start", "end", "errors", "comments"]);
|
|
78
|
+
function walkableChildren(node) {
|
|
79
|
+
return Object.entries(node).filter(([key]) => !IGNORED_KEYS.has(key)).map(([, child]) => child);
|
|
80
|
+
}
|
|
81
|
+
function assertMediaTileScenePropsExplicit(value, names) {
|
|
82
|
+
if (!value || typeof value !== "object") return;
|
|
83
|
+
if (Array.isArray(value)) {
|
|
84
|
+
for (const child of value) assertMediaTileScenePropsExplicit(child, names);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const node = value;
|
|
88
|
+
const name = node.name;
|
|
89
|
+
if (node.type === "JSXOpeningElement" && name?.type === "JSXIdentifier" && names.has(name.name)) {
|
|
90
|
+
const attributes = Array.isArray(node.attributes) ? node.attributes : [];
|
|
91
|
+
if (attributes.some((attribute) => attribute.type === "JSXSpreadAttribute")) {
|
|
92
|
+
throw new ComponentRuntimeError(
|
|
93
|
+
"component_api_mismatch",
|
|
94
|
+
"MediaTileScene props must be explicit so the source can be admitted."
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
const given = new Set(attributes.flatMap((attribute) => {
|
|
98
|
+
const key = attribute.name;
|
|
99
|
+
return attribute.type === "JSXAttribute" && key?.type === "JSXIdentifier" ? [key.name] : [];
|
|
100
|
+
}));
|
|
101
|
+
const missing = ["streams", "tiles"].filter((prop) => !given.has(prop));
|
|
102
|
+
if (missing.length > 0) {
|
|
103
|
+
throw new ComponentRuntimeError(
|
|
104
|
+
"component_api_mismatch",
|
|
105
|
+
`MediaTileScene requires ${missing.map((prop) => `\`${prop}\``).join(" and ")}. Pass \`streams={{ id: { asset: assets.slot } }}\` and make each tile reference that id with \`stream\`.`
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
for (const child of walkableChildren(node)) assertMediaTileScenePropsExplicit(child, names);
|
|
110
|
+
}
|
|
71
111
|
function assertComponentImportsAllowed(tsxSource, graphicsApi) {
|
|
72
112
|
let root;
|
|
73
|
-
|
|
113
|
+
const mediaTileSceneNames = /* @__PURE__ */ new Set();
|
|
74
114
|
try {
|
|
75
115
|
root = parse(tsxSource, {
|
|
76
116
|
sourceType: "module",
|
|
@@ -101,7 +141,12 @@ function assertComponentImportsAllowed(tsxSource, graphicsApi) {
|
|
|
101
141
|
}
|
|
102
142
|
if (specifier === "@cueframe/animate" && type === "ImportDeclaration") {
|
|
103
143
|
const specifiers = Array.isArray(node.specifiers) ? node.specifiers : [];
|
|
104
|
-
|
|
144
|
+
for (const imported of specifiers) {
|
|
145
|
+
const name = importedName(imported);
|
|
146
|
+
if (name !== "MediaTileScene" && name !== "ImageTileScene") continue;
|
|
147
|
+
const local = imported.local;
|
|
148
|
+
mediaTileSceneNames.add(typeof local?.name === "string" ? local.name : name);
|
|
149
|
+
}
|
|
105
150
|
}
|
|
106
151
|
}
|
|
107
152
|
if (type === "ImportExpression") denied("dynamic import()");
|
|
@@ -153,13 +198,12 @@ function assertComponentImportsAllowed(tsxSource, graphicsApi) {
|
|
|
153
198
|
denied(argument.value);
|
|
154
199
|
}
|
|
155
200
|
}
|
|
156
|
-
for (const
|
|
157
|
-
if (key === "loc" || key === "start" || key === "end" || key === "errors" || key === "comments") continue;
|
|
158
|
-
visit(child);
|
|
159
|
-
}
|
|
201
|
+
for (const child of walkableChildren(node)) visit(child);
|
|
160
202
|
};
|
|
161
203
|
visit(root);
|
|
162
|
-
if (
|
|
204
|
+
if (mediaTileSceneNames.size === 0) return;
|
|
205
|
+
assertMediaTileScenePropsExplicit(root, mediaTileSceneNames);
|
|
206
|
+
if (graphicsApi !== void 0 && graphicsApi !== "webgl2") {
|
|
163
207
|
throw new ComponentRuntimeError(
|
|
164
208
|
"component_graphics_mismatch",
|
|
165
209
|
"MediaTileScene requires manifest.graphics.api to be webgl2."
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// ../authoring/src/prompts/evaluatorPrompt.ts
|
|
2
|
+
var EVALUATOR_PROMPT = `You are a skeptical QA reviewer. Your job is to find problems, not praise work.
|
|
3
|
+
|
|
4
|
+
SCORING RULES:
|
|
5
|
+
- If something looks "fine" but not "good", that's a 5, not a 7.
|
|
6
|
+
- Never say "overall looks good" then list issues. Issues mean score deductions.
|
|
7
|
+
- If a verification criterion is not met, the phase FAILS regardless of other scores.
|
|
8
|
+
- Compare against the original task: anything skipped is a deduction.
|
|
9
|
+
- Score each dimension independently on a 0-10 scale.
|
|
10
|
+
|
|
11
|
+
CALIBRATION:
|
|
12
|
+
|
|
13
|
+
## Timeline Edit: design_quality
|
|
14
|
+
SCORE 3/10 \u2014 FAIL:
|
|
15
|
+
"Centered white text on dark background. No animation. No accent elements."
|
|
16
|
+
|
|
17
|
+
SCORE 8/10 \u2014 PASS:
|
|
18
|
+
"Staggered entrance with spring physics, accent bar + text with letter-spacing animation, exit choreography in final 15 frames. Multiple animated layers."
|
|
19
|
+
|
|
20
|
+
THE DIFFERENCE: Layered composition with choreographed timing vs. single static element.
|
|
21
|
+
|
|
22
|
+
## Timeline Edit: craft
|
|
23
|
+
SCORE 3/10 \u2014 FAIL:
|
|
24
|
+
"Linear fade in, linear fade out. No spring physics. No stagger. Static positioning."
|
|
25
|
+
|
|
26
|
+
SCORE 8/10 \u2014 PASS:
|
|
27
|
+
"Spring entrance (damping: 12, stiffness: 180), 8-frame stagger between elements, translateY exit with opacity fade, accent bar slides independently."
|
|
28
|
+
|
|
29
|
+
THE DIFFERENCE: Physics-based motion with choreography vs. basic CSS transitions.
|
|
30
|
+
|
|
31
|
+
## Artifact: quality
|
|
32
|
+
SCORE 3/10 \u2014 FAIL:
|
|
33
|
+
"Generic summary that could be about any podcast. No specific quotes or moments referenced."
|
|
34
|
+
|
|
35
|
+
SCORE 8/10 \u2014 PASS:
|
|
36
|
+
"Opens with a specific compelling quote from the episode. References 3 key moments by timestamp. Matches the host's voice and vocabulary."
|
|
37
|
+
|
|
38
|
+
THE DIFFERENCE: Specific, contextualized content vs. generic filler.
|
|
39
|
+
|
|
40
|
+
OUTPUT FORMAT:
|
|
41
|
+
Respond with ONLY a JSON object (no markdown, no explanation):
|
|
42
|
+
{
|
|
43
|
+
"scores": { "dimension_name": 0-10, ... },
|
|
44
|
+
"critique": "specific issues found",
|
|
45
|
+
"evidence": ["what you observed"]
|
|
46
|
+
}`;
|
|
47
|
+
|
|
48
|
+
// ../authoring/src/prompts/plannerPrompt.ts
|
|
49
|
+
function formatPlanSteps(steps) {
|
|
50
|
+
const arr = steps ?? [];
|
|
51
|
+
return "PLAN:\n" + arr.map(
|
|
52
|
+
(s) => `- ${s.time}s: ${s.name} | ${s.overlayType} | ${s.duration}s | text: "${s.text}" | ${s.visual}`
|
|
53
|
+
).join("\n");
|
|
54
|
+
}
|
|
55
|
+
function buildExecutionTask(plan, originalTask) {
|
|
56
|
+
return `## Pre-approved Plan
|
|
57
|
+
|
|
58
|
+
Execute this plan exactly. Land one element at a time, in order.
|
|
59
|
+
Do NOT re-plan or reconsider \u2014 the plan is locked in.
|
|
60
|
+
|
|
61
|
+
<plan>
|
|
62
|
+
${plan}
|
|
63
|
+
</plan>
|
|
64
|
+
|
|
65
|
+
Original request: ${originalTask}
|
|
66
|
+
|
|
67
|
+
Instructions:
|
|
68
|
+
1. For each line in the plan, apply it with \`apply_composition\`:
|
|
69
|
+
- A graphic is a \`clip.add\` op \u2014 a \`{ kind: 'card', html, tokens }\` source for
|
|
70
|
+
copy you write, a \`{ kind: 'overlay', primitiveId, params }\` source for a
|
|
71
|
+
catalog primitive, or a \`{ kind: 'component', componentId }\` source for a
|
|
72
|
+
component you authored. Use the plan's timing verbatim.
|
|
73
|
+
- A change to something already on the timeline is a \`clip.update\` op
|
|
74
|
+
carrying ONLY the fields that move.
|
|
75
|
+
2. Batch the ops for one element into a single call, then \`preview_frame\` at the
|
|
76
|
+
moments you touched to verify. Fix what the pixels show, then move to the next.
|
|
77
|
+
3. Do NOT skip or add items outside the plan.
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
80
|
+
function buildPlannerUserMessage(params) {
|
|
81
|
+
const parts = [
|
|
82
|
+
PLANNING_INSTRUCTIONS,
|
|
83
|
+
"\n## User Request\n\n" + params.task
|
|
84
|
+
];
|
|
85
|
+
const history = params.messages.slice(0, -1).filter((m) => m.content.length > 0);
|
|
86
|
+
if (history.length > 0) {
|
|
87
|
+
parts.push(
|
|
88
|
+
"\n## Conversation History\n\n" + history.map((m) => `<${m.role}>
|
|
89
|
+
${m.content}
|
|
90
|
+
</${m.role}>`).join("\n")
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
return parts.join("\n");
|
|
94
|
+
}
|
|
95
|
+
var PLANNING_INSTRUCTIONS = `Analyze the project state and transcript to decide if this request needs a multi-overlay plan or can be executed directly.
|
|
96
|
+
|
|
97
|
+
## Workflow
|
|
98
|
+
|
|
99
|
+
1. Call get_context to understand the current project state and transcript \u2014 it
|
|
100
|
+
returns the lead transcript's word timings, so most plans need nothing else.
|
|
101
|
+
2. Call get_media_context for a SPECIFIC media item when you need its own word
|
|
102
|
+
timings or its detected faces; analyze_transcript when you want the editorial
|
|
103
|
+
read (summary / chapters / highlights) rather than the words.
|
|
104
|
+
3. Call submit_plan with your decision.
|
|
105
|
+
|
|
106
|
+
## Decision Criteria
|
|
107
|
+
|
|
108
|
+
Call submit_plan with type "direct" if:
|
|
109
|
+
- The request is a single action (remove, delete, change, update one thing)
|
|
110
|
+
- No transcript analysis is needed
|
|
111
|
+
|
|
112
|
+
Call submit_plan with type "plan" if:
|
|
113
|
+
- Multiple overlays or scenes are needed
|
|
114
|
+
- The request involves analyzing the transcript for key moments
|
|
115
|
+
|
|
116
|
+
## Overlay Types (for plan steps)
|
|
117
|
+
- full-screen: Bold text/graphic covering most of the frame (3-5s)
|
|
118
|
+
- lower-third: Subtitle-style bar in the lower third (3-6s)
|
|
119
|
+
- intro: Title card with ripple insert (3-5s)
|
|
120
|
+
- outro: End card with ripple insert (3-5s)
|
|
121
|
+
- scene: Full-screen designed moment (5-30s) \u2014 a card or component that owns the
|
|
122
|
+
frame: a stat, a comparison, a sequence, a diagram built from catalog pieces
|
|
123
|
+
|
|
124
|
+
## Plan Guidelines (when type is "plan")
|
|
125
|
+
- Pick 3-7 key moments, spaced at least 10s apart
|
|
126
|
+
- Text MUST come from the actual transcript \u2014 do not invent quotes
|
|
127
|
+
- Prefer moments where the speaker introduces a concept or transitions topics
|
|
128
|
+
- At most 1 intro and 1 outro`;
|
|
129
|
+
|
|
130
|
+
export {
|
|
131
|
+
EVALUATOR_PROMPT,
|
|
132
|
+
formatPlanSteps,
|
|
133
|
+
buildExecutionTask,
|
|
134
|
+
buildPlannerUserMessage,
|
|
135
|
+
PLANNING_INSTRUCTIONS
|
|
136
|
+
};
|