@tamagui/constants 2.7.7 → 3.0.0-beta.643.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 +28 -31
- package/dist/cjs/constants.native.cjs +62 -0
- package/dist/cjs/constants.native.js +32 -34
- package/dist/cjs/constants.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +22 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/platformDriver.cjs +18 -19
- package/dist/cjs/platformDriver.native.cjs +36 -0
- package/dist/cjs/platformDriver.native.js +18 -18
- package/dist/cjs/platformDriver.native.js.map +1 -1
- package/dist/esm/constants.mjs +3 -2
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js +7 -6
- package/dist/esm/constants.native.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/index.native.js +3 -3
- package/dist/esm/platformDriver.mjs +3 -2
- package/dist/esm/platformDriver.mjs.map +1 -1
- package/dist/esm/platformDriver.native.js +3 -2
- package/dist/esm/platformDriver.native.js.map +1 -1
- package/package.json +3 -3
- package/src/constants.native.ts +0 -2
- package/src/constants.ts +1 -3
- package/types/constants.d.ts +0 -2
- package/types/constants.d.ts.map +2 -2
- package/types/constants.native.d.ts +0 -2
- package/types/constants.native.d.ts.map +2 -2
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
package/dist/cjs/constants.cjs
CHANGED
|
@@ -1,42 +1,40 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
10
11
|
};
|
|
11
12
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
19
20
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
22
|
var constants_exports = {};
|
|
24
23
|
__export(constants_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
24
|
+
currentPlatform: () => currentPlatform,
|
|
25
|
+
isAndroid: () => isAndroid,
|
|
26
|
+
isBrowser: () => isBrowser,
|
|
27
|
+
isChrome: () => isChrome,
|
|
28
|
+
isClient: () => isClient,
|
|
29
|
+
isIos: () => isIos,
|
|
30
|
+
isNativeDesktop: () => isNativeDesktop,
|
|
31
|
+
isServer: () => isServer,
|
|
32
|
+
isTV: () => isTV,
|
|
33
|
+
isTouchable: () => isTouchable,
|
|
34
|
+
isWeb: () => isWeb,
|
|
35
|
+
isWebTouchable: () => isWebTouchable,
|
|
36
|
+
supportsDynamicColorIOS: () => supportsDynamicColorIOS,
|
|
37
|
+
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
40
38
|
});
|
|
41
39
|
module.exports = __toCommonJS(constants_exports);
|
|
42
40
|
var import_react = require("react");
|
|
@@ -44,7 +42,6 @@ const isWeb = true;
|
|
|
44
42
|
const isBrowser = typeof navigator !== "undefined" && typeof location !== "undefined";
|
|
45
43
|
const isServer = !isBrowser;
|
|
46
44
|
const isClient = isBrowser;
|
|
47
|
-
const isWindowDefined = isBrowser;
|
|
48
45
|
const useIsomorphicLayoutEffect = isServer ? import_react.useEffect : import_react.useLayoutEffect;
|
|
49
46
|
const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
|
|
50
47
|
const isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
@@ -54,4 +51,4 @@ const isAndroid = process.env.TEST_NATIVE_PLATFORM === "android" || process.env.
|
|
|
54
51
|
const isIos = process.env.TEST_NATIVE_PLATFORM === "ios" || process.env.TEST_NATIVE_PLATFORM === "tvos";
|
|
55
52
|
const supportsDynamicColorIOS = isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === "1";
|
|
56
53
|
const isTV = process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
|
|
57
|
-
const currentPlatform = "web";
|
|
54
|
+
const currentPlatform = "web";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var constants_native_exports = {};
|
|
25
|
+
__export(constants_native_exports, {
|
|
26
|
+
currentPlatform: () => currentPlatform,
|
|
27
|
+
isAndroid: () => isAndroid,
|
|
28
|
+
isBrowser: () => isBrowser,
|
|
29
|
+
isChrome: () => isChrome,
|
|
30
|
+
isClient: () => isClient,
|
|
31
|
+
isIos: () => isIos,
|
|
32
|
+
isNativeDesktop: () => isNativeDesktop,
|
|
33
|
+
isServer: () => isServer,
|
|
34
|
+
isTV: () => isTV,
|
|
35
|
+
isTouchable: () => isTouchable,
|
|
36
|
+
isWeb: () => isWeb,
|
|
37
|
+
isWebTouchable: () => isWebTouchable,
|
|
38
|
+
supportsDynamicColorIOS: () => supportsDynamicColorIOS,
|
|
39
|
+
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(constants_native_exports);
|
|
42
|
+
var import_react = require("react");
|
|
43
|
+
var import_react_native = require("react-native");
|
|
44
|
+
var isWeb = false;
|
|
45
|
+
var isBrowser = false;
|
|
46
|
+
var isServer = false;
|
|
47
|
+
var isClient = true;
|
|
48
|
+
var useIsomorphicLayoutEffect = import_react.useLayoutEffect;
|
|
49
|
+
var isChrome = false;
|
|
50
|
+
var isWebTouchable = false;
|
|
51
|
+
var isNativeDesktop = (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) === "macos" || (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) === "windows";
|
|
52
|
+
var isTouchable = !isNativeDesktop;
|
|
53
|
+
var isAndroid = (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) === "android" || process.env.TEST_NATIVE_PLATFORM === "android" || process.env.TEST_NATIVE_PLATFORM === "androidtv";
|
|
54
|
+
var isIos = (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios" || process.env.TEST_NATIVE_PLATFORM === "tvos";
|
|
55
|
+
var supportsDynamicColorIOS = isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === "1";
|
|
56
|
+
var isTV = (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.isTV) || process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
|
|
57
|
+
var currentPlatform = ((import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) ? {
|
|
58
|
+
ios: "ios",
|
|
59
|
+
android: "android",
|
|
60
|
+
macos: "macos",
|
|
61
|
+
windows: "windows"
|
|
62
|
+
}[import_react_native.Platform.OS] : void 0) || "native";
|
|
@@ -1,44 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
24
|
var constants_native_exports = {};
|
|
26
25
|
__export(constants_native_exports, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
26
|
+
currentPlatform: () => currentPlatform,
|
|
27
|
+
isAndroid: () => isAndroid,
|
|
28
|
+
isBrowser: () => isBrowser,
|
|
29
|
+
isChrome: () => isChrome,
|
|
30
|
+
isClient: () => isClient,
|
|
31
|
+
isIos: () => isIos,
|
|
32
|
+
isNativeDesktop: () => isNativeDesktop,
|
|
33
|
+
isServer: () => isServer,
|
|
34
|
+
isTV: () => isTV,
|
|
35
|
+
isTouchable: () => isTouchable,
|
|
36
|
+
isWeb: () => isWeb,
|
|
37
|
+
isWebTouchable: () => isWebTouchable,
|
|
38
|
+
supportsDynamicColorIOS: () => supportsDynamicColorIOS,
|
|
39
|
+
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
42
40
|
});
|
|
43
41
|
module.exports = __toCommonJS(constants_native_exports);
|
|
44
42
|
var import_react = require("react");
|
|
@@ -47,7 +45,6 @@ var isWeb = false;
|
|
|
47
45
|
var isBrowser = false;
|
|
48
46
|
var isServer = false;
|
|
49
47
|
var isClient = true;
|
|
50
|
-
var isWindowDefined = false;
|
|
51
48
|
var useIsomorphicLayoutEffect = import_react.useLayoutEffect;
|
|
52
49
|
var isChrome = false;
|
|
53
50
|
var isWebTouchable = false;
|
|
@@ -58,9 +55,10 @@ var isIos = (import_react_native.Platform === null || import_react_native.Platfo
|
|
|
58
55
|
var supportsDynamicColorIOS = isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === "1";
|
|
59
56
|
var isTV = (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.isTV) || process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
|
|
60
57
|
var currentPlatform = ((import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) ? {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
ios: "ios",
|
|
59
|
+
android: "android",
|
|
60
|
+
macos: "macos",
|
|
61
|
+
windows: "windows"
|
|
65
62
|
}[import_react_native.Platform.OS] : void 0) || "native";
|
|
63
|
+
|
|
66
64
|
//# sourceMappingURL=constants.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"constants.native.js","names":[],"sources":["cjs/constants.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar constants_native_exports = {};\n__export(constants_native_exports, {\n\tcurrentPlatform: () => currentPlatform,\n\tisAndroid: () => isAndroid,\n\tisBrowser: () => isBrowser,\n\tisChrome: () => isChrome,\n\tisClient: () => isClient,\n\tisIos: () => isIos,\n\tisNativeDesktop: () => isNativeDesktop,\n\tisServer: () => isServer,\n\tisTV: () => isTV,\n\tisTouchable: () => isTouchable,\n\tisWeb: () => isWeb,\n\tisWebTouchable: () => isWebTouchable,\n\tsupportsDynamicColorIOS: () => supportsDynamicColorIOS,\n\tuseIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect\n});\nmodule.exports = __toCommonJS(constants_native_exports);\nvar import_react = require(\"react\");\nvar import_react_native = require(\"react-native\");\nvar isWeb = false;\nvar isBrowser = false;\nvar isServer = false;\nvar isClient = true;\nvar useIsomorphicLayoutEffect = import_react.useLayoutEffect;\nvar isChrome = false;\nvar isWebTouchable = false;\nvar isNativeDesktop = (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) === \"macos\" || (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) === \"windows\";\nvar isTouchable = !isNativeDesktop;\nvar isAndroid = (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) === \"android\" || process.env.TEST_NATIVE_PLATFORM === \"android\" || process.env.TEST_NATIVE_PLATFORM === \"androidtv\";\nvar isIos = (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) === \"ios\" || process.env.TEST_NATIVE_PLATFORM === \"ios\" || process.env.TEST_NATIVE_PLATFORM === \"tvos\";\nvar supportsDynamicColorIOS = isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === \"1\";\nvar isTV = (import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.isTV) || process.env.TEST_NATIVE_PLATFORM === \"androidtv\" || process.env.TEST_NATIVE_PLATFORM === \"tvos\";\nvar currentPlatform = ((import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) ? {\n\tios: \"ios\",\n\tandroid: \"android\",\n\tmacos: \"macos\",\n\twindows: \"windows\"\n}[import_react_native.Platform.OS] : void 0) || \"native\";\n//# sourceMappingURL=constants.native.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,2BAA2B,CAAC;AAChC,SAAS,0BAA0B;CAClC,uBAAuB;CACvB,iBAAiB;CACjB,iBAAiB;CACjB,gBAAgB;CAChB,gBAAgB;CAChB,aAAa;CACb,uBAAuB;CACvB,gBAAgB;CAChB,YAAY;CACZ,mBAAmB;CACnB,aAAa;CACb,sBAAsB;CACtB,+BAA+B;CAC/B,iCAAiC;AAClC,CAAC;AACD,OAAO,UAAU,aAAa,wBAAwB;AACtD,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,sBAAsB,QAAQ,cAAc;AAChD,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,WAAW;AACf,IAAI,4BAA4B,aAAa;AAC7C,IAAI,WAAW;AACf,IAAI,iBAAiB;AACrB,IAAI,mBAAmB,oBAAoB,aAAa,QAAQ,oBAAoB,aAAa,KAAK,IAAI,KAAK,IAAI,oBAAoB,SAAS,QAAQ,YAAY,oBAAoB,aAAa,QAAQ,oBAAoB,aAAa,KAAK,IAAI,KAAK,IAAI,oBAAoB,SAAS,QAAQ;AACrS,IAAI,cAAc,CAAC;AACnB,IAAI,aAAa,oBAAoB,aAAa,QAAQ,oBAAoB,aAAa,KAAK,IAAI,KAAK,IAAI,oBAAoB,SAAS,QAAQ,aAAa,QAAQ,IAAI,yBAAyB,aAAa,QAAQ,IAAI,yBAAyB;AACtP,IAAI,SAAS,oBAAoB,aAAa,QAAQ,oBAAoB,aAAa,KAAK,IAAI,KAAK,IAAI,oBAAoB,SAAS,QAAQ,SAAS,QAAQ,IAAI,yBAAyB,SAAS,QAAQ,IAAI,yBAAyB;AAC1O,IAAI,0BAA0B,SAAS,QAAQ,IAAI,8BAA8B;AACjF,IAAI,QAAQ,oBAAoB,aAAa,QAAQ,oBAAoB,aAAa,KAAK,IAAI,KAAK,IAAI,oBAAoB,SAAS,SAAS,QAAQ,IAAI,yBAAyB,eAAe,QAAQ,IAAI,yBAAyB;AACvO,IAAI,oBAAoB,oBAAoB,aAAa,QAAQ,oBAAoB,aAAa,KAAK,IAAI,KAAK,IAAI,oBAAoB,SAAS,MAAM;CACtJ,KAAK;CACL,SAAS;CACT,OAAO;CACP,SAAS;AACV,EAAE,oBAAoB,SAAS,MAAM,KAAK,MAAM"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
13
14
|
};
|
|
14
15
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
}), mod);
|
|
16
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
17
|
var index_exports = {};
|
|
19
18
|
module.exports = __toCommonJS(index_exports);
|
|
20
19
|
__reExport(index_exports, require("./constants.cjs"), module.exports);
|
|
21
|
-
__reExport(index_exports, require("./platformDriver.cjs"), module.exports);
|
|
20
|
+
__reExport(index_exports, require("./platformDriver.cjs"), module.exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(index_exports);
|
|
21
|
+
__reExport(index_exports, require("./constants.native.js"), module.exports);
|
|
22
|
+
__reExport(index_exports, require("./platformDriver.native.js"), module.exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
15
16
|
};
|
|
16
17
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
19
|
var index_exports = {};
|
|
21
20
|
module.exports = __toCommonJS(index_exports);
|
|
22
21
|
__reExport(index_exports, require("./constants.native.js"), module.exports);
|
|
23
22
|
__reExport(index_exports, require("./platformDriver.native.js"), module.exports);
|
|
23
|
+
|
|
24
24
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./constants\"), module.exports);\n__reExport(index_exports, require(\"./platformDriver\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,uBAAa,GAAG,OAAO,OAAO;AAChE,WAAW,eAAe,QAAQ,4BAAkB,GAAG,OAAO,OAAO"}
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
10
11
|
};
|
|
11
12
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
19
20
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
22
|
var platformDriver_exports = {};
|
|
24
23
|
__export(platformDriver_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
getPlatformDriver: () => getPlatformDriver,
|
|
25
|
+
setupPlatformDriver: () => setupPlatformDriver
|
|
27
26
|
});
|
|
28
27
|
module.exports = __toCommonJS(platformDriver_exports);
|
|
29
28
|
let platformDriver = null;
|
|
30
29
|
function setupPlatformDriver(driver) {
|
|
31
|
-
|
|
30
|
+
platformDriver = driver;
|
|
32
31
|
}
|
|
33
32
|
function getPlatformDriver() {
|
|
34
|
-
|
|
35
|
-
}
|
|
33
|
+
return platformDriver;
|
|
34
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var platformDriver_exports = {};
|
|
25
|
+
__export(platformDriver_exports, {
|
|
26
|
+
getPlatformDriver: () => getPlatformDriver,
|
|
27
|
+
setupPlatformDriver: () => setupPlatformDriver
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(platformDriver_exports);
|
|
30
|
+
var platformDriver = null;
|
|
31
|
+
function setupPlatformDriver(driver) {
|
|
32
|
+
platformDriver = driver;
|
|
33
|
+
}
|
|
34
|
+
function getPlatformDriver() {
|
|
35
|
+
return platformDriver;
|
|
36
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
24
|
var platformDriver_exports = {};
|
|
26
25
|
__export(platformDriver_exports, {
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
getPlatformDriver: () => getPlatformDriver,
|
|
27
|
+
setupPlatformDriver: () => setupPlatformDriver
|
|
29
28
|
});
|
|
30
29
|
module.exports = __toCommonJS(platformDriver_exports);
|
|
31
30
|
var platformDriver = null;
|
|
32
31
|
function setupPlatformDriver(driver) {
|
|
33
|
-
|
|
32
|
+
platformDriver = driver;
|
|
34
33
|
}
|
|
35
34
|
function getPlatformDriver() {
|
|
36
|
-
|
|
35
|
+
return platformDriver;
|
|
37
36
|
}
|
|
37
|
+
|
|
38
38
|
//# sourceMappingURL=platformDriver.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"platformDriver.native.js","names":[],"sources":["cjs/platformDriver.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar platformDriver_exports = {};\n__export(platformDriver_exports, {\n getPlatformDriver: () => getPlatformDriver,\n setupPlatformDriver: () => setupPlatformDriver\n});\nmodule.exports = __toCommonJS(platformDriver_exports);\nvar platformDriver = null;\nfunction setupPlatformDriver(driver) {\n platformDriver = driver;\n}\nfunction getPlatformDriver() {\n return platformDriver;\n}\n//# sourceMappingURL=platformDriver.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,yBAAyB,CAAC;AAC9B,SAAS,wBAAwB;CAC/B,yBAAyB;CACzB,2BAA2B;AAC7B,CAAC;AACD,OAAO,UAAU,aAAa,sBAAsB;AACpD,IAAI,iBAAiB;AACrB,SAAS,oBAAoB,QAAQ;CACnC,iBAAiB;AACnB;AACA,SAAS,oBAAoB;CAC3B,OAAO;AACT"}
|
package/dist/esm/constants.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect, useLayoutEffect } from "react";
|
|
2
|
+
|
|
2
3
|
const isWeb = true;
|
|
3
4
|
const isBrowser = typeof navigator !== "undefined" && typeof location !== "undefined";
|
|
4
5
|
const isServer = !isBrowser;
|
|
5
6
|
const isClient = isBrowser;
|
|
6
|
-
const isWindowDefined = isBrowser;
|
|
7
7
|
const useIsomorphicLayoutEffect = isServer ? useEffect : useLayoutEffect;
|
|
8
8
|
const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
|
|
9
9
|
const isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
@@ -14,5 +14,6 @@ const isIos = process.env.TEST_NATIVE_PLATFORM === "ios" || process.env.TEST_NAT
|
|
|
14
14
|
const supportsDynamicColorIOS = isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === "1";
|
|
15
15
|
const isTV = process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
|
|
16
16
|
const currentPlatform = "web";
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
export { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isNativeDesktop, isServer, isTV, isTouchable, isWeb, isWebTouchable, supportsDynamicColorIOS, useIsomorphicLayoutEffect };
|
|
18
19
|
//# sourceMappingURL=constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"constants.js","names":[],"sources":["esm/constants.js"],"sourcesContent":["import { useEffect, useLayoutEffect } from \"react\";\n\nconst isWeb = true;\nconst isBrowser = typeof navigator !== \"undefined\" && typeof location !== \"undefined\";\nconst isServer = !isBrowser;\nconst isClient = isBrowser;\nconst useIsomorphicLayoutEffect = isServer ? useEffect : useLayoutEffect;\nconst isChrome = typeof navigator !== \"undefined\" && /Chrome/.test(navigator.userAgent || \"\");\nconst isWebTouchable = isClient && (\"ontouchstart\" in window || navigator.maxTouchPoints > 0);\nconst isNativeDesktop = false;\nconst isTouchable = isWebTouchable;\nconst isAndroid = process.env.TEST_NATIVE_PLATFORM === \"android\" || process.env.TEST_NATIVE_PLATFORM === \"androidtv\";\nconst isIos = process.env.TEST_NATIVE_PLATFORM === \"ios\" || process.env.TEST_NATIVE_PLATFORM === \"tvos\";\nconst supportsDynamicColorIOS = isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === \"1\";\nconst isTV = process.env.TEST_NATIVE_PLATFORM === \"androidtv\" || process.env.TEST_NATIVE_PLATFORM === \"tvos\";\nconst currentPlatform = \"web\";\n\nexport { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isNativeDesktop, isServer, isTV, isTouchable, isWeb, isWebTouchable, supportsDynamicColorIOS, useIsomorphicLayoutEffect };"],"mappings":";;;AAEA,MAAM,QAAQ;AACd,MAAM,YAAY,OAAO,cAAc,eAAe,OAAO,aAAa;AAC1E,MAAM,WAAW,CAAC;AAClB,MAAM,WAAW;AACjB,MAAM,4BAA4B,WAAW,YAAY;AACzD,MAAM,WAAW,OAAO,cAAc,eAAe,SAAS,KAAK,UAAU,aAAa,EAAE;AAC5F,MAAM,iBAAiB,aAAa,kBAAkB,UAAU,UAAU,iBAAiB;AAC3F,MAAM,kBAAkB;AACxB,MAAM,cAAc;AACpB,MAAM,YAAY,QAAQ,IAAI,yBAAyB,aAAa,QAAQ,IAAI,yBAAyB;AACzG,MAAM,QAAQ,QAAQ,IAAI,yBAAyB,SAAS,QAAQ,IAAI,yBAAyB;AACjG,MAAM,0BAA0B,SAAS,QAAQ,IAAI,8BAA8B;AACnF,MAAM,OAAO,QAAQ,IAAI,yBAAyB,eAAe,QAAQ,IAAI,yBAAyB;AACtG,MAAM,kBAAkB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useLayoutEffect } from "react";
|
|
2
2
|
import { Platform } from "react-native";
|
|
3
|
+
|
|
3
4
|
var isWeb = false;
|
|
4
5
|
var isBrowser = false;
|
|
5
6
|
var isServer = false;
|
|
6
7
|
var isClient = true;
|
|
7
|
-
var isWindowDefined = false;
|
|
8
8
|
var useIsomorphicLayoutEffect = useLayoutEffect;
|
|
9
9
|
var isChrome = false;
|
|
10
10
|
var isWebTouchable = false;
|
|
@@ -15,10 +15,11 @@ var isIos = (Platform === null || Platform === void 0 ? void 0 : Platform.OS) ==
|
|
|
15
15
|
var supportsDynamicColorIOS = isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === "1";
|
|
16
16
|
var isTV = (Platform === null || Platform === void 0 ? void 0 : Platform.isTV) || process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
|
|
17
17
|
var currentPlatform = ((Platform === null || Platform === void 0 ? void 0 : Platform.OS) ? {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
ios: "ios",
|
|
19
|
+
android: "android",
|
|
20
|
+
macos: "macos",
|
|
21
|
+
windows: "windows"
|
|
22
22
|
}[Platform.OS] : void 0) || "native";
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
export { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isNativeDesktop, isServer, isTV, isTouchable, isWeb, isWebTouchable, supportsDynamicColorIOS, useIsomorphicLayoutEffect };
|
|
24
25
|
//# sourceMappingURL=constants.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"constants.native.js","names":[],"sources":["esm/constants.native.js"],"sourcesContent":["import { useLayoutEffect } from \"react\";\nimport { Platform } from \"react-native\";\n\nvar isWeb = false;\nvar isBrowser = false;\nvar isServer = false;\nvar isClient = true;\nvar useIsomorphicLayoutEffect = useLayoutEffect;\nvar isChrome = false;\nvar isWebTouchable = false;\nvar isNativeDesktop = (Platform === null || Platform === void 0 ? void 0 : Platform.OS) === \"macos\" || (Platform === null || Platform === void 0 ? void 0 : Platform.OS) === \"windows\";\nvar isTouchable = !isNativeDesktop;\nvar isAndroid = (Platform === null || Platform === void 0 ? void 0 : Platform.OS) === \"android\" || process.env.TEST_NATIVE_PLATFORM === \"android\" || process.env.TEST_NATIVE_PLATFORM === \"androidtv\";\nvar isIos = (Platform === null || Platform === void 0 ? void 0 : Platform.OS) === \"ios\" || process.env.TEST_NATIVE_PLATFORM === \"ios\" || process.env.TEST_NATIVE_PLATFORM === \"tvos\";\nvar supportsDynamicColorIOS = isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === \"1\";\nvar isTV = (Platform === null || Platform === void 0 ? void 0 : Platform.isTV) || process.env.TEST_NATIVE_PLATFORM === \"androidtv\" || process.env.TEST_NATIVE_PLATFORM === \"tvos\";\nvar currentPlatform = ((Platform === null || Platform === void 0 ? void 0 : Platform.OS) ? {\n\tios: \"ios\",\n\tandroid: \"android\",\n\tmacos: \"macos\",\n\twindows: \"windows\"\n}[Platform.OS] : void 0) || \"native\";\n\nexport { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isNativeDesktop, isServer, isTV, isTouchable, isWeb, isWebTouchable, supportsDynamicColorIOS, useIsomorphicLayoutEffect };"],"mappings":";;;;AAGA,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,WAAW;AACf,IAAI,4BAA4B;AAChC,IAAI,WAAW;AACf,IAAI,iBAAiB;AACrB,IAAI,mBAAmB,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,QAAQ,YAAY,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,QAAQ;AAC7K,IAAI,cAAc,CAAC;AACnB,IAAI,aAAa,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,QAAQ,aAAa,QAAQ,IAAI,yBAAyB,aAAa,QAAQ,IAAI,yBAAyB;AAC1L,IAAI,SAAS,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,QAAQ,SAAS,QAAQ,IAAI,yBAAyB,SAAS,QAAQ,IAAI,yBAAyB;AAC9K,IAAI,0BAA0B,SAAS,QAAQ,IAAI,8BAA8B;AACjF,IAAI,QAAQ,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,SAAS,QAAQ,IAAI,yBAAyB,eAAe,QAAQ,IAAI,yBAAyB;AAC3K,IAAI,oBAAoB,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,MAAM;CAC1F,KAAK;CACL,SAAS;CACT,OAAO;CACP,SAAS;AACV,EAAE,SAAS,MAAM,KAAK,MAAM"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./constants.mjs"
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export * from "./constants.mjs"
|
|
2
|
+
|
|
3
|
+
export * from "./platformDriver.mjs"
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./constants.mjs"
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export * from "./constants.mjs"
|
|
2
|
+
|
|
3
|
+
export * from "./platformDriver.mjs"
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./constants.native.js"
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export * from "./constants.native.js"
|
|
2
|
+
|
|
3
|
+
export * from "./platformDriver.native.js"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
let platformDriver = null;
|
|
2
2
|
function setupPlatformDriver(driver) {
|
|
3
|
-
|
|
3
|
+
platformDriver = driver;
|
|
4
4
|
}
|
|
5
5
|
function getPlatformDriver() {
|
|
6
|
-
|
|
6
|
+
return platformDriver;
|
|
7
7
|
}
|
|
8
|
+
|
|
8
9
|
export { getPlatformDriver, setupPlatformDriver };
|
|
9
10
|
//# sourceMappingURL=platformDriver.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"platformDriver.js","names":[],"sources":["esm/platformDriver.js"],"sourcesContent":["let platformDriver = null;\nfunction setupPlatformDriver(driver) {\n platformDriver = driver;\n}\nfunction getPlatformDriver() {\n return platformDriver;\n}\nexport {\n getPlatformDriver,\n setupPlatformDriver\n};\n//# sourceMappingURL=platformDriver.js.map\n"],"mappings":";AAAA,IAAI,iBAAiB;AACrB,SAAS,oBAAoB,QAAQ;CACnC,iBAAiB;AACnB;AACA,SAAS,oBAAoB;CAC3B,OAAO;AACT"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
var platformDriver = null;
|
|
2
2
|
function setupPlatformDriver(driver) {
|
|
3
|
-
|
|
3
|
+
platformDriver = driver;
|
|
4
4
|
}
|
|
5
5
|
function getPlatformDriver() {
|
|
6
|
-
|
|
6
|
+
return platformDriver;
|
|
7
7
|
}
|
|
8
|
+
|
|
8
9
|
export { getPlatformDriver, setupPlatformDriver };
|
|
9
10
|
//# sourceMappingURL=platformDriver.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"platformDriver.native.js","names":[],"sources":["esm/platformDriver.native.js"],"sourcesContent":["var platformDriver = null;\nfunction setupPlatformDriver(driver) {\n platformDriver = driver;\n}\nfunction getPlatformDriver() {\n return platformDriver;\n}\nexport {\n getPlatformDriver,\n setupPlatformDriver\n};\n//# sourceMappingURL=platformDriver.js.map\n"],"mappings":";AAAA,IAAI,iBAAiB;AACrB,SAAS,oBAAoB,QAAQ;CACnC,iBAAiB;AACnB;AACA,SAAS,oBAAoB;CAC3B,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/constants",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.643.1",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"clean:build": "tamagui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@tamagui/build": "
|
|
37
|
+
"@tamagui/build": "3.0.0-beta.643.1",
|
|
38
38
|
"react": ">=19",
|
|
39
|
-
"react-native": "0.
|
|
39
|
+
"react-native": "0.86.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=19"
|
package/src/constants.native.ts
CHANGED
|
@@ -5,8 +5,6 @@ export const isWeb: boolean = false
|
|
|
5
5
|
export const isBrowser: boolean = false
|
|
6
6
|
export const isServer: boolean = false
|
|
7
7
|
export const isClient: boolean = true
|
|
8
|
-
/** @deprecated use isBrowser instead */
|
|
9
|
-
export const isWindowDefined: boolean = false
|
|
10
8
|
export const useIsomorphicLayoutEffect: typeof useEffect = useLayoutEffect
|
|
11
9
|
export const isChrome: boolean = false
|
|
12
10
|
export const isWebTouchable: boolean = false
|
package/src/constants.ts
CHANGED
|
@@ -9,8 +9,6 @@ export const isBrowser: boolean =
|
|
|
9
9
|
|
|
10
10
|
export const isServer: boolean = isWeb && !isBrowser
|
|
11
11
|
export const isClient: boolean = isWeb && isBrowser
|
|
12
|
-
/** @deprecated use isBrowser instead */
|
|
13
|
-
export const isWindowDefined: boolean = isBrowser
|
|
14
12
|
|
|
15
13
|
export const useIsomorphicLayoutEffect: typeof useEffect = isServer
|
|
16
14
|
? useEffect
|
|
@@ -24,7 +22,7 @@ export const isWebTouchable: boolean =
|
|
|
24
22
|
|
|
25
23
|
export const isNativeDesktop: boolean = false
|
|
26
24
|
export const isTouchable: boolean = !isWeb || isWebTouchable
|
|
27
|
-
//
|
|
25
|
+
// annotate as boolean to avoid inferring the type as false
|
|
28
26
|
// On web, isAndroid/isIos are always false in production.
|
|
29
27
|
// TEST_NATIVE_PLATFORM is only set by the test runner (vitest) to simulate native
|
|
30
28
|
// environments (e.g. androidtv, tvos) from a web/jsdom test context.
|
package/types/constants.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ export declare const isWeb: boolean;
|
|
|
3
3
|
export declare const isBrowser: boolean;
|
|
4
4
|
export declare const isServer: boolean;
|
|
5
5
|
export declare const isClient: boolean;
|
|
6
|
-
/** @deprecated use isBrowser instead */
|
|
7
|
-
export declare const isWindowDefined: boolean;
|
|
8
6
|
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
9
7
|
export declare const isChrome: boolean;
|
|
10
8
|
export declare const isWebTouchable: boolean;
|
package/types/constants.d.ts.map
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"mappings": "AAAA,SAAS,iBAAkC;AAE3C,OAAO,cAAM;AAIb,OAAO,cAAM;AAGb,OAAO,cAAM;AACb,OAAO,cAAM
|
|
2
|
+
"mappings": "AAAA,SAAS,iBAAkC;AAE3C,OAAO,cAAM;AAIb,OAAO,cAAM;AAGb,OAAO,cAAM;AACb,OAAO,cAAM;AAEb,OAAO,cAAM,kCAAkC;AAI/C,OAAO,cAAM;AAGb,OAAO,cAAM;AAGb,OAAO,cAAM;AACb,OAAO,cAAM;AAKb,OAAO,cAAM;AAIb,OAAO,cAAM;AAIb,OAAO,cAAM;AAEb,OAAO,cAAM;;;;;;;AASb,OAAO,cAAM,iBAAiB,QAAQ,QAAQ,WAAW",
|
|
3
3
|
"names": [],
|
|
4
4
|
"sources": [
|
|
5
5
|
"src/constants.ts"
|
|
6
6
|
],
|
|
7
7
|
"version": 3,
|
|
8
8
|
"sourcesContent": [
|
|
9
|
-
"import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb: boolean = true\n\n// RN adds fake window and document so its not simple to get this right\n// check both navigator and location\nexport const isBrowser: boolean =\n typeof navigator !== 'undefined' && typeof location !== 'undefined'\n\nexport const isServer: boolean = isWeb && !isBrowser\nexport const isClient: boolean = isWeb && isBrowser\n
|
|
9
|
+
"import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb: boolean = true\n\n// RN adds fake window and document so its not simple to get this right\n// check both navigator and location\nexport const isBrowser: boolean =\n typeof navigator !== 'undefined' && typeof location !== 'undefined'\n\nexport const isServer: boolean = isWeb && !isBrowser\nexport const isClient: boolean = isWeb && isBrowser\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 isNativeDesktop: boolean = false\nexport const isTouchable: boolean = !isWeb || isWebTouchable\n// annotate as boolean to avoid inferring the type as false\n// On web, isAndroid/isIos are always false in production.\n// TEST_NATIVE_PLATFORM is only set by the test runner (vitest) to simulate native\n// environments (e.g. androidtv, tvos) from a web/jsdom test context.\nexport const isAndroid: boolean =\n process.env.TEST_NATIVE_PLATFORM === 'android' ||\n // Android TV has Platform.OS === 'android' per react-native-tvos\n process.env.TEST_NATIVE_PLATFORM === 'androidtv'\nexport const isIos: boolean =\n process.env.TEST_NATIVE_PLATFORM === 'ios' ||\n // tvOS has Platform.OS === 'ios' per react-native-tvos\n process.env.TEST_NATIVE_PLATFORM === 'tvos'\nexport const supportsDynamicColorIOS: boolean =\n isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === '1'\nexport const isTV: boolean =\n process.env.TEST_NATIVE_PLATFORM === 'androidtv' ||\n process.env.TEST_NATIVE_PLATFORM === 'tvos'\n/**\n * Reflects Platform.OS. TV platforms are intentionally NOT separate values:\n * - Android TV has Platform.OS === 'android' (react-native-tvos behavior)\n * - tvOS has Platform.OS === 'ios' (react-native-tvos behavior)\n * Use `isTV` combined with `isAndroid`/`isIos` to detect specific TV platforms.\n */\nexport const currentPlatform: 'web' | 'ios' | 'native' | 'android' = 'web'\n\n// In web source mode (Vite/webpack without pre-built dist), TAMAGUI_TARGET may not be set.\n// Set it here so all process.env.TAMAGUI_TARGET runtime checks work correctly.\n// In pre-built dist, the build tool inlines TAMAGUI_TARGET as a literal string,\n// making this block dead code (if (!'web') → never executes).\nif (!process.env.TAMAGUI_TARGET) {\n process.env.TAMAGUI_TARGET = 'web'\n}\n"
|
|
10
10
|
]
|
|
11
11
|
}
|
|
@@ -3,8 +3,6 @@ export declare const isWeb: boolean;
|
|
|
3
3
|
export declare const isBrowser: boolean;
|
|
4
4
|
export declare const isServer: boolean;
|
|
5
5
|
export declare const isClient: boolean;
|
|
6
|
-
/** @deprecated use isBrowser instead */
|
|
7
|
-
export declare const isWindowDefined: boolean;
|
|
8
6
|
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
9
7
|
export declare const isChrome: boolean;
|
|
10
8
|
export declare const isWebTouchable: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"mappings": "AAAA,cAA+B,iBAAiB;AAGhD,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM
|
|
2
|
+
"mappings": "AAAA,cAA+B,iBAAiB;AAGhD,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM,kCAAkC;AAC/C,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM;AAEb,OAAO,cAAM;AAGb,OAAO,cAAM;AAKb,OAAO,cAAM;AAIb,OAAO,cAAM;AAEb,OAAO,cAAM;;;;;;;AAiBb,OAAO,cAAM,iBAAiB,QAAQ,QAAQ,WAAW,YAAY,UAAU",
|
|
3
3
|
"names": [],
|
|
4
4
|
"sources": [
|
|
5
5
|
"src/constants.native.ts"
|
|
6
6
|
],
|
|
7
7
|
"version": 3,
|
|
8
8
|
"sourcesContent": [
|
|
9
|
-
"import { useLayoutEffect, type useEffect } from 'react'\nimport { Platform } from 'react-native'\n\nexport const isWeb: boolean = false\nexport const isBrowser: boolean = false\nexport const isServer: boolean = false\nexport const isClient: boolean = true\
|
|
9
|
+
"import { useLayoutEffect, type useEffect } from 'react'\nimport { Platform } from 'react-native'\n\nexport const isWeb: boolean = false\nexport const isBrowser: boolean = false\nexport const isServer: boolean = false\nexport const isClient: boolean = true\nexport const useIsomorphicLayoutEffect: typeof useEffect = useLayoutEffect\nexport const isChrome: boolean = false\nexport const isWebTouchable: boolean = false\nexport const isNativeDesktop: boolean =\n Platform?.OS === 'macos' || Platform?.OS === 'windows'\nexport const isTouchable: boolean = !isNativeDesktop\n// optional chain required: babel extractor loads native.cjs in node where Platform is undefined\n// On Android TV: Platform.OS === 'android' per react-native-tvos\nexport const isAndroid: boolean =\n Platform?.OS === 'android' ||\n process.env.TEST_NATIVE_PLATFORM === 'android' ||\n process.env.TEST_NATIVE_PLATFORM === 'androidtv'\n// On tvOS: Platform.OS === 'ios' per react-native-tvos\nexport const isIos: boolean =\n Platform?.OS === 'ios' ||\n process.env.TEST_NATIVE_PLATFORM === 'ios' ||\n process.env.TEST_NATIVE_PLATFORM === 'tvos'\nexport const supportsDynamicColorIOS: boolean =\n isIos || process.env.TAMAGUI_DYNAMIC_COLOR_IOS === '1'\nexport const isTV: boolean =\n Platform?.isTV ||\n process.env.TEST_NATIVE_PLATFORM === 'androidtv' ||\n process.env.TEST_NATIVE_PLATFORM === 'tvos'\n\nconst platforms = {\n ios: 'ios',\n android: 'android',\n macos: 'macos',\n windows: 'windows',\n} as const\n/**\n * Reflects Platform.OS. TV platforms are intentionally NOT separate values:\n * - Android TV has Platform.OS === 'android' (react-native-tvos behavior)\n * - tvOS has Platform.OS === 'ios' (react-native-tvos behavior)\n * Use `isTV` combined with `isAndroid`/`isIos` to detect specific TV platforms.\n */\nexport const currentPlatform: 'web' | 'ios' | 'native' | 'android' | 'macos' | 'windows' =\n (Platform?.OS ? platforms[Platform.OS] : undefined) || 'native'\n\n// In Metro source mode, TAMAGUI_TARGET may not be set by the build tool.\n// Set it here so all process.env.TAMAGUI_TARGET runtime checks work correctly.\n// In pre-built dist, the build tool inlines TAMAGUI_TARGET as a literal string,\n// making this block dead code (if (!'native') → never executes).\nif (!process.env.TAMAGUI_TARGET) {\n process.env.TAMAGUI_TARGET = 'native'\n}\n"
|
|
10
10
|
]
|
|
11
11
|
}
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc","ignoreList":[]}
|
package/dist/esm/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc","ignoreList":[]}
|