@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,16 +1,15 @@
|
|
|
1
|
+
import { composeParameterDeclarations } from "./parameters.js";
|
|
1
2
|
/**
|
|
2
3
|
* Turn a built programme into what the panels read.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* timeline is assembled without knowing what made any of it, and a package that
|
|
7
|
-
* grows a new Track shows up without this file changing.
|
|
5
|
+
* The Timeline owns the work range. Companions project selectable entities onto
|
|
6
|
+
* that range without extending it or requiring component-specific editor code.
|
|
8
7
|
*/
|
|
9
8
|
import { relative } from "node:path";
|
|
10
9
|
|
|
11
10
|
import type { MarkupSurfaceRegistryLike } from "@hypit/markup";
|
|
12
11
|
import { compositionTypes } from "@hypit/composition";
|
|
13
|
-
import {
|
|
12
|
+
import { programSpaceFrameCount } from "@hypit/program-space";
|
|
14
13
|
import { sameModule, sameType } from "@hypit/protocol";
|
|
15
14
|
|
|
16
15
|
import type {
|
|
@@ -138,43 +137,10 @@ function scriptMap(
|
|
|
138
137
|
};
|
|
139
138
|
}
|
|
140
139
|
|
|
141
|
-
type NarrativeValue = {
|
|
142
|
-
readonly id?: string;
|
|
143
|
-
readonly segments?: readonly {
|
|
144
|
-
readonly id: string;
|
|
145
|
-
readonly startAnchorId: string;
|
|
146
|
-
readonly endAnchorId: string;
|
|
147
|
-
}[];
|
|
148
|
-
readonly tokens?: readonly {
|
|
149
|
-
readonly id: string;
|
|
150
|
-
readonly segmentId: string;
|
|
151
|
-
readonly startAnchorId: string;
|
|
152
|
-
readonly endAnchorId: string;
|
|
153
|
-
readonly text: string;
|
|
154
|
-
}[];
|
|
155
|
-
readonly selections?: readonly {
|
|
156
|
-
readonly id: string;
|
|
157
|
-
readonly startAnchorId: string;
|
|
158
|
-
readonly endAnchorId: string;
|
|
159
|
-
}[];
|
|
160
|
-
readonly moments?: readonly {
|
|
161
|
-
readonly id: string;
|
|
162
|
-
readonly anchorId: string;
|
|
163
|
-
}[];
|
|
164
|
-
readonly semanticIndex?: {
|
|
165
|
-
readonly anchors?: readonly {
|
|
166
|
-
readonly id: string;
|
|
167
|
-
readonly kind: "program-start" | "segment-start" | "segment-end" | "token-start" | "token-end" | "program-end";
|
|
168
|
-
readonly segmentId?: string;
|
|
169
|
-
readonly tokenId?: string;
|
|
170
|
-
}[];
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
|
|
174
140
|
/**
|
|
175
141
|
* Project the compiled Narrative into the frame domain that the preview is
|
|
176
142
|
* already using. No frontend timing is invented here: if an anchor is absent
|
|
177
|
-
* from the built
|
|
143
|
+
* from the built Timeline, the corresponding item is simply not drawable yet.
|
|
178
144
|
*/
|
|
179
145
|
function semanticTimeline(
|
|
180
146
|
registry: StudioCompanionRegistry,
|
|
@@ -182,77 +148,13 @@ function semanticTimeline(
|
|
|
182
148
|
script: ScriptMap | undefined,
|
|
183
149
|
): SemanticTimeline | undefined {
|
|
184
150
|
if (built.narrativeId === undefined) return undefined;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if (records.length > 1) {
|
|
190
|
-
throw new Error(`Studio Narrative id ${built.narrativeId} resolves to more than one authored value.`);
|
|
191
|
-
}
|
|
192
|
-
const record = records[0];
|
|
193
|
-
const narrative = record?.value.kind === "inline"
|
|
194
|
-
? record.value.value as NarrativeValue
|
|
195
|
-
: undefined;
|
|
196
|
-
if (narrative === undefined) throw new Error("Studio Narrative is not an inline authored value.");
|
|
197
|
-
|
|
198
|
-
const segmentRanges = new Map((script?.segments ?? []).map((item) => [item.id, item.range]));
|
|
199
|
-
const tokenRanges = new Map((script?.tokens ?? []).map((item) => [item.id, item.range]));
|
|
200
|
-
const frame = (id: string): number | undefined => built.anchors.get(id);
|
|
201
|
-
|
|
202
|
-
const segments = (narrative.segments ?? []).flatMap((segment) => {
|
|
203
|
-
const startFrame = frame(segment.startAnchorId);
|
|
204
|
-
const endFrame = frame(segment.endAnchorId);
|
|
205
|
-
if (startFrame === undefined || endFrame === undefined) return [];
|
|
206
|
-
return [{
|
|
207
|
-
id: segment.id,
|
|
208
|
-
startFrame,
|
|
209
|
-
endFrameExclusive: Math.max(startFrame + 1, endFrame),
|
|
210
|
-
...(segmentRanges.has(segment.id) ? { range: segmentRanges.get(segment.id)! } : {}),
|
|
211
|
-
}];
|
|
151
|
+
if (script === undefined) throw new Error("Timeline's Script has no Studio source mapping.");
|
|
152
|
+
const projected = registry.projectScript({ source: script, anchors: built.anchors,
|
|
153
|
+
values: built.source.compiled.program.records.flatMap(record => record.value.kind === "inline"
|
|
154
|
+
? [{ id: record.id, type: record.type, value: record.value.value }] : []),
|
|
212
155
|
});
|
|
213
|
-
const tokens = (narrative.tokens ?? []).flatMap((token) => {
|
|
214
|
-
const startFrame = frame(token.startAnchorId);
|
|
215
|
-
const endFrame = frame(token.endAnchorId);
|
|
216
|
-
if (startFrame === undefined || endFrame === undefined) return [];
|
|
217
|
-
return [{
|
|
218
|
-
id: token.id,
|
|
219
|
-
segmentId: token.segmentId,
|
|
220
|
-
text: token.text,
|
|
221
|
-
startFrame,
|
|
222
|
-
endFrameExclusive: Math.max(startFrame + 1, endFrame),
|
|
223
|
-
...(tokenRanges.has(token.id) ? { range: tokenRanges.get(token.id)! } : {}),
|
|
224
|
-
}];
|
|
225
|
-
});
|
|
226
|
-
const anchors = (narrative.semanticIndex?.anchors ?? []).flatMap((anchor) => {
|
|
227
|
-
const at = frame(anchor.id);
|
|
228
|
-
if (at === undefined) return [];
|
|
229
|
-
return [{
|
|
230
|
-
id: anchor.id,
|
|
231
|
-
kind: anchor.kind,
|
|
232
|
-
frame: at,
|
|
233
|
-
...(anchor.segmentId === undefined ? {} : { segmentId: anchor.segmentId }),
|
|
234
|
-
...(anchor.tokenId === undefined ? {} : { tokenId: anchor.tokenId }),
|
|
235
|
-
}];
|
|
236
|
-
});
|
|
237
|
-
const selections = (narrative.selections ?? []).flatMap((selection) => {
|
|
238
|
-
const startFrame = frame(selection.startAnchorId);
|
|
239
|
-
const endFrameExclusive = frame(selection.endAnchorId);
|
|
240
|
-
if (startFrame === undefined || endFrameExclusive === undefined || endFrameExclusive <= startFrame) return [];
|
|
241
|
-
return [{
|
|
242
|
-
id: selection.id,
|
|
243
|
-
startAnchorId: selection.startAnchorId,
|
|
244
|
-
endAnchorId: selection.endAnchorId,
|
|
245
|
-
startFrame,
|
|
246
|
-
endFrameExclusive,
|
|
247
|
-
}];
|
|
248
|
-
});
|
|
249
|
-
const moments = (narrative.moments ?? []).flatMap((moment) => {
|
|
250
|
-
const at = frame(moment.anchorId);
|
|
251
|
-
return at === undefined ? [] : [{ id: moment.id, anchorId: moment.anchorId, frame: at }];
|
|
252
|
-
});
|
|
253
|
-
if (segments.length === 0) throw new Error("Studio SemanticTrack resolves no authored Segment anchors.");
|
|
254
156
|
const provenance: CandidateProvenance = {
|
|
255
|
-
output: built.timingOutput?.name ?? "
|
|
157
|
+
output: built.timingOutput?.name ?? "Timeline",
|
|
256
158
|
...(built.timingOutput?.ref === undefined ? {} : { outputRef: built.timingOutput.ref }),
|
|
257
159
|
...(built.timingCandidateId === undefined ? {} : { candidateId: built.timingCandidateId }),
|
|
258
160
|
origin: built.timingCandidateOrigin,
|
|
@@ -262,17 +164,10 @@ function semanticTimeline(
|
|
|
262
164
|
return {
|
|
263
165
|
spaceId: built.space.id,
|
|
264
166
|
narrativeId: built.narrativeId,
|
|
265
|
-
//
|
|
266
|
-
// the authored Speech Track id into this label: it is the timebase, not a
|
|
267
|
-
// second Speech output.
|
|
167
|
+
// The generic ruler presentation is independent of the authored Timeline id.
|
|
268
168
|
presentation: registry.semanticTimelinePresentation(),
|
|
269
|
-
//
|
|
270
|
-
|
|
271
|
-
anchors,
|
|
272
|
-
segments: segments.sort((left, right) => left.startFrame - right.startFrame || left.id.localeCompare(right.id)),
|
|
273
|
-
tokens: tokens.sort((left, right) => left.startFrame - right.startFrame || left.id.localeCompare(right.id)),
|
|
274
|
-
selections: selections.sort((left, right) => left.startFrame - right.startFrame || left.id.localeCompare(right.id)),
|
|
275
|
-
moments: moments.sort((left, right) => left.frame - right.frame || left.id.localeCompare(right.id)),
|
|
169
|
+
// Preserve the Companion's ordered anchors, including coincident boundaries.
|
|
170
|
+
...projected,
|
|
276
171
|
provenance,
|
|
277
172
|
};
|
|
278
173
|
}
|
|
@@ -338,13 +233,18 @@ export function snapshot(registry: StudioCompanionRegistry, built: Preview, inpu
|
|
|
338
233
|
semantic,
|
|
339
234
|
generic,
|
|
340
235
|
}).map((draft) => {
|
|
236
|
+
const declarations = composeParameterDeclarations({
|
|
237
|
+
placement, draft, placements: built.source.observations.placements, registry,
|
|
238
|
+
bindings: registry.bindingDeclarations(item, placement, draft.lane, draft.band),
|
|
239
|
+
inspector: registry.inspectorDeclarations(item, placement, draft.lane, draft.band),
|
|
240
|
+
});
|
|
341
241
|
const bindings = sourceBindingsForDraft({
|
|
342
242
|
root: input.workspaceRoot,
|
|
343
243
|
files: input.sourceFiles,
|
|
344
244
|
placement,
|
|
345
245
|
draft,
|
|
346
246
|
declarations: [
|
|
347
|
-
...
|
|
247
|
+
...declarations.bindings,
|
|
348
248
|
...temporalBindingDeclarations(draft.temporal),
|
|
349
249
|
],
|
|
350
250
|
placements: built.source.observations.placements,
|
|
@@ -352,7 +252,7 @@ export function snapshot(registry: StudioCompanionRegistry, built: Preview, inpu
|
|
|
352
252
|
const inspector = inspectorFieldsForBindings(
|
|
353
253
|
draft,
|
|
354
254
|
bindings,
|
|
355
|
-
|
|
255
|
+
declarations.inspector,
|
|
356
256
|
);
|
|
357
257
|
const editHandles = resolveTimelineEditHandles(
|
|
358
258
|
bindings,
|
|
@@ -404,17 +304,7 @@ export function snapshot(registry: StudioCompanionRegistry, built: Preview, inpu
|
|
|
404
304
|
// root that produced them in this list.
|
|
405
305
|
const rows = tracks.map((track, row) => ({ ...track, row }));
|
|
406
306
|
|
|
407
|
-
const
|
|
408
|
-
?.durationSec;
|
|
409
|
-
const frameCount = Math.max(
|
|
410
|
-
1,
|
|
411
|
-
declared === undefined
|
|
412
|
-
? 0
|
|
413
|
-
: Math.round(declared * input.frameRate.numerator / input.frameRate.denominator),
|
|
414
|
-
...rows.flatMap((track) => track.clips.map((clip) => clip.endFrameExclusive)),
|
|
415
|
-
...(semantic?.segments ?? []).map((segment) => segment.endFrameExclusive),
|
|
416
|
-
...(semantic?.tokens ?? []).map((token) => token.endFrameExclusive),
|
|
417
|
-
);
|
|
307
|
+
const frameCount = programSpaceFrameCount(built.space);
|
|
418
308
|
return {
|
|
419
309
|
revision: input.revision,
|
|
420
310
|
source: {
|
|
@@ -442,7 +332,6 @@ export function snapshot(registry: StudioCompanionRegistry, built: Preview, inpu
|
|
|
442
332
|
...(semantic === undefined ? {} : { semantic }),
|
|
443
333
|
preview: input.preview,
|
|
444
334
|
provenance: {
|
|
445
|
-
timing: built.timing,
|
|
446
335
|
picture: "resolved",
|
|
447
336
|
note: note(built),
|
|
448
337
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Candidate } from "@hypit/protocol";
|
|
2
2
|
import { sameType } from "@hypit/protocol";
|
|
3
3
|
import type { StudioFilmCompanion } from "@hypit/studio-adapter";
|
|
4
|
-
import {
|
|
4
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
5
5
|
|
|
6
6
|
import type { CompiledSource } from "./compile.js";
|
|
7
7
|
import type { Placement } from "./observe.js";
|
|
@@ -137,7 +137,7 @@ export function inspectStudioRun(
|
|
|
137
137
|
});
|
|
138
138
|
const timeOutput = times[0];
|
|
139
139
|
if (times.length !== 1) issues.push("Film requires one traceable time source.");
|
|
140
|
-
const semanticOutput = timeOutput !== undefined && sameType(timeOutput.typeRef,
|
|
140
|
+
const semanticOutput = timeOutput !== undefined && sameType(timeOutput.typeRef, timelineTypes.track) ? timeOutput : undefined;
|
|
141
141
|
let companionValueRefs: readonly string[] = [];
|
|
142
142
|
try {
|
|
143
143
|
companionValueRefs = unique(filmTrackRefs.flatMap((ref) =>
|
|
@@ -149,7 +149,7 @@ export function inspectStudioRun(
|
|
|
149
149
|
|
|
150
150
|
const projectionRefs = unique([
|
|
151
151
|
...filmTrackRefs,
|
|
152
|
-
...(semanticOutput !== undefined && sameType(semanticOutput.typeRef,
|
|
152
|
+
...(semanticOutput !== undefined && sameType(semanticOutput.typeRef, timelineTypes.track) ? [semanticOutput.ref] : []),
|
|
153
153
|
...companionValueRefs,
|
|
154
154
|
]);
|
|
155
155
|
const projections: StudioViewRequirement[] = [];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
StudioTrackCompanion,
|
|
3
|
+
StudioParameterCompanion,
|
|
3
4
|
StudioTrackCompanionContext,
|
|
4
5
|
StudioEditHandle,
|
|
5
6
|
StudioEntityDraft,
|
|
@@ -8,6 +9,7 @@ import type {
|
|
|
8
9
|
StudioViewRole,
|
|
9
10
|
StudioResolvedTrack,
|
|
10
11
|
StudioScriptAdjustment,
|
|
12
|
+
StudioScriptProjectionInput,
|
|
11
13
|
StudioScriptCompanion,
|
|
12
14
|
StudioScriptSourceMap,
|
|
13
15
|
StudioSourceBindingDeclaration,
|
|
@@ -18,7 +20,7 @@ import { parameterOption } from "./parameter-values.js";
|
|
|
18
20
|
import { compositionTypes } from "@hypit/composition";
|
|
19
21
|
import { sameModule, sameType } from "@hypit/protocol";
|
|
20
22
|
import type { ModuleRef, TypeRef } from "@hypit/protocol";
|
|
21
|
-
import {
|
|
23
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
22
24
|
|
|
23
25
|
import type { Placement } from "./observe.js";
|
|
24
26
|
import type { Clip, StudioTrackBinding } from "./shared.js";
|
|
@@ -29,9 +31,9 @@ const flatLane = {
|
|
|
29
31
|
heightPx: 52,
|
|
30
32
|
};
|
|
31
33
|
|
|
32
|
-
const tones = new Set(["blue", "green", "teal", "violet", "magenta", "orange", "orange-muted", "neutral"]);
|
|
34
|
+
const tones = new Set(["blue", "blue-muted", "green", "green-muted", "teal", "violet", "magenta", "magenta-muted", "orange", "orange-muted", "neutral"]);
|
|
33
35
|
const icons = new Set(["brand", "captions", "component", "layers", "ranking", "text", "timeline", "video", "waveform"]);
|
|
34
|
-
const chromes = new Set(["standard", "group", "point"]);
|
|
36
|
+
const chromes = new Set(["standard", "group", "point", "compact"]);
|
|
35
37
|
const layouts = new Set(["repeat-x", "cover", "contain", "storyboard", "waveform"]);
|
|
36
38
|
const inspectorDomains = new Set(["where", "how", "when"]);
|
|
37
39
|
const inspectorControls = new Set<string>(studioParameterControls);
|
|
@@ -100,6 +102,17 @@ function validateCompanionVocabulary(companion: StudioTrackCompanion): void {
|
|
|
100
102
|
throw new Error(`Studio Track Companion ${companion.id} selects unsupported icon ${companion.icon}`);
|
|
101
103
|
}
|
|
102
104
|
validateInspector(`Studio Track Companion ${companion.id}`, companion.bindings, companion.inspector);
|
|
105
|
+
const bandIds = new Set<string>();
|
|
106
|
+
for (const band of companion.bands ?? []) {
|
|
107
|
+
if (!band.id.trim() || bandIds.has(band.id)) throw new Error(`Studio Companion ${companion.id} has a duplicate or empty band id`);
|
|
108
|
+
bandIds.add(band.id);
|
|
109
|
+
if (!Number.isFinite(band.heightPx) || band.heightPx <= 0
|
|
110
|
+
|| !["before", "after"].includes(band.placement) || !["label", "content"].includes(band.display)) {
|
|
111
|
+
throw new Error(`Studio Companion ${companion.id} band ${band.id} has invalid layout`);
|
|
112
|
+
}
|
|
113
|
+
if (band.tone !== undefined && !tones.has(band.tone)) throw new Error(`Studio Companion ${companion.id} band ${band.id} has unsupported tone`);
|
|
114
|
+
validateInspector(`Studio Companion ${companion.id} band ${band.id}`, band.bindings, band.inspector);
|
|
115
|
+
}
|
|
103
116
|
for (const attachment of companion.attachments ?? []) {
|
|
104
117
|
if (attachment.tone !== undefined && !tones.has(attachment.tone)) {
|
|
105
118
|
throw new Error(`Studio Track Companion ${companion.id} attachment ${attachment.id} selects unsupported tone ${attachment.tone}`);
|
|
@@ -112,6 +125,10 @@ function validateCompanionVocabulary(companion: StudioTrackCompanion): void {
|
|
|
112
125
|
}
|
|
113
126
|
|
|
114
127
|
function validateDraftVocabulary(companion: StudioTrackCompanion, draft: StudioEntityDraft): void {
|
|
128
|
+
if (draft.band !== undefined && (draft.lane !== undefined || !companion.bands?.some(band => band.id === draft.band))) {
|
|
129
|
+
throw new Error(`Studio Companion ${companion.id} entity ${draft.id} must select one declared band within its own Track`);
|
|
130
|
+
}
|
|
131
|
+
|
|
115
132
|
if (draft.display === undefined || typeof draft.display.title !== "string" || draft.display.title.trim().length === 0) {
|
|
116
133
|
throw new Error(`Studio Track Companion ${companion.id} entity ${draft.id} has no display title`);
|
|
117
134
|
}
|
|
@@ -168,6 +185,7 @@ function specificity(companion: StudioTrackCompanion): number {
|
|
|
168
185
|
|
|
169
186
|
/** Immutable interpretation assembled for one project session. */
|
|
170
187
|
export class StudioCompanionRegistry {
|
|
188
|
+
readonly #parameters: readonly StudioParameterCompanion[];
|
|
171
189
|
readonly #tracks: readonly StudioTrackCompanion[];
|
|
172
190
|
readonly #films: readonly StudioFilmCompanion[];
|
|
173
191
|
readonly #scripts: readonly StudioScriptCompanion[];
|
|
@@ -177,6 +195,7 @@ export class StudioCompanionRegistry {
|
|
|
177
195
|
options: {
|
|
178
196
|
readonly films?: readonly StudioFilmCompanion[];
|
|
179
197
|
readonly scripts?: readonly StudioScriptCompanion[];
|
|
198
|
+
readonly parameters?: readonly StudioParameterCompanion[];
|
|
180
199
|
} = {},
|
|
181
200
|
) {
|
|
182
201
|
const ids = new Set<string>();
|
|
@@ -197,11 +216,23 @@ export class StudioCompanionRegistry {
|
|
|
197
216
|
ids.add(companion.id);
|
|
198
217
|
}
|
|
199
218
|
}
|
|
219
|
+
this.#parameters = Object.freeze([...(options.parameters ?? [])]);
|
|
220
|
+
for (const companion of this.#parameters) {
|
|
221
|
+
if (ids.has(companion.id)) throw new Error(`Studio Parameter Companion id is repeated: ${companion.id}`);
|
|
222
|
+
ids.add(companion.id);
|
|
223
|
+
validateInspector(`Studio Parameter Companion ${companion.id}`, companion.bindings, companion.inspector);
|
|
224
|
+
}
|
|
200
225
|
this.#tracks = Object.freeze([...tracks]);
|
|
201
226
|
this.#films = Object.freeze(films);
|
|
202
227
|
this.#scripts = Object.freeze(scripts);
|
|
203
228
|
}
|
|
204
229
|
|
|
230
|
+
parameterCompanionFor(module: ModuleRef, surface: string): StudioParameterCompanion | undefined {
|
|
231
|
+
const found = this.#parameters.filter(companion => sameModule(companion.match.module, module) && companion.match.surface === surface);
|
|
232
|
+
if (found.length > 1) throw new Error(`Studio Parameter companions are ambiguous for ${module.name}#${surface}.`);
|
|
233
|
+
return found[0];
|
|
234
|
+
}
|
|
235
|
+
|
|
205
236
|
filmCompanionFor(
|
|
206
237
|
type: TypeRef,
|
|
207
238
|
placement: Pick<Placement, "surface" | "module"> | undefined,
|
|
@@ -234,6 +265,12 @@ export class StudioCompanionRegistry {
|
|
|
234
265
|
: { ...found, companion: companion.id };
|
|
235
266
|
}
|
|
236
267
|
|
|
268
|
+
projectScript(input: StudioScriptProjectionInput) {
|
|
269
|
+
const companion = this.#scripts.find(item => item.id === input.source.companion);
|
|
270
|
+
if (companion?.project === undefined) throw new Error(`Script Companion ${input.source.companion} does not provide a timeline projection.`);
|
|
271
|
+
return companion.project(input);
|
|
272
|
+
}
|
|
273
|
+
|
|
237
274
|
adjustScript(input: {
|
|
238
275
|
readonly companion: string;
|
|
239
276
|
readonly sourceName: string;
|
|
@@ -286,7 +323,7 @@ export class StudioCompanionRegistry {
|
|
|
286
323
|
readonly icon: StudioTrackBinding["icon"];
|
|
287
324
|
readonly lane: StudioTrackBinding["lane"];
|
|
288
325
|
} {
|
|
289
|
-
const companion = this.trackCompanionFor(
|
|
326
|
+
const companion = this.trackCompanionFor(timelineTypes.track, undefined, []);
|
|
290
327
|
return {
|
|
291
328
|
family: companion?.family ?? "semantic",
|
|
292
329
|
tone: companion?.tone ?? "teal",
|
|
@@ -334,7 +371,7 @@ export class StudioCompanionRegistry {
|
|
|
334
371
|
bindTrack(track: StudioResolvedTrack): StudioTrackBinding {
|
|
335
372
|
const companion = this.#trackCompanion(track);
|
|
336
373
|
// A Companion may provide a deliberate presentation label for a facet
|
|
337
|
-
// (e.g.
|
|
374
|
+
// (e.g. a component’s picture and sound outputs). Authored ids remain the fallback
|
|
338
375
|
// for ordinary user-named tracks.
|
|
339
376
|
const label = companion.label ?? track.trace.authoredId;
|
|
340
377
|
return {
|
|
@@ -346,6 +383,7 @@ export class StudioCompanionRegistry {
|
|
|
346
383
|
icon: companion.icon ?? (sameType(track.typeRef, compositionTypes.audioTrack) ? "waveform" : "layers"),
|
|
347
384
|
companion: companion.id,
|
|
348
385
|
lane: companion.lane ?? flatLane,
|
|
386
|
+
...(companion.bands === undefined ? {} : { bands: companion.bands.map(({ bindings: _bindings, inspector: _inspector, ...band }) => band) }),
|
|
349
387
|
...(track.trace.placement === undefined ? {} : { authoredTag: track.trace.placement }),
|
|
350
388
|
references: track.trace.references.map(({ name, type }) => ({ name, type })),
|
|
351
389
|
};
|
|
@@ -360,7 +398,7 @@ export class StudioCompanionRegistry {
|
|
|
360
398
|
: { kind: "preview", role: "decoration", preview, layout: "repeat-x" };
|
|
361
399
|
const projected: readonly StudioEntityDraft[] = companion.poster?.source !== "surface-preview" || surfaceLayer === undefined
|
|
362
400
|
? drafts
|
|
363
|
-
: drafts.map((draft) => draft.lane !== undefined
|
|
401
|
+
: drafts.map((draft) => draft.lane !== undefined || draft.band !== undefined
|
|
364
402
|
? draft
|
|
365
403
|
: {
|
|
366
404
|
...draft,
|
|
@@ -377,8 +415,10 @@ export class StudioCompanionRegistry {
|
|
|
377
415
|
track: StudioResolvedTrack,
|
|
378
416
|
placement: Placement | undefined,
|
|
379
417
|
lane?: string,
|
|
418
|
+
band?: string,
|
|
380
419
|
) {
|
|
381
420
|
const companion = this.#trackCompanion(track);
|
|
421
|
+
if (band !== undefined) return companion.bands?.find(item => item.id === band)?.bindings ?? [];
|
|
382
422
|
if (lane !== undefined) {
|
|
383
423
|
return companion.attachments?.find((attachment) => attachment.id === lane)?.bindings ?? [];
|
|
384
424
|
}
|
|
@@ -389,8 +429,10 @@ export class StudioCompanionRegistry {
|
|
|
389
429
|
track: StudioResolvedTrack,
|
|
390
430
|
placement: Placement | undefined,
|
|
391
431
|
lane?: string,
|
|
432
|
+
band?: string,
|
|
392
433
|
) {
|
|
393
434
|
const companion = this.#trackCompanion(track);
|
|
435
|
+
if (band !== undefined) return companion.bands?.find(item => item.id === band)?.inspector ?? [];
|
|
394
436
|
if (lane !== undefined) {
|
|
395
437
|
return companion.attachments?.find((attachment) => attachment.id === lane)?.inspector ?? [];
|
|
396
438
|
}
|
|
@@ -410,6 +452,8 @@ export function sealStudioClip(
|
|
|
410
452
|
id: draft.id.startsWith(`${outputRef}:`) ? draft.id : `${outputRef}:${draft.id}`,
|
|
411
453
|
...(draft.presentId === undefined ? {} : { presentId: draft.presentId }),
|
|
412
454
|
authoredId: draft.authoredId,
|
|
455
|
+
...(draft.band === undefined ? {} : { band: draft.band }),
|
|
456
|
+
...(draft.selectionGroup === undefined ? {} : { selectionGroup: draft.selectionGroup }),
|
|
413
457
|
...(draft.markerId === undefined ? {} : { markerId: draft.markerId }),
|
|
414
458
|
display: draft.display,
|
|
415
459
|
startFrame: draft.startFrame,
|