canvas-recorder-lib 0.5.0 → 0.7.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 (347) hide show
  1. package/BREAKING-CHANGES.md +24 -0
  2. package/README.md +131 -25
  3. package/dev/audio-builder.ts +69 -161
  4. package/dev/canvas-recorder.css +59 -0
  5. package/dev/canvas-recorder.ts +1006 -212
  6. package/dev/delay-files.ts +1 -1
  7. package/dev/font-utils.ts +8 -1
  8. package/dev/format-editor.ts +734 -0
  9. package/dev/format-string.ts +110 -0
  10. package/dev/local-file-row.ts +107 -0
  11. package/dev/multi-text-dialog.ts +360 -0
  12. package/dev/multi-text-panel.ts +11 -0
  13. package/dev/player-body.ts +94 -6
  14. package/dev/rect-snap.ts +9 -9
  15. package/dev/slide-panel.ts +1 -1
  16. package/dev/sound-clips.ts +3 -2
  17. package/dev/soundtrack.ts +434 -0
  18. package/dev/split-dialog.ts +13 -2
  19. package/dev/static-image-panel.ts +35 -5
  20. package/dev/timeline-display.ts +50 -5
  21. package/dev/transcripts.ts +5 -3
  22. package/dev/video-clip-panel.ts +202 -16
  23. package/dev/voice/chirp.ts +129 -0
  24. package/dev/voice/folder.ts +84 -0
  25. package/dev/voice/voice-panel.ts +513 -0
  26. package/dev/voice/voice-recorder.ts +603 -0
  27. package/dist/dev/audio-builder.d.ts +14 -31
  28. package/dist/dev/audio-builder.d.ts.map +1 -1
  29. package/dist/dev/audio-builder.js +62 -134
  30. package/dist/dev/audio-builder.js.map +1 -1
  31. package/dist/dev/canvas-recorder.css +59 -0
  32. package/dist/dev/canvas-recorder.js +926 -198
  33. package/dist/dev/canvas-recorder.js.map +1 -1
  34. package/dist/dev/delay-files.js +1 -1
  35. package/dist/dev/delay-files.js.map +1 -1
  36. package/dist/dev/font-utils.d.ts.map +1 -1
  37. package/dist/dev/font-utils.js +9 -1
  38. package/dist/dev/font-utils.js.map +1 -1
  39. package/dist/dev/format-editor.d.ts +75 -0
  40. package/dist/dev/format-editor.d.ts.map +1 -0
  41. package/dist/dev/format-editor.js +642 -0
  42. package/dist/dev/format-editor.js.map +1 -0
  43. package/dist/dev/format-string.d.ts +62 -0
  44. package/dist/dev/format-string.d.ts.map +1 -0
  45. package/dist/dev/format-string.js +86 -0
  46. package/dist/dev/format-string.js.map +1 -0
  47. package/dist/dev/local-file-row.d.ts +22 -0
  48. package/dist/dev/local-file-row.d.ts.map +1 -0
  49. package/dist/dev/local-file-row.js +84 -0
  50. package/dist/dev/local-file-row.js.map +1 -0
  51. package/dist/dev/multi-text-dialog.d.ts +30 -0
  52. package/dist/dev/multi-text-dialog.d.ts.map +1 -0
  53. package/dist/dev/multi-text-dialog.js +297 -0
  54. package/dist/dev/multi-text-dialog.js.map +1 -0
  55. package/dist/dev/multi-text-panel.d.ts +2 -0
  56. package/dist/dev/multi-text-panel.d.ts.map +1 -1
  57. package/dist/dev/multi-text-panel.js +4 -0
  58. package/dist/dev/multi-text-panel.js.map +1 -1
  59. package/dist/dev/player-body.d.ts +1 -1
  60. package/dist/dev/player-body.d.ts.map +1 -1
  61. package/dist/dev/player-body.js +94 -6
  62. package/dist/dev/player-body.js.map +1 -1
  63. package/dist/dev/rect-snap.d.ts +1 -1
  64. package/dist/dev/rect-snap.js +7 -7
  65. package/dist/dev/rect-snap.js.map +1 -1
  66. package/dist/dev/slide-panel.d.ts +1 -1
  67. package/dist/dev/slide-panel.d.ts.map +1 -1
  68. package/dist/dev/slide-panel.js +1 -1
  69. package/dist/dev/slide-panel.js.map +1 -1
  70. package/dist/dev/sound-clips.d.ts +3 -2
  71. package/dist/dev/sound-clips.d.ts.map +1 -1
  72. package/dist/dev/sound-clips.js +3 -2
  73. package/dist/dev/sound-clips.js.map +1 -1
  74. package/dist/dev/soundtrack.d.ts +115 -0
  75. package/dist/dev/soundtrack.d.ts.map +1 -0
  76. package/dist/dev/soundtrack.js +369 -0
  77. package/dist/dev/soundtrack.js.map +1 -0
  78. package/dist/dev/split-dialog.d.ts.map +1 -1
  79. package/dist/dev/split-dialog.js +14 -2
  80. package/dist/dev/split-dialog.js.map +1 -1
  81. package/dist/dev/static-image-panel.d.ts +2 -0
  82. package/dist/dev/static-image-panel.d.ts.map +1 -1
  83. package/dist/dev/static-image-panel.js +29 -5
  84. package/dist/dev/static-image-panel.js.map +1 -1
  85. package/dist/dev/timeline-display.d.ts +23 -2
  86. package/dist/dev/timeline-display.d.ts.map +1 -1
  87. package/dist/dev/timeline-display.js +47 -5
  88. package/dist/dev/timeline-display.js.map +1 -1
  89. package/dist/dev/transcripts.d.ts.map +1 -1
  90. package/dist/dev/transcripts.js +5 -3
  91. package/dist/dev/transcripts.js.map +1 -1
  92. package/dist/dev/video-clip-panel.d.ts +8 -0
  93. package/dist/dev/video-clip-panel.d.ts.map +1 -1
  94. package/dist/dev/video-clip-panel.js +176 -10
  95. package/dist/dev/video-clip-panel.js.map +1 -1
  96. package/dist/dev/voice/chirp.d.ts +27 -0
  97. package/dist/dev/voice/chirp.d.ts.map +1 -0
  98. package/dist/dev/voice/chirp.js +107 -0
  99. package/dist/dev/voice/chirp.js.map +1 -0
  100. package/dist/dev/voice/folder.d.ts +18 -0
  101. package/dist/dev/voice/folder.d.ts.map +1 -0
  102. package/dist/dev/voice/folder.js +68 -0
  103. package/dist/dev/voice/folder.js.map +1 -0
  104. package/dist/dev/voice/voice-panel.d.ts +44 -0
  105. package/dist/dev/voice/voice-panel.d.ts.map +1 -0
  106. package/dist/dev/voice/voice-panel.js +418 -0
  107. package/dist/dev/voice/voice-panel.js.map +1 -0
  108. package/dist/dev/voice/voice-recorder.d.ts +141 -0
  109. package/dist/dev/voice/voice-recorder.d.ts.map +1 -0
  110. package/dist/dev/voice/voice-recorder.js +506 -0
  111. package/dist/dev/voice/voice-recorder.js.map +1 -0
  112. package/dist/lib/index.d.ts +3 -0
  113. package/dist/lib/index.d.ts.map +1 -1
  114. package/dist/lib/index.js +3 -0
  115. package/dist/lib/index.js.map +1 -1
  116. package/dist/lib/main-control.d.ts +50 -4
  117. package/dist/lib/main-control.d.ts.map +1 -1
  118. package/dist/lib/main-control.js +94 -12
  119. package/dist/lib/main-control.js.map +1 -1
  120. package/dist/src/binary-search.js +1 -1
  121. package/dist/src/binary-search.js.map +1 -1
  122. package/dist/src/corner-rounder.d.ts +17 -0
  123. package/dist/src/corner-rounder.d.ts.map +1 -0
  124. package/dist/src/corner-rounder.js +89 -0
  125. package/dist/src/corner-rounder.js.map +1 -0
  126. package/dist/src/cross-fade.d.ts +1 -1
  127. package/dist/src/cross-fade.d.ts.map +1 -1
  128. package/dist/src/cross-fade.js +3 -3
  129. package/dist/src/cross-fade.js.map +1 -1
  130. package/dist/src/fancy-text.d.ts +116 -0
  131. package/dist/src/fancy-text.d.ts.map +1 -0
  132. package/dist/src/fancy-text.js +211 -0
  133. package/dist/src/fancy-text.js.map +1 -0
  134. package/dist/src/glib/letters-base.d.ts +1 -1
  135. package/dist/src/glib/letters-base.d.ts.map +1 -1
  136. package/dist/src/glib/letters-base.js +4 -3
  137. package/dist/src/glib/letters-base.js.map +1 -1
  138. package/dist/src/glib/line-font.d.ts +2 -2
  139. package/dist/src/glib/line-font.d.ts.map +1 -1
  140. package/dist/src/glib/line-font.js +2 -2
  141. package/dist/src/glib/line-font.js.map +1 -1
  142. package/dist/src/glib/paragraph-layout.d.ts +2 -2
  143. package/dist/src/glib/paragraph-layout.d.ts.map +1 -1
  144. package/dist/src/glib/paragraph-layout.js +1 -1
  145. package/dist/src/glib/paragraph-layout.js.map +1 -1
  146. package/dist/src/glib/path-shape-splitter.d.ts +1 -1
  147. package/dist/src/glib/path-shape-splitter.d.ts.map +1 -1
  148. package/dist/src/glib/path-shape-splitter.js +1 -1
  149. package/dist/src/glib/path-shape-splitter.js.map +1 -1
  150. package/dist/src/glib/path-shape.js +2 -2
  151. package/dist/src/glib/path-shape.js.map +1 -1
  152. package/dist/src/interpolate.d.ts +2 -2
  153. package/dist/src/interpolate.d.ts.map +1 -1
  154. package/dist/src/interpolate.js +1 -1
  155. package/dist/src/interpolate.js.map +1 -1
  156. package/dist/src/lattice.d.ts +1 -1
  157. package/dist/src/lattice.d.ts.map +1 -1
  158. package/dist/src/local-files.d.ts +129 -0
  159. package/dist/src/local-files.d.ts.map +1 -0
  160. package/dist/src/local-files.js +327 -0
  161. package/dist/src/local-files.js.map +1 -0
  162. package/dist/src/morph-animation.d.ts +1 -1
  163. package/dist/src/morph-animation.d.ts.map +1 -1
  164. package/dist/src/morph-animation.js +2 -2
  165. package/dist/src/morph-animation.js.map +1 -1
  166. package/dist/src/peano-fourier/fourier-shared.d.ts +1 -1
  167. package/dist/src/peano-fourier/fourier-shared.d.ts.map +1 -1
  168. package/dist/src/peano-fourier/fourier-shared.js +17 -4
  169. package/dist/src/peano-fourier/fourier-shared.js.map +1 -1
  170. package/dist/src/schedule-helper.d.ts +4 -4
  171. package/dist/src/schedule-helper.d.ts.map +1 -1
  172. package/dist/src/schedule-helper.js +2 -2
  173. package/dist/src/schedule-helper.js.map +1 -1
  174. package/dist/src/showable.d.ts +45 -4
  175. package/dist/src/showable.d.ts.map +1 -1
  176. package/dist/src/showable.js +37 -1
  177. package/dist/src/showable.js.map +1 -1
  178. package/dist/src/slide-components/arrow.d.ts +4 -4
  179. package/dist/src/slide-components/arrow.d.ts.map +1 -1
  180. package/dist/src/slide-components/arrow.js +2 -2
  181. package/dist/src/slide-components/arrow.js.map +1 -1
  182. package/dist/src/slide-components/cross-fade-transition.d.ts +3 -3
  183. package/dist/src/slide-components/cross-fade-transition.d.ts.map +1 -1
  184. package/dist/src/slide-components/cross-fade-transition.js +3 -3
  185. package/dist/src/slide-components/cross-fade-transition.js.map +1 -1
  186. package/dist/src/slide-components/duration-agnostic.d.ts +3 -3
  187. package/dist/src/slide-components/duration-agnostic.d.ts.map +1 -1
  188. package/dist/src/slide-components/duration-agnostic.js +1 -1
  189. package/dist/src/slide-components/duration-agnostic.js.map +1 -1
  190. package/dist/src/slide-components/fixed-duration.d.ts +1 -1
  191. package/dist/src/slide-components/fixed-duration.d.ts.map +1 -1
  192. package/dist/src/slide-components/fixed-duration.js +1 -1
  193. package/dist/src/slide-components/fixed-duration.js.map +1 -1
  194. package/dist/src/slide-components/fourier.d.ts +6 -6
  195. package/dist/src/slide-components/fourier.d.ts.map +1 -1
  196. package/dist/src/slide-components/fourier.js +6 -6
  197. package/dist/src/slide-components/fourier.js.map +1 -1
  198. package/dist/src/slide-components/frame-counter.d.ts +2 -2
  199. package/dist/src/slide-components/frame-counter.d.ts.map +1 -1
  200. package/dist/src/slide-components/frame-counter.js +1 -1
  201. package/dist/src/slide-components/frame-counter.js.map +1 -1
  202. package/dist/src/slide-components/function-graph.d.ts +2 -2
  203. package/dist/src/slide-components/function-graph.d.ts.map +1 -1
  204. package/dist/src/slide-components/function-graph.js +3 -3
  205. package/dist/src/slide-components/function-graph.js.map +1 -1
  206. package/dist/src/slide-components/halftone-shadow.d.ts +4 -4
  207. package/dist/src/slide-components/halftone-shadow.d.ts.map +1 -1
  208. package/dist/src/slide-components/halftone-shadow.js +2 -2
  209. package/dist/src/slide-components/halftone-shadow.js.map +1 -1
  210. package/dist/src/slide-components/handwriting-effect.d.ts +5 -5
  211. package/dist/src/slide-components/handwriting-effect.d.ts.map +1 -1
  212. package/dist/src/slide-components/handwriting-effect.js +5 -5
  213. package/dist/src/slide-components/handwriting-effect.js.map +1 -1
  214. package/dist/src/slide-components/hold.d.ts +3 -3
  215. package/dist/src/slide-components/hold.d.ts.map +1 -1
  216. package/dist/src/slide-components/hold.js +3 -3
  217. package/dist/src/slide-components/hold.js.map +1 -1
  218. package/dist/src/slide-components/image.d.ts +3 -3
  219. package/dist/src/slide-components/image.d.ts.map +1 -1
  220. package/dist/src/slide-components/image.js +3 -3
  221. package/dist/src/slide-components/image.js.map +1 -1
  222. package/dist/src/slide-components/in-parallel.d.ts +3 -3
  223. package/dist/src/slide-components/in-parallel.d.ts.map +1 -1
  224. package/dist/src/slide-components/in-parallel.js +2 -2
  225. package/dist/src/slide-components/in-parallel.js.map +1 -1
  226. package/dist/src/slide-components/in-series.d.ts +4 -4
  227. package/dist/src/slide-components/in-series.d.ts.map +1 -1
  228. package/dist/src/slide-components/in-series.js +5 -1
  229. package/dist/src/slide-components/in-series.js.map +1 -1
  230. package/dist/src/slide-components/live-duration.d.ts +1 -1
  231. package/dist/src/slide-components/live-duration.d.ts.map +1 -1
  232. package/dist/src/slide-components/live-duration.js +1 -1
  233. package/dist/src/slide-components/live-duration.js.map +1 -1
  234. package/dist/src/slide-components/multi-text.d.ts +76 -15
  235. package/dist/src/slide-components/multi-text.d.ts.map +1 -1
  236. package/dist/src/slide-components/multi-text.js +170 -25
  237. package/dist/src/slide-components/multi-text.js.map +1 -1
  238. package/dist/src/slide-components/rectangle.d.ts +3 -3
  239. package/dist/src/slide-components/rectangle.d.ts.map +1 -1
  240. package/dist/src/slide-components/rectangle.js +1 -1
  241. package/dist/src/slide-components/rectangle.js.map +1 -1
  242. package/dist/src/slide-components/registry.d.ts +1 -1
  243. package/dist/src/slide-components/registry.d.ts.map +1 -1
  244. package/dist/src/slide-components/registry.js +18 -18
  245. package/dist/src/slide-components/registry.js.map +1 -1
  246. package/dist/src/slide-components/serialize.d.ts +1 -1
  247. package/dist/src/slide-components/serialize.d.ts.map +1 -1
  248. package/dist/src/slide-components/serialize.js +2 -2
  249. package/dist/src/slide-components/serialize.js.map +1 -1
  250. package/dist/src/slide-components/show-error.js +2 -2
  251. package/dist/src/slide-components/show-error.js.map +1 -1
  252. package/dist/src/slide-components/simple-text.d.ts +4 -4
  253. package/dist/src/slide-components/simple-text.d.ts.map +1 -1
  254. package/dist/src/slide-components/simple-text.js +4 -4
  255. package/dist/src/slide-components/simple-text.js.map +1 -1
  256. package/dist/src/slide-components/slide-component.d.ts +5 -5
  257. package/dist/src/slide-components/slide-component.d.ts.map +1 -1
  258. package/dist/src/slide-components/slide-component.js +4 -4
  259. package/dist/src/slide-components/slide-component.js.map +1 -1
  260. package/dist/src/slide-components/slide-left.d.ts +3 -3
  261. package/dist/src/slide-components/slide-left.d.ts.map +1 -1
  262. package/dist/src/slide-components/slide-left.js +3 -3
  263. package/dist/src/slide-components/slide-left.js.map +1 -1
  264. package/dist/src/slide-components/split-video-clip.d.ts +2 -2
  265. package/dist/src/slide-components/split-video-clip.d.ts.map +1 -1
  266. package/dist/src/slide-components/split-video-clip.js +3 -3
  267. package/dist/src/slide-components/split-video-clip.js.map +1 -1
  268. package/dist/src/slide-components/text-effect.d.ts +2 -2
  269. package/dist/src/slide-components/text-effect.d.ts.map +1 -1
  270. package/dist/src/slide-components/traditional-text.d.ts +4 -4
  271. package/dist/src/slide-components/traditional-text.d.ts.map +1 -1
  272. package/dist/src/slide-components/traditional-text.js +3 -3
  273. package/dist/src/slide-components/traditional-text.js.map +1 -1
  274. package/dist/src/slide-components/video-clip.d.ts +17 -5
  275. package/dist/src/slide-components/video-clip.d.ts.map +1 -1
  276. package/dist/src/slide-components/video-clip.js +52 -11
  277. package/dist/src/slide-components/video-clip.js.map +1 -1
  278. package/dist/src/slide-components/video-info.d.ts +11 -11
  279. package/dist/src/slide-components/video-info.d.ts.map +1 -1
  280. package/dist/src/slide-components/video-info.js +32 -21
  281. package/dist/src/slide-components/video-info.js.map +1 -1
  282. package/dist/src/slow-image-sources.d.ts +7 -1
  283. package/dist/src/slow-image-sources.d.ts.map +1 -1
  284. package/dist/src/slow-image-sources.js +36 -5
  285. package/dist/src/slow-image-sources.js.map +1 -1
  286. package/dist/src/snapshot.d.ts +2 -2
  287. package/dist/src/snapshot.d.ts.map +1 -1
  288. package/dist/src/snapshot.js +31 -15
  289. package/dist/src/snapshot.js.map +1 -1
  290. package/dist/src/stroke-colors.d.ts +1 -1
  291. package/dist/src/stroke-colors.d.ts.map +1 -1
  292. package/dist/src/stroke-colors.js +4 -4
  293. package/dist/src/stroke-colors.js.map +1 -1
  294. package/dist/src/utility.d.ts +3 -4
  295. package/dist/src/utility.d.ts.map +1 -1
  296. package/dist/src/utility.js +4 -4
  297. package/dist/src/utility.js.map +1 -1
  298. package/lib/index.ts +3 -0
  299. package/lib/main-control.ts +119 -12
  300. package/package.json +7 -5
  301. package/src/binary-search.ts +2 -2
  302. package/src/corner-rounder.ts +128 -0
  303. package/src/cross-fade.ts +3 -3
  304. package/src/fancy-text.ts +255 -0
  305. package/src/glib/letters-base.ts +4 -3
  306. package/src/glib/line-font.ts +2 -2
  307. package/src/glib/paragraph-layout.ts +2 -2
  308. package/src/glib/path-shape-splitter.ts +1 -1
  309. package/src/glib/path-shape.ts +2 -2
  310. package/src/interpolate.ts +3 -3
  311. package/src/lattice.ts +1 -1
  312. package/src/local-files.ts +389 -0
  313. package/src/morph-animation.ts +2 -2
  314. package/src/peano-fourier/fourier-shared.ts +17 -4
  315. package/src/schedule-helper.ts +4 -4
  316. package/src/showable.ts +63 -4
  317. package/src/slide-components/arrow.ts +4 -4
  318. package/src/slide-components/cross-fade-transition.ts +4 -4
  319. package/src/slide-components/duration-agnostic.ts +3 -3
  320. package/src/slide-components/fixed-duration.ts +1 -1
  321. package/src/slide-components/fourier.ts +9 -9
  322. package/src/slide-components/frame-counter.ts +2 -2
  323. package/src/slide-components/function-graph.ts +4 -4
  324. package/src/slide-components/halftone-shadow.ts +4 -4
  325. package/src/slide-components/handwriting-effect.ts +7 -7
  326. package/src/slide-components/hold.ts +4 -4
  327. package/src/slide-components/image.ts +5 -5
  328. package/src/slide-components/in-parallel.ts +4 -4
  329. package/src/slide-components/in-series.ts +7 -4
  330. package/src/slide-components/live-duration.ts +1 -1
  331. package/src/slide-components/multi-text.ts +195 -30
  332. package/src/slide-components/rectangle.ts +3 -3
  333. package/src/slide-components/registry.ts +19 -19
  334. package/src/slide-components/serialize.ts +2 -2
  335. package/src/slide-components/show-error.ts +2 -2
  336. package/src/slide-components/simple-text.ts +7 -7
  337. package/src/slide-components/slide-component.ts +7 -7
  338. package/src/slide-components/slide-left.ts +4 -4
  339. package/src/slide-components/split-video-clip.ts +4 -4
  340. package/src/slide-components/text-effect.ts +2 -2
  341. package/src/slide-components/traditional-text.ts +5 -5
  342. package/src/slide-components/video-clip.ts +64 -13
  343. package/src/slide-components/video-info.ts +33 -21
  344. package/src/slow-image-sources.ts +38 -6
  345. package/src/snapshot.ts +34 -19
  346. package/src/stroke-colors.ts +4 -4
  347. package/src/utility.ts +5 -5
@@ -1,13 +1,13 @@
1
1
  import { ReadOnlyRect } from "phil-lib/misc";
2
- import { drawGrid, computeGridTransform } from "../glib/grid";
2
+ import { drawGrid, computeGridTransform } from "../glib/grid.ts";
3
3
  import {
4
4
  StringScheduleInfo,
5
5
  RectangleScheduleInfo,
6
6
  NumberScheduleInfo,
7
7
  ColorScheduleInfo,
8
- } from "../schedule-helper";
9
- import { Showable, ShowOptions } from "../showable";
10
- import { showError } from "./show-error";
8
+ } from "../schedule-helper.ts";
9
+ import { Showable, ShowOptions } from "../showable.ts";
10
+ import { showError } from "./show-error.ts";
11
11
 
12
12
  export class FunctionGraphComponent implements Showable {
13
13
  /**
@@ -1,7 +1,7 @@
1
- import { ColorScheduleInfo, NumberScheduleInfo } from "../schedule-helper";
2
- import { Showable, ShowOptions } from "../showable";
3
- import { InParallelComponent } from "./in-parallel";
4
- import { Keyframe } from "../interpolate";
1
+ import { ColorScheduleInfo, NumberScheduleInfo } from "../schedule-helper.ts";
2
+ import { Showable, ShowOptions } from "../showable.ts";
3
+ import { InParallelComponent } from "./in-parallel.ts";
4
+ import { Keyframe } from "../interpolate.ts";
5
5
 
6
6
  /** At 100% opacity the dot radius reaches this fraction of the half-cell width. */
7
7
  const HALFTONE_MAX_RADIUS_FACTOR = 0.9;
@@ -1,12 +1,12 @@
1
1
  // MARK: Handwriting Effect
2
2
 
3
- import { Command, PathShape } from "../glib/path-shape";
4
- import { PathShapeSplitter } from "../glib/path-shape-splitter";
5
- import { Keyframe } from "../interpolate";
6
- import { NumberScheduleInfo } from "../schedule-helper";
7
- import { Scalar, ShowOptions } from "../showable";
8
- import { showError } from "./show-error";
9
- import { EffectLetter, TEXT_EFFECT, TextEffect } from "./text-effect";
3
+ import { Command, PathShape } from "../glib/path-shape.ts";
4
+ import { PathShapeSplitter } from "../glib/path-shape-splitter.ts";
5
+ import { Keyframe } from "../interpolate.ts";
6
+ import { NumberScheduleInfo } from "../schedule-helper.ts";
7
+ import { Scalar, ShowOptions } from "../showable.ts";
8
+ import { showError } from "./show-error.ts";
9
+ import { EffectLetter, TEXT_EFFECT, TextEffect } from "./text-effect.ts";
10
10
 
11
11
  /**
12
12
  * What one step of {@link HandwritingEffectComponent.progressSchedule} means.
@@ -1,9 +1,9 @@
1
1
  // MARK: Hold Previous
2
2
 
3
- import { ShowOptions, Showable } from "../showable";
4
- import { Transition, InSeriesComponent } from "./in-series";
5
- import { ComponentWithLiveDuration } from "./live-duration";
6
- import { showError } from "./show-error";
3
+ import { ShowOptions, Showable } from "../showable.ts";
4
+ import { Transition, InSeriesComponent } from "./in-series.ts";
5
+ import { ComponentWithLiveDuration } from "./live-duration.ts";
6
+ import { showError } from "./show-error.ts";
7
7
 
8
8
  /**
9
9
  * Display and hold the opening frame of the next component.
@@ -1,8 +1,8 @@
1
1
  import { ReadOnlyRect } from "phil-lib/misc";
2
- import { StringScheduleInfo, RectangleScheduleInfo } from "../schedule-helper";
3
- import { Showable, ShowOptions } from "../showable";
4
- import { SingleImage, SlowImage } from "../slow-image-sources";
5
- import { Keyframe } from "../interpolate";
2
+ import { StringScheduleInfo, RectangleScheduleInfo } from "../schedule-helper.ts";
3
+ import { Showable, ShowOptions } from "../showable.ts";
4
+ import { SingleImage, SlowImage } from "../slow-image-sources.ts";
5
+ import { Keyframe } from "../interpolate.ts";
6
6
 
7
7
  /**
8
8
  * Standard registry component: draws a single image loaded from a URL.
@@ -42,7 +42,7 @@ export class SingleImageComponent implements Showable {
42
42
  }
43
43
  #getImage(timeInMs: number) {
44
44
  const url = this.urlSchedule.at(timeInMs);
45
- if (url !== this.#image?.url) {
45
+ if (url !== this.#image?.url || this.#image?.worthRetrying) {
46
46
  this.#image = url ? new SingleImage(url) : undefined;
47
47
  }
48
48
  return this.#image;
@@ -1,4 +1,4 @@
1
- import { BinaryInserter } from "../binary-search";
1
+ import { BinaryInserter } from "../binary-search.ts";
2
2
  import {
3
3
  Scalar,
4
4
  ScalarInfo,
@@ -6,10 +6,10 @@ import {
6
6
  Showable,
7
7
  ShowableParent,
8
8
  ShowOptions,
9
- } from "../showable";
10
- import { Mutable, removeIf } from "../utility";
9
+ } from "../showable.ts";
10
+ import { Mutable, removeIf } from "../utility.ts";
11
11
  // Type-only: registry.ts imports this module, so a runtime import would be circular.
12
- import type { ComponentRegistryEntry } from "./registry";
12
+ import type { ComponentRegistryEntry } from "./registry.ts";
13
13
 
14
14
  // MARK: In Parallel
15
15
 
@@ -14,16 +14,16 @@
14
14
  // the tool already ready then next time I need it so I don't have to stop what I'm doing
15
15
  // then.
16
16
 
17
- import { Showable, ShowOptions } from "../showable";
18
- import { Mutable } from "../utility";
17
+ import { Showable, ShowOptions } from "../showable.ts";
18
+ import { Mutable } from "../utility.ts";
19
19
  import {
20
20
  InParallelComponent,
21
21
  ParallelChildInfo,
22
22
  ShowChildInfo,
23
23
  PaddingComponent,
24
- } from "./in-parallel";
24
+ } from "./in-parallel.ts";
25
25
  // Type-only: registry.ts imports this module, so a runtime import would be circular.
26
- import type { ComponentRegistryEntry } from "./registry";
26
+ import type { ComponentRegistryEntry } from "./registry.ts";
27
27
 
28
28
  /**
29
29
  * Each of the children is displayed one after the next.
@@ -207,6 +207,9 @@ export class InSeriesComponent extends InParallelComponent {
207
207
  } else {
208
208
  super.showChild(info);
209
209
  }
210
+ } else if (timeInMs < 0 && info.options.playSpeed !== "exact") {
211
+ // Not started yet. A video clip uses this to decode its first frame before it's needed.
212
+ info.child.getReady?.(timeInMs);
210
213
  }
211
214
  }
212
215
  }
@@ -1,4 +1,4 @@
1
- import { InParallelComponent, ParallelChildInfo } from "./in-parallel";
1
+ import { InParallelComponent, ParallelChildInfo } from "./in-parallel.ts";
2
2
 
3
3
  /**
4
4
  * This is a convenient base class for any component that wants to have children.
@@ -2,14 +2,14 @@
2
2
 
3
3
  import { Point } from "bezier-js";
4
4
  import { ReadOnlyRect } from "phil-lib/misc";
5
- import { Font } from "../glib/letters-base";
6
- import { makeLineFontRatio } from "../glib/line-font";
5
+ import { Font } from "../glib/letters-base.ts";
6
+ import { makeLineFontRatio } from "../glib/line-font.ts";
7
7
  import {
8
8
  LaidOut,
9
9
  ParagraphLayout,
10
10
  WordInPlace,
11
- } from "../glib/paragraph-layout";
12
- import { PathShape } from "../glib/path-shape";
11
+ } from "../glib/paragraph-layout.ts";
12
+ import { PathShape } from "../glib/path-shape.ts";
13
13
  import {
14
14
  PointScheduleInfo,
15
15
  SelectScheduleInfo,
@@ -17,15 +17,21 @@ import {
17
17
  StringScheduleInfo,
18
18
  StringScalarInfo,
19
19
  ColorScheduleInfo,
20
- } from "../schedule-helper";
21
- import { ShowOptions, Showable, ScheduleInfo, Scalar } from "../showable";
22
- import { DurationAgnosticComponent } from "./duration-agnostic";
23
- import { ShowChildInfo } from "./in-parallel";
24
- import { showError } from "./show-error";
25
- import { EffectLetter, isTextEffect, TextEffect, TEXT_EFFECT } from "./text-effect";
26
- import { Keyframe } from "../interpolate";
20
+ } from "../schedule-helper.ts";
21
+ import {
22
+ ShowOptions,
23
+ Showable,
24
+ ShowableParent,
25
+ ScheduleInfo,
26
+ Scalar,
27
+ } from "../showable.ts";
28
+ import { DurationAgnosticComponent } from "./duration-agnostic.ts";
29
+ import { ShowChildInfo } from "./in-parallel.ts";
30
+ import { showError } from "./show-error.ts";
31
+ import { EffectLetter, isTextEffect, TextEffect, TEXT_EFFECT } from "./text-effect.ts";
32
+ import { Keyframe } from "../interpolate.ts";
27
33
  // Type-only: registry.ts imports this module, so a runtime import would be circular.
28
- import type { ComponentRegistryEntry } from "./registry";
34
+ import type { ComponentRegistryEntry } from "./registry.ts";
29
35
 
30
36
  /**
31
37
  * This is needed as a default in some places but should never actually be used.
@@ -77,6 +83,36 @@ function setTextFormatList(
77
83
  ) {
78
84
  return { ...options, [TEXT_FORMAT_LIST]: textFormatList };
79
85
  }
86
+
87
+ // MARK: Format strings
88
+
89
+ /** One piece of a format string: a format's name, and the text after it. */
90
+ export type FormattedSpan = { readonly format: string; readonly content: string };
91
+
92
+ const FORMAT_STRING_SPLITTER = /^⸨([^⸨⸩]*)⸩([^⸨⸩]*)(.*)$/s;
93
+
94
+ /**
95
+ * Split a format string, `"⸨format1⸩content1⸨format2⸩content2"`, into its spans.
96
+ *
97
+ * This is what {@link MultiTextComponent.addText1} and {@link MultiTextComponent.setSpans} read.
98
+ * Each `⸨name⸩` names a Text Format, and the content after it, up to the next `⸨`, is one span.
99
+ * There's no way to escape `⸨` or `⸩`, so content can't contain them.
100
+ *
101
+ * @throws If `all` isn't empty and doesn't start with a format.
102
+ */
103
+ export function parseFormatString(all: string): FormattedSpan[] {
104
+ const result: FormattedSpan[] = [];
105
+ while (all != "") {
106
+ const pieces = FORMAT_STRING_SPLITTER.exec(all);
107
+ if (!pieces) {
108
+ throw new Error("Invalid here: " + all);
109
+ }
110
+ result.push({ format: pieces[1], content: pieces[2] });
111
+ all = pieces[3];
112
+ }
113
+ return result;
114
+ }
115
+
80
116
  // MARK: Auto Sizing
81
117
 
82
118
  /**
@@ -236,10 +272,9 @@ const ANCHOR_FRACTION = {
236
272
  * Each TextSpanComponent object points to a TextFormatComponent object by name.
237
273
  * Presumably a lot of formatting will be reused, like "normal" and bold.
238
274
  *
239
- * This is a prototype.
240
- * The basic functionality is there and works.
241
- * But the GUI needs some cleanup.
242
- * If nothing else it needs instructions.
275
+ * In the Visual Editor, ✎ Edit Text… (in the Text Frame panel) edits the Text Span children as
276
+ * one piece of text, with a menu in front of each part naming its format. See {@link setSpans}.
277
+ * Text Formats are still edited one at a time, in the component list.
243
278
  * Ideally it would be impossible to add a TextSpanComponent or a TextFormatComponent to anything but one of these components.
244
279
  * And these components should have two *preferred* types of children: TextSpanComponent or TextFormatComponent.
245
280
  *
@@ -273,9 +308,24 @@ export class MultiTextComponent extends DurationAgnosticComponent {
273
308
  .map(([key]) => key);
274
309
  choices.unshift("Text Span", "Text Format", ...effects);
275
310
  }
276
- readonly #temporaryText = new Array<TextSpanComponent>();
311
+ /**
312
+ * Spans added by {@link addText} and {@link addText1}: text the *program* owns.
313
+ *
314
+ * They're drawn after every Text Span child, but they aren't children, so the Visual Editor
315
+ * never sees them and they're never saved. That's on purpose. A program may rebuild them on
316
+ * every frame from live values (`clearText().addText1(…)` inside `show()`), and as children
317
+ * they would change the tree, and mark the video as changed, on every frame.
318
+ * They used to be replaceable children. Loading a save replaced them with new objects, and
319
+ * the program went on changing the old ones, which were no longer in the tree.
320
+ *
321
+ * Text that the Visual Editor should show, save and undo belongs in Text Span children
322
+ * instead. See {@link setSpans}.
323
+ */
324
+ readonly #programText = new Array<TextSpanComponent>();
277
325
  /**
278
326
  * Create, initialize, and add a TextSpanComponent to this MultiTextComponent.
327
+ *
328
+ * The span is hidden from the Visual Editor and never saved. See {@link clearText}.
279
329
  * @param style The name of the style to apply to this text.
280
330
  * @param content The text to display.
281
331
  * @returns `this`, for chaining.
@@ -284,25 +334,23 @@ export class MultiTextComponent extends DurationAgnosticComponent {
284
334
  const span = new TextSpanComponent();
285
335
  span.styleSchedule.set(style);
286
336
  span.contentSchedule.set(content);
287
- this.#temporaryText.push(span);
337
+ this.#programText.push(span);
288
338
  return this;
289
339
  }
290
- static #splitter = /^⸨([^⸨⸩]*)⸩([^⸨⸩]*)(.*)$/s;
291
340
  /**
292
341
  * `component.addText1("⸨format1⸩content1⸨format2⸩content2⸨format3⸩content3")`
293
342
  * is equivalent to
294
- * `component.add("format1", "content1").add("format2", "content2").add("format3", "content3")`
295
- * @param all A string containing all of the text and styles to add.
343
+ * `component.addText("format1", "content1").addText("format2", "content2").addText("format3", "content3")`
344
+ *
345
+ * Like {@link addText}, this text is hidden from the Visual Editor and never saved, so it's
346
+ * the right choice for text built from live values, even on every frame. For text the user
347
+ * should be able to edit, use {@link setSpans}.
348
+ * @param all A string containing all of the text and styles to add. See {@link parseFormatString}.
296
349
  * @returns this;
297
350
  */
298
351
  addText1(all: string): this {
299
- while (all != "") {
300
- const pieces = MultiTextComponent.#splitter.exec(all);
301
- if (!pieces) {
302
- throw new Error("Invalid here: " + all);
303
- }
304
- this.addText(pieces[1], pieces[2]);
305
- all = pieces[3];
352
+ for (const { format, content } of parseFormatString(all)) {
353
+ this.addText(format, content);
306
354
  }
307
355
  return this;
308
356
  }
@@ -310,9 +358,126 @@ export class MultiTextComponent extends DurationAgnosticComponent {
310
358
  * Remove all TextSpanComponent objects created by addText() or addText1().
311
359
  */
312
360
  clearText() {
313
- this.#temporaryText.length = 0;
361
+ this.#programText.length = 0;
314
362
  return this;
315
363
  }
364
+ /** True if {@link addText} or {@link addText1} added text that {@link clearText} hasn't removed. */
365
+ get hasProgramText(): boolean {
366
+ return this.#programText.length > 0;
367
+ }
368
+
369
+ // MARK: Editable spans
370
+
371
+ /**
372
+ * The Text Span children the Visual Editor can add and remove, in order.
373
+ *
374
+ * Not the spans from {@link addText}, and not Text Spans added in TypeScript with `addFixed()`.
375
+ */
376
+ editableSpans(): TextSpanComponent[] {
377
+ return this.replaceableComponents!.get().filter(
378
+ (child): child is TextSpanComponent => child instanceof TextSpanComponent,
379
+ );
380
+ }
381
+ /**
382
+ * The {@link editableSpans} as one format string, using their values at time 0.
383
+ * The inverse of {@link setSpans}.
384
+ */
385
+ getSpans(): string {
386
+ return this.editableSpans()
387
+ .map((span) => {
388
+ const { style, content } = span.get(0);
389
+ return `⸨${style}⸩${content}`;
390
+ })
391
+ .join("");
392
+ }
393
+ /**
394
+ * Make the {@link editableSpans} match a format string, the same format {@link addText1} reads.
395
+ *
396
+ * Unlike addText1(), these spans are real children: the Visual Editor shows, saves and
397
+ * undoes them. So set them once, as the starting text, never inside `show()`. Every
398
+ * change is an edit.
399
+ *
400
+ * The existing spans are reused, in order, so typing a letter changes one span and nothing
401
+ * else. A span's Content or Style is only changed if its value at time 0 differs, and then
402
+ * it gets that single value, which flattens any animation it had. New spans go right after
403
+ * the last span (at the end, if there were none) and extra spans are removed from the end.
404
+ * Other children keep their places. The list of children only changes when the number of
405
+ * spans does.
406
+ * @param value See {@link parseFormatString}.
407
+ * @returns `this`, for chaining.
408
+ * @throws If `value` isn't a valid format string. Nothing changes.
409
+ */
410
+ setSpans(value: string): this {
411
+ const wanted = parseFormatString(value);
412
+ const spans = this.editableSpans();
413
+ wanted.forEach(({ format, content }, index) => {
414
+ const span = spans[index];
415
+ if (!span) return;
416
+ const current = span.get(0);
417
+ if (current.content !== content) span.contentSchedule.set(content);
418
+ if (current.style !== format) span.styleSchedule.set(format);
419
+ });
420
+ if (wanted.length !== spans.length) {
421
+ const children = this.replaceableComponents!.get();
422
+ if (wanted.length < spans.length) {
423
+ const removed = new Set<Showable>(spans.slice(wanted.length));
424
+ this.replaceableComponents!.replace(
425
+ children.filter((child) => !removed.has(child)),
426
+ );
427
+ } else {
428
+ const added = wanted
429
+ .slice(spans.length)
430
+ .map(
431
+ ({ format, content }) =>
432
+ new TextSpanComponent({ content, style: format }),
433
+ );
434
+ const last = spans.at(-1);
435
+ const at = last ? children.indexOf(last) + 1 : children.length;
436
+ children.splice(at, 0, ...added);
437
+ this.replaceableComponents!.replace(children);
438
+ }
439
+ }
440
+ return this;
441
+ }
442
+
443
+ // MARK: Formats in scope
444
+
445
+ /**
446
+ * Every Text Format this Multi Text's spans can use, in the order {@link show} searches them:
447
+ * the formats of the outermost Multi Text first, this one's own last.
448
+ * When two share a name, the *last* one wins.
449
+ */
450
+ #formatsInScope(): TextFormatComponent[] {
451
+ const chain: MultiTextComponent[] = [];
452
+ let node: ShowableParent | undefined = this;
453
+ while (node) {
454
+ if (node instanceof MultiTextComponent) chain.unshift(node);
455
+ node = node.parent;
456
+ }
457
+ return chain.flatMap((multiText) => multiText.#ownFormatters());
458
+ }
459
+ /**
460
+ * The names this Multi Text's spans can use: its own Text Formats', then those of each
461
+ * Multi Text it's inside, nearest first. Each name once.
462
+ *
463
+ * {@link show} finds the outer Multi Texts while drawing. This walks up the `parent` chain
464
+ * instead, so it works any time.
465
+ */
466
+ formatNamesInScope(): string[] {
467
+ const names: string[] = [];
468
+ let node: ShowableParent | undefined = this;
469
+ while (node) {
470
+ if (node instanceof MultiTextComponent) {
471
+ names.push(...node.#ownFormatters().map((format) => format.nameScalar.value));
472
+ }
473
+ node = node.parent;
474
+ }
475
+ return [...new Set(names)];
476
+ }
477
+ /** The Text Format that a span in this Multi Text named `name` would use, or undefined. */
478
+ formatInScope(name: string): TextFormatComponent | undefined {
479
+ return getFormat(name, this.#formatsInScope());
480
+ }
316
481
  /**
317
482
  * The point the finished text is anchored to.
318
483
  *
@@ -591,7 +756,7 @@ export class MultiTextComponent extends DurationAgnosticComponent {
591
756
  ...this.children.flatMap(({ child }) =>
592
757
  child instanceof TextSpanComponent ? [child] : [],
593
758
  ),
594
- ...this.#temporaryText,
759
+ ...this.#programText,
595
760
  ];
596
761
  sources.forEach((source, spanIndex) => {
597
762
  const { content, style } = source.get(timeInMs);
@@ -1,7 +1,7 @@
1
- import { Showable, ShowOptions } from "../showable";
2
- import { Keyframe } from "../interpolate";
1
+ import { Showable, ShowOptions } from "../showable.ts";
2
+ import { Keyframe } from "../interpolate.ts";
3
3
  import { ReadOnlyRect } from "phil-lib/misc";
4
- import { ColorScheduleInfo, RectangleScheduleInfo } from "../schedule-helper";
4
+ import { ColorScheduleInfo, RectangleScheduleInfo } from "../schedule-helper.ts";
5
5
 
6
6
  /**
7
7
  * Standard registry component: a filled rectangle with an editable color and
@@ -1,26 +1,26 @@
1
- import { Showable } from "../showable";
2
- import { ArrowComponent } from "./arrow";
3
- import { CrossFadeTransition } from "./cross-fade-transition";
4
- import { FourierComponent } from "./fourier";
5
- import { FrameCounter } from "./frame-counter";
6
- import { FunctionGraphComponent } from "./function-graph";
7
- import { HalftoneShadowComponent } from "./halftone-shadow";
8
- import { HandwritingEffectComponent } from "./handwriting-effect";
9
- import { HoldPreviousTransition, HoldNextTransition } from "./hold";
10
- import { SingleImageComponent } from "./image";
11
- import { PaddingComponent } from "./in-parallel";
12
- import { InSeriesComponent } from "./in-series";
1
+ import { Showable } from "../showable.ts";
2
+ import { ArrowComponent } from "./arrow.ts";
3
+ import { CrossFadeTransition } from "./cross-fade-transition.ts";
4
+ import { FourierComponent } from "./fourier.ts";
5
+ import { FrameCounter } from "./frame-counter.ts";
6
+ import { FunctionGraphComponent } from "./function-graph.ts";
7
+ import { HalftoneShadowComponent } from "./halftone-shadow.ts";
8
+ import { HandwritingEffectComponent } from "./handwriting-effect.ts";
9
+ import { HoldPreviousTransition, HoldNextTransition } from "./hold.ts";
10
+ import { SingleImageComponent } from "./image.ts";
11
+ import { PaddingComponent } from "./in-parallel.ts";
12
+ import { InSeriesComponent } from "./in-series.ts";
13
13
  import {
14
14
  MultiTextComponent,
15
15
  TextSpanComponent,
16
16
  TextFormatComponent,
17
- } from "./multi-text";
18
- import { RectangleComponent } from "./rectangle";
19
- import { TextComponent } from "./simple-text";
20
- import { SlideComponent } from "./slide-component";
21
- import { SlideLeftTransition } from "./slide-left";
22
- import { TraditionalTextComponent } from "./traditional-text";
23
- import { VideoClipComponent } from "./video-clip";
17
+ } from "./multi-text.ts";
18
+ import { RectangleComponent } from "./rectangle.ts";
19
+ import { TextComponent } from "./simple-text.ts";
20
+ import { SlideComponent } from "./slide-component.ts";
21
+ import { SlideLeftTransition } from "./slide-left.ts";
22
+ import { TraditionalTextComponent } from "./traditional-text.ts";
23
+ import { VideoClipComponent } from "./video-clip.ts";
24
24
 
25
25
  export type ComponentRegistryEntry = {
26
26
  /**
@@ -5,8 +5,8 @@ import {
5
5
  SerializedSchedule,
6
6
  Showable,
7
7
  SoundClip,
8
- } from "../showable";
9
- import { ComponentRegistryEntry, componentRegistry } from "./registry";
8
+ } from "../showable.ts";
9
+ import { ComponentRegistryEntry, componentRegistry } from "./registry.ts";
10
10
 
11
11
  /**
12
12
  * One component the Visual Editor added, as saved.
@@ -1,5 +1,5 @@
1
- import { makeLineFont } from "../glib/line-font";
2
- import { ParagraphLayout } from "../glib/paragraph-layout";
1
+ import { makeLineFont } from "../glib/line-font.ts";
2
+ import { ParagraphLayout } from "../glib/paragraph-layout.ts";
3
3
 
4
4
  const errorFont = makeLineFont(1);
5
5
 
@@ -1,17 +1,17 @@
1
1
  import { ReadOnlyRect } from "phil-lib/misc";
2
- import { makeLineFontRatio } from "../glib/line-font";
3
- import { ParagraphLayout } from "../glib/paragraph-layout";
2
+ import { makeLineFontRatio } from "../glib/line-font.ts";
3
+ import { ParagraphLayout } from "../glib/paragraph-layout.ts";
4
4
  import {
5
5
  ColorScheduleInfo,
6
6
  RectangleScheduleInfo,
7
7
  StringScheduleInfo,
8
8
  NumberScheduleInfo,
9
9
  SelectScheduleInfo,
10
- } from "../schedule-helper";
11
- import { ShowOptions } from "../showable";
12
- import { DurationAgnosticComponent } from "./duration-agnostic";
13
- import { Keyframe } from "../interpolate";
14
- import { Font } from "../glib/letters-base";
10
+ } from "../schedule-helper.ts";
11
+ import { ShowOptions } from "../showable.ts";
12
+ import { DurationAgnosticComponent } from "./duration-agnostic.ts";
13
+ import { Keyframe } from "../interpolate.ts";
14
+ import { Font } from "../glib/letters-base.ts";
15
15
 
16
16
  type CachedFont = {
17
17
  readonly font: Font;
@@ -1,10 +1,10 @@
1
- import { applyTransform } from "../glib/transforms";
2
- import { StringScalarInfo, NumberScheduleInfo } from "../schedule-helper";
3
- import { ShowOptions } from "../showable";
4
- import { DurationAgnosticComponent } from "./duration-agnostic";
5
- import { ShowChildInfo } from "./in-parallel";
6
- import { showError } from "./show-error";
7
- import { Keyframe } from "../interpolate";
1
+ import { applyTransform } from "../glib/transforms.ts";
2
+ import { StringScalarInfo, NumberScheduleInfo } from "../schedule-helper.ts";
3
+ import { ShowOptions } from "../showable.ts";
4
+ import { DurationAgnosticComponent } from "./duration-agnostic.ts";
5
+ import { ShowChildInfo } from "./in-parallel.ts";
6
+ import { showError } from "./show-error.ts";
7
+ import { Keyframe } from "../interpolate.ts";
8
8
 
9
9
  /**
10
10
  * Mathematical Bold Script capital letters A–J, used as placeholders in
@@ -1,7 +1,7 @@
1
- import { Showable, ShowOptions } from "../showable";
2
- import { InSeriesComponent, Transition } from "./in-series";
3
- import { ComponentWithLiveDuration } from "./live-duration";
4
- import { showError } from "./show-error";
1
+ import { Showable, ShowOptions } from "../showable.ts";
2
+ import { InSeriesComponent, Transition } from "./in-series.ts";
3
+ import { ComponentWithLiveDuration } from "./live-duration.ts";
4
+ import { showError } from "./show-error.ts";
5
5
 
6
6
  /**
7
7
  * A {@link Transition}.
@@ -5,10 +5,10 @@
5
5
  // pieces are brand new components. Putting them into the tree is the
6
6
  // caller's job.
7
7
 
8
- import { SoundClip } from "../showable";
9
- import { serializeComponents } from "../snapshot";
10
- import { buildComponents } from "./serialize";
11
- import { VideoClipComponent } from "./video-clip";
8
+ import { SoundClip } from "../showable.ts";
9
+ import { serializeComponents } from "../snapshot.ts";
10
+ import { buildComponents } from "./serialize.ts";
11
+ import { VideoClipComponent } from "./video-clip.ts";
12
12
 
13
13
  /**
14
14
  * What to do with a sound clip that is playing at the split point.
@@ -1,7 +1,7 @@
1
1
  // MARK: Text Effects
2
2
 
3
- import { PathShape } from "../glib/path-shape";
4
- import { Showable, ShowOptions } from "../showable";
3
+ import { PathShape } from "../glib/path-shape.ts";
4
+ import { Showable, ShowOptions } from "../showable.ts";
5
5
 
6
6
  /**
7
7
  * A {@link MultiTextComponent} child with this key changes how the text is
@@ -1,15 +1,15 @@
1
1
  import { Point } from "bezier-js";
2
- import { myRainbow } from "../glib/my-rainbow";
2
+ import { myRainbow } from "../glib/my-rainbow.ts";
3
3
  import {
4
4
  ColorScheduleInfo,
5
5
  NumberScheduleInfo,
6
6
  PointScheduleInfo,
7
7
  SelectScheduleInfo,
8
8
  StringScheduleInfo,
9
- } from "../schedule-helper";
10
- import { ShowOptions } from "../showable";
11
- import { DurationAgnosticComponent } from "./duration-agnostic";
12
- import { Keyframe } from "../interpolate";
9
+ } from "../schedule-helper.ts";
10
+ import { ShowOptions } from "../showable.ts";
11
+ import { DurationAgnosticComponent } from "./duration-agnostic.ts";
12
+ import { Keyframe } from "../interpolate.ts";
13
13
 
14
14
  /**
15
15
  * `document.fonts.check()`/`.load()` only know about `FontFace` objects that