@tamagui/core 1.123.0 → 1.123.2
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/dist/cjs/addNativeValidStyles.native.js +34 -24
- package/dist/cjs/addNativeValidStyles.native.js.map +2 -2
- package/dist/esm/addNativeValidStyles.native.js +31 -14
- package/dist/esm/addNativeValidStyles.native.js.map +2 -2
- package/dist/native.js +48 -17
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +48 -17
- package/dist/test.native.js.map +2 -2
- package/package.json +7 -7
- package/src/addNativeValidStyles.native.ts +29 -6
- package/types/addNativeValidStyles.native.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.123.
|
|
3
|
+
"version": "1.123.2",
|
|
4
4
|
"source": "src/index.tsx",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"native-test.d.ts"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@tamagui/react-native-media-driver": "1.123.
|
|
39
|
-
"@tamagui/react-native-use-pressable": "1.123.
|
|
40
|
-
"@tamagui/react-native-use-responder-events": "1.123.
|
|
41
|
-
"@tamagui/use-event": "1.123.
|
|
42
|
-
"@tamagui/web": "1.123.
|
|
38
|
+
"@tamagui/react-native-media-driver": "1.123.2",
|
|
39
|
+
"@tamagui/react-native-use-pressable": "1.123.2",
|
|
40
|
+
"@tamagui/react-native-use-responder-events": "1.123.2",
|
|
41
|
+
"@tamagui/use-event": "1.123.2",
|
|
42
|
+
"@tamagui/web": "1.123.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@tamagui/build": "1.123.
|
|
45
|
+
"@tamagui/build": "1.123.2",
|
|
46
46
|
"@testing-library/react": "^16.1.0",
|
|
47
47
|
"csstype": "^3.0.10",
|
|
48
48
|
"typescript": "^5.7.2",
|
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
import { validStyles, stylePropsAll } from '@tamagui/helpers'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
function getReactNativeVersion() {
|
|
4
|
+
let version = process.env.REACT_NATIVE_VERSION || ''
|
|
5
|
+
|
|
6
|
+
if (!process.env.REACT_NATIVE_VERSION) {
|
|
7
|
+
try {
|
|
8
|
+
const ReactNativeOfficalVersion =
|
|
9
|
+
require('react-native/Libraries/Core/ReactNativeVersion') as
|
|
10
|
+
| { version: { major: number; minor: number; patch: number } }
|
|
11
|
+
| undefined
|
|
12
|
+
|
|
13
|
+
if (ReactNativeOfficalVersion) {
|
|
14
|
+
const {
|
|
15
|
+
version: { major, minor, patch },
|
|
16
|
+
} = ReactNativeOfficalVersion
|
|
17
|
+
version = `${major}.${minor}.${patch}`
|
|
18
|
+
}
|
|
19
|
+
} catch {
|
|
20
|
+
// can't win them all
|
|
21
|
+
} finally {
|
|
22
|
+
if (!version) {
|
|
23
|
+
version = '0.77'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const [major, minor, patch] = version.split('.')
|
|
29
|
+
return [+major, +minor, +patch] as const
|
|
30
|
+
}
|
|
5
31
|
|
|
6
32
|
// mutate valid style props based on react native version
|
|
7
33
|
|
|
8
34
|
export function addNativeValidStyles() {
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
version: { major, minor },
|
|
12
|
-
} = ReactNativeVersion as { version: { major: number; minor: number; patch: number } }
|
|
35
|
+
const [major, minor] = getReactNativeVersion()
|
|
13
36
|
|
|
14
37
|
if (major === 0 && minor >= 77) {
|
|
15
38
|
const additional = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addNativeValidStyles.native.d.ts","sourceRoot":"","sources":["../src/addNativeValidStyles.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"addNativeValidStyles.native.d.ts","sourceRoot":"","sources":["../src/addNativeValidStyles.native.ts"],"names":[],"mappings":"AAiCA,wBAAgB,oBAAoB,SAgBnC"}
|