@hypit/hypit 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/public/caption.d.ts +206 -183
- package/dist/public/composition.d.ts +25 -3
- package/dist/public/endpoint-kit.d.ts +24 -2
- package/dist/public/generation.d.ts +5 -1
- package/dist/public/hyperframes.d.ts +19 -1
- package/dist/public/narrative.d.ts +17 -3
- package/dist/public/performance.d.ts +1590 -0
- package/dist/public/program-space.d.ts +179 -32
- package/dist/public/runtime-kit.d.ts +21 -8
- package/dist/public/sound.d.ts +822 -0
- package/dist/public/speech.d.ts +41 -0
- package/dist/public/studio-adapter.d.ts +77 -15
- package/dist/public/temporal-markup.d.ts +9 -44
- package/dist/public/temporal.d.ts +37 -28
- package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
- package/examples/README.md +18 -10
- package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
- package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
- package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
- package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
- package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
- package/examples/provider-package/README.md +78 -0
- package/examples/provider-package/hypit.runtime.json +12 -0
- package/examples/provider-package/packages/provider-images/package.json +11 -0
- package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
- package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
- package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
- package/examples/semantic-composition/README.md +6 -0
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
- package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
- package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
- package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
- package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
- package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
- package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
- package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
- package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
- package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
- package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
- package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
- package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
- package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
- package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
- package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
- package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
- package/package.json +32 -15
- package/packages/audio-track/README.md +20 -13
- package/packages/audio-track/package.json +1 -1
- package/packages/audio-track/src/component.ts +4 -4
- package/packages/audio-track/src/fragment.ts +6 -5
- package/packages/audio-track/src/index.ts +1 -1
- package/packages/audio-track/src/manifest.ts +17 -16
- package/packages/audio-track/src/program.ts +21 -25
- package/packages/audio-track/src/surface.ts +19 -18
- package/packages/audio-track-studio/README.md +23 -0
- package/packages/audio-track-studio/src/index.ts +28 -17
- package/packages/author-kit/README.md +1 -1
- package/packages/background-removal/README.md +4 -7
- package/packages/browser-capture/package.json +1 -1
- package/packages/build-result/README.md +11 -0
- package/packages/build-result/src/decode.ts +2 -0
- package/packages/build-result/src/execution-log.ts +17 -0
- package/packages/build-result/src/index.ts +1 -0
- package/packages/build-result/src/store.ts +14 -1
- package/packages/build-result/src/types.ts +3 -0
- package/packages/build-result-s3/src/repository.ts +4 -0
- package/packages/caption/README.md +61 -73
- package/packages/caption/package.json +3 -2
- package/packages/caption/src/activation.ts +2 -2
- package/packages/caption/src/component.ts +20 -5
- package/packages/caption/src/display.ts +3 -18
- package/packages/caption/src/fragment.ts +3 -7
- package/packages/caption/src/index.ts +6 -5
- package/packages/caption/src/manifest.ts +29 -46
- package/packages/caption/src/style.ts +24 -135
- package/packages/caption/src/surface.ts +12 -92
- package/packages/caption/src/temporalize.ts +18 -53
- package/packages/caption/src/types.ts +8 -35
- package/packages/caption/src/visibility.ts +23 -0
- package/packages/caption-fine/README.md +14 -9
- package/packages/caption-fine/package.json +4 -2
- package/packages/caption-fine/src/component.ts +3 -3
- package/packages/caption-fine/src/fragment.ts +7 -19
- package/packages/caption-fine/src/index.ts +2 -0
- package/packages/caption-fine/src/manifest.ts +26 -17
- package/packages/caption-fine/src/recipe.ts +7 -0
- package/packages/caption-fine/src/render.ts +14 -13
- package/packages/caption-fine/src/schedule.ts +39 -35
- package/packages/caption-fine/src/style.ts +10 -9
- package/packages/caption-fine/src/surface.ts +62 -35
- package/packages/caption-fine/src/types.ts +2 -0
- package/packages/caption-fine-studio/README.md +24 -2
- package/packages/caption-fine-studio/package.json +3 -1
- package/packages/caption-fine-studio/src/activation.ts +3 -3
- package/packages/caption-fine-studio/src/index.ts +54 -42
- package/packages/cli/README.md +57 -4
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/arguments.ts +25 -6
- package/packages/cli/src/build-planning.ts +3 -2
- package/packages/cli/src/command.ts +6 -0
- package/packages/cli/src/commands/environment.ts +28 -18
- package/packages/cli/src/commands/execution.ts +81 -26
- package/packages/cli/src/commands/results.ts +7 -11
- package/packages/cli/src/index.ts +2 -2
- package/packages/cli/src/machine-view.ts +3 -2
- package/packages/cli/src/main.ts +34 -42
- package/packages/cli/src/observation.ts +7 -1
- package/packages/cli/src/output.ts +65 -23
- package/packages/cli/src/view.ts +64 -18
- package/packages/comment-sticker/README.md +3 -3
- package/packages/comment-sticker/package.json +1 -1
- package/packages/comment-sticker/src/component.ts +4 -4
- package/packages/comment-sticker/src/fragment.ts +5 -4
- package/packages/comment-sticker/src/manifest.ts +7 -6
- package/packages/comment-sticker/src/program.ts +9 -9
- package/packages/comment-sticker/src/surface.ts +6 -7
- package/packages/composition/README.md +21 -0
- package/packages/composition/src/audio-presentation.ts +44 -0
- package/packages/composition/src/index.ts +3 -0
- package/packages/composition/src/schema.ts +8 -3
- package/packages/composition/src/track.ts +15 -1
- package/packages/credential-store-env/README.md +1 -1
- package/packages/deck-track/README.md +3 -3
- package/packages/deck-track/package.json +1 -1
- package/packages/deck-track/src/component.ts +5 -5
- package/packages/deck-track/src/fragment.ts +6 -5
- package/packages/deck-track/src/lower.ts +12 -12
- package/packages/deck-track/src/manifest.ts +8 -7
- package/packages/deck-track/src/program.ts +13 -16
- package/packages/deck-track/src/surface.ts +9 -10
- package/packages/driver-node/src/driver.ts +41 -3
- package/packages/elevenlabs-speech/README.md +27 -0
- package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
- package/packages/elevenlabs-speech/src/activation.ts +26 -0
- package/packages/elevenlabs-speech/src/fragment.ts +11 -0
- package/packages/elevenlabs-speech/src/index.ts +111 -0
- package/packages/elevenlabs-speech/src/surface.ts +167 -0
- package/packages/endpoint-kit/README.md +24 -0
- package/packages/endpoint-kit/src/index.ts +7 -1
- package/packages/film/README.md +12 -7
- package/packages/film/package.json +1 -1
- package/packages/film/src/component.ts +4 -4
- package/packages/film/src/fragment.ts +6 -5
- package/packages/film/src/manifest.ts +11 -10
- package/packages/film/src/program.ts +5 -5
- package/packages/film/src/recipe.ts +2 -1
- package/packages/film/src/surface.ts +6 -6
- package/packages/film-studio/package.json +1 -1
- package/packages/film-studio/src/index.ts +2 -2
- package/packages/fishaudio-speech/README.md +33 -0
- package/packages/fishaudio-speech/package.json +21 -0
- package/packages/fishaudio-speech/src/activation.ts +32 -0
- package/packages/fishaudio-speech/src/fragment.ts +11 -0
- package/packages/fishaudio-speech/src/index.ts +156 -0
- package/packages/fishaudio-speech/src/surface.ts +192 -0
- package/packages/generation/README.md +11 -1
- package/packages/generation/src/mapping.ts +28 -30
- package/packages/gpt-image/README.md +1 -2
- package/packages/grok-imagine/README.md +1 -2
- package/packages/hyperframes/README.md +7 -3
- package/packages/hyperframes/src/browser-program.ts +11 -2
- package/packages/hyperframes/src/document.ts +15 -2
- package/packages/interview-emoji-reveal/README.md +4 -4
- package/packages/interview-emoji-reveal/package.json +1 -1
- package/packages/interview-emoji-reveal/src/component.ts +4 -4
- package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
- package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
- package/packages/interview-emoji-reveal/src/program.ts +14 -14
- package/packages/interview-emoji-reveal/src/surface.ts +8 -9
- package/packages/media-execution/README.md +7 -3
- package/packages/media-execution/src/audio-presentation.ts +23 -0
- package/packages/media-execution/src/execute.ts +2 -0
- package/packages/media-pipeline/README.md +7 -3
- package/packages/media-pipeline/src/audio-plan.ts +4 -1
- package/packages/media-pipeline/src/component.ts +16 -2
- package/packages/media-pipeline/src/manifest.ts +3 -1
- package/packages/media-pipeline/src/types.ts +2 -1
- package/packages/media-track/README.md +14 -47
- package/packages/media-track/package.json +1 -1
- package/packages/media-track/preview/preview.svml +5 -5
- package/packages/media-track/src/author.ts +12 -6
- package/packages/media-track/src/component.ts +10 -16
- package/packages/media-track/src/fragment.ts +8 -7
- package/packages/media-track/src/index.ts +3 -1
- package/packages/media-track/src/lower.ts +7 -7
- package/packages/media-track/src/manifest.ts +16 -38
- package/packages/media-track/src/program.ts +62 -67
- package/packages/media-track/src/sampling.ts +6 -6
- package/packages/media-track/src/sequence.ts +8 -8
- package/packages/media-track/src/surface.ts +25 -43
- package/packages/media-track-studio/README.md +9 -0
- package/packages/media-track-studio/src/index.ts +16 -11
- package/packages/mimo-speech/README.md +1 -1
- package/packages/minimax-h3/README.md +1 -1
- package/packages/nano-banana/README.md +1 -1
- package/packages/narrative/README.md +23 -1
- package/packages/narrative/src/identity.ts +11 -0
- package/packages/narrative/src/index.ts +3 -0
- package/packages/narrative/src/schema.ts +28 -27
- package/packages/narrative/src/selection.ts +52 -0
- package/packages/narrative/src/types.ts +2 -0
- package/packages/package-loader-node/README.md +30 -0
- package/packages/package-loader-node/package.json +5 -2
- package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
- package/packages/package-loader-node/src/index.ts +1 -0
- package/packages/package-loader-node/src/loader.ts +12 -15
- package/packages/package-loader-node/src/location.ts +27 -1
- package/packages/package-loader-node/src/module-scope.ts +183 -0
- package/packages/package-loader-node/src/types.ts +4 -0
- package/packages/performance/README.md +83 -0
- package/packages/performance/package.json +30 -0
- package/packages/performance/src/activation.ts +11 -0
- package/packages/performance/src/component.ts +46 -0
- package/packages/performance/src/index.ts +6 -0
- package/packages/performance/src/manifest.ts +53 -0
- package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
- package/packages/performance/src/program.ts +51 -0
- package/packages/performance/src/style.ts +35 -0
- package/packages/performance/src/surface.ts +99 -0
- package/packages/performance-studio/README.md +25 -0
- package/packages/performance-studio/package.json +21 -0
- package/packages/performance-studio/src/activation.ts +6 -0
- package/packages/performance-studio/src/index.ts +84 -0
- package/packages/program-space/README.md +9 -18
- package/packages/program-space/src/activation.ts +1 -5
- package/packages/program-space/src/index.ts +2 -11
- package/packages/program-space/src/surface.ts +1 -20
- package/packages/project-context-node/README.md +20 -0
- package/packages/project-context-node/package.json +10 -0
- package/packages/project-context-node/src/index.ts +3 -0
- package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
- package/packages/provider-hyperframes-local/README.md +43 -15
- package/packages/provider-hyperframes-local/src/activation.ts +4 -3
- package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
- package/packages/provider-hyperframes-local/src/capture.ts +96 -26
- package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
- package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
- package/packages/provider-hyperframes-local/src/options.ts +2 -0
- package/packages/provider-hyperframes-local/src/program.ts +6 -3
- package/packages/provider-hyperframes-local/src/progress.ts +53 -0
- package/packages/provider-hyperframes-local/src/provider.ts +18 -5
- package/packages/provider-hyperframes-local/src/render.ts +48 -7
- package/packages/provider-hypihub/README.md +48 -17
- package/packages/provider-hypihub/package.json +2 -0
- package/packages/provider-hypihub/src/mapping.ts +31 -7
- package/packages/provider-hypihub/src/oauth.ts +6 -0
- package/packages/provider-hypihub/src/provider.ts +25 -13
- package/packages/provider-hypihub/src/routes.ts +1 -2
- package/packages/provider-hypihub/src/upload.ts +2 -0
- package/packages/provider-media-local/README.md +3 -4
- package/packages/provider-whisperx-local/src/program.ts +1 -0
- package/packages/provider-whisperx-local/src/provider.ts +3 -0
- package/packages/ranking/README.md +8 -6
- package/packages/ranking/package.json +1 -1
- package/packages/ranking/src/component.ts +6 -6
- package/packages/ranking/src/fragment.ts +11 -7
- package/packages/ranking/src/manifest.ts +21 -14
- package/packages/ranking/src/render.ts +22 -26
- package/packages/ranking/src/schedule.ts +16 -19
- package/packages/ranking/src/surface.ts +12 -13
- package/packages/ranking-studio/README.md +18 -0
- package/packages/ranking-studio/src/index.ts +61 -9
- package/packages/render-hyperframes/README.md +7 -7
- package/packages/render-hyperframes/package.json +1 -1
- package/packages/render-hyperframes/src/component.ts +11 -1
- package/packages/render-hyperframes/src/fragment.ts +7 -4
- package/packages/render-hyperframes/src/manifest.ts +4 -4
- package/packages/render-hyperframes/src/surface.ts +6 -6
- package/packages/runtime/README.md +8 -1
- package/packages/runtime/src/execution.ts +15 -4
- package/packages/runtime/src/index.ts +2 -1
- package/packages/runtime/src/log.ts +51 -0
- package/packages/runtime/src/types.ts +5 -8
- package/packages/runtime-host-node/README.md +30 -0
- package/packages/runtime-host-node/package.json +1 -0
- package/packages/runtime-host-node/src/index.ts +24 -9
- package/packages/runtime-host-node/src/packages.ts +47 -50
- package/packages/runtime-kit/README.md +5 -0
- package/packages/runtime-kit/src/index.ts +3 -1
- package/packages/runtime-local/README.md +92 -4
- package/packages/runtime-local/src/config.ts +202 -56
- package/packages/runtime-local/src/control.ts +9 -1
- package/packages/runtime-local/src/executor.ts +66 -0
- package/packages/runtime-local/src/host.ts +37 -17
- package/packages/runtime-local/src/log.ts +48 -0
- package/packages/runtime-local/src/programs.ts +2 -1
- package/packages/runtime-local/src/result-writer.ts +2 -0
- package/packages/runtime-local/src/runtime.ts +8 -6
- package/packages/runtime-local/src/supervisor.ts +142 -0
- package/packages/runtime-local/src/types.ts +9 -2
- package/packages/runtime-local/src/worker-process.ts +7 -24
- package/packages/runtime-local/src/worker.ts +55 -83
- package/packages/screen-overlay/README.md +3 -3
- package/packages/screen-overlay/package.json +1 -1
- package/packages/screen-overlay/src/component.ts +3 -3
- package/packages/screen-overlay/src/fragment.ts +5 -4
- package/packages/screen-overlay/src/manifest.ts +7 -6
- package/packages/screen-overlay/src/program.ts +9 -9
- package/packages/screen-overlay/src/surface.ts +6 -7
- package/packages/script/README.md +15 -2
- package/packages/script/src/manifest.ts +2 -2
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/surface.ts +4 -3
- package/packages/script/src/types.ts +1 -1
- package/packages/script-studio/package.json +9 -3
- package/packages/script-studio/src/index.ts +2 -0
- package/packages/script-studio/src/projection.ts +105 -0
- package/packages/seedance/README.md +30 -1
- package/packages/seedance/src/index.ts +18 -7
- package/packages/seedance/src/surface.ts +17 -4
- package/packages/seedance-kits/README.md +7 -1
- package/packages/seedream/README.md +1 -1
- package/packages/sound/README.md +81 -0
- package/packages/sound/package.json +25 -0
- package/packages/sound/src/activation.ts +11 -0
- package/packages/sound/src/component.ts +28 -0
- package/packages/sound/src/index.ts +5 -0
- package/packages/sound/src/manifest.ts +47 -0
- package/packages/sound/src/program.ts +84 -0
- package/packages/sound/src/style.ts +34 -0
- package/packages/sound/src/surface.ts +90 -0
- package/packages/sound-studio/README.md +22 -0
- package/packages/sound-studio/package.json +20 -0
- package/packages/sound-studio/src/activation.ts +6 -0
- package/packages/sound-studio/src/index.ts +74 -0
- package/packages/speech/README.md +2 -2
- package/packages/speech-alignment/src/local.ts +8 -0
- package/packages/speech-alignment/src/locate.ts +1 -1
- package/packages/store-sqlite/README.md +7 -0
- package/packages/store-sqlite/src/store.ts +84 -83
- package/packages/studio/INSPECTOR.md +15 -2
- package/packages/studio/README.md +88 -14
- package/packages/studio/package.json +8 -7
- package/packages/studio/src/companion-assembly.ts +1 -0
- package/packages/studio/src/domain.ts +1 -1
- package/packages/studio/src/fallback-companions.ts +3 -3
- package/packages/studio/src/feedback-server.ts +51 -0
- package/packages/studio/src/feedback-store.ts +66 -0
- package/packages/studio/src/feedback.ts +60 -0
- package/packages/studio/src/parameter-values.ts +43 -1
- package/packages/studio/src/parameters.ts +114 -24
- package/packages/studio/src/preview/render.ts +5 -1
- package/packages/studio/src/preview/runtime-shim.ts +49 -3
- package/packages/studio/src/programme.ts +14 -30
- package/packages/studio/src/server.ts +10 -6
- package/packages/studio/src/shared.ts +4 -2
- package/packages/studio/src/snapshot.ts +21 -132
- package/packages/studio/src/studio-preflight.ts +3 -3
- package/packages/studio/src/studio-registry.ts +50 -6
- package/packages/studio/src/style.css +209 -48
- package/packages/studio/src/ui/comments.ts +233 -0
- package/packages/studio/src/ui/icons.ts +5 -0
- package/packages/studio/src/ui/main.ts +145 -86
- package/packages/studio/src/ui/overlay.ts +12 -8
- package/packages/studio/src/ui/scrub-preview.ts +108 -0
- package/packages/studio/src/ui/stage.ts +67 -4
- package/packages/studio/src/ui/timeline.ts +177 -108
- package/packages/studio/start.ts +4 -2
- package/packages/studio-adapter/README.md +130 -11
- package/packages/studio-adapter/src/index.ts +100 -13
- package/packages/temporal/README.md +6 -6
- package/packages/temporal/package.json +1 -1
- package/packages/temporal/src/component.ts +5 -6
- package/packages/temporal/src/index.ts +8 -6
- package/packages/temporal/src/location.ts +11 -11
- package/packages/temporal/src/projection.ts +19 -19
- package/packages/temporal/src/rational.ts +4 -4
- package/packages/temporal-markup/EDITING.md +2 -2
- package/packages/temporal-markup/README.md +27 -11
- package/packages/temporal-markup/package.json +1 -1
- package/packages/temporal-markup/src/index.ts +20 -25
- package/packages/temporal-markup/src/space.ts +10 -41
- package/packages/timeline/README.md +31 -0
- package/packages/{semantic-track → timeline}/package.json +1 -1
- package/packages/timeline/src/activation.ts +8 -0
- package/packages/timeline/src/component.ts +24 -0
- package/packages/timeline/src/identity.ts +60 -0
- package/packages/timeline/src/index.ts +6 -0
- package/packages/{semantic-track → timeline}/src/location.ts +20 -20
- package/packages/timeline/src/manifest.ts +39 -0
- package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
- package/packages/timeline/src/types.ts +24 -0
- package/packages/timeline-author/README.md +68 -0
- package/packages/{speech-track → timeline-author}/package.json +6 -4
- package/packages/timeline-author/src/activation.ts +22 -0
- package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
- package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
- package/packages/timeline-author/src/index.ts +7 -0
- package/packages/timeline-author/src/manifest.ts +78 -0
- package/packages/timeline-author/src/program.ts +107 -0
- package/packages/timeline-author/src/surface.ts +46 -0
- package/packages/timeline-author/src/types.ts +6 -0
- package/packages/typography-track/README.md +4 -4
- package/packages/typography-track/package.json +1 -1
- package/packages/typography-track/src/component.ts +4 -4
- package/packages/typography-track/src/fragment.ts +4 -3
- package/packages/typography-track/src/manifest.ts +11 -9
- package/packages/typography-track/src/program.ts +15 -15
- package/packages/typography-track/src/surface.ts +17 -18
- package/packages/video-cli/README.md +4 -1
- package/packages/video-cli/package.json +2 -1
- package/packages/video-cli/src/creation.ts +14 -4
- package/packages/video-cli/src/index.ts +1 -1
- package/packages/video-cli/src/studio-distribution.ts +2 -1
- package/packages/volcengine-matting/README.md +3 -3
- package/packages/whisperx/README.md +1 -1
- package/services/whisperx/README.md +14 -0
- package/services/whisperx/pyproject.toml +2 -0
- package/services/whisperx/uv.lock +20 -20
- package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
- package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
- package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
- package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
- package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
- package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
- package/packages/provider-kie/README.md +0 -134
- package/packages/provider-kie/package.json +0 -43
- package/packages/provider-kie/src/activation.ts +0 -71
- package/packages/provider-kie/src/index.ts +0 -10
- package/packages/provider-kie/src/mapping.ts +0 -182
- package/packages/provider-kie/src/provider.ts +0 -657
- package/packages/provider-kie/src/routes.ts +0 -150
- package/packages/provider-xiaomi-mimo/README.md +0 -32
- package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
- package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
- package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
- package/packages/runtime/src/environment.ts +0 -6
- package/packages/semantic-track/README.md +0 -21
- package/packages/semantic-track/src/activation.ts +0 -8
- package/packages/semantic-track/src/component.ts +0 -24
- package/packages/semantic-track/src/identity.ts +0 -58
- package/packages/semantic-track/src/index.ts +0 -6
- package/packages/semantic-track/src/manifest.ts +0 -38
- package/packages/semantic-track/src/types.ts +0 -26
- package/packages/speech-track/README.md +0 -51
- package/packages/speech-track/src/activation.ts +0 -19
- package/packages/speech-track/src/index.ts +0 -7
- package/packages/speech-track/src/manifest.ts +0 -73
- package/packages/speech-track/src/program.ts +0 -64
- package/packages/speech-track/src/surface.ts +0 -35
- package/packages/speech-track/src/types.ts +0 -6
- package/packages/speech-track-studio/README.md +0 -3
- package/packages/speech-track-studio/package.json +0 -14
- package/packages/speech-track-studio/src/activation.ts +0 -7
- package/packages/speech-track-studio/src/index.ts +0 -40
- /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
- /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
|
@@ -1,77 +1,65 @@
|
|
|
1
1
|
# `@hypit/caption`
|
|
2
2
|
|
|
3
|
-
External components
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
External components import `@hypit/hypit/caption`. Source uses the `@hypit/caption@1` Module
|
|
4
|
+
identity for shared declarations such as `Hidden`.
|
|
5
|
+
|
|
6
|
+
Caption has two independent structures: Script organizes displayed words into Cues, and timed Uses
|
|
7
|
+
choose how those Cues appear. A Use may begin inside a Cue. It changes presentation without changing
|
|
8
|
+
that Cue's text or restarting its word timing.
|
|
9
|
+
|
|
10
|
+
`CaptionDocument` owns displayed words, display/pronunciation associations, word attributes and `||`
|
|
11
|
+
breaks. `Timeline` owns placed Takes and measured word times. `temporalizeCaptionDocument(document,
|
|
12
|
+
timeline)` joins their identities and returns `TimedCaptionProjection`: complete Cues with original
|
|
13
|
+
unit times. Segment, speaking-turn and explicit Cue boundaries organize this content. No Style is
|
|
14
|
+
needed for this operation. Unplaced material contributes no Cue.
|
|
15
|
+
|
|
16
|
+
A rendering family's Track accepts `document`, `timeline` and ordered `Use` children. Fine provides:
|
|
17
|
+
|
|
18
|
+
```svml
|
|
19
|
+
<caption:Hidden id="hidden"/>
|
|
20
|
+
<caption-fine:Track id="captions" document={story.caption} timeline={film.timeline}>
|
|
21
|
+
<caption-fine:Use style={plain}/>
|
|
22
|
+
<caption-fine:Use role="GUEST" style={guest}/>
|
|
23
|
+
<caption-fine:Use during={story.selection.demo} style={hidden}/>
|
|
24
|
+
<caption-fine:Use at={story.moment.key} for="2s" style={impact}/>
|
|
25
|
+
</caption-fine:Track>
|
|
17
26
|
```
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
`
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
Word attributes
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
`styleId`, `startFrame`, `endFrameExclusive` and measured `units`. Each unit carries `unitId` and its
|
|
58
|
-
own boundaries. Recover display Words and their associations from the same `CaptionDocument`; do
|
|
59
|
-
not infer N:M timing by evenly dividing a Cue or splitting its rendered string.
|
|
60
|
-
|
|
61
|
-
Scheduling may derive visible intervals while preserving those measured boundaries. Use
|
|
62
|
-
`assertCaptionProgramForDocument`, `assertTimedCaptionProjection` and, for visible scheduling,
|
|
63
|
-
`applyCaptionMute` as appropriate. Retain `spaceId`, `narrativeId` and `documentId` in a schedule so
|
|
64
|
-
the renderer can check its inputs. The renderer should consume that schedule without silently
|
|
65
|
-
changing Cue grouping, lead or tail again.
|
|
66
|
-
|
|
67
|
-
`@hypit/caption-fine` provides a working example in its `src/fragment.ts`, `src/schedule.ts` and
|
|
68
|
-
`src/render.ts`: one shared timing join, then family schedule and render operations. A new structural
|
|
69
|
-
family replaces Fine's uniform-word layout and parameters, not the common speech truth. Its own
|
|
70
|
-
Manifest, activation and vocabulary belong to the project package; no change to this common package
|
|
71
|
-
is required merely to add a new visual family.
|
|
72
|
-
|
|
73
|
-
That family can render a standalone Caption Track or coordinate caption text with graphics in a
|
|
74
|
-
shared scene. Its output uses ordinary VisualTrack elements or a renderer program with explicit
|
|
75
|
-
resources. Caption retains the authored words and their semantic relationship while the component
|
|
76
|
-
owns the visual boundary. The Program does not automatically route different families to different
|
|
77
|
-
renderers; choose the implementing component and its coverage explicitly.
|
|
28
|
+
Time attributes come from `@hypit/temporal-markup`: `during`, `at`/`for`, `until`/`for`, and
|
|
29
|
+
`start`/`end`, including semantic references and explicit frame/second expressions. Omitted time
|
|
30
|
+
attributes mean the whole Timeline. `role` filters content independently of time. Later matching
|
|
31
|
+
Uses replace earlier presentation inside their windows, including a Hidden Style. Separate Tracks
|
|
32
|
+
remain independent and can intentionally display simultaneous captions.
|
|
33
|
+
|
|
34
|
+
## Rendering-family extension
|
|
35
|
+
|
|
36
|
+
A family owns its Style, schedule, renderer and Track Surface. It can use ordinary VisualTrack
|
|
37
|
+
objects or an explicit browser program; no central renderer dispatch is required.
|
|
38
|
+
|
|
39
|
+
The public helpers and Types are in [index.ts](src/index.ts):
|
|
40
|
+
|
|
41
|
+
- `CaptionStyleIntent` carries a family identifier and parameters, or `rendering: null` for Hidden.
|
|
42
|
+
- `CaptionProgram` is the Track's internal collection of ordered, resolved Uses and referenced Styles.
|
|
43
|
+
It is not a separate author element. `create-caption-uses` and `append-caption-use` assemble it from
|
|
44
|
+
typed Windows. The Track may export it for its Companion, like Performance and Sound.
|
|
45
|
+
- `captionUseVisibility(program, index, role, envelope)` intersects a Cue envelope with a Use and
|
|
46
|
+
subtracts later matching windows. Hidden participates even though it renders nothing.
|
|
47
|
+
- `captionProducers.temporalizeDocument` takes only `document` and `timeline`. Its output retains
|
|
48
|
+
`spaceId`, `narrativeId`, `documentId`, Cue identities and measured alignment-unit boundaries.
|
|
49
|
+
|
|
50
|
+
Derive layout and animation from complete Cue content and original timing. Apply Use coverage as a
|
|
51
|
+
visibility mask. Fine keeps the original Present span and element animations, with separate
|
|
52
|
+
`visibility` intervals; changing or briefly hiding a Style does not restart karaoke, typing or motion.
|
|
53
|
+
A family may define lead/tail and handoff behavior, but its resulting visibility stays inside the
|
|
54
|
+
winning Use window. Empty content produces no drawing.
|
|
55
|
+
|
|
56
|
+
Word attributes remain on `CaptionDocument.words`. A structural family can interpret an explicit
|
|
57
|
+
attribute as a keyword role while retaining complete display/alignment units. Time selection does
|
|
58
|
+
not split `<display|speech>` text, and elapsed Cue progress is not a replacement for word timing.
|
|
59
|
+
The content query helpers for Role, Selection and attributes remain available for components that
|
|
60
|
+
actually need authored word subsets; those queries do not define the Use time language.
|
|
61
|
+
|
|
62
|
+
See Fine's [Surface](../caption-fine/src/surface.ts), [schedule](../caption-fine/src/schedule.ts) and
|
|
63
|
+
[renderer](../caption-fine/src/render.ts) for a concrete implementation. New family behavior belongs
|
|
64
|
+
in its own project package. The selected family interprets its own Styles; mixed-family dispatch,
|
|
65
|
+
when useful, is an explicit component responsibility.
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
"@hypit/elaborator": "workspace:*",
|
|
16
16
|
"@hypit/narrative": "workspace:*",
|
|
17
17
|
"@hypit/protocol": "workspace:*",
|
|
18
|
-
"@hypit/
|
|
19
|
-
"@hypit/markup": "workspace:*"
|
|
18
|
+
"@hypit/timeline": "workspace:*",
|
|
19
|
+
"@hypit/markup": "workspace:*",
|
|
20
|
+
"@hypit/temporal": "workspace:*"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@hypit/program-space": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createMarkupSurfaceHostFacet } from "@hypit/markup";
|
|
2
2
|
import {
|
|
3
3
|
captionComponent, captionManifest, captionModuleRef,
|
|
4
|
-
|
|
4
|
+
decodeHiddenCaptionStyleSurface,
|
|
5
5
|
captionMarkupSurfaces,
|
|
6
6
|
} from "./index.js";
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ export const hypitPackage = {
|
|
|
11
11
|
components: [captionComponent],
|
|
12
12
|
hostFacets: [
|
|
13
13
|
createMarkupSurfaceHostFacet({ module: captionModuleRef,
|
|
14
|
-
declaration: captionMarkupSurfaces.find((item) => item.name === "
|
|
14
|
+
declaration: captionMarkupSurfaces.find((item) => item.name === "hidden")!, handler: decodeHiddenCaptionStyleSurface }),
|
|
15
15
|
],
|
|
16
16
|
};
|
|
17
17
|
export default hypitPackage;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import type { TemporalWindow } from "@hypit/temporal";
|
|
1
2
|
import type { ComponentPackage } from "@hypit/component-kit";
|
|
2
3
|
import type { CaptionDocument } from "@hypit/narrative";
|
|
3
|
-
import type {
|
|
4
|
+
import type { Timeline } from "@hypit/timeline";
|
|
4
5
|
import type { StoredValue } from "@hypit/protocol";
|
|
5
6
|
import { canonicalize } from "@hypit/protocol";
|
|
6
7
|
|
|
7
8
|
import { captionProducers, captionTypes } from "./manifest.js";
|
|
8
|
-
import { assertCaptionProgram } from "./style.js";
|
|
9
|
+
import { appendCaptionUse, assertCaptionProgram, assertCaptionStyle } from "./style.js";
|
|
9
10
|
import { assertTimedCaptionProjection, temporalizeCaptionDocument } from "./temporalize.js";
|
|
10
11
|
import type { CaptionProgram, CaptionStyleIntent, TimedCaptionProjection } from "./types.js";
|
|
11
12
|
|
|
@@ -16,12 +17,26 @@ function inline<T>(value: StoredValue | undefined, subject: string): T {
|
|
|
16
17
|
|
|
17
18
|
export const captionComponent = {
|
|
18
19
|
producers: [{
|
|
20
|
+
producer: captionProducers.create,
|
|
21
|
+
handler: ({ inputs }) => ({ outputs: { program: { kind: "inline", value: canonicalize({
|
|
22
|
+
id: inline<{id:string}>(inputs.header?.value, "CaptionTrackSpec").id,
|
|
23
|
+
documentId: inline<CaptionDocument>(inputs.document?.value, "CaptionDocument").id,
|
|
24
|
+
styles: [], uses: [],
|
|
25
|
+
}) } }, needs: {} }),
|
|
26
|
+
}, {
|
|
27
|
+
producer: captionProducers.append,
|
|
28
|
+
handler: ({ inputs }) => ({ outputs: { program: { kind: "inline", value: canonicalize(appendCaptionUse(
|
|
29
|
+
inline<CaptionProgram>(inputs.program?.value, "CaptionProgram"),
|
|
30
|
+
inline<TemporalWindow>(inputs.window?.value, "TemporalWindow"),
|
|
31
|
+
inline<CaptionStyleIntent>(inputs.style?.value, "CaptionStyle"),
|
|
32
|
+
inline<{role?:string}>(inputs.filter?.value, "CaptionContentFilter").role,
|
|
33
|
+
)) } }, needs: {} }),
|
|
34
|
+
}, {
|
|
19
35
|
producer: captionProducers.temporalizeDocument,
|
|
20
36
|
handler: ({ inputs }) => ({
|
|
21
37
|
outputs: { caption: { kind: "inline", value: canonicalize(temporalizeCaptionDocument(
|
|
22
38
|
inline<CaptionDocument>(inputs.document?.value, "CaptionDocument"),
|
|
23
|
-
inline<
|
|
24
|
-
inline<CaptionProgram>(inputs.program?.value, "CaptionProgram"),
|
|
39
|
+
inline<Timeline>(inputs.timeline?.value, "Timeline"),
|
|
25
40
|
)) } },
|
|
26
41
|
needs: {},
|
|
27
42
|
}),
|
|
@@ -30,7 +45,7 @@ export const captionComponent = {
|
|
|
30
45
|
{ type: captionTypes.style, handler: ({ value }) => {
|
|
31
46
|
if (value.kind !== "inline") throw new Error("CaptionStyle must be inline");
|
|
32
47
|
const style = value.value as CaptionStyleIntent;
|
|
33
|
-
|
|
48
|
+
assertCaptionStyle(style);
|
|
34
49
|
} },
|
|
35
50
|
{ type: captionTypes.program, handler: ({ value }) => assertCaptionProgram(inline<CaptionProgram>(value, "CaptionProgram")) },
|
|
36
51
|
{ type: captionTypes.timedProjection, handler: ({ value }) => assertTimedCaptionProjection(inline<TimedCaptionProjection>(value, "TimedCaptionProjection")) },
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { narrativeSelectionTokenRange } from "@hypit/narrative";
|
|
1
2
|
import type { CaptionDocument, Narrative, NarrativeSelection } from "@hypit/narrative";
|
|
2
3
|
|
|
3
4
|
function assert(condition: unknown, message: string): asserts condition {
|
|
@@ -38,30 +39,14 @@ export type CaptionUnitSubset = {
|
|
|
38
39
|
readonly unitIds: readonly string[];
|
|
39
40
|
};
|
|
40
41
|
|
|
41
|
-
function tokenBoundary(narrative: Narrative, anchorId: string, owner: string): number {
|
|
42
|
-
const anchor = narrative.semanticIndex.anchors.find((candidate) => candidate.id === anchorId);
|
|
43
|
-
if (anchor === undefined) throw new Error(`${owner} names unknown semantic anchor ${anchorId}`);
|
|
44
|
-
if (anchor.kind === "program-start") return 0;
|
|
45
|
-
if (anchor.kind === "program-end") return narrative.tokens.length;
|
|
46
|
-
const segment = narrative.segments.find((candidate) => candidate.id === anchor.segmentId);
|
|
47
|
-
if (segment === undefined) throw new Error(`${owner} names an anchor outside its Segment`);
|
|
48
|
-
if (anchor.kind === "segment-start") return segment.tokenStart;
|
|
49
|
-
if (anchor.kind === "segment-end") return segment.tokenEndExclusive;
|
|
50
|
-
const tokenIndex = narrative.tokens.findIndex((token) => token.id === anchor.tokenId);
|
|
51
|
-
if (tokenIndex < 0) throw new Error(`${owner} names an anchor without a Narrative token`);
|
|
52
|
-
return anchor.kind === "token-start" ? tokenIndex : tokenIndex + 1;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
42
|
/** Project a semantic Selection to complete authored N:M Caption units. */
|
|
56
43
|
export function captionUnitsForSelection(
|
|
57
|
-
document: CaptionDocument,
|
|
58
44
|
narrative: Narrative,
|
|
59
45
|
selection: NarrativeSelection,
|
|
60
46
|
): CaptionUnitSubset {
|
|
47
|
+
const document = narrative.caption;
|
|
61
48
|
assertCaptionDocument(document);
|
|
62
|
-
const start =
|
|
63
|
-
const end = tokenBoundary(narrative, selection.endAnchorId, `Selection ${selection.id}`);
|
|
64
|
-
assert(end >= start, `Selection ${selection.id} is backwards`);
|
|
49
|
+
const { tokenStart: start, tokenEndExclusive: end } = narrativeSelectionTokenRange(narrative, selection);
|
|
65
50
|
const tokenPositions = new Map(narrative.tokens.map((token, index) => [token.id, index]));
|
|
66
51
|
const unitIds: string[] = [];
|
|
67
52
|
for (const unit of document.units) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { narrativeTypes } from "@hypit/narrative";
|
|
2
|
-
import {
|
|
2
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
3
3
|
import { sealGraphFragment } from "@hypit/elaborator";
|
|
4
4
|
|
|
5
5
|
import { captionProducers, captionTypes } from "./manifest.js";
|
|
@@ -10,17 +10,13 @@ const operation = (id: string) => ({ kind: "fragment-operation" as const, operat
|
|
|
10
10
|
export const captionTimingFragment = sealGraphFragment({
|
|
11
11
|
inputs: [
|
|
12
12
|
{ name: "document", type: narrativeTypes.captionDocument },
|
|
13
|
-
{ name: "
|
|
14
|
-
{ name: "program", type: captionTypes.program },
|
|
13
|
+
{ name: "timeline", type: timelineTypes.track },
|
|
15
14
|
],
|
|
16
15
|
operations: [{
|
|
17
16
|
id: "temporalize-caption-document",
|
|
18
17
|
producer: captionProducers.temporalizeDocument,
|
|
19
|
-
inputs: { document: input("document"),
|
|
18
|
+
inputs: { document: input("document"), timeline: input("timeline") },
|
|
20
19
|
result: { kind: "output", name: "caption" },
|
|
21
20
|
}],
|
|
22
21
|
exports: [{ name: "caption", type: captionTypes.timedProjection, root: operation("temporalize-caption-document") }],
|
|
23
22
|
});
|
|
24
|
-
|
|
25
|
-
/** Kept as the fragment's public name for callers that only know the old export. */
|
|
26
|
-
export const plannedCaptionTimingFragment = captionTimingFragment;
|
|
@@ -8,7 +8,7 @@ export {
|
|
|
8
8
|
export type { CaptionUnitSubset } from "./display.js";
|
|
9
9
|
export { captionWordsForAttribute } from "./display.js";
|
|
10
10
|
export { captionComponent } from "./component.js";
|
|
11
|
-
export { captionTimingFragment
|
|
11
|
+
export { captionTimingFragment } from "./fragment.js";
|
|
12
12
|
export {
|
|
13
13
|
captionProgramSchema,
|
|
14
14
|
captionStyleSchema,
|
|
@@ -19,15 +19,16 @@ export {
|
|
|
19
19
|
captionProducers,
|
|
20
20
|
captionTypes,
|
|
21
21
|
} from "./manifest.js";
|
|
22
|
-
export {
|
|
22
|
+
export { decodeHiddenCaptionStyleSurface } from "./surface.js";
|
|
23
23
|
export {
|
|
24
24
|
assertCaptionProgram,
|
|
25
25
|
assertCaptionProgramForDocument,
|
|
26
26
|
assertCaptionStyle,
|
|
27
|
-
|
|
27
|
+
appendCaptionUse,
|
|
28
28
|
sealCaptionProgram,
|
|
29
29
|
sealCaptionStyle,
|
|
30
30
|
} from "./style.js";
|
|
31
|
-
export
|
|
32
|
-
export { applyCaptionMute, assertTimedCaptionProjection, temporalizeCaptionDocument } from "./temporalize.js";
|
|
31
|
+
export { assertTimedCaptionProjection, temporalizeCaptionDocument } from "./temporalize.js";
|
|
33
32
|
export type * from "./types.js";
|
|
33
|
+
|
|
34
|
+
export { captionUseVisibility } from "./visibility.js";
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { temporalDependency, temporalTypes, temporalWindowSchema } from "@hypit/temporal";
|
|
1
2
|
import { narrativeDependency, narrativeTypes } from "@hypit/narrative";
|
|
2
|
-
import {
|
|
3
|
+
import { timelineDependency, timelineTypes } from "@hypit/timeline";
|
|
3
4
|
import type { ModuleManifest, ProducerRef, TypeRef, ValueSchema } from "@hypit/protocol";
|
|
4
5
|
|
|
5
6
|
export const captionModuleRef = { name: "@hypit/caption", version: "1" } as const;
|
|
6
7
|
export const captionProducers = {
|
|
8
|
+
create: { module: captionModuleRef, name: "create-caption-uses" },
|
|
9
|
+
append: { module: captionModuleRef, name: "append-caption-use" },
|
|
7
10
|
temporalizeDocument: { module: captionModuleRef, name: "temporalize-caption-document" },
|
|
8
11
|
} satisfies Record<string, ProducerRef>;
|
|
9
12
|
export const captionTypes = {
|
|
13
|
+
header: { module: captionModuleRef, name: "CaptionTrackSpec" },
|
|
14
|
+
filter: { module: captionModuleRef, name: "CaptionContentFilter" },
|
|
10
15
|
style: { module: captionModuleRef, name: "CaptionStyle" },
|
|
11
16
|
program: { module: captionModuleRef, name: "CaptionProgram" },
|
|
12
17
|
timedProjection: { module: captionModuleRef, name: "TimedCaptionProjection" },
|
|
@@ -17,21 +22,17 @@ const integer = { kind: "number", integer: true, minimum: 0 } as const;
|
|
|
17
22
|
const object = (fields: Readonly<Record<string, { readonly schema: ValueSchema; readonly optional?: boolean }>>): ValueSchema => ({ kind: "object", fields });
|
|
18
23
|
export const captionStyleSchema: ValueSchema = object({
|
|
19
24
|
id: { schema: string },
|
|
20
|
-
rendering: { schema: object({
|
|
25
|
+
rendering: { schema: { kind: "oneOf", variants: [{ kind: "null" }, object({
|
|
21
26
|
family: { schema: string },
|
|
22
27
|
parameters: { schema: { kind: "object", fields: {}, allowUnknown: true } },
|
|
23
|
-
}) },
|
|
28
|
+
})] } },
|
|
24
29
|
});
|
|
25
30
|
export const captionProgramSchema: ValueSchema = object({
|
|
26
31
|
id: { schema: string }, documentId: { schema: string },
|
|
27
|
-
styles: { schema: { kind: "array",
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
styles: { schema: { kind: "array", items: captionStyleSchema } },
|
|
33
|
+
uses: { schema: { kind: "array", items: object({
|
|
34
|
+
window: { schema: temporalWindowSchema }, styleId: { schema: string }, role: { schema: string, optional: true },
|
|
30
35
|
}) } },
|
|
31
|
-
wordRuns: { schema: { kind: "array", items: object({
|
|
32
|
-
id: { schema: string }, styleId: { schema: string }, wordIds: { schema: { kind: "array", minItems: 1, items: string } },
|
|
33
|
-
}) } },
|
|
34
|
-
mutedUnitIds: { schema: { kind: "array", items: string } },
|
|
35
36
|
});
|
|
36
37
|
const timedUnit = object({ unitId: { schema: string }, startFrame: { schema: integer }, endFrameExclusive: { schema: integer } });
|
|
37
38
|
export const timedCaptionProjectionSchema: ValueSchema = object({
|
|
@@ -39,58 +40,40 @@ export const timedCaptionProjectionSchema: ValueSchema = object({
|
|
|
39
40
|
narrativeId: { schema: string },
|
|
40
41
|
documentId: { schema: string },
|
|
41
42
|
cues: { schema: { kind: "array", items: object({
|
|
42
|
-
id: { schema: string },
|
|
43
|
+
id: { schema: string }, startFrame: { schema: integer }, endFrameExclusive: { schema: integer },
|
|
43
44
|
units: { schema: { kind: "array", minItems: 1, items: timedUnit } },
|
|
44
45
|
}) } },
|
|
45
46
|
});
|
|
46
47
|
|
|
47
48
|
export const captionMarkupSurfaces = [{
|
|
48
|
-
name: "
|
|
49
|
+
name: "hidden", tag: "Hidden", mode: "structured", outputs: [captionTypes.style],
|
|
49
50
|
vocabulary: {
|
|
50
|
-
summary: "
|
|
51
|
-
attributes: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{ name: "narrative", kind: "reference", required: true, accepts: [narrativeTypes.narrative], summary: "The semantic anchor universe used to project selections." },
|
|
55
|
-
{ name: "default", kind: "reference", required: true, accepts: [captionTypes.style], summary: "The default Style." },
|
|
56
|
-
],
|
|
57
|
-
children: [
|
|
58
|
-
{ tag: "Use", cardinality: "many", summary: "Applies a complete Style by Role or semantic Selection, or supplies a word-attribute Style for a supporting family.", attributes: [
|
|
59
|
-
{ name: "style", kind: "reference", required: true, accepts: [captionTypes.style], summary: "The Style to apply." },
|
|
60
|
-
{ name: "role", kind: "literal", required: false, summary: "Selects all Caption units authored for this Role." },
|
|
61
|
-
{ name: "selection", kind: "reference", required: false, accepts: [narrativeTypes.selection], summary: "Selects complete Caption units contained by a semantic Selection." },
|
|
62
|
-
{ name: "attribute", kind: "literal", required: false, summary: "Selects display words carrying this Script-native attribute." },
|
|
63
|
-
] },
|
|
64
|
-
{ tag: "Mute", cardinality: "many", summary: "Hides selected complete Caption units.", attributes: [
|
|
65
|
-
{ name: "role", kind: "literal", required: false, summary: "Selects all Caption units authored for this Role." },
|
|
66
|
-
{ name: "selection", kind: "reference", required: false, accepts: [narrativeTypes.selection], summary: "Selects complete Caption units contained by a semantic Selection." },
|
|
67
|
-
] },
|
|
68
|
-
],
|
|
69
|
-
example: `<caption:Program id="captions" document={story.caption} narrative={story} default={plain}>
|
|
70
|
-
<caption:Use role="GUEST" style={guest}/>
|
|
71
|
-
<caption:Use selection={story.selection.answer} style={answer}/>
|
|
72
|
-
<caption:Mute selection={story.selection.demonstration}/>
|
|
73
|
-
</caption:Program>`,
|
|
74
|
-
notes: [
|
|
75
|
-
"Use selects exactly one of role, selection or attribute; Mute selects exactly one of role or selection.",
|
|
76
|
-
"For Role and Selection applications, the last matching Use in Source order selects the complete Style; properties are not merged.",
|
|
77
|
-
"Selections may cover a phrase, a whole Segment, several Segments or the program, preserving complete display/pronunciation units.",
|
|
78
|
-
"All Mute selections hide their words independently of Style order. They do not mute audio; the family still controls neighboring Cue lead and tail.",
|
|
79
|
-
"Word-attribute runs are separate from Role/Selection overrides and require a family that implements them; Fine does not. Conflicting Styles on one attributed word are rejected.",
|
|
80
|
-
],
|
|
51
|
+
summary: "Declares a Caption Style that contributes no rendering when selected by Use.",
|
|
52
|
+
attributes: [{ name: "id", kind: "identifier", required: true, summary: "Names the hidden Style." }],
|
|
53
|
+
example: '<caption:Hidden id="hidden"/>',
|
|
54
|
+
notes: ["Hidden is a complete Style choice; it uses ordinary Use precedence and changes no speech or semantic anchors."],
|
|
81
55
|
},
|
|
82
56
|
}] as const;
|
|
83
57
|
|
|
84
58
|
export const captionManifest: ModuleManifest = {
|
|
85
59
|
format: "hypit.module@1", name: captionModuleRef.name, version: captionModuleRef.version,
|
|
86
|
-
dependencies: [narrativeDependency,
|
|
60
|
+
dependencies: [narrativeDependency, timelineDependency, temporalDependency], types: [
|
|
61
|
+
{ name: captionTypes.header.name }, { name: captionTypes.filter.name },
|
|
87
62
|
{ name: captionTypes.style.name }, { name: captionTypes.program.name }, { name: captionTypes.timedProjection.name },
|
|
88
63
|
], capabilities: [], producers: [{
|
|
64
|
+
name: captionProducers.create.name,
|
|
65
|
+
inputs: [{ name: "document", type: narrativeTypes.captionDocument }, { name: "header", type: captionTypes.header }],
|
|
66
|
+
outputs: [{ name: "program", type: captionTypes.program }], needs: [],
|
|
67
|
+
}, {
|
|
68
|
+
name: captionProducers.append.name,
|
|
69
|
+
inputs: [{ name: "program", type: captionTypes.program }, { name: "window", type: temporalTypes.window },
|
|
70
|
+
{ name: "style", type: captionTypes.style }, { name: "filter", type: captionTypes.filter }],
|
|
71
|
+
outputs: [{ name: "program", type: captionTypes.program }], needs: [],
|
|
72
|
+
}, {
|
|
89
73
|
name: captionProducers.temporalizeDocument.name,
|
|
90
74
|
inputs: [
|
|
91
75
|
{ name: "document", type: narrativeTypes.captionDocument },
|
|
92
|
-
{ name: "
|
|
93
|
-
{ name: "program", type: captionTypes.program },
|
|
76
|
+
{ name: "timeline", type: timelineTypes.track },
|
|
94
77
|
],
|
|
95
78
|
outputs: [{ name: "caption", type: captionTypes.timedProjection }], needs: [],
|
|
96
79
|
}],
|