@marktiderman/genesis-ui-native 3.2.0 → 3.2.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktiderman/genesis-ui-native",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@expo/ui": ">=58.0.0",
|
|
83
83
|
"@gorhom/bottom-sheet": ">=5.0.0",
|
|
84
|
-
"@hookform/resolvers": "^3.0.0 || ^4.0.0 || ^5.0.0",
|
|
85
|
-
"@marktiderman/genesis-core": "^2.2.
|
|
84
|
+
"@hookform/resolvers": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0",
|
|
85
|
+
"@marktiderman/genesis-core": "^2.2.1",
|
|
86
86
|
"@marktiderman/genesis-design-system": "^1.5.1",
|
|
87
87
|
"@react-native-community/datetimepicker": ">=8.0.0",
|
|
88
88
|
"@shopify/flash-list": ">=2.0.0",
|
|
@@ -151,13 +151,13 @@
|
|
|
151
151
|
"devDependencies": {
|
|
152
152
|
"@testing-library/react": "^16.3.2",
|
|
153
153
|
"@types/react": "^19.2.14",
|
|
154
|
-
"@vitest/coverage-v8": "^
|
|
154
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
155
155
|
"happy-dom": "^21.0.4",
|
|
156
156
|
"react": "^19.2.5",
|
|
157
157
|
"react-dom": "^19.2.5",
|
|
158
158
|
"tsup": "^8.3.0",
|
|
159
159
|
"typescript": "~6.0.3",
|
|
160
|
-
"vitest": "^
|
|
160
|
+
"vitest": "^5.0.5"
|
|
161
161
|
},
|
|
162
162
|
"genesis": {
|
|
163
163
|
"doctor": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// GenesisModulesProvider. Each records how Genesis called it, so a test can
|
|
3
3
|
// assert the opt-in path, and renders plain DOM so the tree stays testable.
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import { vi } from "vitest";
|
|
5
|
+
import { type Mock, vi } from "vitest";
|
|
6
6
|
import type {
|
|
7
7
|
GenesisDatePickerProps,
|
|
8
8
|
GenesisGlassModule,
|
|
@@ -14,7 +14,14 @@ import type {
|
|
|
14
14
|
|
|
15
15
|
type AnyProps = Record<string, unknown> & { children?: React.ReactNode; testID?: string };
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
type FakeReanimated = Omit<GenesisReanimatedModule, "useAnimatedStyle" | "withTiming" | "withRepeat" | "cancelAnimation"> & {
|
|
18
|
+
useAnimatedStyle: Mock<(updater: () => Record<string, unknown>) => Record<string, unknown>>;
|
|
19
|
+
withTiming: Mock<(toValue: number) => number>;
|
|
20
|
+
withRepeat: Mock<(animation: number) => number>;
|
|
21
|
+
cancelAnimation: Mock<() => void>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export function fakeReanimated(): FakeReanimated {
|
|
18
25
|
const AnimatedView = React.forwardRef<HTMLDivElement, AnyProps>(function AnimatedView({ children, testID, style, className, accessibilityLabel, accessibilityRole }, ref) {
|
|
19
26
|
return (
|
|
20
27
|
<div
|
|
@@ -40,7 +47,7 @@ export function fakeReanimated() {
|
|
|
40
47
|
Easing: { inOut: (e: unknown) => e, ease: "ease", out: (e: unknown) => e, cubic: "cubic" },
|
|
41
48
|
ReduceMotion: { System: "system", Always: "always", Never: "never" },
|
|
42
49
|
};
|
|
43
|
-
return mod satisfies GenesisReanimatedModule;
|
|
50
|
+
return mod satisfies GenesisReanimatedModule as FakeReanimated;
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
export function fakeGlass({ liquid = true, api = true, throws = false } = {}) {
|