@automovie/viewer 0.3.4 → 0.4.0

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 (387) hide show
  1. package/README.md +8 -87
  2. package/lib/IAutoMovieViewerCompletedFrame.d.ts +19 -11
  3. package/lib/IAutoMovieViewerDisplayMetadata.d.ts +0 -5
  4. package/lib/IAutoMovieViewerHandle.d.ts +3 -25
  5. package/lib/IMountViewerOptions.d.ts +24 -38
  6. package/lib/IViewerCameraStateSnapshot.d.ts +0 -5
  7. package/lib/IViewerFrameTransfer.d.ts +11 -0
  8. package/lib/IViewerFrameTransfer.js +3 -0
  9. package/lib/IViewerFrameTransfer.js.map +1 -0
  10. package/lib/IViewerFrameTransfer.mjs +0 -0
  11. package/lib/applyCaptureCanvasSize.d.ts +9 -10
  12. package/lib/applyCaptureCanvasSize.js +7 -13
  13. package/lib/applyCaptureCanvasSize.js.map +1 -1
  14. package/lib/applyCaptureCanvasSize.mjs +7 -10
  15. package/lib/applyCaptureCanvasSize.mjs.map +1 -1
  16. package/lib/audio/IAutoMovieAudioCue.d.ts +3 -8
  17. package/lib/audio/planAutoMovieAudioPlayback.d.ts +8 -21
  18. package/lib/audio/planAutoMovieAudioPlayback.js +8 -14
  19. package/lib/audio/planAutoMovieAudioPlayback.js.map +1 -1
  20. package/lib/audio/planAutoMovieAudioPlayback.mjs +8 -14
  21. package/lib/audio/planAutoMovieAudioPlayback.mjs.map +1 -1
  22. package/lib/audio/playAutoMovieAudioCues.d.ts +4 -11
  23. package/lib/audio/playAutoMovieAudioCues.js +4 -11
  24. package/lib/audio/playAutoMovieAudioCues.js.map +1 -1
  25. package/lib/audio/playAutoMovieAudioCues.mjs +4 -11
  26. package/lib/audio/playAutoMovieAudioCues.mjs.map +1 -1
  27. package/lib/createViewerCameraState.d.ts +3 -11
  28. package/lib/createViewerCameraState.js +80 -121
  29. package/lib/createViewerCameraState.js.map +1 -1
  30. package/lib/createViewerCameraState.mjs +46 -98
  31. package/lib/createViewerCameraState.mjs.map +1 -1
  32. package/lib/createViewerDisplayClock.d.ts +2 -10
  33. package/lib/createViewerDisplayClock.js +4 -12
  34. package/lib/createViewerDisplayClock.js.map +1 -1
  35. package/lib/createViewerDisplayClock.mjs +3 -11
  36. package/lib/createViewerDisplayClock.mjs.map +1 -1
  37. package/lib/createViewerDisplayPublication.d.ts +7 -15
  38. package/lib/createViewerDisplayPublication.js +7 -15
  39. package/lib/createViewerDisplayPublication.js.map +1 -1
  40. package/lib/createViewerDisplayPublication.mjs +7 -15
  41. package/lib/createViewerDisplayPublication.mjs.map +1 -1
  42. package/lib/createViewerDisplaySave.d.ts +8 -16
  43. package/lib/createViewerDisplaySave.js +8 -16
  44. package/lib/createViewerDisplaySave.js.map +1 -1
  45. package/lib/createViewerDisplaySave.mjs +8 -16
  46. package/lib/createViewerDisplaySave.mjs.map +1 -1
  47. package/lib/createViewerFrameControl.d.ts +8 -10
  48. package/lib/createViewerFrameControl.js +3 -15
  49. package/lib/createViewerFrameControl.js.map +1 -1
  50. package/lib/createViewerFrameControl.mjs +3 -12
  51. package/lib/createViewerFrameControl.mjs.map +1 -1
  52. package/lib/createViewerViewportResize.d.ts +4 -12
  53. package/lib/createViewerViewportResize.js +7 -20
  54. package/lib/createViewerViewportResize.js.map +1 -1
  55. package/lib/createViewerViewportResize.mjs +6 -14
  56. package/lib/createViewerViewportResize.mjs.map +1 -1
  57. package/lib/index.d.ts +1 -0
  58. package/lib/index.js +1 -0
  59. package/lib/index.js.map +1 -1
  60. package/lib/index.mjs +6 -1
  61. package/lib/inspector/AutoMovieInspector.d.ts +33 -13
  62. package/lib/inspector/AutoMovieInspector.js +110 -19
  63. package/lib/inspector/AutoMovieInspector.js.map +1 -1
  64. package/lib/inspector/AutoMovieInspector.mjs +121 -18
  65. package/lib/inspector/AutoMovieInspector.mjs.map +1 -1
  66. package/lib/inspector/AutoMovieInspectorBeauty.d.ts +41 -0
  67. package/lib/inspector/AutoMovieInspectorBeauty.js +56 -0
  68. package/lib/inspector/AutoMovieInspectorBeauty.js.map +1 -0
  69. package/lib/inspector/AutoMovieInspectorBeauty.mjs +55 -0
  70. package/lib/inspector/AutoMovieInspectorBeauty.mjs.map +1 -0
  71. package/lib/inspector/AutoMovieInspectorDiagnosticLog.d.ts +48 -0
  72. package/lib/inspector/AutoMovieInspectorDiagnosticLog.js +186 -0
  73. package/lib/inspector/AutoMovieInspectorDiagnosticLog.js.map +1 -0
  74. package/lib/inspector/AutoMovieInspectorDiagnosticLog.mjs +171 -0
  75. package/lib/inspector/AutoMovieInspectorDiagnosticLog.mjs.map +1 -0
  76. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.d.ts +23 -0
  77. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.js +37 -0
  78. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.js.map +1 -0
  79. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.mjs +85 -0
  80. package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.mjs.map +1 -0
  81. package/lib/inspector/AutoMovieInspectorMarksPanel.d.ts +4 -10
  82. package/lib/inspector/AutoMovieInspectorMarksPanel.js +18 -35
  83. package/lib/inspector/AutoMovieInspectorMarksPanel.js.map +1 -1
  84. package/lib/inspector/AutoMovieInspectorMarksPanel.mjs +32 -38
  85. package/lib/inspector/AutoMovieInspectorMarksPanel.mjs.map +1 -1
  86. package/lib/inspector/AutoMovieInspectorPlayhead.d.ts +35 -96
  87. package/lib/inspector/AutoMovieInspectorPlayhead.js +41 -101
  88. package/lib/inspector/AutoMovieInspectorPlayhead.js.map +1 -1
  89. package/lib/inspector/AutoMovieInspectorPlayhead.mjs +44 -98
  90. package/lib/inspector/AutoMovieInspectorPlayhead.mjs.map +1 -1
  91. package/lib/inspector/AutoMovieInspectorRequestPanel.d.ts +9 -10
  92. package/lib/inspector/AutoMovieInspectorRequestPanel.js +18 -12
  93. package/lib/inspector/AutoMovieInspectorRequestPanel.js.map +1 -1
  94. package/lib/inspector/AutoMovieInspectorRequestPanel.mjs +32 -14
  95. package/lib/inspector/AutoMovieInspectorRequestPanel.mjs.map +1 -1
  96. package/lib/inspector/AutoMovieInspectorSelectionPanel.d.ts +0 -8
  97. package/lib/inspector/AutoMovieInspectorSelectionPanel.js +0 -8
  98. package/lib/inspector/AutoMovieInspectorSelectionPanel.js.map +1 -1
  99. package/lib/inspector/AutoMovieInspectorSelectionPanel.mjs +0 -8
  100. package/lib/inspector/AutoMovieInspectorSelectionPanel.mjs.map +1 -1
  101. package/lib/inspector/AutoMovieInspectorShadePanel.d.ts +2 -9
  102. package/lib/inspector/AutoMovieInspectorShadePanel.js +18 -25
  103. package/lib/inspector/AutoMovieInspectorShadePanel.js.map +1 -1
  104. package/lib/inspector/AutoMovieInspectorShadePanel.mjs +18 -27
  105. package/lib/inspector/AutoMovieInspectorShadePanel.mjs.map +1 -1
  106. package/lib/inspector/AutoMovieInspectorTimePanel.d.ts +0 -8
  107. package/lib/inspector/AutoMovieInspectorTimePanel.js +0 -8
  108. package/lib/inspector/AutoMovieInspectorTimePanel.js.map +1 -1
  109. package/lib/inspector/AutoMovieInspectorTimePanel.mjs +0 -8
  110. package/lib/inspector/AutoMovieInspectorTimePanel.mjs.map +1 -1
  111. package/lib/inspector/AutoMovieInspectorTimeReadout.d.ts +0 -8
  112. package/lib/inspector/AutoMovieInspectorTimeReadout.js +4 -10
  113. package/lib/inspector/AutoMovieInspectorTimeReadout.js.map +1 -1
  114. package/lib/inspector/AutoMovieInspectorTimeReadout.mjs +3 -12
  115. package/lib/inspector/AutoMovieInspectorTimeReadout.mjs.map +1 -1
  116. package/lib/inspector/AutoMovieInspectorTransition.d.ts +79 -0
  117. package/lib/inspector/AutoMovieInspectorTransition.js +131 -0
  118. package/lib/inspector/AutoMovieInspectorTransition.js.map +1 -0
  119. package/lib/inspector/AutoMovieInspectorTransition.mjs +119 -0
  120. package/lib/inspector/AutoMovieInspectorTransition.mjs.map +1 -0
  121. package/lib/inspector/AutoMovieInspectorViewPanel.d.ts +0 -8
  122. package/lib/inspector/AutoMovieInspectorViewPanel.js +0 -8
  123. package/lib/inspector/AutoMovieInspectorViewPanel.js.map +1 -1
  124. package/lib/inspector/AutoMovieInspectorViewPanel.mjs +0 -8
  125. package/lib/inspector/AutoMovieInspectorViewPanel.mjs.map +1 -1
  126. package/lib/inspector/IAutoMovieInspectorAction.d.ts +54 -95
  127. package/lib/inspector/IAutoMovieInspectorLive.d.ts +43 -0
  128. package/lib/inspector/IAutoMovieInspectorLive.js +3 -0
  129. package/lib/inspector/IAutoMovieInspectorLive.js.map +1 -0
  130. package/lib/inspector/IAutoMovieInspectorLive.mjs +0 -0
  131. package/lib/inspector/IAutoMovieInspectorPathNode.d.ts +14 -9
  132. package/lib/inspector/IAutoMovieInspectorProps.d.ts +3 -14
  133. package/lib/inspector/IAutoMovieInspectorScene.d.ts +96 -100
  134. package/lib/inspector/IAutoMovieInspectorSceneHost.d.ts +37 -102
  135. package/lib/inspector/IAutoMovieInspectorState.d.ts +6 -7
  136. package/lib/inspector/assertAutoMovieInspectorRaster.d.ts +7 -0
  137. package/lib/inspector/assertAutoMovieInspectorRaster.js +19 -0
  138. package/lib/inspector/assertAutoMovieInspectorRaster.js.map +1 -0
  139. package/lib/inspector/assertAutoMovieInspectorRaster.mjs +17 -0
  140. package/lib/inspector/assertAutoMovieInspectorRaster.mjs.map +1 -0
  141. package/lib/inspector/buildAutoMovieInspectorPathTree.d.ts +9 -10
  142. package/lib/inspector/buildAutoMovieInspectorPathTree.js +9 -10
  143. package/lib/inspector/buildAutoMovieInspectorPathTree.js.map +1 -1
  144. package/lib/inspector/buildAutoMovieInspectorPathTree.mjs +9 -10
  145. package/lib/inspector/buildAutoMovieInspectorPathTree.mjs.map +1 -1
  146. package/lib/inspector/changesAutoMovieObservedScene.d.ts +16 -0
  147. package/lib/inspector/changesAutoMovieObservedScene.js +28 -0
  148. package/lib/inspector/changesAutoMovieObservedScene.js.map +1 -0
  149. package/lib/inspector/changesAutoMovieObservedScene.mjs +21 -0
  150. package/lib/inspector/changesAutoMovieObservedScene.mjs.map +1 -0
  151. package/lib/inspector/createAutoMovieInspectorAddressWriter.d.ts +13 -11
  152. package/lib/inspector/createAutoMovieInspectorAddressWriter.js +13 -11
  153. package/lib/inspector/createAutoMovieInspectorAddressWriter.js.map +1 -1
  154. package/lib/inspector/createAutoMovieInspectorAddressWriter.mjs +13 -11
  155. package/lib/inspector/createAutoMovieInspectorAddressWriter.mjs.map +1 -1
  156. package/lib/inspector/createAutoMovieInspectorCanvasHost.d.ts +7 -10
  157. package/lib/inspector/createAutoMovieInspectorCanvasHost.js +14 -11
  158. package/lib/inspector/createAutoMovieInspectorCanvasHost.js.map +1 -1
  159. package/lib/inspector/createAutoMovieInspectorCanvasHost.mjs +17 -14
  160. package/lib/inspector/createAutoMovieInspectorCanvasHost.mjs.map +1 -1
  161. package/lib/inspector/createAutoMovieInspectorState.d.ts +3 -9
  162. package/lib/inspector/createAutoMovieInspectorState.js +3 -9
  163. package/lib/inspector/createAutoMovieInspectorState.js.map +1 -1
  164. package/lib/inspector/createAutoMovieInspectorState.mjs +3 -9
  165. package/lib/inspector/createAutoMovieInspectorState.mjs.map +1 -1
  166. package/lib/inspector/firstAutoMovieInspectorSecond.d.ts +6 -0
  167. package/lib/inspector/firstAutoMovieInspectorSecond.js +13 -0
  168. package/lib/inspector/firstAutoMovieInspectorSecond.js.map +1 -0
  169. package/lib/inspector/firstAutoMovieInspectorSecond.mjs +11 -0
  170. package/lib/inspector/firstAutoMovieInspectorSecond.mjs.map +1 -0
  171. package/lib/inspector/followAutoMovieInspectorSize.d.ts +11 -0
  172. package/lib/inspector/followAutoMovieInspectorSize.js +26 -0
  173. package/lib/inspector/followAutoMovieInspectorSize.js.map +1 -0
  174. package/lib/inspector/followAutoMovieInspectorSize.mjs +26 -0
  175. package/lib/inspector/followAutoMovieInspectorSize.mjs.map +1 -0
  176. package/lib/inspector/formatAutoMovieInspectorAddress.d.ts +11 -10
  177. package/lib/inspector/formatAutoMovieInspectorAddress.js +15 -11
  178. package/lib/inspector/formatAutoMovieInspectorAddress.js.map +1 -1
  179. package/lib/inspector/formatAutoMovieInspectorAddress.mjs +15 -11
  180. package/lib/inspector/formatAutoMovieInspectorAddress.mjs.map +1 -1
  181. package/lib/inspector/formatAutoMovieInspectorCommand.d.ts +20 -14
  182. package/lib/inspector/formatAutoMovieInspectorCommand.js +33 -14
  183. package/lib/inspector/formatAutoMovieInspectorCommand.js.map +1 -1
  184. package/lib/inspector/formatAutoMovieInspectorCommand.mjs +26 -15
  185. package/lib/inspector/formatAutoMovieInspectorCommand.mjs.map +1 -1
  186. package/lib/inspector/handleAutoMovieInspectorKey.d.ts +24 -15
  187. package/lib/inspector/handleAutoMovieInspectorKey.js +27 -16
  188. package/lib/inspector/handleAutoMovieInspectorKey.js.map +1 -1
  189. package/lib/inspector/handleAutoMovieInspectorKey.mjs +27 -16
  190. package/lib/inspector/handleAutoMovieInspectorKey.mjs.map +1 -1
  191. package/lib/inspector/index.d.ts +5 -0
  192. package/lib/inspector/index.js +5 -0
  193. package/lib/inspector/index.js.map +1 -1
  194. package/lib/inspector/index.mjs +6 -1
  195. package/lib/inspector/inspectAutoMovieInspectorRequest.d.ts +19 -0
  196. package/lib/inspector/inspectAutoMovieInspectorRequest.js +20 -0
  197. package/lib/inspector/inspectAutoMovieInspectorRequest.js.map +1 -0
  198. package/lib/inspector/inspectAutoMovieInspectorRequest.mjs +20 -0
  199. package/lib/inspector/inspectAutoMovieInspectorRequest.mjs.map +1 -0
  200. package/lib/inspector/installAutoMovieInspectorRequest.d.ts +20 -0
  201. package/lib/inspector/installAutoMovieInspectorRequest.js +36 -0
  202. package/lib/inspector/installAutoMovieInspectorRequest.js.map +1 -0
  203. package/lib/inspector/installAutoMovieInspectorRequest.mjs +35 -0
  204. package/lib/inspector/installAutoMovieInspectorRequest.mjs.map +1 -0
  205. package/lib/inspector/locateAutoMovieInspectorFinding.d.ts +19 -0
  206. package/lib/inspector/locateAutoMovieInspectorFinding.js +34 -0
  207. package/lib/inspector/locateAutoMovieInspectorFinding.js.map +1 -0
  208. package/lib/inspector/locateAutoMovieInspectorFinding.mjs +37 -0
  209. package/lib/inspector/locateAutoMovieInspectorFinding.mjs.map +1 -0
  210. package/lib/inspector/messageOfAutoMovieInspectorError.d.ts +2 -0
  211. package/lib/inspector/messageOfAutoMovieInspectorError.js +8 -0
  212. package/lib/inspector/messageOfAutoMovieInspectorError.js.map +1 -0
  213. package/lib/inspector/messageOfAutoMovieInspectorError.mjs +8 -0
  214. package/lib/inspector/messageOfAutoMovieInspectorError.mjs.map +1 -0
  215. package/lib/inspector/mountAutoMovieInspectorPage.d.ts +5 -8
  216. package/lib/inspector/mountAutoMovieInspectorPage.js +3 -9
  217. package/lib/inspector/mountAutoMovieInspectorPage.js.map +1 -1
  218. package/lib/inspector/mountAutoMovieInspectorPage.mjs +4 -9
  219. package/lib/inspector/mountAutoMovieInspectorPage.mjs.map +1 -1
  220. package/lib/inspector/mountAutoMovieInspectorScene.d.ts +55 -12
  221. package/lib/inspector/mountAutoMovieInspectorScene.js +238 -164
  222. package/lib/inspector/mountAutoMovieInspectorScene.js.map +1 -1
  223. package/lib/inspector/mountAutoMovieInspectorScene.mjs +223 -149
  224. package/lib/inspector/mountAutoMovieInspectorScene.mjs.map +1 -1
  225. package/lib/inspector/placeAutoMovieInspectorLabels.d.ts +29 -0
  226. package/lib/inspector/placeAutoMovieInspectorLabels.js +33 -0
  227. package/lib/inspector/placeAutoMovieInspectorLabels.js.map +1 -0
  228. package/lib/inspector/placeAutoMovieInspectorLabels.mjs +32 -0
  229. package/lib/inspector/placeAutoMovieInspectorLabels.mjs.map +1 -0
  230. package/lib/inspector/readAutoMovieInspectorAddress.d.ts +8 -11
  231. package/lib/inspector/readAutoMovieInspectorAddress.js +8 -11
  232. package/lib/inspector/readAutoMovieInspectorAddress.js.map +1 -1
  233. package/lib/inspector/readAutoMovieInspectorAddress.mjs +8 -11
  234. package/lib/inspector/readAutoMovieInspectorAddress.mjs.map +1 -1
  235. package/lib/inspector/readAutoMovieInspectorFacts.d.ts +17 -0
  236. package/lib/inspector/readAutoMovieInspectorFacts.js +34 -0
  237. package/lib/inspector/readAutoMovieInspectorFacts.js.map +1 -0
  238. package/lib/inspector/readAutoMovieInspectorFacts.mjs +28 -0
  239. package/lib/inspector/readAutoMovieInspectorFacts.mjs.map +1 -0
  240. package/lib/inspector/readsAutoMovieInspectorPlacedScene.d.ts +9 -0
  241. package/lib/inspector/readsAutoMovieInspectorPlacedScene.js +14 -0
  242. package/lib/inspector/readsAutoMovieInspectorPlacedScene.js.map +1 -0
  243. package/lib/inspector/readsAutoMovieInspectorPlacedScene.mjs +14 -0
  244. package/lib/inspector/readsAutoMovieInspectorPlacedScene.mjs.map +1 -0
  245. package/lib/inspector/reduceAutoMovieInspectorState.d.ts +10 -10
  246. package/lib/inspector/reduceAutoMovieInspectorState.js +17 -11
  247. package/lib/inspector/reduceAutoMovieInspectorState.js.map +1 -1
  248. package/lib/inspector/reduceAutoMovieInspectorState.mjs +16 -11
  249. package/lib/inspector/reduceAutoMovieInspectorState.mjs.map +1 -1
  250. package/lib/inspector/releaseAutoMovieInspectorSteps.d.ts +6 -0
  251. package/lib/inspector/releaseAutoMovieInspectorSteps.js +23 -0
  252. package/lib/inspector/releaseAutoMovieInspectorSteps.js.map +1 -0
  253. package/lib/inspector/releaseAutoMovieInspectorSteps.mjs +19 -0
  254. package/lib/inspector/releaseAutoMovieInspectorSteps.mjs.map +1 -0
  255. package/lib/inspector/reportAutoMovieInspectorLabels.d.ts +21 -0
  256. package/lib/inspector/reportAutoMovieInspectorLabels.js +27 -0
  257. package/lib/inspector/reportAutoMovieInspectorLabels.js.map +1 -0
  258. package/lib/inspector/reportAutoMovieInspectorLabels.mjs +30 -0
  259. package/lib/inspector/reportAutoMovieInspectorLabels.mjs.map +1 -0
  260. package/lib/inspector/resolveAutoMovieInspectorCamera.d.ts +22 -0
  261. package/lib/inspector/resolveAutoMovieInspectorCamera.js +34 -0
  262. package/lib/inspector/resolveAutoMovieInspectorCamera.js.map +1 -0
  263. package/lib/inspector/resolveAutoMovieInspectorCamera.mjs +34 -0
  264. package/lib/inspector/resolveAutoMovieInspectorCamera.mjs.map +1 -0
  265. package/lib/inspector/showAutoMovieInspectorFinding.d.ts +25 -0
  266. package/lib/inspector/showAutoMovieInspectorFinding.js +26 -0
  267. package/lib/inspector/showAutoMovieInspectorFinding.js.map +1 -0
  268. package/lib/inspector/showAutoMovieInspectorFinding.mjs +26 -0
  269. package/lib/inspector/showAutoMovieInspectorFinding.mjs.map +1 -0
  270. package/lib/inspector/stopAutoMovieInspectorTime.d.ts +11 -0
  271. package/lib/inspector/stopAutoMovieInspectorTime.js +17 -0
  272. package/lib/inspector/stopAutoMovieInspectorTime.js.map +1 -0
  273. package/lib/inspector/stopAutoMovieInspectorTime.mjs +18 -0
  274. package/lib/inspector/stopAutoMovieInspectorTime.mjs.map +1 -0
  275. package/lib/inspector/writeAutoMovieInspectorInspection.d.ts +6 -0
  276. package/lib/inspector/writeAutoMovieInspectorInspection.js +12 -0
  277. package/lib/inspector/writeAutoMovieInspectorInspection.js.map +1 -0
  278. package/lib/inspector/writeAutoMovieInspectorInspection.mjs +12 -0
  279. package/lib/inspector/writeAutoMovieInspectorInspection.mjs.map +1 -0
  280. package/lib/internal.d.ts +7 -0
  281. package/lib/internal.js +25 -0
  282. package/lib/internal.js.map +1 -0
  283. package/lib/internal.mjs +8 -0
  284. package/lib/mountViewer.d.ts +16 -10
  285. package/lib/mountViewer.js +17 -14
  286. package/lib/mountViewer.js.map +1 -1
  287. package/lib/mountViewer.mjs +18 -12
  288. package/lib/mountViewer.mjs.map +1 -1
  289. package/lib/publishViewerCompletedFrame.d.ts +12 -10
  290. package/lib/publishViewerCompletedFrame.js +11 -9
  291. package/lib/publishViewerCompletedFrame.js.map +1 -1
  292. package/lib/publishViewerCompletedFrame.mjs +11 -9
  293. package/lib/publishViewerCompletedFrame.mjs.map +1 -1
  294. package/lib/redrawViewerCompletedFrame.d.ts +2 -10
  295. package/lib/redrawViewerCompletedFrame.js +4 -12
  296. package/lib/redrawViewerCompletedFrame.js.map +1 -1
  297. package/lib/redrawViewerCompletedFrame.mjs +3 -11
  298. package/lib/redrawViewerCompletedFrame.mjs.map +1 -1
  299. package/lib/releaseMountedViewer.d.ts +5 -9
  300. package/lib/releaseMountedViewer.js +5 -9
  301. package/lib/releaseMountedViewer.js.map +1 -1
  302. package/lib/releaseMountedViewer.mjs +5 -9
  303. package/lib/releaseMountedViewer.mjs.map +1 -1
  304. package/lib/transport/AutoMovieViewerTransport.d.ts +13 -122
  305. package/lib/transport/AutoMovieViewerTransport.js +10 -74
  306. package/lib/transport/AutoMovieViewerTransport.js.map +1 -1
  307. package/lib/transport/AutoMovieViewerTransport.mjs +10 -65
  308. package/lib/transport/AutoMovieViewerTransport.mjs.map +1 -1
  309. package/lib/transport/readAutoMovieReviewInterval.d.ts +3 -10
  310. package/lib/transport/readAutoMovieReviewInterval.js +11 -16
  311. package/lib/transport/readAutoMovieReviewInterval.js.map +1 -1
  312. package/lib/transport/readAutoMovieReviewInterval.mjs +8 -14
  313. package/lib/transport/readAutoMovieReviewInterval.mjs.map +1 -1
  314. package/package.json +12 -8
  315. package/src/IAutoMovieViewerCompletedFrame.ts +21 -11
  316. package/src/IAutoMovieViewerDisplayMetadata.ts +0 -5
  317. package/src/IAutoMovieViewerHandle.ts +3 -25
  318. package/src/IMountViewerOptions.ts +24 -38
  319. package/src/IViewerCameraStateSnapshot.ts +0 -5
  320. package/src/IViewerFrameTransfer.ts +13 -0
  321. package/src/applyCaptureCanvasSize.ts +9 -18
  322. package/src/audio/IAutoMovieAudioCue.ts +3 -8
  323. package/src/audio/planAutoMovieAudioPlayback.ts +9 -23
  324. package/src/audio/playAutoMovieAudioCues.ts +4 -11
  325. package/src/createViewerCameraState.ts +119 -175
  326. package/src/createViewerDisplayClock.ts +4 -12
  327. package/src/createViewerDisplayPublication.ts +7 -15
  328. package/src/createViewerDisplaySave.ts +8 -16
  329. package/src/createViewerFrameControl.ts +16 -24
  330. package/src/createViewerViewportResize.ts +7 -23
  331. package/src/index.ts +1 -0
  332. package/src/inspector/AutoMovieInspector.tsx +183 -20
  333. package/src/inspector/AutoMovieInspectorBeauty.ts +89 -0
  334. package/src/inspector/AutoMovieInspectorDiagnosticLog.ts +235 -0
  335. package/src/inspector/AutoMovieInspectorDiagnosticsPanel.tsx +118 -0
  336. package/src/inspector/AutoMovieInspectorMarksPanel.tsx +26 -34
  337. package/src/inspector/AutoMovieInspectorPlayhead.ts +53 -110
  338. package/src/inspector/AutoMovieInspectorRequestPanel.tsx +57 -29
  339. package/src/inspector/AutoMovieInspectorSelectionPanel.tsx +0 -8
  340. package/src/inspector/AutoMovieInspectorShadePanel.tsx +24 -29
  341. package/src/inspector/AutoMovieInspectorTimePanel.tsx +0 -8
  342. package/src/inspector/AutoMovieInspectorTimeReadout.tsx +4 -10
  343. package/src/inspector/AutoMovieInspectorTransition.ts +178 -0
  344. package/src/inspector/AutoMovieInspectorViewPanel.tsx +0 -8
  345. package/src/inspector/IAutoMovieInspectorAction.ts +57 -94
  346. package/src/inspector/IAutoMovieInspectorLive.ts +62 -0
  347. package/src/inspector/IAutoMovieInspectorPathNode.ts +14 -9
  348. package/src/inspector/IAutoMovieInspectorProps.ts +4 -14
  349. package/src/inspector/IAutoMovieInspectorScene.ts +104 -99
  350. package/src/inspector/IAutoMovieInspectorSceneHost.ts +43 -102
  351. package/src/inspector/IAutoMovieInspectorState.ts +6 -7
  352. package/src/inspector/assertAutoMovieInspectorRaster.ts +23 -0
  353. package/src/inspector/buildAutoMovieInspectorPathTree.ts +9 -10
  354. package/src/inspector/changesAutoMovieObservedScene.ts +30 -0
  355. package/src/inspector/createAutoMovieInspectorAddressWriter.ts +13 -11
  356. package/src/inspector/createAutoMovieInspectorCanvasHost.ts +14 -12
  357. package/src/inspector/createAutoMovieInspectorState.ts +3 -9
  358. package/src/inspector/firstAutoMovieInspectorSecond.ts +13 -0
  359. package/src/inspector/followAutoMovieInspectorSize.ts +32 -0
  360. package/src/inspector/formatAutoMovieInspectorAddress.ts +15 -11
  361. package/src/inspector/formatAutoMovieInspectorCommand.ts +44 -15
  362. package/src/inspector/handleAutoMovieInspectorKey.ts +27 -16
  363. package/src/inspector/index.ts +5 -0
  364. package/src/inspector/inspectAutoMovieInspectorRequest.ts +37 -0
  365. package/src/inspector/installAutoMovieInspectorRequest.ts +50 -0
  366. package/src/inspector/locateAutoMovieInspectorFinding.ts +40 -0
  367. package/src/inspector/messageOfAutoMovieInspectorError.ts +4 -0
  368. package/src/inspector/mountAutoMovieInspectorPage.tsx +7 -8
  369. package/src/inspector/mountAutoMovieInspectorScene.ts +290 -232
  370. package/src/inspector/placeAutoMovieInspectorLabels.ts +53 -0
  371. package/src/inspector/readAutoMovieInspectorAddress.ts +8 -11
  372. package/src/inspector/readAutoMovieInspectorFacts.ts +50 -0
  373. package/src/inspector/readsAutoMovieInspectorPlacedScene.ts +16 -0
  374. package/src/inspector/reduceAutoMovieInspectorState.ts +17 -11
  375. package/src/inspector/releaseAutoMovieInspectorSteps.ts +19 -0
  376. package/src/inspector/reportAutoMovieInspectorLabels.ts +45 -0
  377. package/src/inspector/resolveAutoMovieInspectorCamera.ts +50 -0
  378. package/src/inspector/showAutoMovieInspectorFinding.ts +40 -0
  379. package/src/inspector/stopAutoMovieInspectorTime.ts +19 -0
  380. package/src/inspector/writeAutoMovieInspectorInspection.ts +12 -0
  381. package/src/internal.ts +9 -0
  382. package/src/mountViewer.ts +17 -14
  383. package/src/publishViewerCompletedFrame.ts +14 -10
  384. package/src/redrawViewerCompletedFrame.ts +3 -12
  385. package/src/releaseMountedViewer.ts +5 -9
  386. package/src/transport/AutoMovieViewerTransport.ts +17 -144
  387. package/src/transport/readAutoMovieReviewInterval.ts +15 -16
@@ -0,0 +1,53 @@
1
+ import type { IAutoMovieInspectionLabel } from "@automovie/interface";
2
+ import type { IAutoMovieInspectionHandle } from "@automovie/render";
3
+ import type * as THREE from "three";
4
+
5
+ import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
6
+ import type { IAutoMovieInspectorSceneHost } from "./IAutoMovieInspectorSceneHost.js";
7
+
8
+ /**
9
+ * Place a paused picture's labels and convert them to CSS pixels of the canvas.
10
+ *
11
+ * The inspection places labels on the subject's raster. Positions and the line
12
+ * height scale by the ratio of the canvas's size to that raster, and the
13
+ * stamp's font pixel stays at least one CSS pixel, as a capture keeps it at
14
+ * least one sheet pixel.
15
+ *
16
+ * @param props The applied inspection, the camera drawn through, the subject's
17
+ * raster and the canvas size shown.
18
+ * @returns The kept labels, their line height and the number dropped.
19
+ */
20
+ export function placeAutoMovieInspectorLabels(props: {
21
+ /** The inspection applied to the picture. */
22
+ inspection: IAutoMovieInspectionHandle;
23
+
24
+ /** The camera the picture was drawn through. */
25
+ camera: THREE.Camera;
26
+
27
+ /** The subject's raster in pixels. */
28
+ raster: { width: number; height: number };
29
+
30
+ /** The canvas as laid out. */
31
+ shown: IAutoMovieInspectorSceneHost.ISize;
32
+ }): IAutoMovieInspectorScene.ILabels {
33
+ const { width, height } = props.raster;
34
+ const { shown } = props;
35
+ const scale: number = Math.max(1, Math.ceil(height / shown.height));
36
+ const placed: ReturnType<IAutoMovieInspectionHandle["labels"]> =
37
+ props.inspection.labels(props.camera, width, height, scale);
38
+ return {
39
+ labels: placed.labels.map(
40
+ (
41
+ label: IAutoMovieInspectionLabel,
42
+ ): IAutoMovieInspectorScene.ILabels["labels"][number] => ({
43
+ path: label.path,
44
+ text: label.text,
45
+ left: (label.x * shown.width) / width,
46
+ top: (label.y * shown.height) / height,
47
+ }),
48
+ ),
49
+ // The stamp's box is nine font pixels high.
50
+ lineHeight: (9 * scale * shown.height) / height,
51
+ dropped: placed.dropped.length,
52
+ };
53
+ }
@@ -2,23 +2,20 @@ import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
2
2
  import { parseAutoMovieCapturePlanRequest } from "@automovie/render";
3
3
 
4
4
  /**
5
- * Read the request an address names: its query text, with or without the leading `?`, through the capture plan grammar.
5
+ * Read the request an address names: its query text, with or without the
6
+ * leading `?`, through the capture plan grammar.
6
7
  *
7
- * The text is decoded by `URLSearchParams`, so `+` reads as a space and percent escapes as their characters, and the parameters go to `parseAutoMovieCapturePlanRequest` as they are. The empty text is the request that asks for nothing.
8
+ * The text is decoded by `URLSearchParams`, so `+` reads as a space and percent
9
+ * escapes as their characters, and the parameters go to
10
+ * `parseAutoMovieCapturePlanRequest` as they are. The empty text is the request
11
+ * that asks for nothing.
8
12
  *
9
- * It throws the grammar's `Error`, which names the key, for an unknown key, a key given twice or a value the grammar refuses.
13
+ * It throws the grammar's `Error`, which names the key, for an unknown key, a
14
+ * key given twice or a value the grammar refuses.
10
15
  *
11
16
  * ```ts
12
17
  * const request = readAutoMovieInspectorAddress(location.search);
13
18
  * ```
14
- *
15
- * @evidence contracts/development/common.md#meaningful-documentation States the accepted text, how it is decoded, what empty text gives and what a refusal names.
16
- * @evidence contracts/development/implementation.md#principled-implementation `URLSearchParams` is the browser's own query decoder and satisfies the grammar's source as it is, so the page maps its address and parses nothing itself.
17
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Strip one `?`, decode, read.
18
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal reaches the caller; nothing falls back to a default request here.
19
- * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the text.
20
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one text.
21
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh request and keeps nothing.
22
19
  */
23
20
  export function readAutoMovieInspectorAddress(
24
21
  text: string,
@@ -0,0 +1,50 @@
1
+ import {
2
+ type IApplyAutoMovieInspectionProps,
3
+ type IAutoMovieDrawScene,
4
+ type IAutoMovieViewerViewpoint,
5
+ autoMovieViewerNamedViewpoints,
6
+ listAutoMovieInspectionPaths,
7
+ } from "@automovie/render";
8
+
9
+ import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
10
+
11
+ /**
12
+ * What the inspector learns from a subject placed at its first second: the
13
+ * paths of its scene and of the marks it supplies there, those marks, the kinds
14
+ * it declares, its own views and the viewer's named viewpoints, and its raster
15
+ * and clock.
16
+ *
17
+ * Paths are listed before any inspection adds its own objects to the scene, so
18
+ * the caller reads the facts before applying one.
19
+ */
20
+ export function readAutoMovieInspectorFacts(props: {
21
+ /** The created subject, placed at `seconds`. */
22
+ instance: IAutoMovieDrawScene;
23
+
24
+ /** The placed second. */
25
+ seconds: number;
26
+ }): IAutoMovieInspectorScene.IFacts {
27
+ const { instance }: typeof props = props;
28
+ const marks: NonNullable<IApplyAutoMovieInspectionProps["marks"]> =
29
+ instance.marks?.(props.seconds) ?? [];
30
+ return {
31
+ paths: [
32
+ ...listAutoMovieInspectionPaths(instance.scene).map(
33
+ ({ path }: { path: string }): string => path,
34
+ ),
35
+ ...marks.map(({ path }: { path: string }): string => path),
36
+ ],
37
+ marks,
38
+ markKinds: instance.markKinds ?? [],
39
+ views: [
40
+ ...Object.keys(instance.views ?? {}),
41
+ ...autoMovieViewerNamedViewpoints().map(
42
+ ({ id }: IAutoMovieViewerViewpoint): string => id,
43
+ ),
44
+ ],
45
+ width: instance.width,
46
+ height: instance.height,
47
+ durationSeconds: instance.durationSeconds,
48
+ fps: instance.fps,
49
+ };
50
+ }
@@ -0,0 +1,16 @@
1
+ import type { IAutoMovieDrawScene } from "@automovie/render";
2
+
3
+ /**
4
+ * Whether a subject reads its placed scene before each picture, so the
5
+ * inspector must lift an inspection that changes the scene around the seek: a
6
+ * subject that observes its placed scene (`inspectPlaced`), or one whose
7
+ * render-target work (`beforeDraw`), such as surface feeds, draws the scene
8
+ * with its own materials.
9
+ */
10
+ export function readsAutoMovieInspectorPlacedScene(
11
+ instance: Pick<IAutoMovieDrawScene, "inspectPlaced" | "beforeDraw">,
12
+ ): boolean {
13
+ return (
14
+ instance.inspectPlaced !== undefined || instance.beforeDraw !== undefined
15
+ );
16
+ }
@@ -19,17 +19,17 @@ const LISTS: Record<IAutoMovieInspectorAction.IToggle["type"], string> = {
19
19
  /**
20
20
  * Apply one edit to the inspector's request, the only way its request changes.
21
21
  *
22
- * The request is written as named text values by `formatAutoMovieCapturePlanRequest`, the action changes the text of the key or keys the `IAutoMovieInspectorAction` table names, and the values are read back by `parseAutoMovieCapturePlanRequest`. The result has the request read and no error. When the reader refuses, the result keeps the previous request beside the reader's message, which names the key, so a mistyped address or a refused value never replaces the picture.
22
+ * The request is written as named text values by
23
+ * `formatAutoMovieCapturePlanRequest`, the action changes the text of the key
24
+ * or keys the `IAutoMovieInspectorAction` table names, and the values are read
25
+ * back by `parseAutoMovieCapturePlanRequest`. The result has the request read
26
+ * and no error. When the reader refuses, the result keeps the previous request
27
+ * beside the reader's message, which names the key, so a mistyped address or a
28
+ * refused value never replaces the picture.
23
29
  *
24
- * A `text` action replaces every key with the address text's; a `restore` action sets the scene's request and reason without reading anything. An edit that leaves the text unchanged returns an equal request.
25
- *
26
- * @evidence contracts/development/common.md#meaningful-documentation States how an edit becomes a request, what the result holds when accepted and when refused, and the two actions that bypass the key edit.
27
- * @evidence contracts/development/implementation.md#principled-implementation Editing the grammar's own text and reading it back means every control goes through the one reader the address and the command use, so the reducer restates no default, no validation and no member of the typed request; a key the reader adds starts working without a change here.
28
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Write, edit the keys of one action in one switch, read; list and colour edits share two small helpers.
29
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal is reported, never patched by dropping the offending key, and the time edit removes the sampling keys `at` excludes instead of letting the reader refuse the mix.
30
- * @evidence contracts/development/implementation.md#efficient-algorithms One write and one read of the request, linear in its text, per dispatched edit; playback dispatches none.
31
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one state and one action.
32
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh state and keeps nothing.
30
+ * A `text` action replaces every key with the address text's; a `restore`
31
+ * action sets the scene's request and reason without reading anything. An edit
32
+ * that leaves the text unchanged returns an equal request.
33
33
  */
34
34
  export function reduceAutoMovieInspectorState(
35
35
  state: IAutoMovieInspectorState,
@@ -84,9 +84,12 @@ export function reduceAutoMovieInspectorState(
84
84
  values.set("views", action.view);
85
85
  break;
86
86
  case "time":
87
+ case "locate":
87
88
  // `at` excludes an even sampling, so its keys go.
88
89
  for (const key of ["from", "to", "rate"]) values.delete(key);
89
90
  values.set("at", String(action.seconds));
91
+ if (action.type === "locate")
92
+ edit(values, "label", (): string[] => [...action.label]);
90
93
  break;
91
94
  case "subject":
92
95
  if (action.name === null) values.delete("subject");
@@ -100,7 +103,10 @@ export function reduceAutoMovieInspectorState(
100
103
  );
101
104
  }
102
105
 
103
- /** The state a reading gives: its request, or the previous request with the refusal. */
106
+ /**
107
+ * The state a reading gives: its request, or the previous request with the
108
+ * refusal.
109
+ */
104
110
  function read(
105
111
  state: IAutoMovieInspectorState,
106
112
  reading: () => IAutoMovieCapturePlanRequest,
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Run every release step of an inspector mount in order, then throw every
3
+ * failure together: the one failure as it was, several as one `AggregateError`,
4
+ * so a failed step never keeps a later resource alive.
5
+ */
6
+ export function releaseAutoMovieInspectorSteps(
7
+ steps: readonly (() => void)[],
8
+ ): void {
9
+ const failures: unknown[] = [];
10
+ for (const step of steps)
11
+ try {
12
+ step();
13
+ } catch (error) {
14
+ failures.push(error);
15
+ }
16
+ if (failures.length === 1) throw failures[0];
17
+ if (failures.length > 1)
18
+ throw new AggregateError(failures, "The inspector mount failed to release");
19
+ }
@@ -0,0 +1,45 @@
1
+ import type { IAutoMovieInspectionLegendEntry } from "@automovie/interface";
2
+ import type * as THREE from "three";
3
+
4
+ import type { IAutoMovieInspectorLive } from "./IAutoMovieInspectorLive.js";
5
+ import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
6
+ import { placeAutoMovieInspectorLabels } from "./placeAutoMovieInspectorLabels.js";
7
+
8
+ /**
9
+ * Report a painted picture's legend and labels: while paused, the inspection's
10
+ * legend with the witness legend and the labels placed on the picture's pixels;
11
+ * while playing, no labels, cleared once when the picture had some.
12
+ */
13
+ export function reportAutoMovieInspectorLabels(props: {
14
+ /** The mount's live state, whose `labelled` flag this keeps. */
15
+ now: IAutoMovieInspectorLive;
16
+
17
+ /** Where the mount reports. */
18
+ report: IAutoMovieInspectorScene.IReport;
19
+
20
+ /** The camera the picture was drawn through. */
21
+ camera: THREE.Camera;
22
+
23
+ /** The witness cubes' legend of this picture. */
24
+ diagnosticLegend: readonly IAutoMovieInspectionLegendEntry[];
25
+
26
+ /** Whether the playhead is playing. */
27
+ playing: boolean;
28
+ }): void {
29
+ const { now, report }: typeof props = props;
30
+ if (!props.playing) {
31
+ report.legend([...now.inspection.legend, ...props.diagnosticLegend]);
32
+ report.labels(
33
+ placeAutoMovieInspectorLabels({
34
+ inspection: now.inspection,
35
+ camera: props.camera,
36
+ raster: now.instance,
37
+ shown: now.size!,
38
+ }),
39
+ );
40
+ now.labelled = true;
41
+ } else if (now.labelled) {
42
+ report.labels({ labels: [], lineHeight: 0, dropped: 0 });
43
+ now.labelled = false;
44
+ }
45
+ }
@@ -0,0 +1,50 @@
1
+ import type { IAutoMovieInspectionView } from "@automovie/interface";
2
+ import {
3
+ type IAutoMovieDrawScene,
4
+ type IAutoMovieInspectionHandle,
5
+ parseAutoMovieInspectionView,
6
+ resolveAutoMovieInspectionView,
7
+ } from "@automovie/render";
8
+ import type * as THREE from "three";
9
+
10
+ /**
11
+ * The camera the inspector draws a placed second through: the request's view,
12
+ * written as `text`, resolved against the subject's delivery camera and named
13
+ * views at `seconds`, a named view with a focus framed on what the inspection
14
+ * selects.
15
+ *
16
+ * The delivery camera first takes the subject raster's aspect, as a capture of
17
+ * the subject sets it, so a view frames what a capture of the same view frames
18
+ * whatever the canvas's shape.
19
+ */
20
+ export function resolveAutoMovieInspectorCamera(props: {
21
+ /** The created subject, placed at `seconds`. */
22
+ instance: IAutoMovieDrawScene;
23
+
24
+ /** The view's text, the request's first view. */
25
+ text: string;
26
+
27
+ /** The applied inspection, whose bounds frame a focused named view. */
28
+ inspection: IAutoMovieInspectionHandle;
29
+
30
+ /** The placed second. */
31
+ seconds: number;
32
+ }): THREE.Camera {
33
+ const { instance, text }: typeof props = props;
34
+ const aspect: number = instance.width / instance.height;
35
+ if (instance.camera.aspect !== aspect) {
36
+ instance.camera.aspect = aspect;
37
+ instance.camera.updateProjectionMatrix();
38
+ }
39
+ const view: IAutoMovieInspectionView = parseAutoMovieInspectionView(text);
40
+ return resolveAutoMovieInspectionView({
41
+ view,
42
+ text,
43
+ bounds: view.type === "named" ? props.inspection.bounds(view.focus) : null,
44
+ camera: instance.camera,
45
+ ...(instance.views === undefined ? {} : { views: instance.views }),
46
+ seconds: props.seconds,
47
+ width: instance.width,
48
+ height: instance.height,
49
+ }).camera;
50
+ }
@@ -0,0 +1,40 @@
1
+ import type { IAutoMovieInspectionDiagnostics } from "@automovie/interface";
2
+
3
+ import type { AutoMovieInspectorPlayhead } from "./AutoMovieInspectorPlayhead.js";
4
+ import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
5
+ import { locateAutoMovieInspectorFinding } from "./locateAutoMovieInspectorFinding.js";
6
+
7
+ /**
8
+ * Stop the inspector at one finding's witness: move the playhead there, stop
9
+ * it, and locate the request there.
10
+ *
11
+ * Stopping playback makes the time readout write the stopped second into the
12
+ * request, so the playhead is moved to the witness before it stops: the stopped
13
+ * second and the located second are then the same, whichever edit the reducer
14
+ * receives last.
15
+ *
16
+ * @param props The witness, the drawn paths, the playhead and the request's
17
+ * dispatch.
18
+ */
19
+ export function showAutoMovieInspectorFinding(props: {
20
+ /** The witness to show. */
21
+ observation: IAutoMovieInspectionDiagnostics.IObservation;
22
+
23
+ /** The identity paths the scene draws. */
24
+ paths: readonly string[];
25
+
26
+ /** The inspector's playhead. */
27
+ playhead: AutoMovieInspectorPlayhead;
28
+
29
+ /** Where the request edit goes. */
30
+ dispatch: (action: IAutoMovieInspectorAction) => void;
31
+ }): void {
32
+ const action: IAutoMovieInspectorAction.ILocate =
33
+ locateAutoMovieInspectorFinding(props.observation, props.paths);
34
+ props.playhead.seek(action.seconds);
35
+ props.playhead.pause();
36
+ props.dispatch({
37
+ ...action,
38
+ seconds: props.playhead.getSnapshot().seconds,
39
+ });
40
+ }
@@ -0,0 +1,19 @@
1
+ import type { AutoMovieInspectorPlayhead } from "./AutoMovieInspectorPlayhead.js";
2
+ import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
3
+
4
+ /**
5
+ * The request edit a playhead change implies: when playback stops, by a pause
6
+ * or at the end, the stopped second becomes the request's.
7
+ *
8
+ * @param playing Whether the playhead played at the previous snapshot.
9
+ * @param snapshot The current snapshot.
10
+ * @returns The `time` edit for a stop, or null when playback did not stop.
11
+ */
12
+ export function stopAutoMovieInspectorTime(
13
+ playing: boolean,
14
+ snapshot: AutoMovieInspectorPlayhead.ISnapshot,
15
+ ): IAutoMovieInspectorAction.ITime | null {
16
+ return playing && !snapshot.playing
17
+ ? { type: "time", seconds: snapshot.seconds }
18
+ : null;
19
+ }
@@ -0,0 +1,12 @@
1
+ import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
2
+ import { formatAutoMovieInspectionRequest } from "@automovie/render";
3
+
4
+ /**
5
+ * A request's inspection as the text it writes: the identity by which the
6
+ * inspector reuses an applied inspection instead of applying it again.
7
+ */
8
+ export function writeAutoMovieInspectorInspection(
9
+ request: Pick<IAutoMovieCapturePlanRequest, "inspection">,
10
+ ): string {
11
+ return JSON.stringify(formatAutoMovieInspectionRequest(request.inspection));
12
+ }
@@ -0,0 +1,9 @@
1
+ // The applied-inspection and canvas helpers the test programme reads directly. They are not part of the public surface: a host reaches them through the inspector and the mount of the main entry.
2
+
3
+ export * from "./applyCaptureCanvasSize.js";
4
+ export * from "./inspector/assertAutoMovieInspectorRaster.js";
5
+ export * from "./inspector/changesAutoMovieObservedScene.js";
6
+ export * from "./inspector/firstAutoMovieInspectorSecond.js";
7
+ export * from "./inspector/messageOfAutoMovieInspectorError.js";
8
+ export * from "./inspector/readsAutoMovieInspectorPlacedScene.js";
9
+ export * from "./inspector/writeAutoMovieInspectorInspection.js";
@@ -23,17 +23,23 @@ type ViewerFrameProducer =
23
23
  | ((elapsedSeconds: number) => void);
24
24
 
25
25
  /**
26
- * Mount a render loop onto a canvas: create a `WebGLRenderer`, drive `onFrame(elapsedSeconds)` each animation frame, then render `scene` from `camera`.
26
+ * Mount a render loop onto a canvas: create a `WebGLRenderer`, drive
27
+ * `onFrame(elapsedSeconds)` each animation frame, then render `scene` from
28
+ * `camera`.
27
29
  *
28
- * This is the one browser-only entry point. `onFrame` is where a {@link AutoMoviePlayer} advances: the viewer stays a thin shell around the deterministic engine. `elapsedSeconds` is measured from the first frame. If `onFrame` returns `true` it has **already drawn** the frame itself (e.g. a multi-pass cross-dissolve composite), so the loop skips its own default `render`; returning `undefined`/`false` keeps the plain single-pass render. External seek/guide producers call the returned `completeFrame` immediately after their original draw, before an unpreserved native buffer can clear. A manual guide retains the completed clock; a seek supplies its own seconds. Freezes suppress animation producer calls; explicit redraw/restoration still uses the original producer. Independently advancing source clocks or audio supply `freezeCompleted` and restore their source time through `redrawCompleted`.
29
- *
30
- * @evidence contracts/development/implementation.md#principled-implementation Owns one browser renderer/RAF loop, runs the original producer under a validated display clock and publishes actual handled or ordinary completion through the existing observer boundary. Live CSS size and selected pixel ratio synchronize native backing/projection; changed viewports redraw the original completed producer even while paused or frozen.
31
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Clock and native camera transfer retain their existing owners; createViewerFrameControl owns the actual public controller and nested producer leases. Named context options distinguish original handled-frame hooks from native renderer creation and terminal mount shutdown.
32
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No native render method is replaced, a handled frame without producer facts is not invented, and stopped controls cannot redraw a retired renderer; ordinary native drawing preflights the existing failed scene/shadow owners, preserving active settings and clock calculations.
33
- * @evidence contracts/development/common.md#meaningful-documentation Documentation gives handled-frame responsibility, explicit draw-before-completion, preserved guide clock, finite transfer time, terminal controls and public cleanup's native-proof limits.
34
- * @evidence contracts/development/implementation.md#efficient-algorithms Per-frame coordination adds fixed client-size/DPR reads and native-size comparisons plus producer/render/observer cost. Browser layout work remains real host cost. Only changed viewports resize backing and redraw the completed producer; no scene traversal is added to active draws, while shutdown delegates shadow traversal and fixed renderer/compositor retirement.
35
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Handled record identity suppresses repeated idle publication and the current completed clock is preserved for guides; stop shares one sticky attempt and equal frame metadata is not independent pixel/source equivalence.
36
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources At most one scheduled RAF and one outer producer freeze lease are retained; the same RAF observes layout/DPR, adding no observer or event listener. Stop cancels scheduling and retires the lease without resuming it before independent native cleanup. Initialization/frame failure attempts acquired owner cleanup, closed controls refuse new effects and borrowed model resources remain caller-owned. Public disposal is not independent OS/GPU kernel release proof.
30
+ * This is the one browser-only entry point. `onFrame` is where a
31
+ * {@link AutoMoviePlayer} advances: the viewer stays a thin shell around the
32
+ * deterministic engine. `elapsedSeconds` is measured from the first frame. If
33
+ * `onFrame` returns `true` it has **already drawn** the frame itself (e.g. a
34
+ * multi-pass cross-dissolve composite), so the loop skips its own default
35
+ * `render`; returning `undefined`/`false` keeps the plain single-pass render.
36
+ * External seek/guide producers call the returned `completeFrame` immediately
37
+ * after their original draw, before an unpreserved native buffer can clear. A
38
+ * manual guide retains the completed clock; a seek supplies its own seconds.
39
+ * Freezes suppress animation producer calls; explicit redraw/restoration still
40
+ * uses the original producer. Independently advancing source clocks or audio
41
+ * supply `freezeCompleted` and restore their source time through
42
+ * `redrawCompleted`.
37
43
  */
38
44
  export const mountViewer: (
39
45
  canvas: HTMLCanvasElement,
@@ -64,10 +70,7 @@ export const mountViewer: (
64
70
  canvas.clientWidth || 1,
65
71
  canvas.clientHeight || 1,
66
72
  options?.pixelRatio ??
67
- (Number.isFinite(window.devicePixelRatio) &&
68
- window.devicePixelRatio > 0
69
- ? window.devicePixelRatio
70
- : 1),
73
+ (window.devicePixelRatio > 0 ? window.devicePixelRatio : 1),
71
74
  );
72
75
  synchronizeViewport();
73
76
 
@@ -1,22 +1,26 @@
1
1
  import type { IAutoMovieViewerCompletedFrame } from "./IAutoMovieViewerCompletedFrame.js";
2
2
 
3
3
  /**
4
- * Notify a supported canvas subscriber from the actual draw-completion owner. The application explicitly subscribes with the public canvas attribute; ordinary unobserved renders allocate no event. Native synchronous DOM delivery avoids SDK replacements and also works across separately bundled consumers. An explicit original redraw is meaningful even when camera, clock and model facts match the preceding frame: graphics recovery still needs new pixels. Ordinary producers retain their supplied idle/change classification.
4
+ * Notify a supported canvas subscriber from the actual draw-completion owner.
5
+ * The application explicitly subscribes with the public canvas attribute;
6
+ * ordinary unobserved renders allocate no event. Native synchronous DOM
7
+ * delivery avoids SDK replacements and also works across separately bundled
8
+ * consumers. An explicit original redraw is meaningful even when camera, clock
9
+ * and model facts match the preceding frame: graphics recovery still needs new
10
+ * pixels. Ordinary producers retain their supplied idle/change classification.
5
11
  *
6
- * Completion belongs to the original draw producer. This publisher contributes capture authority without implementing validation or delivery gates.
12
+ * A canvas's own `dispatchEvent` serves, and its listeners receive the event
13
+ * typed through `HTMLElementEventMap`.
7
14
  *
8
- * @evidence contracts/development/implementation.md#principled-implementation Checks the actual canvas opt-in attribute before dispatching the original draw owner completed-frame detail, marking an explicit original redraw changed even when preceding metadata is equal.
9
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Native DOM publication separates draw completion from subscription, capture validation and delivery policy without patching renderer methods.
10
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An unobserved canvas creates no event and no imaginary pixels; caller-supplied facts and explicitDraw must describe its completed draw, and synchronous DOM delivery is not asynchronous capture settlement proof.
11
- * @evidence contracts/development/common.md#meaningful-documentation Documents opt-in subscription, handled draw responsibility, explicit redraw meaning and absence of validation/delivery gates in this publisher.
12
- * @evidence contracts/development/implementation.md#efficient-algorithms Coordination is fixed except consumer DOM dispatch work; explicit redraw makes one shallow detail copy, and no scene traversal or pixel read occurs.
13
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Ordinary producer idle/change classification is preserved; explicit redraw intentionally publishes a new completed effect instead of treating equal metadata as pixel equivalence.
14
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The publisher retains no listener or frame after dispatch; event detail is borrowed or shallow-copied, and subscribers own any retained capture work and withdrawal.
15
+ * Completion belongs to the original draw producer. This publisher contributes
16
+ * capture authority without implementing validation or delivery gates.
15
17
  */
16
18
  export function publishViewerCompletedFrame(
17
19
  canvas: {
18
20
  getAttribute?: (name: string) => string | null;
19
- dispatchEvent?: (event: Event) => boolean;
21
+ dispatchEvent?: (
22
+ event: HTMLElementEventMap["automovie:completed-frame"],
23
+ ) => boolean;
20
24
  },
21
25
  frame: IAutoMovieViewerCompletedFrame,
22
26
  explicitDraw: boolean = false,
@@ -2,18 +2,10 @@ import type { IAutoMovieViewerCompletedFrame } from "./IAutoMovieViewerCompleted
2
2
 
3
3
  /**
4
4
  * Admit an original synchronous redraw only from a new completed observation.
5
- * Explicit completion is preferred. A legacy void callback may instead expose
6
- * a new completed-frame record; an unchanged prior record cannot attest a draw.
5
+ * Explicit completion is preferred. A legacy void callback may instead expose a
6
+ * new completed-frame record; an unchanged prior record cannot attest a draw.
7
7
  * An absent record time inherits the requested original-producer time, while a
8
8
  * supplied time must agree exactly. The producer must throw on refusal.
9
- *
10
- * @evidence contracts/development/implementation.md#principled-implementation Compares the completed revision around the original producer call; explicit completion must report requested seconds. Without explicit completion, only a distinct newly supplied producer record can be published, and its declared clock must match. No previous observation is relabeled as a new draw.
11
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Extracts mountViewer's actual redraw-admission boundary while leaving rendering, source admission and completion publication with their existing owners.
12
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Fulfilled void remains supported and thrown refusal propagates unchanged; stale or mismatched records cannot become successful requested frames. Record freshness is producer attestation, not independent pixel or physical-admission proof.
13
- * @evidence contracts/development/common.md#meaningful-documentation States explicit and legacy completion paths, exact clock agreement, absent-clock inheritance and original-producer refusal responsibility.
14
- * @evidence contracts/development/implementation.md#efficient-algorithms Fixed-count revision/record/clock reads and one original producer invocation use O(1) coordination without traversing scenes or reading pixels.
15
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses the original completed observation but never reuses an old record to stand in for a new effect; distinct requested redraws invoke the producer separately.
16
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Borrows callbacks and frame records only for this synchronous invocation and acquires no task, renderer or resource lease.
17
9
  */
18
10
  export function redrawViewerCompletedFrame(
19
11
  seconds: number,
@@ -35,8 +27,7 @@ export function redrawViewerCompletedFrame(
35
27
  ) => void;
36
28
  },
37
29
  ): void {
38
- if (!Number.isFinite(seconds) || seconds < 0)
39
- throw new Error("A redraw requires finite nonnegative seconds.");
30
+ if (seconds < 0) throw new Error("A redraw requires nonnegative seconds.");
40
31
  const before: number = options.completedCount();
41
32
  const previous: Omit<IAutoMovieViewerCompletedFrame, "control"> | undefined =
42
33
  options.readFrame();
@@ -6,15 +6,11 @@ import {
6
6
  import type * as THREE from "three";
7
7
 
8
8
  /**
9
- * End a mounted loop, its native scene shadow products and owned renderer. Stop scheduling first; shadow retirement still needs the live renderer's context before renderer disposal. Geometry/materials remain caller-owned. These owners release independently even when another listener fails. The shadow owner enforces its exclusive-context and external-borrower boundary.
10
- *
11
- * @evidence contracts/development/implementation.md#principled-implementation Attempts loop stop first, scene shadow retirement with the still-live renderer second and independent renderer/compositor release last, preserving every failure.
12
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One mount lifecycle composition uses existing shadow and renderer owners rather than duplicating their resource collections.
13
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A failed earlier listener cannot skip later owners, borrowed geometry/materials are not disposed and public cleanup completion is not independent OS/GPU kernel settlement proof.
14
- * @evidence contracts/development/common.md#meaningful-documentation Documents shutdown ordering, borrowed model ownership, shadow exclusive-context/external-borrower boundary and independent failure handling.
15
- * @evidence contracts/development/implementation.md#efficient-algorithms Fixed owner coordination delegates scene shadow traversal and distinct target retirement plus fixed compositor/renderer disposal; it adds no per-pixel work.
16
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The mount terminal guard owns one sticky shutdown attempt; this lower-level release composition itself performs requested cleanup rather than memoizing arbitrary repeated native disposal.
17
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources No new resource is acquired; scheduling withdrawal precedes resource release, each owner gets an attempt and failure remains explicit rather than certifying freed native storage.
9
+ * End a mounted loop, its native scene shadow products and owned renderer. Stop
10
+ * scheduling first; shadow retirement still needs the live renderer's context
11
+ * before renderer disposal. Geometry/materials remain caller-owned. These
12
+ * owners release independently even when another listener fails. The shadow
13
+ * owner enforces its exclusive-context and external-borrower boundary.
18
14
  */
19
15
  export const releaseMountedViewer: (
20
16
  renderer: THREE.WebGLRenderer,