@allyhub/sdk 0.1.0-alpha.8 → 0.2.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +85 -0
- package/client.d.ts +45 -1
- package/dist/anim.js +2 -75
- package/dist/define.d.ts +10 -4
- package/dist/define.js +2 -95
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +2 -457
- package/dist/fit.js +2 -60
- package/dist/free.d.ts +18 -0
- package/dist/free.js +2 -0
- package/dist/index.d.ts +28 -13
- package/dist/index.js +2 -11
- package/dist/input.d.ts +306 -0
- package/dist/input.js +2 -0
- package/dist/media.d.ts +3 -6
- package/dist/media.js +2 -27
- package/dist/messages.d.ts +3 -2
- package/dist/messages.js +2 -2
- package/dist/module.d.ts +24 -0
- package/dist/module.js +2 -0
- package/dist/noise.js +2 -233
- package/dist/parts.d.ts +97 -21
- package/dist/parts.js +2 -414
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +2 -720
- package/dist/phone.d.ts +26 -0
- package/dist/phone.js +2 -0
- package/dist/piece.d.ts +106 -35
- package/dist/piece.js +2 -38
- package/dist/props.d.ts +1 -1
- package/dist/props.js +2 -35
- package/dist/scenery.d.ts +2 -0
- package/dist/scenery.js +2 -0
- package/dist/text.js +2 -38
- package/dist/written.d.ts +12 -0
- package/dist/written.js +2 -0
- package/docs/README.md +18 -0
- package/docs/batches.md +148 -0
- package/docs/contract.md +51 -0
- package/docs/defaults.md +703 -0
- package/docs/docs.md +148 -0
- package/docs/footage.md +249 -0
- package/docs/layers.md +317 -0
- package/docs/modeling.md +143 -0
- package/docs/project.md +265 -0
- package/docs/scenery.md +308 -0
- package/docs/sheets.md +119 -0
- package/docs/slides.md +111 -0
- package/docs/sound.md +170 -0
- package/docs/speech.md +289 -0
- package/docs/video.md +265 -0
- package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
- package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
- package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
- package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
- package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
- package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
- package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
- package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
- package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
- package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
- package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
- package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
- package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
- package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
- package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
- package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
- package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
- package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
- package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
- package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
- package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
- package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
- package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
- package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
- package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
- package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
- package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
- package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
- package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
- package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
- package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
- package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
- package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
- package/node_modules/@allyhub-next/audio/package.json +17 -0
- package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
- package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
- package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
- package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
- package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
- package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
- package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
- package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
- package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
- package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
- package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
- package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
- package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
- package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
- package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
- package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
- package/node_modules/@allyhub-next/formats/package.json +14 -0
- package/node_modules/@allyhub-next/formats/schemas/comments.schema.json +152 -0
- package/node_modules/@allyhub-next/formats/schemas/config.schema.json +43 -0
- package/node_modules/@allyhub-next/formats/schemas/edits.schema.json +112 -0
- package/node_modules/@allyhub-next/formats/schemas/elements.schema.json +33 -0
- package/node_modules/@allyhub-next/formats/schemas/gen.schema.json +97 -0
- package/node_modules/@allyhub-next/formats/schemas/interpretation.schema.json +125 -0
- package/node_modules/@allyhub-next/formats/schemas/items.json +75 -0
- package/node_modules/@allyhub-next/formats/schemas/messages.schema.json +11 -0
- package/node_modules/@allyhub-next/formats/schemas/script.schema.json +162 -0
- package/node_modules/@allyhub-next/formats/schemas/sheet.schema.json +395 -0
- package/node_modules/@allyhub-next/formats/schemas/words.schema.json +63 -0
- package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
- package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
- package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
- package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +272 -0
- package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
- package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
- package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
- package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
- package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
- package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
- package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
- package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
- package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
- package/node_modules/@allyhub-next/protocol/package.json +13 -0
- package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
- package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
- package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
- package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
- package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
- package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
- package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
- package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
- package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
- package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
- package/node_modules/@allyhub-next/runtimes/package.json +14 -0
- package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
- package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
- package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
- package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
- package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
- package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
- package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
- package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
- package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
- package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
- package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
- package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
- package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
- package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
- package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
- package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
- package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
- package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
- package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
- package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
- package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
- package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
- package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
- package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
- package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
- package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
- package/node_modules/@allyhub-next/scenery/package.json +13 -0
- package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
- package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
- package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
- package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
- package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
- package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
- package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
- package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
- package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
- package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
- package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
- package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
- package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
- package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
- package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
- package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
- package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
- package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
- package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
- package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
- package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
- package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
- package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
- package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
- package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
- package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
- package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
- package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
- package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
- package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
- package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
- package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
- package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
- package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
- package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
- package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
- package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
- package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
- package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
- package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
- package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
- package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
- package/node_modules/@allyhub-next/video-core/package.json +14 -0
- package/package.json +52 -41
- package/README.md +0 -17
- package/dist/anim.d.ts.map +0 -1
- package/dist/anim.js.map +0 -1
- package/dist/define.d.ts.map +0 -1
- package/dist/define.js.map +0 -1
- package/dist/dom.d.ts.map +0 -1
- package/dist/dom.js.map +0 -1
- package/dist/fit.d.ts.map +0 -1
- package/dist/fit.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/media.d.ts.map +0 -1
- package/dist/media.js.map +0 -1
- package/dist/messages.d.ts.map +0 -1
- package/dist/messages.js.map +0 -1
- package/dist/noise.d.ts.map +0 -1
- package/dist/noise.js.map +0 -1
- package/dist/parts.d.ts.map +0 -1
- package/dist/parts.js.map +0 -1
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js.map +0 -1
- package/dist/piece.d.ts.map +0 -1
- package/dist/piece.js.map +0 -1
- package/dist/props.d.ts.map +0 -1
- package/dist/props.js.map +0 -1
- package/dist/text.d.ts.map +0 -1
- package/dist/text.js.map +0 -1
- /package/{LICENSE → LICENSE.md} +0 -0
|
@@ -0,0 +1,1146 @@
|
|
|
1
|
+
import type { CaptureOptions } from "./render-types.js";
|
|
2
|
+
import type { Look } from "./look.js";
|
|
3
|
+
import type { MediaInfo, Word } from "./media.js";
|
|
4
|
+
import type { FixedShape, MasterOptions, MixOptions, SoundMoment, SoundShape, VoiceSetting } from "./audio-types.js";
|
|
5
|
+
import type { Format, FormatEntry, SizeInfo } from "./formats.js";
|
|
6
|
+
import type { Combo, Matrix } from "./matrix.js";
|
|
7
|
+
import type { Ease } from "./motion.js";
|
|
8
|
+
import type { MusicStretch, MusicTime } from "./music.js";
|
|
9
|
+
import type { PixelRect } from "./timeline.js";
|
|
10
|
+
import type { TransitionInput } from "./transition.js";
|
|
11
|
+
import type { PagedOutput, PagedPiece } from "./slides.js";
|
|
12
|
+
/** Marks a piece made by video() or slides(). */
|
|
13
|
+
export declare const PIECE_BRAND = "__allyhubPiece";
|
|
14
|
+
/** Marks a part made by part(), so the runtime can tell parts from other values. */
|
|
15
|
+
export declare const PART_BRAND = "__allyhubPart";
|
|
16
|
+
/** Marks a layer made by footage(), a component or custom(). */
|
|
17
|
+
export declare const LAYER_BRAND = "__allyhubLayer";
|
|
18
|
+
/** Marks a speech source made by take() or say(). */
|
|
19
|
+
export declare const SPEECH_BRAND = "__allyhubSpeech";
|
|
20
|
+
/** Marks a media value (an import or ctx.asset), whose url the runtime resolves. */
|
|
21
|
+
export declare const MEDIA_BRAND = "__allyhubMedia";
|
|
22
|
+
/** The two output kinds: videos and paged outputs (decks, images, PDFs). */
|
|
23
|
+
export declare const OUTPUT_KINDS: readonly ["video", "paged"];
|
|
24
|
+
export type OutputKind = (typeof OUTPUT_KINDS)[number];
|
|
25
|
+
/**
|
|
26
|
+
* A moment in a part: a word of its speech ("inbox"), the nth time it is
|
|
27
|
+
* said ("inbox@2"), shifted by seconds ("inbox+0.2", "inbox@2-0.3"), or
|
|
28
|
+
* seconds from the part's start (a number, or a string that is only one).
|
|
29
|
+
*/
|
|
30
|
+
export type WordRef = string | number;
|
|
31
|
+
export interface MessageHint {
|
|
32
|
+
/** Length budget in characters; a hint for whoever writes the text. */
|
|
33
|
+
max?: number;
|
|
34
|
+
/** A note for whoever edits the text. */
|
|
35
|
+
note?: string;
|
|
36
|
+
}
|
|
37
|
+
/** ctx.s: the current language's text. */
|
|
38
|
+
export interface MessageReader {
|
|
39
|
+
(key: string, hint?: MessageHint): string;
|
|
40
|
+
/**
|
|
41
|
+
* Numbered keys under a prefix, in order: `x.0`, `x.1`… Deeper keys make
|
|
42
|
+
* objects (`x.0.name`) and nested lists. What each item is, the SDK's
|
|
43
|
+
* reader types from the project's messages; here it is not known.
|
|
44
|
+
*/
|
|
45
|
+
list(prefix: string, hint?: MessageHint): unknown[];
|
|
46
|
+
/** The text with its {name} variables filled in. */
|
|
47
|
+
with(key: string, inputs: Readonly<Record<string, string | number>>, hint?: MessageHint): string;
|
|
48
|
+
}
|
|
49
|
+
/** What every output's build function receives. */
|
|
50
|
+
export interface PieceContext {
|
|
51
|
+
/**
|
|
52
|
+
* This combo: one value per dimension and, when the piece has slots, its
|
|
53
|
+
* structure (when it declares structures) and one candidate per slot of
|
|
54
|
+
* it, e.g. { lang: "en", hook: "price", demo: "inbox" }.
|
|
55
|
+
*/
|
|
56
|
+
combo: Combo;
|
|
57
|
+
/**
|
|
58
|
+
* The file a pool slot picked in this combo (`slots: { demo: { pool:
|
|
59
|
+
* "./pool/demos" } }`), as a path footage() and ctx.asset() take.
|
|
60
|
+
*/
|
|
61
|
+
pool(slot: string): string;
|
|
62
|
+
s: MessageReader;
|
|
63
|
+
/** Media at a path relative to the piece's file (dynamic paths; fixed ones are imports). */
|
|
64
|
+
asset(path: string): MediaInfo;
|
|
65
|
+
/**
|
|
66
|
+
* A data file (CSV rows, YAML, JSON) at a path relative to the piece's
|
|
67
|
+
* file: for dynamic paths; fixed ones are imports. Recorded in reads().
|
|
68
|
+
* Cast it to the shape you expect: `ctx.data(path) as Plan[]`.
|
|
69
|
+
*/
|
|
70
|
+
data(path: string): unknown;
|
|
71
|
+
look: Look;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A sound effect a part plays (`part({ sounds })`). Nothing plays unless
|
|
75
|
+
* it is placed here.
|
|
76
|
+
*/
|
|
77
|
+
export interface SoundSpec {
|
|
78
|
+
/**
|
|
79
|
+
* When it hits: a word reference or seconds from the part's start. A
|
|
80
|
+
* built-in sound's transient lands there; a file starts there.
|
|
81
|
+
*/
|
|
82
|
+
at: WordRef;
|
|
83
|
+
/**
|
|
84
|
+
* A name from the look's sounds (`look.sfx`, plus the built-in
|
|
85
|
+
* synthesized "whoosh", "tick" and "pop"), or an audio file: an import
|
|
86
|
+
* or a path relative to the piece.
|
|
87
|
+
*/
|
|
88
|
+
sound: MediaRef;
|
|
89
|
+
/** Its gain in dB, over the mix's sound-effect level; default 0. */
|
|
90
|
+
gainDb?: number;
|
|
91
|
+
/**
|
|
92
|
+
* How it is shaped before it is levelled: an ffmpeg `filter` chain run
|
|
93
|
+
* on its file, equalizer bands (`eq`) and a `compress`or (SoundShape);
|
|
94
|
+
* none by default.
|
|
95
|
+
*/
|
|
96
|
+
shape?: FixedShape;
|
|
97
|
+
/** A note for people: what it marks (the timeline prints it). */
|
|
98
|
+
what?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* A part's own anchors (`part({ anchors })`): each name a point, or a
|
|
102
|
+
* stretch [from, to], in seconds from the part's start.
|
|
103
|
+
*/
|
|
104
|
+
export type PartAnchors = Readonly<Record<string, number | readonly [from: number, to: number]>>;
|
|
105
|
+
/** What is wrong with a part's own anchors, or nothing. */
|
|
106
|
+
export declare function partAnchorsProblem(anchors: unknown): string | undefined;
|
|
107
|
+
/** A part's own anchors as a list: a point's `at`, a stretch's `at` and `end`. */
|
|
108
|
+
export declare function partAnchorList(anchors: PartAnchors | undefined): {
|
|
109
|
+
name: string;
|
|
110
|
+
at: number;
|
|
111
|
+
end?: number;
|
|
112
|
+
}[];
|
|
113
|
+
/**
|
|
114
|
+
* Where an outer video shows a video item: its film seconds from `from`
|
|
115
|
+
* to `to` play in the outer's part `part`, from the outer's film time
|
|
116
|
+
* `start`, the part starting at `partStart`.
|
|
117
|
+
*/
|
|
118
|
+
export interface ShownIn {
|
|
119
|
+
from: number;
|
|
120
|
+
to: number;
|
|
121
|
+
part: string;
|
|
122
|
+
start: number;
|
|
123
|
+
partStart: number;
|
|
124
|
+
/** Its seconds per outer second; default 1. */
|
|
125
|
+
speed?: number;
|
|
126
|
+
}
|
|
127
|
+
/** What mount and render receive besides the element and props. */
|
|
128
|
+
/** A video drawn inside a layer (StageContext.video). */
|
|
129
|
+
export interface EmbeddedVideo {
|
|
130
|
+
/** Its piece's id. */
|
|
131
|
+
id: string;
|
|
132
|
+
/** Seconds. */
|
|
133
|
+
duration: number;
|
|
134
|
+
/** The pixels it is drawn in. */
|
|
135
|
+
width: number;
|
|
136
|
+
height: number;
|
|
137
|
+
/** Draws its moment t (seconds from its start), settled when it returns; `layout`: for its layout alone. */
|
|
138
|
+
seek(t: number, layout?: boolean): Promise<void>;
|
|
139
|
+
/** Its moment by a reference of its own (an anchor, "@click", or a part's key), in its seconds (momentOf). */
|
|
140
|
+
at(ref: string): number;
|
|
141
|
+
}
|
|
142
|
+
export interface StageContext {
|
|
143
|
+
look: Look;
|
|
144
|
+
/** The format being drawn, e.g. "9x16"; a paged output's may be "a4", "letter" or "1200x630". */
|
|
145
|
+
format: Format;
|
|
146
|
+
/** Its pixels, orientation and platform safe zone. */
|
|
147
|
+
dims: SizeInfo;
|
|
148
|
+
/**
|
|
149
|
+
* The combo. A layer may read the dimensions and its own part's slot,
|
|
150
|
+
* never another slot's pick (AK-X005): a part is rendered once and
|
|
151
|
+
* reused in every combo that has it.
|
|
152
|
+
*/
|
|
153
|
+
combo: Combo;
|
|
154
|
+
/** The part's length in seconds. */
|
|
155
|
+
dur: number;
|
|
156
|
+
asset(path: string): MediaInfo;
|
|
157
|
+
/**
|
|
158
|
+
* A project file that may not be there (a scenery's bake): its media when
|
|
159
|
+
* it is, undefined when not, with no problem either way. The read is
|
|
160
|
+
* recorded, so the part is drawn again once the file is made.
|
|
161
|
+
*/
|
|
162
|
+
optionalAsset?(path: string): MediaInfo | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* The part's words on its own clock (seconds from the part's start), for
|
|
165
|
+
* captions and karaoke-style layers; empty when the part has no speech.
|
|
166
|
+
*/
|
|
167
|
+
words(): readonly Word[];
|
|
168
|
+
/** Seconds from the part's start of a word reference. */
|
|
169
|
+
at(ref: WordRef): number;
|
|
170
|
+
/** This layer's own window, in seconds from the part's start. */
|
|
171
|
+
layer: {
|
|
172
|
+
start: number;
|
|
173
|
+
end: number;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Work this layer must finish before anything is drawn, such as a 3D
|
|
177
|
+
* scenery building: the runtime awaits it before the output is ready and
|
|
178
|
+
* before a frame is drawn, whatever the moment. A rejection is reported
|
|
179
|
+
* with the layer, its part and the moment (an error carrying a rule
|
|
180
|
+
* `code`, such as AK-W001, under that rule; else AK-R001); work that
|
|
181
|
+
* does not settle within the piece's seekLimit is AK-P003.
|
|
182
|
+
*/
|
|
183
|
+
wait(work: Promise<unknown>): void;
|
|
184
|
+
/**
|
|
185
|
+
* Reports what went wrong drawing this layer, at any moment (a 3D
|
|
186
|
+
* scenery's shader that does not compile, a screen it cannot draw): the
|
|
187
|
+
* output's problems carry it, with the layer's part, and every command
|
|
188
|
+
* prints it. `code` is a rule's (AK-W006); a code that is not one is
|
|
189
|
+
* AK-R001.
|
|
190
|
+
*/
|
|
191
|
+
report?(p: {
|
|
192
|
+
code: string;
|
|
193
|
+
message: string;
|
|
194
|
+
level?: "error" | "warn";
|
|
195
|
+
}): void;
|
|
196
|
+
/**
|
|
197
|
+
* The caption cues shown in this part, on its own clock (seconds from
|
|
198
|
+
* the part's start), each with its words: built from the speech heard
|
|
199
|
+
* during the part's picture, spelled as the script when there is one.
|
|
200
|
+
* `maxChars` (default 32, 16 for Chinese, Japanese and Korean) and
|
|
201
|
+
* `maxWords` (default none) cap a cue; `keep` lists phrases a cue never
|
|
202
|
+
* breaks inside; a cue never spans two parts.
|
|
203
|
+
* Empty when nothing is said during the part.
|
|
204
|
+
*/
|
|
205
|
+
captions(opts?: CaptionOptions): readonly CaptionTrackCue[];
|
|
206
|
+
/**
|
|
207
|
+
* Where a face is at part time t, in the frame's pixels: from the face
|
|
208
|
+
* track of the topmost footage showing then that has one (check and
|
|
209
|
+
* render make it). Face `id` of that track; by default that layer's speaker
|
|
210
|
+
* (its `speaker` option, else the track's default speaker). Undefined
|
|
211
|
+
* when no footage with a face track shows, or that face is not seen then.
|
|
212
|
+
*/
|
|
213
|
+
face(t: number, id?: number): PixelRect | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* Every face at part time t with its id and box, in the frame's pixels:
|
|
216
|
+
* from the face track of the topmost footage showing then that has one.
|
|
217
|
+
* Empty when there is none.
|
|
218
|
+
*/
|
|
219
|
+
faces(t: number): readonly FaceOnFrame[];
|
|
220
|
+
/**
|
|
221
|
+
* The text of the part's layers listed before this one at part time t:
|
|
222
|
+
* each block of text (a line, a paragraph) as that layer draws it then,
|
|
223
|
+
* in the frame's pixels. Layers not showing at t give none. Measures by
|
|
224
|
+
* drawing those layers at t, so call it in mount (list a layer after
|
|
225
|
+
* the ones it should see).
|
|
226
|
+
*/
|
|
227
|
+
texts(t: number): readonly TextBox[];
|
|
228
|
+
/**
|
|
229
|
+
* The areas the format's platform interface covers, in the frame's
|
|
230
|
+
* pixels: a strip per covered edge (none for a custom format).
|
|
231
|
+
*/
|
|
232
|
+
covered: readonly PixelRect[];
|
|
233
|
+
/**
|
|
234
|
+
* The content box, [x, y, w, h] in the frame's pixels: clear of the
|
|
235
|
+
* covered areas with a gap, and at least a margin from every side. The
|
|
236
|
+
* same box layout(ctx) gives as left, top, right and bottom with its
|
|
237
|
+
* default options (see contentEdges for how it is computed).
|
|
238
|
+
*/
|
|
239
|
+
content: PixelRect;
|
|
240
|
+
/**
|
|
241
|
+
* The output this layer is in, on its film clock: the part's start, and
|
|
242
|
+
* the film seconds of a reference anywhere in the output (an anchor of
|
|
243
|
+
* any part, "@turn", or a part's key). Reading it makes the part's
|
|
244
|
+
* place in the film part of its identity.
|
|
245
|
+
*/
|
|
246
|
+
readonly film?: {
|
|
247
|
+
readonly start: number;
|
|
248
|
+
/** The part's key. */
|
|
249
|
+
readonly part: string;
|
|
250
|
+
at(ref: string): number;
|
|
251
|
+
/** Where an outer video shows this one (a part's video take, a footage of it); absent at the top. */
|
|
252
|
+
readonly outer?: ShownIn;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* The camera an outer video asks a scenery layer of this name to be drawn
|
|
256
|
+
* from (footage({ camera }) of a video item); undefined: its own.
|
|
257
|
+
*/
|
|
258
|
+
cameraFor?(name: string): unknown;
|
|
259
|
+
/** The drawing scale an outer video asks scenery layers for (footage({ quality })); undefined: their own. */
|
|
260
|
+
readonly sceneryScale?: number;
|
|
261
|
+
/** True in a video drawn inside another (a screen, a part's video take, a footage of a video item). */
|
|
262
|
+
readonly embedded?: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* True while the runtime draws a moment only to measure its layout (the
|
|
265
|
+
* check's text and box measurements, ctx.texts): nothing reads this
|
|
266
|
+
* frame's pixels. A layer that paints a canvas no layout depends on (a
|
|
267
|
+
* 3D scenery) may skip painting then; whatever it places in the DOM it
|
|
268
|
+
* still places. False for every frame that is shown or captured.
|
|
269
|
+
*/
|
|
270
|
+
readonly layoutOnly?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Another video of the project, drawn in an element of this layer's (a
|
|
273
|
+
* scenery's screen): the piece this one imported (`import demo from
|
|
274
|
+
* "../demo/video"`), in its own format, in this video's language where
|
|
275
|
+
* it has it. Its parts, speech, anchors and components are its own; it
|
|
276
|
+
* draws its graphic layers over its background (no footage yet), and
|
|
277
|
+
* what it reads counts as this video's. Absent where the host cannot
|
|
278
|
+
* embed.
|
|
279
|
+
*/
|
|
280
|
+
video?(piece: unknown, el: HTMLElement): Promise<EmbeddedVideo>;
|
|
281
|
+
/**
|
|
282
|
+
* Answers a question the host asks every layer of the output by name
|
|
283
|
+
* (`LoadedOutput.ask`): a scenery's cuts, the world times of references,
|
|
284
|
+
* its facts. A layer answers only the questions it registers; the host
|
|
285
|
+
* gets each answer with the layer and part it came from. Absent where
|
|
286
|
+
* the host asks nothing.
|
|
287
|
+
*/
|
|
288
|
+
answer?<K extends keyof LayerQueries>(name: K, handler: (args: LayerQueries[K]["args"]) => LayerQueries[K]["answer"] | Promise<LayerQueries[K]["answer"]>): void;
|
|
289
|
+
/**
|
|
290
|
+
* The page's real clock and timers, which the runtime replaces with the
|
|
291
|
+
* moment's for piece code: for work that must wait on the wall clock (a
|
|
292
|
+
* scenery's model loaders, a decoder's worker), never for what a frame
|
|
293
|
+
* shows.
|
|
294
|
+
*/
|
|
295
|
+
readonly realTimers?: RealTimers;
|
|
296
|
+
}
|
|
297
|
+
/** The page's own clock and timers (StageContext.realTimers). */
|
|
298
|
+
export interface RealTimers {
|
|
299
|
+
now(): number;
|
|
300
|
+
setTimeout(callback: () => void, ms: number): unknown;
|
|
301
|
+
clearTimeout(id: unknown): void;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* The questions a layer may answer (StageContext.answer), by name: each
|
|
305
|
+
* its arguments and its answer. Empty here: a package that draws a kind of
|
|
306
|
+
* layer adds its own by declaration merging, e.g.
|
|
307
|
+
*
|
|
308
|
+
* declare module "@allyhub-next/video-core" {
|
|
309
|
+
* interface LayerQueries { "scenery.cuts": { args: undefined; answer: readonly number[] } }
|
|
310
|
+
* }
|
|
311
|
+
*/
|
|
312
|
+
export interface LayerQueries {
|
|
313
|
+
}
|
|
314
|
+
/** An answer to a question, with where it came from (LoadedOutput.ask). */
|
|
315
|
+
export interface LayerAnswer<A> {
|
|
316
|
+
part: string;
|
|
317
|
+
/** The layer's component name, and its index in the part. */
|
|
318
|
+
layer: string;
|
|
319
|
+
index: number;
|
|
320
|
+
answer: A;
|
|
321
|
+
}
|
|
322
|
+
/** A face on the frame (StageContext.faces): its id in the face track, and its box in the frame's pixels. */
|
|
323
|
+
export interface FaceOnFrame {
|
|
324
|
+
id: number;
|
|
325
|
+
box: PixelRect;
|
|
326
|
+
}
|
|
327
|
+
/** A block of another layer's text at a moment (StageContext.texts). */
|
|
328
|
+
export interface TextBox {
|
|
329
|
+
/** The layer's component name. */
|
|
330
|
+
layer: string;
|
|
331
|
+
/** The text. */
|
|
332
|
+
text: string;
|
|
333
|
+
/** Where it is, in the frame's pixels. */
|
|
334
|
+
box: PixelRect;
|
|
335
|
+
}
|
|
336
|
+
/** How a captions layer wants its cues cut (StageContext.captions). */
|
|
337
|
+
export interface CaptionOptions {
|
|
338
|
+
/** Most characters in a cue; default 32 (16 for Chinese, Japanese and Korean). */
|
|
339
|
+
maxChars?: number;
|
|
340
|
+
/** Most words in a cue; default no limit. */
|
|
341
|
+
maxWords?: number;
|
|
342
|
+
/**
|
|
343
|
+
* Phrases a cue never breaks inside (["work harder"]), matched as said
|
|
344
|
+
* (case, accents and punctuation ignored, whole words): the cue around
|
|
345
|
+
* one may run over maxChars or maxWords.
|
|
346
|
+
*/
|
|
347
|
+
keep?: readonly string[];
|
|
348
|
+
/**
|
|
349
|
+
* Seconds: a gap between two cues of a part shorter than this closes,
|
|
350
|
+
* the first held until the next (no flicker); default 0.4.
|
|
351
|
+
*/
|
|
352
|
+
close?: number;
|
|
353
|
+
/**
|
|
354
|
+
* The part's first cue from the part's start and its last to its end,
|
|
355
|
+
* so a caption shows across the part's whole picture and a cut leaves
|
|
356
|
+
* no frame without one; default false (from the first word to the last).
|
|
357
|
+
*/
|
|
358
|
+
edges?: boolean;
|
|
359
|
+
}
|
|
360
|
+
/** A word of a caption cue, as the script spells it, on the part's clock. */
|
|
361
|
+
export interface CaptionWord {
|
|
362
|
+
text: string;
|
|
363
|
+
start: number;
|
|
364
|
+
end: number;
|
|
365
|
+
}
|
|
366
|
+
/** A caption cue on the part's clock, with its words. */
|
|
367
|
+
export interface CaptionTrackCue {
|
|
368
|
+
start: number;
|
|
369
|
+
end: number;
|
|
370
|
+
text: string;
|
|
371
|
+
words: CaptionWord[];
|
|
372
|
+
}
|
|
373
|
+
/** Media named by a path relative to the piece's file, or an imported media value. */
|
|
374
|
+
export type MediaRef = string | MediaInfo;
|
|
375
|
+
/** A stretch of a recording (audio or video) and its words. */
|
|
376
|
+
export interface TakeSpeech {
|
|
377
|
+
[SPEECH_BRAND]: true;
|
|
378
|
+
kind: "take";
|
|
379
|
+
file: MediaRef;
|
|
380
|
+
/** The folder of the module that named `file` (a path), a project path ("" the root): it is relative to that. */
|
|
381
|
+
fileBase?: string;
|
|
382
|
+
/** The first words of the stretch (range). */
|
|
383
|
+
from?: string;
|
|
384
|
+
/** Its last words (range). */
|
|
385
|
+
to?: string;
|
|
386
|
+
/** The line the stretch says (saying). */
|
|
387
|
+
line?: string;
|
|
388
|
+
/**
|
|
389
|
+
* A cut list: a JSON file (`edits/<name>.json`, relative to the file
|
|
390
|
+
* that named it, editsBase) of removed word ranges, removed sounds and
|
|
391
|
+
* the longest pause kept.
|
|
392
|
+
*/
|
|
393
|
+
editsFile?: string;
|
|
394
|
+
/** The folder of the module that named `editsFile`, a project path ("" the root): it is relative to that. */
|
|
395
|
+
editsBase?: string;
|
|
396
|
+
/** Noise reduction of its sound in dB (ffmpeg afftdn); absent: none. */
|
|
397
|
+
denoiseDb?: number;
|
|
398
|
+
/**
|
|
399
|
+
* How many times as fast it plays, pitch kept (take().speed()): 1.1 is
|
|
400
|
+
* 10 % faster, its words and the part with them (SPEECH_SPEED, 0.5 to
|
|
401
|
+
* 2); absent: as recorded.
|
|
402
|
+
*/
|
|
403
|
+
tempo?: number;
|
|
404
|
+
/**
|
|
405
|
+
* The room tone that fills a part's lead and tail where the take has no
|
|
406
|
+
* silence of its own around the part's words: false for none (digital
|
|
407
|
+
* silence), or how to fill (take().roomTone()).
|
|
408
|
+
*/
|
|
409
|
+
room?: false | RoomTone;
|
|
410
|
+
}
|
|
411
|
+
/** How a take's room tone fills a part's lead and tail. Every field has a default. */
|
|
412
|
+
export interface RoomTone {
|
|
413
|
+
/**
|
|
414
|
+
* The stretch of the file to use, seconds (both, or neither); default
|
|
415
|
+
* the quietest steady stretch the build measured.
|
|
416
|
+
*/
|
|
417
|
+
from?: number;
|
|
418
|
+
to?: number;
|
|
419
|
+
/**
|
|
420
|
+
* Whether each fill's level is matched to the floor of the take's kept
|
|
421
|
+
* sound beside the join it meets (default true). False plays it as
|
|
422
|
+
* recorded.
|
|
423
|
+
*/
|
|
424
|
+
match?: boolean;
|
|
425
|
+
/** A gain for every fill, dB, instead of the matched one. */
|
|
426
|
+
gainDb?: number;
|
|
427
|
+
/** The most a matched gain raises or lowers a fill, dB (default ROOM_MATCH.limitDb, 6). */
|
|
428
|
+
limitDb?: number;
|
|
429
|
+
/** Seconds a fill and the take cross-fade over at the join (default ROOM_MATCH.fade, 0.04). */
|
|
430
|
+
fade?: number;
|
|
431
|
+
}
|
|
432
|
+
/** Text to speech, from the file `allyhub voice` makes for it. */
|
|
433
|
+
export interface SaySpeech {
|
|
434
|
+
[SPEECH_BRAND]: true;
|
|
435
|
+
kind: "say";
|
|
436
|
+
text: string;
|
|
437
|
+
/** The voice tool's voice id. */
|
|
438
|
+
voice?: string;
|
|
439
|
+
/** The voice tool; default tts-elevenlabs-multilingual-v2. */
|
|
440
|
+
tool?: string;
|
|
441
|
+
/**
|
|
442
|
+
* More input for the voice tool (plain JSON), passed with the text and
|
|
443
|
+
* voice; the tool's schema says which it takes.
|
|
444
|
+
*/
|
|
445
|
+
params?: Record<string, unknown>;
|
|
446
|
+
/**
|
|
447
|
+
* How many times as fast the file plays, pitch kept (say's speed,
|
|
448
|
+
* SPEECH_SPEED, 0.5 to 2); absent: as the tool made it. AllyHub's, not
|
|
449
|
+
* the voice tool's: the same file.
|
|
450
|
+
*/
|
|
451
|
+
tempo?: number;
|
|
452
|
+
}
|
|
453
|
+
/** The speeds a take or a say plays at: ffmpeg's atempo keeps a voice's pitch well in this range. */
|
|
454
|
+
export declare const SPEECH_SPEED: {
|
|
455
|
+
readonly min: 0.5;
|
|
456
|
+
readonly max: 2;
|
|
457
|
+
};
|
|
458
|
+
/** Why a speech speed cannot be played; undefined when it can. */
|
|
459
|
+
export declare function speechSpeedProblem(v: unknown): string | undefined;
|
|
460
|
+
/**
|
|
461
|
+
* A stretch of another video item of the project, a source with a clock
|
|
462
|
+
* of its own (take(piece).range(from, to)): the part lasts the stretch,
|
|
463
|
+
* hears its sound and says its words; `footage()` without a file draws
|
|
464
|
+
* its picture, in sync.
|
|
465
|
+
*/
|
|
466
|
+
export interface VideoSpeech {
|
|
467
|
+
[SPEECH_BRAND]: true;
|
|
468
|
+
kind: "video";
|
|
469
|
+
/** The imported piece. It is drawn in the part's frame, whatever its own format. */
|
|
470
|
+
piece: PieceDefinition;
|
|
471
|
+
/** Where the stretch starts and ends: seconds of its clock, an anchor ("@turn", "@/turn", "@turn+0.2") or a part's key. Default its start and its end. */
|
|
472
|
+
from?: number | string;
|
|
473
|
+
to?: number | string;
|
|
474
|
+
}
|
|
475
|
+
/** Where a part's speech comes from. */
|
|
476
|
+
export type SpeechSpec = TakeSpeech | SaySpeech | VideoSpeech;
|
|
477
|
+
export declare function isSpeechSpec(v: unknown): v is SpeechSpec;
|
|
478
|
+
/** When a layer starts and stops in its part. Default: the whole part. */
|
|
479
|
+
export interface LayerTiming {
|
|
480
|
+
/** A word reference or seconds from the part's start; default 0. */
|
|
481
|
+
at?: WordRef;
|
|
482
|
+
/** A word reference or seconds from the part's start; default the part's end. */
|
|
483
|
+
until?: WordRef;
|
|
484
|
+
/** Seconds from `at`, when there is no `until`. */
|
|
485
|
+
dur?: number;
|
|
486
|
+
}
|
|
487
|
+
/** A rectangle as fractions of the frame (or of a source picture): x, y, width, height, each 0 to 1. */
|
|
488
|
+
export type Rect = [x: number, y: number, w: number, h: number];
|
|
489
|
+
/** A keyframe of a footage layer's box: when (a word reference or seconds), where, and the easing of the move into it. */
|
|
490
|
+
/**
|
|
491
|
+
* A value per frame shape: the one named for the output's orientation
|
|
492
|
+
* ("landscape", "portrait" or "square"), else `default`; with neither,
|
|
493
|
+
* the option is left unset in that output.
|
|
494
|
+
*/
|
|
495
|
+
export interface PerOrient<T> {
|
|
496
|
+
landscape?: T;
|
|
497
|
+
portrait?: T;
|
|
498
|
+
square?: T;
|
|
499
|
+
default?: T;
|
|
500
|
+
}
|
|
501
|
+
/** The frame shapes a PerOrient names, and its fallback. */
|
|
502
|
+
export declare const ORIENT_KEYS: readonly ["landscape", "portrait", "square", "default"];
|
|
503
|
+
/** A PerOrient, as against the value itself (which is never a plain object). */
|
|
504
|
+
export declare function isPerOrient<T>(v: T | PerOrient<T> | undefined): v is PerOrient<T>;
|
|
505
|
+
/** The value for an orientation: a PerOrient's entry for it (else its default), or the value itself. */
|
|
506
|
+
export declare function forOrient<T>(v: T | PerOrient<T> | undefined, orient: "landscape" | "portrait" | "square"): T | undefined;
|
|
507
|
+
export interface BoxKey {
|
|
508
|
+
t: WordRef;
|
|
509
|
+
box: Rect | "full";
|
|
510
|
+
ease?: Ease;
|
|
511
|
+
}
|
|
512
|
+
/** A punch-in: zoom in on a word (or from `at` until `until`), by `scale` (default 1.12). */
|
|
513
|
+
export interface PunchIn {
|
|
514
|
+
at: WordRef;
|
|
515
|
+
until?: WordRef;
|
|
516
|
+
scale?: number;
|
|
517
|
+
/** Seconds it takes to come in, centred on `at`; default 0.2. */
|
|
518
|
+
in?: number;
|
|
519
|
+
/** Seconds it takes to go out after the word (or `until`); default 0.25. */
|
|
520
|
+
out?: number;
|
|
521
|
+
/** The easing of its moves; default "in-out". */
|
|
522
|
+
ease?: Ease;
|
|
523
|
+
/**
|
|
524
|
+
* The point it zooms about, as fractions of the box; default the
|
|
525
|
+
* layer's speaker's face, else { x: 0.5, y: 0.42 }.
|
|
526
|
+
*/
|
|
527
|
+
center?: {
|
|
528
|
+
x: number;
|
|
529
|
+
y: number;
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
/** A pullback's options (FootageOptions.pullback). */
|
|
533
|
+
export interface Pullback {
|
|
534
|
+
/** How far in it starts; default 1.12. */
|
|
535
|
+
scale?: number;
|
|
536
|
+
/** Seconds back to the whole picture; default 0.6. */
|
|
537
|
+
dur?: number;
|
|
538
|
+
/** The easing of the move; default "out". */
|
|
539
|
+
ease?: Ease;
|
|
540
|
+
/**
|
|
541
|
+
* The point it zooms about, as fractions of the box; default the
|
|
542
|
+
* layer's speaker's face, else { x: 0.5, y: 0.42 }.
|
|
543
|
+
*/
|
|
544
|
+
center?: {
|
|
545
|
+
x: number;
|
|
546
|
+
y: number;
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Where a reframed picture is centred: on the face track ("face", or
|
|
551
|
+
* { face: true, faceY } to place the face's centre at faceY of the crop's
|
|
552
|
+
* height, default 0.4), the centre, or a point (fractions of the source).
|
|
553
|
+
*/
|
|
554
|
+
export type Reframe = "face" | {
|
|
555
|
+
face: true;
|
|
556
|
+
faceY?: number;
|
|
557
|
+
} | "center" | {
|
|
558
|
+
x: number;
|
|
559
|
+
y: number;
|
|
560
|
+
};
|
|
561
|
+
/**
|
|
562
|
+
* What a footage layer does to its picture behind the person
|
|
563
|
+
* (FootageOptions.background). Lengths are px at 1080p: they scale with
|
|
564
|
+
* the format's shorter side.
|
|
565
|
+
*/
|
|
566
|
+
export interface FootageBackground {
|
|
567
|
+
/** Blurs the background: the Gaussian blur's standard deviation (CSS `blur()`'s length), px at 1080p. */
|
|
568
|
+
blur?: number;
|
|
569
|
+
/** Darkens the background: 0 (as it is) to 1 (black). */
|
|
570
|
+
dim?: number;
|
|
571
|
+
/** Takes the colour out of the background: 0 (as it is) to 1 (gray). */
|
|
572
|
+
desaturate?: number;
|
|
573
|
+
/**
|
|
574
|
+
* A flat colour instead of the background: any CSS colour.
|
|
575
|
+
* "transparent" leaves the person alone, over whatever is under the
|
|
576
|
+
* layer (in a transparent video, over nothing).
|
|
577
|
+
*/
|
|
578
|
+
color?: string;
|
|
579
|
+
/**
|
|
580
|
+
* An image instead of the background (PNG, JPEG or WebP), filling the
|
|
581
|
+
* layer's box (cover); `blur`, `dim` and `desaturate` then treat the image.
|
|
582
|
+
*/
|
|
583
|
+
image?: MediaRef;
|
|
584
|
+
/** The softness of the person's edge, px at 1080p; default 2 (MATTE_FEATHER). */
|
|
585
|
+
feather?: number;
|
|
586
|
+
/**
|
|
587
|
+
* How far the person's edge is pulled in, px at 1080p (negative lets it
|
|
588
|
+
* out); default 4 (MATTE_SHRINK). More hides a rim of the old
|
|
589
|
+
* background round the person; less keeps thin hair and fingers.
|
|
590
|
+
*/
|
|
591
|
+
shrink?: number;
|
|
592
|
+
}
|
|
593
|
+
/** Where a footage layer shows: the full frame, a rectangle of it, or keyframes of rectangles. */
|
|
594
|
+
export type FootageBox = Rect | "full" | BoxKey[];
|
|
595
|
+
export interface FootageOptions extends LayerTiming {
|
|
596
|
+
/**
|
|
597
|
+
* Seconds into the file at the layer's start; a take's own footage
|
|
598
|
+
* follows its speech instead. For a video item, its own moment: seconds
|
|
599
|
+
* of its clock, an anchor or a part's key.
|
|
600
|
+
*/
|
|
601
|
+
from?: number | string;
|
|
602
|
+
/**
|
|
603
|
+
* The camera a video item's scenery layers are drawn from, instead of
|
|
604
|
+
* their own: any camera a scenery layer takes (a state, a name, a move), on
|
|
605
|
+
* the item's clock. For the part's video take, or a video footage shows.
|
|
606
|
+
*/
|
|
607
|
+
camera?: unknown;
|
|
608
|
+
/** Per scenery layer of the video item, by its name: when it has several. */
|
|
609
|
+
cameras?: Readonly<Record<string, unknown>>;
|
|
610
|
+
/**
|
|
611
|
+
* How finely a video item's scenery layers are drawn here, in place of
|
|
612
|
+
* their own `quality`: `scale` as scenery()'s (0.5 the fastest, 1 every
|
|
613
|
+
* pixel). Each film decides for itself, the item unchanged.
|
|
614
|
+
*/
|
|
615
|
+
quality?: {
|
|
616
|
+
scale?: number;
|
|
617
|
+
};
|
|
618
|
+
/** Playback speed: 2 plays twice as fast, 0.5 half as fast; default 1. Its sound follows (pitch too). */
|
|
619
|
+
speed?: number;
|
|
620
|
+
/** Its sound's gain, in dB; default 0. */
|
|
621
|
+
gainDb?: number;
|
|
622
|
+
/** Mix its sound in; default false (a take's own footage sounds as its speech). */
|
|
623
|
+
audio?: boolean;
|
|
624
|
+
/**
|
|
625
|
+
* Where it shows: the full frame (default), a rectangle of it, or
|
|
626
|
+
* keyframes of rectangles (the picture moves and scales with its box).
|
|
627
|
+
* Per frame shape as { landscape, portrait, square, default }: each
|
|
628
|
+
* output takes the one for its orientation, so one piece places its
|
|
629
|
+
* footage differently in 16:9 and 9:16.
|
|
630
|
+
*/
|
|
631
|
+
box?: FootageBox | PerOrient<FootageBox>;
|
|
632
|
+
/** How the picture fills its box; default "cover". */
|
|
633
|
+
fit?: "cover" | "contain";
|
|
634
|
+
/**
|
|
635
|
+
* A part of the source picture (fractions of it), which is then fitted
|
|
636
|
+
* to the box. Per frame shape as { landscape, portrait, square, default }.
|
|
637
|
+
*/
|
|
638
|
+
crop?: Rect | PerOrient<Rect>;
|
|
639
|
+
/**
|
|
640
|
+
* Crops the source to the box's shape around the face ("face", from the
|
|
641
|
+
* face track, which check and render make; { face: true, faceY } places the
|
|
642
|
+
* face's centre at faceY of the crop's height, default 0.4), its centre,
|
|
643
|
+
* or a point; a smoothed path, so a 16:9 take fills a 9:16 frame around
|
|
644
|
+
* the speaker. Without a face then it centres on { x: 0.5, y: 0.4 } of
|
|
645
|
+
* the source.
|
|
646
|
+
*/
|
|
647
|
+
reframe?: Reframe;
|
|
648
|
+
/**
|
|
649
|
+
* The face this layer follows: its id in the file's face track (allyhub
|
|
650
|
+
* index lists them). Default: the track's default speaker. Reframe
|
|
651
|
+
* "face", punch-ins, the pullback and ctx.face read it.
|
|
652
|
+
*/
|
|
653
|
+
speaker?: number;
|
|
654
|
+
/**
|
|
655
|
+
* Zooms in on words: "word" (1.12×), "word@1.15" (a decimal after @ is
|
|
656
|
+
* the scale; "word@2" is still the second "word"), or
|
|
657
|
+
* { at, until, scale, in, out, ease, center }. Eased in over 0.2 s, held
|
|
658
|
+
* for the word, eased out over 0.25 s; about the speaker's face when
|
|
659
|
+
* there is a face track.
|
|
660
|
+
*/
|
|
661
|
+
punchIn?: (WordRef | PunchIn)[];
|
|
662
|
+
/**
|
|
663
|
+
* Sharpens the picture after it is scaled, 0–1 (0.3 is gentle): for
|
|
664
|
+
* footage drawn larger than its pixels (allyhub inspect gives the
|
|
665
|
+
* scale). Renders and stills only; the live preview plays it unsharpened.
|
|
666
|
+
*/
|
|
667
|
+
sharpen?: number;
|
|
668
|
+
/**
|
|
669
|
+
* Opens on a pullback: zoomed in at the layer's start, eased back to the
|
|
670
|
+
* whole picture: `true` (1.12× over 0.6 s, easing out) or
|
|
671
|
+
* { scale, dur, ease, center }; about the speaker's face when there is a
|
|
672
|
+
* face track. With one locked-off camera, each part then feels like a
|
|
673
|
+
* new shot.
|
|
674
|
+
*/
|
|
675
|
+
pullback?: boolean | Pullback;
|
|
676
|
+
/**
|
|
677
|
+
* The box's shape: "rect" (default) or "circle", the ellipse inscribed
|
|
678
|
+
* in the box (a circle when the box is square in pixels), for an inset
|
|
679
|
+
* of the speaker while graphics take the frame.
|
|
680
|
+
*/
|
|
681
|
+
shape?: "rect" | "circle";
|
|
682
|
+
/**
|
|
683
|
+
* Rounds the box's corners: the radius, px at 1080p (it scales with the
|
|
684
|
+
* format's shorter side, and with a keyframed box), at most half the
|
|
685
|
+
* box's shorter side. What is outside the corners is see-through: the
|
|
686
|
+
* frame's background shows there. Not with shape "circle".
|
|
687
|
+
*/
|
|
688
|
+
radius?: number;
|
|
689
|
+
/**
|
|
690
|
+
* Treats the picture behind the person apart from the person: blurred,
|
|
691
|
+
* dimmed, desaturated, or replaced by a colour or an image, with the
|
|
692
|
+
* person drawn over it through the file's person matte (which check and
|
|
693
|
+
* render make). Until the file has a matte the layer shows as it is.
|
|
694
|
+
*/
|
|
695
|
+
background?: FootageBackground;
|
|
696
|
+
}
|
|
697
|
+
export interface FootageLayer extends FootageOptions {
|
|
698
|
+
[LAYER_BRAND]: "footage";
|
|
699
|
+
/** The video; omitted: the part's take. */
|
|
700
|
+
file?: MediaRef;
|
|
701
|
+
/** The folder of the module that named `file` and a background image (paths), a project path ("" the root): they are relative to it. */
|
|
702
|
+
base?: string;
|
|
703
|
+
/** A video item of the project, imported: drawn by the stage at its own time. */
|
|
704
|
+
video?: PieceDefinition;
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Where a component's props hold times (its time() props): `true` for a
|
|
708
|
+
* time or a list of times, an object for the fields of an object (or of
|
|
709
|
+
* each item of a list of objects).
|
|
710
|
+
*/
|
|
711
|
+
export interface TimeShape {
|
|
712
|
+
[prop: string]: true | TimeShape;
|
|
713
|
+
}
|
|
714
|
+
export interface GraphicLayer<P extends object = object> extends LayerTiming {
|
|
715
|
+
[LAYER_BRAND]: "graphic";
|
|
716
|
+
/** Component name: 'titleCard', 'custom' or a project component's name. */
|
|
717
|
+
component: string;
|
|
718
|
+
props: P;
|
|
719
|
+
/** The props that are times: their word references become seconds. */
|
|
720
|
+
times?: TimeShape;
|
|
721
|
+
/**
|
|
722
|
+
* "front" (default): at its place in the part's layers, over those
|
|
723
|
+
* listed before it. "behind-person": with the part's own footage (the
|
|
724
|
+
* footage layer without a file) wherever it is listed, drawn right over
|
|
725
|
+
* its picture and under its speaker, who is cut out with the person
|
|
726
|
+
* matte of the part's take (which check and render make). "overlay": over
|
|
727
|
+
* the finished picture, as an app lays its captions and stickers over a
|
|
728
|
+
* video after it is filmed: over every other layer, and not marked by
|
|
729
|
+
* the camera (`capture`), motion blur, `post` or the LUT.
|
|
730
|
+
*/
|
|
731
|
+
z?: "front" | "behind-person" | "overlay";
|
|
732
|
+
mount(el: HTMLElement, props: P, ctx: StageContext): void;
|
|
733
|
+
render(el: HTMLElement, t: number, props: P, ctx: StageContext): void;
|
|
734
|
+
}
|
|
735
|
+
export type LayerSpec = FootageLayer | GraphicLayer;
|
|
736
|
+
export declare function isLayerSpec(v: unknown): v is LayerSpec;
|
|
737
|
+
export interface PartSpec {
|
|
738
|
+
[PART_BRAND]: true;
|
|
739
|
+
/** Unique in the output; stable across combos and formats. */
|
|
740
|
+
key: string;
|
|
741
|
+
/** Its name for people (the timeline, a note's part); default its largest text at its still. */
|
|
742
|
+
title?: string;
|
|
743
|
+
/**
|
|
744
|
+
* The slot this part fills, when the piece has slots: default its key,
|
|
745
|
+
* when the key is the name of one of the combo's slots.
|
|
746
|
+
*/
|
|
747
|
+
slot?: string;
|
|
748
|
+
speech?: SpeechSpec;
|
|
749
|
+
/** Without speech: seconds (default 4, or the part defaults). With speech: ignored. */
|
|
750
|
+
dur?: number;
|
|
751
|
+
/** Seconds before the first word and after the last; defaults 0.2 and 0.3 (or the part defaults). */
|
|
752
|
+
lead?: number;
|
|
753
|
+
tail?: number;
|
|
754
|
+
/**
|
|
755
|
+
* What the part shows, back to front: each layer is drawn over those
|
|
756
|
+
* listed before it, footage and graphics alike. A graphic layer listed
|
|
757
|
+
* before a footage layer is under it (a card behind a video); one
|
|
758
|
+
* between two footage layers is between them.
|
|
759
|
+
*/
|
|
760
|
+
layers: LayerSpec[];
|
|
761
|
+
/** The still moment: a word reference, seconds, or a function of the part's length. */
|
|
762
|
+
still?: WordRef | ((dur: number) => number);
|
|
763
|
+
tags?: string[];
|
|
764
|
+
/**
|
|
765
|
+
* J and L cuts: `before` seconds of the speech play under the previous
|
|
766
|
+
* part's picture (a J cut), `after` seconds under the next part's (an L
|
|
767
|
+
* cut). The part's picture is that much shorter at that end.
|
|
768
|
+
*/
|
|
769
|
+
overlap?: {
|
|
770
|
+
before?: number;
|
|
771
|
+
after?: number;
|
|
772
|
+
};
|
|
773
|
+
/** Sound effects, each placed by a word reference or seconds. */
|
|
774
|
+
sounds?: SoundSpec[];
|
|
775
|
+
/** The folder of the module that called part(), a project path ("" the root): its sounds' paths are relative to it. */
|
|
776
|
+
base?: string;
|
|
777
|
+
/**
|
|
778
|
+
* Named moments of the part, in seconds from its start: a point
|
|
779
|
+
* (`press: 7.1`) or a stretch (`map: [9.6, 13.4]`). "@press" is the
|
|
780
|
+
* point, "@map" and "@/map" the stretch's start and end, wherever a word
|
|
781
|
+
* reference goes. A part needs no speech to have them.
|
|
782
|
+
*/
|
|
783
|
+
anchors?: PartAnchors;
|
|
784
|
+
/**
|
|
785
|
+
* How the part comes in from the part before it: a type's name
|
|
786
|
+
* ("fade", "dip", "slide", "push", "wipe", "zoom") or { type, dur, ease,
|
|
787
|
+
* split, … }. Absent: a cut. Pictures only: the sound is not changed.
|
|
788
|
+
*/
|
|
789
|
+
transition?: TransitionInput;
|
|
790
|
+
/**
|
|
791
|
+
* How this part's speech was recorded, over the video's `mic`: a
|
|
792
|
+
* setup's name ("studio", "phone", "lav"), its options, or false for the
|
|
793
|
+
* voice as it is.
|
|
794
|
+
*/
|
|
795
|
+
mic?: VoiceSetting;
|
|
796
|
+
/**
|
|
797
|
+
* The part's own grade: an ffmpeg filter chain on its picture (a clip's
|
|
798
|
+
* white balance and exposure), before the camera's marks and the video's
|
|
799
|
+
* post, under the same contract as the video's (the render's post).
|
|
800
|
+
*/
|
|
801
|
+
post?: {
|
|
802
|
+
filter: string;
|
|
803
|
+
};
|
|
804
|
+
/**
|
|
805
|
+
* dB this part's speech is turned up (or down) after it is recorded, as
|
|
806
|
+
* an editor's clip volume: the recording's finishing (its compressor)
|
|
807
|
+
* does not even it out, and its room tone moves with it. From -40 to
|
|
808
|
+
* 24; default 0.
|
|
809
|
+
*/
|
|
810
|
+
speechGainDb?: number;
|
|
811
|
+
}
|
|
812
|
+
export declare function isPartSpec(v: unknown): v is PartSpec;
|
|
813
|
+
/** A part's defaults: the length without speech, the lead and the tail. */
|
|
814
|
+
export declare const PART_DEFAULTS: {
|
|
815
|
+
readonly dur: 4;
|
|
816
|
+
readonly lead: 0.2;
|
|
817
|
+
readonly tail: 0.3;
|
|
818
|
+
};
|
|
819
|
+
/**
|
|
820
|
+
* Part defaults a project (`defineConfig({ defaults: { part } })`) or an
|
|
821
|
+
* video (`video({ defaults: { part } })`) sets over PART_DEFAULTS.
|
|
822
|
+
*/
|
|
823
|
+
export interface PartDefaults {
|
|
824
|
+
/** Seconds of a part without speech. */
|
|
825
|
+
dur?: number;
|
|
826
|
+
/** Seconds before a part's first word. */
|
|
827
|
+
lead?: number;
|
|
828
|
+
/** Seconds after a part's last word. */
|
|
829
|
+
tail?: number;
|
|
830
|
+
}
|
|
831
|
+
/** The part defaults in force: the output's over the project's over PART_DEFAULTS. */
|
|
832
|
+
export declare function partDefaults(...layers: (PartDefaults | undefined)[]): Required<PartDefaults>;
|
|
833
|
+
export interface MusicOptions {
|
|
834
|
+
/**
|
|
835
|
+
* The music, or one per language (`{ en: a, "zh-cn": b }`): each
|
|
836
|
+
* language can have music cut to its own timing. A language with no
|
|
837
|
+
* entry has no music.
|
|
838
|
+
*/
|
|
839
|
+
file?: MediaRef | Record<string, MediaRef>;
|
|
840
|
+
/** Seconds into the file where the music starts; default 0. */
|
|
841
|
+
from?: number;
|
|
842
|
+
/**
|
|
843
|
+
* `true` plays the whole file again (with a 0.25 s crossfade at each
|
|
844
|
+
* seam) while the video goes on; `{ from, to }` plays that stretch again
|
|
845
|
+
* and again after `play` (or after `from` to `to`), each seam crossed
|
|
846
|
+
* over `seam`. Default false: it plays once, and a video longer than the
|
|
847
|
+
* music ends without it (the `music-length` fact gives both lengths).
|
|
848
|
+
*/
|
|
849
|
+
loop?: boolean | MusicStretch;
|
|
850
|
+
/**
|
|
851
|
+
* The stretches of the file to play, in order, back to back (`{ from,
|
|
852
|
+
* to }`, each a second of the file, `{ beat: n }` or `{ bar: n }`):
|
|
853
|
+
* bars 0 to 7 then 3 to 7 of a song that ends too soon. Each seam is
|
|
854
|
+
* crossed over `seam`; the film moves on by each stretch's exact length,
|
|
855
|
+
* so stretches cut on the beat keep the beat. Default: the file from
|
|
856
|
+
* `from` to its end.
|
|
857
|
+
*/
|
|
858
|
+
play?: MusicStretch[];
|
|
859
|
+
/**
|
|
860
|
+
* Seconds each seam between stretches cross-fades over, equal-power;
|
|
861
|
+
* default 0.03 (the whole file looped, `loop: true`: 0.25).
|
|
862
|
+
*/
|
|
863
|
+
seam?: number;
|
|
864
|
+
/** Beats a bar, for `{ bar }` places and `end: "bar"`; default 4. */
|
|
865
|
+
meter?: number;
|
|
866
|
+
/**
|
|
867
|
+
* The file's second of bar 0, the first downbeat (the beat finder does
|
|
868
|
+
* not know where a bar starts); default the first beat measured, or 0
|
|
869
|
+
* with a given `bpm`. Beats count from it too.
|
|
870
|
+
*/
|
|
871
|
+
downbeat?: number;
|
|
872
|
+
/**
|
|
873
|
+
* Where the music stops: "film" at the video's end (default), "bar" on
|
|
874
|
+
* the last bar line before it, "beat" on the last beat; its fade out
|
|
875
|
+
* (`mix.musicFade.out`) ends there. Needs a tempo.
|
|
876
|
+
*/
|
|
877
|
+
end?: "film" | "bar" | "beat";
|
|
878
|
+
/**
|
|
879
|
+
* Parts without speech end on the music's beat; default false. The beat
|
|
880
|
+
* is `bpm`, else the tempo measured from the file, laid out as the
|
|
881
|
+
* stretches play it; when neither is known, nothing is snapped and a
|
|
882
|
+
* `fallback` fact says so.
|
|
883
|
+
*/
|
|
884
|
+
snap?: boolean;
|
|
885
|
+
/** Beats per minute, for `snap`, beats and bars; default: the tempo measured from the file. */
|
|
886
|
+
bpm?: number;
|
|
887
|
+
/**
|
|
888
|
+
* The music's level over the film, dB relative to its level (`mix`):
|
|
889
|
+
* points `{ at, db }`, linear between them in dB and held before the
|
|
890
|
+
* first and after the last, added to its dip under speech. `at` is film
|
|
891
|
+
* seconds, an anchor of any part ("@drop", "@drop-0.2"), a part's key
|
|
892
|
+
* (its start), or `{ part, at }`, a word reference in that part.
|
|
893
|
+
*/
|
|
894
|
+
gain?: {
|
|
895
|
+
at: SoundMoment;
|
|
896
|
+
db: number;
|
|
897
|
+
}[];
|
|
898
|
+
/**
|
|
899
|
+
* An ffmpeg audio filter chain run on the file as it is decoded (its own
|
|
900
|
+
* clock): "acompressor=ratio=3,deesser". One chain; nothing that reads
|
|
901
|
+
* files, makes sound or changes the timing.
|
|
902
|
+
*/
|
|
903
|
+
filter?: string;
|
|
904
|
+
/**
|
|
905
|
+
* Equalizer bands, in order, on the music as it plays: `{ type, hz, db?,
|
|
906
|
+
* q?, keys? }`, a type "highpass", "lowpass", "bandpass", "peak",
|
|
907
|
+
* "lowshelf" or "highshelf". `keys: [{ at, hz?, db?, q? }]` move a
|
|
908
|
+
* band's values over the film (a low-pass at 1100 Hz until "@drop",
|
|
909
|
+
* open 0.3 s later), `at` as `gain`'s.
|
|
910
|
+
*/
|
|
911
|
+
eq?: SoundShape["eq"];
|
|
912
|
+
/**
|
|
913
|
+
* A compressor after the bands: `{ threshold, ratio?, knee?, attack?,
|
|
914
|
+
* release?, window? }`, its threshold dB over the music's loudness;
|
|
915
|
+
* defaults COMPRESS_DEFAULTS.
|
|
916
|
+
*/
|
|
917
|
+
compress?: SoundShape["compress"];
|
|
918
|
+
}
|
|
919
|
+
export type { MusicStretch, MusicTime };
|
|
920
|
+
export interface VideoOptions {
|
|
921
|
+
music?: MediaRef | MusicOptions;
|
|
922
|
+
/** The look's name; default "clean". */
|
|
923
|
+
look?: string;
|
|
924
|
+
/** Cover parts (optional): parts without speech, drawn at their still for the cover image. */
|
|
925
|
+
covers?(ctx: PieceContext): PartSpec[] | Promise<PartSpec[]>;
|
|
926
|
+
/**
|
|
927
|
+
* Frames per second: a whole number from 1 to 120, or an NTSC rate
|
|
928
|
+
* (23.976, 29.97, 47.952, 59.94, 119.88, or "24000/1001"…); default 30.
|
|
929
|
+
*/
|
|
930
|
+
fps?: number | string;
|
|
931
|
+
/**
|
|
932
|
+
* The stage has no background: mov, webm and png keep the transparency;
|
|
933
|
+
* mp4 and gif show black where nothing is drawn. Default false.
|
|
934
|
+
*/
|
|
935
|
+
transparent?: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* The mix: each stem's loudness target (speech, music while speech
|
|
938
|
+
* plays and alone, sound effects, footage alone and under speech), the
|
|
939
|
+
* music's ducking under words and its fades. Defaults: MIX_DEFAULTS.
|
|
940
|
+
*/
|
|
941
|
+
mix?: MixOptions;
|
|
942
|
+
/**
|
|
943
|
+
* How the speech was recorded: a setup's name ("studio", "phone",
|
|
944
|
+
* "lav"), or { setup, …changes } (the microphone, its distance and
|
|
945
|
+
* angle, the room, its tone, the device's automatic gain, the
|
|
946
|
+
* finishing), or false for the voice as it is. Default: "studio", the
|
|
947
|
+
* voice finished as a studio's is (a high-pass, a gentle de-esser and
|
|
948
|
+
* compressor) and nothing else. A part's own `mic` is over it.
|
|
949
|
+
*/
|
|
950
|
+
mic?: VoiceSetting;
|
|
951
|
+
/**
|
|
952
|
+
* What the sound is mastered to: a loudness in LUFS (-70 to 0), or
|
|
953
|
+
* `{ lufs, truePeak }`; default the platform profile's loudness, else
|
|
954
|
+
* -14 LUFS, true peak -3 dBTP. The master is one measured gain, then a
|
|
955
|
+
* true-peak limiter: the mix keeps its own loudness range. false keeps
|
|
956
|
+
* the mix's own level and only limits its peaks.
|
|
957
|
+
*/
|
|
958
|
+
master?: number | false | MasterOptions;
|
|
959
|
+
/** The longest a combo may last, in seconds: a longer one is a must-fix (AK-X006). */
|
|
960
|
+
maxDuration?: number;
|
|
961
|
+
/**
|
|
962
|
+
* false: a video only shown inside another (what a scenery's screen shows,
|
|
963
|
+
* a scene a film plays stretches of), not a film of its own. `allyhub
|
|
964
|
+
* render` renders it only when it is named, and the check leaves
|
|
965
|
+
* out the facts about watching it as a film: how long its text shows and
|
|
966
|
+
* how large on a phone, a platform's covered edges, flat and still
|
|
967
|
+
* stretches. Default true.
|
|
968
|
+
*/
|
|
969
|
+
deliverable?: boolean;
|
|
970
|
+
/**
|
|
971
|
+
* How long loading it may take, seconds (mounting its layers, the work
|
|
972
|
+
* they wait for, a 3D scenery's build, each part's still); default
|
|
973
|
+
* LOAD_LIMIT, 10. Longer is AK-P002, which names what took the time.
|
|
974
|
+
*/
|
|
975
|
+
loadLimit?: number;
|
|
976
|
+
/**
|
|
977
|
+
* How long one moment may take to draw, seconds: the work its layers
|
|
978
|
+
* wait for (ctx.wait) and the pictures it shows decoding; default
|
|
979
|
+
* SEEK_LIMIT, 30. Longer is AK-P003, which names what was still pending,
|
|
980
|
+
* and the command goes on. Loading waits for its layers' work at most
|
|
981
|
+
* LOAD_WAITS (4) times as long.
|
|
982
|
+
*/
|
|
983
|
+
seekLimit?: number;
|
|
984
|
+
/** Motion blur: each frame blends moments across part of the frame's time. */
|
|
985
|
+
motionBlur?: MotionBlur;
|
|
986
|
+
/**
|
|
987
|
+
* What a camera filming the picture does to it, before post: bloom,
|
|
988
|
+
* chromatic aberration, vignetting, exposure breathing, grain and
|
|
989
|
+
* sharpening, each absent unless given (CaptureOptions; their defaults
|
|
990
|
+
* CAPTURE_DEFAULTS). Each frame's marks are a function of its number in
|
|
991
|
+
* the film, so a still is the render's frame.
|
|
992
|
+
*/
|
|
993
|
+
capture?: CaptureOptions;
|
|
994
|
+
/** Processing after the frames are drawn, before they are encoded. */
|
|
995
|
+
post?: PostProcess;
|
|
996
|
+
/** This output's part defaults, over the project's (`defineConfig({ defaults: { part } })`). */
|
|
997
|
+
defaults?: {
|
|
998
|
+
part?: PartDefaults;
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
export interface MotionBlur {
|
|
1002
|
+
/** Moments blended into each frame: 2 to 16. */
|
|
1003
|
+
samples: number;
|
|
1004
|
+
/** The part of a frame's time they span, over (0, 1]; default 0.5 (a 180° shutter). */
|
|
1005
|
+
shutter?: number;
|
|
1006
|
+
}
|
|
1007
|
+
export interface PostProcess {
|
|
1008
|
+
/**
|
|
1009
|
+
* An ffmpeg filter chain over the frames, for example
|
|
1010
|
+
* "eq=contrast=1.05:saturation=1.1,colortemperature=temperature=5600".
|
|
1011
|
+
* One chain: no `;`, no `[labels]`, and no filters that read or write
|
|
1012
|
+
* files. It is given the picture opaque, as 8-bit planar RGB (gbrp), its
|
|
1013
|
+
* `t` the film's time, and what it gives back is made opaque gbrp again;
|
|
1014
|
+
* use `t`, not `n`, which counts from each segment's first frame.
|
|
1015
|
+
*/
|
|
1016
|
+
filter?: string;
|
|
1017
|
+
/** A 3D LUT (.cube) applied after the filter: a path relative to the piece. */
|
|
1018
|
+
lut?: string;
|
|
1019
|
+
}
|
|
1020
|
+
export type VideoBuild = (ctx: PieceContext) => PartSpec[] | Promise<PartSpec[]>;
|
|
1021
|
+
/**
|
|
1022
|
+
* Where a piece was written, as video() and slides() record it from the
|
|
1023
|
+
* module the SDK was bound to (the SDK's sdkFor): the paths a piece names
|
|
1024
|
+
* as strings are relative to the module that wrote them, and an item's
|
|
1025
|
+
* piece imported by another (a scenery's screen, a part's video take) is
|
|
1026
|
+
* known by its file.
|
|
1027
|
+
*/
|
|
1028
|
+
export interface PieceWritten {
|
|
1029
|
+
/** The module that called video() or slides(), a project path ("" where it was not known). */
|
|
1030
|
+
file: string;
|
|
1031
|
+
/**
|
|
1032
|
+
* The folder each of its fields that names a file (music, post's LUT) is
|
|
1033
|
+
* relative to: the value as written and the folder, a project path (""
|
|
1034
|
+
* the project's root). A field spread from another piece
|
|
1035
|
+
* (`video({ ...film, format })`) keeps the folder it was written in
|
|
1036
|
+
* while its value is the same.
|
|
1037
|
+
*/
|
|
1038
|
+
paths?: Readonly<Partial<Record<"music" | "post", readonly [value: unknown, base: string]>>>;
|
|
1039
|
+
}
|
|
1040
|
+
/** What every piece has, whatever it makes. */
|
|
1041
|
+
export interface PieceCommon {
|
|
1042
|
+
/** Where it was written: video() and slides() set it. */
|
|
1043
|
+
written?: PieceWritten;
|
|
1044
|
+
/** A stable identity; default: the item's folder, from the project's root. */
|
|
1045
|
+
id?: string;
|
|
1046
|
+
/** A name for people: one string, or by language. */
|
|
1047
|
+
title?: string | Record<string, string>;
|
|
1048
|
+
/**
|
|
1049
|
+
* What it is rendered as, one format: a preset ("16x9", "9x16", "1x1",
|
|
1050
|
+
* "4x5"), a platform profile or WxH pixels ("a4" and "letter" for slides
|
|
1051
|
+
* only), a name or a FormatSpec ({ format, safe, maxDuration, loudness }:
|
|
1052
|
+
* the format with its numbers changed). Another format is a piece of
|
|
1053
|
+
* its own, which imports what it shares. Default: allyhub.config.ts
|
|
1054
|
+
* `defaults.format`, else "16x9".
|
|
1055
|
+
*/
|
|
1056
|
+
format?: FormatEntry;
|
|
1057
|
+
/**
|
|
1058
|
+
* The matrix: dimensions (crossed in full), slots and their candidates,
|
|
1059
|
+
* structures, and the rules and sampling that choose the combos
|
|
1060
|
+
* (`ctx.combo`).
|
|
1061
|
+
*/
|
|
1062
|
+
matrix?: Matrix;
|
|
1063
|
+
/** Any key-values; the platform filters and groups by them. */
|
|
1064
|
+
meta?: Record<string, unknown>;
|
|
1065
|
+
}
|
|
1066
|
+
/** A video: the default export of an item's video.ts, made by video(). */
|
|
1067
|
+
export interface VideoPiece extends PieceCommon, VideoOptions {
|
|
1068
|
+
[PIECE_BRAND]: true;
|
|
1069
|
+
kind: "video";
|
|
1070
|
+
/**
|
|
1071
|
+
* Its parts, in order. A method, so a piece whose parts take a narrower
|
|
1072
|
+
* context (the SDK's, with message keys typed) is still a VideoPiece.
|
|
1073
|
+
*/
|
|
1074
|
+
parts(ctx: PieceContext): PartSpec[] | Promise<PartSpec[]>;
|
|
1075
|
+
}
|
|
1076
|
+
/** One deliverable: a video or a deck. Another one is an item of its own. */
|
|
1077
|
+
export type PieceDefinition = VideoPiece | PagedPiece;
|
|
1078
|
+
export declare function isPieceDefinition(v: unknown): v is PieceDefinition;
|
|
1079
|
+
/**
|
|
1080
|
+
* A piece's output as the build and the runtime handle it: its kind, the
|
|
1081
|
+
* function that makes its parts or pages, and its options. A piece has
|
|
1082
|
+
* one, named by its item's kind (`outputName`).
|
|
1083
|
+
*/
|
|
1084
|
+
export interface OutputDefinition<K extends OutputKind = OutputKind> {
|
|
1085
|
+
kind: K;
|
|
1086
|
+
build(ctx: PieceContext): unknown;
|
|
1087
|
+
options: object;
|
|
1088
|
+
}
|
|
1089
|
+
export interface VideoOutput extends OutputDefinition<"video"> {
|
|
1090
|
+
build: VideoBuild;
|
|
1091
|
+
options: VideoOptions;
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* The name of a piece's one output: its item's kind, as its entry file is
|
|
1095
|
+
* named (video, slides), and as a doc's file is doc.pdf.
|
|
1096
|
+
*/
|
|
1097
|
+
export declare const outputName: (kind: OutputKind) => string;
|
|
1098
|
+
/** A piece's one output: its kind, its build function and its options. */
|
|
1099
|
+
export declare function outputOf(def: PieceDefinition): VideoOutput | PagedOutput;
|
|
1100
|
+
/** The function that makes a piece's parts or pages. */
|
|
1101
|
+
export declare const buildOf: (def: PieceDefinition) => unknown;
|
|
1102
|
+
/**
|
|
1103
|
+
* Whether a piece is the one a command names, or under it as a folder of
|
|
1104
|
+
* items: `tr` takes `tr` and `tr/fade`, not `trailer`.
|
|
1105
|
+
*/
|
|
1106
|
+
export declare const pieceIn: (id: string, name: string) => boolean;
|
|
1107
|
+
/**
|
|
1108
|
+
* What a command's item names, as a place: written as an id, or a path to an
|
|
1109
|
+
* item's folder or entry file from the project (./launch/film,
|
|
1110
|
+
* launch/film/video.ts), the entry file's name left out.
|
|
1111
|
+
*/
|
|
1112
|
+
export declare function pieceName(name: string): string;
|
|
1113
|
+
/**
|
|
1114
|
+
* Whether a command's item names a piece, by its id or by its place (an id of its
|
|
1115
|
+
* own does not hide its place), as a path to its folder or entry file, or
|
|
1116
|
+
* as a folder of items above any of these.
|
|
1117
|
+
*/
|
|
1118
|
+
export declare const pieceNamed: (p: {
|
|
1119
|
+
id: string;
|
|
1120
|
+
path?: string;
|
|
1121
|
+
}, name: string) => boolean;
|
|
1122
|
+
/** Whether a command's item names exactly this piece, by its id, its place or a path to it. */
|
|
1123
|
+
export declare const pieceIs: (p: {
|
|
1124
|
+
id: string;
|
|
1125
|
+
path?: string;
|
|
1126
|
+
}, name: string) => boolean;
|
|
1127
|
+
/** The default message prefix of a piece id: `launch/film` → `launch.film`. */
|
|
1128
|
+
export declare function messagePrefix(pieceId: string): string;
|
|
1129
|
+
/**
|
|
1130
|
+
* How the runtime shows and hides a layer's element, and a part's: an
|
|
1131
|
+
* attribute a rule of the document's hides (`display: none !important`),
|
|
1132
|
+
* never the element's own `display`, which is the layer's (a layer that
|
|
1133
|
+
* centres its content with `display: grid` keeps it when shown).
|
|
1134
|
+
*/
|
|
1135
|
+
export declare const LAYER_OFF = "data-ak-off";
|
|
1136
|
+
/** Shows or hides a layer's (or a part's) element. */
|
|
1137
|
+
export declare function showLayer(el: HTMLElement, on: boolean): void;
|
|
1138
|
+
/** Whether a layer's (or a part's) element is shown. */
|
|
1139
|
+
export declare function layerShown(el: HTMLElement): boolean;
|
|
1140
|
+
/**
|
|
1141
|
+
* Adds the rule that hides what is marked off, once per document, as an
|
|
1142
|
+
* adopted style sheet: no element is added, so nothing watching the
|
|
1143
|
+
* document's elements sees a change.
|
|
1144
|
+
*/
|
|
1145
|
+
export declare function addLayerRule(doc: Document): void;
|
|
1146
|
+
//# sourceMappingURL=piece.d.ts.map
|