@yahoo/uds-mobile 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/README.md +92 -0
  2. package/dist/_virtual/_rolldown/runtime.cjs +14 -0
  3. package/dist/_virtual/_rolldown/runtime.js +19 -0
  4. package/dist/bin/generateTheme.mjs +14 -0
  5. package/dist/components/{Avatar.d.mts → Avatar.d.ts} +2 -2
  6. package/dist/components/Avatar.d.ts.map +1 -0
  7. package/dist/components/{Avatar.mjs → Avatar.js} +4 -4
  8. package/dist/components/Avatar.js.map +1 -0
  9. package/dist/components/{Badge.d.mts → Badge.d.ts} +3 -3
  10. package/dist/components/Badge.d.ts.map +1 -0
  11. package/dist/components/{Badge.mjs → Badge.js} +4 -4
  12. package/dist/components/Badge.js.map +1 -0
  13. package/dist/components/BlurTarget.cjs +89 -0
  14. package/dist/components/BlurTarget.d.cts +52 -0
  15. package/dist/components/BlurTarget.d.cts.map +1 -0
  16. package/dist/components/BlurTarget.d.ts +52 -0
  17. package/dist/components/BlurTarget.d.ts.map +1 -0
  18. package/dist/components/BlurTarget.js +88 -0
  19. package/dist/components/BlurTarget.js.map +1 -0
  20. package/dist/components/Box.cjs +117 -20
  21. package/dist/components/Box.d.cts +11 -1
  22. package/dist/components/Box.d.cts.map +1 -1
  23. package/dist/components/{Box.d.mts → Box.d.ts} +14 -4
  24. package/dist/components/{Box.d.mts.map → Box.d.ts.map} +1 -1
  25. package/dist/components/Box.js +228 -0
  26. package/dist/components/Box.js.map +1 -0
  27. package/dist/components/{Button.d.mts → Button.d.ts} +4 -4
  28. package/dist/components/Button.d.ts.map +1 -0
  29. package/dist/components/{Button.mjs → Button.js} +6 -6
  30. package/dist/components/Button.js.map +1 -0
  31. package/dist/components/{Checkbox.d.mts → Checkbox.d.ts} +2 -2
  32. package/dist/components/Checkbox.d.ts.map +1 -0
  33. package/dist/components/{Checkbox.mjs → Checkbox.js} +7 -7
  34. package/dist/components/Checkbox.js.map +1 -0
  35. package/dist/components/{Chip.d.mts → Chip.d.ts} +3 -3
  36. package/dist/components/Chip.d.ts.map +1 -0
  37. package/dist/components/{Chip.mjs → Chip.js} +5 -5
  38. package/dist/components/Chip.js.map +1 -0
  39. package/dist/components/{HStack.d.mts → HStack.d.ts} +2 -2
  40. package/dist/components/HStack.d.ts.map +1 -0
  41. package/dist/components/{HStack.mjs → HStack.js} +2 -2
  42. package/dist/components/HStack.js.map +1 -0
  43. package/dist/components/{Icon.d.mts → Icon.d.ts} +2 -2
  44. package/dist/components/Icon.d.ts.map +1 -0
  45. package/dist/components/{Icon.mjs → Icon.js} +1 -1
  46. package/dist/components/Icon.js.map +1 -0
  47. package/dist/components/{IconButton.d.mts → IconButton.d.ts} +4 -4
  48. package/dist/components/IconButton.d.ts.map +1 -0
  49. package/dist/components/{IconButton.mjs → IconButton.js} +5 -5
  50. package/dist/components/IconButton.js.map +1 -0
  51. package/dist/components/{IconSlot.d.mts → IconSlot.d.ts} +2 -2
  52. package/dist/components/IconSlot.d.ts.map +1 -0
  53. package/dist/components/{IconSlot.mjs → IconSlot.js} +2 -2
  54. package/dist/components/IconSlot.js.map +1 -0
  55. package/dist/components/{Image.d.mts → Image.d.ts} +2 -2
  56. package/dist/components/Image.d.ts.map +1 -0
  57. package/dist/components/{Image.mjs → Image.js} +1 -1
  58. package/dist/components/Image.js.map +1 -0
  59. package/dist/components/{Input.d.mts → Input.d.ts} +4 -4
  60. package/dist/components/Input.d.ts.map +1 -0
  61. package/dist/components/{Input.mjs → Input.js} +5 -5
  62. package/dist/components/Input.js.map +1 -0
  63. package/dist/components/{Link.d.mts → Link.d.ts} +4 -4
  64. package/dist/components/Link.d.ts.map +1 -0
  65. package/dist/components/{Link.mjs → Link.js} +2 -2
  66. package/dist/components/Link.js.map +1 -0
  67. package/dist/components/{Pressable.d.mts → Pressable.d.ts} +2 -2
  68. package/dist/components/Pressable.d.ts.map +1 -0
  69. package/dist/components/{Pressable.mjs → Pressable.js} +1 -1
  70. package/dist/components/Pressable.js.map +1 -0
  71. package/dist/components/{Radio.d.mts → Radio.d.ts} +2 -2
  72. package/dist/components/Radio.d.ts.map +1 -0
  73. package/dist/components/{Radio.mjs → Radio.js} +6 -6
  74. package/dist/components/Radio.js.map +1 -0
  75. package/dist/components/{Screen.d.mts → Screen.d.ts} +2 -2
  76. package/dist/components/Screen.d.ts.map +1 -0
  77. package/dist/components/{Screen.mjs → Screen.js} +5 -5
  78. package/dist/components/Screen.js.map +1 -0
  79. package/dist/components/{Switch.d.mts → Switch.d.ts} +3 -3
  80. package/dist/components/Switch.d.ts.map +1 -0
  81. package/dist/components/{Switch.mjs → Switch.js} +6 -6
  82. package/dist/components/Switch.js.map +1 -0
  83. package/dist/components/{Text.d.mts → Text.d.ts} +1 -1
  84. package/dist/components/Text.d.ts.map +1 -0
  85. package/dist/components/{Text.mjs → Text.js} +1 -1
  86. package/dist/components/Text.js.map +1 -0
  87. package/dist/components/{VStack.d.mts → VStack.d.ts} +2 -2
  88. package/dist/components/VStack.d.ts.map +1 -0
  89. package/dist/components/{VStack.mjs → VStack.js} +2 -2
  90. package/dist/components/VStack.js.map +1 -0
  91. package/dist/jest/index.cjs +27 -0
  92. package/dist/jest/index.d.cts +19 -0
  93. package/dist/jest/index.d.cts.map +1 -0
  94. package/dist/jest/index.d.ts +19 -0
  95. package/dist/jest/index.d.ts.map +1 -0
  96. package/dist/jest/index.js +25 -0
  97. package/dist/jest/index.js.map +1 -0
  98. package/dist/jest/mocks/icons.cjs +56 -0
  99. package/dist/jest/mocks/icons.d.cts +24 -0
  100. package/dist/jest/mocks/icons.d.cts.map +1 -0
  101. package/dist/jest/mocks/icons.d.ts +24 -0
  102. package/dist/jest/mocks/icons.d.ts.map +1 -0
  103. package/dist/jest/mocks/icons.js +46 -0
  104. package/dist/jest/mocks/icons.js.map +1 -0
  105. package/dist/jest/mocks/react-native.cjs +212 -0
  106. package/dist/jest/mocks/react-native.d.cts +293 -0
  107. package/dist/jest/mocks/react-native.d.cts.map +1 -0
  108. package/dist/jest/mocks/react-native.d.ts +293 -0
  109. package/dist/jest/mocks/react-native.d.ts.map +1 -0
  110. package/dist/jest/mocks/react-native.js +180 -0
  111. package/dist/jest/mocks/react-native.js.map +1 -0
  112. package/dist/jest/mocks/reanimated.cjs +249 -0
  113. package/dist/jest/mocks/reanimated.d.cts +150 -0
  114. package/dist/jest/mocks/reanimated.d.cts.map +1 -0
  115. package/dist/jest/mocks/reanimated.d.ts +150 -0
  116. package/dist/jest/mocks/reanimated.d.ts.map +1 -0
  117. package/dist/jest/mocks/reanimated.js +210 -0
  118. package/dist/jest/mocks/reanimated.js.map +1 -0
  119. package/dist/jest/mocks/styles.cjs +327 -0
  120. package/dist/jest/mocks/styles.d.cts +33 -0
  121. package/dist/jest/mocks/styles.d.cts.map +1 -0
  122. package/dist/jest/mocks/styles.d.ts +33 -0
  123. package/dist/jest/mocks/styles.d.ts.map +1 -0
  124. package/dist/jest/mocks/styles.js +310 -0
  125. package/dist/jest/mocks/styles.js.map +1 -0
  126. package/dist/jest/mocks/svg.cjs +133 -0
  127. package/dist/jest/mocks/svg.d.cts +137 -0
  128. package/dist/jest/mocks/svg.d.cts.map +1 -0
  129. package/dist/jest/mocks/svg.d.ts +137 -0
  130. package/dist/jest/mocks/svg.d.ts.map +1 -0
  131. package/dist/jest/mocks/svg.js +100 -0
  132. package/dist/jest/mocks/svg.js.map +1 -0
  133. package/dist/jest/mocks/unistyles.cjs +143 -0
  134. package/dist/jest/mocks/unistyles.d.cts +197 -0
  135. package/dist/jest/mocks/unistyles.d.cts.map +1 -0
  136. package/dist/jest/mocks/unistyles.d.ts +197 -0
  137. package/dist/jest/mocks/unistyles.d.ts.map +1 -0
  138. package/dist/jest/mocks/unistyles.js +132 -0
  139. package/dist/jest/mocks/unistyles.js.map +1 -0
  140. package/dist/jest/setup.cjs +40 -0
  141. package/dist/jest/setup.d.cts +11 -0
  142. package/dist/jest/setup.d.cts.map +1 -0
  143. package/dist/jest/setup.d.ts +11 -0
  144. package/dist/jest/setup.d.ts.map +1 -0
  145. package/dist/jest/setup.js +39 -0
  146. package/dist/jest/setup.js.map +1 -0
  147. package/dist/motion-tokens/dist/{index.d.mts → index.d.ts} +2 -2
  148. package/dist/motion-tokens/dist/index.d.ts.map +1 -0
  149. package/dist/motion-tokens/dist/{index.mjs → index.js} +1 -1
  150. package/dist/motion-tokens/dist/index.js.map +1 -0
  151. package/dist/{motion.d.mts → motion.d.ts} +3 -3
  152. package/dist/motion.d.ts.map +1 -0
  153. package/dist/{motion.mjs → motion.js} +2 -2
  154. package/dist/motion.js.map +1 -0
  155. package/dist/types/dist/{index.d.mts → index.d.ts} +1 -1
  156. package/dist/types/dist/index.d.ts.map +1 -0
  157. package/dist/{types.d.mts → types.d.ts} +1 -1
  158. package/dist/types.d.ts.map +1 -0
  159. package/dist/{types.mjs → types.js} +0 -1
  160. package/fonts/index.cjs +205 -205
  161. package/fonts/index.mjs +205 -205
  162. package/generated/unistyles.d.ts +9 -0
  163. package/package.json +65 -41
  164. package/dist/components/Avatar.d.mts.map +0 -1
  165. package/dist/components/Avatar.mjs.map +0 -1
  166. package/dist/components/Badge.d.mts.map +0 -1
  167. package/dist/components/Badge.mjs.map +0 -1
  168. package/dist/components/Box.mjs +0 -131
  169. package/dist/components/Box.mjs.map +0 -1
  170. package/dist/components/Button.d.mts.map +0 -1
  171. package/dist/components/Button.mjs.map +0 -1
  172. package/dist/components/Checkbox.d.mts.map +0 -1
  173. package/dist/components/Checkbox.mjs.map +0 -1
  174. package/dist/components/Chip.d.mts.map +0 -1
  175. package/dist/components/Chip.mjs.map +0 -1
  176. package/dist/components/HStack.d.mts.map +0 -1
  177. package/dist/components/HStack.mjs.map +0 -1
  178. package/dist/components/Icon.d.mts.map +0 -1
  179. package/dist/components/Icon.mjs.map +0 -1
  180. package/dist/components/IconButton.d.mts.map +0 -1
  181. package/dist/components/IconButton.mjs.map +0 -1
  182. package/dist/components/IconSlot.d.mts.map +0 -1
  183. package/dist/components/IconSlot.mjs.map +0 -1
  184. package/dist/components/Image.d.mts.map +0 -1
  185. package/dist/components/Image.mjs.map +0 -1
  186. package/dist/components/Input.d.mts.map +0 -1
  187. package/dist/components/Input.mjs.map +0 -1
  188. package/dist/components/Link.d.mts.map +0 -1
  189. package/dist/components/Link.mjs.map +0 -1
  190. package/dist/components/Pressable.d.mts.map +0 -1
  191. package/dist/components/Pressable.mjs.map +0 -1
  192. package/dist/components/Radio.d.mts.map +0 -1
  193. package/dist/components/Radio.mjs.map +0 -1
  194. package/dist/components/Screen.d.mts.map +0 -1
  195. package/dist/components/Screen.mjs.map +0 -1
  196. package/dist/components/Switch.d.mts.map +0 -1
  197. package/dist/components/Switch.mjs.map +0 -1
  198. package/dist/components/Text.d.mts.map +0 -1
  199. package/dist/components/Text.mjs.map +0 -1
  200. package/dist/components/VStack.d.mts.map +0 -1
  201. package/dist/components/VStack.mjs.map +0 -1
  202. package/dist/motion-tokens/dist/index.d.mts.map +0 -1
  203. package/dist/motion-tokens/dist/index.mjs.map +0 -1
  204. package/dist/motion.d.mts.map +0 -1
  205. package/dist/motion.mjs.map +0 -1
  206. package/dist/types/dist/index.d.mts.map +0 -1
  207. package/dist/types.d.mts.map +0 -1
@@ -0,0 +1,249 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
3
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
4
+ let react = require("react");
5
+ react = require_runtime.__toESM(react);
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+
8
+ //#region src/jest/mocks/reanimated.tsx
9
+ var reanimated_exports = /* @__PURE__ */ require_runtime.__exportAll({
10
+ Animated: () => Animated,
11
+ Easing: () => Easing,
12
+ FadeIn: () => FadeIn,
13
+ FadeOut: () => FadeOut,
14
+ SlideInRight: () => SlideInRight,
15
+ SlideOutLeft: () => SlideOutLeft,
16
+ ZoomIn: () => ZoomIn,
17
+ ZoomOut: () => ZoomOut,
18
+ cancelAnimation: () => cancelAnimation,
19
+ convertToRGBA: () => convertToRGBA,
20
+ createAnimatedComponent: () => createAnimatedComponent,
21
+ default: () => Animated,
22
+ interpolate: () => interpolate,
23
+ interpolateColor: () => interpolateColor,
24
+ isWorklet: () => isWorklet,
25
+ measure: () => measure,
26
+ runOnJS: () => runOnJS,
27
+ runOnUI: () => runOnUI,
28
+ scrollTo: () => scrollTo,
29
+ useAnimatedGestureHandler: () => useAnimatedGestureHandler,
30
+ useAnimatedProps: () => useAnimatedProps,
31
+ useAnimatedReaction: () => useAnimatedReaction,
32
+ useAnimatedRef: () => useAnimatedRef,
33
+ useAnimatedScrollHandler: () => useAnimatedScrollHandler,
34
+ useAnimatedStyle: () => useAnimatedStyle,
35
+ useDerivedValue: () => useDerivedValue,
36
+ useSharedValue: () => useSharedValue,
37
+ withDecay: () => withDecay,
38
+ withDelay: () => withDelay,
39
+ withRepeat: () => withRepeat,
40
+ withSequence: () => withSequence,
41
+ withSpring: () => withSpring,
42
+ withTiming: () => withTiming
43
+ });
44
+ function useSharedValue(initialValue) {
45
+ return {
46
+ value: initialValue,
47
+ addListener: jest.fn(),
48
+ removeListener: jest.fn(),
49
+ modify: jest.fn()
50
+ };
51
+ }
52
+ function useDerivedValue(derivedFn) {
53
+ try {
54
+ return { value: derivedFn() };
55
+ } catch {
56
+ return { value: void 0 };
57
+ }
58
+ }
59
+ function useAnimatedStyle(styleWorklet) {
60
+ try {
61
+ return styleWorklet();
62
+ } catch {
63
+ return {};
64
+ }
65
+ }
66
+ function withTiming(toValue) {
67
+ return toValue;
68
+ }
69
+ function withSpring(toValue) {
70
+ return toValue;
71
+ }
72
+ function withDelay(_delay, animation) {
73
+ return animation;
74
+ }
75
+ function withSequence(...animations) {
76
+ return animations[animations.length - 1];
77
+ }
78
+ function withRepeat(animation) {
79
+ return animation;
80
+ }
81
+ function withDecay(config) {
82
+ return config.velocity ?? 0;
83
+ }
84
+ function interpolate(value, inputRange, outputRange, _extrapolation) {
85
+ if (value <= inputRange[0]) return outputRange[0];
86
+ if (value >= inputRange[inputRange.length - 1]) return outputRange[outputRange.length - 1];
87
+ for (let i = 0; i < inputRange.length - 1; i++) if (value >= inputRange[i] && value <= inputRange[i + 1]) {
88
+ const progress = (value - inputRange[i]) / (inputRange[i + 1] - inputRange[i]);
89
+ return outputRange[i] + progress * (outputRange[i + 1] - outputRange[i]);
90
+ }
91
+ return outputRange[outputRange.length - 1];
92
+ }
93
+ function interpolateColor(value, inputRange, outputRange) {
94
+ if (value <= inputRange[0]) return outputRange[0];
95
+ if (value >= inputRange[inputRange.length - 1]) return outputRange[outputRange.length - 1];
96
+ const index = Math.round((value - inputRange[0]) / (inputRange[inputRange.length - 1] - inputRange[0]) * (outputRange.length - 1));
97
+ return outputRange[Math.min(index, outputRange.length - 1)];
98
+ }
99
+ const Easing = {
100
+ linear: (t) => t,
101
+ ease: (t) => t,
102
+ quad: (t) => t * t,
103
+ cubic: (t) => t * t * t,
104
+ poly: (_n) => (t) => t,
105
+ sin: (t) => t,
106
+ circle: (t) => t,
107
+ exp: (t) => t,
108
+ elastic: (_bounciness) => (t) => t,
109
+ back: (_s) => (t) => t,
110
+ bounce: (t) => t,
111
+ bezier: () => (t) => t,
112
+ bezierFn: () => (t) => t,
113
+ in: (easing) => easing,
114
+ out: (easing) => easing,
115
+ inOut: (easing) => easing
116
+ };
117
+ function useAnimatedGestureHandler() {
118
+ return {};
119
+ }
120
+ function useAnimatedScrollHandler() {
121
+ return {};
122
+ }
123
+ function useAnimatedProps(propsWorklet) {
124
+ try {
125
+ return propsWorklet();
126
+ } catch {
127
+ return {};
128
+ }
129
+ }
130
+ function useAnimatedRef() {
131
+ return { current: null };
132
+ }
133
+ function useAnimatedReaction() {}
134
+ function MockView({ children, style, testID, ...props }) {
135
+ return react.default.createElement("View", {
136
+ style,
137
+ testID,
138
+ ...props
139
+ }, children);
140
+ }
141
+ function MockText({ children, style, testID, ...props }) {
142
+ return react.default.createElement("Text", {
143
+ style,
144
+ testID,
145
+ ...props
146
+ }, children);
147
+ }
148
+ function MockScrollView({ children, style, testID, ...props }) {
149
+ return react.default.createElement("ScrollView", {
150
+ style,
151
+ testID,
152
+ ...props
153
+ }, children);
154
+ }
155
+ function MockImage({ style, testID = "AnimatedImage", ...props }) {
156
+ return react.default.createElement("Image", {
157
+ style,
158
+ testID,
159
+ ...props
160
+ });
161
+ }
162
+ function createAnimatedComponent(Component) {
163
+ function AnimatedComponent({ children, style, ...props }) {
164
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
165
+ style: Array.isArray(style) ? Object.assign({}, ...style) : style,
166
+ ...props,
167
+ children
168
+ });
169
+ }
170
+ AnimatedComponent.displayName = `Animated(${Component.displayName || Component.name || "Component"})`;
171
+ return AnimatedComponent;
172
+ }
173
+ const Animated = {
174
+ View: MockView,
175
+ Text: MockText,
176
+ Image: MockImage,
177
+ ScrollView: MockScrollView,
178
+ createAnimatedComponent
179
+ };
180
+ const FadeIn = { duration: jest.fn().mockReturnThis() };
181
+ const FadeOut = { duration: jest.fn().mockReturnThis() };
182
+ const SlideInRight = { duration: jest.fn().mockReturnThis() };
183
+ const SlideOutLeft = { duration: jest.fn().mockReturnThis() };
184
+ const ZoomIn = { duration: jest.fn().mockReturnThis() };
185
+ const ZoomOut = { duration: jest.fn().mockReturnThis() };
186
+ function convertToRGBA(color) {
187
+ if (typeof color === "string") return color;
188
+ return `rgba(${color >> 16 & 255}, ${color >> 8 & 255}, ${color & 255}, 1)`;
189
+ }
190
+ function runOnJS(fn) {
191
+ return fn;
192
+ }
193
+ function runOnUI(fn) {
194
+ return fn;
195
+ }
196
+ function isWorklet() {
197
+ return false;
198
+ }
199
+ const cancelAnimation = jest.fn();
200
+ const measure = jest.fn(() => ({
201
+ x: 0,
202
+ y: 0,
203
+ width: 100,
204
+ height: 100,
205
+ pageX: 0,
206
+ pageY: 0
207
+ }));
208
+ const scrollTo = jest.fn();
209
+
210
+ //#endregion
211
+ exports.Animated = Animated;
212
+ exports.default = Animated;
213
+ exports.Easing = Easing;
214
+ exports.FadeIn = FadeIn;
215
+ exports.FadeOut = FadeOut;
216
+ exports.SlideInRight = SlideInRight;
217
+ exports.SlideOutLeft = SlideOutLeft;
218
+ exports.ZoomIn = ZoomIn;
219
+ exports.ZoomOut = ZoomOut;
220
+ exports.cancelAnimation = cancelAnimation;
221
+ exports.convertToRGBA = convertToRGBA;
222
+ exports.createAnimatedComponent = createAnimatedComponent;
223
+ exports.interpolate = interpolate;
224
+ exports.interpolateColor = interpolateColor;
225
+ exports.isWorklet = isWorklet;
226
+ exports.measure = measure;
227
+ Object.defineProperty(exports, 'reanimated_exports', {
228
+ enumerable: true,
229
+ get: function () {
230
+ return reanimated_exports;
231
+ }
232
+ });
233
+ exports.runOnJS = runOnJS;
234
+ exports.runOnUI = runOnUI;
235
+ exports.scrollTo = scrollTo;
236
+ exports.useAnimatedGestureHandler = useAnimatedGestureHandler;
237
+ exports.useAnimatedProps = useAnimatedProps;
238
+ exports.useAnimatedReaction = useAnimatedReaction;
239
+ exports.useAnimatedRef = useAnimatedRef;
240
+ exports.useAnimatedScrollHandler = useAnimatedScrollHandler;
241
+ exports.useAnimatedStyle = useAnimatedStyle;
242
+ exports.useDerivedValue = useDerivedValue;
243
+ exports.useSharedValue = useSharedValue;
244
+ exports.withDecay = withDecay;
245
+ exports.withDelay = withDelay;
246
+ exports.withRepeat = withRepeat;
247
+ exports.withSequence = withSequence;
248
+ exports.withSpring = withSpring;
249
+ exports.withTiming = withTiming;
@@ -0,0 +1,150 @@
1
+
2
+ import React, { ComponentType, PropsWithChildren, ReactNode } from "react";
3
+
4
+ //#region src/jest/mocks/reanimated.d.ts
5
+ declare namespace reanimated_d_exports {
6
+ export { Animated, Easing, FadeIn, FadeOut, SlideInRight, SlideOutLeft, ZoomIn, ZoomOut, cancelAnimation, convertToRGBA, createAnimatedComponent, Animated as default, interpolate, interpolateColor, isWorklet, measure, runOnJS, runOnUI, scrollTo, useAnimatedGestureHandler, useAnimatedProps, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useAnimatedStyle, useDerivedValue, useSharedValue, withDecay, withDelay, withRepeat, withSequence, withSpring, withTiming };
7
+ }
8
+ declare function useSharedValue<T>(initialValue: T): {
9
+ value: T;
10
+ addListener: jest.Mock<any, any, any>;
11
+ removeListener: jest.Mock<any, any, any>;
12
+ modify: jest.Mock<any, any, any>;
13
+ };
14
+ declare function useDerivedValue<T>(derivedFn: () => T): {
15
+ value: T;
16
+ };
17
+ declare function useAnimatedStyle<T extends object>(styleWorklet: () => T): T;
18
+ declare function withTiming<T>(toValue: T): T;
19
+ declare function withSpring<T>(toValue: T): T;
20
+ declare function withDelay<T>(_delay: number, animation: T): T;
21
+ declare function withSequence<T>(...animations: T[]): T;
22
+ declare function withRepeat<T>(animation: T): T;
23
+ declare function withDecay(config: {
24
+ velocity?: number;
25
+ deceleration?: number;
26
+ }): number;
27
+ declare function interpolate(value: number, inputRange: readonly number[], outputRange: readonly number[], _extrapolation?: 'clamp' | 'extend' | {
28
+ extrapolateLeft?: string;
29
+ extrapolateRight?: string;
30
+ }): number;
31
+ declare function interpolateColor(value: number, inputRange: readonly number[], outputRange: readonly string[]): string;
32
+ declare const Easing: {
33
+ linear: (t: number) => number;
34
+ ease: (t: number) => number;
35
+ quad: (t: number) => number;
36
+ cubic: (t: number) => number;
37
+ poly: (_n: number) => (t: number) => number;
38
+ sin: (t: number) => number;
39
+ circle: (t: number) => number;
40
+ exp: (t: number) => number;
41
+ elastic: (_bounciness?: number) => (t: number) => number;
42
+ back: (_s?: number) => (t: number) => number;
43
+ bounce: (t: number) => number;
44
+ bezier: () => (t: number) => number;
45
+ bezierFn: () => (t: number) => number;
46
+ in: (easing: (t: number) => number) => (t: number) => number;
47
+ out: (easing: (t: number) => number) => (t: number) => number;
48
+ inOut: (easing: (t: number) => number) => (t: number) => number;
49
+ };
50
+ declare function useAnimatedGestureHandler(): Record<string, unknown>;
51
+ declare function useAnimatedScrollHandler(): Record<string, unknown>;
52
+ declare function useAnimatedProps<T extends object>(propsWorklet: () => T): T;
53
+ declare function useAnimatedRef<T>(): {
54
+ current: T | null;
55
+ };
56
+ declare function useAnimatedReaction(): void;
57
+ interface MockViewProps {
58
+ children?: ReactNode;
59
+ style?: object;
60
+ testID?: string;
61
+ [key: string]: unknown;
62
+ }
63
+ declare function MockView({
64
+ children,
65
+ style,
66
+ testID,
67
+ ...props
68
+ }: MockViewProps): React.ReactElement<{
69
+ style: object | undefined;
70
+ testID: string | undefined;
71
+ }, string | React.JSXElementConstructor<any>>;
72
+ declare function MockText({
73
+ children,
74
+ style,
75
+ testID,
76
+ ...props
77
+ }: MockViewProps): React.ReactElement<{
78
+ style: object | undefined;
79
+ testID: string | undefined;
80
+ }, string | React.JSXElementConstructor<any>>;
81
+ declare function MockScrollView({
82
+ children,
83
+ style,
84
+ testID,
85
+ ...props
86
+ }: MockViewProps): React.ReactElement<{
87
+ style: object | undefined;
88
+ testID: string | undefined;
89
+ }, string | React.JSXElementConstructor<any>>;
90
+ declare function MockImage({
91
+ style,
92
+ testID,
93
+ ...props
94
+ }: MockViewProps): React.DOMElement<{
95
+ children?: ReactNode;
96
+ style: object | undefined;
97
+ testID: string;
98
+ }, Element>;
99
+ declare function createAnimatedComponent<T extends ComponentType<object>>(Component: T): {
100
+ ({
101
+ children,
102
+ style,
103
+ ...props
104
+ }: PropsWithChildren<{
105
+ style?: object;
106
+ }>): React.JSX.Element;
107
+ displayName: string;
108
+ };
109
+ declare const Animated: {
110
+ View: typeof MockView;
111
+ Text: typeof MockText;
112
+ Image: typeof MockImage;
113
+ ScrollView: typeof MockScrollView;
114
+ createAnimatedComponent: typeof createAnimatedComponent;
115
+ };
116
+ declare const FadeIn: {
117
+ duration: jest.Mock<any, any, any>;
118
+ };
119
+ declare const FadeOut: {
120
+ duration: jest.Mock<any, any, any>;
121
+ };
122
+ declare const SlideInRight: {
123
+ duration: jest.Mock<any, any, any>;
124
+ };
125
+ declare const SlideOutLeft: {
126
+ duration: jest.Mock<any, any, any>;
127
+ };
128
+ declare const ZoomIn: {
129
+ duration: jest.Mock<any, any, any>;
130
+ };
131
+ declare const ZoomOut: {
132
+ duration: jest.Mock<any, any, any>;
133
+ };
134
+ declare function convertToRGBA(color: string | number): string;
135
+ declare function runOnJS<T extends (...args: unknown[]) => unknown>(fn: T): T;
136
+ declare function runOnUI<T extends (...args: unknown[]) => unknown>(fn: T): T;
137
+ declare function isWorklet(): boolean;
138
+ declare const cancelAnimation: jest.Mock<any, any, any>;
139
+ declare const measure: jest.Mock<{
140
+ x: number;
141
+ y: number;
142
+ width: number;
143
+ height: number;
144
+ pageX: number;
145
+ pageY: number;
146
+ }, [], any>;
147
+ declare const scrollTo: jest.Mock<any, any, any>;
148
+ //#endregion
149
+ export { Animated, Animated as default, Easing, FadeIn, FadeOut, SlideInRight, SlideOutLeft, ZoomIn, ZoomOut, cancelAnimation, convertToRGBA, createAnimatedComponent, interpolate, interpolateColor, isWorklet, measure, reanimated_d_exports, runOnJS, runOnUI, scrollTo, useAnimatedGestureHandler, useAnimatedProps, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useAnimatedStyle, useDerivedValue, useSharedValue, withDecay, withDelay, withRepeat, withSequence, withSpring, withTiming };
150
+ //# sourceMappingURL=reanimated.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reanimated.d.cts","names":[],"sources":["../../../src/jest/mocks/reanimated.tsx"],"mappings":";;;;;;;iBAaS,cAAA,GAAA,CAAkB,YAAA,EAAc,CAAA;;;;;;iBAUhC,eAAA,GAAA,CAAmB,SAAA,QAAiB,CAAA;EAAM,KAAA,EAAO,CAAA;AAAA;AAAA,iBASjD,gBAAA,kBAAA,CAAmC,YAAA,QAAoB,CAAA,GAAI,CAAA;AAAA,iBAS3D,UAAA,GAAA,CAAc,OAAA,EAAS,CAAA,GAAI,CAAA;AAAA,iBAI3B,UAA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A;EAAiB,QAAA;EAAU,KAAA;EAAO,MAAA;EAAA,GAAW;AAAA,GAAS,aAAA,GAAa,KAAA,CAAA,YAAA;;;;iBAInE,SAAA,CAAA;EAAY,KAAA;EAAO,MAAA;EAAA,GAA6B;AAAA,GAAS,aAAA,GAAa,KAAA,CAAA,UAAA;aAnBlE,SAAA;;;;iBAwBJ,uBAAA,WAAkC,aAAA,SAAA,CAAuB,SAAA,EAAW,CAAA;EAAA;;;;KACjB,iBAAA;IAAoB,KAAA;EAAA,KAAiB,KAAA,CAAA,GAAA,CAAA,OAAA;;;cAe3F,QAAA;;;;;;;cASA,MAAA;YAAiD,IAAA,CAAA,IAAA;AAAA;AAAA,cACjD,OAAA;YAAkD,IAAA,CAAA,IAAA;AAAA;AAAA,cAClD,YAAA;YAAuD,IAAA,CAAA,IAAA;AAAA;AAAA,cACvD,YAAA;YAAuD,IAAA,CAAA,IAAA;AAAA;AAAA,cACvD,MAAA;YAAiD,IAAA,CAAA,IAAA;AAAA;AAAA,cACjD,OAAA;YAAkD,IAAA,CAAA,IAAA;AAAA;AAAA,iBAG/C,aAAA,CAAc,KAAA;AAAA,iBAQd,OAAA,eAAsB,IAAA,wBAAA,CAA6B,EAAA,EAAI,CAAA,GAAI,CAAA;AAAA,iBAI3D,OAAA,eAAsB,IAAA,wBAAA,CAA6B,EAAA,EAAI,CAAA,GAAI,CAAA;AAAA,iBAK3D,SAAA,CAAA;AAAA,cAKH,eAAA,EAAe,IAAA,CAAA,IAAA;AAAA,cAGf,OAAA,EAAO,IAAA,CAAA,IAAA;;;;;;;;cAUP,QAAA,EAAQ,IAAA,CAAA,IAAA"}
@@ -0,0 +1,150 @@
1
+
2
+ import React, { ComponentType, PropsWithChildren, ReactNode } from "react";
3
+
4
+ //#region src/jest/mocks/reanimated.d.ts
5
+ declare namespace reanimated_d_exports {
6
+ export { Animated, Easing, FadeIn, FadeOut, SlideInRight, SlideOutLeft, ZoomIn, ZoomOut, cancelAnimation, convertToRGBA, createAnimatedComponent, Animated as default, interpolate, interpolateColor, isWorklet, measure, runOnJS, runOnUI, scrollTo, useAnimatedGestureHandler, useAnimatedProps, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useAnimatedStyle, useDerivedValue, useSharedValue, withDecay, withDelay, withRepeat, withSequence, withSpring, withTiming };
7
+ }
8
+ declare function useSharedValue<T>(initialValue: T): {
9
+ value: T;
10
+ addListener: jest.Mock<any, any, any>;
11
+ removeListener: jest.Mock<any, any, any>;
12
+ modify: jest.Mock<any, any, any>;
13
+ };
14
+ declare function useDerivedValue<T>(derivedFn: () => T): {
15
+ value: T;
16
+ };
17
+ declare function useAnimatedStyle<T extends object>(styleWorklet: () => T): T;
18
+ declare function withTiming<T>(toValue: T): T;
19
+ declare function withSpring<T>(toValue: T): T;
20
+ declare function withDelay<T>(_delay: number, animation: T): T;
21
+ declare function withSequence<T>(...animations: T[]): T;
22
+ declare function withRepeat<T>(animation: T): T;
23
+ declare function withDecay(config: {
24
+ velocity?: number;
25
+ deceleration?: number;
26
+ }): number;
27
+ declare function interpolate(value: number, inputRange: readonly number[], outputRange: readonly number[], _extrapolation?: 'clamp' | 'extend' | {
28
+ extrapolateLeft?: string;
29
+ extrapolateRight?: string;
30
+ }): number;
31
+ declare function interpolateColor(value: number, inputRange: readonly number[], outputRange: readonly string[]): string;
32
+ declare const Easing: {
33
+ linear: (t: number) => number;
34
+ ease: (t: number) => number;
35
+ quad: (t: number) => number;
36
+ cubic: (t: number) => number;
37
+ poly: (_n: number) => (t: number) => number;
38
+ sin: (t: number) => number;
39
+ circle: (t: number) => number;
40
+ exp: (t: number) => number;
41
+ elastic: (_bounciness?: number) => (t: number) => number;
42
+ back: (_s?: number) => (t: number) => number;
43
+ bounce: (t: number) => number;
44
+ bezier: () => (t: number) => number;
45
+ bezierFn: () => (t: number) => number;
46
+ in: (easing: (t: number) => number) => (t: number) => number;
47
+ out: (easing: (t: number) => number) => (t: number) => number;
48
+ inOut: (easing: (t: number) => number) => (t: number) => number;
49
+ };
50
+ declare function useAnimatedGestureHandler(): Record<string, unknown>;
51
+ declare function useAnimatedScrollHandler(): Record<string, unknown>;
52
+ declare function useAnimatedProps<T extends object>(propsWorklet: () => T): T;
53
+ declare function useAnimatedRef<T>(): {
54
+ current: T | null;
55
+ };
56
+ declare function useAnimatedReaction(): void;
57
+ interface MockViewProps {
58
+ children?: ReactNode;
59
+ style?: object;
60
+ testID?: string;
61
+ [key: string]: unknown;
62
+ }
63
+ declare function MockView({
64
+ children,
65
+ style,
66
+ testID,
67
+ ...props
68
+ }: MockViewProps): React.ReactElement<{
69
+ style: object | undefined;
70
+ testID: string | undefined;
71
+ }, string | React.JSXElementConstructor<any>>;
72
+ declare function MockText({
73
+ children,
74
+ style,
75
+ testID,
76
+ ...props
77
+ }: MockViewProps): React.ReactElement<{
78
+ style: object | undefined;
79
+ testID: string | undefined;
80
+ }, string | React.JSXElementConstructor<any>>;
81
+ declare function MockScrollView({
82
+ children,
83
+ style,
84
+ testID,
85
+ ...props
86
+ }: MockViewProps): React.ReactElement<{
87
+ style: object | undefined;
88
+ testID: string | undefined;
89
+ }, string | React.JSXElementConstructor<any>>;
90
+ declare function MockImage({
91
+ style,
92
+ testID,
93
+ ...props
94
+ }: MockViewProps): React.DOMElement<{
95
+ children?: ReactNode;
96
+ style: object | undefined;
97
+ testID: string;
98
+ }, Element>;
99
+ declare function createAnimatedComponent<T extends ComponentType<object>>(Component: T): {
100
+ ({
101
+ children,
102
+ style,
103
+ ...props
104
+ }: PropsWithChildren<{
105
+ style?: object;
106
+ }>): React.JSX.Element;
107
+ displayName: string;
108
+ };
109
+ declare const Animated: {
110
+ View: typeof MockView;
111
+ Text: typeof MockText;
112
+ Image: typeof MockImage;
113
+ ScrollView: typeof MockScrollView;
114
+ createAnimatedComponent: typeof createAnimatedComponent;
115
+ };
116
+ declare const FadeIn: {
117
+ duration: jest.Mock<any, any, any>;
118
+ };
119
+ declare const FadeOut: {
120
+ duration: jest.Mock<any, any, any>;
121
+ };
122
+ declare const SlideInRight: {
123
+ duration: jest.Mock<any, any, any>;
124
+ };
125
+ declare const SlideOutLeft: {
126
+ duration: jest.Mock<any, any, any>;
127
+ };
128
+ declare const ZoomIn: {
129
+ duration: jest.Mock<any, any, any>;
130
+ };
131
+ declare const ZoomOut: {
132
+ duration: jest.Mock<any, any, any>;
133
+ };
134
+ declare function convertToRGBA(color: string | number): string;
135
+ declare function runOnJS<T extends (...args: unknown[]) => unknown>(fn: T): T;
136
+ declare function runOnUI<T extends (...args: unknown[]) => unknown>(fn: T): T;
137
+ declare function isWorklet(): boolean;
138
+ declare const cancelAnimation: jest.Mock<any, any, any>;
139
+ declare const measure: jest.Mock<{
140
+ x: number;
141
+ y: number;
142
+ width: number;
143
+ height: number;
144
+ pageX: number;
145
+ pageY: number;
146
+ }, [], any>;
147
+ declare const scrollTo: jest.Mock<any, any, any>;
148
+ //#endregion
149
+ export { Animated, Animated as default, Easing, FadeIn, FadeOut, SlideInRight, SlideOutLeft, ZoomIn, ZoomOut, cancelAnimation, convertToRGBA, createAnimatedComponent, interpolate, interpolateColor, isWorklet, measure, reanimated_d_exports, runOnJS, runOnUI, scrollTo, useAnimatedGestureHandler, useAnimatedProps, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useAnimatedStyle, useDerivedValue, useSharedValue, withDecay, withDelay, withRepeat, withSequence, withSpring, withTiming };
150
+ //# sourceMappingURL=reanimated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reanimated.d.ts","names":[],"sources":["../../../src/jest/mocks/reanimated.tsx"],"mappings":";;;;;;;iBAaS,cAAA,GAAA,CAAkB,YAAA,EAAc,CAAA;;;;;;iBAUhC,eAAA,GAAA,CAAmB,SAAA,QAAiB,CAAA;EAAM,KAAA,EAAO,CAAA;AAAA;AAAA,iBASjD,gBAAA,kBAAA,CAAmC,YAAA,QAAoB,CAAA,GAAI,CAAA;AAAA,iBAS3D,UAAA,GAAA,CAAc,OAAA,EAAS,CAAA,GAAI,CA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