@allyhub/sdk 0.1.0-alpha.7 → 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,352 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A video format: a preset or even WxH pixels. */
|
|
3
|
+
export declare const VideoFormatSchema: z.ZodString & z.ZodType<import("./formats.js").VideoFormat, string, z.core.$ZodTypeInternals<import("./formats.js").VideoFormat, string>>;
|
|
4
|
+
export declare const ComboSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
5
|
+
export declare const ProblemSchema: z.ZodObject<{
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
level: z.ZodEnum<{
|
|
8
|
+
error: "error";
|
|
9
|
+
warn: "warn";
|
|
10
|
+
}>;
|
|
11
|
+
message: z.ZodString;
|
|
12
|
+
piece: z.ZodOptional<z.ZodString>;
|
|
13
|
+
output: z.ZodOptional<z.ZodString>;
|
|
14
|
+
combo: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
|
+
format: z.ZodOptional<z.ZodString>;
|
|
16
|
+
part: z.ZodOptional<z.ZodString>;
|
|
17
|
+
t: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
where: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
file: z.ZodOptional<z.ZodString>;
|
|
21
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
23
|
+
bbox: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
24
|
+
}, z.core.$strict>>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export declare const Locale: z.ZodString;
|
|
27
|
+
export declare const PieceId: z.ZodString;
|
|
28
|
+
export declare const DimName: z.ZodString;
|
|
29
|
+
export declare const DimValue: z.ZodString;
|
|
30
|
+
export declare const OutputName: z.ZodString;
|
|
31
|
+
export declare const DimsSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
32
|
+
export declare const CandidateSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
+
}, z.core.$strict>]>;
|
|
36
|
+
export declare const SlotSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
|
+
}, z.core.$strict>]>>, z.ZodObject<{
|
|
40
|
+
pool: z.ZodString;
|
|
41
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
}, z.core.$strict>]>;
|
|
43
|
+
/** A piece's `matrix`: plain data. */
|
|
44
|
+
export declare const MatrixSchema: z.ZodObject<{
|
|
45
|
+
dims: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
46
|
+
slots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
|
+
}, z.core.$strict>]>>, z.ZodObject<{
|
|
50
|
+
pool: z.ZodString;
|
|
51
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
}, z.core.$strict>]>>>;
|
|
53
|
+
structures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
54
|
+
combos: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
55
|
+
pick: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
seed: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
57
|
+
differ: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
slots: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
first: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodString>]>>;
|
|
60
|
+
}, z.core.$strict>>;
|
|
61
|
+
rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
62
|
+
if: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
63
|
+
require: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
64
|
+
exclude: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
65
|
+
}, z.core.$strict>>>;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
/**
|
|
68
|
+
* A format with its numbers changed ({ format, safe, maxDuration,
|
|
69
|
+
* loudness }). Its `format` is any string here, like a name in `formats`
|
|
70
|
+
* (AK-G001 says when it is not one); the rest is checked here.
|
|
71
|
+
*/
|
|
72
|
+
export declare const FormatSpecSchema: z.ZodObject<{
|
|
73
|
+
format: z.ZodString;
|
|
74
|
+
safe: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
maxDuration: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
loudness: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
}, z.core.$strict>;
|
|
83
|
+
/** A piece's format: a format's name, or a format with its numbers changed. */
|
|
84
|
+
export declare const FormatEntrySchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
85
|
+
format: z.ZodString;
|
|
86
|
+
safe: z.ZodOptional<z.ZodObject<{
|
|
87
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
}, z.core.$strict>>;
|
|
92
|
+
maxDuration: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
loudness: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
}, z.core.$strict>]>;
|
|
95
|
+
/** Part defaults: a silent part's length, a voiced part's lead and tail (seconds). */
|
|
96
|
+
export declare const PartDefaultsSchema: z.ZodObject<{
|
|
97
|
+
dur: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
lead: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
tail: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
export declare const VideoOptionsMeta: z.ZodObject<{
|
|
102
|
+
music: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
file: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
104
|
+
from: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
loop: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
106
|
+
from: z.ZodUnknown;
|
|
107
|
+
to: z.ZodUnknown;
|
|
108
|
+
}, z.core.$strict>]>>;
|
|
109
|
+
play: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
110
|
+
from: z.ZodUnknown;
|
|
111
|
+
to: z.ZodUnknown;
|
|
112
|
+
}, z.core.$strict>>>;
|
|
113
|
+
seam: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
meter: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
downbeat: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
end: z.ZodOptional<z.ZodEnum<{
|
|
117
|
+
beat: "beat";
|
|
118
|
+
bar: "bar";
|
|
119
|
+
film: "film";
|
|
120
|
+
}>>;
|
|
121
|
+
snap: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
bpm: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
gain: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
124
|
+
at: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodObject<{
|
|
125
|
+
part: z.ZodString;
|
|
126
|
+
at: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
127
|
+
}, z.core.$strict>]>;
|
|
128
|
+
db: z.ZodNumber;
|
|
129
|
+
}, z.core.$strict>>>;
|
|
130
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
131
|
+
eq: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
132
|
+
compress: z.ZodOptional<z.ZodUnknown>;
|
|
133
|
+
}, z.core.$strict>>;
|
|
134
|
+
mix: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
speech: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
music: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
musicAlone: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
sfx: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
footage: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
footageUnderSpeech: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
duck: z.ZodOptional<z.ZodObject<{
|
|
142
|
+
db: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
attack: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
release: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
hold: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
}, z.core.$strict>>;
|
|
147
|
+
musicFade: z.ZodOptional<z.ZodObject<{
|
|
148
|
+
in: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
out: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
}, z.core.$strict>>;
|
|
151
|
+
}, z.core.$strict>>;
|
|
152
|
+
mic: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodLiteral<false>]>>;
|
|
153
|
+
look: z.ZodOptional<z.ZodString>;
|
|
154
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
155
|
+
part: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
dur: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
lead: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
tail: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
}, z.core.$strict>>;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
covers: z.ZodOptional<z.ZodLiteral<true>>;
|
|
162
|
+
fps: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
163
|
+
transparent: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
maxDuration: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
loadLimit: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
seekLimit: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
deliverable: z.ZodOptional<z.ZodBoolean>;
|
|
168
|
+
master: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<false>, z.ZodObject<{
|
|
169
|
+
lufs: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<false>]>>;
|
|
170
|
+
truePeak: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
}, z.core.$strict>]>>;
|
|
172
|
+
motionBlur: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
samples: z.ZodNumber;
|
|
174
|
+
shutter: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
}, z.core.$strict>>;
|
|
176
|
+
capture: z.ZodOptional<z.ZodObject<{
|
|
177
|
+
bloom: z.ZodOptional<z.ZodObject<{
|
|
178
|
+
threshold: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
radius: z.ZodOptional<z.ZodNumber>;
|
|
180
|
+
strength: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
}, z.core.$strict>>;
|
|
182
|
+
aberration: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
soften: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
vignette: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
exposure: z.ZodOptional<z.ZodObject<{
|
|
186
|
+
drift: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
period: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
}, z.core.$strict>>;
|
|
189
|
+
grain: z.ZodOptional<z.ZodObject<{
|
|
190
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
shadows: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
highlights: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
chroma: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
chromaSize: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
static: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
}, z.core.$strict>>;
|
|
198
|
+
sharpen: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
}, z.core.$strict>>;
|
|
200
|
+
post: z.ZodOptional<z.ZodObject<{
|
|
201
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
202
|
+
lut: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strict>>;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
export type VideoOptionsMeta = z.infer<typeof VideoOptionsMeta>;
|
|
206
|
+
export declare const OutputMeta: z.ZodObject<{
|
|
207
|
+
kind: z.ZodEnum<{
|
|
208
|
+
video: "video";
|
|
209
|
+
paged: "paged";
|
|
210
|
+
}>;
|
|
211
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
212
|
+
}, z.core.$strict>;
|
|
213
|
+
export type OutputMeta = z.infer<typeof OutputMeta>;
|
|
214
|
+
export declare const PieceMeta: z.ZodObject<{
|
|
215
|
+
id: z.ZodOptional<z.ZodString>;
|
|
216
|
+
title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
217
|
+
format: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
218
|
+
format: z.ZodString;
|
|
219
|
+
safe: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
}, z.core.$strict>>;
|
|
225
|
+
maxDuration: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
loudness: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
}, z.core.$strict>]>>;
|
|
228
|
+
matrix: z.ZodOptional<z.ZodObject<{
|
|
229
|
+
dims: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
230
|
+
slots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
231
|
+
name: z.ZodString;
|
|
232
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
233
|
+
}, z.core.$strict>]>>, z.ZodObject<{
|
|
234
|
+
pool: z.ZodString;
|
|
235
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
236
|
+
}, z.core.$strict>]>>>;
|
|
237
|
+
structures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
238
|
+
combos: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
239
|
+
pick: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
seed: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
241
|
+
differ: z.ZodOptional<z.ZodObject<{
|
|
242
|
+
slots: z.ZodOptional<z.ZodNumber>;
|
|
243
|
+
first: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodString>]>>;
|
|
244
|
+
}, z.core.$strict>>;
|
|
245
|
+
rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
246
|
+
if: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
247
|
+
require: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
248
|
+
exclude: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
249
|
+
}, z.core.$strict>>>;
|
|
250
|
+
}, z.core.$strict>>;
|
|
251
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
252
|
+
outputs: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
253
|
+
kind: z.ZodEnum<{
|
|
254
|
+
video: "video";
|
|
255
|
+
paged: "paged";
|
|
256
|
+
}>;
|
|
257
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
258
|
+
}, z.core.$strict>>;
|
|
259
|
+
}, z.core.$strict>;
|
|
260
|
+
export type PieceMeta = z.infer<typeof PieceMeta>;
|
|
261
|
+
/**
|
|
262
|
+
* The brand's colours, fonts, beat and sounds a project gives every video
|
|
263
|
+
* and deck, over the clean look (look.ts's LookConfig). allyhub.config.ts
|
|
264
|
+
* holds it once its schema in @allyhub-next/formats names it.
|
|
265
|
+
*/
|
|
266
|
+
export declare const LookConfigSchema: z.ZodObject<{
|
|
267
|
+
color: z.ZodOptional<z.ZodObject<{
|
|
268
|
+
bg: z.ZodOptional<z.ZodString>;
|
|
269
|
+
fg: z.ZodOptional<z.ZodString>;
|
|
270
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
271
|
+
muted: z.ZodOptional<z.ZodString>;
|
|
272
|
+
surface: z.ZodOptional<z.ZodString>;
|
|
273
|
+
}, z.core.$strict>>;
|
|
274
|
+
font: z.ZodOptional<z.ZodObject<{
|
|
275
|
+
display: z.ZodOptional<z.ZodString>;
|
|
276
|
+
body: z.ZodOptional<z.ZodString>;
|
|
277
|
+
mono: z.ZodOptional<z.ZodString>;
|
|
278
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strict>>;
|
|
280
|
+
motion: z.ZodOptional<z.ZodObject<{
|
|
281
|
+
beat: z.ZodOptional<z.ZodNumber>;
|
|
282
|
+
}, z.core.$strict>>;
|
|
283
|
+
sfx: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
284
|
+
}, z.core.$strict>;
|
|
285
|
+
export declare const PropSchemaEntry: z.ZodObject<{
|
|
286
|
+
type: z.ZodEnum<{
|
|
287
|
+
number: "number";
|
|
288
|
+
boolean: "boolean";
|
|
289
|
+
object: "object";
|
|
290
|
+
text: "text";
|
|
291
|
+
color: "color";
|
|
292
|
+
list: "list";
|
|
293
|
+
time: "time";
|
|
294
|
+
asset: "asset";
|
|
295
|
+
}>;
|
|
296
|
+
}, z.core.$loose>;
|
|
297
|
+
export declare const ComponentEntry: z.ZodObject<{
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
300
|
+
file: z.ZodString;
|
|
301
|
+
props: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
302
|
+
type: z.ZodEnum<{
|
|
303
|
+
number: "number";
|
|
304
|
+
boolean: "boolean";
|
|
305
|
+
object: "object";
|
|
306
|
+
text: "text";
|
|
307
|
+
color: "color";
|
|
308
|
+
list: "list";
|
|
309
|
+
time: "time";
|
|
310
|
+
asset: "asset";
|
|
311
|
+
}>;
|
|
312
|
+
}, z.core.$loose>>;
|
|
313
|
+
examples: z.ZodArray<z.ZodString>;
|
|
314
|
+
hidden: z.ZodBoolean;
|
|
315
|
+
}, z.core.$strict>;
|
|
316
|
+
export type ComponentEntry = z.infer<typeof ComponentEntry>;
|
|
317
|
+
/**
|
|
318
|
+
* The video module's part of allyhub.config.ts (whose own schema, in
|
|
319
|
+
* @allyhub-next/formats, leaves `look` and `defaults` to it): the look
|
|
320
|
+
* every video and deck starts from, and what every video starts from.
|
|
321
|
+
*/
|
|
322
|
+
export declare const VideoConfigSchema: z.ZodObject<{
|
|
323
|
+
look: z.ZodOptional<z.ZodObject<{
|
|
324
|
+
color: z.ZodOptional<z.ZodObject<{
|
|
325
|
+
bg: z.ZodOptional<z.ZodString>;
|
|
326
|
+
fg: z.ZodOptional<z.ZodString>;
|
|
327
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
328
|
+
muted: z.ZodOptional<z.ZodString>;
|
|
329
|
+
surface: z.ZodOptional<z.ZodString>;
|
|
330
|
+
}, z.core.$strict>>;
|
|
331
|
+
font: z.ZodOptional<z.ZodObject<{
|
|
332
|
+
display: z.ZodOptional<z.ZodString>;
|
|
333
|
+
body: z.ZodOptional<z.ZodString>;
|
|
334
|
+
mono: z.ZodOptional<z.ZodString>;
|
|
335
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strict>>;
|
|
337
|
+
motion: z.ZodOptional<z.ZodObject<{
|
|
338
|
+
beat: z.ZodOptional<z.ZodNumber>;
|
|
339
|
+
}, z.core.$strict>>;
|
|
340
|
+
sfx: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
341
|
+
}, z.core.$strict>>;
|
|
342
|
+
defaults: z.ZodOptional<z.ZodObject<{
|
|
343
|
+
format: z.ZodOptional<z.ZodString & z.ZodType<import("./formats.js").VideoFormat, string, z.core.$ZodTypeInternals<import("./formats.js").VideoFormat, string>>>;
|
|
344
|
+
part: z.ZodOptional<z.ZodObject<{
|
|
345
|
+
dur: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
lead: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
tail: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
}, z.core.$strict>>;
|
|
349
|
+
}, z.core.$strict>>;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
export type VideoConfig = z.infer<typeof VideoConfigSchema>;
|
|
352
|
+
//# sourceMappingURL=schema.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{z as t}from"zod";import{LOCALE as m}from"./messages.js";import{OUTPUT_KINDS as u}from"./piece.js";import{musicTimeProblem as b}from"./music.js";import{FPS_HELP as d,VIDEO_FORMAT_HELP as g,formatSpecProblem as f,isVideoFormat as h,parseFps as x}from"./formats.js";import{RESERVED_DIMS as l}from"./matrix.js";export const VideoFormatSchema=t.string().refine(h,{message:`unknown format (${g})`}),ComboSchema=t.record(t.string(),t.string()),ProblemSchema=t.strictObject({code:t.string().regex(/^AK-[A-Z]\d{3}$/),level:t.enum(["error","warn"]),message:t.string(),piece:t.string().optional(),output:t.string().optional(),combo:ComboSchema.optional(),format:t.string().optional(),part:t.string().optional(),t:t.number().optional(),page:t.number().int().nonnegative().optional(),where:t.strictObject({file:t.string().optional(),line:t.number().int().optional(),selector:t.string().optional(),bbox:t.tuple([t.number(),t.number(),t.number(),t.number()]).optional()}).optional()}),Locale=t.string().regex(m,"must be a lower-case locale such as en or zh-cn"),PieceId=t.string().regex(/^[a-z0-9][a-z0-9._-]*(\/[a-z0-9][a-z0-9._-]*)*$/,"id: lowercase letters, digits, . _ -, with / between levels"),DimName=t.string().regex(/^[a-z][a-zA-Z0-9_-]*$/,"dimension name: starts with a letter; letters, digits, _ and -"),DimValue=t.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/,"dimension value: letters, digits, . _ -"),OutputName=t.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/,"output name: starts with a letter; letters, digits, _ and -"),DimsSchema=t.record(DimName,t.array(DimValue).min(1)).superRefine((o,e)=>{for(const[n,a]of Object.entries(o)){if(l.includes(n)){e.addIssue({code:"custom",path:[n],message:n==="size"||n==="format"?`${n} is not a dimension: a piece has one format, format: "9x16", and another format is a piece of its own`:`${n} cannot name a dimension: the preview's address uses it. Choose another name`});continue}if(new Set(a).size!==a.length&&e.addIssue({code:"custom",path:[n],message:"the same value is listed twice"}),n==="lang")for(const s of a)m.test(s)||e.addIssue({code:"custom",path:[n],message:`lang value ${s} must be a lowercase language tag, such as en or zh-cn`})}});const O=o=>l.includes(o)?`${o} cannot name a slot: the framework uses it. Choose another name`:void 0;export const CandidateSchema=t.union([DimValue,t.strictObject({name:DimValue,tags:t.array(t.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]*$/)).optional()})]),SlotSchema=t.union([t.array(CandidateSchema).min(1),t.strictObject({pool:t.string().min(1),tags:t.array(t.string().min(1)).optional()})]);const j=t.union([t.string().min(1),t.array(t.string().min(1)).min(1)]),r=t.record(t.string(),j);export const MatrixSchema=t.strictObject({dims:DimsSchema.optional(),slots:t.record(DimName,SlotSchema).optional(),structures:t.record(DimValue,t.array(DimName).min(1)).optional(),combos:t.array(t.record(DimName,DimValue)).min(1).max(1e4).optional(),pick:t.number().int().min(1).max(1e4).optional(),seed:t.union([t.number(),t.string()]).optional(),differ:t.strictObject({slots:t.number().int().min(1).optional(),first:t.union([t.number().int().min(1),t.array(DimName).min(1)]).optional()}).optional(),rules:t.array(t.strictObject({if:r.optional(),require:r.optional(),exclude:r.optional()})).optional()}).superRefine((o,e)=>{for(const n of Object.keys(o.slots??{})){const a=O(n);a&&e.addIssue({code:"custom",path:["slots",n],message:a})}if(o.structures&&!o.slots&&e.addIssue({code:"custom",path:["structures"],message:"structures order slots: declare matrix.slots too"}),o.combos&&!o.slots&&e.addIssue({code:"custom",path:["combos"],message:"combos choose candidates of slots: declare matrix.slots too"}),o.combos)for(const n of["pick","seed"])o[n]!==void 0&&e.addIssue({code:"custom",path:[n],message:`combos names the combos to make, so nothing is sampled: remove ${n}, which only steers sampling`})}),FormatSpecSchema=t.strictObject({format:t.string().min(1),safe:t.strictObject({top:t.number().optional(),bottom:t.number().optional(),left:t.number().optional(),right:t.number().optional()}).optional(),maxDuration:t.number().positive().optional(),loudness:t.number().min(-70).max(0).optional()}).superRefine((o,e)=>{const n=f(o);n&&e.addIssue({code:"custom",message:n})}),FormatEntrySchema=t.union([t.string().min(1),FormatSpecSchema]);const i=t.number().min(-70).max(0),c=t.unknown().superRefine((o,e)=>{const n=b(o);n&&e.addIssue({code:"custom",message:n})}),p=t.strictObject({from:c,to:c}),S=t.union([t.number().min(0),t.string().min(1),t.strictObject({part:t.string().min(1),at:t.union([t.number(),t.string().min(1)])})]);export const PartDefaultsSchema=t.strictObject({dur:t.number().positive().max(3600).optional(),lead:t.number().min(0).max(60).optional(),tail:t.number().min(0).max(60).optional()}),VideoOptionsMeta=t.strictObject({music:t.strictObject({file:t.union([t.string().min(1),t.record(Locale,t.string().min(1))]).optional(),from:t.number().min(0).optional(),loop:t.union([t.boolean(),p]).optional(),play:t.array(p).min(1).optional(),seam:t.number().min(0).max(5).optional(),meter:t.number().int().min(1).max(32).optional(),downbeat:t.number().min(0).optional(),end:t.enum(["film","bar","beat"]).optional(),snap:t.boolean().optional(),bpm:t.number().min(20).max(400).optional(),gain:t.array(t.strictObject({at:S,db:t.number().min(-60).max(24)})).min(1).optional(),filter:t.string().min(1).optional(),eq:t.array(t.unknown()).optional(),compress:t.unknown().optional()}).optional(),mix:t.strictObject({speech:i.optional(),music:i.optional(),musicAlone:i.optional(),sfx:i.optional(),footage:i.optional(),footageUnderSpeech:i.optional(),duck:t.strictObject({db:t.number().min(-60).max(0).optional(),attack:t.number().min(0).max(10).optional(),release:t.number().min(0).max(10).optional(),hold:t.number().min(0).max(60).optional()}).optional(),musicFade:t.strictObject({in:t.number().min(0).max(60).optional(),out:t.number().min(0).max(60).optional()}).optional()}).optional(),mic:t.union([t.string().min(1),t.record(t.string(),t.unknown()),t.literal(!1)]).optional(),look:t.string().min(1).optional(),defaults:t.strictObject({part:PartDefaultsSchema.optional()}).optional(),covers:t.literal(!0).optional(),fps:t.union([t.number(),t.string()]).refine(o=>x(o)!==void 0,{error:`A frame rate is ${d}`}).optional(),transparent:t.boolean().optional(),maxDuration:t.number().positive().optional(),loadLimit:t.number().positive().optional(),seekLimit:t.number().positive().optional(),deliverable:t.boolean().optional(),master:t.union([i,t.literal(!1),t.strictObject({lufs:t.union([i,t.literal(!1)]).optional(),truePeak:t.number().min(-9).max(0).optional()})]).optional(),motionBlur:t.strictObject({samples:t.number().int().min(2).max(16),shutter:t.number().gt(0).max(1).optional()}).optional(),capture:t.strictObject({bloom:t.strictObject({threshold:t.number().optional(),radius:t.number().optional(),strength:t.number().optional()}).optional(),aberration:t.number().optional(),soften:t.number().optional(),vignette:t.number().optional(),exposure:t.strictObject({drift:t.number().optional(),period:t.number().optional()}).optional(),grain:t.strictObject({amount:t.number().optional(),size:t.number().optional(),shadows:t.number().optional(),highlights:t.number().optional(),chroma:t.number().optional(),chromaSize:t.number().optional(),static:t.boolean().optional()}).optional(),sharpen:t.number().optional()}).optional(),post:t.strictObject({filter:t.string().min(1).optional(),lut:t.string().regex(/\.cube$/i,"A LUT is a .cube file").optional()}).optional()}),OutputMeta=t.strictObject({kind:t.enum(u),options:t.record(t.string(),t.unknown())}),PieceMeta=t.strictObject({id:PieceId.optional(),title:t.union([t.string().min(1),t.record(Locale,t.string().min(1))]).optional(),format:FormatEntrySchema.optional(),matrix:MatrixSchema.optional(),meta:t.record(t.string(),t.unknown()).optional(),outputs:t.record(OutputName,OutputMeta).refine(o=>Object.keys(o).length>0,"outputs needs at least one output")}),LookConfigSchema=t.strictObject({color:t.strictObject({bg:t.string().min(1).optional(),fg:t.string().min(1).optional(),accent:t.string().min(1).optional(),muted:t.string().min(1).optional(),surface:t.string().min(1).optional()}).optional(),font:t.strictObject({display:t.string().min(1).optional(),body:t.string().min(1).optional(),mono:t.string().min(1).optional(),emoji:t.string().min(1).optional()}).optional(),motion:t.strictObject({beat:t.number().positive().optional()}).optional(),sfx:t.record(t.string().regex(/^[a-z][a-z0-9-]*$/,"a sound's name: lowercase letters, digits and -"),t.string().min(1).refine(o=>!o.startsWith("/")&&!o.split(/[\\/]/).includes(".."),"a sound is an audio file relative to the workspace's root")).optional()}),PropSchemaEntry=t.looseObject({type:t.enum(["text","time","asset","color","number","boolean","list","object"])}),ComponentEntry=t.strictObject({name:t.string(),label:t.union([t.string(),t.record(t.string(),t.string())]),file:t.string(),props:t.record(t.string(),PropSchemaEntry),examples:t.array(t.string()),hidden:t.boolean()}),VideoConfigSchema=t.object({look:LookConfigSchema.optional(),defaults:t.strictObject({format:VideoFormatSchema.optional(),part:PartDefaultsSchema.optional()}).optional()});
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { type SpokenSpan, type TextAnchor } from "./anchors.js";
|
|
2
|
+
import type { ScriptFile, ScriptPart, ScriptText } from "./script.js";
|
|
3
|
+
/** A text of a row, by where it is: "say", "screen.items.0", "screen.price.display". */
|
|
4
|
+
export interface FieldText {
|
|
5
|
+
field: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Every text of a row a person can read and change, in the row's order:
|
|
10
|
+
* what it says, what it shows. A plural or a selection is left
|
|
11
|
+
* out: its cases are the agent's to write.
|
|
12
|
+
*/
|
|
13
|
+
export declare function partTexts(part: ScriptPart): FieldText[];
|
|
14
|
+
/** The item's own texts (`text`), the same way: "text.url". */
|
|
15
|
+
export declare function itemTexts(script: ScriptFile): FieldText[];
|
|
16
|
+
/** The row with one of its texts changed ("say", "screen.line1"…). */
|
|
17
|
+
export declare function setPartText(part: ScriptPart, field: string, value: string): ScriptPart;
|
|
18
|
+
/** The script with one of the item's own texts changed ("text.url"). */
|
|
19
|
+
export declare function setItemText(script: ScriptFile, field: string, value: string): ScriptFile;
|
|
20
|
+
/** An id no row of either script has: new-1, new-2… The agent names it. */
|
|
21
|
+
export declare function newPartId(...scripts: readonly ScriptFile[]): string;
|
|
22
|
+
/** A row's spoken text, as a field of the row. */
|
|
23
|
+
export declare const SAY = "say";
|
|
24
|
+
/** What a row says, as the words a person edits: as shown, no anchors. */
|
|
25
|
+
export declare const saidText: (part: ScriptPart) => string | undefined;
|
|
26
|
+
/** The anchors of what a row says, by their place in saidText. */
|
|
27
|
+
export declare const saidAnchors: (part: ScriptPart) => TextAnchor[];
|
|
28
|
+
/** The pieces of what a row says that are said another way than shown. */
|
|
29
|
+
export declare const saidSpans: (part: ScriptPart) => SpokenSpan[];
|
|
30
|
+
/** What a row reads aloud, for how long it takes: its line as said. */
|
|
31
|
+
export declare const spokenText: (part: ScriptPart) => string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Where a row the draft removed sits among `rows`: before the next row of
|
|
34
|
+
* the script that is still there, else after the last one. New rows the
|
|
35
|
+
* person put before it stay before it.
|
|
36
|
+
*/
|
|
37
|
+
export declare function placeOfRemoved(rows: readonly {
|
|
38
|
+
id: string;
|
|
39
|
+
}[], base: ScriptFile, id: string): number;
|
|
40
|
+
/** A place in what a row says: the row, and how many characters in. */
|
|
41
|
+
export interface ScriptCaret {
|
|
42
|
+
id: string;
|
|
43
|
+
offset: number;
|
|
44
|
+
}
|
|
45
|
+
/** The draft's edits, each a new draft. */
|
|
46
|
+
export declare const draftEdit: {
|
|
47
|
+
/**
|
|
48
|
+
* One text of a row. What it says is given as words alone: its anchors
|
|
49
|
+
* stay with the words the old and the new text share.
|
|
50
|
+
*/
|
|
51
|
+
text: (draft: ScriptFile, id: string, field: string, value: string) => ScriptFile;
|
|
52
|
+
title: (draft: ScriptFile, value: string) => ScriptFile;
|
|
53
|
+
remove: (draft: ScriptFile, id: string) => ScriptFile;
|
|
54
|
+
/**
|
|
55
|
+
* Puts a row of the script back where it was, as near as the draft
|
|
56
|
+
* allows: before the next row of the script the draft still has, else last.
|
|
57
|
+
*/
|
|
58
|
+
restore(draft: ScriptFile, base: ScriptFile, id: string): ScriptFile;
|
|
59
|
+
/** A new, empty row after `after` (first when undefined). */
|
|
60
|
+
add(draft: ScriptFile, base: ScriptFile, after: string | undefined): {
|
|
61
|
+
script: {
|
|
62
|
+
parts: ScriptPart[];
|
|
63
|
+
title?: string;
|
|
64
|
+
text?: Record<string, ScriptText>;
|
|
65
|
+
};
|
|
66
|
+
id: string;
|
|
67
|
+
};
|
|
68
|
+
/** Text typed or pasted into what a row says, at a place in it. */
|
|
69
|
+
insert(draft: ScriptFile, at: ScriptCaret, text: string): {
|
|
70
|
+
script: ScriptFile;
|
|
71
|
+
caret: ScriptCaret;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Text typed over a selection. Within one row it is one change, so an
|
|
75
|
+
* anchor on a word that is typed over stays on the word that takes its
|
|
76
|
+
* place; across rows, the selection is cut and the text typed where the
|
|
77
|
+
* rows now join.
|
|
78
|
+
*/
|
|
79
|
+
replace(draft: ScriptFile, a: ScriptCaret, b: ScriptCaret, text: string): {
|
|
80
|
+
script: ScriptFile;
|
|
81
|
+
caret: ScriptCaret;
|
|
82
|
+
} | {
|
|
83
|
+
script: {
|
|
84
|
+
parts: ScriptPart[];
|
|
85
|
+
title?: string;
|
|
86
|
+
text?: Record<string, ScriptText>;
|
|
87
|
+
};
|
|
88
|
+
caret: undefined;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* What a selection covers, removed: within one row, those characters;
|
|
92
|
+
* across rows, the end of the first row's words, every row between, and
|
|
93
|
+
* the start of the last row's. A row the selection covers from its first
|
|
94
|
+
* character goes whole, and so does a last row covered to its end. The
|
|
95
|
+
* two rows left stay two rows. `caret` is where the text now joins.
|
|
96
|
+
*/
|
|
97
|
+
cut(draft: ScriptFile, a: ScriptCaret, b: ScriptCaret): {
|
|
98
|
+
script: {
|
|
99
|
+
parts: ScriptPart[];
|
|
100
|
+
title?: string;
|
|
101
|
+
text?: Record<string, ScriptText>;
|
|
102
|
+
};
|
|
103
|
+
caret: {
|
|
104
|
+
id: string;
|
|
105
|
+
offset: number;
|
|
106
|
+
} | undefined;
|
|
107
|
+
};
|
|
108
|
+
/** A row one place up (-1) or down (1). */
|
|
109
|
+
move(draft: ScriptFile, id: string, by: -1 | 1): ScriptFile;
|
|
110
|
+
/**
|
|
111
|
+
* A row cut in two at `offset` of what it says: the row keeps the words
|
|
112
|
+
* before, a new row after it says the rest.
|
|
113
|
+
*/
|
|
114
|
+
split(draft: ScriptFile, base: ScriptFile, id: string, offset: number): {
|
|
115
|
+
script: ScriptFile;
|
|
116
|
+
id: undefined;
|
|
117
|
+
} | {
|
|
118
|
+
script: {
|
|
119
|
+
parts: ScriptPart[];
|
|
120
|
+
title?: string;
|
|
121
|
+
text?: Record<string, ScriptText>;
|
|
122
|
+
};
|
|
123
|
+
id: string;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* A row's words joined to the row before it (or to the row `into`, when
|
|
127
|
+
* rows that say nothing lie between); the row itself goes.
|
|
128
|
+
*/
|
|
129
|
+
merge(draft: ScriptFile, id: string, into?: string): ScriptFile;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* The script with a row for every part of the video, in the video's order
|
|
133
|
+
* where the script has none: an empty row after the row of the nearest
|
|
134
|
+
* part before it. A part that only shows footage or says a recording has
|
|
135
|
+
* no words in the script, and is still a part a person can cut, move or
|
|
136
|
+
* give words to.
|
|
137
|
+
*/
|
|
138
|
+
export declare function withVideoParts(script: ScriptFile, keys: readonly string[]): ScriptFile;
|
|
139
|
+
export type ScriptChange = {
|
|
140
|
+
kind: "title";
|
|
141
|
+
before?: string;
|
|
142
|
+
after?: string;
|
|
143
|
+
}
|
|
144
|
+
/** One text: of a row (`part`), or the item's own. */
|
|
145
|
+
| {
|
|
146
|
+
kind: "text";
|
|
147
|
+
part?: string;
|
|
148
|
+
field: string;
|
|
149
|
+
before?: string;
|
|
150
|
+
after?: string;
|
|
151
|
+
} | {
|
|
152
|
+
kind: "remove";
|
|
153
|
+
part: string;
|
|
154
|
+
said?: string;
|
|
155
|
+
}
|
|
156
|
+
/** A new row, after `after` (first when absent), with its texts. */
|
|
157
|
+
| {
|
|
158
|
+
kind: "add";
|
|
159
|
+
part: string;
|
|
160
|
+
after?: string;
|
|
161
|
+
texts: FieldText[];
|
|
162
|
+
}
|
|
163
|
+
/** A row that changed places: now after `after` (first when absent). */
|
|
164
|
+
| {
|
|
165
|
+
kind: "move";
|
|
166
|
+
part: string;
|
|
167
|
+
after?: string;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* What the draft changes in the script, in the draft's order: the title,
|
|
171
|
+
* the item's own texts, then row by row; removed rows last.
|
|
172
|
+
*/
|
|
173
|
+
export declare function scriptChanges(base: ScriptFile, draft: ScriptFile): ScriptChange[];
|
|
174
|
+
/** One change as a line an agent can act on. */
|
|
175
|
+
export declare function changeLine(c: ScriptChange): string;
|
|
176
|
+
//# sourceMappingURL=script-edit.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{editLine as y,joinLines as N,readLine as R,rewordLine as V,sliceLine as k,spokenLine as q,withoutAnchors as L,writeLine as T}from"./anchors.js";import{isSpoken as F}from"./messages.js";const J=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&"match"in e;function $(e,t,n){if(e!==void 0){if(typeof e=="string")n.push({field:t,value:e});else if(Array.isArray(e))e.forEach((s,i)=>{$(s,`${t}.${String(i)}`,n)});else if(F(e))n.push({field:`${t}.display`,value:e.display}),n.push({field:`${t}.speak`,value:e.speak});else if(!J(e))for(const[s,i]of Object.entries(e))$(i,`${t}.${s}`,n)}}export function partTexts(e){const t=[];$(e.say,"say",t);for(const[n,s]of Object.entries(e.screen??{}))$(s,`screen.${n}`,t);return t}export function itemTexts(e){const t=[];for(const[n,s]of Object.entries(e.text??{}))$(s,`text.${n}`,t);return t}function w(e,t,n){const[s,...i]=t;if(s===void 0)return n;if(Array.isArray(e))return e.map((o,d)=>String(d)===s?w(o,i,n):o);if(typeof e=="object"){const o=e,d=o[s];return d===void 0?e:{...o,[s]:w(d,i,n)}}return e}export function setPartText(e,t,n){const[s,...i]=t.split(".");if(s==="say"){const o=e.say===void 0?n:w(e.say,i,n);return{...e,say:o}}return s==="screen"&&e.screen?{...e,screen:w(e.screen,i,n)}:e}export function setItemText(e,t,n){const[s,...i]=t.split(".");return s!=="text"||!e.text?e:{...e,text:w(e.text,i,n)}}const I=(e,t,n)=>({...e,parts:e.parts.map(s=>s.id===t?n(s):s)});export function newPartId(...e){const t=new Set(e.flatMap(n=>n.parts.map(s=>s.id)));for(let n=1;;n++){const s=`new-${String(n)}`;if(!t.has(s))return s}}export const SAY="say";const M=e=>typeof e.say=="string"?e.say:void 0;export const saidText=e=>{const t=M(e);return t===void 0?void 0:L(t)};const p=e=>R(M(e)??"");export const saidAnchors=e=>p(e).anchors,saidSpans=e=>p(e).spans,spokenText=e=>M(e)===void 0?void 0:q(p(e)).text;const l=(e,t)=>setPartText(e,SAY,T(t));export function placeOfRemoved(e,t,n){const s=t.parts.findIndex(i=>i.id===n);for(let i=s+1;i<t.parts.length;i++){const o=e.findIndex(d=>d.id===t.parts[i]?.id);if(o>=0)return o}return e.length}export const draftEdit={text:(e,t,n,s)=>I(e,t,i=>{const o=saidText(i);return n===SAY&&o!==void 0?l(i,V(p(i),s)):setPartText(i,n,s)}),title:(e,t)=>({...e,title:t}),remove:(e,t)=>({...e,parts:e.parts.filter(n=>n.id!==t)}),restore(e,t,n){const s=t.parts.find(o=>o.id===n);if(!s||e.parts.some(o=>o.id===n))return e;const i=[...e.parts];return i.splice(placeOfRemoved(i,t,n),0,s),{...e,parts:i}},add(e,t,n){const s=newPartId(e,t),i=n===void 0?0:e.parts.findIndex(d=>d.id===n)+1,o=[...e.parts];return o.splice(i,0,{id:s,say:""}),{script:{...e,parts:o},id:s}},insert(e,t,n){const s=e.parts.find(d=>d.id===t.id);if(!s)return{script:e,caret:t};const i=saidText(s)??"",o=Math.max(0,Math.min(t.offset,i.length));return{script:I(e,t.id,d=>l(d,y(p(d),o,0,n))),caret:{id:t.id,offset:o+n.length}}},replace(e,t,n,s){const i=e.parts.find(f=>f.id===t.id),o=i?saidText(i):void 0;if(t.id!==n.id||!i||o===void 0){const f=draftEdit.cut(e,t,n);return f.caret?draftEdit.insert(f.script,f.caret,s):{script:f.script,caret:void 0}}const d=f=>Math.max(0,Math.min(f.offset,o.length)),r=Math.min(d(t),d(n)),c=Math.max(d(t),d(n));return{script:I(e,t.id,f=>l(f,y(p(f),r,c-r,s))),caret:{id:t.id,offset:r+s.length}}},cut(e,t,n){const s=e.parts.findIndex(a=>a.id===t.id),i=e.parts.findIndex(a=>a.id===n.id);if(s<0||i<0)return{script:e,caret:t};const[o,d,r,c]=s<i||s===i&&t.offset<=n.offset?[t,n,s,i]:[n,t,i,s],f=e.parts[r],u=e.parts[c];if(!f||!u)return{script:e,caret:t};if(r===c){const a=saidText(f)??"";return{script:a.slice(0,o.offset)+a.slice(d.offset)===a?e:I(e,f.id,S=>l(S,y(p(S),o.offset,d.offset-o.offset,""))),caret:o}}const m=saidText(f)??"",g=m.slice(0,o.offset),j=o.offset>0,A=d.offset<(saidText(u)??"").length||d.offset<=0,E=e.parts.flatMap((a,h)=>h<r||h>c?[a]:h===r?j?[saidText(a)===void 0?a:l(a,y(p(a),g.length,m.length-g.length,""))]:[]:h>r&&h<c&&saidText(a)===void 0?[a]:h===c?A?[saidText(a)===void 0||d.offset<=0?a:l(a,y(p(a),0,d.offset,""))]:[]:[]),C=j?{id:f.id,offset:g.length}:A?{id:u.id,offset:0}:void 0;return{script:{...e,parts:E},caret:C}},move(e,t,n){const s=e.parts.findIndex(r=>r.id===t),i=s+n,o=e.parts[s];if(!o||i<0||i>=e.parts.length)return e;const d=[...e.parts];return d.splice(s,1),d.splice(i,0,o),{...e,parts:d}},split(e,t,n,s){const i=e.parts.find(u=>u.id===n),o=i?saidText(i):void 0;if(!i||o===void 0)return{script:e,id:void 0};const d=newPartId(e,t),r=p(i),c=e.parts.indexOf(i),f=[...e.parts];return f.splice(c,1,l(i,k(r,0,s)),{id:d,say:T(k(r,s,o.length))}),{script:{...e,parts:f},id:d}},merge(e,t,n){const s=e.parts.findIndex(c=>c.id===t),i=e.parts[s],o=n===void 0?s-1:e.parts.findIndex(c=>c.id===n),d=e.parts[o];if(!i||!d||o===s)return e;const r=l(d,N(p(d),p(i)));return{...e,parts:e.parts.flatMap((c,f)=>f===s?[]:f===o?[r]:[c])}}};export function withVideoParts(e,t){const n=[...e.parts];return t.forEach((s,i)=>{if(n.some(d=>d.id===s))return;let o=0;for(let d=i-1;d>=0;d--){const r=n.findIndex(c=>c.id===t[d]);if(r>=0){o=r+1;break}}n.splice(o,0,{id:s})}),n.length===e.parts.length?e:{...e,parts:n}}function W(e,t){const n=e.length,s=t.length,i=Array.from({length:n+1},()=>new Array(s+1).fill(0));for(let c=n-1;c>=0;c--)for(let f=s-1;f>=0;f--){const u=i[c];u&&(u[f]=e[c]===t[f]?(i[c+1]?.[f+1]??0)+1:Math.max(i[c+1]?.[f]??0,u[f+1]??0))}const o=new Set;let d=0,r=0;for(;d<n&&r<s;){const c=e[d];c!==void 0&&c===t[r]?(o.add(c),d++,r++):(i[d+1]?.[r]??0)>=(i[d]?.[r+1]??0)?d++:r++}return o}function P(e,t,n){const s=[],i=new Map(e.map(r=>[r.field,r.value])),o=new Map(t.map(r=>[r.field,r.value])),d=(r,c)=>r==="say"||r.startsWith("say.")?L(c):c;for(const[r,c]of o){const f=i.get(r);(f===void 0||d(r,f)!==d(r,c))&&s.push({kind:"text",...n===void 0?{}:{part:n},field:r,...f===void 0?{}:{before:f},after:c})}for(const[r,c]of i)o.has(r)||s.push({kind:"text",...n===void 0?{}:{part:n},field:r,before:c});return s}export function scriptChanges(e,t){const n=[];e.title!==t.title&&n.push({kind:"title",...e.title===void 0?{}:{before:e.title},...t.title===void 0?{}:{after:t.title}}),n.push(...P(itemTexts(e),itemTexts(t),void 0));const s=e.parts.map(r=>r.id),i=t.parts.map(r=>r.id),o=new Set(s.filter(r=>i.includes(r))),d=W(s.filter(r=>o.has(r)),i.filter(r=>o.has(r)));t.parts.forEach((r,c)=>{const f=t.parts[c-1]?.id,u=f===void 0?{}:{after:f},m=e.parts.find(g=>g.id===r.id);if(!m){n.push({kind:"add",part:r.id,...u,texts:partTexts(r)});return}d.has(r.id)||n.push({kind:"move",part:r.id,...u}),n.push(...P(partTexts(m),partTexts(r),r.id))});for(const r of e.parts){if(o.has(r.id))continue;const c=saidText(r);n.push({kind:"remove",part:r.id,...c===void 0?{}:{said:c}})}return n}const x=e=>e===void 0||e===""?"(nothing)":JSON.stringify(e),O=e=>e===void 0?"first":`after ${e}`;export function changeLine(e){switch(e.kind){case"title":return`Title: ${x(e.before)} → ${x(e.after)}`;case"text":return`${e.part===void 0?"The item's text":`Part ${e.part}`}, ${e.field}: ${x(e.before)} → ${x(e.after)}`;case"remove":return`Part ${e.part}: removed${e.said?` (it said ${x(e.said)})`:""}`;case"add":return`New part ${e.part}, ${O(e.after)}: ${e.texts.length===0?"empty":e.texts.map(t=>`${t.field} ${x(t.value)}`).join("; ")}`;case"move":return`Part ${e.part}: moved, now ${O(e.after)}`}}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type TextAnchor } from "./anchors.js";
|
|
2
|
+
import { type MessageValue, type MessagesFile, type VariantsMessage } from "./messages.js";
|
|
3
|
+
/** A text, a list of texts, or a group of them by name. */
|
|
4
|
+
export type ScriptText = MessageValue | ScriptText[] | {
|
|
5
|
+
[name: string]: ScriptText;
|
|
6
|
+
};
|
|
7
|
+
export interface ScriptPart {
|
|
8
|
+
/** The part's key in the piece. */
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* What the part says, as written: one line with its anchors and its
|
|
12
|
+
* <shown|said> pieces, or a plural or a selection.
|
|
13
|
+
*/
|
|
14
|
+
say?: string | VariantsMessage;
|
|
15
|
+
/** What it shows, by name. */
|
|
16
|
+
screen?: Record<string, ScriptText>;
|
|
17
|
+
}
|
|
18
|
+
export interface ScriptFile {
|
|
19
|
+
title?: string;
|
|
20
|
+
/** The item's words that belong to no part, by name. */
|
|
21
|
+
text?: Record<string, ScriptText>;
|
|
22
|
+
/** In the order they are told; the piece's code decides the video's. */
|
|
23
|
+
parts: ScriptPart[];
|
|
24
|
+
}
|
|
25
|
+
/** Where a value sits in the script's document: ["parts", 0, "screen", "line1"]. */
|
|
26
|
+
export type ScriptPath = (string | number)[];
|
|
27
|
+
/** A message a script makes, and where it came from. */
|
|
28
|
+
export interface ScriptKey {
|
|
29
|
+
key: string;
|
|
30
|
+
value: MessageValue;
|
|
31
|
+
path: ScriptPath;
|
|
32
|
+
/** The anchors of what a part says, by their place in the line as spoken. */
|
|
33
|
+
anchors?: TextAnchor[];
|
|
34
|
+
}
|
|
35
|
+
/** A script file's name: script.<locale>.yaml (or .yml). */
|
|
36
|
+
export declare const SCRIPT_FILE: RegExp;
|
|
37
|
+
/**
|
|
38
|
+
* A script from the value its YAML holds, or what is wrong with it, each
|
|
39
|
+
* with where. Numbers and booleans are not text: a line that is only
|
|
40
|
+
* "2026" or "yes" needs quotes.
|
|
41
|
+
*/
|
|
42
|
+
export declare function parseScript(raw: unknown): {
|
|
43
|
+
script: ScriptFile;
|
|
44
|
+
} | {
|
|
45
|
+
problems: string[];
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* What a part says as its message, and its anchors apart, by their place
|
|
49
|
+
* in the line as said. A line with <shown|said> pieces is a message with
|
|
50
|
+
* both sides.
|
|
51
|
+
*/
|
|
52
|
+
export declare function saidOf(say: MessageValue): {
|
|
53
|
+
value: MessageValue;
|
|
54
|
+
anchors: TextAnchor[];
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* The messages a script makes under a piece's prefix, in the script's
|
|
58
|
+
* order, each with where it came from; and the keys it would make twice
|
|
59
|
+
* (a screen text named `say`, a text named like a part's own key).
|
|
60
|
+
*/
|
|
61
|
+
export declare function scriptKeys(prefix: string, script: ScriptFile): {
|
|
62
|
+
keys: ScriptKey[];
|
|
63
|
+
twice: string[];
|
|
64
|
+
};
|
|
65
|
+
/** A script's messages as a messages file. */
|
|
66
|
+
export declare function scriptMessages(prefix: string, script: ScriptFile): MessagesFile;
|
|
67
|
+
//# sourceMappingURL=script.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{hasAnchors as $,hasSpans as A,readAnchors as b,spokenLine as k}from"./anchors.js";import{isSpoken as h}from"./messages.js";export const SCRIPT_FILE=/^script\.([a-z]{2,3}(?:-[a-z0-9]{2,8})?)\.ya?ml$/;const g=/^[A-Za-z0-9_-]+$/,m=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),j=e=>e.length===0?"(root)":e.map((i,n)=>typeof i=="number"?`[${String(i)}]`:`${n?".":""}${i}`).join("");function O(e){const i=c=>Array.isArray(c)&&c.every(o=>typeof o=="string"),n=e.match;if(!m(n)||!Object.values(n).every(c=>typeof c=="string"))return"match must map each case to its text";const f=e.declarations??[],l=e.selectors??[];if(!i(f)||!i(l))return"declarations and selectors must be lists of strings";const p=Object.keys(e).filter(c=>!["declarations","selectors","match"].includes(c));return p.length>0?`unknown key ${p.join(", ")}`:{declarations:f,selectors:l,match:n}}function S(e){if(typeof e=="string")return e;if(h(e))return Object.keys(e).length===2?e:"has more than display and speak";if(m(e)&&"match"in e)return O(e)}export function parseScript(e){const i=[],n=(t,s)=>{i.push(`${j(t)}: ${s}`)},f=(t,s)=>{const r=S(t);if(r===void 0||typeof r=="string"&&r!==t){n(s,typeof r=="string"?r:typeof t=="number"||typeof t=="boolean"?`${String(t)} is not text: put it in quotes`:"must be text, { display, speak }, or a plural or selection");return}return r},l=(t,s)=>{if(!m(t)){n(s,"must be names with their text");return}const r={};for(const[a,u]of Object.entries(t)){const y=p(u,[...s,a]);g.test(a)?y!==void 0&&(r[a]=y):n([...s,a],"a name has only letters, digits, _ and -")}return r},p=(t,s)=>{if(Array.isArray(t)){const r=t.map((a,u)=>p(a,[...s,u]));return r.every(a=>a!==void 0)?r:void 0}return m(t)&&!h(t)&&!("match"in t)?l(t,s):f(t,s)};if(e==null)return{script:{parts:[]}};if(!m(e))return{problems:["(root): must be title, text and parts"]};const c={parts:[]};for(const t of Object.keys(e))["title","text","parts"].includes(t)||n([t],"unknown key: a script has title, text and parts");if(e.title!==void 0&&(typeof e.title=="string"?c.title=e.title:n(["title"],"must be text")),e.text!==void 0){const t=l(e.text,["text"]);t&&(c.text=t)}const o=e.parts??[];if(!Array.isArray(o))n(["parts"],"must be a list of parts");else{const t=new Set;o.forEach((s,r)=>{const a=["parts",r];if(!m(s)){n(a,"must be a part: id, say, screen");return}for(const d of Object.keys(s))["id","say","screen"].includes(d)||n([...a,d],"unknown key: a part has id, say and screen");const u=s.id;if(typeof u!="string"||!g.test(u)){n([...a,"id"],"a part needs an id of letters, digits, _ and -");return}if(t.has(u)){n([...a,"id"],`two parts have the id ${u}`);return}t.add(u);const y={id:u};if(s.say!==void 0){const d=f(s.say,[...a,"say"]);if(h(d))n([...a,"say"],"is one line: write a piece that is shown one way and said another inside it, as <shown|said>");else if(d!==void 0){y.say=d;for(const x of E(d))n([...a,"say"],x)}}if(s.screen!==void 0){const d=l(s.screen,[...a,"screen"]);d&&(y.screen=d)}c.parts.push(y)})}return i.length>0?{problems:i}:{script:c}}function E(e){return typeof e=="string"?b(e).problems:h(e)?[]:Object.values(e.match).some(i=>$(i)||A(i))?["a plural or a selection cannot have anchors or <shown|said>"]:[]}export function saidOf(e){if(typeof e!="string")return{value:e,anchors:[]};const i=b(e);if(i.spans.length===0)return{value:i.text,anchors:i.anchors};const n=k(i);return{value:{display:i.text,speak:n.text},anchors:i.anchors.map(f=>({name:f.name,at:n.at(f.at,!1),...f.end===void 0?{}:{end:n.at(f.end,!0)}}))}}const w=e=>typeof e=="string"||!Array.isArray(e)&&(h(e)||"match"in e);export function scriptKeys(e,i){const n=[],f=new Set,l=[],p=(o,t,s,r=[])=>{f.has(o)?l.push(o):(f.add(o),n.push({key:o,value:t,path:s,...r.length>0?{anchors:r}:{}}))},c=(o,t,s)=>{if(w(t))p(o,t,s);else if(Array.isArray(t))t.forEach((r,a)=>{c(`${o}.${String(a)}`,r,[...s,a])});else for(const[r,a]of Object.entries(t))c(`${o}.${r}`,a,[...s,r])};i.title!==void 0&&p(`${e}.title`,i.title,["title"]);for(const[o,t]of Object.entries(i.text??{}))c(`${e}.${o}`,t,["text",o]);return i.parts.forEach((o,t)=>{const s=`${e}.${o.id}`;if(o.say!==void 0){const r=saidOf(o.say);p(`${s}.say`,r.value,["parts",t,"say"],r.anchors)}for(const[r,a]of Object.entries(o.screen??{}))c(`${s}.${r}`,a,["parts",t,"screen",r])}),{keys:n,twice:l}}export function scriptMessages(e,i){return Object.fromEntries(scriptKeys(e,i).keys.map(n=>[n.key,n.value]))}
|