@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
@@ -0,0 +1,29 @@
1
+ import type { IAutoMovieInspectionHandle } from "@automovie/render";
2
+ import type * as THREE from "three";
3
+ import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
4
+ import type { IAutoMovieInspectorSceneHost } from "./IAutoMovieInspectorSceneHost.js";
5
+ /**
6
+ * Place a paused picture's labels and convert them to CSS pixels of the canvas.
7
+ *
8
+ * The inspection places labels on the subject's raster. Positions and the line
9
+ * height scale by the ratio of the canvas's size to that raster, and the
10
+ * stamp's font pixel stays at least one CSS pixel, as a capture keeps it at
11
+ * least one sheet pixel.
12
+ *
13
+ * @param props The applied inspection, the camera drawn through, the subject's
14
+ * raster and the canvas size shown.
15
+ * @returns The kept labels, their line height and the number dropped.
16
+ */
17
+ export declare function placeAutoMovieInspectorLabels(props: {
18
+ /** The inspection applied to the picture. */
19
+ inspection: IAutoMovieInspectionHandle;
20
+ /** The camera the picture was drawn through. */
21
+ camera: THREE.Camera;
22
+ /** The subject's raster in pixels. */
23
+ raster: {
24
+ width: number;
25
+ height: number;
26
+ };
27
+ /** The canvas as laid out. */
28
+ shown: IAutoMovieInspectorSceneHost.ISize;
29
+ }): IAutoMovieInspectorScene.ILabels;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.placeAutoMovieInspectorLabels = placeAutoMovieInspectorLabels;
4
+ /**
5
+ * Place a paused picture's labels and convert them to CSS pixels of the canvas.
6
+ *
7
+ * The inspection places labels on the subject's raster. Positions and the line
8
+ * height scale by the ratio of the canvas's size to that raster, and the
9
+ * stamp's font pixel stays at least one CSS pixel, as a capture keeps it at
10
+ * least one sheet pixel.
11
+ *
12
+ * @param props The applied inspection, the camera drawn through, the subject's
13
+ * raster and the canvas size shown.
14
+ * @returns The kept labels, their line height and the number dropped.
15
+ */
16
+ function placeAutoMovieInspectorLabels(props) {
17
+ const { width, height } = props.raster;
18
+ const { shown } = props;
19
+ const scale = Math.max(1, Math.ceil(height / shown.height));
20
+ const placed = props.inspection.labels(props.camera, width, height, scale);
21
+ return {
22
+ labels: placed.labels.map((label) => ({
23
+ path: label.path,
24
+ text: label.text,
25
+ left: (label.x * shown.width) / width,
26
+ top: (label.y * shown.height) / height,
27
+ })),
28
+ // The stamp's box is nine font pixels high.
29
+ lineHeight: (9 * scale * shown.height) / height,
30
+ dropped: placed.dropped.length,
31
+ };
32
+ }
33
+ //# sourceMappingURL=placeAutoMovieInspectorLabels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeAutoMovieInspectorLabels.js","sourceRoot":"","sources":["../../src/inspector/placeAutoMovieInspectorLabels.ts"],"names":[],"mappings":";;;AAOA;;;;;;;;;;;GAWG;AACH,uCAA8C,KAY7C;IACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,KAAK,GAAW,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACpE,MAAM,MAAM,GACV,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9D,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CACvB,CACE,KAAgC,EACoB,EAAE,CAAC,CAAC;YACxD,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK;YACrC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM;SACvC,CAAC,CACH;QACD,4CAA4C;QAC5C,UAAU,EAAE,CAAC,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM;QAC/C,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM;KAC/B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ // src/inspector/placeAutoMovieInspectorLabels.ts
2
+ /**
3
+ * Place a paused picture's labels and convert them to CSS pixels of the canvas.
4
+ *
5
+ * The inspection places labels on the subject's raster. Positions and the line
6
+ * height scale by the ratio of the canvas's size to that raster, and the
7
+ * stamp's font pixel stays at least one CSS pixel, as a capture keeps it at
8
+ * least one sheet pixel.
9
+ *
10
+ * @param props The applied inspection, the camera drawn through, the subject's
11
+ * raster and the canvas size shown.
12
+ * @returns The kept labels, their line height and the number dropped.
13
+ */
14
+ function placeAutoMovieInspectorLabels(props) {
15
+ const { width, height } = props.raster;
16
+ const { shown } = props;
17
+ const scale = Math.max(1, Math.ceil(height / shown.height));
18
+ const placed = props.inspection.labels(props.camera, width, height, scale);
19
+ return {
20
+ labels: placed.labels.map((label) => ({
21
+ path: label.path,
22
+ text: label.text,
23
+ left: label.x * shown.width / width,
24
+ top: label.y * shown.height / height
25
+ })),
26
+ lineHeight: 9 * scale * shown.height / height,
27
+ dropped: placed.dropped.length
28
+ };
29
+ }
30
+ export { placeAutoMovieInspectorLabels };
31
+
32
+ //# sourceMappingURL=placeAutoMovieInspectorLabels.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeAutoMovieInspectorLabels.mjs","names":[],"sources":["../../src/inspector/placeAutoMovieInspectorLabels.ts"],"sourcesContent":["import type { IAutoMovieInspectionLabel } from \"@automovie/interface\";\nimport type { IAutoMovieInspectionHandle } from \"@automovie/render\";\nimport type * as THREE from \"three\";\n\nimport type { IAutoMovieInspectorScene } from \"./IAutoMovieInspectorScene.js\";\nimport type { IAutoMovieInspectorSceneHost } from \"./IAutoMovieInspectorSceneHost.js\";\n\n/**\n * Place a paused picture's labels and convert them to CSS pixels of the canvas.\n *\n * The inspection places labels on the subject's raster. Positions and the line\n * height scale by the ratio of the canvas's size to that raster, and the\n * stamp's font pixel stays at least one CSS pixel, as a capture keeps it at\n * least one sheet pixel.\n *\n * @param props The applied inspection, the camera drawn through, the subject's\n * raster and the canvas size shown.\n * @returns The kept labels, their line height and the number dropped.\n */\nexport function placeAutoMovieInspectorLabels(props: {\n /** The inspection applied to the picture. */\n inspection: IAutoMovieInspectionHandle;\n\n /** The camera the picture was drawn through. */\n camera: THREE.Camera;\n\n /** The subject's raster in pixels. */\n raster: { width: number; height: number };\n\n /** The canvas as laid out. */\n shown: IAutoMovieInspectorSceneHost.ISize;\n}): IAutoMovieInspectorScene.ILabels {\n const { width, height } = props.raster;\n const { shown } = props;\n const scale: number = Math.max(1, Math.ceil(height / shown.height));\n const placed: ReturnType<IAutoMovieInspectionHandle[\"labels\"]> =\n props.inspection.labels(props.camera, width, height, scale);\n return {\n labels: placed.labels.map(\n (\n label: IAutoMovieInspectionLabel,\n ): IAutoMovieInspectorScene.ILabels[\"labels\"][number] => ({\n path: label.path,\n text: label.text,\n left: (label.x * shown.width) / width,\n top: (label.y * shown.height) / height,\n }),\n ),\n // The stamp's box is nine font pixels high.\n lineHeight: (9 * scale * shown.height) / height,\n dropped: placed.dropped.length,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAmBA,SAAgB,8BAA8B,OAYT;CACnC,MAAM,EAAE,OAAO,WAAW,MAAM;CAChC,MAAM,EAAE,UAAU;CAClB,MAAM,QAAgB,KAAK,IAAI,GAAG,KAAK,KAAK,SAAS,MAAM,MAAM,CAAC;CAClE,MAAM,SACJ,MAAM,WAAW,OAAO,MAAM,QAAQ,OAAO,QAAQ,KAAK;CAC5D,OAAO;EACL,QAAQ,OAAO,OAAO,KAElB,WACwD;GACxD,MAAM,MAAM;GACZ,MAAM,MAAM;GACZ,MAAO,MAAM,IAAI,MAAM,QAAS;GAChC,KAAM,MAAM,IAAI,MAAM,SAAU;EAClC,EACF;EAEA,YAAa,IAAI,QAAQ,MAAM,SAAU;EACzC,SAAS,OAAO,QAAQ;CAC1B;AACF"}
@@ -1,21 +1,18 @@
1
1
  import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
2
2
  /**
3
- * Read the request an address names: its query text, with or without the leading `?`, through the capture plan grammar.
3
+ * Read the request an address names: its query text, with or without the
4
+ * leading `?`, through the capture plan grammar.
4
5
  *
5
- * 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.
6
+ * The text is decoded by `URLSearchParams`, so `+` reads as a space and percent
7
+ * escapes as their characters, and the parameters go to
8
+ * `parseAutoMovieCapturePlanRequest` as they are. The empty text is the request
9
+ * that asks for nothing.
6
10
  *
7
- * It throws the grammar's `Error`, which names the key, for an unknown key, a key given twice or a value the grammar refuses.
11
+ * It throws the grammar's `Error`, which names the key, for an unknown key, a
12
+ * key given twice or a value the grammar refuses.
8
13
  *
9
14
  * ```ts
10
15
  * const request = readAutoMovieInspectorAddress(location.search);
11
16
  * ```
12
- *
13
- * @evidence contracts/development/common.md#meaningful-documentation States the accepted text, how it is decoded, what empty text gives and what a refusal names.
14
- * @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.
15
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Strip one `?`, decode, read.
16
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal reaches the caller; nothing falls back to a default request here.
17
- * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the text.
18
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one text.
19
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh request and keeps nothing.
20
17
  */
21
18
  export declare function readAutoMovieInspectorAddress(text: string): IAutoMovieCapturePlanRequest;
@@ -3,23 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.readAutoMovieInspectorAddress = readAutoMovieInspectorAddress;
4
4
  const render_1 = require("@automovie/render");
5
5
  /**
6
- * Read the request an address names: its query text, with or without the leading `?`, through the capture plan grammar.
6
+ * Read the request an address names: its query text, with or without the
7
+ * leading `?`, through the capture plan grammar.
7
8
  *
8
- * 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.
9
+ * The text is decoded by `URLSearchParams`, so `+` reads as a space and percent
10
+ * escapes as their characters, and the parameters go to
11
+ * `parseAutoMovieCapturePlanRequest` as they are. The empty text is the request
12
+ * that asks for nothing.
9
13
  *
10
- * It throws the grammar's `Error`, which names the key, for an unknown key, a key given twice or a value the grammar refuses.
14
+ * It throws the grammar's `Error`, which names the key, for an unknown key, a
15
+ * key given twice or a value the grammar refuses.
11
16
  *
12
17
  * ```ts
13
18
  * const request = readAutoMovieInspectorAddress(location.search);
14
19
  * ```
15
- *
16
- * @evidence contracts/development/common.md#meaningful-documentation States the accepted text, how it is decoded, what empty text gives and what a refusal names.
17
- * @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.
18
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Strip one `?`, decode, read.
19
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal reaches the caller; nothing falls back to a default request here.
20
- * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the text.
21
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one text.
22
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh request and keeps nothing.
23
20
  */
24
21
  function readAutoMovieInspectorAddress(text) {
25
22
  return (0, render_1.parseAutoMovieCapturePlanRequest)(new URLSearchParams(text.startsWith("?") ? text.slice(1) : text));
@@ -1 +1 @@
1
- {"version":3,"file":"readAutoMovieInspectorAddress.js","sourceRoot":"","sources":["../../src/inspector/readAutoMovieInspectorAddress.ts"],"names":[],"mappings":";;;AACA,8CAAqE;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,uCACE,IAAY;IAEZ,OAAO,IAAA,yCAAgC,EACrC,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CACjE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"readAutoMovieInspectorAddress.js","sourceRoot":"","sources":["../../src/inspector/readAutoMovieInspectorAddress.ts"],"names":[],"mappings":";;;AACA,8CAAqE;AAErE;;;;;;;;;;;;;;;GAeG;AACH,uCACE,IAAY;IAEZ,OAAO,IAAA,yCAAgC,EACrC,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CACjE,CAAC;AACJ,CAAC"}
@@ -1,23 +1,20 @@
1
1
  import { parseAutoMovieCapturePlanRequest } from "@automovie/render";
2
2
  // src/inspector/readAutoMovieInspectorAddress.ts
3
3
  /**
4
- * Read the request an address names: its query text, with or without the leading `?`, through the capture plan grammar.
4
+ * Read the request an address names: its query text, with or without the
5
+ * leading `?`, through the capture plan grammar.
5
6
  *
6
- * 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.
7
+ * The text is decoded by `URLSearchParams`, so `+` reads as a space and percent
8
+ * escapes as their characters, and the parameters go to
9
+ * `parseAutoMovieCapturePlanRequest` as they are. The empty text is the request
10
+ * that asks for nothing.
7
11
  *
8
- * It throws the grammar's `Error`, which names the key, for an unknown key, a key given twice or a value the grammar refuses.
12
+ * It throws the grammar's `Error`, which names the key, for an unknown key, a
13
+ * key given twice or a value the grammar refuses.
9
14
  *
10
15
  * ```ts
11
16
  * const request = readAutoMovieInspectorAddress(location.search);
12
17
  * ```
13
- *
14
- * @evidence contracts/development/common.md#meaningful-documentation States the accepted text, how it is decoded, what empty text gives and what a refusal names.
15
- * @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.
16
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Strip one `?`, decode, read.
17
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal reaches the caller; nothing falls back to a default request here.
18
- * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the text.
19
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one text.
20
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh request and keeps nothing.
21
18
  */
22
19
  function readAutoMovieInspectorAddress(text) {
23
20
  return parseAutoMovieCapturePlanRequest(new URLSearchParams(text.startsWith("?") ? text.slice(1) : text));
@@ -1 +1 @@
1
- {"version":3,"file":"readAutoMovieInspectorAddress.mjs","names":[],"sources":["../../src/inspector/readAutoMovieInspectorAddress.ts"],"sourcesContent":["import type { IAutoMovieCapturePlanRequest } from \"@automovie/interface\";\nimport { parseAutoMovieCapturePlanRequest } from \"@automovie/render\";\n\n/**\n * Read the request an address names: its query text, with or without the leading `?`, through the capture plan grammar.\n *\n * 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.\n *\n * It throws the grammar's `Error`, which names the key, for an unknown key, a key given twice or a value the grammar refuses.\n *\n * ```ts\n * const request = readAutoMovieInspectorAddress(location.search);\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the accepted text, how it is decoded, what empty text gives and what a refusal names.\n * @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.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Strip one `?`, decode, read.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal reaches the caller; nothing falls back to a default request here.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the text.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one text.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh request and keeps nothing.\n */\nexport function readAutoMovieInspectorAddress(\n text: string,\n): IAutoMovieCapturePlanRequest {\n return parseAutoMovieCapturePlanRequest(\n new URLSearchParams(text.startsWith(\"?\") ? text.slice(1) : text),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,8BACd,MAC8B;CAC9B,OAAO,iCACL,IAAI,gBAAgB,KAAK,WAAW,GAAG,IAAI,KAAK,MAAM,CAAC,IAAI,IAAI,CACjE;AACF"}
1
+ {"version":3,"file":"readAutoMovieInspectorAddress.mjs","names":[],"sources":["../../src/inspector/readAutoMovieInspectorAddress.ts"],"sourcesContent":["import type { IAutoMovieCapturePlanRequest } from \"@automovie/interface\";\nimport { parseAutoMovieCapturePlanRequest } from \"@automovie/render\";\n\n/**\n * Read the request an address names: its query text, with or without the\n * leading `?`, through the capture plan grammar.\n *\n * The text is decoded by `URLSearchParams`, so `+` reads as a space and percent\n * escapes as their characters, and the parameters go to\n * `parseAutoMovieCapturePlanRequest` as they are. The empty text is the request\n * that asks for nothing.\n *\n * It throws the grammar's `Error`, which names the key, for an unknown key, a\n * key given twice or a value the grammar refuses.\n *\n * ```ts\n * const request = readAutoMovieInspectorAddress(location.search);\n * ```\n */\nexport function readAutoMovieInspectorAddress(\n text: string,\n): IAutoMovieCapturePlanRequest {\n return parseAutoMovieCapturePlanRequest(\n new URLSearchParams(text.startsWith(\"?\") ? text.slice(1) : text),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAAgB,8BACd,MAC8B;CAC9B,OAAO,iCACL,IAAI,gBAAgB,KAAK,WAAW,GAAG,IAAI,KAAK,MAAM,CAAC,IAAI,IAAI,CACjE;AACF"}
@@ -0,0 +1,17 @@
1
+ import { type IAutoMovieDrawScene } from "@automovie/render";
2
+ import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
3
+ /**
4
+ * What the inspector learns from a subject placed at its first second: the
5
+ * paths of its scene and of the marks it supplies there, those marks, the kinds
6
+ * it declares, its own views and the viewer's named viewpoints, and its raster
7
+ * and clock.
8
+ *
9
+ * Paths are listed before any inspection adds its own objects to the scene, so
10
+ * the caller reads the facts before applying one.
11
+ */
12
+ export declare function readAutoMovieInspectorFacts(props: {
13
+ /** The created subject, placed at `seconds`. */
14
+ instance: IAutoMovieDrawScene;
15
+ /** The placed second. */
16
+ seconds: number;
17
+ }): IAutoMovieInspectorScene.IFacts;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readAutoMovieInspectorFacts = readAutoMovieInspectorFacts;
4
+ const render_1 = require("@automovie/render");
5
+ /**
6
+ * What the inspector learns from a subject placed at its first second: the
7
+ * paths of its scene and of the marks it supplies there, those marks, the kinds
8
+ * it declares, its own views and the viewer's named viewpoints, and its raster
9
+ * and clock.
10
+ *
11
+ * Paths are listed before any inspection adds its own objects to the scene, so
12
+ * the caller reads the facts before applying one.
13
+ */
14
+ function readAutoMovieInspectorFacts(props) {
15
+ const { instance } = props;
16
+ const marks = instance.marks?.(props.seconds) ?? [];
17
+ return {
18
+ paths: [
19
+ ...(0, render_1.listAutoMovieInspectionPaths)(instance.scene).map(({ path }) => path),
20
+ ...marks.map(({ path }) => path),
21
+ ],
22
+ marks,
23
+ markKinds: instance.markKinds ?? [],
24
+ views: [
25
+ ...Object.keys(instance.views ?? {}),
26
+ ...(0, render_1.autoMovieViewerNamedViewpoints)().map(({ id }) => id),
27
+ ],
28
+ width: instance.width,
29
+ height: instance.height,
30
+ durationSeconds: instance.durationSeconds,
31
+ fps: instance.fps,
32
+ };
33
+ }
34
+ //# sourceMappingURL=readAutoMovieInspectorFacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readAutoMovieInspectorFacts.js","sourceRoot":"","sources":["../../src/inspector/readAutoMovieInspectorFacts.ts"],"names":[],"mappings":";;;AAAA,8CAM2B;AAI3B;;;;;;;;GAQG;AACH,qCAA4C,KAM3C;IACC,MAAM,EAAE,QAAQ,EAAE,GAAiB,KAAK,CAAC;IACzC,MAAM,KAAK,GACT,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACxC,OAAO;QACL,KAAK,EAAE;YACL,GAAG,IAAA,qCAA4B,EAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CACjD,CAAC,EAAE,IAAI,EAAoB,EAAU,EAAE,CAAC,IAAI,CAC7C;YACD,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAoB,EAAU,EAAE,CAAC,IAAI,CAAC;SAC3D;QACD,KAAK;QACL,SAAS,EAAE,QAAQ,CAAC,SAAS,IAAI,EAAE;QACnC,KAAK,EAAE;YACL,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC;YACpC,GAAG,IAAA,uCAA8B,GAAE,CAAC,GAAG,CACrC,CAAC,EAAE,EAAE,EAA6B,EAAU,EAAE,CAAC,EAAE,CAClD;SACF;QACD,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,eAAe,EAAE,QAAQ,CAAC,eAAe;QACzC,GAAG,EAAE,QAAQ,CAAC,GAAG;KAClB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { autoMovieViewerNamedViewpoints, listAutoMovieInspectionPaths } from "@automovie/render";
2
+ // src/inspector/readAutoMovieInspectorFacts.ts
3
+ /**
4
+ * What the inspector learns from a subject placed at its first second: the
5
+ * paths of its scene and of the marks it supplies there, those marks, the kinds
6
+ * it declares, its own views and the viewer's named viewpoints, and its raster
7
+ * and clock.
8
+ *
9
+ * Paths are listed before any inspection adds its own objects to the scene, so
10
+ * the caller reads the facts before applying one.
11
+ */
12
+ function readAutoMovieInspectorFacts(props) {
13
+ const { instance } = props;
14
+ const marks = instance.marks?.(props.seconds) ?? [];
15
+ return {
16
+ paths: [...listAutoMovieInspectionPaths(instance.scene).map(({ path }) => path), ...marks.map(({ path }) => path)],
17
+ marks,
18
+ markKinds: instance.markKinds ?? [],
19
+ views: [...Object.keys(instance.views ?? {}), ...autoMovieViewerNamedViewpoints().map(({ id }) => id)],
20
+ width: instance.width,
21
+ height: instance.height,
22
+ durationSeconds: instance.durationSeconds,
23
+ fps: instance.fps
24
+ };
25
+ }
26
+ export { readAutoMovieInspectorFacts };
27
+
28
+ //# sourceMappingURL=readAutoMovieInspectorFacts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readAutoMovieInspectorFacts.mjs","names":[],"sources":["../../src/inspector/readAutoMovieInspectorFacts.ts"],"sourcesContent":["import {\n type IApplyAutoMovieInspectionProps,\n type IAutoMovieDrawScene,\n type IAutoMovieViewerViewpoint,\n autoMovieViewerNamedViewpoints,\n listAutoMovieInspectionPaths,\n} from \"@automovie/render\";\n\nimport type { IAutoMovieInspectorScene } from \"./IAutoMovieInspectorScene.js\";\n\n/**\n * What the inspector learns from a subject placed at its first second: the\n * paths of its scene and of the marks it supplies there, those marks, the kinds\n * it declares, its own views and the viewer's named viewpoints, and its raster\n * and clock.\n *\n * Paths are listed before any inspection adds its own objects to the scene, so\n * the caller reads the facts before applying one.\n */\nexport function readAutoMovieInspectorFacts(props: {\n /** The created subject, placed at `seconds`. */\n instance: IAutoMovieDrawScene;\n\n /** The placed second. */\n seconds: number;\n}): IAutoMovieInspectorScene.IFacts {\n const { instance }: typeof props = props;\n const marks: NonNullable<IApplyAutoMovieInspectionProps[\"marks\"]> =\n instance.marks?.(props.seconds) ?? [];\n return {\n paths: [\n ...listAutoMovieInspectionPaths(instance.scene).map(\n ({ path }: { path: string }): string => path,\n ),\n ...marks.map(({ path }: { path: string }): string => path),\n ],\n marks,\n markKinds: instance.markKinds ?? [],\n views: [\n ...Object.keys(instance.views ?? {}),\n ...autoMovieViewerNamedViewpoints().map(\n ({ id }: IAutoMovieViewerViewpoint): string => id,\n ),\n ],\n width: instance.width,\n height: instance.height,\n durationSeconds: instance.durationSeconds,\n fps: instance.fps,\n };\n}\n"],"mappings":";;;;;;;;;;;AAmBA,SAAgB,4BAA4B,OAMR;CAClC,MAAM,EAAE,aAA2B;CACnC,MAAM,QACJ,SAAS,QAAQ,MAAM,OAAO,KAAK,CAAC;CACtC,OAAO;EACL,OAAO,CACL,GAAG,6BAA6B,SAAS,KAAK,CAAC,CAAC,KAC7C,EAAE,WAAqC,IAC1C,GACA,GAAG,MAAM,KAAK,EAAE,WAAqC,IAAI,CAC3D;EACA;EACA,WAAW,SAAS,aAAa,CAAC;EAClC,OAAO,CACL,GAAG,OAAO,KAAK,SAAS,SAAS,CAAC,CAAC,GACnC,GAAG,+BAA+B,CAAC,CAAC,KACjC,EAAE,SAA4C,EACjD,CACF;EACA,OAAO,SAAS;EAChB,QAAQ,SAAS;EACjB,iBAAiB,SAAS;EAC1B,KAAK,SAAS;CAChB;AACF"}
@@ -0,0 +1,9 @@
1
+ import type { IAutoMovieDrawScene } from "@automovie/render";
2
+ /**
3
+ * Whether a subject reads its placed scene before each picture, so the
4
+ * inspector must lift an inspection that changes the scene around the seek: a
5
+ * subject that observes its placed scene (`inspectPlaced`), or one whose
6
+ * render-target work (`beforeDraw`), such as surface feeds, draws the scene
7
+ * with its own materials.
8
+ */
9
+ export declare function readsAutoMovieInspectorPlacedScene(instance: Pick<IAutoMovieDrawScene, "inspectPlaced" | "beforeDraw">): boolean;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readsAutoMovieInspectorPlacedScene = readsAutoMovieInspectorPlacedScene;
4
+ /**
5
+ * Whether a subject reads its placed scene before each picture, so the
6
+ * inspector must lift an inspection that changes the scene around the seek: a
7
+ * subject that observes its placed scene (`inspectPlaced`), or one whose
8
+ * render-target work (`beforeDraw`), such as surface feeds, draws the scene
9
+ * with its own materials.
10
+ */
11
+ function readsAutoMovieInspectorPlacedScene(instance) {
12
+ return (instance.inspectPlaced !== undefined || instance.beforeDraw !== undefined);
13
+ }
14
+ //# sourceMappingURL=readsAutoMovieInspectorPlacedScene.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readsAutoMovieInspectorPlacedScene.js","sourceRoot":"","sources":["../../src/inspector/readsAutoMovieInspectorPlacedScene.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,4CACE,QAAmE;IAEnE,OAAO,CACL,QAAQ,CAAC,aAAa,KAAK,SAAS,IAAI,QAAQ,CAAC,UAAU,KAAK,SAAS,CAC1E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ // src/inspector/readsAutoMovieInspectorPlacedScene.ts
2
+ /**
3
+ * Whether a subject reads its placed scene before each picture, so the
4
+ * inspector must lift an inspection that changes the scene around the seek: a
5
+ * subject that observes its placed scene (`inspectPlaced`), or one whose
6
+ * render-target work (`beforeDraw`), such as surface feeds, draws the scene
7
+ * with its own materials.
8
+ */
9
+ function readsAutoMovieInspectorPlacedScene(instance) {
10
+ return instance.inspectPlaced !== void 0 || instance.beforeDraw !== void 0;
11
+ }
12
+ export { readsAutoMovieInspectorPlacedScene };
13
+
14
+ //# sourceMappingURL=readsAutoMovieInspectorPlacedScene.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readsAutoMovieInspectorPlacedScene.mjs","names":[],"sources":["../../src/inspector/readsAutoMovieInspectorPlacedScene.ts"],"sourcesContent":["import type { IAutoMovieDrawScene } from \"@automovie/render\";\n\n/**\n * Whether a subject reads its placed scene before each picture, so the\n * inspector must lift an inspection that changes the scene around the seek: a\n * subject that observes its placed scene (`inspectPlaced`), or one whose\n * render-target work (`beforeDraw`), such as surface feeds, draws the scene\n * with its own materials.\n */\nexport function readsAutoMovieInspectorPlacedScene(\n instance: Pick<IAutoMovieDrawScene, \"inspectPlaced\" | \"beforeDraw\">,\n): boolean {\n return (\n instance.inspectPlaced !== undefined || instance.beforeDraw !== undefined\n );\n}\n"],"mappings":";;;;;;;;AASA,SAAgB,mCACd,UACS;CACT,OACE,SAAS,kBAAkB,KAAA,KAAa,SAAS,eAAe,KAAA;AAEpE"}
@@ -3,16 +3,16 @@ import type { IAutoMovieInspectorState } from "./IAutoMovieInspectorState.js";
3
3
  /**
4
4
  * Apply one edit to the inspector's request, the only way its request changes.
5
5
  *
6
- * 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.
6
+ * The request is written as named text values by
7
+ * `formatAutoMovieCapturePlanRequest`, the action changes the text of the key
8
+ * or keys the `IAutoMovieInspectorAction` table names, and the values are read
9
+ * back by `parseAutoMovieCapturePlanRequest`. The result has the request read
10
+ * and no error. When the reader refuses, the result keeps the previous request
11
+ * beside the reader's message, which names the key, so a mistyped address or a
12
+ * refused value never replaces the picture.
7
13
  *
8
- * 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.
9
- *
10
- * @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.
11
- * @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.
12
- * @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.
13
- * @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.
14
- * @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.
15
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one state and one action.
16
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh state and keeps nothing.
14
+ * A `text` action replaces every key with the address text's; a `restore`
15
+ * action sets the scene's request and reason without reading anything. An edit
16
+ * that leaves the text unchanged returns an equal request.
17
17
  */
18
18
  export declare function reduceAutoMovieInspectorState(state: IAutoMovieInspectorState, action: IAutoMovieInspectorAction): IAutoMovieInspectorState;
@@ -13,17 +13,17 @@ const LISTS = {
13
13
  /**
14
14
  * Apply one edit to the inspector's request, the only way its request changes.
15
15
  *
16
- * 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.
16
+ * The request is written as named text values by
17
+ * `formatAutoMovieCapturePlanRequest`, the action changes the text of the key
18
+ * or keys the `IAutoMovieInspectorAction` table names, and the values are read
19
+ * back by `parseAutoMovieCapturePlanRequest`. The result has the request read
20
+ * and no error. When the reader refuses, the result keeps the previous request
21
+ * beside the reader's message, which names the key, so a mistyped address or a
22
+ * refused value never replaces the picture.
17
23
  *
18
- * 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.
19
- *
20
- * @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.
21
- * @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.
22
- * @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.
23
- * @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.
24
- * @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.
25
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one state and one action.
26
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh state and keeps nothing.
24
+ * A `text` action replaces every key with the address text's; a `restore`
25
+ * action sets the scene's request and reason without reading anything. An edit
26
+ * that leaves the text unchanged returns an equal request.
27
27
  */
28
28
  function reduceAutoMovieInspectorState(state, action) {
29
29
  if (action.type === "restore")
@@ -64,10 +64,13 @@ function reduceAutoMovieInspectorState(state, action) {
64
64
  values.set("views", action.view);
65
65
  break;
66
66
  case "time":
67
+ case "locate":
67
68
  // `at` excludes an even sampling, so its keys go.
68
69
  for (const key of ["from", "to", "rate"])
69
70
  values.delete(key);
70
71
  values.set("at", String(action.seconds));
72
+ if (action.type === "locate")
73
+ edit(values, "label", () => [...action.label]);
71
74
  break;
72
75
  case "subject":
73
76
  if (action.name === null)
@@ -78,7 +81,10 @@ function reduceAutoMovieInspectorState(state, action) {
78
81
  }
79
82
  return read(state, () => (0, render_1.parseAutoMovieCapturePlanRequest)(values));
80
83
  }
81
- /** The state a reading gives: its request, or the previous request with the refusal. */
84
+ /**
85
+ * The state a reading gives: its request, or the previous request with the
86
+ * refusal.
87
+ */
82
88
  function read(state, reading) {
83
89
  try {
84
90
  return { request: reading(), error: null };
@@ -1 +1 @@
1
- {"version":3,"file":"reduceAutoMovieInspectorState.js","sourceRoot":"","sources":["../../src/inspector/reduceAutoMovieInspectorState.ts"],"names":[],"mappings":";;;AACA,8CAG2B;AAI3B,yFAAmF;AAEnF,iCAAiC;AACjC,MAAM,KAAK,GAA8D;IACvE,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAA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T,KAAK,EACL,GAAiC,EAAE,CACjC,IAAA,yCAAgC,EAAC,MAAM,CAAC,CAC3C,CAAC;AACJ,CAAC;AAED,wFAAwF;AACxF,SAAS,IAAI,CACX,KAA+B,EAC/B,OAA2C;IAE3C,IAAI,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,sEAAsE;AACtE,SAAS,IAAI,CACX,MAA2B,EAC3B,GAAW,EACX,MAAqC;IAErC,MAAM,KAAK,GAAa,MAAM,CAC5B,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACpB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1C,MAAM,CAAC,CAAC,IAAY,EAAW,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAClD,CAAC;IACF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;QACtC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACxC,CAAC"}
1
+ {"version":3,"file":"reduceAutoMovieInspectorState.js","sourceRoot":"","sources":["../../src/inspector/reduceAutoMovieInspectorState.ts"],"names":[],"mappings":";;;AACA,8CAG2B;AAI3B,yFAAmF;AAEnF,iCAAiC;AACjC,MAAM,KAAK,GAA8D;IACvE,MAAM,EAAE,OAAO;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C"}
@@ -11,17 +11,17 @@ const LISTS = {
11
11
  /**
12
12
  * Apply one edit to the inspector's request, the only way its request changes.
13
13
  *
14
- * 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.
14
+ * The request is written as named text values by
15
+ * `formatAutoMovieCapturePlanRequest`, the action changes the text of the key
16
+ * or keys the `IAutoMovieInspectorAction` table names, and the values are read
17
+ * back by `parseAutoMovieCapturePlanRequest`. The result has the request read
18
+ * and no error. When the reader refuses, the result keeps the previous request
19
+ * beside the reader's message, which names the key, so a mistyped address or a
20
+ * refused value never replaces the picture.
15
21
  *
16
- * 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.
17
- *
18
- * @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.
19
- * @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.
20
- * @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.
21
- * @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.
22
- * @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.
23
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one state and one action.
24
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh state and keeps nothing.
22
+ * A `text` action replaces every key with the address text's; a `restore`
23
+ * action sets the scene's request and reason without reading anything. An edit
24
+ * that leaves the text unchanged returns an equal request.
25
25
  */
26
26
  function reduceAutoMovieInspectorState(state, action) {
27
27
  if (action.type === "restore") return {
@@ -51,19 +51,24 @@ function reduceAutoMovieInspectorState(state, action) {
51
51
  values.set("views", action.view);
52
52
  break;
53
53
  case "time":
54
+ case "locate":
54
55
  for (const key of [
55
56
  "from",
56
57
  "to",
57
58
  "rate"
58
59
  ]) values.delete(key);
59
60
  values.set("at", String(action.seconds));
61
+ if (action.type === "locate") edit(values, "label", () => [...action.label]);
60
62
  break;
61
63
  case "subject": if (action.name === null) values.delete("subject");
62
64
  else values.set("subject", action.name);
63
65
  }
64
66
  return read(state, () => parseAutoMovieCapturePlanRequest(values));
65
67
  }
66
- /** The state a reading gives: its request, or the previous request with the refusal. */
68
+ /**
69
+ * The state a reading gives: its request, or the previous request with the
70
+ * refusal.
71
+ */
67
72
  function read(state, reading) {
68
73
  try {
69
74
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"reduceAutoMovieInspectorState.mjs","names":[],"sources":["../../src/inspector/reduceAutoMovieInspectorState.ts"],"sourcesContent":["import type { IAutoMovieCapturePlanRequest } from \"@automovie/interface\";\nimport {\n formatAutoMovieCapturePlanRequest,\n parseAutoMovieCapturePlanRequest,\n} from \"@automovie/render\";\n\nimport type { IAutoMovieInspectorAction } from \"./IAutoMovieInspectorAction.js\";\nimport type { IAutoMovieInspectorState } from \"./IAutoMovieInspectorState.js\";\nimport { readAutoMovieInspectorAddress } from \"./readAutoMovieInspectorAddress.js\";\n\n/** The key each toggle edits. */\nconst LISTS: Record<IAutoMovieInspectorAction.IToggle[\"type\"], string> = {\n select: \"parts\",\n hide: \"hide\",\n label: \"label\",\n marks: \"marks\",\n};\n\n/**\n * Apply one edit to the inspector's request, the only way its request changes.\n *\n * 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.\n *\n * 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.\n *\n * @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.\n * @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.\n * @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.\n * @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.\n * @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.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one state and one action.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh state and keeps nothing.\n */\nexport function reduceAutoMovieInspectorState(\n state: IAutoMovieInspectorState,\n action: IAutoMovieInspectorAction,\n): IAutoMovieInspectorState {\n if (action.type === \"restore\")\n return { request: action.request, error: action.error };\n if (action.type === \"text\")\n return read(\n state,\n (): IAutoMovieCapturePlanRequest =>\n readAutoMovieInspectorAddress(action.text),\n );\n\n // Every other edit changes the text of the keys it names.\n const values: Map<string, string> = new Map<string, string>(\n formatAutoMovieCapturePlanRequest(state.request),\n );\n switch (action.type) {\n case \"select\":\n case \"hide\":\n case \"label\":\n case \"marks\":\n edit(values, LISTS[action.type], (items: string[]): string[] =>\n action.on\n ? items.includes(action.pattern)\n ? items\n : [...items, action.pattern]\n : items.filter((item: string): boolean => item !== action.pattern),\n );\n break;\n case \"color\":\n edit(values, \"color\", (items: string[]): string[] => [\n ...items.filter(\n (item: string): boolean => !item.startsWith(`${action.pattern}=`),\n ),\n ...(action.color === null\n ? []\n : [\n `${action.pattern}=${action.color.toString(16).padStart(6, \"0\")}`,\n ]),\n ]);\n break;\n case \"shade\":\n values.delete(\"passes\");\n values.set(\"shade\", action.shade);\n break;\n case \"switch\":\n values.set(action.key, action.on ? \"1\" : \"0\");\n break;\n case \"view\":\n values.set(\"views\", action.view);\n break;\n case \"time\":\n // `at` excludes an even sampling, so its keys go.\n for (const key of [\"from\", \"to\", \"rate\"]) values.delete(key);\n values.set(\"at\", String(action.seconds));\n break;\n case \"subject\":\n if (action.name === null) values.delete(\"subject\");\n else values.set(\"subject\", action.name);\n break;\n }\n return read(\n state,\n (): IAutoMovieCapturePlanRequest =>\n parseAutoMovieCapturePlanRequest(values),\n );\n}\n\n/** The state a reading gives: its request, or the previous request with the refusal. */\nfunction read(\n state: IAutoMovieInspectorState,\n reading: () => IAutoMovieCapturePlanRequest,\n): IAutoMovieInspectorState {\n try {\n return { request: reading(), error: null };\n } catch (error) {\n return {\n request: state.request,\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\n/** Rewrite one comma-separated key; an empty list removes the key. */\nfunction edit(\n values: Map<string, string>,\n key: string,\n change: (items: string[]) => string[],\n): void {\n const items: string[] = change(\n (values.get(key) ?? \"\")\n .split(\",\")\n .map((item: string): string => item.trim())\n .filter((item: string): boolean => item !== \"\"),\n );\n if (items.length === 0) values.delete(key);\n else values.set(key, items.join(\",\"));\n}\n"],"mappings":";;;;AAWA,MAAM,QAAmE;CACvE,QAAQ;CACR,MAAM;CACN,OAAO;CACP,OAAO;AACT;;;;;;;;;;;;;;;;AAiBA,SAAgB,8BACd,OACA,QAC0B;CAC1B,IAAI,OAAO,SAAS,WAClB,OAAO;EAAE,SAAS,OAAO;EAAS,OAAO,OAAO;CAAM;CACxD,IAAI,OAAO,SAAS,QAClB,OAAO,KACL,aAEE,8BAA8B,OAAO,IAAI,CAC7C;CAGF,MAAM,SAA8B,IAAI,IACtC,kCAAkC,MAAM,OAAO,CACjD;CACA,QAAQ,OAAO,MAAf;E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,QACrB,OAAO,IAAI,GAAG,KAAK,GAAA,CACjB,MAAM,GAAG,CAAC,CACV,KAAK,SAAyB,KAAK,KAAK,CAAC,CAAC,CAC1C,QAAQ,SAA0B,SAAS,EAAE,CAClD;CACA,IAAI,MAAM,WAAW,GAAG,OAAO,OAAO,GAAG;MACpC,OAAO,IAAI,KAAK,MAAM,KAAK,GAAG,CAAC;AACtC"}
1
+ {"version":3,"file":"reduceAutoMovieInspectorState.mjs","names":[],"sources":["../../src/inspector/reduceAutoMovieInspectorState.ts"],"sourcesContent":["import type { IAutoMovieCapturePlanRequest } from \"@automovie/interface\";\nimport {\n formatAutoMovieCapturePlanRequest,\n parseAutoMovieCapturePlanRequest,\n} from \"@automovie/render\";\n\nimport type { IAutoMovieInspectorAction } from \"./IAutoMovieInspectorAction.js\";\nimport type { IAutoMovieInspectorState } from \"./IAutoMovieInspectorState.js\";\nimport { readAutoMovieInspectorAddress } from \"./readAutoMovieInspectorAddress.js\";\n\n/** The key each toggle edits. */\nconst LISTS: Record<IAutoMovieInspectorAction.IToggle[\"type\"], string> = {\n select: \"parts\",\n hide: \"hide\",\n label: \"label\",\n marks: \"marks\",\n};\n\n/**\n * Apply one edit to the inspector's request, the only way its request changes.\n *\n * The request is written as named text values by\n * `formatAutoMovieCapturePlanRequest`, the action changes the text of the key\n * or keys the `IAutoMovieInspectorAction` table names, and the values are read\n * back by `parseAutoMovieCapturePlanRequest`. The result has the request read\n * and no error. When the reader refuses, the result keeps the previous request\n * beside the reader's message, which names the key, so a mistyped address or a\n * refused value never replaces the picture.\n *\n * A `text` action replaces every key with the address text's; a `restore`\n * action sets the scene's request and reason without reading anything. An edit\n * that leaves the text unchanged returns an equal request.\n */\nexport function reduceAutoMovieInspectorState(\n state: IAutoMovieInspectorState,\n action: IAutoMovieInspectorAction,\n): IAutoMovieInspectorState {\n if (action.type === \"restore\")\n return { request: action.request, error: action.error };\n if (action.type === \"text\")\n return read(\n state,\n (): IAutoMovieCapturePlanRequest =>\n readAutoMovieInspectorAddress(action.text),\n );\n\n // Every other edit changes the text of the keys it names.\n const values: Map<string, string> = new Map<string, string>(\n formatAutoMovieCapturePlanRequest(state.request),\n );\n switch (action.type) {\n case \"select\":\n case \"hide\":\n case \"label\":\n case \"marks\":\n edit(values, LISTS[action.type], (items: string[]): string[] =>\n action.on\n ? items.includes(action.pattern)\n ? items\n : [...items, action.pattern]\n : items.filter((item: string): boolean => item !== action.pattern),\n );\n break;\n case \"color\":\n edit(values, \"color\", (items: string[]): string[] => [\n ...items.filter(\n (item: string): boolean => !item.startsWith(`${action.pattern}=`),\n ),\n ...(action.color === null\n ? []\n : [\n `${action.pattern}=${action.color.toString(16).padStart(6, \"0\")}`,\n ]),\n ]);\n break;\n case \"shade\":\n values.delete(\"passes\");\n values.set(\"shade\", action.shade);\n break;\n case \"switch\":\n values.set(action.key, action.on ? \"1\" : \"0\");\n break;\n case \"view\":\n values.set(\"views\", action.view);\n break;\n case \"time\":\n case \"locate\":\n // `at` excludes an even sampling, so its keys go.\n for (const key of [\"from\", \"to\", \"rate\"]) values.delete(key);\n values.set(\"at\", String(action.seconds));\n if (action.type === \"locate\")\n edit(values, \"label\", (): string[] => [...action.label]);\n break;\n case \"subject\":\n if (action.name === null) values.delete(\"subject\");\n else values.set(\"subject\", action.name);\n break;\n }\n return read(\n state,\n (): IAutoMovieCapturePlanRequest =>\n parseAutoMovieCapturePlanRequest(values),\n );\n}\n\n/**\n * The state a reading gives: its request, or the previous request with the\n * refusal.\n */\nfunction read(\n state: IAutoMovieInspectorState,\n reading: () => IAutoMovieCapturePlanRequest,\n): IAutoMovieInspectorState {\n try {\n return { request: reading(), error: null };\n } catch (error) {\n return {\n request: state.request,\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\n/** Rewrite one comma-separated key; an empty list removes the key. */\nfunction edit(\n values: Map<string, string>,\n key: string,\n change: (items: string[]) => string[],\n): void {\n const items: string[] = change(\n (values.get(key) ?? \"\")\n .split(\",\")\n .map((item: string): string => item.trim())\n .filter((item: string): boolean => item !== \"\"),\n );\n if (items.length === 0) values.delete(key);\n else values.set(key, items.join(\",\"));\n}\n"],"mappings":";;;;AAWA,MAAM,QAAmE;CACvE,QAAQ;CACR,MAAM;CACN,OAAO;CACP,OAAO;AACT;;;;;;;;;;;;;;;;AAiBA,SAAgB,8BACd,OACA,QAC0B;CAC1B,IAAI,OAAO,SAAS,WAClB,OAAO;EAAE,SAAS,OAAO;EAAS,OAAO,OAAO;CAAM;CACxD,IAAI,OAAO,SAAS,QAClB,OAAO,KACL,aAEE,8BAA8B,OAAO,IAAI,CAC7C;CAGF,MAAM,SAA8B,IAAI,IACtC,kCAAkC,MAAM,OAAO,CACjD;CACA,QAAQ,OAAO,MAAf;EACE,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;GACH,KAAK,QAAQ,MAAM,OAAO,QAAQ,UAChC,OAAO,KACH,MAAM,SAAS,OAAO,OAAO,IAC3B,QACA,CAAC,GAAG,OAAO,OAAO,OAAO,IAC3B,MAAM,QAAQ,SAA0B,SAAS,OAAO,OAAO,CACrE;GACA;EACF,KAAK;GACH,KAAK,QAAQ,UAAU,UAA8B,CACnD,GAAG,MAAM,QACN,SAA0B,CAAC,KAAK,WAAW,GAAG,OAAO,QAAQ,EAAE,CAClE,GACA,GAAI,OAAO,UAAU,OACjB,CAAC,IACD,CACE,GAAG,OAAO,QAAQ,GAAG,OAAO,MAAM,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,GAChE,CACN,CAAC;GACD;EACF,KAAK;GACH,OAAO,OAAO,QAAQ;GACtB,OAAO,IAAI,SAAS,OAAO,KAAK;GAChC;EACF,KAAK;GACH,OAAO,IAAI,OAAO,KAAK,OAAO,KAAK,MAAM,GAAG;GAC5C;EACF,KAAK;GACH,OAAO,IAAI,SAAS,OAAO,IAAI;GAC/B;EACF,KAAK;EACL,KAAK;GAEH,KAAK,MAAM,OAAO;IAAC;IAAQ;IAAM;GAAM,GAAG,OAAO,OAAO,GAAG;GAC3D,OAAO,IAAI,MAAM,OAAO,OAAO,OAAO,CAAC;GACvC,IAAI,OAAO,SAAS,UAClB,KAAK,QAAQ,eAAyB,CAAC,GAAG,OAAO,KAAK,CAAC;GACzD;EACF,KAAK,WACH,IAAI,OAAO,SAAS,MAAM,OAAO,OAAO,SAAS;OAC5C,OAAO,IAAI,WAAW,OAAO,IAAI;CAE1C;CACA,OAAO,KACL,aAEE,iCAAiC,MAAM,CAC3C;AACF;;;;;AAMA,SAAS,KACP,OACA,SAC0B;CAC1B,IAAI;EACF,OAAO;GAAE,SAAS,QAAQ;GAAG,OAAO;EAAK;CAC3C,SAAS,OAAO;EACd,OAAO;GACL,SAAS,MAAM;GACf,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EAC9D;CACF;AACF;;AAGA,SAAS,KACP,QACA,KACA,QACM;CACN,MAAM,QAAkB,QACrB,OAAO,IAAI,GAAG,KAAK,GAAA,CACjB,MAAM,GAAG,CAAC,CACV,KAAK,SAAyB,KAAK,KAAK,CAAC,CAAC,CAC1C,QAAQ,SAA0B,SAAS,EAAE,CAClD;CACA,IAAI,MAAM,WAAW,GAAG,OAAO,OAAO,GAAG;MACpC,OAAO,IAAI,KAAK,MAAM,KAAK,GAAG,CAAC;AACtC"}
@@ -0,0 +1,6 @@
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 declare function releaseAutoMovieInspectorSteps(steps: readonly (() => void)[]): void;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.releaseAutoMovieInspectorSteps = releaseAutoMovieInspectorSteps;
4
+ /**
5
+ * Run every release step of an inspector mount in order, then throw every
6
+ * failure together: the one failure as it was, several as one `AggregateError`,
7
+ * so a failed step never keeps a later resource alive.
8
+ */
9
+ function releaseAutoMovieInspectorSteps(steps) {
10
+ const failures = [];
11
+ for (const step of steps)
12
+ try {
13
+ step();
14
+ }
15
+ catch (error) {
16
+ failures.push(error);
17
+ }
18
+ if (failures.length === 1)
19
+ throw failures[0];
20
+ if (failures.length > 1)
21
+ throw new AggregateError(failures, "The inspector mount failed to release");
22
+ }
23
+ //# sourceMappingURL=releaseAutoMovieInspectorSteps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releaseAutoMovieInspectorSteps.js","sourceRoot":"","sources":["../../src/inspector/releaseAutoMovieInspectorSteps.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,wCACE,KAA8B;IAE9B,MAAM,QAAQ,GAAc,EAAE,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,KAAK;QACtB,IAAI,CAAC;YACH,IAAI,EAAE,CAAC;QACT,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QACrB,MAAM,IAAI,cAAc,CAAC,QAAQ,EAAE,uCAAuC,CAAC,CAAC;AAChF,CAAC"}