@react-native-motion-kit/text-motion 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +20 -0
  3. package/README.ko.md +698 -0
  4. package/README.md +696 -2
  5. package/lib/module/accessibility/index.js +4 -0
  6. package/lib/module/accessibility/index.js.map +1 -0
  7. package/lib/module/accessibility/policies.js +39 -0
  8. package/lib/module/accessibility/policies.js.map +1 -0
  9. package/lib/module/controls/brand.js +4 -0
  10. package/lib/module/controls/brand.js.map +1 -0
  11. package/lib/module/controls/controls.js +28 -0
  12. package/lib/module/controls/controls.js.map +1 -0
  13. package/lib/module/controls/descriptors.js +55 -0
  14. package/lib/module/controls/descriptors.js.map +1 -0
  15. package/lib/module/controls/index.js +4 -0
  16. package/lib/module/controls/index.js.map +1 -0
  17. package/lib/module/effects/compose.js +48 -0
  18. package/lib/module/effects/compose.js.map +1 -0
  19. package/lib/module/effects/fade.js +15 -0
  20. package/lib/module/effects/fade.js.map +1 -0
  21. package/lib/module/effects/index.js +12 -0
  22. package/lib/module/effects/index.js.map +1 -0
  23. package/lib/module/effects/lineReveal.js +17 -0
  24. package/lib/module/effects/lineReveal.js.map +1 -0
  25. package/lib/module/effects/pulse.js +14 -0
  26. package/lib/module/effects/pulse.js.map +1 -0
  27. package/lib/module/effects/rise.js +14 -0
  28. package/lib/module/effects/rise.js.map +1 -0
  29. package/lib/module/effects/scale.js +15 -0
  30. package/lib/module/effects/scale.js.map +1 -0
  31. package/lib/module/effects/shake.js +14 -0
  32. package/lib/module/effects/shake.js.map +1 -0
  33. package/lib/module/effects/slide.js +15 -0
  34. package/lib/module/effects/slide.js.map +1 -0
  35. package/lib/module/effects/typewriter.js +19 -0
  36. package/lib/module/effects/typewriter.js.map +1 -0
  37. package/lib/module/effects/validation.js +10 -0
  38. package/lib/module/effects/validation.js.map +1 -0
  39. package/lib/module/index.js +10 -0
  40. package/lib/module/index.js.map +1 -0
  41. package/lib/module/package.json +1 -0
  42. package/lib/module/presets/index.js +35 -0
  43. package/lib/module/presets/index.js.map +1 -0
  44. package/lib/module/recipe/component.js +60 -0
  45. package/lib/module/recipe/component.js.map +1 -0
  46. package/lib/module/recipe/defineTextMotion.js +9 -0
  47. package/lib/module/recipe/defineTextMotion.js.map +1 -0
  48. package/lib/module/recipe/descriptors.js +60 -0
  49. package/lib/module/recipe/descriptors.js.map +1 -0
  50. package/lib/module/recipe/index.js +5 -0
  51. package/lib/module/recipe/index.js.map +1 -0
  52. package/lib/module/recipe/recipe.js +163 -0
  53. package/lib/module/recipe/recipe.js.map +1 -0
  54. package/lib/module/renderers/index.js +5 -0
  55. package/lib/module/renderers/index.js.map +1 -0
  56. package/lib/module/renderers/nativeText.js +494 -0
  57. package/lib/module/renderers/nativeText.js.map +1 -0
  58. package/lib/module/renderers/nativeTextControls.js +96 -0
  59. package/lib/module/renderers/nativeTextControls.js.map +1 -0
  60. package/lib/module/renderers/nativeTextLineLayout.js +290 -0
  61. package/lib/module/renderers/nativeTextLineLayout.js.map +1 -0
  62. package/lib/module/renderers/nativeTextPlayback.js +91 -0
  63. package/lib/module/renderers/nativeTextPlayback.js.map +1 -0
  64. package/lib/module/renderers/overlayText.js +543 -0
  65. package/lib/module/renderers/overlayText.js.map +1 -0
  66. package/lib/module/renderers/overlayTextLayout.js +182 -0
  67. package/lib/module/renderers/overlayTextLayout.js.map +1 -0
  68. package/lib/module/renderers/rendererMotion.js +264 -0
  69. package/lib/module/renderers/rendererMotion.js.map +1 -0
  70. package/lib/module/split/createToken.js +19 -0
  71. package/lib/module/split/createToken.js.map +1 -0
  72. package/lib/module/split/custom.js +57 -0
  73. package/lib/module/split/custom.js.map +1 -0
  74. package/lib/module/split/graphemes.js +25 -0
  75. package/lib/module/split/graphemes.js.map +1 -0
  76. package/lib/module/split/index.js +7 -0
  77. package/lib/module/split/index.js.map +1 -0
  78. package/lib/module/split/lines.js +43 -0
  79. package/lib/module/split/lines.js.map +1 -0
  80. package/lib/module/split/segmenter.js +74 -0
  81. package/lib/module/split/segmenter.js.map +1 -0
  82. package/lib/module/split/words.js +28 -0
  83. package/lib/module/split/words.js.map +1 -0
  84. package/lib/module/timeline/index.js +7 -0
  85. package/lib/module/timeline/index.js.map +1 -0
  86. package/lib/module/timeline/parallel.js +21 -0
  87. package/lib/module/timeline/parallel.js.map +1 -0
  88. package/lib/module/timeline/sequence.js +18 -0
  89. package/lib/module/timeline/sequence.js.map +1 -0
  90. package/lib/module/timeline/stagger.js +43 -0
  91. package/lib/module/timeline/stagger.js.map +1 -0
  92. package/lib/module/timeline/validation.js +24 -0
  93. package/lib/module/timeline/validation.js.map +1 -0
  94. package/lib/module/timeline/wave.js +25 -0
  95. package/lib/module/timeline/wave.js.map +1 -0
  96. package/lib/module/types/index.js +4 -0
  97. package/lib/module/types/index.js.map +1 -0
  98. package/lib/module/types/recipe.js +4 -0
  99. package/lib/module/types/recipe.js.map +1 -0
  100. package/lib/module/types/renderer.js +27 -0
  101. package/lib/module/types/renderer.js.map +1 -0
  102. package/lib/module/types/token.js +2 -0
  103. package/lib/module/types/token.js.map +1 -0
  104. package/lib/typescript/package.json +1 -0
  105. package/lib/typescript/src/accessibility/index.d.ts +2 -0
  106. package/lib/typescript/src/accessibility/index.d.ts.map +1 -0
  107. package/lib/typescript/src/accessibility/policies.d.ts +13 -0
  108. package/lib/typescript/src/accessibility/policies.d.ts.map +1 -0
  109. package/lib/typescript/src/controls/brand.d.ts +2 -0
  110. package/lib/typescript/src/controls/brand.d.ts.map +1 -0
  111. package/lib/typescript/src/controls/controls.d.ts +28 -0
  112. package/lib/typescript/src/controls/controls.d.ts.map +1 -0
  113. package/lib/typescript/src/controls/descriptors.d.ts +14 -0
  114. package/lib/typescript/src/controls/descriptors.d.ts.map +1 -0
  115. package/lib/typescript/src/controls/index.d.ts +3 -0
  116. package/lib/typescript/src/controls/index.d.ts.map +1 -0
  117. package/lib/typescript/src/effects/compose.d.ts +11 -0
  118. package/lib/typescript/src/effects/compose.d.ts.map +1 -0
  119. package/lib/typescript/src/effects/fade.d.ts +10 -0
  120. package/lib/typescript/src/effects/fade.d.ts.map +1 -0
  121. package/lib/typescript/src/effects/index.d.ts +10 -0
  122. package/lib/typescript/src/effects/index.d.ts.map +1 -0
  123. package/lib/typescript/src/effects/lineReveal.d.ts +11 -0
  124. package/lib/typescript/src/effects/lineReveal.d.ts.map +1 -0
  125. package/lib/typescript/src/effects/pulse.d.ts +8 -0
  126. package/lib/typescript/src/effects/pulse.d.ts.map +1 -0
  127. package/lib/typescript/src/effects/rise.d.ts +8 -0
  128. package/lib/typescript/src/effects/rise.d.ts.map +1 -0
  129. package/lib/typescript/src/effects/scale.d.ts +10 -0
  130. package/lib/typescript/src/effects/scale.d.ts.map +1 -0
  131. package/lib/typescript/src/effects/shake.d.ts +8 -0
  132. package/lib/typescript/src/effects/shake.d.ts.map +1 -0
  133. package/lib/typescript/src/effects/slide.d.ts +10 -0
  134. package/lib/typescript/src/effects/slide.d.ts.map +1 -0
  135. package/lib/typescript/src/effects/typewriter.d.ts +13 -0
  136. package/lib/typescript/src/effects/typewriter.d.ts.map +1 -0
  137. package/lib/typescript/src/effects/validation.d.ts +2 -0
  138. package/lib/typescript/src/effects/validation.d.ts.map +1 -0
  139. package/lib/typescript/src/index.d.ts +15 -0
  140. package/lib/typescript/src/index.d.ts.map +1 -0
  141. package/lib/typescript/src/presets/index.d.ts +10 -0
  142. package/lib/typescript/src/presets/index.d.ts.map +1 -0
  143. package/lib/typescript/src/recipe/component.d.ts +3 -0
  144. package/lib/typescript/src/recipe/component.d.ts.map +1 -0
  145. package/lib/typescript/src/recipe/defineTextMotion.d.ts +4 -0
  146. package/lib/typescript/src/recipe/defineTextMotion.d.ts.map +1 -0
  147. package/lib/typescript/src/recipe/descriptors.d.ts +15 -0
  148. package/lib/typescript/src/recipe/descriptors.d.ts.map +1 -0
  149. package/lib/typescript/src/recipe/index.d.ts +4 -0
  150. package/lib/typescript/src/recipe/index.d.ts.map +1 -0
  151. package/lib/typescript/src/recipe/recipe.d.ts +67 -0
  152. package/lib/typescript/src/recipe/recipe.d.ts.map +1 -0
  153. package/lib/typescript/src/renderers/index.d.ts +3 -0
  154. package/lib/typescript/src/renderers/index.d.ts.map +1 -0
  155. package/lib/typescript/src/renderers/nativeText.d.ts +13 -0
  156. package/lib/typescript/src/renderers/nativeText.d.ts.map +1 -0
  157. package/lib/typescript/src/renderers/nativeTextControls.d.ts +16 -0
  158. package/lib/typescript/src/renderers/nativeTextControls.d.ts.map +1 -0
  159. package/lib/typescript/src/renderers/nativeTextLineLayout.d.ts +84 -0
  160. package/lib/typescript/src/renderers/nativeTextLineLayout.d.ts.map +1 -0
  161. package/lib/typescript/src/renderers/nativeTextPlayback.d.ts +21 -0
  162. package/lib/typescript/src/renderers/nativeTextPlayback.d.ts.map +1 -0
  163. package/lib/typescript/src/renderers/overlayText.d.ts +13 -0
  164. package/lib/typescript/src/renderers/overlayText.d.ts.map +1 -0
  165. package/lib/typescript/src/renderers/overlayTextLayout.d.ts +36 -0
  166. package/lib/typescript/src/renderers/overlayTextLayout.d.ts.map +1 -0
  167. package/lib/typescript/src/renderers/rendererMotion.d.ts +53 -0
  168. package/lib/typescript/src/renderers/rendererMotion.d.ts.map +1 -0
  169. package/lib/typescript/src/split/createToken.d.ts +11 -0
  170. package/lib/typescript/src/split/createToken.d.ts.map +1 -0
  171. package/lib/typescript/src/split/custom.d.ts +17 -0
  172. package/lib/typescript/src/split/custom.d.ts.map +1 -0
  173. package/lib/typescript/src/split/graphemes.d.ts +4 -0
  174. package/lib/typescript/src/split/graphemes.d.ts.map +1 -0
  175. package/lib/typescript/src/split/index.d.ts +5 -0
  176. package/lib/typescript/src/split/index.d.ts.map +1 -0
  177. package/lib/typescript/src/split/lines.d.ts +4 -0
  178. package/lib/typescript/src/split/lines.d.ts.map +1 -0
  179. package/lib/typescript/src/split/segmenter.d.ts +18 -0
  180. package/lib/typescript/src/split/segmenter.d.ts.map +1 -0
  181. package/lib/typescript/src/split/words.d.ts +4 -0
  182. package/lib/typescript/src/split/words.d.ts.map +1 -0
  183. package/lib/typescript/src/timeline/index.d.ts +5 -0
  184. package/lib/typescript/src/timeline/index.d.ts.map +1 -0
  185. package/lib/typescript/src/timeline/parallel.d.ts +4 -0
  186. package/lib/typescript/src/timeline/parallel.d.ts.map +1 -0
  187. package/lib/typescript/src/timeline/sequence.d.ts +4 -0
  188. package/lib/typescript/src/timeline/sequence.d.ts.map +1 -0
  189. package/lib/typescript/src/timeline/stagger.d.ts +11 -0
  190. package/lib/typescript/src/timeline/stagger.d.ts.map +1 -0
  191. package/lib/typescript/src/timeline/validation.d.ts +4 -0
  192. package/lib/typescript/src/timeline/validation.d.ts.map +1 -0
  193. package/lib/typescript/src/timeline/wave.d.ts +11 -0
  194. package/lib/typescript/src/timeline/wave.d.ts.map +1 -0
  195. package/lib/typescript/src/types/index.d.ts +6 -0
  196. package/lib/typescript/src/types/index.d.ts.map +1 -0
  197. package/lib/typescript/src/types/recipe.d.ts +123 -0
  198. package/lib/typescript/src/types/recipe.d.ts.map +1 -0
  199. package/lib/typescript/src/types/renderer.d.ts +51 -0
  200. package/lib/typescript/src/types/renderer.d.ts.map +1 -0
  201. package/lib/typescript/src/types/token.d.ts +35 -0
  202. package/lib/typescript/src/types/token.d.ts.map +1 -0
  203. package/package.json +116 -3
  204. package/src/accessibility/index.ts +7 -0
  205. package/src/accessibility/policies.ts +60 -0
  206. package/src/controls/brand.ts +3 -0
  207. package/src/controls/controls.ts +41 -0
  208. package/src/controls/descriptors.ts +83 -0
  209. package/src/controls/index.ts +2 -0
  210. package/src/effects/compose.ts +98 -0
  211. package/src/effects/fade.ts +22 -0
  212. package/src/effects/index.ts +9 -0
  213. package/src/effects/lineReveal.ts +28 -0
  214. package/src/effects/pulse.ts +19 -0
  215. package/src/effects/rise.ts +19 -0
  216. package/src/effects/scale.ts +22 -0
  217. package/src/effects/shake.ts +19 -0
  218. package/src/effects/slide.ts +22 -0
  219. package/src/effects/typewriter.ts +16 -0
  220. package/src/effects/validation.ts +9 -0
  221. package/src/index.tsx +46 -0
  222. package/src/presets/index.ts +42 -0
  223. package/src/recipe/component.tsx +88 -0
  224. package/src/recipe/defineTextMotion.ts +6 -0
  225. package/src/recipe/descriptors.ts +158 -0
  226. package/src/recipe/index.ts +3 -0
  227. package/src/recipe/recipe.ts +359 -0
  228. package/src/renderers/index.ts +2 -0
  229. package/src/renderers/nativeText.tsx +813 -0
  230. package/src/renderers/nativeTextControls.ts +131 -0
  231. package/src/renderers/nativeTextLineLayout.ts +495 -0
  232. package/src/renderers/nativeTextPlayback.ts +204 -0
  233. package/src/renderers/overlayText.tsx +945 -0
  234. package/src/renderers/overlayTextLayout.ts +312 -0
  235. package/src/renderers/rendererMotion.ts +483 -0
  236. package/src/split/createToken.ts +26 -0
  237. package/src/split/custom.ts +92 -0
  238. package/src/split/graphemes.ts +27 -0
  239. package/src/split/index.ts +9 -0
  240. package/src/split/lines.ts +35 -0
  241. package/src/split/segmenter.ts +111 -0
  242. package/src/split/words.ts +28 -0
  243. package/src/timeline/index.ts +4 -0
  244. package/src/timeline/parallel.ts +30 -0
  245. package/src/timeline/sequence.ts +29 -0
  246. package/src/timeline/stagger.ts +60 -0
  247. package/src/timeline/validation.ts +29 -0
  248. package/src/timeline/wave.ts +34 -0
  249. package/src/types/index.ts +34 -0
  250. package/src/types/recipe.ts +195 -0
  251. package/src/types/renderer.ts +91 -0
  252. package/src/types/token.ts +39 -0
@@ -0,0 +1,2 @@
1
+ export declare function validateFiniteEffectNumber(value: number, label: string): number;
2
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/effects/validation.ts"],"names":[],"mappings":"AAEA,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM/E"}
@@ -0,0 +1,15 @@
1
+ export { parentLabelPolicy } from './accessibility/index.js';
2
+ export { useTextMotionControls } from './controls/index.js';
3
+ export { fade, lineReveal, pulse, rise, scale, shake, slide, typewriter } from './effects/index.js';
4
+ export { defineTextMotion } from './recipe/index.js';
5
+ export { nativeText, overlayText } from './renderers/index.js';
6
+ export { custom, graphemes, lines, words } from './split/index.js';
7
+ export { parallel, sequence, stagger, wave } from './timeline/index.js';
8
+ export type { ParentLabelPolicyOptions } from './accessibility/index.js';
9
+ export type { TextMotionControls } from './controls/index.js';
10
+ export type { FadeOptions, LineRevealOptions, PulseOptions, RiseOptions, ScaleOptions, ShakeOptions, SlideOptions, } from './effects/index.js';
11
+ export type { NativeTextRendererOptions, OverlayTextRendererOptions } from './renderers/index.js';
12
+ export type { TextMotionCustomSplit, TextMotionCustomSplitResult, TextMotionCustomSplitToken, } from './split/index.js';
13
+ export type { TextMotionStaggerFrom, TextMotionStaggerOptions, TextMotionWaveOptions, } from './timeline/index.js';
14
+ export type { TextMotionAccessibilityPolicy, TextMotionComponent, TextMotionComponentAccessibilityProps, TextMotionComponentProps, TextMotionComponentTextProps, TextMotionEffect, TextMotionMotionConfig, TextMotionSpringOptions, TextMotionTimingOptions, TextMotionRenderer, TextMotionRendererCapability, TextMotionRendererProps, TextMotionSplitter, TextMotionTimeline, TextMotionToken, } from './types/index.js';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAAiB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAY,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAW,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAU,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAa,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAS,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAY,CAAC;AAC/D,YAAY,EAAE,wBAAwB,EAAE,MAAM,0BAAiB,CAAC;AAChE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAY,CAAC;AACrD,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,GACb,MAAM,oBAAW,CAAC;AACnB,YAAY,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,sBAAa,CAAC;AACzF,YAAY,EACV,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,kBAAS,CAAC;AACjB,YAAY,EACV,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,qBAAY,CAAC;AACpB,YAAY,EACV,6BAA6B,EAC7B,mBAAmB,EACnB,qCAAqC,EACrC,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,GAChB,MAAM,kBAAS,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { TextMotionSplitRenderableRecipeBuilder } from '../recipe/recipe.js';
2
+ type NativeTextPresetBuilder = TextMotionSplitRenderableRecipeBuilder<'native-text' | 'style-transform'>;
3
+ /** Editorial title reveal with centered stagger, rise, fade, and subtle scale. */
4
+ export declare function editorialRise(): NativeTextPresetBuilder;
5
+ /** Soft wave reveal for friendly product copy. */
6
+ export declare function softWave(): NativeTextPresetBuilder;
7
+ /** Gentle emphasis preset for small labels and inline highlight copy. */
8
+ export declare function gentleEmphasis(): NativeTextPresetBuilder;
9
+ export {};
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presets/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,qBAAkB,CAAC;AAQ/E,KAAK,uBAAuB,GAAG,sCAAsC,CACnE,aAAa,GAAG,iBAAiB,CAClC,CAAC;AAEF,kFAAkF;AAClF,wBAAgB,aAAa,IAAI,uBAAuB,CAUvD;AAED,kDAAkD;AAClD,wBAAgB,QAAQ,IAAI,uBAAuB,CAMlD;AAED,yEAAyE;AACzE,wBAAgB,cAAc,IAAI,uBAAuB,CAMxD"}
@@ -0,0 +1,3 @@
1
+ import type { TextMotionComponent, TextMotionInternalRecipeConfig, TextMotionRendererCapability } from '../types/index.js';
2
+ export declare function createTextMotionComponent(recipe: TextMotionInternalRecipeConfig<TextMotionRendererCapability>): TextMotionComponent;
3
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/recipe/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EAEnB,8BAA8B,EAC9B,4BAA4B,EAC7B,MAAM,mBAAU,CAAC;AAqClB,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,8BAA8B,CAAC,4BAA4B,CAAC,GACnE,mBAAmB,CA2CrB"}
@@ -0,0 +1,4 @@
1
+ import { type TextMotionRecipeBuilder } from './recipe.js';
2
+ /** Start a composable text motion recipe. */
3
+ export declare function defineTextMotion(): TextMotionRecipeBuilder;
4
+ //# sourceMappingURL=defineTextMotion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineTextMotion.d.ts","sourceRoot":"","sources":["../../../../src/recipe/defineTextMotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,uBAAuB,EAAE,MAAM,aAAU,CAAC;AAEvF,6CAA6C;AAC7C,wBAAgB,gBAAgB,IAAI,uBAAuB,CAE1D"}
@@ -0,0 +1,15 @@
1
+ import type { TextMotionAnyEffect, TextMotionAnyEffectDescriptor, TextMotionAnyTimeline, TextMotionAnyTimelineDescriptor, TextMotionEffect, TextMotionEffectDescriptor, TextMotionEffectDescriptorOptions, TextMotionTimeline, TextMotionTimelineDescriptor, TextMotionTimelineDescriptorOptions } from '../types/recipe.js';
2
+ import type { TextMotionRenderer, TextMotionRendererCapability, TextMotionRendererDescriptor, TextMotionRenderedLineRenderer, TextMotionSourceTokenRenderer } from '../types/renderer.js';
3
+ import type { TextMotionSplitter, TextMotionSplitterDescriptor, TextMotionTokenUnit } from '../types/token.js';
4
+ type TextMotionRendererHandle<Capabilities extends TextMotionRendererCapability, Recipe, MotionUnit extends 'source-token' | 'rendered-line'> = MotionUnit extends 'rendered-line' ? TextMotionRenderedLineRenderer<Capabilities, Recipe> : TextMotionSourceTokenRenderer<Capabilities, Recipe>;
5
+ export declare function attachTextMotionEffectDescriptor<RequiredCapabilities extends TextMotionRendererCapability, Options extends TextMotionEffectDescriptorOptions, Name extends string>(effect: TextMotionEffect<RequiredCapabilities, Name>, descriptor: TextMotionEffectDescriptor<RequiredCapabilities, Options, Name>): TextMotionEffect<RequiredCapabilities, Name>;
6
+ export declare function readTextMotionEffectDescriptor<RequiredCapabilities extends TextMotionRendererCapability, Name extends string>(effect: TextMotionEffect<RequiredCapabilities, Name>): TextMotionEffectDescriptor<RequiredCapabilities, TextMotionEffectDescriptorOptions, Name>;
7
+ export declare function flattenTextMotionEffectDescriptors(effects: readonly TextMotionAnyEffect[]): readonly TextMotionAnyEffectDescriptor[];
8
+ export declare function createTextMotionTimelineHandle<Options extends TextMotionTimelineDescriptorOptions, Name extends string>(descriptor: TextMotionTimelineDescriptor<Options, Name>): TextMotionTimeline<Name>;
9
+ export declare function readTextMotionTimelineDescriptor(timeline: TextMotionAnyTimeline): TextMotionAnyTimelineDescriptor;
10
+ export declare function createTextMotionSplitterHandle<Unit extends TextMotionTokenUnit>(descriptor: TextMotionSplitterDescriptor<Unit>): TextMotionSplitter<Unit>;
11
+ export declare function readTextMotionSplitterDescriptor<Unit extends TextMotionTokenUnit>(splitter: TextMotionSplitter<Unit>): TextMotionSplitterDescriptor<Unit>;
12
+ export declare function createTextMotionRendererHandle<Capabilities extends TextMotionRendererCapability, Recipe, MotionUnit extends 'source-token' | 'rendered-line' = 'source-token'>(descriptor: TextMotionRendererDescriptor<Capabilities, Recipe, MotionUnit>): TextMotionRendererHandle<Capabilities, Recipe, MotionUnit>;
13
+ export declare function readTextMotionRendererDescriptor<Capabilities extends TextMotionRendererCapability, Recipe>(renderer: TextMotionRenderer<Capabilities, Recipe>): TextMotionRendererDescriptor<Capabilities, Recipe>;
14
+ export {};
15
+ //# sourceMappingURL=descriptors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptors.d.ts","sourceRoot":"","sources":["../../../../src/recipe/descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,qBAAqB,EACrB,+BAA+B,EAC/B,gBAAgB,EAChB,0BAA0B,EAC1B,iCAAiC,EACjC,kBAAkB,EAClB,4BAA4B,EAC5B,mCAAmC,EACpC,MAAM,oBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC5B,4BAA4B,EAC5B,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,sBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC5B,mBAAmB,EACpB,MAAM,mBAAgB,CAAC;AAUxB,KAAK,wBAAwB,CAC3B,YAAY,SAAS,4BAA4B,EACjD,MAAM,EACN,UAAU,SAAS,cAAc,GAAG,eAAe,IACjD,UAAU,SAAS,eAAe,GAClC,8BAA8B,CAAC,YAAY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,EACN,UAAU,SAAS,cAAc,GAAG,eAAe,GAAG,cAAc,EAEpE,UAAU,EAAE,4BAA4B,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,GACzE,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,CAQ5D;AAED,wBAAgB,gCAAgC,CAC9C,YAAY,SAAS,4BAA4B,EACjD,MAAM,EAEN,QAAQ,EAAE,kBAAkB,CAAC,YAAY,EAAE,MAAM,CAAC,GACjD,4BAA4B,CAAC,YAAY,EAAE,MAAM,CAAC,CAQpD"}
@@ -0,0 +1,4 @@
1
+ export { createTextMotionComponent } from './component.js';
2
+ export { defineTextMotion } from './defineTextMotion.js';
3
+ export type { TextMotionRecipeBuilder, TextMotionRenderableRecipeBuilder } from './recipe.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/recipe/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAa,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AACtD,YAAY,EAAE,uBAAuB,EAAE,iCAAiC,EAAE,MAAM,aAAU,CAAC"}
@@ -0,0 +1,67 @@
1
+ import type { TextMotionAccessibilityPolicy, TextMotionAnyEffect, TextMotionAnyTimeline, TextMotionComponent, TextMotionEffect, TextMotionMotionConfig, TextMotionRecipeConfig, TextMotionRenderer, TextMotionRendererCapability, TextMotionSplitter } from '../types/index.js';
2
+ import type { TextMotionCompatibleEffect, TextMotionRenderedLineRenderer, TextMotionSourceTokenRenderer } from '../types/renderer.js';
3
+ type RequiredCapabilitiesOfEffect<Effect extends TextMotionAnyEffect> = Effect extends TextMotionEffect<infer RequiredCapabilities> ? RequiredCapabilities : never;
4
+ type CapabilitiesOfRenderer<Renderer> = Renderer extends TextMotionRenderer<infer Capabilities, unknown> ? Capabilities : never;
5
+ type AnyTextMotionSourceTokenRenderer = TextMotionSourceTokenRenderer<TextMotionRendererCapability, unknown>;
6
+ type AnyTextMotionRenderedLineRenderer = TextMotionRenderedLineRenderer<TextMotionRendererCapability, unknown>;
7
+ type TextMotionRecipeBuilderMethods<RendererCapabilities extends TextMotionRendererCapability, CurrentBuilder> = {
8
+ /** Choose the timing strategy for token delays. */
9
+ timeline(timeline: TextMotionAnyTimeline): CurrentBuilder;
10
+ /** Add an effect that is compatible with the selected renderer. */
11
+ effect<Effect extends TextMotionAnyEffect>(effect: TextMotionCompatibleEffect<RendererCapabilities, RequiredCapabilitiesOfEffect<Effect>, Effect>): CurrentBuilder;
12
+ /** Configure the Reanimated motion primitive used by the renderer. */
13
+ motion(motion: TextMotionMotionConfig): CurrentBuilder;
14
+ /** Configure accessibility behavior such as reduced motion and token hiding. */
15
+ accessibility(accessibility: TextMotionAccessibilityPolicy): CurrentBuilder;
16
+ /** Return the immutable recipe config. */
17
+ recipe(): TextMotionRecipeConfig<RendererCapabilities>;
18
+ };
19
+ /** Builder state before a renderer has been selected. */
20
+ export interface TextMotionRecipeBuilder<RendererCapabilities extends TextMotionRendererCapability = never> extends TextMotionRecipeBuilderMethods<RendererCapabilities, TextMotionRecipeBuilder<RendererCapabilities>> {
21
+ /** Choose how the input string is split into tokens. */
22
+ split(splitter: TextMotionSplitter): TextMotionSplitRecipeBuilder<RendererCapabilities>;
23
+ /** Choose the renderer responsible for measuring and drawing split input. */
24
+ layout<Renderer extends AnyTextMotionSourceTokenRenderer>(renderer: Renderer): TextMotionRenderableRecipeBuilder<CapabilitiesOfRenderer<Renderer>>;
25
+ /** Choose the renderer responsible for its own layout unit. */
26
+ layout<Renderer extends AnyTextMotionRenderedLineRenderer>(renderer: Renderer): TextMotionRenderedLineRecipeBuilder<CapabilitiesOfRenderer<Renderer>>;
27
+ }
28
+ /** Builder state after a splitter has been selected before renderer layout. */
29
+ interface TextMotionSplitRecipeBuilder<RendererCapabilities extends TextMotionRendererCapability = never> extends TextMotionRecipeBuilderMethods<RendererCapabilities, TextMotionSplitRecipeBuilder<RendererCapabilities>> {
30
+ /** Choose how the input string is split into tokens. */
31
+ split(splitter: TextMotionSplitter): TextMotionSplitRecipeBuilder<RendererCapabilities>;
32
+ /** Choose the renderer responsible for measuring and drawing split input. */
33
+ layout<Renderer extends AnyTextMotionSourceTokenRenderer>(renderer: Renderer): TextMotionSplitRenderableRecipeBuilder<CapabilitiesOfRenderer<Renderer>>;
34
+ }
35
+ /** Builder state after a renderer has been selected. */
36
+ export interface TextMotionRenderableRecipeBuilder<RendererCapabilities extends TextMotionRendererCapability> extends TextMotionRecipeBuilderMethods<RendererCapabilities, TextMotionRenderableRecipeBuilder<RendererCapabilities>> {
37
+ /** Choose how the input string is split into tokens. */
38
+ split(splitter: TextMotionSplitter): TextMotionSplitRenderableRecipeBuilder<RendererCapabilities>;
39
+ /** Choose the renderer responsible for measuring and drawing split input. */
40
+ layout<Renderer extends AnyTextMotionSourceTokenRenderer>(renderer: Renderer): TextMotionRenderableRecipeBuilder<CapabilitiesOfRenderer<Renderer>>;
41
+ /** Choose the renderer responsible for its own layout unit. */
42
+ layout<Renderer extends AnyTextMotionRenderedLineRenderer>(renderer: Renderer): TextMotionRenderedLineRecipeBuilder<CapabilitiesOfRenderer<Renderer>>;
43
+ /** Create a React component from the current recipe. */
44
+ component(): TextMotionComponent;
45
+ }
46
+ /** Builder state after a splittable renderer and splitter have been selected. */
47
+ export interface TextMotionSplitRenderableRecipeBuilder<RendererCapabilities extends TextMotionRendererCapability> extends TextMotionRecipeBuilderMethods<RendererCapabilities, TextMotionSplitRenderableRecipeBuilder<RendererCapabilities>> {
48
+ /** Choose how the input string is split into tokens. */
49
+ split(splitter: TextMotionSplitter): TextMotionSplitRenderableRecipeBuilder<RendererCapabilities>;
50
+ /** Choose the renderer responsible for measuring and drawing split input. */
51
+ layout<Renderer extends AnyTextMotionSourceTokenRenderer>(renderer: Renderer): TextMotionSplitRenderableRecipeBuilder<CapabilitiesOfRenderer<Renderer>>;
52
+ /** Create a React component from the current recipe. */
53
+ component(): TextMotionComponent;
54
+ }
55
+ /** Builder state after a rendered-line renderer has been selected. */
56
+ interface TextMotionRenderedLineRecipeBuilder<RendererCapabilities extends TextMotionRendererCapability> extends TextMotionRecipeBuilderMethods<RendererCapabilities, TextMotionRenderedLineRecipeBuilder<RendererCapabilities>> {
57
+ /** Choose the renderer responsible for measuring and drawing split input. */
58
+ layout<Renderer extends AnyTextMotionSourceTokenRenderer>(renderer: Renderer): TextMotionRenderableRecipeBuilder<CapabilitiesOfRenderer<Renderer>>;
59
+ /** Choose the renderer responsible for its own layout unit. */
60
+ layout<Renderer extends AnyTextMotionRenderedLineRenderer>(renderer: Renderer): TextMotionRenderedLineRecipeBuilder<CapabilitiesOfRenderer<Renderer>>;
61
+ /** Create a React component from the current recipe. */
62
+ component(): TextMotionComponent;
63
+ }
64
+ /** @internal */
65
+ export declare function createTextMotionRecipeBuilder(): TextMotionRecipeBuilder;
66
+ export {};
67
+ //# sourceMappingURL=recipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../../../src/recipe/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,4BAA4B,EAC5B,kBAAkB,EACnB,MAAM,mBAAU,CAAC;AAClB,OAAO,KAAK,EACV,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,sBAAmB,CAAC;AAa3B,KAAK,4BAA4B,CAAC,MAAM,SAAS,mBAAmB,IAClE,MAAM,SAAS,gBAAgB,CAAC,MAAM,oBAAoB,CAAC,GAAG,oBAAoB,GAAG,KAAK,CAAC;AAE7F,KAAK,sBAAsB,CAAC,QAAQ,IAClC,QAAQ,SAAS,kBAAkB,CAAC,MAAM,YAAY,EAAE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,CAAC,CAAC;IAElG,6EAA6E;IAC7E,MAAM,CAAC,QAAQ,SAAS,gCAAgC,EACtD,QAAQ,EAAE,QAAQ,GACjB,sCAAsC,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE5E,wDAAwD;IACxD,SAAS,IAAI,mBAAmB,CAAC;CAClC;AAED,sEAAsE;AACtE,UAAU,mCAAmC,CAC3C,oBAAoB,SAAS,4BAA4B,CACzD,SAAQ,8BAA8B,CACtC,oBAAoB,EACpB,mCAAmC,CAAC,oBAAoB,CAAC,CAC1D;IACC,6EAA6E;IAC7E,MAAM,CAAC,QAAQ,SAAS,gCAAgC,EACtD,QAAQ,EAAE,QAAQ,GACjB,iCAAiC,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEvE,+DAA+D;IAC/D,MAAM,CAAC,QAAQ,SAAS,iCAAiC,EACvD,QAAQ,EAAE,QAAQ,GACjB,mCAAmC,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEzE,wDAAwD;IACxD,SAAS,IAAI,mBAAmB,CAAC;CAClC;AA0LD,gBAAgB;AAChB,wBAAgB,6BAA6B,IAAI,uBAAuB,CAEvE"}
@@ -0,0 +1,3 @@
1
+ export { nativeText, type NativeTextRendererOptions } from './nativeText.js';
2
+ export { overlayText, type OverlayTextRendererOptions } from './overlayText.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/renderers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,yBAAyB,EAAE,MAAM,iBAAc,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,KAAK,0BAA0B,EAAE,MAAM,kBAAe,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { TextMotionInternalRecipeConfig } from '../types/recipe.js';
2
+ import type { TextMotionRendererProps, TextMotionSourceTokenRenderer } from '../types/renderer.js';
3
+ type NativeTextRendererProps = Omit<TextMotionRendererProps, 'recipe'> & {
4
+ recipe: TextMotionInternalRecipeConfig;
5
+ };
6
+ export type NativeTextRendererOptions = {
7
+ /** Prefix used for generated token `testID` values. */
8
+ testIDPrefix?: string;
9
+ };
10
+ /** Render text as wrapping React Native Text tokens animated by Reanimated. */
11
+ export declare function nativeText(options?: NativeTextRendererOptions): TextMotionSourceTokenRenderer<'native-text' | 'style-transform', NativeTextRendererProps['recipe']>;
12
+ export {};
13
+ //# sourceMappingURL=nativeText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeText.d.ts","sourceRoot":"","sources":["../../../../src/renderers/nativeText.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAgC,8BAA8B,EAAE,MAAM,oBAAiB,CAAC;AACpG,OAAO,KAAK,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,sBAAmB,CAAC;AAsGhG,KAAK,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC,GAAG;IACvE,MAAM,EAAE,8BAA8B,CAAC;CACxC,CAAC;AAkCF,MAAM,MAAM,yBAAyB,GAAG;IACtC,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AA8nBF,+EAA+E;AAC/E,wBAAgB,UAAU,CACxB,OAAO,GAAE,yBAA8B,GACtC,6BAA6B,CAC9B,aAAa,GAAG,iBAAiB,EACjC,uBAAuB,CAAC,QAAQ,CAAC,CAClC,CAOA"}
@@ -0,0 +1,16 @@
1
+ import { type SharedValue } from 'react-native-reanimated';
2
+ import type { TextMotionControls } from '../controls/index.js';
3
+ import { type TextMotionItemMotion } from './rendererMotion.js';
4
+ type NativeTextProgressAnimationFactory = (tokenMotion: TextMotionItemMotion) => number;
5
+ type NativeTextOwnedPlaybackCommandOptions = {
6
+ createProgressAnimation: NativeTextProgressAnimationFactory;
7
+ progress: SharedValue<number>;
8
+ renderFinalState: boolean;
9
+ tokenMotion: TextMotionItemMotion;
10
+ };
11
+ type NativeTextControlsPlaybackOptions = NativeTextOwnedPlaybackCommandOptions & {
12
+ controls?: TextMotionControls;
13
+ };
14
+ export declare function useNativeTextControlsPlayback({ controls, createProgressAnimation, progress, renderFinalState, tokenMotion, }: NativeTextControlsPlaybackOptions): void;
15
+ export {};
16
+ //# sourceMappingURL=nativeTextControls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeTextControls.d.ts","sourceRoot":"","sources":["../../../../src/renderers/nativeTextControls.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAa,CAAC;AAOtD,OAAO,EAA2B,KAAK,oBAAoB,EAAE,MAAM,qBAAkB,CAAC;AAEtF,KAAK,kCAAkC,GAAG,CAAC,WAAW,EAAE,oBAAoB,KAAK,MAAM,CAAC;AAExF,KAAK,qCAAqC,GAAG;IAC3C,uBAAuB,EAAE,kCAAkC,CAAC;IAC5D,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC;AAIF,KAAK,iCAAiC,GAAG,qCAAqC,GAAG;IAC/E,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B,CAAC;AAuEF,wBAAgB,6BAA6B,CAAC,EAC5C,QAAQ,EACR,uBAAuB,EACvB,QAAQ,EACR,gBAAgB,EAChB,WAAW,GACZ,EAAE,iCAAiC,QA4BnC"}
@@ -0,0 +1,84 @@
1
+ import { type StyleProp, type TextStyle } from 'react-native';
2
+ import type { TextMotionSourceRange, TextMotionToken } from '../types/index.js';
3
+ declare const NATIVE_TEXT_LINE_LAYOUT_INVALIDATION_REASONS: readonly ["font-scale", "initial", "line-text", "style", "text", "width"];
4
+ export type NativeTextLineLayoutFailureReason = 'empty-line-text-unsupported' | 'line-group-text-mismatch' | 'line-text-not-found' | 'token-crosses-line' | 'token-outside-lines';
5
+ export type NativeTextLineLayoutFailure = {
6
+ lineIndex?: number;
7
+ lineRange?: TextMotionSourceRange;
8
+ message: string;
9
+ reason: NativeTextLineLayoutFailureReason;
10
+ sourceRange?: TextMotionSourceRange;
11
+ tokenId?: string;
12
+ };
13
+ export type NativeTextLineLayoutResult<Value> = {
14
+ ok: true;
15
+ value: Value;
16
+ } | ({
17
+ ok: false;
18
+ } & NativeTextLineLayoutFailure);
19
+ export type NativeTextRenderedLine = {
20
+ height: number;
21
+ index: number;
22
+ text: string;
23
+ width: number;
24
+ x: number;
25
+ y: number;
26
+ };
27
+ export type NativeTextLineRange = {
28
+ index: number;
29
+ sourceRange: TextMotionSourceRange;
30
+ text: string;
31
+ };
32
+ export type NativeTextLineTokenGroup = {
33
+ line: NativeTextLineRange;
34
+ text: string;
35
+ tokens: readonly TextMotionToken[];
36
+ };
37
+ export type NativeTextLineLayoutCompatibilityReport = {
38
+ lineCount: number;
39
+ status: 'go';
40
+ tokenCount: number;
41
+ } | {
42
+ actualText: string;
43
+ expectedText: string;
44
+ lineIndex: number;
45
+ reason: 'line-group-text-mismatch';
46
+ status: 'no-go';
47
+ };
48
+ export type NativeTextLineLayoutInvalidationReason = (typeof NATIVE_TEXT_LINE_LAYOUT_INVALIDATION_REASONS)[number];
49
+ export type NativeTextLineLayoutProbeSnapshot = {
50
+ acceptedMappingUpdates: number;
51
+ invalidationsByReason: Record<NativeTextLineLayoutInvalidationReason, number>;
52
+ lineCount: number;
53
+ mappingComputations: number;
54
+ onTextLayoutCalls: number;
55
+ rejectedIdenticalPayloads: number;
56
+ signature?: string;
57
+ tokenCount: number;
58
+ };
59
+ export type NativeTextLineLayoutMeasurement = {
60
+ invalidationReason: NativeTextLineLayoutInvalidationReason;
61
+ lineCount: number;
62
+ signature: string;
63
+ tokenCount: number;
64
+ };
65
+ export type NativeTextLineLayoutProbeUpdate = {
66
+ accepted: boolean;
67
+ snapshot: NativeTextLineLayoutProbeSnapshot;
68
+ };
69
+ export type NativeTextLineLayoutSignatureInput = {
70
+ allowFontScaling?: boolean;
71
+ maxFontSizeMultiplier?: number | null;
72
+ measuredWidth: number;
73
+ renderedLines: readonly Pick<NativeTextRenderedLine, 'height' | 'text' | 'width' | 'x' | 'y'>[];
74
+ style?: StyleProp<TextStyle>;
75
+ text: string;
76
+ };
77
+ export declare function createNativeTextLineRanges(text: string, renderedLines: readonly Pick<NativeTextRenderedLine, 'text'>[]): NativeTextLineLayoutResult<readonly NativeTextLineRange[]>;
78
+ export declare function groupNativeTextTokensByLineRanges(tokens: readonly TextMotionToken[], lineRanges: readonly NativeTextLineRange[]): NativeTextLineLayoutResult<readonly NativeTextLineTokenGroup[]>;
79
+ export declare function evaluateNativeTextLineLayoutCompatibility(groups: readonly NativeTextLineTokenGroup[]): NativeTextLineLayoutCompatibilityReport;
80
+ export declare function createNativeTextLineLayoutSignature({ allowFontScaling, maxFontSizeMultiplier, measuredWidth, renderedLines, style, text, }: NativeTextLineLayoutSignatureInput): string;
81
+ export declare function createNativeTextLineLayoutProbeSnapshot(initial?: Partial<Pick<NativeTextLineLayoutProbeSnapshot, 'acceptedMappingUpdates' | 'lineCount' | 'mappingComputations' | 'onTextLayoutCalls' | 'rejectedIdenticalPayloads' | 'signature' | 'tokenCount'>>): NativeTextLineLayoutProbeSnapshot;
82
+ export declare function recordNativeTextLineLayoutMeasurement(snapshot: NativeTextLineLayoutProbeSnapshot, measurement: NativeTextLineLayoutMeasurement): NativeTextLineLayoutProbeUpdate;
83
+ export {};
84
+ //# sourceMappingURL=nativeTextLineLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeTextLineLayout.d.ts","sourceRoot":"","sources":["../../../../src/renderers/nativeTextLineLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,KAAK,E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,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA+LF,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,SAAS,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAC,EAAE,GAC7D,0BAA0B,CAAC,SAAS,mBAAmB,EAAE,CAAC,CA2B5D;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,UAAU,EAAE,SAAS,mBAAmB,EAAE,GACzC,0BAA0B,CAAC,SAAS,wBAAwB,EAAE,CAAC,CAwCjE;AAED,wBAAgB,yCAAyC,CACvD,MAAM,EAAE,SAAS,wBAAwB,EAAE,GAC1C,uCAAuC,CAkBzC;AAED,wBAAgB,mCAAmC,CAAC,EAClD,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,KAAK,EACL,IAAI,GACL,EAAE,kCAAkC,GAAG,MAAM,CAe7C;AAED,wBAAgB,uCAAuC,CACrD,OAAO,CAAC,EAAE,OAAO,CACf,IAAI,CACF,iCAAiC,EAC/B,wBAAwB,GACxB,WAAW,GACX,qBAAqB,GACrB,mBAAmB,GACnB,2BAA2B,GAC3B,WAAW,GACX,YAAY,CACf,CACF,GACA,iCAAiC,CAWnC;AAED,wBAAgB,qCAAqC,CACnD,QAAQ,EAAE,iCAAiC,EAC3C,WAAW,EAAE,+BAA+B,GAC3C,+BAA+B,CA+BjC"}
@@ -0,0 +1,21 @@
1
+ import type { TextMotionMotionConfig } from '../types/recipe.js';
2
+ import type { TextMotionItemMotion, TextMotionStyleTransformState } from './rendererMotion.js';
3
+ export type NativeTextStyleState = TextMotionStyleTransformState;
4
+ export type NativeTextTokenMotion = TextMotionItemMotion;
5
+ type NativeTextMotionOptionSnapshotValue = null | string | number | boolean | symbol | ((...args: never[]) => unknown) | readonly NativeTextMotionOptionSnapshotValue[] | {
6
+ readonly [key: string]: NativeTextMotionOptionSnapshotValue;
7
+ };
8
+ type NativeTextMotionOptionsSnapshot = Readonly<Record<string, NativeTextMotionOptionSnapshotValue>>;
9
+ type NativeTextMotionSnapshot = {
10
+ kind: TextMotionMotionConfig['kind'];
11
+ options?: NativeTextMotionOptionsSnapshot;
12
+ };
13
+ export type NativeTextPlaybackRun = NativeTextTokenMotion & {
14
+ motionSnapshot?: NativeTextMotionSnapshot;
15
+ renderFinalState: boolean;
16
+ text: string;
17
+ };
18
+ export declare function createNativeTextPlaybackRun(tokenMotion: NativeTextTokenMotion, renderFinalState: boolean, text: string): NativeTextPlaybackRun;
19
+ export declare function areNativeTextPlaybackRunsEqual(left: NativeTextPlaybackRun | undefined, right: NativeTextPlaybackRun): boolean;
20
+ export {};
21
+ //# sourceMappingURL=nativeTextPlayback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeTextPlayback.d.ts","sourceRoot":"","sources":["../../../../src/renderers/nativeTextPlayback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,qBAAkB,CAAC;AAE5F,MAAM,MAAM,oBAAoB,GAAG,6BAA6B,CAAC;AACjE,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAEzD,KAAK,mCAAmC,GACpC,IAAI,GACJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAAC,GAC/B,SAAS,mCAAmC,EAAE,GAC9C;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,mCAAmC,CAAA;CAAE,CAAC;AAEpE,KAAK,+BAA+B,GAAG,QAAQ,CAC7C,MAAM,CAAC,MAAM,EAAE,mCAAmC,CAAC,CACpD,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,+BAA+B,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,GAAG;IAC1D,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAiDF,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,qBAAqB,EAClC,gBAAgB,EAAE,OAAO,EACzB,IAAI,EAAE,MAAM,GACX,qBAAqB,CAOvB;AA+FD,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,qBAAqB,GAAG,SAAS,EACvC,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAgBT"}
@@ -0,0 +1,13 @@
1
+ import type { TextMotionInternalRecipeConfig } from '../types/recipe.js';
2
+ import type { TextMotionLineMaskCapability, TextMotionRenderedLineRenderer, TextMotionRendererProps } from '../types/renderer.js';
3
+ type OverlayTextRendererProps = Omit<TextMotionRendererProps, 'recipe'> & {
4
+ recipe: TextMotionInternalRecipeConfig;
5
+ };
6
+ export type OverlayTextRendererOptions = {
7
+ /** Prefix used for generated line mask `testID` values. */
8
+ testIDPrefix?: string;
9
+ };
10
+ /** Render one native paragraph with animated masks for each actual rendered line. */
11
+ export declare function overlayText(options?: OverlayTextRendererOptions): TextMotionRenderedLineRenderer<TextMotionLineMaskCapability | 'style-transform', OverlayTextRendererProps['recipe']>;
12
+ export {};
13
+ //# sourceMappingURL=overlayText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlayText.d.ts","sourceRoot":"","sources":["../../../../src/renderers/overlayText.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAgC,8BAA8B,EAAE,MAAM,oBAAiB,CAAC;AACpG,OAAO,KAAK,EACV,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACxB,MAAM,sBAAmB,CAAC;AAqC3B,KAAK,wBAAwB,GAAG,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC,GAAG;IACxE,MAAM,EAAE,8BAA8B,CAAC;CACxC,CAAC;AAiGF,MAAM,MAAM,0BAA0B,GAAG;IACvC,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAuvBF,qFAAqF;AACrF,wBAAgB,WAAW,CACzB,OAAO,GAAE,0BAA+B,GACvC,8BAA8B,CAC/B,4BAA4B,GAAG,iBAAiB,EAChD,wBAAwB,CAAC,QAAQ,CAAC,CACnC,CAOA"}
@@ -0,0 +1,36 @@
1
+ export type OverlayTextLineGeometry = {
2
+ height: number;
3
+ index: number;
4
+ isStructuralBlank: boolean;
5
+ motionIndex?: number;
6
+ text: string;
7
+ width: number;
8
+ x: number;
9
+ y: number;
10
+ };
11
+ export type OverlayTextMotionLine = OverlayTextLineGeometry & {
12
+ motionIndex: number;
13
+ };
14
+ export type OverlayTextLayoutReady = {
15
+ geometrySignature: string;
16
+ kind: 'ready';
17
+ lines: readonly OverlayTextLineGeometry[];
18
+ motionCount: number;
19
+ motionLines: readonly OverlayTextMotionLine[];
20
+ playbackSignature: string;
21
+ signature: string;
22
+ topologySignature: string;
23
+ };
24
+ export type OverlayTextLayoutStatic = {
25
+ kind: 'static';
26
+ reason: 'empty-source';
27
+ };
28
+ export type OverlayTextLayoutFallback = {
29
+ kind: 'fallback';
30
+ reason: 'malformed-payload' | 'missing-line-text' | 'non-finite-geometry' | 'non-positive-visible-height' | 'unordered-bands' | 'overlapping-bands' | 'missing-visible-lines';
31
+ };
32
+ export type OverlayTextLayoutResult = OverlayTextLayoutFallback | OverlayTextLayoutReady | OverlayTextLayoutStatic;
33
+ export type OverlayTextLayoutChange = 'identical' | 'geometry' | 'topology';
34
+ export declare function compareOverlayTextLayouts(previous: OverlayTextLayoutReady | undefined, next: OverlayTextLayoutReady): OverlayTextLayoutChange;
35
+ export declare function createOverlayTextLayout(source: string, payload: unknown): OverlayTextLayoutResult;
36
+ //# sourceMappingURL=overlayTextLayout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AAW,GAAG,UAAU,GAAG,UAAU,CAAC;AA+H5E,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,sBAAsB,GAAG,SAAS,EAC5C,IAAI,EAAE,sBAAsB,GAC3B,uBAAuB,CAczB;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,uBAAuB,CAqHjG"}
@@ -0,0 +1,53 @@
1
+ import { ReduceMotion, type SharedValue } from 'react-native-reanimated';
2
+ import type { TextMotionAnyEffect, TextMotionInternalRecipeConfig, TextMotionMotionConfig } from '../types/recipe.js';
3
+ export declare const TEXT_MOTION_CONTROLLED_ITEM_TIMELINE_SPAN = 1;
4
+ export type TextMotionStyleTransformState = {
5
+ opacity: number;
6
+ scale: number;
7
+ translateX: number;
8
+ translateY: number;
9
+ };
10
+ export type TextMotionStyleTransformStatePair = {
11
+ initial: TextMotionStyleTransformState;
12
+ pulseScale: number;
13
+ revealOnStart?: true;
14
+ target: TextMotionStyleTransformState;
15
+ };
16
+ export type TextMotionOverlayStyleTransformStatePair = {
17
+ frame: TextMotionStyleTransformStatePair;
18
+ revealContent: TextMotionStyleTransformStatePair;
19
+ };
20
+ export type TextMotionItemMotion = {
21
+ delayMs: number;
22
+ initial: TextMotionStyleTransformState;
23
+ target: TextMotionStyleTransformState;
24
+ motion?: TextMotionMotionConfig;
25
+ pulseScale: number;
26
+ reducedMotion: 'final-state' | 'system';
27
+ revealOnStart?: true;
28
+ };
29
+ export type TextMotionControlledProgressPlan = {
30
+ itemDelaySeconds: number;
31
+ totalTimelineSpan: number;
32
+ };
33
+ type TextMotionControlledProgressInput = TextMotionControlledProgressPlan & {
34
+ progress: number;
35
+ };
36
+ export declare function createTextMotionStyleTransformStatePair(effects: readonly TextMotionAnyEffect[], unsupportedEffectSubject?: string): TextMotionStyleTransformStatePair;
37
+ export declare function createOverlayTextStyleTransformStatePair(effects: readonly TextMotionAnyEffect[]): TextMotionOverlayStyleTransformStatePair;
38
+ export declare function createTextMotionDelaySecondsByItemIndex(recipe: TextMotionInternalRecipeConfig, count: number): readonly number[];
39
+ export declare function createTextMotionItemMotion(recipe: TextMotionInternalRecipeConfig, styleState: TextMotionStyleTransformStatePair, delaySeconds: number): TextMotionItemMotion;
40
+ export declare function createTextMotionControlledProgressPlan(itemIndex: number, delaySecondsByItemIndex: readonly number[], totalTimelineSpan: number): TextMotionControlledProgressPlan;
41
+ export declare function clampTextMotionProgress(progress: number): number;
42
+ export declare function createTextMotionControlledTimelineSpan(delaySecondsByItemIndex: readonly number[]): number;
43
+ export declare function mapTextMotionControlledProgressToItemProgress({ progress, itemDelaySeconds, totalTimelineSpan, }: TextMotionControlledProgressInput): number;
44
+ export declare function resolveTextMotionReduceMotionConfig(reducedMotion: TextMotionItemMotion['reducedMotion']): ReduceMotion.System | ReduceMotion.Never;
45
+ export declare function shouldRenderTextMotionFinalState(reducedMotionEnabled: boolean, reducedMotion: TextMotionItemMotion['reducedMotion']): boolean;
46
+ export declare function createTextMotionProgressAnimation({ delayMs, motion, reducedMotion, }: Pick<TextMotionItemMotion, 'delayMs' | 'motion' | 'reducedMotion'>): number;
47
+ export declare function readTextMotionProgressForAnimatedStyle({ controlledProgressPlan, progress, renderFinalState, }: {
48
+ controlledProgressPlan?: TextMotionControlledProgressPlan;
49
+ progress: SharedValue<number>;
50
+ renderFinalState: boolean;
51
+ }): number;
52
+ export {};
53
+ //# sourceMappingURL=rendererMotion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rendererMotion.d.ts","sourceRoot":"","sources":["../../../../src/renderers/rendererMotion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIZ,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EACV,mBAAmB,EAGnB,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,oBAAiB,CAAC;AAOzB,eAAO,MAAM,yCAAyC,IAAI,CAAC;AAE3D,MAAM,MAAM,6BAA6B,G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AM,EAAE,8BAA8B,EACtC,UAAU,EAAE,iCAAiC,EAC7C,YAAY,EAAE,MAAM,GACnB,oBAAoB,CAOtB;AAED,wBAAgB,sCAAsC,CACpD,SAAS,EAAE,MAAM,EACjB,uBAAuB,EAAE,SAAS,MAAM,EAAE,EAC1C,iBAAiB,EAAE,MAAM,GACxB,gCAAgC,CAKlC;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQhE;AAED,wBAAgB,sCAAsC,CACpD,uBAAuB,EAAE,SAAS,MAAM,EAAE,GACzC,MAAM,CAOR;AAED,wBAAgB,6CAA6C,CAAC,EAC5D,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,GAClB,EAAE,iCAAiC,GAAG,MAAM,CAO5C;AAED,wBAAgB,mCAAmC,CACjD,aAAa,EAAE,oBAAoB,CAAC,eAAe,CAAC,4CAGrD;AAED,wBAAgB,gCAAgC,CAC9C,oBAAoB,EAAE,OAAO,EAC7B,aAAa,EAAE,oBAAoB,CAAC,eAAe,CAAC,GACnD,OAAO,CAET;AAED,wBAAgB,iCAAiC,CAAC,EAChD,OAAO,EACP,MAAM,EACN,aAAa,GACd,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,QAAQ,GAAG,eAAe,CAAC,GAAG,MAAM,CAoB7E;AAED,wBAAgB,sCAAsC,CAAC,EACrD,sBAAsB,EACtB,QAAQ,EACR,gBAAgB,GACjB,EAAE;IACD,sBAAsB,CAAC,EAAE,gCAAgC,CAAC;IAC1D,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;CAC3B,GAAG,MAAM,CAcT"}
@@ -0,0 +1,11 @@
1
+ import type { TextMotionSourceRange, TextMotionToken, TextMotionTokenUnit } from '../types/index.js';
2
+ type CreateTokenInput<Unit extends TextMotionTokenUnit> = {
3
+ index: number;
4
+ metadata?: Record<string, unknown>;
5
+ sourceRange: TextMotionSourceRange;
6
+ text: string;
7
+ unit: Unit;
8
+ };
9
+ export declare function createTextMotionToken<Unit extends TextMotionTokenUnit>({ index, metadata, sourceRange, text, unit, }: CreateTokenInput<Unit>): TextMotionToken<Unit>;
10
+ export {};
11
+ //# sourceMappingURL=createToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createToken.d.ts","sourceRoot":"","sources":["../../../../src/split/createToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAU,CAAC;AAE5F,KAAK,gBAAgB,CAAC,IAAI,SAAS,mBAAmB,IAAI;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,WAAW,EAAE,qBAAqB,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,IAAI,SAAS,mBAAmB,EAAE,EACtE,KAAK,EACL,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,IAAI,GACL,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,CAShD"}
@@ -0,0 +1,17 @@
1
+ import type { TextMotionSourceRange, TextMotionSplitContext, TextMotionSplitter } from '../types/index.js';
2
+ /** Token object returned by a custom splitter when source metadata matters. */
3
+ export type TextMotionCustomSplitToken = {
4
+ /** Optional metadata copied into the generated token. */
5
+ metadata?: Record<string, unknown>;
6
+ /** Explicit source range in the original input. */
7
+ sourceRange?: TextMotionSourceRange;
8
+ /** Text content for the token. */
9
+ text: string;
10
+ };
11
+ /** Result item returned by a custom splitter. */
12
+ export type TextMotionCustomSplitResult = string | TextMotionCustomSplitToken;
13
+ /** Custom split function used by {@link custom}. */
14
+ export type TextMotionCustomSplit = (input: string, context?: TextMotionSplitContext) => readonly TextMotionCustomSplitResult[];
15
+ /** Build a splitter from an app-defined split function. */
16
+ export declare function custom(split: TextMotionCustomSplit): TextMotionSplitter<'custom'>;
17
+ //# sourceMappingURL=custom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../../../src/split/custom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAEnB,MAAM,mBAAU,CAAC;AAKlB,+EAA+E;AAC/E,MAAM,MAAM,0BAA0B,GAAG;IACvC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,mDAAmD;IACnD,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,iDAAiD;AACjD,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,0BAA0B,CAAC;AAE9E,oDAAoD;AACpD,MAAM,MAAM,qBAAqB,GAAG,CAClC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,sBAAsB,KAC7B,SAAS,2BAA2B,EAAE,CAAC;AAyC5C,2DAA2D;AAC3D,wBAAgB,MAAM,CAAC,KAAK,EAAE,qBAAqB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAsBjF"}
@@ -0,0 +1,4 @@
1
+ import type { TextMotionSplitter } from '../types/index.js';
2
+ /** Split text into grapheme-aware tokens for character-level motion. */
3
+ export declare function graphemes(): TextMotionSplitter<'grapheme'>;
4
+ //# sourceMappingURL=graphemes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphemes.d.ts","sourceRoot":"","sources":["../../../../src/split/graphemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAU,CAAC;AAMnD,wEAAwE;AACxE,wBAAgB,SAAS,IAAI,kBAAkB,CAAC,UAAU,CAAC,CAmB1D"}
@@ -0,0 +1,5 @@
1
+ export { custom, type TextMotionCustomSplit, type TextMotionCustomSplitResult, type TextMotionCustomSplitToken, } from './custom.js';
2
+ export { graphemes } from './graphemes.js';
3
+ export { lines } from './lines.js';
4
+ export { words } from './words.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/split/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,GAChC,MAAM,aAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { TextMotionSplitter } from '../types/index.js';
2
+ /** Split on newline boundaries. This is experimental and does not measure rendered line wraps. */
3
+ export declare function lines(): TextMotionSplitter<'line'>;
4
+ //# sourceMappingURL=lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../../../../src/split/lines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,mBAAU,CAAC;AAkBpE,kGAAkG;AAClG,wBAAgB,KAAK,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAelD"}
@@ -0,0 +1,18 @@
1
+ export type SegmenterGranularity = 'grapheme' | 'word';
2
+ export type TextMotionSegment = {
3
+ index: number;
4
+ isWordLike?: boolean;
5
+ segment: string;
6
+ };
7
+ type SegmenterLike = {
8
+ segment(input: string): Iterable<TextMotionSegment>;
9
+ };
10
+ export type SegmenterRuntime = {
11
+ Segmenter?: SegmenterConstructor;
12
+ };
13
+ export type SegmenterConstructor = new (locale?: string | string[], options?: {
14
+ granularity: SegmenterGranularity;
15
+ }) => SegmenterLike;
16
+ export declare function createSegmenter(granularity: SegmenterGranularity, locale?: string | string[], runtime?: SegmenterRuntime | undefined): SegmenterLike;
17
+ export {};
18
+ //# sourceMappingURL=segmenter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmenter.d.ts","sourceRoot":"","sources":["../../../../src/split/segmenter.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,MAAM,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,KACjC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE;IAAE,WAAW,EAAE,oBAAoB,CAAA;CAAE,KAC5C,aAAa,CAAC;AAgCnB,wBAAgB,eAAe,CAC7B,WAAW,EAAE,oBAAoB,EACjC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,GAAE,gBAAgB,GAAG,SAAwC,GACnE,aAAa,CAQf"}
@@ -0,0 +1,4 @@
1
+ import type { TextMotionSplitter } from '../types/index.js';
2
+ /** Split text into word, spacing, and punctuation tokens. */
3
+ export declare function words(): TextMotionSplitter<'word'>;
4
+ //# sourceMappingURL=words.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"words.d.ts","sourceRoot":"","sources":["../../../../src/split/words.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAU,CAAC;AAMnD,6DAA6D;AAC7D,wBAAgB,KAAK,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAoBlD"}
@@ -0,0 +1,5 @@
1
+ export { parallel } from './parallel.js';
2
+ export { sequence } from './sequence.js';
3
+ export { stagger, type TextMotionStaggerFrom, type TextMotionStaggerOptions } from './stagger.js';
4
+ export { wave, type TextMotionWaveOptions } from './wave.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/timeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,wBAAwB,EAAE,MAAM,cAAW,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,KAAK,qBAAqB,EAAE,MAAM,WAAQ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { TextMotionAnyTimeline, TextMotionTimeline } from '../types/index.js';
2
+ /** Combine timelines by using the earliest delay for each token. */
3
+ export declare function parallel(...timelines: readonly TextMotionAnyTimeline[]): TextMotionTimeline<'parallel'>;
4
+ //# sourceMappingURL=parallel.d.ts.map