@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,8 +1,8 @@
|
|
|
1
1
|
import type { NarrativeExcerpt, NarrativeMomentRef, NarrativeSelectionRef } from "@hypit/narrative";
|
|
2
2
|
import { assertProgramSpaceIdentity, programSpaceFrameCount } from "@hypit/program-space";
|
|
3
3
|
import type { ProgramSpace } from "@hypit/program-space";
|
|
4
|
-
import {
|
|
5
|
-
import type {
|
|
4
|
+
import { projectTimelineSpace } from "@hypit/timeline";
|
|
5
|
+
import type { Timeline } from "@hypit/timeline";
|
|
6
6
|
|
|
7
7
|
import { locateMoment, locateProgram, locateSegment, locateSelection } from "./location.js";
|
|
8
8
|
import { add, compare, durationInFrames, quantizeBoundary, rational } from "./rational.js";
|
|
@@ -169,17 +169,17 @@ function projectedInstant(
|
|
|
169
169
|
export function projectSelectionInstant(input: {
|
|
170
170
|
readonly itemId: string;
|
|
171
171
|
readonly subjectId: string;
|
|
172
|
-
readonly
|
|
172
|
+
readonly timeline: Timeline;
|
|
173
173
|
readonly selection: NarrativeSelectionRef;
|
|
174
174
|
readonly projection: TemporalInstantExpression;
|
|
175
175
|
readonly authority: TemporalInstantSpec["authority"];
|
|
176
176
|
}): ProjectedInstant {
|
|
177
|
-
const space =
|
|
178
|
-
const program = locateProgram(input.
|
|
179
|
-
const selection = locateSelection(input.
|
|
177
|
+
const space = projectTimelineSpace(input.timeline);
|
|
178
|
+
const program = locateProgram(input.timeline);
|
|
179
|
+
const selection = locateSelection(input.timeline, input.selection);
|
|
180
180
|
return projectedInstant(
|
|
181
181
|
{ id: input.itemId, subjectId: input.subjectId, projection: input.projection, authority: input.authority },
|
|
182
|
-
{ spaceId: space.id, narrativeId: input.
|
|
182
|
+
{ spaceId: space.id, narrativeId: input.selection.narrativeId, kind: "selection", id: selection.id },
|
|
183
183
|
projectTemporalInstant(input.projection, { program, selection }, space),
|
|
184
184
|
);
|
|
185
185
|
}
|
|
@@ -187,17 +187,17 @@ export function projectSelectionInstant(input: {
|
|
|
187
187
|
export function projectMomentInstant(input: {
|
|
188
188
|
readonly itemId: string;
|
|
189
189
|
readonly subjectId: string;
|
|
190
|
-
readonly
|
|
190
|
+
readonly timeline: Timeline;
|
|
191
191
|
readonly moment: NarrativeMomentRef;
|
|
192
192
|
readonly projection: TemporalInstantExpression;
|
|
193
193
|
readonly authority: TemporalInstantSpec["authority"];
|
|
194
194
|
}): ProjectedInstant {
|
|
195
|
-
const space =
|
|
196
|
-
const program = locateProgram(input.
|
|
197
|
-
const moment = locateMoment(input.
|
|
195
|
+
const space = projectTimelineSpace(input.timeline);
|
|
196
|
+
const program = locateProgram(input.timeline);
|
|
197
|
+
const moment = locateMoment(input.timeline, input.moment);
|
|
198
198
|
return projectedInstant(
|
|
199
199
|
{ id: input.itemId, subjectId: input.subjectId, projection: input.projection, authority: input.authority },
|
|
200
|
-
{ spaceId: space.id, narrativeId: input.
|
|
200
|
+
{ spaceId: space.id, narrativeId: input.moment.narrativeId, kind: "moment", id: moment.id },
|
|
201
201
|
projectTemporalInstant(input.projection, { program, moment }, space),
|
|
202
202
|
);
|
|
203
203
|
}
|
|
@@ -205,11 +205,11 @@ export function projectMomentInstant(input: {
|
|
|
205
205
|
export function projectProgramInstant(input: {
|
|
206
206
|
readonly itemId: string;
|
|
207
207
|
readonly subjectId: string;
|
|
208
|
-
readonly
|
|
208
|
+
readonly timeline: Timeline;
|
|
209
209
|
readonly projection: TemporalInstantExpression;
|
|
210
210
|
readonly authority: TemporalInstantSpec["authority"];
|
|
211
211
|
}): ProjectedInstant {
|
|
212
|
-
const space = input.
|
|
212
|
+
const space = projectTimelineSpace(input.timeline);
|
|
213
213
|
const program = { id: "program" as const, start: { frame: 0 }, end: { frame: programSpaceFrameCount(space) } };
|
|
214
214
|
return projectedInstant(
|
|
215
215
|
{ id: input.itemId, subjectId: input.subjectId, projection: input.projection, authority: input.authority },
|
|
@@ -221,17 +221,17 @@ export function projectProgramInstant(input: {
|
|
|
221
221
|
export function projectSegmentInstant(input: {
|
|
222
222
|
readonly itemId: string;
|
|
223
223
|
readonly subjectId: string;
|
|
224
|
-
readonly
|
|
224
|
+
readonly timeline: Timeline;
|
|
225
225
|
readonly segment: NarrativeExcerpt;
|
|
226
226
|
readonly projection: TemporalInstantExpression;
|
|
227
227
|
readonly authority: TemporalInstantSpec["authority"];
|
|
228
228
|
}): ProjectedInstant {
|
|
229
|
-
const space =
|
|
230
|
-
const program = locateProgram(input.
|
|
231
|
-
const segment = locateSegment(input.
|
|
229
|
+
const space = projectTimelineSpace(input.timeline);
|
|
230
|
+
const program = locateProgram(input.timeline);
|
|
231
|
+
const segment = locateSegment(input.timeline, input.segment);
|
|
232
232
|
return projectedInstant(
|
|
233
233
|
{ id: input.itemId, subjectId: input.subjectId, projection: input.projection, authority: input.authority },
|
|
234
|
-
{ spaceId: space.id, narrativeId: input.
|
|
234
|
+
{ spaceId: space.id, narrativeId: input.segment.narrativeId, kind: "segment", id: segment.id },
|
|
235
235
|
projectTemporalInstant(input.projection, { program, segment }, space),
|
|
236
236
|
);
|
|
237
237
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ProgramClock } from "@hypit/program-space";
|
|
2
2
|
|
|
3
3
|
import type { TemporalDuration } from "./types.js";
|
|
4
4
|
|
|
@@ -51,9 +51,9 @@ function safeInteger(value: number, label: string): bigint {
|
|
|
51
51
|
return BigInt(value);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export function durationInFrames(duration: TemporalDuration, space:
|
|
55
|
-
const frameNumerator = safeInteger(space.frameRate.numerator, "
|
|
56
|
-
const frameDenominator = safeInteger(space.frameRate.denominator, "
|
|
54
|
+
export function durationInFrames(duration: TemporalDuration, space: ProgramClock): Rational {
|
|
55
|
+
const frameNumerator = safeInteger(space.frameRate.numerator, "ProgramClock frame-rate numerator");
|
|
56
|
+
const frameDenominator = safeInteger(space.frameRate.denominator, "ProgramClock frame-rate denominator");
|
|
57
57
|
switch (duration.unit) {
|
|
58
58
|
case "frames":
|
|
59
59
|
return rational(safeInteger(duration.value, "Frame duration"));
|
|
@@ -132,8 +132,8 @@ handles allow it, a choice lists the other anchors at the same frame; horizontal
|
|
|
132
132
|
cannot distinguish them. That explicit choice uses the same Script adjustment operation as dragging.
|
|
133
133
|
|
|
134
134
|
Segment overlap or gaps can change temporal order without changing Script order. Stop construction
|
|
135
|
-
must not assume contiguous Segments.
|
|
136
|
-
|
|
135
|
+
must not assume contiguous Segments. Timeline places each prepared Take independently; semantic
|
|
136
|
+
stops use those placed anchor frames, including coincident anchors from overlapping Takes.
|
|
137
137
|
|
|
138
138
|
## Selection, projection, and consumption
|
|
139
139
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Shared SVML author-time projection helpers for `@hypit/temporal`. The Surface lowers authored
|
|
4
4
|
Selection, Segment, Moment or explicit clock expressions to ordinary Instant projections and Window
|
|
5
|
-
composition. A domain consumer receives the projected values and
|
|
5
|
+
composition. A domain consumer receives the projected values and the shared Timeline; it does not
|
|
6
6
|
locate Script words or infer a semantic source inside its renderer.
|
|
7
7
|
|
|
8
8
|
The package exports `createTemporalWindowProjection`, `createTemporalInstantProjection`,
|
|
9
|
-
`resolveTemporalContext`,
|
|
9
|
+
`resolveTemporalContext`, attribute vocabulary, and the exact duration/instant parsers. These are helpers for component
|
|
10
10
|
Surfaces, not standalone author tags or a new Track.
|
|
11
11
|
|
|
12
12
|
The editing behavior is specified in [Author-directed time editing](EDITING.md).
|
|
@@ -15,15 +15,15 @@ write target for each supported gesture.
|
|
|
15
15
|
|
|
16
16
|
## Time context
|
|
17
17
|
|
|
18
|
-
A Track Surface
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
to the domain Fragment. Its input Type is `programSpaceTypes.programSpace`.
|
|
18
|
+
A Track Surface accepts `timeline={program.timeline}`. Resolve it with
|
|
19
|
+
`resolveTemporalContext({ element, resolveReference })` and pass that context to each temporal
|
|
20
|
+
projection helper. Wire `context.timeline.ref` directly into the component Fragment's Timeline port.
|
|
21
|
+
Preserve the projections' returned records, components and fragments.
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
The context contains one required `timeline` reference. Program time and Script references both
|
|
24
|
+
project against it. Pure animation uses a zero-Take Timeline with an authored extent. Script events
|
|
25
|
+
use the anchors provided by its placed Takes. Drawing Producers receive that same Timeline and the
|
|
26
|
+
projected Instants/Windows; they need no Script parser or separate time-range input.
|
|
27
27
|
|
|
28
28
|
## Window forms
|
|
29
29
|
|
|
@@ -70,10 +70,26 @@ can deliberately admit only that form; consumers need not expose unrelated tempo
|
|
|
70
70
|
|
|
71
71
|
The Surface supplies an author-facing `subjectId` for the actual item whose time is being projected,
|
|
72
72
|
separately from graph-qualified operation ids. The graph wires the resulting Instant or Window and
|
|
73
|
-
|
|
73
|
+
Timeline into the consumer. Keep projection outside the domain Producer: it consumes resolved
|
|
74
74
|
time and implements its own schedule or state, while the shared temporal protocol retains where that
|
|
75
75
|
time came from. An outer lifetime and child activations are separate inputs when a component persists
|
|
76
76
|
between events.
|
|
77
77
|
|
|
78
78
|
Script's `@`, `~@`, close markers and Moment syntax belong to `@hypit/script`; media playback belongs
|
|
79
79
|
to `@hypit/media-track`; a graphic component's reveal or preset semantics belong to that component.
|
|
80
|
+
|
|
81
|
+
## Independently bound endpoints
|
|
82
|
+
|
|
83
|
+
For a Window whose endpoints refer to different semantic sources, use `start-source` and
|
|
84
|
+
`end-source`. The expression still states the kind and boundary; each binding supplies that source:
|
|
85
|
+
|
|
86
|
+
```svml
|
|
87
|
+
<example:Item start-source={story.segment.next} start="segment.start"
|
|
88
|
+
end-source={story.segment.previous} end="segment.end"/>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This describes an overlapping physical interval without authoring a backwards Script Selection.
|
|
92
|
+
The same endpoint bindings accept Selections or Moments with their corresponding expressions.
|
|
93
|
+
`segment`, `selection` and `moment` remain convenient shared bindings when both expressions use the
|
|
94
|
+
same source. Explicit expressions retain local parameter writeback; these bindings do not move the
|
|
95
|
+
referenced Script anchors when the expression's offset is edited.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@hypit/elaborator": "workspace:*",
|
|
12
12
|
"@hypit/markup": "workspace:*",
|
|
13
13
|
"@hypit/narrative": "workspace:*",
|
|
14
|
-
"@hypit/
|
|
14
|
+
"@hypit/timeline": "workspace:*",
|
|
15
15
|
"@hypit/temporal": "workspace:*",
|
|
16
16
|
"@hypit/program-space": "workspace:*"
|
|
17
17
|
}
|
|
@@ -9,10 +9,8 @@ import type {
|
|
|
9
9
|
SurfaceResolvedReference,
|
|
10
10
|
} from "@hypit/markup";
|
|
11
11
|
import { narrativeTypes } from "@hypit/narrative";
|
|
12
|
-
import { programSpaceTypes } from "@hypit/program-space";
|
|
13
|
-
import { createTemporalSpace } from "./space.js";
|
|
14
12
|
export * from "./space.js";
|
|
15
|
-
import {
|
|
13
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
16
14
|
import {
|
|
17
15
|
temporalProducers,
|
|
18
16
|
temporalTypes,
|
|
@@ -41,6 +39,9 @@ export const temporalWindowAttributeVocabulary: readonly SurfaceAttributeVocabul
|
|
|
41
39
|
summary: "Sets a projected start expression; write it together with end." },
|
|
42
40
|
{ name: "end", kind: "literal", required: false,
|
|
43
41
|
summary: "Sets a projected end expression; write it together with start." },
|
|
42
|
+
...["start-source", "end-source"].map(name => ({ name, kind: "reference" as const, required: false,
|
|
43
|
+
accepts: [narrativeTypes.selection, narrativeTypes.excerpt, narrativeTypes.moment],
|
|
44
|
+
summary: "Binds this endpoint's semantic source independently; its expression determines the boundary." })),
|
|
44
45
|
{ name: "selection", kind: "reference", required: false, accepts: [narrativeTypes.selection],
|
|
45
46
|
summary: "Resolves selection.start or selection.end used by a projected start/end expression." },
|
|
46
47
|
{ name: "segment", kind: "reference", required: false, accepts: [narrativeTypes.excerpt],
|
|
@@ -205,12 +206,13 @@ function sourceReference(
|
|
|
205
206
|
element: StructuredElement,
|
|
206
207
|
kind: SourceKind,
|
|
207
208
|
resolveReference: ResolveReference,
|
|
209
|
+
attribute = kind as string,
|
|
208
210
|
): SurfaceResolvedReference | undefined {
|
|
209
211
|
if (kind === "program") return undefined;
|
|
210
212
|
const expected = kind === "selection"
|
|
211
213
|
? narrativeTypes.selection
|
|
212
214
|
: kind === "segment" ? narrativeTypes.excerpt : narrativeTypes.moment;
|
|
213
|
-
return resolve(element.attributes[
|
|
215
|
+
return resolve(element.attributes[attribute], `${element.name}.${attribute}`, expected, resolveReference);
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
function projectionFragment(input: {
|
|
@@ -224,8 +226,7 @@ function projectionFragment(input: {
|
|
|
224
226
|
? [["instant", input.start] as const]
|
|
225
227
|
: [["start", input.start] as const, ["end", input.end] as const];
|
|
226
228
|
const inputs = [
|
|
227
|
-
{ name: "
|
|
228
|
-
...(endpoints.some(([, endpoint]) => endpoint.source !== "program") ? [{ name: "semantic", type: semanticTrackTypes.track }] : []),
|
|
229
|
+
{ name: "timeline", type: timelineTypes.track },
|
|
229
230
|
...endpoints.map(([name]) => ({ name: `${name}-spec`, type: temporalTypes.instantSpec })),
|
|
230
231
|
...endpoints.flatMap(([name, endpoint]) => endpoint.source === "program" ? [] : [{
|
|
231
232
|
name: `${name}-${endpoint.source}`,
|
|
@@ -241,7 +242,7 @@ function projectionFragment(input: {
|
|
|
241
242
|
: endpoint.source === "segment" ? temporalProducers.projectSegmentInstant
|
|
242
243
|
: temporalProducers.projectMomentInstant,
|
|
243
244
|
inputs: {
|
|
244
|
-
|
|
245
|
+
timeline: fragmentInput("timeline"),
|
|
245
246
|
spec: fragmentInput(`${name}-spec`),
|
|
246
247
|
...(endpoint.source === "program" ? {} : {
|
|
247
248
|
[endpoint.source]: fragmentInput(`${name}-${endpoint.source}`),
|
|
@@ -274,15 +275,10 @@ function projectionDraft(input: {
|
|
|
274
275
|
readonly id: string;
|
|
275
276
|
readonly subjectId?: string;
|
|
276
277
|
readonly element: StructuredElement;
|
|
277
|
-
readonly
|
|
278
|
-
readonly space?: SurfaceResolvedReference;
|
|
278
|
+
readonly timeline: SurfaceResolvedReference;
|
|
279
279
|
readonly start: InstantDraft;
|
|
280
280
|
readonly end?: InstantDraft;
|
|
281
281
|
}): TemporalMarkupProjection {
|
|
282
|
-
if ([input.start, input.end].some((endpoint) => endpoint !== undefined && endpoint.source !== "program") && input.semantic === undefined) {
|
|
283
|
-
throw new Error(`${input.element.name} needs semantic to resolve this Script reference.`);
|
|
284
|
-
}
|
|
285
|
-
const time = createTemporalSpace(input);
|
|
286
282
|
const output = input.end === undefined ? "instant" : "window";
|
|
287
283
|
const subjectId = input.subjectId ?? input.id;
|
|
288
284
|
if (subjectId.length === 0) throw new Error("Temporal projection subjectId must not be empty.");
|
|
@@ -291,8 +287,7 @@ function projectionDraft(input: {
|
|
|
291
287
|
const records: SurfaceRecordDraft[] = [];
|
|
292
288
|
const componentInputs: SurfaceComponentDraft["inputs"] extends infer _T
|
|
293
289
|
? Record<string, SurfaceResolvedReference["ref"] | { readonly kind: "record"; readonly id: string }>
|
|
294
|
-
: never = {
|
|
295
|
-
if ([input.start, input.end].every((endpoint) => endpoint === undefined || endpoint.source === "program")) delete componentInputs.semantic;
|
|
290
|
+
: never = { timeline: input.timeline.ref };
|
|
296
291
|
const endpoints = input.end === undefined
|
|
297
292
|
? [["instant", input.start] as const]
|
|
298
293
|
: [["start", input.start] as const, ["end", input.end] as const];
|
|
@@ -327,14 +322,14 @@ function projectionDraft(input: {
|
|
|
327
322
|
}
|
|
328
323
|
return {
|
|
329
324
|
records,
|
|
330
|
-
components: [
|
|
325
|
+
components: [{
|
|
331
326
|
id: componentId,
|
|
332
327
|
fragment: fragment.id,
|
|
333
328
|
inputs: componentInputs,
|
|
334
329
|
outputs: { [output]: `${input.id}.__temporal.${output}` },
|
|
335
330
|
range: input.element.range,
|
|
336
331
|
}],
|
|
337
|
-
fragments: [
|
|
332
|
+
fragments: [fragment],
|
|
338
333
|
ref: { kind: "component-output", component: componentId, output },
|
|
339
334
|
};
|
|
340
335
|
}
|
|
@@ -344,8 +339,7 @@ export function createTemporalWindowProjection(input: {
|
|
|
344
339
|
readonly id: string;
|
|
345
340
|
readonly subjectId?: string;
|
|
346
341
|
readonly element: StructuredElement;
|
|
347
|
-
readonly
|
|
348
|
-
readonly space?: SurfaceResolvedReference;
|
|
342
|
+
readonly timeline: SurfaceResolvedReference;
|
|
349
343
|
readonly resolveReference: ResolveReference;
|
|
350
344
|
}): TemporalMarkupProjection {
|
|
351
345
|
const { element, resolveReference } = input;
|
|
@@ -422,13 +416,15 @@ export function createTemporalWindowProjection(input: {
|
|
|
422
416
|
const endExpression = parseTemporalInstant(end, `${element.name}.end`);
|
|
423
417
|
const startSource = expressionSource(startExpression);
|
|
424
418
|
const endSource = expressionSource(endExpression);
|
|
419
|
+
const startBinding = element.attributes["start-source"] === undefined ? startSource : "start-source";
|
|
420
|
+
const endBinding = element.attributes["end-source"] === undefined ? endSource : "end-source";
|
|
425
421
|
rejectUnusedTemporalAttributes(element, temporalWindowAttributeNames, [
|
|
426
422
|
"start", "end",
|
|
427
|
-
...(startSource === "program" ? [] : [
|
|
428
|
-
...(endSource === "program" ? [] : [
|
|
423
|
+
...(startSource === "program" ? [] : [startBinding]),
|
|
424
|
+
...(endSource === "program" ? [] : [endBinding]),
|
|
429
425
|
]);
|
|
430
|
-
const startReference =
|
|
431
|
-
const endReference =
|
|
426
|
+
const startReference = sourceReference(element, startSource, resolveReference, startBinding);
|
|
427
|
+
const endReference = sourceReference(element, endSource, resolveReference, endBinding);
|
|
432
428
|
return projectionDraft({
|
|
433
429
|
...input,
|
|
434
430
|
start: {
|
|
@@ -451,8 +447,7 @@ export function createTemporalInstantProjection(input: {
|
|
|
451
447
|
readonly id: string;
|
|
452
448
|
readonly subjectId?: string;
|
|
453
449
|
readonly element: StructuredElement;
|
|
454
|
-
readonly
|
|
455
|
-
readonly space?: SurfaceResolvedReference;
|
|
450
|
+
readonly timeline: SurfaceResolvedReference;
|
|
456
451
|
readonly resolveReference: ResolveReference;
|
|
457
452
|
readonly semanticAttribute?: string;
|
|
458
453
|
readonly boundaryAttribute?: string;
|
|
@@ -1,59 +1,28 @@
|
|
|
1
|
-
import { sealGraphFragment } from "@hypit/elaborator";
|
|
2
1
|
import type { StructuredElement, SurfaceAttributeVocabulary, SurfaceResolvedReference } from "@hypit/markup";
|
|
3
|
-
import {
|
|
4
|
-
import { semanticTrackProducers, semanticTrackTypes } from "@hypit/semantic-track";
|
|
2
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
5
3
|
|
|
6
4
|
export type TemporalContext = {
|
|
7
|
-
readonly
|
|
8
|
-
readonly space?: SurfaceResolvedReference;
|
|
5
|
+
readonly timeline: SurfaceResolvedReference;
|
|
9
6
|
};
|
|
10
7
|
|
|
11
8
|
export const temporalContextAttributeVocabulary = [
|
|
12
|
-
{ name: "
|
|
13
|
-
summary: "
|
|
14
|
-
{ name: "space", kind: "reference", required: false, accepts: [programSpaceTypes.programSpace],
|
|
15
|
-
summary: "Uses a declared film time axis for authored animation. Supply semantic or space." },
|
|
9
|
+
{ name: "timeline", kind: "reference", required: true, accepts: [timelineTypes.track],
|
|
10
|
+
summary: "The complete film Timeline, with any placed material and semantic anchors." },
|
|
16
11
|
] as const satisfies readonly SurfaceAttributeVocabulary[];
|
|
17
12
|
|
|
18
|
-
/**
|
|
13
|
+
/** One author-facing Timeline; projections share its range and evidence. */
|
|
19
14
|
export function resolveTemporalContext(input: {
|
|
20
15
|
readonly element: StructuredElement;
|
|
21
16
|
readonly resolveReference: (path: string) => SurfaceResolvedReference | undefined;
|
|
22
17
|
}): TemporalContext {
|
|
23
18
|
const { element, resolveReference } = input;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
const name = element.attributes.semantic === undefined ? "space" : "semantic";
|
|
28
|
-
const raw = element.attributes[name];
|
|
29
|
-
if (typeof raw !== "object" || raw.kind !== "reference") throw new Error(`${element.name}.${name} must be a reference.`);
|
|
19
|
+
const raw = element.attributes.timeline;
|
|
20
|
+
if (typeof raw !== "object" || raw.kind !== "reference") throw new Error(`${element.name}.timeline must be a reference.`);
|
|
30
21
|
const found = resolveReference(raw.path);
|
|
31
|
-
const expected =
|
|
22
|
+
const expected = timelineTypes.track;
|
|
32
23
|
if (found === undefined || found.type.module.name !== expected.module.name
|
|
33
24
|
|| found.type.module.version !== expected.module.version || found.type.name !== expected.name) {
|
|
34
|
-
throw new Error(`${element.name}
|
|
25
|
+
throw new Error(`${element.name}.timeline must reference a Timeline.`);
|
|
35
26
|
}
|
|
36
|
-
return {
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** Give consumers a ProgramSpace while preserving semantic context for word-bound projections. */
|
|
40
|
-
export function createTemporalSpace(input: TemporalContext & { readonly id: string; readonly element: StructuredElement }) {
|
|
41
|
-
if (input.space !== undefined) return { records: [], components: [], fragments: [], space: input.space };
|
|
42
|
-
if (input.semantic === undefined) throw new Error(`${input.element.name} requires a film time source.`);
|
|
43
|
-
const fragment = sealGraphFragment({
|
|
44
|
-
inputs: [{ name: "semantic", type: semanticTrackTypes.track }],
|
|
45
|
-
operations: [{ id: "project-space", producer: semanticTrackProducers.projectProgramSpace,
|
|
46
|
-
inputs: { track: { kind: "fragment-input", name: "semantic" } }, result: { kind: "output", name: "space" } }],
|
|
47
|
-
exports: [{ name: "space", type: programSpaceTypes.programSpace,
|
|
48
|
-
root: { kind: "fragment-operation", operation: "project-space" } }],
|
|
49
|
-
});
|
|
50
|
-
const id = `${input.id}.__space`;
|
|
51
|
-
const space: SurfaceResolvedReference = { path: `${id}.space`, type: programSpaceTypes.programSpace,
|
|
52
|
-
ref: { kind: "component-output", component: id, output: "space" } };
|
|
53
|
-
return {
|
|
54
|
-
records: [],
|
|
55
|
-
components: [{ id, fragment: fragment.id, inputs: { semantic: input.semantic.ref }, outputs: { space: `${id}.space` }, range: input.element.range }],
|
|
56
|
-
fragments: [fragment],
|
|
57
|
-
space,
|
|
58
|
-
};
|
|
27
|
+
return { timeline: found };
|
|
59
28
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# `@hypit/timeline`
|
|
2
|
+
|
|
3
|
+
One Timeline describes the complete film time range and the prepared Takes placed within it.
|
|
4
|
+
Semantic anchors exist wherever those Takes supply them; no second kind of time axis is needed
|
|
5
|
+
for authored animation. The value stores `id`, `durationSec`, `frameRate`, optional `narrativeId`,
|
|
6
|
+
and `items` containing `take` and `startFrame`. A zero-Take Timeline has no Narrative identity.
|
|
7
|
+
|
|
8
|
+
Each Take retains its normalized local media and semantic evidence. Global positions are its
|
|
9
|
+
placement start plus local positions. Items can leave gaps or overlap; their declaration order is
|
|
10
|
+
preserved. Frame rates and Narrative ownership agree, identities remain unique, and every complete
|
|
11
|
+
Take fits inside the positive Program range. Assembly is owned by
|
|
12
|
+
[Timeline authoring](../timeline-author/README.md).
|
|
13
|
+
|
|
14
|
+
`projectTimelineSpace` supplies the lightweight `ProgramSpace` range used by rendering.
|
|
15
|
+
`semanticAnchorFrames`, `selectionFrameSpan`, `segmentFrameSpan`, `tokenFrameSpan` and `momentFrame`
|
|
16
|
+
locate evidence without copying another word table. Program boundaries are available even with zero
|
|
17
|
+
Takes. Selection endpoints retain their authored identities; projection/consumption determines
|
|
18
|
+
whether a requested physical Window is usable.
|
|
19
|
+
|
|
20
|
+
## Project prepared material
|
|
21
|
+
|
|
22
|
+
`projectTimelineMedia(timeline, window?)` returns every intersecting Take's `media`, `segmentId`,
|
|
23
|
+
global `span` and local `source` frame span. The default Window is the complete Timeline. Gaps
|
|
24
|
+
return no source; overlaps return all intersecting sources. Audio-only Takes remain represented.
|
|
25
|
+
Starting presentation inside a Take retains the matching source frame. This projection chooses no
|
|
26
|
+
layout, winning picture, held frame or transition.
|
|
27
|
+
|
|
28
|
+
`projectTimelineAudio` places original audio at each Take's position at native speed and gain.
|
|
29
|
+
Takes without audio contribute no clip; gaps are silent and overlapping Takes contribute simultaneous
|
|
30
|
+
clips. Film explicitly includes that audio contribution. These functions perform no media I/O,
|
|
31
|
+
transcription, rendering or generation.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ComponentPackage } from "@hypit/component-kit";
|
|
2
|
+
import type { StoredValue } from "@hypit/protocol";
|
|
3
|
+
import { canonicalize } from "@hypit/protocol";
|
|
4
|
+
|
|
5
|
+
import { timelineProducers, timelineTypes } from "./manifest.js";
|
|
6
|
+
import { assertTimelineIdentity } from "./identity.js";
|
|
7
|
+
import { projectTimelineAudio, projectTimelineSpace } from "./projection.js";
|
|
8
|
+
import type { Timeline } from "./types.js";
|
|
9
|
+
|
|
10
|
+
function track(value: StoredValue | undefined): Timeline {
|
|
11
|
+
if (value?.kind !== "inline") throw new Error("Timeline must be inline.");
|
|
12
|
+
return value.value as unknown as Timeline;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const timelineComponent = {
|
|
16
|
+
producers: [
|
|
17
|
+
{ producer: timelineProducers.projectProgramSpace, handler: ({ inputs }) => ({ outputs: { space: { kind: "inline", value: canonicalize(projectTimelineSpace(track(inputs.track?.value))) } }, needs: {} }) },
|
|
18
|
+
{ producer: timelineProducers.projectAudio, handler: ({ inputs }) => ({ outputs: { audio: { kind: "inline", value: canonicalize(projectTimelineAudio(track(inputs.track?.value))) } }, needs: {} }) },
|
|
19
|
+
],
|
|
20
|
+
validators: [{
|
|
21
|
+
type: timelineTypes.track,
|
|
22
|
+
handler: ({ value }) => assertTimelineIdentity(track(value)),
|
|
23
|
+
}],
|
|
24
|
+
} satisfies ComponentPackage;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { assertProgramSpaceIdentity, programSpaceFrameCount } from "@hypit/program-space";
|
|
2
|
+
import { assertSemanticTakeIdentity } from "@hypit/speech";
|
|
3
|
+
|
|
4
|
+
import type { Timeline, TimelineSpan } from "./types.js";
|
|
5
|
+
|
|
6
|
+
export function sealTimeline(value: Timeline): Timeline {
|
|
7
|
+
const track = structuredClone(value);
|
|
8
|
+
assertTimelineIdentity(track);
|
|
9
|
+
return track;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function assertTimelineIdentity(track: Timeline): void {
|
|
13
|
+
assertProgramSpaceIdentity(track);
|
|
14
|
+
const frameCount = programSpaceFrameCount(track);
|
|
15
|
+
if (track.items.length > 0 && !track.narrativeId?.trim()) throw new Error("A Timeline with Takes requires their Narrative identity.");
|
|
16
|
+
if (track.items.length === 0 && track.narrativeId !== undefined) throw new Error("An empty Timeline has no Narrative identity.");
|
|
17
|
+
const segmentIds = new Set<string>();
|
|
18
|
+
const tokenIds = new Set<string>();
|
|
19
|
+
const anchorIds = new Set<string>();
|
|
20
|
+
const frameRate = track.frameRate;
|
|
21
|
+
for (const item of track.items) {
|
|
22
|
+
assertSemanticTakeIdentity(item.take);
|
|
23
|
+
if (!Number.isSafeInteger(item.startFrame) || item.startFrame < 0
|
|
24
|
+
|| item.startFrame + item.take.media.timeline.frameCount > frameCount) {
|
|
25
|
+
throw new Error(`Timeline placement for ${item.take.segment.segmentId} is outside its Program range.`);
|
|
26
|
+
}
|
|
27
|
+
if (item.take.narrativeId !== track.narrativeId) {
|
|
28
|
+
throw new Error(`Timeline ${track.id} mixes Narrative ${item.take.narrativeId} into ${track.narrativeId}.`);
|
|
29
|
+
}
|
|
30
|
+
const rate = item.take.media.timeline.frameRate;
|
|
31
|
+
if (frameRate.numerator !== rate.numerator || frameRate.denominator !== rate.denominator) {
|
|
32
|
+
throw new Error("Timeline items must use one frame rate.");
|
|
33
|
+
}
|
|
34
|
+
const segmentId = item.take.segment.segmentId;
|
|
35
|
+
if (segmentIds.has(segmentId)) throw new Error(`Timeline repeats Segment ${segmentId}.`);
|
|
36
|
+
segmentIds.add(segmentId);
|
|
37
|
+
for (const token of item.take.tokens) {
|
|
38
|
+
if (tokenIds.has(token.tokenId)) throw new Error(`Timeline repeats Token ${token.tokenId}.`);
|
|
39
|
+
tokenIds.add(token.tokenId);
|
|
40
|
+
}
|
|
41
|
+
for (const anchor of item.take.anchors) {
|
|
42
|
+
if (anchor.identity === "program:start" || anchor.identity === "program:end") {
|
|
43
|
+
throw new Error(`SemanticTake cannot declare reserved Program Anchor ${anchor.identity}.`);
|
|
44
|
+
}
|
|
45
|
+
if (anchorIds.has(anchor.identity)) throw new Error(`Timeline repeats Anchor ${anchor.identity}.`);
|
|
46
|
+
anchorIds.add(anchor.identity);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function timelineSpans(track: Timeline): readonly TimelineSpan[] {
|
|
52
|
+
assertTimelineIdentity(track);
|
|
53
|
+
return track.items.map(item => ({ item, startFrame: item.startFrame,
|
|
54
|
+
endFrameExclusive: item.startFrame + item.take.media.timeline.frameCount }));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function timelineFrameCount(track: Timeline): number {
|
|
58
|
+
assertTimelineIdentity(track);
|
|
59
|
+
return programSpaceFrameCount(track);
|
|
60
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { timelineComponent } from "./component.js";
|
|
2
|
+
export { assertTimelineIdentity, sealTimeline, timelineFrameCount, timelineSpans } from "./identity.js";
|
|
3
|
+
export { assertNarrativeMomentIdentity, assertNarrativeSelectionIdentity, momentFrame, segmentFrameSpan, selectionFrameSpan, semanticAnchorFrames, tokenFrameSpan } from "./location.js";
|
|
4
|
+
export { timelineDependency, timelineManifest, timelineModuleRef, timelineProducers, timelineSchema, timelineTypes } from "./manifest.js";
|
|
5
|
+
export { projectTimelineAudio, projectTimelineSpace, projectTimelineMedia } from "./projection.js";
|
|
6
|
+
export type * from "./types.js";
|