@hypit/hypit 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- 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 +107 -16
- package/dist/public/temporal-markup.d.ts +9 -44
- package/dist/public/temporal.d.ts +37 -28
- package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
- package/examples/README.md +18 -10
- package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
- package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
- package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
- package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
- package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
- package/examples/provider-package/README.md +78 -0
- package/examples/provider-package/hypit.runtime.json +12 -0
- package/examples/provider-package/packages/provider-images/package.json +11 -0
- package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
- package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
- package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
- package/examples/semantic-composition/README.md +6 -0
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
- package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
- package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
- package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
- package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
- package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
- package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
- package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
- package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
- package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
- package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
- package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
- package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
- package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
- package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
- package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
- package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
- package/package.json +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 +33 -19
- 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 +69 -0
- package/packages/build-result/package.json +2 -1
- package/packages/build-result/src/decode.ts +12 -8
- package/packages/build-result/src/execution-log.ts +17 -0
- package/packages/build-result/src/file-reference.ts +42 -0
- package/packages/build-result/src/index.ts +4 -0
- package/packages/build-result/src/replace-file-windows.ts +58 -0
- package/packages/build-result/src/replace-file.ts +11 -0
- package/packages/build-result/src/store.ts +58 -14
- package/packages/build-result/src/types.ts +41 -8
- package/packages/build-result/src/writer.ts +12 -1
- package/packages/build-result-fs/README.md +23 -1
- package/packages/build-result-s3/README.md +5 -0
- package/packages/build-result-s3/src/repository.ts +23 -5
- 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 +31 -11
- 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 +27 -18
- package/packages/caption-fine/src/recipe.ts +7 -0
- package/packages/caption-fine/src/render.ts +62 -49
- 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 +10 -3
- package/packages/caption-fine-studio/src/activation.ts +3 -3
- package/packages/caption-fine-studio/src/index.ts +61 -40
- package/packages/cli/README.md +81 -3
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/arguments.ts +39 -15
- package/packages/cli/src/build-planning.ts +9 -3
- package/packages/cli/src/command.ts +7 -1
- package/packages/cli/src/commands/environment.ts +66 -27
- 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 +15 -5
- package/packages/cli/src/main.ts +38 -42
- package/packages/cli/src/observation.ts +7 -1
- package/packages/cli/src/output.ts +92 -34
- package/packages/cli/src/result-export.ts +22 -13
- package/packages/cli/src/run-file.ts +19 -8
- package/packages/cli/src/view.ts +64 -18
- package/packages/comment-sticker/README.md +3 -3
- package/packages/comment-sticker/package.json +1 -1
- package/packages/comment-sticker/src/component.ts +4 -4
- package/packages/comment-sticker/src/fragment.ts +5 -4
- package/packages/comment-sticker/src/manifest.ts +7 -6
- package/packages/comment-sticker/src/program.ts +9 -9
- package/packages/comment-sticker/src/surface.ts +6 -7
- package/packages/comment-sticker-studio/src/index.ts +2 -1
- package/packages/compiler-node/src/compiler.ts +1 -0
- 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/estimate/README.md +56 -3
- package/packages/estimate/src/program.ts +7 -8
- package/packages/film/README.md +12 -7
- package/packages/film/package.json +1 -1
- package/packages/film/src/component.ts +4 -4
- package/packages/film/src/fragment.ts +6 -5
- package/packages/film/src/manifest.ts +11 -10
- package/packages/film/src/program.ts +5 -5
- package/packages/film/src/recipe.ts +2 -1
- package/packages/film/src/surface.ts +6 -6
- package/packages/film-studio/package.json +1 -1
- package/packages/film-studio/src/index.ts +2 -2
- package/packages/fishaudio-speech/README.md +33 -0
- package/packages/fishaudio-speech/package.json +21 -0
- package/packages/fishaudio-speech/src/activation.ts +32 -0
- package/packages/fishaudio-speech/src/fragment.ts +11 -0
- package/packages/fishaudio-speech/src/index.ts +156 -0
- package/packages/fishaudio-speech/src/surface.ts +192 -0
- package/packages/fonts-open/README.md +5 -0
- package/packages/fonts-open/package.json +5 -1
- package/packages/fonts-open/src/studio.ts +21 -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 +23 -13
- 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/README.md +57 -0
- 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 +33 -35
- package/packages/ranking/src/schedule.ts +16 -19
- package/packages/ranking/src/surface.ts +12 -13
- package/packages/ranking-studio/README.md +29 -0
- package/packages/ranking-studio/package.json +8 -3
- package/packages/ranking-studio/src/index.ts +71 -12
- 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/catalog.ts +2 -0
- 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 +25 -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 +111 -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 +41 -25
- package/packages/runtime-local/src/result-writer.ts +2 -0
- package/packages/runtime-local/src/runtime.ts +10 -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 +37 -2
- package/packages/script/src/edit.ts +123 -73
- package/packages/script/src/lexical.ts +40 -6
- package/packages/script/src/manifest.ts +2 -2
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/parser.ts +36 -8
- package/packages/script/src/surface.ts +4 -3
- package/packages/script/src/types.ts +5 -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 +10 -2
- package/packages/seedance-kits/kits/speaker-v1.svs +5 -5
- 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/align.ts +45 -21
- 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 +117 -0
- package/packages/studio/README.md +149 -14
- package/packages/studio/package.json +8 -7
- package/packages/studio/src/build-library.ts +99 -84
- 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/library-media.ts +19 -0
- package/packages/studio/src/parameter-values.ts +83 -1
- package/packages/studio/src/parameters.ts +132 -43
- 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 +66 -34
- package/packages/studio/src/shared.ts +24 -8
- package/packages/studio/src/snapshot.ts +21 -132
- package/packages/studio/src/studio-preflight.ts +3 -3
- package/packages/studio/src/studio-registry.ts +72 -6
- package/packages/studio/src/style.css +342 -190
- package/packages/studio/src/temporal-edit.ts +131 -0
- package/packages/studio/src/ui/artifact-name.ts +80 -0
- package/packages/studio/src/ui/artifact-preview.ts +99 -0
- package/packages/studio/src/ui/comments.ts +233 -0
- package/packages/studio/src/ui/icons.ts +10 -1
- package/packages/studio/src/ui/library.ts +373 -192
- package/packages/studio/src/ui/main.ts +291 -110
- package/packages/studio/src/ui/material-preview.ts +1 -1
- package/packages/studio/src/ui/overlay.ts +31 -26
- package/packages/studio/src/ui/scrub-preview.ts +108 -0
- package/packages/studio/src/ui/sidebar-panel.ts +31 -0
- package/packages/studio/src/ui/stage.ts +188 -9
- package/packages/studio/src/ui/timeline.ts +187 -281
- package/packages/studio/start.ts +19 -5
- package/packages/studio-adapter/README.md +151 -11
- package/packages/studio-adapter/src/index.ts +126 -14
- 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 +183 -0
- package/packages/temporal-markup/README.md +31 -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/typography-track-studio/package.json +8 -3
- package/packages/typography-track-studio/src/index.ts +5 -1
- package/packages/video-cli/README.md +16 -4
- package/packages/video-cli/package.json +2 -1
- package/packages/video-cli/src/creation.ts +25 -9
- 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 +8 -1
- package/packages/workspace/src/index.ts +2 -0
- package/packages/workspace-fs-node/README.md +4 -1
- package/packages/workspace-fs-node/src/workspace.ts +3 -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,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@hypit/
|
|
2
|
+
"name": "@hypit/timeline-author",
|
|
3
3
|
"version": "0.0.0-dev",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"private": true,
|
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@hypit/component-kit": "workspace:*",
|
|
15
|
-
"@hypit/composition": "workspace:*",
|
|
16
15
|
"@hypit/elaborator": "workspace:*",
|
|
17
16
|
"@hypit/protocol": "workspace:*",
|
|
18
17
|
"@hypit/speech": "workspace:*",
|
|
19
|
-
"@hypit/
|
|
20
|
-
"@hypit/markup": "workspace:*"
|
|
18
|
+
"@hypit/timeline": "workspace:*",
|
|
19
|
+
"@hypit/markup": "workspace:*",
|
|
20
|
+
"@hypit/program-space": "workspace:*",
|
|
21
|
+
"@hypit/temporal": "workspace:*",
|
|
22
|
+
"@hypit/temporal-markup": "workspace:*"
|
|
21
23
|
},
|
|
22
24
|
"devDependencies": {
|
|
23
25
|
"@hypit/core": "workspace:*",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { decodeClockSurface } from "@hypit/program-space";
|
|
2
|
+
import { createMarkupSurfaceHostFacet } from "@hypit/markup";
|
|
3
|
+
import {
|
|
4
|
+
decodeTimelineAuthorSurface, timelineAuthorComponent, timelineAuthorManifest,
|
|
5
|
+
timelineAuthorModuleRef,
|
|
6
|
+
timelineAuthorMarkupSurfaces,
|
|
7
|
+
} from "./index.js";
|
|
8
|
+
|
|
9
|
+
export const hypitPackage = {
|
|
10
|
+
format: "hypit.node-package@1" as const,
|
|
11
|
+
modules: [{
|
|
12
|
+
manifest: timelineAuthorManifest,
|
|
13
|
+
}],
|
|
14
|
+
components: [timelineAuthorComponent],
|
|
15
|
+
hostFacets: [createMarkupSurfaceHostFacet({
|
|
16
|
+
module: timelineAuthorModuleRef,
|
|
17
|
+
declaration: timelineAuthorMarkupSurfaces.find((item) => item.name === "timeline")!, handler: decodeTimelineAuthorSurface,
|
|
18
|
+
}), createMarkupSurfaceHostFacet({ module: timelineAuthorModuleRef,
|
|
19
|
+
declaration: timelineAuthorMarkupSurfaces.find(item => item.name === "clock")!, handler: decodeClockSurface,
|
|
20
|
+
})],
|
|
21
|
+
};
|
|
22
|
+
export default hypitPackage;
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
+
import type { ProgramClock } from "@hypit/program-space";
|
|
1
2
|
import type { ComponentPackage } from "@hypit/component-kit";
|
|
2
3
|
import type { StoredValue } from "@hypit/protocol";
|
|
3
4
|
import { canonicalize } from "@hypit/protocol";
|
|
4
5
|
import type { SemanticTake } from "@hypit/speech";
|
|
5
6
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import type {
|
|
7
|
+
import { timelineAuthorProducers } from "./manifest.js";
|
|
8
|
+
import { appendTimelineAuthorTake, assembleTimelineAuthor, createTimelineAuthorSet } from "./program.js";
|
|
9
|
+
import type { TimelineAuthorHeader, TimelineAuthorSet } from "./types.js";
|
|
9
10
|
|
|
10
11
|
function inline<T>(value: StoredValue | undefined, subject: string): T {
|
|
11
12
|
if (value?.kind !== "inline") throw new Error(`${subject} must be inline`);
|
|
12
13
|
return value.value as unknown as T;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export const
|
|
16
|
+
export const timelineAuthorComponent = {
|
|
16
17
|
producers: [
|
|
17
18
|
{
|
|
18
|
-
producer:
|
|
19
|
+
producer: timelineAuthorProducers.createSet,
|
|
19
20
|
handler: () => ({
|
|
20
|
-
outputs: { set: { kind: "inline", value: canonicalize(
|
|
21
|
+
outputs: { set: { kind: "inline", value: canonicalize(createTimelineAuthorSet()) } },
|
|
21
22
|
needs: {},
|
|
22
23
|
}),
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
|
-
producer:
|
|
26
|
+
producer: timelineAuthorProducers.appendTake,
|
|
26
27
|
handler: ({ inputs }) => ({
|
|
27
|
-
outputs: { set: { kind: "inline", value: canonicalize(
|
|
28
|
-
inline<
|
|
28
|
+
outputs: { set: { kind: "inline", value: canonicalize(appendTimelineAuthorTake(
|
|
29
|
+
inline<TimelineAuthorSet>(inputs.set?.value, "TimelineAuthorSet"),
|
|
29
30
|
inline<SemanticTake>(inputs.take?.value, "SemanticTake"),
|
|
30
31
|
)) } },
|
|
31
32
|
needs: {},
|
|
32
33
|
}),
|
|
33
34
|
},
|
|
34
35
|
{
|
|
35
|
-
producer:
|
|
36
|
+
producer: timelineAuthorProducers.assembleTrack,
|
|
36
37
|
handler: ({ inputs }) => ({
|
|
37
|
-
outputs: { track: { kind: "inline", value: canonicalize(
|
|
38
|
-
inline<
|
|
39
|
-
inline<
|
|
38
|
+
outputs: { track: { kind: "inline", value: canonicalize(assembleTimelineAuthor(
|
|
39
|
+
inline<TimelineAuthorHeader>(inputs.header?.value, "TimelineAuthorHeader"),
|
|
40
|
+
inline<TimelineAuthorSet>(inputs.set?.value, "TimelineAuthorSet"),
|
|
41
|
+
inline<ProgramClock>(inputs.clock?.value, "ProgramClock"),
|
|
40
42
|
)) } },
|
|
41
43
|
needs: {},
|
|
42
44
|
}),
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
+
import { programSpaceTypes } from "@hypit/program-space";
|
|
1
2
|
import { speechTypes } from "@hypit/speech";
|
|
2
|
-
import { compositionTypes } from "@hypit/composition";
|
|
3
3
|
import { sealGraphFragment } from "@hypit/elaborator";
|
|
4
4
|
import type { FragmentOperation } from "@hypit/elaborator";
|
|
5
|
-
import {
|
|
5
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
6
6
|
import type { TypeRef } from "@hypit/protocol";
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import type {
|
|
8
|
+
import { timelineAuthorProducers, timelineAuthorTypes } from "./manifest.js";
|
|
9
|
+
import type { TimelineAuthorFragmentOptions } from "./types.js";
|
|
10
10
|
|
|
11
11
|
const input = (name: string) => ({ kind: "fragment-input" as const, name });
|
|
12
12
|
const operation = (id: string) => ({ kind: "fragment-operation" as const, operation: id });
|
|
13
13
|
|
|
14
|
-
export function
|
|
15
|
-
if (options.takes.length === 0) throw new Error("Speech Track requires at least one Take");
|
|
14
|
+
export function createTimelineAuthorFragment(options: TimelineAuthorFragmentOptions) {
|
|
16
15
|
const declaredInputs = new Map<string, TypeRef>();
|
|
17
16
|
const addInput = (name: string, type: TypeRef): void => {
|
|
18
|
-
if (!name) throw new Error("
|
|
17
|
+
if (!name) throw new Error("Timeline Fragment input names must not be empty");
|
|
19
18
|
const previous = declaredInputs.get(name);
|
|
20
19
|
if (previous !== undefined && (previous.module.name !== type.module.name
|
|
21
20
|
|| previous.module.version !== type.module.version || previous.name !== type.name)) {
|
|
22
|
-
throw new Error(`
|
|
21
|
+
throw new Error(`Timeline Fragment input ${name} is reused with another Type`);
|
|
23
22
|
}
|
|
24
23
|
declaredInputs.set(name, type);
|
|
25
24
|
};
|
|
26
|
-
addInput("header",
|
|
25
|
+
addInput("header", timelineAuthorTypes.header);
|
|
26
|
+
addInput("clock", programSpaceTypes.clock);
|
|
27
27
|
for (const take of options.takes) {
|
|
28
28
|
addInput(take.takeName, speechTypes.semanticTake);
|
|
29
29
|
}
|
|
30
30
|
const operations: FragmentOperation[] = [{
|
|
31
31
|
id: "track:set:empty",
|
|
32
|
-
producer:
|
|
32
|
+
producer: timelineAuthorProducers.createSet,
|
|
33
33
|
inputs: {},
|
|
34
34
|
result: { kind: "output", name: "set" },
|
|
35
35
|
}];
|
|
@@ -38,7 +38,7 @@ export function createSpeechTrackFragment(options: SpeechTrackFragmentOptions) {
|
|
|
38
38
|
const id = `track:set:append:${String(index + 1).padStart(4, "0")}`;
|
|
39
39
|
operations.push({
|
|
40
40
|
id,
|
|
41
|
-
producer:
|
|
41
|
+
producer: timelineAuthorProducers.appendTake,
|
|
42
42
|
inputs: {
|
|
43
43
|
set: operation(current),
|
|
44
44
|
take: input(take.takeName),
|
|
@@ -50,25 +50,16 @@ export function createSpeechTrackFragment(options: SpeechTrackFragmentOptions) {
|
|
|
50
50
|
operations.push(
|
|
51
51
|
{
|
|
52
52
|
id: "track:semantic",
|
|
53
|
-
producer:
|
|
54
|
-
inputs: { header: input("header"), set: operation(current) },
|
|
53
|
+
producer: timelineAuthorProducers.assembleTrack,
|
|
54
|
+
inputs: { header: input("header"), set: operation(current), clock: input("clock") },
|
|
55
55
|
result: { kind: "output", name: "track" },
|
|
56
56
|
},
|
|
57
|
-
{
|
|
58
|
-
id: "track:audio-track",
|
|
59
|
-
producer: semanticTrackProducers.projectAudio,
|
|
60
|
-
inputs: { track: operation("track:semantic") },
|
|
61
|
-
result: { kind: "output", name: "audio" },
|
|
62
|
-
},
|
|
63
57
|
);
|
|
64
58
|
return sealGraphFragment({
|
|
65
59
|
inputs: [...declaredInputs.entries()].map(([name, type]) => ({ name, type })),
|
|
66
60
|
operations,
|
|
67
61
|
exports: [
|
|
68
|
-
{ name: "
|
|
69
|
-
{
|
|
70
|
-
name: "audio", type: compositionTypes.audioTrack, root: operation("track:audio-track"),
|
|
71
|
-
},
|
|
62
|
+
{ name: "timeline", type: timelineTypes.track, root: operation("track:semantic") },
|
|
72
63
|
],
|
|
73
64
|
});
|
|
74
65
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Official Timeline authoring and deterministic Timeline assembly. */
|
|
2
|
+
export { timelineAuthorComponent } from "./component.js";
|
|
3
|
+
export { createTimelineAuthorFragment } from "./fragment.js";
|
|
4
|
+
export { timelineAuthorManifest, timelineAuthorMarkupSurfaces, timelineAuthorModuleRef, timelineAuthorProducers, timelineAuthorTypes, timelineAuthorHeaderSchema, timelineAuthorSetSchema } from "./manifest.js";
|
|
5
|
+
export { appendTimelineAuthorTake, assembleTimelineAuthor, assertTimelineAuthorHeader, assertTimelineAuthorSet, createTimelineAuthorSet, sealTimelineAuthorHeader } from "./program.js";
|
|
6
|
+
export { decodeTimelineAuthorSurface } from "./surface.js";
|
|
7
|
+
export type * from "./types.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { programSpaceDependency, programSpaceTypes, programSpaceMarkupSurfaces } from "@hypit/program-space";
|
|
2
|
+
import { semanticTakeSchema, speechDependency, speechTypes } from "@hypit/speech";
|
|
3
|
+
import { timelineDependency, timelineTypes } from "@hypit/timeline";
|
|
4
|
+
import type { ModuleManifest, ValueSchema } from "@hypit/protocol";
|
|
5
|
+
export const timelineAuthorModuleRef = { name: "@hypit/timeline-author", version: "1" } as const;
|
|
6
|
+
export const timelineAuthorTypes = {
|
|
7
|
+
header: { module: timelineAuthorModuleRef, name: "TimelineAuthorHeader" },
|
|
8
|
+
trackSet: { module: timelineAuthorModuleRef, name: "TimelineAuthorSet" },
|
|
9
|
+
} as const;
|
|
10
|
+
export const timelineAuthorProducers = {
|
|
11
|
+
createSet: { module: timelineAuthorModuleRef, name: "create-track-set" },
|
|
12
|
+
appendTake: { module: timelineAuthorModuleRef, name: "append-track-take" },
|
|
13
|
+
assembleTrack: { module: timelineAuthorModuleRef, name: "assemble-timeline" },
|
|
14
|
+
} as const;
|
|
15
|
+
export const timelineAuthorHeaderSchema: ValueSchema = { kind: "object", fields: { id: { schema: { kind: "string", minLength: 1 } }, at: { optional: true, schema: { kind: "array", items: { kind: "string" } } }, end: { optional: true, schema: { kind: "string" } } } };
|
|
16
|
+
export const timelineAuthorSetSchema: ValueSchema = { kind: "object", fields: { takes: { schema: { kind: "array", items: { kind: "object", fields: { semantic: { schema: semanticTakeSchema } } } } } } };
|
|
17
|
+
export const timelineAuthorMarkupSurfaces = [{
|
|
18
|
+
name: "timeline", tag: "Timeline", mode: "structured",
|
|
19
|
+
outputs: [timelineAuthorTypes.header, timelineTypes.track],
|
|
20
|
+
vocabulary: {
|
|
21
|
+
summary: "Declares one complete Timeline, with zero or more prepared Takes placed within it.",
|
|
22
|
+
attributes: [
|
|
23
|
+
{ name: "id", kind: "identifier", required: true, summary: "Names the Timeline output." },
|
|
24
|
+
{ name: "clock", kind: "reference", required: true, accepts: [programSpaceTypes.clock], summary: "Frame rate, available before material generation." },
|
|
25
|
+
{ name: "end", kind: "literal", required: false, summary: "Program end: fixed time or content.end with an optional offset; defaults to content.end." },
|
|
26
|
+
],
|
|
27
|
+
children: [{ tag: "Take", cardinality: "many", summary: "A prepared SemanticTake in performance order.",
|
|
28
|
+
attributes: [{ name: "source", kind: "reference", required: true, accepts: [speechTypes.semanticTake], summary: "The normalized, aligned performance." },
|
|
29
|
+
{ name: "at", kind: "literal", required: false, summary: "Absolute position or previous.end with an offset. Defaults to zero for the first Take and previous.end thereafter." }] }],
|
|
30
|
+
ports: [
|
|
31
|
+
{ name: "timeline", type: timelineTypes.track, summary: "The complete time range, retaining placed material and any semantic evidence." },
|
|
32
|
+
],
|
|
33
|
+
example: '<time:Clock id="clock" frame-rate="30"/><time:Timeline id="program" clock={clock} end="content.end+2s"><time:Take source={opening.take} at="2s"/><time:Take source={answer.take}/></time:Timeline>',
|
|
34
|
+
notes: ["Performance, Sound and Caption present existing pictures, audio and words independently. Include their contributions explicitly in Film."],
|
|
35
|
+
},
|
|
36
|
+
}, programSpaceMarkupSurfaces[0]] as const;
|
|
37
|
+
export const timelineAuthorManifest: ModuleManifest = {
|
|
38
|
+
format: "hypit.module@1",
|
|
39
|
+
name: timelineAuthorModuleRef.name,
|
|
40
|
+
version: timelineAuthorModuleRef.version,
|
|
41
|
+
dependencies: [
|
|
42
|
+
programSpaceDependency,
|
|
43
|
+
speechDependency,
|
|
44
|
+
timelineDependency,
|
|
45
|
+
],
|
|
46
|
+
types: [
|
|
47
|
+
{ name: timelineAuthorTypes.header.name },
|
|
48
|
+
{ name: timelineAuthorTypes.trackSet.name },
|
|
49
|
+
],
|
|
50
|
+
capabilities: [],
|
|
51
|
+
producers: [
|
|
52
|
+
{
|
|
53
|
+
name: timelineAuthorProducers.createSet.name,
|
|
54
|
+
inputs: [],
|
|
55
|
+
outputs: [{ name: "set", type: timelineAuthorTypes.trackSet }],
|
|
56
|
+
needs: [],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: timelineAuthorProducers.appendTake.name,
|
|
60
|
+
inputs: [
|
|
61
|
+
{ name: "set", type: timelineAuthorTypes.trackSet },
|
|
62
|
+
{ name: "take", type: speechTypes.semanticTake },
|
|
63
|
+
],
|
|
64
|
+
outputs: [{ name: "set", type: timelineAuthorTypes.trackSet }],
|
|
65
|
+
needs: [],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: timelineAuthorProducers.assembleTrack.name,
|
|
69
|
+
inputs: [
|
|
70
|
+
{ name: "header", type: timelineAuthorTypes.header },
|
|
71
|
+
{ name: "clock", type: programSpaceTypes.clock },
|
|
72
|
+
{ name: "set", type: timelineAuthorTypes.trackSet },
|
|
73
|
+
],
|
|
74
|
+
outputs: [{ name: "track", type: timelineTypes.track }],
|
|
75
|
+
needs: [],
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { assertProgramClockIdentity, type ProgramClock } from "@hypit/program-space";
|
|
2
|
+
import { durationInFrames } from "@hypit/temporal";
|
|
3
|
+
import { parseTemporalDuration } from "@hypit/temporal-markup";
|
|
4
|
+
import { assertSemanticTakeIdentity } from "@hypit/speech";
|
|
5
|
+
import type { SemanticTake } from "@hypit/speech";
|
|
6
|
+
import { sealTimeline } from "@hypit/timeline";
|
|
7
|
+
import type { Timeline } from "@hypit/timeline";
|
|
8
|
+
import type { TimelineAuthorHeader, TimelineAuthorSet, TimelineAuthorTake } from "./types.js";
|
|
9
|
+
function assert(condition: unknown, message: string): asserts condition {
|
|
10
|
+
if (!condition) throw new Error(message);
|
|
11
|
+
}
|
|
12
|
+
export function sealTimelineAuthorHeader(value: TimelineAuthorHeader): TimelineAuthorHeader { return structuredClone(value); }
|
|
13
|
+
export function assertTimelineAuthorHeader(value: TimelineAuthorHeader): void {
|
|
14
|
+
assert(value.id.trim().length > 0, "TimelineAuthorHeader id must not be empty");
|
|
15
|
+
}
|
|
16
|
+
function sealTimelineAuthorSet(value: TimelineAuthorSet): TimelineAuthorSet { return structuredClone(value); }
|
|
17
|
+
function assertTake(take: TimelineAuthorTake): void { assertSemanticTakeIdentity(take.semantic); }
|
|
18
|
+
export function assertTimelineAuthorSet(value: TimelineAuthorSet): void {
|
|
19
|
+
const segments = new Set<string>();
|
|
20
|
+
for (const take of value.takes) {
|
|
21
|
+
assertSemanticTakeIdentity(take.semantic);
|
|
22
|
+
const segmentId = take.semantic.segment.segmentId;
|
|
23
|
+
assert(!segments.has(segmentId), `Timeline repeats Segment ${segmentId}`);
|
|
24
|
+
segments.add(segmentId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function createTimelineAuthorSet(): TimelineAuthorSet {
|
|
29
|
+
return sealTimelineAuthorSet({
|
|
30
|
+
takes: [],
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function appendTake(
|
|
35
|
+
set: TimelineAuthorSet,
|
|
36
|
+
take: TimelineAuthorTake,
|
|
37
|
+
): TimelineAuthorSet {
|
|
38
|
+
assertTimelineAuthorSet(set);
|
|
39
|
+
assertTake(take);
|
|
40
|
+
assert(!set.takes.some((item) => item.semantic.segment.segmentId === take.semantic.segment.segmentId),
|
|
41
|
+
`Timeline repeats Segment ${take.semantic.segment.segmentId}`);
|
|
42
|
+
return sealTimelineAuthorSet({
|
|
43
|
+
takes: [...set.takes, take],
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function appendTimelineAuthorTake(set: TimelineAuthorSet, semantic: SemanticTake): TimelineAuthorSet {
|
|
48
|
+
return appendTake(set, { semantic });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function assembleTimelineAuthor(
|
|
52
|
+
header: TimelineAuthorHeader,
|
|
53
|
+
set: TimelineAuthorSet,
|
|
54
|
+
clock: ProgramClock,
|
|
55
|
+
): Timeline {
|
|
56
|
+
assertTimelineAuthorHeader(header);
|
|
57
|
+
assertTimelineAuthorSet(set);
|
|
58
|
+
assertProgramClockIdentity(clock);
|
|
59
|
+
if (header.at !== undefined && header.at.length !== set.takes.length) {
|
|
60
|
+
throw new Error("Timeline placement declarations must correspond to its Takes.");
|
|
61
|
+
}
|
|
62
|
+
const narrativeId = set.takes[0]?.semantic.narrativeId;
|
|
63
|
+
let previousEnd = 0;
|
|
64
|
+
let contentEnd = 0;
|
|
65
|
+
const items = set.takes.map((item, index) => {
|
|
66
|
+
const at = header.at?.[index] ?? (index === 0 ? "0f" : "previous.end");
|
|
67
|
+
const startFrame = placementFrame(at, clock, index === 0 ? undefined : previousEnd, "previous.end");
|
|
68
|
+
previousEnd = startFrame + item.semantic.media.timeline.frameCount;
|
|
69
|
+
contentEnd = Math.max(contentEnd, previousEnd);
|
|
70
|
+
return { take: item.semantic, startFrame };
|
|
71
|
+
});
|
|
72
|
+
const endFrame = placementFrame(header.end ?? "content.end", clock, contentEnd, "content.end");
|
|
73
|
+
assert(endFrame > 0, "Timeline needs a positive end; an empty Timeline requires an authored extent.");
|
|
74
|
+
assert(endFrame >= contentEnd, "Timeline end precedes placed content; choose an end that includes its Takes.");
|
|
75
|
+
return sealTimeline({
|
|
76
|
+
id: header.id, frameRate: clock.frameRate,
|
|
77
|
+
durationSec: endFrame * clock.frameRate.denominator / clock.frameRate.numerator,
|
|
78
|
+
...(narrativeId === undefined ? {} : { narrativeId }), items,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** Parse local placement syntax before any upstream material needs to run. */
|
|
83
|
+
export function placementExpression(expression: string, reference: string) {
|
|
84
|
+
const value = expression.trim();
|
|
85
|
+
if (!value.startsWith(reference)) return { relative: false, sign: 1,
|
|
86
|
+
duration: parseTemporalDuration(value, "Timeline position") };
|
|
87
|
+
const offset = value.slice(reference.length).trim();
|
|
88
|
+
if (offset === "") return { relative: true, sign: 1,
|
|
89
|
+
duration: parseTemporalDuration("0f", "Timeline offset") };
|
|
90
|
+
const match = /^([+-])\s*(.+)$/u.exec(offset);
|
|
91
|
+
if (match === null) throw new Error(`Invalid Timeline position ${expression}.`);
|
|
92
|
+
return { relative: true, sign: match[1] === "-" ? -1 : 1,
|
|
93
|
+
duration: parseTemporalDuration(match[2]!, "Timeline offset") };
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Resolve local assembly expressions before a complete Timeline exists. */
|
|
97
|
+
export function placementFrame(expression: string, clock: ProgramClock, base: number | undefined, reference: string): number {
|
|
98
|
+
const parsed = placementExpression(expression, reference);
|
|
99
|
+
if (parsed.relative && base === undefined) throw new Error(`${reference} has no preceding Take.`);
|
|
100
|
+
const frames = durationInFrames(parsed.duration, clock);
|
|
101
|
+
if (frames.denominator !== 1n || frames.numerator > BigInt(Number.MAX_SAFE_INTEGER)) {
|
|
102
|
+
throw new Error(`Timeline duration ${expression} must land on an exact frame boundary.`);
|
|
103
|
+
}
|
|
104
|
+
const frame = (parsed.relative ? base! : 0) + parsed.sign * Number(frames.numerator);
|
|
105
|
+
if (!Number.isSafeInteger(frame) || frame < 0) throw new Error(`Timeline position ${expression} must resolve to a non-negative frame.`);
|
|
106
|
+
return frame;
|
|
107
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { placementExpression } from "./program.js";
|
|
2
|
+
import { programSpaceTypes } from "@hypit/program-space";
|
|
3
|
+
import { assertAttributes, assertEmptyElement, localName, textAttribute, type StructuredSurfaceHandler } from "@hypit/markup";
|
|
4
|
+
import { sameType } from "@hypit/protocol";
|
|
5
|
+
import { speechTypes } from "@hypit/speech";
|
|
6
|
+
import { createTimelineAuthorFragment } from "./fragment.js";
|
|
7
|
+
import { timelineAuthorTypes } from "./manifest.js";
|
|
8
|
+
|
|
9
|
+
export const decodeTimelineAuthorSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
10
|
+
assertAttributes(element, ["id", "clock", "end"]);
|
|
11
|
+
const id = textAttribute(element, "id");
|
|
12
|
+
const rawClock = element.attributes.clock;
|
|
13
|
+
const clock = typeof rawClock === "object" && rawClock.kind === "reference" ? resolveReference(rawClock.path) : undefined;
|
|
14
|
+
if (clock === undefined || !sameType(clock.type, programSpaceTypes.clock)) throw new Error(`${element.name}.clock must reference a Clock.`);
|
|
15
|
+
if (element.attributes.end !== undefined) placementExpression(textAttribute(element, "end"), "content.end");
|
|
16
|
+
const at: string[] = [];
|
|
17
|
+
const takes = element.children.flatMap(child => {
|
|
18
|
+
if (child.kind === "text") {
|
|
19
|
+
if (child.value.trim()) throw new Error("Timeline accepts only Take children.");
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
if (localName(child.name) !== "Take") throw new Error("Timeline accepts only Take children.");
|
|
23
|
+
assertAttributes(child, ["source", "at"]);
|
|
24
|
+
at.push(child.attributes.at === undefined ? (at.length === 0 ? "0f" : "previous.end") : textAttribute(child, "at"));
|
|
25
|
+
const position = placementExpression(at.at(-1)!, "previous.end");
|
|
26
|
+
if (at.length === 1 && position.relative) throw new Error("The first Timeline Take has no previous.end.");
|
|
27
|
+
assertEmptyElement(child);
|
|
28
|
+
const source = child.attributes.source;
|
|
29
|
+
if (typeof source !== "object" || source.kind !== "reference") throw new Error("Timeline Take source must be a reference.");
|
|
30
|
+
const resolved = resolveReference(source.path);
|
|
31
|
+
if (resolved === undefined || !sameType(resolved.type, speechTypes.semanticTake)) throw new Error("Timeline Take source must be a SemanticTake.");
|
|
32
|
+
return [resolved];
|
|
33
|
+
});
|
|
34
|
+
const inputs = takes.map((_, index) => ({ takeName: `take-${index + 1}` }));
|
|
35
|
+
const fragment = createTimelineAuthorFragment({ takes: inputs });
|
|
36
|
+
return {
|
|
37
|
+
records: [{ id: `${id}.header`, type: timelineAuthorTypes.header, value: { kind: "inline", value: { id, at, ...(element.attributes.end === undefined ? {} : { end: textAttribute(element, "end") }) } }, range: element.range }],
|
|
38
|
+
fragments: [fragment],
|
|
39
|
+
components: [{ id, fragment: fragment.id, inputs: {
|
|
40
|
+
clock: clock.ref,
|
|
41
|
+
header: { kind: "record", id: `${id}.header` },
|
|
42
|
+
...Object.fromEntries(takes.map((take, index) => [inputs[index]!.takeName, take.ref])),
|
|
43
|
+
}, outputs: { timeline: `${id}.timeline` }, range: element.range }],
|
|
44
|
+
exports: [`${id}.timeline`],
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SemanticTake } from "@hypit/speech";
|
|
2
|
+
export type TimelineAuthorHeader = { readonly id: string; readonly at?: readonly string[]; readonly end?: string };
|
|
3
|
+
export type TimelineAuthorTake = { readonly semantic: SemanticTake };
|
|
4
|
+
export type TimelineAuthorSet = { readonly takes: readonly TimelineAuthorTake[] };
|
|
5
|
+
export type TimelineAuthorInput = { readonly takeName: string };
|
|
6
|
+
export type TimelineAuthorFragmentOptions = { readonly takes: readonly TimelineAuthorInput[] };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# `@hypit/typography-track`
|
|
2
2
|
|
|
3
|
-
The Track Surface accepts `
|
|
4
|
-
|
|
3
|
+
The Track Surface accepts `timeline={program.timeline}`. The same Timeline supports authored
|
|
4
|
+
positions and, where prepared Takes supply evidence, Script Selections and Moments. Shared `at`
|
|
5
5
|
inputs accept a Moment or a time such as `2s`; `at` with `for` produces a Window where required.
|
|
6
6
|
|
|
7
7
|
Place independently authored titles, labels, verdicts and other text in the video. Their lifetime
|
|
8
8
|
can follow a Script Selection or Moment even when their wording differs from the speech. For words
|
|
9
9
|
displayed as they are spoken, use a [Caption family](../caption-fine/README.md).
|
|
10
10
|
|
|
11
|
-
The Track takes
|
|
11
|
+
The Track takes the shared `timeline`. Items use explicit Point, Frame or Path
|
|
12
12
|
placement, exact fonts and Styles. Timing can follow a Segment, Selection, Moment with duration, the
|
|
13
13
|
whole program or explicit clock expressions. `.program` describes the text presentation; `.track`
|
|
14
14
|
is the VisualTrack to include in Film. Each item has its own lifetime and stacking order.
|
|
@@ -26,7 +26,7 @@ Content has two explicit author forms:
|
|
|
26
26
|
|
|
27
27
|
<copy:Value id="headline-copy">A useful idea, clearly shown.</copy:Value>
|
|
28
28
|
|
|
29
|
-
<typo:Track id="titles"
|
|
29
|
+
<typo:Track id="titles" timeline={speech.timeline}>
|
|
30
30
|
<typo:Area id="headline" content={headline-copy}
|
|
31
31
|
placement={layout.headline} style={title-style} during="program"/>
|
|
32
32
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@hypit/narrative": "workspace:*",
|
|
19
19
|
"@hypit/protocol": "workspace:*",
|
|
20
20
|
"@hypit/program-space": "workspace:*",
|
|
21
|
-
"@hypit/
|
|
21
|
+
"@hypit/timeline": "workspace:*",
|
|
22
22
|
"@hypit/spatial": "workspace:*",
|
|
23
23
|
"@hypit/svs": "workspace:*",
|
|
24
24
|
"@hypit/temporal": "workspace:*",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import type { ComponentPackage } from "@hypit/component-kit";
|
|
2
|
-
import type { ProgramSpace } from "@hypit/program-space";
|
|
3
3
|
import type { CompositableSurfaceRef } from "@hypit/media";
|
|
4
4
|
import type { SpatialFrame, SpatialPath, SpatialPoint } from "@hypit/spatial";
|
|
5
5
|
import type { StoredValue } from "@hypit/protocol";
|
|
@@ -58,7 +58,7 @@ export const typographyTrackComponent = {
|
|
|
58
58
|
handler: ({ inputs }) => ({ outputs: { set: output(appendProjectedTextItem(
|
|
59
59
|
inline<TypographyTrackSet>(inputs.set?.value, "TypographyTrackSet"),
|
|
60
60
|
inline<TypographyTrackHeader>(inputs.header?.value, "TypographyTrackHeader"),
|
|
61
|
-
inline<
|
|
61
|
+
inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
62
62
|
inline<TextPlacement>(inputs.placement?.value, "TextPlacement"),
|
|
63
63
|
inline<TextItemSpec>(inputs.spec?.value, "TextItemSpec"),
|
|
64
64
|
inline<TextStyle>(inputs.style?.value, "TextStyle"),
|
|
@@ -76,14 +76,14 @@ export const typographyTrackComponent = {
|
|
|
76
76
|
{
|
|
77
77
|
producer: typographyTrackProducers.render,
|
|
78
78
|
handler: ({ inputs }) => ({ outputs: { track: output(renderTypographyTrack(
|
|
79
|
-
inline<
|
|
79
|
+
inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
80
80
|
inline<TypographyTrackProgram>(inputs.program?.value, "TypographyTrackProgram"),
|
|
81
81
|
)) }, needs: {} }),
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
producer: typographyTrackProducers.renderMask,
|
|
85
85
|
handler: ({ inputs }) => ({ outputs: { track: output(renderTextMaskTrack(
|
|
86
|
-
inline<
|
|
86
|
+
inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
87
87
|
inline<TypographyTrackProgram>(inputs.program?.value, "TypographyTrackProgram"),
|
|
88
88
|
inline<CompositableSurfaceRef>(inputs.material?.value, "CompositableSurfaceRef"),
|
|
89
89
|
inline<TextMaskSpec>(inputs.spec?.value, "TextMaskSpec"),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
2
|
+
|
|
2
3
|
import { compositionTypes } from "@hypit/composition";
|
|
3
4
|
import type { VisualTrack } from "@hypit/composition";
|
|
4
5
|
import { sealGraphFragment } from "@hypit/elaborator";
|
|
@@ -11,14 +12,14 @@ const operation = (id: string) => ({ kind: "fragment-operation" as const, operat
|
|
|
11
12
|
/** Provider-free official lowering from TypographyTrackProgram to one peer VisualTrack. */
|
|
12
13
|
export const typographyTrackFragment = sealGraphFragment({
|
|
13
14
|
inputs: [
|
|
14
|
-
{ name: "
|
|
15
|
+
{ name: "timeline", type: timelineTypes.track },
|
|
15
16
|
{ name: "program", type: typographyTrackTypes.program },
|
|
16
17
|
],
|
|
17
18
|
operations: [
|
|
18
19
|
{
|
|
19
20
|
id: "render",
|
|
20
21
|
producer: typographyTrackProducers.render,
|
|
21
|
-
inputs: {
|
|
22
|
+
inputs: { timeline: input("timeline"), program: input("program") },
|
|
22
23
|
result: { kind: "output", name: "track" },
|
|
23
24
|
},
|
|
24
25
|
],
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
2
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
3
|
import { temporalContextAttributeVocabulary } from "@hypit/temporal-markup";
|
|
2
4
|
import { readFile } from "node:fs/promises";
|
|
3
5
|
|
|
4
6
|
import { narrativeDependency } from "@hypit/narrative";
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
+
|
|
8
|
+
import { timelineDependency } from "@hypit/timeline";
|
|
7
9
|
import {
|
|
8
10
|
compositionDependency,
|
|
9
11
|
compositionTypes,
|
|
@@ -423,7 +425,7 @@ export const typographyTrackMarkupSurfaces = [
|
|
|
423
425
|
},
|
|
424
426
|
{ name: "track", tag: "Track", mode: "structured", outputs: [typographyTrackTypes.header, typographyTrackTypes.itemSpec, typographyTrackTypes.plainItemSpec, typographyTrackTypes.motion, typographyTrackTypes.set, typographyTrackTypes.placement, temporalTypes.instantSpec, temporalTypes.windowSpec, temporalTypes.instant, temporalTypes.window, typographyTrackTypes.program, compositionTypes.visualTrack],
|
|
425
427
|
vocabulary: {
|
|
426
|
-
summary: "One Typography Track: independently placed and timed text items on a shared
|
|
428
|
+
summary: "One Typography Track: independently placed and timed text items on a shared Timeline, lowered to one addressable TypographyTrackProgram and one peer VisualTrack.",
|
|
427
429
|
appearance: "Text alone on an otherwise empty Canvas: the glyphs, plus whatever Paint the Style puts around them — fills, outlines, glows, shadows and rounded, bordered, optionally tailed boxes drawn behind the frame, paragraph, line, run, word or grapheme. Each item holds its own region of the Canvas: a Point item is one unwrapped block that hugs its text and hangs off a single coordinate by its inline and block anchors, an Area item flows and wraps inside a rectangle under its own alignment, columns, clipping and overflow, and a Path item strings the glyphs along a curve, on one side of it, turning with it or standing upright. Items switch on and off at their own frame windows and overlap in the stacking order their Styles declare, so titles, labels and captions can occupy different corners at once and outlast or outlive one another. While an item is on screen it plays its Motion: the whole block translating, scaling, rotating, skewing, fading, blurring, recoloring or wiping open from an edge, and its paragraphs, lines, runs, words or graphemes arriving one behind another in a staggered run.",
|
|
428
430
|
preview: previewImage("Track.png"),
|
|
429
431
|
attributes: [
|
|
@@ -475,7 +477,7 @@ export const typographyTrackMarkupSurfaces = [
|
|
|
475
477
|
{ name: "track", type: compositionTypes.visualTrack,
|
|
476
478
|
summary: "The rendered text, an ordinary peer VisualTrack." },
|
|
477
479
|
],
|
|
478
|
-
example: `<text:Track id="titles"
|
|
480
|
+
example: `<text:Track id="titles" timeline={speech.timeline}>
|
|
479
481
|
<text:Area id="title" placement={title-frame} style={title-style} during="program">
|
|
480
482
|
EDIT MEANING, NOT TIMELINES
|
|
481
483
|
</text:Area>
|
|
@@ -514,7 +516,7 @@ export const typographyTrackMarkupSurfaces = [
|
|
|
514
516
|
{ name: "track", type: compositionTypes.visualTrack,
|
|
515
517
|
summary: "The masked picture, an ordinary peer VisualTrack." },
|
|
516
518
|
],
|
|
517
|
-
example: `<text:Mask id="masked-titles"
|
|
519
|
+
example: `<text:Mask id="masked-titles" timeline={speech.timeline} text={mask-shape.program} material={material}/>`,
|
|
518
520
|
notes: [
|
|
519
521
|
"A Mask is written empty and accepts no children.",
|
|
520
522
|
"The material must be a still Surface; a timed material is refused and materializes through an independent package.",
|
|
@@ -529,7 +531,7 @@ export const typographyTrackManifest: ModuleManifest = {
|
|
|
529
531
|
format: "hypit.module@1",
|
|
530
532
|
name: typographyTrackModuleRef.name,
|
|
531
533
|
version: typographyTrackModuleRef.version,
|
|
532
|
-
dependencies: [narrativeDependency,
|
|
534
|
+
dependencies: [narrativeDependency, timelineDependency, spatialDependency, mediaDependency, compositionDependency, textDependency, temporalDependency],
|
|
533
535
|
types: [
|
|
534
536
|
{ name: typographyTrackTypes.style.name },
|
|
535
537
|
{ name: typographyTrackTypes.motion.name },
|
|
@@ -548,9 +550,9 @@ export const typographyTrackManifest: ModuleManifest = {
|
|
|
548
550
|
{ name: typographyTrackProducers.bindArea.name, inputs: [{ name: "frame", type: spatialTypes.frame }], outputs: [{ name: "placement", type: typographyTrackTypes.placement }], needs: [] },
|
|
549
551
|
{ name: typographyTrackProducers.bindPath.name, inputs: [{ name: "path", type: spatialTypes.path }], outputs: [{ name: "placement", type: typographyTrackTypes.placement }], needs: [] },
|
|
550
552
|
{ name: typographyTrackProducers.createSet.name, inputs: [], outputs: [{ name: "set", type: typographyTrackTypes.set }], needs: [] },
|
|
551
|
-
{ name: typographyTrackProducers.appendItem.name, inputs: [{ name: "set", type: typographyTrackTypes.set }, { name: "header", type: typographyTrackTypes.header }, { name: "
|
|
553
|
+
{ name: typographyTrackProducers.appendItem.name, inputs: [{ name: "set", type: typographyTrackTypes.set }, { name: "header", type: typographyTrackTypes.header }, { name: "timeline", type: timelineTypes.track }, { name: "placement", type: typographyTrackTypes.placement }, { name: "spec", type: typographyTrackTypes.itemSpec }, { name: "style", type: typographyTrackTypes.style }, { name: "motion", type: typographyTrackTypes.motion }, { name: "window", type: temporalTypes.window }], outputs: [{ name: "set", type: typographyTrackTypes.set }], needs: [] },
|
|
552
554
|
{ name: typographyTrackProducers.finalize.name, inputs: [{ name: "header", type: typographyTrackTypes.header }, { name: "set", type: typographyTrackTypes.set }], outputs: [{ name: "program", type: typographyTrackTypes.program }], needs: [] },
|
|
553
|
-
{ name: typographyTrackProducers.render.name, inputs: [{ name: "
|
|
554
|
-
{ name: typographyTrackProducers.renderMask.name, inputs: [{ name: "
|
|
555
|
+
{ name: typographyTrackProducers.render.name, inputs: [{ name: "timeline", type: timelineTypes.track }, { name: "program", type: typographyTrackTypes.program }], outputs: [{ name: "track", type: compositionTypes.visualTrack }], needs: [] },
|
|
556
|
+
{ name: typographyTrackProducers.renderMask.name, inputs: [{ name: "timeline", type: timelineTypes.track }, { name: "program", type: typographyTrackTypes.program }, { name: "material", type: mediaTypes.compositableSurface }, { name: "spec", type: typographyTrackTypes.maskSpec }], outputs: [{ name: "track", type: compositionTypes.visualTrack }], needs: [] },
|
|
555
557
|
],
|
|
556
558
|
};
|