@tamagui/constants 1.127.0 → 1.127.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/dist/cjs/constants.native.js +3 -1
- package/dist/cjs/constants.native.js.map +2 -2
- package/dist/esm/constants.native.js +4 -2
- package/dist/esm/constants.native.js.map +1 -1
- package/package.json +2 -2
- package/src/constants.native.ts +4 -0
- package/types/constants.native.d.ts +1 -0
- package/types/constants.native.d.ts.map +3 -2
|
@@ -15,6 +15,7 @@ var __export = (target, all) => {
|
|
|
15
15
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
16
|
var constants_native_exports = {};
|
|
17
17
|
__export(constants_native_exports, {
|
|
18
|
+
IS_REACT_19: () => IS_REACT_19,
|
|
18
19
|
currentPlatform: () => currentPlatform,
|
|
19
20
|
isAndroid: () => isAndroid,
|
|
20
21
|
isChrome: () => isChrome,
|
|
@@ -28,12 +29,13 @@ __export(constants_native_exports, {
|
|
|
28
29
|
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
29
30
|
});
|
|
30
31
|
module.exports = __toCommonJS(constants_native_exports);
|
|
31
|
-
var import_react = require("react"), import_react_native = require("react-native"), isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect = import_react.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = import_react_native.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
|
|
32
|
+
var import_react = require("react"), import_react2 = require("react"), import_react_native = require("react-native"), IS_REACT_19 = !!import_react2.use, isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect = import_react.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = import_react_native.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
|
|
32
33
|
ios: "ios",
|
|
33
34
|
android: "android"
|
|
34
35
|
}, currentPlatform = platforms[import_react_native.Platform.OS] || "native";
|
|
35
36
|
// Annotate the CommonJS export names for ESM import in node:
|
|
36
37
|
0 && (module.exports = {
|
|
38
|
+
IS_REACT_19,
|
|
37
39
|
currentPlatform,
|
|
38
40
|
isAndroid,
|
|
39
41
|
isChrome,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants.native.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA
|
|
5
|
-
"names": ["isWeb", "isWindowDefined", "isServer", "isClient", "useIsomorphicLayoutEffect", "useLayoutEffect", "isChrome", "isWebTouchable", "isTouchable", "isAndroid", "Platform", "OS", "process", "env", "TEST_NATIVE_PLATFORM", "isIos", "platforms", "ios", "android", "currentPlatform"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;mBAAgD,kBAEhDA,gBAAoB,kBACpB,sBAAyB,yBAEZC,cAAuB,CAAC,CAACC,mBAEzBC,QAAiB,IACjBC,kBAA2B,IAC3BC,WAAoB,IACpBC,WAAoB,IACpBC,4BAA8CC,8BAC9CC,WAAoB,IACpBC,iBAA0B,IAC1BC,cAAuB,IACvBC,YACXC,6BAASC,OAAO,aAAaC,QAAQC,IAAIC,yBAAyB,WACvDC,QACXL,6BAASC,OAAO,SAASC,QAAQC,IAAIC,yBAAyB,OAE1DE,YAAY;EAAEC,KAAK;EAAOC,SAAS;AAAU,GACtCC,kBACXH,UAAUN,6BAASC,EAAE,KAAK;",
|
|
5
|
+
"names": ["import_react", "IS_REACT_19", "use", "isWeb", "isWindowDefined", "isServer", "isClient", "useIsomorphicLayoutEffect", "useLayoutEffect", "isChrome", "isWebTouchable", "isTouchable", "isAndroid", "Platform", "OS", "process", "env", "TEST_NATIVE_PLATFORM", "isIos", "platforms", "ios", "android", "currentPlatform"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useLayoutEffect } from "react";
|
|
2
|
+
import { use } from "react";
|
|
2
3
|
import { Platform } from "react-native";
|
|
3
|
-
var
|
|
4
|
+
var IS_REACT_19 = !!use,
|
|
5
|
+
isWeb = !1,
|
|
4
6
|
isWindowDefined = !1,
|
|
5
7
|
isServer = !1,
|
|
6
8
|
isClient = !1,
|
|
@@ -15,5 +17,5 @@ var isWeb = !1,
|
|
|
15
17
|
android: "android"
|
|
16
18
|
},
|
|
17
19
|
currentPlatform = platforms[Platform.OS] || "native";
|
|
18
|
-
export { currentPlatform, isAndroid, isChrome, isClient, isIos, isServer, isTouchable, isWeb, isWebTouchable, isWindowDefined, useIsomorphicLayoutEffect };
|
|
20
|
+
export { IS_REACT_19, currentPlatform, isAndroid, isChrome, isClient, isIos, isServer, isTouchable, isWeb, isWebTouchable, isWindowDefined, useIsomorphicLayoutEffect };
|
|
19
21
|
//# sourceMappingURL=constants.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","Platform","isWeb","isWindowDefined","isServer","isClient","useIsomorphicLayoutEffect","isChrome","isWebTouchable","isTouchable","isAndroid","OS","process","env","TEST_NATIVE_PLATFORM","isIos","platforms","ios","android","currentPlatform"],"sources":["../../src/constants.native.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuC;
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","use","Platform","IS_REACT_19","isWeb","isWindowDefined","isServer","isClient","useIsomorphicLayoutEffect","isChrome","isWebTouchable","isTouchable","isAndroid","OS","process","env","TEST_NATIVE_PLATFORM","isIos","platforms","ios","android","currentPlatform"],"sources":["../../src/constants.native.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuC;AAEhD,SAASC,GAAA,QAAW;AACpB,SAASC,QAAA,QAAgB;AAElB,IAAMC,WAAA,GAAuB,CAAC,CAACF,GAAA;EAEzBG,KAAA,GAAiB;EACjBC,eAAA,GAA2B;EAC3BC,QAAA,GAAoB;EACpBC,QAAA,GAAoB;EACpBC,yBAAA,GAA8CR,eAAA;EAC9CS,QAAA,GAAoB;EACpBC,cAAA,GAA0B;EAC1BC,WAAA,GAAuB;EACvBC,SAAA,GACXV,QAAA,CAASW,EAAA,KAAO,aAAaC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;EACvDC,KAAA,GACXf,QAAA,CAASW,EAAA,KAAO,SAASC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;EAE1DE,SAAA,GAAY;IAAEC,GAAA,EAAK;IAAOC,OAAA,EAAS;EAAU;EACtCC,eAAA,GACXH,SAAA,CAAUhB,QAAA,CAASW,EAAE,KAAK","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/constants",
|
|
3
|
-
"version": "1.127.
|
|
3
|
+
"version": "1.127.1",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"clean:build": "tamagui-build clean:build"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@tamagui/build": "1.127.
|
|
21
|
+
"@tamagui/build": "1.127.1",
|
|
22
22
|
"react": "*"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
package/src/constants.native.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { useLayoutEffect, type useEffect } from 'react'
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
import { use } from 'react'
|
|
2
4
|
import { Platform } from 'react-native'
|
|
3
5
|
|
|
6
|
+
export const IS_REACT_19: boolean = !!use
|
|
7
|
+
|
|
4
8
|
export const isWeb: boolean = false
|
|
5
9
|
export const isWindowDefined: boolean = false
|
|
6
10
|
export const isServer: boolean = false
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"mappings": "AAAA,cAA+B,iBAAiB,OAAO;
|
|
2
|
+
"mappings": "AAAA,cAA+B,iBAAiB,OAAO;AAKvD,OAAO,cAAMA;AAEb,OAAO,cAAMC;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC,kCAAkC;AAC/C,OAAO,cAAMC;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;AAEb,OAAO,cAAMC;AAIb,OAAO,cAAMC,iBAAiB,QAAQ,QAAQ,WAAW",
|
|
3
3
|
"names": [
|
|
4
|
+
"IS_REACT_19: boolean",
|
|
4
5
|
"isWeb: boolean",
|
|
5
6
|
"isWindowDefined: boolean",
|
|
6
7
|
"isServer: boolean",
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
"src/constants.native.ts"
|
|
18
19
|
],
|
|
19
20
|
"sourcesContent": [
|
|
20
|
-
"import { useLayoutEffect, type useEffect } from 'react'\nimport { Platform } from 'react-native'\n\nexport const isWeb: boolean = false\nexport const isWindowDefined: boolean = false\nexport const isServer: boolean = false\nexport const isClient: boolean = false\nexport const useIsomorphicLayoutEffect: typeof useEffect = useLayoutEffect\nexport const isChrome: boolean = false\nexport const isWebTouchable: boolean = false\nexport const isTouchable: boolean = true\nexport const isAndroid: boolean =\n Platform.OS === 'android' || process.env.TEST_NATIVE_PLATFORM === 'android'\nexport const isIos: boolean =\n Platform.OS === 'ios' || process.env.TEST_NATIVE_PLATFORM === 'ios'\n\nconst platforms = { ios: 'ios', android: 'android' } as const\nexport const currentPlatform: 'web' | 'ios' | 'native' | 'android' =\n platforms[Platform.OS] || 'native'\n"
|
|
21
|
+
"import { useLayoutEffect, type useEffect } from 'react'\n// @ts-ignore\nimport { use } from 'react'\nimport { Platform } from 'react-native'\n\nexport const IS_REACT_19: boolean = !!use\n\nexport const isWeb: boolean = false\nexport const isWindowDefined: boolean = false\nexport const isServer: boolean = false\nexport const isClient: boolean = false\nexport const useIsomorphicLayoutEffect: typeof useEffect = useLayoutEffect\nexport const isChrome: boolean = false\nexport const isWebTouchable: boolean = false\nexport const isTouchable: boolean = true\nexport const isAndroid: boolean =\n Platform.OS === 'android' || process.env.TEST_NATIVE_PLATFORM === 'android'\nexport const isIos: boolean =\n Platform.OS === 'ios' || process.env.TEST_NATIVE_PLATFORM === 'ios'\n\nconst platforms = { ios: 'ios', android: 'android' } as const\nexport const currentPlatform: 'web' | 'ios' | 'native' | 'android' =\n platforms[Platform.OS] || 'native'\n"
|
|
21
22
|
],
|
|
22
23
|
"version": 3
|
|
23
24
|
}
|