@yahoo/uds-mobile 2.2.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.
- package/README.md +92 -0
- package/dist/_virtual/_rolldown/runtime.cjs +14 -0
- package/dist/_virtual/_rolldown/runtime.js +19 -0
- package/dist/jest/index.cjs +27 -0
- package/dist/jest/index.d.cts +19 -0
- package/dist/jest/index.d.cts.map +1 -0
- package/dist/jest/index.d.ts +19 -0
- package/dist/jest/index.d.ts.map +1 -0
- package/dist/jest/index.js +25 -0
- package/dist/jest/index.js.map +1 -0
- package/dist/jest/mocks/icons.cjs +56 -0
- package/dist/jest/mocks/icons.d.cts +24 -0
- package/dist/jest/mocks/icons.d.cts.map +1 -0
- package/dist/jest/mocks/icons.d.ts +24 -0
- package/dist/jest/mocks/icons.d.ts.map +1 -0
- package/dist/jest/mocks/icons.js +46 -0
- package/dist/jest/mocks/icons.js.map +1 -0
- package/dist/jest/mocks/react-native.cjs +212 -0
- package/dist/jest/mocks/react-native.d.cts +293 -0
- package/dist/jest/mocks/react-native.d.cts.map +1 -0
- package/dist/jest/mocks/react-native.d.ts +293 -0
- package/dist/jest/mocks/react-native.d.ts.map +1 -0
- package/dist/jest/mocks/react-native.js +180 -0
- package/dist/jest/mocks/react-native.js.map +1 -0
- package/dist/jest/mocks/reanimated.cjs +249 -0
- package/dist/jest/mocks/reanimated.d.cts +150 -0
- package/dist/jest/mocks/reanimated.d.cts.map +1 -0
- package/dist/jest/mocks/reanimated.d.ts +150 -0
- package/dist/jest/mocks/reanimated.d.ts.map +1 -0
- package/dist/jest/mocks/reanimated.js +210 -0
- package/dist/jest/mocks/reanimated.js.map +1 -0
- package/dist/jest/mocks/styles.cjs +327 -0
- package/dist/jest/mocks/styles.d.cts +33 -0
- package/dist/jest/mocks/styles.d.cts.map +1 -0
- package/dist/jest/mocks/styles.d.ts +33 -0
- package/dist/jest/mocks/styles.d.ts.map +1 -0
- package/dist/jest/mocks/styles.js +310 -0
- package/dist/jest/mocks/styles.js.map +1 -0
- package/dist/jest/mocks/svg.cjs +133 -0
- package/dist/jest/mocks/svg.d.cts +137 -0
- package/dist/jest/mocks/svg.d.cts.map +1 -0
- package/dist/jest/mocks/svg.d.ts +137 -0
- package/dist/jest/mocks/svg.d.ts.map +1 -0
- package/dist/jest/mocks/svg.js +100 -0
- package/dist/jest/mocks/svg.js.map +1 -0
- package/dist/jest/mocks/unistyles.cjs +143 -0
- package/dist/jest/mocks/unistyles.d.cts +197 -0
- package/dist/jest/mocks/unistyles.d.cts.map +1 -0
- package/dist/jest/mocks/unistyles.d.ts +197 -0
- package/dist/jest/mocks/unistyles.d.ts.map +1 -0
- package/dist/jest/mocks/unistyles.js +132 -0
- package/dist/jest/mocks/unistyles.js.map +1 -0
- package/dist/jest/setup.cjs +40 -0
- package/dist/jest/setup.d.cts +11 -0
- package/dist/jest/setup.d.cts.map +1 -0
- package/dist/jest/setup.d.ts +11 -0
- package/dist/jest/setup.d.ts.map +1 -0
- package/dist/jest/setup.js +39 -0
- package/dist/jest/setup.js.map +1 -0
- package/package.json +11 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/jest/mocks/react-native.tsx
|
|
5
|
+
global.__DEV__ = true;
|
|
6
|
+
function createMockComponent(name) {
|
|
7
|
+
const MockComponent = forwardRef(({ children, ...props }, ref) => {
|
|
8
|
+
return React.createElement(name, {
|
|
9
|
+
...props,
|
|
10
|
+
ref
|
|
11
|
+
}, children);
|
|
12
|
+
});
|
|
13
|
+
MockComponent.displayName = name;
|
|
14
|
+
return MockComponent;
|
|
15
|
+
}
|
|
16
|
+
const View = createMockComponent("View");
|
|
17
|
+
const Text = createMockComponent("Text");
|
|
18
|
+
const Image = createMockComponent("Image");
|
|
19
|
+
const ScrollView = createMockComponent("ScrollView");
|
|
20
|
+
const TextInput = createMockComponent("TextInput");
|
|
21
|
+
const TouchableOpacity = createMockComponent("TouchableOpacity");
|
|
22
|
+
const TouchableHighlight = createMockComponent("TouchableHighlight");
|
|
23
|
+
const TouchableWithoutFeedback = createMockComponent("TouchableWithoutFeedback");
|
|
24
|
+
const Pressable = createMockComponent("Pressable");
|
|
25
|
+
const FlatList = createMockComponent("FlatList");
|
|
26
|
+
const SectionList = createMockComponent("SectionList");
|
|
27
|
+
const ActivityIndicator = createMockComponent("ActivityIndicator");
|
|
28
|
+
const SafeAreaView = createMockComponent("SafeAreaView");
|
|
29
|
+
const Modal = createMockComponent("Modal");
|
|
30
|
+
const Switch = createMockComponent("Switch");
|
|
31
|
+
const RefreshControl = createMockComponent("RefreshControl");
|
|
32
|
+
const KeyboardAvoidingView = createMockComponent("KeyboardAvoidingView");
|
|
33
|
+
const StyleSheet = {
|
|
34
|
+
create: (styles) => styles,
|
|
35
|
+
flatten: (style) => {
|
|
36
|
+
if (Array.isArray(style)) return Object.assign({}, ...style);
|
|
37
|
+
return style || {};
|
|
38
|
+
},
|
|
39
|
+
compose: (style1, style2) => [style1, style2],
|
|
40
|
+
hairlineWidth: 1,
|
|
41
|
+
absoluteFill: {
|
|
42
|
+
position: "absolute",
|
|
43
|
+
left: 0,
|
|
44
|
+
right: 0,
|
|
45
|
+
top: 0,
|
|
46
|
+
bottom: 0
|
|
47
|
+
},
|
|
48
|
+
absoluteFillObject: {
|
|
49
|
+
position: "absolute",
|
|
50
|
+
left: 0,
|
|
51
|
+
right: 0,
|
|
52
|
+
top: 0,
|
|
53
|
+
bottom: 0
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const Platform = {
|
|
57
|
+
OS: "ios",
|
|
58
|
+
Version: 17,
|
|
59
|
+
select: (config) => {
|
|
60
|
+
return config.ios ?? config.default;
|
|
61
|
+
},
|
|
62
|
+
isTV: false,
|
|
63
|
+
isPad: false,
|
|
64
|
+
isVision: false,
|
|
65
|
+
isTesting: true,
|
|
66
|
+
constants: { reactNativeVersion: {
|
|
67
|
+
major: 0,
|
|
68
|
+
minor: 83,
|
|
69
|
+
patch: 0
|
|
70
|
+
} }
|
|
71
|
+
};
|
|
72
|
+
const SCREEN_WIDTH = 375;
|
|
73
|
+
const SCREEN_HEIGHT = 812;
|
|
74
|
+
const Dimensions = {
|
|
75
|
+
get: (_dim) => ({
|
|
76
|
+
width: SCREEN_WIDTH,
|
|
77
|
+
height: SCREEN_HEIGHT,
|
|
78
|
+
scale: 2,
|
|
79
|
+
fontScale: 1
|
|
80
|
+
}),
|
|
81
|
+
set: jest.fn(),
|
|
82
|
+
addEventListener: jest.fn(() => ({ remove: jest.fn() })),
|
|
83
|
+
removeEventListener: jest.fn()
|
|
84
|
+
};
|
|
85
|
+
const PixelRatio = {
|
|
86
|
+
get: () => 2,
|
|
87
|
+
getFontScale: () => 1,
|
|
88
|
+
getPixelSizeForLayoutSize: (size) => size * 2,
|
|
89
|
+
roundToNearestPixel: (size) => Math.round(size * 2) / 2
|
|
90
|
+
};
|
|
91
|
+
const Animated = {
|
|
92
|
+
View: createMockComponent("Animated.View"),
|
|
93
|
+
Text: createMockComponent("Animated.Text"),
|
|
94
|
+
Image: createMockComponent("Animated.Image"),
|
|
95
|
+
ScrollView: createMockComponent("Animated.ScrollView"),
|
|
96
|
+
Value: class {
|
|
97
|
+
_value;
|
|
98
|
+
constructor(value) {
|
|
99
|
+
this._value = value;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
timing: jest.fn(() => ({ start: jest.fn() })),
|
|
103
|
+
spring: jest.fn(() => ({ start: jest.fn() })),
|
|
104
|
+
createAnimatedComponent: (Component) => Component
|
|
105
|
+
};
|
|
106
|
+
const Keyboard = {
|
|
107
|
+
dismiss: jest.fn(),
|
|
108
|
+
addListener: jest.fn(() => ({ remove: jest.fn() })),
|
|
109
|
+
removeListener: jest.fn(),
|
|
110
|
+
isVisible: jest.fn(() => false)
|
|
111
|
+
};
|
|
112
|
+
const Linking = {
|
|
113
|
+
openURL: jest.fn().mockResolvedValue(true),
|
|
114
|
+
canOpenURL: jest.fn().mockResolvedValue(true),
|
|
115
|
+
getInitialURL: jest.fn().mockResolvedValue(null),
|
|
116
|
+
addEventListener: jest.fn(() => ({ remove: jest.fn() }))
|
|
117
|
+
};
|
|
118
|
+
const AppState = {
|
|
119
|
+
currentState: "active",
|
|
120
|
+
addEventListener: jest.fn(() => ({ remove: jest.fn() })),
|
|
121
|
+
removeEventListener: jest.fn()
|
|
122
|
+
};
|
|
123
|
+
const AccessibilityInfo = {
|
|
124
|
+
isReduceMotionEnabled: jest.fn().mockResolvedValue(false),
|
|
125
|
+
isScreenReaderEnabled: jest.fn().mockResolvedValue(false),
|
|
126
|
+
addEventListener: jest.fn(() => ({ remove: jest.fn() }))
|
|
127
|
+
};
|
|
128
|
+
var NativeEventEmitter = class {
|
|
129
|
+
addListener = jest.fn(() => ({ remove: jest.fn() }));
|
|
130
|
+
removeListener = jest.fn();
|
|
131
|
+
removeAllListeners = jest.fn();
|
|
132
|
+
};
|
|
133
|
+
const Appearance = {
|
|
134
|
+
getColorScheme: () => "light",
|
|
135
|
+
addChangeListener: jest.fn(() => ({ remove: jest.fn() })),
|
|
136
|
+
removeChangeListener: jest.fn()
|
|
137
|
+
};
|
|
138
|
+
const useColorScheme = () => "light";
|
|
139
|
+
const useWindowDimensions = () => ({
|
|
140
|
+
width: SCREEN_WIDTH,
|
|
141
|
+
height: SCREEN_HEIGHT,
|
|
142
|
+
scale: 2,
|
|
143
|
+
fontScale: 1
|
|
144
|
+
});
|
|
145
|
+
const ReactNative = {
|
|
146
|
+
View,
|
|
147
|
+
Text,
|
|
148
|
+
Image,
|
|
149
|
+
ScrollView,
|
|
150
|
+
TextInput,
|
|
151
|
+
TouchableOpacity,
|
|
152
|
+
TouchableHighlight,
|
|
153
|
+
TouchableWithoutFeedback,
|
|
154
|
+
Pressable,
|
|
155
|
+
FlatList,
|
|
156
|
+
SectionList,
|
|
157
|
+
ActivityIndicator,
|
|
158
|
+
SafeAreaView,
|
|
159
|
+
Modal,
|
|
160
|
+
Switch,
|
|
161
|
+
RefreshControl,
|
|
162
|
+
KeyboardAvoidingView,
|
|
163
|
+
StyleSheet,
|
|
164
|
+
Platform,
|
|
165
|
+
Dimensions,
|
|
166
|
+
PixelRatio,
|
|
167
|
+
Animated,
|
|
168
|
+
Keyboard,
|
|
169
|
+
Linking,
|
|
170
|
+
AppState,
|
|
171
|
+
AccessibilityInfo,
|
|
172
|
+
NativeEventEmitter,
|
|
173
|
+
Appearance,
|
|
174
|
+
useColorScheme,
|
|
175
|
+
useWindowDimensions
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
//#endregion
|
|
179
|
+
export { AccessibilityInfo, ActivityIndicator, Animated, AppState, Appearance, Dimensions, FlatList, Image, Keyboard, KeyboardAvoidingView, Linking, Modal, NativeEventEmitter, PixelRatio, Platform, Pressable, RefreshControl, SafeAreaView, ScrollView, SectionList, StyleSheet, Switch, Text, TextInput, TouchableHighlight, TouchableOpacity, TouchableWithoutFeedback, View, ReactNative as default, useColorScheme, useWindowDimensions };
|
|
180
|
+
//# sourceMappingURL=react-native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-native.js","names":[],"sources":["../../../src/jest/mocks/react-native.tsx"],"sourcesContent":["/**\n * Jest mock for react-native core components.\n *\n * Provides simple mock implementations for React Native components\n * that work in a Jest environment without native modules.\n */\n\n/// <reference types=\"jest\" />\n\nimport type { ReactNode } from 'react';\nimport React, { forwardRef } from 'react';\n\n// Set up React Native globals\ndeclare const global: { __DEV__?: boolean };\nglobal.__DEV__ = true;\n\ninterface MockComponentProps {\n children?: ReactNode;\n style?: object;\n testID?: string;\n accessibilityRole?: string;\n accessibilityLabel?: string;\n [key: string]: unknown;\n}\n\n// Create a simple mock component factory\nfunction createMockComponent(name: string) {\n const MockComponent = forwardRef<unknown, MockComponentProps>(({ children, ...props }, ref) => {\n return React.createElement(name, { ...props, ref }, children as ReactNode);\n });\n MockComponent.displayName = name;\n return MockComponent;\n}\n\n// Component mocks\nconst View = createMockComponent('View');\nconst Text = createMockComponent('Text');\nconst Image = createMockComponent('Image');\nconst ScrollView = createMockComponent('ScrollView');\nconst TextInput = createMockComponent('TextInput');\nconst TouchableOpacity = createMockComponent('TouchableOpacity');\nconst TouchableHighlight = createMockComponent('TouchableHighlight');\nconst TouchableWithoutFeedback = createMockComponent('TouchableWithoutFeedback');\nconst Pressable = createMockComponent('Pressable');\nconst FlatList = createMockComponent('FlatList');\nconst SectionList = createMockComponent('SectionList');\nconst ActivityIndicator = createMockComponent('ActivityIndicator');\nconst SafeAreaView = createMockComponent('SafeAreaView');\nconst Modal = createMockComponent('Modal');\nconst Switch = createMockComponent('Switch');\nconst RefreshControl = createMockComponent('RefreshControl');\nconst KeyboardAvoidingView = createMockComponent('KeyboardAvoidingView');\n\n// StyleSheet mock\nconst StyleSheet = {\n create: <T extends Record<string, object>>(styles: T): T => styles,\n flatten: (style: object | object[]): object => {\n if (Array.isArray(style)) {\n return Object.assign({}, ...style);\n }\n return style || {};\n },\n compose: (style1: object, style2: object): object[] => [style1, style2],\n hairlineWidth: 1,\n absoluteFill: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0 },\n absoluteFillObject: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0 },\n};\n\n// Platform mock\nconst Platform = {\n OS: 'ios' as const,\n Version: 17,\n select: <T extends Record<string, unknown>>(config: T): T[keyof T] | undefined => {\n return (config.ios ?? config.default) as T[keyof T] | undefined;\n },\n isTV: false,\n isPad: false,\n isVision: false,\n isTesting: true,\n constants: {\n reactNativeVersion: { major: 0, minor: 83, patch: 0 },\n },\n};\n\n// Dimensions mock\nconst SCREEN_WIDTH = 375;\nconst SCREEN_HEIGHT = 812;\n\nconst Dimensions = {\n get: (_dim: 'window' | 'screen') => ({\n width: SCREEN_WIDTH,\n height: SCREEN_HEIGHT,\n scale: 2,\n fontScale: 1,\n }),\n set: jest.fn(),\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n removeEventListener: jest.fn(),\n};\n\n// PixelRatio mock\nconst PixelRatio = {\n get: () => 2,\n getFontScale: () => 1,\n getPixelSizeForLayoutSize: (size: number) => size * 2,\n roundToNearestPixel: (size: number) => Math.round(size * 2) / 2,\n};\n\n// Animated mock (basic - reanimated provides more complete implementation)\nconst Animated = {\n View: createMockComponent('Animated.View'),\n Text: createMockComponent('Animated.Text'),\n Image: createMockComponent('Animated.Image'),\n ScrollView: createMockComponent('Animated.ScrollView'),\n Value: class {\n _value: number;\n constructor(value: number) {\n this._value = value;\n }\n },\n timing: jest.fn(() => ({ start: jest.fn() })),\n spring: jest.fn(() => ({ start: jest.fn() })),\n createAnimatedComponent: (Component: React.ComponentType) => Component,\n};\n\n// Keyboard mock\nconst Keyboard = {\n dismiss: jest.fn(),\n addListener: jest.fn(() => ({ remove: jest.fn() })),\n removeListener: jest.fn(),\n isVisible: jest.fn(() => false),\n};\n\n// Linking mock\nconst Linking = {\n openURL: jest.fn().mockResolvedValue(true),\n canOpenURL: jest.fn().mockResolvedValue(true),\n getInitialURL: jest.fn().mockResolvedValue(null),\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n};\n\n// AppState mock\nconst AppState = {\n currentState: 'active',\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n removeEventListener: jest.fn(),\n};\n\n// AccessibilityInfo mock\nconst AccessibilityInfo = {\n isReduceMotionEnabled: jest.fn().mockResolvedValue(false),\n isScreenReaderEnabled: jest.fn().mockResolvedValue(false),\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n};\n\n// NativeEventEmitter mock\nclass NativeEventEmitter {\n addListener = jest.fn(() => ({ remove: jest.fn() }));\n removeListener = jest.fn();\n removeAllListeners = jest.fn();\n}\n\n// Appearance mock\nconst Appearance = {\n getColorScheme: () => 'light' as const,\n addChangeListener: jest.fn(() => ({ remove: jest.fn() })),\n removeChangeListener: jest.fn(),\n};\n\n// useColorScheme hook mock\nconst useColorScheme = () => 'light' as const;\n\n// useWindowDimensions hook mock\nconst useWindowDimensions = () => ({\n width: SCREEN_WIDTH,\n height: SCREEN_HEIGHT,\n scale: 2,\n fontScale: 1,\n});\n\n// Default export for compatibility\nconst ReactNative = {\n View,\n Text,\n Image,\n ScrollView,\n TextInput,\n TouchableOpacity,\n TouchableHighlight,\n TouchableWithoutFeedback,\n Pressable,\n FlatList,\n SectionList,\n ActivityIndicator,\n SafeAreaView,\n Modal,\n Switch,\n RefreshControl,\n KeyboardAvoidingView,\n StyleSheet,\n Platform,\n Dimensions,\n PixelRatio,\n Animated,\n Keyboard,\n Linking,\n AppState,\n AccessibilityInfo,\n NativeEventEmitter,\n Appearance,\n useColorScheme,\n useWindowDimensions,\n};\n\n// Named exports\nexport {\n AccessibilityInfo,\n ActivityIndicator,\n Animated,\n Appearance,\n AppState,\n Dimensions,\n FlatList,\n Image,\n Keyboard,\n KeyboardAvoidingView,\n Linking,\n Modal,\n NativeEventEmitter,\n PixelRatio,\n Platform,\n Pressable,\n RefreshControl,\n SafeAreaView,\n ScrollView,\n SectionList,\n StyleSheet,\n Switch,\n Text,\n TextInput,\n TouchableHighlight,\n TouchableOpacity,\n TouchableWithoutFeedback,\n useColorScheme,\n useWindowDimensions,\n View,\n};\n\nexport default ReactNative;\n"],"mappings":";;;;AAcA,OAAO,UAAU;AAYjB,SAAS,oBAAoB,MAAc;CACzC,MAAM,gBAAgB,YAAyC,EAAE,UAAU,GAAG,SAAS,QAAQ;AAC7F,SAAO,MAAM,cAAc,MAAM;GAAE,GAAG;GAAO;GAAK,EAAE,SAAsB;GAC1E;AACF,eAAc,cAAc;AAC5B,QAAO;;AAIT,MAAM,OAAO,oBAAoB,OAAO;AACxC,MAAM,OAAO,oBAAoB,OAAO;AACxC,MAAM,QAAQ,oBAAoB,QAAQ;AAC1C,MAAM,aAAa,oBAAoB,aAAa;AACpD,MAAM,YAAY,oBAAoB,YAAY;AAClD,MAAM,mBAAmB,oBAAoB,m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Ac,KAAK,UAAU,EAAE,QAAQ,KAAK,IAAI,EAAE,EAAE;CACpD,iBAAiB,KAAK,IAAI;CAC1B,qBAAqB,KAAK,IAAI;;AAIhC,MAAM,aAAa;CACjB,sBAAsB;CACtB,mBAAmB,KAAK,UAAU,EAAE,QAAQ,KAAK,IAAI,EAAE,EAAE;CACzD,sBAAsB,KAAK,IAAI;CAChC;AAGD,MAAM,uBAAuB;AAG7B,MAAM,6BAA6B;CACjC,OAAO;CACP,QAAQ;CACR,OAAO;CACP,WAAW;CACZ;AAGD,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -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,CAA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