@tscaps/engine 0.1.1

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 (483) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +349 -0
  3. package/dist/index.d.ts +12 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +12 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/modules/css/BrowserCssResourceEmbedder.d.ts +5 -0
  8. package/dist/modules/css/BrowserCssResourceEmbedder.d.ts.map +1 -0
  9. package/dist/modules/css/BrowserCssResourceEmbedder.js +41 -0
  10. package/dist/modules/css/BrowserCssResourceEmbedder.js.map +1 -0
  11. package/dist/modules/css/CssMinifier.d.ts +12 -0
  12. package/dist/modules/css/CssMinifier.d.ts.map +1 -0
  13. package/dist/modules/css/CssMinifier.js +47 -0
  14. package/dist/modules/css/CssMinifier.js.map +1 -0
  15. package/dist/modules/css/CssResourceEmbedder.d.ts +4 -0
  16. package/dist/modules/css/CssResourceEmbedder.d.ts.map +1 -0
  17. package/dist/modules/css/CssResourceEmbedder.js +2 -0
  18. package/dist/modules/css/CssResourceEmbedder.js.map +1 -0
  19. package/dist/modules/css/CssScoper.d.ts +16 -0
  20. package/dist/modules/css/CssScoper.d.ts.map +1 -0
  21. package/dist/modules/css/CssScoper.js +109 -0
  22. package/dist/modules/css/CssScoper.js.map +1 -0
  23. package/dist/modules/css/NoopCssResourceEmbedder.d.ts +12 -0
  24. package/dist/modules/css/NoopCssResourceEmbedder.d.ts.map +1 -0
  25. package/dist/modules/css/NoopCssResourceEmbedder.js +13 -0
  26. package/dist/modules/css/NoopCssResourceEmbedder.js.map +1 -0
  27. package/dist/modules/css/index.d.ts +6 -0
  28. package/dist/modules/css/index.d.ts.map +1 -0
  29. package/dist/modules/css/index.js +5 -0
  30. package/dist/modules/css/index.js.map +1 -0
  31. package/dist/modules/document/CssVariable.d.ts +46 -0
  32. package/dist/modules/document/CssVariable.d.ts.map +1 -0
  33. package/dist/modules/document/CssVariable.js +47 -0
  34. package/dist/modules/document/CssVariable.js.map +1 -0
  35. package/dist/modules/document/Document.d.ts +43 -0
  36. package/dist/modules/document/Document.d.ts.map +1 -0
  37. package/dist/modules/document/Document.js +86 -0
  38. package/dist/modules/document/Document.js.map +1 -0
  39. package/dist/modules/document/DocumentEditor.d.ts +111 -0
  40. package/dist/modules/document/DocumentEditor.d.ts.map +1 -0
  41. package/dist/modules/document/DocumentEditor.js +555 -0
  42. package/dist/modules/document/DocumentEditor.js.map +1 -0
  43. package/dist/modules/document/Letter.d.ts +17 -0
  44. package/dist/modules/document/Letter.d.ts.map +1 -0
  45. package/dist/modules/document/Letter.js +17 -0
  46. package/dist/modules/document/Letter.js.map +1 -0
  47. package/dist/modules/document/Line.d.ts +31 -0
  48. package/dist/modules/document/Line.d.ts.map +1 -0
  49. package/dist/modules/document/Line.js +94 -0
  50. package/dist/modules/document/Line.js.map +1 -0
  51. package/dist/modules/document/LineState.d.ts +6 -0
  52. package/dist/modules/document/LineState.d.ts.map +1 -0
  53. package/dist/modules/document/LineState.js +7 -0
  54. package/dist/modules/document/LineState.js.map +1 -0
  55. package/dist/modules/document/NarrationPace.d.ts +20 -0
  56. package/dist/modules/document/NarrationPace.d.ts.map +1 -0
  57. package/dist/modules/document/NarrationPace.js +60 -0
  58. package/dist/modules/document/NarrationPace.js.map +1 -0
  59. package/dist/modules/document/Section.d.ts +45 -0
  60. package/dist/modules/document/Section.d.ts.map +1 -0
  61. package/dist/modules/document/Section.js +94 -0
  62. package/dist/modules/document/Section.js.map +1 -0
  63. package/dist/modules/document/Segment.d.ts +40 -0
  64. package/dist/modules/document/Segment.d.ts.map +1 -0
  65. package/dist/modules/document/Segment.js +85 -0
  66. package/dist/modules/document/Segment.js.map +1 -0
  67. package/dist/modules/document/Tag.d.ts +24 -0
  68. package/dist/modules/document/Tag.d.ts.map +1 -0
  69. package/dist/modules/document/Tag.js +37 -0
  70. package/dist/modules/document/Tag.js.map +1 -0
  71. package/dist/modules/document/TimeFragment.d.ts +11 -0
  72. package/dist/modules/document/TimeFragment.d.ts.map +1 -0
  73. package/dist/modules/document/TimeFragment.js +29 -0
  74. package/dist/modules/document/TimeFragment.js.map +1 -0
  75. package/dist/modules/document/Word.d.ts +40 -0
  76. package/dist/modules/document/Word.d.ts.map +1 -0
  77. package/dist/modules/document/Word.js +114 -0
  78. package/dist/modules/document/Word.js.map +1 -0
  79. package/dist/modules/document/WordState.d.ts +6 -0
  80. package/dist/modules/document/WordState.d.ts.map +1 -0
  81. package/dist/modules/document/WordState.js +7 -0
  82. package/dist/modules/document/WordState.js.map +1 -0
  83. package/dist/modules/document/index.d.ts +14 -0
  84. package/dist/modules/document/index.d.ts.map +1 -0
  85. package/dist/modules/document/index.js +14 -0
  86. package/dist/modules/document/index.js.map +1 -0
  87. package/dist/modules/effect/CarryQuotesEffect.d.ts +47 -0
  88. package/dist/modules/effect/CarryQuotesEffect.d.ts.map +1 -0
  89. package/dist/modules/effect/CarryQuotesEffect.js +181 -0
  90. package/dist/modules/effect/CarryQuotesEffect.js.map +1 -0
  91. package/dist/modules/effect/Effect.d.ts +16 -0
  92. package/dist/modules/effect/Effect.d.ts.map +1 -0
  93. package/dist/modules/effect/Effect.js +2 -0
  94. package/dist/modules/effect/Effect.js.map +1 -0
  95. package/dist/modules/effect/GapFreeEffect.d.ts +24 -0
  96. package/dist/modules/effect/GapFreeEffect.d.ts.map +1 -0
  97. package/dist/modules/effect/GapFreeEffect.js +67 -0
  98. package/dist/modules/effect/GapFreeEffect.js.map +1 -0
  99. package/dist/modules/effect/RemovePunctuationEffect.d.ts +21 -0
  100. package/dist/modules/effect/RemovePunctuationEffect.d.ts.map +1 -0
  101. package/dist/modules/effect/RemovePunctuationEffect.js +52 -0
  102. package/dist/modules/effect/RemovePunctuationEffect.js.map +1 -0
  103. package/dist/modules/effect/SmartLowercaseEffect.d.ts +21 -0
  104. package/dist/modules/effect/SmartLowercaseEffect.d.ts.map +1 -0
  105. package/dist/modules/effect/SmartLowercaseEffect.js +45 -0
  106. package/dist/modules/effect/SmartLowercaseEffect.js.map +1 -0
  107. package/dist/modules/effect/SmartPunctuationEffect.d.ts +25 -0
  108. package/dist/modules/effect/SmartPunctuationEffect.d.ts.map +1 -0
  109. package/dist/modules/effect/SmartPunctuationEffect.js +68 -0
  110. package/dist/modules/effect/SmartPunctuationEffect.js.map +1 -0
  111. package/dist/modules/effect/index.d.ts +7 -0
  112. package/dist/modules/effect/index.d.ts.map +1 -0
  113. package/dist/modules/effect/index.js +6 -0
  114. package/dist/modules/effect/index.js.map +1 -0
  115. package/dist/modules/pipeline/PipelineProgress.d.ts +30 -0
  116. package/dist/modules/pipeline/PipelineProgress.d.ts.map +1 -0
  117. package/dist/modules/pipeline/PipelineProgress.js +2 -0
  118. package/dist/modules/pipeline/PipelineProgress.js.map +1 -0
  119. package/dist/modules/pipeline/RenderPipeline.d.ts +105 -0
  120. package/dist/modules/pipeline/RenderPipeline.d.ts.map +1 -0
  121. package/dist/modules/pipeline/RenderPipeline.js +232 -0
  122. package/dist/modules/pipeline/RenderPipeline.js.map +1 -0
  123. package/dist/modules/pipeline/RenderPipelineBuilder.d.ts +143 -0
  124. package/dist/modules/pipeline/RenderPipelineBuilder.d.ts.map +1 -0
  125. package/dist/modules/pipeline/RenderPipelineBuilder.js +317 -0
  126. package/dist/modules/pipeline/RenderPipelineBuilder.js.map +1 -0
  127. package/dist/modules/pipeline/index.d.ts +6 -0
  128. package/dist/modules/pipeline/index.d.ts.map +1 -0
  129. package/dist/modules/pipeline/index.js +3 -0
  130. package/dist/modules/pipeline/index.js.map +1 -0
  131. package/dist/modules/profiling/Profiler.d.ts +115 -0
  132. package/dist/modules/profiling/Profiler.d.ts.map +1 -0
  133. package/dist/modules/profiling/Profiler.js +316 -0
  134. package/dist/modules/profiling/Profiler.js.map +1 -0
  135. package/dist/modules/profiling/index.d.ts +2 -0
  136. package/dist/modules/profiling/index.d.ts.map +1 -0
  137. package/dist/modules/profiling/index.js +2 -0
  138. package/dist/modules/profiling/index.js.map +1 -0
  139. package/dist/modules/rendering/AlignmentConfig.d.ts +21 -0
  140. package/dist/modules/rendering/AlignmentConfig.d.ts.map +1 -0
  141. package/dist/modules/rendering/AlignmentConfig.js +2 -0
  142. package/dist/modules/rendering/AlignmentConfig.js.map +1 -0
  143. package/dist/modules/rendering/BoxEdges.d.ts +8 -0
  144. package/dist/modules/rendering/BoxEdges.d.ts.map +1 -0
  145. package/dist/modules/rendering/BoxEdges.js +2 -0
  146. package/dist/modules/rendering/BoxEdges.js.map +1 -0
  147. package/dist/modules/rendering/BrowserOverlayFrameRenderer.d.ts +12 -0
  148. package/dist/modules/rendering/BrowserOverlayFrameRenderer.d.ts.map +1 -0
  149. package/dist/modules/rendering/BrowserOverlayFrameRenderer.js +31 -0
  150. package/dist/modules/rendering/BrowserOverlayFrameRenderer.js.map +1 -0
  151. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts +57 -0
  152. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts.map +1 -0
  153. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js +775 -0
  154. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js.map +1 -0
  155. package/dist/modules/rendering/ElementRenderOverrides.d.ts +15 -0
  156. package/dist/modules/rendering/ElementRenderOverrides.d.ts.map +1 -0
  157. package/dist/modules/rendering/ElementRenderOverrides.js +24 -0
  158. package/dist/modules/rendering/ElementRenderOverrides.js.map +1 -0
  159. package/dist/modules/rendering/InlineStyleMap.d.ts +9 -0
  160. package/dist/modules/rendering/InlineStyleMap.d.ts.map +1 -0
  161. package/dist/modules/rendering/InlineStyleMap.js +2 -0
  162. package/dist/modules/rendering/InlineStyleMap.js.map +1 -0
  163. package/dist/modules/rendering/LayeredSubtitleFrame.d.ts +20 -0
  164. package/dist/modules/rendering/LayeredSubtitleFrame.d.ts.map +1 -0
  165. package/dist/modules/rendering/LayeredSubtitleFrame.js +36 -0
  166. package/dist/modules/rendering/LayeredSubtitleFrame.js.map +1 -0
  167. package/dist/modules/rendering/OverlayFrameRenderer.d.ts +27 -0
  168. package/dist/modules/rendering/OverlayFrameRenderer.d.ts.map +1 -0
  169. package/dist/modules/rendering/OverlayFrameRenderer.js +2 -0
  170. package/dist/modules/rendering/OverlayFrameRenderer.js.map +1 -0
  171. package/dist/modules/rendering/RenderingConfig.d.ts +22 -0
  172. package/dist/modules/rendering/RenderingConfig.d.ts.map +1 -0
  173. package/dist/modules/rendering/RenderingConfig.js +2 -0
  174. package/dist/modules/rendering/RenderingConfig.js.map +1 -0
  175. package/dist/modules/rendering/ScopedRenderOverride.d.ts +19 -0
  176. package/dist/modules/rendering/ScopedRenderOverride.d.ts.map +1 -0
  177. package/dist/modules/rendering/ScopedRenderOverride.js +2 -0
  178. package/dist/modules/rendering/ScopedRenderOverride.js.map +1 -0
  179. package/dist/modules/rendering/SegmentPaintRegionResolver.d.ts +41 -0
  180. package/dist/modules/rendering/SegmentPaintRegionResolver.d.ts.map +1 -0
  181. package/dist/modules/rendering/SegmentPaintRegionResolver.js +47 -0
  182. package/dist/modules/rendering/SegmentPaintRegionResolver.js.map +1 -0
  183. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.d.ts +58 -0
  184. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.d.ts.map +1 -0
  185. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.js +132 -0
  186. package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.js.map +1 -0
  187. package/dist/modules/rendering/SubtitleFrameRenderer.d.ts +111 -0
  188. package/dist/modules/rendering/SubtitleFrameRenderer.d.ts.map +1 -0
  189. package/dist/modules/rendering/SubtitleFrameRenderer.js +2 -0
  190. package/dist/modules/rendering/SubtitleFrameRenderer.js.map +1 -0
  191. package/dist/modules/rendering/VideoFrameLayerClass.d.ts +21 -0
  192. package/dist/modules/rendering/VideoFrameLayerClass.d.ts.map +1 -0
  193. package/dist/modules/rendering/VideoFrameLayerClass.js +21 -0
  194. package/dist/modules/rendering/VideoFrameLayerClass.js.map +1 -0
  195. package/dist/modules/rendering/VideoFrameSource.d.ts +29 -0
  196. package/dist/modules/rendering/VideoFrameSource.d.ts.map +1 -0
  197. package/dist/modules/rendering/VideoFrameSource.js +2 -0
  198. package/dist/modules/rendering/VideoFrameSource.js.map +1 -0
  199. package/dist/modules/rendering/index.d.ts +14 -0
  200. package/dist/modules/rendering/index.d.ts.map +1 -0
  201. package/dist/modules/rendering/index.js +6 -0
  202. package/dist/modules/rendering/index.js.map +1 -0
  203. package/dist/modules/splitting/BalancedLineSplitter.d.ts +24 -0
  204. package/dist/modules/splitting/BalancedLineSplitter.d.ts.map +1 -0
  205. package/dist/modules/splitting/BalancedLineSplitter.js +81 -0
  206. package/dist/modules/splitting/BalancedLineSplitter.js.map +1 -0
  207. package/dist/modules/splitting/BalancedPixelWidthLineSplitter.d.ts +31 -0
  208. package/dist/modules/splitting/BalancedPixelWidthLineSplitter.d.ts.map +1 -0
  209. package/dist/modules/splitting/BalancedPixelWidthLineSplitter.js +99 -0
  210. package/dist/modules/splitting/BalancedPixelWidthLineSplitter.js.map +1 -0
  211. package/dist/modules/splitting/BoundarySegmentSplitter.d.ts +19 -0
  212. package/dist/modules/splitting/BoundarySegmentSplitter.d.ts.map +1 -0
  213. package/dist/modules/splitting/BoundarySegmentSplitter.js +38 -0
  214. package/dist/modules/splitting/BoundarySegmentSplitter.js.map +1 -0
  215. package/dist/modules/splitting/CompositeSegmentSplitter.d.ts +8 -0
  216. package/dist/modules/splitting/CompositeSegmentSplitter.d.ts.map +1 -0
  217. package/dist/modules/splitting/CompositeSegmentSplitter.js +12 -0
  218. package/dist/modules/splitting/CompositeSegmentSplitter.js.map +1 -0
  219. package/dist/modules/splitting/DomProbeCanvasTextMeasurer.d.ts +56 -0
  220. package/dist/modules/splitting/DomProbeCanvasTextMeasurer.d.ts.map +1 -0
  221. package/dist/modules/splitting/DomProbeCanvasTextMeasurer.js +197 -0
  222. package/dist/modules/splitting/DomProbeCanvasTextMeasurer.js.map +1 -0
  223. package/dist/modules/splitting/GraphemeWordSplitter.d.ts +11 -0
  224. package/dist/modules/splitting/GraphemeWordSplitter.d.ts.map +1 -0
  225. package/dist/modules/splitting/GraphemeWordSplitter.js +12 -0
  226. package/dist/modules/splitting/GraphemeWordSplitter.js.map +1 -0
  227. package/dist/modules/splitting/LimitByCharsSegmentSplitter.d.ts +15 -0
  228. package/dist/modules/splitting/LimitByCharsSegmentSplitter.d.ts.map +1 -0
  229. package/dist/modules/splitting/LimitByCharsSegmentSplitter.js +64 -0
  230. package/dist/modules/splitting/LimitByCharsSegmentSplitter.js.map +1 -0
  231. package/dist/modules/splitting/LimitByScaledCharsSegmentSplitter.d.ts +30 -0
  232. package/dist/modules/splitting/LimitByScaledCharsSegmentSplitter.d.ts.map +1 -0
  233. package/dist/modules/splitting/LimitByScaledCharsSegmentSplitter.js +66 -0
  234. package/dist/modules/splitting/LimitByScaledCharsSegmentSplitter.js.map +1 -0
  235. package/dist/modules/splitting/LimitByWordsSegmentSplitter.d.ts +12 -0
  236. package/dist/modules/splitting/LimitByWordsSegmentSplitter.d.ts.map +1 -0
  237. package/dist/modules/splitting/LimitByWordsSegmentSplitter.js +25 -0
  238. package/dist/modules/splitting/LimitByWordsSegmentSplitter.js.map +1 -0
  239. package/dist/modules/splitting/LineSplitter.d.ts +10 -0
  240. package/dist/modules/splitting/LineSplitter.d.ts.map +1 -0
  241. package/dist/modules/splitting/LineSplitter.js +2 -0
  242. package/dist/modules/splitting/LineSplitter.js.map +1 -0
  243. package/dist/modules/splitting/PauseBasedSegmentSplitter.d.ts +24 -0
  244. package/dist/modules/splitting/PauseBasedSegmentSplitter.d.ts.map +1 -0
  245. package/dist/modules/splitting/PauseBasedSegmentSplitter.js +43 -0
  246. package/dist/modules/splitting/PauseBasedSegmentSplitter.js.map +1 -0
  247. package/dist/modules/splitting/SegmentSplitter.d.ts +10 -0
  248. package/dist/modules/splitting/SegmentSplitter.d.ts.map +1 -0
  249. package/dist/modules/splitting/SegmentSplitter.js +2 -0
  250. package/dist/modules/splitting/SegmentSplitter.js.map +1 -0
  251. package/dist/modules/splitting/SpeakerChangeSegmentSplitter.d.ts +17 -0
  252. package/dist/modules/splitting/SpeakerChangeSegmentSplitter.d.ts.map +1 -0
  253. package/dist/modules/splitting/SpeakerChangeSegmentSplitter.js +46 -0
  254. package/dist/modules/splitting/SpeakerChangeSegmentSplitter.js.map +1 -0
  255. package/dist/modules/splitting/TextMeasurer.d.ts +15 -0
  256. package/dist/modules/splitting/TextMeasurer.d.ts.map +1 -0
  257. package/dist/modules/splitting/TextMeasurer.js +2 -0
  258. package/dist/modules/splitting/TextMeasurer.js.map +1 -0
  259. package/dist/modules/splitting/WordSplitter.d.ts +8 -0
  260. package/dist/modules/splitting/WordSplitter.d.ts.map +1 -0
  261. package/dist/modules/splitting/WordSplitter.js +2 -0
  262. package/dist/modules/splitting/WordSplitter.js.map +1 -0
  263. package/dist/modules/splitting/index.d.ts +24 -0
  264. package/dist/modules/splitting/index.d.ts.map +1 -0
  265. package/dist/modules/splitting/index.js +12 -0
  266. package/dist/modules/splitting/index.js.map +1 -0
  267. package/dist/modules/svg-filter/SvgFilter.d.ts +16 -0
  268. package/dist/modules/svg-filter/SvgFilter.d.ts.map +1 -0
  269. package/dist/modules/svg-filter/SvgFilter.js +28 -0
  270. package/dist/modules/svg-filter/SvgFilter.js.map +1 -0
  271. package/dist/modules/svg-filter/SvgFilterBundle.d.ts +16 -0
  272. package/dist/modules/svg-filter/SvgFilterBundle.d.ts.map +1 -0
  273. package/dist/modules/svg-filter/SvgFilterBundle.js +20 -0
  274. package/dist/modules/svg-filter/SvgFilterBundle.js.map +1 -0
  275. package/dist/modules/svg-filter/SvgFilterDefinitions.d.ts +16 -0
  276. package/dist/modules/svg-filter/SvgFilterDefinitions.d.ts.map +1 -0
  277. package/dist/modules/svg-filter/SvgFilterDefinitions.js +25 -0
  278. package/dist/modules/svg-filter/SvgFilterDefinitions.js.map +1 -0
  279. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.d.ts +21 -0
  280. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.d.ts.map +1 -0
  281. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.js +50 -0
  282. package/dist/modules/svg-filter/SvgFilterDefinitionsParser.js.map +1 -0
  283. package/dist/modules/svg-filter/SvgFilterLengthResolver.d.ts +17 -0
  284. package/dist/modules/svg-filter/SvgFilterLengthResolver.d.ts.map +1 -0
  285. package/dist/modules/svg-filter/SvgFilterLengthResolver.js +27 -0
  286. package/dist/modules/svg-filter/SvgFilterLengthResolver.js.map +1 -0
  287. package/dist/modules/svg-filter/SvgFilterScope.d.ts +18 -0
  288. package/dist/modules/svg-filter/SvgFilterScope.d.ts.map +1 -0
  289. package/dist/modules/svg-filter/SvgFilterScope.js +28 -0
  290. package/dist/modules/svg-filter/SvgFilterScope.js.map +1 -0
  291. package/dist/modules/svg-filter/SvgFilterScopeProvider.d.ts +52 -0
  292. package/dist/modules/svg-filter/SvgFilterScopeProvider.d.ts.map +1 -0
  293. package/dist/modules/svg-filter/SvgFilterScopeProvider.js +2 -0
  294. package/dist/modules/svg-filter/SvgFilterScopeProvider.js.map +1 -0
  295. package/dist/modules/svg-filter/SvgFilterScoper.d.ts +60 -0
  296. package/dist/modules/svg-filter/SvgFilterScoper.d.ts.map +1 -0
  297. package/dist/modules/svg-filter/SvgFilterScoper.js +58 -0
  298. package/dist/modules/svg-filter/SvgFilterScoper.js.map +1 -0
  299. package/dist/modules/svg-filter/index.d.ts +10 -0
  300. package/dist/modules/svg-filter/index.d.ts.map +1 -0
  301. package/dist/modules/svg-filter/index.js +8 -0
  302. package/dist/modules/svg-filter/index.js.map +1 -0
  303. package/dist/modules/tagging/RegexTagger.d.ts +11 -0
  304. package/dist/modules/tagging/RegexTagger.d.ts.map +1 -0
  305. package/dist/modules/tagging/RegexTagger.js +32 -0
  306. package/dist/modules/tagging/RegexTagger.js.map +1 -0
  307. package/dist/modules/tagging/SpanTagger.d.ts +25 -0
  308. package/dist/modules/tagging/SpanTagger.d.ts.map +1 -0
  309. package/dist/modules/tagging/SpanTagger.js +73 -0
  310. package/dist/modules/tagging/SpanTagger.js.map +1 -0
  311. package/dist/modules/tagging/StructureTagger.d.ts +20 -0
  312. package/dist/modules/tagging/StructureTagger.d.ts.map +1 -0
  313. package/dist/modules/tagging/StructureTagger.js +74 -0
  314. package/dist/modules/tagging/StructureTagger.js.map +1 -0
  315. package/dist/modules/tagging/Tagger.d.ts +5 -0
  316. package/dist/modules/tagging/Tagger.d.ts.map +1 -0
  317. package/dist/modules/tagging/Tagger.js +5 -0
  318. package/dist/modules/tagging/Tagger.js.map +1 -0
  319. package/dist/modules/tagging/WordlistTagger.d.ts +11 -0
  320. package/dist/modules/tagging/WordlistTagger.d.ts.map +1 -0
  321. package/dist/modules/tagging/WordlistTagger.js +31 -0
  322. package/dist/modules/tagging/WordlistTagger.js.map +1 -0
  323. package/dist/modules/tagging/index.d.ts +6 -0
  324. package/dist/modules/tagging/index.d.ts.map +1 -0
  325. package/dist/modules/tagging/index.js +6 -0
  326. package/dist/modules/tagging/index.js.map +1 -0
  327. package/dist/modules/transcription/AudioDecoder.d.ts +11 -0
  328. package/dist/modules/transcription/AudioDecoder.d.ts.map +1 -0
  329. package/dist/modules/transcription/AudioDecoder.js +2 -0
  330. package/dist/modules/transcription/AudioDecoder.js.map +1 -0
  331. package/dist/modules/transcription/BrowserAudioDecoder.d.ts +13 -0
  332. package/dist/modules/transcription/BrowserAudioDecoder.d.ts.map +1 -0
  333. package/dist/modules/transcription/BrowserAudioDecoder.js +34 -0
  334. package/dist/modules/transcription/BrowserAudioDecoder.js.map +1 -0
  335. package/dist/modules/transcription/PassthroughTranscriber.d.ts +20 -0
  336. package/dist/modules/transcription/PassthroughTranscriber.d.ts.map +1 -0
  337. package/dist/modules/transcription/PassthroughTranscriber.js +23 -0
  338. package/dist/modules/transcription/PassthroughTranscriber.js.map +1 -0
  339. package/dist/modules/transcription/PreDecodedAudioDecoder.d.ts +12 -0
  340. package/dist/modules/transcription/PreDecodedAudioDecoder.d.ts.map +1 -0
  341. package/dist/modules/transcription/PreDecodedAudioDecoder.js +14 -0
  342. package/dist/modules/transcription/PreDecodedAudioDecoder.js.map +1 -0
  343. package/dist/modules/transcription/SrtTranscriber.d.ts +33 -0
  344. package/dist/modules/transcription/SrtTranscriber.d.ts.map +1 -0
  345. package/dist/modules/transcription/SrtTranscriber.js +111 -0
  346. package/dist/modules/transcription/SrtTranscriber.js.map +1 -0
  347. package/dist/modules/transcription/Transcriber.d.ts +23 -0
  348. package/dist/modules/transcription/Transcriber.d.ts.map +1 -0
  349. package/dist/modules/transcription/Transcriber.js +2 -0
  350. package/dist/modules/transcription/Transcriber.js.map +1 -0
  351. package/dist/modules/transcription/WhisperTranscriber.d.ts +44 -0
  352. package/dist/modules/transcription/WhisperTranscriber.d.ts.map +1 -0
  353. package/dist/modules/transcription/WhisperTranscriber.js +162 -0
  354. package/dist/modules/transcription/WhisperTranscriber.js.map +1 -0
  355. package/dist/modules/transcription/index.d.ts +8 -0
  356. package/dist/modules/transcription/index.d.ts.map +1 -0
  357. package/dist/modules/transcription/index.js +6 -0
  358. package/dist/modules/transcription/index.js.map +1 -0
  359. package/dist/modules/video/RenderJob.d.ts +95 -0
  360. package/dist/modules/video/RenderJob.d.ts.map +1 -0
  361. package/dist/modules/video/RenderJob.js +2 -0
  362. package/dist/modules/video/RenderJob.js.map +1 -0
  363. package/dist/modules/video/VideoRenderer.d.ts +5 -0
  364. package/dist/modules/video/VideoRenderer.d.ts.map +1 -0
  365. package/dist/modules/video/VideoRenderer.js +2 -0
  366. package/dist/modules/video/VideoRenderer.js.map +1 -0
  367. package/dist/modules/video/index.d.ts +33 -0
  368. package/dist/modules/video/index.d.ts.map +1 -0
  369. package/dist/modules/video/index.js +17 -0
  370. package/dist/modules/video/index.js.map +1 -0
  371. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.d.ts +69 -0
  372. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.d.ts.map +1 -0
  373. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js +206 -0
  374. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js.map +1 -0
  375. package/dist/modules/video/mediabunny/audio/AudioTrackBridge.d.ts +24 -0
  376. package/dist/modules/video/mediabunny/audio/AudioTrackBridge.d.ts.map +1 -0
  377. package/dist/modules/video/mediabunny/audio/AudioTrackBridge.js +2 -0
  378. package/dist/modules/video/mediabunny/audio/AudioTrackBridge.js.map +1 -0
  379. package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.d.ts +20 -0
  380. package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.d.ts.map +1 -0
  381. package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.js +2 -0
  382. package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.js.map +1 -0
  383. package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.d.ts +11 -0
  384. package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.d.ts.map +1 -0
  385. package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.js +32 -0
  386. package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.js.map +1 -0
  387. package/dist/modules/video/mediabunny/audio/DiscardAudioTrackBridge.d.ts +12 -0
  388. package/dist/modules/video/mediabunny/audio/DiscardAudioTrackBridge.d.ts.map +1 -0
  389. package/dist/modules/video/mediabunny/audio/DiscardAudioTrackBridge.js +14 -0
  390. package/dist/modules/video/mediabunny/audio/DiscardAudioTrackBridge.js.map +1 -0
  391. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.d.ts +28 -0
  392. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.d.ts.map +1 -0
  393. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.js +52 -0
  394. package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.js.map +1 -0
  395. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.d.ts +25 -0
  396. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.d.ts.map +1 -0
  397. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.js +52 -0
  398. package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.js.map +1 -0
  399. package/dist/modules/video/mediabunny/caption/BatchedSubtitleLayerSource.d.ts +32 -0
  400. package/dist/modules/video/mediabunny/caption/BatchedSubtitleLayerSource.d.ts.map +1 -0
  401. package/dist/modules/video/mediabunny/caption/BatchedSubtitleLayerSource.js +60 -0
  402. package/dist/modules/video/mediabunny/caption/BatchedSubtitleLayerSource.js.map +1 -0
  403. package/dist/modules/video/mediabunny/caption/ComposedSubtitleLayerSource.d.ts +27 -0
  404. package/dist/modules/video/mediabunny/caption/ComposedSubtitleLayerSource.d.ts.map +1 -0
  405. package/dist/modules/video/mediabunny/caption/ComposedSubtitleLayerSource.js +72 -0
  406. package/dist/modules/video/mediabunny/caption/ComposedSubtitleLayerSource.js.map +1 -0
  407. package/dist/modules/video/mediabunny/caption/SubtitleLayerSource.d.ts +32 -0
  408. package/dist/modules/video/mediabunny/caption/SubtitleLayerSource.d.ts.map +1 -0
  409. package/dist/modules/video/mediabunny/caption/SubtitleLayerSource.js +2 -0
  410. package/dist/modules/video/mediabunny/caption/SubtitleLayerSource.js.map +1 -0
  411. package/dist/modules/video/mediabunny/caption/VideoBoundSubtitleLayerSource.d.ts +25 -0
  412. package/dist/modules/video/mediabunny/caption/VideoBoundSubtitleLayerSource.d.ts.map +1 -0
  413. package/dist/modules/video/mediabunny/caption/VideoBoundSubtitleLayerSource.js +37 -0
  414. package/dist/modules/video/mediabunny/caption/VideoBoundSubtitleLayerSource.js.map +1 -0
  415. package/dist/modules/video/mediabunny/codec/CodecPolicy.d.ts +32 -0
  416. package/dist/modules/video/mediabunny/codec/CodecPolicy.d.ts.map +1 -0
  417. package/dist/modules/video/mediabunny/codec/CodecPolicy.js +2 -0
  418. package/dist/modules/video/mediabunny/codec/CodecPolicy.js.map +1 -0
  419. package/dist/modules/video/mediabunny/codec/DefaultCodecPolicy.d.ts +59 -0
  420. package/dist/modules/video/mediabunny/codec/DefaultCodecPolicy.d.ts.map +1 -0
  421. package/dist/modules/video/mediabunny/codec/DefaultCodecPolicy.js +110 -0
  422. package/dist/modules/video/mediabunny/codec/DefaultCodecPolicy.js.map +1 -0
  423. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoder.d.ts +27 -0
  424. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoder.d.ts.map +1 -0
  425. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoder.js +44 -0
  426. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoder.js.map +1 -0
  427. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoderFactory.d.ts +10 -0
  428. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoderFactory.d.ts.map +1 -0
  429. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoderFactory.js +15 -0
  430. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoderFactory.js.map +1 -0
  431. package/dist/modules/video/mediabunny/encoder/VideoTrackEncoder.d.ts +29 -0
  432. package/dist/modules/video/mediabunny/encoder/VideoTrackEncoder.d.ts.map +1 -0
  433. package/dist/modules/video/mediabunny/encoder/VideoTrackEncoder.js +2 -0
  434. package/dist/modules/video/mediabunny/encoder/VideoTrackEncoder.js.map +1 -0
  435. package/dist/modules/video/mediabunny/encoder/VideoTrackEncoderFactory.d.ts +16 -0
  436. package/dist/modules/video/mediabunny/encoder/VideoTrackEncoderFactory.d.ts.map +1 -0
  437. package/dist/modules/video/mediabunny/encoder/VideoTrackEncoderFactory.js +2 -0
  438. package/dist/modules/video/mediabunny/encoder/VideoTrackEncoderFactory.js.map +1 -0
  439. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts +25 -0
  440. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts.map +1 -0
  441. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js +74 -0
  442. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js.map +1 -0
  443. package/dist/modules/video/mediabunny/frame/CustomWebCodecsVideoFrameDecoder.d.ts +26 -0
  444. package/dist/modules/video/mediabunny/frame/CustomWebCodecsVideoFrameDecoder.d.ts.map +1 -0
  445. package/dist/modules/video/mediabunny/frame/CustomWebCodecsVideoFrameDecoder.js +147 -0
  446. package/dist/modules/video/mediabunny/frame/CustomWebCodecsVideoFrameDecoder.js.map +1 -0
  447. package/dist/modules/video/mediabunny/frame/DefaultVideoFrameDecoderFactory.d.ts +12 -0
  448. package/dist/modules/video/mediabunny/frame/DefaultVideoFrameDecoderFactory.d.ts.map +1 -0
  449. package/dist/modules/video/mediabunny/frame/DefaultVideoFrameDecoderFactory.js +25 -0
  450. package/dist/modules/video/mediabunny/frame/DefaultVideoFrameDecoderFactory.js.map +1 -0
  451. package/dist/modules/video/mediabunny/frame/FrameCompositor.d.ts +30 -0
  452. package/dist/modules/video/mediabunny/frame/FrameCompositor.d.ts.map +1 -0
  453. package/dist/modules/video/mediabunny/frame/FrameCompositor.js +2 -0
  454. package/dist/modules/video/mediabunny/frame/FrameCompositor.js.map +1 -0
  455. package/dist/modules/video/mediabunny/frame/HtmlVideoElementVideoFrameDecoder.d.ts +44 -0
  456. package/dist/modules/video/mediabunny/frame/HtmlVideoElementVideoFrameDecoder.d.ts.map +1 -0
  457. package/dist/modules/video/mediabunny/frame/HtmlVideoElementVideoFrameDecoder.js +334 -0
  458. package/dist/modules/video/mediabunny/frame/HtmlVideoElementVideoFrameDecoder.js.map +1 -0
  459. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.d.ts +10 -0
  460. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.d.ts.map +1 -0
  461. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.js +17 -0
  462. package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.js.map +1 -0
  463. package/dist/modules/video/mediabunny/frame/VideoFrameDecoder.d.ts +30 -0
  464. package/dist/modules/video/mediabunny/frame/VideoFrameDecoder.d.ts.map +1 -0
  465. package/dist/modules/video/mediabunny/frame/VideoFrameDecoder.js +2 -0
  466. package/dist/modules/video/mediabunny/frame/VideoFrameDecoder.js.map +1 -0
  467. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderFactory.d.ts +22 -0
  468. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderFactory.d.ts.map +1 -0
  469. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderFactory.js +2 -0
  470. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderFactory.js.map +1 -0
  471. package/dist/modules/video/mediabunny/frame/WebCodecsVideoFrameDecoder.d.ts +17 -0
  472. package/dist/modules/video/mediabunny/frame/WebCodecsVideoFrameDecoder.d.ts.map +1 -0
  473. package/dist/modules/video/mediabunny/frame/WebCodecsVideoFrameDecoder.js +48 -0
  474. package/dist/modules/video/mediabunny/frame/WebCodecsVideoFrameDecoder.js.map +1 -0
  475. package/dist/modules/video/mediabunny/output/MediaBunnyOutputTargetBuilder.d.ts +11 -0
  476. package/dist/modules/video/mediabunny/output/MediaBunnyOutputTargetBuilder.d.ts.map +1 -0
  477. package/dist/modules/video/mediabunny/output/MediaBunnyOutputTargetBuilder.js +22 -0
  478. package/dist/modules/video/mediabunny/output/MediaBunnyOutputTargetBuilder.js.map +1 -0
  479. package/dist/modules/video/mediabunny/output/OutputTargetBuilder.d.ts +27 -0
  480. package/dist/modules/video/mediabunny/output/OutputTargetBuilder.d.ts.map +1 -0
  481. package/dist/modules/video/mediabunny/output/OutputTargetBuilder.js +2 -0
  482. package/dist/modules/video/mediabunny/output/OutputTargetBuilder.js.map +1 -0
  483. package/package.json +67 -0
@@ -0,0 +1,21 @@
1
+ import type { Effect } from '../effect/Effect';
2
+ import type { Document } from '../document/Document';
3
+ import type { Segment } from '../document/Segment';
4
+ /**
5
+ * Strips trailing punctuation from each matching word's `displayText`,
6
+ * leaving the original `text` (the transcription source of truth)
7
+ * untouched. Only punctuation at the end of the word is removed, so
8
+ * tokens like `google.com` or `15:30` keep their inner symbols. The
9
+ * deriver re-runs splitters and taggers from `text`, so toggling this
10
+ * effect off naturally restores the punctuated rendering on the next
11
+ * derivation.
12
+ */
13
+ export declare class RemovePunctuationEffect implements Effect {
14
+ private readonly segmentFilter;
15
+ private static readonly PUNCTUATION;
16
+ private static readonly TRAILING_PUNCTUATION;
17
+ private static buildTrailingRegex;
18
+ constructor(segmentFilter?: (segment: Segment) => boolean);
19
+ apply(document: Document): Document;
20
+ }
21
+ //# sourceMappingURL=RemovePunctuationEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemovePunctuationEffect.d.ts","sourceRoot":"","sources":["../../../src/modules/effect/RemovePunctuationEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;;;;;;GAQG;AACH,qBAAa,uBAAwB,YAAW,MAAM;IAqBlD,OAAO,CAAC,QAAQ,CAAC,aAAa;IApBhC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAOjC;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAgD;IAE5F,OAAO,CAAC,MAAM,CAAC,kBAAkB;gBASd,aAAa,GAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAoB;IAG5E,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;CAkBpC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Strips trailing punctuation from each matching word's `displayText`,
3
+ * leaving the original `text` (the transcription source of truth)
4
+ * untouched. Only punctuation at the end of the word is removed, so
5
+ * tokens like `google.com` or `15:30` keep their inner symbols. The
6
+ * deriver re-runs splitters and taggers from `text`, so toggling this
7
+ * effect off naturally restores the punctuated rendering on the next
8
+ * derivation.
9
+ */
10
+ export class RemovePunctuationEffect {
11
+ segmentFilter;
12
+ static PUNCTUATION = [
13
+ '...',
14
+ '.',
15
+ ',',
16
+ ';',
17
+ ':',
18
+ '…',
19
+ ];
20
+ static TRAILING_PUNCTUATION = RemovePunctuationEffect.buildTrailingRegex();
21
+ static buildTrailingRegex() {
22
+ const alternatives = [...RemovePunctuationEffect.PUNCTUATION]
23
+ .sort((a, b) => b.length - a.length)
24
+ .map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
25
+ .join('|');
26
+ return new RegExp(`(?:${alternatives})+$`, 'u');
27
+ }
28
+ constructor(segmentFilter = () => true) {
29
+ this.segmentFilter = segmentFilter;
30
+ }
31
+ apply(document) {
32
+ const newSections = document.sections.map((section) => {
33
+ const newSegments = section.segments.map((segment) => {
34
+ if (!this.segmentFilter(segment))
35
+ return segment;
36
+ const newLines = segment.lines.map((line) => {
37
+ const newWords = line.words.map((word) => {
38
+ const stripped = word.text.replace(RemovePunctuationEffect.TRAILING_PUNCTUATION, '');
39
+ if (stripped === word.displayText)
40
+ return word;
41
+ return word.with({ displayText: stripped });
42
+ });
43
+ return line.with({ words: newWords });
44
+ });
45
+ return segment.with({ lines: newLines });
46
+ });
47
+ return section.with({ segments: newSegments });
48
+ });
49
+ return document.with({ sections: newSections });
50
+ }
51
+ }
52
+ //# sourceMappingURL=RemovePunctuationEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemovePunctuationEffect.js","sourceRoot":"","sources":["../../../src/modules/effect/RemovePunctuationEffect.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG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O,CAAC,uBAAuB,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;wBACrF,IAAI,QAAQ,KAAK,IAAI,CAAC,WAAW;4BAAE,OAAO,IAAI,CAAC;wBAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;oBAC9C,CAAC,CAAC,CAAC;oBACH,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;gBACxC,CAAC,CAAC,CAAC;gBACH,OAAO,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;YACH,OAAO,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;IAClD,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Effect } from '../effect/Effect';
2
+ import type { Document } from '../document/Document';
3
+ import type { Segment } from '../document/Segment';
4
+ /**
5
+ * Lowercases each matching word's `displayText`, preserving only words
6
+ * tagged as `entity` (proper nouns) and the English pronoun "I"
7
+ * (including contractions like "I'm", "I'll"). Targets the casual
8
+ * "all-lowercase" caption aesthetic where even sentence starts stay
9
+ * lowercased.
10
+ */
11
+ export declare class SmartLowercaseEffect implements Effect {
12
+ private readonly segmentFilter;
13
+ private static readonly I_PRONOUN;
14
+ constructor(segmentFilter?: (segment: Segment) => boolean);
15
+ apply(document: Document): Document;
16
+ private rewriteSegment;
17
+ private rewriteLine;
18
+ private rewriteWord;
19
+ private isPreserved;
20
+ }
21
+ //# sourceMappingURL=SmartLowercaseEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmartLowercaseEffect.d.ts","sourceRoot":"","sources":["../../../src/modules/effect/SmartLowercaseEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAIzD;;;;;;GAMG;AACH,qBAAa,oBAAqB,YAAW,MAAM;IAK/C,OAAO,CAAC,QAAQ,CAAC,aAAa;IAHhC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAkB;gBAGhC,aAAa,GAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAoB;IAG5E,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IAUnC,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,WAAW;CAGpB"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Lowercases each matching word's `displayText`, preserving only words
3
+ * tagged as `entity` (proper nouns) and the English pronoun "I"
4
+ * (including contractions like "I'm", "I'll"). Targets the casual
5
+ * "all-lowercase" caption aesthetic where even sentence starts stay
6
+ * lowercased.
7
+ */
8
+ export class SmartLowercaseEffect {
9
+ segmentFilter;
10
+ static I_PRONOUN = /^I(?:$|['’])/;
11
+ constructor(segmentFilter = () => true) {
12
+ this.segmentFilter = segmentFilter;
13
+ }
14
+ apply(document) {
15
+ return document.with({
16
+ sections: document.sections.map((section) => section.with({
17
+ segments: section.segments.map((segment) => this.rewriteSegment(segment)),
18
+ })),
19
+ });
20
+ }
21
+ rewriteSegment(segment) {
22
+ if (!this.segmentFilter(segment))
23
+ return segment;
24
+ return segment.with({
25
+ lines: segment.lines.map((line) => this.rewriteLine(line)),
26
+ });
27
+ }
28
+ rewriteLine(line) {
29
+ return line.with({
30
+ words: line.words.map((word) => this.rewriteWord(word)),
31
+ });
32
+ }
33
+ rewriteWord(word) {
34
+ if (this.isPreserved(word))
35
+ return word;
36
+ const lowered = word.displayText.toLowerCase();
37
+ if (lowered === word.displayText)
38
+ return word;
39
+ return word.with({ displayText: lowered });
40
+ }
41
+ isPreserved(word) {
42
+ return word.hasTagName('entity') || SmartLowercaseEffect.I_PRONOUN.test(word.text);
43
+ }
44
+ }
45
+ //# sourceMappingURL=SmartLowercaseEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmartLowercaseEffect.js","sourceRoot":"","sources":["../../../src/modules/effect/SmartLowercaseEffect.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IAKZ;IAHX,MAAM,CAAU,SAAS,GAAG,cAAc,CAAC;IAEnD,YACmB,gBAA+C,GAAG,EAAE,CAAC,IAAI;QAAzD,kBAAa,GAAb,aAAa,CAA4C;IACzE,CAAC;IAEJ,KAAK,CAAC,QAAkB;QACtB,OAAO,QAAQ,CAAC,IAAI,CAAC;YACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1C,OAAO,CAAC,IAAI,CAAC;gBACX,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;aAC1E,CAAC,CACH;SACF,CAAC,CAAC;IACL,CAAC;IAEO,cAAc,CAAC,OAAgB;QACrC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;YAAE,OAAO,OAAO,CAAC;QACjD,OAAO,OAAO,CAAC,IAAI,CAAC;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC3D,CAAC,CAAC;IACL,CAAC;IAEO,WAAW,CAAC,IAAU;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC;YACf,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACxD,CAAC,CAAC;IACL,CAAC;IAEO,WAAW,CAAC,IAAU;QAC5B,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QACxC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;QAC/C,IAAI,OAAO,KAAK,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAC;QAC9C,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7C,CAAC;IAEO,WAAW,CAAC,IAAU;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,oBAAoB,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrF,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { Effect } from '../effect/Effect';
2
+ import type { Document } from '../document/Document';
3
+ import type { Segment } from '../document/Segment';
4
+ /**
5
+ * Replaces ASCII punctuation with typographic equivalents in each
6
+ * matching word's `displayText`. Reads `displayText` (not `text`) so
7
+ * the substitution composes with other display-text effects in the
8
+ * pipeline order.
9
+ *
10
+ * Substitutions per word:
11
+ * - `"` followed by a letter or digit → `“`; otherwise → `”`
12
+ * - `'` always → `’` (typographic apostrophe)
13
+ * - `--` → `—` (em dash)
14
+ * - `...` → `…` (ellipsis)
15
+ */
16
+ export declare class SmartPunctuationEffect implements Effect {
17
+ private readonly segmentFilter;
18
+ constructor(segmentFilter?: (segment: Segment) => boolean);
19
+ apply(document: Document): Document;
20
+ private smartify;
21
+ private replaceMultiCharGlyphs;
22
+ private replaceQuotes;
23
+ private opensAQuotation;
24
+ }
25
+ //# sourceMappingURL=SmartPunctuationEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmartPunctuationEffect.d.ts","sourceRoot":"","sources":["../../../src/modules/effect/SmartPunctuationEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;;;;;;;;;GAWG;AACH,qBAAa,sBAAuB,YAAW,MAAM;IAGjD,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,GAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAoB;IAG5E,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IAmBnC,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,eAAe;CAIxB"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Replaces ASCII punctuation with typographic equivalents in each
3
+ * matching word's `displayText`. Reads `displayText` (not `text`) so
4
+ * the substitution composes with other display-text effects in the
5
+ * pipeline order.
6
+ *
7
+ * Substitutions per word:
8
+ * - `"` followed by a letter or digit → `“`; otherwise → `”`
9
+ * - `'` always → `’` (typographic apostrophe)
10
+ * - `--` → `—` (em dash)
11
+ * - `...` → `…` (ellipsis)
12
+ */
13
+ export class SmartPunctuationEffect {
14
+ segmentFilter;
15
+ constructor(segmentFilter = () => true) {
16
+ this.segmentFilter = segmentFilter;
17
+ }
18
+ apply(document) {
19
+ const newSections = document.sections.map((section) => {
20
+ const newSegments = section.segments.map((segment) => {
21
+ if (!this.segmentFilter(segment))
22
+ return segment;
23
+ const newLines = segment.lines.map((line) => {
24
+ const newWords = line.words.map((word) => {
25
+ const styled = this.smartify(word.displayText);
26
+ if (styled === word.displayText)
27
+ return word;
28
+ return word.with({ displayText: styled });
29
+ });
30
+ return line.with({ words: newWords });
31
+ });
32
+ return segment.with({ lines: newLines });
33
+ });
34
+ return section.with({ segments: newSegments });
35
+ });
36
+ return document.with({ sections: newSections });
37
+ }
38
+ smartify(text) {
39
+ const expanded = this.replaceMultiCharGlyphs(text);
40
+ return this.replaceQuotes(expanded);
41
+ }
42
+ replaceMultiCharGlyphs(text) {
43
+ return text
44
+ .replace(/\.{3}/g, '…')
45
+ .replace(/--/g, '—');
46
+ }
47
+ replaceQuotes(text) {
48
+ let result = '';
49
+ for (let i = 0; i < text.length; i++) {
50
+ const ch = text[i];
51
+ if (ch === '"') {
52
+ result += this.opensAQuotation(text, i) ? '“' : '”';
53
+ }
54
+ else if (ch === "'") {
55
+ result += '’';
56
+ }
57
+ else {
58
+ result += ch;
59
+ }
60
+ }
61
+ return result;
62
+ }
63
+ opensAQuotation(text, index) {
64
+ const next = text[index + 1] ?? '';
65
+ return /[\p{L}\p{N}]/u.test(next);
66
+ }
67
+ }
68
+ //# sourceMappingURL=SmartPunctuationEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmartPunctuationEffect.js","sourceRoot":"","sources":["../../../src/modules/effect/SmartPunctuationEffect.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,sBAAsB;IAGd;IADnB,YACmB,gBAA+C,GAAG,EAAE,CAAC,IAAI;QAAzD,kBAAa,GAAb,aAAa,CAA4C;IACzE,CAAC;IAEJ,KAAK,CAAC,QAAkB;QACtB,MAAM,WAAW,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YACpD,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBACnD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;oBAAE,OAAO,OAAO,CAAC;gBACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EA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ACrC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;gBACf,MAAM,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;YACtD,CAAC;iBAAM,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;gBACtB,MAAM,IAAI,GAAG,CAAC;YAChB,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,EAAE,CAAC;YACf,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,eAAe,CAAC,IAAY,EAAE,KAAa;QACjD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ export type { Effect } from '../effect/Effect';
2
+ export { GapFreeEffect } from '../effect/GapFreeEffect';
3
+ export { RemovePunctuationEffect } from '../effect/RemovePunctuationEffect';
4
+ export { SmartPunctuationEffect } from '../effect/SmartPunctuationEffect';
5
+ export { SmartLowercaseEffect } from '../effect/SmartLowercaseEffect';
6
+ export { CarryQuotesEffect } from '../effect/CarryQuotesEffect';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/effect/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { GapFreeEffect } from '../effect/GapFreeEffect';
2
+ export { RemovePunctuationEffect } from '../effect/RemovePunctuationEffect';
3
+ export { SmartPunctuationEffect } from '../effect/SmartPunctuationEffect';
4
+ export { SmartLowercaseEffect } from '../effect/SmartLowercaseEffect';
5
+ export { CarryQuotesEffect } from '../effect/CarryQuotesEffect';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/effect/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { TranscriberProgressEvent } from '../transcription/Transcriber';
2
+ import type { RenderProgress } from '../video/RenderJob';
3
+ /**
4
+ * One step of the render pipeline reporting status. `transcribing` and
5
+ * `rendering` wrap the underlying stage event so listeners get the full
6
+ * progress payload of the work being done; the structural steps in the
7
+ * middle (`splitting`, tagging, effects) emit a `started`/`completed`
8
+ * boundary because they finish in a single synchronous pass.
9
+ */
10
+ export type PipelineProgressEvent = {
11
+ stage: 'transcribing';
12
+ inner: TranscriberProgressEvent;
13
+ } | {
14
+ stage: 'splitting';
15
+ status: 'started' | 'completed';
16
+ } | {
17
+ stage: 'tagging-structural';
18
+ status: 'started' | 'completed';
19
+ } | {
20
+ stage: 'tagging-semantic';
21
+ status: 'started' | 'completed';
22
+ } | {
23
+ stage: 'applying-effects';
24
+ status: 'started' | 'completed';
25
+ } | {
26
+ stage: 'rendering';
27
+ inner: RenderProgress;
28
+ };
29
+ export type PipelineProgressListener = (event: PipelineProgressEvent) => void;
30
+ //# sourceMappingURL=PipelineProgress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PipelineProgress.d.ts","sourceRoot":"","sources":["../../../src/modules/pipeline/PipelineProgress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IAAE,KAAK,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,wBAAwB,CAAA;CAAE,GAC1D;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,GACvD;IAAE,KAAK,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,GAChE;IAAE,KAAK,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,GAC9D;IAAE,KAAK,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,GAC9D;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,cAAc,CAAA;CAAE,CAAC;AAElD,MAAM,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PipelineProgress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PipelineProgress.js","sourceRoot":"","sources":["../../../src/modules/pipeline/PipelineProgress.ts"],"names":[],"mappings":""}
@@ -0,0 +1,105 @@
1
+ import type { Document } from '../document/Document';
2
+ import type { Transcriber, TranscriberOptions } from '../transcription/Transcriber';
3
+ import type { SegmentSplitter } from '../splitting/SegmentSplitter';
4
+ import type { LineSplitter } from '../splitting/LineSplitter';
5
+ import type { Tagger } from '../tagging/Tagger';
6
+ import type { Effect } from '../effect/Effect';
7
+ import type { SubtitleStyle } from '../rendering/SubtitleFrameRenderer';
8
+ import type { VideoRenderer } from '../video/VideoRenderer';
9
+ import type { RenderResult, OutputFormat, RenderQuality, RenderOutputChunk, AudioDiscardReason, FallbackDecoderInfo } from '../video/RenderJob';
10
+ import type { PipelineProgressListener } from '../pipeline/PipelineProgress';
11
+ /** Px resolution; either supplied up front or probed from the input video. */
12
+ export interface OutputResolution {
13
+ readonly width: number;
14
+ readonly height: number;
15
+ }
16
+ /**
17
+ * Knobs that influence the lazily-built default line splitter. Honoured
18
+ * only when no explicit `LineSplitter` was supplied to the pipeline.
19
+ */
20
+ export interface DefaultLineSplitterRuntimeConfig {
21
+ readonly maxLines: number;
22
+ readonly minLines: number;
23
+ readonly maxWidthRatio: number;
24
+ }
25
+ export interface RenderPipelineConfig {
26
+ readonly video: File | Blob;
27
+ readonly transcriber: Transcriber;
28
+ readonly transcriberOptions: TranscriberOptions | undefined;
29
+ readonly segmentSplitter: SegmentSplitter;
30
+ /** Explicit line splitter; when `null`, a default is built lazily once the resolved css and output dimensions are known. */
31
+ readonly lineSplitter: LineSplitter | null;
32
+ readonly defaultLineSplitterConfig: DefaultLineSplitterRuntimeConfig;
33
+ readonly structureTagger: Tagger;
34
+ readonly semanticTaggers: ReadonlyArray<Tagger>;
35
+ readonly effects: ReadonlyArray<Effect>;
36
+ /** Applied to every `Section.kind` found in the document unless `explicitStyles` is set. */
37
+ readonly defaultStyle: SubtitleStyle;
38
+ /** When set, takes over from `defaultStyle` and is passed as-is to the video renderer. */
39
+ readonly explicitStyles: Readonly<Record<string, SubtitleStyle>> | null;
40
+ readonly videoRenderer: VideoRenderer;
41
+ readonly outputFormat: OutputFormat | undefined;
42
+ readonly quality: RenderQuality | undefined;
43
+ readonly outputResolution: OutputResolution | undefined;
44
+ readonly outputStream: WritableStream<RenderOutputChunk> | undefined;
45
+ readonly overlayHtml: string | undefined;
46
+ readonly onAudioDiscarded: ((reason: AudioDiscardReason) => void) | undefined;
47
+ readonly confirmFallbackDecoder: ((info: FallbackDecoderInfo) => Promise<boolean>) | undefined;
48
+ }
49
+ /**
50
+ * Orchestrates the end-to-end render flow over the components supplied
51
+ * by `RenderPipelineBuilder`: transcribe → split → tag (structural and
52
+ * semantic) → apply effects → render. Each step is also exposed
53
+ * individually so callers can inspect or mutate the current `Document`
54
+ * between stages.
55
+ *
56
+ * The pipeline owns the current `Document`. After a step it stores the
57
+ * result and feeds it to the next step; `getDocument`/`setDocument`
58
+ * give callers a read/replace handle for that state. `run` short-
59
+ * circuits through every step in order; if a Document is already
60
+ * loaded (whether from a previous step or via `setDocument`), it skips
61
+ * the transcription step and starts from splitting.
62
+ *
63
+ * Instances are built by `RenderPipelineBuilder.build` — the builder
64
+ * is the supported construction surface.
65
+ */
66
+ export declare class RenderPipeline {
67
+ private readonly config;
68
+ private currentDocument;
69
+ private cachedVideoDimensions;
70
+ private cachedVideoFile;
71
+ constructor(config: RenderPipelineConfig);
72
+ /** Current document state; `null` before transcription runs. */
73
+ getDocument(): Document | null;
74
+ /** Replaces the current document — typical after a manual edit between steps. */
75
+ setDocument(document: Document): void;
76
+ /**
77
+ * Runs every step in order and returns the final render result.
78
+ * Skips transcription when a document is already loaded.
79
+ */
80
+ run(onProgress?: PipelineProgressListener): Promise<RenderResult>;
81
+ runTranscriptionStep(onProgress?: PipelineProgressListener): Promise<Document>;
82
+ private restoreTranscriberProgressHandler;
83
+ runSplittingStep(onProgress?: PipelineProgressListener): Promise<Document>;
84
+ runStructuralTaggingStep(onProgress?: PipelineProgressListener): Document;
85
+ runSemanticTaggingStep(onProgress?: PipelineProgressListener): Promise<Document>;
86
+ runEffectsStep(onProgress?: PipelineProgressListener): Document;
87
+ runRenderingStep(onProgress?: PipelineProgressListener): Promise<RenderResult>;
88
+ private requireDocument;
89
+ private applySegmentSplitterToSections;
90
+ private applyLineSplittingToSections;
91
+ private resolveLineSplitter;
92
+ private buildDefaultLineSplitter;
93
+ private extractCssVariablesFromInlineStyles;
94
+ private resolveOutputDimensions;
95
+ private probeVideoNaturalDimensions;
96
+ private resolveStylesForDocument;
97
+ private buildRenderJob;
98
+ /**
99
+ * The video renderer's job expects a `File`. Inputs that arrive as a
100
+ * raw `Blob` are wrapped once and reused across runs so the same
101
+ * underlying bytes back every render call.
102
+ */
103
+ private resolveVideoAsFile;
104
+ }
105
+ //# sourceMappingURL=RenderPipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderPipeline.d.ts","sourceRoot":"","sources":["../../../src/modules/pipeline/RenderPipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAEV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAA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