@nodetool-ai/timeline 0.8.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/README.md +55 -0
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/animation/bakedAnimation.d.ts +84 -0
- package/dist/animation/bakedAnimation.d.ts.map +1 -0
- package/dist/animation/bakedAnimation.js +95 -0
- package/dist/animation/bakedAnimation.js.map +1 -0
- package/dist/animation/beat.d.ts +7 -0
- package/dist/animation/beat.d.ts.map +1 -0
- package/dist/animation/beat.js +36 -0
- package/dist/animation/beat.js.map +1 -0
- package/dist/animation/compile.d.ts +184 -0
- package/dist/animation/compile.d.ts.map +1 -0
- package/dist/animation/compile.js +312 -0
- package/dist/animation/compile.js.map +1 -0
- package/dist/animation/custom.d.ts +183 -0
- package/dist/animation/custom.d.ts.map +1 -0
- package/dist/animation/custom.js +583 -0
- package/dist/animation/custom.js.map +1 -0
- package/dist/animation/easing.d.ts +34 -0
- package/dist/animation/easing.d.ts.map +1 -0
- package/dist/animation/easing.js +332 -0
- package/dist/animation/easing.js.map +1 -0
- package/dist/animation/index.d.ts +20 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/animation/index.js +20 -0
- package/dist/animation/index.js.map +1 -0
- package/dist/animation/links.d.ts +33 -0
- package/dist/animation/links.d.ts.map +1 -0
- package/dist/animation/links.js +126 -0
- package/dist/animation/links.js.map +1 -0
- package/dist/animation/presets.d.ts +86 -0
- package/dist/animation/presets.d.ts.map +1 -0
- package/dist/animation/presets.js +642 -0
- package/dist/animation/presets.js.map +1 -0
- package/dist/animation/sample.d.ts +145 -0
- package/dist/animation/sample.d.ts.map +1 -0
- package/dist/animation/sample.js +390 -0
- package/dist/animation/sample.js.map +1 -0
- package/dist/animation/simplify.d.ts +70 -0
- package/dist/animation/simplify.d.ts.map +1 -0
- package/dist/animation/simplify.js +278 -0
- package/dist/animation/simplify.js.map +1 -0
- package/dist/animation/sourceCurves.d.ts +45 -0
- package/dist/animation/sourceCurves.d.ts.map +1 -0
- package/dist/animation/sourceCurves.js +168 -0
- package/dist/animation/sourceCurves.js.map +1 -0
- package/dist/animation/styleTracks.d.ts +23 -0
- package/dist/animation/styleTracks.d.ts.map +1 -0
- package/dist/animation/styleTracks.js +341 -0
- package/dist/animation/styleTracks.js.map +1 -0
- package/dist/animation/types.d.ts +269 -0
- package/dist/animation/types.d.ts.map +1 -0
- package/dist/animation/types.js +173 -0
- package/dist/animation/types.js.map +1 -0
- package/dist/animation/typewriter.d.ts +8 -0
- package/dist/animation/typewriter.d.ts.map +1 -0
- package/dist/animation/typewriter.js +32 -0
- package/dist/animation/typewriter.js.map +1 -0
- package/dist/audioFade.d.ts +73 -0
- package/dist/audioFade.d.ts.map +1 -0
- package/dist/audioFade.js +134 -0
- package/dist/audioFade.js.map +1 -0
- package/dist/authoredStyles.d.ts +61 -0
- package/dist/authoredStyles.d.ts.map +1 -0
- package/dist/authoredStyles.js +90 -0
- package/dist/authoredStyles.js.map +1 -0
- package/dist/authoring.d.ts +50 -0
- package/dist/authoring.d.ts.map +1 -0
- package/dist/authoring.js +207 -0
- package/dist/authoring.js.map +1 -0
- package/dist/beats.d.ts +103 -0
- package/dist/beats.d.ts.map +1 -0
- package/dist/beats.js +228 -0
- package/dist/beats.js.map +1 -0
- package/dist/clone.d.ts +32 -0
- package/dist/clone.d.ts.map +1 -0
- package/dist/clone.js +53 -0
- package/dist/clone.js.map +1 -0
- package/dist/composition.d.ts +87 -0
- package/dist/composition.d.ts.map +1 -0
- package/dist/composition.js +253 -0
- package/dist/composition.js.map +1 -0
- package/dist/crop.d.ts +48 -0
- package/dist/crop.d.ts.map +1 -0
- package/dist/crop.js +75 -0
- package/dist/crop.js.map +1 -0
- package/dist/defaults.d.ts +142 -0
- package/dist/defaults.d.ts.map +1 -0
- package/dist/defaults.js +335 -0
- package/dist/defaults.js.map +1 -0
- package/dist/dependencyHash.d.ts +14 -0
- package/dist/dependencyHash.d.ts.map +1 -0
- package/dist/dependencyHash.js +19 -0
- package/dist/dependencyHash.js.map +1 -0
- package/dist/dropResolve.d.ts +40 -0
- package/dist/dropResolve.d.ts.map +1 -0
- package/dist/dropResolve.js +137 -0
- package/dist/dropResolve.js.map +1 -0
- package/dist/examples/node.d.ts +11 -0
- package/dist/examples/node.d.ts.map +1 -0
- package/dist/examples/node.js +87 -0
- package/dist/examples/node.js.map +1 -0
- package/dist/extension.d.ts +52 -0
- package/dist/extension.d.ts.map +1 -0
- package/dist/extension.js +269 -0
- package/dist/extension.js.map +1 -0
- package/dist/extensionRequest.d.ts +40 -0
- package/dist/extensionRequest.d.ts.map +1 -0
- package/dist/extensionRequest.js +135 -0
- package/dist/extensionRequest.js.map +1 -0
- package/dist/fill-text.d.ts +30 -0
- package/dist/fill-text.d.ts.map +1 -0
- package/dist/fill-text.js +73 -0
- package/dist/fill-text.js.map +1 -0
- package/dist/fonts/catalog.d.ts +97 -0
- package/dist/fonts/catalog.d.ts.map +1 -0
- package/dist/fonts/catalog.js +276 -0
- package/dist/fonts/catalog.js.map +1 -0
- package/dist/fonts/css.d.ts +24 -0
- package/dist/fonts/css.d.ts.map +1 -0
- package/dist/fonts/css.js +50 -0
- package/dist/fonts/css.js.map +1 -0
- package/dist/fonts/index.d.ts +10 -0
- package/dist/fonts/index.d.ts.map +1 -0
- package/dist/fonts/index.js +10 -0
- package/dist/fonts/index.js.map +1 -0
- package/dist/fonts/register-node.d.ts +45 -0
- package/dist/fonts/register-node.d.ts.map +1 -0
- package/dist/fonts/register-node.js +71 -0
- package/dist/fonts/register-node.js.map +1 -0
- package/dist/generatedMatte.d.ts +86 -0
- package/dist/generatedMatte.d.ts.map +1 -0
- package/dist/generatedMatte.js +152 -0
- package/dist/generatedMatte.js.map +1 -0
- package/dist/generative.d.ts +145 -0
- package/dist/generative.d.ts.map +1 -0
- package/dist/generative.js +396 -0
- package/dist/generative.js.map +1 -0
- package/dist/group.d.ts +47 -0
- package/dist/group.d.ts.map +1 -0
- package/dist/group.js +131 -0
- package/dist/group.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/interchange.d.ts +47 -0
- package/dist/interchange.d.ts.map +1 -0
- package/dist/interchange.js +158 -0
- package/dist/interchange.js.map +1 -0
- package/dist/keyframes.d.ts +44 -0
- package/dist/keyframes.d.ts.map +1 -0
- package/dist/keyframes.js +148 -0
- package/dist/keyframes.js.map +1 -0
- package/dist/lineDelivery.d.ts +108 -0
- package/dist/lineDelivery.d.ts.map +1 -0
- package/dist/lineDelivery.js +154 -0
- package/dist/lineDelivery.js.map +1 -0
- package/dist/linked.d.ts +41 -0
- package/dist/linked.d.ts.map +1 -0
- package/dist/linked.js +166 -0
- package/dist/linked.js.map +1 -0
- package/dist/lipSyncRequest.d.ts +65 -0
- package/dist/lipSyncRequest.d.ts.map +1 -0
- package/dist/lipSyncRequest.js +73 -0
- package/dist/lipSyncRequest.js.map +1 -0
- package/dist/measureClipDurations.d.ts +7 -0
- package/dist/measureClipDurations.d.ts.map +1 -0
- package/dist/measureClipDurations.js +17 -0
- package/dist/measureClipDurations.js.map +1 -0
- package/dist/mediaTrack.d.ts +120 -0
- package/dist/mediaTrack.d.ts.map +1 -0
- package/dist/mediaTrack.js +269 -0
- package/dist/mediaTrack.js.map +1 -0
- package/dist/midi/cacheKey.d.ts +25 -0
- package/dist/midi/cacheKey.d.ts.map +1 -0
- package/dist/midi/cacheKey.js +54 -0
- package/dist/midi/cacheKey.js.map +1 -0
- package/dist/midi/edit.d.ts +48 -0
- package/dist/midi/edit.d.ts.map +1 -0
- package/dist/midi/edit.js +93 -0
- package/dist/midi/edit.js.map +1 -0
- package/dist/midi/engines/bl1.d.ts +29 -0
- package/dist/midi/engines/bl1.d.ts.map +1 -0
- package/dist/midi/engines/bl1.js +128 -0
- package/dist/midi/engines/bl1.js.map +1 -0
- package/dist/midi/engines/dr1.d.ts +28 -0
- package/dist/midi/engines/dr1.d.ts.map +1 -0
- package/dist/midi/engines/dr1.js +101 -0
- package/dist/midi/engines/dr1.js.map +1 -0
- package/dist/midi/engines/dsp.d.ts +126 -0
- package/dist/midi/engines/dsp.d.ts.map +1 -0
- package/dist/midi/engines/dsp.js +371 -0
- package/dist/midi/engines/dsp.js.map +1 -0
- package/dist/midi/engines/index.d.ts +13 -0
- package/dist/midi/engines/index.d.ts.map +1 -0
- package/dist/midi/engines/index.js +13 -0
- package/dist/midi/engines/index.js.map +1 -0
- package/dist/midi/engines/kits.d.ts +12 -0
- package/dist/midi/engines/kits.d.ts.map +1 -0
- package/dist/midi/engines/kits.js +121 -0
- package/dist/midi/engines/kits.js.map +1 -0
- package/dist/midi/engines/wavetables.d.ts +45 -0
- package/dist/midi/engines/wavetables.d.ts.map +1 -0
- package/dist/midi/engines/wavetables.js +334 -0
- package/dist/midi/engines/wavetables.js.map +1 -0
- package/dist/midi/engines/wt1.d.ts +30 -0
- package/dist/midi/engines/wt1.d.ts.map +1 -0
- package/dist/midi/engines/wt1.js +91 -0
- package/dist/midi/engines/wt1.js.map +1 -0
- package/dist/midi/grid.d.ts +51 -0
- package/dist/midi/grid.d.ts.map +1 -0
- package/dist/midi/grid.js +104 -0
- package/dist/midi/grid.js.map +1 -0
- package/dist/midi/index.d.ts +20 -0
- package/dist/midi/index.d.ts.map +1 -0
- package/dist/midi/index.js +20 -0
- package/dist/midi/index.js.map +1 -0
- package/dist/midi/instrument.d.ts +32 -0
- package/dist/midi/instrument.d.ts.map +1 -0
- package/dist/midi/instrument.js +73 -0
- package/dist/midi/instrument.js.map +1 -0
- package/dist/midi/notes.d.ts +46 -0
- package/dist/midi/notes.d.ts.map +1 -0
- package/dist/midi/notes.js +121 -0
- package/dist/midi/notes.js.map +1 -0
- package/dist/midi/notesEdit.d.ts +94 -0
- package/dist/midi/notesEdit.d.ts.map +1 -0
- package/dist/midi/notesEdit.js +159 -0
- package/dist/midi/notesEdit.js.map +1 -0
- package/dist/midi/presets.d.ts +29 -0
- package/dist/midi/presets.d.ts.map +1 -0
- package/dist/midi/presets.js +281 -0
- package/dist/midi/presets.js.map +1 -0
- package/dist/midi/tempo.d.ts +27 -0
- package/dist/midi/tempo.d.ts.map +1 -0
- package/dist/midi/tempo.js +57 -0
- package/dist/midi/tempo.js.map +1 -0
- package/dist/midi/ticks.d.ts +25 -0
- package/dist/midi/ticks.d.ts.map +1 -0
- package/dist/midi/ticks.js +35 -0
- package/dist/midi/ticks.js.map +1 -0
- package/dist/midi/voice.d.ts +148 -0
- package/dist/midi/voice.d.ts.map +1 -0
- package/dist/midi/voice.js +348 -0
- package/dist/midi/voice.js.map +1 -0
- package/dist/midi/wav.d.ts +14 -0
- package/dist/midi/wav.d.ts.map +1 -0
- package/dist/midi/wav.js +51 -0
- package/dist/midi/wav.js.map +1 -0
- package/dist/model3d.d.ts +41 -0
- package/dist/model3d.d.ts.map +1 -0
- package/dist/model3d.js +39 -0
- package/dist/model3d.js.map +1 -0
- package/dist/model3dBake.d.ts +80 -0
- package/dist/model3dBake.d.ts.map +1 -0
- package/dist/model3dBake.js +127 -0
- package/dist/model3dBake.js.map +1 -0
- package/dist/ops/apply.d.ts +32 -0
- package/dist/ops/apply.d.ts.map +1 -0
- package/dist/ops/apply.js +1595 -0
- package/dist/ops/apply.js.map +1 -0
- package/dist/ops/index.d.ts +13 -0
- package/dist/ops/index.d.ts.map +1 -0
- package/dist/ops/index.js +13 -0
- package/dist/ops/index.js.map +1 -0
- package/dist/ops/op.d.ts +407 -0
- package/dist/ops/op.d.ts.map +1 -0
- package/dist/ops/op.js +61 -0
- package/dist/ops/op.js.map +1 -0
- package/dist/ops/serialize.d.ts +77 -0
- package/dist/ops/serialize.d.ts.map +1 -0
- package/dist/ops/serialize.js +81 -0
- package/dist/ops/serialize.js.map +1 -0
- package/dist/ops/types.d.ts +150 -0
- package/dist/ops/types.d.ts.map +1 -0
- package/dist/ops/types.js +12 -0
- package/dist/ops/types.js.map +1 -0
- package/dist/pathSampling.d.ts +51 -0
- package/dist/pathSampling.d.ts.map +1 -0
- package/dist/pathSampling.js +111 -0
- package/dist/pathSampling.js.map +1 -0
- package/dist/placement/index.d.ts +2 -0
- package/dist/placement/index.d.ts.map +1 -0
- package/dist/placement/index.js +2 -0
- package/dist/placement/index.js.map +1 -0
- package/dist/placement/resolveTrackPlacement.d.ts +40 -0
- package/dist/placement/resolveTrackPlacement.d.ts.map +1 -0
- package/dist/placement/resolveTrackPlacement.js +71 -0
- package/dist/placement/resolveTrackPlacement.js.map +1 -0
- package/dist/production.d.ts +99 -0
- package/dist/production.d.ts.map +1 -0
- package/dist/production.js +328 -0
- package/dist/production.js.map +1 -0
- package/dist/reassemble.d.ts +68 -0
- package/dist/reassemble.d.ts.map +1 -0
- package/dist/reassemble.js +187 -0
- package/dist/reassemble.js.map +1 -0
- package/dist/recipe.d.ts +24 -0
- package/dist/recipe.d.ts.map +1 -0
- package/dist/recipe.js +89 -0
- package/dist/recipe.js.map +1 -0
- package/dist/recordedVoiceReplacement.d.ts +70 -0
- package/dist/recordedVoiceReplacement.d.ts.map +1 -0
- package/dist/recordedVoiceReplacement.js +82 -0
- package/dist/recordedVoiceReplacement.js.map +1 -0
- package/dist/reframe.d.ts +31 -0
- package/dist/reframe.d.ts.map +1 -0
- package/dist/reframe.js +227 -0
- package/dist/reframe.js.map +1 -0
- package/dist/render/canvas2d.d.ts +419 -0
- package/dist/render/canvas2d.d.ts.map +1 -0
- package/dist/render/canvas2d.js +1392 -0
- package/dist/render/canvas2d.js.map +1 -0
- package/dist/render/color.d.ts +26 -0
- package/dist/render/color.d.ts.map +1 -0
- package/dist/render/color.js +305 -0
- package/dist/render/color.js.map +1 -0
- package/dist/render/cpuLegacyEffects.d.ts +17 -0
- package/dist/render/cpuLegacyEffects.d.ts.map +1 -0
- package/dist/render/cpuLegacyEffects.js +347 -0
- package/dist/render/cpuLegacyEffects.js.map +1 -0
- package/dist/render/cpuVisualEffects.d.ts +13 -0
- package/dist/render/cpuVisualEffects.d.ts.map +1 -0
- package/dist/render/cpuVisualEffects.js +388 -0
- package/dist/render/cpuVisualEffects.js.map +1 -0
- package/dist/render/cubeLut.d.ts +12 -0
- package/dist/render/cubeLut.d.ts.map +1 -0
- package/dist/render/cubeLut.js +81 -0
- package/dist/render/cubeLut.js.map +1 -0
- package/dist/render/curveFitting.d.ts +28 -0
- package/dist/render/curveFitting.d.ts.map +1 -0
- package/dist/render/curveFitting.js +94 -0
- package/dist/render/curveFitting.js.map +1 -0
- package/dist/render/draw.d.ts +265 -0
- package/dist/render/draw.d.ts.map +1 -0
- package/dist/render/draw.js +929 -0
- package/dist/render/draw.js.map +1 -0
- package/dist/render/effects.d.ts +120 -0
- package/dist/render/effects.d.ts.map +1 -0
- package/dist/render/effects.js +804 -0
- package/dist/render/effects.js.map +1 -0
- package/dist/render/frameCompositor.d.ts +502 -0
- package/dist/render/frameCompositor.d.ts.map +1 -0
- package/dist/render/frameCompositor.js +1331 -0
- package/dist/render/frameCompositor.js.map +1 -0
- package/dist/render/index.d.ts +27 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +27 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/layout.d.ts +17 -0
- package/dist/render/layout.d.ts.map +1 -0
- package/dist/render/layout.js +197 -0
- package/dist/render/layout.js.map +1 -0
- package/dist/render/model3dBakeSamples.d.ts +45 -0
- package/dist/render/model3dBakeSamples.d.ts.map +1 -0
- package/dist/render/model3dBakeSamples.js +68 -0
- package/dist/render/model3dBakeSamples.js.map +1 -0
- package/dist/render/motionBlur.d.ts +170 -0
- package/dist/render/motionBlur.d.ts.map +1 -0
- package/dist/render/motionBlur.js +193 -0
- package/dist/render/motionBlur.js.map +1 -0
- package/dist/render/sceneModel.d.ts +577 -0
- package/dist/render/sceneModel.d.ts.map +1 -0
- package/dist/render/sceneModel.js +1460 -0
- package/dist/render/sceneModel.js.map +1 -0
- package/dist/render/shapeGeometry.d.ts +81 -0
- package/dist/render/shapeGeometry.d.ts.map +1 -0
- package/dist/render/shapeGeometry.js +460 -0
- package/dist/render/shapeGeometry.js.map +1 -0
- package/dist/render/spatial.d.ts +9 -0
- package/dist/render/spatial.d.ts.map +1 -0
- package/dist/render/spatial.js +58 -0
- package/dist/render/spatial.js.map +1 -0
- package/dist/render/svgPath.d.ts +80 -0
- package/dist/render/svgPath.d.ts.map +1 -0
- package/dist/render/svgPath.js +199 -0
- package/dist/render/svgPath.js.map +1 -0
- package/dist/render/temporal.d.ts +6 -0
- package/dist/render/temporal.d.ts.map +1 -0
- package/dist/render/temporal.js +74 -0
- package/dist/render/temporal.js.map +1 -0
- package/dist/render/textLayout.d.ts +159 -0
- package/dist/render/textLayout.d.ts.map +1 -0
- package/dist/render/textLayout.js +301 -0
- package/dist/render/textLayout.js.map +1 -0
- package/dist/render/trackEffects.d.ts +23 -0
- package/dist/render/trackEffects.d.ts.map +1 -0
- package/dist/render/trackEffects.js +93 -0
- package/dist/render/trackEffects.js.map +1 -0
- package/dist/render/transform.d.ts +54 -0
- package/dist/render/transform.d.ts.map +1 -0
- package/dist/render/transform.js +222 -0
- package/dist/render/transform.js.map +1 -0
- package/dist/render/transition.d.ts +109 -0
- package/dist/render/transition.d.ts.map +1 -0
- package/dist/render/transition.js +351 -0
- package/dist/render/transition.js.map +1 -0
- package/dist/retarget.d.ts +73 -0
- package/dist/retarget.d.ts.map +1 -0
- package/dist/retarget.js +305 -0
- package/dist/retarget.js.map +1 -0
- package/dist/rippleEdit.d.ts +83 -0
- package/dist/rippleEdit.d.ts.map +1 -0
- package/dist/rippleEdit.js +184 -0
- package/dist/rippleEdit.js.map +1 -0
- package/dist/scene.d.ts +28 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/scene.js +28 -0
- package/dist/scene.js.map +1 -0
- package/dist/script-link.d.ts +52 -0
- package/dist/script-link.d.ts.map +1 -0
- package/dist/script-link.js +78 -0
- package/dist/script-link.js.map +1 -0
- package/dist/script.d.ts +52 -0
- package/dist/script.d.ts.map +1 -0
- package/dist/script.js +93 -0
- package/dist/script.js.map +1 -0
- package/dist/snap.d.ts +2 -0
- package/dist/snap.d.ts.map +1 -0
- package/dist/snap.js +21 -0
- package/dist/snap.js.map +1 -0
- package/dist/snapping/buildSnapPoints.d.ts +16 -0
- package/dist/snapping/buildSnapPoints.d.ts.map +1 -0
- package/dist/snapping/buildSnapPoints.js +39 -0
- package/dist/snapping/buildSnapPoints.js.map +1 -0
- package/dist/snapping/index.d.ts +3 -0
- package/dist/snapping/index.d.ts.map +1 -0
- package/dist/snapping/index.js +3 -0
- package/dist/snapping/index.js.map +1 -0
- package/dist/snapping/resolveSnap.d.ts +19 -0
- package/dist/snapping/resolveSnap.d.ts.map +1 -0
- package/dist/snapping/resolveSnap.js +39 -0
- package/dist/snapping/resolveSnap.js.map +1 -0
- package/dist/sourceRate.d.ts +12 -0
- package/dist/sourceRate.d.ts.map +1 -0
- package/dist/sourceRate.js +13 -0
- package/dist/sourceRate.js.map +1 -0
- package/dist/spatialVideoRequest.d.ts +91 -0
- package/dist/spatialVideoRequest.d.ts.map +1 -0
- package/dist/spatialVideoRequest.js +175 -0
- package/dist/spatialVideoRequest.js.map +1 -0
- package/dist/splitClip.d.ts +3 -0
- package/dist/splitClip.d.ts.map +1 -0
- package/dist/splitClip.js +190 -0
- package/dist/splitClip.js.map +1 -0
- package/dist/stableSerialize.d.ts +11 -0
- package/dist/stableSerialize.d.ts.map +1 -0
- package/dist/stableSerialize.js +31 -0
- package/dist/stableSerialize.js.map +1 -0
- package/dist/staleSet.d.ts +41 -0
- package/dist/staleSet.d.ts.map +1 -0
- package/dist/staleSet.js +106 -0
- package/dist/staleSet.js.map +1 -0
- package/dist/storyboard.d.ts +221 -0
- package/dist/storyboard.d.ts.map +1 -0
- package/dist/storyboard.js +417 -0
- package/dist/storyboard.js.map +1 -0
- package/dist/subtitles.d.ts +61 -0
- package/dist/subtitles.d.ts.map +1 -0
- package/dist/subtitles.js +92 -0
- package/dist/subtitles.js.map +1 -0
- package/dist/takes.d.ts +76 -0
- package/dist/takes.d.ts.map +1 -0
- package/dist/takes.js +238 -0
- package/dist/takes.js.map +1 -0
- package/dist/timeRemap.d.ts +101 -0
- package/dist/timeRemap.d.ts.map +1 -0
- package/dist/timeRemap.js +183 -0
- package/dist/timeRemap.js.map +1 -0
- package/dist/trackOrder.d.ts +38 -0
- package/dist/trackOrder.d.ts.map +1 -0
- package/dist/trackOrder.js +54 -0
- package/dist/trackOrder.js.map +1 -0
- package/dist/transitionAtCut.d.ts +89 -0
- package/dist/transitionAtCut.d.ts.map +1 -0
- package/dist/transitionAtCut.js +217 -0
- package/dist/transitionAtCut.js.map +1 -0
- package/dist/trimClip.d.ts +13 -0
- package/dist/trimClip.d.ts.map +1 -0
- package/dist/trimClip.js +60 -0
- package/dist/trimClip.js.map +1 -0
- package/dist/types.d.ts +1772 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +84 -0
- package/dist/types.js.map +1 -0
- package/fonts/BebasNeue-Regular.ttf +0 -0
- package/fonts/Inter-ExtraBold.ttf +0 -0
- package/fonts/Inter-Italic-Variable.ttf +0 -0
- package/fonts/Inter-SemiBold.ttf +0 -0
- package/fonts/Inter-Variable.ttf +0 -0
- package/fonts/JetBrainsMono-Italic-Variable.ttf +0 -0
- package/fonts/JetBrainsMono-Variable.ttf +0 -0
- package/fonts/Lora-Italic-Variable.ttf +0 -0
- package/fonts/Lora-Variable.ttf +0 -0
- package/fonts/OFL-BebasNeue.txt +93 -0
- package/fonts/OFL-Inter.txt +93 -0
- package/fonts/OFL-JetBrainsMono.txt +93 -0
- package/fonts/OFL-Lora.txt +93 -0
- package/fonts/OFL-PlayfairDisplay.txt +93 -0
- package/fonts/OFL-SpaceGrotesk.txt +93 -0
- package/fonts/PlayfairDisplay-Italic-Variable.ttf +0 -0
- package/fonts/PlayfairDisplay-Variable.ttf +0 -0
- package/fonts/SpaceGrotesk-Variable.ttf +0 -0
- package/package.json +108 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a re-assemble must not throw away.
|
|
3
|
+
*
|
|
4
|
+
* Assembling a script or a board into a sequence that already exists rewrites
|
|
5
|
+
* only what that document owns. Anything another surface put in the sequence —
|
|
6
|
+
* a second script's voiceover, a music bed the editor dropped in, an empty
|
|
7
|
+
* track someone made room with — survives, because the sequence is a shared
|
|
8
|
+
* place and only the owner's clips are being regenerated.
|
|
9
|
+
*
|
|
10
|
+
* The rule is one predicate plus one track question, and both the script
|
|
11
|
+
* assemble and the storyboard assemble ask it identically, so it lives here
|
|
12
|
+
* rather than twice in `packages/agents`.
|
|
13
|
+
*
|
|
14
|
+
* {@link refillShotClips} is the other half: what the assembling document owns
|
|
15
|
+
* and still must not rebuild, because a person placed it.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The part of `previous` a re-assemble keeps, given which clips the assembling
|
|
19
|
+
* document owns.
|
|
20
|
+
*
|
|
21
|
+
* Clips: every clip the caller does not own. Tracks: every track that still
|
|
22
|
+
* holds one of those clips, plus every track that never held an owned clip —
|
|
23
|
+
* so an empty track the editor added stays, while the track the last assemble
|
|
24
|
+
* wrote its own clips onto is dropped and rebuilt.
|
|
25
|
+
*/
|
|
26
|
+
export function foreignTimelineParts(previous, owns) {
|
|
27
|
+
const clips = previous.clips.filter((clip) => !owns(clip));
|
|
28
|
+
const ownedTrackIds = new Set(previous.clips.filter(owns).map((clip) => clip.trackId));
|
|
29
|
+
const foreignTrackIds = new Set(clips.map((clip) => clip.trackId));
|
|
30
|
+
const tracks = previous.tracks.filter((track) => foreignTrackIds.has(track.id) || !ownedTrackIds.has(track.id));
|
|
31
|
+
return { tracks, clips };
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Identity of a shot clip inside a cut: the shot it plays, in which medium.
|
|
35
|
+
*
|
|
36
|
+
* Null for a clip a re-assemble rebuilds rather than refills — one that plays
|
|
37
|
+
* no shot, and one that plays a script line, because there the words decide
|
|
38
|
+
* where the clip sits and how long it runs.
|
|
39
|
+
*/
|
|
40
|
+
const shotClipKey = (clip) => clip.storyboardShotId && !clip.scriptLineId
|
|
41
|
+
? `${clip.storyboardShotId} ${clip.mediaType}`
|
|
42
|
+
: null;
|
|
43
|
+
/** The edit a refilled clip keeps: where it sits, and what it plays of its source. */
|
|
44
|
+
const placementOf = (clip) => ({
|
|
45
|
+
startMs: clip.startMs,
|
|
46
|
+
durationMs: clip.durationMs,
|
|
47
|
+
inPointMs: clip.inPointMs,
|
|
48
|
+
outPointMs: clip.outPointMs
|
|
49
|
+
});
|
|
50
|
+
/** An existing shot clip pointed at the media the new assembly resolved. */
|
|
51
|
+
function refilledClip(clip, source) {
|
|
52
|
+
// A shot still on the board that this assembly could not resolve — not
|
|
53
|
+
// rendered yet, or its render cleared — holds its place and its media.
|
|
54
|
+
if (!source)
|
|
55
|
+
return clip;
|
|
56
|
+
const next = {
|
|
57
|
+
...clip,
|
|
58
|
+
mediaType: source.mediaType,
|
|
59
|
+
sourceType: source.sourceType,
|
|
60
|
+
status: source.status,
|
|
61
|
+
storyboardBoardId: source.storyboardBoardId
|
|
62
|
+
};
|
|
63
|
+
if (source.currentAssetId === undefined) {
|
|
64
|
+
delete next.currentAssetId;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
next.currentAssetId = source.currentAssetId;
|
|
68
|
+
}
|
|
69
|
+
if (next.currentAssetId !== clip.currentAssetId) {
|
|
70
|
+
delete next.thumbnailAssetId;
|
|
71
|
+
delete next.waveformAssetId;
|
|
72
|
+
delete next.dependencyHash;
|
|
73
|
+
delete next.lastGeneratedHash;
|
|
74
|
+
}
|
|
75
|
+
return next;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Re-assemble a cut without rebuilding the shots a person already placed.
|
|
79
|
+
*
|
|
80
|
+
* `foreignTimelineParts` keeps what the assembling document does not own; this
|
|
81
|
+
* keeps what it does. A shot clip is identified by the shot it plays, so a
|
|
82
|
+
* re-assemble refills it — new asset, same placement, same trim, same
|
|
83
|
+
* transform — instead of laying a fresh clip down in board order and dropping
|
|
84
|
+
* the edit. That is what lets a recast copy inherit the approved cut, and what
|
|
85
|
+
* lets a board be re-rendered and re-cut without losing one.
|
|
86
|
+
*
|
|
87
|
+
* Three cases, each explicit:
|
|
88
|
+
* - **Kept.** An owned clip whose shot is still on the board survives, with
|
|
89
|
+
* the media of the matching assembled clip swapped in. A shot the assembly
|
|
90
|
+
* could not resolve (nothing rendered yet) holds its place.
|
|
91
|
+
* - **Added.** An assembled clip with no owned counterpart. When the shot
|
|
92
|
+
* already has a clip in the cut — a video clip and its audio twin — the new
|
|
93
|
+
* one takes that clip's placement; otherwise it is appended after everything
|
|
94
|
+
* the cut already held, so a new shot joins the cut without moving anything
|
|
95
|
+
* already placed.
|
|
96
|
+
* - **Removed.** An owned clip whose shot is gone from the board.
|
|
97
|
+
*
|
|
98
|
+
* With no previous cut this is the assembly itself, clip for clip and track
|
|
99
|
+
* for track, so a first assemble is unchanged.
|
|
100
|
+
*
|
|
101
|
+
* A preserved trim outlives the footage it was cut from: a clip trimmed to a
|
|
102
|
+
* window of the template's render keeps that window over the copy's, which is
|
|
103
|
+
* the point when the copy is the same shot again and the caller's problem when
|
|
104
|
+
* the new render is shorter.
|
|
105
|
+
*/
|
|
106
|
+
export function refillShotClips(previous, assembled, input) {
|
|
107
|
+
const owned = previous.clips.filter(input.owns);
|
|
108
|
+
const foreignClips = previous.clips.filter((clip) => !input.owns(clip));
|
|
109
|
+
const fresh = new Map();
|
|
110
|
+
for (const clip of assembled.clips) {
|
|
111
|
+
const key = shotClipKey(clip);
|
|
112
|
+
if (key !== null && !fresh.has(key))
|
|
113
|
+
fresh.set(key, clip);
|
|
114
|
+
}
|
|
115
|
+
/** Assembled track → the track the kept clip it refilled already sits on. */
|
|
116
|
+
const trackFor = new Map();
|
|
117
|
+
const refilled = new Set();
|
|
118
|
+
const anchors = new Map();
|
|
119
|
+
const kept = [];
|
|
120
|
+
for (const clip of owned) {
|
|
121
|
+
const key = shotClipKey(clip);
|
|
122
|
+
const shotId = key === null ? undefined : clip.storyboardShotId;
|
|
123
|
+
if (key === null || !shotId || !input.liveShotIds.has(shotId))
|
|
124
|
+
continue;
|
|
125
|
+
const source = fresh.get(key);
|
|
126
|
+
if (source) {
|
|
127
|
+
refilled.add(key);
|
|
128
|
+
trackFor.set(source.trackId, clip.trackId);
|
|
129
|
+
}
|
|
130
|
+
const next = refilledClip(clip, source);
|
|
131
|
+
kept.push(next);
|
|
132
|
+
if (!anchors.has(shotId))
|
|
133
|
+
anchors.set(shotId, next);
|
|
134
|
+
}
|
|
135
|
+
const onTrack = (clip) => trackFor.get(clip.trackId) ?? clip.trackId;
|
|
136
|
+
const added = [];
|
|
137
|
+
const appended = new Map();
|
|
138
|
+
for (const clip of assembled.clips) {
|
|
139
|
+
const key = shotClipKey(clip);
|
|
140
|
+
if (key !== null && refilled.has(key))
|
|
141
|
+
continue;
|
|
142
|
+
const shotId = key === null ? undefined : clip.storyboardShotId;
|
|
143
|
+
const anchor = shotId ? anchors.get(shotId) : undefined;
|
|
144
|
+
if (anchor) {
|
|
145
|
+
added.push({
|
|
146
|
+
...clip,
|
|
147
|
+
...placementOf(anchor),
|
|
148
|
+
linkId: anchor.linkId ?? clip.linkId,
|
|
149
|
+
trackId: onTrack(clip)
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
else if (!shotId) {
|
|
153
|
+
added.push({ ...clip, trackId: onTrack(clip) });
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
const group = appended.get(shotId);
|
|
157
|
+
if (group)
|
|
158
|
+
group.push(clip);
|
|
159
|
+
else
|
|
160
|
+
appended.set(shotId, [clip]);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// The boundary a new shot lands after is the end of the whole cut, foreign
|
|
164
|
+
// clips included: an approved cut can carry an end card on the shots track
|
|
165
|
+
// after the last shot, and appending against only the owned clips would lay
|
|
166
|
+
// the new shot straight over it.
|
|
167
|
+
let cursorMs = [...kept, ...added, ...foreignClips].reduce((end, clip) => Math.max(end, clip.startMs + clip.durationMs), 0);
|
|
168
|
+
for (const group of appended.values()) {
|
|
169
|
+
const delta = cursorMs - Math.min(...group.map((clip) => clip.startMs));
|
|
170
|
+
for (const clip of group) {
|
|
171
|
+
const startMs = clip.startMs + delta;
|
|
172
|
+
added.push({ ...clip, startMs, trackId: onTrack(clip) });
|
|
173
|
+
cursorMs = Math.max(cursorMs, startMs + clip.durationMs);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
const clips = [...kept, ...added, ...foreignClips];
|
|
177
|
+
const usedTrackIds = new Set(clips.map((clip) => clip.trackId));
|
|
178
|
+
const ownedTrackIds = new Set(owned.map((clip) => clip.trackId));
|
|
179
|
+
// The same track rule as `foreignTimelineParts`, over what survived: a track
|
|
180
|
+
// still holding a clip stays, and so does one the assembling document never
|
|
181
|
+
// wrote to — an empty track the editor made room with.
|
|
182
|
+
const tracks = previous.tracks.filter((track) => usedTrackIds.has(track.id) || !ownedTrackIds.has(track.id));
|
|
183
|
+
const have = new Set(tracks.map((track) => track.id));
|
|
184
|
+
tracks.push(...assembled.tracks.filter((track) => usedTrackIds.has(track.id) && !have.has(track.id)));
|
|
185
|
+
return { tracks, clips };
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=reassemble.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reassemble.js","sourceRoot":"","sources":["../src/reassemble.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAuB,EACvB,IAAqC;IAErC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3D,MAAM,aAAa,GAAG,IAAI,GAAG,CAC3B,QAAQ,CAAC,KAAK,CAAC,MAAM,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C,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACtE,CAAC;IACF,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACtD,MAAM,CAAC,IAAI,CACT,GAAG,SAAS,CAAC,MAAM,CAAC,MAAM,CACxB,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAC7D,CACF,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAC3B,CAAC"}
|
package/dist/recipe.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ClipVersion, TimelineClip, VideoGenerationRecipe } from "./types.js";
|
|
2
|
+
export type ReplayRecipeResult = {
|
|
3
|
+
ok: true;
|
|
4
|
+
recipe: VideoGenerationRecipe;
|
|
5
|
+
} | {
|
|
6
|
+
ok: false;
|
|
7
|
+
reason: string;
|
|
8
|
+
};
|
|
9
|
+
export type VideoGenerationRecipeCaptureResult = {
|
|
10
|
+
ok: true;
|
|
11
|
+
recipe: VideoGenerationRecipe;
|
|
12
|
+
} | {
|
|
13
|
+
ok: false;
|
|
14
|
+
reason: string;
|
|
15
|
+
};
|
|
16
|
+
/** Capture the direct text-to-video inputs before a generation is dispatched. */
|
|
17
|
+
export declare function captureVideoGenerationRecipe(clip: TimelineClip, promptOverride?: string): VideoGenerationRecipeCaptureResult;
|
|
18
|
+
/**
|
|
19
|
+
* Return a replayable recipe only for a complete generated text-to-video take.
|
|
20
|
+
* Legacy takes and native video-edit takes remain valid, but are unavailable
|
|
21
|
+
* for recipe replay because their original inputs were not captured here.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getReplayRecipe(take: ClipVersion): ReplayRecipeResult;
|
|
24
|
+
//# sourceMappingURL=recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../src/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnF,MAAM,MAAM,kBAAkB,GAC1B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,qBAAqB,CAAA;CAAE,GAC3C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC,MAAM,MAAM,kCAAkC,GAC1C;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,qBAAqB,CAAA;CAAE,GAC3C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC,iFAAiF;AACjF,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,YAAY,EAClB,cAAc,CAAC,EAAE,MAAM,GACtB,kCAAkC,CAiDpC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,kBAAkB,CA4BrE"}
|
package/dist/recipe.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/** Capture the direct text-to-video inputs before a generation is dispatched. */
|
|
2
|
+
export function captureVideoGenerationRecipe(clip, promptOverride) {
|
|
3
|
+
if (clip.mediaType !== "video" || clip.bindingKind !== "text-to-video") {
|
|
4
|
+
return {
|
|
5
|
+
ok: false,
|
|
6
|
+
reason: "New take requires a direct text-to-video clip."
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
const prompt = (promptOverride ?? clip.prompt ?? "").trim();
|
|
10
|
+
if (!prompt)
|
|
11
|
+
return { ok: false, reason: "New take requires a prompt." };
|
|
12
|
+
if (!clip.provider || !clip.provider.trim() || !clip.model || !clip.model.trim()) {
|
|
13
|
+
return {
|
|
14
|
+
ok: false,
|
|
15
|
+
reason: "New take requires the original provider and model."
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
if (!Number.isFinite(clip.durationMs) || clip.durationMs <= 0) {
|
|
19
|
+
return { ok: false, reason: "New take requires a positive clip duration." };
|
|
20
|
+
}
|
|
21
|
+
if (!clip.aspectRatio?.trim() && !clip.resolution?.trim()) {
|
|
22
|
+
return {
|
|
23
|
+
ok: false,
|
|
24
|
+
reason: "New take requires the original framing settings."
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const recipeFields = {
|
|
28
|
+
schemaVersion: 1,
|
|
29
|
+
task: "text_to_video",
|
|
30
|
+
prompt,
|
|
31
|
+
provider: clip.provider,
|
|
32
|
+
model: clip.model,
|
|
33
|
+
durationMs: clip.durationMs
|
|
34
|
+
};
|
|
35
|
+
const negativePrompt = clip.negativePrompt?.trim();
|
|
36
|
+
if (negativePrompt)
|
|
37
|
+
recipeFields.negativePrompt = negativePrompt;
|
|
38
|
+
const aspectRatio = clip.aspectRatio?.trim();
|
|
39
|
+
if (aspectRatio)
|
|
40
|
+
recipeFields.aspectRatio = aspectRatio;
|
|
41
|
+
const resolution = clip.resolution?.trim();
|
|
42
|
+
if (resolution)
|
|
43
|
+
recipeFields.resolution = resolution;
|
|
44
|
+
if (clip.width !== undefined)
|
|
45
|
+
recipeFields.width = clip.width;
|
|
46
|
+
if (clip.height !== undefined)
|
|
47
|
+
recipeFields.height = clip.height;
|
|
48
|
+
if (clip.strength !== undefined)
|
|
49
|
+
recipeFields.strength = clip.strength;
|
|
50
|
+
if (clip.numInferenceSteps !== undefined) {
|
|
51
|
+
recipeFields.numInferenceSteps = clip.numInferenceSteps;
|
|
52
|
+
}
|
|
53
|
+
if (clip.seed !== undefined)
|
|
54
|
+
recipeFields.seed = clip.seed;
|
|
55
|
+
return { ok: true, recipe: Object.freeze(recipeFields) };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Return a replayable recipe only for a complete generated text-to-video take.
|
|
59
|
+
* Legacy takes and native video-edit takes remain valid, but are unavailable
|
|
60
|
+
* for recipe replay because their original inputs were not captured here.
|
|
61
|
+
*/
|
|
62
|
+
export function getReplayRecipe(take) {
|
|
63
|
+
if (take.source === "imported") {
|
|
64
|
+
return { ok: false, reason: "Imported takes do not have a generation recipe." };
|
|
65
|
+
}
|
|
66
|
+
if (take.mediaEdit?.action === "video_edit") {
|
|
67
|
+
return { ok: false, reason: "Video-edit takes cannot be replayed as New take." };
|
|
68
|
+
}
|
|
69
|
+
const recipe = take.generationRecipe;
|
|
70
|
+
if (recipe === undefined) {
|
|
71
|
+
return { ok: false, reason: "This take has no known generation recipe." };
|
|
72
|
+
}
|
|
73
|
+
if (take.source !== "generated" ||
|
|
74
|
+
recipe.task !== "text_to_video" ||
|
|
75
|
+
recipe.schemaVersion !== 1) {
|
|
76
|
+
return { ok: false, reason: "This take does not contain a known text-to-video recipe." };
|
|
77
|
+
}
|
|
78
|
+
if (!recipe.prompt.trim() || !recipe.provider.trim() || !recipe.model.trim()) {
|
|
79
|
+
return { ok: false, reason: "The generation recipe is missing prompt, provider, or model." };
|
|
80
|
+
}
|
|
81
|
+
if (!Number.isFinite(recipe.durationMs) || recipe.durationMs <= 0) {
|
|
82
|
+
return { ok: false, reason: "The generation recipe is missing a positive duration." };
|
|
83
|
+
}
|
|
84
|
+
if (!recipe.aspectRatio?.trim() && !recipe.resolution?.trim()) {
|
|
85
|
+
return { ok: false, reason: "The generation recipe is missing framing settings." };
|
|
86
|
+
}
|
|
87
|
+
return { ok: true, recipe };
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../src/recipe.ts"],"names":[],"mappings":"AAUA,iFAAiF;AACjF,MAAM,UAAU,4BAA4B,CAC1C,IAAkB,EAClB,c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,EAAE,MAAM,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** Provider-independent contract for replacing speech in an existing recording. */
|
|
2
|
+
export declare const RECORDED_VOICE_REPLACEMENT_OPERATION: "recorded_voice_replacement";
|
|
3
|
+
export declare const RECORDED_VOICE_REPLACEMENT_MODEL_TASK: "audio_to_audio";
|
|
4
|
+
export interface VoiceOperationModelSelection {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly provider: string;
|
|
7
|
+
readonly supportedTasks?: readonly string[];
|
|
8
|
+
readonly supportedOperations?: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
export type RecordedSpeechSource = {
|
|
11
|
+
readonly kind: "clean_speech";
|
|
12
|
+
readonly assetId: string;
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: "isolated_speech";
|
|
15
|
+
readonly assetId: string;
|
|
16
|
+
readonly isolationRequestId?: string;
|
|
17
|
+
};
|
|
18
|
+
export interface VoiceReplacementTarget {
|
|
19
|
+
readonly kind: "voice";
|
|
20
|
+
readonly voiceId: string;
|
|
21
|
+
}
|
|
22
|
+
export type VoiceReplacementTargetInput = VoiceReplacementTarget | {
|
|
23
|
+
readonly kind: "reference_audio";
|
|
24
|
+
readonly assetId: string;
|
|
25
|
+
};
|
|
26
|
+
export interface RecordedVoiceReplacementRequest {
|
|
27
|
+
readonly operation: typeof RECORDED_VOICE_REPLACEMENT_OPERATION;
|
|
28
|
+
readonly modelTask: typeof RECORDED_VOICE_REPLACEMENT_MODEL_TASK;
|
|
29
|
+
readonly requestId: string;
|
|
30
|
+
readonly sequenceId: string;
|
|
31
|
+
readonly clipId: string;
|
|
32
|
+
readonly source: RecordedSpeechSource;
|
|
33
|
+
readonly target: VoiceReplacementTarget;
|
|
34
|
+
readonly provider: string;
|
|
35
|
+
readonly model: string;
|
|
36
|
+
readonly result: {
|
|
37
|
+
readonly mediaType: "audio";
|
|
38
|
+
readonly disposition: "candidate";
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface RecordedVoiceReplacementRequestInput {
|
|
42
|
+
readonly requestId?: string | null;
|
|
43
|
+
readonly sequenceId?: string | null;
|
|
44
|
+
readonly clipId?: string | null;
|
|
45
|
+
readonly source?: RecordedSpeechSource | null;
|
|
46
|
+
readonly target?: VoiceReplacementTargetInput | null;
|
|
47
|
+
readonly model: VoiceOperationModelSelection;
|
|
48
|
+
}
|
|
49
|
+
export type RecordedVoiceReplacementRequestErrorCode = "missing_identity" | "unsupported_model_task" | "unsupported_model_operation" | "missing_speech_source" | "missing_target" | "unsupported_target";
|
|
50
|
+
export interface RecordedVoiceReplacementRequestError {
|
|
51
|
+
readonly ok: false;
|
|
52
|
+
readonly code: RecordedVoiceReplacementRequestErrorCode;
|
|
53
|
+
readonly error: string;
|
|
54
|
+
}
|
|
55
|
+
export interface RecordedVoiceReplacementRequestSuccess {
|
|
56
|
+
readonly ok: true;
|
|
57
|
+
readonly request: RecordedVoiceReplacementRequest;
|
|
58
|
+
}
|
|
59
|
+
export type RecordedVoiceReplacementRequestResult = RecordedVoiceReplacementRequestError | RecordedVoiceReplacementRequestSuccess;
|
|
60
|
+
export interface RecordedVoiceReplacementProvenance {
|
|
61
|
+
readonly requestId: string;
|
|
62
|
+
readonly operation: typeof RECORDED_VOICE_REPLACEMENT_OPERATION;
|
|
63
|
+
readonly resultDisposition: "candidate";
|
|
64
|
+
readonly request: RecordedVoiceReplacementRequest;
|
|
65
|
+
}
|
|
66
|
+
/** Validate and freeze a recorded-speech replacement before provider dispatch. */
|
|
67
|
+
export declare function createRecordedVoiceReplacementRequest(input: RecordedVoiceReplacementRequestInput): RecordedVoiceReplacementRequestResult;
|
|
68
|
+
/** Immutable candidate provenance with the operation identity at the top level. */
|
|
69
|
+
export declare function recordedVoiceReplacementProvenance(request: RecordedVoiceReplacementRequest): RecordedVoiceReplacementProvenance;
|
|
70
|
+
//# sourceMappingURL=recordedVoiceReplacement.d.ts.map
|
|
@@ -0,0 +1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WAAW,kCAAkC;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,OAAO,oCAAoC,CAAC;IAChE,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,+BAA+B,CAAC;CACnD;AAYD,kFAAkF;AAClF,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,oCAAoC,GAC1C,qCAAqC,CAiGvC;AAED,mFAAmF;AACnF,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,+BAA+B,GACvC,kCAAkC,CAOpC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/** Provider-independent contract for replacing speech in an existing recording. */
|
|
2
|
+
export const RECORDED_VOICE_REPLACEMENT_OPERATION = "recorded_voice_replacement";
|
|
3
|
+
export const RECORDED_VOICE_REPLACEMENT_MODEL_TASK = "audio_to_audio";
|
|
4
|
+
const nonEmpty = (value) => {
|
|
5
|
+
const normalized = value?.trim();
|
|
6
|
+
return normalized ? normalized : undefined;
|
|
7
|
+
};
|
|
8
|
+
const fail = (code, error) => ({ ok: false, code, error });
|
|
9
|
+
/** Validate and freeze a recorded-speech replacement before provider dispatch. */
|
|
10
|
+
export function createRecordedVoiceReplacementRequest(input) {
|
|
11
|
+
const requestId = nonEmpty(input.requestId);
|
|
12
|
+
const sequenceId = nonEmpty(input.sequenceId);
|
|
13
|
+
const clipId = nonEmpty(input.clipId);
|
|
14
|
+
if (!requestId || !sequenceId || !clipId) {
|
|
15
|
+
return fail("missing_identity", "Recorded voice replacement requires request, sequence, and clip ids.");
|
|
16
|
+
}
|
|
17
|
+
const provider = nonEmpty(input.model.provider);
|
|
18
|
+
const model = nonEmpty(input.model.id);
|
|
19
|
+
if (!provider ||
|
|
20
|
+
!model ||
|
|
21
|
+
!input.model.supportedTasks?.includes(RECORDED_VOICE_REPLACEMENT_MODEL_TASK)) {
|
|
22
|
+
return fail("unsupported_model_task", "Choose a model with the audio_to_audio task for recorded voice replacement.");
|
|
23
|
+
}
|
|
24
|
+
if (!input.model.supportedOperations?.includes(RECORDED_VOICE_REPLACEMENT_OPERATION)) {
|
|
25
|
+
return fail("unsupported_model_operation", "Choose a model adapter that supports recorded voice replacement.");
|
|
26
|
+
}
|
|
27
|
+
const sourceAssetId = nonEmpty(input.source?.assetId);
|
|
28
|
+
if (!input.source || !sourceAssetId) {
|
|
29
|
+
return fail("missing_speech_source", "Recorded voice replacement requires an explicit clean or isolated speech source.");
|
|
30
|
+
}
|
|
31
|
+
const isolationRequestId = input.source.kind === "isolated_speech"
|
|
32
|
+
? nonEmpty(input.source.isolationRequestId)
|
|
33
|
+
: undefined;
|
|
34
|
+
const source = input.source.kind === "clean_speech"
|
|
35
|
+
? Object.freeze({ kind: "clean_speech", assetId: sourceAssetId })
|
|
36
|
+
: Object.freeze({
|
|
37
|
+
kind: "isolated_speech",
|
|
38
|
+
assetId: sourceAssetId,
|
|
39
|
+
...(isolationRequestId !== undefined && { isolationRequestId })
|
|
40
|
+
});
|
|
41
|
+
if (!input.target) {
|
|
42
|
+
return fail("missing_target", "Recorded voice replacement requires a target voice.");
|
|
43
|
+
}
|
|
44
|
+
if (input.target.kind === "reference_audio") {
|
|
45
|
+
return fail("unsupported_target", "Recorded voice replacement does not support reference-audio targets.");
|
|
46
|
+
}
|
|
47
|
+
const targetValue = nonEmpty(input.target.voiceId);
|
|
48
|
+
if (!targetValue) {
|
|
49
|
+
return fail("missing_target", "Recorded voice replacement requires a target voice.");
|
|
50
|
+
}
|
|
51
|
+
const target = Object.freeze({
|
|
52
|
+
kind: "voice",
|
|
53
|
+
voiceId: targetValue
|
|
54
|
+
});
|
|
55
|
+
const result = Object.freeze({
|
|
56
|
+
mediaType: "audio",
|
|
57
|
+
disposition: "candidate"
|
|
58
|
+
});
|
|
59
|
+
const request = Object.freeze({
|
|
60
|
+
operation: RECORDED_VOICE_REPLACEMENT_OPERATION,
|
|
61
|
+
modelTask: RECORDED_VOICE_REPLACEMENT_MODEL_TASK,
|
|
62
|
+
requestId,
|
|
63
|
+
sequenceId,
|
|
64
|
+
clipId,
|
|
65
|
+
source,
|
|
66
|
+
target,
|
|
67
|
+
provider,
|
|
68
|
+
model,
|
|
69
|
+
result
|
|
70
|
+
});
|
|
71
|
+
return Object.freeze({ ok: true, request });
|
|
72
|
+
}
|
|
73
|
+
/** Immutable candidate provenance with the operation identity at the top level. */
|
|
74
|
+
export function recordedVoiceReplacementProvenance(request) {
|
|
75
|
+
return Object.freeze({
|
|
76
|
+
requestId: request.requestId,
|
|
77
|
+
operation: RECORDED_VOICE_REPLACEMENT_OPERATION,
|
|
78
|
+
resultDisposition: "candidate",
|
|
79
|
+
request
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=recordedVoiceReplacement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordedVoiceReplacement.js","sourceRoot":"","sources":["../src/recordedVoiceReplacement.ts"],"names":[],"mappings":"AAAA,mFAAmF;AAEnF,MAAM,CAAC,MAAM,oCAAoC,GAC/C,4BAAqC,CAAC;AACxC,MAAM,CAAC,MAAM,qCAAqC,GAAG,gBAAyB,CAAC;AAuF/E,MAAM,QAAQ,GAAG,CAAC,KAAgC,EAAsB,EAAE;IACxE,MAAM,UAAU,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IACjC,OAAO,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,CACX,IAA8C,EAC9C,KAAa,EACyB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAExE,kFAAkF;AAClF,MAAM,UAAU,qCAAqC,CACnD,KAA2C;IAE3C,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5C,MAAM,UAAU,G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AAE,CAAC,CAAC;AAC9C,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,kCAAkC,CAChD,OAAwC;IAExC,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,oCAAoC;QAC/C,iBAAiB,EAAE,WAAW;QAC9B,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Pure source-time Smart Reframe math. */
|
|
2
|
+
import type { ClipCrop, ClipReframe, MediaTrack, ReframeKeyframe, ReframeSample, TimelineClip } from "./types.js";
|
|
3
|
+
/** Whether a ready point/box track contains coordinates the framing solver supports. */
|
|
4
|
+
export declare function mediaTrackCanDriveReframe(track: MediaTrack): boolean;
|
|
5
|
+
/** Convert a point/box MediaTrack into a compact automatic framing path. */
|
|
6
|
+
export declare function solveReframeSamples(track: MediaTrack): ReframeSample[];
|
|
7
|
+
/** Resolve automatic framing plus interpolated manual corrections. */
|
|
8
|
+
export declare function sampleReframeAt(reframe: ClipReframe, sourceMs: number, track?: MediaTrack): ReframeSample & {
|
|
9
|
+
zoom: number;
|
|
10
|
+
};
|
|
11
|
+
/** Resolve a target-aspect crop in normalized source coordinates. */
|
|
12
|
+
export declare function resolveReframeCrop(reframe: ClipReframe, sourceMs: number, sourceSize: {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}, targetSize: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
}, track?: MediaTrack): ClipCrop | undefined;
|
|
19
|
+
/** Add or replace one manual keyframe, keeping source-time order. */
|
|
20
|
+
export declare function addReframeKeyframe(reframe: ClipReframe, keyframe: ReframeKeyframe): ClipReframe;
|
|
21
|
+
/** Remove framing state without changing any other editorial property. */
|
|
22
|
+
export declare function clearReframe(clip: TimelineClip): TimelineClip;
|
|
23
|
+
/** Automatic analysis is stale independently of manual correction keyframes. */
|
|
24
|
+
export declare function isReframeStale(clip: Pick<TimelineClip, "currentAssetId" | "reframe">, track?: MediaTrack): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Return framing that is safe to render for the clip's current source.
|
|
27
|
+
* Stale automatic data is ignored, while manual keyframes remain absolute
|
|
28
|
+
* source-space framing points and continue to interpolate around centre.
|
|
29
|
+
*/
|
|
30
|
+
export declare function renderableReframe(clip: Pick<TimelineClip, "currentAssetId" | "reframe">, track?: MediaTrack): ClipReframe | undefined;
|
|
31
|
+
//# sourceMappingURL=reframe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reframe.d.ts","sourceRoot":"","sources":["../src/reframe.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAO3C,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EACX,UAAU,EACV,eAAe,EACf,aAAa,EACb,YAAY,EACb,MAAM,YAAY,CAAC;AAIpB,wFAAwF;AACxF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAOpE;AAyCD,4EAA4E;AAC5E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,EAAE,CAiBtE;AAgFD,sEAAsE;AACtE,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,UAAU,GACjB,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAUlC;AAED,qEAAqE;AACrE,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC7C,UAAU,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC7C,KAAK,CAAC,EAAE,UAAU,GACjB,QAAQ,GAAG,SAAS,CAgDtB;AAED,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