react-native-laminar 1.0.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 (168) hide show
  1. package/README.md +11 -0
  2. package/lib/commonjs/hooks/use-display-units.js +13 -0
  3. package/lib/commonjs/hooks/use-display-units.js.map +1 -0
  4. package/lib/commonjs/hooks/use-inline-auto-width.js +45 -0
  5. package/lib/commonjs/hooks/use-inline-auto-width.js.map +1 -0
  6. package/lib/commonjs/hooks/use-morph-motion.js +24 -0
  7. package/lib/commonjs/hooks/use-morph-motion.js.map +1 -0
  8. package/lib/commonjs/hooks/use-morph-text-style.js +32 -0
  9. package/lib/commonjs/hooks/use-morph-text-style.js.map +1 -0
  10. package/lib/commonjs/hooks/use-numeric-lanes.js +37 -0
  11. package/lib/commonjs/hooks/use-numeric-lanes.js.map +1 -0
  12. package/lib/commonjs/hooks/use-text-glyphs.js +35 -0
  13. package/lib/commonjs/hooks/use-text-glyphs.js.map +1 -0
  14. package/lib/commonjs/index.js +89 -0
  15. package/lib/commonjs/index.js.map +1 -0
  16. package/lib/commonjs/model/display-units.js +29 -0
  17. package/lib/commonjs/model/display-units.js.map +1 -0
  18. package/lib/commonjs/model/numeric-lanes.js +45 -0
  19. package/lib/commonjs/model/numeric-lanes.js.map +1 -0
  20. package/lib/commonjs/model/text-keys.js +80 -0
  21. package/lib/commonjs/model/text-keys.js.map +1 -0
  22. package/lib/commonjs/motion/entry-exit-builders.js +57 -0
  23. package/lib/commonjs/motion/entry-exit-builders.js.map +1 -0
  24. package/lib/commonjs/motion/preset-map.js +91 -0
  25. package/lib/commonjs/motion/preset-map.js.map +1 -0
  26. package/lib/commonjs/package.json +1 -0
  27. package/lib/commonjs/types.js +6 -0
  28. package/lib/commonjs/types.js.map +1 -0
  29. package/lib/commonjs/view/glyph-run.js +34 -0
  30. package/lib/commonjs/view/glyph-run.js.map +1 -0
  31. package/lib/commonjs/view/morph-viewport.js +64 -0
  32. package/lib/commonjs/view/morph-viewport.js.map +1 -0
  33. package/lib/commonjs/view/number-lane.js +85 -0
  34. package/lib/commonjs/view/number-lane.js.map +1 -0
  35. package/lib/commonjs/view/number-run.js +61 -0
  36. package/lib/commonjs/view/number-run.js.map +1 -0
  37. package/lib/commonjs/view/text-run.js +35 -0
  38. package/lib/commonjs/view/text-run.js.map +1 -0
  39. package/lib/module/hooks/use-display-units.js +8 -0
  40. package/lib/module/hooks/use-display-units.js.map +1 -0
  41. package/lib/module/hooks/use-inline-auto-width.js +40 -0
  42. package/lib/module/hooks/use-inline-auto-width.js.map +1 -0
  43. package/lib/module/hooks/use-morph-motion.js +19 -0
  44. package/lib/module/hooks/use-morph-motion.js.map +1 -0
  45. package/lib/module/hooks/use-morph-text-style.js +27 -0
  46. package/lib/module/hooks/use-morph-text-style.js.map +1 -0
  47. package/lib/module/hooks/use-numeric-lanes.js +32 -0
  48. package/lib/module/hooks/use-numeric-lanes.js.map +1 -0
  49. package/lib/module/hooks/use-text-glyphs.js +30 -0
  50. package/lib/module/hooks/use-text-glyphs.js.map +1 -0
  51. package/lib/module/index.js +84 -0
  52. package/lib/module/index.js.map +1 -0
  53. package/lib/module/model/display-units.js +21 -0
  54. package/lib/module/model/display-units.js.map +1 -0
  55. package/lib/module/model/numeric-lanes.js +40 -0
  56. package/lib/module/model/numeric-lanes.js.map +1 -0
  57. package/lib/module/model/text-keys.js +75 -0
  58. package/lib/module/model/text-keys.js.map +1 -0
  59. package/lib/module/motion/entry-exit-builders.js +52 -0
  60. package/lib/module/motion/entry-exit-builders.js.map +1 -0
  61. package/lib/module/motion/preset-map.js +86 -0
  62. package/lib/module/motion/preset-map.js.map +1 -0
  63. package/lib/module/package.json +1 -0
  64. package/lib/module/types.js +4 -0
  65. package/lib/module/types.js.map +1 -0
  66. package/lib/module/view/glyph-run.js +29 -0
  67. package/lib/module/view/glyph-run.js.map +1 -0
  68. package/lib/module/view/morph-viewport.js +58 -0
  69. package/lib/module/view/morph-viewport.js.map +1 -0
  70. package/lib/module/view/number-lane.js +79 -0
  71. package/lib/module/view/number-lane.js.map +1 -0
  72. package/lib/module/view/number-run.js +56 -0
  73. package/lib/module/view/number-run.js.map +1 -0
  74. package/lib/module/view/text-run.js +30 -0
  75. package/lib/module/view/text-run.js.map +1 -0
  76. package/lib/typescript/commonjs/hooks/use-display-units.d.ts +2 -0
  77. package/lib/typescript/commonjs/hooks/use-display-units.d.ts.map +1 -0
  78. package/lib/typescript/commonjs/hooks/use-inline-auto-width.d.ts +15 -0
  79. package/lib/typescript/commonjs/hooks/use-inline-auto-width.d.ts.map +1 -0
  80. package/lib/typescript/commonjs/hooks/use-morph-motion.d.ts +14 -0
  81. package/lib/typescript/commonjs/hooks/use-morph-motion.d.ts.map +1 -0
  82. package/lib/typescript/commonjs/hooks/use-morph-text-style.d.ts +13 -0
  83. package/lib/typescript/commonjs/hooks/use-morph-text-style.d.ts.map +1 -0
  84. package/lib/typescript/commonjs/hooks/use-numeric-lanes.d.ts +10 -0
  85. package/lib/typescript/commonjs/hooks/use-numeric-lanes.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/hooks/use-text-glyphs.d.ts +3 -0
  87. package/lib/typescript/commonjs/hooks/use-text-glyphs.d.ts.map +1 -0
  88. package/lib/typescript/commonjs/index.d.ts +7 -0
  89. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  90. package/lib/typescript/commonjs/model/display-units.d.ts +5 -0
  91. package/lib/typescript/commonjs/model/display-units.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/model/numeric-lanes.d.ts +9 -0
  93. package/lib/typescript/commonjs/model/numeric-lanes.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/model/text-keys.d.ts +7 -0
  95. package/lib/typescript/commonjs/model/text-keys.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/motion/entry-exit-builders.d.ts +15 -0
  97. package/lib/typescript/commonjs/motion/entry-exit-builders.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/motion/preset-map.d.ts +4 -0
  99. package/lib/typescript/commonjs/motion/preset-map.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/package.json +1 -0
  101. package/lib/typescript/commonjs/types.d.ts +43 -0
  102. package/lib/typescript/commonjs/types.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/view/glyph-run.d.ts +12 -0
  104. package/lib/typescript/commonjs/view/glyph-run.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/view/morph-viewport.d.ts +14 -0
  106. package/lib/typescript/commonjs/view/morph-viewport.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/view/number-lane.d.ts +17 -0
  108. package/lib/typescript/commonjs/view/number-lane.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/view/number-run.d.ts +13 -0
  110. package/lib/typescript/commonjs/view/number-run.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/view/text-run.d.ts +11 -0
  112. package/lib/typescript/commonjs/view/text-run.d.ts.map +1 -0
  113. package/lib/typescript/module/hooks/use-display-units.d.ts +2 -0
  114. package/lib/typescript/module/hooks/use-display-units.d.ts.map +1 -0
  115. package/lib/typescript/module/hooks/use-inline-auto-width.d.ts +15 -0
  116. package/lib/typescript/module/hooks/use-inline-auto-width.d.ts.map +1 -0
  117. package/lib/typescript/module/hooks/use-morph-motion.d.ts +14 -0
  118. package/lib/typescript/module/hooks/use-morph-motion.d.ts.map +1 -0
  119. package/lib/typescript/module/hooks/use-morph-text-style.d.ts +13 -0
  120. package/lib/typescript/module/hooks/use-morph-text-style.d.ts.map +1 -0
  121. package/lib/typescript/module/hooks/use-numeric-lanes.d.ts +10 -0
  122. package/lib/typescript/module/hooks/use-numeric-lanes.d.ts.map +1 -0
  123. package/lib/typescript/module/hooks/use-text-glyphs.d.ts +3 -0
  124. package/lib/typescript/module/hooks/use-text-glyphs.d.ts.map +1 -0
  125. package/lib/typescript/module/index.d.ts +7 -0
  126. package/lib/typescript/module/index.d.ts.map +1 -0
  127. package/lib/typescript/module/model/display-units.d.ts +5 -0
  128. package/lib/typescript/module/model/display-units.d.ts.map +1 -0
  129. package/lib/typescript/module/model/numeric-lanes.d.ts +9 -0
  130. package/lib/typescript/module/model/numeric-lanes.d.ts.map +1 -0
  131. package/lib/typescript/module/model/text-keys.d.ts +7 -0
  132. package/lib/typescript/module/model/text-keys.d.ts.map +1 -0
  133. package/lib/typescript/module/motion/entry-exit-builders.d.ts +15 -0
  134. package/lib/typescript/module/motion/entry-exit-builders.d.ts.map +1 -0
  135. package/lib/typescript/module/motion/preset-map.d.ts +4 -0
  136. package/lib/typescript/module/motion/preset-map.d.ts.map +1 -0
  137. package/lib/typescript/module/package.json +1 -0
  138. package/lib/typescript/module/types.d.ts +43 -0
  139. package/lib/typescript/module/types.d.ts.map +1 -0
  140. package/lib/typescript/module/view/glyph-run.d.ts +12 -0
  141. package/lib/typescript/module/view/glyph-run.d.ts.map +1 -0
  142. package/lib/typescript/module/view/morph-viewport.d.ts +14 -0
  143. package/lib/typescript/module/view/morph-viewport.d.ts.map +1 -0
  144. package/lib/typescript/module/view/number-lane.d.ts +17 -0
  145. package/lib/typescript/module/view/number-lane.d.ts.map +1 -0
  146. package/lib/typescript/module/view/number-run.d.ts +13 -0
  147. package/lib/typescript/module/view/number-run.d.ts.map +1 -0
  148. package/lib/typescript/module/view/text-run.d.ts +11 -0
  149. package/lib/typescript/module/view/text-run.d.ts.map +1 -0
  150. package/package.json +61 -0
  151. package/src/hooks/use-display-units.ts +18 -0
  152. package/src/hooks/use-inline-auto-width.ts +57 -0
  153. package/src/hooks/use-morph-motion.ts +40 -0
  154. package/src/hooks/use-morph-text-style.ts +45 -0
  155. package/src/hooks/use-numeric-lanes.ts +55 -0
  156. package/src/hooks/use-text-glyphs.ts +56 -0
  157. package/src/index.tsx +98 -0
  158. package/src/model/display-units.ts +28 -0
  159. package/src/model/numeric-lanes.ts +80 -0
  160. package/src/model/text-keys.ts +123 -0
  161. package/src/motion/entry-exit-builders.ts +74 -0
  162. package/src/motion/preset-map.ts +127 -0
  163. package/src/types.ts +60 -0
  164. package/src/view/glyph-run.tsx +47 -0
  165. package/src/view/morph-viewport.tsx +83 -0
  166. package/src/view/number-lane.tsx +128 -0
  167. package/src/view/number-run.tsx +73 -0
  168. package/src/view/text-run.tsx +40 -0
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ import React, { useMemo, useRef } from "react";
4
+ import { View } from "react-native";
5
+ import { useNumericLanes } from "../hooks/use-numeric-lanes.js";
6
+ import { NumberLane } from "./number-lane.js";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ const rowStyle = {
9
+ flexDirection: "row",
10
+ alignItems: "center",
11
+ alignSelf: "flex-start"
12
+ };
13
+ export const NumberRun = /*#__PURE__*/React.memo(({
14
+ value,
15
+ motionRecipe,
16
+ fontSize,
17
+ textStyle,
18
+ staggerMs
19
+ }) => {
20
+ const {
21
+ units,
22
+ laneKeys,
23
+ direction,
24
+ leadLength
25
+ } = useNumericLanes(value);
26
+ const lastValueRef = useRef(value);
27
+ const hasAnimatedRef = useRef(false);
28
+
29
+ // skip enter animations on first paint so the number feels settled
30
+ if (value !== lastValueRef.current) {
31
+ hasAnimatedRef.current = true;
32
+ lastValueRef.current = value;
33
+ }
34
+ const travelDistance = useMemo(() => Math.max(8, Math.round((fontSize ?? 16) * 0.4)), [fontSize]);
35
+ const hasAnimated = hasAnimatedRef.current;
36
+ return /*#__PURE__*/_jsx(View, {
37
+ style: rowStyle,
38
+ children: units.map((unit, index) => {
39
+ const inLead = index < leadLength;
40
+ const laneKey = inLead ? `lead:${index}` : `lane:${units.length - 1 - index}`;
41
+ return /*#__PURE__*/_jsx(NumberLane, {
42
+ unit: unit,
43
+ tokenKey: laneKeys[index],
44
+ isLead: inLead,
45
+ hasAnimated: hasAnimated,
46
+ delayMs: index * staggerMs,
47
+ direction: direction,
48
+ travelDistance: travelDistance,
49
+ motionRecipe: motionRecipe,
50
+ textStyle: textStyle
51
+ }, laneKey);
52
+ })
53
+ });
54
+ });
55
+ NumberRun.displayName = "NumberRun";
56
+ //# sourceMappingURL=number-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","useRef","View","useNumericLanes","NumberLane","jsx","_jsx","rowStyle","flexDirection","alignItems","alignSelf","NumberRun","memo","value","motionRecipe","fontSize","textStyle","staggerMs","units","laneKeys","direction","leadLength","lastValueRef","hasAnimatedRef","current","travelDistance","Math","max","round","hasAnimated","style","children","map","unit","index","inLead","laneKey","length","tokenKey","isLead","delayMs","displayName"],"sourceRoot":"../../../src","sources":["view/number-run.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAC9C,SAAyCC,IAAI,QAAQ,cAAc;AACnE,SAASC,eAAe,QAAQ,+BAA4B;AAE5D,SAASC,UAAU,QAAQ,kBAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,MAAMC,QAAQ,GAAG;EACfC,aAAa,EAAE,KAAK;EACpBC,UAAU,EAAE,QAAQ;EACpBC,SAAS,EAAE;AACb,CAAU;AAUV,OAAO,MAAMC,SAAS,gBAAGZ,KAAK,CAACa,IAAI,CACjC,CAAC;EACCC,KAAK;EACLC,YAAY;EACZC,QAAQ;EACRC,SAAS;EACTC;AACwB,CAAC,KAAK;EAC9B,MAAM;IAAEC,KAAK;IAAEC,QAAQ;IAAEC,SAAS;IAAEC;EAAW,CAAC,GAAGlB,eAAe,CAACU,KAAK,CAAC;EACzE,MAAMS,YAAY,GAAGrB,MAAM,CAACY,KAAK,CAAC;EAClC,MAAMU,cAAc,GAAGtB,MAAM,CAAC,KAAK,CAAC;;EAEpC;EACA,IAAIY,KAAK,KAAKS,YAAY,CAACE,OAAO,EAAE;IAClCD,cAAc,CAACC,OAAO,GAAG,IAAI;IAC7BF,YAAY,CAACE,OAAO,GAAGX,KAAK;EAC9B;EAEA,MAAMY,cAAc,GAAGzB,OAAO,CAC5B,MAAM0B,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,KAAK,CAAC,CAACb,QAAQ,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,EACrD,CAACA,QAAQ,CACX,CAAC;EACD,MAAMc,WAAW,GAAGN,cAAc,CAACC,OAAO;EAE1C,oBACElB,IAAA,CAACJ,IAAI;IAAC4B,KAAK,EAAEvB,QAAS;IAAAwB,QAAA,EACnBb,KAAK,CAACc,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;MAC1B,MAAMC,MAAM,GAAGD,KAAK,GAAGb,UAAU;MACjC,MAAMe,OAAO,GAAGD,MAAM,GAClB,QAAQD,KAAK,EAAE,GACf,QAAQhB,KAAK,CAACmB,MAAM,GAAG,CAAC,GAAGH,KAAK,EAAE;MAEtC,oBACE5B,IAAA,CAACF,UAAU;QAET6B,IAAI,EAAEA,IAAK;QACXK,QAAQ,EAAEnB,QAAQ,CAACe,KAAK,CAAE;QAC1BK,MAAM,EAAEJ,MAAO;QACfN,WAAW,EAAEA,WAAY;QACzBW,OAAO,EAAEN,KAAK,GAAGjB,SAAU;QAC3BG,SAAS,EAAEA,SAAU;QACrBK,cAAc,EAAEA,cAAe;QAC/BX,YAAY,EAAEA,YAAa;QAC3BE,SAAS,EAAEA;MAAU,GAThBoB,OAUN,CAAC;IAEN,CAAC;EAAC,CACE,CAAC;AAEX,CACF,CAAC;AAEDzB,SAAS,CAAC8B,WAAW,GAAG,WAAW","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ import React, { useId, useRef } from "react";
4
+ import { useTextGlyphs } from "../hooks/use-text-glyphs.js";
5
+ import { GlyphRun } from "./glyph-run.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export const TextRun = /*#__PURE__*/React.memo(({
8
+ value,
9
+ motionRecipe,
10
+ textStyle
11
+ }) => {
12
+ // namespace ids per instance so repeated strings do not collide
13
+ const scopeId = useId();
14
+ const glyphs = useTextGlyphs(value, scopeId);
15
+ const lastValueRef = useRef(value);
16
+ const hasAnimatedRef = useRef(false);
17
+ if (value !== lastValueRef.current) {
18
+ hasAnimatedRef.current = true;
19
+ lastValueRef.current = value;
20
+ }
21
+ return /*#__PURE__*/_jsx(GlyphRun, {
22
+ glyphs: glyphs,
23
+ layoutTransition: motionRecipe.layoutTransition,
24
+ enterTransition: hasAnimatedRef.current ? motionRecipe.enterTransition : undefined,
25
+ exitTransition: motionRecipe.exitTransition,
26
+ textStyle: textStyle
27
+ });
28
+ });
29
+ TextRun.displayName = "TextRun";
30
+ //# sourceMappingURL=text-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useId","useRef","useTextGlyphs","GlyphRun","jsx","_jsx","TextRun","memo","value","motionRecipe","textStyle","scopeId","glyphs","lastValueRef","hasAnimatedRef","current","layoutTransition","enterTransition","undefined","exitTransition","displayName"],"sourceRoot":"../../../src","sources":["view/text-run.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,KAAK,EAAEC,MAAM,QAAQ,OAAO;AAE5C,SAASC,aAAa,QAAQ,6BAA0B;AAExD,SAASC,QAAQ,QAAQ,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQvC,OAAO,MAAMC,OAAO,gBAAGP,KAAK,CAACQ,IAAI,CAC/B,CAAC;EAAEC,KAAK;EAAEC,YAAY;EAAEC;AAAwB,CAAC,KAAK;EACpD;EACA,MAAMC,OAAO,GAAGX,KAAK,CAAC,CAAC;EACvB,MAAMY,MAAM,GAAGV,aAAa,CAACM,KAAK,EAAEG,OAAO,CAAC;EAC5C,MAAME,YAAY,GAAGZ,MAAM,CAACO,KAAK,CAAC;EAClC,MAAMM,cAAc,GAAGb,MAAM,CAAC,KAAK,CAAC;EAEpC,IAAIO,KAAK,KAAKK,YAAY,CAACE,OAAO,EAAE;IAClCD,cAAc,CAACC,OAAO,GAAG,IAAI;IAC7BF,YAAY,CAACE,OAAO,GAAGP,KAAK;EAC9B;EAEA,oBACEH,IAAA,CAACF,QAAQ;IACPS,MAAM,EAAEA,MAAO;IACfI,gBAAgB,EAAEP,YAAY,CAACO,gBAAiB;IAChDC,eAAe,EACbH,cAAc,CAACC,OAAO,GAAGN,YAAY,CAACQ,eAAe,GAAGC,SACzD;IACDC,cAAc,EAAEV,YAAY,CAACU,cAAe;IAC5CT,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CACF,CAAC;AAEDJ,OAAO,CAACc,WAAW,GAAG,SAAS","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export declare const useDisplayUnits: (value: string, enabled?: boolean) => readonly string[];
2
+ //# sourceMappingURL=use-display-units.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-display-units.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-display-units.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,EACb,iBAAc,KACb,SAAS,MAAM,EAQf,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { LayoutChangeEvent } from "react-native";
2
+ type Params = {
3
+ enabled: boolean;
4
+ driveToWidth: (toValue: number) => number;
5
+ };
6
+ export declare const useInlineAutoWidth: ({ enabled, driveToWidth }: Params) => {
7
+ captureLayout: (event: LayoutChangeEvent) => void;
8
+ animatedWidthStyle: {
9
+ width: number;
10
+ } | {
11
+ width?: undefined;
12
+ };
13
+ };
14
+ export {};
15
+ //# sourceMappingURL=use-inline-auto-width.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-inline-auto-width.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-inline-auto-width.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD,KAAK,MAAM,GAAG;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,2BAA2B,MAAM;2BAOxD,iBAAiB;;;;;;CAwC5B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { MotionRecipe, MorphAnimationPresetName, MorphContentVariant } from "../types";
2
+ type Params = {
3
+ readonly variant: MorphContentVariant;
4
+ readonly animationPreset?: MorphAnimationPresetName;
5
+ readonly animationDuration?: number;
6
+ readonly stagger: number;
7
+ };
8
+ type MorphMotion = {
9
+ readonly motionRecipe: MotionRecipe;
10
+ readonly staggerMs: number;
11
+ };
12
+ export declare const useMorphMotion: ({ variant, animationPreset, animationDuration, stagger, }: Params) => MorphMotion;
13
+ export {};
14
+ //# sourceMappingURL=use-morph-motion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-morph-motion.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-morph-motion.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,KAAK,MAAM,GAAG;IACZ,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,2DAK5B,MAAM,KAAG,WAcX,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { StyleProp, TextStyle } from "react-native";
2
+ type Params = {
3
+ readonly fontSize?: number;
4
+ readonly color?: string;
5
+ readonly fontStyle?: StyleProp<TextStyle>;
6
+ readonly style?: StyleProp<TextStyle>;
7
+ };
8
+ type MorphTextStyle = {
9
+ readonly textStyle: StyleProp<TextStyle>;
10
+ };
11
+ export declare const useMorphTextStyle: ({ fontSize, color, fontStyle, style, }: Params) => MorphTextStyle;
12
+ export {};
13
+ //# sourceMappingURL=use-morph-text-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-morph-text-style.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-morph-text-style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,KAAK,MAAM,GAAG;IACZ,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,wCAK/B,MAAM,KAAG,cAyBX,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { NumericFlowDirection } from "../types";
2
+ type NumericLaneSnapshot = {
3
+ readonly units: readonly string[];
4
+ readonly laneKeys: readonly number[];
5
+ readonly direction: NumericFlowDirection;
6
+ readonly leadLength: number;
7
+ };
8
+ export declare const useNumericLanes: (value: string) => NumericLaneSnapshot;
9
+ export {};
10
+ //# sourceMappingURL=use-numeric-lanes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-numeric-lanes.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-numeric-lanes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAcrD,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,mBAgC/C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { GlyphToken } from "../types";
2
+ export declare const useTextGlyphs: (value: string, namespace: string) => readonly GlyphToken[];
3
+ //# sourceMappingURL=use-text-glyphs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-text-glyphs.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-text-glyphs.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAS3C,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,EACb,WAAW,MAAM,KAChB,SAAS,UAAU,EAqCrB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type { MorphingTextProps } from "./types";
3
+ export declare const Laminar: React.NamedExoticComponent<Readonly<MorphingTextProps>>;
4
+ export declare const MorphingText: React.NamedExoticComponent<Readonly<MorphingTextProps>>;
5
+ export default Laminar;
6
+ export type { LaminarProps, MorphAnimationPresetName, MorphContentVariant, MorphingTextProps, } from "./types";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAKjD,eAAO,MAAM,OAAO,yDAyEhB,CAAC;AAEL,eAAO,MAAM,YAAY,yDAAU,CAAC;AAEpC,eAAe,OAAO,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const splitDisplayUnits: (input: string) => string[];
2
+ export declare const normalizeDisplayUnit: (unit: string) => string;
3
+ export declare const isAsciiDigit: (unit: string) => boolean;
4
+ export declare const findNumericLeadLength: (units: readonly string[]) => number;
5
+ //# sourceMappingURL=display-units.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-units.d.ts","sourceRoot":"","sources":["../../../../src/model/display-units.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,MAAM,EASvD,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,WACrB,CAAC;AAE7B,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,YAA+B,CAAC;AAEzE,eAAO,MAAM,qBAAqB,GAAI,OAAO,SAAS,MAAM,EAAE,WAI7D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { NumericFlowDirection } from "../types";
2
+ type ReconciledLaneState = {
3
+ readonly laneKeys: readonly number[];
4
+ readonly nextSeed: number;
5
+ readonly direction: NumericFlowDirection;
6
+ };
7
+ export declare const reconcileNumericLanes: (previousValue: string, nextValue: string, previousKeys: readonly number[], seed: number) => ReconciledLaneState;
8
+ export {};
9
+ //# sourceMappingURL=numeric-lanes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numeric-lanes.d.ts","sourceRoot":"","sources":["../../../../src/model/numeric-lanes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAerD,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,eAAe,MAAM,EACrB,WAAW,MAAM,EACjB,cAAc,SAAS,MAAM,EAAE,EAC/B,MAAM,MAAM,KACX,mBAqDF,CAAC"}
@@ -0,0 +1,7 @@
1
+ type ReconciledTextGlyphState = {
2
+ readonly glyphKeys: readonly string[];
3
+ readonly nextSeed: number;
4
+ };
5
+ export declare const reconcileTextGlyphKeys: (previousUnits: readonly string[], nextUnits: readonly string[], previousKeys: readonly string[], seed: number, namespace: string) => ReconciledTextGlyphState;
6
+ export {};
7
+ //# sourceMappingURL=text-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-keys.d.ts","sourceRoot":"","sources":["../../../../src/model/text-keys.ts"],"names":[],"mappings":"AAmDA,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,eAAe,SAAS,MAAM,EAAE,EAChC,WAAW,SAAS,MAAM,EAAE,EAC5B,cAAc,SAAS,MAAM,EAAE,EAC/B,MAAM,MAAM,EACZ,WAAW,MAAM,KAChB,wBA4DF,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type EntryExitAnimationFunction, type WithTimingConfig } from "react-native-reanimated";
2
+ type TransitionParams = {
3
+ readonly delayMs?: number;
4
+ readonly durationMs: number;
5
+ readonly easing: NonNullable<WithTimingConfig["easing"]>;
6
+ readonly fromOpacity: number;
7
+ readonly toOpacity: number;
8
+ readonly fromTranslateY: number;
9
+ readonly toTranslateY: number;
10
+ readonly fromScale: number;
11
+ readonly toScale: number;
12
+ };
13
+ export declare const createShiftTransition: ({ delayMs, durationMs, easing, fromOpacity, toOpacity, fromTranslateY, toTranslateY, fromScale, toScale, }: TransitionParams) => EntryExitAnimationFunction;
14
+ export {};
15
+ //# sourceMappingURL=entry-exit-builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-exit-builders.d.ts","sourceRoot":"","sources":["../../../../src/motion/entry-exit-builders.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EAGtB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,4GAUnC,gBAAgB,KAAG,0BA4CrB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { MotionRecipe, MorphAnimationPreset, MorphAnimationPresetName } from "../types";
2
+ export declare const MOTION_PRESETS: Record<MorphAnimationPresetName, MorphAnimationPreset>;
3
+ export declare const resolveMotionRecipe: (presetName?: MorphAnimationPresetName, durationOverride?: number) => MotionRecipe;
4
+ //# sourceMappingURL=preset-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset-map.d.ts","sourceRoot":"","sources":["../../../../src/motion/preset-map.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAIlB,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,wBAAwB,EACxB,oBAAoB,CAqBZ,CAAC;AA8BX,eAAO,MAAM,mBAAmB,GAC9B,aAAY,wBAAoC,EAChD,mBAAmB,MAAM,KACxB,YAqDF,CAAC"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,43 @@
1
+ import type { StyleProp, TextStyle, ViewStyle } from "react-native";
2
+ import type { ComplexAnimationBuilder, EntryExitAnimationFunction, WithTimingConfig } from "react-native-reanimated";
3
+ export type MorphAnimationPresetName = "default" | "smooth" | "snappy" | "bouncy";
4
+ export type MorphContentVariant = "text" | "number";
5
+ type CubicBezierTuple = readonly [number, number, number, number];
6
+ export type MorphAnimationPreset = {
7
+ readonly duration: number;
8
+ readonly ease: CubicBezierTuple;
9
+ } | {
10
+ readonly type: "spring";
11
+ readonly duration: number;
12
+ readonly bounce: number;
13
+ };
14
+ export type GlyphToken = {
15
+ readonly id: string;
16
+ readonly value: string;
17
+ };
18
+ export type NumericFlowDirection = -1 | 0 | 1;
19
+ export type MotionRecipe = {
20
+ readonly durationMs: number;
21
+ readonly easing: NonNullable<WithTimingConfig["easing"]>;
22
+ readonly layoutTransition: ComplexAnimationBuilder;
23
+ readonly enterTransition: EntryExitAnimationFunction;
24
+ readonly exitTransition: EntryExitAnimationFunction;
25
+ readonly driveNumber: (toValue: number, delayMs?: number) => number;
26
+ };
27
+ export type MorphingTextProps = {
28
+ readonly text: string | number;
29
+ readonly variant?: MorphContentVariant;
30
+ readonly fontSize?: number;
31
+ readonly color?: string;
32
+ readonly style?: StyleProp<TextStyle>;
33
+ readonly containerStyle?: StyleProp<ViewStyle>;
34
+ readonly fontStyle?: StyleProp<TextStyle>;
35
+ readonly animationDuration?: number;
36
+ readonly animationPreset?: MorphAnimationPresetName;
37
+ readonly stagger?: number;
38
+ readonly autoSize?: boolean;
39
+ readonly clipToBounds?: boolean;
40
+ };
41
+ export type LaminarProps = MorphingTextProps;
42
+ export {};
43
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpD,KAAK,gBAAgB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAC5B;IACE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;CACjC,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEN,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,gBAAgB,EAAE,uBAAuB,CAAC;IACnD,QAAQ,CAAC,eAAe,EAAE,0BAA0B,CAAC;IACrD,QAAQ,CAAC,cAAc,EAAE,0BAA0B,CAAC;IACpD,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { type StyleProp, type TextStyle } from "react-native";
3
+ import type { ComplexAnimationBuilder, EntryExitAnimationFunction } from "react-native-reanimated";
4
+ import type { GlyphToken } from "../types";
5
+ export declare const GlyphRun: React.MemoExoticComponent<({ glyphs, layoutTransition, enterTransition, exitTransition, textStyle, }: Readonly<{
6
+ glyphs: readonly GlyphToken[];
7
+ layoutTransition: ComplexAnimationBuilder;
8
+ enterTransition?: EntryExitAnimationFunction;
9
+ exitTransition?: EntryExitAnimationFunction;
10
+ textStyle?: StyleProp<TextStyle>;
11
+ }>) => React.JSX.Element>;
12
+ //# sourceMappingURL=glyph-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glyph-run.d.ts","sourceRoot":"","sources":["../../../../src/view/glyph-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAQ3C,eAAO,MAAM,QAAQ,wGAOhB,QAAQ,CAAC;IACV,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,eAAe,CAAC,EAAE,0BAA0B,CAAC;IAC7C,cAAc,CAAC,EAAE,0BAA0B,CAAC;IAC5C,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAClC,CAAC,uBAgBH,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import type { StyleProp, ViewStyle } from "react-native";
3
+ import Animated from "react-native-reanimated";
4
+ type MorphViewportProps = {
5
+ readonly autoSize: boolean;
6
+ readonly clipToBounds: boolean;
7
+ readonly containerStyle?: StyleProp<ViewStyle>;
8
+ readonly animatedWidthStyle?: React.ComponentProps<typeof Animated.View>["style"];
9
+ readonly measurement?: React.ReactNode;
10
+ readonly children: React.ReactNode;
11
+ };
12
+ export declare const MorphViewport: React.MemoExoticComponent<({ autoSize, clipToBounds, containerStyle, animatedWidthStyle, measurement, children, }: MorphViewportProps) => React.JSX.Element>;
13
+ export {};
14
+ //# sourceMappingURL=morph-viewport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"morph-viewport.d.ts","sourceRoot":"","sources":["../../../../src/view/morph-viewport.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AA4B/C,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;IAClF,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,aAAa,qHAQrB,kBAAkB,uBAgCtB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { type StyleProp, type TextStyle } from "react-native";
3
+ import type { MotionRecipe, NumericFlowDirection } from "../types";
4
+ type NumberLaneProps = {
5
+ readonly unit: string;
6
+ readonly tokenKey: number;
7
+ readonly isLead: boolean;
8
+ readonly hasAnimated: boolean;
9
+ readonly delayMs: number;
10
+ readonly direction: NumericFlowDirection;
11
+ readonly travelDistance: number;
12
+ readonly motionRecipe: MotionRecipe;
13
+ readonly textStyle?: StyleProp<TextStyle>;
14
+ };
15
+ export declare const NumberLane: React.MemoExoticComponent<({ unit, tokenKey, isLead, hasAnimated, delayMs, direction, travelDistance, motionRecipe, textStyle, }: NumberLaneProps) => React.JSX.Element>;
16
+ export {};
17
+ //# sourceMappingURL=number-lane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-lane.d.ts","sourceRoot":"","sources":["../../../../src/view/number-lane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpE,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAiBnE,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,UAAU,oIAWlB,eAAe,uBAgFnB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { type StyleProp, type TextStyle } from "react-native";
3
+ import type { MotionRecipe } from "../types";
4
+ type NumberRunProps = {
5
+ readonly value: string;
6
+ readonly motionRecipe: MotionRecipe;
7
+ readonly fontSize?: number;
8
+ readonly textStyle?: StyleProp<TextStyle>;
9
+ readonly staggerMs: number;
10
+ };
11
+ export declare const NumberRun: React.MemoExoticComponent<({ value, motionRecipe, fontSize, textStyle, staggerMs, }: Readonly<NumberRunProps>) => React.JSX.Element>;
12
+ export {};
13
+ //# sourceMappingURL=number-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-run.d.ts","sourceRoot":"","sources":["../../../../src/view/number-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAS7C,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,SAAS,uFAOjB,QAAQ,CAAC,cAAc,CAAC,uBA2C5B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import type { StyleProp, TextStyle } from "react-native";
3
+ import type { MotionRecipe } from "../types";
4
+ type TextRunProps = {
5
+ readonly value: string;
6
+ readonly motionRecipe: MotionRecipe;
7
+ readonly textStyle?: StyleProp<TextStyle>;
8
+ };
9
+ export declare const TextRun: React.MemoExoticComponent<({ value, motionRecipe, textStyle }: TextRunProps) => React.JSX.Element>;
10
+ export {};
11
+ //# sourceMappingURL=text-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-run.d.ts","sourceRoot":"","sources":["../../../../src/view/text-run.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,KAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,OAAO,iEACmB,YAAY,uBAwBlD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useDisplayUnits: (value: string, enabled?: boolean) => readonly string[];
2
+ //# sourceMappingURL=use-display-units.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-display-units.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-display-units.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,EACb,iBAAc,KACb,SAAS,MAAM,EAQf,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { LayoutChangeEvent } from "react-native";
2
+ type Params = {
3
+ enabled: boolean;
4
+ driveToWidth: (toValue: number) => number;
5
+ };
6
+ export declare const useInlineAutoWidth: ({ enabled, driveToWidth }: Params) => {
7
+ captureLayout: (event: LayoutChangeEvent) => void;
8
+ animatedWidthStyle: {
9
+ width: number;
10
+ } | {
11
+ width?: undefined;
12
+ };
13
+ };
14
+ export {};
15
+ //# sourceMappingURL=use-inline-auto-width.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-inline-auto-width.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-inline-auto-width.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD,KAAK,MAAM,GAAG;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,2BAA2B,MAAM;2BAOxD,iBAAiB;;;;;;CAwC5B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { MotionRecipe, MorphAnimationPresetName, MorphContentVariant } from "../types";
2
+ type Params = {
3
+ readonly variant: MorphContentVariant;
4
+ readonly animationPreset?: MorphAnimationPresetName;
5
+ readonly animationDuration?: number;
6
+ readonly stagger: number;
7
+ };
8
+ type MorphMotion = {
9
+ readonly motionRecipe: MotionRecipe;
10
+ readonly staggerMs: number;
11
+ };
12
+ export declare const useMorphMotion: ({ variant, animationPreset, animationDuration, stagger, }: Params) => MorphMotion;
13
+ export {};
14
+ //# sourceMappingURL=use-morph-motion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-morph-motion.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-morph-motion.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,KAAK,MAAM,GAAG;IACZ,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;IACpD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,2DAK5B,MAAM,KAAG,WAcX,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { StyleProp, TextStyle } from "react-native";
2
+ type Params = {
3
+ readonly fontSize?: number;
4
+ readonly color?: string;
5
+ readonly fontStyle?: StyleProp<TextStyle>;
6
+ readonly style?: StyleProp<TextStyle>;
7
+ };
8
+ type MorphTextStyle = {
9
+ readonly textStyle: StyleProp<TextStyle>;
10
+ };
11
+ export declare const useMorphTextStyle: ({ fontSize, color, fontStyle, style, }: Params) => MorphTextStyle;
12
+ export {};
13
+ //# sourceMappingURL=use-morph-text-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-morph-text-style.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-morph-text-style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,KAAK,MAAM,GAAG;IACZ,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,wCAK/B,MAAM,KAAG,cAyBX,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { NumericFlowDirection } from "../types";
2
+ type NumericLaneSnapshot = {
3
+ readonly units: readonly string[];
4
+ readonly laneKeys: readonly number[];
5
+ readonly direction: NumericFlowDirection;
6
+ readonly leadLength: number;
7
+ };
8
+ export declare const useNumericLanes: (value: string) => NumericLaneSnapshot;
9
+ export {};
10
+ //# sourceMappingURL=use-numeric-lanes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-numeric-lanes.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-numeric-lanes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAcrD,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,mBAgC/C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { GlyphToken } from "../types";
2
+ export declare const useTextGlyphs: (value: string, namespace: string) => readonly GlyphToken[];
3
+ //# sourceMappingURL=use-text-glyphs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-text-glyphs.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-text-glyphs.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAS3C,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,EACb,WAAW,MAAM,KAChB,SAAS,UAAU,EAqCrB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type { MorphingTextProps } from "./types";
3
+ export declare const Laminar: React.NamedExoticComponent<Readonly<MorphingTextProps>>;
4
+ export declare const MorphingText: React.NamedExoticComponent<Readonly<MorphingTextProps>>;
5
+ export default Laminar;
6
+ export type { LaminarProps, MorphAnimationPresetName, MorphContentVariant, MorphingTextProps, } from "./types";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAKjD,eAAO,MAAM,OAAO,yDAyEhB,CAAC;AAEL,eAAO,MAAM,YAAY,yDAAU,CAAC;AAEpC,eAAe,OAAO,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const splitDisplayUnits: (input: string) => string[];
2
+ export declare const normalizeDisplayUnit: (unit: string) => string;
3
+ export declare const isAsciiDigit: (unit: string) => boolean;
4
+ export declare const findNumericLeadLength: (units: readonly string[]) => number;
5
+ //# sourceMappingURL=display-units.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-units.d.ts","sourceRoot":"","sources":["../../../../src/model/display-units.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,MAAM,EASvD,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,WACrB,CAAC;AAE7B,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,YAA+B,CAAC;AAEzE,eAAO,MAAM,qBAAqB,GAAI,OAAO,SAAS,MAAM,EAAE,WAI7D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { NumericFlowDirection } from "../types";
2
+ type ReconciledLaneState = {
3
+ readonly laneKeys: readonly number[];
4
+ readonly nextSeed: number;
5
+ readonly direction: NumericFlowDirection;
6
+ };
7
+ export declare const reconcileNumericLanes: (previousValue: string, nextValue: string, previousKeys: readonly number[], seed: number) => ReconciledLaneState;
8
+ export {};
9
+ //# sourceMappingURL=numeric-lanes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numeric-lanes.d.ts","sourceRoot":"","sources":["../../../../src/model/numeric-lanes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAerD,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,eAAe,MAAM,EACrB,WAAW,MAAM,EACjB,cAAc,SAAS,MAAM,EAAE,EAC/B,MAAM,MAAM,KACX,mBAqDF,CAAC"}
@@ -0,0 +1,7 @@
1
+ type ReconciledTextGlyphState = {
2
+ readonly glyphKeys: readonly string[];
3
+ readonly nextSeed: number;
4
+ };
5
+ export declare const reconcileTextGlyphKeys: (previousUnits: readonly string[], nextUnits: readonly string[], previousKeys: readonly string[], seed: number, namespace: string) => ReconciledTextGlyphState;
6
+ export {};
7
+ //# sourceMappingURL=text-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-keys.d.ts","sourceRoot":"","sources":["../../../../src/model/text-keys.ts"],"names":[],"mappings":"AAmDA,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,eAAe,SAAS,MAAM,EAAE,EAChC,WAAW,SAAS,MAAM,EAAE,EAC5B,cAAc,SAAS,MAAM,EAAE,EAC/B,MAAM,MAAM,EACZ,WAAW,MAAM,KAChB,wBA4DF,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type EntryExitAnimationFunction, type WithTimingConfig } from "react-native-reanimated";
2
+ type TransitionParams = {
3
+ readonly delayMs?: number;
4
+ readonly durationMs: number;
5
+ readonly easing: NonNullable<WithTimingConfig["easing"]>;
6
+ readonly fromOpacity: number;
7
+ readonly toOpacity: number;
8
+ readonly fromTranslateY: number;
9
+ readonly toTranslateY: number;
10
+ readonly fromScale: number;
11
+ readonly toScale: number;
12
+ };
13
+ export declare const createShiftTransition: ({ delayMs, durationMs, easing, fromOpacity, toOpacity, fromTranslateY, toTranslateY, fromScale, toScale, }: TransitionParams) => EntryExitAnimationFunction;
14
+ export {};
15
+ //# sourceMappingURL=entry-exit-builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-exit-builders.d.ts","sourceRoot":"","sources":["../../../../src/motion/entry-exit-builders.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EAGtB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,4GAUnC,gBAAgB,KAAG,0BA4CrB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { MotionRecipe, MorphAnimationPreset, MorphAnimationPresetName } from "../types";
2
+ export declare const MOTION_PRESETS: Record<MorphAnimationPresetName, MorphAnimationPreset>;
3
+ export declare const resolveMotionRecipe: (presetName?: MorphAnimationPresetName, durationOverride?: number) => MotionRecipe;
4
+ //# sourceMappingURL=preset-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset-map.d.ts","sourceRoot":"","sources":["../../../../src/motion/preset-map.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAIlB,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,wBAAwB,EACxB,oBAAoB,CAqBZ,CAAC;AA8BX,eAAO,MAAM,mBAAmB,GAC9B,aAAY,wBAAoC,EAChD,mBAAmB,MAAM,KACxB,YAqDF,CAAC"}
@@ -0,0 +1 @@
1
+ {"type":"module"}