reacthub-pixitweenjs 0.2.109-alpha.7 → 0.3.0-alpha.4

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 (313) hide show
  1. package/LICENSE +8 -16
  2. package/LICENSE.md +79 -239
  3. package/README.md +253 -106
  4. package/dist/components/AepComposition/Aep3DPostFx.d.ts +7 -0
  5. package/dist/components/AepComposition/Aep3DPrecompPlane.d.ts +9 -0
  6. package/dist/components/AepComposition/Aep3DScene.d.ts +14 -0
  7. package/dist/components/AepComposition/Aep3DShapeMesh.d.ts +13 -0
  8. package/dist/components/AepComposition/Aep3DTextMesh.d.ts +17 -0
  9. package/dist/components/AepComposition/AepAssetResolver.d.ts +13 -0
  10. package/dist/components/AepComposition/AepAudioLayer.d.ts +34 -0
  11. package/dist/components/AepComposition/AepComposition.d.ts +18 -0
  12. package/dist/components/AepComposition/AepLayerProvider.d.ts +30 -0
  13. package/dist/components/AepComposition/AepLayerRouter.d.ts +5 -0
  14. package/dist/components/AepComposition/AepMsdfTextMesh.d.ts +17 -0
  15. package/dist/components/AepComposition/AepPrecompRenderContext.d.ts +23 -0
  16. package/dist/components/AepComposition/AepPrecompRenderer.d.ts +8 -0
  17. package/dist/components/AepComposition/AepTextOverrideContext.d.ts +8 -0
  18. package/dist/components/AepComposition/AepThemeContext.d.ts +8 -0
  19. package/dist/components/AepComposition/AudioPlaybackManager.d.ts +38 -0
  20. package/dist/components/AepComposition/composeTransform3D.d.ts +27 -0
  21. package/dist/components/AepComposition/index.d.ts +42 -0
  22. package/dist/components/AepComposition/matteSourceIds.d.ts +2 -0
  23. package/dist/components/AepComposition/model3d/Pixi3DModelLayer.d.ts +9 -0
  24. package/dist/components/AepComposition/model3d/ThreeOffscreenRenderer.d.ts +49 -0
  25. package/dist/components/AepComposition/model3d/framing.d.ts +30 -0
  26. package/dist/components/AepComposition/model3d/geometry.d.ts +27 -0
  27. package/dist/components/AepComposition/model3d/index.d.ts +14 -0
  28. package/dist/components/AepComposition/model3d/lighting.d.ts +40 -0
  29. package/dist/components/AepComposition/model3d/readiness.d.ts +17 -0
  30. package/dist/components/AepComposition/model3d/sampleModel3D.d.ts +40 -0
  31. package/dist/components/AepComposition/msdfAtlasRegistry.d.ts +16 -0
  32. package/dist/components/AepComposition/pathToThreeShape.d.ts +4 -0
  33. package/dist/components/AepComposition/resolveParentChain.d.ts +3 -0
  34. package/dist/components/AepComposition/resolvePostFxList.d.ts +2 -0
  35. package/dist/components/AepComposition/shouldSplitText.d.ts +26 -0
  36. package/dist/components/AepComposition/threeTextureFromPixi.d.ts +8 -0
  37. package/dist/components/AepComposition/useAepLayerTransform.d.ts +18 -0
  38. package/dist/components/AepComposition/useAepLayerTransform3D.d.ts +8 -0
  39. package/dist/components/AepComposition/useMsdfAtlasRegistry.d.ts +6 -0
  40. package/dist/components/AepComposition/usePixiRenderTexture.d.ts +14 -0
  41. package/dist/components/AepComposition/useResolveAsset.d.ts +8 -0
  42. package/dist/components/AepMask/AepMaskContainer.d.ts +9 -0
  43. package/dist/components/AepMask/PixiTrackMatte.d.ts +10 -0
  44. package/dist/components/AepMask/drawAepMask.d.ts +3 -0
  45. package/dist/components/AepMask/index.d.ts +5 -0
  46. package/dist/components/PixiAudioSprite/HowlerAudioSprite.d.ts +12 -8
  47. package/dist/components/PixiAudioSprite/PixiAudioSprite.d.ts +43 -3
  48. package/dist/components/PixiAudioSprite/index.d.ts +3 -0
  49. package/dist/components/PixiAudioSprite/useAudioVisualizer.d.ts +30 -15
  50. package/dist/components/PixiAudioSprite/wave-config.d.ts +0 -1
  51. package/dist/components/PixiCaptionsTrack/PixiCaptionsTrack.d.ts +86 -0
  52. package/dist/components/PixiCaptionsTrack/index.d.ts +5 -0
  53. package/dist/components/PixiCaptionsTrack/useCaptionPlayhead.d.ts +31 -0
  54. package/dist/components/PixiCaptionsTrack/useCaptionStyles.d.ts +45 -0
  55. package/dist/components/PixiCaptionsTrack/useEmojiTextures.d.ts +8 -0
  56. package/dist/components/PixiGifSprite/PixiGifGsapSync.d.ts +11 -10
  57. package/dist/components/PixiImageSprite/PixiImageSprite.d.ts +28 -2
  58. package/dist/components/PixiLottieSprite/PixiLottieSprite.d.ts +5 -2
  59. package/dist/components/PixiNullObject/PixiNullObject.d.ts +25 -0
  60. package/dist/components/PixiNullObject/index.d.ts +2 -0
  61. package/dist/components/PixiPreComp/PixiPreComp.d.ts +29 -0
  62. package/dist/components/PixiPreComp/index.d.ts +3 -0
  63. package/dist/components/PixiPreComp/validatePrecompDepth.d.ts +2 -0
  64. package/dist/components/PixiRemotionSprite/PixiRemotionGifSprite.d.ts +24 -0
  65. package/dist/components/PixiRemotionSprite/PixiRemotionImageSprite.d.ts +18 -0
  66. package/dist/components/PixiRemotionSprite/PixiRemotionSprite.d.ts +5 -2
  67. package/dist/components/PixiRemotionSprite/PixiRemotionVideoCanvaSprite.d.ts +20 -0
  68. package/dist/components/PixiRemotionSprite/index.d.ts +4 -0
  69. package/dist/components/PixiSVGSprite/PixiMorphSvgSprite.d.ts +35 -0
  70. package/dist/components/PixiSVGSprite/PixiSvgImageSprite.d.ts +35 -0
  71. package/dist/components/PixiSVGSprite/PixiSvgPathSprite.d.ts +21 -4
  72. package/dist/components/PixiSVGSprite/PixiSvgRawSprite.d.ts +30 -0
  73. package/dist/components/PixiSVGSprite/index.d.ts +5 -0
  74. package/dist/components/PixiSequence/PixiSequence.d.ts +29 -5
  75. package/dist/components/PixiShapeLayer/PixiShapeLayer.d.ts +43 -0
  76. package/dist/components/PixiShapeLayer/drawShape.d.ts +20 -0
  77. package/dist/components/PixiShapeLayer/index.d.ts +4 -0
  78. package/dist/components/PixiShapeLayer/samplePath.d.ts +5 -0
  79. package/dist/components/PixiTextSprite/PixiTextSplit.d.ts +26 -0
  80. package/dist/components/PixiTextSprite/PixiTextSprite.d.ts +42 -5
  81. package/dist/components/PixiTextSprite/index.d.ts +3 -0
  82. package/dist/components/PixiTextSprite/resolveTextSplitFills.d.ts +27 -0
  83. package/dist/components/PixiTextSprite/textAnimator.d.ts +22 -0
  84. package/dist/components/PixiThreeSprite/PixiThreeModelSprite.d.ts +23 -0
  85. package/dist/components/PixiThreeSprite/PixiThreeSprite.d.ts +14 -0
  86. package/dist/components/PixiThreeSprite/index.d.ts +4 -0
  87. package/dist/components/PixiUnifiedTransformer/PixiUnifiedTransformer.d.ts +20 -8
  88. package/dist/components/PixiVideoSprite/PixiVideoCanvasSync.d.ts +3 -1
  89. package/dist/components/PixiVideoSprite/PixiVideoSprite.d.ts +31 -2
  90. package/dist/components/index.d.ts +7 -0
  91. package/dist/constants/animation.d.ts +232 -0
  92. package/dist/constants/animationConstants.d.ts +90 -0
  93. package/dist/constants/elementNames.d.ts +4 -0
  94. package/dist/events/Events.d.ts +0 -1
  95. package/dist/filters/animated-vfx/AnimatedVfxFilter.d.ts +19 -0
  96. package/dist/filters/animated-vfx/composeShader.d.ts +2 -0
  97. package/dist/filters/animated-vfx/index.d.ts +14 -0
  98. package/dist/filters/animated-vfx/registry/animatedVfxRegistry.d.ts +65 -0
  99. package/dist/filters/animated-vfx/registry/waveTearVariants.d.ts +14 -0
  100. package/dist/filters/animated-vfx/toStrength.d.ts +1 -0
  101. package/dist/filters/animated-vfx/types.d.ts +18 -0
  102. package/dist/filters/animatedVfxFilters.d.ts +1 -0
  103. package/dist/filters/blend-mode/createBlendCompositeFilter.d.ts +26 -0
  104. package/dist/filters/edge-feather/EdgeFeatherFilter.d.ts +19 -0
  105. package/dist/filters/plate-key/PlateKeyFilter.d.ts +29 -0
  106. package/dist/hocs/AbstractContainer.d.ts +8 -1
  107. package/dist/hocs/BorderMaskContainer.d.ts +43 -0
  108. package/dist/hocs/OverlayTilingSprite.d.ts +3 -3
  109. package/dist/hocs/drawMaskShape.d.ts +7 -0
  110. package/dist/hocs/index.d.ts +5 -0
  111. package/dist/hooks/aep/buildAudioLevelTimeline.d.ts +7 -0
  112. package/dist/hooks/aep/buildBezierPathTimeline.d.ts +13 -0
  113. package/dist/hooks/aep/buildColorValueTimeline.d.ts +24 -0
  114. package/dist/hooks/aep/buildLayerTimeline.d.ts +20 -0
  115. package/dist/hooks/aep/buildScalarValueTimeline.d.ts +6 -0
  116. package/dist/hooks/aep/buildVec2ValueTimeline.d.ts +17 -0
  117. package/dist/hooks/aep/easeCache.d.ts +3 -0
  118. package/dist/hooks/aep/effectRegistry.d.ts +5 -0
  119. package/dist/hooks/aep/effects/brightnessContrast.d.ts +2 -0
  120. package/dist/hooks/aep/effects/dropShadow.d.ts +2 -0
  121. package/dist/hooks/aep/effects/fastBoxBlur.d.ts +2 -0
  122. package/dist/hooks/aep/effects/gaussianBlur.d.ts +2 -0
  123. package/dist/hooks/aep/effects/glow.d.ts +2 -0
  124. package/dist/hooks/aep/effects/hueSaturation.d.ts +2 -0
  125. package/dist/hooks/aep/effects/index.d.ts +9 -0
  126. package/dist/hooks/aep/effects/levels.d.ts +2 -0
  127. package/dist/hooks/aep/effects/tint.d.ts +2 -0
  128. package/dist/hooks/aep/effects/types.d.ts +8 -0
  129. package/dist/hooks/aep/index.d.ts +22 -0
  130. package/dist/hooks/aep/interpolateBezierPath.d.ts +3 -0
  131. package/dist/hooks/aep/sampleAnimatable.d.ts +13 -0
  132. package/dist/hooks/aep/useAepBezierPathAnimator.d.ts +12 -0
  133. package/dist/hooks/aep/useAepColorAnimator.d.ts +11 -0
  134. package/dist/hooks/aep/useAepCurrentFrame.d.ts +1 -0
  135. package/dist/hooks/aep/useAepEffectKeyframes.d.ts +4 -0
  136. package/dist/hooks/aep/useAepEffects.d.ts +3 -0
  137. package/dist/hooks/aep/useAepKeyframes.d.ts +15 -0
  138. package/dist/hooks/aep/useAepTextLayout.d.ts +12 -0
  139. package/dist/hooks/aep/useAepValueAnimator.d.ts +2 -0
  140. package/dist/hooks/aep/useAepVec2Animator.d.ts +10 -0
  141. package/dist/hooks/aep/useTypefaceMetrics.d.ts +2 -0
  142. package/dist/hooks/index.d.ts +12 -0
  143. package/dist/hooks/useBlendFilter.d.ts +17 -0
  144. package/dist/hooks/useDebouncedValue.d.ts +11 -0
  145. package/dist/hooks/useFontEpoch.d.ts +10 -0
  146. package/dist/hooks/usePixiAnimation.d.ts +24 -0
  147. package/dist/hooks/useSpriteFilters.d.ts +81 -0
  148. package/dist/hooks/useSvgTexture.d.ts +29 -0
  149. package/dist/hooks/video/useVideoLifecycle.d.ts +23 -0
  150. package/dist/hooks/video/useVideoTexture.d.ts +34 -0
  151. package/dist/hooks/video/useVideoTimelineSync.d.ts +24 -0
  152. package/dist/hooks/withEffectsHook.d.ts +325 -4
  153. package/dist/hooks/withFiltersHook.d.ts +104 -38
  154. package/dist/importers/aep/bodymovin-color-controls.d.ts +23 -0
  155. package/dist/importers/aep/bodymovin-color.d.ts +1 -0
  156. package/dist/importers/aep/bodymovin-keyframe.d.ts +42 -0
  157. package/dist/importers/aep/bodymovin-layer.d.ts +84 -0
  158. package/dist/importers/aep/bodymovin-transform.d.ts +12 -0
  159. package/dist/importers/aep/bodymovin.d.ts +7 -0
  160. package/dist/importers/aep/bodymovinCameras.d.ts +34 -0
  161. package/dist/importers/aep/bodymovinExtensions.d.ts +3 -0
  162. package/dist/importers/aep/bodymovinTextRuns.d.ts +13 -0
  163. package/dist/importers/aep/index.d.ts +7 -0
  164. package/dist/importers/aep/lottieLint.d.ts +23 -0
  165. package/dist/importers/aep/lottieLint.rules.d.ts +6 -0
  166. package/dist/index.d.ts +3 -0
  167. package/dist/index.es.js +76991 -30787
  168. package/dist/index.umd.js +5621 -1699
  169. package/dist/lib/pixi-essentials/bounds/AxisAlignedBounds.d.ts +121 -0
  170. package/dist/lib/pixi-essentials/bounds/OrientedBounds.d.ts +103 -0
  171. package/dist/lib/pixi-essentials/bounds/index.d.ts +2 -0
  172. package/dist/lib/pixi-essentials/index.d.ts +6 -0
  173. package/dist/lib/pixi-essentials/object-pool/AverageProvider.d.ts +28 -0
  174. package/dist/lib/pixi-essentials/object-pool/ObjectPool.d.ts +103 -0
  175. package/dist/lib/pixi-essentials/object-pool/ObjectPoolFactory.d.ts +40 -0
  176. package/dist/lib/pixi-essentials/object-pool/index.d.ts +2 -0
  177. package/dist/lib/pixi-essentials/react-bindings/Transformer.d.ts +74 -0
  178. package/dist/lib/pixi-essentials/react-bindings/index.d.ts +3 -0
  179. package/dist/lib/pixi-essentials/react-bindings/utils/applyEventProps.d.ts +13 -0
  180. package/dist/lib/pixi-essentials/transformer/Transformer.d.ts +728 -0
  181. package/dist/lib/pixi-essentials/transformer/TransformerHandle.d.ts +142 -0
  182. package/dist/lib/pixi-essentials/transformer/TransformerWireframe.d.ts +54 -0
  183. package/dist/lib/pixi-essentials/transformer/index.d.ts +5 -0
  184. package/dist/lib/pixi-essentials/transformer/utils/decomposeTransform.d.ts +11 -0
  185. package/dist/lib/pixi-essentials/transformer/utils/distanceToLine.d.ts +7 -0
  186. package/dist/lib/pixi-essentials/transformer/utils/multiplyTransform.d.ts +17 -0
  187. package/dist/lib/pixi-essentials/transformer/utils/skewTransform.d.ts +13 -0
  188. package/dist/providers/GsapPixieContextProvider.d.ts +7 -0
  189. package/dist/types/BaseProps.d.ts +51 -16
  190. package/dist/types/CropTypes.d.ts +12 -0
  191. package/dist/types/Effects.d.ts +674 -13
  192. package/dist/types/MaskTypes.d.ts +10 -0
  193. package/dist/types/OverlayTypes.d.ts +9 -0
  194. package/dist/types/aep/asset.d.ts +43 -0
  195. package/dist/types/aep/camera.d.ts +778 -0
  196. package/dist/types/aep/composition.d.ts +82 -0
  197. package/dist/types/aep/effect.d.ts +137 -0
  198. package/dist/types/aep/index.d.ts +14 -0
  199. package/dist/types/aep/layer.d.ts +26546 -0
  200. package/dist/types/aep/light.d.ts +781 -0
  201. package/dist/types/aep/mask.d.ts +193 -0
  202. package/dist/types/aep/parse.d.ts +11 -0
  203. package/dist/types/aep/postFx.d.ts +107 -0
  204. package/dist/types/aep/text-animator.d.ts +687 -0
  205. package/dist/types/aep/text-runs.d.ts +234 -0
  206. package/dist/types/aep/theme.d.ts +72 -0
  207. package/dist/types/aep/transform.d.ts +285 -0
  208. package/dist/types/aep/transform3D.d.ts +171 -0
  209. package/dist/types/index.d.ts +4 -0
  210. package/dist/utils/AppStateProvider.d.ts +1 -0
  211. package/dist/utils/AppWrapper.d.ts +3 -0
  212. package/dist/utils/ContextBridge.d.ts +1 -1
  213. package/dist/utils/GsapAnims.d.ts +0 -1
  214. package/dist/utils/InteractionManager.d.ts +1 -10
  215. package/dist/utils/PixiSelector.d.ts +17 -0
  216. package/dist/utils/aeMath/zoomToFov.d.ts +1 -0
  217. package/dist/utils/areSpritePropsEqual.d.ts +8 -0
  218. package/dist/utils/assetRefCount.d.ts +20 -0
  219. package/dist/utils/audio/audioRegistry.d.ts +51 -0
  220. package/dist/utils/audio/audioSync.d.ts +98 -0
  221. package/dist/utils/audio/gainEnvelope.d.ts +162 -0
  222. package/dist/utils/audio/useAudioRegistry.d.ts +10 -0
  223. package/dist/utils/blendMode.d.ts +21 -0
  224. package/dist/utils/captions/captionClock.d.ts +17 -0
  225. package/dist/utils/captions/captionDisplay.d.ts +57 -0
  226. package/dist/utils/captions/captionPose.d.ts +107 -0
  227. package/dist/utils/captions/captionVisual.d.ts +32 -0
  228. package/dist/utils/captions/captionWordLayout.d.ts +67 -0
  229. package/dist/utils/captions/groupSegments.d.ts +20 -0
  230. package/dist/utils/captions/index.d.ts +10 -0
  231. package/dist/utils/captions/parseSubtitles.d.ts +25 -0
  232. package/dist/utils/captions/sampleCaption.d.ts +25 -0
  233. package/dist/utils/captions/timeBase.d.ts +34 -0
  234. package/dist/utils/captions/types.d.ts +279 -0
  235. package/dist/utils/entranceOverlap.d.ts +37 -0
  236. package/dist/utils/fonts/fontLoader.d.ts +33 -0
  237. package/dist/utils/fonts/fontSpec.d.ts +16 -0
  238. package/dist/utils/fonts/googleFonts.d.ts +9 -0
  239. package/dist/utils/gifTiming.d.ts +22 -0
  240. package/dist/utils/gsapEffects/animationConfigs.d.ts +3802 -0
  241. package/dist/utils/gsapEffects/backEffects.d.ts +1 -0
  242. package/dist/utils/gsapEffects/bounceEffects.d.ts +1 -0
  243. package/dist/utils/gsapEffects/effectGenerator.d.ts +3 -0
  244. package/dist/utils/gsapEffects/effectTarget.d.ts +11 -0
  245. package/dist/utils/gsapEffects/fadeEffects.d.ts +1 -0
  246. package/dist/utils/gsapEffects/flipEffects.d.ts +1 -0
  247. package/dist/utils/gsapEffects/generalEffects.d.ts +1 -0
  248. package/dist/utils/gsapEffects/lightSpeedEffect.d.ts +1 -0
  249. package/dist/utils/gsapEffects/logoRevealEffects.d.ts +1 -0
  250. package/dist/utils/gsapEffects/registerEffects.d.ts +1 -0
  251. package/dist/utils/gsapEffects/riseEffect.d.ts +1 -0
  252. package/dist/utils/gsapEffects/rollEffects.d.ts +1 -0
  253. package/dist/utils/gsapEffects/rotateEffects.d.ts +1 -0
  254. package/dist/utils/gsapEffects/slideEffects.d.ts +1 -0
  255. package/dist/utils/gsapEffects/staggerTextEffects.d.ts +1 -0
  256. package/dist/utils/gsapEffects/textUnitEffects.d.ts +1 -0
  257. package/dist/utils/gsapEffects/textUnitMask.d.ts +1 -0
  258. package/dist/utils/gsapEffects/textUnits.d.ts +172 -0
  259. package/dist/utils/gsapEffects/typewriterEffect.d.ts +1 -0
  260. package/dist/utils/gsapEffects/wipeEffect.d.ts +1 -0
  261. package/dist/utils/gsapEffects/zoomEffects.d.ts +1 -0
  262. package/dist/utils/index.d.ts +31 -0
  263. package/dist/utils/isExternalUrl.d.ts +1 -0
  264. package/dist/utils/loadSpriteTexture.d.ts +39 -0
  265. package/dist/utils/msdf/computeInstanceMatrix.d.ts +18 -0
  266. package/dist/utils/msdf/index.d.ts +4 -0
  267. package/dist/utils/msdf/loadMsdfAtlas.d.ts +9 -0
  268. package/dist/utils/msdf/msdfShader.d.ts +2 -0
  269. package/dist/utils/msdf/types.d.ts +49 -0
  270. package/dist/utils/pixiExtend.d.ts +0 -0
  271. package/dist/utils/sanitizeCanvasText.d.ts +12 -0
  272. package/dist/utils/sanitizeImageSrc.d.ts +7 -0
  273. package/dist/utils/svgRaster.d.ts +47 -0
  274. package/dist/utils/text/resolveTextRuns.d.ts +8 -0
  275. package/dist/utils/textLayout/alignLines.d.ts +15 -0
  276. package/dist/utils/textLayout/applyVerticals.d.ts +14 -0
  277. package/dist/utils/textLayout/breakLines.d.ts +14 -0
  278. package/dist/utils/textLayout/canvasMetricsProvider.d.ts +6 -0
  279. package/dist/utils/textLayout/index.d.ts +7 -0
  280. package/dist/utils/textLayout/layoutText.d.ts +7 -0
  281. package/dist/utils/textLayout/metricsCache.d.ts +9 -0
  282. package/dist/utils/textLayout/pixiCanvasMetricsProvider.d.ts +6 -0
  283. package/dist/utils/textLayout/shapeRuns.d.ts +18 -0
  284. package/dist/utils/textLayout/typefaceMetricsProvider.d.ts +19 -0
  285. package/dist/utils/textLayout/types.d.ts +61 -0
  286. package/dist/utils/textLayout/unicode.d.ts +2 -0
  287. package/dist/utils/textStyle.d.ts +81 -0
  288. package/dist/utils/textStyleV8.d.ts +62 -0
  289. package/dist/utils/threeModel.d.ts +55 -0
  290. package/dist/utils/videoAssetCache.d.ts +4 -0
  291. package/dist/utils/videoReadiness.d.ts +13 -0
  292. package/package.json +74 -54
  293. package/dist/assets/icon/transformericons/icons.d.ts +0 -8
  294. package/dist/components/PixiAudioSprite/PixiAudioSprite.stories.d.ts +0 -12
  295. package/dist/components/PixiGifSprite/PixiGifSprite.stories.d.ts +0 -163
  296. package/dist/components/PixiImageSprite/PixiImageSprite.stories.d.ts +0 -150
  297. package/dist/components/PixiLottieSprite/PixiLottieSprite.stories.d.ts +0 -159
  298. package/dist/components/PixiSVGSprite/PixiSvgPathSprite.stories.d.ts +0 -131
  299. package/dist/components/PixiSequence/PixiSequence.stories.d.ts +0 -33
  300. package/dist/components/PixiTextSprite/PixiTextSprite.stories.d.ts +0 -140
  301. package/dist/components/PixiVideoSprite/PixiVideoSprite.stories.d.ts +0 -146
  302. package/dist/favicon.svg +0 -41
  303. package/dist/pixitweenjs-logo-dark.svg +0 -98
  304. package/dist/pixitweenjs-logo.svg +0 -97
  305. package/dist/stories/Features/TestHowlerAudioFiles.d.ts +0 -2
  306. package/dist/stories/Features/TimelineAnimations.d.ts +0 -15
  307. package/dist/stories/Features/TimelineTest.d.ts +0 -15
  308. package/dist/stories/Features/TimelineTest.stories.d.ts +0 -23
  309. package/dist/stories/Features/TimelineTestAudios.d.ts +0 -15
  310. package/dist/stories/Features/TimelineTestWithVideos.d.ts +0 -15
  311. package/dist/stories/Features/TimelineWithGif.d.ts +0 -21
  312. package/dist/stories/Features/common.tests.d.ts +0 -411
  313. /package/dist/{.gitkeep → utils/gsapEffects/index.d.ts} +0 -0
@@ -0,0 +1,57 @@
1
+ import { CaptionRenderMode } from './captionPose';
2
+ /** The words to draw, and the index of `words[0]` of that list within the full segment. */
3
+ export declare function displayedWordsFor<T>(mode: CaptionRenderMode, words: ReadonlyArray<T>, activeIndex: number): {
4
+ words: T[];
5
+ offset: number;
6
+ };
7
+ export interface ParsedColor {
8
+ /** 0xRRGGBB */
9
+ color: number;
10
+ /** 0..1 */
11
+ alpha: number;
12
+ }
13
+ /**
14
+ * Parse `#rgb`, `#rrggbb`, `#rrggbbaa`, `rgb()`, `rgba()` (comma or space separated, % alpha) and
15
+ * `transparent`. Returns null for anything else (named colours: let the caller fall back to Pixi).
16
+ *
17
+ * Fix vs Clippy: its boxed-caption background only understood `rgba(...)` strings; a hex or
18
+ * `rgb()` background was silently ignored and the default black box drawn instead.
19
+ */
20
+ export declare function parseCaptionColor(input: string | null | undefined): ParsedColor | null;
21
+ export interface BoxedBackground {
22
+ x: number;
23
+ y: number;
24
+ width: number;
25
+ height: number;
26
+ radius: number;
27
+ color: number;
28
+ alpha: number;
29
+ }
30
+ export declare const BOXED_PADDING = 12;
31
+ export declare const DEFAULT_BOXED_COLOR: ParsedColor;
32
+ /** Corner radius per boxed preset. */
33
+ export declare const boxedRadiusFor: (captionStyleId: string | null | undefined) => number;
34
+ /**
35
+ * The rounded box behind the whole caption in `boxed` mode, in coordinates relative to the
36
+ * caption centre. `captionBgColor` unset / `transparent` / unparseable falls back to the
37
+ * default 75% black (Clippy's behaviour).
38
+ */
39
+ export declare function boxedBackgroundSpec(contentWidth: number, contentHeight: number, captionBgColor: string | null | undefined, captionStyleId: string | null | undefined): BoxedBackground;
40
+ export interface WordboxPill {
41
+ x: number;
42
+ y: number;
43
+ width: number;
44
+ height: number;
45
+ radius: number;
46
+ }
47
+ export declare const WORDBOX_GROW_MS = 120;
48
+ /**
49
+ * The rounded pill behind the active word in `wordbox` mode: grows from the word's centre over
50
+ * 120 ms (ease-out-cubic). Relative to the caption centre.
51
+ */
52
+ export declare function wordboxPillSpec(pos: {
53
+ x: number;
54
+ y: number;
55
+ width: number;
56
+ height: number;
57
+ }, totalWidth: number, totalHeight: number, elapsedMs: number, fontSize: number): WordboxPill;
@@ -0,0 +1,107 @@
1
+ export type CaptionRenderMode = 'none' | 'pop' | 'glow' | 'boxed' | 'vhs' | 'wordbox' | 'punch' | 'slam' | 'glowpop' | 'springpop';
2
+ export interface PoseWord {
3
+ text?: string;
4
+ word?: string;
5
+ start: number;
6
+ end: number;
7
+ /** One emoji grapheme drawn above the word (Glow Pop). */
8
+ emoji?: string;
9
+ /** Image URL (or, after the renderer's download step, a local path) for `emoji`. */
10
+ emojiSrc?: string;
11
+ /** Per-word fill (`#RRGGBB`), used by Spring Pop where the colour changes word to word. */
12
+ color?: string;
13
+ }
14
+ /** `transformation.captionStyleId` → render mode. Unknown ids draw as `pop`. */
15
+ export declare const captionModeFor: (captionStyleId: unknown) => CaptionRenderMode;
16
+ /** Modes that draw only the active word. */
17
+ export declare const isSingleWordMode: (mode: CaptionRenderMode) => boolean;
18
+ /**
19
+ * Index of the word drawn at `t`, or -1. `slam` holds the last word that has started across gaps; every other mode
20
+ * shows a word only inside its own `[start, end)` window.
21
+ */
22
+ export declare const activeWordIndexAt: (words: PoseWord[], t: number, mode: CaptionRenderMode) => number;
23
+ /**
24
+ * Glow Pop timing (ms), measured from a 10 fps reference: each word spends about one frame as a horizontal
25
+ * motion-blur streak coming in and one going out; its emoji pops in with an overshoot over ~0.35 s and shrinks away.
26
+ */
27
+ export declare const GLOW_POP_ENTER_MS = 100;
28
+ export declare const GLOW_POP_EXIT_MS = 100;
29
+ export declare const GLOW_POP_EMOJI_MS = 350;
30
+ /**
31
+ * Horizontal blur strength at the peak of a streak, as a multiple of the font size, and the word's alpha at that
32
+ * peak. Tuned on a real headless render against the reference: in the CapCut streak frames about 30% of the crisp
33
+ * word's white pixels survive, so the streak must stay bright. A 0.3 em gaussian at alpha 0.4 left almost nothing.
34
+ */
35
+ export declare const GLOW_POP_BLUR_EM = 0.12;
36
+ export declare const GLOW_POP_STREAK_ALPHA = 0.6;
37
+ /**
38
+ * Bloom: the wide soft white light behind the word (and the warm halo behind its emoji) in the reference. Drawn as a
39
+ * blurred copy of the word under it — one text dropShadow cannot spread this far. Blur is a multiple of the font
40
+ * size; alpha multiplies the word's alpha.
41
+ */
42
+ export declare const GLOW_POP_BLOOM_BLUR_EM = 0.3;
43
+ export declare const GLOW_POP_BLOOM_ALPHA = 0.8;
44
+ /**
45
+ * How many blurred copies are stacked. One copy at alpha 1 lifted the band below a short word (`EYE`) by +19 luma
46
+ * where the reference shows +30 over its blank frame; the reference halo does not shrink with the word.
47
+ */
48
+ export declare const GLOW_POP_BLOOM_PASSES = 2;
49
+ export declare const GLOW_POP_EMOJI_BLOOM_ALPHA = 0.55;
50
+ /** Emoji size and vertical offset (centre above the word centre), as multiples of the font size. */
51
+ export declare const GLOW_POP_EMOJI_SIZE_EM = 1.5;
52
+ export declare const GLOW_POP_EMOJI_OFFSET_EM = 1.35;
53
+ export declare const easeOutBack: (t: number) => number;
54
+ export interface GlowPopMotion {
55
+ alpha: number;
56
+ /** Horizontal blur strength in px. */
57
+ blur: number;
58
+ scale: number;
59
+ emojiScale: number;
60
+ }
61
+ /** Per-frame look of the active Glow Pop word from how long it has been on and how long it has left. */
62
+ export declare const glowPopMotion: (elapsedMs: number, remainingMs: number, fontSize: number) => GlowPopMotion;
63
+ /**
64
+ * Spring Pop (CapCut "viral reel" captions), measured at the clip's native 30 fps by `analyze-captions` pass 2
65
+ * (phase 195.0): each word drops in from above on a damped spring, bobbing up and down until the next word replaces
66
+ * it, entering through a vertical motion blur. The spring is y(t) = -A * e^(-zeta*w*t) * cos(w*t), +y down, so a word
67
+ * starts above its rest position and falls through it. Fitted on 27 words of one clip: 4-6 Hz, zeta 0.1-0.15,
68
+ * amplitude 0.2-0.26 of the glyph height (~0.18 of the font size).
69
+ */
70
+ export declare const SPRING_POP_FREQUENCY_HZ = 5;
71
+ export declare const SPRING_POP_DAMPING = 0.12;
72
+ export declare const SPRING_POP_AMPLITUDE_EM = 0.2;
73
+ /** Vertical-blur window at the start of a word (ms), peak strength (font-size multiple) and the word's alpha then. */
74
+ export declare const SPRING_POP_BLUR_MS = 150;
75
+ export declare const SPRING_POP_BLUR_EM = 0.1;
76
+ export declare const SPRING_POP_BLUR_ALPHA = 0.75;
77
+ /** Bloom behind the word: same recipe as Glow Pop, a little lighter (the clip's glow is a thin halo with colour fringe). */
78
+ export declare const SPRING_POP_BLOOM_BLUR_EM = 0.22;
79
+ export declare const SPRING_POP_BLOOM_ALPHA = 0.7;
80
+ export interface SpringPopMotion {
81
+ alpha: number;
82
+ /** Vertical offset from the word's rest position in px (+ down). */
83
+ dy: number;
84
+ /** Vertical blur strength in px. */
85
+ blur: number;
86
+ /** Vertical stretch while the word is smeared (1 = none). */
87
+ scaleY: number;
88
+ }
89
+ /** Per-frame look of the active Spring Pop word from how long it has been on screen. Seekable and pure. */
90
+ export declare const springPopMotion: (elapsedMs: number, fontSize: number) => SpringPopMotion;
91
+ /** Vertical colour-channel split learned from the viral Reel: cool copy above, warm copy below, shrinking to a fringe. */
92
+ export declare const SPRING_POP_SPLIT_MS = 150;
93
+ export declare const SPRING_POP_SPLIT_EM = 0.072;
94
+ export declare const SPRING_POP_SPLIT_SETTLED_EM = 0.029;
95
+ export declare const SPRING_POP_SPLIT_TOP = "#5AA9FF";
96
+ export declare const SPRING_POP_SPLIT_BOTTOM = "#FFA14A";
97
+ export declare const SPRING_POP_SPLIT_ALPHA = 0.75;
98
+ /** Total top-to-bottom separation in px of the split copies (each copy sits half of it from the word). Seekable and pure. */
99
+ export declare const springPopSplit: (elapsedMs: number, fontSize: number) => number;
100
+ /** Seekable scale of the active word for the 071 CapCut modes (`punch`, `slam`); 1 for every other mode. */
101
+ export declare const activeWordScaleFor: (mode: CaptionRenderMode, elapsedMs: number) => number;
102
+ /** Pinned emoji art (Noto Color Emoji PNG, 128 px), so the editor and the render draw the same glyph. */
103
+ export declare const EMOJI_CDN_BASE = "https://cdn.jsdelivr.net/gh/googlefonts/noto-emoji@v2.047/png/128";
104
+ /** Noto file name for an emoji: codepoints in lower-case hex joined by `_`, without the VS16 selector. */
105
+ export declare const notoEmojiFileName: (emoji: string) => string | null;
106
+ /** Where the word's emoji image comes from: an explicit `emojiSrc`, else the pinned Noto URL for `emoji`. */
107
+ export declare const resolveEmojiSrc: (word: Pick<PoseWord, "emoji" | "emojiSrc">) => string | null;
@@ -0,0 +1,32 @@
1
+ import { CaptionRenderMode, GlowPopMotion, SpringPopMotion } from './captionPose';
2
+ /** Which TextStyle family to draw the word with. */
3
+ export type WordStyleKind = "base" | "active" | "inactive";
4
+ export interface WordVisual {
5
+ styleKind: WordStyleKind;
6
+ alpha: number;
7
+ /** Uniform scale, or a non-uniform one (spring-pop stretches Y while smeared). */
8
+ scale: number | {
9
+ x: number;
10
+ y: number;
11
+ };
12
+ /** Vertical offset from the rest position, px (+ down). */
13
+ dy: number;
14
+ /** Horizontal blur strength, px. 0 = no filter. */
15
+ blurX: number;
16
+ /** Vertical blur strength, px. 0 = no filter. */
17
+ blurY: number;
18
+ glowPop?: GlowPopMotion;
19
+ springPop?: SpringPopMotion;
20
+ /** Spring-pop colour-channel separation, px. */
21
+ split?: number;
22
+ }
23
+ /** Filters are only attached when the blur is visible (matches Clippy's `> 0.5` threshold). */
24
+ export declare const MIN_VISIBLE_BLUR = 0.5;
25
+ /**
26
+ * The look of one word.
27
+ * @param elapsedMs ms since the active word started (0 when none)
28
+ * @param remainingMs ms until the active word ends
29
+ */
30
+ export declare function wordVisualFor(mode: CaptionRenderMode, isActive: boolean, elapsedMs: number, remainingMs: number, fontSize: number): WordVisual;
31
+ /** Modes whose look changes continuously with time within a word (need per-frame updates). */
32
+ export declare const isTimeBasedMode: (mode: CaptionRenderMode) => boolean;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Word layout for karaoke captions (PixiCaptionsTrack): wrapping, centring and the gap between words. Pure — the
3
+ * caller measures the words with Pixi and passes numbers in, so the same rules run in the editor, the studio
4
+ * preview and the server render. MIRRORED: keep byte-identical to `clippy-pixijs-nodejs/src/captionWordLayout.ts`
5
+ * — the editor preview and the render must place words the same way. Both repos run a mirror test.
6
+ *
7
+ * Two defects this exists to prevent, both seen on a real UGC film ("feellighterand"):
8
+ * 1. The space was measured with `wordWrap` on, whose trimRight collapses a lone space to 0 px, so words sat
9
+ * edge to edge. The caller now measures it with wrapping off; `resolveSpaceWidth` also falls back to a
10
+ * fontSize-based width when a font still reports ~0.
11
+ * 2. The active word is drawn at 1.05–1.08× around its centre, so it grows into its neighbours. Each word's slot
12
+ * is reserved at the scale it can reach, so a highlighted word stays inside its own room.
13
+ */
14
+ /** A real space is about 0.28 em; used when measuring it gives ~0. */
15
+ export declare const FALLBACK_SPACE_EM = 0.28;
16
+ /**
17
+ * Extra gap between words in em, ON TOP of the real space and the room kept for the highlighted word. Zero by
18
+ * default: 0.1 em on top of those two read as about two spaces between words on a real UGC film. Raise it per
19
+ * caption with `transformation.wordSpacing` (px) for heavy strokes or wide fonts.
20
+ */
21
+ export declare const DEFAULT_WORD_SPACING_EM = 0;
22
+ /** Line pitch as a multiple of the tallest word on the line. */
23
+ export declare const LINE_PITCH = 1.2;
24
+ export interface WordMetric {
25
+ width: number;
26
+ height: number;
27
+ }
28
+ export interface WordPosition {
29
+ /** Left edge of the word's slot (the slot is `width` wide, already widened for the active scale). */
30
+ x: number;
31
+ y: number;
32
+ /** The slot width: the word's measured width times `activeScale`. Draw the word centred in it. */
33
+ width: number;
34
+ height: number;
35
+ }
36
+ export interface CaptionLine {
37
+ start: number;
38
+ end: number;
39
+ width: number;
40
+ height: number;
41
+ }
42
+ export interface CaptionLayout {
43
+ positions: WordPosition[];
44
+ lines: CaptionLine[];
45
+ totalWidth: number;
46
+ totalHeight: number;
47
+ }
48
+ export interface CaptionLayoutOptions {
49
+ /** Measured width of a single space with wrapping OFF; may be ~0 (see `resolveSpaceWidth`). */
50
+ spaceWidth: number;
51
+ fontSize: number;
52
+ maxLineWidth: number;
53
+ /** Extra px between words. Omitted → `DEFAULT_WORD_SPACING_EM * fontSize`. */
54
+ wordSpacing?: number;
55
+ /** The largest scale any word is drawn at (1 when the style does not scale the active word). */
56
+ activeScale?: number;
57
+ }
58
+ /** The measured space when it is believable, else the em-based fallback. */
59
+ export declare const resolveSpaceWidth: (measured: number, fontSize: number) => number;
60
+ /** The extra gap: an explicit non-negative px value, else the default for this font size. */
61
+ export declare const resolveWordSpacing: (wordSpacing: unknown, fontSize: number) => number;
62
+ /** How big the active word gets, per render mode — the slot reserves this much. */
63
+ export declare const activeScaleFor: (renderMode: string) => number;
64
+ export declare const transformCaptionText: (text: string, textTransform: string) => string;
65
+ export declare const activeWordWindow: <T>(words: T[], activeIndex: number, size?: number) => T[];
66
+ export declare const easeCaptionProgress: (elapsedMs: number, durationMs: number) => number;
67
+ export declare function layoutCaptionWords(words: WordMetric[], opts: CaptionLayoutOptions): CaptionLayout;
@@ -0,0 +1,20 @@
1
+ import { CaptionSegment, CaptionWord } from './types';
2
+ export interface GroupWordsOptions {
3
+ /**
4
+ * A silence of at least this many seconds between two words starts a new
5
+ * segment. Clippy templates use 0.35 (glow-pop) and 0.4 (spring-pop).
6
+ */
7
+ segmentGapSec?: number;
8
+ /** Hard cap on words per segment. */
9
+ maxWords?: number;
10
+ /** Start a new segment once it would span longer than this many seconds. */
11
+ maxDurationSec?: number;
12
+ /** Prefix for generated ids: `<prefix>_0`, `<prefix>_1`, ... */
13
+ idPrefix?: string;
14
+ }
15
+ export declare const DEFAULT_SEGMENT_GAP_SEC = 0.35;
16
+ /**
17
+ * Group a flat, word-timed transcript into caption segments (pages).
18
+ * Words are sorted by start first; the input array is not mutated.
19
+ */
20
+ export declare function groupWordsIntoSegments(words: ReadonlyArray<CaptionWord>, opts?: GroupWordsOptions): CaptionSegment[];
@@ -0,0 +1,10 @@
1
+ export * from './captionPose';
2
+ export * from './captionWordLayout';
3
+ export * from './types';
4
+ export * from './groupSegments';
5
+ export * from './parseSubtitles';
6
+ export * from './timeBase';
7
+ export * from './sampleCaption';
8
+ export * from './captionClock';
9
+ export * from './captionVisual';
10
+ export * from './captionDisplay';
@@ -0,0 +1,25 @@
1
+ import { CaptionSegment, CaptionWord } from './types';
2
+ export interface ParseSubtitleOptions {
3
+ /**
4
+ * When a cue has no word timing, spread the cue over its words
5
+ * proportionally to word length so karaoke modes still have something to
6
+ * highlight. Default false (cue-level segments only).
7
+ */
8
+ estimateWords?: boolean;
9
+ /** Prefix for generated segment ids. Default "caption". */
10
+ idPrefix?: string;
11
+ }
12
+ export type SubtitleFormat = "srt" | "vtt" | "unknown";
13
+ /** "01:02:03,456" | "02:03.456" -> seconds, or null when malformed. */
14
+ export declare function parseTimestamp(raw: string): number | null;
15
+ /**
16
+ * Spread `[start, end]` across the whitespace-separated words of `text`,
17
+ * weighted by word length (so "a" gets less time than "extraordinary").
18
+ * Words are contiguous: each ends where the next starts.
19
+ */
20
+ export declare function estimateWordTimings(text: string, start: number, end: number): CaptionWord[];
21
+ export declare function parseSRT(content: string, opts?: ParseSubtitleOptions): CaptionSegment[];
22
+ export declare function parseVTT(content: string, opts?: ParseSubtitleOptions): CaptionSegment[];
23
+ export declare function detectSubtitleFormat(content: string): SubtitleFormat;
24
+ /** Auto-detect SRT vs WebVTT. Throws on unrecognised content. */
25
+ export declare function parseSubtitles(content: string, opts?: ParseSubtitleOptions): CaptionSegment[];
@@ -0,0 +1,25 @@
1
+ import { CaptionRenderMode } from './captionPose';
2
+ import { CaptionSegment, CaptionWord } from './types';
3
+ export interface CaptionSample {
4
+ /** Segment on screen at `t`, or null. */
5
+ segment: CaptionSegment | null;
6
+ /** Index into `segment.words` of the active word, or -1. */
7
+ wordIndex: number;
8
+ word: CaptionWord | null;
9
+ /** Milliseconds since the active word started (0 when none). */
10
+ elapsedMs: number;
11
+ /** Milliseconds until the active word ends (0 when none). */
12
+ remainingMs: number;
13
+ }
14
+ /**
15
+ * The pure core of Clippy's PixiCaptionsTrack `onRender` loop: what is on
16
+ * screen at time `t` (seconds, in the same time base as the segments).
17
+ *
18
+ * Active segment uses the inclusive range `[start, end]`, exactly as the
19
+ * editor does; where segments touch, the first match wins. Seek-safe: same
20
+ * `t` always gives the same result.
21
+ *
22
+ * Caveat: in `slam` mode the word is held across gaps, so it can keep
23
+ * `elapsedMs` growing past `word.end`; `remainingMs` is clamped at 0.
24
+ */
25
+ export declare function sampleCaptionAt(segments: ReadonlyArray<CaptionSegment>, t: number, mode: CaptionRenderMode): CaptionSample;
@@ -0,0 +1,34 @@
1
+ import { CaptionSegment } from './types';
2
+ /** Cues may overrun the clip by this much and still count as clip-local. */
3
+ export declare const CLIP_LOCAL_TOLERANCE_SEC = 0.5;
4
+ export interface CaptionMediaBounds {
5
+ /** Timeline start of the associated media clip (seconds). */
6
+ start: number;
7
+ /** Timeline end of the associated media clip (seconds). */
8
+ end: number;
9
+ /**
10
+ * Source in-point: where in the source file the clip begins. Clippy calls
11
+ * this `frameStartAt`. Default 0.
12
+ */
13
+ sourceStart?: number;
14
+ }
15
+ /**
16
+ * True when the segments already start at 0 = clip start, detected by every
17
+ * cue ending within the clip duration (+ tolerance).
18
+ */
19
+ export declare function isClipLocal(segments: ReadonlyArray<CaptionSegment>, media: Pick<CaptionMediaBounds, "start" | "end">): boolean;
20
+ /**
21
+ * Seconds to add to stored caption times to reach timeline-absolute time.
22
+ * clip-local -> media.start
23
+ * source-absolute -> media.start - media.sourceStart
24
+ * Returns 0 when there is no media to anchor to.
25
+ */
26
+ export declare function resolveCaptionOffset(segments: ReadonlyArray<CaptionSegment>, media?: CaptionMediaBounds | null): number;
27
+ /** Shift every segment and word by `offsetSec`. Does not mutate the input. */
28
+ export declare function projectSegments(segments: ReadonlyArray<CaptionSegment>, offsetSec: number): CaptionSegment[];
29
+ /**
30
+ * Keep only the part of the captions inside `[rangeStart, rangeEnd]`.
31
+ * Segments are clamped to the range; words entirely outside are dropped and
32
+ * the rest are clamped. Segments left with no overlap are removed.
33
+ */
34
+ export declare function clipSegmentsToRange(segments: ReadonlyArray<CaptionSegment>, rangeStart: number, rangeEnd: number): CaptionSegment[];
@@ -0,0 +1,279 @@
1
+ import { z } from 'zod';
2
+ import { PoseWord } from './captionPose';
3
+ export declare const captionWordSchema: z.ZodEffects<z.ZodObject<{
4
+ text: z.ZodString;
5
+ start: z.ZodNumber;
6
+ end: z.ZodNumber;
7
+ /** One emoji grapheme drawn above the word (glow-pop). */
8
+ emoji: z.ZodOptional<z.ZodString>;
9
+ /** Explicit emoji image URL; overrides the pinned Noto CDN lookup. */
10
+ emojiSrc: z.ZodOptional<z.ZodString>;
11
+ /** Per-word fill `#RRGGBB` (spring-pop). */
12
+ color: z.ZodOptional<z.ZodString>;
13
+ /** ASR confidence 0..1, carried through untouched. */
14
+ confidence: z.ZodOptional<z.ZodNumber>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ text: string;
17
+ start: number;
18
+ end: number;
19
+ color?: string | undefined;
20
+ emoji?: string | undefined;
21
+ emojiSrc?: string | undefined;
22
+ confidence?: number | undefined;
23
+ }, {
24
+ text: string;
25
+ start: number;
26
+ end: number;
27
+ color?: string | undefined;
28
+ emoji?: string | undefined;
29
+ emojiSrc?: string | undefined;
30
+ confidence?: number | undefined;
31
+ }>, {
32
+ text: string;
33
+ start: number;
34
+ end: number;
35
+ color?: string | undefined;
36
+ emoji?: string | undefined;
37
+ emojiSrc?: string | undefined;
38
+ confidence?: number | undefined;
39
+ }, {
40
+ text: string;
41
+ start: number;
42
+ end: number;
43
+ color?: string | undefined;
44
+ emoji?: string | undefined;
45
+ emojiSrc?: string | undefined;
46
+ confidence?: number | undefined;
47
+ }>;
48
+ export declare const captionSegmentSchema: z.ZodEffects<z.ZodObject<{
49
+ id: z.ZodString;
50
+ start: z.ZodNumber;
51
+ end: z.ZodNumber;
52
+ text: z.ZodString;
53
+ words: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
54
+ text: z.ZodString;
55
+ start: z.ZodNumber;
56
+ end: z.ZodNumber;
57
+ /** One emoji grapheme drawn above the word (glow-pop). */
58
+ emoji: z.ZodOptional<z.ZodString>;
59
+ /** Explicit emoji image URL; overrides the pinned Noto CDN lookup. */
60
+ emojiSrc: z.ZodOptional<z.ZodString>;
61
+ /** Per-word fill `#RRGGBB` (spring-pop). */
62
+ color: z.ZodOptional<z.ZodString>;
63
+ /** ASR confidence 0..1, carried through untouched. */
64
+ confidence: z.ZodOptional<z.ZodNumber>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ text: string;
67
+ start: number;
68
+ end: number;
69
+ color?: string | undefined;
70
+ emoji?: string | undefined;
71
+ emojiSrc?: string | undefined;
72
+ confidence?: number | undefined;
73
+ }, {
74
+ text: string;
75
+ start: number;
76
+ end: number;
77
+ color?: string | undefined;
78
+ emoji?: string | undefined;
79
+ emojiSrc?: string | undefined;
80
+ confidence?: number | undefined;
81
+ }>, {
82
+ text: string;
83
+ start: number;
84
+ end: number;
85
+ color?: string | undefined;
86
+ emoji?: string | undefined;
87
+ emojiSrc?: string | undefined;
88
+ confidence?: number | undefined;
89
+ }, {
90
+ text: string;
91
+ start: number;
92
+ end: number;
93
+ color?: string | undefined;
94
+ emoji?: string | undefined;
95
+ emojiSrc?: string | undefined;
96
+ confidence?: number | undefined;
97
+ }>, "many">>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ text: string;
100
+ start: number;
101
+ end: number;
102
+ id: string;
103
+ words?: {
104
+ text: string;
105
+ start: number;
106
+ end: number;
107
+ color?: string | undefined;
108
+ emoji?: string | undefined;
109
+ emojiSrc?: string | undefined;
110
+ confidence?: number | undefined;
111
+ }[] | undefined;
112
+ }, {
113
+ text: string;
114
+ start: number;
115
+ end: number;
116
+ id: string;
117
+ words?: {
118
+ text: string;
119
+ start: number;
120
+ end: number;
121
+ color?: string | undefined;
122
+ emoji?: string | undefined;
123
+ emojiSrc?: string | undefined;
124
+ confidence?: number | undefined;
125
+ }[] | undefined;
126
+ }>, {
127
+ text: string;
128
+ start: number;
129
+ end: number;
130
+ id: string;
131
+ words?: {
132
+ text: string;
133
+ start: number;
134
+ end: number;
135
+ color?: string | undefined;
136
+ emoji?: string | undefined;
137
+ emojiSrc?: string | undefined;
138
+ confidence?: number | undefined;
139
+ }[] | undefined;
140
+ }, {
141
+ text: string;
142
+ start: number;
143
+ end: number;
144
+ id: string;
145
+ words?: {
146
+ text: string;
147
+ start: number;
148
+ end: number;
149
+ color?: string | undefined;
150
+ emoji?: string | undefined;
151
+ emojiSrc?: string | undefined;
152
+ confidence?: number | undefined;
153
+ }[] | undefined;
154
+ }>;
155
+ export declare const captionSegmentsSchema: z.ZodArray<z.ZodEffects<z.ZodObject<{
156
+ id: z.ZodString;
157
+ start: z.ZodNumber;
158
+ end: z.ZodNumber;
159
+ text: z.ZodString;
160
+ words: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
161
+ text: z.ZodString;
162
+ start: z.ZodNumber;
163
+ end: z.ZodNumber;
164
+ /** One emoji grapheme drawn above the word (glow-pop). */
165
+ emoji: z.ZodOptional<z.ZodString>;
166
+ /** Explicit emoji image URL; overrides the pinned Noto CDN lookup. */
167
+ emojiSrc: z.ZodOptional<z.ZodString>;
168
+ /** Per-word fill `#RRGGBB` (spring-pop). */
169
+ color: z.ZodOptional<z.ZodString>;
170
+ /** ASR confidence 0..1, carried through untouched. */
171
+ confidence: z.ZodOptional<z.ZodNumber>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ text: string;
174
+ start: number;
175
+ end: number;
176
+ color?: string | undefined;
177
+ emoji?: string | undefined;
178
+ emojiSrc?: string | undefined;
179
+ confidence?: number | undefined;
180
+ }, {
181
+ text: string;
182
+ start: number;
183
+ end: number;
184
+ color?: string | undefined;
185
+ emoji?: string | undefined;
186
+ emojiSrc?: string | undefined;
187
+ confidence?: number | undefined;
188
+ }>, {
189
+ text: string;
190
+ start: number;
191
+ end: number;
192
+ color?: string | undefined;
193
+ emoji?: string | undefined;
194
+ emojiSrc?: string | undefined;
195
+ confidence?: number | undefined;
196
+ }, {
197
+ text: string;
198
+ start: number;
199
+ end: number;
200
+ color?: string | undefined;
201
+ emoji?: string | undefined;
202
+ emojiSrc?: string | undefined;
203
+ confidence?: number | undefined;
204
+ }>, "many">>;
205
+ }, "strip", z.ZodTypeAny, {
206
+ text: string;
207
+ start: number;
208
+ end: number;
209
+ id: string;
210
+ words?: {
211
+ text: string;
212
+ start: number;
213
+ end: number;
214
+ color?: string | undefined;
215
+ emoji?: string | undefined;
216
+ emojiSrc?: string | undefined;
217
+ confidence?: number | undefined;
218
+ }[] | undefined;
219
+ }, {
220
+ text: string;
221
+ start: number;
222
+ end: number;
223
+ id: string;
224
+ words?: {
225
+ text: string;
226
+ start: number;
227
+ end: number;
228
+ color?: string | undefined;
229
+ emoji?: string | undefined;
230
+ emojiSrc?: string | undefined;
231
+ confidence?: number | undefined;
232
+ }[] | undefined;
233
+ }>, {
234
+ text: string;
235
+ start: number;
236
+ end: number;
237
+ id: string;
238
+ words?: {
239
+ text: string;
240
+ start: number;
241
+ end: number;
242
+ color?: string | undefined;
243
+ emoji?: string | undefined;
244
+ emojiSrc?: string | undefined;
245
+ confidence?: number | undefined;
246
+ }[] | undefined;
247
+ }, {
248
+ text: string;
249
+ start: number;
250
+ end: number;
251
+ id: string;
252
+ words?: {
253
+ text: string;
254
+ start: number;
255
+ end: number;
256
+ color?: string | undefined;
257
+ emoji?: string | undefined;
258
+ emojiSrc?: string | undefined;
259
+ confidence?: number | undefined;
260
+ }[] | undefined;
261
+ }>, "many">;
262
+ export type CaptionWord = z.infer<typeof captionWordSchema>;
263
+ export type CaptionSegment = z.infer<typeof captionSegmentSchema>;
264
+ /** Strict parse: throws ZodError on any invalid segment. */
265
+ export declare function parseCaptionSegments(input: unknown): CaptionSegment[];
266
+ /** Display text of a word; tolerates the Whisper `word` spelling. */
267
+ export declare const captionWordText: (w: Pick<PoseWord, "text" | "word">) => string;
268
+ /**
269
+ * Best-effort conversion of API-shaped data into canonical segments.
270
+ *
271
+ * Accepts either an array of segments or `{ segments: [...] }` (the Clippy /
272
+ * Whisper `SubtitleData` envelope). Segment times may be `start/end` or
273
+ * `startTime/endTime`; word text may be `text` or `word`. Invalid words and
274
+ * segments are dropped rather than throwing. Output is sorted by start and
275
+ * has unique-per-input ids.
276
+ *
277
+ * Use `parseCaptionSegments` instead when you want strict validation.
278
+ */
279
+ export declare function normalizeCaptionSegments(input: unknown): CaptionSegment[];