@tamagui/constants 1.122.8 → 1.123.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.cjs +6 -17
- package/dist/cjs/constants.js +4 -12
- package/dist/cjs/constants.js.map +2 -2
- package/dist/cjs/constants.native.js +6 -11
- package/dist/cjs/constants.native.js.map +2 -2
- package/dist/esm/constants.js +2 -2
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/constants.mjs +2 -2
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js +6 -2
- package/dist/esm/constants.native.js.map +2 -2
- package/package.json +2 -2
- package/src/constants.native.ts +11 -5
- package/src/constants.ts +11 -10
- package/types/constants.d.ts +4 -3
- package/types/constants.d.ts.map +23 -1
- package/types/constants.native.d.ts +4 -3
- package/types/constants.native.d.ts.map +23 -1
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +11 -1
- package/dist/cjs/constants.android.js +0 -54
- package/dist/cjs/constants.android.js.map +0 -6
- package/dist/cjs/constants.ios.js +0 -54
- package/dist/cjs/constants.ios.js.map +0 -6
- package/dist/esm/constants.android.js +0 -16
- package/dist/esm/constants.android.js.map +0 -6
- package/dist/esm/constants.ios.js +0 -16
- package/dist/esm/constants.ios.js.map +0 -6
- package/src/constants.android.ts +0 -13
- package/src/constants.ios.ts +0 -13
- package/types/constants.android.d.ts +0 -13
- package/types/constants.android.d.ts.map +0 -1
- package/types/constants.ios.d.ts +0 -13
- package/types/constants.ios.d.ts.map +0 -1
package/dist/cjs/constants.cjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var
|
|
6
|
-
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all) __defProp(target, name, {
|
|
9
7
|
get: all[name],
|
|
@@ -17,18 +15,9 @@ var __export = (target, all) => {
|
|
|
17
15
|
});
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
-
value: mod,
|
|
27
|
-
enumerable: !0
|
|
28
|
-
}) : target, mod)),
|
|
29
|
-
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
-
value: !0
|
|
31
|
-
}), mod);
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
32
21
|
var constants_exports = {};
|
|
33
22
|
__export(constants_exports, {
|
|
34
23
|
currentPlatform: () => currentPlatform,
|
|
@@ -44,12 +33,12 @@ __export(constants_exports, {
|
|
|
44
33
|
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
45
34
|
});
|
|
46
35
|
module.exports = __toCommonJS(constants_exports);
|
|
47
|
-
var import_react =
|
|
36
|
+
var import_react = require("react");
|
|
48
37
|
const isWeb = !0,
|
|
49
38
|
isWindowDefined = typeof window < "u",
|
|
50
39
|
isServer = isWeb && !isWindowDefined,
|
|
51
40
|
isClient = isWeb && isWindowDefined,
|
|
52
|
-
useIsomorphicLayoutEffect = isServer ? import_react.
|
|
41
|
+
useIsomorphicLayoutEffect = isServer ? import_react.useEffect : import_react.useLayoutEffect,
|
|
53
42
|
isChrome = typeof navigator < "u" && /Chrome/.test(navigator.userAgent || ""),
|
|
54
43
|
isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0),
|
|
55
44
|
isTouchable = !isWeb || isWebTouchable,
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
5
|
var __export = (target, all) => {
|
|
7
6
|
for (var name in all)
|
|
8
7
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -12,14 +11,7 @@ var __export = (target, all) => {
|
|
|
12
11
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
12
|
return to;
|
|
14
13
|
};
|
|
15
|
-
var
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
-
mod
|
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
15
|
var constants_exports = {};
|
|
24
16
|
__export(constants_exports, {
|
|
25
17
|
currentPlatform: () => currentPlatform,
|
|
@@ -35,6 +27,6 @@ __export(constants_exports, {
|
|
|
35
27
|
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
36
28
|
});
|
|
37
29
|
module.exports = __toCommonJS(constants_exports);
|
|
38
|
-
var import_react =
|
|
39
|
-
const isWeb = !0, isWindowDefined = typeof window < "u", isServer = isWeb && !isWindowDefined, isClient = isWeb && isWindowDefined, useIsomorphicLayoutEffect = isServer ? import_react.
|
|
30
|
+
var import_react = require("react");
|
|
31
|
+
const isWeb = !0, isWindowDefined = typeof window < "u", isServer = isWeb && !isWindowDefined, isClient = isWeb && isWindowDefined, useIsomorphicLayoutEffect = isServer ? import_react.useEffect : import_react.useLayoutEffect, isChrome = typeof navigator < "u" && /Chrome/.test(navigator.userAgent || ""), isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0), isTouchable = !isWeb || isWebTouchable, isAndroid = !1, isIos = process.env.TEST_NATIVE_PLATFORM === "ios", currentPlatform = "web";
|
|
40
32
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants.ts"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2C;AAEpC,MAAM,QAAiB,IACjB,kBAA2B,OAAO,SAAW,KAC7C,WAAoB,SAAS,CAAC,iBAC9B,WAAoB,SAAS,iBAE7B,4BAA8C,WACvD,yBACA,8BAES,WACX,OAAO,YAAc,OAAe,SAAS,KAAK,UAAU,aAAa,EAAE,GAEhE,iBACX,aAAa,kBAAkB,UAAU,UAAU,iBAAiB,IAEzD,cAAuB,CAAC,SAAS,gBAEjC,YAAqB,IACrB,QAAiB,QAAQ,IAAI,yBAAyB,OACtD,kBAAwD;",
|
|
5
|
+
"names": []
|
|
6
6
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
9
8
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -13,14 +12,7 @@ var __export = (target, all) => {
|
|
|
13
12
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
13
|
return to;
|
|
15
14
|
};
|
|
16
|
-
var
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
-
mod
|
|
23
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
16
|
var constants_native_exports = {};
|
|
25
17
|
__export(constants_native_exports, {
|
|
26
18
|
currentPlatform: () => currentPlatform,
|
|
@@ -36,7 +28,10 @@ __export(constants_native_exports, {
|
|
|
36
28
|
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
37
29
|
});
|
|
38
30
|
module.exports = __toCommonJS(constants_native_exports);
|
|
39
|
-
var import_react =
|
|
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
|
+
ios: "ios",
|
|
33
|
+
android: "android"
|
|
34
|
+
}, currentPlatform = platforms[import_react_native.Platform.OS] || "native";
|
|
40
35
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
36
|
0 && (module.exports = {
|
|
42
37
|
currentPlatform,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/constants/src/constants.native.ts"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["isWeb", "isWindowDefined", "isServer", "isClient", "useIsomorphicLayoutEffect", "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;mBAAgD,kBAChD,sBAAyB,yBAEZA,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": ["isWeb", "isWindowDefined", "isServer", "isClient", "useIsomorphicLayoutEffect", "useLayoutEffect", "isChrome", "isWebTouchable", "isTouchable", "isAndroid", "Platform", "OS", "process", "env", "TEST_NATIVE_PLATFORM", "isIos", "platforms", "ios", "android", "currentPlatform"]
|
|
6
6
|
}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const isWeb = !0, isWindowDefined = typeof window < "u", isServer = isWeb && !isWindowDefined, isClient = isWeb && isWindowDefined, useIsomorphicLayoutEffect = isServer ?
|
|
1
|
+
import { useEffect, useLayoutEffect } from "react";
|
|
2
|
+
const isWeb = !0, isWindowDefined = typeof window < "u", isServer = isWeb && !isWindowDefined, isClient = isWeb && isWindowDefined, useIsomorphicLayoutEffect = isServer ? useEffect : useLayoutEffect, isChrome = typeof navigator < "u" && /Chrome/.test(navigator.userAgent || ""), isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0), isTouchable = !isWeb || isWebTouchable, isAndroid = !1, isIos = process.env.TEST_NATIVE_PLATFORM === "ios", currentPlatform = "web";
|
|
3
3
|
export {
|
|
4
4
|
currentPlatform,
|
|
5
5
|
isAndroid,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": "AAAA,SAAS,WAAW,uBAAuB;AAEpC,MAAM,QAAiB,IACjB,kBAA2B,OAAO,SAAW,KAC7C,WAAoB,SAAS,CAAC,iBAC9B,WAAoB,SAAS,iBAE7B,4BAA8C,WACvD,YACA,iBAES,WACX,OAAO,YAAc,OAAe,SAAS,KAAK,UAAU,aAAa,EAAE,GAEhE,iBACX,aAAa,kBAAkB,UAAU,UAAU,iBAAiB,IAEzD,cAAuB,CAAC,SAAS,gBAEjC,YAAqB,IACrB,QAAiB,QAAQ,IAAI,yBAAyB,OACtD,kBAAwD;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/constants.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useEffect, useLayoutEffect } from "react";
|
|
2
2
|
const isWeb = !0,
|
|
3
3
|
isWindowDefined = typeof window < "u",
|
|
4
4
|
isServer = isWeb && !isWindowDefined,
|
|
5
5
|
isClient = isWeb && isWindowDefined,
|
|
6
|
-
useIsomorphicLayoutEffect = isServer ?
|
|
6
|
+
useIsomorphicLayoutEffect = isServer ? useEffect : useLayoutEffect,
|
|
7
7
|
isChrome = typeof navigator < "u" && /Chrome/.test(navigator.userAgent || ""),
|
|
8
8
|
isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0),
|
|
9
9
|
isTouchable = !isWeb || isWebTouchable,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useEffect","useLayoutEffect","isWeb","isWindowDefined","window","isServer","isClient","useIsomorphicLayoutEffect","isChrome","navigator","test","userAgent","isWebTouchable","maxTouchPoints","isTouchable","isAndroid","isIos","process","env","TEST_NATIVE_PLATFORM","currentPlatform"],"sources":["../../src/constants.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,EAAWC,eAAA,QAAuB;AAEpC,MAAMC,KAAA,GAAiB;EACjBC,eAAA,GAA2B,OAAOC,MAAA,GAAW;EAC7CC,QAAA,GAAoBH,KAAA,IAAS,CAACC,eAAA;EAC9BG,QAAA,GAAoBJ,KAAA,IAASC,eAAA;EAE7BI,yBAAA,GAA8CF,QAAA,GACvDL,SAAA,GACAC,eAAA;EAESO,QAAA,GACX,OAAOC,SAAA,GAAc,OAAe,SAASC,IAAA,CAAKD,SAAA,CAAUE,SAAA,IAAa,EAAE;EAEhEC,cAAA,GACXN,QAAA,KAAa,kBAAkBF,MAAA,IAAUK,SAAA,CAAUI,cAAA,GAAiB;EAEzDC,WAAA,GAAuB,CAACZ,KAAA,IAASU,cAAA;EAEjCG,SAAA,GAAqB;EACrBC,KAAA,GAAiBC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;EACtDC,eAAA,GAAwD","ignoreList":[]}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
import { Platform } from "react-native";
|
|
3
|
+
var isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect = useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
|
|
4
|
+
ios: "ios",
|
|
5
|
+
android: "android"
|
|
6
|
+
}, currentPlatform = platforms[Platform.OS] || "native";
|
|
3
7
|
export {
|
|
4
8
|
currentPlatform,
|
|
5
9
|
isAndroid,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/constants/src/constants.native.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
5
|
-
"names": ["
|
|
4
|
+
"mappings": "AAAA,SAASA,uBAAuC;AAChD,SAASC,gBAAgB;AAElB,IAAMC,QAAiB,IACjBC,kBAA2B,IAC3BC,WAAoB,IACpBC,WAAoB,IACpBC,4BAA8CN,iBAC9CO,WAAoB,IACpBC,iBAA0B,IAC1BC,cAAuB,IACvBC,YACXT,SAASU,OAAO,aAAaC,QAAQC,IAAIC,yBAAyB,WACvDC,QACXd,SAASU,OAAO,SAASC,QAAQC,IAAIC,yBAAyB,OAE1DE,YAAY;EAAEC,KAAK;EAAOC,SAAS;AAAU,GACtCC,kBACXH,UAAUf,SAASU,EAAE,KAAK;",
|
|
5
|
+
"names": ["useLayoutEffect", "Platform", "isWeb", "isWindowDefined", "isServer", "isClient", "useIsomorphicLayoutEffect", "isChrome", "isWebTouchable", "isTouchable", "isAndroid", "OS", "process", "env", "TEST_NATIVE_PLATFORM", "isIos", "platforms", "ios", "android", "currentPlatform"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/constants",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.123.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.
|
|
21
|
+
"@tamagui/build": "1.123.1",
|
|
22
22
|
"react": "*"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
package/src/constants.native.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useLayoutEffect, type useEffect } from 'react'
|
|
2
|
+
import { Platform } from 'react-native'
|
|
2
3
|
|
|
3
4
|
export const isWeb: boolean = false
|
|
4
5
|
export const isWindowDefined: boolean = false
|
|
5
6
|
export const isServer: boolean = false
|
|
6
7
|
export const isClient: boolean = false
|
|
7
|
-
export const useIsomorphicLayoutEffect =
|
|
8
|
+
export const useIsomorphicLayoutEffect: typeof useEffect = useLayoutEffect
|
|
8
9
|
export const isChrome: boolean = false
|
|
9
10
|
export const isWebTouchable: boolean = false
|
|
10
11
|
export const isTouchable: boolean = true
|
|
11
|
-
export const isAndroid: boolean =
|
|
12
|
-
|
|
13
|
-
export const
|
|
12
|
+
export const isAndroid: boolean =
|
|
13
|
+
Platform.OS === 'android' || process.env.TEST_NATIVE_PLATFORM === 'android'
|
|
14
|
+
export const isIos: boolean =
|
|
15
|
+
Platform.OS === 'ios' || process.env.TEST_NATIVE_PLATFORM === 'ios'
|
|
16
|
+
|
|
17
|
+
const platforms = { ios: 'ios', android: 'android' } as const
|
|
18
|
+
export const currentPlatform: 'web' | 'ios' | 'native' | 'android' =
|
|
19
|
+
platforms[Platform.OS] || 'native'
|
package/src/constants.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useEffect, useLayoutEffect } from 'react'
|
|
2
2
|
|
|
3
3
|
export const isWeb: boolean = true
|
|
4
|
-
export const isWindowDefined = typeof window !== 'undefined'
|
|
5
|
-
export const isServer = isWeb && !isWindowDefined
|
|
6
|
-
export const isClient = isWeb && isWindowDefined
|
|
4
|
+
export const isWindowDefined: boolean = typeof window !== 'undefined'
|
|
5
|
+
export const isServer: boolean = isWeb && !isWindowDefined
|
|
6
|
+
export const isClient: boolean = isWeb && isWindowDefined
|
|
7
7
|
|
|
8
|
-
export const useIsomorphicLayoutEffect = isServer
|
|
9
|
-
?
|
|
10
|
-
:
|
|
11
|
-
|
|
8
|
+
export const useIsomorphicLayoutEffect: typeof useEffect = isServer
|
|
9
|
+
? useEffect
|
|
10
|
+
: useLayoutEffect
|
|
11
|
+
|
|
12
|
+
export const isChrome: boolean =
|
|
12
13
|
typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent || '')
|
|
13
14
|
|
|
14
|
-
export const isWebTouchable =
|
|
15
|
+
export const isWebTouchable: boolean =
|
|
15
16
|
isClient && ('ontouchstart' in window || navigator.maxTouchPoints > 0)
|
|
16
17
|
|
|
17
|
-
export const isTouchable = !isWeb || isWebTouchable
|
|
18
|
+
export const isTouchable: boolean = !isWeb || isWebTouchable
|
|
18
19
|
// set :boolean to avoid inferring type to false
|
|
19
20
|
export const isAndroid: boolean = false
|
|
20
21
|
export const isIos: boolean = process.env.TEST_NATIVE_PLATFORM === 'ios'
|
package/types/constants.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useEffect } from "react";
|
|
2
2
|
export declare const isWeb: boolean;
|
|
3
3
|
export declare const isWindowDefined: boolean;
|
|
4
4
|
export declare const isServer: boolean;
|
|
5
5
|
export declare const isClient: boolean;
|
|
6
|
-
export declare const useIsomorphicLayoutEffect: typeof
|
|
6
|
+
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
7
7
|
export declare const isChrome: boolean;
|
|
8
8
|
export declare const isWebTouchable: boolean;
|
|
9
9
|
export declare const isTouchable: boolean;
|
|
10
10
|
export declare const isAndroid: boolean;
|
|
11
11
|
export declare const isIos: boolean;
|
|
12
|
-
export declare const currentPlatform:
|
|
12
|
+
export declare const currentPlatform: "web" | "ios" | "native" | "android";
|
|
13
|
+
|
|
13
14
|
//# sourceMappingURL=constants.d.ts.map
|
package/types/constants.d.ts.map
CHANGED
|
@@ -1 +1,23 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,SAAS,iBAAkC,OAAO;AAElD,OAAO,cAAMA;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;AAEb,OAAO,cAAMC,kCAAkC;AAI/C,OAAO,cAAMC;AAGb,OAAO,cAAMC;AAGb,OAAO,cAAMC;AAEb,OAAO,cAAMC;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC,iBAAiB,QAAQ,QAAQ,WAAW",
|
|
3
|
+
"names": [
|
|
4
|
+
"isWeb: boolean",
|
|
5
|
+
"isWindowDefined: boolean",
|
|
6
|
+
"isServer: boolean",
|
|
7
|
+
"isClient: boolean",
|
|
8
|
+
"useIsomorphicLayoutEffect: typeof useEffect",
|
|
9
|
+
"isChrome: boolean",
|
|
10
|
+
"isWebTouchable: boolean",
|
|
11
|
+
"isTouchable: boolean",
|
|
12
|
+
"isAndroid: boolean",
|
|
13
|
+
"isIos: boolean",
|
|
14
|
+
"currentPlatform: 'web' | 'ios' | 'native' | 'android'"
|
|
15
|
+
],
|
|
16
|
+
"sources": [
|
|
17
|
+
"src/constants.ts"
|
|
18
|
+
],
|
|
19
|
+
"sourcesContent": [
|
|
20
|
+
"import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb: boolean = true\nexport const isWindowDefined: boolean = typeof window !== 'undefined'\nexport const isServer: boolean = isWeb && !isWindowDefined\nexport const isClient: boolean = isWeb && isWindowDefined\n\nexport const useIsomorphicLayoutEffect: typeof useEffect = isServer\n ? useEffect\n : useLayoutEffect\n\nexport const isChrome: boolean =\n typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent || '')\n\nexport const isWebTouchable: boolean =\n isClient && ('ontouchstart' in window || navigator.maxTouchPoints > 0)\n\nexport const isTouchable: boolean = !isWeb || isWebTouchable\n// set :boolean to avoid inferring type to false\nexport const isAndroid: boolean = false\nexport const isIos: boolean = process.env.TEST_NATIVE_PLATFORM === 'ios'\nexport const currentPlatform: 'web' | 'ios' | 'native' | 'android' = 'web'\n"
|
|
21
|
+
],
|
|
22
|
+
"version": 3
|
|
23
|
+
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type useEffect } from "react";
|
|
2
2
|
export declare const isWeb: boolean;
|
|
3
3
|
export declare const isWindowDefined: boolean;
|
|
4
4
|
export declare const isServer: boolean;
|
|
5
5
|
export declare const isClient: boolean;
|
|
6
|
-
export declare const useIsomorphicLayoutEffect: typeof
|
|
6
|
+
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
7
7
|
export declare const isChrome: boolean;
|
|
8
8
|
export declare const isWebTouchable: boolean;
|
|
9
9
|
export declare const isTouchable: boolean;
|
|
10
10
|
export declare const isAndroid: boolean;
|
|
11
11
|
export declare const isIos: boolean;
|
|
12
|
-
export declare const currentPlatform:
|
|
12
|
+
export declare const currentPlatform: "web" | "ios" | "native" | "android";
|
|
13
|
+
|
|
13
14
|
//# sourceMappingURL=constants.native.d.ts.map
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,cAA+B,iBAAiB,OAAO;AAGvD,OAAO,cAAMA;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
|
+
"names": [
|
|
4
|
+
"isWeb: boolean",
|
|
5
|
+
"isWindowDefined: boolean",
|
|
6
|
+
"isServer: boolean",
|
|
7
|
+
"isClient: boolean",
|
|
8
|
+
"useIsomorphicLayoutEffect: typeof useEffect",
|
|
9
|
+
"isChrome: boolean",
|
|
10
|
+
"isWebTouchable: boolean",
|
|
11
|
+
"isTouchable: boolean",
|
|
12
|
+
"isAndroid: boolean",
|
|
13
|
+
"isIos: boolean",
|
|
14
|
+
"currentPlatform: 'web' | 'ios' | 'native' | 'android'"
|
|
15
|
+
],
|
|
16
|
+
"sources": [
|
|
17
|
+
"src/constants.native.ts"
|
|
18
|
+
],
|
|
19
|
+
"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
|
+
],
|
|
22
|
+
"version": 3
|
|
23
|
+
}
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,cAAc",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/index.ts"
|
|
6
|
+
],
|
|
7
|
+
"sourcesContent": [
|
|
8
|
+
"export * from './constants'\n"
|
|
9
|
+
],
|
|
10
|
+
"version": 3
|
|
11
|
+
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
-
mod
|
|
23
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
-
var constants_android_exports = {};
|
|
25
|
-
__export(constants_android_exports, {
|
|
26
|
-
currentPlatform: () => currentPlatform,
|
|
27
|
-
isAndroid: () => isAndroid,
|
|
28
|
-
isChrome: () => isChrome,
|
|
29
|
-
isClient: () => isClient,
|
|
30
|
-
isIos: () => isIos,
|
|
31
|
-
isServer: () => isServer,
|
|
32
|
-
isTouchable: () => isTouchable,
|
|
33
|
-
isWeb: () => isWeb,
|
|
34
|
-
isWebTouchable: () => isWebTouchable,
|
|
35
|
-
isWindowDefined: () => isWindowDefined,
|
|
36
|
-
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(constants_android_exports);
|
|
39
|
-
var import_react = __toESM(require("react")), isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect = import_react.default.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = !0, isIos = !1, currentPlatform = "android";
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
currentPlatform,
|
|
43
|
-
isAndroid,
|
|
44
|
-
isChrome,
|
|
45
|
-
isClient,
|
|
46
|
-
isIos,
|
|
47
|
-
isServer,
|
|
48
|
-
isTouchable,
|
|
49
|
-
isWeb,
|
|
50
|
-
isWebTouchable,
|
|
51
|
-
isWindowDefined,
|
|
52
|
-
useIsomorphicLayoutEffect
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=constants.android.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Users/n8/tamagui/code/core/constants/src/constants.android.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;mBAAkB,2BAELA,QAAiB,IACjBC,kBAA2B,IAC3BC,WAAoB,IACpBC,WAAoB,IACpBC,4BAA4BC,aAAAA,QAAMC,iBAClCC,WAAoB,IACpBC,iBAA0B,IAC1BC,cAAuB,IACvBC,YAAqB,IACrBC,QAAiB,IACjBC,kBAAwD;",
|
|
5
|
-
"names": ["isWeb", "isWindowDefined", "isServer", "isClient", "useIsomorphicLayoutEffect", "React", "useLayoutEffect", "isChrome", "isWebTouchable", "isTouchable", "isAndroid", "isIos", "currentPlatform"]
|
|
6
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
-
mod
|
|
23
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
-
var constants_ios_exports = {};
|
|
25
|
-
__export(constants_ios_exports, {
|
|
26
|
-
currentPlatform: () => currentPlatform,
|
|
27
|
-
isAndroid: () => isAndroid,
|
|
28
|
-
isChrome: () => isChrome,
|
|
29
|
-
isClient: () => isClient,
|
|
30
|
-
isIos: () => isIos,
|
|
31
|
-
isServer: () => isServer,
|
|
32
|
-
isTouchable: () => isTouchable,
|
|
33
|
-
isWeb: () => isWeb,
|
|
34
|
-
isWebTouchable: () => isWebTouchable,
|
|
35
|
-
isWindowDefined: () => isWindowDefined,
|
|
36
|
-
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(constants_ios_exports);
|
|
39
|
-
var import_react = __toESM(require("react")), isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect = import_react.default.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = !1, isIos = !0, currentPlatform = "ios";
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
currentPlatform,
|
|
43
|
-
isAndroid,
|
|
44
|
-
isChrome,
|
|
45
|
-
isClient,
|
|
46
|
-
isIos,
|
|
47
|
-
isServer,
|
|
48
|
-
isTouchable,
|
|
49
|
-
isWeb,
|
|
50
|
-
isWebTouchable,
|
|
51
|
-
isWindowDefined,
|
|
52
|
-
useIsomorphicLayoutEffect
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=constants.ios.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Users/n8/tamagui/code/core/constants/src/constants.ios.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;mBAAkB,2BAELA,QAAiB,IACjBC,kBAA2B,IAC3BC,WAAoB,IACpBC,WAAoB,IACpBC,4BAA4BC,aAAAA,QAAMC,iBAClCC,WAAoB,IACpBC,iBAA0B,IAC1BC,cAAuB,IACvBC,YAAqB,IACrBC,QAAiB,IACjBC,kBAAwD;",
|
|
5
|
-
"names": ["isWeb", "isWindowDefined", "isServer", "isClient", "useIsomorphicLayoutEffect", "React", "useLayoutEffect", "isChrome", "isWebTouchable", "isTouchable", "isAndroid", "isIos", "currentPlatform"]
|
|
6
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
var isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect = React.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = !0, isIos = !1, currentPlatform = "android";
|
|
3
|
-
export {
|
|
4
|
-
currentPlatform,
|
|
5
|
-
isAndroid,
|
|
6
|
-
isChrome,
|
|
7
|
-
isClient,
|
|
8
|
-
isIos,
|
|
9
|
-
isServer,
|
|
10
|
-
isTouchable,
|
|
11
|
-
isWeb,
|
|
12
|
-
isWebTouchable,
|
|
13
|
-
isWindowDefined,
|
|
14
|
-
useIsomorphicLayoutEffect
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=constants.android.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Users/n8/tamagui/code/core/constants/src/constants.android.ts"],
|
|
4
|
-
"mappings": "AAAA,OAAOA,WAAW;AAEX,IAAMC,QAAiB,IACjBC,kBAA2B,IAC3BC,WAAoB,IACpBC,WAAoB,IACpBC,4BAA4BL,MAAMM,iBAClCC,WAAoB,IACpBC,iBAA0B,IAC1BC,cAAuB,IACvBC,YAAqB,IACrBC,QAAiB,IACjBC,kBAAwD;",
|
|
5
|
-
"names": ["React", "isWeb", "isWindowDefined", "isServer", "isClient", "useIsomorphicLayoutEffect", "useLayoutEffect", "isChrome", "isWebTouchable", "isTouchable", "isAndroid", "isIos", "currentPlatform"]
|
|
6
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
var isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect = React.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = !1, isIos = !0, currentPlatform = "ios";
|
|
3
|
-
export {
|
|
4
|
-
currentPlatform,
|
|
5
|
-
isAndroid,
|
|
6
|
-
isChrome,
|
|
7
|
-
isClient,
|
|
8
|
-
isIos,
|
|
9
|
-
isServer,
|
|
10
|
-
isTouchable,
|
|
11
|
-
isWeb,
|
|
12
|
-
isWebTouchable,
|
|
13
|
-
isWindowDefined,
|
|
14
|
-
useIsomorphicLayoutEffect
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=constants.ios.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Users/n8/tamagui/code/core/constants/src/constants.ios.ts"],
|
|
4
|
-
"mappings": "AAAA,OAAOA,WAAW;AAEX,IAAMC,QAAiB,IACjBC,kBAA2B,IAC3BC,WAAoB,IACpBC,WAAoB,IACpBC,4BAA4BL,MAAMM,iBAClCC,WAAoB,IACpBC,iBAA0B,IAC1BC,cAAuB,IACvBC,YAAqB,IACrBC,QAAiB,IACjBC,kBAAwD;",
|
|
5
|
-
"names": ["React", "isWeb", "isWindowDefined", "isServer", "isClient", "useIsomorphicLayoutEffect", "useLayoutEffect", "isChrome", "isWebTouchable", "isTouchable", "isAndroid", "isIos", "currentPlatform"]
|
|
6
|
-
}
|
package/src/constants.android.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
export const isWeb: boolean = false
|
|
4
|
-
export const isWindowDefined: boolean = false
|
|
5
|
-
export const isServer: boolean = false
|
|
6
|
-
export const isClient: boolean = false
|
|
7
|
-
export const useIsomorphicLayoutEffect = React.useLayoutEffect
|
|
8
|
-
export const isChrome: boolean = false
|
|
9
|
-
export const isWebTouchable: boolean = false
|
|
10
|
-
export const isTouchable: boolean = true
|
|
11
|
-
export const isAndroid: boolean = true
|
|
12
|
-
export const isIos: boolean = false
|
|
13
|
-
export const currentPlatform: 'web' | 'ios' | 'native' | 'android' = 'android'
|
package/src/constants.ios.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
export const isWeb: boolean = false
|
|
4
|
-
export const isWindowDefined: boolean = false
|
|
5
|
-
export const isServer: boolean = false
|
|
6
|
-
export const isClient: boolean = false
|
|
7
|
-
export const useIsomorphicLayoutEffect = React.useLayoutEffect
|
|
8
|
-
export const isChrome: boolean = false
|
|
9
|
-
export const isWebTouchable: boolean = false
|
|
10
|
-
export const isTouchable: boolean = true
|
|
11
|
-
export const isAndroid: boolean = false
|
|
12
|
-
export const isIos: boolean = true
|
|
13
|
-
export const currentPlatform: 'web' | 'ios' | 'native' | 'android' = 'ios'
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const isWeb: boolean;
|
|
3
|
-
export declare const isWindowDefined: boolean;
|
|
4
|
-
export declare const isServer: boolean;
|
|
5
|
-
export declare const isClient: boolean;
|
|
6
|
-
export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
|
|
7
|
-
export declare const isChrome: boolean;
|
|
8
|
-
export declare const isWebTouchable: boolean;
|
|
9
|
-
export declare const isTouchable: boolean;
|
|
10
|
-
export declare const isAndroid: boolean;
|
|
11
|
-
export declare const isIos: boolean;
|
|
12
|
-
export declare const currentPlatform: 'web' | 'ios' | 'native' | 'android';
|
|
13
|
-
//# sourceMappingURL=constants.android.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.android.d.ts","sourceRoot":"","sources":["../src/constants.android.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,KAAK,EAAE,OAAe,CAAA;AACnC,eAAO,MAAM,eAAe,EAAE,OAAe,CAAA;AAC7C,eAAO,MAAM,QAAQ,EAAE,OAAe,CAAA;AACtC,eAAO,MAAM,QAAQ,EAAE,OAAe,CAAA;AACtC,eAAO,MAAM,yBAAyB,8BAAwB,CAAA;AAC9D,eAAO,MAAM,QAAQ,EAAE,OAAe,CAAA;AACtC,eAAO,MAAM,cAAc,EAAE,OAAe,CAAA;AAC5C,eAAO,MAAM,WAAW,EAAE,OAAc,CAAA;AACxC,eAAO,MAAM,SAAS,EAAE,OAAc,CAAA;AACtC,eAAO,MAAM,KAAK,EAAE,OAAe,CAAA;AACnC,eAAO,MAAM,eAAe,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAqB,CAAA"}
|
package/types/constants.ios.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const isWeb: boolean;
|
|
3
|
-
export declare const isWindowDefined: boolean;
|
|
4
|
-
export declare const isServer: boolean;
|
|
5
|
-
export declare const isClient: boolean;
|
|
6
|
-
export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
|
|
7
|
-
export declare const isChrome: boolean;
|
|
8
|
-
export declare const isWebTouchable: boolean;
|
|
9
|
-
export declare const isTouchable: boolean;
|
|
10
|
-
export declare const isAndroid: boolean;
|
|
11
|
-
export declare const isIos: boolean;
|
|
12
|
-
export declare const currentPlatform: 'web' | 'ios' | 'native' | 'android';
|
|
13
|
-
//# sourceMappingURL=constants.ios.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.ios.d.ts","sourceRoot":"","sources":["../src/constants.ios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,KAAK,EAAE,OAAe,CAAA;AACnC,eAAO,MAAM,eAAe,EAAE,OAAe,CAAA;AAC7C,eAAO,MAAM,QAAQ,EAAE,OAAe,CAAA;AACtC,eAAO,MAAM,QAAQ,EAAE,OAAe,CAAA;AACtC,eAAO,MAAM,yBAAyB,8BAAwB,CAAA;AAC9D,eAAO,MAAM,QAAQ,EAAE,OAAe,CAAA;AACtC,eAAO,MAAM,cAAc,EAAE,OAAe,CAAA;AAC5C,eAAO,MAAM,WAAW,EAAE,OAAc,CAAA;AACxC,eAAO,MAAM,SAAS,EAAE,OAAe,CAAA;AACvC,eAAO,MAAM,KAAK,EAAE,OAAc,CAAA;AAClC,eAAO,MAAM,eAAe,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAiB,CAAA"}
|