@mrmeg/expo-ui 0.24.0 → 0.25.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/CHANGELOG.md +26 -0
- package/LLM_USAGE.md +14 -1
- package/README.md +27 -1
- package/dist/components/Avatar.js +6 -1
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Carousel.js +2 -0
- package/dist/components/Dialog.d.ts +15 -93
- package/dist/components/Dialog.js +5 -0
- package/dist/components/DropdownMenu.d.ts +5 -34
- package/dist/components/DropdownMenu.js +2 -1
- package/dist/components/InputOTP.js +2 -0
- package/dist/components/Popover.d.ts +11 -11
- package/dist/components/Popover.js +3 -2
- package/dist/components/Select.d.ts +12 -20
- package/dist/components/Select.js +2 -1
- package/dist/components/StatusBar.js +2 -6
- package/dist/components/StyledText.context.d.ts +1 -1
- package/dist/components/StyledText.d.ts +6 -2
- package/dist/components/TextInput.d.ts +6 -2
- package/dist/components/Tooltip.d.ts +10 -24
- package/dist/components/Tooltip.js +5 -2
- package/dist/components/keyboardController.d.ts +4 -2
- package/dist/components/keyboardController.js +4 -0
- package/dist/design-system.json +2236 -0
- package/dist/hooks/useTheme.d.ts +11 -3
- package/package.json +11 -8
package/dist/hooks/useTheme.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Colors } from "../constants/colors";
|
|
2
|
-
import {
|
|
2
|
+
import { ImageStyle, TextStyle, ViewStyle } from "react-native";
|
|
3
3
|
import { spacing as spacingConstants } from "../constants/spacing";
|
|
4
4
|
type ShadowType = "base" | "soft" | "sharp" | "subtle" | "elevated" | "glow" | "glass" | "card" | "cardHover" | "cardSubtle";
|
|
5
5
|
interface ExtendedColorScheme {
|
|
@@ -65,10 +65,18 @@ interface StyleContext {
|
|
|
65
65
|
spacing: typeof spacingConstants;
|
|
66
66
|
withAlpha: (color: string, alpha: number) => string;
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Shape a `useStyles` factory must return: named entries, each a single style
|
|
70
|
+
* object. React Native no longer exports this constraint publicly (it dropped
|
|
71
|
+
* `StyleSheet.NamedStyles` in 0.88), so it lives here.
|
|
72
|
+
*/
|
|
73
|
+
type NamedStyles<T> = {
|
|
74
|
+
[K in keyof T]: ViewStyle | TextStyle | ImageStyle;
|
|
75
|
+
};
|
|
68
76
|
/**
|
|
69
77
|
* Return type for useStyles hook
|
|
70
78
|
*/
|
|
71
|
-
type UseStylesReturn<T extends
|
|
79
|
+
type UseStylesReturn<T extends NamedStyles<T>> = {
|
|
72
80
|
styles: T;
|
|
73
81
|
theme: Colors["light" | "dark"];
|
|
74
82
|
spacing: typeof spacingConstants;
|
|
@@ -105,5 +113,5 @@ type UseStylesReturn<T extends StyleSheet.NamedStyles<T>> = {
|
|
|
105
113
|
* }
|
|
106
114
|
* ```
|
|
107
115
|
*/
|
|
108
|
-
export declare function useStyles<T extends
|
|
116
|
+
export declare function useStyles<T extends NamedStyles<T>>(factory: (context: StyleContext) => T): UseStylesReturn<T>;
|
|
109
117
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrmeg/expo-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Reusable Expo and React Native UI primitives for MrMeg projects.",
|
|
6
6
|
"keywords": [
|
|
@@ -78,12 +78,15 @@
|
|
|
78
78
|
"./lib": {
|
|
79
79
|
"types": "./dist/lib/index.d.ts",
|
|
80
80
|
"default": "./dist/lib/index.js"
|
|
81
|
+
},
|
|
82
|
+
"./design-system.json": {
|
|
83
|
+
"default": "./dist/design-system.json"
|
|
81
84
|
}
|
|
82
85
|
},
|
|
83
86
|
"scripts": {
|
|
84
87
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
85
88
|
"test": "jest --config ../../jest.config.js packages/ui/src --runInBand --watchman=false && bun run check:forbidden-imports",
|
|
86
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/fix-package-esm.mjs ui && bun run check:forbidden-imports",
|
|
89
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/fix-package-esm.mjs ui && node ../../scripts/build-design-system-manifest.mjs ui && bun run check:forbidden-imports",
|
|
87
90
|
"check:forbidden-imports": "node ../../scripts/check-ui-forbidden-imports.mjs",
|
|
88
91
|
"publish:dry-run": "bun pm pack --dry-run"
|
|
89
92
|
},
|
|
@@ -110,14 +113,14 @@
|
|
|
110
113
|
"@rn-primitives/tooltip": "~1.5.2"
|
|
111
114
|
},
|
|
112
115
|
"peerDependencies": {
|
|
113
|
-
"@expo/ui": ">=56.0.0 <58.0.0",
|
|
116
|
+
"@expo/ui": ">=56.0.0 <59.0.0 || >=58.0.0-0 <59.0.0",
|
|
114
117
|
"@react-native-async-storage/async-storage": ">=2.2.0 <2.3.0",
|
|
115
|
-
"expo": ">=56.0.0 <58.0.0",
|
|
116
|
-
"expo-font": ">=56.0.0 <58.0.0",
|
|
117
|
-
"expo-haptics": ">=56.0.0 <58.0.0",
|
|
118
|
+
"expo": ">=56.0.0 <59.0.0 || >=58.0.0-0 <59.0.0",
|
|
119
|
+
"expo-font": ">=56.0.0 <59.0.0 || >=58.0.0-0 <59.0.0",
|
|
120
|
+
"expo-haptics": ">=56.0.0 <59.0.0 || >=58.0.0-0 <59.0.0",
|
|
118
121
|
"react": ">=19.2.0 <20.0.0",
|
|
119
|
-
"react-native": ">=0.85.0 <0.
|
|
120
|
-
"react-native-gesture-handler": ">=2.30.0 <
|
|
122
|
+
"react-native": ">=0.85.0 <0.89.0 || >=0.88.0-0 <0.89.0",
|
|
123
|
+
"react-native-gesture-handler": ">=2.30.0 <4.0.0",
|
|
121
124
|
"react-native-keyboard-controller": ">=1.21.0 <2.0.0",
|
|
122
125
|
"react-native-safe-area-context": ">=5.6.0 <6.0.0",
|
|
123
126
|
"react-native-screens": ">=4.23.0 <5.0.0",
|