@hypit/hypit 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/public/caption.d.ts +206 -183
- package/dist/public/composition.d.ts +25 -3
- package/dist/public/endpoint-kit.d.ts +24 -2
- package/dist/public/generation.d.ts +5 -1
- package/dist/public/hyperframes.d.ts +19 -1
- package/dist/public/narrative.d.ts +17 -3
- package/dist/public/performance.d.ts +1590 -0
- package/dist/public/program-space.d.ts +179 -32
- package/dist/public/runtime-kit.d.ts +21 -8
- package/dist/public/sound.d.ts +822 -0
- package/dist/public/speech.d.ts +41 -0
- package/dist/public/studio-adapter.d.ts +77 -15
- package/dist/public/temporal-markup.d.ts +9 -44
- package/dist/public/temporal.d.ts +37 -28
- package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
- package/examples/README.md +18 -10
- package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
- package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
- package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
- package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
- package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
- package/examples/provider-package/README.md +78 -0
- package/examples/provider-package/hypit.runtime.json +12 -0
- package/examples/provider-package/packages/provider-images/package.json +11 -0
- package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
- package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
- package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
- package/examples/semantic-composition/README.md +6 -0
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
- package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
- package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
- package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
- package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
- package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
- package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
- package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
- package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
- package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
- package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
- package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
- package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
- package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
- package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
- package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
- package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
- package/package.json +32 -15
- package/packages/audio-track/README.md +20 -13
- package/packages/audio-track/package.json +1 -1
- package/packages/audio-track/src/component.ts +4 -4
- package/packages/audio-track/src/fragment.ts +6 -5
- package/packages/audio-track/src/index.ts +1 -1
- package/packages/audio-track/src/manifest.ts +17 -16
- package/packages/audio-track/src/program.ts +21 -25
- package/packages/audio-track/src/surface.ts +19 -18
- package/packages/audio-track-studio/README.md +23 -0
- package/packages/audio-track-studio/src/index.ts +28 -17
- package/packages/author-kit/README.md +1 -1
- package/packages/background-removal/README.md +4 -7
- package/packages/browser-capture/package.json +1 -1
- package/packages/build-result/README.md +11 -0
- package/packages/build-result/src/decode.ts +2 -0
- package/packages/build-result/src/execution-log.ts +17 -0
- package/packages/build-result/src/index.ts +1 -0
- package/packages/build-result/src/store.ts +14 -1
- package/packages/build-result/src/types.ts +3 -0
- package/packages/build-result-s3/src/repository.ts +4 -0
- package/packages/caption/README.md +61 -73
- package/packages/caption/package.json +3 -2
- package/packages/caption/src/activation.ts +2 -2
- package/packages/caption/src/component.ts +20 -5
- package/packages/caption/src/display.ts +3 -18
- package/packages/caption/src/fragment.ts +3 -7
- package/packages/caption/src/index.ts +6 -5
- package/packages/caption/src/manifest.ts +29 -46
- package/packages/caption/src/style.ts +24 -135
- package/packages/caption/src/surface.ts +12 -92
- package/packages/caption/src/temporalize.ts +18 -53
- package/packages/caption/src/types.ts +8 -35
- package/packages/caption/src/visibility.ts +23 -0
- package/packages/caption-fine/README.md +14 -9
- package/packages/caption-fine/package.json +4 -2
- package/packages/caption-fine/src/component.ts +3 -3
- package/packages/caption-fine/src/fragment.ts +7 -19
- package/packages/caption-fine/src/index.ts +2 -0
- package/packages/caption-fine/src/manifest.ts +26 -17
- package/packages/caption-fine/src/recipe.ts +7 -0
- package/packages/caption-fine/src/render.ts +14 -13
- package/packages/caption-fine/src/schedule.ts +39 -35
- package/packages/caption-fine/src/style.ts +10 -9
- package/packages/caption-fine/src/surface.ts +62 -35
- package/packages/caption-fine/src/types.ts +2 -0
- package/packages/caption-fine-studio/README.md +24 -2
- package/packages/caption-fine-studio/package.json +3 -1
- package/packages/caption-fine-studio/src/activation.ts +3 -3
- package/packages/caption-fine-studio/src/index.ts +54 -42
- package/packages/cli/README.md +57 -4
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/arguments.ts +25 -6
- package/packages/cli/src/build-planning.ts +3 -2
- package/packages/cli/src/command.ts +6 -0
- package/packages/cli/src/commands/environment.ts +28 -18
- package/packages/cli/src/commands/execution.ts +81 -26
- package/packages/cli/src/commands/results.ts +7 -11
- package/packages/cli/src/index.ts +2 -2
- package/packages/cli/src/machine-view.ts +3 -2
- package/packages/cli/src/main.ts +34 -42
- package/packages/cli/src/observation.ts +7 -1
- package/packages/cli/src/output.ts +65 -23
- package/packages/cli/src/view.ts +64 -18
- package/packages/comment-sticker/README.md +3 -3
- package/packages/comment-sticker/package.json +1 -1
- package/packages/comment-sticker/src/component.ts +4 -4
- package/packages/comment-sticker/src/fragment.ts +5 -4
- package/packages/comment-sticker/src/manifest.ts +7 -6
- package/packages/comment-sticker/src/program.ts +9 -9
- package/packages/comment-sticker/src/surface.ts +6 -7
- package/packages/composition/README.md +21 -0
- package/packages/composition/src/audio-presentation.ts +44 -0
- package/packages/composition/src/index.ts +3 -0
- package/packages/composition/src/schema.ts +8 -3
- package/packages/composition/src/track.ts +15 -1
- package/packages/credential-store-env/README.md +1 -1
- package/packages/deck-track/README.md +3 -3
- package/packages/deck-track/package.json +1 -1
- package/packages/deck-track/src/component.ts +5 -5
- package/packages/deck-track/src/fragment.ts +6 -5
- package/packages/deck-track/src/lower.ts +12 -12
- package/packages/deck-track/src/manifest.ts +8 -7
- package/packages/deck-track/src/program.ts +13 -16
- package/packages/deck-track/src/surface.ts +9 -10
- package/packages/driver-node/src/driver.ts +41 -3
- package/packages/elevenlabs-speech/README.md +27 -0
- package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
- package/packages/elevenlabs-speech/src/activation.ts +26 -0
- package/packages/elevenlabs-speech/src/fragment.ts +11 -0
- package/packages/elevenlabs-speech/src/index.ts +111 -0
- package/packages/elevenlabs-speech/src/surface.ts +167 -0
- package/packages/endpoint-kit/README.md +24 -0
- package/packages/endpoint-kit/src/index.ts +7 -1
- package/packages/film/README.md +12 -7
- package/packages/film/package.json +1 -1
- package/packages/film/src/component.ts +4 -4
- package/packages/film/src/fragment.ts +6 -5
- package/packages/film/src/manifest.ts +11 -10
- package/packages/film/src/program.ts +5 -5
- package/packages/film/src/recipe.ts +2 -1
- package/packages/film/src/surface.ts +6 -6
- package/packages/film-studio/package.json +1 -1
- package/packages/film-studio/src/index.ts +2 -2
- package/packages/fishaudio-speech/README.md +33 -0
- package/packages/fishaudio-speech/package.json +21 -0
- package/packages/fishaudio-speech/src/activation.ts +32 -0
- package/packages/fishaudio-speech/src/fragment.ts +11 -0
- package/packages/fishaudio-speech/src/index.ts +156 -0
- package/packages/fishaudio-speech/src/surface.ts +192 -0
- package/packages/generation/README.md +11 -1
- package/packages/generation/src/mapping.ts +28 -30
- package/packages/gpt-image/README.md +1 -2
- package/packages/grok-imagine/README.md +1 -2
- package/packages/hyperframes/README.md +7 -3
- package/packages/hyperframes/src/browser-program.ts +11 -2
- package/packages/hyperframes/src/document.ts +15 -2
- package/packages/interview-emoji-reveal/README.md +4 -4
- package/packages/interview-emoji-reveal/package.json +1 -1
- package/packages/interview-emoji-reveal/src/component.ts +4 -4
- package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
- package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
- package/packages/interview-emoji-reveal/src/program.ts +14 -14
- package/packages/interview-emoji-reveal/src/surface.ts +8 -9
- package/packages/media-execution/README.md +7 -3
- package/packages/media-execution/src/audio-presentation.ts +23 -0
- package/packages/media-execution/src/execute.ts +2 -0
- package/packages/media-pipeline/README.md +7 -3
- package/packages/media-pipeline/src/audio-plan.ts +4 -1
- package/packages/media-pipeline/src/component.ts +16 -2
- package/packages/media-pipeline/src/manifest.ts +3 -1
- package/packages/media-pipeline/src/types.ts +2 -1
- package/packages/media-track/README.md +14 -47
- package/packages/media-track/package.json +1 -1
- package/packages/media-track/preview/preview.svml +5 -5
- package/packages/media-track/src/author.ts +12 -6
- package/packages/media-track/src/component.ts +10 -16
- package/packages/media-track/src/fragment.ts +8 -7
- package/packages/media-track/src/index.ts +3 -1
- package/packages/media-track/src/lower.ts +7 -7
- package/packages/media-track/src/manifest.ts +16 -38
- package/packages/media-track/src/program.ts +62 -67
- package/packages/media-track/src/sampling.ts +6 -6
- package/packages/media-track/src/sequence.ts +8 -8
- package/packages/media-track/src/surface.ts +25 -43
- package/packages/media-track-studio/README.md +9 -0
- package/packages/media-track-studio/src/index.ts +16 -11
- package/packages/mimo-speech/README.md +1 -1
- package/packages/minimax-h3/README.md +1 -1
- package/packages/nano-banana/README.md +1 -1
- package/packages/narrative/README.md +23 -1
- package/packages/narrative/src/identity.ts +11 -0
- package/packages/narrative/src/index.ts +3 -0
- package/packages/narrative/src/schema.ts +28 -27
- package/packages/narrative/src/selection.ts +52 -0
- package/packages/narrative/src/types.ts +2 -0
- package/packages/package-loader-node/README.md +30 -0
- package/packages/package-loader-node/package.json +5 -2
- package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
- package/packages/package-loader-node/src/index.ts +1 -0
- package/packages/package-loader-node/src/loader.ts +12 -15
- package/packages/package-loader-node/src/location.ts +27 -1
- package/packages/package-loader-node/src/module-scope.ts +183 -0
- package/packages/package-loader-node/src/types.ts +4 -0
- package/packages/performance/README.md +83 -0
- package/packages/performance/package.json +30 -0
- package/packages/performance/src/activation.ts +11 -0
- package/packages/performance/src/component.ts +46 -0
- package/packages/performance/src/index.ts +6 -0
- package/packages/performance/src/manifest.ts +53 -0
- package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
- package/packages/performance/src/program.ts +51 -0
- package/packages/performance/src/style.ts +35 -0
- package/packages/performance/src/surface.ts +99 -0
- package/packages/performance-studio/README.md +25 -0
- package/packages/performance-studio/package.json +21 -0
- package/packages/performance-studio/src/activation.ts +6 -0
- package/packages/performance-studio/src/index.ts +84 -0
- package/packages/program-space/README.md +9 -18
- package/packages/program-space/src/activation.ts +1 -5
- package/packages/program-space/src/index.ts +2 -11
- package/packages/program-space/src/surface.ts +1 -20
- package/packages/project-context-node/README.md +20 -0
- package/packages/project-context-node/package.json +10 -0
- package/packages/project-context-node/src/index.ts +3 -0
- package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
- package/packages/provider-hyperframes-local/README.md +43 -15
- package/packages/provider-hyperframes-local/src/activation.ts +4 -3
- package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
- package/packages/provider-hyperframes-local/src/capture.ts +96 -26
- package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
- package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
- package/packages/provider-hyperframes-local/src/options.ts +2 -0
- package/packages/provider-hyperframes-local/src/program.ts +6 -3
- package/packages/provider-hyperframes-local/src/progress.ts +53 -0
- package/packages/provider-hyperframes-local/src/provider.ts +18 -5
- package/packages/provider-hyperframes-local/src/render.ts +48 -7
- package/packages/provider-hypihub/README.md +48 -17
- package/packages/provider-hypihub/package.json +2 -0
- package/packages/provider-hypihub/src/mapping.ts +31 -7
- package/packages/provider-hypihub/src/oauth.ts +6 -0
- package/packages/provider-hypihub/src/provider.ts +25 -13
- package/packages/provider-hypihub/src/routes.ts +1 -2
- package/packages/provider-hypihub/src/upload.ts +2 -0
- package/packages/provider-media-local/README.md +3 -4
- package/packages/provider-whisperx-local/src/program.ts +1 -0
- package/packages/provider-whisperx-local/src/provider.ts +3 -0
- package/packages/ranking/README.md +8 -6
- package/packages/ranking/package.json +1 -1
- package/packages/ranking/src/component.ts +6 -6
- package/packages/ranking/src/fragment.ts +11 -7
- package/packages/ranking/src/manifest.ts +21 -14
- package/packages/ranking/src/render.ts +22 -26
- package/packages/ranking/src/schedule.ts +16 -19
- package/packages/ranking/src/surface.ts +12 -13
- package/packages/ranking-studio/README.md +18 -0
- package/packages/ranking-studio/src/index.ts +61 -9
- package/packages/render-hyperframes/README.md +7 -7
- package/packages/render-hyperframes/package.json +1 -1
- package/packages/render-hyperframes/src/component.ts +11 -1
- package/packages/render-hyperframes/src/fragment.ts +7 -4
- package/packages/render-hyperframes/src/manifest.ts +4 -4
- package/packages/render-hyperframes/src/surface.ts +6 -6
- package/packages/runtime/README.md +8 -1
- package/packages/runtime/src/execution.ts +15 -4
- package/packages/runtime/src/index.ts +2 -1
- package/packages/runtime/src/log.ts +51 -0
- package/packages/runtime/src/types.ts +5 -8
- package/packages/runtime-host-node/README.md +30 -0
- package/packages/runtime-host-node/package.json +1 -0
- package/packages/runtime-host-node/src/index.ts +24 -9
- package/packages/runtime-host-node/src/packages.ts +47 -50
- package/packages/runtime-kit/README.md +5 -0
- package/packages/runtime-kit/src/index.ts +3 -1
- package/packages/runtime-local/README.md +92 -4
- package/packages/runtime-local/src/config.ts +202 -56
- package/packages/runtime-local/src/control.ts +9 -1
- package/packages/runtime-local/src/executor.ts +66 -0
- package/packages/runtime-local/src/host.ts +37 -17
- package/packages/runtime-local/src/log.ts +48 -0
- package/packages/runtime-local/src/programs.ts +2 -1
- package/packages/runtime-local/src/result-writer.ts +2 -0
- package/packages/runtime-local/src/runtime.ts +8 -6
- package/packages/runtime-local/src/supervisor.ts +142 -0
- package/packages/runtime-local/src/types.ts +9 -2
- package/packages/runtime-local/src/worker-process.ts +7 -24
- package/packages/runtime-local/src/worker.ts +55 -83
- package/packages/screen-overlay/README.md +3 -3
- package/packages/screen-overlay/package.json +1 -1
- package/packages/screen-overlay/src/component.ts +3 -3
- package/packages/screen-overlay/src/fragment.ts +5 -4
- package/packages/screen-overlay/src/manifest.ts +7 -6
- package/packages/screen-overlay/src/program.ts +9 -9
- package/packages/screen-overlay/src/surface.ts +6 -7
- package/packages/script/README.md +15 -2
- package/packages/script/src/manifest.ts +2 -2
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/surface.ts +4 -3
- package/packages/script/src/types.ts +1 -1
- package/packages/script-studio/package.json +9 -3
- package/packages/script-studio/src/index.ts +2 -0
- package/packages/script-studio/src/projection.ts +105 -0
- package/packages/seedance/README.md +30 -1
- package/packages/seedance/src/index.ts +18 -7
- package/packages/seedance/src/surface.ts +17 -4
- package/packages/seedance-kits/README.md +7 -1
- package/packages/seedream/README.md +1 -1
- package/packages/sound/README.md +81 -0
- package/packages/sound/package.json +25 -0
- package/packages/sound/src/activation.ts +11 -0
- package/packages/sound/src/component.ts +28 -0
- package/packages/sound/src/index.ts +5 -0
- package/packages/sound/src/manifest.ts +47 -0
- package/packages/sound/src/program.ts +84 -0
- package/packages/sound/src/style.ts +34 -0
- package/packages/sound/src/surface.ts +90 -0
- package/packages/sound-studio/README.md +22 -0
- package/packages/sound-studio/package.json +20 -0
- package/packages/sound-studio/src/activation.ts +6 -0
- package/packages/sound-studio/src/index.ts +74 -0
- package/packages/speech/README.md +2 -2
- package/packages/speech-alignment/src/local.ts +8 -0
- package/packages/speech-alignment/src/locate.ts +1 -1
- package/packages/store-sqlite/README.md +7 -0
- package/packages/store-sqlite/src/store.ts +84 -83
- package/packages/studio/INSPECTOR.md +15 -2
- package/packages/studio/README.md +88 -14
- package/packages/studio/package.json +8 -7
- package/packages/studio/src/companion-assembly.ts +1 -0
- package/packages/studio/src/domain.ts +1 -1
- package/packages/studio/src/fallback-companions.ts +3 -3
- package/packages/studio/src/feedback-server.ts +51 -0
- package/packages/studio/src/feedback-store.ts +66 -0
- package/packages/studio/src/feedback.ts +60 -0
- package/packages/studio/src/parameter-values.ts +43 -1
- package/packages/studio/src/parameters.ts +114 -24
- package/packages/studio/src/preview/render.ts +5 -1
- package/packages/studio/src/preview/runtime-shim.ts +49 -3
- package/packages/studio/src/programme.ts +14 -30
- package/packages/studio/src/server.ts +10 -6
- package/packages/studio/src/shared.ts +4 -2
- package/packages/studio/src/snapshot.ts +21 -132
- package/packages/studio/src/studio-preflight.ts +3 -3
- package/packages/studio/src/studio-registry.ts +50 -6
- package/packages/studio/src/style.css +209 -48
- package/packages/studio/src/ui/comments.ts +233 -0
- package/packages/studio/src/ui/icons.ts +5 -0
- package/packages/studio/src/ui/main.ts +145 -86
- package/packages/studio/src/ui/overlay.ts +12 -8
- package/packages/studio/src/ui/scrub-preview.ts +108 -0
- package/packages/studio/src/ui/stage.ts +67 -4
- package/packages/studio/src/ui/timeline.ts +177 -108
- package/packages/studio/start.ts +4 -2
- package/packages/studio-adapter/README.md +130 -11
- package/packages/studio-adapter/src/index.ts +100 -13
- package/packages/temporal/README.md +6 -6
- package/packages/temporal/package.json +1 -1
- package/packages/temporal/src/component.ts +5 -6
- package/packages/temporal/src/index.ts +8 -6
- package/packages/temporal/src/location.ts +11 -11
- package/packages/temporal/src/projection.ts +19 -19
- package/packages/temporal/src/rational.ts +4 -4
- package/packages/temporal-markup/EDITING.md +2 -2
- package/packages/temporal-markup/README.md +27 -11
- package/packages/temporal-markup/package.json +1 -1
- package/packages/temporal-markup/src/index.ts +20 -25
- package/packages/temporal-markup/src/space.ts +10 -41
- package/packages/timeline/README.md +31 -0
- package/packages/{semantic-track → timeline}/package.json +1 -1
- package/packages/timeline/src/activation.ts +8 -0
- package/packages/timeline/src/component.ts +24 -0
- package/packages/timeline/src/identity.ts +60 -0
- package/packages/timeline/src/index.ts +6 -0
- package/packages/{semantic-track → timeline}/src/location.ts +20 -20
- package/packages/timeline/src/manifest.ts +39 -0
- package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
- package/packages/timeline/src/types.ts +24 -0
- package/packages/timeline-author/README.md +68 -0
- package/packages/{speech-track → timeline-author}/package.json +6 -4
- package/packages/timeline-author/src/activation.ts +22 -0
- package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
- package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
- package/packages/timeline-author/src/index.ts +7 -0
- package/packages/timeline-author/src/manifest.ts +78 -0
- package/packages/timeline-author/src/program.ts +107 -0
- package/packages/timeline-author/src/surface.ts +46 -0
- package/packages/timeline-author/src/types.ts +6 -0
- package/packages/typography-track/README.md +4 -4
- package/packages/typography-track/package.json +1 -1
- package/packages/typography-track/src/component.ts +4 -4
- package/packages/typography-track/src/fragment.ts +4 -3
- package/packages/typography-track/src/manifest.ts +11 -9
- package/packages/typography-track/src/program.ts +15 -15
- package/packages/typography-track/src/surface.ts +17 -18
- package/packages/video-cli/README.md +4 -1
- package/packages/video-cli/package.json +2 -1
- package/packages/video-cli/src/creation.ts +14 -4
- package/packages/video-cli/src/index.ts +1 -1
- package/packages/video-cli/src/studio-distribution.ts +2 -1
- package/packages/volcengine-matting/README.md +3 -3
- package/packages/whisperx/README.md +1 -1
- package/services/whisperx/README.md +14 -0
- package/services/whisperx/pyproject.toml +2 -0
- package/services/whisperx/uv.lock +20 -20
- package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
- package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
- package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
- package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
- package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
- package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
- package/packages/provider-kie/README.md +0 -134
- package/packages/provider-kie/package.json +0 -43
- package/packages/provider-kie/src/activation.ts +0 -71
- package/packages/provider-kie/src/index.ts +0 -10
- package/packages/provider-kie/src/mapping.ts +0 -182
- package/packages/provider-kie/src/provider.ts +0 -657
- package/packages/provider-kie/src/routes.ts +0 -150
- package/packages/provider-xiaomi-mimo/README.md +0 -32
- package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
- package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
- package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
- package/packages/runtime/src/environment.ts +0 -6
- package/packages/semantic-track/README.md +0 -21
- package/packages/semantic-track/src/activation.ts +0 -8
- package/packages/semantic-track/src/component.ts +0 -24
- package/packages/semantic-track/src/identity.ts +0 -58
- package/packages/semantic-track/src/index.ts +0 -6
- package/packages/semantic-track/src/manifest.ts +0 -38
- package/packages/semantic-track/src/types.ts +0 -26
- package/packages/speech-track/README.md +0 -51
- package/packages/speech-track/src/activation.ts +0 -19
- package/packages/speech-track/src/index.ts +0 -7
- package/packages/speech-track/src/manifest.ts +0 -73
- package/packages/speech-track/src/program.ts +0 -64
- package/packages/speech-track/src/surface.ts +0 -35
- package/packages/speech-track/src/types.ts +0 -6
- package/packages/speech-track-studio/README.md +0 -3
- package/packages/speech-track-studio/package.json +0 -14
- package/packages/speech-track-studio/src/activation.ts +0 -7
- package/packages/speech-track-studio/src/index.ts +0 -40
- /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
- /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NarrativeExcerpt, NarrativeMomentRef, NarrativeSelectionRef } from "@hypit/narrative";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import type { LocatedFrameSpan,
|
|
3
|
+
import { assertTimelineIdentity, timelineFrameCount, timelineSpans } from "./identity.js";
|
|
4
|
+
import type { LocatedFrameSpan, Timeline } from "./types.js";
|
|
5
5
|
|
|
6
6
|
export function assertNarrativeSelectionIdentity(selection: NarrativeSelectionRef): void {
|
|
7
7
|
if (!selection.narrativeId || !selection.id || !selection.startAnchorId || !selection.endAnchorId) throw new Error("NarrativeSelection is invalid");
|
|
@@ -11,33 +11,33 @@ export function assertNarrativeMomentIdentity(moment: NarrativeMomentRef): void
|
|
|
11
11
|
if (!moment.narrativeId || !moment.id || !moment.anchorId) throw new Error("NarrativeMoment is invalid");
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function assertNarrativeOwner(track:
|
|
14
|
+
function assertNarrativeOwner(track: Timeline, narrativeId: string, label: string): void {
|
|
15
15
|
if (narrativeId !== track.narrativeId) {
|
|
16
|
-
throw new Error(`${label} belongs to Narrative ${narrativeId}, not
|
|
16
|
+
throw new Error(`${label} belongs to Narrative ${narrativeId}, not Timeline ${track.id}.`);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export function semanticAnchorFrames(track:
|
|
21
|
-
|
|
20
|
+
export function semanticAnchorFrames(track: Timeline): ReadonlyMap<string, number> {
|
|
21
|
+
assertTimelineIdentity(track);
|
|
22
22
|
return new Map([
|
|
23
23
|
["program:start", 0] as const,
|
|
24
|
-
...
|
|
24
|
+
...timelineSpans(track).flatMap(({ item, startFrame }) =>
|
|
25
25
|
item.take.anchors.map((anchor) => [anchor.identity, startFrame + anchor.frame] as const)),
|
|
26
|
-
["program:end",
|
|
26
|
+
["program:end", timelineFrameCount(track)] as const,
|
|
27
27
|
]);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function frameFor(frames: ReadonlyMap<string, number>, anchorId: string, owner: string): number {
|
|
31
31
|
const frame = frames.get(anchorId);
|
|
32
|
-
if (frame === undefined) throw new Error(`${owner} names Anchor ${anchorId}, which this
|
|
32
|
+
if (frame === undefined) throw new Error(`${owner} names Anchor ${anchorId}, which this Timeline does not contain.`);
|
|
33
33
|
return frame;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export function selectionFrameSpan(
|
|
37
|
-
track:
|
|
37
|
+
track: Timeline,
|
|
38
38
|
selection: NarrativeSelectionRef,
|
|
39
39
|
): LocatedFrameSpan {
|
|
40
|
-
|
|
40
|
+
assertTimelineIdentity(track);
|
|
41
41
|
assertNarrativeSelectionIdentity(selection);
|
|
42
42
|
assertNarrativeOwner(track, selection.narrativeId, `NarrativeSelection ${selection.id}`);
|
|
43
43
|
const frames = semanticAnchorFrames(track);
|
|
@@ -47,19 +47,19 @@ export function selectionFrameSpan(
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export function segmentFrameSpan(track:
|
|
51
|
-
|
|
50
|
+
export function segmentFrameSpan(track: Timeline, segment: NarrativeExcerpt): LocatedFrameSpan {
|
|
51
|
+
assertTimelineIdentity(track);
|
|
52
52
|
if (segment.kind !== "segment" || !segment.id) throw new Error("Narrative Segment excerpt is invalid");
|
|
53
53
|
assertNarrativeOwner(track, segment.narrativeId, `Narrative Segment ${segment.id}`);
|
|
54
|
-
const found =
|
|
55
|
-
if (found === undefined) throw new Error(`
|
|
54
|
+
const found = timelineSpans(track).find(({ item }) => item.take.segment.segmentId === segment.id);
|
|
55
|
+
if (found === undefined) throw new Error(`Timeline does not contain Segment ${segment.id}.`);
|
|
56
56
|
return { startFrame: found.startFrame, endFrameExclusive: found.endFrameExclusive };
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export function tokenFrameSpan(track:
|
|
60
|
-
|
|
59
|
+
export function tokenFrameSpan(track: Timeline, tokenIds: readonly string[]): LocatedFrameSpan | undefined {
|
|
60
|
+
assertTimelineIdentity(track);
|
|
61
61
|
if (tokenIds.length === 0) return undefined;
|
|
62
|
-
const timing = new Map(
|
|
62
|
+
const timing = new Map(timelineSpans(track).flatMap(({ item, startFrame }) =>
|
|
63
63
|
item.take.tokens.map((token) => [token.tokenId, {
|
|
64
64
|
startFrame: startFrame + token.startFrame,
|
|
65
65
|
endFrameExclusive: startFrame + token.endFrameExclusive,
|
|
@@ -72,8 +72,8 @@ export function tokenFrameSpan(track: SemanticTrack, tokenIds: readonly string[]
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
export function momentFrame(track:
|
|
76
|
-
|
|
75
|
+
export function momentFrame(track: Timeline, moment: NarrativeMomentRef): number {
|
|
76
|
+
assertTimelineIdentity(track);
|
|
77
77
|
assertNarrativeMomentIdentity(moment);
|
|
78
78
|
assertNarrativeOwner(track, moment.narrativeId, `NarrativeMoment ${moment.id}`);
|
|
79
79
|
const frames = semanticAnchorFrames(track);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { compositionDependency, compositionTypes } from "@hypit/composition";
|
|
2
|
+
import { narrativeDependency } from "@hypit/narrative";
|
|
3
|
+
import { programSpaceDependency, programSpaceSchema, programSpaceTypes } from "@hypit/program-space";
|
|
4
|
+
import type { ModuleManifest, ProducerRef, TypeRef, ValueSchema } from "@hypit/protocol";
|
|
5
|
+
import { semanticTakeSchema, speechDependency } from "@hypit/speech";
|
|
6
|
+
|
|
7
|
+
export const timelineModuleRef = { name: "@hypit/timeline", version: "1" } as const;
|
|
8
|
+
export const timelineTypes = {
|
|
9
|
+
track: { module: timelineModuleRef, name: "Timeline" },
|
|
10
|
+
} satisfies Record<string, TypeRef>;
|
|
11
|
+
export const timelineProducers = {
|
|
12
|
+
projectProgramSpace: { module: timelineModuleRef, name: "project-program-space" },
|
|
13
|
+
projectAudio: { module: timelineModuleRef, name: "project-audio-track" },
|
|
14
|
+
} satisfies Record<string, ProducerRef>;
|
|
15
|
+
|
|
16
|
+
const string = { kind: "string", minLength: 1 } as const;
|
|
17
|
+
const object = (fields: Readonly<Record<string, { readonly schema: ValueSchema; readonly optional?: boolean }>>): ValueSchema => ({ kind: "object", fields });
|
|
18
|
+
export const timelineSchema: ValueSchema = object({
|
|
19
|
+
...(programSpaceSchema.kind === "object" ? programSpaceSchema.fields : {}),
|
|
20
|
+
narrativeId: { schema: string, optional: true },
|
|
21
|
+
items: { schema: { kind: "array", items: object({
|
|
22
|
+
startFrame: { schema: { kind: "number", integer: true, minimum: 0 } },
|
|
23
|
+
take: { schema: semanticTakeSchema },
|
|
24
|
+
}) } },
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const timelineManifest: ModuleManifest = {
|
|
28
|
+
format: "hypit.module@1",
|
|
29
|
+
name: timelineModuleRef.name,
|
|
30
|
+
version: timelineModuleRef.version,
|
|
31
|
+
dependencies: [speechDependency, narrativeDependency, programSpaceDependency, compositionDependency],
|
|
32
|
+
types: [{ name: timelineTypes.track.name }],
|
|
33
|
+
capabilities: [],
|
|
34
|
+
producers: [
|
|
35
|
+
{ name: timelineProducers.projectProgramSpace.name, inputs: [{ name: "track", type: timelineTypes.track }], outputs: [{ name: "space", type: programSpaceTypes.programSpace }], needs: [] },
|
|
36
|
+
{ name: timelineProducers.projectAudio.name, inputs: [{ name: "track", type: timelineTypes.track }], outputs: [{ name: "audio", type: compositionTypes.audioTrack }], needs: [] },
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
export const timelineDependency = { module: timelineModuleRef } as const;
|
|
@@ -7,18 +7,18 @@ import {
|
|
|
7
7
|
} from "@hypit/program-space";
|
|
8
8
|
import type { ProgramSpace } from "@hypit/program-space";
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import type {
|
|
10
|
+
import { assertTimelineIdentity, timelineFrameCount, timelineSpans } from "./identity.js";
|
|
11
|
+
import type { Timeline } from "./types.js";
|
|
12
12
|
|
|
13
13
|
/** Prepared material in an authored program interval, with its original source position retained. */
|
|
14
|
-
export function
|
|
15
|
-
startFrame: 0, endFrameExclusive:
|
|
14
|
+
export function projectTimelineMedia(track: Timeline, window = {
|
|
15
|
+
startFrame: 0, endFrameExclusive: timelineFrameCount(track),
|
|
16
16
|
}) {
|
|
17
|
-
|
|
17
|
+
assertTimelineIdentity(track);
|
|
18
18
|
if (!Number.isSafeInteger(window.startFrame) || !Number.isSafeInteger(window.endFrameExclusive)
|
|
19
19
|
|| window.startFrame < 0 || window.endFrameExclusive <= window.startFrame
|
|
20
|
-
|| window.endFrameExclusive >
|
|
21
|
-
return
|
|
20
|
+
|| window.endFrameExclusive > timelineFrameCount(track)) throw new Error("Semantic media window is outside the performance.");
|
|
21
|
+
return timelineSpans(track).flatMap(({ item, startFrame, endFrameExclusive }) => {
|
|
22
22
|
const start = Math.max(window.startFrame, startFrame);
|
|
23
23
|
const end = Math.min(window.endFrameExclusive, endFrameExclusive);
|
|
24
24
|
return end <= start ? [] : [{
|
|
@@ -30,19 +30,19 @@ export function projectSemanticMedia(track: SemanticTrack, window = {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export function
|
|
34
|
-
|
|
35
|
-
const frameRate = track.
|
|
33
|
+
export function projectTimelineSpace(track: Timeline): ProgramSpace {
|
|
34
|
+
assertTimelineIdentity(track);
|
|
35
|
+
const frameRate = track.frameRate;
|
|
36
36
|
return sealProgramSpace({
|
|
37
37
|
id: track.id,
|
|
38
|
-
durationSec:
|
|
38
|
+
durationSec: track.durationSec,
|
|
39
39
|
frameRate,
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export function
|
|
44
|
-
const space =
|
|
45
|
-
const clips =
|
|
43
|
+
export function projectTimelineAudio(track: Timeline): AudioTrack {
|
|
44
|
+
const space = projectTimelineSpace(track);
|
|
45
|
+
const clips = timelineSpans(track).flatMap(({ item, startFrame, endFrameExclusive }) => {
|
|
46
46
|
const audio = item.take.media.audio;
|
|
47
47
|
if (audio === undefined) return [];
|
|
48
48
|
const sourceSampleFrames = synchronizedMediaSampleFrames(item.take.media);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ProgramSpace } from "@hypit/program-space";
|
|
2
|
+
import type { SemanticTake } from "@hypit/speech";
|
|
3
|
+
|
|
4
|
+
export type TimelineItem = {
|
|
5
|
+
readonly take: SemanticTake;
|
|
6
|
+
readonly startFrame: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/** One complete film time range, with prepared material placed where it belongs. */
|
|
10
|
+
export type Timeline = ProgramSpace & {
|
|
11
|
+
readonly narrativeId?: string;
|
|
12
|
+
readonly items: readonly TimelineItem[];
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type TimelineSpan = {
|
|
16
|
+
readonly item: TimelineItem;
|
|
17
|
+
readonly startFrame: number;
|
|
18
|
+
readonly endFrameExclusive: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type LocatedFrameSpan = {
|
|
22
|
+
readonly startFrame: number;
|
|
23
|
+
readonly endFrameExclusive: number;
|
|
24
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# `@hypit/timeline-author`
|
|
2
|
+
|
|
3
|
+
Declare one complete Timeline and place prepared Takes within it. Spoken work, mixed spoken/MG
|
|
4
|
+
work and pure authored animation use the same declaration. The separate
|
|
5
|
+
[Timeline value package](../timeline/README.md) owns the data and projections; this author package
|
|
6
|
+
owns the markup and deterministic assembly.
|
|
7
|
+
|
|
8
|
+
```svml
|
|
9
|
+
<import as="time" from="@hypit/timeline-author@1"/>
|
|
10
|
+
<time:Clock id="clock" frame-rate="30"/>
|
|
11
|
+
<time:Timeline id="program" clock={clock} end="content.end+2s">
|
|
12
|
+
<time:Take source={opening.take} at="2s"/>
|
|
13
|
+
<time:Take source={explanation.take} at="previous.end+3s"/>
|
|
14
|
+
<time:Take source={closing.take} at="previous.end-12f"/>
|
|
15
|
+
</time:Timeline>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The first Take begins at two seconds. The second starts three seconds after the preceding Take ends.
|
|
19
|
+
The third overlaps its predecessor by twelve frames. The complete Timeline ends two seconds after
|
|
20
|
+
all Takes have ended. Durations come from prepared material, so authoring these relations does not
|
|
21
|
+
require knowing generated lengths beforehand or serializing generation.
|
|
22
|
+
|
|
23
|
+
| Declaration | Meaning |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `clock={clock}` | Required frame-rate input, also usable by upstream normalization. |
|
|
26
|
+
| Take `source={clip.take}` | Complete normalized, semantically prepared local Take. A wordless Take is valid real media. |
|
|
27
|
+
| First omitted `at` | `0f`. |
|
|
28
|
+
| Later omitted `at` | `previous.end`. |
|
|
29
|
+
| `at="20s"` | Absolute start. |
|
|
30
|
+
| `at="previous.end+2s"` | Start relative to the preceding Take declaration's end. Negative offsets permit overlap. |
|
|
31
|
+
| Omitted `end` | `content.end`, the maximum end across all placed Takes. |
|
|
32
|
+
| `end="content.end+2s"` | Reserve a trailing interval after all Takes finish. |
|
|
33
|
+
| `end="30s"` | Fixed complete extent, including every placed Take. |
|
|
34
|
+
|
|
35
|
+
Positions and offsets accept seconds, milliseconds and frames, and must resolve to exact frame
|
|
36
|
+
boundaries on the Clock. Negative placements, a missing predecessor, or a fixed end shorter than
|
|
37
|
+
placed content produce an error. A positive predecessor offset does not promise globally empty
|
|
38
|
+
time if another long Take remains active. Placement is translation at native speed; trimming or
|
|
39
|
+
retiming material belongs before its semantic preparation.
|
|
40
|
+
|
|
41
|
+
For ordinary sequential assembly, omit all Take `at` attributes and Timeline `end`. For wholly
|
|
42
|
+
authored animation, supply the extent and no Takes:
|
|
43
|
+
|
|
44
|
+
```svml
|
|
45
|
+
<time:Timeline id="animation" clock={clock} end="30s"/>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This produces no blank video or fabricated Script. Empty content cannot supply an implicit positive
|
|
49
|
+
extent. Program boundaries remain available for MG, media, titles and sound.
|
|
50
|
+
|
|
51
|
+
| Output | Use |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| `.timeline` | Complete time range and placed material/evidence, consumed through `timeline={program.timeline}`. |
|
|
54
|
+
|
|
55
|
+
[Performance](../performance/README.md) presents footage already
|
|
56
|
+
held by the Timeline. It can show it full-frame, in an inset or as a cutout; project components can
|
|
57
|
+
own coordinated video and graphics. Sampling a new presentation Window preserves each Take's source
|
|
58
|
+
position. Overlap supplies multiple sources, not an automatic dissolve. Independent Media Items
|
|
59
|
+
still receive their own assets and may coexist. Caption reads the authored words and placed timing.
|
|
60
|
+
|
|
61
|
+
[Sound](../sound/README.md) presents existing Timeline audio through ordered Uses.
|
|
62
|
+
[Audio Track](../audio-track/README.md) handles independent music and effects. Include the wanted
|
|
63
|
+
presentation outputs explicitly in Film. Timeline itself exports only `.timeline`; holding material
|
|
64
|
+
does not add a picture or sound contribution.
|
|
65
|
+
|
|
66
|
+
Timeline placement is authored with `at` and `end`. Studio shows placed Takes and the complete range
|
|
67
|
+
as reference information. Use-window and Script-marker controls edit presentation timing and semantic
|
|
68
|
+
anchors respectively; they do not move Takes or change the Timeline extent.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@hypit/
|
|
2
|
+
"name": "@hypit/timeline-author",
|
|
3
3
|
"version": "0.0.0-dev",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"private": true,
|
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@hypit/component-kit": "workspace:*",
|
|
15
|
-
"@hypit/composition": "workspace:*",
|
|
16
15
|
"@hypit/elaborator": "workspace:*",
|
|
17
16
|
"@hypit/protocol": "workspace:*",
|
|
18
17
|
"@hypit/speech": "workspace:*",
|
|
19
|
-
"@hypit/
|
|
20
|
-
"@hypit/markup": "workspace:*"
|
|
18
|
+
"@hypit/timeline": "workspace:*",
|
|
19
|
+
"@hypit/markup": "workspace:*",
|
|
20
|
+
"@hypit/program-space": "workspace:*",
|
|
21
|
+
"@hypit/temporal": "workspace:*",
|
|
22
|
+
"@hypit/temporal-markup": "workspace:*"
|
|
21
23
|
},
|
|
22
24
|
"devDependencies": {
|
|
23
25
|
"@hypit/core": "workspace:*",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { decodeClockSurface } from "@hypit/program-space";
|
|
2
|
+
import { createMarkupSurfaceHostFacet } from "@hypit/markup";
|
|
3
|
+
import {
|
|
4
|
+
decodeTimelineAuthorSurface, timelineAuthorComponent, timelineAuthorManifest,
|
|
5
|
+
timelineAuthorModuleRef,
|
|
6
|
+
timelineAuthorMarkupSurfaces,
|
|
7
|
+
} from "./index.js";
|
|
8
|
+
|
|
9
|
+
export const hypitPackage = {
|
|
10
|
+
format: "hypit.node-package@1" as const,
|
|
11
|
+
modules: [{
|
|
12
|
+
manifest: timelineAuthorManifest,
|
|
13
|
+
}],
|
|
14
|
+
components: [timelineAuthorComponent],
|
|
15
|
+
hostFacets: [createMarkupSurfaceHostFacet({
|
|
16
|
+
module: timelineAuthorModuleRef,
|
|
17
|
+
declaration: timelineAuthorMarkupSurfaces.find((item) => item.name === "timeline")!, handler: decodeTimelineAuthorSurface,
|
|
18
|
+
}), createMarkupSurfaceHostFacet({ module: timelineAuthorModuleRef,
|
|
19
|
+
declaration: timelineAuthorMarkupSurfaces.find(item => item.name === "clock")!, handler: decodeClockSurface,
|
|
20
|
+
})],
|
|
21
|
+
};
|
|
22
|
+
export default hypitPackage;
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
+
import type { ProgramClock } from "@hypit/program-space";
|
|
1
2
|
import type { ComponentPackage } from "@hypit/component-kit";
|
|
2
3
|
import type { StoredValue } from "@hypit/protocol";
|
|
3
4
|
import { canonicalize } from "@hypit/protocol";
|
|
4
5
|
import type { SemanticTake } from "@hypit/speech";
|
|
5
6
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import type {
|
|
7
|
+
import { timelineAuthorProducers } from "./manifest.js";
|
|
8
|
+
import { appendTimelineAuthorTake, assembleTimelineAuthor, createTimelineAuthorSet } from "./program.js";
|
|
9
|
+
import type { TimelineAuthorHeader, TimelineAuthorSet } from "./types.js";
|
|
9
10
|
|
|
10
11
|
function inline<T>(value: StoredValue | undefined, subject: string): T {
|
|
11
12
|
if (value?.kind !== "inline") throw new Error(`${subject} must be inline`);
|
|
12
13
|
return value.value as unknown as T;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export const
|
|
16
|
+
export const timelineAuthorComponent = {
|
|
16
17
|
producers: [
|
|
17
18
|
{
|
|
18
|
-
producer:
|
|
19
|
+
producer: timelineAuthorProducers.createSet,
|
|
19
20
|
handler: () => ({
|
|
20
|
-
outputs: { set: { kind: "inline", value: canonicalize(
|
|
21
|
+
outputs: { set: { kind: "inline", value: canonicalize(createTimelineAuthorSet()) } },
|
|
21
22
|
needs: {},
|
|
22
23
|
}),
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
|
-
producer:
|
|
26
|
+
producer: timelineAuthorProducers.appendTake,
|
|
26
27
|
handler: ({ inputs }) => ({
|
|
27
|
-
outputs: { set: { kind: "inline", value: canonicalize(
|
|
28
|
-
inline<
|
|
28
|
+
outputs: { set: { kind: "inline", value: canonicalize(appendTimelineAuthorTake(
|
|
29
|
+
inline<TimelineAuthorSet>(inputs.set?.value, "TimelineAuthorSet"),
|
|
29
30
|
inline<SemanticTake>(inputs.take?.value, "SemanticTake"),
|
|
30
31
|
)) } },
|
|
31
32
|
needs: {},
|
|
32
33
|
}),
|
|
33
34
|
},
|
|
34
35
|
{
|
|
35
|
-
producer:
|
|
36
|
+
producer: timelineAuthorProducers.assembleTrack,
|
|
36
37
|
handler: ({ inputs }) => ({
|
|
37
|
-
outputs: { track: { kind: "inline", value: canonicalize(
|
|
38
|
-
inline<
|
|
39
|
-
inline<
|
|
38
|
+
outputs: { track: { kind: "inline", value: canonicalize(assembleTimelineAuthor(
|
|
39
|
+
inline<TimelineAuthorHeader>(inputs.header?.value, "TimelineAuthorHeader"),
|
|
40
|
+
inline<TimelineAuthorSet>(inputs.set?.value, "TimelineAuthorSet"),
|
|
41
|
+
inline<ProgramClock>(inputs.clock?.value, "ProgramClock"),
|
|
40
42
|
)) } },
|
|
41
43
|
needs: {},
|
|
42
44
|
}),
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
+
import { programSpaceTypes } from "@hypit/program-space";
|
|
1
2
|
import { speechTypes } from "@hypit/speech";
|
|
2
|
-
import { compositionTypes } from "@hypit/composition";
|
|
3
3
|
import { sealGraphFragment } from "@hypit/elaborator";
|
|
4
4
|
import type { FragmentOperation } from "@hypit/elaborator";
|
|
5
|
-
import {
|
|
5
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
6
6
|
import type { TypeRef } from "@hypit/protocol";
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import type {
|
|
8
|
+
import { timelineAuthorProducers, timelineAuthorTypes } from "./manifest.js";
|
|
9
|
+
import type { TimelineAuthorFragmentOptions } from "./types.js";
|
|
10
10
|
|
|
11
11
|
const input = (name: string) => ({ kind: "fragment-input" as const, name });
|
|
12
12
|
const operation = (id: string) => ({ kind: "fragment-operation" as const, operation: id });
|
|
13
13
|
|
|
14
|
-
export function
|
|
15
|
-
if (options.takes.length === 0) throw new Error("Speech Track requires at least one Take");
|
|
14
|
+
export function createTimelineAuthorFragment(options: TimelineAuthorFragmentOptions) {
|
|
16
15
|
const declaredInputs = new Map<string, TypeRef>();
|
|
17
16
|
const addInput = (name: string, type: TypeRef): void => {
|
|
18
|
-
if (!name) throw new Error("
|
|
17
|
+
if (!name) throw new Error("Timeline Fragment input names must not be empty");
|
|
19
18
|
const previous = declaredInputs.get(name);
|
|
20
19
|
if (previous !== undefined && (previous.module.name !== type.module.name
|
|
21
20
|
|| previous.module.version !== type.module.version || previous.name !== type.name)) {
|
|
22
|
-
throw new Error(`
|
|
21
|
+
throw new Error(`Timeline Fragment input ${name} is reused with another Type`);
|
|
23
22
|
}
|
|
24
23
|
declaredInputs.set(name, type);
|
|
25
24
|
};
|
|
26
|
-
addInput("header",
|
|
25
|
+
addInput("header", timelineAuthorTypes.header);
|
|
26
|
+
addInput("clock", programSpaceTypes.clock);
|
|
27
27
|
for (const take of options.takes) {
|
|
28
28
|
addInput(take.takeName, speechTypes.semanticTake);
|
|
29
29
|
}
|
|
30
30
|
const operations: FragmentOperation[] = [{
|
|
31
31
|
id: "track:set:empty",
|
|
32
|
-
producer:
|
|
32
|
+
producer: timelineAuthorProducers.createSet,
|
|
33
33
|
inputs: {},
|
|
34
34
|
result: { kind: "output", name: "set" },
|
|
35
35
|
}];
|
|
@@ -38,7 +38,7 @@ export function createSpeechTrackFragment(options: SpeechTrackFragmentOptions) {
|
|
|
38
38
|
const id = `track:set:append:${String(index + 1).padStart(4, "0")}`;
|
|
39
39
|
operations.push({
|
|
40
40
|
id,
|
|
41
|
-
producer:
|
|
41
|
+
producer: timelineAuthorProducers.appendTake,
|
|
42
42
|
inputs: {
|
|
43
43
|
set: operation(current),
|
|
44
44
|
take: input(take.takeName),
|
|
@@ -50,25 +50,16 @@ export function createSpeechTrackFragment(options: SpeechTrackFragmentOptions) {
|
|
|
50
50
|
operations.push(
|
|
51
51
|
{
|
|
52
52
|
id: "track:semantic",
|
|
53
|
-
producer:
|
|
54
|
-
inputs: { header: input("header"), set: operation(current) },
|
|
53
|
+
producer: timelineAuthorProducers.assembleTrack,
|
|
54
|
+
inputs: { header: input("header"), set: operation(current), clock: input("clock") },
|
|
55
55
|
result: { kind: "output", name: "track" },
|
|
56
56
|
},
|
|
57
|
-
{
|
|
58
|
-
id: "track:audio-track",
|
|
59
|
-
producer: semanticTrackProducers.projectAudio,
|
|
60
|
-
inputs: { track: operation("track:semantic") },
|
|
61
|
-
result: { kind: "output", name: "audio" },
|
|
62
|
-
},
|
|
63
57
|
);
|
|
64
58
|
return sealGraphFragment({
|
|
65
59
|
inputs: [...declaredInputs.entries()].map(([name, type]) => ({ name, type })),
|
|
66
60
|
operations,
|
|
67
61
|
exports: [
|
|
68
|
-
{ name: "
|
|
69
|
-
{
|
|
70
|
-
name: "audio", type: compositionTypes.audioTrack, root: operation("track:audio-track"),
|
|
71
|
-
},
|
|
62
|
+
{ name: "timeline", type: timelineTypes.track, root: operation("track:semantic") },
|
|
72
63
|
],
|
|
73
64
|
});
|
|
74
65
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Official Timeline authoring and deterministic Timeline assembly. */
|
|
2
|
+
export { timelineAuthorComponent } from "./component.js";
|
|
3
|
+
export { createTimelineAuthorFragment } from "./fragment.js";
|
|
4
|
+
export { timelineAuthorManifest, timelineAuthorMarkupSurfaces, timelineAuthorModuleRef, timelineAuthorProducers, timelineAuthorTypes, timelineAuthorHeaderSchema, timelineAuthorSetSchema } from "./manifest.js";
|
|
5
|
+
export { appendTimelineAuthorTake, assembleTimelineAuthor, assertTimelineAuthorHeader, assertTimelineAuthorSet, createTimelineAuthorSet, sealTimelineAuthorHeader } from "./program.js";
|
|
6
|
+
export { decodeTimelineAuthorSurface } from "./surface.js";
|
|
7
|
+
export type * from "./types.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { programSpaceDependency, programSpaceTypes, programSpaceMarkupSurfaces } from "@hypit/program-space";
|
|
2
|
+
import { semanticTakeSchema, speechDependency, speechTypes } from "@hypit/speech";
|
|
3
|
+
import { timelineDependency, timelineTypes } from "@hypit/timeline";
|
|
4
|
+
import type { ModuleManifest, ValueSchema } from "@hypit/protocol";
|
|
5
|
+
export const timelineAuthorModuleRef = { name: "@hypit/timeline-author", version: "1" } as const;
|
|
6
|
+
export const timelineAuthorTypes = {
|
|
7
|
+
header: { module: timelineAuthorModuleRef, name: "TimelineAuthorHeader" },
|
|
8
|
+
trackSet: { module: timelineAuthorModuleRef, name: "TimelineAuthorSet" },
|
|
9
|
+
} as const;
|
|
10
|
+
export const timelineAuthorProducers = {
|
|
11
|
+
createSet: { module: timelineAuthorModuleRef, name: "create-track-set" },
|
|
12
|
+
appendTake: { module: timelineAuthorModuleRef, name: "append-track-take" },
|
|
13
|
+
assembleTrack: { module: timelineAuthorModuleRef, name: "assemble-timeline" },
|
|
14
|
+
} as const;
|
|
15
|
+
export const timelineAuthorHeaderSchema: ValueSchema = { kind: "object", fields: { id: { schema: { kind: "string", minLength: 1 } }, at: { optional: true, schema: { kind: "array", items: { kind: "string" } } }, end: { optional: true, schema: { kind: "string" } } } };
|
|
16
|
+
export const timelineAuthorSetSchema: ValueSchema = { kind: "object", fields: { takes: { schema: { kind: "array", items: { kind: "object", fields: { semantic: { schema: semanticTakeSchema } } } } } } };
|
|
17
|
+
export const timelineAuthorMarkupSurfaces = [{
|
|
18
|
+
name: "timeline", tag: "Timeline", mode: "structured",
|
|
19
|
+
outputs: [timelineAuthorTypes.header, timelineTypes.track],
|
|
20
|
+
vocabulary: {
|
|
21
|
+
summary: "Declares one complete Timeline, with zero or more prepared Takes placed within it.",
|
|
22
|
+
attributes: [
|
|
23
|
+
{ name: "id", kind: "identifier", required: true, summary: "Names the Timeline output." },
|
|
24
|
+
{ name: "clock", kind: "reference", required: true, accepts: [programSpaceTypes.clock], summary: "Frame rate, available before material generation." },
|
|
25
|
+
{ name: "end", kind: "literal", required: false, summary: "Program end: fixed time or content.end with an optional offset; defaults to content.end." },
|
|
26
|
+
],
|
|
27
|
+
children: [{ tag: "Take", cardinality: "many", summary: "A prepared SemanticTake in performance order.",
|
|
28
|
+
attributes: [{ name: "source", kind: "reference", required: true, accepts: [speechTypes.semanticTake], summary: "The normalized, aligned performance." },
|
|
29
|
+
{ name: "at", kind: "literal", required: false, summary: "Absolute position or previous.end with an offset. Defaults to zero for the first Take and previous.end thereafter." }] }],
|
|
30
|
+
ports: [
|
|
31
|
+
{ name: "timeline", type: timelineTypes.track, summary: "The complete time range, retaining placed material and any semantic evidence." },
|
|
32
|
+
],
|
|
33
|
+
example: '<time:Clock id="clock" frame-rate="30"/><time:Timeline id="program" clock={clock} end="content.end+2s"><time:Take source={opening.take} at="2s"/><time:Take source={answer.take}/></time:Timeline>',
|
|
34
|
+
notes: ["Performance, Sound and Caption present existing pictures, audio and words independently. Include their contributions explicitly in Film."],
|
|
35
|
+
},
|
|
36
|
+
}, programSpaceMarkupSurfaces[0]] as const;
|
|
37
|
+
export const timelineAuthorManifest: ModuleManifest = {
|
|
38
|
+
format: "hypit.module@1",
|
|
39
|
+
name: timelineAuthorModuleRef.name,
|
|
40
|
+
version: timelineAuthorModuleRef.version,
|
|
41
|
+
dependencies: [
|
|
42
|
+
programSpaceDependency,
|
|
43
|
+
speechDependency,
|
|
44
|
+
timelineDependency,
|
|
45
|
+
],
|
|
46
|
+
types: [
|
|
47
|
+
{ name: timelineAuthorTypes.header.name },
|
|
48
|
+
{ name: timelineAuthorTypes.trackSet.name },
|
|
49
|
+
],
|
|
50
|
+
capabilities: [],
|
|
51
|
+
producers: [
|
|
52
|
+
{
|
|
53
|
+
name: timelineAuthorProducers.createSet.name,
|
|
54
|
+
inputs: [],
|
|
55
|
+
outputs: [{ name: "set", type: timelineAuthorTypes.trackSet }],
|
|
56
|
+
needs: [],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: timelineAuthorProducers.appendTake.name,
|
|
60
|
+
inputs: [
|
|
61
|
+
{ name: "set", type: timelineAuthorTypes.trackSet },
|
|
62
|
+
{ name: "take", type: speechTypes.semanticTake },
|
|
63
|
+
],
|
|
64
|
+
outputs: [{ name: "set", type: timelineAuthorTypes.trackSet }],
|
|
65
|
+
needs: [],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: timelineAuthorProducers.assembleTrack.name,
|
|
69
|
+
inputs: [
|
|
70
|
+
{ name: "header", type: timelineAuthorTypes.header },
|
|
71
|
+
{ name: "clock", type: programSpaceTypes.clock },
|
|
72
|
+
{ name: "set", type: timelineAuthorTypes.trackSet },
|
|
73
|
+
],
|
|
74
|
+
outputs: [{ name: "track", type: timelineTypes.track }],
|
|
75
|
+
needs: [],
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
};
|