@hypit/hypit 0.1.4 → 0.1.6
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 +8 -1
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/hypit.runtime.json +1 -1
- 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 +35 -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 +21 -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 +66 -19
- 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 +10 -7
- 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 +109 -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 +30 -5
- package/packages/script/src/manifest.ts +4 -3
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/parser.ts +45 -6
- 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/LOCALIZATION.md +98 -0
- package/packages/studio/README.md +101 -14
- package/packages/studio/locales/en.json +197 -0
- package/packages/studio/locales/zh-CN.json +191 -0
- 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/localization-node.ts +46 -0
- package/packages/studio/src/localization.ts +85 -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 +223 -50
- package/packages/studio/src/ui/artifact-name.ts +8 -6
- package/packages/studio/src/ui/artifact-preview.ts +5 -4
- package/packages/studio/src/ui/code.ts +17 -16
- package/packages/studio/src/ui/comments.ts +234 -0
- package/packages/studio/src/ui/dropdown.ts +68 -0
- package/packages/studio/src/ui/i18n.ts +109 -0
- package/packages/studio/src/ui/icons.ts +6 -0
- package/packages/studio/src/ui/library.ts +76 -65
- package/packages/studio/src/ui/main.ts +223 -211
- package/packages/studio/src/ui/overlay.ts +12 -8
- package/packages/studio/src/ui/scrub-preview.ts +110 -0
- package/packages/studio/src/ui/stage.ts +93 -29
- package/packages/studio/src/ui/timeline.ts +190 -118
- package/packages/studio/start.ts +41 -22
- 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,22 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import { projectTimelineMedia } from "@hypit/timeline";
|
|
2
|
+
import type { Timeline } from "@hypit/timeline";
|
|
3
3
|
import type { ContentFit } from "@hypit/spatial";
|
|
4
|
-
import { appendTimedMediaLayer, createMediaLayerSet } from "
|
|
5
|
-
import { appendMediaItem } from "
|
|
6
|
-
import type { MediaSampleLayerSpec } from "
|
|
4
|
+
import { appendTimedMediaLayer, createMediaLayerSet } from "@hypit/media-track";
|
|
5
|
+
import { appendMediaItem } from "@hypit/media-track";
|
|
6
|
+
import type { MediaSampleLayerSpec } from "@hypit/media-track";
|
|
7
7
|
|
|
8
8
|
type ItemArguments = Parameters<typeof appendMediaItem>;
|
|
9
9
|
type PerformanceInput = {
|
|
10
|
-
set: ItemArguments[0]; header: ItemArguments[1];
|
|
10
|
+
set: ItemArguments[0]; header: ItemArguments[1]; timeline: ItemArguments[2]; canvas: ItemArguments[3];
|
|
11
11
|
layers: ItemArguments[4]; frame: ItemArguments[5]; spec: ItemArguments[6];
|
|
12
12
|
sounds: ItemArguments[7]; window: ItemArguments[8];
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
/** One framed unit and lifecycle containing all selected performance spans. */
|
|
16
|
-
export function appendMediaPerformance(input: PerformanceInput,
|
|
17
|
-
if (semantic.id !== input.space.id) throw new Error("Media performance must belong to the composition's ProgramSpace.");
|
|
16
|
+
export function appendMediaPerformance(input: PerformanceInput, fit: ContentFit, sample: MediaSampleLayerSpec) {
|
|
18
17
|
const layers = [...input.layers.layers];
|
|
19
|
-
for (const clip of
|
|
18
|
+
for (const clip of projectTimelineMedia(input.timeline, input.window.span)) {
|
|
20
19
|
if (clip.media.visual === undefined) continue;
|
|
21
20
|
const [layer] = appendTimedMediaLayer(createMediaLayerSet(), clip.media, fit, {
|
|
22
21
|
...sample, id: `${input.spec.id}:${clip.segmentId}`, trim: clip.source, occupancy: { mode: "once", align: "start" },
|
|
@@ -32,6 +31,6 @@ export function appendMediaPerformance(input: PerformanceInput, semantic: Semant
|
|
|
32
31
|
} });
|
|
33
32
|
}
|
|
34
33
|
if (layers.length === 0) return input.set;
|
|
35
|
-
return appendMediaItem(input.set, input.header, input.
|
|
34
|
+
return appendMediaItem(input.set, input.header, input.timeline, input.canvas, { layers }, input.frame,
|
|
36
35
|
input.spec, input.sounds, input.window);
|
|
37
36
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { sealVisualTrack, assertVisualTrackIdentity } from "@hypit/composition";
|
|
2
|
+
import type { FrameSpan, VisualTrack } from "@hypit/composition";
|
|
3
|
+
import { assertTemporalWindowFor } from "@hypit/temporal";
|
|
4
|
+
import type { TemporalWindow } from "@hypit/temporal";
|
|
5
|
+
import type { Timeline } from "@hypit/timeline";
|
|
6
|
+
import { VISUAL_IR_V1 } from "@hypit/visual-ir";
|
|
7
|
+
|
|
8
|
+
export type PerformanceUse = { readonly window: TemporalWindow; readonly visual: VisualTrack };
|
|
9
|
+
export type PerformanceSet = { readonly uses: readonly PerformanceUse[] };
|
|
10
|
+
|
|
11
|
+
export function appendPerformanceUse(set: PerformanceSet, window: TemporalWindow, visual: VisualTrack): PerformanceSet {
|
|
12
|
+
assertVisualTrackIdentity(visual);
|
|
13
|
+
if (visual.programSpaceId !== window.start.source.spaceId) throw new Error("Performance Use and picture belong to different Timelines.");
|
|
14
|
+
return { uses: [...set.uses, { window, visual }] };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function intersectVisibility(left: readonly FrameSpan[], right: readonly FrameSpan[]): FrameSpan[] {
|
|
18
|
+
return left.flatMap(a => right.flatMap(b => {
|
|
19
|
+
const startFrame = Math.max(a.startFrame, b.startFrame), endFrameExclusive = Math.min(a.endFrameExclusive, b.endFrameExclusive);
|
|
20
|
+
return endFrameExclusive > startFrame ? [{ startFrame, endFrameExclusive }] : [];
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function performancePresentId(useId: string, presentId: string): string {
|
|
25
|
+
return `${useId}:${presentId}`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Keep original animation/sample origins. Only the visibility mask changes. */
|
|
29
|
+
export function resolvePerformance(timeline: Timeline, id: string, set: PerformanceSet): VisualTrack {
|
|
30
|
+
const presents: VisualTrack["presents"][number][] = [];
|
|
31
|
+
for (const [index, use] of set.uses.entries()) {
|
|
32
|
+
assertTemporalWindowFor(use.window, { subjectId: use.window.subjectId, space: timeline });
|
|
33
|
+
if (use.visual.programSpaceId !== timeline.id || use.window.start.source.spaceId !== timeline.id) throw new Error("Performance uses another Timeline.");
|
|
34
|
+
let visible = [use.window.span];
|
|
35
|
+
for (const later of set.uses.slice(index + 1)) {
|
|
36
|
+
visible = visible.flatMap(span => {
|
|
37
|
+
const cut = later.window.span;
|
|
38
|
+
if (cut.endFrameExclusive <= span.startFrame || cut.startFrame >= span.endFrameExclusive) return [span];
|
|
39
|
+
return [
|
|
40
|
+
...(cut.startFrame > span.startFrame ? [{ startFrame: span.startFrame, endFrameExclusive: cut.startFrame }] : []),
|
|
41
|
+
...(cut.endFrameExclusive < span.endFrameExclusive ? [{ startFrame: cut.endFrameExclusive, endFrameExclusive: span.endFrameExclusive }] : []),
|
|
42
|
+
];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
for (const present of use.visual.presents) {
|
|
46
|
+
const visibility = intersectVisibility(visible, present.visibility ?? [present.span]);
|
|
47
|
+
if (visibility.length) presents.push({ ...present, id: performancePresentId(use.window.subjectId, present.id), visibility });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return sealVisualTrack({ id, programSpaceId: timeline.id, visualIr: VISUAL_IR_V1, presents });
|
|
51
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { sealGraphFragment } from "@hypit/elaborator";
|
|
2
|
+
import type { GraphFragment } from "@hypit/elaborator";
|
|
3
|
+
import { compositionTypes } from "@hypit/composition";
|
|
4
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
5
|
+
import { spatialTypes } from "@hypit/spatial";
|
|
6
|
+
import { temporalTypes } from "@hypit/temporal";
|
|
7
|
+
import { sameType } from "@hypit/protocol";
|
|
8
|
+
import type { SurfaceResolvedReference } from "@hypit/markup";
|
|
9
|
+
|
|
10
|
+
/** Author-time closure: bound references become ordinary graph edges at each Use. */
|
|
11
|
+
export type PerformanceStyle = {
|
|
12
|
+
readonly fragment: GraphFragment;
|
|
13
|
+
readonly bindings: Readonly<Record<string, { readonly type: SurfaceResolvedReference["type"]; readonly ref: SurfaceResolvedReference["ref"] }>>;
|
|
14
|
+
};
|
|
15
|
+
export function performanceStyle(fragment: GraphFragment, bindings: PerformanceStyle["bindings"] = {}): PerformanceStyle {
|
|
16
|
+
fragment = sealGraphFragment(fragment);
|
|
17
|
+
const common = { timeline: timelineTypes.track, canvas: spatialTypes.canvas, window: temporalTypes.window };
|
|
18
|
+
for (const [name, type] of Object.entries(common)) {
|
|
19
|
+
const port = fragment.inputs.find(port => port.name === name);
|
|
20
|
+
if (port === undefined || !sameType(port.type, type)) throw new Error(`Performance Style requires ${name} input.`);
|
|
21
|
+
if (bindings[name] !== undefined) throw new Error(`Performance supplies ${name} at each Use.`);
|
|
22
|
+
}
|
|
23
|
+
for (const port of fragment.inputs) {
|
|
24
|
+
if (port.name in common) continue;
|
|
25
|
+
const binding = bindings[port.name];
|
|
26
|
+
if (binding === undefined || !sameType(port.type, binding.type)) throw new Error(`Performance Style binding ${port.name} has the wrong Type.`);
|
|
27
|
+
}
|
|
28
|
+
for (const name of Object.keys(bindings)) {
|
|
29
|
+
if (!fragment.inputs.some(port => port.name === name)) throw new Error(`Performance Style has unknown binding ${name}.`);
|
|
30
|
+
}
|
|
31
|
+
if (fragment.exports.length !== 1 || fragment.exports[0]?.name !== "visual" || !sameType(fragment.exports[0].type, compositionTypes.visualTrack)) {
|
|
32
|
+
throw new Error("Performance Style must export visual: VisualTrack.");
|
|
33
|
+
}
|
|
34
|
+
return { fragment, bindings: Object.fromEntries(Object.entries(bindings).map(([name, value]) => [name, { ref: value.ref, type: value.type }])) };
|
|
35
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { assertAttributes, assertEmptyElement, textAttribute, optionalTextAttribute } from "@hypit/markup";
|
|
2
|
+
import type { StructuredSurfaceHandler, SurfaceResolvedReference, SurfaceRecordDraft, SurfaceComponentDraft, StructuredElement } from "@hypit/markup";
|
|
3
|
+
import { canonicalize, sameType } from "@hypit/protocol";
|
|
4
|
+
import type { TypeRef } from "@hypit/protocol";
|
|
5
|
+
import { sealGraphFragment } from "@hypit/elaborator";
|
|
6
|
+
import type { FragmentOperation } from "@hypit/elaborator";
|
|
7
|
+
import { createTemporalWindowProjection, resolveTemporalContext, temporalWindowAttributeNames } from "@hypit/temporal-markup";
|
|
8
|
+
import { temporalTypes } from "@hypit/temporal";
|
|
9
|
+
import { compositionTypes } from "@hypit/composition";
|
|
10
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
11
|
+
import { spatialTypes } from "@hypit/spatial";
|
|
12
|
+
import { svsRecipeType } from "@hypit/svs";
|
|
13
|
+
import type { SvsRecipe } from "@hypit/svs";
|
|
14
|
+
import { decodeMediaFit, decodeMediaSampleSpec, decodeMediaItemSpec, mediaTrackTypes } from "@hypit/media-track";
|
|
15
|
+
import { performanceStyle } from "./style.js";
|
|
16
|
+
import type { PerformanceStyle } from "./style.js";
|
|
17
|
+
import { performanceTypes, performanceProducers, ordinaryInputs } from "./manifest.js";
|
|
18
|
+
|
|
19
|
+
const input = (name: string) => ({ kind: "fragment-input" as const, name });
|
|
20
|
+
const operation = (id: string) => ({ kind: "fragment-operation" as const, operation: id });
|
|
21
|
+
function reference(element: StructuredElement, name: string, type: TypeRef, resolve: (path: string) => SurfaceResolvedReference | undefined): SurfaceResolvedReference {
|
|
22
|
+
const raw = element.attributes[name];
|
|
23
|
+
if (typeof raw !== "object" || raw.kind !== "reference") throw new Error(`${element.name}.${name} must be a reference.`);
|
|
24
|
+
const found = resolve(raw.path);
|
|
25
|
+
if (found === undefined || !sameType(found.type, type)) throw new Error(`${element.name}.${name} has the wrong Type.`);
|
|
26
|
+
return found;
|
|
27
|
+
}
|
|
28
|
+
function authored<T>(value: SurfaceResolvedReference): T {
|
|
29
|
+
if (value.record?.value.kind !== "inline") throw new Error("A presentation Style or Recipe must be an authored inline value.");
|
|
30
|
+
return value.record.value.value as unknown as T;
|
|
31
|
+
}
|
|
32
|
+
export const ordinaryPerformanceFragment = sealGraphFragment({
|
|
33
|
+
inputs: ordinaryInputs,
|
|
34
|
+
operations: [{ id: "ordinary", producer: performanceProducers.ordinary,
|
|
35
|
+
inputs: Object.fromEntries(ordinaryInputs.map(port => [port.name, input(port.name)])), result: { kind: "output", name: "visual" } }],
|
|
36
|
+
exports: [{ name: "visual", type: compositionTypes.visualTrack, root: operation("ordinary") }],
|
|
37
|
+
});
|
|
38
|
+
export const decodePerformanceStyleSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
39
|
+
assertAttributes(element, ["id", "frame", "appearance"]); assertEmptyElement(element);
|
|
40
|
+
const id = textAttribute(element, "id");
|
|
41
|
+
const frame = reference(element, "frame", spatialTypes.frame, resolveReference);
|
|
42
|
+
const recipe = authored<SvsRecipe>(reference(element, "appearance", svsRecipeType, resolveReference));
|
|
43
|
+
if (["playback", "trim-start", "trim-end"].some(key => recipe.properties[key] !== undefined)) throw new Error("Performance uses Timeline source positions; select its presentation interval on Use.");
|
|
44
|
+
const records: SurfaceRecordDraft[] = [];
|
|
45
|
+
const bind = (name: string, type: TypeRef, value: unknown) => {
|
|
46
|
+
const recordId = `${id}.${name}`;
|
|
47
|
+
records.push({ id: recordId, type, value: { kind: "inline", value: canonicalize(value) }, range: element.range });
|
|
48
|
+
return { ref: { kind: "record" as const, id: recordId }, type };
|
|
49
|
+
};
|
|
50
|
+
const style = performanceStyle(ordinaryPerformanceFragment, {
|
|
51
|
+
frame,
|
|
52
|
+
fit: bind("fit", spatialTypes.fit, decodeMediaFit(recipe)),
|
|
53
|
+
sample: bind("sample", mediaTrackTypes.sampleLayerSpec, decodeMediaSampleSpec(recipe, "content", "timed", undefined, true)),
|
|
54
|
+
spec: bind("spec", mediaTrackTypes.itemSpec, decodeMediaItemSpec(recipe, { id, motion: { sustain: [] } })),
|
|
55
|
+
});
|
|
56
|
+
records.push({ id, type: performanceTypes.style, value: { kind: "inline", value: canonicalize(style) }, range: element.range });
|
|
57
|
+
return { records, components: [], fragments: [] };
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const decodePerformanceTrackSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
61
|
+
assertAttributes(element, ["id", "timeline", "canvas"]);
|
|
62
|
+
const id = textAttribute(element, "id"), context = resolveTemporalContext({ element, resolveReference });
|
|
63
|
+
const canvas = reference(element, "canvas", spatialTypes.canvas, resolveReference);
|
|
64
|
+
const records: SurfaceRecordDraft[] = [{ id: `${id}.header`, type: performanceTypes.header, value: { kind: "inline", value: { id } }, range: element.range }];
|
|
65
|
+
const components: SurfaceComponentDraft[] = [];
|
|
66
|
+
const fragments = [] as ReturnType<typeof sealGraphFragment>[];
|
|
67
|
+
const collectorInputs = [{ name: "timeline", type: timelineTypes.track }, { name: "header", type: performanceTypes.header }];
|
|
68
|
+
const bindings: Record<string, SurfaceResolvedReference["ref"]> = { timeline: context.timeline.ref, header: { kind: "record", id: `${id}.header` } };
|
|
69
|
+
const operations: FragmentOperation[] = [{ id: "empty", producer: performanceProducers.create, inputs: {}, result: { kind: "output", name: "set" } }];
|
|
70
|
+
let previous = "empty", index = 0;
|
|
71
|
+
for (const child of element.children) {
|
|
72
|
+
if (child.kind === "text") { if (child.value.trim()) throw new Error("Performance Track accepts Use children."); continue; }
|
|
73
|
+
if (child.name.split(":").at(-1) !== "Use") throw new Error("Performance Track accepts Use children.");
|
|
74
|
+
assertAttributes(child, ["id", "style", ...temporalWindowAttributeNames]); assertEmptyElement(child);
|
|
75
|
+
const useId = optionalTextAttribute(child, "id") ?? `${id}.use.${index + 1}`;
|
|
76
|
+
index += 1;
|
|
77
|
+
const hasTime = temporalWindowAttributeNames.some(name => child.attributes[name] !== undefined);
|
|
78
|
+
const temporal = createTemporalWindowProjection({ id: useId, ...context, resolveReference,
|
|
79
|
+
element: hasTime ? child : { ...child, attributes: { ...child.attributes, during: "program" } } });
|
|
80
|
+
records.push(...temporal.records); components.push(...temporal.components); fragments.push(...temporal.fragments);
|
|
81
|
+
const value = authored<PerformanceStyle>(reference(child, "style", performanceTypes.style, resolveReference));
|
|
82
|
+
const style = performanceStyle(value.fragment, value.bindings);
|
|
83
|
+
fragments.push(style.fragment);
|
|
84
|
+
const visualId = `${useId}.visual`;
|
|
85
|
+
components.push({ id: `${useId}.__style`, fragment: style.fragment.id,
|
|
86
|
+
inputs: { ...Object.fromEntries(Object.entries(style.bindings).map(([key, bound]) => [key, bound.ref])),
|
|
87
|
+
timeline: context.timeline.ref, canvas: canvas.ref, window: temporal.ref }, outputs: { visual: visualId }, range: child.range });
|
|
88
|
+
const suffix = `use-${operations.length}`;
|
|
89
|
+
collectorInputs.push({ name: `${suffix}-window`, type: temporalTypes.window }, { name: `${suffix}-visual`, type: compositionTypes.visualTrack });
|
|
90
|
+
bindings[`${suffix}-window`] = temporal.ref; bindings[`${suffix}-visual`] = { kind: "component-output", component: `${useId}.__style`, output: "visual" };
|
|
91
|
+
operations.push({ id: suffix, producer: performanceProducers.append, inputs: { set: operation(previous), window: input(`${suffix}-window`), visual: input(`${suffix}-visual`) }, result: { kind: "output", name: "set" } });
|
|
92
|
+
previous = suffix;
|
|
93
|
+
}
|
|
94
|
+
operations.push({ id: "resolve", producer: performanceProducers.resolve, inputs: { set: operation(previous), timeline: input("timeline"), header: input("header") }, result: { kind: "output", name: "visual" } });
|
|
95
|
+
const collector = sealGraphFragment({ inputs: collectorInputs, operations, exports: [{ name: "visual", type: compositionTypes.visualTrack, root: operation("resolve") }, { name: "program", type: performanceTypes.set, root: operation(previous) }] });
|
|
96
|
+
fragments.push(collector);
|
|
97
|
+
components.push({ id, fragment: collector.id, inputs: bindings, outputs: { visual: `${id}.visual`, program: `${id}.program` }, range: element.range });
|
|
98
|
+
return { records, components, fragments, exports: [`${id}.visual`, `${id}.program`] };
|
|
99
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Performance Studio Companion
|
|
2
|
+
|
|
3
|
+
The Companion contributes one Performance Track with a content area and an internal Uses band:
|
|
4
|
+
|
|
5
|
+
- **Performance** shows the Timeline's placed picture Takes, with source thumbnails. These are available contents, independent of which Use presents or hides them. Audio-only Takes have no picture item.
|
|
6
|
+
- **Uses** shows each authored Style application as a named interval in the bottom label band. Declaration order sets overlap order; selecting an item raises it for editing without changing the authored priority. Covered and empty applications remain available.
|
|
7
|
+
|
|
8
|
+
`performance:Track.program` exports the ordered windows and unresolved visuals. The Companion reads that value instead of reconstructing author rules from the final visibility masks. The Timeline supplies the content lane. Typed temporal values identify each Use's exact author element even when its id was omitted.
|
|
9
|
+
|
|
10
|
+
One Performance label spans the content and Uses band; selection targets a picture Take or a Use.
|
|
11
|
+
A Take shows its Segment and placed frame range. A Use shows its resolved range and Style reference.
|
|
12
|
+
These are small read-only facts within When and How, alongside the editable fields in the same domains.
|
|
13
|
+
The displayed range uses an exclusive end frame.
|
|
14
|
+
|
|
15
|
+
Selecting a Use exposes its ordinary Style's referenced Frame and Media appearance Recipe. Frame edits write to SVML; appearance edits write to SVS. A shared Style or Recipe remains shared. Temporal gestures follow the same Selection/Moment/clock projection and source-writeback path as other components.
|
|
16
|
+
|
|
17
|
+
Project Styles receive the same Use interval and title. Their parameters are contributed through `createStudioCompanionHostFacet({ parameters })`, matching
|
|
18
|
+
the Style's own Module and Surface. The Track opts its `style` reference into this declaration.
|
|
19
|
+
Ordinary Style fields live in their own parameter Companion. See the project
|
|
20
|
+
[performance Styles](../../examples/semantic-composition/packages/performance-styles/README.md) for an example.
|
|
21
|
+
|
|
22
|
+
The internal `bands`, field bindings and content chrome are public Studio Companion declarations. Uses are entities in the same Track; independent child Tracks still use `attachments`. Studio does not recognize Performance names or scene-specific layouts. Caption and Sound can describe their own content and applications through the same interface.
|
|
23
|
+
|
|
24
|
+
Use picture selection follows exact rendered Present ids supplied by Performance. Take content uses
|
|
25
|
+
its Segment identity rather than array position, so reordering Takes preserves selection identity.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hypit/performance-studio",
|
|
3
|
+
"version": "0.0.0-dev",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
5
|
+
"private": true,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.ts"
|
|
9
|
+
},
|
|
10
|
+
"hypit": {
|
|
11
|
+
"activation": "./src/activation.ts"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@hypit/performance": "workspace:*",
|
|
15
|
+
"@hypit/timeline": "workspace:*",
|
|
16
|
+
"@hypit/temporal": "workspace:*",
|
|
17
|
+
"@hypit/composition": "workspace:*",
|
|
18
|
+
"@hypit/studio-adapter": "workspace:*",
|
|
19
|
+
"@hypit/media-track-studio": "workspace:*"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createStudioCompanionHostFacet } from "@hypit/studio-adapter";
|
|
2
|
+
import { performanceStudioTrackCompanions, performanceStudioParameterCompanions } from "./index.js";
|
|
3
|
+
export default {
|
|
4
|
+
format: "hypit.node-package@1" as const,
|
|
5
|
+
hostFacets: [createStudioCompanionHostFacet({ tracks: performanceStudioTrackCompanions, parameters: performanceStudioParameterCompanions })],
|
|
6
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { performanceModuleRef, performancePresentId } from "@hypit/performance";
|
|
2
|
+
import type { PerformanceSet } from "@hypit/performance";
|
|
3
|
+
import { projectTimelineMedia, timelineTypes } from "@hypit/timeline";
|
|
4
|
+
import type { Timeline } from "@hypit/timeline";
|
|
5
|
+
import { temporalTypes } from "@hypit/temporal";
|
|
6
|
+
import { compositionTypes } from "@hypit/composition";
|
|
7
|
+
import { mediaAppearanceStudioFields } from "@hypit/media-track-studio";
|
|
8
|
+
import { artifactPreview, authoredChildFor, previewLayer, requiredReferencedValue, requiredSurfaceValue, temporalLineageFor, temporalSemanticSource } from "@hypit/studio-adapter";
|
|
9
|
+
import type { StudioTrackCompanion, StudioTrackCompanionContext, StudioEntityDraft, StudioSourceBindingDeclaration } from "@hypit/studio-adapter";
|
|
10
|
+
|
|
11
|
+
const frameFields = ["left", "top", "right", "bottom", "x", "y", "width", "height"];
|
|
12
|
+
const frameBindings: readonly StudioSourceBindingDeclaration[] = frameFields.map(name => ({ name, writable: true }));
|
|
13
|
+
// Ordinary Performance uses Timeline playback. The rest is the same Media appearance vocabulary.
|
|
14
|
+
const playbackFields = new Set(["playback", "trim-start", "trim-end"]);
|
|
15
|
+
const appearanceBindings = mediaAppearanceStudioFields.bindings.filter(field => !playbackFields.has(field.name));
|
|
16
|
+
const appearanceInspector = mediaAppearanceStudioFields.inspector.filter(field =>
|
|
17
|
+
!playbackFields.has(field.binding.slice("appearance.".length)));
|
|
18
|
+
|
|
19
|
+
export function projectPerformance(context: StudioTrackCompanionContext): readonly StudioEntityDraft[] {
|
|
20
|
+
const timeline = requiredReferencedValue(context, "timeline", timelineTypes.track) as Timeline;
|
|
21
|
+
const program = requiredSurfaceValue(context, "program") as PerformanceSet;
|
|
22
|
+
// Source content keeps its own placement. A Use changes its presentation, not its media clock.
|
|
23
|
+
const content: StudioEntityDraft[] = projectTimelineMedia(timeline).flatMap((clip, index) => {
|
|
24
|
+
if (clip.media.visual === undefined) return [];
|
|
25
|
+
return [{
|
|
26
|
+
id: `${context.track.outputRef}:content:${clip.segmentId}`,
|
|
27
|
+
authoredId: clip.segmentId,
|
|
28
|
+
display: { title: clip.segmentId, layers: [previewLayer(artifactPreview("video", clip.media.visual.artifact.resource), "storyboard")] },
|
|
29
|
+
...clip.span, stackOrder: index,
|
|
30
|
+
inspector: [
|
|
31
|
+
{ id: "segment", label: "Segment", domain: "how", section: { id: "content", label: "Content" }, value: clip.segmentId },
|
|
32
|
+
{ id: "range", label: "Range", domain: "when", section: { id: "placement", label: "Placement" }, value: `${clip.span.startFrame}–${clip.span.endFrameExclusive}`, unit: "f", summary: "Placed interval; the end frame is exclusive." },
|
|
33
|
+
],
|
|
34
|
+
presentation: { entity: "performance-content", chrome: "standard" },
|
|
35
|
+
}];
|
|
36
|
+
});
|
|
37
|
+
const uses: StudioEntityDraft[] = program.uses.map((use, index) => {
|
|
38
|
+
const authoredId = use.window.subjectId;
|
|
39
|
+
const child = authoredChildFor(context, authoredId, [temporalTypes.windowSpec]);
|
|
40
|
+
if (child === undefined) throw new Error(`Performance Use ${authoredId} has no author provenance.`);
|
|
41
|
+
const style = child.referenceAttributes.style;
|
|
42
|
+
const temporal = temporalLineageFor(context, authoredId, "window");
|
|
43
|
+
const semantic = temporalSemanticSource(temporal);
|
|
44
|
+
return {
|
|
45
|
+
id: `${context.track.outputRef}:use:${authoredId}`, authoredId,
|
|
46
|
+
display: { title: style ?? authoredId, layers: [] },
|
|
47
|
+
...use.window.span, stackOrder: index,
|
|
48
|
+
elementRange: child.range,
|
|
49
|
+
...(temporal === undefined ? {} : { temporal }),
|
|
50
|
+
...(semantic === undefined ? {} : { markerId: semantic.id }),
|
|
51
|
+
presentation: { entity: "performance-use", chrome: "standard" },
|
|
52
|
+
band: "uses",
|
|
53
|
+
renderIds: use.visual.presents.map(present => performancePresentId(authoredId, present.id)),
|
|
54
|
+
inspector: [{ id: "range", label: "Range", domain: "when", section: { id: "placement", label: "Placement" }, value: `${use.window.span.startFrame}–${use.window.span.endFrameExclusive}`, unit: "f", summary: "Resolved Use interval; the end frame is exclusive. Timeline gestures follow this Use's author timing." }],
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
return [...content, ...uses];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const performanceStudioTrackCompanions: readonly StudioTrackCompanion[] = [{
|
|
61
|
+
id: "visual", role: "track",
|
|
62
|
+
output: { type: compositionTypes.visualTrack, surface: "track", modules: [performanceModuleRef] },
|
|
63
|
+
family: "performance", label: "Performance", tone: "blue", icon: "video",
|
|
64
|
+
lane: { heightPx: 60 },
|
|
65
|
+
requiredValues: ["program"],
|
|
66
|
+
bands: [{
|
|
67
|
+
id: "uses", placement: "after", heightPx: 15, display: "label",
|
|
68
|
+
bindings: [{ name: "style", companion: true }],
|
|
69
|
+
inspector: [{ binding: "style", label: "Style", domain: "how", section: { id: "style", label: "Style" }, control: "text", summary: "The referenced Style is shared by every Use that selects it." }],
|
|
70
|
+
}],
|
|
71
|
+
project: projectPerformance,
|
|
72
|
+
}];
|
|
73
|
+
|
|
74
|
+
export const performanceStudioParameterCompanions: readonly import("@hypit/studio-adapter").StudioParameterCompanion[] = [{
|
|
75
|
+
id: "style", match: { module: performanceModuleRef, surface: "style" },
|
|
76
|
+
bindings: [ { name: "frame", referenced: frameBindings },
|
|
77
|
+
{ name: "appearance", recipe: { bindings: appearanceBindings } } ],
|
|
78
|
+
inspector: [
|
|
79
|
+
...frameFields.map(name => ({ binding: `frame.${name}`, label: name[0]!.toUpperCase() + name.slice(1),
|
|
80
|
+
domain: "where" as const, page: { id: "frame", label: "Frame" }, section: { id: "placement", label: "Placement" },
|
|
81
|
+
control: "number" as const, number: { suffixes: ["%", "px"], step: 1 } })),
|
|
82
|
+
...appearanceInspector,
|
|
83
|
+
],
|
|
84
|
+
}];
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
# `@hypit/program-space`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<time:Space id="animation" frame-rate="30" duration="8s"/>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
`duration` accepts seconds, milliseconds or frames (`8s`, `8000ms`, `240f`); the result must end on an
|
|
16
|
-
exact frame boundary. The rate may be rational, such as `30000/1001`. `Space` publishes an ordinary
|
|
17
|
-
inline ProgramSpace value and performs no media generation.
|
|
18
|
-
|
|
19
|
-
`Clock` is the duration-free frame-rate input for media normalization. A clock does not prescribe
|
|
20
|
-
how long a performance will be; its actual normalized material establishes that later.
|
|
3
|
+
`ProgramClock` supplies a positive rational frame rate before material exists. The `Clock` Surface
|
|
4
|
+
publishes it for normalization and Timeline assembly; the same Clock Surface is available from
|
|
5
|
+
`@hypit/timeline-author`.
|
|
6
|
+
|
|
7
|
+
`ProgramSpace` is the lightweight physical range consumed by rendering: `id`, `durationSec` and
|
|
8
|
+
`frameRate`. Its positive duration ends on an exact frame boundary. The Timeline projects this
|
|
9
|
+
view, whether it contains speaking Takes, wordless media, gaps or no Takes at all. Authors declare
|
|
10
|
+
that complete work through [Timeline](../timeline-author/README.md), then components obtain the
|
|
11
|
+
range and any semantic evidence they need. The range itself carries no media or word table.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createMarkupSurfaceHostFacet } from "@hypit/markup";
|
|
2
2
|
|
|
3
|
-
import { decodeClockSurface
|
|
3
|
+
import { decodeClockSurface } from "./surface.js";
|
|
4
4
|
import { programSpaceManifest, programSpaceMarkupSurfaces, programSpaceModuleRef } from "./index.js";
|
|
5
5
|
|
|
6
6
|
export const hypitPackage = {
|
|
@@ -10,10 +10,6 @@ export const hypitPackage = {
|
|
|
10
10
|
module: programSpaceModuleRef,
|
|
11
11
|
declaration: programSpaceMarkupSurfaces.find((item) => item.name === "clock")!,
|
|
12
12
|
handler: decodeClockSurface,
|
|
13
|
-
}), createMarkupSurfaceHostFacet({
|
|
14
|
-
module: programSpaceModuleRef,
|
|
15
|
-
declaration: programSpaceMarkupSurfaces.find((item) => item.name === "space")!,
|
|
16
|
-
handler: decodeSpaceSurface,
|
|
17
13
|
})],
|
|
18
14
|
};
|
|
19
15
|
export default hypitPackage;
|
|
@@ -40,17 +40,6 @@ export const programSpaceManifest: ModuleManifest = {
|
|
|
40
40
|
export const programSpaceDependency = { module: programSpaceModuleRef } as const;
|
|
41
41
|
export const programSpaceMarkupSurfaces = [
|
|
42
42
|
{ name: "clock", tag: "Clock", mode: "structured", outputs: [programSpaceTypes.clock] },
|
|
43
|
-
{ name: "space", tag: "Space", mode: "structured", outputs: [programSpaceTypes.programSpace],
|
|
44
|
-
vocabulary: {
|
|
45
|
-
summary: "Declares a film's frame rate and authored duration, for animation whose timing is directed without a performance.",
|
|
46
|
-
attributes: [
|
|
47
|
-
{ name: "id", kind: "identifier", required: true, summary: "Names the shared film time axis." },
|
|
48
|
-
{ name: "frame-rate", kind: "literal", required: true, summary: "Frames per second, such as 30 or 30000/1001." },
|
|
49
|
-
{ name: "duration", kind: "literal", required: true, summary: "Total duration in seconds, milliseconds or frames, such as 8s or 240f; ends on a frame boundary." },
|
|
50
|
-
],
|
|
51
|
-
example: '<time:Space id="animation" frame-rate="30" duration="8s"/>',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
43
|
] as const;
|
|
55
44
|
|
|
56
45
|
export function sealProgramClock(value: ProgramClock): ProgramClock {
|
|
@@ -105,3 +94,5 @@ export function assertProgramSpaceIdentity(programSpace: ProgramSpace): void {
|
|
|
105
94
|
}
|
|
106
95
|
programSpaceFrameCount(programSpace);
|
|
107
96
|
}
|
|
97
|
+
|
|
98
|
+
export { decodeClockSurface } from "./surface.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
type StructuredSurfaceHandler,
|
|
6
6
|
} from "@hypit/markup";
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { programSpaceTypes, sealProgramClock, type ProgramClock } from "./index.js";
|
|
9
9
|
|
|
10
10
|
function frameRate(element: StructuredElement): ProgramClock["frameRate"] {
|
|
11
11
|
const value = text(element, "frame-rate");
|
|
@@ -34,22 +34,3 @@ export const decodeClockSurface: StructuredSurfaceHandler = ({ element }) => {
|
|
|
34
34
|
fragments: [],
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
export const decodeSpaceSurface: StructuredSurfaceHandler = ({ element }) => {
|
|
39
|
-
const expected = ["duration", "frame-rate", "id"];
|
|
40
|
-
if (Object.keys(element.attributes).sort().join("\0") !== expected.join("\0")) {
|
|
41
|
-
throw new Error(`${element.name} requires exactly id, frame-rate and duration.`);
|
|
42
|
-
}
|
|
43
|
-
empty(element);
|
|
44
|
-
const id = text(element, "id");
|
|
45
|
-
const rate = frameRate(element);
|
|
46
|
-
const duration = text(element, "duration");
|
|
47
|
-
const match = /^(\d+(?:\.\d+)?)(s|ms|f)$/u.exec(duration);
|
|
48
|
-
if (match === null) throw new Error(`${element.name}.duration must be a duration such as 8s, 8000ms or 240f.`);
|
|
49
|
-
const value = Number(match[1]);
|
|
50
|
-
const durationSec = match[2] === "f" ? value * rate.denominator / rate.numerator
|
|
51
|
-
: match[2] === "ms" ? value / 1000 : value;
|
|
52
|
-
const space = { id, durationSec, frameRate: rate };
|
|
53
|
-
assertProgramSpaceIdentity(space);
|
|
54
|
-
return { records: [{ id, type: programSpaceTypes.programSpace, value: { kind: "inline", value: space }, range: element.range }], components: [], fragments: [] };
|
|
55
|
-
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# `@hypit/project-context-node`
|
|
2
|
+
|
|
3
|
+
Shared project and Runtime selection for Node entrypoints: CLI, Studio and creation tools.
|
|
4
|
+
This package resolves locations and reads or explicitly changes the project's Runtime pointer.
|
|
5
|
+
It does not load Providers, install programs, inspect credentials or select services.
|
|
6
|
+
|
|
7
|
+
1. `resolveProjectRoot({ workspaceRoot?, cwd? })` uses the explicit Workspace, otherwise the nearest
|
|
8
|
+
`package.json` above cwd, otherwise cwd itself. Source and Run filenames do not choose the project.
|
|
9
|
+
2. `findRuntimeProfile(projectRoot)` reads only that project's `.hypit/runtime` file and resolves its
|
|
10
|
+
path relative to the project. An entrypoint's explicit `--runtime` overrides this read for that invocation.
|
|
11
|
+
3. The selected Runtime implementation interprets the Profile, including `dataRoot`, Credentials,
|
|
12
|
+
Providers and capability bindings. This package does not interpret its contents.
|
|
13
|
+
|
|
14
|
+
`selectRuntimeProfile(projectRoot, profile)` writes the explicit choice; `clearRuntimeProfile` removes
|
|
15
|
+
only that pointer. A directory occupying the pointer path is reported without replacing it. Runtime
|
|
16
|
+
working data belongs at the Profile's separate `dataRoot`.
|
|
17
|
+
|
|
18
|
+
Project packages, the installed Distribution and machine-managed executables have different owners.
|
|
19
|
+
The Distribution supplies code; it does not supply a second project environment. Provider adapters
|
|
20
|
+
resolve their executable configuration and report availability through the Runtime's existing ports.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdir, readFile, realpath, unlink, writeFile } from "node:fs/promises";
|
|
1
|
+
import { mkdir, readFile, realpath, stat, unlink, writeFile } from "node:fs/promises";
|
|
2
2
|
import { relative, resolve } from "node:path";
|
|
3
3
|
|
|
4
4
|
const stateDirectoryName = ".hypit";
|
|
@@ -24,6 +24,10 @@ async function readSelectionFile(projectRoot: string): Promise<{
|
|
|
24
24
|
const root = resolve(projectRoot);
|
|
25
25
|
const selectionFile = resolve(root, stateDirectoryName, selectionFileName);
|
|
26
26
|
try {
|
|
27
|
+
if (!(await stat(selectionFile)).isFile()) {
|
|
28
|
+
throw new Error(`Runtime selection must be a file: ${selectionFile}; this path is occupied by a directory. `
|
|
29
|
+
+ "Move that directory and update its configuration before running hypit runtime use <profile>.");
|
|
30
|
+
}
|
|
27
31
|
return {
|
|
28
32
|
projectRoot: root,
|
|
29
33
|
selectionFile,
|
|
@@ -36,7 +40,7 @@ async function readSelectionFile(projectRoot: string): Promise<{
|
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
/**
|
|
39
|
-
* Remember one Runtime Profile for a project. This is
|
|
43
|
+
* Remember one Runtime Profile for a project. This is project execution context, not
|
|
40
44
|
* Author Source, Run Source, package selection or Core state.
|
|
41
45
|
*/
|
|
42
46
|
export async function selectRuntimeProfile(projectRoot: string, profile: string): Promise<RuntimeProfileSelection> {
|
|
@@ -50,6 +54,7 @@ export async function selectRuntimeProfile(projectRoot: string, profile: string)
|
|
|
50
54
|
} catch (error) {
|
|
51
55
|
if (errorCode(error) !== "EEXIST") throw error;
|
|
52
56
|
}
|
|
57
|
+
await readSelectionFile(root);
|
|
53
58
|
const stored = relative(root, selectedProfile) || ".";
|
|
54
59
|
await writeFile(selectionFile, `${stored}\n`, "utf8");
|
|
55
60
|
return { profile: selectedProfile, projectRoot: root, selectionFile };
|