@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.
Files changed (449) hide show
  1. package/README.md +4 -2
  2. package/dist/public/caption.d.ts +206 -183
  3. package/dist/public/composition.d.ts +25 -3
  4. package/dist/public/endpoint-kit.d.ts +24 -2
  5. package/dist/public/generation.d.ts +5 -1
  6. package/dist/public/hyperframes.d.ts +19 -1
  7. package/dist/public/narrative.d.ts +17 -3
  8. package/dist/public/performance.d.ts +1590 -0
  9. package/dist/public/program-space.d.ts +179 -32
  10. package/dist/public/runtime-kit.d.ts +21 -8
  11. package/dist/public/sound.d.ts +822 -0
  12. package/dist/public/speech.d.ts +41 -0
  13. package/dist/public/studio-adapter.d.ts +77 -15
  14. package/dist/public/temporal-markup.d.ts +9 -44
  15. package/dist/public/temporal.d.ts +37 -28
  16. package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
  17. package/examples/README.md +18 -10
  18. package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
  19. package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
  20. package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
  21. package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
  22. package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
  23. package/examples/provider-package/README.md +78 -0
  24. package/examples/provider-package/hypit.runtime.json +12 -0
  25. package/examples/provider-package/packages/provider-images/package.json +11 -0
  26. package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
  27. package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
  28. package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
  29. package/examples/semantic-composition/README.md +6 -0
  30. package/examples/semantic-composition/chat.svml +6 -5
  31. package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
  32. package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
  33. package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
  34. package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
  35. package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
  36. package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
  37. package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
  38. package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
  39. package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
  40. package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
  41. package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
  42. package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
  43. package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
  44. package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
  45. package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
  46. package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
  47. package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
  48. package/package.json +32 -15
  49. package/packages/audio-track/README.md +20 -13
  50. package/packages/audio-track/package.json +1 -1
  51. package/packages/audio-track/src/component.ts +4 -4
  52. package/packages/audio-track/src/fragment.ts +6 -5
  53. package/packages/audio-track/src/index.ts +1 -1
  54. package/packages/audio-track/src/manifest.ts +17 -16
  55. package/packages/audio-track/src/program.ts +21 -25
  56. package/packages/audio-track/src/surface.ts +19 -18
  57. package/packages/audio-track-studio/README.md +23 -0
  58. package/packages/audio-track-studio/src/index.ts +28 -17
  59. package/packages/author-kit/README.md +1 -1
  60. package/packages/background-removal/README.md +4 -7
  61. package/packages/browser-capture/package.json +1 -1
  62. package/packages/build-result/README.md +11 -0
  63. package/packages/build-result/src/decode.ts +2 -0
  64. package/packages/build-result/src/execution-log.ts +17 -0
  65. package/packages/build-result/src/index.ts +1 -0
  66. package/packages/build-result/src/store.ts +14 -1
  67. package/packages/build-result/src/types.ts +3 -0
  68. package/packages/build-result-s3/src/repository.ts +4 -0
  69. package/packages/caption/README.md +61 -73
  70. package/packages/caption/package.json +3 -2
  71. package/packages/caption/src/activation.ts +2 -2
  72. package/packages/caption/src/component.ts +20 -5
  73. package/packages/caption/src/display.ts +3 -18
  74. package/packages/caption/src/fragment.ts +3 -7
  75. package/packages/caption/src/index.ts +6 -5
  76. package/packages/caption/src/manifest.ts +29 -46
  77. package/packages/caption/src/style.ts +24 -135
  78. package/packages/caption/src/surface.ts +12 -92
  79. package/packages/caption/src/temporalize.ts +18 -53
  80. package/packages/caption/src/types.ts +8 -35
  81. package/packages/caption/src/visibility.ts +23 -0
  82. package/packages/caption-fine/README.md +14 -9
  83. package/packages/caption-fine/package.json +4 -2
  84. package/packages/caption-fine/src/component.ts +3 -3
  85. package/packages/caption-fine/src/fragment.ts +7 -19
  86. package/packages/caption-fine/src/index.ts +2 -0
  87. package/packages/caption-fine/src/manifest.ts +26 -17
  88. package/packages/caption-fine/src/recipe.ts +7 -0
  89. package/packages/caption-fine/src/render.ts +14 -13
  90. package/packages/caption-fine/src/schedule.ts +39 -35
  91. package/packages/caption-fine/src/style.ts +10 -9
  92. package/packages/caption-fine/src/surface.ts +62 -35
  93. package/packages/caption-fine/src/types.ts +2 -0
  94. package/packages/caption-fine-studio/README.md +24 -2
  95. package/packages/caption-fine-studio/package.json +3 -1
  96. package/packages/caption-fine-studio/src/activation.ts +3 -3
  97. package/packages/caption-fine-studio/src/index.ts +54 -42
  98. package/packages/cli/README.md +57 -4
  99. package/packages/cli/package.json +1 -0
  100. package/packages/cli/src/arguments.ts +25 -6
  101. package/packages/cli/src/build-planning.ts +3 -2
  102. package/packages/cli/src/command.ts +6 -0
  103. package/packages/cli/src/commands/environment.ts +28 -18
  104. package/packages/cli/src/commands/execution.ts +81 -26
  105. package/packages/cli/src/commands/results.ts +7 -11
  106. package/packages/cli/src/index.ts +2 -2
  107. package/packages/cli/src/machine-view.ts +3 -2
  108. package/packages/cli/src/main.ts +34 -42
  109. package/packages/cli/src/observation.ts +7 -1
  110. package/packages/cli/src/output.ts +65 -23
  111. package/packages/cli/src/view.ts +64 -18
  112. package/packages/comment-sticker/README.md +3 -3
  113. package/packages/comment-sticker/package.json +1 -1
  114. package/packages/comment-sticker/src/component.ts +4 -4
  115. package/packages/comment-sticker/src/fragment.ts +5 -4
  116. package/packages/comment-sticker/src/manifest.ts +7 -6
  117. package/packages/comment-sticker/src/program.ts +9 -9
  118. package/packages/comment-sticker/src/surface.ts +6 -7
  119. package/packages/composition/README.md +21 -0
  120. package/packages/composition/src/audio-presentation.ts +44 -0
  121. package/packages/composition/src/index.ts +3 -0
  122. package/packages/composition/src/schema.ts +8 -3
  123. package/packages/composition/src/track.ts +15 -1
  124. package/packages/credential-store-env/README.md +1 -1
  125. package/packages/deck-track/README.md +3 -3
  126. package/packages/deck-track/package.json +1 -1
  127. package/packages/deck-track/src/component.ts +5 -5
  128. package/packages/deck-track/src/fragment.ts +6 -5
  129. package/packages/deck-track/src/lower.ts +12 -12
  130. package/packages/deck-track/src/manifest.ts +8 -7
  131. package/packages/deck-track/src/program.ts +13 -16
  132. package/packages/deck-track/src/surface.ts +9 -10
  133. package/packages/driver-node/src/driver.ts +41 -3
  134. package/packages/elevenlabs-speech/README.md +27 -0
  135. package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
  136. package/packages/elevenlabs-speech/src/activation.ts +26 -0
  137. package/packages/elevenlabs-speech/src/fragment.ts +11 -0
  138. package/packages/elevenlabs-speech/src/index.ts +111 -0
  139. package/packages/elevenlabs-speech/src/surface.ts +167 -0
  140. package/packages/endpoint-kit/README.md +24 -0
  141. package/packages/endpoint-kit/src/index.ts +7 -1
  142. package/packages/film/README.md +12 -7
  143. package/packages/film/package.json +1 -1
  144. package/packages/film/src/component.ts +4 -4
  145. package/packages/film/src/fragment.ts +6 -5
  146. package/packages/film/src/manifest.ts +11 -10
  147. package/packages/film/src/program.ts +5 -5
  148. package/packages/film/src/recipe.ts +2 -1
  149. package/packages/film/src/surface.ts +6 -6
  150. package/packages/film-studio/package.json +1 -1
  151. package/packages/film-studio/src/index.ts +2 -2
  152. package/packages/fishaudio-speech/README.md +33 -0
  153. package/packages/fishaudio-speech/package.json +21 -0
  154. package/packages/fishaudio-speech/src/activation.ts +32 -0
  155. package/packages/fishaudio-speech/src/fragment.ts +11 -0
  156. package/packages/fishaudio-speech/src/index.ts +156 -0
  157. package/packages/fishaudio-speech/src/surface.ts +192 -0
  158. package/packages/generation/README.md +11 -1
  159. package/packages/generation/src/mapping.ts +28 -30
  160. package/packages/gpt-image/README.md +1 -2
  161. package/packages/grok-imagine/README.md +1 -2
  162. package/packages/hyperframes/README.md +7 -3
  163. package/packages/hyperframes/src/browser-program.ts +11 -2
  164. package/packages/hyperframes/src/document.ts +15 -2
  165. package/packages/interview-emoji-reveal/README.md +4 -4
  166. package/packages/interview-emoji-reveal/package.json +1 -1
  167. package/packages/interview-emoji-reveal/src/component.ts +4 -4
  168. package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
  169. package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
  170. package/packages/interview-emoji-reveal/src/program.ts +14 -14
  171. package/packages/interview-emoji-reveal/src/surface.ts +8 -9
  172. package/packages/media-execution/README.md +7 -3
  173. package/packages/media-execution/src/audio-presentation.ts +23 -0
  174. package/packages/media-execution/src/execute.ts +2 -0
  175. package/packages/media-pipeline/README.md +7 -3
  176. package/packages/media-pipeline/src/audio-plan.ts +4 -1
  177. package/packages/media-pipeline/src/component.ts +16 -2
  178. package/packages/media-pipeline/src/manifest.ts +3 -1
  179. package/packages/media-pipeline/src/types.ts +2 -1
  180. package/packages/media-track/README.md +14 -47
  181. package/packages/media-track/package.json +1 -1
  182. package/packages/media-track/preview/preview.svml +5 -5
  183. package/packages/media-track/src/author.ts +12 -6
  184. package/packages/media-track/src/component.ts +10 -16
  185. package/packages/media-track/src/fragment.ts +8 -7
  186. package/packages/media-track/src/index.ts +3 -1
  187. package/packages/media-track/src/lower.ts +7 -7
  188. package/packages/media-track/src/manifest.ts +16 -38
  189. package/packages/media-track/src/program.ts +62 -67
  190. package/packages/media-track/src/sampling.ts +6 -6
  191. package/packages/media-track/src/sequence.ts +8 -8
  192. package/packages/media-track/src/surface.ts +25 -43
  193. package/packages/media-track-studio/README.md +9 -0
  194. package/packages/media-track-studio/src/index.ts +16 -11
  195. package/packages/mimo-speech/README.md +1 -1
  196. package/packages/minimax-h3/README.md +1 -1
  197. package/packages/nano-banana/README.md +1 -1
  198. package/packages/narrative/README.md +23 -1
  199. package/packages/narrative/src/identity.ts +11 -0
  200. package/packages/narrative/src/index.ts +3 -0
  201. package/packages/narrative/src/schema.ts +28 -27
  202. package/packages/narrative/src/selection.ts +52 -0
  203. package/packages/narrative/src/types.ts +2 -0
  204. package/packages/package-loader-node/README.md +30 -0
  205. package/packages/package-loader-node/package.json +5 -2
  206. package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
  207. package/packages/package-loader-node/src/index.ts +1 -0
  208. package/packages/package-loader-node/src/loader.ts +12 -15
  209. package/packages/package-loader-node/src/location.ts +27 -1
  210. package/packages/package-loader-node/src/module-scope.ts +183 -0
  211. package/packages/package-loader-node/src/types.ts +4 -0
  212. package/packages/performance/README.md +83 -0
  213. package/packages/performance/package.json +30 -0
  214. package/packages/performance/src/activation.ts +11 -0
  215. package/packages/performance/src/component.ts +46 -0
  216. package/packages/performance/src/index.ts +6 -0
  217. package/packages/performance/src/manifest.ts +53 -0
  218. package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
  219. package/packages/performance/src/program.ts +51 -0
  220. package/packages/performance/src/style.ts +35 -0
  221. package/packages/performance/src/surface.ts +99 -0
  222. package/packages/performance-studio/README.md +25 -0
  223. package/packages/performance-studio/package.json +21 -0
  224. package/packages/performance-studio/src/activation.ts +6 -0
  225. package/packages/performance-studio/src/index.ts +84 -0
  226. package/packages/program-space/README.md +9 -18
  227. package/packages/program-space/src/activation.ts +1 -5
  228. package/packages/program-space/src/index.ts +2 -11
  229. package/packages/program-space/src/surface.ts +1 -20
  230. package/packages/project-context-node/README.md +20 -0
  231. package/packages/project-context-node/package.json +10 -0
  232. package/packages/project-context-node/src/index.ts +3 -0
  233. package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
  234. package/packages/provider-hyperframes-local/README.md +43 -15
  235. package/packages/provider-hyperframes-local/src/activation.ts +4 -3
  236. package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
  237. package/packages/provider-hyperframes-local/src/capture.ts +96 -26
  238. package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
  239. package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
  240. package/packages/provider-hyperframes-local/src/options.ts +2 -0
  241. package/packages/provider-hyperframes-local/src/program.ts +6 -3
  242. package/packages/provider-hyperframes-local/src/progress.ts +53 -0
  243. package/packages/provider-hyperframes-local/src/provider.ts +18 -5
  244. package/packages/provider-hyperframes-local/src/render.ts +48 -7
  245. package/packages/provider-hypihub/README.md +48 -17
  246. package/packages/provider-hypihub/package.json +2 -0
  247. package/packages/provider-hypihub/src/mapping.ts +31 -7
  248. package/packages/provider-hypihub/src/oauth.ts +6 -0
  249. package/packages/provider-hypihub/src/provider.ts +25 -13
  250. package/packages/provider-hypihub/src/routes.ts +1 -2
  251. package/packages/provider-hypihub/src/upload.ts +2 -0
  252. package/packages/provider-media-local/README.md +3 -4
  253. package/packages/provider-whisperx-local/src/program.ts +1 -0
  254. package/packages/provider-whisperx-local/src/provider.ts +3 -0
  255. package/packages/ranking/README.md +8 -6
  256. package/packages/ranking/package.json +1 -1
  257. package/packages/ranking/src/component.ts +6 -6
  258. package/packages/ranking/src/fragment.ts +11 -7
  259. package/packages/ranking/src/manifest.ts +21 -14
  260. package/packages/ranking/src/render.ts +22 -26
  261. package/packages/ranking/src/schedule.ts +16 -19
  262. package/packages/ranking/src/surface.ts +12 -13
  263. package/packages/ranking-studio/README.md +18 -0
  264. package/packages/ranking-studio/src/index.ts +61 -9
  265. package/packages/render-hyperframes/README.md +7 -7
  266. package/packages/render-hyperframes/package.json +1 -1
  267. package/packages/render-hyperframes/src/component.ts +11 -1
  268. package/packages/render-hyperframes/src/fragment.ts +7 -4
  269. package/packages/render-hyperframes/src/manifest.ts +4 -4
  270. package/packages/render-hyperframes/src/surface.ts +6 -6
  271. package/packages/runtime/README.md +8 -1
  272. package/packages/runtime/src/execution.ts +15 -4
  273. package/packages/runtime/src/index.ts +2 -1
  274. package/packages/runtime/src/log.ts +51 -0
  275. package/packages/runtime/src/types.ts +5 -8
  276. package/packages/runtime-host-node/README.md +30 -0
  277. package/packages/runtime-host-node/package.json +1 -0
  278. package/packages/runtime-host-node/src/index.ts +24 -9
  279. package/packages/runtime-host-node/src/packages.ts +47 -50
  280. package/packages/runtime-kit/README.md +5 -0
  281. package/packages/runtime-kit/src/index.ts +3 -1
  282. package/packages/runtime-local/README.md +92 -4
  283. package/packages/runtime-local/src/config.ts +202 -56
  284. package/packages/runtime-local/src/control.ts +9 -1
  285. package/packages/runtime-local/src/executor.ts +66 -0
  286. package/packages/runtime-local/src/host.ts +37 -17
  287. package/packages/runtime-local/src/log.ts +48 -0
  288. package/packages/runtime-local/src/programs.ts +2 -1
  289. package/packages/runtime-local/src/result-writer.ts +2 -0
  290. package/packages/runtime-local/src/runtime.ts +8 -6
  291. package/packages/runtime-local/src/supervisor.ts +142 -0
  292. package/packages/runtime-local/src/types.ts +9 -2
  293. package/packages/runtime-local/src/worker-process.ts +7 -24
  294. package/packages/runtime-local/src/worker.ts +55 -83
  295. package/packages/screen-overlay/README.md +3 -3
  296. package/packages/screen-overlay/package.json +1 -1
  297. package/packages/screen-overlay/src/component.ts +3 -3
  298. package/packages/screen-overlay/src/fragment.ts +5 -4
  299. package/packages/screen-overlay/src/manifest.ts +7 -6
  300. package/packages/screen-overlay/src/program.ts +9 -9
  301. package/packages/screen-overlay/src/surface.ts +6 -7
  302. package/packages/script/README.md +15 -2
  303. package/packages/script/src/manifest.ts +2 -2
  304. package/packages/script/src/narrative.ts +1 -0
  305. package/packages/script/src/surface.ts +4 -3
  306. package/packages/script/src/types.ts +1 -1
  307. package/packages/script-studio/package.json +9 -3
  308. package/packages/script-studio/src/index.ts +2 -0
  309. package/packages/script-studio/src/projection.ts +105 -0
  310. package/packages/seedance/README.md +30 -1
  311. package/packages/seedance/src/index.ts +18 -7
  312. package/packages/seedance/src/surface.ts +17 -4
  313. package/packages/seedance-kits/README.md +7 -1
  314. package/packages/seedream/README.md +1 -1
  315. package/packages/sound/README.md +81 -0
  316. package/packages/sound/package.json +25 -0
  317. package/packages/sound/src/activation.ts +11 -0
  318. package/packages/sound/src/component.ts +28 -0
  319. package/packages/sound/src/index.ts +5 -0
  320. package/packages/sound/src/manifest.ts +47 -0
  321. package/packages/sound/src/program.ts +84 -0
  322. package/packages/sound/src/style.ts +34 -0
  323. package/packages/sound/src/surface.ts +90 -0
  324. package/packages/sound-studio/README.md +22 -0
  325. package/packages/sound-studio/package.json +20 -0
  326. package/packages/sound-studio/src/activation.ts +6 -0
  327. package/packages/sound-studio/src/index.ts +74 -0
  328. package/packages/speech/README.md +2 -2
  329. package/packages/speech-alignment/src/local.ts +8 -0
  330. package/packages/speech-alignment/src/locate.ts +1 -1
  331. package/packages/store-sqlite/README.md +7 -0
  332. package/packages/store-sqlite/src/store.ts +84 -83
  333. package/packages/studio/INSPECTOR.md +15 -2
  334. package/packages/studio/README.md +88 -14
  335. package/packages/studio/package.json +8 -7
  336. package/packages/studio/src/companion-assembly.ts +1 -0
  337. package/packages/studio/src/domain.ts +1 -1
  338. package/packages/studio/src/fallback-companions.ts +3 -3
  339. package/packages/studio/src/feedback-server.ts +51 -0
  340. package/packages/studio/src/feedback-store.ts +66 -0
  341. package/packages/studio/src/feedback.ts +60 -0
  342. package/packages/studio/src/parameter-values.ts +43 -1
  343. package/packages/studio/src/parameters.ts +114 -24
  344. package/packages/studio/src/preview/render.ts +5 -1
  345. package/packages/studio/src/preview/runtime-shim.ts +49 -3
  346. package/packages/studio/src/programme.ts +14 -30
  347. package/packages/studio/src/server.ts +10 -6
  348. package/packages/studio/src/shared.ts +4 -2
  349. package/packages/studio/src/snapshot.ts +21 -132
  350. package/packages/studio/src/studio-preflight.ts +3 -3
  351. package/packages/studio/src/studio-registry.ts +50 -6
  352. package/packages/studio/src/style.css +209 -48
  353. package/packages/studio/src/ui/comments.ts +233 -0
  354. package/packages/studio/src/ui/icons.ts +5 -0
  355. package/packages/studio/src/ui/main.ts +145 -86
  356. package/packages/studio/src/ui/overlay.ts +12 -8
  357. package/packages/studio/src/ui/scrub-preview.ts +108 -0
  358. package/packages/studio/src/ui/stage.ts +67 -4
  359. package/packages/studio/src/ui/timeline.ts +177 -108
  360. package/packages/studio/start.ts +4 -2
  361. package/packages/studio-adapter/README.md +130 -11
  362. package/packages/studio-adapter/src/index.ts +100 -13
  363. package/packages/temporal/README.md +6 -6
  364. package/packages/temporal/package.json +1 -1
  365. package/packages/temporal/src/component.ts +5 -6
  366. package/packages/temporal/src/index.ts +8 -6
  367. package/packages/temporal/src/location.ts +11 -11
  368. package/packages/temporal/src/projection.ts +19 -19
  369. package/packages/temporal/src/rational.ts +4 -4
  370. package/packages/temporal-markup/EDITING.md +2 -2
  371. package/packages/temporal-markup/README.md +27 -11
  372. package/packages/temporal-markup/package.json +1 -1
  373. package/packages/temporal-markup/src/index.ts +20 -25
  374. package/packages/temporal-markup/src/space.ts +10 -41
  375. package/packages/timeline/README.md +31 -0
  376. package/packages/{semantic-track → timeline}/package.json +1 -1
  377. package/packages/timeline/src/activation.ts +8 -0
  378. package/packages/timeline/src/component.ts +24 -0
  379. package/packages/timeline/src/identity.ts +60 -0
  380. package/packages/timeline/src/index.ts +6 -0
  381. package/packages/{semantic-track → timeline}/src/location.ts +20 -20
  382. package/packages/timeline/src/manifest.ts +39 -0
  383. package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
  384. package/packages/timeline/src/types.ts +24 -0
  385. package/packages/timeline-author/README.md +68 -0
  386. package/packages/{speech-track → timeline-author}/package.json +6 -4
  387. package/packages/timeline-author/src/activation.ts +22 -0
  388. package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
  389. package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
  390. package/packages/timeline-author/src/index.ts +7 -0
  391. package/packages/timeline-author/src/manifest.ts +78 -0
  392. package/packages/timeline-author/src/program.ts +107 -0
  393. package/packages/timeline-author/src/surface.ts +46 -0
  394. package/packages/timeline-author/src/types.ts +6 -0
  395. package/packages/typography-track/README.md +4 -4
  396. package/packages/typography-track/package.json +1 -1
  397. package/packages/typography-track/src/component.ts +4 -4
  398. package/packages/typography-track/src/fragment.ts +4 -3
  399. package/packages/typography-track/src/manifest.ts +11 -9
  400. package/packages/typography-track/src/program.ts +15 -15
  401. package/packages/typography-track/src/surface.ts +17 -18
  402. package/packages/video-cli/README.md +4 -1
  403. package/packages/video-cli/package.json +2 -1
  404. package/packages/video-cli/src/creation.ts +14 -4
  405. package/packages/video-cli/src/index.ts +1 -1
  406. package/packages/video-cli/src/studio-distribution.ts +2 -1
  407. package/packages/volcengine-matting/README.md +3 -3
  408. package/packages/whisperx/README.md +1 -1
  409. package/services/whisperx/README.md +14 -0
  410. package/services/whisperx/pyproject.toml +2 -0
  411. package/services/whisperx/uv.lock +20 -20
  412. package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
  413. package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
  414. package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
  415. package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
  416. package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
  417. package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
  418. package/packages/provider-kie/README.md +0 -134
  419. package/packages/provider-kie/package.json +0 -43
  420. package/packages/provider-kie/src/activation.ts +0 -71
  421. package/packages/provider-kie/src/index.ts +0 -10
  422. package/packages/provider-kie/src/mapping.ts +0 -182
  423. package/packages/provider-kie/src/provider.ts +0 -657
  424. package/packages/provider-kie/src/routes.ts +0 -150
  425. package/packages/provider-xiaomi-mimo/README.md +0 -32
  426. package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
  427. package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
  428. package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
  429. package/packages/runtime/src/environment.ts +0 -6
  430. package/packages/semantic-track/README.md +0 -21
  431. package/packages/semantic-track/src/activation.ts +0 -8
  432. package/packages/semantic-track/src/component.ts +0 -24
  433. package/packages/semantic-track/src/identity.ts +0 -58
  434. package/packages/semantic-track/src/index.ts +0 -6
  435. package/packages/semantic-track/src/manifest.ts +0 -38
  436. package/packages/semantic-track/src/types.ts +0 -26
  437. package/packages/speech-track/README.md +0 -51
  438. package/packages/speech-track/src/activation.ts +0 -19
  439. package/packages/speech-track/src/index.ts +0 -7
  440. package/packages/speech-track/src/manifest.ts +0 -73
  441. package/packages/speech-track/src/program.ts +0 -64
  442. package/packages/speech-track/src/surface.ts +0 -35
  443. package/packages/speech-track/src/types.ts +0 -6
  444. package/packages/speech-track-studio/README.md +0 -3
  445. package/packages/speech-track-studio/package.json +0 -14
  446. package/packages/speech-track-studio/src/activation.ts +0 -7
  447. package/packages/speech-track-studio/src/index.ts +0 -40
  448. /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
  449. /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
@@ -0,0 +1,122 @@
1
+ import { canonicalize, defineEndpointPackage, wakeAfter } from "@hypit/hypit/endpoint-kit";
2
+ import type { AsyncEndpoint, CredentialRef, EndpointRequest } from "@hypit/hypit/endpoint-kit";
3
+ import { compileWireRequest, generationTypes, sealGeneratedImageSet } from "@hypit/hypit/generation";
4
+ import type { GenerationRequest, GenerationWireMapping } from "@hypit/hypit/generation";
5
+
6
+ export const providerModule = { name: "@example/provider-images", version: "1" } as const;
7
+ export const capability = { module: { name: "@hypit/gpt-image", version: "1" }, name: "gpt-image-2" } as const;
8
+
9
+ // This example service implements only this subset of the model. Its API is described in README.
10
+ const mapping: GenerationWireMapping = {
11
+ capability, result: "image", routes: [{ model: "gpt-image-2" }],
12
+ fields: {
13
+ prompt: { as: "value", field: "prompt" },
14
+ aspectRatio: { as: "value", field: "ratio" },
15
+ resolution: { as: "value", field: "size" },
16
+ images: { as: "urlArray", field: "references" },
17
+ },
18
+ };
19
+
20
+ function object(value: unknown): Record<string, unknown> {
21
+ if (value === null || typeof value !== "object" || Array.isArray(value)) throw new Error("Expected service object");
22
+ return value as Record<string, unknown>;
23
+ }
24
+ function text(value: unknown): string {
25
+ if (typeof value !== "string" || value.length === 0) throw new Error("Expected nonempty service text");
26
+ return value;
27
+ }
28
+ function address(value: string): string {
29
+ const url = new URL(value);
30
+ if (url.protocol !== "https:" && !(url.protocol === "http:" && ["localhost", "127.0.0.1"].includes(url.hostname))) {
31
+ throw new Error("Service URLs require HTTPS or loopback HTTP");
32
+ }
33
+ return url.href;
34
+ }
35
+
36
+ function support(request: EndpointRequest) {
37
+ const ports = (request.constraints as unknown as GenerationRequest).ports;
38
+ const unsupported = ports.resolution?.[0] !== "1K"
39
+ || !["1:1", "9:16", "16:9"].includes(String(ports.aspectRatio?.[0]))
40
+ || Object.keys(ports).some((port) => !(port in mapping.fields))
41
+ || request.pendingInputs?.some((slot) => !(slot.input in mapping.fields));
42
+ return unsupported
43
+ ? { status: "unsupported" as const, reason: "This service offers 1K at 1:1, 9:16 or 16:9, without background control" }
44
+ : { status: "supported" as const };
45
+ }
46
+
47
+ export function createImageProvider(options: {
48
+ instance: string; pool: string; baseUrl: string; apiKey: CredentialRef;
49
+ concurrency?: number; pollIntervalMs?: number; fetch?: typeof globalThis.fetch;
50
+ }) {
51
+ const base = address(options.baseUrl).replace(/\/$/u, "");
52
+ const fetcher = options.fetch ?? globalThis.fetch;
53
+ const interval = options.pollIntervalMs ?? 2_000;
54
+ const key = (credentials: Readonly<Record<string, { secret: string }>>) => text(credentials.apiKey?.secret);
55
+ async function json(path: string, secret: string, init: RequestInit = {}) {
56
+ const response = await fetcher(`${base}${path}`, {
57
+ ...init, headers: { ...init.headers, authorization: `Bearer ${secret}` },
58
+ signal: AbortSignal.timeout(30_000),
59
+ });
60
+ if (!response.ok) throw new Error(`Image service ${path} returned HTTP ${response.status}`);
61
+ return object(await response.json());
62
+ }
63
+ const endpoint: AsyncEndpoint = {
64
+ async start(context) {
65
+ const supported = support(context.need);
66
+ if (supported.status === "unsupported") throw new Error(supported.reason);
67
+ const secret = key(context.credentials);
68
+ const request = await compileWireRequest(mapping, context.need.constraints as unknown as GenerationRequest,
69
+ async (artifact) => {
70
+ const bytes = await context.resources.get(artifact.resource);
71
+ if (bytes === undefined) throw new Error("Reference image is unavailable");
72
+ const upload = await json("/uploads", secret, {
73
+ method: "POST", headers: { "content-type": artifact.mediaType }, body: new Blob([new Uint8Array(bytes)]),
74
+ });
75
+ return address(text(upload.url));
76
+ });
77
+ const task = await json("/tasks", secret, {
78
+ method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(request),
79
+ });
80
+ const id = text(task.id), handle = { id }, receipt = { id };
81
+ await context.checkpoint?.({ handle, receipt });
82
+ return { ...wakeAfter(handle, interval), receipt };
83
+ },
84
+ async poll(context) {
85
+ const id = text(object(context.handle).id);
86
+ const task = await json(`/tasks/${encodeURIComponent(id)}`, key(context.credentials));
87
+ if (task.state === "queued" || task.state === "running") {
88
+ return wakeAfter({ id }, interval, Date.now(), { phase: task.state });
89
+ }
90
+ if (task.state === "failed") return {
91
+ status: "failed", failure: { code: "IMAGE_SERVICE_FAILED", message: "Image service task failed" },
92
+ };
93
+ if (task.state !== "succeeded") throw new Error("Image service returned an unknown task state");
94
+ return { status: "ready", handle: { id, url: address(text(task.url)) } };
95
+ },
96
+ async collect(context) {
97
+ // The service returns a signed asset URL; account credentials go only to its API.
98
+ const url = address(text(object(context.handle).url));
99
+ const response = await fetcher(url, { signal: AbortSignal.timeout(60_000) });
100
+ if (!response.ok) throw new Error(`Image download returned HTTP ${response.status}`);
101
+ const mediaType = response.headers.get("content-type")?.split(";")[0]?.trim();
102
+ if (!mediaType?.startsWith("image/")) throw new Error("Image service returned a non-image result");
103
+ const artifact = await context.resources.put(new Uint8Array(await response.arrayBuffer()), mediaType);
104
+ return { status: "completed", result: { value: {
105
+ kind: "inline", value: canonicalize(sealGeneratedImageSet({ images: [artifact] })),
106
+ } } };
107
+ },
108
+ };
109
+ return defineEndpointPackage({
110
+ module: providerModule, facet: "images", instance: options.instance, pool: options.pool,
111
+ credentials: { apiKey: options.apiKey }, credentialInputs: { apiKey: { label: "Image service API key" } },
112
+ defaultConcurrency: options.concurrency ?? 1,
113
+ actionLimits: { submit: { concurrency: 1 }, poll: { concurrency: 4 }, collect: { concurrency: 1 } },
114
+ pricing: { kind: "page", url: `${base}/pricing` },
115
+ async readPricing(context) {
116
+ const source = `${base}/rates?model=gpt-image-2`;
117
+ const rates = await json("/rates?model=gpt-image-2", key(await context.credentials()));
118
+ return [{ source, data: canonicalize(rates), summary: text(rates.description) }];
119
+ },
120
+ capabilities: [{ capability, returns: generationTypes.imageSet, lifecycle: "asynchronous", supports: support, endpoint }],
121
+ });
122
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2023", "module": "NodeNext", "moduleResolution": "NodeNext",
4
+ "lib": ["ES2023", "DOM"], "strict": true, "noUncheckedIndexedAccess": true,
5
+ "exactOptionalPropertyTypes": true, "verbatimModuleSyntax": true,
6
+ "declaration": true, "rootDir": "src", "outDir": "dist", "skipLibCheck": true
7
+ },
8
+ "include": ["src/**/*.ts"]
9
+ }
@@ -33,3 +33,9 @@ there is no hosted generation account in this example. The final Output is `fina
33
33
  Run can be opened in Studio, where its component lane and physical clock work without a Script lane.
34
34
  For an independent project, install `@hypit/hypit`, copy the component into `packages/`, replace its workspace
35
35
  dependency with the installed Hypit version, and build the package normally.
36
+
37
+ ## Sound presentation Styles
38
+
39
+ `packages/sound-styles` defines a project crossfade with explicit outgoing and incoming Segments.
40
+ It uses Sound Uses over the same Timeline and preserves original source playback through the blend.
41
+ Its README explains authoring and the public fragment interface.
@@ -1,6 +1,6 @@
1
1
  <?svml using="@hypit/markup@1"?>
2
2
  <svml>
3
- <import as="time" from="@hypit/program-space@1"/>
3
+ <import as="time" from="@hypit/timeline-author@1"/>
4
4
  <import as="spatial" from="@hypit/spatial@1"/>
5
5
  <import as="fonts" from="@hypit/fonts-open@1"/>
6
6
  <import as="chat" from="@example/chat-scene@1"/>
@@ -8,18 +8,19 @@
8
8
  <import as="render" from="@hypit/render-hyperframes@1"/>
9
9
  <import as="style" source="./chat.svs"/>
10
10
 
11
- <time:Space id="animation" frame-rate="30" duration="8s"/>
11
+ <time:Clock id="animation-clock" frame-rate="30"/>
12
+ <time:Timeline id="animation" clock={animation-clock} end="8s"/>
12
13
  <spatial:Canvas id="canvas" width="540" height="960"/>
13
14
  <fonts:Stack id="font" family="inter" weight="600" style="normal"/>
14
- <chat:Scene id="conversation" space={animation} canvas={canvas} font={font}
15
+ <chat:Scene id="conversation" timeline={animation.timeline} canvas={canvas} font={font}
15
16
  during="program" title="Launch crew">
16
17
  <chat:Message id="question" sender="Maya" side="left" at="0.5s" text="Are we ready to launch?"/>
17
18
  <chat:Message id="reply" sender="Leo" side="right" at="2s" text="The video is ready."/>
18
19
  <chat:Message id="turn" sender="Maya" side="left" at="3.5s" text="Great. One tiny change..."/>
19
20
  <chat:Message id="reveal" sender="Leo" side="right" at="5.2s" text="I left the whole scene editable."/>
20
21
  </chat:Scene>
21
- <film:Film id="main" canvas={canvas} space={animation} appearance={style.film.main}>
22
+ <film:Film id="main" canvas={canvas} timeline={animation.timeline} appearance={style.film.main}>
22
23
  <film:Track source={conversation.track}/>
23
24
  </film:Film>
24
- <render:Video id="final" composition={main.composition} space={animation}/>
25
+ <render:Video id="final" composition={main.composition} timeline={animation.timeline}/>
25
26
  </svml>
@@ -6,20 +6,20 @@ Content lives in Source. Every Message has its own `at`; there is no fixed messa
6
6
  For speech-led work, bind the message to the words that introduce it:
7
7
 
8
8
  ```svml
9
- <chat:Scene id="conversation" semantic={speech.semantic} canvas={canvas} font={font}
9
+ <chat:Scene id="conversation" timeline={speech.timeline} canvas={canvas} font={font}
10
10
  during={story.selection.demo} title="Conversation">
11
11
  <chat:Message id="answer" sender="Maya" side="left" text="Here it is."
12
12
  at={story.moment.answer}/>
13
13
  </chat:Scene>
14
14
  ```
15
15
 
16
- The same component can receive `space={animation}` and `at="2s"` for authored animation. A Scene
16
+ The same component can receive a zero-Take `timeline={animation.timeline}` and `at="2s"` for authored animation. A Scene
17
17
  has an outer Window; its message Instants trigger persistent state. `entrance-frames` controls arrival
18
18
  and scrolling duration independently of those triggers (default 10). Messages stay visible or scroll
19
19
  up as the conversation develops. Message times are on the film clock and must fall inside the Scene.
20
20
 
21
21
  The Surface uses the shared temporal helpers and expands children to a finite create/append/render
22
- graph. The rendering function receives ProgramSpace, Window and Instants, so it knows nothing about
22
+ graph. The rendering function receives Timeline, Window and Instants, so it knows nothing about
23
23
  Script parsing, speech models or Runtime. The browser program evaluates any requested frame directly,
24
24
  including frames reached by scrubbing, range rendering or concurrent workers.
25
25
 
@@ -3,14 +3,13 @@ import type { ComponentPackage, FragmentOperation, ModuleManifest, StructuredSur
3
3
  import { compositionTypes } from "@hypit/hypit/composition";
4
4
  import { mediaTypes } from "@hypit/hypit/media";
5
5
  import type { FontStackRef } from "@hypit/hypit/media";
6
- import { programSpaceTypes } from "@hypit/hypit/program-space";
7
- import type { ProgramSpace } from "@hypit/hypit/program-space";
8
- import { semanticTrackTypes } from "@hypit/hypit/semantic-track";
6
+ import type { Timeline } from "@hypit/hypit/timeline";
7
+ import { timelineTypes } from "@hypit/hypit/timeline";
9
8
  import { spatialTypes } from "@hypit/hypit/spatial";
10
9
  import type { CanvasSpace } from "@hypit/hypit/spatial";
11
10
  import { assertTemporalInstantFor, temporalTypes } from "@hypit/hypit/temporal";
12
11
  import type { TemporalInstant, TemporalWindow } from "@hypit/hypit/temporal";
13
- import { createTemporalInstantProjection, createTemporalSpace, createTemporalWindowProjection, resolveTemporalContext,
12
+ import { createTemporalInstantProjection, createTemporalWindowProjection, resolveTemporalContext,
14
13
  temporalContextAttributeVocabulary, temporalInstantAttributeNames, temporalInstantAttributeVocabulary,
15
14
  temporalWindowAttributeNames, temporalWindowAttributeVocabulary } from "@hypit/hypit/temporal-markup";
16
15
  import { renderChat } from "./render.js";
@@ -20,14 +19,13 @@ const module = { name: "@example/chat-scene", version: "1" } as const;
20
19
  const types = Object.fromEntries(["Options", "Message", "Messages"].map(name => [name, { module, name }])) as Record<"Options" | "Message" | "Messages", TypeRef>;
21
20
  const producers = Object.fromEntries(["empty", "append", "render"].map(name => [name, { module, name }])) as Record<"empty" | "append" | "render", { module: typeof module; name: string }>;
22
21
  export const manifest: ModuleManifest = { format: "hypit.module@1", ...module,
23
- dependencies: [compositionTypes.visualTrack, mediaTypes.fontStack, programSpaceTypes.programSpace,
24
- semanticTrackTypes.track, spatialTypes.canvas, temporalTypes.instant].map(type => ({ module: type.module })),
22
+ dependencies: [compositionTypes.visualTrack, mediaTypes.fontStack, timelineTypes.track, spatialTypes.canvas, temporalTypes.instant].map(type => ({ module: type.module })),
25
23
  types: Object.values(types).map(type => ({ name: type.name })), capabilities: [], producers: [
26
24
  { name: "empty", inputs: [], outputs: [{ name: "messages", type: types.Messages }], needs: [] },
27
25
  { name: "append", inputs: [{ name: "messages", type: types.Messages }, { name: "message", type: types.Message },
28
- { name: "at", type: temporalTypes.instant }, { name: "space", type: programSpaceTypes.programSpace }], outputs: [{ name: "messages", type: types.Messages }], needs: [] },
26
+ { name: "at", type: temporalTypes.instant }, { name: "timeline", type: timelineTypes.track }], outputs: [{ name: "messages", type: types.Messages }], needs: [] },
29
27
  { name: "render", inputs: [{ name: "messages", type: types.Messages }, { name: "options", type: types.Options },
30
- { name: "space", type: programSpaceTypes.programSpace }, { name: "canvas", type: spatialTypes.canvas },
28
+ { name: "timeline", type: timelineTypes.track }, { name: "canvas", type: spatialTypes.canvas },
31
29
  { name: "window", type: temporalTypes.window }, { name: "font", type: mediaTypes.fontStack }], outputs: [{ name: "track", type: compositionTypes.visualTrack }], needs: [] },
32
30
  ],
33
31
  };
@@ -41,20 +39,19 @@ const component: ComponentPackage = { producers: [
41
39
  { producer: producers.append, handler: ({ inputs }) => {
42
40
  const message = inline<Omit<Message, "at">>(inputs.message), at = inline<TemporalInstant>(inputs.at);
43
41
  const messages = inline<Message[]>(inputs.messages);
44
- assertTemporalInstantFor(at, { subjectId: message.id, space: inline<ProgramSpace>(inputs.space) });
42
+ assertTemporalInstantFor(at, { subjectId: message.id, space: inline<Timeline>(inputs.timeline) });
45
43
  if (messages.some(item => item.id === message.id) || (messages.at(-1)?.at.frame ?? -1) > at.frame) throw new Error("Chat messages need unique ids and chronological arrival times.");
46
44
  return { outputs: { messages: value([...messages, { ...message, at }]) }, needs: {} };
47
45
  } },
48
- { producer: producers.render, handler: ({ inputs }) => ({ outputs: { track: value(renderChat(inline<ProgramSpace>(inputs.space),
46
+ { producer: producers.render, handler: ({ inputs }) => ({ outputs: { track: value(renderChat(inline<Timeline>(inputs.timeline),
49
47
  inline<CanvasSpace>(inputs.canvas), inline<TemporalWindow>(inputs.window), inline<FontStackRef>(inputs.font),
50
48
  inline<Message[]>(inputs.messages), inline<ChatOptions>(inputs.options))) }, needs: {} }) },
51
49
  ] };
52
50
 
53
51
  export const decodeSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
54
- assertAttributes(element, ["id", "semantic", "space", "canvas", "font", "title", "entrance-frames", ...temporalWindowAttributeNames]);
52
+ assertAttributes(element, ["id", "timeline", "canvas", "font", "title", "entrance-frames", ...temporalWindowAttributeNames]);
55
53
  const id = textAttribute(element, "id"), context = resolveTemporalContext({ element, resolveReference });
56
- const time = createTemporalSpace({ id, element, ...context });
57
- const window = createTemporalWindowProjection({ id: `${id}.window`, subjectId: id, element, ...context, space: time.space, resolveReference });
54
+ const window = createTemporalWindowProjection({ id: `${id}.window`, subjectId: id, element, ...context, resolveReference });
58
55
  const reference = (name: string, type: TypeRef): SurfaceResolvedReference => {
59
56
  const raw = element.attributes[name];
60
57
  if (typeof raw !== "object" || raw.kind !== "reference") throw new Error(`${name} must be a reference.`);
@@ -64,10 +61,10 @@ export const decodeSurface: StructuredSurfaceHandler = ({ element, resolveRefere
64
61
  };
65
62
  const options: ChatOptions = { id, title: textAttribute(element, "title"), entranceFrames: Number(element.attributes["entrance-frames"] ?? "10") };
66
63
  const records = [...window.records, { id: `${id}.options`, type: types.Options, value: value(options), range: element.range }];
67
- const components = [...time.components, ...window.components], fragments = [...time.fragments, ...window.fragments];
68
- const inputs = [{ name: "space", type: programSpaceTypes.programSpace }, { name: "canvas", type: spatialTypes.canvas },
64
+ const components = [...window.components], fragments = [...window.fragments];
65
+ const inputs = [{ name: "timeline", type: timelineTypes.track }, { name: "canvas", type: spatialTypes.canvas },
69
66
  { name: "font", type: mediaTypes.fontStack }, { name: "window", type: temporalTypes.window }, { name: "options", type: types.Options }];
70
- const bindings: Record<string, SurfaceResolvedReference["ref"]> = { space: time.space.ref, canvas: reference("canvas", spatialTypes.canvas).ref,
67
+ const bindings: Record<string, SurfaceResolvedReference["ref"]> = { timeline: context.timeline.ref, canvas: reference("canvas", spatialTypes.canvas).ref,
71
68
  font: reference("font", mediaTypes.fontStack).ref, window: window.ref, options: { kind: "record", id: `${id}.options` } };
72
69
  const input = (name: string) => ({ kind: "fragment-input" as const, name });
73
70
  const operation = (name: string) => ({ kind: "fragment-operation" as const, operation: name });
@@ -79,24 +76,24 @@ export const decodeSurface: StructuredSurfaceHandler = ({ element, resolveRefere
79
76
  assertAttributes(child, ["id", "sender", "text", "side", ...temporalInstantAttributeNames]); assertEmptyElement(child);
80
77
  const messageId = textAttribute(child, "id"), side = textAttribute(child, "side");
81
78
  if (side !== "left" && side !== "right") throw new Error("Message side must be left or right.");
82
- const at = createTemporalInstantProjection({ id: `${id}.${messageId}`, subjectId: messageId, element: child, ...context, space: time.space, resolveReference });
79
+ const at = createTemporalInstantProjection({ id: `${id}.${messageId}`, subjectId: messageId, element: child, ...context, resolveReference });
83
80
  records.push(...at.records); components.push(...at.components); fragments.push(...at.fragments);
84
81
  const key = `message-${++index}`;
85
82
  records.push({ id: `${id}.${key}`, type: types.Message, value: value({ id: messageId, sender: textAttribute(child, "sender"), text: textAttribute(child, "text"), side }), range: child.range });
86
83
  inputs.push({ name: key, type: types.Message }, { name: `${key}-at`, type: temporalTypes.instant });
87
84
  bindings[key] = { kind: "record", id: `${id}.${key}` }; bindings[`${key}-at`] = at.ref;
88
- operations.push({ id: key, producer: producers.append, inputs: { messages: operation(previous), message: input(key), at: input(`${key}-at`), space: input("space") }, result: { kind: "output", name: "messages" } });
85
+ operations.push({ id: key, producer: producers.append, inputs: { messages: operation(previous), message: input(key), at: input(`${key}-at`), timeline: input("timeline") }, result: { kind: "output", name: "messages" } });
89
86
  previous = key;
90
87
  }
91
88
  if (!index) throw new Error("Chat Scene requires a Message.");
92
89
  operations.push({ id: "render", producer: producers.render, inputs: { messages: operation(previous), options: input("options"),
93
- space: input("space"), canvas: input("canvas"), font: input("font"), window: input("window") }, result: { kind: "output", name: "track" } });
90
+ timeline: input("timeline"), canvas: input("canvas"), font: input("font"), window: input("window") }, result: { kind: "output", name: "track" } });
94
91
  const fragment = sealGraphFragment({ inputs, operations, exports: [{ name: "track", type: compositionTypes.visualTrack, root: operation("render") }] });
95
92
  return { records, fragments: [...fragments, fragment], components: [...components,
96
93
  { id, fragment: fragment.id, inputs: bindings, outputs: { track: `${id}.track` }, range: element.range }], exports: [`${id}.track`] };
97
94
  };
98
95
  const declaration = { name: "scene", tag: "Scene", mode: "structured" as const,
99
- outputs: [compositionTypes.visualTrack, programSpaceTypes.programSpace, temporalTypes.window, temporalTypes.instant, temporalTypes.windowSpec, temporalTypes.instantSpec, ...Object.values(types)],
96
+ outputs: [compositionTypes.visualTrack, timelineTypes.track, temporalTypes.window, temporalTypes.instant, temporalTypes.windowSpec, temporalTypes.instantSpec, ...Object.values(types)],
100
97
  vocabulary: { summary: "A conversation whose message arrivals and scrolling form one visual scene.", attributes: [
101
98
  ...temporalContextAttributeVocabulary, ...temporalWindowAttributeVocabulary,
102
99
  ...["id", "title", "canvas", "font"].map(name => ({ name, kind: "expression" as const, required: true, summary: name })),
@@ -104,7 +101,7 @@ const declaration = { name: "scene", tag: "Scene", mode: "structured" as const,
104
101
  ], children: [{ tag: "Message", cardinality: "many" as const, summary: "One authored message and the event that reveals it.", attributes: [
105
102
  ...["id", "sender", "text", "side"].map(name => ({ name, kind: "literal" as const, required: true, summary: name })), ...temporalInstantAttributeVocabulary,
106
103
  ] }], ports: [{ name: "track", type: compositionTypes.visualTrack, summary: "The complete conversation scene." }],
107
- example: '<chat:Scene id="chat" semantic={speech.semantic} canvas={canvas} font={font} during="program" title="Conversation"><chat:Message id="answer" sender="Maya" side="left" text="Here it is." at={story.moment.answer}/></chat:Scene>',
104
+ example: '<chat:Scene id="chat" timeline={speech.timeline} canvas={canvas} font={font} during="program" title="Conversation"><chat:Message id="answer" sender="Maya" side="left" text="Here it is." at={story.moment.answer}/></chat:Scene>',
108
105
  },
109
106
  };
110
107
  export const hypitPackage = { format: "hypit.node-package@1" as const, modules: [{ manifest }], components: [component],
@@ -2,7 +2,7 @@ import { sealVisualTrack } from "@hypit/hypit/composition";
2
2
  import type { VisualElement } from "@hypit/hypit/composition";
3
3
  import { browserProgram } from "@hypit/hypit/hyperframes";
4
4
  import type { FontStackRef } from "@hypit/hypit/media";
5
- import type { ProgramSpace } from "@hypit/hypit/program-space";
5
+ import type { Timeline } from "@hypit/hypit/timeline";
6
6
  import type { CanvasSpace } from "@hypit/hypit/spatial";
7
7
  import { assertTemporalWindowFor } from "@hypit/hypit/temporal";
8
8
  import type { TemporalInstant, TemporalWindow } from "@hypit/hypit/temporal";
@@ -11,9 +11,9 @@ export type Message = { id: string; sender: string; text: string; side: "left" |
11
11
  export type ChatOptions = { id: string; title: string; entranceFrames: number };
12
12
 
13
13
  /** Layout, arrival and scrolling share one visual component; timing is already resolved. */
14
- export function renderChat(space: ProgramSpace, canvas: CanvasSpace, window: TemporalWindow,
14
+ export function renderChat(timeline: Timeline, canvas: CanvasSpace, window: TemporalWindow,
15
15
  font: FontStackRef, messages: readonly Message[], options: ChatOptions) {
16
- assertTemporalWindowFor(window, { subjectId: options.id, space });
16
+ assertTemporalWindowFor(window, { subjectId: options.id, space: timeline });
17
17
  if (!Number.isSafeInteger(options.entranceFrames) || options.entranceFrames < 1) throw new Error("Chat entrance-frames must be a positive integer.");
18
18
  if (messages.some(message => message.at.frame < window.span.startFrame || message.at.frame >= window.span.endFrameExclusive)) throw new Error("Chat messages must appear inside the scene's window.");
19
19
  let order = 0;
@@ -56,7 +56,7 @@ export function renderChat(space: ProgramSpace, canvas: CanvasSpace, window: Tem
56
56
  [...dots.children].forEach((dot,i)=>dot.style.transform='translateY('+(-3*(1+Math.sin(frame*.18-i)))+'px)');
57
57
  };`,
58
58
  });
59
- return sealVisualTrack({ id: options.id, programSpaceId: space.id, visualIr: "hypit.visual-ir@1",
59
+ return sealVisualTrack({ id: options.id, programSpaceId: timeline.id, visualIr: "hypit.visual-ir@1",
60
60
  presents: [{ id: options.id, span: window.span, stacking: { order: 0, tieBreak: options.id },
61
61
  elements: [{ id: "chat", kind: "program", order: 0, program,
62
62
  style: [{ name: "position", value: "absolute" }, { name: "inset", value: 0 },
@@ -0,0 +1,42 @@
1
+ # Project-authored Performance Styles
2
+
3
+ This package demonstrates two ordinary project families: a viewport moving between Frames and a
4
+ crossfade between explicitly selected Segments. Both export the common PerformanceStyle, so they
5
+ work alongside the ordinary fixed Style inside one Performance Track.
6
+
7
+ ```svml
8
+ <import as="performance" from="@hypit/performance@1"/>
9
+ <import as="styles" from="@example/performance-styles@1"/>
10
+ <performance:Style id="full" frame={layout.full} appearance={recipes.media.presenter}/>
11
+ <performance:Style id="side" frame={layout.side} appearance={recipes.media.presenter}/>
12
+ <styles:Move id="full-to-side" from={layout.full} to={layout.side}/>
13
+ <styles:Crossfade id="mix" outgoing={story.segment.previous}
14
+ incoming={story.segment.next} frame={layout.side}/>
15
+ <performance:Track id="presenter" timeline={program.timeline} canvas={canvas}>
16
+ <performance:Use style={full}/>
17
+ <performance:Use moment={story.moment.explain}
18
+ start="moment.cue" end="program.end" style={side}/>
19
+ <performance:Use at={story.moment.explain} for="2s" style={full-to-side}/>
20
+ <performance:Use start-source={story.segment.next} start="segment.start"
21
+ end-source={story.segment.previous} end="segment.end" style={mix}/>
22
+ </performance:Track>
23
+ ```
24
+
25
+ The two-second movement overrides the beginning of the already declared side treatment. Changing
26
+ its duration requires no reference to a Use id. Shared endpoint Frames keep the fixed and moving
27
+ layouts aligned. All timing belongs to Uses; each Style is independently reusable.
28
+
29
+ Crossfade requires known outgoing/incoming Segment identities. A known audio-only source supplies
30
+ transparent picture, giving a fade in or out; an unknown reference reports the actual error. This
31
+ example uses isolated additive blending of weighted pictures. `projectTimelineMedia` preserves the
32
+ original source positions; animation progress comes from the original Use Window.
33
+
34
+ Read `activation.ts` for the complete author Surface, bound fragment and Producer wiring, and
35
+ `render.ts` for the browser program. A project can add its own parameters or additional events without
36
+ changing Performance. Compile with `npm run build`; install the package in the video project's
37
+ ordinary package dependencies. The rendering test exercises these same functions with actual video.
38
+
39
+ The package also includes `src/studio.ts`. Move exposes its `from` and `to` Frame coordinates;
40
+ Crossfade exposes its Frame and read-only source references. These parameter Companions match the
41
+ project's own Style Surfaces and are composed into any consuming Performance Use. The Track
42
+ Companion and Studio require no knowledge of these Style names.
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@example/performance-styles",
3
+ "version": "0.0.0-dev",
4
+ "private": true,
5
+ "type": "module",
6
+ "hypit": {
7
+ "activation": "./dist/activation.js"
8
+ },
9
+ "exports": {
10
+ ".": "./dist/render.js"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "README.md"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc -p tsconfig.json",
18
+ "prepack": "npm run build"
19
+ },
20
+ "devDependencies": {
21
+ "@hypit/hypit": "workspace:*",
22
+ "typescript": "5.9.3",
23
+ "@types/node": "24.10.1"
24
+ }
25
+ }
@@ -0,0 +1,57 @@
1
+ import { styleStudioFacet } from "./studio.js";
2
+ import { assertAttributes, assertEmptyElement, canonicalize, createMarkupSurfaceHostFacet, sameType, sealGraphFragment, textAttribute } from "@hypit/hypit/author-kit";
3
+ import type { ComponentPackage, ModuleManifest, StructuredSurfaceHandler, SurfaceResolvedReference } from "@hypit/hypit/author-kit";
4
+ import { compositionTypes } from "@hypit/hypit/composition";
5
+ import { performanceStyle, performanceTypes, performanceModuleRef } from "@hypit/hypit/performance";
6
+ import { timelineTypes } from "@hypit/hypit/timeline";
7
+ import type { Timeline } from "@hypit/hypit/timeline";
8
+ import { spatialTypes } from "@hypit/hypit/spatial";
9
+ import type { SpatialFrame } from "@hypit/hypit/spatial";
10
+ import { temporalTypes } from "@hypit/hypit/temporal";
11
+ import type { TemporalWindow } from "@hypit/hypit/temporal";
12
+ import { narrativeTypes } from "@hypit/hypit/narrative";
13
+ import type { NarrativeExcerpt } from "@hypit/hypit/narrative";
14
+ import { movingFrame, crossfade } from "./render.js";
15
+
16
+ const module = { name: "@example/performance-styles", version: "1" } as const;
17
+ const common = [{ name: "timeline", type: timelineTypes.track }, { name: "canvas", type: spatialTypes.canvas }, { name: "window", type: temporalTypes.window }];
18
+ const moveInputs = [...common, { name: "from", type: spatialTypes.frame }, { name: "to", type: spatialTypes.frame }];
19
+ const mixInputs = [...common, { name: "outgoing", type: narrativeTypes.excerpt }, { name: "incoming", type: narrativeTypes.excerpt }, { name: "frame", type: spatialTypes.frame }];
20
+ const families = [{ name: "move", tag: "Move", ports: moveInputs }, { name: "crossfade", tag: "Crossfade", ports: mixInputs }];
21
+ export const manifest: ModuleManifest = { format: "hypit.module@1", ...module,
22
+ dependencies: [performanceModuleRef, compositionTypes.visualTrack.module, timelineTypes.track.module, spatialTypes.canvas.module, temporalTypes.window.module, narrativeTypes.excerpt.module].map(module => ({ module })),
23
+ types: [], capabilities: [], producers: families.map(family => ({ name: family.name, inputs: family.ports, outputs: [{ name: "visual", type: compositionTypes.visualTrack }], needs: [] })) };
24
+ const fragments = families.map(family => sealGraphFragment({ inputs: family.ports,
25
+ operations: [{ id: "render", producer: { module, name: family.name }, inputs: Object.fromEntries(family.ports.map(port => [port.name, { kind: "fragment-input" as const, name: port.name }])), result: { kind: "output", name: "visual" } }],
26
+ exports: [{ name: "visual", type: compositionTypes.visualTrack, root: { kind: "fragment-operation", operation: "render" } }] }));
27
+ const component: ComponentPackage = { producers: families.map(family => ({ producer: { module, name: family.name }, handler: ({ inputs }) => {
28
+ const values = Object.fromEntries(Object.entries(inputs).map(([key, record]) => {
29
+ if (record.value.kind !== "inline") throw new Error(`${key} must be inline`);
30
+ return [key, record.value.value];
31
+ }));
32
+ const visual = family.name === "move" ? movingFrame(values.timeline as unknown as Timeline, values.window as unknown as TemporalWindow, values.from as unknown as SpatialFrame, values.to as unknown as SpatialFrame)
33
+ : crossfade(values.timeline as unknown as Timeline, values.window as unknown as TemporalWindow, values.outgoing as unknown as NarrativeExcerpt, values.incoming as unknown as NarrativeExcerpt, values.frame as unknown as SpatialFrame);
34
+ return { outputs: { visual: { kind: "inline", value: canonicalize(visual) } }, needs: {} };
35
+ } })) };
36
+ const hostFacets = families.map((family,index) => {
37
+ const params = family.ports.slice(common.length);
38
+ const handler: StructuredSurfaceHandler = ({ element, resolveReference }) => {
39
+ assertAttributes(element, ["id", ...params.map(port => port.name)]); assertEmptyElement(element);
40
+ const bindings: Record<string, SurfaceResolvedReference> = {};
41
+ for (const param of params) {
42
+ const raw = element.attributes[param.name];
43
+ if (typeof raw !== "object" || raw.kind !== "reference") throw new Error(`${param.name} must be a reference`);
44
+ const value = resolveReference(raw.path);
45
+ if (value === undefined || !sameType(value.type,param.type)) throw new Error(`${param.name} has the wrong Type`);
46
+ bindings[param.name] = value;
47
+ }
48
+ return { records: [{ id: textAttribute(element,"id"), type: performanceTypes.style,
49
+ value: { kind: "inline", value: canonicalize(performanceStyle(fragments[index]!,bindings)) }, range: element.range }], components: [], fragments: [] };
50
+ };
51
+ return createMarkupSurfaceHostFacet({ module, declaration: { name: family.name, tag: family.tag, mode: "structured", outputs: [performanceTypes.style], vocabulary: {
52
+ summary: `Project-owned ${family.name} presentation Style.`, example: `<styles:${family.tag} id="look" ${params.map(port => `${port.name}={${port.name}}`).join(' ')}/>`,
53
+ attributes: [{ name: "id", kind: "identifier", required: true, summary: "Style identity." }, ...params.map(port => ({ name: port.name, kind: "reference" as const, required: true, accepts: [port.type], summary: `Explicit ${port.name} input.` }))],
54
+ } }, handler });
55
+ });
56
+ export const hypitPackage = { format: "hypit.node-package@1" as const, modules: [{ manifest }], components: [component], hostFacets: [...hostFacets, styleStudioFacet(module)] };
57
+ export default hypitPackage;
@@ -0,0 +1,54 @@
1
+ import { sealVisualTrack } from "@hypit/hypit/composition";
2
+ import type { VisualElement } from "@hypit/hypit/composition";
3
+ import { browserProgram } from "@hypit/hypit/hyperframes";
4
+ import { projectTimelineMedia } from "@hypit/hypit/timeline";
5
+ import type { Timeline } from "@hypit/hypit/timeline";
6
+ import type { TemporalWindow } from "@hypit/hypit/temporal";
7
+ import type { SpatialFrame } from "@hypit/hypit/spatial";
8
+ import type { NarrativeExcerpt } from "@hypit/hypit/narrative";
9
+
10
+ /** Project behavior, not a registered special effect: the original Use window owns progress. */
11
+ export function movingFrame(timeline: Timeline, window: TemporalWindow, from: SpatialFrame, to: SpatialFrame) {
12
+ return render(timeline, window, { from, to });
13
+ }
14
+ export function crossfade(timeline: Timeline, window: TemporalWindow, outgoing: NarrativeExcerpt, incoming: NarrativeExcerpt, frame: SpatialFrame) {
15
+ for (const ref of [outgoing, incoming]) {
16
+ if (ref.narrativeId !== timeline.narrativeId || !timeline.items.some(item => item.take.segment.segmentId === ref.id)) {
17
+ throw new Error(`Unknown crossfade source ${ref.id}.`);
18
+ }
19
+ }
20
+ return render(timeline, window, { outgoing: outgoing.id, incoming: incoming.id, from: frame, to: frame });
21
+ }
22
+ function render(timeline: Timeline, window: TemporalWindow, options: { from: SpatialFrame; to: SpatialFrame; outgoing?: string; incoming?: string }) {
23
+ const id = window.subjectId;
24
+ const clips = projectTimelineMedia(timeline, window.span).filter(clip => clip.media.visual !== undefined
25
+ && (options.outgoing === undefined || clip.segmentId === options.outgoing || clip.segmentId === options.incoming));
26
+ const videos: VisualElement[] = clips.map((clip, index) => ({
27
+ id: `source-${index}`, parent: "scene", order: index + 1, kind: "video", muted: true,
28
+ artifact: clip.media.visual!.artifact,
29
+ attributes: [{ name: "data-source-role", value: options.incoming === clip.segmentId ? "incoming" : "outgoing" }],
30
+ style: [{ name: "position", value: "absolute" }, { name: "inset", value: 0 }, { name: "width", value: "100%" }, { name: "height", value: "100%" }, { name: "object-fit", value: "cover" }],
31
+ sampling: { sourceFrameRate: clip.media.timeline.frameRate, sourceFrameCount: clip.media.timeline.frameCount, segments: [{
32
+ target: { startFrame: clip.span.startFrame - window.span.startFrame, endFrameExclusive: clip.span.endFrameExclusive - window.span.startFrame },
33
+ sourceFrame: { numerator: clip.source.startFrame, denominator: 1 }, rate: { numerator: 1, denominator: 1 },
34
+ }] },
35
+ }));
36
+ const program = browserProgram({
37
+ html: `<div class="viewport">${videos.map((video,index) => `<div class="source" data-role="${clips[index]!.segmentId === options.incoming ? "incoming" : "outgoing"}">{{${video.id}}}</div>`).join("")}</div>`,
38
+ css: `.viewport{position:absolute;overflow:hidden;isolation:isolate}.source{position:absolute;inset:0;${options.outgoing === undefined ? '' : 'mix-blend-mode:plus-lighter'}}`,
39
+ data: { from: options.from, to: options.to, mixing: options.outgoing !== undefined, duration: window.span.endFrameExclusive - window.span.startFrame },
40
+ setup: `const view=root.querySelector('.viewport'), sources=view.querySelectorAll('.source');
41
+ return frame => {
42
+ const p=Math.max(0,Math.min(1,frame/Math.max(1,data.duration-1)));
43
+ const q=p*p*(3-2*p), a=data.from, b=data.to;
44
+ Object.assign(view.style,{left:(a.xPx+(b.xPx-a.xPx)*q)+'px',top:(a.yPx+(b.yPx-a.yPx)*q)+'px',
45
+ width:(a.widthPx+(b.widthPx-a.widthPx)*q)+'px',height:(a.heightPx+(b.heightPx-a.heightPx)*q)+'px'});
46
+ if(data.mixing) for(const child of sources) {
47
+ const role=child.dataset.role;
48
+ child.style.opacity=String(role==='incoming'?p:1-p);
49
+ }
50
+ };`,
51
+ });
52
+ return sealVisualTrack({ id, programSpaceId: timeline.id, visualIr: "hypit.visual-ir@1", presents: videos.length ? [{ id, span: window.span,
53
+ stacking: { order: 0, tieBreak: id }, elements: [{ id: "scene", kind: "program", order: 0, style: [{ name: "position", value: "absolute" }, { name: "inset", value: 0 }], program }, ...videos] }] : [] });
54
+ }
@@ -0,0 +1,28 @@
1
+ import { createStudioCompanionHostFacet } from "@hypit/hypit/studio-adapter";
2
+ import type { StudioParameterCompanion } from "@hypit/hypit/studio-adapter";
3
+
4
+ /** The project Style owns its inputs; Performance only owns its Use interval. */
5
+ export function styleStudioFacet(module: { readonly name: string; readonly version: string }) {
6
+ const coordinates = ["left", "top", "right", "bottom", "x", "y", "width", "height"];
7
+ const definitions = [
8
+ { surface: "move", frames: ["from", "to"], sources: [] },
9
+ { surface: "crossfade", frames: ["frame"], sources: ["outgoing", "incoming"] },
10
+ ];
11
+ const parameters: StudioParameterCompanion[] = definitions.map(({ surface, frames, sources }) => ({
12
+ id: surface, match: { module, surface },
13
+ bindings: [
14
+ ...frames.map(name => ({ name, referenced: coordinates.map(name => ({ name, writable: true })) })),
15
+ ...sources.map(name => ({ name })),
16
+ ],
17
+ inspector: [
18
+ ...frames.flatMap(frame => coordinates.map(name => ({
19
+ binding: `${frame}.${name}`, label: name, domain: "where" as const,
20
+ page: { id: frame, label: frame }, section: { id: "frame", label: "Frame" },
21
+ control: "number" as const, number: { suffixes: ["%", "px"], step: 1 },
22
+ }))),
23
+ ...sources.map(name => ({ binding: name, label: name, domain: "how" as const,
24
+ section: { id: "sources", label: "Sources" }, control: "text" as const })),
25
+ ],
26
+ }));
27
+ return createStudioCompanionHostFacet({ parameters });
28
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2023",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "lib": ["ES2023"],
7
+ "strict": true,
8
+ "noUncheckedIndexedAccess": true,
9
+ "exactOptionalPropertyTypes": true,
10
+ "verbatimModuleSyntax": true,
11
+ "declaration": true,
12
+ "sourceMap": true,
13
+ "rootDir": "src",
14
+ "outDir": "dist",
15
+ "skipLibCheck": true
16
+ },
17
+ "include": ["src/**/*.ts"]
18
+ }