@hypit/hypit 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (486) hide show
  1. package/README.md +5 -3
  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 +107 -16
  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 +35 -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 +33 -19
  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 +69 -0
  63. package/packages/build-result/package.json +2 -1
  64. package/packages/build-result/src/decode.ts +12 -8
  65. package/packages/build-result/src/execution-log.ts +17 -0
  66. package/packages/build-result/src/file-reference.ts +42 -0
  67. package/packages/build-result/src/index.ts +4 -0
  68. package/packages/build-result/src/replace-file-windows.ts +58 -0
  69. package/packages/build-result/src/replace-file.ts +11 -0
  70. package/packages/build-result/src/store.ts +58 -14
  71. package/packages/build-result/src/types.ts +41 -8
  72. package/packages/build-result/src/writer.ts +12 -1
  73. package/packages/build-result-fs/README.md +23 -1
  74. package/packages/build-result-s3/README.md +5 -0
  75. package/packages/build-result-s3/src/repository.ts +23 -5
  76. package/packages/caption/README.md +61 -73
  77. package/packages/caption/package.json +3 -2
  78. package/packages/caption/src/activation.ts +2 -2
  79. package/packages/caption/src/component.ts +20 -5
  80. package/packages/caption/src/display.ts +3 -18
  81. package/packages/caption/src/fragment.ts +3 -7
  82. package/packages/caption/src/index.ts +6 -5
  83. package/packages/caption/src/manifest.ts +29 -46
  84. package/packages/caption/src/style.ts +24 -135
  85. package/packages/caption/src/surface.ts +12 -92
  86. package/packages/caption/src/temporalize.ts +18 -53
  87. package/packages/caption/src/types.ts +8 -35
  88. package/packages/caption/src/visibility.ts +23 -0
  89. package/packages/caption-fine/README.md +31 -11
  90. package/packages/caption-fine/package.json +4 -2
  91. package/packages/caption-fine/src/component.ts +3 -3
  92. package/packages/caption-fine/src/fragment.ts +7 -19
  93. package/packages/caption-fine/src/index.ts +2 -0
  94. package/packages/caption-fine/src/manifest.ts +27 -18
  95. package/packages/caption-fine/src/recipe.ts +7 -0
  96. package/packages/caption-fine/src/render.ts +62 -49
  97. package/packages/caption-fine/src/schedule.ts +39 -35
  98. package/packages/caption-fine/src/style.ts +10 -9
  99. package/packages/caption-fine/src/surface.ts +62 -35
  100. package/packages/caption-fine/src/types.ts +2 -0
  101. package/packages/caption-fine-studio/README.md +24 -2
  102. package/packages/caption-fine-studio/package.json +10 -3
  103. package/packages/caption-fine-studio/src/activation.ts +3 -3
  104. package/packages/caption-fine-studio/src/index.ts +61 -40
  105. package/packages/cli/README.md +81 -3
  106. package/packages/cli/package.json +1 -0
  107. package/packages/cli/src/arguments.ts +39 -15
  108. package/packages/cli/src/build-planning.ts +9 -3
  109. package/packages/cli/src/command.ts +7 -1
  110. package/packages/cli/src/commands/environment.ts +66 -27
  111. package/packages/cli/src/commands/execution.ts +81 -26
  112. package/packages/cli/src/commands/results.ts +7 -11
  113. package/packages/cli/src/index.ts +2 -2
  114. package/packages/cli/src/machine-view.ts +15 -5
  115. package/packages/cli/src/main.ts +38 -42
  116. package/packages/cli/src/observation.ts +7 -1
  117. package/packages/cli/src/output.ts +92 -34
  118. package/packages/cli/src/result-export.ts +22 -13
  119. package/packages/cli/src/run-file.ts +19 -8
  120. package/packages/cli/src/view.ts +64 -18
  121. package/packages/comment-sticker/README.md +3 -3
  122. package/packages/comment-sticker/package.json +1 -1
  123. package/packages/comment-sticker/src/component.ts +4 -4
  124. package/packages/comment-sticker/src/fragment.ts +5 -4
  125. package/packages/comment-sticker/src/manifest.ts +7 -6
  126. package/packages/comment-sticker/src/program.ts +9 -9
  127. package/packages/comment-sticker/src/surface.ts +6 -7
  128. package/packages/comment-sticker-studio/src/index.ts +2 -1
  129. package/packages/compiler-node/src/compiler.ts +1 -0
  130. package/packages/composition/README.md +21 -0
  131. package/packages/composition/src/audio-presentation.ts +44 -0
  132. package/packages/composition/src/index.ts +3 -0
  133. package/packages/composition/src/schema.ts +8 -3
  134. package/packages/composition/src/track.ts +15 -1
  135. package/packages/credential-store-env/README.md +1 -1
  136. package/packages/deck-track/README.md +3 -3
  137. package/packages/deck-track/package.json +1 -1
  138. package/packages/deck-track/src/component.ts +5 -5
  139. package/packages/deck-track/src/fragment.ts +6 -5
  140. package/packages/deck-track/src/lower.ts +12 -12
  141. package/packages/deck-track/src/manifest.ts +8 -7
  142. package/packages/deck-track/src/program.ts +13 -16
  143. package/packages/deck-track/src/surface.ts +9 -10
  144. package/packages/driver-node/src/driver.ts +41 -3
  145. package/packages/elevenlabs-speech/README.md +27 -0
  146. package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
  147. package/packages/elevenlabs-speech/src/activation.ts +26 -0
  148. package/packages/elevenlabs-speech/src/fragment.ts +11 -0
  149. package/packages/elevenlabs-speech/src/index.ts +111 -0
  150. package/packages/elevenlabs-speech/src/surface.ts +167 -0
  151. package/packages/endpoint-kit/README.md +24 -0
  152. package/packages/endpoint-kit/src/index.ts +7 -1
  153. package/packages/estimate/README.md +56 -3
  154. package/packages/estimate/src/program.ts +7 -8
  155. package/packages/film/README.md +12 -7
  156. package/packages/film/package.json +1 -1
  157. package/packages/film/src/component.ts +4 -4
  158. package/packages/film/src/fragment.ts +6 -5
  159. package/packages/film/src/manifest.ts +11 -10
  160. package/packages/film/src/program.ts +5 -5
  161. package/packages/film/src/recipe.ts +2 -1
  162. package/packages/film/src/surface.ts +6 -6
  163. package/packages/film-studio/package.json +1 -1
  164. package/packages/film-studio/src/index.ts +2 -2
  165. package/packages/fishaudio-speech/README.md +33 -0
  166. package/packages/fishaudio-speech/package.json +21 -0
  167. package/packages/fishaudio-speech/src/activation.ts +32 -0
  168. package/packages/fishaudio-speech/src/fragment.ts +11 -0
  169. package/packages/fishaudio-speech/src/index.ts +156 -0
  170. package/packages/fishaudio-speech/src/surface.ts +192 -0
  171. package/packages/fonts-open/README.md +5 -0
  172. package/packages/fonts-open/package.json +5 -1
  173. package/packages/fonts-open/src/studio.ts +21 -0
  174. package/packages/generation/README.md +11 -1
  175. package/packages/generation/src/mapping.ts +28 -30
  176. package/packages/gpt-image/README.md +1 -2
  177. package/packages/grok-imagine/README.md +1 -2
  178. package/packages/hyperframes/README.md +7 -3
  179. package/packages/hyperframes/src/browser-program.ts +11 -2
  180. package/packages/hyperframes/src/document.ts +15 -2
  181. package/packages/interview-emoji-reveal/README.md +4 -4
  182. package/packages/interview-emoji-reveal/package.json +1 -1
  183. package/packages/interview-emoji-reveal/src/component.ts +4 -4
  184. package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
  185. package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
  186. package/packages/interview-emoji-reveal/src/program.ts +14 -14
  187. package/packages/interview-emoji-reveal/src/surface.ts +8 -9
  188. package/packages/media-execution/README.md +7 -3
  189. package/packages/media-execution/src/audio-presentation.ts +23 -0
  190. package/packages/media-execution/src/execute.ts +2 -0
  191. package/packages/media-pipeline/README.md +7 -3
  192. package/packages/media-pipeline/src/audio-plan.ts +4 -1
  193. package/packages/media-pipeline/src/component.ts +16 -2
  194. package/packages/media-pipeline/src/manifest.ts +3 -1
  195. package/packages/media-pipeline/src/types.ts +2 -1
  196. package/packages/media-track/README.md +14 -47
  197. package/packages/media-track/package.json +1 -1
  198. package/packages/media-track/preview/preview.svml +5 -5
  199. package/packages/media-track/src/author.ts +12 -6
  200. package/packages/media-track/src/component.ts +10 -16
  201. package/packages/media-track/src/fragment.ts +8 -7
  202. package/packages/media-track/src/index.ts +3 -1
  203. package/packages/media-track/src/lower.ts +7 -7
  204. package/packages/media-track/src/manifest.ts +16 -38
  205. package/packages/media-track/src/program.ts +62 -67
  206. package/packages/media-track/src/sampling.ts +6 -6
  207. package/packages/media-track/src/sequence.ts +8 -8
  208. package/packages/media-track/src/surface.ts +25 -43
  209. package/packages/media-track-studio/README.md +9 -0
  210. package/packages/media-track-studio/src/index.ts +23 -13
  211. package/packages/mimo-speech/README.md +1 -1
  212. package/packages/minimax-h3/README.md +1 -1
  213. package/packages/nano-banana/README.md +1 -1
  214. package/packages/narrative/README.md +23 -1
  215. package/packages/narrative/src/identity.ts +11 -0
  216. package/packages/narrative/src/index.ts +3 -0
  217. package/packages/narrative/src/schema.ts +28 -27
  218. package/packages/narrative/src/selection.ts +52 -0
  219. package/packages/narrative/src/types.ts +2 -0
  220. package/packages/package-loader-node/README.md +30 -0
  221. package/packages/package-loader-node/package.json +5 -2
  222. package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
  223. package/packages/package-loader-node/src/index.ts +1 -0
  224. package/packages/package-loader-node/src/loader.ts +12 -15
  225. package/packages/package-loader-node/src/location.ts +27 -1
  226. package/packages/package-loader-node/src/module-scope.ts +183 -0
  227. package/packages/package-loader-node/src/types.ts +4 -0
  228. package/packages/performance/README.md +83 -0
  229. package/packages/performance/package.json +30 -0
  230. package/packages/performance/src/activation.ts +11 -0
  231. package/packages/performance/src/component.ts +46 -0
  232. package/packages/performance/src/index.ts +6 -0
  233. package/packages/performance/src/manifest.ts +53 -0
  234. package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
  235. package/packages/performance/src/program.ts +51 -0
  236. package/packages/performance/src/style.ts +35 -0
  237. package/packages/performance/src/surface.ts +99 -0
  238. package/packages/performance-studio/README.md +25 -0
  239. package/packages/performance-studio/package.json +21 -0
  240. package/packages/performance-studio/src/activation.ts +6 -0
  241. package/packages/performance-studio/src/index.ts +84 -0
  242. package/packages/program-space/README.md +9 -18
  243. package/packages/program-space/src/activation.ts +1 -5
  244. package/packages/program-space/src/index.ts +2 -11
  245. package/packages/program-space/src/surface.ts +1 -20
  246. package/packages/project-context-node/README.md +20 -0
  247. package/packages/project-context-node/package.json +10 -0
  248. package/packages/project-context-node/src/index.ts +3 -0
  249. package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
  250. package/packages/provider-hyperframes-local/README.md +43 -15
  251. package/packages/provider-hyperframes-local/src/activation.ts +4 -3
  252. package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
  253. package/packages/provider-hyperframes-local/src/capture.ts +96 -26
  254. package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
  255. package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
  256. package/packages/provider-hyperframes-local/src/options.ts +2 -0
  257. package/packages/provider-hyperframes-local/src/program.ts +6 -3
  258. package/packages/provider-hyperframes-local/src/progress.ts +53 -0
  259. package/packages/provider-hyperframes-local/src/provider.ts +18 -5
  260. package/packages/provider-hyperframes-local/src/render.ts +48 -7
  261. package/packages/provider-hypihub/README.md +48 -17
  262. package/packages/provider-hypihub/package.json +2 -0
  263. package/packages/provider-hypihub/src/mapping.ts +31 -7
  264. package/packages/provider-hypihub/src/oauth.ts +6 -0
  265. package/packages/provider-hypihub/src/provider.ts +25 -13
  266. package/packages/provider-hypihub/src/routes.ts +1 -2
  267. package/packages/provider-hypihub/src/upload.ts +2 -0
  268. package/packages/provider-media-local/README.md +3 -4
  269. package/packages/provider-whisperx-local/README.md +57 -0
  270. package/packages/provider-whisperx-local/src/program.ts +1 -0
  271. package/packages/provider-whisperx-local/src/provider.ts +3 -0
  272. package/packages/ranking/README.md +8 -6
  273. package/packages/ranking/package.json +1 -1
  274. package/packages/ranking/src/component.ts +6 -6
  275. package/packages/ranking/src/fragment.ts +11 -7
  276. package/packages/ranking/src/manifest.ts +21 -14
  277. package/packages/ranking/src/render.ts +33 -35
  278. package/packages/ranking/src/schedule.ts +16 -19
  279. package/packages/ranking/src/surface.ts +12 -13
  280. package/packages/ranking-studio/README.md +29 -0
  281. package/packages/ranking-studio/package.json +8 -3
  282. package/packages/ranking-studio/src/index.ts +71 -12
  283. package/packages/render-hyperframes/README.md +7 -7
  284. package/packages/render-hyperframes/package.json +1 -1
  285. package/packages/render-hyperframes/src/component.ts +11 -1
  286. package/packages/render-hyperframes/src/fragment.ts +7 -4
  287. package/packages/render-hyperframes/src/manifest.ts +4 -4
  288. package/packages/render-hyperframes/src/surface.ts +6 -6
  289. package/packages/runtime/README.md +8 -1
  290. package/packages/runtime/src/catalog.ts +2 -0
  291. package/packages/runtime/src/execution.ts +15 -4
  292. package/packages/runtime/src/index.ts +2 -1
  293. package/packages/runtime/src/log.ts +51 -0
  294. package/packages/runtime/src/types.ts +5 -8
  295. package/packages/runtime-host-node/README.md +30 -0
  296. package/packages/runtime-host-node/package.json +1 -0
  297. package/packages/runtime-host-node/src/index.ts +25 -9
  298. package/packages/runtime-host-node/src/packages.ts +47 -50
  299. package/packages/runtime-kit/README.md +5 -0
  300. package/packages/runtime-kit/src/index.ts +3 -1
  301. package/packages/runtime-local/README.md +111 -4
  302. package/packages/runtime-local/src/config.ts +202 -56
  303. package/packages/runtime-local/src/control.ts +9 -1
  304. package/packages/runtime-local/src/executor.ts +66 -0
  305. package/packages/runtime-local/src/host.ts +37 -17
  306. package/packages/runtime-local/src/log.ts +48 -0
  307. package/packages/runtime-local/src/programs.ts +41 -25
  308. package/packages/runtime-local/src/result-writer.ts +2 -0
  309. package/packages/runtime-local/src/runtime.ts +10 -6
  310. package/packages/runtime-local/src/supervisor.ts +142 -0
  311. package/packages/runtime-local/src/types.ts +9 -2
  312. package/packages/runtime-local/src/worker-process.ts +7 -24
  313. package/packages/runtime-local/src/worker.ts +55 -83
  314. package/packages/screen-overlay/README.md +3 -3
  315. package/packages/screen-overlay/package.json +1 -1
  316. package/packages/screen-overlay/src/component.ts +3 -3
  317. package/packages/screen-overlay/src/fragment.ts +5 -4
  318. package/packages/screen-overlay/src/manifest.ts +7 -6
  319. package/packages/screen-overlay/src/program.ts +9 -9
  320. package/packages/screen-overlay/src/surface.ts +6 -7
  321. package/packages/script/README.md +37 -2
  322. package/packages/script/src/edit.ts +123 -73
  323. package/packages/script/src/lexical.ts +40 -6
  324. package/packages/script/src/manifest.ts +2 -2
  325. package/packages/script/src/narrative.ts +1 -0
  326. package/packages/script/src/parser.ts +36 -8
  327. package/packages/script/src/surface.ts +4 -3
  328. package/packages/script/src/types.ts +5 -1
  329. package/packages/script-studio/package.json +9 -3
  330. package/packages/script-studio/src/index.ts +2 -0
  331. package/packages/script-studio/src/projection.ts +105 -0
  332. package/packages/seedance/README.md +30 -1
  333. package/packages/seedance/src/index.ts +18 -7
  334. package/packages/seedance/src/surface.ts +17 -4
  335. package/packages/seedance-kits/README.md +10 -2
  336. package/packages/seedance-kits/kits/speaker-v1.svs +5 -5
  337. package/packages/seedream/README.md +1 -1
  338. package/packages/sound/README.md +81 -0
  339. package/packages/sound/package.json +25 -0
  340. package/packages/sound/src/activation.ts +11 -0
  341. package/packages/sound/src/component.ts +28 -0
  342. package/packages/sound/src/index.ts +5 -0
  343. package/packages/sound/src/manifest.ts +47 -0
  344. package/packages/sound/src/program.ts +84 -0
  345. package/packages/sound/src/style.ts +34 -0
  346. package/packages/sound/src/surface.ts +90 -0
  347. package/packages/sound-studio/README.md +22 -0
  348. package/packages/sound-studio/package.json +20 -0
  349. package/packages/sound-studio/src/activation.ts +6 -0
  350. package/packages/sound-studio/src/index.ts +74 -0
  351. package/packages/speech/README.md +2 -2
  352. package/packages/speech-alignment/src/align.ts +45 -21
  353. package/packages/speech-alignment/src/local.ts +8 -0
  354. package/packages/speech-alignment/src/locate.ts +1 -1
  355. package/packages/store-sqlite/README.md +7 -0
  356. package/packages/store-sqlite/src/store.ts +84 -83
  357. package/packages/studio/INSPECTOR.md +117 -0
  358. package/packages/studio/README.md +149 -14
  359. package/packages/studio/package.json +8 -7
  360. package/packages/studio/src/build-library.ts +99 -84
  361. package/packages/studio/src/companion-assembly.ts +1 -0
  362. package/packages/studio/src/domain.ts +1 -1
  363. package/packages/studio/src/fallback-companions.ts +3 -3
  364. package/packages/studio/src/feedback-server.ts +51 -0
  365. package/packages/studio/src/feedback-store.ts +66 -0
  366. package/packages/studio/src/feedback.ts +60 -0
  367. package/packages/studio/src/library-media.ts +19 -0
  368. package/packages/studio/src/parameter-values.ts +83 -1
  369. package/packages/studio/src/parameters.ts +132 -43
  370. package/packages/studio/src/preview/render.ts +5 -1
  371. package/packages/studio/src/preview/runtime-shim.ts +49 -3
  372. package/packages/studio/src/programme.ts +14 -30
  373. package/packages/studio/src/server.ts +66 -34
  374. package/packages/studio/src/shared.ts +24 -8
  375. package/packages/studio/src/snapshot.ts +21 -132
  376. package/packages/studio/src/studio-preflight.ts +3 -3
  377. package/packages/studio/src/studio-registry.ts +72 -6
  378. package/packages/studio/src/style.css +342 -190
  379. package/packages/studio/src/temporal-edit.ts +131 -0
  380. package/packages/studio/src/ui/artifact-name.ts +80 -0
  381. package/packages/studio/src/ui/artifact-preview.ts +99 -0
  382. package/packages/studio/src/ui/comments.ts +233 -0
  383. package/packages/studio/src/ui/icons.ts +10 -1
  384. package/packages/studio/src/ui/library.ts +373 -192
  385. package/packages/studio/src/ui/main.ts +291 -110
  386. package/packages/studio/src/ui/material-preview.ts +1 -1
  387. package/packages/studio/src/ui/overlay.ts +31 -26
  388. package/packages/studio/src/ui/scrub-preview.ts +108 -0
  389. package/packages/studio/src/ui/sidebar-panel.ts +31 -0
  390. package/packages/studio/src/ui/stage.ts +188 -9
  391. package/packages/studio/src/ui/timeline.ts +187 -281
  392. package/packages/studio/start.ts +19 -5
  393. package/packages/studio-adapter/README.md +151 -11
  394. package/packages/studio-adapter/src/index.ts +126 -14
  395. package/packages/temporal/README.md +6 -6
  396. package/packages/temporal/package.json +1 -1
  397. package/packages/temporal/src/component.ts +5 -6
  398. package/packages/temporal/src/index.ts +8 -6
  399. package/packages/temporal/src/location.ts +11 -11
  400. package/packages/temporal/src/projection.ts +19 -19
  401. package/packages/temporal/src/rational.ts +4 -4
  402. package/packages/temporal-markup/EDITING.md +183 -0
  403. package/packages/temporal-markup/README.md +31 -11
  404. package/packages/temporal-markup/package.json +1 -1
  405. package/packages/temporal-markup/src/index.ts +20 -25
  406. package/packages/temporal-markup/src/space.ts +10 -41
  407. package/packages/timeline/README.md +31 -0
  408. package/packages/{semantic-track → timeline}/package.json +1 -1
  409. package/packages/timeline/src/activation.ts +8 -0
  410. package/packages/timeline/src/component.ts +24 -0
  411. package/packages/timeline/src/identity.ts +60 -0
  412. package/packages/timeline/src/index.ts +6 -0
  413. package/packages/{semantic-track → timeline}/src/location.ts +20 -20
  414. package/packages/timeline/src/manifest.ts +39 -0
  415. package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
  416. package/packages/timeline/src/types.ts +24 -0
  417. package/packages/timeline-author/README.md +68 -0
  418. package/packages/{speech-track → timeline-author}/package.json +6 -4
  419. package/packages/timeline-author/src/activation.ts +22 -0
  420. package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
  421. package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
  422. package/packages/timeline-author/src/index.ts +7 -0
  423. package/packages/timeline-author/src/manifest.ts +78 -0
  424. package/packages/timeline-author/src/program.ts +107 -0
  425. package/packages/timeline-author/src/surface.ts +46 -0
  426. package/packages/timeline-author/src/types.ts +6 -0
  427. package/packages/typography-track/README.md +4 -4
  428. package/packages/typography-track/package.json +1 -1
  429. package/packages/typography-track/src/component.ts +4 -4
  430. package/packages/typography-track/src/fragment.ts +4 -3
  431. package/packages/typography-track/src/manifest.ts +11 -9
  432. package/packages/typography-track/src/program.ts +15 -15
  433. package/packages/typography-track/src/surface.ts +17 -18
  434. package/packages/typography-track-studio/package.json +8 -3
  435. package/packages/typography-track-studio/src/index.ts +5 -1
  436. package/packages/video-cli/README.md +16 -4
  437. package/packages/video-cli/package.json +2 -1
  438. package/packages/video-cli/src/creation.ts +25 -9
  439. package/packages/video-cli/src/index.ts +1 -1
  440. package/packages/video-cli/src/studio-distribution.ts +2 -1
  441. package/packages/volcengine-matting/README.md +3 -3
  442. package/packages/whisperx/README.md +8 -1
  443. package/packages/workspace/src/index.ts +2 -0
  444. package/packages/workspace-fs-node/README.md +4 -1
  445. package/packages/workspace-fs-node/src/workspace.ts +3 -1
  446. package/services/whisperx/README.md +14 -0
  447. package/services/whisperx/pyproject.toml +2 -0
  448. package/services/whisperx/uv.lock +20 -20
  449. package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
  450. package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
  451. package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
  452. package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
  453. package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
  454. package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
  455. package/packages/provider-kie/README.md +0 -134
  456. package/packages/provider-kie/package.json +0 -43
  457. package/packages/provider-kie/src/activation.ts +0 -71
  458. package/packages/provider-kie/src/index.ts +0 -10
  459. package/packages/provider-kie/src/mapping.ts +0 -182
  460. package/packages/provider-kie/src/provider.ts +0 -657
  461. package/packages/provider-kie/src/routes.ts +0 -150
  462. package/packages/provider-xiaomi-mimo/README.md +0 -32
  463. package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
  464. package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
  465. package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
  466. package/packages/runtime/src/environment.ts +0 -6
  467. package/packages/semantic-track/README.md +0 -21
  468. package/packages/semantic-track/src/activation.ts +0 -8
  469. package/packages/semantic-track/src/component.ts +0 -24
  470. package/packages/semantic-track/src/identity.ts +0 -58
  471. package/packages/semantic-track/src/index.ts +0 -6
  472. package/packages/semantic-track/src/manifest.ts +0 -38
  473. package/packages/semantic-track/src/types.ts +0 -26
  474. package/packages/speech-track/README.md +0 -51
  475. package/packages/speech-track/src/activation.ts +0 -19
  476. package/packages/speech-track/src/index.ts +0 -7
  477. package/packages/speech-track/src/manifest.ts +0 -73
  478. package/packages/speech-track/src/program.ts +0 -64
  479. package/packages/speech-track/src/surface.ts +0 -35
  480. package/packages/speech-track/src/types.ts +0 -6
  481. package/packages/speech-track-studio/README.md +0 -3
  482. package/packages/speech-track-studio/package.json +0 -14
  483. package/packages/speech-track-studio/src/activation.ts +0 -7
  484. package/packages/speech-track-studio/src/index.ts +0 -40
  485. /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
  486. /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
@@ -2,8 +2,7 @@ import type { ComponentPackage, ProducerHandlerContext } from "@hypit/component-
2
2
  import { canonicalize } from "@hypit/protocol";
3
3
  import type { StoredValue } from "@hypit/protocol";
4
4
  import type { NarrativeExcerpt, NarrativeMomentRef, NarrativeSelectionRef } from "@hypit/narrative";
5
- import type { ProgramSpace } from "@hypit/program-space";
6
- import type { SemanticTrack } from "@hypit/semantic-track";
5
+ import type { Timeline } from "@hypit/timeline";
7
6
 
8
7
  import {
9
8
  composeTemporalWindow,
@@ -31,14 +30,14 @@ export const temporalComponent = {
31
30
  { producer: temporalProducers.projectProgramInstant, handler: ({ inputs }) => ({ outputs: { instant: output(projectProgramInstant({
32
31
  itemId: instantSpec(inputs).id,
33
32
  subjectId: instantSpec(inputs).subjectId,
34
- space: inline<ProgramSpace>(inputs.space?.value, "ProgramSpace"),
33
+ timeline: inline<Timeline>(inputs.timeline?.value, "Timeline"),
35
34
  projection: instantSpec(inputs).projection,
36
35
  authority: instantSpec(inputs).authority,
37
36
  })) }, needs: {} }) },
38
37
  { producer: temporalProducers.projectSelectionInstant, handler: ({ inputs }) => ({ outputs: { instant: output(projectSelectionInstant({
39
38
  itemId: instantSpec(inputs).id,
40
39
  subjectId: instantSpec(inputs).subjectId,
41
- semantic: inline<SemanticTrack>(inputs.semantic?.value, "SemanticTrack"),
40
+ timeline: inline<Timeline>(inputs.timeline?.value, "Timeline"),
42
41
  selection: inline<NarrativeSelectionRef>(inputs.selection?.value, "NarrativeSelection"),
43
42
  projection: instantSpec(inputs).projection,
44
43
  authority: instantSpec(inputs).authority,
@@ -46,7 +45,7 @@ export const temporalComponent = {
46
45
  { producer: temporalProducers.projectSegmentInstant, handler: ({ inputs }) => ({ outputs: { instant: output(projectSegmentInstant({
47
46
  itemId: instantSpec(inputs).id,
48
47
  subjectId: instantSpec(inputs).subjectId,
49
- semantic: inline<SemanticTrack>(inputs.semantic?.value, "SemanticTrack"),
48
+ timeline: inline<Timeline>(inputs.timeline?.value, "Timeline"),
50
49
  segment: inline<NarrativeExcerpt>(inputs.segment?.value, "NarrativeExcerpt"),
51
50
  projection: instantSpec(inputs).projection,
52
51
  authority: instantSpec(inputs).authority,
@@ -54,7 +53,7 @@ export const temporalComponent = {
54
53
  { producer: temporalProducers.projectMomentInstant, handler: ({ inputs }) => ({ outputs: { instant: output(projectMomentInstant({
55
54
  itemId: instantSpec(inputs).id,
56
55
  subjectId: instantSpec(inputs).subjectId,
57
- semantic: inline<SemanticTrack>(inputs.semantic?.value, "SemanticTrack"),
56
+ timeline: inline<Timeline>(inputs.timeline?.value, "Timeline"),
58
57
  moment: inline<NarrativeMomentRef>(inputs.moment?.value, "NarrativeMoment"),
59
58
  projection: instantSpec(inputs).projection,
60
59
  authority: instantSpec(inputs).authority,
@@ -1,6 +1,6 @@
1
1
  import type { ModuleManifest, ProducerRef, TypeRef, ValueSchema } from "@hypit/protocol";
2
2
  import { narrativeDependency, narrativeTypes } from "@hypit/narrative";
3
- import { semanticTrackDependency, semanticTrackTypes } from "@hypit/semantic-track";
3
+ import { timelineDependency, timelineTypes } from "@hypit/timeline";
4
4
  import { programSpaceDependency, programSpaceTypes } from "@hypit/program-space";
5
5
 
6
6
  const string = { kind: "string", minLength: 1 } as const;
@@ -65,7 +65,7 @@ export const temporalManifest: ModuleManifest = {
65
65
  format: "hypit.module@1",
66
66
  name: temporalModuleRef.name,
67
67
  version: temporalModuleRef.version,
68
- dependencies: [narrativeDependency, programSpaceDependency, semanticTrackDependency],
68
+ dependencies: [narrativeDependency, programSpaceDependency, timelineDependency],
69
69
  types: [
70
70
  { name: temporalTypes.instantSpec.name },
71
71
  { name: temporalTypes.instant.name },
@@ -75,16 +75,16 @@ export const temporalManifest: ModuleManifest = {
75
75
  capabilities: [],
76
76
  producers: [
77
77
  { name: temporalProducers.projectProgramInstant.name,
78
- inputs: [{ name: "space", type: programSpaceTypes.programSpace }, { name: "spec", type: temporalTypes.instantSpec }],
78
+ inputs: [{ name: "timeline", type: timelineTypes.track }, { name: "spec", type: temporalTypes.instantSpec }],
79
79
  outputs: [{ name: "instant", type: temporalTypes.instant }], needs: [] },
80
80
  { name: temporalProducers.projectSelectionInstant.name,
81
- inputs: [{ name: "semantic", type: semanticTrackTypes.track }, { name: "selection", type: narrativeTypes.selection }, { name: "spec", type: temporalTypes.instantSpec }],
81
+ inputs: [{ name: "timeline", type: timelineTypes.track }, { name: "selection", type: narrativeTypes.selection }, { name: "spec", type: temporalTypes.instantSpec }],
82
82
  outputs: [{ name: "instant", type: temporalTypes.instant }], needs: [] },
83
83
  { name: temporalProducers.projectSegmentInstant.name,
84
- inputs: [{ name: "semantic", type: semanticTrackTypes.track }, { name: "segment", type: narrativeTypes.excerpt }, { name: "spec", type: temporalTypes.instantSpec }],
84
+ inputs: [{ name: "timeline", type: timelineTypes.track }, { name: "segment", type: narrativeTypes.excerpt }, { name: "spec", type: temporalTypes.instantSpec }],
85
85
  outputs: [{ name: "instant", type: temporalTypes.instant }], needs: [] },
86
86
  { name: temporalProducers.projectMomentInstant.name,
87
- inputs: [{ name: "semantic", type: semanticTrackTypes.track }, { name: "moment", type: narrativeTypes.moment }, { name: "spec", type: temporalTypes.instantSpec }],
87
+ inputs: [{ name: "timeline", type: timelineTypes.track }, { name: "moment", type: narrativeTypes.moment }, { name: "spec", type: temporalTypes.instantSpec }],
88
88
  outputs: [{ name: "instant", type: temporalTypes.instant }], needs: [] },
89
89
  { name: temporalProducers.composeWindow.name,
90
90
  inputs: [{ name: "spec", type: temporalTypes.windowSpec }, { name: "start", type: temporalTypes.instant }, { name: "end", type: temporalTypes.instant }],
@@ -108,3 +108,5 @@ export const temporalWindowSchema: ValueSchema = object({
108
108
  end: { schema: temporalInstantSchema },
109
109
  span: { schema: frameSpanSchema },
110
110
  });
111
+
112
+ export { durationInFrames } from "./rational.js";
@@ -2,11 +2,11 @@ import type { NarrativeExcerpt, NarrativeMomentRef, NarrativeSelectionRef } from
2
2
  import { programSpaceFrameCount } from "@hypit/program-space";
3
3
  import {
4
4
  momentFrame,
5
- projectSemanticProgramSpace,
5
+ projectTimelineSpace,
6
6
  segmentFrameSpan,
7
7
  selectionFrameSpan,
8
- } from "@hypit/semantic-track";
9
- import type { SemanticTrack } from "@hypit/semantic-track";
8
+ } from "@hypit/timeline";
9
+ import type { Timeline } from "@hypit/timeline";
10
10
 
11
11
  import type {
12
12
  LocatedMoment,
@@ -22,10 +22,10 @@ function assertLocatedFrame(frame: number, totalFrames: number, label: string):
22
22
  }
23
23
 
24
24
  export function locateSelection(
25
- semantic: SemanticTrack,
25
+ semantic: Timeline,
26
26
  selection: NarrativeSelectionRef,
27
27
  ): LocatedSelection {
28
- const space = projectSemanticProgramSpace(semantic);
28
+ const space = projectTimelineSpace(semantic);
29
29
  const totalFrames = programSpaceFrameCount(space);
30
30
  const span = selectionFrameSpan(semantic, selection);
31
31
  assertLocatedFrame(span.startFrame, totalFrames, `NarrativeSelection ${selection.id} start`);
@@ -34,26 +34,26 @@ export function locateSelection(
34
34
  }
35
35
 
36
36
  export function locateMoment(
37
- semantic: SemanticTrack,
37
+ semantic: Timeline,
38
38
  moment: NarrativeMomentRef,
39
39
  ): LocatedMoment {
40
- const space = projectSemanticProgramSpace(semantic);
40
+ const space = projectTimelineSpace(semantic);
41
41
  const totalFrames = programSpaceFrameCount(space);
42
42
  const frame = momentFrame(semantic, moment);
43
43
  assertLocatedFrame(frame, totalFrames, `NarrativeMoment ${moment.id} cue`);
44
44
  return { id: moment.id, cue: { frame } };
45
45
  }
46
46
 
47
- export function locateProgram(semantic: SemanticTrack): LocatedProgram {
48
- const space = projectSemanticProgramSpace(semantic);
47
+ export function locateProgram(semantic: Timeline): LocatedProgram {
48
+ const space = projectTimelineSpace(semantic);
49
49
  return { id: "program", start: { frame: 0 }, end: { frame: programSpaceFrameCount(space) } };
50
50
  }
51
51
 
52
52
  export function locateSegment(
53
- semantic: SemanticTrack,
53
+ semantic: Timeline,
54
54
  segment: NarrativeExcerpt,
55
55
  ): LocatedSegment {
56
- const space = projectSemanticProgramSpace(semantic);
56
+ const space = projectTimelineSpace(semantic);
57
57
  const totalFrames = programSpaceFrameCount(space);
58
58
  const span = segmentFrameSpan(semantic, segment);
59
59
  assertLocatedFrame(span.startFrame, totalFrames, `Narrative Segment ${segment.id} start`);
@@ -1,8 +1,8 @@
1
1
  import type { NarrativeExcerpt, NarrativeMomentRef, NarrativeSelectionRef } from "@hypit/narrative";
2
2
  import { assertProgramSpaceIdentity, programSpaceFrameCount } from "@hypit/program-space";
3
3
  import type { ProgramSpace } from "@hypit/program-space";
4
- import { projectSemanticProgramSpace } from "@hypit/semantic-track";
5
- import type { SemanticTrack } from "@hypit/semantic-track";
4
+ import { projectTimelineSpace } from "@hypit/timeline";
5
+ import type { Timeline } from "@hypit/timeline";
6
6
 
7
7
  import { locateMoment, locateProgram, locateSegment, locateSelection } from "./location.js";
8
8
  import { add, compare, durationInFrames, quantizeBoundary, rational } from "./rational.js";
@@ -169,17 +169,17 @@ function projectedInstant(
169
169
  export function projectSelectionInstant(input: {
170
170
  readonly itemId: string;
171
171
  readonly subjectId: string;
172
- readonly semantic: SemanticTrack;
172
+ readonly timeline: Timeline;
173
173
  readonly selection: NarrativeSelectionRef;
174
174
  readonly projection: TemporalInstantExpression;
175
175
  readonly authority: TemporalInstantSpec["authority"];
176
176
  }): ProjectedInstant {
177
- const space = projectSemanticProgramSpace(input.semantic);
178
- const program = locateProgram(input.semantic);
179
- const selection = locateSelection(input.semantic, input.selection);
177
+ const space = projectTimelineSpace(input.timeline);
178
+ const program = locateProgram(input.timeline);
179
+ const selection = locateSelection(input.timeline, input.selection);
180
180
  return projectedInstant(
181
181
  { id: input.itemId, subjectId: input.subjectId, projection: input.projection, authority: input.authority },
182
- { spaceId: space.id, narrativeId: input.semantic.narrativeId, kind: "selection", id: selection.id },
182
+ { spaceId: space.id, narrativeId: input.selection.narrativeId, kind: "selection", id: selection.id },
183
183
  projectTemporalInstant(input.projection, { program, selection }, space),
184
184
  );
185
185
  }
@@ -187,17 +187,17 @@ export function projectSelectionInstant(input: {
187
187
  export function projectMomentInstant(input: {
188
188
  readonly itemId: string;
189
189
  readonly subjectId: string;
190
- readonly semantic: SemanticTrack;
190
+ readonly timeline: Timeline;
191
191
  readonly moment: NarrativeMomentRef;
192
192
  readonly projection: TemporalInstantExpression;
193
193
  readonly authority: TemporalInstantSpec["authority"];
194
194
  }): ProjectedInstant {
195
- const space = projectSemanticProgramSpace(input.semantic);
196
- const program = locateProgram(input.semantic);
197
- const moment = locateMoment(input.semantic, input.moment);
195
+ const space = projectTimelineSpace(input.timeline);
196
+ const program = locateProgram(input.timeline);
197
+ const moment = locateMoment(input.timeline, input.moment);
198
198
  return projectedInstant(
199
199
  { id: input.itemId, subjectId: input.subjectId, projection: input.projection, authority: input.authority },
200
- { spaceId: space.id, narrativeId: input.semantic.narrativeId, kind: "moment", id: moment.id },
200
+ { spaceId: space.id, narrativeId: input.moment.narrativeId, kind: "moment", id: moment.id },
201
201
  projectTemporalInstant(input.projection, { program, moment }, space),
202
202
  );
203
203
  }
@@ -205,11 +205,11 @@ export function projectMomentInstant(input: {
205
205
  export function projectProgramInstant(input: {
206
206
  readonly itemId: string;
207
207
  readonly subjectId: string;
208
- readonly space: ProgramSpace;
208
+ readonly timeline: Timeline;
209
209
  readonly projection: TemporalInstantExpression;
210
210
  readonly authority: TemporalInstantSpec["authority"];
211
211
  }): ProjectedInstant {
212
- const space = input.space;
212
+ const space = projectTimelineSpace(input.timeline);
213
213
  const program = { id: "program" as const, start: { frame: 0 }, end: { frame: programSpaceFrameCount(space) } };
214
214
  return projectedInstant(
215
215
  { id: input.itemId, subjectId: input.subjectId, projection: input.projection, authority: input.authority },
@@ -221,17 +221,17 @@ export function projectProgramInstant(input: {
221
221
  export function projectSegmentInstant(input: {
222
222
  readonly itemId: string;
223
223
  readonly subjectId: string;
224
- readonly semantic: SemanticTrack;
224
+ readonly timeline: Timeline;
225
225
  readonly segment: NarrativeExcerpt;
226
226
  readonly projection: TemporalInstantExpression;
227
227
  readonly authority: TemporalInstantSpec["authority"];
228
228
  }): ProjectedInstant {
229
- const space = projectSemanticProgramSpace(input.semantic);
230
- const program = locateProgram(input.semantic);
231
- const segment = locateSegment(input.semantic, input.segment);
229
+ const space = projectTimelineSpace(input.timeline);
230
+ const program = locateProgram(input.timeline);
231
+ const segment = locateSegment(input.timeline, input.segment);
232
232
  return projectedInstant(
233
233
  { id: input.itemId, subjectId: input.subjectId, projection: input.projection, authority: input.authority },
234
- { spaceId: space.id, narrativeId: input.semantic.narrativeId, kind: "segment", id: segment.id },
234
+ { spaceId: space.id, narrativeId: input.segment.narrativeId, kind: "segment", id: segment.id },
235
235
  projectTemporalInstant(input.projection, { program, segment }, space),
236
236
  );
237
237
  }
@@ -1,4 +1,4 @@
1
- import type { ProgramSpace } from "@hypit/program-space";
1
+ import type { ProgramClock } from "@hypit/program-space";
2
2
 
3
3
  import type { TemporalDuration } from "./types.js";
4
4
 
@@ -51,9 +51,9 @@ function safeInteger(value: number, label: string): bigint {
51
51
  return BigInt(value);
52
52
  }
53
53
 
54
- export function durationInFrames(duration: TemporalDuration, space: ProgramSpace): Rational {
55
- const frameNumerator = safeInteger(space.frameRate.numerator, "ProgramSpace frame-rate numerator");
56
- const frameDenominator = safeInteger(space.frameRate.denominator, "ProgramSpace frame-rate denominator");
54
+ export function durationInFrames(duration: TemporalDuration, space: ProgramClock): Rational {
55
+ const frameNumerator = safeInteger(space.frameRate.numerator, "ProgramClock frame-rate numerator");
56
+ const frameDenominator = safeInteger(space.frameRate.denominator, "ProgramClock frame-rate denominator");
57
57
  switch (duration.unit) {
58
58
  case "frames":
59
59
  return rational(safeInteger(duration.value, "Frame duration"));
@@ -0,0 +1,183 @@
1
+ # Author-directed time editing
2
+
3
+ The shared temporal author forms declare what Studio can edit. The tables below describe their
4
+ implemented behavior; a component's Companion also supplies the actual Source bindings.
5
+ The runtime projection types remain `@1`.
6
+
7
+ ## Relationships, expressions, and resolved time
8
+
9
+ Selection and Moment name relationships in a Narrative. A Selection names two anchors; a Moment
10
+ names one. Neither carries a duration measured in seconds. Segment and Program boundaries retain
11
+ their structural meaning alongside word boundaries.
12
+
13
+ A temporal expression describes how to obtain time from those relationships or from a clock.
14
+ Projection resolves that description in a ProgramSpace. Its products are TemporalInstant and
15
+ TemporalWindow, which a component consumes to implement its own schedule and appearance.
16
+
17
+ In temporal author attributes, `{story.moment.reveal}` is a direct typed reference. Quoted values
18
+ such as `"2s"` and `"moment.cue + 2f"` are clock descriptions. Quotation marks do not themselves
19
+ produce an Instant or Window, and braces elsewhere in SVML can reference any public value type.
20
+ Both semantic references and clock descriptions reach consumers through temporal projection.
21
+ The consumer's role determines whether one Instant or a Window is needed.
22
+
23
+ The editing rule is: **edit the relationship or parameter the author exposed, preserving the
24
+ relationship they chose to depend on.** Knowing where a result came from does not by itself grant
25
+ an inverse that changes that source.
26
+
27
+ ## Direct bindings
28
+
29
+ | Author form | Move | Leading edge | Trailing edge |
30
+ | --- | --- | --- | --- |
31
+ | `during={story.selection.proof}` | Move both Selection anchors by the same number of semantic stops; duration may change. | Change its start anchor. | Change its end anchor. |
32
+ | `at={story.moment.reveal}` for an Instant | Change the Moment anchor. | Not applicable. | Not applicable. |
33
+ | `at={story.selection.proof} boundary="start"` for an Instant | Change only the Selection start anchor. | Not applicable. | Not applicable. |
34
+ | `at={story.selection.proof} boundary="end"` for an Instant | Change only the Selection end anchor. | Not applicable. | Not applicable. |
35
+ | `during={story.segment.opening}` or `during="program"` | Follow the structural span; no timeline write. | No timeline write. | No timeline write. |
36
+ | A directly selected Segment boundary | Follow that structural boundary; no timeline write. | Not applicable. | Not applicable. |
37
+
38
+ A shared Selection or Moment is edited once in Script. All its consumers follow after compilation.
39
+ An item's placement in a track does not make its own private copy of that relationship.
40
+
41
+ Word starts, word ends, Segment starts, and Segment ends are equally eligible semantic anchors.
42
+ Selection starts do not inherently prefer word starts; Selection ends do not inherently prefer
43
+ word ends. Endpoints can include pauses by referring to the appropriate neighboring anchor.
44
+
45
+ ## An event and a duration
46
+
47
+ These forms expose two independent decisions: an event or clock position, and a duration.
48
+
49
+ | Author form | Move | Leading edge | Trailing edge |
50
+ | --- | --- | --- | --- |
51
+ | `at={story.moment.reveal} for="8f"` | Change the Moment; keep `for`. | No handle. | Change `for`; keep the Moment. |
52
+ | `until={story.moment.reveal} for="8f"` | Change the Moment; keep `for`. | Change `for`; keep the Moment. | No handle. |
53
+ | `at="2s" for="8f"` | Change `at`; keep `for`. | No handle. | Change `for`; keep `at`. |
54
+ | `until="2s" for="8f"` | Change `until`; keep `for`. | Change `for`; keep `until`. | No handle. |
55
+
56
+ Moving an event-and-duration window preserves duration. Moving a direct Selection window preserves
57
+ semantic step displacement instead. These are different author decisions, so they have different
58
+ behavior even when their current rectangles look identical.
59
+
60
+ The unavailable edge does not secretly edit both the event and the duration. Duration editing is
61
+ frame-based; semantic event editing selects an anchor. There is no `at` plus `until` Window form:
62
+ current forms are `during`, `at/for`, `until/for`, and `start/end`.
63
+
64
+ ## Clock positions and explicit offsets
65
+
66
+ A literal Instant such as `at="2s"` exposes one numeric time and can move by rewriting that value.
67
+ A reference expression exposes a local offset while retaining its referenced event:
68
+
69
+ ```svml
70
+ moment={story.moment.reveal}
71
+ instant="moment.cue + 2f"
72
+ ```
73
+
74
+ Moving this Instant changes the signed offset only. It does not relocate the Moment in Script.
75
+ The same rule applies to an explicit offset from a selected boundary or a Program boundary.
76
+ The expression's reference remains unchanged through the write.
77
+
78
+ A bare reference expression such as `instant="moment.cue"` has an implicit zero offset. Moving it
79
+ writes an offset such as `moment.cue+3f`; it leaves the Moment in Script unchanged. The direct
80
+ binding `at={...}` is the form that edits the Moment itself.
81
+
82
+ Bare references and explicit `+0f` have the same editing behavior. Writeback uses an explicit frame
83
+ offset, including at zero. Positive, zero, and negative offsets belong to the same editing operation,
84
+ subject to the resulting projection being usable.
85
+
86
+ The existing syntax uses `instant` for expressions and a separate typed `moment`, `selection`, or
87
+ `segment` attribute to bind their source. This design does not add an implicit name resolver or
88
+ put arithmetic inside `{...}`. Unifying surface attribute spellings is a separate usability choice,
89
+ not a prerequisite for establishing these edit semantics.
90
+
91
+ ## Independently authored endpoints
92
+
93
+ `start="..." end="..."` expresses a deliberately assembled Window. Its expressions may use different
94
+ sources, boundaries, absolute times, and offsets. This form remains available for production,
95
+ including pure motion graphics and windows extending around a spoken passage.
96
+
97
+ Each endpoint is edited exactly like an Instant expression: a literal changes its absolute time;
98
+ a reference changes its local offset. A leading trim changes `start`, a trailing trim changes `end`,
99
+ and a whole-window move shifts both endpoints by the same frame delta. Each expression retains its
100
+ own reference, even when the endpoints depend on different sources. The referenced Script markers
101
+ remain unchanged. Companion bindings identify the two writable source parameters.
102
+
103
+ ## Seconds and frames
104
+
105
+ Seconds and milliseconds describe clock duration; frames describe steps at the ProgramSpace's
106
+ frame rate. `2s` remains two seconds when the rate changes, whereas `60f` spans two seconds at 30fps
107
+ and one second at 60fps. Parsing retains that authored unit. Projection uses exact rational arithmetic
108
+ and rounds the resulting position to the nearest frame boundary, with half-frame ties rounding later.
109
+
110
+ Timeline gestures operate on whole frames in the current ProgramSpace. A changed absolute value is
111
+ written in frames, and a changed reference expression receives a frame offset. Unedited expressions
112
+ retain their spelling and units. This makes a drag's result exact at the current frame rate without
113
+ silently converting all authored clock durations into frame counts.
114
+
115
+ ## Semantic stops and coincident anchors
116
+
117
+ Script order, anchor identity, and projected frame position are separate data:
118
+
119
+ - Script order determines which inline Selection an author surface can express.
120
+ - Projected frame position determines where an event appears in the current performance.
121
+ - Anchor identity determines which relationship survives later changes to that performance.
122
+
123
+ Build the gesture's semantic stops from distinct projected frame positions in chronological order.
124
+ Several anchors at one frame occupy one stop but retain their individual identities. A direct
125
+ Selection move advances both endpoints by the same signed number of stops. It does not shift a raw
126
+ anchor-array index, assume one stop is one word, or preserve a duration measured in frames.
127
+
128
+ Ties first retain the current anchor where it is still a candidate, then prefer its kind, then use
129
+ a stable declared order. This is a default choice among coincident candidates, not a hierarchy of
130
+ valid anchors. Selecting a semantic marker shows its exact anchors in the Inspector. Where declared
131
+ handles allow it, a choice lists the other anchors at the same frame; horizontal mouse position alone
132
+ cannot distinguish them. That explicit choice uses the same Script adjustment operation as dragging.
133
+
134
+ Segment overlap or gaps can change temporal order without changing Script order. Stop construction
135
+ must not assume contiguous Segments. Timeline places each prepared Take independently; semantic
136
+ stops use those placed anchor frames, including coincident anchors from overlapping Takes.
137
+
138
+ ## Selection, projection, and consumption
139
+
140
+ A Selection that is forward in Script may locate to equal or reversed frame endpoints. This does
141
+ not alone establish whether every use of that Selection is invalid. A consumer may use only its
142
+ start, or an expression may add offsets before composing a Window.
143
+
144
+ Script validates the relationship it can express. Temporal projection validates the resulting
145
+ Instant or Window in its ProgramSpace. Components validate their own use of those results.
146
+ Studio offers only gestures with a declared inverse and candidate targets that preserve the
147
+ edited object's usable projection. It does not add a global positive-duration rule to Selection.
148
+
149
+ Both endpoints of a range adjustment are written in one operation. Recompilation remains the check
150
+ for effects on other consumers of the shared relationship. An unsuccessful publication leaves the
151
+ previous source and displayed state in place through the existing source transaction; this does not
152
+ introduce a Build recovery workflow or a second mutable source of truth.
153
+
154
+ A hidden or invalid initial object does not need an automatic repair interface. Conversely, a valid
155
+ editable object must not disappear because the editor committed a target its own projection cannot
156
+ represent. The relevant closure is over meaningful relationships and supported operations, not every
157
+ possible raw spelling of the document.
158
+
159
+ ## Implementation ownership
160
+
161
+ The existing protocol already distinguishes `TemporalSource` from `TemporalInstantAuthority`.
162
+ Preserve this separation. A source says what time depends on; authority identifies an intentional
163
+ write target. The `fixed` case means no temporal gesture writes that endpoint, not that all author
164
+ parameter editing is forbidden.
165
+
166
+ - `@hypit/script` owns tokenization, anchor identities, legal marker sites, and structural writeback.
167
+ It normalizes equivalent marker whitespace, retains punctuation and attributes, writes coincident
168
+ markers together, and preserves all unrelated relationships and caption information.
169
+ - `@hypit/temporal-markup` owns the interpretation of each time form and declares its write targets.
170
+ Direct semantic references expose semantic targets; quoted time expressions expose parameter
171
+ targets, including implicit zero offsets and independent endpoints. Structural bindings retain
172
+ their structural boundaries without a timeline write target.
173
+ - `@hypit/temporal` resolves time and validates its results. It does not infer a user editing choice
174
+ from invertibility or know Studio's UI.
175
+ - Companion/Studio translates those declared relationships into the finite operations above.
176
+ Existing `after-start` and `before-end` duration relationships already distinguish event-and-duration
177
+ windows. Explicit source bindings remain the write allowlist. Component names and media types
178
+ do not decide which operation is available.
179
+
180
+ Script tests exercise repeated marker moves and return trips across English, Chinese, Dual Text,
181
+ punctuation, token attributes, and empty Segments. Temporal Markup tests check author authority;
182
+ Studio tests check handles, semantic-stop movement, projected validity, and offset writes through zero.
183
+ The same semantic gesture projection is used for the timeline preview and server-side validation.
@@ -2,24 +2,28 @@
2
2
 
3
3
  Shared SVML author-time projection helpers for `@hypit/temporal`. The Surface lowers authored
4
4
  Selection, Segment, Moment or explicit clock expressions to ordinary Instant projections and Window
5
- composition. A domain consumer receives the projected values and explicit ProgramSpace; it does not
5
+ composition. A domain consumer receives the projected values and the shared Timeline; it does not
6
6
  locate Script words or infer a semantic source inside its renderer.
7
7
 
8
8
  The package exports `createTemporalWindowProjection`, `createTemporalInstantProjection`,
9
- `resolveTemporalContext`, `createTemporalSpace`, attribute vocabulary, and the exact duration/instant parsers. These are helpers for component
9
+ `resolveTemporalContext`, attribute vocabulary, and the exact duration/instant parsers. These are helpers for component
10
10
  Surfaces, not standalone author tags or a new Track.
11
11
 
12
+ The editing behavior is specified in [Author-directed time editing](EDITING.md).
13
+ It separates direct bindings, durations, and explicit offsets from derived results, with a precise
14
+ write target for each supported gesture.
15
+
12
16
  ## Time context
13
17
 
14
- A Track Surface can accept `semantic={speech.semantic}` or `space={animation}`. Resolve that choice
15
- with `resolveTemporalContext({ element, resolveReference })`, and pass the result to
16
- `createTemporalSpace({ id, element, ...context })`. Preserve its component and fragment drafts.
17
- Supply `...context, space: time.space` to each temporal projection helper, and pass `time.space.ref`
18
- to the domain Fragment. Its input Type is `programSpaceTypes.programSpace`.
18
+ A Track Surface accepts `timeline={program.timeline}`. Resolve it with
19
+ `resolveTemporalContext({ element, resolveReference })` and pass that context to each temporal
20
+ projection helper. Wire `context.timeline.ref` directly into the component Fragment's Timeline port.
21
+ Preserve the projections' returned records, components and fragments.
19
22
 
20
- A semantic context locates Script references and supplies the performance's time axis. A declared
21
- space supplies a clock for authored animation. Literal times and program boundaries work in either
22
- context. A Script reference needs `semantic` to locate it; the renderer never invents that mapping.
23
+ The context contains one required `timeline` reference. Program time and Script references both
24
+ project against it. Pure animation uses a zero-Take Timeline with an authored extent. Script events
25
+ use the anchors provided by its placed Takes. Drawing Producers receive that same Timeline and the
26
+ projected Instants/Windows; they need no Script parser or separate time-range input.
23
27
 
24
28
  ## Window forms
25
29
 
@@ -66,10 +70,26 @@ can deliberately admit only that form; consumers need not expose unrelated tempo
66
70
 
67
71
  The Surface supplies an author-facing `subjectId` for the actual item whose time is being projected,
68
72
  separately from graph-qualified operation ids. The graph wires the resulting Instant or Window and
69
- ProgramSpace into the consumer. Keep projection outside the domain Producer: it consumes resolved
73
+ Timeline into the consumer. Keep projection outside the domain Producer: it consumes resolved
70
74
  time and implements its own schedule or state, while the shared temporal protocol retains where that
71
75
  time came from. An outer lifetime and child activations are separate inputs when a component persists
72
76
  between events.
73
77
 
74
78
  Script's `@`, `~@`, close markers and Moment syntax belong to `@hypit/script`; media playback belongs
75
79
  to `@hypit/media-track`; a graphic component's reveal or preset semantics belong to that component.
80
+
81
+ ## Independently bound endpoints
82
+
83
+ For a Window whose endpoints refer to different semantic sources, use `start-source` and
84
+ `end-source`. The expression still states the kind and boundary; each binding supplies that source:
85
+
86
+ ```svml
87
+ <example:Item start-source={story.segment.next} start="segment.start"
88
+ end-source={story.segment.previous} end="segment.end"/>
89
+ ```
90
+
91
+ This describes an overlapping physical interval without authoring a backwards Script Selection.
92
+ The same endpoint bindings accept Selections or Moments with their corresponding expressions.
93
+ `segment`, `selection` and `moment` remain convenient shared bindings when both expressions use the
94
+ same source. Explicit expressions retain local parameter writeback; these bindings do not move the
95
+ referenced Script anchors when the expression's offset is edited.
@@ -11,7 +11,7 @@
11
11
  "@hypit/elaborator": "workspace:*",
12
12
  "@hypit/markup": "workspace:*",
13
13
  "@hypit/narrative": "workspace:*",
14
- "@hypit/semantic-track": "workspace:*",
14
+ "@hypit/timeline": "workspace:*",
15
15
  "@hypit/temporal": "workspace:*",
16
16
  "@hypit/program-space": "workspace:*"
17
17
  }