@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,77 @@
|
|
|
1
|
+
import { type EditList, type EditRange, type EditedSpeech, type KeptRange, type SoundCut } from "./edits.js";
|
|
2
|
+
import type { Word } from "./media.js";
|
|
3
|
+
import { type Join } from "./transcript.js";
|
|
4
|
+
import { type RoomLevel, type VoiceFrames } from "./voice.js";
|
|
5
|
+
export interface CutReportOptions {
|
|
6
|
+
/** Words [from, to] of the take (default every word). */
|
|
7
|
+
from?: number;
|
|
8
|
+
to?: number;
|
|
9
|
+
/** The frame grid cuts are placed on (default 30). */
|
|
10
|
+
fps?: number;
|
|
11
|
+
/** A join's silence is its 10 ms frames under this level, dBFS (default the take's speech/silence threshold). */
|
|
12
|
+
quiet?: number;
|
|
13
|
+
/** Seconds of each word next to a cut whose mean level gives the step across a join (default JOIN_NEAR). */
|
|
14
|
+
near?: number;
|
|
15
|
+
/** The take's length, seconds (default its last word's end). */
|
|
16
|
+
duration?: number;
|
|
17
|
+
}
|
|
18
|
+
/** A run of removed words. */
|
|
19
|
+
export interface Removal {
|
|
20
|
+
from: number;
|
|
21
|
+
to: number;
|
|
22
|
+
start: number;
|
|
23
|
+
end: number;
|
|
24
|
+
text: string;
|
|
25
|
+
}
|
|
26
|
+
/** The room tone, and how a fill would be matched at each end of what is kept. */
|
|
27
|
+
export interface RoomReport {
|
|
28
|
+
from: number;
|
|
29
|
+
to: number;
|
|
30
|
+
/** The floor of the room tone where a fill plays it, dBFS. */
|
|
31
|
+
level: number | null;
|
|
32
|
+
lead: {
|
|
33
|
+
word: number;
|
|
34
|
+
pad: number;
|
|
35
|
+
} & RoomLevel;
|
|
36
|
+
tail: {
|
|
37
|
+
word: number;
|
|
38
|
+
pad: number;
|
|
39
|
+
} & RoomLevel;
|
|
40
|
+
}
|
|
41
|
+
export interface CutReport {
|
|
42
|
+
from: number;
|
|
43
|
+
to: number;
|
|
44
|
+
fps: number;
|
|
45
|
+
/** The padding each cut keeps into the silence, seconds. */
|
|
46
|
+
pad: {
|
|
47
|
+
before: number;
|
|
48
|
+
after: number;
|
|
49
|
+
};
|
|
50
|
+
/** Whether the pad is the edits file's own. */
|
|
51
|
+
padGiven: boolean;
|
|
52
|
+
kept: KeptRange[];
|
|
53
|
+
removed: Removal[];
|
|
54
|
+
sounds: SoundCut[];
|
|
55
|
+
/** Sounds the edits file lists that are not between two kept words here: nothing was cut. */
|
|
56
|
+
soundsUnused: SoundCut[];
|
|
57
|
+
inWord: EditedSpeech["inWord"];
|
|
58
|
+
/** inWord stretches that cut nothing here (outside what is kept, or under 0.04 s once placed). */
|
|
59
|
+
inWordUnplaced: SoundCut[];
|
|
60
|
+
pauses: EditedSpeech["pauses"];
|
|
61
|
+
/** Ranges the take no longer says (AK-T005). */
|
|
62
|
+
lost: EditRange[];
|
|
63
|
+
seconds: {
|
|
64
|
+
before: number;
|
|
65
|
+
after: number;
|
|
66
|
+
removed: number;
|
|
67
|
+
};
|
|
68
|
+
/** Null without the take's levels, or when it has no steady quiet stretch. */
|
|
69
|
+
roomTone: RoomReport | null;
|
|
70
|
+
joins: Join[];
|
|
71
|
+
/** The level a join's silence is under, dBFS; null without levels. */
|
|
72
|
+
quietBelow: number | null;
|
|
73
|
+
near: number;
|
|
74
|
+
}
|
|
75
|
+
/** What an edits file keeps and removes of words [from, to] of a take, and every join. */
|
|
76
|
+
export declare function cutReport(words: readonly Word[], list: EditList, frames: VoiceFrames | undefined, options?: CutReportOptions): CutReport;
|
|
77
|
+
//# sourceMappingURL=cut-report.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{applyEdits as E,editedLength as P,PAD_AFTER as T,PAD_BEFORE as _,speechPads as j}from"./edits.js";import{JOIN_NEAR as q,joinsOf as x,takeLevels as B}from"./transcript.js";import{matchRoom as g,ROOM_MATCH as v,roomTone as I}from"./voice.js";import{joinWords as y}from"./words.js";const A=o=>Math.round(o*1e3)/1e3;export function cutReport(o,e,a,c={}){const r=Math.max(0,o.length-1),d=Math.min(c.from??0,r),s=Math.min(c.to??r,r),p=c.fps??30,i=c.duration??o.at(-1)?.end??0,n=E(o,e,d,s,{levels:a,fps:p}),m=o[d],u=o[s],l=m&&u?u.end-m.start:0,h=P(n.ranges),M=[];for(const t of n.removed){const f=M.at(-1);f?.to===t-1?f.to=t:M.push({from:t,to:t})}const O=t=>e.maxPause===void 0?t:Math.min(t,e.maxPause/2),k={before:O(e.pad?.before??_),after:O(e.pad?.after??T)},W=M.map(t=>({...t,start:o[t.from]?.start??0,end:o[t.to]?.end??0,text:y(o.slice(t.from,t.to+1))})),R=c.quiet??(a?B(a).threshold:-60),b=c.near??q;return{from:d,to:s,fps:p,pad:k,padGiven:e.pad?.before!==void 0||e.pad?.after!==void 0,kept:n.ranges,removed:W,sounds:n.sounds,soundsUnused:(e.sounds??[]).filter(t=>!n.sounds.some(f=>f.from<t.to&&f.to>t.from)),inWord:n.inWord,inWordUnplaced:(e.inWord??[]).filter(t=>!n.inWord.some(f=>f.from<t.to+.05&&f.to>t.from-.05)),pauses:n.pauses,lost:n.lost,seconds:{before:A(l),after:A(h),removed:A(l-h)},roomTone:a?D(o,n,a,i):null,joins:x(o,n,a,R,b),quietBelow:a?R:null,near:b}}function D(o,e,a,c){const r=I(a),d=e.kept[0],s=e.kept.at(-1);if(!r||d===void 0||s===void 0)return null;const p=j(o,d,s,c,a),i=e.ranges[0]?.from??o[d]?.start??0,n=e.ranges.at(-1)?.to??o[s]?.end??0,m=i>(o[d]?.start??0)+1e-6?0:p.padIn,u=n<(o[s]?.end??0)-1e-6?0:p.padOut,l={from:r.from,to:Math.min(r.to,r.from+v.near)},h=g(a,l,{from:i-m,to:i-m+Math.min(m,v.near)}),M=g(a,l,{from:n+u-Math.min(u,v.near),to:n+u});return{...r,level:h.level,lead:{word:d,pad:m,...h},tail:{word:s,pad:u,...M}}}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type FormattingOptions, type JSONPath } from "jsonc-parser";
|
|
2
|
+
/** A key's new value; undefined deletes it. */
|
|
3
|
+
export interface KeyEdit {
|
|
4
|
+
key: string;
|
|
5
|
+
value?: unknown;
|
|
6
|
+
}
|
|
7
|
+
/** The indentation and line ending the file already uses. */
|
|
8
|
+
export declare function formattingOf(text: string): FormattingOptions;
|
|
9
|
+
/** A value on one line, the way prettier prints it: `["a", "b"]`, `{ "k": 1 }`. */
|
|
10
|
+
export declare function inline(v: unknown): string;
|
|
11
|
+
/**
|
|
12
|
+
* Sets (or with `undefined` deletes) the value at a path of keys and
|
|
13
|
+
* indexes of a JSON document; the empty path replaces the whole document.
|
|
14
|
+
* A new key goes where `insertAt` says among its siblings (default: last).
|
|
15
|
+
* Lists and objects that were on one line (or are new) stay on one line
|
|
16
|
+
* when they fit.
|
|
17
|
+
*/
|
|
18
|
+
export declare function editJsonAt(text: string, at: readonly (string | number)[], value: unknown, insertAt?: (props: string[]) => number): string;
|
|
19
|
+
/** The value at a path of a JSON document; undefined when it is not there. */
|
|
20
|
+
export declare function readJsonAt(text: string, path: JSONPath): unknown;
|
|
21
|
+
/**
|
|
22
|
+
* Applies edits to the top-level keys of a JSON object. A new key goes after
|
|
23
|
+
* the last key that comes before it in `order` (the default language's
|
|
24
|
+
* strings, so every language file keeps the same order), else at the end.
|
|
25
|
+
*/
|
|
26
|
+
export declare function editJsonKeys(text: string, edits: readonly KeyEdit[], order?: readonly string[]): string;
|
|
27
|
+
/** A field of a CSV file and where its text is (start inclusive, end exclusive). */
|
|
28
|
+
interface CsvField {
|
|
29
|
+
value: string;
|
|
30
|
+
start: number;
|
|
31
|
+
end: number;
|
|
32
|
+
quoted: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* RFC 4180 rows with where each field is, skipping blank lines the way the
|
|
36
|
+
* build reads CSV (`@allyhub/build`'s parseCsvRows): the first row is the
|
|
37
|
+
* header.
|
|
38
|
+
*/
|
|
39
|
+
export declare function csvFields(text: string): CsvField[][];
|
|
40
|
+
/** A cell by data row (0 = the first row after the header) and column name. */
|
|
41
|
+
export declare function csvCell(text: string, row: number, column: string): CsvField | undefined;
|
|
42
|
+
/** Replaces one cell's text; quotes it when it must be (or was) quoted. */
|
|
43
|
+
export declare function editCsvCell(text: string, row: number, column: string, value: string): string;
|
|
44
|
+
/** Where an edit is: a messages key, a JSON path, or a CSV cell. */
|
|
45
|
+
export type EditLocation = string | {
|
|
46
|
+
pointer: (string | number)[];
|
|
47
|
+
} | {
|
|
48
|
+
row: number;
|
|
49
|
+
column: string;
|
|
50
|
+
};
|
|
51
|
+
/** null means absent: a key that is not there, a value to delete. */
|
|
52
|
+
export type EditValue = unknown;
|
|
53
|
+
export type EditOutcome = {
|
|
54
|
+
ok: true;
|
|
55
|
+
text: string;
|
|
56
|
+
} | {
|
|
57
|
+
ok: false;
|
|
58
|
+
reason: "conflict";
|
|
59
|
+
current: EditValue;
|
|
60
|
+
} | {
|
|
61
|
+
ok: false;
|
|
62
|
+
reason: "invalid";
|
|
63
|
+
message: string;
|
|
64
|
+
};
|
|
65
|
+
/** Which kind of file an edit can change. */
|
|
66
|
+
export declare function editableKind(path: string): "json" | "csv" | undefined;
|
|
67
|
+
/** The value now at a location of a file's text; null when absent. */
|
|
68
|
+
export declare function valueAt(text: string | null, path: string, at: EditLocation): EditValue;
|
|
69
|
+
/**
|
|
70
|
+
* Applies one edit to a file's text if the value there is still `before`
|
|
71
|
+
* (if it is, only that value changes; if not, it is a conflict). A file that does not
|
|
72
|
+
* exist is `null`; it can only gain a JSON value. `after` null deletes a
|
|
73
|
+
* JSON value (a translation cleared); a CSV cell becomes empty.
|
|
74
|
+
*/
|
|
75
|
+
export declare function applyEdit(text: string | null, path: string, at: EditLocation, before: EditValue, after: EditValue, order?: readonly string[]): EditOutcome;
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=edit.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{applyEdits as h,findNodeAtLocation as g,getNodeValue as S,modify as w,parseTree as p}from"jsonc-parser";import{dequal as m}from"dequal/lite";export function formattingOf(n){const o=n.includes(`\r
|
|
3
|
+
`)?`\r
|
|
4
|
+
`:`
|
|
5
|
+
`,e=/\n([ \t]+)"/.exec(n)?.[1]??" ";return e.startsWith(" ")?{insertSpaces:!1,tabSize:1,eol:o}:{insertSpaces:!0,tabSize:e.length,eol:o}}const b=80;export function inline(n){if(Array.isArray(n))return`[${n.map(inline).join(", ")}]`;if(typeof n=="object"&&n!==null){const o=Object.entries(n).map(([e,r])=>`${JSON.stringify(e)}: ${inline(r)}`);return o.length?`{ ${o.join(", ")} }`:"{}"}return JSON.stringify(n)}const y={type:"object",offset:0,length:0};export function editJsonAt(n,o,e,r){const t=formattingOf(n);if(o.length===0){const s=t.insertSpaces?t.tabSize:" ";return`${JSON.stringify(e,null,s)}${t.eol??`
|
|
6
|
+
`}`}const u=[...o];let i=n.trim()===""?`{}
|
|
7
|
+
`:n;const f=g(p(i)??y,u),c=f===void 0||!i.slice(f.offset,f.offset+f.length).includes(`
|
|
8
|
+
`);if(i=h(i,w(i,u,e,{formattingOptions:t,...r?{getInsertionIndex:r}:{}})),e!==null&&typeof e=="object"&&c){const s=g(p(i)??y,u),l=inline(e);if(s){const d=i.lastIndexOf(`
|
|
9
|
+
`,s.offset)+1;s.offset-d+l.length+1<=b&&(i=i.slice(0,s.offset)+l+i.slice(s.offset+s.length))}}return i}export function readJsonAt(n,o){const e=p(n);if(!e)return;const r=g(e,o);return r?S(r):void 0}export function editJsonKeys(n,o,e=[]){let r=n;for(const{key:t,value:u}of o){const i=e.indexOf(t);r=editJsonAt(r,[t],u,f=>{if(i<0)return f.length;let c=f.length,s=-1;return f.forEach((l,d)=>{const a=e.indexOf(l);a>=0&&a<i&&a>s&&(s=a,c=d+1)}),s<0&&f.some(l=>e.indexOf(l)>i)?0:c})}return r}export function csvFields(n){const o=[];let e=[],t=n.startsWith("\uFEFF")?1:0,u=t,i="",f=!1,c=!1;const s=l=>{e.push({value:i,start:u,end:l,quoted:c}),i="",c=!1};for(;t<n.length;t++){const l=n.charAt(t);if(f){l==='"'?n[t+1]==='"'?(i+='"',t++):f=!1:i+=l;continue}l==='"'?(f=!0,c=!0):l===","?(s(t),u=t+1):l===`
|
|
10
|
+
`||l==="\r"?(s(t),o.push(e),e=[],l==="\r"&&n[t+1]===`
|
|
11
|
+
`&&t++,u=t+1):i+=l}return(i!==""||e.length>0||c)&&(s(n.length),o.push(e)),o.filter(l=>l.some(d=>d.value!==""))}export function csvCell(n,o,e){const[r,...t]=csvFields(n),u=r?.findIndex(i=>i.value.trim()===e)??-1;if(!(u<0))return t[o]?.[u]}const $=/[",\r\n]|^\s|\s$/;export function editCsvCell(n,o,e,r){const t=csvCell(n,o,e);if(!t)throw new Error(`There is no cell ${e} in row ${String(o+1)}.`);const u=t.quoted||$.test(r)?`"${r.replace(/"/g,'""')}"`:r;return n.slice(0,t.start)+u+n.slice(t.end)}export function editableKind(n){if(/\.json$/i.test(n))return"json";if(/\.csv$/i.test(n))return"csv"}export function valueAt(n,o,e){if(n===null)return null;if(editableKind(o)==="csv")return typeof e!="object"||!("row"in e)?null:csvCell(n,e.row,e.column)?.value??null;const t=typeof e=="string"?[e]:"pointer"in e?e.pointer:void 0;return t?readJsonAt(n,t)??null:null}export function applyEdit(n,o,e,r,t,u=[]){const i=editableKind(o);if(!i)return{ok:!1,reason:"invalid",message:`${o} cannot be edited in the preview: only messages and JSON or CSV data files can.`};const f=valueAt(n,o,e);if(!m(f,r??null))return{ok:!1,reason:"conflict",current:f};if(m(f,t??null))return{ok:!0,text:n??""};if(i==="csv")return typeof e!="object"||!("row"in e)?{ok:!1,reason:"invalid",message:"An edit to a CSV file needs { row, column }."}:n===null||t!==null&&typeof t!="string"?{ok:!1,reason:"invalid",message:"A CSV cell can only be text."}:csvCell(n,e.row,e.column)?{ok:!0,text:editCsvCell(n,e.row,e.column,t??"")}:{ok:!1,reason:"invalid",message:`${o} has no cell ${e.column} in row ${String(e.row+1)}.`};if(typeof e=="object"&&"row"in e)return{ok:!1,reason:"invalid",message:"An edit to a JSON file needs a key or { pointer }."};if(n!==null&&p(n)?.type!=="object")return{ok:!1,reason:"invalid",message:`${o} is not a JSON object.`};const c=t===null?void 0:t,s=typeof e=="string"?editJsonKeys(n??"",[{key:e,value:c}],u):editJsonAt(n??"",e.pointer,c);return{ok:!0,text:n===null&&!s.endsWith(`
|
|
12
|
+
`)?`${s}
|
|
13
|
+
`:s}}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { Word } from "./media.js";
|
|
2
|
+
import { type VoiceFrames } from "./voice.js";
|
|
3
|
+
import { WordStream } from "./words.js";
|
|
4
|
+
/** Words removed: indices into the take's words file, inclusive, with their text. */
|
|
5
|
+
export interface EditRange {
|
|
6
|
+
from: number;
|
|
7
|
+
to: number;
|
|
8
|
+
/**
|
|
9
|
+
* The removed words as text: when the words file changes (transcribed
|
|
10
|
+
* again), the range is found again by its text, nearest its old place.
|
|
11
|
+
*/
|
|
12
|
+
text?: string;
|
|
13
|
+
}
|
|
14
|
+
/** A sound removed: its stretch of the take's file, seconds (from `allyhub words`). */
|
|
15
|
+
export interface SoundCut {
|
|
16
|
+
from: number;
|
|
17
|
+
to: number;
|
|
18
|
+
}
|
|
19
|
+
/** An edits file: `edits/<name>.json`. */
|
|
20
|
+
export interface EditList {
|
|
21
|
+
/** Ranges of words to remove. */
|
|
22
|
+
remove?: EditRange[];
|
|
23
|
+
/**
|
|
24
|
+
* Sounds between words to remove, by their stretch of the file. A cut
|
|
25
|
+
* never reaches into a kept word, whatever the stretch says.
|
|
26
|
+
*/
|
|
27
|
+
sounds?: SoundCut[];
|
|
28
|
+
/**
|
|
29
|
+
* Stretches of the file to remove even inside a kept word: a sound
|
|
30
|
+
* attached to a word with no silence between ("so-um"), which `sounds`
|
|
31
|
+
* would never reach. Cut as listed: each end moves only to the quietest
|
|
32
|
+
* 10 ms within 40 ms. Nothing finds these: `allyhub words` measures
|
|
33
|
+
* the words, the choice is the agent's.
|
|
34
|
+
*/
|
|
35
|
+
inWord?: SoundCut[];
|
|
36
|
+
/** Pauses between kept words longer than this many seconds are shortened to it. */
|
|
37
|
+
maxPause?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Seconds of silence kept beside each cut: `before` it, after the last
|
|
40
|
+
* kept word (default PAD_BEFORE, 0.12), and `after` it, before the next
|
|
41
|
+
* kept word (default PAD_AFTER, 0.08). Never past half the silence.
|
|
42
|
+
*/
|
|
43
|
+
pad?: CutPad;
|
|
44
|
+
}
|
|
45
|
+
/** Seconds of silence kept on each side of a cut (EditList.pad). */
|
|
46
|
+
export interface CutPad {
|
|
47
|
+
before?: number;
|
|
48
|
+
after?: number;
|
|
49
|
+
}
|
|
50
|
+
/** A kept stretch of the take's file, in its seconds. */
|
|
51
|
+
export interface KeptRange {
|
|
52
|
+
from: number;
|
|
53
|
+
to: number;
|
|
54
|
+
}
|
|
55
|
+
export interface EditedSpeech {
|
|
56
|
+
/** Kept stretches of the file, in order, from the first kept word's start to the last one's end. */
|
|
57
|
+
ranges: KeptRange[];
|
|
58
|
+
/** The kept words on the edited clock: 0 at the first kept word's start. */
|
|
59
|
+
words: Word[];
|
|
60
|
+
/** Indices (in the words file) of the kept words. */
|
|
61
|
+
kept: number[];
|
|
62
|
+
/** Indices of removed words. */
|
|
63
|
+
removed: number[];
|
|
64
|
+
/** Sounds removed inside the stretch, clamped to the silence between kept words. */
|
|
65
|
+
sounds: SoundCut[];
|
|
66
|
+
/**
|
|
67
|
+
* Stretches cut inside kept speech (`inWord`), as placed, with the kept
|
|
68
|
+
* words each one cuts into.
|
|
69
|
+
*/
|
|
70
|
+
inWord: (SoundCut & {
|
|
71
|
+
words: number[];
|
|
72
|
+
})[];
|
|
73
|
+
/** Pauses shortened: after word index `after`, from `was` seconds to `now`. */
|
|
74
|
+
pauses: {
|
|
75
|
+
after: number;
|
|
76
|
+
was: number;
|
|
77
|
+
now: number;
|
|
78
|
+
}[];
|
|
79
|
+
/** Edit ranges whose words are no longer in the take (AK-T005). */
|
|
80
|
+
lost: EditRange[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Seconds kept into the silence beside a cut when the edits file does not
|
|
84
|
+
* say (`pad`): before the cut (after the word before it), and after it
|
|
85
|
+
* (before the word after it).
|
|
86
|
+
*/
|
|
87
|
+
export declare const PAD_BEFORE = 0.12;
|
|
88
|
+
export declare const PAD_AFTER = 0.08;
|
|
89
|
+
/**
|
|
90
|
+
* Checks a parsed edits file; returns the edit list, or what is wrong with
|
|
91
|
+
* it (one line).
|
|
92
|
+
*/
|
|
93
|
+
export declare function parseEditList(v: unknown): EditList | string;
|
|
94
|
+
/** The text of words [from, to], as an edit range keeps it. */
|
|
95
|
+
export declare function rangeText(words: readonly Word[], from: number, to: number): string;
|
|
96
|
+
/**
|
|
97
|
+
* Where an edit range's words are now: the same indices when their text
|
|
98
|
+
* still matches, else the occurrence of its text nearest its old place;
|
|
99
|
+
* undefined when the take no longer says it.
|
|
100
|
+
*/
|
|
101
|
+
export declare function locateRange(words: readonly Word[], r: EditRange, stream?: WordStream): {
|
|
102
|
+
from: number;
|
|
103
|
+
to: number;
|
|
104
|
+
} | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* The words an edit list removes (indices into the take's words file, each
|
|
107
|
+
* range found again by its text when the file changed), and the ranges the
|
|
108
|
+
* take no longer says.
|
|
109
|
+
*/
|
|
110
|
+
export declare function removedWords(words: readonly Word[], edits: EditList | undefined, stream?: WordStream): {
|
|
111
|
+
cut: Set<number>;
|
|
112
|
+
lost: EditRange[];
|
|
113
|
+
};
|
|
114
|
+
/** The take's level per 10 ms, which cut points snap to. */
|
|
115
|
+
export type CutLevels = Pick<VoiceFrames, "db" | "hop">;
|
|
116
|
+
/**
|
|
117
|
+
* A cut point near `target`, inside [lo, hi]: the quietest 10 ms within
|
|
118
|
+
* SNAP of it when the levels are known, else the target.
|
|
119
|
+
*/
|
|
120
|
+
export declare function snapCut(levels: CutLevels | undefined, target: number, lo: number, hi: number): number;
|
|
121
|
+
/**
|
|
122
|
+
* The take's own sound a part keeps around words [first, last]: before the
|
|
123
|
+
* first and after the last, into the silence there (never past half of it,
|
|
124
|
+
* so never into a neighbouring word; up to half a second before, 0.6 s
|
|
125
|
+
* after), each end at its quietest 10 ms nearby when the levels are known.
|
|
126
|
+
* A recognizer's word times clip consonants, and a part's lead and tail
|
|
127
|
+
* play the take's own room rather than digital silence. Seconds.
|
|
128
|
+
*/
|
|
129
|
+
export declare function speechPads(words: readonly Word[], first: number, last: number, duration: number | undefined, levels?: CutLevels): {
|
|
130
|
+
padIn: number;
|
|
131
|
+
padOut: number;
|
|
132
|
+
};
|
|
133
|
+
/** How cuts are placed: the take's level per 10 ms and the film's frame rate. */
|
|
134
|
+
export interface CutOptions {
|
|
135
|
+
/** Moves each cut point to the quietest moment near it (voice.ts). */
|
|
136
|
+
levels?: CutLevels | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Moves each cut point onto this frame grid, outward into the kept
|
|
139
|
+
* stretch's silence, never into what is removed: picture cuts land on
|
|
140
|
+
* whole frames.
|
|
141
|
+
*/
|
|
142
|
+
fps?: number | undefined;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Applies an edit list to words [first, last] of a take, exactly as
|
|
146
|
+
* listed. Without edits (or with nothing to remove) the result is one
|
|
147
|
+
* stretch from the first word's start to the last one's end.
|
|
148
|
+
*/
|
|
149
|
+
export declare function applyEdits(words: readonly Word[], edits: EditList | undefined, first?: number, last?: number, opts?: CutOptions): EditedSpeech;
|
|
150
|
+
/** Seconds of the edited take: the kept stretches' lengths added up. */
|
|
151
|
+
export declare function editedLength(ranges: readonly KeptRange[]): number;
|
|
152
|
+
/**
|
|
153
|
+
* A moment of the file on the edited clock (0 at the first stretch's
|
|
154
|
+
* start). A moment inside a cut lands where the cut is; before the first
|
|
155
|
+
* stretch or after the last, the clock runs on.
|
|
156
|
+
*/
|
|
157
|
+
export declare function toEdited(ranges: readonly KeptRange[], t: number): number;
|
|
158
|
+
/**
|
|
159
|
+
* The file's moment at a moment of the edited clock: inside a stretch;
|
|
160
|
+
* before the first or after the last, the file runs on from its edge.
|
|
161
|
+
*/
|
|
162
|
+
export declare function fromEdited(ranges: readonly KeptRange[], e: number): number;
|
|
163
|
+
//# sourceMappingURL=edits.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{PAD_MAX as X}from"@allyhub-next/formats";import{quietest as Y}from"./voice.js";import{joinWords as Z,normText as w,WordStream as z}from"./words.js";export const PAD_BEFORE=.12,PAD_AFTER=.08;const $=.04,R=.04,A=e=>Math.round(e*1e3)/1e3,T=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0;export function parseEditList(e){if(typeof e!="object"||e===null||Array.isArray(e))return"an edits file is a JSON object: { version: 1, remove, sounds, inWord, maxPause, pad }";const t=e;if(t.version!==1)return"version is 1";for(const o of["take","$schema"])if(t[o]!==void 0&&typeof t[o]!="string")return`${o} is a string`;const s=Object.keys(t).filter(o=>!["version","remove","sounds","inWord","maxPause","pad","take","$schema"].includes(o));if(s.length>0)return`unknown field${s.length>1?"s":""} ${s.join(", ")} (an edits file has version, remove, sounds, inWord, maxPause, pad and take)`;const f={};if(t.remove!==void 0){if(!Array.isArray(t.remove))return"remove is a list of { from, to, text }";const o=[];for(const[i,k]of t.remove.entries()){const u=k,M=u?.from,m=u?.to,p=u?.text;if(typeof M!="number"||typeof m!="number"||!Number.isInteger(M)||!Number.isInteger(m)||M<0||m<M||p!==void 0&&typeof p!="string")return`remove[${String(i)}] is not { from, to, text } with word indices from ≤ to`;o.push({from:M,to:m,...p===void 0?{}:{text:p}})}f.remove=o}for(const o of["sounds","inWord"]){if(t[o]===void 0)continue;if(!Array.isArray(t[o]))return`${o} is a list of { from, to } in seconds of the take`;const i=[];for(const[k,u]of t[o].entries()){const M=u,m=M?.from,p=M?.to;if(!T(m)||!T(p)||p<=m)return`${o}[${String(k)}] is not { from, to } in seconds with from < to`;i.push({from:m,to:p})}f[o]=i}const a=t.maxPause;if(a!==void 0){if(typeof a!="number"||!Number.isFinite(a)||a<.05||a>10)return"maxPause is seconds, from 0.05 to 10";f.maxPause=a}const r=t.pad;if(r!==void 0){const o=r,i=typeof r=="object"&&o!==null&&!Array.isArray(r),k=i?Object.keys(o).filter(p=>p!=="before"&&p!=="after"):[],u=p=>p===void 0||T(p)&&p<=X;if(!i||k.length>0||!u(o.before)||!u(o.after))return`pad is { before, after }: seconds of silence kept before and after each cut, each from 0 to ${String(X)}`;const M=o.before,m=o.after;f.pad={...M===void 0?{}:{before:M},...m===void 0?{}:{after:m}}}return f}export function rangeText(e,t,s){return Z(e.slice(t,s+1))}export function locateRange(e,t,s=new z(e)){const f=t.from>=0&&t.to<e.length&&t.to>=t.from;if(t.text===void 0)return f?{from:t.from,to:t.to}:void 0;const a=w(t.text);if(a==="")return f?{from:t.from,to:t.to}:void 0;if(f&&w(rangeText(e,t.from,t.to))===a)return{from:t.from,to:t.to};let r;for(let o=1;;o++){const i=s.span(a,0,e.length-1,o);if(!i)break;w(rangeText(e,i.first,i.last))===a&&(!r||Math.abs(i.first-t.from)<Math.abs(r.from-t.from))&&(r={from:i.first,to:i.last})}return r}export function removedWords(e,t,s=new z(e)){const f=new Set,a=[];for(const r of t?.remove??[]){const o=locateRange(e,r,s);if(!o){a.push(r);continue}for(let i=o.from;i<=o.to;i++)f.add(i)}return{cut:f,lost:a}}export function snapCut(e,t,s,f){const a=Math.min(Math.max(t,s),f);return e?Y(e,a,Math.max(s,a-$),Math.min(f,a+$)):a}const tt=.5,ot=.6;export function speechPads(e,t,s,f,a){const r=e[t],o=e[s]??r;if(!r||!o)return{padIn:0,padOut:0};const i=r.start,k=e[t-1]?.end??0,u=e[s+1]?.start??f??o.end+.4,M=Math.max(0,Math.min((i-k)/2,i)),m=Math.max(0,(u-o.end)/2),p=snapCut(a,i-Math.min(tt,M),i-M,i),g=snapCut(a,o.end+Math.min(ot,m),o.end,o.end+m);return{padIn:A(Math.max(0,i-p)),padOut:A(Math.max(0,g-o.end))}}export function applyEdits(e,t,s=0,f=e.length-1,a={}){const{levels:r,fps:o}=a,{cut:i,lost:k}=removedWords(e,t),u=[];for(let n=s;n<=f;n++)i.has(n)||u.push(n);const M=[...i].filter(n=>n>=s&&n<=f).sort((n,c)=>n-c),m=t?.maxPause,p=[],g=[],y=n=>e[n]??{text:"",start:0,end:0};if(u.length===0)return{ranges:[],words:[],kept:u,removed:M,sounds:[],inWord:[],pauses:p,lost:k};const _=[],j=new Map;for(const n of t?.sounds??[])for(let c=0;c<u.length-1;c++){const h=y(u[c]??0),l=y(u[c+1]??0),b=Math.max(n.from,h.end),x=Math.min(n.to,l.start);if(x-b<.01)continue;const d=j.get(c)??[];d.push({start:b,end:x}),j.set(c,d),_.push({from:A(b),to:A(x)})}const F=y(u[0]??0);let O=F.start,W=F.start;const B=t?.pad?.before??PAD_BEFORE,C=t?.pad?.after??PAD_AFTER,H=m===void 0?B:Math.min(B,m/2),K=m===void 0?C:Math.min(C,m/2);for(let n=0;n<u.length-1;n++){const c=u[n]??0,h=u[n+1]??0,l=y(c),b=y(h),x=[];for(let v=c+1;v<h;v++)x.push({start:y(v).start,end:y(v).end});x.push(...j.get(n)??[]),x.sort((v,P)=>v.start-P.start);const d=x[0],N=x.at(-1);if(!d||!N){const v=b.start-l.end;if(m!==void 0&&v>m){const P=snapCut(r,l.end+m/2,l.end,b.start),S=snapCut(r,b.start-m/2,P,b.start);S-P>=R&&(p.push({after:c,was:A(v),now:m}),g.push({from:O,to:P,lo:W,hi:S}),O=S,W=P)}continue}const J=Math.max(0,d.start-l.end),q=Math.max(0,b.start-N.end),U=snapCut(r,l.end+Math.min(H,J/2),l.end,l.end+J/2),V=snapCut(r,b.start-Math.min(K,q/2),b.start-q/2,b.start);g.push({from:O,to:U,lo:W,hi:d.start}),O=Math.max(V,U),W=Math.min(O,N.end)}const D=y(u.at(-1)??0);g.push({from:O,to:D.end,lo:W,hi:D.end});const L=[];for(const n of t?.inWord??[]){const c=(n.from+n.to)/2,h=snapCut(r,n.from,n.from-$,c),l=snapCut(r,n.to,c,n.to+$);if(l-h<R)continue;let b=!1;for(let x=0;x<g.length;x++){const d=g[x];!d||h>=d.to||l<=d.from||(b=!0,h>d.from&&l<d.to?(g.splice(x,1,{from:d.from,to:h,lo:d.lo,hi:h},{from:l,to:d.to,lo:l,hi:d.hi}),x++):h<=d.from&&l>=d.to?(g.splice(x,1),x--):h<=d.from?(d.from=l,d.lo=l):(d.to=h,d.hi=h))}b&&L.push({from:A(h),to:A(l),words:u.filter(x=>y(x).start<l&&y(x).end>h)})}o!==void 0&&o>0&&g.forEach((n,c)=>{if(c>0){const h=Math.floor(n.from*o+1e-6)/o;h>=n.lo-1e-9&&(n.from=h)}if(c<g.length-1){const h=Math.ceil(n.to*o-1e-6)/o;h<=n.hi+1e-9&&(n.to=h)}});const E=[];for(const n of g){const c=E.at(-1);c&&n.from-c.to<R?c.to=Math.max(c.to,n.to):E.push({from:n.from,to:n.to})}const I=E.map(n=>({from:A(n.from),to:A(n.to)})),Q=editedLength(I),G=n=>A(Math.min(Q,Math.max(0,toEdited(I,n))));return{ranges:I,words:u.map(n=>{const c=y(n);return{text:c.text,start:G(c.start),end:G(c.end)}}),kept:u,removed:M,sounds:_,inWord:L,pauses:p,lost:k}}export function editedLength(e){return e.reduce((t,s)=>t+(s.to-s.from),0)}export function toEdited(e,t){let s=0;const f=e[0];if(!f)return t;if(t<=f.from)return t-f.from;for(const r of e){if(t<r.from)return s;if(t<=r.to)return s+(t-r.from);s+=r.to-r.from}const a=e.at(-1)??f;return s+(t-a.to)}export function fromEdited(e,t){const s=e[0];if(!s)return t;if(t<=0)return s.from+t;let f=0;for(const r of e){const o=r.to-r.from;if(t<f+o)return r.from+(t-f);f+=o}return(e.at(-1)??s).to+(t-f)}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { OutputKind } from "./piece.js";
|
|
2
|
+
export declare const FILE_TYPES: {
|
|
3
|
+
readonly mp4: {
|
|
4
|
+
readonly ext: "mp4";
|
|
5
|
+
readonly type: "video/mp4";
|
|
6
|
+
};
|
|
7
|
+
/** ProRes in QuickTime: 4444 with alpha when transparent, else 422 HQ. */
|
|
8
|
+
readonly mov: {
|
|
9
|
+
readonly ext: "mov";
|
|
10
|
+
readonly type: "video/quicktime";
|
|
11
|
+
};
|
|
12
|
+
/** VP9 and Opus; VP9 with alpha when transparent. */
|
|
13
|
+
readonly webm: {
|
|
14
|
+
readonly ext: "webm";
|
|
15
|
+
readonly type: "video/webm";
|
|
16
|
+
};
|
|
17
|
+
readonly gif: {
|
|
18
|
+
readonly ext: "gif";
|
|
19
|
+
readonly type: "image/gif";
|
|
20
|
+
};
|
|
21
|
+
readonly srt: {
|
|
22
|
+
readonly ext: "srt";
|
|
23
|
+
readonly type: "application/x-subrip";
|
|
24
|
+
};
|
|
25
|
+
readonly vtt: {
|
|
26
|
+
readonly ext: "vtt";
|
|
27
|
+
readonly type: "text/vtt";
|
|
28
|
+
};
|
|
29
|
+
readonly cover: {
|
|
30
|
+
readonly ext: "cover.jpg";
|
|
31
|
+
readonly type: "image/jpeg";
|
|
32
|
+
};
|
|
33
|
+
/** The mix, mastered as the render masters it: 48 kHz, 16 bits, the film's length. */
|
|
34
|
+
readonly wav: {
|
|
35
|
+
readonly ext: "wav";
|
|
36
|
+
readonly type: "audio/wav";
|
|
37
|
+
};
|
|
38
|
+
readonly png: {
|
|
39
|
+
readonly ext: "png";
|
|
40
|
+
readonly type: "image/png";
|
|
41
|
+
};
|
|
42
|
+
readonly pdf: {
|
|
43
|
+
readonly ext: "pdf";
|
|
44
|
+
readonly type: "application/pdf";
|
|
45
|
+
};
|
|
46
|
+
readonly pptx: {
|
|
47
|
+
readonly ext: "pptx";
|
|
48
|
+
readonly type: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type FileType = keyof typeof FILE_TYPES;
|
|
52
|
+
export declare function isFileType(v: string): v is FileType;
|
|
53
|
+
/**
|
|
54
|
+
* The one file the platform stores for an export: the
|
|
55
|
+
* file type's own file, except PNG, which `allyhub render` writes a page
|
|
56
|
+
* per file; the platform stores those pages as one zip.
|
|
57
|
+
*/
|
|
58
|
+
export declare function exportFile(type: FileType): {
|
|
59
|
+
ext: string;
|
|
60
|
+
type: string;
|
|
61
|
+
zipped: boolean;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* File types each output kind can be exported as. png is a page per file
|
|
65
|
+
* for a paged output, and a frame per file for a video.
|
|
66
|
+
*/
|
|
67
|
+
export declare const KIND_TYPES: Record<OutputKind, readonly FileType[]>;
|
|
68
|
+
/** What `allyhub render` makes when no file type is asked for. */
|
|
69
|
+
export declare const DEFAULT_TYPES: Record<OutputKind, readonly FileType[]>;
|
|
70
|
+
/** The output item as the check loaded it (only what matters here). */
|
|
71
|
+
export interface ExportTarget {
|
|
72
|
+
kind: OutputKind;
|
|
73
|
+
/** Whether any part says something (has speech). */
|
|
74
|
+
speech?: boolean;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Why a file type can't be made from this output item, if it can't: a
|
|
78
|
+
* type the kind does not have, or captions of an output that says nothing.
|
|
79
|
+
*/
|
|
80
|
+
export declare function exportProblem(target: ExportTarget, type: FileType): {
|
|
81
|
+
code: string;
|
|
82
|
+
message: string;
|
|
83
|
+
hint?: string;
|
|
84
|
+
} | undefined;
|
|
85
|
+
/** Video file types made from the frames (with or without sound). */
|
|
86
|
+
export declare const MOTION_TYPES: readonly FileType[];
|
|
87
|
+
/** File types that keep a transparent stage's alpha. */
|
|
88
|
+
export declare const ALPHA_TYPES: readonly FileType[];
|
|
89
|
+
/**
|
|
90
|
+
* A file's name from a title, as an export takes it: what no system takes
|
|
91
|
+
* in a name (a path's separators, control characters, the characters
|
|
92
|
+
* Windows keeps) becomes a space, a dot or a space at either end goes, and
|
|
93
|
+
* it is at most 120 characters. Empty when nothing is left.
|
|
94
|
+
*/
|
|
95
|
+
export declare function exportStem(title: string): string;
|
|
96
|
+
//# sourceMappingURL=export.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export const FILE_TYPES={mp4:{ext:"mp4",type:"video/mp4"},mov:{ext:"mov",type:"video/quicktime"},webm:{ext:"webm",type:"video/webm"},gif:{ext:"gif",type:"image/gif"},srt:{ext:"srt",type:"application/x-subrip"},vtt:{ext:"vtt",type:"text/vtt"},cover:{ext:"cover.jpg",type:"image/jpeg"},wav:{ext:"wav",type:"audio/wav"},png:{ext:"png",type:"image/png"},pdf:{ext:"pdf",type:"application/pdf"},pptx:{ext:"pptx",type:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}};export function isFileType(e){return Object.hasOwn(FILE_TYPES,e)}export function exportFile(e){return e==="png"?{ext:"png.zip",type:"application/zip",zipped:!0}:{...FILE_TYPES[e],zipped:!1}}export const KIND_TYPES={video:["mp4","mov","webm","gif","png","srt","vtt","cover","wav","pdf","pptx"],paged:["png","pdf","pptx"]},DEFAULT_TYPES={video:["mp4"],paged:["pdf"]};export function exportProblem(e,t){const p=KIND_TYPES[e.kind];if(!p.includes(t))return{code:"bad_type",message:`A ${e.kind} output cannot be exported as ${t}.`,hint:`Choose one of: ${p.join(", ")}`};if((t==="srt"||t==="vtt")&&e.speech!==!0)return{code:"no_speech",message:"No part of this output says anything, so it has no captions to export.",hint:'Give parts speech: speech: take("./take.mp4") or say(s("…")).'}}export const MOTION_TYPES=["mp4","mov","webm","gif"],ALPHA_TYPES=["mov","webm","png"];export function exportStem(e){const t=p=>p.replace(/^[. ]+|[. ]+$/gu,"");return t(t(e.normalize("NFC").replace(/[\u0000-\u001f\u007f/\\:*?"<>|]+/gu," ").replace(/\s+/gu," ")).slice(0,120))}
|