@cueframe/kernel 0.1.0 → 0.1.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/LICENSE +661 -0
- package/dist/_members/composition/ops/compositionOps.d.ts +1 -0
- package/dist/_members/composition/projection/behind-readiness.d.ts +127 -0
- package/dist/_members/composition/projection/index.d.ts +2 -0
- package/dist/_members/composition/projection/reframe-readiness.d.ts +156 -0
- package/dist/_members/composition/validators/composition.d.ts +42 -25
- package/dist/_members/composition/validators/render.d.ts +32 -0
- package/dist/_members/core/render/compositionRender.d.ts +17 -1
- package/dist/_members/core/render/types.d.ts +31 -0
- package/dist/authoring/build-tools.js +6 -6
- package/dist/authoring/context.js +4 -4
- package/dist/authoring/tools.js +5 -5
- package/dist/authoring.js +11 -9
- package/dist/{chunk-ZB3C3HM7.js → chunk-7FO3ZJ43.js} +3 -0
- package/dist/{chunk-ODL7GQJG.js → chunk-AP6ZIVAV.js} +2 -2
- package/dist/{chunk-IBYQG46O.js → chunk-AQBREB5O.js} +1 -1
- package/dist/{chunk-YIOY2XEO.js → chunk-DK2ODBNT.js} +15 -5
- package/dist/{chunk-JRQVPFLF.js → chunk-HY3RIEZW.js} +1 -1
- package/dist/{chunk-GEA7E2FL.js → chunk-JJ6XD7NG.js} +151 -1
- package/dist/{chunk-COYMZ76S.js → chunk-MBCXCJOE.js} +1 -1
- package/dist/{chunk-37NJ27UU.js → chunk-OCFDUCF4.js} +3 -0
- package/dist/{chunk-VOO5FQSS.js → chunk-PDYO3DOJ.js} +5 -5
- package/dist/{chunk-MXFAADCQ.js → chunk-PODIYN2K.js} +9 -2
- package/dist/{chunk-NFEGPWGS.js → chunk-TOJEXFXL.js} +1 -1
- package/dist/{chunk-LM4WDUQJ.js → chunk-UHGSZZDI.js} +1 -1
- package/dist/{chunk-XWKZB5U5.js → chunk-ZWMV6DD2.js} +24 -1
- package/dist/compose/renderer.js +3 -3
- package/dist/compose.js +6 -6
- package/dist/composition/graphics-plan.js +1 -1
- package/dist/composition/ops.js +3 -3
- package/dist/composition/primitive-catalog.js +1 -1
- package/dist/composition/projection.js +19 -3
- package/dist/composition/validators.js +6 -4
- package/dist/composition-ops.js +8 -6
- package/dist/composition.js +24 -6
- package/dist/{context-OKX3HHFS.js → context-YWUZDG5X.js} +4 -4
- package/dist/core/render.js +3 -3
- package/dist/core/select.js +2 -2
- package/dist/core.js +3 -3
- package/dist/errors.js +1 -1
- package/dist/mcp/adapter.js +1 -0
- package/dist/media-model/testing.js +1071 -718
- package/dist/nle-export/server.js +328 -130
- package/dist/nle-export.js +7 -6
- package/package.json +13 -14
- package/dist/_members/account-model/index.js +0 -4
- package/dist/_members/account-model/testing/conversationStoreContract.js +0 -168
- package/dist/_members/account-model/testing/index.js +0 -7
- package/dist/_members/account-model/testing/restorePointStoreContract.js +0 -69
- package/dist/_members/account-model/types/index.js +0 -1
- package/dist/_members/account-model/validators/contextFile.js +0 -18
- package/dist/_members/account-model/validators/conversation.js +0 -95
- package/dist/_members/account-model/validators/dashboardInsight.js +0 -16
- package/dist/_members/account-model/validators/index.js +0 -7
- package/dist/_members/account-model/validators/sessionToken.js +0 -49
- package/dist/_members/account-model/validators/uploadToken.js +0 -16
- package/dist/_members/account-model/validators/userSettings.js +0 -12
- package/dist/_members/account-model/validators/workingComposition.js +0 -20
- package/dist/_members/brand-derivation/constants.js +0 -20
- package/dist/_members/brand-derivation/contrastSafe.js +0 -114
- package/dist/_members/brand-derivation/index.js +0 -1
- package/dist/_members/cloud-import/chunk-XKO6ZSWI.js +0 -162
- package/dist/_members/cloud-import/chunk-XKO6ZSWI.js.map +0 -1
- package/dist/_members/cloud-import/index.js +0 -241
- package/dist/_members/cloud-import/index.js.map +0 -1
- package/dist/_members/cloud-import/multipartUpload.js +0 -7
- package/dist/_members/cloud-import/multipartUpload.js.map +0 -1
- package/dist/_members/composition/audio/audioMix.js +0 -61
- package/dist/_members/composition/audio/index.js +0 -5
- package/dist/_members/composition/audio/mixStaging.js +0 -195
- package/dist/_members/composition/audio/musicPack.generated.js +0 -136
- package/dist/_members/composition/audio/musicPack.js +0 -36
- package/dist/_members/composition/audio/pack.generated.js +0 -603
- package/dist/_members/composition/audio/pack.js +0 -48
- package/dist/_members/composition/audio/palette.js +0 -134
- package/dist/_members/composition/autozoom/index.js +0 -83
- package/dist/_members/composition/brand-kit.js +0 -45
- package/dist/_members/composition/brief/contract.js +0 -209
- package/dist/_members/composition/color-grade.js +0 -80
- package/dist/_members/composition/depth.js +0 -8
- package/dist/_members/composition/fixtures/index.js +0 -143
- package/dist/_members/composition/fixtures/vaayaErrored.d.ts +0 -25
- package/dist/_members/composition/fixtures/vaayaErrored.js +0 -203
- package/dist/_members/composition/fonts.js +0 -162
- package/dist/_members/composition/graphics-plan/compile.js +0 -221
- package/dist/_members/composition/graphics-plan/index.js +0 -10
- package/dist/_members/composition/graphics-plan/instantiateMotif.js +0 -44
- package/dist/_members/composition/graphics-plan/motion.js +0 -66
- package/dist/_members/composition/graphics-plan/schemas.js +0 -261
- package/dist/_members/composition/graphics-plan/solve.js +0 -145
- package/dist/_members/composition/index.js +0 -5
- package/dist/_members/composition/invariants/clipPlacement.js +0 -69
- package/dist/_members/composition/invariants/composition.js +0 -28
- package/dist/_members/composition/invariants/errors.js +0 -10
- package/dist/_members/composition/invariants/etag.js +0 -38
- package/dist/_members/composition/invariants/ids.js +0 -33
- package/dist/_members/composition/invariants/index.js +0 -9
- package/dist/_members/composition/invariants/keyframes.js +0 -45
- package/dist/_members/composition/invariants/markers.js +0 -29
- package/dist/_members/composition/invariants/time.js +0 -20
- package/dist/_members/composition/invariants/tracks.js +0 -304
- package/dist/_members/composition/ops/compositionOps.js +0 -1056
- package/dist/_members/composition/ops/headlessStore.js +0 -94
- package/dist/_members/composition/ops/index.js +0 -4
- package/dist/_members/composition/ops/selectors.js +0 -118
- package/dist/_members/composition/ops/timeline-word.js +0 -1
- package/dist/_members/composition/ops/transcript.js +0 -77
- package/dist/_members/composition/ops/types.js +0 -16
- package/dist/_members/composition/primitive-catalog/catalogQuery.js +0 -150
- package/dist/_members/composition/primitive-catalog/disabled.js +0 -32
- package/dist/_members/composition/primitive-catalog/generated/meta.js +0 -15161
- package/dist/_members/composition/primitive-catalog/index.js +0 -46
- package/dist/_members/composition/primitive-catalog/paramValidation.js +0 -231
- package/dist/_members/composition/primitive-catalog/projection.js +0 -164
- package/dist/_members/composition/primitive-catalog/types.js +0 -14
- package/dist/_members/composition/projection/behind-placement.js +0 -62
- package/dist/_members/composition/projection/brandKit.js +0 -482
- package/dist/_members/composition/projection/cardTokens.js +0 -209
- package/dist/_members/composition/projection/composition-floor.js +0 -582
- package/dist/_members/composition/projection/cropProjection.js +0 -257
- package/dist/_members/composition/projection/index.js +0 -7
- package/dist/_members/composition/projection/occlusion-budget.js +0 -104
- package/dist/_members/composition/projection/safe-zones.js +0 -99
- package/dist/_members/composition/reframe/aspectLoss.js +0 -115
- package/dist/_members/composition/reframe/coverage.js +0 -62
- package/dist/_members/composition/reframe/derive.js +0 -73
- package/dist/_members/composition/reframe/index.js +0 -109
- package/dist/_members/composition/reframe/kenBurns.js +0 -64
- package/dist/_members/composition/reframe/shotScale.js +0 -176
- package/dist/_members/composition/reframe/trajectory.js +0 -124
- package/dist/_members/composition/timeline/compound.js +0 -134
- package/dist/_members/composition/timeline/index.js +0 -9
- package/dist/_members/composition/timeline/intent.js +0 -228
- package/dist/_members/composition/timeline/keyframes.js +0 -121
- package/dist/_members/composition/timeline/link.js +0 -59
- package/dist/_members/composition/timeline/occupancy.js +0 -36
- package/dist/_members/composition/timeline/placement.js +0 -74
- package/dist/_members/composition/timeline/plan.js +0 -31
- package/dist/_members/composition/timeline/resolve.js +0 -170
- package/dist/_members/composition/timeline/trims.js +0 -278
- package/dist/_members/composition/types/index.js +0 -1
- package/dist/_members/composition/validators/brandKit.js +0 -295
- package/dist/_members/composition/validators/composePlan.js +0 -113
- package/dist/_members/composition/validators/composition.js +0 -703
- package/dist/_members/composition/validators/font.js +0 -34
- package/dist/_members/composition/validators/graphicKinds.js +0 -30
- package/dist/_members/composition/validators/index.js +0 -9
- package/dist/_members/composition/validators/project.js +0 -29
- package/dist/_members/composition/validators/registry.js +0 -41
- package/dist/_members/composition/validators/render.js +0 -139
- package/dist/_members/composition/validators/session.js +0 -37
- package/dist/_members/composition/validators/webhook.js +0 -72
- package/dist/_members/composition-ops/alphaLayers.js +0 -141
- package/dist/_members/composition-ops/index.js +0 -637
- package/dist/_members/composition-ops/materializeGrid.js +0 -99
- package/dist/_members/composition-ops/opRecorder.js +0 -196
- package/dist/_members/composition-ops/recordingStore.js +0 -14
- package/dist/_members/composition-ops/replaceRegion.js +0 -102
- package/dist/_members/composition-ops/testFixtures.js +0 -19
- package/dist/_members/core/index.js +0 -5
- package/dist/_members/core/render/bookends.js +0 -53
- package/dist/_members/core/render/captions.js +0 -127
- package/dist/_members/core/render/compositionRender.js +0 -1249
- package/dist/_members/core/render/deriveTrajectory.js +0 -889
- package/dist/_members/core/render/emphasis.js +0 -16
- package/dist/_members/core/render/eval/cropBox.js +0 -139
- package/dist/_members/core/render/eval/inclusion.js +0 -96
- package/dist/_members/core/render/eval/index.js +0 -146
- package/dist/_members/core/render/eval/metrics.js +0 -94
- package/dist/_members/core/render/exportSettings.js +0 -65
- package/dist/_members/core/render/index.js +0 -20
- package/dist/_members/core/render/mapFaceToPerson.js +0 -73
- package/dist/_members/core/render/types.js +0 -8
- package/dist/_members/core/render/vcam/cameraPath.js +0 -248
- package/dist/_members/core/render/vcam/constants.js +0 -115
- package/dist/_members/core/render/vcam/errorCodes.js +0 -39
- package/dist/_members/core/render/vcam/framing.js +0 -136
- package/dist/_members/core/render/vcam/requiredRegion.js +0 -137
- package/dist/_members/core/render/vcam/shots.js +0 -53
- package/dist/_members/core/render/vcam/subjectSet.js +0 -388
- package/dist/_members/core/select/errorCodes.js +0 -38
- package/dist/_members/core/select/index.js +0 -26
- package/dist/_members/core/select/model.js +0 -18
- package/dist/_members/core/select/select.js +0 -244
- package/dist/_members/core/select/stabilize.js +0 -242
- package/dist/_members/core/types.js +0 -7
- package/dist/_members/errors/index.js +0 -1
- package/dist/_members/errors/registry.js +0 -560
- package/dist/_members/foundation/codes/index.js +0 -31
- package/dist/_members/foundation/index.js +0 -2
- package/dist/_members/foundation/primitives/index.js +0 -5
- package/dist/_members/mcp/adapter.js +0 -771
- package/dist/_members/mcp/burnedNames.js +0 -73
- package/dist/_members/mcp/core.js +0 -390
- package/dist/_members/mcp/curation.js +0 -792
- package/dist/_members/mcp/executor.js +0 -142
- package/dist/_members/mcp/format.js +0 -9
- package/dist/_members/mcp/generated/catalogPreviews.js +0 -95
- package/dist/_members/mcp/generated/harness.js +0 -81
- package/dist/_members/mcp/generated/operations.js +0 -131
- package/dist/_members/mcp/index.js +0 -50
- package/dist/_members/mcp/internalLoopTools.js +0 -109
- package/dist/_members/mcp/prompts.js +0 -45
- package/dist/_members/mcp/resources.js +0 -166
- package/dist/_members/mcp/server.js +0 -340
- package/dist/_members/mcp/wait.js +0 -378
- package/dist/_members/mcp/x402Meta.js +0 -66
- package/dist/_members/media-model/api.js +0 -175
- package/dist/_members/media-model/index.js +0 -1
- package/dist/_members/media-model/media-kind.js +0 -116
- package/dist/_members/media-model/testing/index.js +0 -1
- package/dist/_members/media-model/testing/mediaStoreContract.js +0 -82
- package/dist/_members/media-model/transcriptSearch.js +0 -70
- package/dist/_members/media-model/transcriptSearchCases.json +0 -79
- package/dist/_members/nle-export/compact-timeline.js +0 -73
- package/dist/_members/nle-export/compact-timeline.js.map +0 -1
- package/dist/_members/nle-export/composition-to-input.js +0 -147
- package/dist/_members/nle-export/composition-to-input.js.map +0 -1
- package/dist/_members/nle-export/fcpxml.js +0 -159
- package/dist/_members/nle-export/fcpxml.js.map +0 -1
- package/dist/_members/nle-export/index.js +0 -12
- package/dist/_members/nle-export/index.js.map +0 -1
- package/dist/_members/nle-export/premiere.js +0 -161
- package/dist/_members/nle-export/premiere.js.map +0 -1
- package/dist/_members/nle-export/server/index.js +0 -2
- package/dist/_members/nle-export/server/index.js.map +0 -1
- package/dist/_members/nle-export/server/pack-zip.js +0 -38
- package/dist/_members/nle-export/server/pack-zip.js.map +0 -1
- package/dist/_members/nle-export/srt.js +0 -50
- package/dist/_members/nle-export/srt.js.map +0 -1
- package/dist/_members/nle-export/types.js +0 -9
- package/dist/_members/nle-export/types.js.map +0 -1
- package/dist/_members/nle-export/xml/index.js +0 -11
- package/dist/_members/nle-export/xml/index.js.map +0 -1
- package/dist/_members/nle-export/xml-utils.js +0 -48
- package/dist/_members/nle-export/xml-utils.js.map +0 -1
- package/dist/_members/perception/activeSpeaker.js +0 -103
- package/dist/_members/perception/audioQuality.js +0 -76
- package/dist/_members/perception/energyBeat.js +0 -99
- package/dist/_members/perception/identityMatch.js +0 -91
- package/dist/_members/perception/index.js +0 -48
- package/dist/_members/perception/visualQuality.js +0 -95
- package/dist/_members/plane/conformance.js +0 -90
- package/dist/_members/plane/contract.js +0 -49
- package/dist/_members/plane/index.js +0 -16
- package/dist/_members/primitives/backgrounds/index.js +0 -32
- package/dist/_members/primitives/backgrounds/index.js.map +0 -1
- package/dist/_members/primitives/captions/index.js +0 -398
- package/dist/_members/primitives/captions/index.js.map +0 -1
- package/dist/_members/primitives/chunk-2LVE4UIT.js +0 -139
- package/dist/_members/primitives/chunk-2LVE4UIT.js.map +0 -1
- package/dist/_members/primitives/chunk-3IQUH6KK.js +0 -20
- package/dist/_members/primitives/chunk-3IQUH6KK.js.map +0 -1
- package/dist/_members/primitives/chunk-3OMURV6Q.js +0 -112
- package/dist/_members/primitives/chunk-3OMURV6Q.js.map +0 -1
- package/dist/_members/primitives/chunk-4IS6TMEG.js +0 -21
- package/dist/_members/primitives/chunk-4IS6TMEG.js.map +0 -1
- package/dist/_members/primitives/chunk-5MWGAEGQ.js +0 -1644
- package/dist/_members/primitives/chunk-5MWGAEGQ.js.map +0 -1
- package/dist/_members/primitives/chunk-7RRPFPQK.js +0 -15
- package/dist/_members/primitives/chunk-7RRPFPQK.js.map +0 -1
- package/dist/_members/primitives/chunk-DH5TRZK2.js +0 -125
- package/dist/_members/primitives/chunk-DH5TRZK2.js.map +0 -1
- package/dist/_members/primitives/chunk-E3KNUSFG.js +0 -2337
- package/dist/_members/primitives/chunk-E3KNUSFG.js.map +0 -1
- package/dist/_members/primitives/chunk-G2B3G4HK.js +0 -47
- package/dist/_members/primitives/chunk-G2B3G4HK.js.map +0 -1
- package/dist/_members/primitives/chunk-HFPFGZXT.js +0 -1494
- package/dist/_members/primitives/chunk-HFPFGZXT.js.map +0 -1
- package/dist/_members/primitives/chunk-HIWVFZVH.js +0 -19
- package/dist/_members/primitives/chunk-HIWVFZVH.js.map +0 -1
- package/dist/_members/primitives/chunk-IDAL6G3Y.js +0 -134
- package/dist/_members/primitives/chunk-IDAL6G3Y.js.map +0 -1
- package/dist/_members/primitives/chunk-KNC6JP5F.js +0 -34
- package/dist/_members/primitives/chunk-KNC6JP5F.js.map +0 -1
- package/dist/_members/primitives/chunk-KYRDVZST.js +0 -459
- package/dist/_members/primitives/chunk-KYRDVZST.js.map +0 -1
- package/dist/_members/primitives/chunk-LWLHS2NS.js +0 -3410
- package/dist/_members/primitives/chunk-LWLHS2NS.js.map +0 -1
- package/dist/_members/primitives/chunk-QAQ3P7DR.js +0 -8855
- package/dist/_members/primitives/chunk-QAQ3P7DR.js.map +0 -1
- package/dist/_members/primitives/chunk-ROV2ODWC.js +0 -81
- package/dist/_members/primitives/chunk-ROV2ODWC.js.map +0 -1
- package/dist/_members/primitives/chunk-TCRC2FH3.js +0 -183
- package/dist/_members/primitives/chunk-TCRC2FH3.js.map +0 -1
- package/dist/_members/primitives/chunk-US4YEDAA.js +0 -96
- package/dist/_members/primitives/chunk-US4YEDAA.js.map +0 -1
- package/dist/_members/primitives/chunk-UVKRO5ER.js +0 -13
- package/dist/_members/primitives/chunk-UVKRO5ER.js.map +0 -1
- package/dist/_members/primitives/chunk-W4EIIF2I.js +0 -10
- package/dist/_members/primitives/chunk-W4EIIF2I.js.map +0 -1
- package/dist/_members/primitives/chunk-WPGKIPCO.js +0 -3563
- package/dist/_members/primitives/chunk-WPGKIPCO.js.map +0 -1
- package/dist/_members/primitives/chunk-WZFLEGMD.js +0 -1435
- package/dist/_members/primitives/chunk-WZFLEGMD.js.map +0 -1
- package/dist/_members/primitives/chunk-XHU3WBEI.js +0 -33
- package/dist/_members/primitives/chunk-XHU3WBEI.js.map +0 -1
- package/dist/_members/primitives/chunk-YN7WTZZ7.js +0 -46
- package/dist/_members/primitives/chunk-YN7WTZZ7.js.map +0 -1
- package/dist/_members/primitives/effects/index.js +0 -30
- package/dist/_members/primitives/effects/index.js.map +0 -1
- package/dist/_members/primitives/hero-text/index.js +0 -14
- package/dist/_members/primitives/hero-text/index.js.map +0 -1
- package/dist/_members/primitives/index.js +0 -64
- package/dist/_members/primitives/index.js.map +0 -1
- package/dist/_members/primitives/layouts/index.js +0 -24
- package/dist/_members/primitives/layouts/index.js.map +0 -1
- package/dist/_members/primitives/lib/easings.js +0 -26
- package/dist/_members/primitives/lib/easings.js.map +0 -1
- package/dist/_members/primitives/lib/index.js +0 -74
- package/dist/_members/primitives/lib/index.js.map +0 -1
- package/dist/_members/primitives/lib/palette.js +0 -72
- package/dist/_members/primitives/lib/palette.js.map +0 -1
- package/dist/_members/primitives/lib/preview.js +0 -8
- package/dist/_members/primitives/lib/preview.js.map +0 -1
- package/dist/_members/primitives/lib/schema.js +0 -12
- package/dist/_members/primitives/lib/schema.js.map +0 -1
- package/dist/_members/primitives/lib/seeded-random.js +0 -14
- package/dist/_members/primitives/lib/seeded-random.js.map +0 -1
- package/dist/_members/primitives/lib/text/contrast.js +0 -12
- package/dist/_members/primitives/lib/text/contrast.js.map +0 -1
- package/dist/_members/primitives/lib/text/fill.js +0 -8
- package/dist/_members/primitives/lib/text/fill.js.map +0 -1
- package/dist/_members/primitives/lib/text/fitText.js +0 -10
- package/dist/_members/primitives/lib/text/fitText.js.map +0 -1
- package/dist/_members/primitives/lib/text/marker.js +0 -8
- package/dist/_members/primitives/lib/text/marker.js.map +0 -1
- package/dist/_members/primitives/lib/text/motion.js +0 -16
- package/dist/_members/primitives/lib/text/motion.js.map +0 -1
- package/dist/_members/primitives/lib/text/recolor.js +0 -8
- package/dist/_members/primitives/lib/text/recolor.js.map +0 -1
- package/dist/_members/primitives/lib/text/spec.js +0 -1
- package/dist/_members/primitives/lib/text/spec.js.map +0 -1
- package/dist/_members/primitives/lib/text/stage.js +0 -8
- package/dist/_members/primitives/lib/text/stage.js.map +0 -1
- package/dist/_members/primitives/lib/text/typeface.js +0 -8
- package/dist/_members/primitives/lib/text/typeface.js.map +0 -1
- package/dist/_members/primitives/lib/tokens.js +0 -24
- package/dist/_members/primitives/lib/tokens.js.map +0 -1
- package/dist/_members/primitives/lib/types.js +0 -1
- package/dist/_members/primitives/lib/types.js.map +0 -1
- package/dist/_members/primitives/params-required.json +0 -153
- package/dist/_members/primitives/scenes/index.js +0 -25
- package/dist/_members/primitives/scenes/index.js.map +0 -1
- package/dist/_members/primitives/subject-foreground/index.js +0 -30
- package/dist/_members/primitives/subject-foreground/index.js.map +0 -1
- package/dist/_members/primitives/text/index.js +0 -57
- package/dist/_members/primitives/text/index.js.map +0 -1
- package/dist/_members/primitives/transitions/index.js +0 -67
- package/dist/_members/primitives/transitions/index.js.map +0 -1
- package/dist/_members/primitives/ui-blocks/index.js +0 -76
- package/dist/_members/primitives/ui-blocks/index.js.map +0 -1
- package/dist/_members/primitives/version-map.json +0 -105
- package/dist/_members/primitives/workspace.js +0 -60
- package/dist/_members/primitives/workspace.js.map +0 -1
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
// src/lib/text/fitText.tsx
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { fitTextOnNLines } from "@remotion/layout-utils";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
function resolveFitFontSize({
|
|
6
|
-
singleLineFitFontSize,
|
|
7
|
-
minFontSize,
|
|
8
|
-
maxFontSize
|
|
9
|
-
}) {
|
|
10
|
-
const capped = Math.min(maxFontSize, singleLineFitFontSize);
|
|
11
|
-
if (capped >= minFontSize) return { fontSize: capped, overflow: false };
|
|
12
|
-
return { fontSize: minFontSize, overflow: true };
|
|
13
|
-
}
|
|
14
|
-
var FitText = ({
|
|
15
|
-
children,
|
|
16
|
-
maxWidth,
|
|
17
|
-
maxFontSize,
|
|
18
|
-
maxLines = 1,
|
|
19
|
-
minFontSize,
|
|
20
|
-
fontFamily,
|
|
21
|
-
fontWeight = 400,
|
|
22
|
-
letterSpacing,
|
|
23
|
-
textTransform,
|
|
24
|
-
style
|
|
25
|
-
}) => {
|
|
26
|
-
const text = (children ?? "").toString();
|
|
27
|
-
const floor = minFontSize ?? Math.round(maxFontSize * 0.55);
|
|
28
|
-
const fitted = React.useMemo(() => {
|
|
29
|
-
if (text.trim().length === 0) return maxFontSize;
|
|
30
|
-
try {
|
|
31
|
-
const { fontSize: fontSize2 } = fitTextOnNLines({
|
|
32
|
-
text,
|
|
33
|
-
maxLines,
|
|
34
|
-
maxBoxWidth: maxWidth,
|
|
35
|
-
fontFamily,
|
|
36
|
-
fontWeight,
|
|
37
|
-
letterSpacing,
|
|
38
|
-
textTransform,
|
|
39
|
-
maxFontSize,
|
|
40
|
-
validateFontIsLoaded: false
|
|
41
|
-
});
|
|
42
|
-
return fontSize2;
|
|
43
|
-
} catch {
|
|
44
|
-
return maxFontSize;
|
|
45
|
-
}
|
|
46
|
-
}, [text, maxLines, maxWidth, fontFamily, fontWeight, letterSpacing, textTransform, maxFontSize]);
|
|
47
|
-
const { fontSize } = resolveFitFontSize({
|
|
48
|
-
singleLineFitFontSize: fitted,
|
|
49
|
-
minFontSize: floor,
|
|
50
|
-
maxFontSize
|
|
51
|
-
});
|
|
52
|
-
return /* @__PURE__ */ jsx(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
style: {
|
|
56
|
-
fontSize,
|
|
57
|
-
fontFamily,
|
|
58
|
-
fontWeight,
|
|
59
|
-
letterSpacing,
|
|
60
|
-
textTransform,
|
|
61
|
-
maxWidth,
|
|
62
|
-
// Clamp to maxLines with an ellipsis for the extreme case (text still too long
|
|
63
|
-
// at the floor). For maxLines===1 this also keeps it single-line.
|
|
64
|
-
display: "-webkit-box",
|
|
65
|
-
WebkitBoxOrient: "vertical",
|
|
66
|
-
WebkitLineClamp: maxLines,
|
|
67
|
-
overflow: "hidden",
|
|
68
|
-
textOverflow: "ellipsis",
|
|
69
|
-
wordBreak: "break-word",
|
|
70
|
-
...style
|
|
71
|
-
},
|
|
72
|
-
children: text
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export {
|
|
78
|
-
resolveFitFontSize,
|
|
79
|
-
FitText
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=chunk-ROV2ODWC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/text/fitText.tsx"],"sourcesContent":["/**\n * Auto-fit text for render primitives.\n *\n * Text slots used to render at a FIXED font size with no overflow handling, so each\n * carried a hard `maxLength` cap — natural agent copy overflowed it and the write-\n * boundary validation rejected it (guess-and-check churn). `<FitText>` measures the\n * text and shrinks-to-fit → wraps → ellipsizes so any length renders gracefully, which\n * lets the caps be raised to a generous legibility ceiling.\n *\n * `resolveFitFontSize` is the pure decision (unit-tested); the component wires\n * remotion's `fitText` (impure DOM measurement) to feed it.\n */\n\nimport React from 'react';\nimport { fitTextOnNLines, type TextTransform } from '@remotion/layout-utils';\n\nexport interface ResolveFitInput {\n /** Largest single-line font size that fits the text in the container, per remotion\n * `fitText`. `Infinity` for empty/whitespace text (nothing to shrink). */\n singleLineFitFontSize: number;\n /** Floor below which we stop shrinking and wrap+ellipsize instead. */\n minFontSize: number;\n /** The primitive's design font size — the ceiling; we never upscale past it. */\n maxFontSize: number;\n}\n\nexport interface ResolveFitResult {\n fontSize: number;\n /** True when the text can't fit on one line even at `minFontSize` — the caller\n * should wrap to `maxLines` and clip with an ellipsis. */\n overflow: boolean;\n}\n\n/** Clamp the measured single-line fit size into [min, max] and report floor overflow.\n * Never upscales past the design size; a fit at/above the floor is clean. */\nexport function resolveFitFontSize({\n singleLineFitFontSize,\n minFontSize,\n maxFontSize,\n}: ResolveFitInput): ResolveFitResult {\n const capped = Math.min(maxFontSize, singleLineFitFontSize);\n if (capped >= minFontSize) return { fontSize: capped, overflow: false };\n return { fontSize: minFontSize, overflow: true };\n}\n\nexport interface FitTextProps {\n /** The text to render (the single source that used to carry a maxLength cap). */\n children: string | null | undefined;\n /** Available width of the text's box, in px (the primitive's own layout knows this). */\n maxWidth: number;\n /** The primitive's design font size — the ceiling; text never renders larger. */\n maxFontSize: number;\n /** Lines the text may wrap to before it clamps + ellipsizes. Default 1 (titles/labels);\n * use 2–3 for bodies. */\n maxLines?: number;\n /** Floor below which we stop shrinking and clamp+ellipsize. Default 55% of maxFontSize. */\n minFontSize?: number;\n fontFamily: string;\n fontWeight?: number | string;\n letterSpacing?: string;\n /** The measurer's CLOSED union, not csstype's open `string & {}` one — the\n * measurement must see exactly the value the DOM will render, so arbitrary\n * strings are refused at compile time (they'd measure as a no-op). */\n textTransform?: TextTransform;\n /** Extra styles (color, textShadow, background, padding, …) merged last. */\n style?: React.CSSProperties;\n}\n\n/**\n * Render `children` at the largest size that fits `maxWidth` on `maxLines`, shrinking\n * from `maxFontSize` down to `minFontSize`; anything longer clamps to the floor and\n * ellipsizes. Replaces the raw `<div style={{fontSize}}>{text}</div>` in text primitives\n * so long copy degrades gracefully instead of overflowing — which is what lets the\n * `maxLength` caps be raised.\n */\nexport const FitText: React.FC<FitTextProps> = ({\n children,\n maxWidth,\n maxFontSize,\n maxLines = 1,\n minFontSize,\n fontFamily,\n fontWeight = 400,\n letterSpacing,\n textTransform,\n style,\n}) => {\n const text = (children ?? '').toString();\n const floor = minFontSize ?? Math.round(maxFontSize * 0.55);\n\n // Measure once per distinct input, not per frame. `fitTextOnNLines` is an impure DOM\n // measurement; per-frame primitives (typing/animated overlays) re-render every frame,\n // so without memoization this re-measures 30×/s. Keyed on every input that affects the\n // fit — for static inputs this is behavior-identical to the old inline compute.\n const fitted = React.useMemo(() => {\n if (text.trim().length === 0) return maxFontSize;\n try {\n // Deterministic given loaded fonts (the render env loads fonts before drawing,\n // same as captions). On any measurement failure, fall back to the design size\n // (old behavior) rather than crash the render.\n const { fontSize } = fitTextOnNLines({\n text,\n maxLines,\n maxBoxWidth: maxWidth,\n fontFamily,\n fontWeight,\n letterSpacing,\n textTransform,\n maxFontSize,\n validateFontIsLoaded: false,\n });\n return fontSize;\n } catch {\n return maxFontSize;\n }\n }, [text, maxLines, maxWidth, fontFamily, fontWeight, letterSpacing, textTransform, maxFontSize]);\n\n const { fontSize } = resolveFitFontSize({\n singleLineFitFontSize: fitted,\n minFontSize: floor,\n maxFontSize,\n });\n\n return (\n <div\n style={{\n fontSize,\n fontFamily,\n fontWeight,\n letterSpacing,\n textTransform,\n maxWidth,\n // Clamp to maxLines with an ellipsis for the extreme case (text still too long\n // at the floor). For maxLines===1 this also keeps it single-line.\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: maxLines,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n wordBreak: 'break-word',\n ...style,\n }}\n >\n {text}\n </div>\n );\n};\n"],"mappings":";AAaA,OAAO,WAAW;AAClB,SAAS,uBAA2C;AA8GhD;AAzFG,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACF,GAAsC;AACpC,QAAM,SAAS,KAAK,IAAI,aAAa,qBAAqB;AAC1D,MAAI,UAAU,YAAa,QAAO,EAAE,UAAU,QAAQ,UAAU,MAAM;AACtE,SAAO,EAAE,UAAU,aAAa,UAAU,KAAK;AACjD;AAgCO,IAAM,UAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,QAAQ,YAAY,IAAI,SAAS;AACvC,QAAM,QAAQ,eAAe,KAAK,MAAM,cAAc,IAAI;AAM1D,QAAM,SAAS,MAAM,QAAQ,MAAM;AACjC,QAAI,KAAK,KAAK,EAAE,WAAW,EAAG,QAAO;AACrC,QAAI;AAIF,YAAM,EAAE,UAAAA,UAAS,IAAI,gBAAgB;AAAA,QACnC;AAAA,QACA;AAAA,QACA,aAAa;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,sBAAsB;AAAA,MACxB,CAAC;AACD,aAAOA;AAAA,IACT,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF,GAAG,CAAC,MAAM,UAAU,UAAU,YAAY,YAAY,eAAe,eAAe,WAAW,CAAC;AAEhG,QAAM,EAAE,SAAS,IAAI,mBAAmB;AAAA,IACtC,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb;AAAA,EACF,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA,QAGA,SAAS;AAAA,QACT,iBAAiB;AAAA,QACjB,iBAAiB;AAAA,QACjB,UAAU;AAAA,QACV,cAAc;AAAA,QACd,WAAW;AAAA,QACX,GAAG;AAAA,MACL;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;","names":["fontSize"]}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveTypeface
|
|
3
|
-
} from "./chunk-3IQUH6KK.js";
|
|
4
|
-
import {
|
|
5
|
-
resolveContrast
|
|
6
|
-
} from "./chunk-7RRPFPQK.js";
|
|
7
|
-
import {
|
|
8
|
-
fadeProgress,
|
|
9
|
-
resolveEasing,
|
|
10
|
-
staggerUp,
|
|
11
|
-
wordPop
|
|
12
|
-
} from "./chunk-G2B3G4HK.js";
|
|
13
|
-
import {
|
|
14
|
-
resolveFitFontSize
|
|
15
|
-
} from "./chunk-ROV2ODWC.js";
|
|
16
|
-
|
|
17
|
-
// src/hero-text/config.ts
|
|
18
|
-
import { z } from "zod";
|
|
19
|
-
|
|
20
|
-
// src/hero-text/HeroText.tsx
|
|
21
|
-
import { useCurrentFrame, useVideoConfig } from "remotion";
|
|
22
|
-
import { fitTextOnNLines } from "@remotion/layout-utils";
|
|
23
|
-
import { jsx } from "react/jsx-runtime";
|
|
24
|
-
var REVEAL_WINDOW_MS = 240;
|
|
25
|
-
function HeroText({
|
|
26
|
-
text,
|
|
27
|
-
fontSizePct,
|
|
28
|
-
revealAtMs,
|
|
29
|
-
durationMs,
|
|
30
|
-
easing,
|
|
31
|
-
entrance,
|
|
32
|
-
textColor,
|
|
33
|
-
fontFamily,
|
|
34
|
-
fontWeight
|
|
35
|
-
}) {
|
|
36
|
-
const frame = useCurrentFrame();
|
|
37
|
-
const { fps, height, width } = useVideoConfig();
|
|
38
|
-
const designFontSize = Math.round(height * (fontSizePct ?? 14) / 100);
|
|
39
|
-
const resolvedFontFamily = fontFamily ?? resolveTypeface("display");
|
|
40
|
-
const resolvedFontWeight = fontWeight ?? 800;
|
|
41
|
-
const HERO_MAX_WIDTH = 1700;
|
|
42
|
-
const maxBoxWidth = Math.min(width, HERO_MAX_WIDTH);
|
|
43
|
-
let singleLineFit = designFontSize;
|
|
44
|
-
if (text.trim().length > 0) {
|
|
45
|
-
try {
|
|
46
|
-
const { fontSize: fit } = fitTextOnNLines({
|
|
47
|
-
text,
|
|
48
|
-
maxLines: 2,
|
|
49
|
-
maxBoxWidth,
|
|
50
|
-
fontFamily: resolvedFontFamily,
|
|
51
|
-
fontWeight: resolvedFontWeight,
|
|
52
|
-
letterSpacing: "-0.02em",
|
|
53
|
-
maxFontSize: designFontSize,
|
|
54
|
-
validateFontIsLoaded: false
|
|
55
|
-
});
|
|
56
|
-
singleLineFit = fit;
|
|
57
|
-
} catch {
|
|
58
|
-
singleLineFit = designFontSize;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
const { fontSize } = resolveFitFontSize({
|
|
62
|
-
singleLineFitFontSize: singleLineFit,
|
|
63
|
-
minFontSize: Math.round(designFontSize * 0.55),
|
|
64
|
-
maxFontSize: designFontSize
|
|
65
|
-
});
|
|
66
|
-
const tMs = frame / fps * 1e3;
|
|
67
|
-
const hasReveal = revealAtMs != null && revealAtMs.length > 0;
|
|
68
|
-
const words = text.split(/\s+/).filter(Boolean);
|
|
69
|
-
const mode = entrance ?? "fade";
|
|
70
|
-
const ease = resolveEasing(easing);
|
|
71
|
-
const windowMs = durationMs ?? REVEAL_WINDOW_MS;
|
|
72
|
-
const windowFrames = Math.max(1, Math.round(windowMs / 1e3 * fps));
|
|
73
|
-
const entranceOf = (i) => {
|
|
74
|
-
if (!hasReveal || mode === "none") return { opacity: 1, ty: 0, scale: 1 };
|
|
75
|
-
const startFrame = Math.round((revealAtMs[i] ?? 0) / 1e3 * fps);
|
|
76
|
-
if (mode === "word-pop") {
|
|
77
|
-
const { opacity, scale } = wordPop(frame, fps, startFrame, windowFrames, 0.92);
|
|
78
|
-
return { opacity, ty: 0, scale };
|
|
79
|
-
}
|
|
80
|
-
if (mode === "stagger-up") {
|
|
81
|
-
const local = frame - startFrame;
|
|
82
|
-
const { opacity, y } = staggerUp(local, 0, 0, windowFrames, fontSize * 0.25);
|
|
83
|
-
return { opacity: ease(opacity), ty: y, scale: 1 };
|
|
84
|
-
}
|
|
85
|
-
const k = ease(fadeProgress(tMs, revealAtMs[i] ?? 0, windowMs));
|
|
86
|
-
return { opacity: k, ty: (1 - k) * fontSize * 0.25, scale: 1 };
|
|
87
|
-
};
|
|
88
|
-
return /* @__PURE__ */ jsx(
|
|
89
|
-
"div",
|
|
90
|
-
{
|
|
91
|
-
style: {
|
|
92
|
-
display: "flex",
|
|
93
|
-
flexWrap: "wrap",
|
|
94
|
-
justifyContent: "center",
|
|
95
|
-
gap: "0.28em",
|
|
96
|
-
fontSize,
|
|
97
|
-
fontWeight: fontWeight ?? 800,
|
|
98
|
-
letterSpacing: "-0.02em",
|
|
99
|
-
// behind-subject host: a real off-white color, NO contrast shadow — the
|
|
100
|
-
// subject silhouette biting the letters supplies the depth.
|
|
101
|
-
color: textColor ?? resolveContrast({ behindSubject: true }).textColor,
|
|
102
|
-
fontFamily: fontFamily ?? resolveTypeface("display")
|
|
103
|
-
},
|
|
104
|
-
children: words.map((word, i) => {
|
|
105
|
-
const { opacity, ty, scale } = entranceOf(i);
|
|
106
|
-
const animating = opacity < 1 || ty !== 0 || scale !== 1;
|
|
107
|
-
return /* @__PURE__ */ jsx(
|
|
108
|
-
"span",
|
|
109
|
-
{
|
|
110
|
-
style: {
|
|
111
|
-
display: "inline-block",
|
|
112
|
-
...animating ? { opacity, transform: `translateY(${ty}px) scale(${scale})` } : {}
|
|
113
|
-
},
|
|
114
|
-
children: word
|
|
115
|
-
},
|
|
116
|
-
i
|
|
117
|
-
);
|
|
118
|
-
})
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// src/hero-text/config.ts
|
|
124
|
-
var paramsSchema = z.object({
|
|
125
|
-
text: z.string().min(1).max(220).describe("Short bold phrase \u2014 product name, value prop, or the number that lands. 2\u20135 words. Auto-fits (shrinks + wraps to 2 lines)."),
|
|
126
|
-
fontSizePct: z.number().positive().optional().describe("Font size as % of composition height. Default 14 (display scale)."),
|
|
127
|
-
revealAtMs: z.array(z.number()).optional().describe("Per-word reveal offsets in ms relative to overlay start (authored from word timings/beats). Absent \u2192 static."),
|
|
128
|
-
durationMs: z.coerce.number().positive().optional().describe("Per-word reveal window in ms. Bind to $brand:motion.duration."),
|
|
129
|
-
easing: z.string().optional().describe("Easing keyword for the per-word reveal (linear/ease/ease-in/ease-out/ease-in-out). Bind to $brand:motion.easing."),
|
|
130
|
-
entrance: z.enum(["none", "fade", "word-pop", "stagger-up"]).optional().describe("Per-word entrance treatment. Default fade (the hero reveal). Bind to $brand:motion.entrance so the brand drives the motion identity."),
|
|
131
|
-
fontWeight: z.number().optional().describe("Default 800 (display weight)."),
|
|
132
|
-
textColor: z.string().default(resolveContrast({ behindSubject: true }).textColor).describe("Text color; defaults to a video-safe off-white. Bind to $brand:colors.textOnMedia."),
|
|
133
|
-
fontFamily: z.string().default(resolveTypeface("display")).describe("Display family; defaults to the brand display face (Bricolage Grotesque floor). Bind to $brand:fonts.heading.family.")
|
|
134
|
-
}).passthrough();
|
|
135
|
-
var config = {
|
|
136
|
-
id: "heroText",
|
|
137
|
-
component: HeroText,
|
|
138
|
-
name: "Hero Text",
|
|
139
|
-
category: "text",
|
|
140
|
-
kind: "component",
|
|
141
|
-
version: "0.1.1",
|
|
142
|
-
intent: "reveal-text",
|
|
143
|
-
description: "Launch-grade display text for the text-behind-subject depth grammar: display weight, negative tracking at display sizes, per-word staggered entrance from beat timings. The subject silhouette bites the letters.",
|
|
144
|
-
useWhen: 'Behind-subject hero moments \u2014 the product name, value prop, or a number that lands ("498 REJECTIONS", "WE SHIP DAILY"). Authored as a behind-subject overlay; the system world-locks + places it on the silhouette. 2\u20135 words.',
|
|
145
|
-
pairsWith: ["subject-foreground"],
|
|
146
|
-
avoidWith: ["karaoke", "kinetic-type"],
|
|
147
|
-
tier: "standard",
|
|
148
|
-
useCase: ["full-scene", "title-over-footage"],
|
|
149
|
-
tags: ["text", "hero", "display", "behind-subject", "launch"],
|
|
150
|
-
mood: ["editorial", "cinematic", "aggressive"],
|
|
151
|
-
paramsSchema,
|
|
152
|
-
propDefaults: {},
|
|
153
|
-
examples: [
|
|
154
|
-
{
|
|
155
|
-
name: "rejections-stat",
|
|
156
|
-
mood: ["editorial", "aggressive"],
|
|
157
|
-
params: { text: "498 REJECTIONS", fontSizePct: 8 }
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
textParam: "text",
|
|
161
|
-
subtextParam: null,
|
|
162
|
-
tokens: [
|
|
163
|
-
{ propPath: "textColor", cssVar: "--cf-text-onmedia", fallback: resolveContrast({ behindSubject: true }).textColor, brandKitPath: "colors.textOnMedia" },
|
|
164
|
-
{ propPath: "fontFamily", cssVar: "--cf-font-display", fallback: resolveTypeface("display"), brandKitPath: "fonts.heading" },
|
|
165
|
-
{ propPath: "durationMs", cssVar: "--cf-motion-dur", fallback: "240", brandKitPath: "motion.duration" },
|
|
166
|
-
{ propPath: "easing", cssVar: "--cf-motion-ease", fallback: "ease-out", brandKitPath: "motion.easing" },
|
|
167
|
-
{ propPath: "entrance", cssVar: "--cf-motion-entrance", fallback: "fade", brandKitPath: "motion.entrance" }
|
|
168
|
-
],
|
|
169
|
-
durationInFrames: 90,
|
|
170
|
-
fps: 30,
|
|
171
|
-
width: 1080,
|
|
172
|
-
height: 1920,
|
|
173
|
-
preview: { thumbnailFrame: 60, mode: "oneshot", defaultExample: "rejections-stat" }
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
// src/hero-text/index.ts
|
|
177
|
-
var catalog = [config];
|
|
178
|
-
|
|
179
|
-
export {
|
|
180
|
-
HeroText,
|
|
181
|
-
catalog
|
|
182
|
-
};
|
|
183
|
-
//# sourceMappingURL=chunk-TCRC2FH3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hero-text/config.ts","../src/hero-text/HeroText.tsx","../src/hero-text/index.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { PrimitiveMeta } from '../lib/types';\nimport { resolveTypeface } from '../lib/text/typeface';\nimport { resolveContrast } from '../lib/text/contrast';\nimport { HeroText } from './HeroText';\n\nconst paramsSchema = z.object({\n text: z.string().min(1).max(220).describe('Short bold phrase — product name, value prop, or the number that lands. 2–5 words. Auto-fits (shrinks + wraps to 2 lines).'),\n fontSizePct: z.number().positive().optional().describe('Font size as % of composition height. Default 14 (display scale).'),\n revealAtMs: z.array(z.number()).optional().describe('Per-word reveal offsets in ms relative to overlay start (authored from word timings/beats). Absent → static.'),\n durationMs: z.coerce.number().positive().optional().describe('Per-word reveal window in ms. Bind to $brand:motion.duration.'),\n easing: z.string().optional().describe('Easing keyword for the per-word reveal (linear/ease/ease-in/ease-out/ease-in-out). Bind to $brand:motion.easing.'),\n entrance: z.enum(['none', 'fade', 'word-pop', 'stagger-up']).optional().describe('Per-word entrance treatment. Default fade (the hero reveal). Bind to $brand:motion.entrance so the brand drives the motion identity.'),\n fontWeight: z.number().optional().describe('Default 800 (display weight).'),\n textColor: z.string().default(resolveContrast({ behindSubject: true }).textColor).describe('Text color; defaults to a video-safe off-white. Bind to $brand:colors.textOnMedia.'),\n fontFamily: z.string().default(resolveTypeface('display')).describe('Display family; defaults to the brand display face (Bricolage Grotesque floor). Bind to $brand:fonts.heading.family.'),\n}).passthrough();\n\ntype Params = z.infer<typeof paramsSchema>;\n\n/**\n * Launch-grade hero text — the text-behind-subject depth grammar's display phrase.\n *\n * Registered under the camelCase id `heroText` (NOT kebab) ON PURPOSE: the wire id\n * is referenced by the behind-placement text-bearing gate\n * (resolve-behind-placement.ts) and the agent prompts. Folding it into the registry\n * (this config) lets it dispatch through `resolvePrimitive` + `inflatePrimitiveProps`\n * like every other primitive — deleting the explicit `OverlayContent` case + its\n * second brand resolver — while keeping that id stable.\n */\nexport const config: PrimitiveMeta<Params> = {\n id: 'heroText',\n component: HeroText,\n name: 'Hero Text',\n category: 'text',\n kind: 'component',\n version: '0.1.1',\n\n intent: 'reveal-text',\n description:\n 'Launch-grade display text for the text-behind-subject depth grammar: display weight, negative tracking at display sizes, per-word staggered entrance from beat timings. The subject silhouette bites the letters.',\n useWhen:\n 'Behind-subject hero moments — the product name, value prop, or a number that lands (\"498 REJECTIONS\", \"WE SHIP DAILY\"). Authored as a behind-subject overlay; the system world-locks + places it on the silhouette. 2–5 words.',\n pairsWith: ['subject-foreground'],\n avoidWith: ['karaoke', 'kinetic-type'],\n tier: 'standard',\n useCase: ['full-scene', 'title-over-footage'],\n tags: ['text', 'hero', 'display', 'behind-subject', 'launch'],\n mood: ['editorial', 'cinematic', 'aggressive'],\n\n paramsSchema,\n propDefaults: {},\n\n examples: [\n {\n name: 'rejections-stat',\n mood: ['editorial', 'aggressive'],\n params: { text: '498 REJECTIONS', fontSizePct: 8 },\n },\n ],\n\n textParam: 'text',\n subtextParam: null,\n\n tokens: [\n { propPath: 'textColor', cssVar: '--cf-text-onmedia', fallback: resolveContrast({ behindSubject: true }).textColor, brandKitPath: 'colors.textOnMedia' },\n { propPath: 'fontFamily', cssVar: '--cf-font-display', fallback: resolveTypeface('display'), brandKitPath: 'fonts.heading' },\n { propPath: 'durationMs', cssVar: '--cf-motion-dur', fallback: '240', brandKitPath: 'motion.duration' },\n { propPath: 'easing', cssVar: '--cf-motion-ease', fallback: 'ease-out', brandKitPath: 'motion.easing' },\n { propPath: 'entrance', cssVar: '--cf-motion-entrance', fallback: 'fade', brandKitPath: 'motion.entrance' },\n ],\n\n durationInFrames: 90,\n fps: 30,\n width: 1080,\n height: 1920,\n\n preview: { thumbnailFrame: 60, mode: 'oneshot', defaultExample: 'rejections-stat' },\n};\n","import { useCurrentFrame, useVideoConfig } from 'remotion';\nimport { fitTextOnNLines } from '@remotion/layout-utils';\nimport { fadeProgress, wordPop, staggerUp, resolveEasing } from '../lib/text/motion';\nimport { resolveTypeface } from '../lib/text/typeface';\nimport { resolveContrast } from '../lib/text/contrast';\nimport { resolveFitFontSize } from '../lib/text/fitText';\n\n/** Launch-grade hero text (spec §5): display weight, negative tracking at display\n * sizes, per-word staggered entrance from params.revealAtMs (ms, authored upstream\n * from word timings / beats). Renders inside the behind host's anchored wrapper —\n * no positioning of its own. Fonts: caller-loaded (caption convention). */\nexport interface HeroTextProps {\n text: string;\n /** Font size as % of composition height. Default 14 (display scale). */\n fontSizePct?: number;\n /** Per-word reveal offsets in ms, relative to THIS overlay's start (the\n * component is mounted inside a Sequence at the overlay's startFrame, so\n * frame 0 here = overlay start). Missing entries default to 0. Absent /\n * empty → fully visible (static). */\n revealAtMs?: number[];\n /** Per-word reveal window in ms (0→1 fade). Default 240. Brand-bindable via\n * `$brand:motion.duration` so a brand drives the entrance speed. */\n durationMs?: number;\n /** Easing keyword applied to the per-word reveal. Brand-bindable via\n * `$brand:motion.easing`. Absent → linear (the original reveal). */\n easing?: string;\n /** Per-word entrance treatment. Brand-bindable via `$brand:motion.entrance`.\n * Absent → 'fade' (the original hero reveal). 'none' = static. */\n entrance?: 'none' | 'fade' | 'word-pop' | 'stagger-up';\n /** Brand-bindable via `$brand:colors.*`. Param name `textColor` matches the\n * registry token binding (was `color` when heroText was an explicit dispatch case). */\n textColor?: string;\n fontFamily?: string;\n fontWeight?: number;\n}\n\n/** Per-word entrance window: 0 → 1 over this many ms. */\nconst REVEAL_WINDOW_MS = 240;\n\nexport function HeroText({\n text,\n fontSizePct,\n revealAtMs,\n durationMs,\n easing,\n entrance,\n textColor,\n fontFamily,\n fontWeight,\n}: HeroTextProps) {\n const frame = useCurrentFrame();\n const { fps, height, width } = useVideoConfig();\n\n const designFontSize = Math.round((height * (fontSizePct ?? 14)) / 100);\n const resolvedFontFamily = fontFamily ?? resolveTypeface('display');\n const resolvedFontWeight = fontWeight ?? 800;\n // Auto-fit: shrink the display size so a long phrase wraps to ≤2 lines and never\n // overflows the frame — which is what lets the `text` cap be raised. The per-word\n // span structure + staggered entrance is preserved; only the font size adapts. On\n // any measurement failure, fall back to the design size (old fixed-size behavior).\n const HERO_MAX_WIDTH = 1700;\n // The text block is a full-width, centered flex-wrap host with no horizontal\n // padding of its own, so its available box IS the composition width. Fit against\n // the real frame width (clamped to the display ceiling) so long copy wraps instead\n // of overflowing narrow 9:16 (1080px) frames — the old hardcoded 1700 assumed a\n // 16:9 frame and blew past the edges when width < 1700.\n const maxBoxWidth = Math.min(width, HERO_MAX_WIDTH);\n let singleLineFit = designFontSize;\n if (text.trim().length > 0) {\n try {\n const { fontSize: fit } = fitTextOnNLines({\n text,\n maxLines: 2,\n maxBoxWidth,\n fontFamily: resolvedFontFamily,\n fontWeight: resolvedFontWeight,\n letterSpacing: '-0.02em',\n maxFontSize: designFontSize,\n validateFontIsLoaded: false,\n });\n singleLineFit = fit;\n } catch {\n singleLineFit = designFontSize;\n }\n }\n const { fontSize } = resolveFitFontSize({\n singleLineFitFontSize: singleLineFit,\n minFontSize: Math.round(designFontSize * 0.55),\n maxFontSize: designFontSize,\n });\n const tMs = (frame / fps) * 1000;\n const hasReveal = revealAtMs != null && revealAtMs.length > 0;\n const words = text.split(/\\s+/).filter(Boolean);\n // The brand's motion identity selects the per-word entrance treatment; the\n // resolved easing keyword shapes the fade curve. All four share the shared\n // motion vocabulary (lib/text/motion). SOFT: an absent entrance is 'fade' (the\n // original reveal), an absent/unknown easing is linear (a no-op curve).\n const mode = entrance ?? 'fade';\n const ease = resolveEasing(easing);\n const windowMs = durationMs ?? REVEAL_WINDOW_MS;\n const windowFrames = Math.max(1, Math.round((windowMs / 1000) * fps));\n // Per-word entrance → { opacity, translateY (px), scale }. Static when there\n // are no reveal timings, or for 'none'.\n const entranceOf = (i: number): { opacity: number; ty: number; scale: number } => {\n if (!hasReveal || mode === 'none') return { opacity: 1, ty: 0, scale: 1 };\n const startFrame = Math.round(((revealAtMs![i] ?? 0) / 1000) * fps);\n if (mode === 'word-pop') {\n const { opacity, scale } = wordPop(frame, fps, startFrame, windowFrames, 0.92);\n return { opacity, ty: 0, scale };\n }\n if (mode === 'stagger-up') {\n const local = frame - startFrame;\n const { opacity, y } = staggerUp(local, 0, 0, windowFrames, fontSize * 0.25);\n return { opacity: ease(opacity), ty: y, scale: 1 };\n }\n // 'fade' (default): per-word opacity reveal + a small upward settle, eased.\n const k = ease(fadeProgress(tMs, revealAtMs![i] ?? 0, windowMs));\n return { opacity: k, ty: (1 - k) * fontSize * 0.25, scale: 1 };\n };\n\n return (\n <div\n style={{\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'center',\n gap: '0.28em',\n fontSize,\n fontWeight: fontWeight ?? 800,\n letterSpacing: '-0.02em',\n // behind-subject host: a real off-white color, NO contrast shadow — the\n // subject silhouette biting the letters supplies the depth.\n color: textColor ?? resolveContrast({ behindSubject: true }).textColor,\n fontFamily: fontFamily ?? resolveTypeface('display'),\n }}\n >\n {words.map((word, i) => {\n const { opacity, ty, scale } = entranceOf(i);\n const animating = opacity < 1 || ty !== 0 || scale !== 1;\n return (\n <span\n key={i}\n style={{\n display: 'inline-block',\n ...(animating\n ? { opacity, transform: `translateY(${ty}px) scale(${scale})` }\n : {}),\n }}\n >\n {word}\n </span>\n );\n })}\n </div>\n );\n}\n","/**\n * @cueframe/primitives/hero-text — launch-grade hero text for the\n * text-behind-subject depth grammar (Phase 3 §3.4).\n *\n * Registered in the master catalog under id `heroText` (camelCase wire id —\n * referenced by the behind-placement text-bearing gate in\n * resolve-behind-placement.ts and by the agent prompts, so it stays stable).\n * It dispatches through `resolvePrimitive` + `inflatePrimitiveProps` like any\n * other primitive (no explicit `OverlayContent` case).\n *\n * Consumed by the cueframe renderer's shared overlay dispatch (`OverlayContent`\n * default branch), for both the behind host (world-locked, atmosphere-treated)\n * and the degraded front path.\n */\n\nimport type { Catalog } from '../lib/types';\nimport { config as heroText } from './config';\n\nexport { HeroText } from './HeroText';\nexport type { HeroTextProps } from './HeroText';\n\nexport const catalog: Catalog = [heroText];\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;;;ACAlB,SAAS,iBAAiB,sBAAsB;AAChD,SAAS,uBAAuB;AA2ItB;AAvGV,IAAM,mBAAmB;AAElB,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAkB;AAChB,QAAM,QAAQ,gBAAgB;AAC9B,QAAM,EAAE,KAAK,QAAQ,MAAM,IAAI,eAAe;AAE9C,QAAM,iBAAiB,KAAK,MAAO,UAAU,eAAe,MAAO,GAAG;AACtE,QAAM,qBAAqB,cAAc,gBAAgB,SAAS;AAClE,QAAM,q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,UAAU,aAAa,QAAQ,qBAAqB,UAAU,gBAAgB,EAAE,eAAe,KAAK,CAAC,EAAE,WAAW,cAAc,qBAAqB;AAAA,IACvJ,EAAE,UAAU,cAAc,QAAQ,qBAAqB,UAAU,gBAAgB,SAAS,GAAG,cAAc,gBAAgB;AAAA,IAC3H,EAAE,UAAU,cAAc,QAAQ,mBAAmB,UAAU,OAAO,cAAc,kBAAkB;AAAA,IACtG,EAAE,UAAU,UAAU,QAAQ,oBAAoB,UAAU,YAAY,cAAc,gBAAgB;AAAA,IACtG,EAAE,UAAU,YAAY,QAAQ,wBAAwB,UAAU,QAAQ,cAAc,kBAAkB;AAAA,EAC5G;AAAA,EAEA,kBAAkB;AAAA,EAClB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EAER,SAAS,EAAE,gBAAgB,IAAI,MAAM,WAAW,gBAAgB,kBAAkB;AACpF;;;AEzDO,IAAM,UAAmB,CAAC,MAAQ;","names":[]}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
// src/transitions/frosted-glass-wipe/index.tsx
|
|
2
|
-
import { Easing, interpolate } from "remotion";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
var FrostedGlassWipePresentation = ({ children, presentationDirection, presentationProgress, passedProps }) => {
|
|
5
|
-
const { glassBlur = 24 } = passedProps;
|
|
6
|
-
const isEntering = presentationDirection === "entering";
|
|
7
|
-
const p = interpolate(presentationProgress, [0, 1], [0, 1], {
|
|
8
|
-
easing: Easing.bezier(0.6, 0, 0.2, 1)
|
|
9
|
-
});
|
|
10
|
-
const visible = isEntering ? p >= 0.5 : p < 0.5;
|
|
11
|
-
const glassX = interpolate(p, [0, 1], [-110, 110]);
|
|
12
|
-
return /* @__PURE__ */ jsxs("div", { style: { position: "absolute", inset: 0, overflow: "hidden" }, children: [
|
|
13
|
-
/* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, opacity: visible ? 1 : 0 }, children }),
|
|
14
|
-
isEntering && /* @__PURE__ */ jsx(
|
|
15
|
-
"div",
|
|
16
|
-
{
|
|
17
|
-
style: {
|
|
18
|
-
position: "absolute",
|
|
19
|
-
top: 0,
|
|
20
|
-
bottom: 0,
|
|
21
|
-
left: 0,
|
|
22
|
-
width: "100%",
|
|
23
|
-
transform: `translateX(${glassX}%)`,
|
|
24
|
-
backdropFilter: `blur(${glassBlur}px)`,
|
|
25
|
-
WebkitBackdropFilter: `blur(${glassBlur}px)`,
|
|
26
|
-
background: "rgba(255,255,255,0.05)",
|
|
27
|
-
borderLeft: "1px solid rgba(255,255,255,0.2)",
|
|
28
|
-
borderRight: "1px solid rgba(255,255,255,0.2)",
|
|
29
|
-
willChange: "transform"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
] });
|
|
34
|
-
};
|
|
35
|
-
var frostedGlassWipe = (props) => ({
|
|
36
|
-
component: FrostedGlassWipePresentation,
|
|
37
|
-
props: props ?? {}
|
|
38
|
-
});
|
|
39
|
-
var FrostedGlassWipe = FrostedGlassWipePresentation;
|
|
40
|
-
|
|
41
|
-
// src/transitions/spatial-push/index.tsx
|
|
42
|
-
import { interpolate as interpolate2 } from "remotion";
|
|
43
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
44
|
-
var SpatialPushPresentation = ({ children, presentationDirection, presentationProgress, passedProps }) => {
|
|
45
|
-
const { direction = "up" } = passedProps;
|
|
46
|
-
const p = presentationProgress;
|
|
47
|
-
if (presentationDirection === "exiting") {
|
|
48
|
-
const scale = interpolate2(p, [0, 1], [1, 0.92]);
|
|
49
|
-
const brightness = interpolate2(p, [0, 1], [1, 0.5]);
|
|
50
|
-
const radius = interpolate2(p, [0, 1], [0, 16]);
|
|
51
|
-
return /* @__PURE__ */ jsx2(
|
|
52
|
-
"div",
|
|
53
|
-
{
|
|
54
|
-
style: {
|
|
55
|
-
position: "absolute",
|
|
56
|
-
inset: 0,
|
|
57
|
-
transform: `scale(${scale})`,
|
|
58
|
-
filter: `brightness(${brightness})`,
|
|
59
|
-
borderRadius: `${radius}px`,
|
|
60
|
-
overflow: "hidden",
|
|
61
|
-
willChange: "transform"
|
|
62
|
-
},
|
|
63
|
-
children
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
const t = (1 - p) * 100;
|
|
68
|
-
const transform = direction === "up" ? `translateY(${t}%)` : direction === "down" ? `translateY(${-t}%)` : direction === "left" ? `translateX(${t}%)` : `translateX(${-t}%)`;
|
|
69
|
-
const shadow = direction === "up" ? "0 -40px 100px rgba(0,0,0,0.8)" : direction === "down" ? "0 40px 100px rgba(0,0,0,0.8)" : direction === "left" ? "-40px 0 100px rgba(0,0,0,0.8)" : "40px 0 100px rgba(0,0,0,0.8)";
|
|
70
|
-
return /* @__PURE__ */ jsx2(
|
|
71
|
-
"div",
|
|
72
|
-
{
|
|
73
|
-
style: {
|
|
74
|
-
position: "absolute",
|
|
75
|
-
inset: 0,
|
|
76
|
-
transform,
|
|
77
|
-
boxShadow: shadow,
|
|
78
|
-
willChange: "transform"
|
|
79
|
-
},
|
|
80
|
-
children
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
var spatialPush = (props) => ({
|
|
85
|
-
component: SpatialPushPresentation,
|
|
86
|
-
props: props ?? {}
|
|
87
|
-
});
|
|
88
|
-
var SpatialPush = SpatialPushPresentation;
|
|
89
|
-
|
|
90
|
-
export {
|
|
91
|
-
frostedGlassWipe,
|
|
92
|
-
FrostedGlassWipe,
|
|
93
|
-
spatialPush,
|
|
94
|
-
SpatialPush
|
|
95
|
-
};
|
|
96
|
-
//# sourceMappingURL=chunk-US4YEDAA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/transitions/frosted-glass-wipe/index.tsx","../src/transitions/spatial-push/index.tsx"],"sourcesContent":["/**\n * Adapted from remocn (https://github.com/kapishdima/remocn) — MIT\n * Copyright (c) 2026 KapishDima\n *\n * Modifications:\n * - converted from a standalone from/to component (baked demo scenes) to a\n * cueframe TransitionPresentation. Visual identity kept: a full-height\n * frosted glass band sweeps across; the scene swaps behind it at midpoint.\n */\n\nimport React from 'react';\nimport { Easing, interpolate } from 'remotion';\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from '@remotion/transitions';\n\nexport type FrostedGlassWipeProps = {\n /** Backdrop blur of the sweeping band in px (default 24) */\n glassBlur?: number;\n};\n\nconst FrostedGlassWipePresentation: React.FC<\n TransitionPresentationComponentProps<FrostedGlassWipeProps>\n> = ({ children, presentationDirection, presentationProgress, passedProps }) => {\n const { glassBlur = 24 } = passedProps;\n const isEntering = presentationDirection === 'entering';\n\n const p = interpolate(presentationProgress, [0, 1], [0, 1], {\n easing: Easing.bezier(0.6, 0, 0.2, 1),\n });\n\n // Hard swap behind the band at midpoint.\n const visible = isEntering ? p >= 0.5 : p < 0.5;\n const glassX = interpolate(p, [0, 1], [-110, 110]);\n\n return (\n <div style={{ position: 'absolute', inset: 0, overflow: 'hidden' }}>\n <div style={{ position: 'absolute', inset: 0, opacity: visible ? 1 : 0 }}>\n {children}\n </div>\n {isEntering && (\n <div\n style={{\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n width: '100%',\n transform: `translateX(${glassX}%)`,\n backdropFilter: `blur(${glassBlur}px)`,\n WebkitBackdropFilter: `blur(${glassBlur}px)`,\n background: 'rgba(255,255,255,0.05)',\n borderLeft: '1px solid rgba(255,255,255,0.2)',\n borderRight: '1px solid rgba(255,255,255,0.2)',\n willChange: 'transform',\n }}\n />\n )}\n </div>\n );\n};\n\nexport const frostedGlassWipe = (\n props?: FrostedGlassWipeProps,\n): TransitionPresentation<FrostedGlassWipeProps> => ({\n component: FrostedGlassWipePresentation,\n props: props ?? {},\n});\n\nexport const FrostedGlassWipe = FrostedGlassWipePresentation;\n","/**\n * Adapted from remocn (https://github.com/kapishdima/remocn) — MIT\n * Copyright (c) 2026 KapishDima\n *\n * Modifications:\n * - converted from a standalone from/to component (baked demo scenes) to a\n * cueframe TransitionPresentation. Visual identity kept: the old scene\n * recedes (scale/dim/round) while the new one pushes in with an edge shadow.\n */\n\nimport React from 'react';\nimport { interpolate } from 'remotion';\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from '@remotion/transitions';\n\nexport type SpatialPushProps = {\n /** Edge the NEW scene pushes in from (default 'up' = enters from bottom) */\n direction?: 'up' | 'down' | 'left' | 'right';\n};\n\nconst SpatialPushPresentation: React.FC<\n TransitionPresentationComponentProps<SpatialPushProps>\n> = ({ children, presentationDirection, presentationProgress, passedProps }) => {\n const { direction = 'up' } = passedProps;\n const p = presentationProgress;\n\n if (presentationDirection === 'exiting') {\n const scale = interpolate(p, [0, 1], [1, 0.92]);\n const brightness = interpolate(p, [0, 1], [1, 0.5]);\n const radius = interpolate(p, [0, 1], [0, 16]);\n return (\n <div\n style={{\n position: 'absolute',\n inset: 0,\n transform: `scale(${scale})`,\n filter: `brightness(${brightness})`,\n borderRadius: `${radius}px`,\n overflow: 'hidden',\n willChange: 'transform',\n }}\n >\n {children}\n </div>\n );\n }\n\n const t = (1 - p) * 100;\n const transform =\n direction === 'up'\n ? `translateY(${t}%)`\n : direction === 'down'\n ? `translateY(${-t}%)`\n : direction === 'left'\n ? `translateX(${t}%)`\n : `translateX(${-t}%)`;\n const shadow =\n direction === 'up'\n ? '0 -40px 100px rgba(0,0,0,0.8)'\n : direction === 'down'\n ? '0 40px 100px rgba(0,0,0,0.8)'\n : direction === 'left'\n ? '-40px 0 100px rgba(0,0,0,0.8)'\n : '40px 0 100px rgba(0,0,0,0.8)';\n\n return (\n <div\n style={{\n position: 'absolute',\n inset: 0,\n transform,\n boxShadow: shadow,\n willChange: 'transform',\n }}\n >\n {children}\n </div>\n );\n};\n\nexport const spatialPush = (\n props?: SpatialPushProps,\n): TransitionPresentation<SpatialPushProps> => ({\n component: SpatialPushPresentation,\n props: props ?? {},\n});\n\nexport const SpatialPush = SpatialPushPresent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AM,EAAE,YAAY,KAAK,IAAI;AAC7B,QAAM,IAAI;AAEV,MAAI,0BAA0B,WAAW;AACvC,UAAM,QAAQD,aAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAC9C,UAAM,aAAaA,aAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAClD,UAAM,SAASA,aAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAC7C,WACE,gBAAAC;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,UACL,UAAU;AAAA,UACV,OAAO;AAAA,UACP,WAAW,SAAS,KAAK;AAAA,UACzB,QAAQ,cAAc,UAAU;AAAA,UAChC,cAAc,GAAG,MAAM;AAAA,UACvB,UAAU;AAAA,UACV,YAAY;AAAA,QACd;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ;AAEA,QAAM,KAAK,IAAI,KAAK;AACpB,QAAM,YACJ,cAAc,OACV,cAAc,CAAC,OACf,cAAc,SACZ,cAAc,CAAC,CAAC,OAChB,cAAc,SACZ,cAAc,CAAC,OACf,cAAc,CAAC,CAAC;AAC1B,QAAM,SACJ,cAAc,OACV,kCACA,cAAc,SACZ,iCACA,cAAc,SACZ,kCACA;AAEV,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,UAAU;AAAA,QACV,OAAO;AAAA,QACP;AAAA,QACA,WAAW;AAAA,QACX,YAAY;AAAA,MACd;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEO,IAAM,cAAc,CACzB,WAC8C;AAAA,EAC9C,WAAW;AAAA,EACX,OAAO,SAAS,CAAC;AACnB;AAEO,IAAM,cAAc;","names":["interpolate","jsx"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __export = (target, all) => {
|
|
4
|
-
for (var name in all)
|
|
5
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
|
-
};
|
|
7
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
__export,
|
|
11
|
-
__publicField
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=chunk-UVKRO5ER.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/text/recolor.ts"],"sourcesContent":["import { interpolateColors } from 'remotion';\n\n/**\n * Recolor a token from `from` to `to` by `progress` (0..1).\n *\n * The single implementation of the per-word color swap that inline-highlight,\n * marker-highlight, and (the progress-ramped surfaces) duplicate today via\n * `interpolateColors(progress, [0, 1], [from, to])`. Pure: no `useCurrentFrame`\n * — the caller samples the frame and passes the scalar `progress` in.\n *\n * Note: Captions' emphasis recolor (Captions.tsx) is a plain CONDITIONAL color\n * assignment (no progress ramp), so it does NOT route through this function.\n */\nexport function recolor(progress: number, from: string, to: string): string {\n return interpolateColors(progress, [0, 1], [from, to]);\n}\n"],"mappings":";AAAA,SAAS,yBAAyB;AAa3B,SAAS,QAAQ,UAAkB,MAAc,IAAoB;AAC1E,SAAO,kBAAkB,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;AACvD;","names":[]}
|