@automovie/viewer 0.3.3 → 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
@@ -4,18 +4,11 @@ exports.AutoMovieInspectorTimeReadout = AutoMovieInspectorTimeReadout;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const render_1 = require("@automovie/render");
6
6
  const react_1 = require("react");
7
+ const stopAutoMovieInspectorTime_js_1 = require("./stopAutoMovieInspectorTime.js");
7
8
  /**
8
9
  * The playhead's slider and clock, the one component that reads the playhead's second and so the only one a playing frame re-renders; the time panel reads only whether it plays.
9
10
  *
10
11
  * Moving the slider seeks to a regular frame or the exact end and dispatches the second as a `time` edit. Without a frame rate, the slider seeks directly in seconds. A pause or playback reaching the end also dispatches its second, so the request names the picture left on screen. The slider announces its second and, when available, its frame number.
11
- *
12
- * @evidence contracts/development/common.md#meaningful-documentation States what it shows, why it alone reads the playhead's second, when it edits the request and what it announces.
13
- * @evidence contracts/development/implementation.md#principled-implementation `useSyncExternalStore` reads the cached playhead snapshot without tearing. Native range inputs enforce their step grid, so integer positions give every frame and the exact end a valid slider value.
14
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One store read, one slider that converts its position to seconds on seek, and one clock output.
15
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Playback frames dispatch nothing; only a seek and the change from playing to stopped edit the request, and the first render, which stops nothing, edits nothing.
16
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant work per render, one render per moved snapshot.
17
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Uses the shared presentation grid and computes its last frame number once per render.
18
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources React holds one playhead subscription while the readout is mounted and removes it on unmount.
19
12
  */
20
13
  function AutoMovieInspectorTimeReadout(props) {
21
14
  const snapshot = (0, react_1.useSyncExternalStore)(props.playhead.subscribe, props.playhead.getSnapshot);
@@ -23,8 +16,9 @@ function AutoMovieInspectorTimeReadout(props) {
23
16
  const was = (0, react_1.useRef)(snapshot.playing);
24
17
  const { dispatch } = props;
25
18
  (0, react_1.useEffect)(() => {
26
- if (was.current && !snapshot.playing)
27
- dispatch({ type: "time", seconds: snapshot.seconds });
19
+ const stop = (0, stopAutoMovieInspectorTime_js_1.stopAutoMovieInspectorTime)(was.current, snapshot);
20
+ if (stop !== null)
21
+ dispatch(stop);
28
22
  was.current = snapshot.playing;
29
23
  }, [snapshot, dispatch]);
30
24
  // Integer slider positions keep the end reachable even between regular frames.
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMovieInspectorTimeReadout.js","sourceRoot":"","sources":["../../src/inspector/AutoMovieInspectorTimeReadout.tsx"],"names":[],"mappings":";;;;AAAA,8CAAuD;AACvD,iCAOe;AAKf;;;;;;;;;;;;GAYG;AACH,uCAA8C,KAS7C;IACC,MAAM,QAAQ,GAAyC,IAAA,4BAAoB,EACzE,KAAK,CAAC,QAAQ,CAAC,SAAS,EACxB,KAAK,CAAC,QAAQ,CAAC,WAAW,CAC3B,CAAC;IAEF,2FAA2F;IAC3F,MAAM,GAAG,GAAuB,IAAA,cAAM,EAAU,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,IAAA,iBAAS,EAAC,GAAS,EAAE;QACnB,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO;YAClC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;QACxD,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEzB,+EAA+E;IAC/E,MAAM,EAAE,GAAG,EAAE,GAAiB,KAAK,CAAC;IACpC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAChC,QAAQ,CAAC;IACX,MAAM,IAAI,GACR,GAAG,KAAK,IAAI;QACV,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,2BAAkB,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IACpD,MAAM,QAAQ,GACZ,GAAG,KAAK,IAAI;QACV,CAAC,CAAC,OAA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oBACV,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU;oBACjC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,QAAQ,OAAO,IAAI,EAAE,EAEnE,GAAG,EAAE,CAAC,EACN,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC9B,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAC3B,QAAQ,EAAE,CAAC,KAAoC,EAAQ,EAAE;oBACvD,MAAM,KAAK,GAAW,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC;oBACxD,KAAK,CAAC,QAAQ,CAAC,IAAI,CACjB,GAAG,KAAK,IAAI;wBACV,CAAC,CAAC,KAAK;wBACP,CAAC,CAAC,2BAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,CAAC,CACzD,CAAC;oBACF,KAAK,CAAC,QAAQ,CAAC;wBACb,IAAI,EAAE,MAAM;wBACZ,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO;qBAC9C,CAAC,CAAC;gBACL,CAAC,GACD,EACF,oCAAQ,KAAK,EAAE,EAAE,kBAAkB,EAAE,cAAc,EAAE,aAClD,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAK,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,UAC3C,IACR,CACJ,CAAC;AACJ,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { stopAutoMovieInspectorTime } from "./stopAutoMovieInspectorTime.mjs";
1
2
  import { AutoMovieFrameGrid } from "@automovie/render";
2
3
  import { useEffect, useRef, useSyncExternalStore } from "react";
3
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -6,24 +7,14 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
7
  * The playhead's slider and clock, the one component that reads the playhead's second and so the only one a playing frame re-renders; the time panel reads only whether it plays.
7
8
  *
8
9
  * Moving the slider seeks to a regular frame or the exact end and dispatches the second as a `time` edit. Without a frame rate, the slider seeks directly in seconds. A pause or playback reaching the end also dispatches its second, so the request names the picture left on screen. The slider announces its second and, when available, its frame number.
9
- *
10
- * @evidence contracts/development/common.md#meaningful-documentation States what it shows, why it alone reads the playhead's second, when it edits the request and what it announces.
11
- * @evidence contracts/development/implementation.md#principled-implementation `useSyncExternalStore` reads the cached playhead snapshot without tearing. Native range inputs enforce their step grid, so integer positions give every frame and the exact end a valid slider value.
12
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One store read, one slider that converts its position to seconds on seek, and one clock output.
13
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Playback frames dispatch nothing; only a seek and the change from playing to stopped edit the request, and the first render, which stops nothing, edits nothing.
14
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant work per render, one render per moved snapshot.
15
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Uses the shared presentation grid and computes its last frame number once per render.
16
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources React holds one playhead subscription while the readout is mounted and removes it on unmount.
17
10
  */
18
11
  function AutoMovieInspectorTimeReadout(props) {
19
12
  const snapshot = useSyncExternalStore(props.playhead.subscribe, props.playhead.getSnapshot);
20
13
  const was = useRef(snapshot.playing);
21
14
  const { dispatch } = props;
22
15
  useEffect(() => {
23
- if (was.current && !snapshot.playing) dispatch({
24
- type: "time",
25
- seconds: snapshot.seconds
26
- });
16
+ const stop = stopAutoMovieInspectorTime(was.current, snapshot);
17
+ if (stop !== null) dispatch(stop);
27
18
  was.current = snapshot.playing;
28
19
  }, [snapshot, dispatch]);
29
20
  const { fps } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMovieInspectorTimeReadout.mjs","names":[],"sources":["../../src/inspector/AutoMovieInspectorTimeReadout.tsx"],"sourcesContent":["import { AutoMovieFrameGrid } from \"@automovie/render\";\nimport {\n type ChangeEvent,\n type JSX,\n type RefObject,\n useEffect,\n useRef,\n useSyncExternalStore,\n} from \"react\";\n\nimport type { AutoMovieInspectorPlayhead } from \"./AutoMovieInspectorPlayhead.js\";\nimport type { IAutoMovieInspectorAction } from \"./IAutoMovieInspectorAction.js\";\n\n/**\n * The playhead's slider and clock, the one component that reads the playhead's second and so the only one a playing frame re-renders; the time panel reads only whether it plays.\n *\n * Moving the slider seeks to a regular frame or the exact end and dispatches the second as a `time` edit. Without a frame rate, the slider seeks directly in seconds. A pause or playback reaching the end also dispatches its second, so the request names the picture left on screen. The slider announces its second and, when available, its frame number.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States what it shows, why it alone reads the playhead's second, when it edits the request and what it announces.\n * @evidence contracts/development/implementation.md#principled-implementation `useSyncExternalStore` reads the cached playhead snapshot without tearing. Native range inputs enforce their step grid, so integer positions give every frame and the exact end a valid slider value.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One store read, one slider that converts its position to seconds on seek, and one clock output.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Playback frames dispatch nothing; only a seek and the change from playing to stopped edit the request, and the first render, which stops nothing, edits nothing.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant work per render, one render per moved snapshot.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Uses the shared presentation grid and computes its last frame number once per render.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources React holds one playhead subscription while the readout is mounted and removes it on unmount.\n */\nexport function AutoMovieInspectorTimeReadout(props: {\n /** The playhead shown and sought. */\n playhead: AutoMovieInspectorPlayhead;\n\n /** The subject's frames per second, so the slider steps from frame to frame of its grid, as a capture's seconds do; null before a subject is ready, when the slider steps freely. */\n fps: number | null;\n\n /** Where the sought second goes. */\n dispatch: (action: IAutoMovieInspectorAction) => void;\n}): JSX.Element {\n const snapshot: AutoMovieInspectorPlayhead.ISnapshot = useSyncExternalStore(\n props.playhead.subscribe,\n props.playhead.getSnapshot,\n );\n\n // When playback stops, by a pause or at the end, the stopped second becomes the request's.\n const was: RefObject<boolean> = useRef<boolean>(snapshot.playing);\n const { dispatch } = props;\n useEffect((): void => {\n if (was.current && !snapshot.playing)\n dispatch({ type: \"time\", seconds: snapshot.seconds });\n was.current = snapshot.playing;\n }, [snapshot, dispatch]);\n\n // Integer slider positions keep the end reachable even between regular frames.\n const { fps }: typeof props = props;\n const { durationSeconds, seconds }: AutoMovieInspectorPlayhead.ISnapshot =\n snapshot;\n const last: number =\n fps === null\n ? durationSeconds\n : AutoMovieFrameGrid.last(durationSeconds, fps);\n const position: number =\n fps === null\n ? seconds\n : AutoMovieFrameGrid.nearest(seconds, durationSeconds, fps, last);\n\n return (\n <>\n <input\n type=\"range\"\n aria-label=\"Second\"\n aria-valuetext={\n fps === null\n ? `${seconds.toFixed(2)} seconds`\n : `${seconds.toFixed(2)} seconds, frame ${position} of ${last}`\n }\n min={0}\n max={last}\n step={fps === null ? \"any\" : 1}\n value={position}\n style={{ flex: \"1 1 auto\" }}\n onChange={(event: ChangeEvent<HTMLInputElement>): void => {\n const value: number = event.currentTarget.valueAsNumber;\n props.playhead.seek(\n fps === null\n ? value\n : AutoMovieFrameGrid.time(value, durationSeconds, fps),\n );\n props.dispatch({\n type: \"time\",\n seconds: props.playhead.getSnapshot().seconds,\n });\n }}\n />\n <output style={{ fontVariantNumeric: \"tabular-nums\" }}>\n {seconds.toFixed(2)} / {durationSeconds.toFixed(2)} s\n </output>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,SAAgB,8BAA8B,OAS9B;CACd,MAAM,WAAiD,qBACrD,MAAM,SAAS,WACf,MAAM,SAAS,WACjB;CAGA,MAAM,MAA0B,OAAgB,SAAS,OAAO;CAChE,MAAM,EAAE,aAAa;CACrB,gBAAsB;EACpB,IAAI,IAAI,WAAW,CAAC,SAAS,SAC3B,SAAS;GAAE,MAAM;GAAQ,SAAS,SAAS;EAAQ,CAAC;EACtD,IAAI,UAAU,SAAS;CACzB,GAAG,CAAC,UAAU,QAAQ,CAAC;CAGvB,MAAM,EAAE,QAAsB;CAC9B,MAAM,EAAE,iBAAiB,YACvB;CACF,MAAM,OACJ,QAAQ,OACJ,kBACA,mBAAmB,KAAK,iBAAiB,GAAG;CAClD,MAAM,WACJ,QAAQ,OACJ,UACA,mBAAmB,QAAQ,SAAS,iBAAiB,KAAK,IAAI;CAEpE,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,SAAD;EACE,MAAK;EACL,cAAW;EACX,kBACE,QAAQ,OACJ,GAAG,QAAQ,QAAQ,CAAC,EAAE,YACtB,GAAG,QAAQ,QAAQ,CAAC,EAAE,kBAAkB,SAAS,MAAM;EAE7D,KAAK;EACL,KAAK;EACL,MAAM,QAAQ,OAAO,QAAQ;EAC7B,OAAO;EACP,OAAO,EAAE,MAAM,WAAW;EAC1B,WAAW,UAA+C;GACxD,MAAM,QAAgB,MAAM,cAAc;GAC1C,MAAM,SAAS,KACb,QAAQ,OACJ,QACA,mBAAmB,KAAK,OAAO,iBAAiB,GAAG,CACzD;GACA,MAAM,SAAS;IACb,MAAM;IACN,SAAS,MAAM,SAAS,YAAY,CAAC,CAAC;GACxC,CAAC;EACH;CACD,CAAA,GACD,qBAAC,UAAD;EAAQ,OAAO,EAAE,oBAAoB,eAAe;EAApD,UAAA;GACG,QAAQ,QAAQ,CAAC;GAAE;GAAI,gBAAgB,QAAQ,CAAC;GAAE;EAC7C;CACR,CAAA,CAAA,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"AutoMovieInspectorTimeReadout.mjs","names":[],"sources":["../../src/inspector/AutoMovieInspectorTimeReadout.tsx"],"sourcesContent":["import { AutoMovieFrameGrid } from \"@automovie/render\";\nimport {\n type ChangeEvent,\n type JSX,\n type RefObject,\n useEffect,\n useRef,\n useSyncExternalStore,\n} from \"react\";\n\nimport type { AutoMovieInspectorPlayhead } from \"./AutoMovieInspectorPlayhead.js\";\nimport type { IAutoMovieInspectorAction } from \"./IAutoMovieInspectorAction.js\";\nimport { stopAutoMovieInspectorTime } from \"./stopAutoMovieInspectorTime.js\";\n\n/**\n * The playhead's slider and clock, the one component that reads the playhead's second and so the only one a playing frame re-renders; the time panel reads only whether it plays.\n *\n * Moving the slider seeks to a regular frame or the exact end and dispatches the second as a `time` edit. Without a frame rate, the slider seeks directly in seconds. A pause or playback reaching the end also dispatches its second, so the request names the picture left on screen. The slider announces its second and, when available, its frame number.\n */\nexport function AutoMovieInspectorTimeReadout(props: {\n /** The playhead shown and sought. */\n playhead: AutoMovieInspectorPlayhead;\n\n /** The subject's frames per second, so the slider steps from frame to frame of its grid, as a capture's seconds do; null before a subject is ready, when the slider steps freely. */\n fps: number | null;\n\n /** Where the sought second goes. */\n dispatch: (action: IAutoMovieInspectorAction) => void;\n}): JSX.Element {\n const snapshot: AutoMovieInspectorPlayhead.ISnapshot = useSyncExternalStore(\n props.playhead.subscribe,\n props.playhead.getSnapshot,\n );\n\n // When playback stops, by a pause or at the end, the stopped second becomes the request's.\n const was: RefObject<boolean> = useRef<boolean>(snapshot.playing);\n const { dispatch } = props;\n useEffect((): void => {\n const stop: IAutoMovieInspectorAction.ITime | null =\n stopAutoMovieInspectorTime(was.current, snapshot);\n if (stop !== null) dispatch(stop);\n was.current = snapshot.playing;\n }, [snapshot, dispatch]);\n\n // Integer slider positions keep the end reachable even between regular frames.\n const { fps }: typeof props = props;\n const { durationSeconds, seconds }: AutoMovieInspectorPlayhead.ISnapshot =\n snapshot;\n const last: number =\n fps === null\n ? durationSeconds\n : AutoMovieFrameGrid.last(durationSeconds, fps);\n const position: number =\n fps === null\n ? seconds\n : AutoMovieFrameGrid.nearest(seconds, durationSeconds, fps, last);\n\n return (\n <>\n <input\n type=\"range\"\n aria-label=\"Second\"\n aria-valuetext={\n fps === null\n ? `${seconds.toFixed(2)} seconds`\n : `${seconds.toFixed(2)} seconds, frame ${position} of ${last}`\n }\n min={0}\n max={last}\n step={fps === null ? \"any\" : 1}\n value={position}\n style={{ flex: \"1 1 auto\" }}\n onChange={(event: ChangeEvent<HTMLInputElement>): void => {\n const value: number = event.currentTarget.valueAsNumber;\n props.playhead.seek(\n fps === null\n ? value\n : AutoMovieFrameGrid.time(value, durationSeconds, fps),\n );\n props.dispatch({\n type: \"time\",\n seconds: props.playhead.getSnapshot().seconds,\n });\n }}\n />\n <output style={{ fontVariantNumeric: \"tabular-nums\" }}>\n {seconds.toFixed(2)} / {durationSeconds.toFixed(2)} s\n </output>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;AAmBA,SAAgB,8BAA8B,OAS9B;CACd,MAAM,WAAiD,qBACrD,MAAM,SAAS,WACf,MAAM,SAAS,WACjB;CAGA,MAAM,MAA0B,OAAgB,SAAS,OAAO;CAChE,MAAM,EAAE,aAAa;CACrB,gBAAsB;EACpB,MAAM,OACJ,2BAA2B,IAAI,SAAS,QAAQ;EAClD,IAAI,SAAS,MAAM,SAAS,IAAI;EAChC,IAAI,UAAU,SAAS;CACzB,GAAG,CAAC,UAAU,QAAQ,CAAC;CAGvB,MAAM,EAAE,QAAsB;CAC9B,MAAM,EAAE,iBAAiB,YACvB;CACF,MAAM,OACJ,QAAQ,OACJ,kBACA,mBAAmB,KAAK,iBAAiB,GAAG;CAClD,MAAM,WACJ,QAAQ,OACJ,UACA,mBAAmB,QAAQ,SAAS,iBAAiB,KAAK,IAAI;CAEpE,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,SAAD;EACE,MAAK;EACL,cAAW;EACX,kBACE,QAAQ,OACJ,GAAG,QAAQ,QAAQ,CAAC,EAAE,YACtB,GAAG,QAAQ,QAAQ,CAAC,EAAE,kBAAkB,SAAS,MAAM;EAE7D,KAAK;EACL,KAAK;EACL,MAAM,QAAQ,OAAO,QAAQ;EAC7B,OAAO;EACP,OAAO,EAAE,MAAM,WAAW;EAC1B,WAAW,UAA+C;GACxD,MAAM,QAAgB,MAAM,cAAc;GAC1C,MAAM,SAAS,KACb,QAAQ,OACJ,QACA,mBAAmB,KAAK,OAAO,iBAAiB,GAAG,CACzD;GACA,MAAM,SAAS;IACb,MAAM;IACN,SAAS,MAAM,SAAS,YAAY,CAAC,CAAC;GACxC,CAAC;EACH;CACD,CAAA,GACD,qBAAC,UAAD;EAAQ,OAAO,EAAE,oBAAoB,eAAe;EAApD,UAAA;GACG,QAAQ,QAAQ,CAAC;GAAE;GAAI,gBAAgB,QAAQ,CAAC;GAAE;EAC7C;CACR,CAAA,CAAA,EAAA,CAAA;AAEN"}
@@ -0,0 +1,79 @@
1
+ import type { IAutoMovieInspectionRequest } from "@automovie/interface";
2
+ import { type IAutoMovieDrawScene } from "@automovie/render";
3
+ import type * as THREE from "three";
4
+ /**
5
+ * The inspector's placement of a subject at a painted second and its half of a
6
+ * film picture inside a transition, so the Viewer paints the frame and keeps
7
+ * the records the draw page delivers and captures at the same second.
8
+ *
9
+ * `place` plans the second by `planAutoMovieDrawPicture` and places the shot
10
+ * the picture shows most of last, by `seekShot` when it is a transition's
11
+ * outgoing shot and by `seek` otherwise, so the mount's diagnostics, marks,
12
+ * camera and every non-film picture follow that shot. For a plain `beauty`
13
+ * request on a WebGL compositor, the condition under which the draw page
14
+ * composites, it first places, paints and holds every other layer of positive
15
+ * weight on its own entry's clock, the outgoing shot in slot 0 and the live
16
+ * entry in slot 1, running the subject's `beforeDraw` after each placement. A
17
+ * layer of weight 0 is neither painted nor held; when it is the shown layer, it
18
+ * is still placed for the frame's records. `finish`, in the mount's paint after
19
+ * the shown layer's records, paints the shown layer when it has weight, holds
20
+ * it, and composites the held layers by their weights through
21
+ * `AutoMovieTransitionDisplays`; a picture none of whose layers has weight, a
22
+ * fade's midpoint, is the cleared canvas. The witness cubes then go to
23
+ * `overlay` and `over` draws them over the composite at full strength. Any
24
+ * other picture is painted by the mount as before and `finish` does nothing.
25
+ *
26
+ * The Viewer paints one sample of each layer with the film's indirect shading,
27
+ * through `AutoMovieInspectorBeauty`, as it does outside transitions, so a
28
+ * subject whose optics set `samples` differs from delivery by its shutter and
29
+ * lens, not by its transitions.
30
+ */
31
+ export declare class AutoMovieInspectorTransition {
32
+ /** The held layers of the planned picture and its overlay. */
33
+ private readonly displays_;
34
+ /** The layers of the picture being composited, or null for one layer. */
35
+ private layers_;
36
+ /** The shown layer of the planned second, or null outside a transition. */
37
+ private shown_;
38
+ /** The compositor of the picture being painted, or null. */
39
+ private compositor_;
40
+ /** Whether `dispose` ran, after which nothing is painted or held. */
41
+ private disposed_;
42
+ /** Whether the picture being painted composites a transition's layers. */
43
+ get composites(): boolean;
44
+ /** Whether the shown layer was placed by `seekShot`, off the film clock. */
45
+ get byShot(): boolean;
46
+ /** The scene a composited picture's witness cubes are attached to. */
47
+ get overlay(): THREE.Scene;
48
+ /**
49
+ * Plan the picture at `seconds`, place, paint and hold every other layer of a
50
+ * composited transition, and place the shown layer last. Resolves once the
51
+ * shown layer is ready; a refused plan throws at once.
52
+ */
53
+ place(props: {
54
+ /** The subject's name, which a refusal names. */
55
+ name: string;
56
+ /** The created subject. */
57
+ instance: IAutoMovieDrawScene;
58
+ /** The inspection the picture is drawn with. */
59
+ request: IAutoMovieInspectionRequest;
60
+ /** The WebGL renderer that composites, or null when there is none. */
61
+ compositor: THREE.WebGLRenderer | null;
62
+ /** The second painted. */
63
+ seconds: number;
64
+ /** Paint the placed scene's beauty picture onto the canvas. */
65
+ paint: () => void;
66
+ }): Promise<void>;
67
+ /**
68
+ * Composite a planned transition after the shown layer's records: paint the
69
+ * shown layer through `paint` when it has weight, hold it and composite the
70
+ * held layers. Returns whether it composited; otherwise the mount paints.
71
+ */
72
+ finish(paint: () => void): boolean;
73
+ /** Draw `overlay` over the composite through `camera`, without clearing. */
74
+ over(camera: THREE.Camera): void;
75
+ /** Release the held layers; a placement still pending then paints nothing. */
76
+ dispose(): void;
77
+ /** The composited layers of positive weight, outgoing first. */
78
+ private drawn;
79
+ }
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AutoMovieInspectorTransition = void 0;
4
+ const render_1 = require("@automovie/render");
5
+ /**
6
+ * The inspector's placement of a subject at a painted second and its half of a
7
+ * film picture inside a transition, so the Viewer paints the frame and keeps
8
+ * the records the draw page delivers and captures at the same second.
9
+ *
10
+ * `place` plans the second by `planAutoMovieDrawPicture` and places the shot
11
+ * the picture shows most of last, by `seekShot` when it is a transition's
12
+ * outgoing shot and by `seek` otherwise, so the mount's diagnostics, marks,
13
+ * camera and every non-film picture follow that shot. For a plain `beauty`
14
+ * request on a WebGL compositor, the condition under which the draw page
15
+ * composites, it first places, paints and holds every other layer of positive
16
+ * weight on its own entry's clock, the outgoing shot in slot 0 and the live
17
+ * entry in slot 1, running the subject's `beforeDraw` after each placement. A
18
+ * layer of weight 0 is neither painted nor held; when it is the shown layer, it
19
+ * is still placed for the frame's records. `finish`, in the mount's paint after
20
+ * the shown layer's records, paints the shown layer when it has weight, holds
21
+ * it, and composites the held layers by their weights through
22
+ * `AutoMovieTransitionDisplays`; a picture none of whose layers has weight, a
23
+ * fade's midpoint, is the cleared canvas. The witness cubes then go to
24
+ * `overlay` and `over` draws them over the composite at full strength. Any
25
+ * other picture is painted by the mount as before and `finish` does nothing.
26
+ *
27
+ * The Viewer paints one sample of each layer with the film's indirect shading,
28
+ * through `AutoMovieInspectorBeauty`, as it does outside transitions, so a
29
+ * subject whose optics set `samples` differs from delivery by its shutter and
30
+ * lens, not by its transitions.
31
+ */
32
+ class AutoMovieInspectorTransition {
33
+ /** The held layers of the planned picture and its overlay. */
34
+ displays_ = new render_1.AutoMovieTransitionDisplays();
35
+ /** The layers of the picture being composited, or null for one layer. */
36
+ layers_ = null;
37
+ /** The shown layer of the planned second, or null outside a transition. */
38
+ shown_ = null;
39
+ /** The compositor of the picture being painted, or null. */
40
+ compositor_ = null;
41
+ /** Whether `dispose` ran, after which nothing is painted or held. */
42
+ disposed_ = false;
43
+ /** Whether the picture being painted composites a transition's layers. */
44
+ get composites() {
45
+ return this.layers_ !== null;
46
+ }
47
+ /** Whether the shown layer was placed by `seekShot`, off the film clock. */
48
+ get byShot() {
49
+ return this.shown_ !== null && !this.shown_.live;
50
+ }
51
+ /** The scene a composited picture's witness cubes are attached to. */
52
+ get overlay() {
53
+ return this.displays_.overlay;
54
+ }
55
+ /**
56
+ * Plan the picture at `seconds`, place, paint and hold every other layer of a
57
+ * composited transition, and place the shown layer last. Resolves once the
58
+ * shown layer is ready; a refused plan throws at once.
59
+ */
60
+ async place(props) {
61
+ const { instance, seconds, compositor } = props;
62
+ const plan = (0, render_1.planAutoMovieDrawPicture)(props.name, instance, seconds);
63
+ this.shown_ = plan.shown;
64
+ this.layers_ =
65
+ compositor !== null && (0, render_1.isAutoMoviePlainBeautyRequest)(props.request)
66
+ ? plan.layers
67
+ : null;
68
+ this.compositor_ = compositor;
69
+ for (const layer of this.drawn()) {
70
+ if (layer === this.shown_)
71
+ continue;
72
+ await (0, render_1.placeAutoMovieDrawLayer)(props.name, instance, layer, seconds);
73
+ // A mount disposed during the placement paints and holds nothing; the
74
+ // subject's render-target work runs after the placement, as the draw
75
+ // page runs it.
76
+ if (this.disposed_)
77
+ return;
78
+ instance.beforeDraw?.(compositor, seconds);
79
+ props.paint();
80
+ this.displays_.hold(compositor, slotOf(layer));
81
+ }
82
+ await (0, render_1.placeAutoMovieDrawLayer)(props.name, instance, this.shown_, seconds);
83
+ }
84
+ /**
85
+ * Composite a planned transition after the shown layer's records: paint the
86
+ * shown layer through `paint` when it has weight, hold it and composite the
87
+ * held layers. Returns whether it composited; otherwise the mount paints.
88
+ */
89
+ finish(paint) {
90
+ const layers = this.layers_;
91
+ const renderer = this.compositor_;
92
+ if (layers === null || renderer === null)
93
+ return false;
94
+ if (this.shown_.weight > 0) {
95
+ paint();
96
+ this.displays_.hold(renderer, slotOf(this.shown_));
97
+ }
98
+ // A fade's midpoint shows no shot: the cleared canvas.
99
+ const drawn = this.drawn();
100
+ if (drawn.length === 0) {
101
+ renderer.setRenderTarget(null);
102
+ renderer.clear();
103
+ return true;
104
+ }
105
+ this.displays_.composite(renderer, drawn.map((layer) => ({
106
+ weight: layer.weight,
107
+ slot: slotOf(layer),
108
+ })), false);
109
+ return true;
110
+ }
111
+ /** Draw `overlay` over the composite through `camera`, without clearing. */
112
+ over(camera) {
113
+ if (this.compositor_ !== null)
114
+ this.displays_.over(this.compositor_, camera);
115
+ }
116
+ /** Release the held layers; a placement still pending then paints nothing. */
117
+ dispose() {
118
+ this.disposed_ = true;
119
+ this.displays_.dispose();
120
+ }
121
+ /** The composited layers of positive weight, outgoing first. */
122
+ drawn() {
123
+ return (this.layers_ ?? []).filter((layer) => layer.weight > 0);
124
+ }
125
+ }
126
+ exports.AutoMovieInspectorTransition = AutoMovieInspectorTransition;
127
+ /** The slot a transition layer is held in: the outgoing 0, the live 1. */
128
+ function slotOf(layer) {
129
+ return layer.live ? 1 : 0;
130
+ }
131
+ //# sourceMappingURL=AutoMovieInspectorTransition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoMovieInspectorTransition.js","sourceRoot":"","sources":["../../src/inspector/AutoMovieInspectorTransition.ts"],"names":[],"mappings":";;;AAIA,8CAM2B;AAG3B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IACE,8DAA8D;IAC7C,SAAS,GACxB,IAAI,oCAA2B,EAAE,CAAC;IAEpC,yEAAyE;IACjE,OAAO,GAAqC,IAAI,CAAC;IAEzD,2EAA2E;IACnE,MAAM,GAAmC,IAAI,CAAC;IAEtD,4DAA4D;IACpD,WAAW,GAA+B,IAAI,CAAC;IAEvD,qEAAqE;IAC7D,SAAS,GAAY,KAAK,CAAC;IAEnC,0EAA0E;IAC1E,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC;IAC/B,CAAC;IAED,4EAA4E;IAC5E,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,C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AC;IAC3B,CAAC;IAED,gEAAgE;IACxD,KAAK;QACX,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,MAAM,CAChC,CAAC,KAA8B,EAAW,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAC9D,CAAC;IACJ,CAAC;CACF;;AAED,0EAA0E;AAC1E,SAAS,MAAM,CAAC,KAA8B;IAC5C,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,119 @@
1
+ import { AutoMovieTransitionDisplays, isAutoMoviePlainBeautyRequest, placeAutoMovieDrawLayer, planAutoMovieDrawPicture } from "@automovie/render";
2
+ // src/inspector/AutoMovieInspectorTransition.ts
3
+ /**
4
+ * The inspector's placement of a subject at a painted second and its half of a
5
+ * film picture inside a transition, so the Viewer paints the frame and keeps
6
+ * the records the draw page delivers and captures at the same second.
7
+ *
8
+ * `place` plans the second by `planAutoMovieDrawPicture` and places the shot
9
+ * the picture shows most of last, by `seekShot` when it is a transition's
10
+ * outgoing shot and by `seek` otherwise, so the mount's diagnostics, marks,
11
+ * camera and every non-film picture follow that shot. For a plain `beauty`
12
+ * request on a WebGL compositor, the condition under which the draw page
13
+ * composites, it first places, paints and holds every other layer of positive
14
+ * weight on its own entry's clock, the outgoing shot in slot 0 and the live
15
+ * entry in slot 1, running the subject's `beforeDraw` after each placement. A
16
+ * layer of weight 0 is neither painted nor held; when it is the shown layer, it
17
+ * is still placed for the frame's records. `finish`, in the mount's paint after
18
+ * the shown layer's records, paints the shown layer when it has weight, holds
19
+ * it, and composites the held layers by their weights through
20
+ * `AutoMovieTransitionDisplays`; a picture none of whose layers has weight, a
21
+ * fade's midpoint, is the cleared canvas. The witness cubes then go to
22
+ * `overlay` and `over` draws them over the composite at full strength. Any
23
+ * other picture is painted by the mount as before and `finish` does nothing.
24
+ *
25
+ * The Viewer paints one sample of each layer with the film's indirect shading,
26
+ * through `AutoMovieInspectorBeauty`, as it does outside transitions, so a
27
+ * subject whose optics set `samples` differs from delivery by its shutter and
28
+ * lens, not by its transitions.
29
+ */
30
+ var AutoMovieInspectorTransition = class {
31
+ /** The held layers of the planned picture and its overlay. */
32
+ displays_ = new AutoMovieTransitionDisplays();
33
+ /** The layers of the picture being composited, or null for one layer. */
34
+ layers_ = null;
35
+ /** The shown layer of the planned second, or null outside a transition. */
36
+ shown_ = null;
37
+ /** The compositor of the picture being painted, or null. */
38
+ compositor_ = null;
39
+ /** Whether `dispose` ran, after which nothing is painted or held. */
40
+ disposed_ = false;
41
+ /** Whether the picture being painted composites a transition's layers. */
42
+ get composites() {
43
+ return this.layers_ !== null;
44
+ }
45
+ /** Whether the shown layer was placed by `seekShot`, off the film clock. */
46
+ get byShot() {
47
+ return this.shown_ !== null && !this.shown_.live;
48
+ }
49
+ /** The scene a composited picture's witness cubes are attached to. */
50
+ get overlay() {
51
+ return this.displays_.overlay;
52
+ }
53
+ /**
54
+ * Plan the picture at `seconds`, place, paint and hold every other layer of a
55
+ * composited transition, and place the shown layer last. Resolves once the
56
+ * shown layer is ready; a refused plan throws at once.
57
+ */
58
+ async place(props) {
59
+ const { instance, seconds, compositor } = props;
60
+ const plan = planAutoMovieDrawPicture(props.name, instance, seconds);
61
+ this.shown_ = plan.shown;
62
+ this.layers_ = compositor !== null && isAutoMoviePlainBeautyRequest(props.request) ? plan.layers : null;
63
+ this.compositor_ = compositor;
64
+ for (const layer of this.drawn()) {
65
+ if (layer === this.shown_) continue;
66
+ await placeAutoMovieDrawLayer(props.name, instance, layer, seconds);
67
+ if (this.disposed_) return;
68
+ instance.beforeDraw?.(compositor, seconds);
69
+ props.paint();
70
+ this.displays_.hold(compositor, slotOf(layer));
71
+ }
72
+ await placeAutoMovieDrawLayer(props.name, instance, this.shown_, seconds);
73
+ }
74
+ /**
75
+ * Composite a planned transition after the shown layer's records: paint the
76
+ * shown layer through `paint` when it has weight, hold it and composite the
77
+ * held layers. Returns whether it composited; otherwise the mount paints.
78
+ */
79
+ finish(paint) {
80
+ const layers = this.layers_;
81
+ const renderer = this.compositor_;
82
+ if (layers === null || renderer === null) return false;
83
+ if (this.shown_.weight > 0) {
84
+ paint();
85
+ this.displays_.hold(renderer, slotOf(this.shown_));
86
+ }
87
+ const drawn = this.drawn();
88
+ if (drawn.length === 0) {
89
+ renderer.setRenderTarget(null);
90
+ renderer.clear();
91
+ return true;
92
+ }
93
+ this.displays_.composite(renderer, drawn.map((layer) => ({
94
+ weight: layer.weight,
95
+ slot: slotOf(layer)
96
+ })), false);
97
+ return true;
98
+ }
99
+ /** Draw `overlay` over the composite through `camera`, without clearing. */
100
+ over(camera) {
101
+ if (this.compositor_ !== null) this.displays_.over(this.compositor_, camera);
102
+ }
103
+ /** Release the held layers; a placement still pending then paints nothing. */
104
+ dispose() {
105
+ this.disposed_ = true;
106
+ this.displays_.dispose();
107
+ }
108
+ /** The composited layers of positive weight, outgoing first. */
109
+ drawn() {
110
+ return (this.layers_ ?? []).filter((layer) => layer.weight > 0);
111
+ }
112
+ };
113
+ /** The slot a transition layer is held in: the outgoing 0, the live 1. */
114
+ function slotOf(layer) {
115
+ return layer.live ? 1 : 0;
116
+ }
117
+ export { AutoMovieInspectorTransition };
118
+
119
+ //# sourceMappingURL=AutoMovieInspectorTransition.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoMovieInspectorTransition.mjs","names":[],"sources":["../../src/inspector/AutoMovieInspectorTransition.ts"],"sourcesContent":["import type {\n IAutoMovieInspectionRequest,\n IAutoMoviePlaybackLayer,\n} from \"@automovie/interface\";\nimport {\n AutoMovieTransitionDisplays,\n type IAutoMovieDrawScene,\n isAutoMoviePlainBeautyRequest,\n placeAutoMovieDrawLayer,\n planAutoMovieDrawPicture,\n} from \"@automovie/render\";\nimport type * as THREE from \"three\";\n\n/**\n * The inspector's placement of a subject at a painted second and its half of a\n * film picture inside a transition, so the Viewer paints the frame and keeps\n * the records the draw page delivers and captures at the same second.\n *\n * `place` plans the second by `planAutoMovieDrawPicture` and places the shot\n * the picture shows most of last, by `seekShot` when it is a transition's\n * outgoing shot and by `seek` otherwise, so the mount's diagnostics, marks,\n * camera and every non-film picture follow that shot. For a plain `beauty`\n * request on a WebGL compositor, the condition under which the draw page\n * composites, it first places, paints and holds every other layer of positive\n * weight on its own entry's clock, the outgoing shot in slot 0 and the live\n * entry in slot 1, running the subject's `beforeDraw` after each placement. A\n * layer of weight 0 is neither painted nor held; when it is the shown layer, it\n * is still placed for the frame's records. `finish`, in the mount's paint after\n * the shown layer's records, paints the shown layer when it has weight, holds\n * it, and composites the held layers by their weights through\n * `AutoMovieTransitionDisplays`; a picture none of whose layers has weight, a\n * fade's midpoint, is the cleared canvas. The witness cubes then go to\n * `overlay` and `over` draws them over the composite at full strength. Any\n * other picture is painted by the mount as before and `finish` does nothing.\n *\n * The Viewer paints one sample of each layer with the film's indirect shading,\n * through `AutoMovieInspectorBeauty`, as it does outside transitions, so a\n * subject whose optics set `samples` differs from delivery by its shutter and\n * lens, not by its transitions.\n */\nexport class AutoMovieInspectorTransition {\n /** The held layers of the planned picture and its overlay. */\n private readonly displays_: AutoMovieTransitionDisplays =\n new AutoMovieTransitionDisplays();\n\n /** The layers of the picture being composited, or null for one layer. */\n private layers_: IAutoMoviePlaybackLayer[] | null = null;\n\n /** The shown layer of the planned second, or null outside a transition. */\n private shown_: IAutoMoviePlaybackLayer | null = null;\n\n /** The compositor of the picture being painted, or null. */\n private compositor_: THREE.WebGLRenderer | null = null;\n\n /** Whether `dispose` ran, after which nothing is painted or held. */\n private disposed_: boolean = false;\n\n /** Whether the picture being painted composites a transition's layers. */\n public get composites(): boolean {\n return this.layers_ !== null;\n }\n\n /** Whether the shown layer was placed by `seekShot`, off the film clock. */\n public get byShot(): boolean {\n return this.shown_ !== null && !this.shown_.live;\n }\n\n /** The scene a composited picture's witness cubes are attached to. */\n public get overlay(): THREE.Scene {\n return this.displays_.overlay;\n }\n\n /**\n * Plan the picture at `seconds`, place, paint and hold every other layer of a\n * composited transition, and place the shown layer last. Resolves once the\n * shown layer is ready; a refused plan throws at once.\n */\n public async place(props: {\n /** The subject's name, which a refusal names. */\n name: string;\n\n /** The created subject. */\n instance: IAutoMovieDrawScene;\n\n /** The inspection the picture is drawn with. */\n request: IAutoMovieInspectionRequest;\n\n /** The WebGL renderer that composites, or null when there is none. */\n compositor: THREE.WebGLRenderer | null;\n\n /** The second painted. */\n seconds: number;\n\n /** Paint the placed scene's beauty picture onto the canvas. */\n paint: () => void;\n }): Promise<void> {\n const { instance, seconds, compositor }: typeof props = props;\n const plan: ReturnType<typeof planAutoMovieDrawPicture> =\n planAutoMovieDrawPicture(props.name, instance, seconds);\n this.shown_ = plan.shown;\n this.layers_ =\n compositor !== null && isAutoMoviePlainBeautyRequest(props.request)\n ? plan.layers\n : null;\n this.compositor_ = compositor;\n for (const layer of this.drawn()) {\n if (layer === this.shown_) continue;\n await placeAutoMovieDrawLayer(props.name, instance, layer, seconds);\n\n // A mount disposed during the placement paints and holds nothing; the\n // subject's render-target work runs after the placement, as the draw\n // page runs it.\n if (this.disposed_) return;\n instance.beforeDraw?.(compositor!, seconds);\n props.paint();\n this.displays_.hold(compositor!, slotOf(layer));\n }\n await placeAutoMovieDrawLayer(props.name, instance, this.shown_, seconds);\n }\n\n /**\n * Composite a planned transition after the shown layer's records: paint the\n * shown layer through `paint` when it has weight, hold it and composite the\n * held layers. Returns whether it composited; otherwise the mount paints.\n */\n public finish(paint: () => void): boolean {\n const layers: IAutoMoviePlaybackLayer[] | null = this.layers_;\n const renderer: THREE.WebGLRenderer | null = this.compositor_;\n if (layers === null || renderer === null) return false;\n if (this.shown_!.weight > 0) {\n paint();\n this.displays_.hold(renderer, slotOf(this.shown_!));\n }\n\n // A fade's midpoint shows no shot: the cleared canvas.\n const drawn: IAutoMoviePlaybackLayer[] = this.drawn();\n if (drawn.length === 0) {\n renderer.setRenderTarget(null);\n renderer.clear();\n return true;\n }\n this.displays_.composite(\n renderer,\n drawn.map(\n (layer: IAutoMoviePlaybackLayer): { weight: number; slot: number } => ({\n weight: layer.weight,\n slot: slotOf(layer),\n }),\n ),\n false,\n );\n return true;\n }\n\n /** Draw `overlay` over the composite through `camera`, without clearing. */\n public over(camera: THREE.Camera): void {\n if (this.compositor_ !== null)\n this.displays_.over(this.compositor_, camera);\n }\n\n /** Release the held layers; a placement still pending then paints nothing. */\n public dispose(): void {\n this.disposed_ = true;\n this.displays_.dispose();\n }\n\n /** The composited layers of positive weight, outgoing first. */\n private drawn(): IAutoMoviePlaybackLayer[] {\n return (this.layers_ ?? []).filter(\n (layer: IAutoMoviePlaybackLayer): boolean => layer.weight > 0,\n );\n }\n}\n\n/** The slot a transition layer is held in: the outgoing 0, the live 1. */\nfunction slotOf(layer: IAutoMoviePlaybackLayer): number {\n return layer.live ? 1 : 0;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAa,+BAAb,MAA0C;;CAExC,YACE,IAAI,4BAA4B;;CAGlC,UAAoD;;CAGpD,SAAiD;;CAGjD,cAAkD;;CAGlD,YAA6B;;CAG7B,IAAW,aAAsB;EAC/B,OAAO,KAAK,YAAY;CAC1B;;CAGA,IAAW,SAAkB;EAC3B,OAAO,KAAK,WAAW,QAAQ,CAAC,KAAK,OAAO;CAC9C;;CAGA,IAAW,UAAuB;EAChC,OAAO,KAAK,UAAU;CACxB;;;;;;CAOA,MAAa,MAAM,OAkBD;EAChB,MAAM,EAAE,UAAU,SAAS,eAA6B;EACxD,MAAM,OACJ,yBAAyB,MAAM,MAAM,UAAU,OAAO;EACxD,KAAK,SAAS,KAAK;EACnB,KAAK,UACH,eAAe,QAAQ,8BAA8B,MAAM,OAAO,IAC9D,KAAK,SACL;EACN,KAAK,cAAc;EACnB,KAAK,MAAM,SAAS,KAAK,MAAM,GAAG;GAChC,IAAI,UAAU,KAAK,QAAQ;GAC3B,MAAM,wBAAwB,MAAM,MAAM,UAAU,OAAO,OAAO;GAKlE,IAAI,KAAK,WAAW;GACpB,SAAS,aAAa,YAAa,OAAO;GAC1C,MAAM,MAAM;GACZ,KAAK,UAAU,KAAK,YAAa,OAAO,KAAK,CAAC;EAChD;EACA,MAAM,wBAAwB,MAAM,MAAM,UAAU,KAAK,QAAQ,OAAO;CAC1E;;;;;;CAOA,OAAc,OAA4B;EACxC,MAAM,SAA2C,KAAK;EACtD,MAAM,WAAuC,KAAK;EAClD,IAAI,WAAW,QAAQ,aAAa,MAAM,OAAO;EACjD,IAAI,KAAK,OAAQ,SAAS,GAAG;GAC3B,MAAM;GACN,KAAK,UAAU,KAAK,UAAU,OAAO,KAAK,MAAO,CAAC;EACpD;EAGA,MAAM,QAAmC,KAAK,MAAM;EACpD,IAAI,MAAM,WAAW,GAAG;GACtB,SAAS,gBAAgB,IAAI;GAC7B,SAAS,MAAM;GACf,OAAO;EACT;EACA,KAAK,UAAU,UACb,UACA,MAAM,KACH,WAAsE;GACrE,QAAQ,MAAM;GACd,MAAM,OAAO,KAAK;EACpB,EACF,GACA,KACF;EACA,OAAO;CACT;;CAGA,KAAY,QAA4B;EACtC,IAAI,KAAK,gBAAgB,MACvB,KAAK,UAAU,KAAK,KAAK,aAAa,MAAM;CAChD;;CAGA,UAAuB;EACrB,KAAK,YAAY;EACjB,KAAK,UAAU,QAAQ;CACzB;;CAGA,QAA2C;EACzC,QAAQ,KAAK,WAAW,CAAC,EAAA,CAAG,QACzB,UAA4C,MAAM,SAAS,CAC9D;CACF;AACF;;AAGA,SAAS,OAAO,OAAwC;CACtD,OAAO,MAAM,OAAO,IAAI;AAC1B"}
@@ -5,14 +5,6 @@ import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
5
5
  * View: the subject's camera (`film`), a named view (the subject's own or a fitted viewpoint) with orthographic projection, following each second and a focus, or a fixed camera by coordinates, typed with any scale and up its text carries.
6
6
  *
7
7
  * The panel shows the request's first view, the one the page draws, and writes every change back as one view text through render's `formatAutoMovieInspectionView`, which the reducer replaces the request's views with. A fixed camera and a focus pattern are typed and dispatched when the field is left or Enter is pressed.
8
- *
9
- * @evidence contracts/development/common.md#meaningful-documentation States the forms offered, which view is shown, how a change is written and when typed fields are dispatched.
10
- * @evidence contracts/development/implementation.md#principled-implementation The shown view is parsed by render's view grammar and the dispatched text written by its inverse, so every switch is one the grammar reads.
11
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One select for the form, then the controls that form takes.
12
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A view the grammar refuses is refused by the reducer with the key named; the panel validates nothing itself.
13
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant per render beyond the view names listed.
14
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A view with handlers.
15
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Holds only the text being typed.
16
8
  */
17
9
  export declare function AutoMovieInspectorViewPanel(props: {
18
10
  /** The request shown. */
@@ -10,14 +10,6 @@ const FIXED = "0,1.6,4:0,1,0";
10
10
  * View: the subject's camera (`film`), a named view (the subject's own or a fitted viewpoint) with orthographic projection, following each second and a focus, or a fixed camera by coordinates, typed with any scale and up its text carries.
11
11
  *
12
12
  * The panel shows the request's first view, the one the page draws, and writes every change back as one view text through render's `formatAutoMovieInspectionView`, which the reducer replaces the request's views with. A fixed camera and a focus pattern are typed and dispatched when the field is left or Enter is pressed.
13
- *
14
- * @evidence contracts/development/common.md#meaningful-documentation States the forms offered, which view is shown, how a change is written and when typed fields are dispatched.
15
- * @evidence contracts/development/implementation.md#principled-implementation The shown view is parsed by render's view grammar and the dispatched text written by its inverse, so every switch is one the grammar reads.
16
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One select for the form, then the controls that form takes.
17
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A view the grammar refuses is refused by the reducer with the key named; the panel validates nothing itself.
18
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant per render beyond the view names listed.
19
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A view with handlers.
20
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Holds only the text being typed.
21
13
  */
22
14
  function AutoMovieInspectorViewPanel(props) {
23
15
  const text = props.request.views[0];
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMovieInspectorViewPanel.js","sourceRoot":"","sources":["../../src/inspector/AutoMovieInspectorViewPanel.tsx"],"names":[],"mappings":";;;;AACA,8CAAgG;AAChG,iCAA6D;AAI7D,yHAAyH;AACzH,MAAM,KAAK,GAAW,eAAe,CAAC;AAEtC;;;;;;;;;;;;GAYG;AACH,qCAA4C,KAS3C;IACC,MAAM,IAAI,GAAW,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC;IAC7C,MAAM,IAAI,GAA6B,IAAA,qCAA4B,EAAC,IAAI,CAAC,CAAC;IAC1E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,IAAI,GAA6C,CACrD,IAA8B,EACxB,EAAE,CACR,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAA,sCAA6B,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9E,MAAM,IAAI,GAAW,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACnE,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK,SAAS;QACrD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;QACpB,CAAC,CAAC,EAAE,CAAC;IACT,MAAM,MAAM,GAAe,GAAS,EAAE;QACpC,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO;QAC3B,QAAQ,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,IAAI,CAAC,IA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ACR,mCAAO,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,aAChC,kCACE,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK,SAAS,EACvC,QAAQ,EAAE,CAAC,KAAoC,EAAQ,EAAE,CACvD,IAAI,CAAC;oCACH,GAAG,IAAI;oCACP,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI;iCACzD,CAAC,GAEJ,EAAC,GAAG,8BAEA,EACR,mCAAO,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,sBAC1B,GAAG,EACT,gDACa,eAAe,EAC1B,WAAW,EAAC,cAAc,EAC1B,KAAK,EAAE,KAAK,IAAI,KAAK,EACrB,QAAQ,EAAE,CAAC,KAAoC,EAAQ,EAAE,CACvD,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAE9B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,CAAC,KAAsB,EAAQ,EAAE;oCAC1C,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO;wCAAE,MAAM,EAAE,CAAC;gCACtC,CAAC,GACD,IACI,IACP,CACJ,CAAC,CAAC,CAAC,IAAI,IACC,CACZ,CAAC;AACJ,CAAC"}
@@ -8,14 +8,6 @@ const FIXED = "0,1.6,4:0,1,0";
8
8
  * View: the subject's camera (`film`), a named view (the subject's own or a fitted viewpoint) with orthographic projection, following each second and a focus, or a fixed camera by coordinates, typed with any scale and up its text carries.
9
9
  *
10
10
  * The panel shows the request's first view, the one the page draws, and writes every change back as one view text through render's `formatAutoMovieInspectionView`, which the reducer replaces the request's views with. A fixed camera and a focus pattern are typed and dispatched when the field is left or Enter is pressed.
11
- *
12
- * @evidence contracts/development/common.md#meaningful-documentation States the forms offered, which view is shown, how a change is written and when typed fields are dispatched.
13
- * @evidence contracts/development/implementation.md#principled-implementation The shown view is parsed by render's view grammar and the dispatched text written by its inverse, so every switch is one the grammar reads.
14
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One select for the form, then the controls that form takes.
15
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A view the grammar refuses is refused by the reducer with the key named; the panel validates nothing itself.
16
- * @evidence contracts/development/implementation.md#efficient-algorithms Constant per render beyond the view names listed.
17
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A view with handlers.
18
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Holds only the text being typed.
19
11
  */
20
12
  function AutoMovieInspectorViewPanel(props) {
21
13
  const text = props.request.views[0];
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMovieInspectorViewPanel.mjs","names":[],"sources":["../../src/inspector/AutoMovieInspectorViewPanel.tsx"],"sourcesContent":["import type { IAutoMovieCapturePlanRequest, IAutoMovieInspectionView } from \"@automovie/interface\";\nimport { formatAutoMovieInspectionView, parseAutoMovieInspectionView } from \"@automovie/render\";\nimport { type ChangeEvent, type JSX, useState } from \"react\";\n\nimport type { IAutoMovieInspectorAction } from \"./IAutoMovieInspectorAction.js\";\n\n/** The fixed camera a person starts from when choosing one: 4 m in front at eye height, looking at the origin at 1 m. */\nconst FIXED: string = \"0,1.6,4:0,1,0\";\n\n/**\n * View: the subject's camera (`film`), a named view (the subject's own or a fitted viewpoint) with orthographic projection, following each second and a focus, or a fixed camera by coordinates, typed with any scale and up its text carries.\n *\n * The panel shows the request's first view, the one the page draws, and writes every change back as one view text through render's `formatAutoMovieInspectionView`, which the reducer replaces the request's views with. A fixed camera and a focus pattern are typed and dispatched when the field is left or Enter is pressed.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the forms offered, which view is shown, how a change is written and when typed fields are dispatched.\n * @evidence contracts/development/implementation.md#principled-implementation The shown view is parsed by render's view grammar and the dispatched text written by its inverse, so every switch is one the grammar reads.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One select for the form, then the controls that form takes.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A view the grammar refuses is refused by the reducer with the key named; the panel validates nothing itself.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant per render beyond the view names listed.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A view with handlers.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Holds only the text being typed.\n */\nexport function AutoMovieInspectorViewPanel(props: {\n /** The request shown. */\n request: IAutoMovieCapturePlanRequest;\n\n /** View names the subject offers: its own, then the fitted viewpoints. */\n views: readonly string[];\n\n /** Where edits go. */\n dispatch: (action: IAutoMovieInspectorAction) => void;\n}): JSX.Element {\n const text: string = props.request.views[0]!;\n const view: IAutoMovieInspectionView = parseAutoMovieInspectionView(text);\n const [typed, setTyped] = useState<string | null>(null);\n const send: (next: IAutoMovieInspectionView) => void = (\n next: IAutoMovieInspectionView,\n ): void =>\n props.dispatch({ type: \"view\", view: formatAutoMovieInspectionView(next) });\n const form: string = view.type === \"named\" ? view.name : view.type;\n const focus: string =\n view.type === \"named\" && view.focus?.type === \"pattern\"\n ? view.focus.pattern\n : \"\";\n const commit: () => void = (): void => {\n if (typed === null) return;\n setTyped(null);\n if (view.type === \"fixed\") props.dispatch({ type: \"view\", view: typed });\n else if (view.type === \"named\")\n send({\n ...view,\n focus: typed === \"\" ? null : { type: \"pattern\", pattern: typed },\n });\n };\n return (\n <fieldset style={{ border: 0, padding: 0, margin: 0, minWidth: 0 }}>\n <legend\n style={{\n position: \"absolute\",\n width: 1,\n height: 1,\n overflow: \"hidden\",\n clipPath: \"inset(50%)\",\n whiteSpace: \"nowrap\",\n }}\n >\n View\n </legend>\n <select\n aria-label=\"View\"\n value={form}\n onChange={(event: ChangeEvent<HTMLSelectElement>): void => {\n const chosen: string = event.target.value;\n setTyped(null);\n if (chosen === \"film\") send({ type: \"film\" });\n else if (chosen === \"fixed\")\n props.dispatch({ type: \"view\", view: FIXED });\n else\n send({\n type: \"named\",\n name: chosen,\n orthographic: false,\n follow: false,\n focus: null,\n });\n }}\n >\n <option value=\"film\">film</option>\n {[\n ...new Set<string>([\n ...props.views,\n ...(view.type === \"named\" ? [view.name] : []),\n ]),\n ].map(\n (name: string): JSX.Element => (\n <option key={name} value={name}>\n {name}\n </option>\n ),\n )}\n <option value=\"fixed\">fixed</option>\n </select>\n {view.type === \"fixed\" ? (\n <input\n aria-label=\"Fixed camera x,y,z:tx,ty,tz\"\n value={typed ?? text}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n setTyped(event.target.value)\n }\n onBlur={commit}\n onKeyDown={(event: { key: string }): void => {\n if (event.key === \"Enter\") commit();\n }}\n />\n ) : null}\n {view.type === \"named\" ? (\n <>\n <label style={{ display: \"block\" }}>\n <input\n type=\"checkbox\"\n checked={view.orthographic}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n send({ ...view, orthographic: event.target.checked })\n }\n />{\" \"}\n orthographic\n </label>\n <label style={{ display: \"block\" }}>\n <input\n type=\"checkbox\"\n checked={view.follow}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n send({ ...view, follow: event.target.checked })\n }\n />{\" \"}\n follow each second\n </label>\n <label style={{ display: \"block\" }}>\n <input\n type=\"checkbox\"\n checked={view.focus?.type === \"flagged\"}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n send({\n ...view,\n focus: event.target.checked ? { type: \"flagged\" } : null,\n })\n }\n />{\" \"}\n focus on flagged marks\n </label>\n <label style={{ display: \"block\" }}>\n focus{\" \"}\n <input\n aria-label=\"Focus pattern\"\n placeholder=\"path pattern\"\n value={typed ?? focus}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n setTyped(event.target.value)\n }\n onBlur={commit}\n onKeyDown={(event: { key: string }): void => {\n if (event.key === \"Enter\") commit();\n }}\n />\n </label>\n </>\n ) : null}\n </fieldset>\n );\n}\n"],"mappings":";;;;;AAOA,MAAM,QAAgB;;;;;;;;;;;;;;AAetB,SAAgB,4BAA4B,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;KAAjC,UAAA;MAAoC;MAC5B;MACN,oBAAC,SAAD;OACE,cAAW;OACX,aAAY;OACZ,OAAO,SAAS;OAChB,WAAW,UACT,SAAS,MAAM,OAAO,KAAK;OAE7B,QAAQ;OACR,YAAY,UAAiC;QAC3C,IAAI,MAAM,QAAQ,SAAS,OAAO;OACpC;MACD,CAAA;KACI;;GACP,EAAA,CAAA,IACA;EACI;;AAEd"}
1
+ {"version":3,"file":"AutoMovieInspectorViewPanel.mjs","names":[],"sources":["../../src/inspector/AutoMovieInspectorViewPanel.tsx"],"sourcesContent":["import type { IAutoMovieCapturePlanRequest, IAutoMovieInspectionView } from \"@automovie/interface\";\nimport { formatAutoMovieInspectionView, parseAutoMovieInspectionView } from \"@automovie/render\";\nimport { type ChangeEvent, type JSX, useState } from \"react\";\n\nimport type { IAutoMovieInspectorAction } from \"./IAutoMovieInspectorAction.js\";\n\n/** The fixed camera a person starts from when choosing one: 4 m in front at eye height, looking at the origin at 1 m. */\nconst FIXED: string = \"0,1.6,4:0,1,0\";\n\n/**\n * View: the subject's camera (`film`), a named view (the subject's own or a fitted viewpoint) with orthographic projection, following each second and a focus, or a fixed camera by coordinates, typed with any scale and up its text carries.\n *\n * The panel shows the request's first view, the one the page draws, and writes every change back as one view text through render's `formatAutoMovieInspectionView`, which the reducer replaces the request's views with. A fixed camera and a focus pattern are typed and dispatched when the field is left or Enter is pressed.\n */\nexport function AutoMovieInspectorViewPanel(props: {\n /** The request shown. */\n request: IAutoMovieCapturePlanRequest;\n\n /** View names the subject offers: its own, then the fitted viewpoints. */\n views: readonly string[];\n\n /** Where edits go. */\n dispatch: (action: IAutoMovieInspectorAction) => void;\n}): JSX.Element {\n const text: string = props.request.views[0]!;\n const view: IAutoMovieInspectionView = parseAutoMovieInspectionView(text);\n const [typed, setTyped] = useState<string | null>(null);\n const send: (next: IAutoMovieInspectionView) => void = (\n next: IAutoMovieInspectionView,\n ): void =>\n props.dispatch({ type: \"view\", view: formatAutoMovieInspectionView(next) });\n const form: string = view.type === \"named\" ? view.name : view.type;\n const focus: string =\n view.type === \"named\" && view.focus?.type === \"pattern\"\n ? view.focus.pattern\n : \"\";\n const commit: () => void = (): void => {\n if (typed === null) return;\n setTyped(null);\n if (view.type === \"fixed\") props.dispatch({ type: \"view\", view: typed });\n else if (view.type === \"named\")\n send({\n ...view,\n focus: typed === \"\" ? null : { type: \"pattern\", pattern: typed },\n });\n };\n return (\n <fieldset style={{ border: 0, padding: 0, margin: 0, minWidth: 0 }}>\n <legend\n style={{\n position: \"absolute\",\n width: 1,\n height: 1,\n overflow: \"hidden\",\n clipPath: \"inset(50%)\",\n whiteSpace: \"nowrap\",\n }}\n >\n View\n </legend>\n <select\n aria-label=\"View\"\n value={form}\n onChange={(event: ChangeEvent<HTMLSelectElement>): void => {\n const chosen: string = event.target.value;\n setTyped(null);\n if (chosen === \"film\") send({ type: \"film\" });\n else if (chosen === \"fixed\")\n props.dispatch({ type: \"view\", view: FIXED });\n else\n send({\n type: \"named\",\n name: chosen,\n orthographic: false,\n follow: false,\n focus: null,\n });\n }}\n >\n <option value=\"film\">film</option>\n {[\n ...new Set<string>([\n ...props.views,\n ...(view.type === \"named\" ? [view.name] : []),\n ]),\n ].map(\n (name: string): JSX.Element => (\n <option key={name} value={name}>\n {name}\n </option>\n ),\n )}\n <option value=\"fixed\">fixed</option>\n </select>\n {view.type === \"fixed\" ? (\n <input\n aria-label=\"Fixed camera x,y,z:tx,ty,tz\"\n value={typed ?? text}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n setTyped(event.target.value)\n }\n onBlur={commit}\n onKeyDown={(event: { key: string }): void => {\n if (event.key === \"Enter\") commit();\n }}\n />\n ) : null}\n {view.type === \"named\" ? (\n <>\n <label style={{ display: \"block\" }}>\n <input\n type=\"checkbox\"\n checked={view.orthographic}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n send({ ...view, orthographic: event.target.checked })\n }\n />{\" \"}\n orthographic\n </label>\n <label style={{ display: \"block\" }}>\n <input\n type=\"checkbox\"\n checked={view.follow}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n send({ ...view, follow: event.target.checked })\n }\n />{\" \"}\n follow each second\n </label>\n <label style={{ display: \"block\" }}>\n <input\n type=\"checkbox\"\n checked={view.focus?.type === \"flagged\"}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n send({\n ...view,\n focus: event.target.checked ? { type: \"flagged\" } : null,\n })\n }\n />{\" \"}\n focus on flagged marks\n </label>\n <label style={{ display: \"block\" }}>\n focus{\" \"}\n <input\n aria-label=\"Focus pattern\"\n placeholder=\"path pattern\"\n value={typed ?? focus}\n onChange={(event: ChangeEvent<HTMLInputElement>): void =>\n setTyped(event.target.value)\n }\n onBlur={commit}\n onKeyDown={(event: { key: string }): void => {\n if (event.key === \"Enter\") commit();\n }}\n />\n </label>\n </>\n ) : null}\n </fieldset>\n );\n}\n"],"mappings":";;;;;AAOA,MAAM,QAAgB;;;;;;AAOtB,SAAgB,4BAA4B,OAS5B;CACd,MAAM,OAAe,MAAM,QAAQ,MAAM;CACzC,MAAM,OAAiC,6BAA6B,IAAI;CACxE,MAAM,CAAC,OAAO,YAAY,SAAwB,IAAI;CACtD,MAAM,QACJ,SAEA,MAAM,SAAS;EAAE,MAAM;EAAQ,MAAM,8BAA8B,IAAI;CAAE,CAAC;CAC5E,MAAM,OAAe,KAAK,SAAS,UAAU,KAAK,OAAO,KAAK;CAC9D,MAAM,QACJ,KAAK,SAAS,WAAW,KAAK,OAAO,SAAS,YAC1C,KAAK,MAAM,UACX;CACN,MAAM,eAAiC;EACrC,IAAI,UAAU,MAAM;EACpB,SAAS,IAAI;EACb,IAAI,KAAK,SAAS,SAAS,MAAM,SAAS;GAAE,MAAM;GAAQ,MAAM;EAAM,CAAC;OAClE,IAAI,KAAK,SAAS,SACrB,KAAK;GACH,GAAG;GACH,OAAO,UAAU,KAAK,OAAO;IAAE,MAAM;IAAW,SAAS;GAAM;EACjE,CAAC;CACL;CACA,OACE,qBA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