@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
|
@@ -2,10 +2,16 @@ import { canonicalize } from "@hypit/protocol";
|
|
|
2
2
|
import type { BlobRef, CanonicalValue, CapabilityRef } from "@hypit/protocol";
|
|
3
3
|
|
|
4
4
|
import { isMediaPort } from "./ports.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { GenerationMediaValue, GenerationPortTable } from "./ports.js";
|
|
6
6
|
import { presentPorts } from "./request.js";
|
|
7
7
|
import type { GenerationRequest } from "./request.js";
|
|
8
8
|
|
|
9
|
+
/** Per-reference fields consumed by the service's resource transport rather than its generation body. */
|
|
10
|
+
export type GenerationArtifactUrlResolver = (
|
|
11
|
+
artifact: BlobRef,
|
|
12
|
+
fields?: Readonly<Record<string, string | number | boolean>>,
|
|
13
|
+
) => Promise<string>;
|
|
14
|
+
|
|
9
15
|
/**
|
|
10
16
|
* How one service names the fields of one model's declared input ports.
|
|
11
17
|
*
|
|
@@ -13,8 +19,6 @@ import type { GenerationRequest } from "./request.js";
|
|
|
13
19
|
* Provider package therefore never imports a model package: the model owns what
|
|
14
20
|
* it eats, the service owns what it calls that on the wire.
|
|
15
21
|
*/
|
|
16
|
-
export type GenerationArtifactUrlResolver = (artifact: BlobRef) => Promise<string>;
|
|
17
|
-
|
|
18
22
|
export type GenerationFieldMapping =
|
|
19
23
|
/** One scalar written as-is. */
|
|
20
24
|
| { readonly as: "value"; readonly field: string; readonly whenAbsent?: CanonicalValue }
|
|
@@ -23,14 +27,15 @@ export type GenerationFieldMapping =
|
|
|
23
27
|
/** Several scalars written as one array. */
|
|
24
28
|
| { readonly as: "valueArray"; readonly field: string; readonly whenAbsent?: CanonicalValue }
|
|
25
29
|
/** One media item written as a resolved URL. */
|
|
26
|
-
| { readonly as: "url"; readonly field: string; readonly whenAbsent?: CanonicalValue }
|
|
30
|
+
| { readonly as: "url"; readonly field: string; readonly resourceFields?: readonly string[]; readonly whenAbsent?: CanonicalValue }
|
|
27
31
|
/** Several media items written as one array of resolved URLs. */
|
|
28
|
-
| { readonly as: "urlArray"; readonly field: string; readonly whenAbsent?: CanonicalValue }
|
|
32
|
+
| { readonly as: "urlArray"; readonly field: string; readonly resourceFields?: readonly string[]; readonly whenAbsent?: CanonicalValue }
|
|
29
33
|
/** Media items written as objects carrying the resolved URL and their item fields. */
|
|
30
34
|
| {
|
|
31
35
|
readonly as: "itemObject";
|
|
32
36
|
readonly field: string;
|
|
33
37
|
readonly urlKey: string;
|
|
38
|
+
readonly resourceFields?: readonly string[];
|
|
34
39
|
readonly fieldKeys: Readonly<Record<string, string>>;
|
|
35
40
|
readonly whenAbsent?: CanonicalValue;
|
|
36
41
|
};
|
|
@@ -95,11 +100,9 @@ export function selectWireModelForRequest(
|
|
|
95
100
|
return selectWireModel(mapping, present);
|
|
96
101
|
}
|
|
97
102
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
): Promise<string[]> {
|
|
102
|
-
return await Promise.all(values.map((item) => resolve(item.artifact)));
|
|
103
|
+
function resourceFields(item: GenerationMediaValue, names: readonly string[] = []) {
|
|
104
|
+
return Object.fromEntries(names.filter((name) => item.fields?.[name] !== undefined)
|
|
105
|
+
.map((name) => [name, item.fields![name]!]));
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
/**
|
|
@@ -127,13 +130,15 @@ export async function compileWireRequest(
|
|
|
127
130
|
} else if (field.as === "valueArray") {
|
|
128
131
|
input[field.field] = supplied as readonly CanonicalValue[];
|
|
129
132
|
} else if (field.as === "url") {
|
|
130
|
-
|
|
133
|
+
const item = supplied[0] as GenerationMediaValue;
|
|
134
|
+
input[field.field] = await resolve(item.artifact, resourceFields(item, field.resourceFields));
|
|
131
135
|
} else if (field.as === "urlArray") {
|
|
132
|
-
input[field.field] = await
|
|
136
|
+
input[field.field] = await Promise.all((supplied as readonly GenerationMediaValue[])
|
|
137
|
+
.map((item) => resolve(item.artifact, resourceFields(item, field.resourceFields))));
|
|
133
138
|
} else {
|
|
134
139
|
const media = supplied as readonly GenerationMediaValue[];
|
|
135
140
|
input[field.field] = await Promise.all(media.map(async (item) => ({
|
|
136
|
-
[field.urlKey]: await resolve(item.artifact),
|
|
141
|
+
[field.urlKey]: await resolve(item.artifact, resourceFields(item, field.resourceFields)),
|
|
137
142
|
...Object.fromEntries(Object.entries(field.fieldKeys)
|
|
138
143
|
.filter(([source]) => item.fields?.[source] !== undefined)
|
|
139
144
|
.map(([source, target]) => [target, item.fields![source] as CanonicalValue])),
|
|
@@ -178,30 +183,23 @@ export function assertMappingCoversPorts(
|
|
|
178
183
|
if (isMediaPort(port)) {
|
|
179
184
|
const media = port.value;
|
|
180
185
|
const itemFields = media.itemFields ?? [];
|
|
181
|
-
|
|
182
|
-
assert(field.as === "itemObject", `${subject} must use itemObject because the port carries item fields`);
|
|
183
|
-
for (const item of itemFields) {
|
|
184
|
-
if (item.optional === true) continue;
|
|
185
|
-
assert(field.fieldKeys[item.name] !== undefined,
|
|
186
|
-
`${subject} does not map required item field ${item.name}`);
|
|
187
|
-
}
|
|
188
|
-
Object.keys(field.fieldKeys).forEach((name) => assert(
|
|
189
|
-
itemFields.some((item) => item.name === name),
|
|
190
|
-
`${subject} maps unknown item field ${name}`,
|
|
191
|
-
));
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
assert(media.accepts.length === 1,
|
|
186
|
+
assert(itemFields.length > 0 || media.accepts.length === 1,
|
|
195
187
|
`${subject} accepts ${media.accepts.join(", ")}; declare one port per media role so each maps to one wire field`);
|
|
196
188
|
assert(field.as === "url" || field.as === "urlArray" || field.as === "itemObject",
|
|
197
189
|
`${subject} must resolve media to a URL`);
|
|
198
190
|
if (field.as === "url") {
|
|
199
191
|
assert(port.maxItems === 1, `${subject} uses url but the port accepts up to ${port.maxItems} items`);
|
|
200
192
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
193
|
+
const mappedFields = [
|
|
194
|
+
...(field.resourceFields ?? []),
|
|
195
|
+
...(field.as === "itemObject" ? Object.keys(field.fieldKeys) : []),
|
|
196
|
+
];
|
|
197
|
+
for (const item of itemFields) {
|
|
198
|
+
if (item.optional !== true) assert(mappedFields.includes(item.name),
|
|
199
|
+
`${subject} does not map required item field ${item.name}`);
|
|
204
200
|
}
|
|
201
|
+
for (const name of mappedFields) assert(itemFields.some((item) => item.name === name),
|
|
202
|
+
`${subject} maps unknown item field ${name}`);
|
|
205
203
|
continue;
|
|
206
204
|
}
|
|
207
205
|
if (port.maxItems > 1) {
|
|
@@ -5,8 +5,7 @@ Exact model/compute contracts for GPT Image 2 requests.
|
|
|
5
5
|
One closed Port Table accepts the supported scalar settings and optional reference images. Runtime-
|
|
6
6
|
produced references remain explicit Blob edges: the model-owned Draft is bound one edge at a time,
|
|
7
7
|
then finalized into the only `GenerationRequest` a Provider can receive. The package owns model
|
|
8
|
-
semantics but no API key, Provider selection, queue or network code.
|
|
9
|
-
one optional Runtime implementation.
|
|
8
|
+
semantics but no API key, Provider selection, queue or network code. The selected Provider implements its exact capability.
|
|
10
9
|
|
|
11
10
|
Provider-specific combination limits are checked by that Provider before any paid operation. They
|
|
12
11
|
do not narrow this model-owned vocabulary or leak into author source.
|
|
@@ -4,8 +4,7 @@ Exact author/compute contracts and package-owned author Surfaces for Grok Imagin
|
|
|
4
4
|
|
|
5
5
|
It exposes the standard and 1.5-preview models as distinct Surfaces. Each request is nominally typed and
|
|
6
6
|
validated before yielding an ordinary video Artifact. The package declares the model
|
|
7
|
-
choice; it does not route to another model or access a Provider.
|
|
8
|
-
optional Runtime implementation.
|
|
7
|
+
choice; it does not route to another model or access a Provider. The selected Provider implements its exact capability.
|
|
9
8
|
|
|
10
9
|
```xml
|
|
11
10
|
<grok:Video id="clip" prompt={prompt} duration="6" aspect-ratio="9:16" resolution="720p">
|
|
@@ -55,13 +55,17 @@ This keeps actual video available to the renderer's exact source-frame preparati
|
|
|
55
55
|
CSS is scoped to the generated program root with `@scope`; `:scope` styles that root. The HTML can
|
|
56
56
|
contain arbitrary local structure, SVG, internal stacking, masks and backdrop filters. The optional
|
|
57
57
|
`setup` string is a JavaScript function body with `root` and `data` arguments. It returns a synchronous
|
|
58
|
-
`render(localFrame)` function, evaluated on initial load and
|
|
59
|
-
|
|
58
|
+
`render(localFrame)` function, evaluated on initial load and active `hf-seek` events. Outside the
|
|
59
|
+
Present's lifetime, the dispatcher settles the boundary pose once instead of repeatedly updating
|
|
60
|
+
an invisible program. Active seeks always redraw, including the same frame after resources become
|
|
61
|
+
ready, and seeking back into the Present computes its requested pose directly. Prepare stable
|
|
62
|
+
objects in `setup`; express animation state as a function of frame and inputs so any worker can
|
|
63
|
+
begin at any frame. Async work belongs to
|
|
60
64
|
material preparation before rendering; browser resources belong in the program's declared artifacts.
|
|
61
65
|
Use `hyperframesResourceUri(artifact.resource)` in resource-bearing markup or CSS.
|
|
62
66
|
|
|
63
67
|
Ordinary child sampling follows the Present clock. Reframing the parent leaves source playback
|
|
64
|
-
unchanged. `
|
|
68
|
+
unchanged. `projectTimelineMedia` from `@hypit/hypit/timeline` gives a component selected prepared
|
|
65
69
|
clips with their exact program and source spans. Speech audio is an independently selected Track.
|
|
66
70
|
|
|
67
71
|
`program.format` is explicit: this backend reports an unsupported format rather than interpreting
|
|
@@ -63,13 +63,22 @@ export function browserProgramScript(entries: readonly {
|
|
|
63
63
|
const render = entry.program.setup === undefined ? () => {} :
|
|
64
64
|
new Function('root', 'data', entry.program.setup)(root, entry.program.data);
|
|
65
65
|
if (typeof render !== 'function') throw new Error('Browser program setup must return render(localFrame).');
|
|
66
|
-
return { ...entry, render };
|
|
66
|
+
return { ...entry, render, region: undefined };
|
|
67
67
|
} catch (error) { fail(error); return { ...entry, render: () => {} }; }
|
|
68
68
|
});
|
|
69
69
|
const apply = time => {
|
|
70
70
|
const frame = Math.round(Number(time || 0) * ${numerator} / ${denominator});
|
|
71
71
|
for (const entry of renders) {
|
|
72
|
-
|
|
72
|
+
const local = frame - entry.startFrame;
|
|
73
|
+
const region = local < 0 ? 'before' : local >= entry.durationFrames ? 'after' : 'active';
|
|
74
|
+
// Preserve the initial/boundary pose, but stop updating an invisible
|
|
75
|
+
// program at the same clamped endpoint. Active seeks always render,
|
|
76
|
+
// including repeated frame 0 after images/fonts finish loading.
|
|
77
|
+
if (region !== 'active' && entry.region === region) continue;
|
|
78
|
+
try {
|
|
79
|
+
entry.render(Math.max(0, Math.min(entry.durationFrames, local)));
|
|
80
|
+
entry.region = region;
|
|
81
|
+
}
|
|
73
82
|
catch (error) { fail(error); }
|
|
74
83
|
}
|
|
75
84
|
};
|
|
@@ -461,7 +461,7 @@ function renderVisualPresent(
|
|
|
461
461
|
emittedFilterIds,
|
|
462
462
|
stableId,
|
|
463
463
|
});
|
|
464
|
-
return `<div class="clip hypit-visual-present" data-hypit-track-id="${escapeHtml(track.id)}" data-hypit-present-id="${escapeHtml(present.id)}" data-hypit-stack-order="${present.stacking.order}" data-hypit-stack-tie="${escapeHtml(present.stacking.tieBreak)}" data-track-index="${stackIndex}" data-start="${start}" data-duration="${duration}" style="position:absolute;inset:0;z-index:${stackIndex};overflow:hidden;pointer-events:none">${contents}</div>`;
|
|
464
|
+
return `<div class="clip hypit-visual-present" data-hypit-track-id="${escapeHtml(track.id)}" data-hypit-present-id="${escapeHtml(present.id)}" data-hypit-stack-order="${present.stacking.order}" data-hypit-stack-tie="${escapeHtml(present.stacking.tieBreak)}" data-track-index="${stackIndex}" data-start="${start}" data-duration="${duration}" style="position:absolute;inset:0;z-index:${stackIndex};overflow:hidden;pointer-events:none">${present.visibility === undefined ? contents : `<div data-hypit-visibility="${escapeHtml(JSON.stringify(present.visibility))}" style="position:absolute;inset:0">${contents}</div>`}</div>`;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
function renderAnimationRules(track: VisualTrack, present: VisualPresent, stableId: StableDomId): string[] {
|
|
@@ -667,6 +667,18 @@ function emitHtml(composition: Composition, programSpace: ProgramSpace): string
|
|
|
667
667
|
}]));
|
|
668
668
|
const programCss = programs.map(entry => `@scope (#${entry.id}) { ${entry.program.css ?? ""} }`).join("\n");
|
|
669
669
|
const programRuntime = programs.length === 0 ? "" : `<script>${browserProgramScript(programs, numerator, denominator)}</script>`;
|
|
670
|
+
const visibilityRuntime = visuals.some(({ present }) => present.visibility !== undefined) ? `<script>
|
|
671
|
+
(() => {
|
|
672
|
+
const entries = [...document.querySelectorAll('[data-hypit-visibility]')].map(element => ({ element, spans: JSON.parse(element.dataset.hypitVisibility) }));
|
|
673
|
+
const apply = time => {
|
|
674
|
+
const frame = Math.round(Number(time || 0) * ${numerator} / ${denominator});
|
|
675
|
+
// A presentation mask controls painting, not layout or animation existence.
|
|
676
|
+
// display:none removes CSS animations and prevents hidden text from being measured.
|
|
677
|
+
for (const { element, spans } of entries) element.style.opacity = spans.some(s => frame >= s.startFrame && frame < s.endFrameExclusive) ? '' : '0';
|
|
678
|
+
};
|
|
679
|
+
apply(0);
|
|
680
|
+
window.addEventListener('hf-seek', event => apply(event.detail?.time));
|
|
681
|
+
})();</script>` : "";
|
|
670
682
|
const duration = frameSeconds(programSpaceFrameCount(programSpace), numerator, denominator);
|
|
671
683
|
const fps = fpsRational(numerator, denominator);
|
|
672
684
|
const frameCount = programSpaceFrameCount(programSpace);
|
|
@@ -693,7 +705,8 @@ function emitHtml(composition: Composition, programSpace: ProgramSpace): string
|
|
|
693
705
|
<body>
|
|
694
706
|
<div data-composition-id="${escapeHtml(composition.id)}" data-start="0" data-no-timeline data-width="${composition.canvas.width}" data-height="${composition.canvas.height}" data-duration="${duration}" data-fps="${fps}" data-hypit-frame-count="${frameCount}">
|
|
695
707
|
${visualHtml}
|
|
696
|
-
</div>${programRuntime}
|
|
708
|
+
</div>${programRuntime}
|
|
709
|
+
${visibilityRuntime}${animationRuntime}${textRuntime}
|
|
697
710
|
</body>
|
|
698
711
|
</html>
|
|
699
712
|
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Emoji Reveal
|
|
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
|
Reusable Hypit author vocabulary for a top-of-frame icon answer strip.
|
|
@@ -21,7 +21,7 @@ answers remain and later slots remain unanswered.
|
|
|
21
21
|
|
|
22
22
|
<emoji:Style id="emoji-strip" recipe={styles.emoji-strip}/>
|
|
23
23
|
|
|
24
|
-
<emoji:Track id="rules"
|
|
24
|
+
<emoji:Track id="rules" timeline={speech.timeline} canvas={vertical}
|
|
25
25
|
style={emoji-strip} placeholder={question-icon} during="program">
|
|
26
26
|
<emoji:Item id="manifest" icon={manifest-icon} preset="true"/>
|
|
27
27
|
<emoji:Item id="real-estate" icon={real-estate-icon} at={story.moment.real-estate}/>
|
|
@@ -30,7 +30,7 @@ answers remain and later slots remain unanswered.
|
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
`Selection`, `Segment`, numeric instants and a `boundary` fallback are deliberately not part of an
|
|
33
|
-
Item's vocabulary. The component consumes
|
|
33
|
+
Item's vocabulary. The component consumes the shared `Timeline`, the projected outer Window and the
|
|
34
34
|
projected Instants; it does not interpret Script semantics itself and has no Studio dependency.
|
|
35
35
|
|
|
36
36
|
The bundled preview icons come from [Tabler Icons](https://tabler.io/icons), distributed under the
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@hypit/narrative": "workspace:*",
|
|
15
15
|
"@hypit/program-space": "workspace:*",
|
|
16
16
|
"@hypit/protocol": "workspace:*",
|
|
17
|
-
"@hypit/
|
|
17
|
+
"@hypit/timeline": "workspace:*",
|
|
18
18
|
"@hypit/spatial": "workspace:*",
|
|
19
19
|
"@hypit/svs": "workspace:*",
|
|
20
20
|
"@hypit/temporal": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import type { ComponentPackage } from "@hypit/component-kit";
|
|
2
3
|
import { canonicalize } from "@hypit/protocol";
|
|
3
4
|
import type { BlobRef, StoredValue } from "@hypit/protocol";
|
|
4
|
-
import type { ProgramSpace } from "@hypit/program-space";
|
|
5
5
|
import type { CanvasSpace } from "@hypit/spatial";
|
|
6
6
|
import type { TemporalInstant, TemporalWindow } from "@hypit/temporal";
|
|
7
7
|
|
|
@@ -23,7 +23,7 @@ export const emojiRevealComponent = {
|
|
|
23
23
|
producers: [
|
|
24
24
|
{ producer: emojiRevealProducers.createSet, handler: () => ({ outputs: { set: output(createEmojiRevealSet()) }, needs: {} }) },
|
|
25
25
|
{ producer: emojiRevealProducers.appendItem, handler: ({ inputs }) => ({ outputs: { set: output(appendEmojiRevealItem(
|
|
26
|
-
inline<EmojiRevealSet>(inputs.set?.value, "EmojiRevealSet"), inline<
|
|
26
|
+
inline<EmojiRevealSet>(inputs.set?.value, "EmojiRevealSet"), inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
27
27
|
inline<EmojiRevealItemSpec>(inputs.spec?.value, "EmojiRevealItemSpec"), blob(inputs.icon?.value, "Emoji Reveal icon"),
|
|
28
28
|
inline<TemporalInstant>(inputs.activation?.value, "TemporalInstant"),
|
|
29
29
|
)) }, needs: {} }) },
|
|
@@ -32,12 +32,12 @@ export const emojiRevealComponent = {
|
|
|
32
32
|
inline<EmojiRevealItemSpec>(inputs.spec?.value, "EmojiRevealItemSpec"), blob(inputs.icon?.value, "Emoji Reveal icon"),
|
|
33
33
|
)) }, needs: {} }) },
|
|
34
34
|
{ producer: emojiRevealProducers.finalize, handler: ({ inputs }) => ({ outputs: { program: output(finalizeEmojiReveal(
|
|
35
|
-
inline<EmojiRevealHeader>(inputs.header?.value, "EmojiRevealHeader"), inline<
|
|
35
|
+
inline<EmojiRevealHeader>(inputs.header?.value, "EmojiRevealHeader"), inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
36
36
|
inline<TemporalWindow>(inputs.outer?.value, "TemporalWindow"), inline<EmojiRevealStyle>(inputs.style?.value, "EmojiRevealStyle"),
|
|
37
37
|
blob(inputs.placeholder?.value, "Emoji Reveal placeholder"), inline<EmojiRevealSet>(inputs.set?.value, "EmojiRevealSet"),
|
|
38
38
|
)) }, needs: {} }) },
|
|
39
39
|
{ producer: emojiRevealProducers.render, handler: ({ inputs }) => ({ outputs: { track: output(renderEmojiReveal(
|
|
40
|
-
inline<CanvasSpace>(inputs.canvas?.value, "CanvasSpace"), inline<
|
|
40
|
+
inline<CanvasSpace>(inputs.canvas?.value, "CanvasSpace"), inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
41
41
|
inline<EmojiRevealProgram>(inputs.program?.value, "EmojiRevealProgram"),
|
|
42
42
|
)) }, needs: {} }) },
|
|
43
43
|
],
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
2
|
+
|
|
2
3
|
import { compositionTypes } from "@hypit/composition";
|
|
3
4
|
import { artifactTypes } from "@hypit/artifact";
|
|
4
5
|
import { sealGraphFragment } from "@hypit/elaborator";
|
|
@@ -29,23 +30,23 @@ export function createEmojiRevealFragment(items: readonly EmojiRevealFragmentIte
|
|
|
29
30
|
: emojiRevealProducers.appendItem, inputs: {
|
|
30
31
|
set: operation(current), spec: input(item.specName), icon: input(item.iconName),
|
|
31
32
|
...(item.activationName === undefined ? {} : {
|
|
32
|
-
|
|
33
|
+
timeline: input("timeline"), activation: input(item.activationName),
|
|
33
34
|
}),
|
|
34
35
|
}, result: { kind: "output", name: "set" } });
|
|
35
36
|
current = id;
|
|
36
37
|
});
|
|
37
38
|
operations.push(
|
|
38
39
|
{ id: "emoji:program", producer: emojiRevealProducers.finalize, inputs: {
|
|
39
|
-
header: input("header"),
|
|
40
|
+
header: input("header"), timeline: input("timeline"), outer: input("outer"), style: input("style"),
|
|
40
41
|
placeholder: input("placeholder"), set: operation(current),
|
|
41
42
|
}, result: { kind: "output", name: "program" } },
|
|
42
43
|
{ id: "emoji:track", producer: emojiRevealProducers.render, inputs: {
|
|
43
|
-
canvas: input("canvas"),
|
|
44
|
+
canvas: input("canvas"), timeline: input("timeline"), program: operation("emoji:program"),
|
|
44
45
|
}, result: { kind: "output", name: "track" } },
|
|
45
46
|
);
|
|
46
47
|
return sealGraphFragment({
|
|
47
48
|
inputs: [
|
|
48
|
-
{ name: "header", type: emojiRevealTypes.header }, { name: "
|
|
49
|
+
{ name: "header", type: emojiRevealTypes.header }, { name: "timeline", type: timelineTypes.track },
|
|
49
50
|
{ name: "canvas", type: spatialTypes.canvas }, { name: "outer", type: temporalTypes.window }, { name: "style", type: emojiRevealTypes.style },
|
|
50
51
|
{ name: "placeholder", type: artifactTypes.blob },
|
|
51
52
|
...items.flatMap((item) => [
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
1
2
|
import { temporalContextAttributeVocabulary } from "@hypit/temporal-markup";
|
|
2
3
|
import { readFile } from "node:fs/promises";
|
|
3
4
|
|
|
4
5
|
import { artifactDependency, artifactTypes } from "@hypit/artifact";
|
|
5
6
|
import { compositionDependency, compositionTypes } from "@hypit/composition";
|
|
6
7
|
import { narrativeDependency, narrativeTypes } from "@hypit/narrative";
|
|
7
|
-
|
|
8
|
+
|
|
8
9
|
import type { ModuleManifest, ProducerRef, TypeRef, ValueSchema } from "@hypit/protocol";
|
|
9
|
-
import {
|
|
10
|
+
import { timelineDependency } from "@hypit/timeline";
|
|
10
11
|
import { spatialDependency, spatialTypes } from "@hypit/spatial";
|
|
11
12
|
import { svsRecipeType } from "@hypit/svs";
|
|
12
13
|
import { temporalDependency, temporalInstantSchema, temporalTypes, temporalWindowSchema } from "@hypit/temporal";
|
|
@@ -107,7 +108,7 @@ export const emojiRevealMarkupSurfaces = [
|
|
|
107
108
|
recipe: recipe.map(([name, fallback, summary]) => ({ name, required: false, fallback, summary })) },
|
|
108
109
|
],
|
|
109
110
|
example: `<emoji:Style id="emoji-strip" recipe={styles.emoji-strip}/>` ,
|
|
110
|
-
notes: ["The Style owns appearance and placement, but never
|
|
111
|
+
notes: ["The Style owns appearance and placement, but never event timing."],
|
|
111
112
|
} },
|
|
112
113
|
{ name: "track", tag: "Track", mode: "structured",
|
|
113
114
|
outputs: [emojiRevealTypes.header, emojiRevealTypes.itemSpec, temporalTypes.instantSpec, temporalTypes.windowSpec, temporalTypes.instant, temporalTypes.window, emojiRevealTypes.program, compositionTypes.visualTrack],
|
|
@@ -133,7 +134,7 @@ export const emojiRevealMarkupSurfaces = [
|
|
|
133
134
|
{ name: "program", type: emojiRevealTypes.program, summary: "The adaptive strip with its projected outer Window and fully traced Moment activations." },
|
|
134
135
|
{ name: "track", type: compositionTypes.visualTrack, summary: "That Program rendered as an ordinary VisualTrack." },
|
|
135
136
|
],
|
|
136
|
-
example: `<emoji:Track id="rules"
|
|
137
|
+
example: `<emoji:Track id="rules" timeline={speech.timeline} canvas={vertical} style={emoji-strip} placeholder={question-icon} during="program">
|
|
137
138
|
<emoji:Item id="manifest" icon={manifest-icon} preset="true"/>
|
|
138
139
|
<emoji:Item id="real-estate" icon={real-estate-icon} at={story.moment.real-estate}/>
|
|
139
140
|
<emoji:Item id="bitcoin" icon={bitcoin-icon} at={story.moment.bitcoin}/>
|
|
@@ -148,7 +149,7 @@ export const emojiRevealMarkupSurfaces = [
|
|
|
148
149
|
|
|
149
150
|
export const emojiRevealManifest: ModuleManifest = {
|
|
150
151
|
format: "hypit.module@1", name: emojiRevealModuleRef.name, version: emojiRevealModuleRef.version,
|
|
151
|
-
dependencies: [artifactDependency, narrativeDependency,
|
|
152
|
+
dependencies: [artifactDependency, narrativeDependency, timelineDependency, spatialDependency, temporalDependency, compositionDependency],
|
|
152
153
|
types: [
|
|
153
154
|
{ name: emojiRevealTypes.header.name }, { name: emojiRevealTypes.style.name },
|
|
154
155
|
{ name: emojiRevealTypes.itemSpec.name }, { name: emojiRevealTypes.set.name }, { name: emojiRevealTypes.program.name },
|
|
@@ -157,16 +158,16 @@ export const emojiRevealManifest: ModuleManifest = {
|
|
|
157
158
|
producers: [
|
|
158
159
|
{ name: emojiRevealProducers.createSet.name, inputs: [], outputs: [{ name: "set", type: emojiRevealTypes.set }], needs: [] },
|
|
159
160
|
{ name: emojiRevealProducers.appendItem.name,
|
|
160
|
-
inputs: [{ name: "set", type: emojiRevealTypes.set }, { name: "
|
|
161
|
+
inputs: [{ name: "set", type: emojiRevealTypes.set }, { name: "timeline", type: timelineTypes.track }, { name: "spec", type: emojiRevealTypes.itemSpec }, { name: "icon", type: artifactTypes.blob }, { name: "activation", type: temporalTypes.instant }],
|
|
161
162
|
outputs: [{ name: "set", type: emojiRevealTypes.set }], needs: [] },
|
|
162
163
|
{ name: emojiRevealProducers.appendPresetItem.name,
|
|
163
164
|
inputs: [{ name: "set", type: emojiRevealTypes.set }, { name: "spec", type: emojiRevealTypes.itemSpec }, { name: "icon", type: artifactTypes.blob }],
|
|
164
165
|
outputs: [{ name: "set", type: emojiRevealTypes.set }], needs: [] },
|
|
165
166
|
{ name: emojiRevealProducers.finalize.name,
|
|
166
|
-
inputs: [{ name: "header", type: emojiRevealTypes.header }, { name: "
|
|
167
|
+
inputs: [{ name: "header", type: emojiRevealTypes.header }, { name: "timeline", type: timelineTypes.track }, { name: "outer", type: temporalTypes.window }, { name: "style", type: emojiRevealTypes.style }, { name: "placeholder", type: artifactTypes.blob }, { name: "set", type: emojiRevealTypes.set }],
|
|
167
168
|
outputs: [{ name: "program", type: emojiRevealTypes.program }], needs: [] },
|
|
168
169
|
{ name: emojiRevealProducers.render.name,
|
|
169
|
-
inputs: [{ name: "canvas", type: spatialTypes.canvas }, { name: "
|
|
170
|
+
inputs: [{ name: "canvas", type: spatialTypes.canvas }, { name: "timeline", type: timelineTypes.track }, { name: "program", type: emojiRevealTypes.program }],
|
|
170
171
|
outputs: [{ name: "track", type: compositionTypes.visualTrack }], needs: [] },
|
|
171
172
|
],
|
|
172
173
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import { assertVisualTrackIdentity, sealVisualTrack } from "@hypit/composition";
|
|
2
3
|
import type { VisualAnimation, VisualElement, VisualTrack } from "@hypit/composition";
|
|
3
4
|
import { assertProgramSpaceIdentity } from "@hypit/program-space";
|
|
4
|
-
import type { ProgramSpace } from "@hypit/program-space";
|
|
5
5
|
import { canonicalize } from "@hypit/protocol";
|
|
6
6
|
import type { BlobRef } from "@hypit/protocol";
|
|
7
7
|
import { assertCanvasSpace } from "@hypit/spatial";
|
|
@@ -67,11 +67,11 @@ export function assertEmojiRevealSet(value: EmojiRevealSet): void {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
export function appendEmojiRevealItem(set: EmojiRevealSet,
|
|
71
|
-
assertEmojiRevealSet(set); assertProgramSpaceIdentity(
|
|
70
|
+
export function appendEmojiRevealItem(set: EmojiRevealSet, timeline: Timeline, spec: EmojiRevealItemSpec, icon: BlobRef, activation: TemporalInstant): EmojiRevealSet {
|
|
71
|
+
assertEmojiRevealSet(set); assertProgramSpaceIdentity(timeline); assertEmojiRevealItemSpec(spec);
|
|
72
72
|
assert(!spec.preset, `Emoji Reveal Item ${spec.id} with preset=true cannot have an activation.`);
|
|
73
73
|
assertIconImage(icon, `Emoji Reveal Item ${spec.id} icon`);
|
|
74
|
-
assertTemporalInstantFor(activation, { subjectId: spec.id, space });
|
|
74
|
+
assertTemporalInstantFor(activation, { subjectId: spec.id, space: timeline });
|
|
75
75
|
assert(!set.items.some((item) => item.spec.id === spec.id), `Duplicate Emoji Reveal Item ${spec.id}.`);
|
|
76
76
|
return { items: [...set.items, { spec: structuredClone(spec), icon: structuredClone(icon), activation: structuredClone(activation) }] };
|
|
77
77
|
}
|
|
@@ -85,11 +85,11 @@ export function appendPresetEmojiRevealItem(set: EmojiRevealSet, spec: EmojiReve
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
export function finalizeEmojiReveal(
|
|
88
|
-
header: EmojiRevealHeader,
|
|
88
|
+
header: EmojiRevealHeader, timeline: Timeline, outer: TemporalWindow, style: EmojiRevealStyle, placeholder: BlobRef, set: EmojiRevealSet,
|
|
89
89
|
): EmojiRevealProgram {
|
|
90
|
-
assertEmojiRevealHeader(header); assertProgramSpaceIdentity(
|
|
90
|
+
assertEmojiRevealHeader(header); assertProgramSpaceIdentity(timeline); assertEmojiRevealStyle(style); assertEmojiRevealSet(set);
|
|
91
91
|
assertIconImage(placeholder, "Emoji Reveal placeholder");
|
|
92
|
-
assertTemporalWindowFor(outer, { subjectId: header.id, space });
|
|
92
|
+
assertTemporalWindowFor(outer, { subjectId: header.id, space: timeline });
|
|
93
93
|
assert(set.items.length > 0, "Emoji Reveal requires at least one Item.");
|
|
94
94
|
let previous = outer.span.startFrame - 1;
|
|
95
95
|
let revealStarted = false;
|
|
@@ -106,7 +106,7 @@ export function finalizeEmojiReveal(
|
|
|
106
106
|
previous = frame;
|
|
107
107
|
}
|
|
108
108
|
const program: EmojiRevealProgram = {
|
|
109
|
-
id: header.id, programSpaceId:
|
|
109
|
+
id: header.id, programSpaceId: timeline.id, outer: structuredClone(outer), style: structuredClone(style),
|
|
110
110
|
placeholder: structuredClone(placeholder), items: structuredClone(set.items),
|
|
111
111
|
};
|
|
112
112
|
assertEmojiRevealProgram(program);
|
|
@@ -183,10 +183,10 @@ function iconElement(input: {
|
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
export function renderEmojiReveal(canvas: CanvasSpace,
|
|
187
|
-
assertCanvasSpace(canvas); assertProgramSpaceIdentity(
|
|
188
|
-
assert(program.programSpaceId ===
|
|
189
|
-
assertTemporalWindowFor(program.outer, { subjectId: program.id, space });
|
|
186
|
+
export function renderEmojiReveal(canvas: CanvasSpace, timeline: Timeline, program: EmojiRevealProgram): VisualTrack {
|
|
187
|
+
assertCanvasSpace(canvas); assertProgramSpaceIdentity(timeline); assertEmojiRevealProgram(program);
|
|
188
|
+
assert(program.programSpaceId === timeline.id, "EmojiRevealProgram belongs to another Timeline.");
|
|
189
|
+
assertTemporalWindowFor(program.outer, { subjectId: program.id, space: timeline });
|
|
190
190
|
const { style } = program;
|
|
191
191
|
const count = program.items.length;
|
|
192
192
|
const width = style.paddingXPx * 2 + style.slotSizePx * count + style.gapPx * (count - 1);
|
|
@@ -234,9 +234,9 @@ export function renderEmojiReveal(canvas: CanvasSpace, space: ProgramSpace, prog
|
|
|
234
234
|
);
|
|
235
235
|
});
|
|
236
236
|
const track = sealVisualTrack({
|
|
237
|
-
programSpaceId:
|
|
237
|
+
programSpaceId: timeline.id, visualIr: "hypit.visual-ir@1", id: program.id,
|
|
238
238
|
presents: [{ id: program.id, subjectId: program.id, span: { ...program.outer.span },
|
|
239
239
|
stacking: { order: style.stackingOrder, tieBreak: program.id }, elements }],
|
|
240
240
|
});
|
|
241
|
-
assertVisualTrackIdentity(track,
|
|
241
|
+
assertVisualTrackIdentity(track, timeline); return track;
|
|
242
242
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveTemporalContext } from "@hypit/temporal-markup";
|
|
2
2
|
import {
|
|
3
3
|
assertAttributes, assertEmptyElement, optionalTextAttribute, textAttribute, type MarkupAttributeValue, type StructuredSurfaceHandler,
|
|
4
4
|
type SurfaceComponentDraft, type SurfaceRecordDraft, type SurfaceResolvedReference,
|
|
@@ -48,24 +48,23 @@ export const decodeEmojiRevealStyleSurface: StructuredSurfaceHandler = ({ elemen
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
export const decodeEmojiRevealTrackSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
51
|
-
assertAttributes(element, ["id", "
|
|
51
|
+
assertAttributes(element, ["id", "timeline", "canvas", "style", "placeholder", ...temporalWindowAttributeNames]);
|
|
52
52
|
const id = textAttribute(element, "id");
|
|
53
53
|
const context = resolveTemporalContext({ element, resolveReference });
|
|
54
|
-
const time = createTemporalSpace({ id: id, element, ...context });
|
|
55
54
|
const canvas = reference(element.attributes.canvas, `${element.name}.canvas`, spatialTypes.canvas, resolveReference);
|
|
56
55
|
const style = reference(element.attributes.style, `${element.name}.style`, emojiRevealTypes.style, resolveReference);
|
|
57
56
|
const placeholder = reference(element.attributes.placeholder, `${element.name}.placeholder`, artifactTypes.blob, resolveReference);
|
|
58
|
-
const outer = createTemporalWindowProjection({ id, subjectId: id, element, ...context,
|
|
57
|
+
const outer = createTemporalWindowProjection({ id, subjectId: id, element, ...context, resolveReference });
|
|
59
58
|
const headerId = `${id}.header`;
|
|
60
59
|
const records: SurfaceRecordDraft[] = [...outer.records, {
|
|
61
60
|
id: headerId, type: emojiRevealTypes.header,
|
|
62
61
|
value: { kind: "inline", value: sealEmojiRevealHeader({ id }) as unknown as CanonicalValue }, range: element.range,
|
|
63
62
|
}];
|
|
64
|
-
const temporalComponents: SurfaceComponentDraft[] = [...
|
|
65
|
-
const temporalFragments = [...
|
|
63
|
+
const temporalComponents: SurfaceComponentDraft[] = [...outer.components];
|
|
64
|
+
const temporalFragments = [...outer.fragments];
|
|
66
65
|
const items: { specName: string; iconName: string; activationName?: string }[] = [];
|
|
67
|
-
const inputs: Record<string, typeof
|
|
68
|
-
header: { kind: "record", id: headerId },
|
|
66
|
+
const inputs: Record<string, typeof context.timeline.ref> = {
|
|
67
|
+
header: { kind: "record", id: headerId }, timeline: context.timeline.ref, canvas: canvas.ref, style: style.ref,
|
|
69
68
|
placeholder: placeholder.ref, outer: outer.ref,
|
|
70
69
|
};
|
|
71
70
|
const ids = new Set<string>();
|
|
@@ -92,7 +91,7 @@ export const decodeEmojiRevealTrackSurface: StructuredSurfaceHandler = ({ elemen
|
|
|
92
91
|
else {
|
|
93
92
|
const activation = createTemporalInstantProjection({
|
|
94
93
|
id: `${id}.item.${suffix}.activation`, subjectId: itemId,
|
|
95
|
-
element: child, ...context,
|
|
94
|
+
element: child, ...context, resolveReference, semanticAttribute: "at", projectedAttribute: false,
|
|
96
95
|
});
|
|
97
96
|
records.push(...activation.records); temporalComponents.push(...activation.components); temporalFragments.push(...activation.fragments);
|
|
98
97
|
const activationName = `item-${suffix}-activation`;
|
|
@@ -20,9 +20,13 @@ owns the byte-level implementations of the eight current operations:
|
|
|
20
20
|
- render an exact sample-domain audio program;
|
|
21
21
|
- mux rendered visual and audio products.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
instead of reimplementing media semantics per deployment.
|
|
23
|
+
The local Provider calls these functions with its Artifact I/O and FFmpeg launch environment. Other
|
|
24
|
+
deployments can reuse the same functions to preserve stream selection, timing, codec and validation behavior.
|
|
26
25
|
|
|
27
26
|
This is not an author package, Provider, queue or Core extension. It performs no endpoint selection,
|
|
28
27
|
credential lookup or SVML parsing.
|
|
28
|
+
|
|
29
|
+
Audio gain envelopes and audible subranges are evaluated per sample after tempo/looping and Clip
|
|
30
|
+
fades, before the requested range is cropped. Original source and envelope progress therefore survive
|
|
31
|
+
local silence and range rendering. This is generic AudioProgramPlan execution, independent of author
|
|
32
|
+
component or Style names.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AudioProgramClip } from "@hypit/media-pipeline";
|
|
2
|
+
|
|
3
|
+
/** Per-sample gain after source playback/fades, before any requested render-range crop. */
|
|
4
|
+
export function audioPresentationFilter(clip: AudioProgramClip): string[] {
|
|
5
|
+
if (clip.gainEnvelope === undefined && clip.audibility === undefined) return [];
|
|
6
|
+
const sample = `(n+${clip.targetStartSample})`;
|
|
7
|
+
let gain = "1";
|
|
8
|
+
const points = clip.gainEnvelope;
|
|
9
|
+
if (points !== undefined) {
|
|
10
|
+
gain = String(points.at(-1)!.gain);
|
|
11
|
+
for (let index = points.length - 1; index > 0; index--) {
|
|
12
|
+
const left = points[index - 1]!, right = points[index]!;
|
|
13
|
+
const line = `(${left.gain}+(${right.gain}-${left.gain})*(${sample}-${left.sample})/${right.sample-left.sample})`;
|
|
14
|
+
gain = `if(lt(${sample},${right.sample}),${line},${gain})`;
|
|
15
|
+
}
|
|
16
|
+
gain = `if(lt(${sample},${points[0]!.sample}),${points[0]!.gain},${gain})`;
|
|
17
|
+
}
|
|
18
|
+
if (clip.audibility !== undefined) {
|
|
19
|
+
const active = clip.audibility.map(span => `(gte(${sample},${span.startSample})*lt(${sample},${span.endSampleExclusive}))`).join("+") || "0";
|
|
20
|
+
gain = `(${gain})*(${active})`;
|
|
21
|
+
}
|
|
22
|
+
return [`aeval=exprs='val(0)*(${gain})|val(1)*(${gain})'`];
|
|
23
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { audioPresentationFilter } from "./audio-presentation.js";
|
|
1
2
|
import { spawn } from "node:child_process";
|
|
2
3
|
import { randomUUID } from "node:crypto";
|
|
3
4
|
import { createReadStream } from "node:fs";
|
|
@@ -556,6 +557,7 @@ function audioClipFilter(clip: AudioProgramClip, inputIndex: number, outputIndex
|
|
|
556
557
|
...(clip.fadeOutSamples === 0 ? [] : [
|
|
557
558
|
`afade=t=out:start_sample=${length - clip.fadeOutSamples}:nb_samples=${clip.fadeOutSamples}`,
|
|
558
559
|
]),
|
|
560
|
+
...audioPresentationFilter(clip),
|
|
559
561
|
// Crop after tempo, looping and envelopes, keeping their original phase.
|
|
560
562
|
`atrim=start_sample=${left - clip.targetStartSample}:end_sample=${right - clip.targetStartSample}`,
|
|
561
563
|
"asetpts=N/SR/TB",
|
|
@@ -37,7 +37,7 @@ This package is the shared execution vocabulary. Speech authoring makes the boun
|
|
|
37
37
|
alignment produce one `SemanticTake`. Media Track consumes that prepared value; it never owns an
|
|
38
38
|
implicit visual-only normalization policy.
|
|
39
39
|
|
|
40
|
-
The frame clock is a separate program fact and can be shared by every Normalize and
|
|
40
|
+
The frame clock is a separate program fact and can be shared by every Normalize and Timeline assembly:
|
|
41
41
|
|
|
42
42
|
```svml
|
|
43
43
|
<program:Clock id="clock" frame-rate="30"/>
|
|
@@ -109,5 +109,9 @@ RenderedVisual + TimelineAudio -> mux-program-media Need -> MuxedMedia
|
|
|
109
109
|
Compiling an `AudioProgramPlan` is ordinary deterministic code. Reading Artifact bytes, decoding,
|
|
110
110
|
resampling, mixing, encoding or muxing is never a Producer shortcut: it is an explicit Provider
|
|
111
111
|
Need. The plan fixes exact 48 kHz sample boundaries, gain/fade/playback parameters and the absence
|
|
112
|
-
of hidden normalization/limiting. The local FFmpeg
|
|
113
|
-
|
|
112
|
+
of hidden normalization/limiting. The local FFmpeg Provider consumes the shared execution body. Other Providers implement the same
|
|
113
|
+
public request and result semantics.
|
|
114
|
+
|
|
115
|
+
AudioProgramPlan preserves AudioClip `gainEnvelope` and `audibility` on the full program sample
|
|
116
|
+
clock. The [Composition definition](../composition/README.md#audio-presentation-on-the-program-clock)
|
|
117
|
+
owns their semantics; the plan does not reinterpret source choice or presentation precedence.
|