@tscaps/engine 0.1.1 → 0.3.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 (657) hide show
  1. package/README.md +48 -10
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +3 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/modules/bidi/BidiAnalyzer.d.ts +23 -0
  7. package/dist/modules/bidi/BidiAnalyzer.d.ts.map +1 -0
  8. package/dist/modules/bidi/BidiAnalyzer.js +2 -0
  9. package/dist/modules/bidi/BidiAnalyzer.js.map +1 -0
  10. package/dist/modules/bidi/BidiCharacterClassifier.d.ts +13 -0
  11. package/dist/modules/bidi/BidiCharacterClassifier.d.ts.map +1 -0
  12. package/dist/modules/bidi/BidiCharacterClassifier.js +2 -0
  13. package/dist/modules/bidi/BidiCharacterClassifier.js.map +1 -0
  14. package/dist/modules/bidi/BidiJsAnalyzer.d.ts +14 -0
  15. package/dist/modules/bidi/BidiJsAnalyzer.d.ts.map +1 -0
  16. package/dist/modules/bidi/BidiJsAnalyzer.js +19 -0
  17. package/dist/modules/bidi/BidiJsAnalyzer.js.map +1 -0
  18. package/dist/modules/bidi/BidiJsCharacterClassifier.d.ts +8 -0
  19. package/dist/modules/bidi/BidiJsCharacterClassifier.d.ts.map +1 -0
  20. package/dist/modules/bidi/BidiJsCharacterClassifier.js +19 -0
  21. package/dist/modules/bidi/BidiJsCharacterClassifier.js.map +1 -0
  22. package/dist/modules/bidi/CursiveScriptDetector.d.ts +12 -0
  23. package/dist/modules/bidi/CursiveScriptDetector.d.ts.map +1 -0
  24. package/dist/modules/bidi/CursiveScriptDetector.js +20 -0
  25. package/dist/modules/bidi/CursiveScriptDetector.js.map +1 -0
  26. package/dist/modules/bidi/HorizontalSide.d.ts +18 -0
  27. package/dist/modules/bidi/HorizontalSide.d.ts.map +1 -0
  28. package/dist/modules/bidi/HorizontalSide.js +3 -0
  29. package/dist/modules/bidi/HorizontalSide.js.map +1 -0
  30. package/dist/modules/bidi/HorizontalSideResolver.d.ts +21 -0
  31. package/dist/modules/bidi/HorizontalSideResolver.d.ts.map +1 -0
  32. package/dist/modules/bidi/HorizontalSideResolver.js +27 -0
  33. package/dist/modules/bidi/HorizontalSideResolver.js.map +1 -0
  34. package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.d.ts +24 -0
  35. package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.d.ts.map +1 -0
  36. package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.js +34 -0
  37. package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.js.map +1 -0
  38. package/dist/modules/bidi/TextDirection.d.ts +9 -0
  39. package/dist/modules/bidi/TextDirection.d.ts.map +1 -0
  40. package/dist/modules/bidi/TextDirection.js +2 -0
  41. package/dist/modules/bidi/TextDirection.js.map +1 -0
  42. package/dist/modules/bidi/TextDirectionDetector.d.ts +12 -0
  43. package/dist/modules/bidi/TextDirectionDetector.d.ts.map +1 -0
  44. package/dist/modules/bidi/TextDirectionDetector.js +2 -0
  45. package/dist/modules/bidi/TextDirectionDetector.js.map +1 -0
  46. package/dist/modules/bidi/WordFragment.d.ts +34 -0
  47. package/dist/modules/bidi/WordFragment.d.ts.map +1 -0
  48. package/dist/modules/bidi/WordFragment.js +2 -0
  49. package/dist/modules/bidi/WordFragment.js.map +1 -0
  50. package/dist/modules/bidi/WordFragmenter.d.ts +43 -0
  51. package/dist/modules/bidi/WordFragmenter.d.ts.map +1 -0
  52. package/dist/modules/bidi/WordFragmenter.js +112 -0
  53. package/dist/modules/bidi/WordFragmenter.js.map +1 -0
  54. package/dist/modules/bidi/index.d.ts +14 -0
  55. package/dist/modules/bidi/index.d.ts.map +1 -0
  56. package/dist/modules/bidi/index.js +8 -0
  57. package/dist/modules/bidi/index.js.map +1 -0
  58. package/dist/modules/css/CssBlockSealer.d.ts +30 -0
  59. package/dist/modules/css/CssBlockSealer.d.ts.map +1 -0
  60. package/dist/modules/css/CssBlockSealer.js +64 -0
  61. package/dist/modules/css/CssBlockSealer.js.map +1 -0
  62. package/dist/modules/css/CssCustomPropertyDefinitionScanner.d.ts +13 -0
  63. package/dist/modules/css/CssCustomPropertyDefinitionScanner.d.ts.map +1 -0
  64. package/dist/modules/css/CssCustomPropertyDefinitionScanner.js +24 -0
  65. package/dist/modules/css/CssCustomPropertyDefinitionScanner.js.map +1 -0
  66. package/dist/modules/css/CssFilterReferenceScanner.d.ts +15 -0
  67. package/dist/modules/css/CssFilterReferenceScanner.d.ts.map +1 -0
  68. package/dist/modules/css/CssFilterReferenceScanner.js +22 -0
  69. package/dist/modules/css/CssFilterReferenceScanner.js.map +1 -0
  70. package/dist/modules/css/CssFragmentParser.d.ts +53 -0
  71. package/dist/modules/css/CssFragmentParser.d.ts.map +1 -0
  72. package/dist/modules/css/CssFragmentParser.js +127 -0
  73. package/dist/modules/css/CssFragmentParser.js.map +1 -0
  74. package/dist/modules/css/CssKeyframeNamespacer.d.ts +21 -0
  75. package/dist/modules/css/CssKeyframeNamespacer.d.ts.map +1 -0
  76. package/dist/modules/css/CssKeyframeNamespacer.js +48 -0
  77. package/dist/modules/css/CssKeyframeNamespacer.js.map +1 -0
  78. package/dist/modules/css/CssKeyframesScanner.d.ts +29 -0
  79. package/dist/modules/css/CssKeyframesScanner.d.ts.map +1 -0
  80. package/dist/modules/css/CssKeyframesScanner.js +102 -0
  81. package/dist/modules/css/CssKeyframesScanner.js.map +1 -0
  82. package/dist/modules/css/CssLayer.d.ts +20 -0
  83. package/dist/modules/css/CssLayer.d.ts.map +1 -0
  84. package/dist/modules/css/CssLayer.js +21 -0
  85. package/dist/modules/css/CssLayer.js.map +1 -0
  86. package/dist/modules/css/CssScoper.d.ts +31 -2
  87. package/dist/modules/css/CssScoper.d.ts.map +1 -1
  88. package/dist/modules/css/CssScoper.js +168 -79
  89. package/dist/modules/css/CssScoper.js.map +1 -1
  90. package/dist/modules/css/CssSelectorClassScanner.d.ts +25 -0
  91. package/dist/modules/css/CssSelectorClassScanner.d.ts.map +1 -0
  92. package/dist/modules/css/CssSelectorClassScanner.js +91 -0
  93. package/dist/modules/css/CssSelectorClassScanner.js.map +1 -0
  94. package/dist/modules/css/CssVarReferenceScanner.d.ts +16 -0
  95. package/dist/modules/css/CssVarReferenceScanner.d.ts.map +1 -0
  96. package/dist/modules/css/CssVarReferenceScanner.js +27 -0
  97. package/dist/modules/css/CssVarReferenceScanner.js.map +1 -0
  98. package/dist/modules/css/index.d.ts +9 -0
  99. package/dist/modules/css/index.d.ts.map +1 -1
  100. package/dist/modules/css/index.js +9 -0
  101. package/dist/modules/css/index.js.map +1 -1
  102. package/dist/modules/document/CssClass.d.ts +20 -0
  103. package/dist/modules/document/CssClass.d.ts.map +1 -0
  104. package/dist/modules/document/CssClass.js +21 -0
  105. package/dist/modules/document/CssClass.js.map +1 -0
  106. package/dist/modules/document/CssVariable.d.ts +21 -6
  107. package/dist/modules/document/CssVariable.d.ts.map +1 -1
  108. package/dist/modules/document/CssVariable.js +27 -5
  109. package/dist/modules/document/CssVariable.js.map +1 -1
  110. package/dist/modules/document/DataAttribute.d.ts +26 -0
  111. package/dist/modules/document/DataAttribute.d.ts.map +1 -0
  112. package/dist/modules/document/DataAttribute.js +27 -0
  113. package/dist/modules/document/DataAttribute.js.map +1 -0
  114. package/dist/modules/document/Decoration.d.ts +42 -0
  115. package/dist/modules/document/Decoration.d.ts.map +1 -0
  116. package/dist/modules/document/Decoration.js +52 -0
  117. package/dist/modules/document/Decoration.js.map +1 -0
  118. package/dist/modules/document/Document.d.ts.map +1 -1
  119. package/dist/modules/document/Document.js +0 -3
  120. package/dist/modules/document/Document.js.map +1 -1
  121. package/dist/modules/document/DocumentEditor.d.ts +51 -9
  122. package/dist/modules/document/DocumentEditor.d.ts.map +1 -1
  123. package/dist/modules/document/DocumentEditor.js +118 -26
  124. package/dist/modules/document/DocumentEditor.js.map +1 -1
  125. package/dist/modules/document/DocumentNodeId.d.ts +23 -0
  126. package/dist/modules/document/DocumentNodeId.d.ts.map +1 -0
  127. package/dist/modules/document/DocumentNodeId.js +31 -0
  128. package/dist/modules/document/DocumentNodeId.js.map +1 -0
  129. package/dist/modules/document/Line.d.ts +10 -7
  130. package/dist/modules/document/Line.d.ts.map +1 -1
  131. package/dist/modules/document/Line.js +13 -25
  132. package/dist/modules/document/Line.js.map +1 -1
  133. package/dist/modules/document/Section.d.ts +1 -8
  134. package/dist/modules/document/Section.d.ts.map +1 -1
  135. package/dist/modules/document/Section.js +4 -35
  136. package/dist/modules/document/Section.js.map +1 -1
  137. package/dist/modules/document/Segment.d.ts +24 -14
  138. package/dist/modules/document/Segment.d.ts.map +1 -1
  139. package/dist/modules/document/Segment.js +41 -23
  140. package/dist/modules/document/Segment.js.map +1 -1
  141. package/dist/modules/document/Word.d.ts +21 -8
  142. package/dist/modules/document/Word.d.ts.map +1 -1
  143. package/dist/modules/document/Word.js +34 -35
  144. package/dist/modules/document/Word.js.map +1 -1
  145. package/dist/modules/document/index.d.ts +5 -2
  146. package/dist/modules/document/index.d.ts.map +1 -1
  147. package/dist/modules/document/index.js +4 -1
  148. package/dist/modules/document/index.js.map +1 -1
  149. package/dist/modules/effect/CarryQuotesEffect.d.ts +1 -7
  150. package/dist/modules/effect/CarryQuotesEffect.d.ts.map +1 -1
  151. package/dist/modules/effect/CarryQuotesEffect.js +17 -30
  152. package/dist/modules/effect/CarryQuotesEffect.js.map +1 -1
  153. package/dist/modules/effect/GapFreeEffect.d.ts +15 -0
  154. package/dist/modules/effect/GapFreeEffect.d.ts.map +1 -1
  155. package/dist/modules/effect/GapFreeEffect.js +29 -4
  156. package/dist/modules/effect/GapFreeEffect.js.map +1 -1
  157. package/dist/modules/effect/RemovePunctuationEffect.d.ts +10 -2
  158. package/dist/modules/effect/RemovePunctuationEffect.d.ts.map +1 -1
  159. package/dist/modules/effect/RemovePunctuationEffect.js +26 -6
  160. package/dist/modules/effect/RemovePunctuationEffect.js.map +1 -1
  161. package/dist/modules/effect/SmartLowercaseEffect.d.ts +7 -6
  162. package/dist/modules/effect/SmartLowercaseEffect.d.ts.map +1 -1
  163. package/dist/modules/effect/SmartLowercaseEffect.js +11 -7
  164. package/dist/modules/effect/SmartLowercaseEffect.js.map +1 -1
  165. package/dist/modules/pipeline/RenderPipelineBuilder.d.ts +3 -3
  166. package/dist/modules/pipeline/RenderPipelineBuilder.d.ts.map +1 -1
  167. package/dist/modules/pipeline/RenderPipelineBuilder.js +13 -8
  168. package/dist/modules/pipeline/RenderPipelineBuilder.js.map +1 -1
  169. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts +19 -25
  170. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts.map +1 -1
  171. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js +43 -717
  172. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js.map +1 -1
  173. package/dist/modules/rendering/HorizontalPlacementResolver.d.ts +27 -0
  174. package/dist/modules/rendering/HorizontalPlacementResolver.d.ts.map +1 -0
  175. package/dist/modules/rendering/HorizontalPlacementResolver.js +31 -0
  176. package/dist/modules/rendering/HorizontalPlacementResolver.js.map +1 -0
  177. package/dist/modules/rendering/SubtitleFrameRenderer.d.ts +10 -5
  178. package/dist/modules/rendering/SubtitleFrameRenderer.d.ts.map +1 -1
  179. package/dist/modules/rendering/index.d.ts +16 -8
  180. package/dist/modules/rendering/index.d.ts.map +1 -1
  181. package/dist/modules/rendering/index.js +8 -2
  182. package/dist/modules/rendering/index.js.map +1 -1
  183. package/dist/modules/rendering/styles/BaselineCssComposer.d.ts +41 -0
  184. package/dist/modules/rendering/styles/BaselineCssComposer.d.ts.map +1 -0
  185. package/dist/modules/rendering/styles/BaselineCssComposer.js +64 -0
  186. package/dist/modules/rendering/styles/BaselineCssComposer.js.map +1 -0
  187. package/dist/modules/rendering/styles/DecorationContainerBaselineCss.d.ts +7 -0
  188. package/dist/modules/rendering/styles/DecorationContainerBaselineCss.d.ts.map +1 -0
  189. package/dist/modules/rendering/styles/DecorationContainerBaselineCss.js +35 -0
  190. package/dist/modules/rendering/styles/DecorationContainerBaselineCss.js.map +1 -0
  191. package/dist/modules/rendering/styles/FrozenFrameCss.d.ts +28 -0
  192. package/dist/modules/rendering/styles/FrozenFrameCss.d.ts.map +1 -0
  193. package/dist/modules/rendering/styles/FrozenFrameCss.js +28 -0
  194. package/dist/modules/rendering/styles/FrozenFrameCss.js.map +1 -0
  195. package/dist/modules/rendering/styles/InlineStyleEmitter.d.ts +20 -0
  196. package/dist/modules/rendering/styles/InlineStyleEmitter.d.ts.map +1 -0
  197. package/dist/modules/rendering/styles/InlineStyleEmitter.js +44 -0
  198. package/dist/modules/rendering/styles/InlineStyleEmitter.js.map +1 -0
  199. package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.d.ts +15 -0
  200. package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.d.ts.map +1 -0
  201. package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.js +33 -0
  202. package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.js.map +1 -0
  203. package/dist/modules/rendering/{VideoFrameLayerClass.d.ts → styles/VideoFrameLayerBaselineCss.d.ts} +3 -10
  204. package/dist/modules/rendering/styles/VideoFrameLayerBaselineCss.d.ts.map +1 -0
  205. package/dist/modules/rendering/styles/VideoFrameLayerBaselineCss.js +15 -0
  206. package/dist/modules/rendering/styles/VideoFrameLayerBaselineCss.js.map +1 -0
  207. package/dist/modules/rendering/subtitle/AbstractAnim.d.ts +13 -0
  208. package/dist/modules/rendering/subtitle/AbstractAnim.d.ts.map +1 -0
  209. package/dist/modules/rendering/subtitle/AbstractAnim.js +2 -0
  210. package/dist/modules/rendering/subtitle/AbstractAnim.js.map +1 -0
  211. package/dist/modules/rendering/subtitle/ActiveRenderSession.d.ts +20 -0
  212. package/dist/modules/rendering/subtitle/ActiveRenderSession.d.ts.map +1 -0
  213. package/dist/modules/rendering/subtitle/ActiveRenderSession.js +31 -0
  214. package/dist/modules/rendering/subtitle/ActiveRenderSession.js.map +1 -0
  215. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.d.ts +21 -0
  216. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.d.ts.map +1 -0
  217. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.js +46 -0
  218. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.js.map +1 -0
  219. package/dist/modules/rendering/subtitle/AnimationProbe.d.ts +39 -0
  220. package/dist/modules/rendering/subtitle/AnimationProbe.d.ts.map +1 -0
  221. package/dist/modules/rendering/subtitle/AnimationProbe.js +203 -0
  222. package/dist/modules/rendering/subtitle/AnimationProbe.js.map +1 -0
  223. package/dist/modules/rendering/subtitle/AssetGroupBuilder.d.ts +15 -0
  224. package/dist/modules/rendering/subtitle/AssetGroupBuilder.d.ts.map +1 -0
  225. package/dist/modules/rendering/subtitle/AssetGroupBuilder.js +26 -0
  226. package/dist/modules/rendering/subtitle/AssetGroupBuilder.js.map +1 -0
  227. package/dist/modules/rendering/subtitle/BatchPlan.d.ts +32 -0
  228. package/dist/modules/rendering/subtitle/BatchPlan.d.ts.map +1 -0
  229. package/dist/modules/rendering/subtitle/BatchPlan.js +2 -0
  230. package/dist/modules/rendering/subtitle/BatchPlan.js.map +1 -0
  231. package/dist/modules/rendering/subtitle/BatchPlanner.d.ts +32 -0
  232. package/dist/modules/rendering/subtitle/BatchPlanner.d.ts.map +1 -0
  233. package/dist/modules/rendering/subtitle/BatchPlanner.js +93 -0
  234. package/dist/modules/rendering/subtitle/BatchPlanner.js.map +1 -0
  235. package/dist/modules/rendering/subtitle/PreparedStyle.d.ts +36 -0
  236. package/dist/modules/rendering/subtitle/PreparedStyle.d.ts.map +1 -0
  237. package/dist/modules/rendering/subtitle/PreparedStyle.js +2 -0
  238. package/dist/modules/rendering/subtitle/PreparedStyle.js.map +1 -0
  239. package/dist/modules/rendering/subtitle/PreparedStyleFactory.d.ts +31 -0
  240. package/dist/modules/rendering/subtitle/PreparedStyleFactory.d.ts.map +1 -0
  241. package/dist/modules/rendering/subtitle/PreparedStyleFactory.js +91 -0
  242. package/dist/modules/rendering/subtitle/PreparedStyleFactory.js.map +1 -0
  243. package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.d.ts +13 -0
  244. package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.d.ts.map +1 -0
  245. package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.js +24 -0
  246. package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.js.map +1 -0
  247. package/dist/modules/rendering/{SegmentPaintRegionResolver.d.ts → subtitle/SegmentPaintRegionResolver.d.ts} +1 -1
  248. package/dist/modules/rendering/subtitle/SegmentPaintRegionResolver.d.ts.map +1 -0
  249. package/dist/modules/rendering/{SegmentPaintRegionResolver.js → subtitle/SegmentPaintRegionResolver.js} +7 -4
  250. package/dist/modules/rendering/subtitle/SegmentPaintRegionResolver.js.map +1 -0
  251. package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.d.ts +45 -0
  252. package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.d.ts.map +1 -0
  253. package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.js +50 -0
  254. package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.js.map +1 -0
  255. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.d.ts +108 -0
  256. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.d.ts.map +1 -0
  257. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.js +246 -0
  258. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.js.map +1 -0
  259. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.d.ts +40 -0
  260. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.d.ts.map +1 -0
  261. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.js +132 -0
  262. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.js.map +1 -0
  263. package/dist/modules/rendering/subtitle/SpriteSheetCompositor.d.ts +48 -0
  264. package/dist/modules/rendering/subtitle/SpriteSheetCompositor.d.ts.map +1 -0
  265. package/dist/modules/rendering/subtitle/SpriteSheetCompositor.js +143 -0
  266. package/dist/modules/rendering/subtitle/SpriteSheetCompositor.js.map +1 -0
  267. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.d.ts +17 -0
  268. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.d.ts.map +1 -0
  269. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.js +58 -0
  270. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.js.map +1 -0
  271. package/dist/modules/rendering/subtitle/SvgFilterMaterializer.d.ts +20 -0
  272. package/dist/modules/rendering/subtitle/SvgFilterMaterializer.d.ts.map +1 -0
  273. package/dist/modules/rendering/subtitle/SvgFilterMaterializer.js +30 -0
  274. package/dist/modules/rendering/subtitle/SvgFilterMaterializer.js.map +1 -0
  275. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.d.ts +42 -0
  276. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.d.ts.map +1 -0
  277. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.js +121 -0
  278. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.js.map +1 -0
  279. package/dist/modules/rendering/types/AlignmentConfig.d.ts +33 -0
  280. package/dist/modules/rendering/types/AlignmentConfig.d.ts.map +1 -0
  281. package/dist/modules/rendering/types/AlignmentConfig.js +3 -0
  282. package/dist/modules/rendering/types/AlignmentConfig.js.map +1 -0
  283. package/dist/modules/rendering/types/BoxEdges.d.ts.map +1 -0
  284. package/dist/modules/rendering/types/BoxEdges.js.map +1 -0
  285. package/dist/modules/rendering/types/DecorationPlacementSide.d.ts +8 -0
  286. package/dist/modules/rendering/types/DecorationPlacementSide.d.ts.map +1 -0
  287. package/dist/modules/rendering/types/DecorationPlacementSide.js +2 -0
  288. package/dist/modules/rendering/types/DecorationPlacementSide.js.map +1 -0
  289. package/dist/modules/rendering/types/ElementRenderOverrides.d.ts +23 -0
  290. package/dist/modules/rendering/types/ElementRenderOverrides.d.ts.map +1 -0
  291. package/dist/modules/rendering/types/ElementRenderOverrides.js +52 -0
  292. package/dist/modules/rendering/types/ElementRenderOverrides.js.map +1 -0
  293. package/dist/modules/rendering/types/InlineStyleMap.d.ts.map +1 -0
  294. package/dist/modules/rendering/types/InlineStyleMap.js.map +1 -0
  295. package/dist/modules/rendering/{RenderingConfig.d.ts → types/RenderingConfig.d.ts} +8 -1
  296. package/dist/modules/rendering/types/RenderingConfig.d.ts.map +1 -0
  297. package/dist/modules/rendering/types/RenderingConfig.js.map +1 -0
  298. package/dist/modules/rendering/types/ScopedRenderOverride.d.ts +24 -0
  299. package/dist/modules/rendering/types/ScopedRenderOverride.d.ts.map +1 -0
  300. package/dist/modules/rendering/types/ScopedRenderOverride.js.map +1 -0
  301. package/dist/modules/rendering/types/VideoFrameSource.d.ts.map +1 -0
  302. package/dist/modules/rendering/types/VideoFrameSource.js.map +1 -0
  303. package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.d.ts +33 -0
  304. package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.d.ts.map +1 -0
  305. package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.js +100 -0
  306. package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.js.map +1 -0
  307. package/dist/modules/splitting/FixedTailLineSplitter.d.ts +29 -0
  308. package/dist/modules/splitting/FixedTailLineSplitter.d.ts.map +1 -0
  309. package/dist/modules/splitting/FixedTailLineSplitter.js +43 -0
  310. package/dist/modules/splitting/FixedTailLineSplitter.js.map +1 -0
  311. package/dist/modules/splitting/index.d.ts +4 -0
  312. package/dist/modules/splitting/index.d.ts.map +1 -1
  313. package/dist/modules/splitting/index.js +2 -0
  314. package/dist/modules/splitting/index.js.map +1 -1
  315. package/dist/modules/subtitle-file/AssSubtitleFileSerializer.d.ts +53 -0
  316. package/dist/modules/subtitle-file/AssSubtitleFileSerializer.d.ts.map +1 -0
  317. package/dist/modules/subtitle-file/AssSubtitleFileSerializer.js +133 -0
  318. package/dist/modules/subtitle-file/AssSubtitleFileSerializer.js.map +1 -0
  319. package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.d.ts +20 -0
  320. package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.d.ts.map +1 -0
  321. package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.js +31 -0
  322. package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.js.map +1 -0
  323. package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.d.ts +21 -0
  324. package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.d.ts.map +1 -0
  325. package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.js +33 -0
  326. package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.js.map +1 -0
  327. package/dist/modules/subtitle-file/SubtitleCue.d.ts +18 -0
  328. package/dist/modules/subtitle-file/SubtitleCue.d.ts.map +1 -0
  329. package/dist/modules/subtitle-file/SubtitleCue.js +20 -0
  330. package/dist/modules/subtitle-file/SubtitleCue.js.map +1 -0
  331. package/dist/modules/subtitle-file/SubtitleCueBuilder.d.ts +38 -0
  332. package/dist/modules/subtitle-file/SubtitleCueBuilder.d.ts.map +1 -0
  333. package/dist/modules/subtitle-file/SubtitleCueBuilder.js +106 -0
  334. package/dist/modules/subtitle-file/SubtitleCueBuilder.js.map +1 -0
  335. package/dist/modules/subtitle-file/SubtitleFileJob.d.ts +17 -0
  336. package/dist/modules/subtitle-file/SubtitleFileJob.d.ts.map +1 -0
  337. package/dist/modules/subtitle-file/SubtitleFileJob.js +2 -0
  338. package/dist/modules/subtitle-file/SubtitleFileJob.js.map +1 -0
  339. package/dist/modules/subtitle-file/SubtitleFileSerializer.d.ts +36 -0
  340. package/dist/modules/subtitle-file/SubtitleFileSerializer.d.ts.map +1 -0
  341. package/dist/modules/subtitle-file/SubtitleFileSerializer.js +44 -0
  342. package/dist/modules/subtitle-file/SubtitleFileSerializer.js.map +1 -0
  343. package/dist/modules/subtitle-file/SubtitleGranularity.d.ts +11 -0
  344. package/dist/modules/subtitle-file/SubtitleGranularity.d.ts.map +1 -0
  345. package/dist/modules/subtitle-file/SubtitleGranularity.js +2 -0
  346. package/dist/modules/subtitle-file/SubtitleGranularity.js.map +1 -0
  347. package/dist/modules/subtitle-file/SubtitleRow.d.ts +11 -0
  348. package/dist/modules/subtitle-file/SubtitleRow.d.ts.map +1 -0
  349. package/dist/modules/subtitle-file/SubtitleRow.js +14 -0
  350. package/dist/modules/subtitle-file/SubtitleRow.js.map +1 -0
  351. package/dist/modules/subtitle-file/SubtitleToken.d.ts +13 -0
  352. package/dist/modules/subtitle-file/SubtitleToken.d.ts.map +1 -0
  353. package/dist/modules/subtitle-file/SubtitleToken.js +15 -0
  354. package/dist/modules/subtitle-file/SubtitleToken.js.map +1 -0
  355. package/dist/modules/subtitle-file/TextSubtitleFileSerializer.d.ts +19 -0
  356. package/dist/modules/subtitle-file/TextSubtitleFileSerializer.d.ts.map +1 -0
  357. package/dist/modules/subtitle-file/TextSubtitleFileSerializer.js +24 -0
  358. package/dist/modules/subtitle-file/TextSubtitleFileSerializer.js.map +1 -0
  359. package/dist/modules/subtitle-file/Timecode.d.ts +20 -0
  360. package/dist/modules/subtitle-file/Timecode.d.ts.map +1 -0
  361. package/dist/modules/subtitle-file/Timecode.js +32 -0
  362. package/dist/modules/subtitle-file/Timecode.js.map +1 -0
  363. package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.d.ts +22 -0
  364. package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.d.ts.map +1 -0
  365. package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.js +57 -0
  366. package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.js.map +1 -0
  367. package/dist/modules/subtitle-file/VttSubtitleFileSerializer.d.ts +21 -0
  368. package/dist/modules/subtitle-file/VttSubtitleFileSerializer.d.ts.map +1 -0
  369. package/dist/modules/subtitle-file/VttSubtitleFileSerializer.js +39 -0
  370. package/dist/modules/subtitle-file/VttSubtitleFileSerializer.js.map +1 -0
  371. package/dist/modules/subtitle-file/index.d.ts +10 -0
  372. package/dist/modules/subtitle-file/index.d.ts.map +1 -0
  373. package/dist/modules/subtitle-file/index.js +8 -0
  374. package/dist/modules/subtitle-file/index.js.map +1 -0
  375. package/dist/modules/svg-filter/SvgFilter.d.ts +8 -1
  376. package/dist/modules/svg-filter/SvgFilter.d.ts.map +1 -1
  377. package/dist/modules/svg-filter/SvgFilter.js +9 -1
  378. package/dist/modules/svg-filter/SvgFilter.js.map +1 -1
  379. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.d.ts +1 -0
  380. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.d.ts.map +1 -1
  381. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.js +9 -1
  382. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.js.map +1 -1
  383. package/dist/modules/svg-filter/SvgFilterDefsRenderer.d.ts +44 -0
  384. package/dist/modules/svg-filter/SvgFilterDefsRenderer.d.ts.map +1 -0
  385. package/dist/modules/svg-filter/SvgFilterDefsRenderer.js +47 -0
  386. package/dist/modules/svg-filter/SvgFilterDefsRenderer.js.map +1 -0
  387. package/dist/modules/svg-filter/index.d.ts +2 -0
  388. package/dist/modules/svg-filter/index.d.ts.map +1 -1
  389. package/dist/modules/svg-filter/index.js +1 -0
  390. package/dist/modules/svg-filter/index.js.map +1 -1
  391. package/dist/modules/tagging/PauseTagger.d.ts +24 -0
  392. package/dist/modules/tagging/PauseTagger.d.ts.map +1 -0
  393. package/dist/modules/tagging/PauseTagger.js +42 -0
  394. package/dist/modules/tagging/PauseTagger.js.map +1 -0
  395. package/dist/modules/tagging/RegexTagger.js +1 -1
  396. package/dist/modules/tagging/RegexTagger.js.map +1 -1
  397. package/dist/modules/tagging/SpanTagger.js +1 -1
  398. package/dist/modules/tagging/SpanTagger.js.map +1 -1
  399. package/dist/modules/tagging/StructureTagger.d.ts +1 -2
  400. package/dist/modules/tagging/StructureTagger.d.ts.map +1 -1
  401. package/dist/modules/tagging/StructureTagger.js +12 -11
  402. package/dist/modules/tagging/StructureTagger.js.map +1 -1
  403. package/dist/modules/tagging/WordlistTagger.js +1 -1
  404. package/dist/modules/tagging/WordlistTagger.js.map +1 -1
  405. package/dist/modules/tagging/index.d.ts +2 -0
  406. package/dist/modules/tagging/index.d.ts.map +1 -1
  407. package/dist/modules/tagging/index.js +1 -0
  408. package/dist/modules/tagging/index.js.map +1 -1
  409. package/dist/modules/tags/AndTagCondition.d.ts +10 -0
  410. package/dist/modules/tags/AndTagCondition.d.ts.map +1 -0
  411. package/dist/modules/tags/AndTagCondition.js +14 -0
  412. package/dist/modules/tags/AndTagCondition.js.map +1 -0
  413. package/dist/modules/tags/HasTagCondition.d.ts +10 -0
  414. package/dist/modules/tags/HasTagCondition.d.ts.map +1 -0
  415. package/dist/modules/tags/HasTagCondition.js +18 -0
  416. package/dist/modules/tags/HasTagCondition.js.map +1 -0
  417. package/dist/modules/tags/NotTagCondition.d.ts +10 -0
  418. package/dist/modules/tags/NotTagCondition.d.ts.map +1 -0
  419. package/dist/modules/tags/NotTagCondition.js +14 -0
  420. package/dist/modules/tags/NotTagCondition.js.map +1 -0
  421. package/dist/modules/tags/OrTagCondition.d.ts +10 -0
  422. package/dist/modules/tags/OrTagCondition.d.ts.map +1 -0
  423. package/dist/modules/tags/OrTagCondition.js +14 -0
  424. package/dist/modules/tags/OrTagCondition.js.map +1 -0
  425. package/dist/modules/{document/Tag.d.ts → tags/StructureTag.d.ts} +4 -10
  426. package/dist/modules/tags/StructureTag.d.ts.map +1 -0
  427. package/dist/modules/{document/Tag.js → tags/StructureTag.js} +4 -19
  428. package/dist/modules/tags/StructureTag.js.map +1 -0
  429. package/dist/modules/tags/Tag.d.ts +8 -0
  430. package/dist/modules/tags/Tag.d.ts.map +1 -0
  431. package/dist/modules/tags/Tag.js +16 -0
  432. package/dist/modules/tags/Tag.js.map +1 -0
  433. package/dist/modules/tags/TagCondition.d.ts +12 -0
  434. package/dist/modules/tags/TagCondition.d.ts.map +1 -0
  435. package/dist/modules/tags/TagCondition.js +2 -0
  436. package/dist/modules/tags/TagCondition.js.map +1 -0
  437. package/dist/modules/tags/TagConditionParser.d.ts +21 -0
  438. package/dist/modules/tags/TagConditionParser.d.ts.map +1 -0
  439. package/dist/modules/tags/TagConditionParser.js +75 -0
  440. package/dist/modules/tags/TagConditionParser.js.map +1 -0
  441. package/dist/modules/tags/index.d.ts +9 -0
  442. package/dist/modules/tags/index.d.ts.map +1 -0
  443. package/dist/modules/tags/index.js +8 -0
  444. package/dist/modules/tags/index.js.map +1 -0
  445. package/dist/modules/transcription/AudioDecoder.d.ts +9 -4
  446. package/dist/modules/transcription/AudioDecoder.d.ts.map +1 -1
  447. package/dist/modules/transcription/BatchedMonoResampler.d.ts +45 -0
  448. package/dist/modules/transcription/BatchedMonoResampler.d.ts.map +1 -0
  449. package/dist/modules/transcription/BatchedMonoResampler.js +116 -0
  450. package/dist/modules/transcription/BatchedMonoResampler.js.map +1 -0
  451. package/dist/modules/transcription/CacheStorageModelFileCache.d.ts +38 -0
  452. package/dist/modules/transcription/CacheStorageModelFileCache.d.ts.map +1 -0
  453. package/dist/modules/transcription/CacheStorageModelFileCache.js +86 -0
  454. package/dist/modules/transcription/CacheStorageModelFileCache.js.map +1 -0
  455. package/dist/modules/transcription/CueDocumentBuilder.d.ts +40 -0
  456. package/dist/modules/transcription/CueDocumentBuilder.d.ts.map +1 -0
  457. package/dist/modules/transcription/CueDocumentBuilder.js +77 -0
  458. package/dist/modules/transcription/CueDocumentBuilder.js.map +1 -0
  459. package/dist/modules/transcription/CueParseResult.d.ts +16 -0
  460. package/dist/modules/transcription/CueParseResult.d.ts.map +1 -0
  461. package/dist/modules/transcription/CueParseResult.js +2 -0
  462. package/dist/modules/transcription/CueParseResult.js.map +1 -0
  463. package/dist/modules/transcription/CueTextTokenizer.d.ts +10 -0
  464. package/dist/modules/transcription/CueTextTokenizer.d.ts.map +1 -0
  465. package/dist/modules/transcription/CueTextTokenizer.js +21 -0
  466. package/dist/modules/transcription/CueTextTokenizer.js.map +1 -0
  467. package/dist/modules/transcription/CueTimecodeReader.d.ts +19 -0
  468. package/dist/modules/transcription/CueTimecodeReader.d.ts.map +1 -0
  469. package/dist/modules/transcription/CueTimecodeReader.js +45 -0
  470. package/dist/modules/transcription/CueTimecodeReader.js.map +1 -0
  471. package/dist/modules/transcription/CueWordReader.d.ts +12 -0
  472. package/dist/modules/transcription/CueWordReader.d.ts.map +1 -0
  473. package/dist/modules/transcription/CueWordReader.js +2 -0
  474. package/dist/modules/transcription/CueWordReader.js.map +1 -0
  475. package/dist/modules/transcription/EstimatedCueWordReader.d.ts +16 -0
  476. package/dist/modules/transcription/EstimatedCueWordReader.d.ts.map +1 -0
  477. package/dist/modules/transcription/EstimatedCueWordReader.js +17 -0
  478. package/dist/modules/transcription/EstimatedCueWordReader.js.map +1 -0
  479. package/dist/modules/transcription/LogitsProcessorListFactory.d.ts +43 -0
  480. package/dist/modules/transcription/LogitsProcessorListFactory.d.ts.map +1 -0
  481. package/dist/modules/transcription/LogitsProcessorListFactory.js +72 -0
  482. package/dist/modules/transcription/LogitsProcessorListFactory.js.map +1 -0
  483. package/dist/modules/transcription/MediaBunnyAudioDecoder.d.ts +27 -0
  484. package/dist/modules/transcription/MediaBunnyAudioDecoder.d.ts.map +1 -0
  485. package/dist/modules/transcription/MediaBunnyAudioDecoder.js +76 -0
  486. package/dist/modules/transcription/MediaBunnyAudioDecoder.js.map +1 -0
  487. package/dist/modules/transcription/ModelFileCache.d.ts +20 -0
  488. package/dist/modules/transcription/ModelFileCache.d.ts.map +1 -0
  489. package/dist/modules/transcription/ModelFileCache.js +2 -0
  490. package/dist/modules/transcription/ModelFileCache.js.map +1 -0
  491. package/dist/modules/transcription/ModelFileCacheUnavailableError.d.ts +18 -0
  492. package/dist/modules/transcription/ModelFileCacheUnavailableError.d.ts.map +1 -0
  493. package/dist/modules/transcription/ModelFileCacheUnavailableError.js +18 -0
  494. package/dist/modules/transcription/ModelFileCacheUnavailableError.js.map +1 -0
  495. package/dist/modules/transcription/SrtTranscriber.d.ts +24 -15
  496. package/dist/modules/transcription/SrtTranscriber.d.ts.map +1 -1
  497. package/dist/modules/transcription/SrtTranscriber.js +32 -90
  498. package/dist/modules/transcription/SrtTranscriber.js.map +1 -1
  499. package/dist/modules/transcription/SubtitleFileUnreadableError.d.ts +22 -0
  500. package/dist/modules/transcription/SubtitleFileUnreadableError.d.ts.map +1 -0
  501. package/dist/modules/transcription/SubtitleFileUnreadableError.js +22 -0
  502. package/dist/modules/transcription/SubtitleFileUnreadableError.js.map +1 -0
  503. package/dist/modules/transcription/TimestampedCueWordReader.d.ts +27 -0
  504. package/dist/modules/transcription/TimestampedCueWordReader.d.ts.map +1 -0
  505. package/dist/modules/transcription/TimestampedCueWordReader.js +52 -0
  506. package/dist/modules/transcription/TimestampedCueWordReader.js.map +1 -0
  507. package/dist/modules/transcription/Transcriber.d.ts +13 -0
  508. package/dist/modules/transcription/Transcriber.d.ts.map +1 -1
  509. package/dist/modules/transcription/TransformersRuntime.d.ts +50 -0
  510. package/dist/modules/transcription/TransformersRuntime.d.ts.map +1 -0
  511. package/dist/modules/transcription/TransformersRuntime.js +79 -0
  512. package/dist/modules/transcription/TransformersRuntime.js.map +1 -0
  513. package/dist/modules/transcription/VttTranscriber.d.ts +46 -0
  514. package/dist/modules/transcription/VttTranscriber.d.ts.map +1 -0
  515. package/dist/modules/transcription/VttTranscriber.js +80 -0
  516. package/dist/modules/transcription/VttTranscriber.js.map +1 -0
  517. package/dist/modules/transcription/WhisperChunkStitcher.d.ts +51 -0
  518. package/dist/modules/transcription/WhisperChunkStitcher.d.ts.map +1 -0
  519. package/dist/modules/transcription/WhisperChunkStitcher.js +101 -0
  520. package/dist/modules/transcription/WhisperChunkStitcher.js.map +1 -0
  521. package/dist/modules/transcription/WhisperDeviceUnavailableError.d.ts +16 -0
  522. package/dist/modules/transcription/WhisperDeviceUnavailableError.d.ts.map +1 -0
  523. package/dist/modules/transcription/WhisperDeviceUnavailableError.js +16 -0
  524. package/dist/modules/transcription/WhisperDeviceUnavailableError.js.map +1 -0
  525. package/dist/modules/transcription/WhisperInferenceFailedError.d.ts +16 -0
  526. package/dist/modules/transcription/WhisperInferenceFailedError.d.ts.map +1 -0
  527. package/dist/modules/transcription/WhisperInferenceFailedError.js +16 -0
  528. package/dist/modules/transcription/WhisperInferenceFailedError.js.map +1 -0
  529. package/dist/modules/transcription/WhisperInferenceProgressTracker.d.ts +61 -0
  530. package/dist/modules/transcription/WhisperInferenceProgressTracker.d.ts.map +1 -0
  531. package/dist/modules/transcription/WhisperInferenceProgressTracker.js +102 -0
  532. package/dist/modules/transcription/WhisperInferenceProgressTracker.js.map +1 -0
  533. package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.d.ts +38 -0
  534. package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.d.ts.map +1 -0
  535. package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.js +94 -0
  536. package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.js.map +1 -0
  537. package/dist/modules/transcription/WhisperModelLoadFailedError.d.ts +15 -0
  538. package/dist/modules/transcription/WhisperModelLoadFailedError.d.ts.map +1 -0
  539. package/dist/modules/transcription/WhisperModelLoadFailedError.js +15 -0
  540. package/dist/modules/transcription/WhisperModelLoadFailedError.js.map +1 -0
  541. package/dist/modules/transcription/WhisperTranscriber.d.ts +106 -7
  542. package/dist/modules/transcription/WhisperTranscriber.d.ts.map +1 -1
  543. package/dist/modules/transcription/WhisperTranscriber.js +312 -25
  544. package/dist/modules/transcription/WhisperTranscriber.js.map +1 -1
  545. package/dist/modules/transcription/WhisperWindowCoverage.d.ts +79 -0
  546. package/dist/modules/transcription/WhisperWindowCoverage.d.ts.map +1 -0
  547. package/dist/modules/transcription/WhisperWindowCoverage.js +129 -0
  548. package/dist/modules/transcription/WhisperWindowCoverage.js.map +1 -0
  549. package/dist/modules/transcription/WordTimingEstimator.d.ts +14 -0
  550. package/dist/modules/transcription/WordTimingEstimator.d.ts.map +1 -0
  551. package/dist/modules/transcription/WordTimingEstimator.js +33 -0
  552. package/dist/modules/transcription/WordTimingEstimator.js.map +1 -0
  553. package/dist/modules/transcription/index.d.ts +9 -2
  554. package/dist/modules/transcription/index.d.ts.map +1 -1
  555. package/dist/modules/transcription/index.js +6 -1
  556. package/dist/modules/transcription/index.js.map +1 -1
  557. package/dist/modules/video/RenderJob.d.ts +17 -0
  558. package/dist/modules/video/RenderJob.d.ts.map +1 -1
  559. package/dist/modules/video/RenderTimeMap.d.ts +50 -0
  560. package/dist/modules/video/RenderTimeMap.d.ts.map +1 -0
  561. package/dist/modules/video/RenderTimeMap.js +90 -0
  562. package/dist/modules/video/RenderTimeMap.js.map +1 -0
  563. package/dist/modules/video/index.d.ts +8 -1
  564. package/dist/modules/video/index.d.ts.map +1 -1
  565. package/dist/modules/video/index.js +4 -0
  566. package/dist/modules/video/index.js.map +1 -1
  567. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.d.ts +102 -0
  568. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.d.ts.map +1 -0
  569. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.js +207 -0
  570. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.js.map +1 -0
  571. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.d.ts +12 -52
  572. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.d.ts.map +1 -1
  573. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js +25 -190
  574. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js.map +1 -1
  575. package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.d.ts +7 -0
  576. package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.d.ts.map +1 -1
  577. package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.js +2 -2
  578. package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.js.map +1 -1
  579. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.d.ts +2 -0
  580. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.d.ts.map +1 -1
  581. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.js +8 -2
  582. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.js.map +1 -1
  583. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.d.ts +3 -0
  584. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.d.ts.map +1 -1
  585. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.js +9 -2
  586. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.js.map +1 -1
  587. package/dist/modules/video/mediabunny/codec/CodecPolicy.d.ts +7 -0
  588. package/dist/modules/video/mediabunny/codec/CodecPolicy.d.ts.map +1 -1
  589. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts +4 -2
  590. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts.map +1 -1
  591. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js +33 -23
  592. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js.map +1 -1
  593. package/dist/modules/video/mediabunny/frame/FrameCompositor.d.ts +9 -2
  594. package/dist/modules/video/mediabunny/frame/FrameCompositor.d.ts.map +1 -1
  595. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.d.ts +5 -2
  596. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.d.ts.map +1 -1
  597. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.js +8 -2
  598. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.js.map +1 -1
  599. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.d.ts +35 -0
  600. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.d.ts.map +1 -0
  601. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.js +69 -0
  602. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.js.map +1 -0
  603. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.d.ts +23 -0
  604. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.d.ts.map +1 -0
  605. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.js +23 -0
  606. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.js.map +1 -0
  607. package/dist/modules/video/mediabunny/painter/FramePainter.d.ts +46 -0
  608. package/dist/modules/video/mediabunny/painter/FramePainter.d.ts.map +1 -0
  609. package/dist/modules/video/mediabunny/painter/FramePainter.js +2 -0
  610. package/dist/modules/video/mediabunny/painter/FramePainter.js.map +1 -0
  611. package/dist/modules/video/mediabunny/painter/TopLayerSource.d.ts +24 -0
  612. package/dist/modules/video/mediabunny/painter/TopLayerSource.d.ts.map +1 -0
  613. package/dist/modules/video/mediabunny/painter/TopLayerSource.js +2 -0
  614. package/dist/modules/video/mediabunny/painter/TopLayerSource.js.map +1 -0
  615. package/package.json +13 -10
  616. package/dist/modules/document/Tag.d.ts.map +0 -1
  617. package/dist/modules/document/Tag.js.map +0 -1
  618. package/dist/modules/rendering/AlignmentConfig.d.ts +0 -21
  619. package/dist/modules/rendering/AlignmentConfig.d.ts.map +0 -1
  620. package/dist/modules/rendering/AlignmentConfig.js +0 -2
  621. package/dist/modules/rendering/AlignmentConfig.js.map +0 -1
  622. package/dist/modules/rendering/BoxEdges.d.ts.map +0 -1
  623. package/dist/modules/rendering/BoxEdges.js.map +0 -1
  624. package/dist/modules/rendering/ElementRenderOverrides.d.ts +0 -15
  625. package/dist/modules/rendering/ElementRenderOverrides.d.ts.map +0 -1
  626. package/dist/modules/rendering/ElementRenderOverrides.js +0 -24
  627. package/dist/modules/rendering/ElementRenderOverrides.js.map +0 -1
  628. package/dist/modules/rendering/InlineStyleMap.d.ts.map +0 -1
  629. package/dist/modules/rendering/InlineStyleMap.js.map +0 -1
  630. package/dist/modules/rendering/RenderingConfig.d.ts.map +0 -1
  631. package/dist/modules/rendering/RenderingConfig.js.map +0 -1
  632. package/dist/modules/rendering/ScopedRenderOverride.d.ts +0 -19
  633. package/dist/modules/rendering/ScopedRenderOverride.d.ts.map +0 -1
  634. package/dist/modules/rendering/ScopedRenderOverride.js.map +0 -1
  635. package/dist/modules/rendering/SegmentPaintRegionResolver.d.ts.map +0 -1
  636. package/dist/modules/rendering/SegmentPaintRegionResolver.js.map +0 -1
  637. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.d.ts +0 -58
  638. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.d.ts.map +0 -1
  639. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.js +0 -132
  640. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.js.map +0 -1
  641. package/dist/modules/rendering/VideoFrameLayerClass.d.ts.map +0 -1
  642. package/dist/modules/rendering/VideoFrameLayerClass.js +0 -21
  643. package/dist/modules/rendering/VideoFrameLayerClass.js.map +0 -1
  644. package/dist/modules/rendering/VideoFrameSource.d.ts.map +0 -1
  645. package/dist/modules/rendering/VideoFrameSource.js.map +0 -1
  646. package/dist/modules/transcription/BrowserAudioDecoder.d.ts +0 -13
  647. package/dist/modules/transcription/BrowserAudioDecoder.d.ts.map +0 -1
  648. package/dist/modules/transcription/BrowserAudioDecoder.js +0 -34
  649. package/dist/modules/transcription/BrowserAudioDecoder.js.map +0 -1
  650. /package/dist/modules/rendering/{BoxEdges.d.ts → types/BoxEdges.d.ts} +0 -0
  651. /package/dist/modules/rendering/{BoxEdges.js → types/BoxEdges.js} +0 -0
  652. /package/dist/modules/rendering/{InlineStyleMap.d.ts → types/InlineStyleMap.d.ts} +0 -0
  653. /package/dist/modules/rendering/{InlineStyleMap.js → types/InlineStyleMap.js} +0 -0
  654. /package/dist/modules/rendering/{RenderingConfig.js → types/RenderingConfig.js} +0 -0
  655. /package/dist/modules/rendering/{ScopedRenderOverride.js → types/ScopedRenderOverride.js} +0 -0
  656. /package/dist/modules/rendering/{VideoFrameSource.d.ts → types/VideoFrameSource.d.ts} +0 -0
  657. /package/dist/modules/rendering/{VideoFrameSource.js → types/VideoFrameSource.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SbvSubtitleFileSerializer.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SbvSubtitleFileSerializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAKtF;;;;;;;;GAQG;AACH,qBAAa,yBAA0B,SAAQ,sBAAsB;IACnE,QAAQ,CAAC,SAAS,gBAAgB;IAClC,QAAQ,CAAC,aAAa,SAAS;IAE/B,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,mBAAmB,GAAG,MAAM;IAK3F,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,QAAQ;CAKjB"}
@@ -0,0 +1,31 @@
1
+ import { SubtitleFileSerializer } from '../subtitle-file/SubtitleFileSerializer';
2
+ import { Timecode } from '../subtitle-file/Timecode';
3
+ const NEW_LINE = '\n';
4
+ /**
5
+ * Writes SubViewer (`.sbv`), one of the two shapes YouTube hands back
6
+ * when captions are downloaded: a `H:MM:SS.mmm,H:MM:SS.mmm` range on
7
+ * its own line, the rows beneath it, and a blank line between entries.
8
+ * There is no counter and the hour is not padded.
9
+ *
10
+ * Like SubRip, the format cannot time anything below an entry, so word
11
+ * granularity means one entry per word.
12
+ */
13
+ export class SbvSubtitleFileSerializer extends SubtitleFileSerializer {
14
+ mediaType = 'text/plain';
15
+ fileExtension = 'sbv';
16
+ write(cues, granularity) {
17
+ const entries = granularity === 'word' ? this.perWordCues(cues) : cues;
18
+ return entries.map((cue) => this.writeCue(cue)).join(NEW_LINE);
19
+ }
20
+ writeCue(cue) {
21
+ const range = `${this.timecode(cue.time.start)},${this.timecode(cue.time.end)}`;
22
+ const body = cue.rows.map((row) => row.text()).join(NEW_LINE);
23
+ return `${range}${NEW_LINE}${body}${NEW_LINE}`;
24
+ }
25
+ timecode(position) {
26
+ const at = new Timecode(position);
27
+ return `${at.hours}:${at.padded(at.minutes, 2)}:${at.padded(at.seconds, 2)}`
28
+ + `.${at.padded(at.milliseconds, 3)}`;
29
+ }
30
+ }
31
+ //# sourceMappingURL=SbvSubtitleFileSerializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SbvSubtitleFileSerializer.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SbvSubtitleFileSerializer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,MAAM,QAAQ,GAAG,IAAI,CAAC;AAEtB;;;;;;;;GAQG;AACH,MAAM,OAAO,yBAA0B,SAAQ,sBAAsB;IAC1D,SAAS,GAAG,YAAY,CAAC;IACzB,aAAa,GAAG,KAAK,CAAC;IAErB,KAAK,CAAC,IAAgC,EAAE,WAAgC;QAChF,MAAM,OAAO,GAAG,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACvE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IAEO,QAAQ,CAAC,GAAgB;QAC/B,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAChF,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9D,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,IAAI,GAAG,QAAQ,EAAE,CAAC;IACjD,CAAC;IAEO,QAAQ,CAAC,QAAgB;QAC/B,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE;cACxE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC;IAC1C,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ import type { SubtitleCue } from '../subtitle-file/SubtitleCue';
2
+ import { SubtitleFileSerializer } from '../subtitle-file/SubtitleFileSerializer';
3
+ import type { SubtitleGranularity } from '../subtitle-file/SubtitleGranularity';
4
+ /**
5
+ * Writes SubRip (`.srt`): a one-based counter, a
6
+ * `HH:MM:SS,mmm --> HH:MM:SS,mmm` range, and the entry's rows, with a
7
+ * blank line between blocks.
8
+ *
9
+ * The format has no way to time anything below an entry, so word
10
+ * granularity is paid for in entries: one per word, which multiplies
11
+ * the file's length several times over. Every player understands the
12
+ * result, which is the reason to accept the cost.
13
+ */
14
+ export declare class SrtSubtitleFileSerializer extends SubtitleFileSerializer {
15
+ readonly mediaType = "application/x-subrip";
16
+ readonly fileExtension = "srt";
17
+ protected write(cues: ReadonlyArray<SubtitleCue>, granularity: SubtitleGranularity): string;
18
+ private writeCue;
19
+ private timecode;
20
+ }
21
+ //# sourceMappingURL=SrtSubtitleFileSerializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SrtSubtitleFileSerializer.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SrtSubtitleFileSerializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAMtF;;;;;;;;;GASG;AACH,qBAAa,yBAA0B,SAAQ,sBAAsB;IACnE,QAAQ,CAAC,SAAS,0BAA0B;IAC5C,QAAQ,CAAC,aAAa,SAAS;IAE/B,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,mBAAmB,GAAG,MAAM;IAK3F,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,QAAQ;CAKjB"}
@@ -0,0 +1,33 @@
1
+ import { SubtitleFileSerializer } from '../subtitle-file/SubtitleFileSerializer';
2
+ import { Timecode } from '../subtitle-file/Timecode';
3
+ /** SubRip separates rows and blocks with CRLF, and readers are strict about it. */
4
+ const NEW_LINE = '\r\n';
5
+ /**
6
+ * Writes SubRip (`.srt`): a one-based counter, a
7
+ * `HH:MM:SS,mmm --> HH:MM:SS,mmm` range, and the entry's rows, with a
8
+ * blank line between blocks.
9
+ *
10
+ * The format has no way to time anything below an entry, so word
11
+ * granularity is paid for in entries: one per word, which multiplies
12
+ * the file's length several times over. Every player understands the
13
+ * result, which is the reason to accept the cost.
14
+ */
15
+ export class SrtSubtitleFileSerializer extends SubtitleFileSerializer {
16
+ mediaType = 'application/x-subrip';
17
+ fileExtension = 'srt';
18
+ write(cues, granularity) {
19
+ const entries = granularity === 'word' ? this.perWordCues(cues) : cues;
20
+ return entries.map((cue, index) => this.writeCue(cue, index + 1)).join(NEW_LINE);
21
+ }
22
+ writeCue(cue, position) {
23
+ const range = `${this.timecode(cue.time.start)} --> ${this.timecode(cue.time.end)}`;
24
+ const body = cue.rows.map((row) => row.text()).join(NEW_LINE);
25
+ return `${position}${NEW_LINE}${range}${NEW_LINE}${body}${NEW_LINE}`;
26
+ }
27
+ timecode(position) {
28
+ const at = new Timecode(position);
29
+ return `${at.padded(at.hours, 2)}:${at.padded(at.minutes, 2)}:${at.padded(at.seconds, 2)}`
30
+ + `,${at.padded(at.milliseconds, 3)}`;
31
+ }
32
+ }
33
+ //# sourceMappingURL=SrtSubtitleFileSerializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SrtSubtitleFileSerializer.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SrtSubtitleFileSerializer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,mFAAmF;AACnF,MAAM,QAAQ,GAAG,MAAM,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,OAAO,yBAA0B,SAAQ,sBAAsB;IAC1D,SAAS,GAAG,sBAAsB,CAAC;IACnC,aAAa,GAAG,KAAK,CAAC;IAErB,KAAK,CAAC,IAAgC,EAAE,WAAgC;QAChF,MAAM,OAAO,GAAG,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACvE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnF,CAAC;IAEO,QAAQ,CAAC,GAAgB,EAAE,QAAgB;QACjD,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACpF,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9D,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,IAAI,GAAG,QAAQ,EAAE,CAAC;IACvE,CAAC;IAEO,QAAQ,CAAC,QAAgB;QAC/B,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE;cACtF,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC;IAC1C,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import type { TimeFragment } from '../document/TimeFragment';
2
+ import type { SubtitleRow } from '../subtitle-file/SubtitleRow';
3
+ import type { SubtitleToken } from '../subtitle-file/SubtitleToken';
4
+ /**
5
+ * One timed entry of a subtitle file: the window it occupies and the
6
+ * rows shown inside it.
7
+ *
8
+ * A cue always covers a window of positive length and holds at least
9
+ * one row. Text carries no markup — escaping and joining are format
10
+ * concerns.
11
+ */
12
+ export declare class SubtitleCue {
13
+ readonly time: TimeFragment;
14
+ readonly rows: ReadonlyArray<SubtitleRow>;
15
+ constructor(time: TimeFragment, rows: ReadonlyArray<SubtitleRow>);
16
+ tokens(): ReadonlyArray<SubtitleToken>;
17
+ }
18
+ //# sourceMappingURL=SubtitleCue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleCue.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleCue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAE1E;;;;;;;GAOG;AACH,qBAAa,WAAW;IAEpB,QAAQ,CAAC,IAAI,EAAE,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC;gBADhC,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC;IAG3C,MAAM,IAAI,aAAa,CAAC,aAAa,CAAC;CAGvC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * One timed entry of a subtitle file: the window it occupies and the
3
+ * rows shown inside it.
4
+ *
5
+ * A cue always covers a window of positive length and holds at least
6
+ * one row. Text carries no markup — escaping and joining are format
7
+ * concerns.
8
+ */
9
+ export class SubtitleCue {
10
+ time;
11
+ rows;
12
+ constructor(time, rows) {
13
+ this.time = time;
14
+ this.rows = rows;
15
+ }
16
+ tokens() {
17
+ return this.rows.flatMap((row) => [...row.tokens]);
18
+ }
19
+ }
20
+ //# sourceMappingURL=SubtitleCue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleCue.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleCue.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,MAAM,OAAO,WAAW;IAEX;IACA;IAFX,YACW,IAAkB,EAClB,IAAgC;QADhC,SAAI,GAAJ,IAAI,CAAc;QAClB,SAAI,GAAJ,IAAI,CAA4B;IACxC,CAAC;IAEJ,MAAM;QACJ,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACrD,CAAC;CACF"}
@@ -0,0 +1,38 @@
1
+ import type { Document } from '../document/Document';
2
+ import { type TimeRange } from '../video/RenderTimeMap';
3
+ import { SubtitleCue } from '../subtitle-file/SubtitleCue';
4
+ /**
5
+ * Turns a document into the ordered, self-consistent cue list every
6
+ * subtitle format is written from, so no format has to rediscover the
7
+ * same corrections:
8
+ *
9
+ * - Cues come out sorted by start, because document order is not time
10
+ * order and segments may overlap.
11
+ * - A segment holding an explicit time keeps it, so a phrase held on
12
+ * screen past its narration lasts as long in the file.
13
+ * - Words with no text drop out, and so does anything left covering an
14
+ * empty window — a window of no length never becomes current during
15
+ * playback, so an entry for it is one no player would ever show.
16
+ * - Excluded windows rebase every time, cue and token alike, onto the
17
+ * timeline a render leaves behind.
18
+ *
19
+ * Text comes from each word's `text` rather than its `displayText`: a
20
+ * subtitle file is read back as content, and the styling passes that
21
+ * rewrite `displayText` state a look rather than a correction.
22
+ */
23
+ export declare class SubtitleCueBuilder {
24
+ build(document: Document, skipRanges: ReadonlyArray<TimeRange>): ReadonlyArray<SubtitleCue>;
25
+ private buildCue;
26
+ private buildRows;
27
+ private buildTokens;
28
+ private resolveTime;
29
+ /**
30
+ * Word windows are not guaranteed to be sorted or contiguous, so the
31
+ * span is the outer envelope rather than the first and last entries.
32
+ */
33
+ private spanOf;
34
+ private rebase;
35
+ private rebaseRows;
36
+ private rebaseFragment;
37
+ }
38
+ //# sourceMappingURL=SubtitleCueBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleCueBuilder.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleCueBuilder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAIjE;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,kBAAkB;IAE7B,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC;IAW3F,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,WAAW;IAMnB;;;OAGG;IACH,OAAO,CAAC,MAAM;IAYd,OAAO,CAAC,MAAM;IAad,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,cAAc;CAMvB"}
@@ -0,0 +1,106 @@
1
+ import { TimeFragment } from '../document/TimeFragment';
2
+ import { RenderTimeMap } from '../video/RenderTimeMap';
3
+ import { SubtitleCue } from '../subtitle-file/SubtitleCue';
4
+ import { SubtitleRow } from '../subtitle-file/SubtitleRow';
5
+ import { SubtitleToken } from '../subtitle-file/SubtitleToken';
6
+ /**
7
+ * Turns a document into the ordered, self-consistent cue list every
8
+ * subtitle format is written from, so no format has to rediscover the
9
+ * same corrections:
10
+ *
11
+ * - Cues come out sorted by start, because document order is not time
12
+ * order and segments may overlap.
13
+ * - A segment holding an explicit time keeps it, so a phrase held on
14
+ * screen past its narration lasts as long in the file.
15
+ * - Words with no text drop out, and so does anything left covering an
16
+ * empty window — a window of no length never becomes current during
17
+ * playback, so an entry for it is one no player would ever show.
18
+ * - Excluded windows rebase every time, cue and token alike, onto the
19
+ * timeline a render leaves behind.
20
+ *
21
+ * Text comes from each word's `text` rather than its `displayText`: a
22
+ * subtitle file is read back as content, and the styling passes that
23
+ * rewrite `displayText` state a look rather than a correction.
24
+ */
25
+ export class SubtitleCueBuilder {
26
+ build(document, skipRanges) {
27
+ const cues = [];
28
+ for (const segment of document.getSegments()) {
29
+ const cue = this.buildCue(segment);
30
+ if (cue)
31
+ cues.push(cue);
32
+ }
33
+ const ordered = cues.sort((a, b) => a.time.start - b.time.start);
34
+ if (skipRanges.length === 0)
35
+ return ordered;
36
+ return this.rebase(ordered, new RenderTimeMap(skipRanges));
37
+ }
38
+ buildCue(segment) {
39
+ const rows = this.buildRows(segment);
40
+ if (rows.length === 0)
41
+ return null;
42
+ const time = this.resolveTime(segment, rows);
43
+ if (time.duration <= 0)
44
+ return null;
45
+ return new SubtitleCue(time, rows);
46
+ }
47
+ buildRows(segment) {
48
+ const rows = [];
49
+ for (const line of segment.lines) {
50
+ const tokens = this.buildTokens(line);
51
+ if (tokens.length > 0)
52
+ rows.push(new SubtitleRow(tokens));
53
+ }
54
+ return rows;
55
+ }
56
+ buildTokens(line) {
57
+ const tokens = [];
58
+ for (const word of line.words) {
59
+ const text = word.text.trim();
60
+ if (text.length > 0)
61
+ tokens.push(new SubtitleToken(text, word.time));
62
+ }
63
+ return tokens;
64
+ }
65
+ resolveTime(segment, rows) {
66
+ if (segment.customTime)
67
+ return segment.customTime;
68
+ if (segment.effectTime)
69
+ return segment.effectTime;
70
+ return this.spanOf(rows);
71
+ }
72
+ /**
73
+ * Word windows are not guaranteed to be sorted or contiguous, so the
74
+ * span is the outer envelope rather than the first and last entries.
75
+ */
76
+ spanOf(rows) {
77
+ let start = Number.POSITIVE_INFINITY;
78
+ let end = Number.NEGATIVE_INFINITY;
79
+ for (const row of rows) {
80
+ for (const token of row.tokens) {
81
+ if (token.time.start < start)
82
+ start = token.time.start;
83
+ if (token.time.end > end)
84
+ end = token.time.end;
85
+ }
86
+ }
87
+ return new TimeFragment(start, end);
88
+ }
89
+ rebase(cues, timeMap) {
90
+ const rebased = [];
91
+ for (const cue of cues) {
92
+ const time = this.rebaseFragment(cue.time, timeMap);
93
+ if (time.duration <= 0)
94
+ continue;
95
+ rebased.push(new SubtitleCue(time, this.rebaseRows(cue.rows, timeMap)));
96
+ }
97
+ return rebased;
98
+ }
99
+ rebaseRows(rows, timeMap) {
100
+ return rows.map((row) => new SubtitleRow(row.tokens.map((token) => new SubtitleToken(token.text, this.rebaseFragment(token.time, timeMap)))));
101
+ }
102
+ rebaseFragment(fragment, timeMap) {
103
+ return new TimeFragment(timeMap.toOutputTime(fragment.start), timeMap.toOutputTime(fragment.end));
104
+ }
105
+ }
106
+ //# sourceMappingURL=SubtitleCueBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleCueBuilder.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleCueBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAI9D,OAAO,EAAE,aAAa,EAAkB,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,kBAAkB;IAE7B,KAAK,CAAC,QAAkB,EAAE,UAAoC;QAC5D,MAAM,IAAI,GAAkB,EAAE,CAAC;QAC/B,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;YAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACnC,IAAI,GAAG;gBAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,OAAO,CAAC;QAC5C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEO,QAAQ,CAAC,OAAgB;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACrC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QACnC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QACpC,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IAEO,SAAS,CAAC,OAAgB;QAChC,MAAM,IAAI,GAAkB,EAAE,CAAC;QAC/B,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YACjC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACtC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;gBAAE,IAAI,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,WAAW,CAAC,IAAU;QAC5B,MAAM,MAAM,GAAoB,EAAE,CAAC;QACnC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YAC9B,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;gBAAE,MAAM,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,WAAW,CAAC,OAAgB,EAAE,IAAgC;QACpE,IAAI,OAAO,CAAC,UAAU;YAAE,OAAO,OAAO,CAAC,UAAU,CAAC;QAClD,IAAI,OAAO,CAAC,UAAU;YAAE,OAAO,OAAO,CAAC,UAAU,CAAC;QAClD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,IAAgC;QAC7C,IAAI,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;QACrC,IAAI,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;QACnC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;gBAC/B,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK;oBAAE,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;gBACvD,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG;oBAAE,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;YACjD,CAAC;QACH,CAAC;QACD,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACtC,CAAC;IAEO,MAAM,CACZ,IAAgC,EAChC,OAAsB;QAEtB,MAAM,OAAO,GAAkB,EAAE,CAAC;QAClC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACpD,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC;gBAAE,SAAS;YACjC,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,UAAU,CAChB,IAAgC,EAChC,OAAsB;QAEtB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,WAAW,CACtC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,aAAa,CACzC,KAAK,CAAC,IAAI,EACV,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CACzC,CAAC,CACH,CAAC,CAAC;IACL,CAAC;IAEO,cAAc,CAAC,QAAsB,EAAE,OAAsB;QACnE,OAAO,IAAI,YAAY,CACrB,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CACnC,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ import type { Document } from '../document/Document';
2
+ import type { TimeRange } from '../video/RenderTimeMap';
3
+ import type { SubtitleGranularity } from '../subtitle-file/SubtitleGranularity';
4
+ /**
5
+ * Everything a subtitle file is written from.
6
+ *
7
+ * `skipRanges` names the windows a render of the same document leaves
8
+ * out, and must match the ones handed to the renderer. The file is
9
+ * written on the timeline those exclusions produce, so both outputs
10
+ * line up against the same footage; omit it when nothing is excluded.
11
+ */
12
+ export interface SubtitleFileJob {
13
+ readonly document: Document;
14
+ readonly granularity: SubtitleGranularity;
15
+ readonly skipRanges?: ReadonlyArray<TimeRange>;
16
+ }
17
+ //# sourceMappingURL=SubtitleFileJob.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleFileJob.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleFileJob.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAEtF;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CAChD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SubtitleFileJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleFileJob.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleFileJob.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ import { SubtitleCue } from '../subtitle-file/SubtitleCue';
2
+ import type { SubtitleFileJob } from '../subtitle-file/SubtitleFileJob';
3
+ import type { SubtitleGranularity } from '../subtitle-file/SubtitleGranularity';
4
+ /**
5
+ * Writes a document out as one subtitle file format.
6
+ *
7
+ * The declared media type and extension travel with the serializer, so
8
+ * everything a caller needs in order to hand the result to a user comes
9
+ * from the object that produced it.
10
+ *
11
+ * Every format is written from the same corrected view of the document,
12
+ * which is why the shared preparation lives here and subclasses are
13
+ * left with nothing but their own syntax. What differs is how far a
14
+ * format can honour `granularity`: some carry word timing inside a
15
+ * normal entry, some can only reach it by emitting one entry per word,
16
+ * and some carry no timing at all.
17
+ *
18
+ * A document with nothing to show yields an empty body rather than an
19
+ * error.
20
+ */
21
+ export declare abstract class SubtitleFileSerializer {
22
+ private readonly cueBuilder;
23
+ /** Media type of the produced text. */
24
+ abstract readonly mediaType: string;
25
+ /** Filename extension, without the leading dot. */
26
+ abstract readonly fileExtension: string;
27
+ serialize(job: SubtitleFileJob): string;
28
+ protected abstract write(cues: ReadonlyArray<SubtitleCue>, granularity: SubtitleGranularity): string;
29
+ /**
30
+ * The same content cut down to one entry per word, for a format whose
31
+ * only way to express word timing is to multiply its entries. Words
32
+ * covering an empty window drop out, since no player would show them.
33
+ */
34
+ protected perWordCues(cues: ReadonlyArray<SubtitleCue>): ReadonlyArray<SubtitleCue>;
35
+ }
36
+ //# sourceMappingURL=SubtitleFileSerializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleFileSerializer.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleFileSerializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAGjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAEtF;;;;;;;;;;;;;;;;GAgBG;AACH,8BAAsB,sBAAsB;IAC1C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA4B;IAEvD,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAEpC,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAExC,SAAS,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM;IAKvC,SAAS,CAAC,QAAQ,CAAC,KAAK,CACtB,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAChC,WAAW,EAAE,mBAAmB,GAC/B,MAAM;IAET;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC;CAUpF"}
@@ -0,0 +1,44 @@
1
+ import { SubtitleCue } from '../subtitle-file/SubtitleCue';
2
+ import { SubtitleCueBuilder } from '../subtitle-file/SubtitleCueBuilder';
3
+ import { SubtitleRow } from '../subtitle-file/SubtitleRow';
4
+ /**
5
+ * Writes a document out as one subtitle file format.
6
+ *
7
+ * The declared media type and extension travel with the serializer, so
8
+ * everything a caller needs in order to hand the result to a user comes
9
+ * from the object that produced it.
10
+ *
11
+ * Every format is written from the same corrected view of the document,
12
+ * which is why the shared preparation lives here and subclasses are
13
+ * left with nothing but their own syntax. What differs is how far a
14
+ * format can honour `granularity`: some carry word timing inside a
15
+ * normal entry, some can only reach it by emitting one entry per word,
16
+ * and some carry no timing at all.
17
+ *
18
+ * A document with nothing to show yields an empty body rather than an
19
+ * error.
20
+ */
21
+ export class SubtitleFileSerializer {
22
+ cueBuilder = new SubtitleCueBuilder();
23
+ serialize(job) {
24
+ const cues = this.cueBuilder.build(job.document, job.skipRanges ?? []);
25
+ return this.write(cues, job.granularity);
26
+ }
27
+ /**
28
+ * The same content cut down to one entry per word, for a format whose
29
+ * only way to express word timing is to multiply its entries. Words
30
+ * covering an empty window drop out, since no player would show them.
31
+ */
32
+ perWordCues(cues) {
33
+ const perWord = [];
34
+ for (const cue of cues) {
35
+ for (const token of cue.tokens()) {
36
+ if (token.time.duration <= 0)
37
+ continue;
38
+ perWord.push(new SubtitleCue(token.time, [new SubtitleRow([token])]));
39
+ }
40
+ }
41
+ return perWord;
42
+ }
43
+ }
44
+ //# sourceMappingURL=SubtitleFileSerializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleFileSerializer.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleFileSerializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAIjE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAgB,sBAAsB;IACzB,UAAU,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAQvD,SAAS,CAAC,GAAoB;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QACvE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IAOD;;;;OAIG;IACO,WAAW,CAAC,IAAgC;QACpD,MAAM,OAAO,GAAkB,EAAE,CAAC;QAClC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC;gBACjC,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC;oBAAE,SAAS;gBACvC,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * How precisely the caller wants timing represented in the file.
3
+ *
4
+ * `segment` times whole phrases, the shape every player expects.
5
+ * `word` asks for timing down to each word; a format satisfies that
6
+ * however it can, so the cost differs sharply between formats — some
7
+ * carry word timing inside a normal entry, others can only reach it by
8
+ * emitting one entry per word.
9
+ */
10
+ export type SubtitleGranularity = 'segment' | 'word';
11
+ //# sourceMappingURL=SubtitleGranularity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleGranularity.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleGranularity.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SubtitleGranularity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleGranularity.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleGranularity.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { SubtitleToken } from '../subtitle-file/SubtitleToken';
2
+ /**
3
+ * One visual line inside a subtitle entry. Always holds at least one
4
+ * token, and its tokens are in reading order.
5
+ */
6
+ export declare class SubtitleRow {
7
+ readonly tokens: ReadonlyArray<SubtitleToken>;
8
+ constructor(tokens: ReadonlyArray<SubtitleToken>);
9
+ text(): string;
10
+ }
11
+ //# sourceMappingURL=SubtitleRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleRow.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleRow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAE1E;;;GAGG;AACH,qBAAa,WAAW;IACV,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC;gBAApC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC;IAEzD,IAAI,IAAI,MAAM;CAGf"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * One visual line inside a subtitle entry. Always holds at least one
3
+ * token, and its tokens are in reading order.
4
+ */
5
+ export class SubtitleRow {
6
+ tokens;
7
+ constructor(tokens) {
8
+ this.tokens = tokens;
9
+ }
10
+ text() {
11
+ return this.tokens.map((token) => token.text).join(' ');
12
+ }
13
+ }
14
+ //# sourceMappingURL=SubtitleRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleRow.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleRow.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,OAAO,WAAW;IACD;IAArB,YAAqB,MAAoC;QAApC,WAAM,GAAN,MAAM,CAA8B;IAAG,CAAC;IAE7D,IAAI;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1D,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ import type { TimeFragment } from '../document/TimeFragment';
2
+ /**
3
+ * One spoken word inside a subtitle entry, with the window it occupies.
4
+ *
5
+ * Formats that can express timing below the entry level read the
6
+ * windows; the rest read only the text.
7
+ */
8
+ export declare class SubtitleToken {
9
+ readonly text: string;
10
+ readonly time: TimeFragment;
11
+ constructor(text: string, time: TimeFragment);
12
+ }
13
+ //# sourceMappingURL=SubtitleToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleToken.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE;;;;;GAKG;AACH,qBAAa,aAAa;IAEtB,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,YAAY;gBADlB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,YAAY;CAE9B"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * One spoken word inside a subtitle entry, with the window it occupies.
3
+ *
4
+ * Formats that can express timing below the entry level read the
5
+ * windows; the rest read only the text.
6
+ */
7
+ export class SubtitleToken {
8
+ text;
9
+ time;
10
+ constructor(text, time) {
11
+ this.text = text;
12
+ this.time = time;
13
+ }
14
+ }
15
+ //# sourceMappingURL=SubtitleToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubtitleToken.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/SubtitleToken.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,OAAO,aAAa;IAEb;IACA;IAFX,YACW,IAAY,EACZ,IAAkB;QADlB,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAc;IAC1B,CAAC;CACL"}
@@ -0,0 +1,19 @@
1
+ import type { SubtitleCue } from '../subtitle-file/SubtitleCue';
2
+ import { SubtitleFileSerializer } from '../subtitle-file/SubtitleFileSerializer';
3
+ import type { SubtitleGranularity } from '../subtitle-file/SubtitleGranularity';
4
+ /**
5
+ * Writes the plain transcript (`.txt`): one line per entry, no timing
6
+ * at all. For the reader whose errand is the words themselves — notes,
7
+ * an article, a translation pass — rather than anything played back.
8
+ *
9
+ * Rows are joined with a space rather than kept apart, because where a
10
+ * caption wrapped on screen says nothing about the text. Granularity is
11
+ * ignored: a file with no timing has no timing to make finer.
12
+ */
13
+ export declare class TextSubtitleFileSerializer extends SubtitleFileSerializer {
14
+ readonly mediaType = "text/plain";
15
+ readonly fileExtension = "txt";
16
+ protected write(cues: ReadonlyArray<SubtitleCue>, _granularity: SubtitleGranularity): string;
17
+ private writeCue;
18
+ }
19
+ //# sourceMappingURL=TextSubtitleFileSerializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextSubtitleFileSerializer.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/TextSubtitleFileSerializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAItF;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,SAAQ,sBAAsB;IACpE,QAAQ,CAAC,SAAS,gBAAgB;IAClC,QAAQ,CAAC,aAAa,SAAS;IAE/B,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,EAAE,YAAY,EAAE,mBAAmB,GAAG,MAAM;IAK5F,OAAO,CAAC,QAAQ;CAGjB"}
@@ -0,0 +1,24 @@
1
+ import { SubtitleFileSerializer } from '../subtitle-file/SubtitleFileSerializer';
2
+ const NEW_LINE = '\n';
3
+ /**
4
+ * Writes the plain transcript (`.txt`): one line per entry, no timing
5
+ * at all. For the reader whose errand is the words themselves — notes,
6
+ * an article, a translation pass — rather than anything played back.
7
+ *
8
+ * Rows are joined with a space rather than kept apart, because where a
9
+ * caption wrapped on screen says nothing about the text. Granularity is
10
+ * ignored: a file with no timing has no timing to make finer.
11
+ */
12
+ export class TextSubtitleFileSerializer extends SubtitleFileSerializer {
13
+ mediaType = 'text/plain';
14
+ fileExtension = 'txt';
15
+ write(cues, _granularity) {
16
+ if (cues.length === 0)
17
+ return '';
18
+ return `${cues.map((cue) => this.writeCue(cue)).join(NEW_LINE)}${NEW_LINE}`;
19
+ }
20
+ writeCue(cue) {
21
+ return cue.rows.map((row) => row.text()).join(' ');
22
+ }
23
+ }
24
+ //# sourceMappingURL=TextSubtitleFileSerializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextSubtitleFileSerializer.js","sourceRoot":"","sources":["../../../src/modules/subtitle-file/TextSubtitleFileSerializer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAGvF,MAAM,QAAQ,GAAG,IAAI,CAAC;AAEtB;;;;;;;;GAQG;AACH,MAAM,OAAO,0BAA2B,SAAQ,sBAAsB;IAC3D,SAAS,GAAG,YAAY,CAAC;IACzB,aAAa,GAAG,KAAK,CAAC;IAErB,KAAK,CAAC,IAAgC,EAAE,YAAiC;QACjF,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACjC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,QAAQ,EAAE,CAAC;IAC9E,CAAC;IAEO,QAAQ,CAAC,GAAgB;QAC/B,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrD,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * A position on the timeline broken into the parts a subtitle timecode
3
+ * is written from. Formats differ in separators, padding and precision,
4
+ * so the decomposition is shared and the assembly is not.
5
+ *
6
+ * A position before the start of the timeline clamps to zero, and the
7
+ * fractional part is rounded to whole milliseconds — finer detail than
8
+ * any of these formats can hold.
9
+ */
10
+ export declare class Timecode {
11
+ readonly hours: number;
12
+ readonly minutes: number;
13
+ readonly seconds: number;
14
+ readonly milliseconds: number;
15
+ constructor(positionSeconds: number);
16
+ /** Hundredths of a second, for formats that stop at that precision. */
17
+ centiseconds(): number;
18
+ padded(value: number, width: number): string;
19
+ }
20
+ //# sourceMappingURL=Timecode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timecode.d.ts","sourceRoot":"","sources":["../../../src/modules/subtitle-file/Timecode.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,qBAAa,QAAQ;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;gBAElB,eAAe,EAAE,MAAM;IAUnC,uEAAuE;IACvE,YAAY,IAAI,MAAM;IAItB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;CAG7C"}