@tamagui/constants 2.0.0-rc.4 → 2.0.0-rc.40

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.
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var constants_exports = {};
22
24
  __export(constants_exports, {
@@ -27,6 +29,7 @@ __export(constants_exports, {
27
29
  isClient: () => isClient,
28
30
  isIos: () => isIos,
29
31
  isServer: () => isServer,
32
+ isTV: () => isTV,
30
33
  isTouchable: () => isTouchable,
31
34
  isWeb: () => isWeb,
32
35
  isWebTouchable: () => isWebTouchable,
@@ -35,15 +38,16 @@ __export(constants_exports, {
35
38
  });
36
39
  module.exports = __toCommonJS(constants_exports);
37
40
  var import_react = require("react");
38
- const isWeb = !0,
39
- isBrowser = typeof window < "u",
40
- isServer = isWeb && !isBrowser,
41
- isClient = isWeb && isBrowser,
42
- isWindowDefined = isBrowser,
43
- useIsomorphicLayoutEffect = isServer ? import_react.useEffect : import_react.useLayoutEffect,
44
- isChrome = typeof navigator < "u" && /Chrome/.test(navigator.userAgent || ""),
45
- isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0),
46
- isTouchable = !isWeb || isWebTouchable,
47
- isAndroid = !1,
48
- isIos = process.env.TEST_NATIVE_PLATFORM === "ios",
49
- currentPlatform = "web";
41
+ const isWeb = true;
42
+ const isBrowser = typeof window !== "undefined";
43
+ const isServer = !isBrowser;
44
+ const isClient = isBrowser;
45
+ const isWindowDefined = isBrowser;
46
+ const useIsomorphicLayoutEffect = isServer ? import_react.useEffect : import_react.useLayoutEffect;
47
+ const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
48
+ const isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
49
+ const isTouchable = isWebTouchable;
50
+ const isAndroid = process.env.TEST_NATIVE_PLATFORM === "android" || process.env.TEST_NATIVE_PLATFORM === "androidtv";
51
+ const isIos = process.env.TEST_NATIVE_PLATFORM === "ios" || process.env.TEST_NATIVE_PLATFORM === "tvos";
52
+ const isTV = process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
53
+ const currentPlatform = "web";
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var constants_native_exports = {};
24
26
  __export(constants_native_exports, {
@@ -29,6 +31,7 @@ __export(constants_native_exports, {
29
31
  isClient: () => isClient,
30
32
  isIos: () => isIos,
31
33
  isServer: () => isServer,
34
+ isTV: () => isTV,
32
35
  isTouchable: () => isTouchable,
33
36
  isWeb: () => isWeb,
34
37
  isWebTouchable: () => isWebTouchable,
@@ -36,22 +39,22 @@ __export(constants_native_exports, {
36
39
  useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
37
40
  });
38
41
  module.exports = __toCommonJS(constants_native_exports);
39
- var import_react = require("react"),
40
- import_react_native = require("react-native"),
41
- isWeb = !1,
42
- isBrowser = !1,
43
- isServer = !1,
44
- isClient = !0,
45
- isWindowDefined = !1,
46
- useIsomorphicLayoutEffect = import_react.useLayoutEffect,
47
- isChrome = !1,
48
- isWebTouchable = !1,
49
- isTouchable = !0,
50
- isAndroid = import_react_native.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android",
51
- isIos = import_react_native.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios",
52
- platforms = {
53
- ios: "ios",
54
- android: "android"
55
- },
56
- currentPlatform = platforms[import_react_native.Platform.OS] || "native";
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 isWindowDefined = false;
49
+ var useIsomorphicLayoutEffect = import_react.useLayoutEffect;
50
+ var isChrome = false;
51
+ var isWebTouchable = false;
52
+ var isTouchable = true;
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 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";
56
+ var currentPlatform = ((import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) ? {
57
+ ios: "ios",
58
+ android: "android"
59
+ }[import_react_native.Platform.OS] : void 0) || "native";
57
60
  //# sourceMappingURL=constants.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["constants_native_exports","__export","currentPlatform","isAndroid","isBrowser","isChrome","isClient","isIos","isServer","isTouchable","isWeb","isWebTouchable","isWindowDefined","useIsomorphicLayoutEffect","module","exports","__toCommonJS","import_react","require","import_react_native","useLayoutEffect","Platform","OS","process","env","TEST_NATIVE_PLATFORM","platforms","ios","android"],"sources":["../../src/constants.native.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,KAAA,EAAAA,CAAA,KAAAA,KAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,KAAA,EAAAA,CAAA,KAAAA,KAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,yBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAhB,wBAAA;AAAA,IAAAiB,YAAA,GAAgCC,OAAA;EAChCC,mBAAA,GAAyBD,OAAA;EACdR,KAAA,GAAQ;EACRN,SAAA,GAAY;EACZI,QAAA,GAAW;EACXF,QAAA,GAAW;EAC8BM,eAAA,GAAkB;EAC3DC,yBAAA,GAA4BI,YAAA,CAAAG,eAAA;EAC5Bf,QAAA,GAAW;EACXM,cAAA,GAAiB;EACjBF,WAAA,GAAc;EACdN,SAAA,GAAYgB,mBAAA,CAAAE,QAAA,CAASC,EAAA,KAAO,aAAaC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;EAC9ElB,KAAA,GAAQY,mBAAA,CAAAE,QAAA,CAASC,EAAA,KAAO,SAASC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;EAC7EC,SAAA,GAAY;IACZC,GAAA,EAAK;IACLC,OAAA,EAAS;EACb;EACW1B,eAAA,GAAkBwB,SAAA,CAAUP,mBAAA,CAAAE,QAAA,CAASC,EAAE,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["to","__toCommonJS","mod","__copyProps","__defProp","value","constants_native_exports","__export","currentPlatform","isAndroid","isBrowser","isChrome","isClient","isIos","isServer","isTV","isTouchable","isWeb","isWebTouchable","isWindowDefined","useIsomorphicLayoutEffect","module","exports","import_react","require","import_react_native","useLayoutEffect","Platform","OS","process","env","TEST_NATIVE_PLATFORM","ios","android"],"sources":["../../src/constants.native.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;EAAA,OAAAA,EAAA;AAAA;AAAA,IAAAC,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,KAAA,EAAAA,CAAA,KAAAA,KAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,IAAA,EAAAA,CAAA,KAAAA,IAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,KAAA,EAAAA,CAAA,KAAAA,KAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,yBAAgC,EAAAA,CAAA,KAAAA;AAChC;AACOC,MAAI,CAAAC,OAAQ,GAAArB,YAAA,CAAAK,wBAAA;AACZ,IAAIiB,YAAY,GAAAC,OAAA;AAChB,IAAIC,mBAAW,GAAAD,OAAA;AACf,IAAIP,KAAA,QAAW;AAC0B,IAAIP,SAAA;AAC7C,IAAII,QAAA;AACJ,IAAIF,QAAA,GAAW;AACf,IAAIO,eAAA,GAAiB;AACrB,IAAIC,yBAAc,GAAAG,YAAA,CAAAG,eAAA;AAGlB,IAAIf,QAAA,QAAa;AAEjB,IAAIO,cAAS;AACb,IAAIF,WAAQ;AACnB,IAAIP,SAAA,GAAY,CAAAgB,mBAAA,CAAAE,QAAA,aAAAF,mBAAA,CAAAE,QAAA,uBAAAF,mBAAA,CAAAE,QAAA,CAAAC,EAAA,mBAAAC,OAAA,CAAAC,GAAA,CAAAC,oBAAA,kBAAAF,OAAA,CAAAC,GAAA,CAAAC,oBAAA;AAAA,IACZlB,KAAK,IAAAY,mBAAA,CAAAE,QAAA,aAAAF,mBAAA,CAAAE,QAAA,uBAAAF,mBAAA,CAAAE,QAAA,CAAAC,EAAA,eAAAC,OAAA,CAAAC,GAAA,CAAAC,oBAAA,cAAAF,OAAA,CAAAC,GAAA,CAAAC,oBAAA;AAAA,IACLhB,IAAA,GAAS,CAAAU,mBAAA,CAAAE,QAAA,aAAAF,mBAAA,CAAAE,QAAA,uBAAAF,mBAAA,CAAAE,QAAA,CAAAZ,IAAA,KAAAc,OAAA,CAAAC,GAAA,CAAAC,oBAAA,oBAAAF,OAAA,CAAAC,GAAA,CAAAC,oBAAA;AACb,IAAAvB,eAAA,KAAAiB,mBAAA,CAAAE,QAAA,aAAAF,mBAAA,CAAAE,QAAA,uBAAAF,mBAAA,CAAAE,QAAA,CAAAC,EAAA;EAMWI,GAAI;EAKfC,OAAK;AACD,EAAAR,mBAAY,CAAAE,QAAA,CAAiBC,EAAA","ignoreList":[]}
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
7
8
  get: () => from[key],
8
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
10
  });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
15
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
10
  get: () => from[key],
10
11
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
12
  });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
17
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
18
+ value: true
17
19
  }), mod);
18
20
  var index_exports = {};
19
21
  module.exports = __toCommonJS(index_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
@@ -1,15 +1,16 @@
1
1
  import { useEffect, useLayoutEffect } from "react";
2
- const isWeb = !0,
3
- isBrowser = typeof window < "u",
4
- isServer = isWeb && !isBrowser,
5
- isClient = isWeb && isBrowser,
6
- isWindowDefined = isBrowser,
7
- useIsomorphicLayoutEffect = isServer ? useEffect : useLayoutEffect,
8
- isChrome = typeof navigator < "u" && /Chrome/.test(navigator.userAgent || ""),
9
- isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0),
10
- isTouchable = !isWeb || isWebTouchable,
11
- isAndroid = !1,
12
- isIos = process.env.TEST_NATIVE_PLATFORM === "ios",
13
- currentPlatform = "web";
14
- export { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isServer, isTouchable, isWeb, isWebTouchable, isWindowDefined, useIsomorphicLayoutEffect };
2
+ const isWeb = true;
3
+ const isBrowser = typeof window !== "undefined";
4
+ const isServer = !isBrowser;
5
+ const isClient = isBrowser;
6
+ const isWindowDefined = isBrowser;
7
+ const useIsomorphicLayoutEffect = isServer ? useEffect : useLayoutEffect;
8
+ const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
9
+ const isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
10
+ const isTouchable = isWebTouchable;
11
+ const isAndroid = process.env.TEST_NATIVE_PLATFORM === "android" || process.env.TEST_NATIVE_PLATFORM === "androidtv";
12
+ const isIos = process.env.TEST_NATIVE_PLATFORM === "ios" || process.env.TEST_NATIVE_PLATFORM === "tvos";
13
+ const isTV = process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
14
+ const currentPlatform = "web";
15
+ export { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isServer, isTV, isTouchable, isWeb, isWebTouchable, isWindowDefined, useIsomorphicLayoutEffect };
15
16
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useLayoutEffect","isWeb","isBrowser","window","isServer","isClient","isWindowDefined","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,SAAA,GAAqB,OAAOC,MAAA,GAAW;EACvCC,QAAA,GAAoBH,KAAA,IAAS,CAACC,SAAA;EAC9BG,QAAA,GAAoBJ,KAAA,IAASC,SAAA;EAE7BI,eAAA,GAA2BJ,SAAA;EAE3BK,yBAAA,GAA8CH,QAAA,GACvDL,SAAA,GACAC,eAAA;EAESQ,QAAA,GACX,OAAOC,SAAA,GAAc,OAAe,SAASC,IAAA,CAAKD,SAAA,CAAUE,SAAA,IAAa,EAAE;EAEhEC,cAAA,GACXP,QAAA,KAAa,kBAAkBF,MAAA,IAAUM,SAAA,CAAUI,cAAA,GAAiB;EAEzDC,WAAA,GAAuB,CAACb,KAAA,IAASW,cAAA;EAEjCG,SAAA,GAAqB;EACrBC,KAAA,GAAiBC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;EACtDC,eAAA,GAAwD","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useLayoutEffect","isWeb","isBrowser","window","isServer","isClient","isWindowDefined","useIsomorphicLayoutEffect","isChrome","navigator","test","userAgent","isWebTouchable","maxTouchPoints","isTouchable","isAndroid","process","env","TEST_NATIVE_PLATFORM","isIos","isTV","currentPlatform"],"sources":["../../src/constants.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,EAAWC,eAAA,QAAuB;AAEpC,MAAMC,KAAA,GAAiB;AACvB,MAAMC,SAAA,GAAqB,OAAOC,MAAA,KAAW;AAC7C,MAAMC,QAAA,GAAoB,CAAAF,SAAU;AACpC,MAAMG,QAAA,GAAoBH,SAAS;AAEnC,MAAMI,eAAA,GAA2BJ,SAAA;AAEjC,MAAMK,yBAAA,GAA8CH,QAAA,GACvDL,SAAA,GACAC,eAAA;AAEG,MAAMQ,QAAA,GACX,OAAOC,SAAA,KAAc,eAAe,SAASC,IAAA,CAAKD,SAAA,CAAUE,SAAA,IAAa,EAAE;AAEtE,MAAMC,cAAA,GACXP,QAAA,KAAa,kBAAkBF,MAAA,IAAUM,SAAA,CAAUI,cAAA,GAAiB;AAE/D,MAAMC,WAAA,GAAuBF,cAAU;AAKvC,MAAMG,SAAA,GACXC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB,aAAAF,OAAA,CAAAC,GAAA,CAAAC,oBAAA;AAErC,MAAAC,KAAQ,GAAIH,OAAA,CAAAC,GAAA,CAAAC,oBAAyB,cAAAF,OAAA,CAAAC,GAAA,CAAAC,oBAAA;AAChC,MAAME,IAAA,GAAAJ,OACX,CAAAC,GAAQ,CAAAC,oBAAI,gBAAyB,IAAAF,OAAA,CAAAC,GAAA,CAAAC,oBAAA;AAErC,MAAAG,eAAY;AACP,SAAMA,eACH,EAAIN,SAAA,EAAAb,SAAA,EAAAM,QAAyB,EAAAH,QACrC,EAAAc,KAAQ,EAAAf,QAAI,EAAAgB,IAAA,EAAAN,WAAyB,EAAAb,KAAA,EAAAW,cAAA,EAAAN,eAAA,EAAAC,yBAAA","ignoreList":[]}
@@ -1,20 +1,20 @@
1
1
  import { useLayoutEffect } from "react";
2
2
  import { Platform } from "react-native";
3
- var isWeb = !1,
4
- isBrowser = !1,
5
- isServer = !1,
6
- isClient = !0,
7
- isWindowDefined = !1,
8
- useIsomorphicLayoutEffect = useLayoutEffect,
9
- isChrome = !1,
10
- isWebTouchable = !1,
11
- isTouchable = !0,
12
- isAndroid = Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android",
13
- isIos = Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios",
14
- platforms = {
15
- ios: "ios",
16
- android: "android"
17
- },
18
- currentPlatform = platforms[Platform.OS] || "native";
19
- export { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isServer, isTouchable, isWeb, isWebTouchable, isWindowDefined, useIsomorphicLayoutEffect };
3
+ var isWeb = false;
4
+ var isBrowser = false;
5
+ var isServer = false;
6
+ var isClient = true;
7
+ var isWindowDefined = false;
8
+ var useIsomorphicLayoutEffect = useLayoutEffect;
9
+ var isChrome = false;
10
+ var isWebTouchable = false;
11
+ var isTouchable = true;
12
+ var isAndroid = (Platform === null || Platform === void 0 ? void 0 : Platform.OS) === "android" || process.env.TEST_NATIVE_PLATFORM === "android" || process.env.TEST_NATIVE_PLATFORM === "androidtv";
13
+ var isIos = (Platform === null || Platform === void 0 ? void 0 : Platform.OS) === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios" || process.env.TEST_NATIVE_PLATFORM === "tvos";
14
+ var isTV = (Platform === null || Platform === void 0 ? void 0 : Platform.isTV) || process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
15
+ var currentPlatform = ((Platform === null || Platform === void 0 ? void 0 : Platform.OS) ? {
16
+ ios: "ios",
17
+ android: "android"
18
+ }[Platform.OS] : void 0) || "native";
19
+ export { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isServer, isTV, isTouchable, isWeb, isWebTouchable, isWindowDefined, useIsomorphicLayoutEffect };
20
20
  //# sourceMappingURL=constants.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useLayoutEffect","Platform","isWeb","isBrowser","isServer","isClient","isWindowDefined","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,QAAuB;AAChC,SAASC,QAAA,QAAgB;AAClB,IAAIC,KAAA,GAAQ;EACRC,SAAA,GAAY;EACZC,QAAA,GAAW;EACXC,QAAA,GAAW;EAC8BC,eAAA,GAAkB;EAC3DC,yBAAA,GAA4BP,eAAA;EAC5BQ,QAAA,GAAW;EACXC,cAAA,GAAiB;EACjBC,WAAA,GAAc;EACdC,SAAA,GAAYV,QAAA,CAASW,EAAA,KAAO,aAAaC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;EAC9EC,KAAA,GAAQf,QAAA,CAASW,EAAA,KAAO,SAASC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;EAC7EE,SAAA,GAAY;IACZC,GAAA,EAAK;IACLC,OAAA,EAAS;EACb;EACWC,eAAA,GAAkBH,SAAA,CAAUhB,QAAA,CAASW,EAAE,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["useLayoutEffect","Platform","isWeb","isBrowser","isServer","isClient","isWindowDefined","useIsomorphicLayoutEffect","isChrome","isWebTouchable","isTouchable","isAndroid","OS","process","env","TEST_NATIVE_PLATFORM","isIos","isTV","currentPlatform","ios","android"],"sources":["../../src/constants.native.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAChC,SAASC,QAAA,QAAgB;AAClB,IAAIC,KAAA,GAAQ;AACZ,IAAIC,SAAA,GAAY;AAChB,IAAIC,QAAA,GAAW;AACf,IAAIC,QAAA,GAAW;AAC0B,IAAIC,eAAA,GAAkB;AAC/D,IAAIC,yBAAA,GAA4BP,eAAA;AAChC,IAAIQ,QAAA,GAAW;AACf,IAAIC,cAAA,GAAiB;AACrB,IAAIC,WAAA,GAAc;AAGlB,IAAIC,SAAA,IAAaV,QAAA,KAAa,QAAQA,QAAA,KAAa,SAAS,SAASA,QAAA,CAASW,EAAA,MAAQ,aAAaC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB,aAAaF,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAE1L,IAAIC,KAAA,IAASf,QAAA,KAAa,QAAQA,QAAA,KAAa,SAAS,SAASA,QAAA,CAASW,EAAA,MAAQ,SAASC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB,SAASF,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAC9K,IAAIE,IAAA,IAAQhB,QAAA,KAAa,QAAQA,QAAA,KAAa,SAAS,SAASA,QAAA,CAASgB,IAAA,KAASJ,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB,eAAeF,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAClL,IAAIG,eAAY,KAAAjB,QAAA,aAAAA,QAAA,uBAAAA,QAAA,CAAAW,EAAA;EAAAO,GACZ,OAAK;EAAAC,OACL;AACJ,EAAAnB,QAAA,CAAAW,EAAA;AAMW,SAAIM,eAAoB,EAAAP,SAAA,EAAaR,SAAQ,EAAAK,QAAA,EAAaH,QAAA,EAASW,KAAA,EAAAZ,QAAS,EAASa,IAAA,EAAMP,WAAU,EAAAR,KAAA,EAASO,cAAM,EAAcH,eAAA,EAAAC,yBAAA","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./constants";
1
+ export * from "./constants.mjs";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": "AAAA,cAAc;",
5
- "names": []
6
- }
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/constants",
3
- "version": "2.0.0-rc.4",
3
+ "version": "2.0.0-rc.40",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "files": [
6
6
  "src",
@@ -16,15 +16,12 @@
16
16
  "./package.json": "./package.json",
17
17
  ".": {
18
18
  "types": "./types/index.d.ts",
19
- "react-native": {
20
- "module": "./dist/esm/index.native.js",
21
- "import": "./dist/esm/index.native.js",
22
- "require": "./dist/cjs/index.native.js"
23
- },
19
+ "react-native": "./dist/esm/index.native.js",
20
+ "browser": "./dist/esm/index.mjs",
24
21
  "module": "./dist/esm/index.mjs",
25
22
  "import": "./dist/esm/index.mjs",
26
23
  "require": "./dist/cjs/index.cjs",
27
- "default": "./dist/cjs/index.native.js"
24
+ "default": "./dist/esm/index.mjs"
28
25
  }
29
26
  },
30
27
  "publishConfig": {
@@ -37,9 +34,9 @@
37
34
  "clean:build": "tamagui-build clean:build"
38
35
  },
39
36
  "devDependencies": {
40
- "@tamagui/build": "2.0.0-rc.4",
37
+ "@tamagui/build": "2.0.0-rc.40",
41
38
  "react": ">=19",
42
- "react-native": "0.81.5"
39
+ "react-native": "0.83.2"
43
40
  },
44
41
  "peerDependencies": {
45
42
  "react": ">=19",
@@ -11,11 +11,36 @@ export const useIsomorphicLayoutEffect: typeof useEffect = useLayoutEffect
11
11
  export const isChrome: boolean = false
12
12
  export const isWebTouchable: boolean = false
13
13
  export const isTouchable: boolean = true
14
+ // optional chain required: babel extractor loads native.cjs in node where Platform is undefined
15
+ // On Android TV: Platform.OS === 'android' per react-native-tvos
14
16
  export const isAndroid: boolean =
15
- Platform.OS === 'android' || process.env.TEST_NATIVE_PLATFORM === 'android'
17
+ Platform?.OS === 'android' ||
18
+ process.env.TEST_NATIVE_PLATFORM === 'android' ||
19
+ process.env.TEST_NATIVE_PLATFORM === 'androidtv'
20
+ // On tvOS: Platform.OS === 'ios' per react-native-tvos
16
21
  export const isIos: boolean =
17
- Platform.OS === 'ios' || process.env.TEST_NATIVE_PLATFORM === 'ios'
22
+ Platform?.OS === 'ios' ||
23
+ process.env.TEST_NATIVE_PLATFORM === 'ios' ||
24
+ process.env.TEST_NATIVE_PLATFORM === 'tvos'
25
+ export const isTV: boolean =
26
+ Platform?.isTV ||
27
+ process.env.TEST_NATIVE_PLATFORM === 'androidtv' ||
28
+ process.env.TEST_NATIVE_PLATFORM === 'tvos'
18
29
 
19
30
  const platforms = { ios: 'ios', android: 'android' } as const
31
+ /**
32
+ * Reflects Platform.OS. TV platforms are intentionally NOT separate values:
33
+ * - Android TV has Platform.OS === 'android' (react-native-tvos behavior)
34
+ * - tvOS has Platform.OS === 'ios' (react-native-tvos behavior)
35
+ * Use `isTV` combined with `isAndroid`/`isIos` to detect specific TV platforms.
36
+ */
20
37
  export const currentPlatform: 'web' | 'ios' | 'native' | 'android' =
21
- platforms[Platform.OS] || 'native'
38
+ (Platform?.OS ? platforms[Platform.OS] : undefined) || 'native'
39
+
40
+ // In Metro source mode, TAMAGUI_TARGET may not be set by the build tool.
41
+ // Set it here so all process.env.TAMAGUI_TARGET runtime checks work correctly.
42
+ // In pre-built dist, the build tool inlines TAMAGUI_TARGET as a literal string,
43
+ // making this block dead code (if (!'native') → never executes).
44
+ if (!process.env.TAMAGUI_TARGET) {
45
+ process.env.TAMAGUI_TARGET = 'native'
46
+ }
package/src/constants.ts CHANGED
@@ -19,6 +19,32 @@ export const isWebTouchable: boolean =
19
19
 
20
20
  export const isTouchable: boolean = !isWeb || isWebTouchable
21
21
  // set :boolean to avoid inferring type to false
22
- export const isAndroid: boolean = false
23
- export const isIos: boolean = process.env.TEST_NATIVE_PLATFORM === 'ios'
22
+ // On web, isAndroid/isIos are always false in production.
23
+ // TEST_NATIVE_PLATFORM is only set by the test runner (vitest) to simulate native
24
+ // environments (e.g. androidtv, tvos) from a web/jsdom test context.
25
+ export const isAndroid: boolean =
26
+ process.env.TEST_NATIVE_PLATFORM === 'android' ||
27
+ // Android TV has Platform.OS === 'android' per react-native-tvos
28
+ process.env.TEST_NATIVE_PLATFORM === 'androidtv'
29
+ export const isIos: boolean =
30
+ process.env.TEST_NATIVE_PLATFORM === 'ios' ||
31
+ // tvOS has Platform.OS === 'ios' per react-native-tvos
32
+ process.env.TEST_NATIVE_PLATFORM === 'tvos'
33
+ export const isTV: boolean =
34
+ process.env.TEST_NATIVE_PLATFORM === 'androidtv' ||
35
+ process.env.TEST_NATIVE_PLATFORM === 'tvos'
36
+ /**
37
+ * Reflects Platform.OS. TV platforms are intentionally NOT separate values:
38
+ * - Android TV has Platform.OS === 'android' (react-native-tvos behavior)
39
+ * - tvOS has Platform.OS === 'ios' (react-native-tvos behavior)
40
+ * Use `isTV` combined with `isAndroid`/`isIos` to detect specific TV platforms.
41
+ */
24
42
  export const currentPlatform: 'web' | 'ios' | 'native' | 'android' = 'web'
43
+
44
+ // In web source mode (Vite/webpack without pre-built dist), TAMAGUI_TARGET may not be set.
45
+ // Set it here so all process.env.TAMAGUI_TARGET runtime checks work correctly.
46
+ // In pre-built dist, the build tool inlines TAMAGUI_TARGET as a literal string,
47
+ // making this block dead code (if (!'web') → never executes).
48
+ if (!process.env.TAMAGUI_TARGET) {
49
+ process.env.TAMAGUI_TARGET = 'web'
50
+ }
@@ -11,6 +11,13 @@ export declare const isWebTouchable: boolean;
11
11
  export declare const isTouchable: boolean;
12
12
  export declare const isAndroid: boolean;
13
13
  export declare const isIos: boolean;
14
+ export declare const isTV: boolean;
15
+ /**
16
+ * Reflects Platform.OS. TV platforms are intentionally NOT separate values:
17
+ * - Android TV has Platform.OS === 'android' (react-native-tvos behavior)
18
+ * - tvOS has Platform.OS === 'ios' (react-native-tvos behavior)
19
+ * Use `isTV` combined with `isAndroid`/`isIos` to detect specific TV platforms.
20
+ */
14
21
  export declare const currentPlatform: "web" | "ios" | "native" | "android";
15
22
 
16
23
  //# sourceMappingURL=constants.d.ts.map
@@ -1,24 +1,11 @@
1
1
  {
2
- "mappings": "AAAA,SAAS,iBAAkC;AAE3C,OAAO,cAAMA;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;;AAEb,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
- "isBrowser: boolean",
6
- "isServer: boolean",
7
- "isClient: boolean",
8
- "isWindowDefined: boolean",
9
- "useIsomorphicLayoutEffect: typeof useEffect",
10
- "isChrome: boolean",
11
- "isWebTouchable: boolean",
12
- "isTouchable: boolean",
13
- "isAndroid: boolean",
14
- "isIos: boolean",
15
- "currentPlatform: 'web' | 'ios' | 'native' | 'android'"
16
- ],
2
+ "mappings": "AAAA,SAAS,iBAAkC;AAE3C,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM;;AAEb,OAAO,cAAM;AAEb,OAAO,cAAM,kCAAkC;AAI/C,OAAO,cAAM;AAGb,OAAO,cAAM;AAGb,OAAO,cAAM;AAKb,OAAO,cAAM;AAIb,OAAO,cAAM;AAIb,OAAO,cAAM;;;;;;;AASb,OAAO,cAAM,iBAAiB,QAAQ,QAAQ,WAAW",
3
+ "names": [],
17
4
  "sources": [
18
5
  "src/constants.ts"
19
6
  ],
7
+ "version": 3,
20
8
  "sourcesContent": [
21
- "import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb: boolean = true\nexport const isBrowser: boolean = typeof window !== 'undefined'\nexport const isServer: boolean = isWeb && !isBrowser\nexport const isClient: boolean = isWeb && isBrowser\n/** @deprecated use isBrowser instead */\nexport const isWindowDefined: boolean = 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 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"
22
- ],
23
- "version": 3
9
+ "import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb: boolean = true\nexport const isBrowser: boolean = typeof window !== 'undefined'\nexport const isServer: boolean = isWeb && !isBrowser\nexport const isClient: boolean = isWeb && isBrowser\n/** @deprecated use isBrowser instead */\nexport const isWindowDefined: boolean = 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 isTouchable: boolean = !isWeb || isWebTouchable\n// set :boolean to avoid inferring type to 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 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
+ ]
24
11
  }
@@ -11,6 +11,13 @@ export declare const isWebTouchable: boolean;
11
11
  export declare const isTouchable: boolean;
12
12
  export declare const isAndroid: boolean;
13
13
  export declare const isIos: boolean;
14
+ export declare const isTV: boolean;
15
+ /**
16
+ * Reflects Platform.OS. TV platforms are intentionally NOT separate values:
17
+ * - Android TV has Platform.OS === 'android' (react-native-tvos behavior)
18
+ * - tvOS has Platform.OS === 'ios' (react-native-tvos behavior)
19
+ * Use `isTV` combined with `isAndroid`/`isIos` to detect specific TV platforms.
20
+ */
14
21
  export declare const currentPlatform: "web" | "ios" | "native" | "android";
15
22
 
16
23
  //# sourceMappingURL=constants.native.d.ts.map
@@ -1,24 +1,11 @@
1
1
  {
2
- "mappings": "AAAA,cAA+B,iBAAiB;AAGhD,OAAO,cAAMA;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;AACb,OAAO,cAAMC;;AAEb,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
- "isBrowser: boolean",
6
- "isServer: boolean",
7
- "isClient: boolean",
8
- "isWindowDefined: boolean",
9
- "useIsomorphicLayoutEffect: typeof useEffect",
10
- "isChrome: boolean",
11
- "isWebTouchable: boolean",
12
- "isTouchable: boolean",
13
- "isAndroid: boolean",
14
- "isIos: boolean",
15
- "currentPlatform: 'web' | 'ios' | 'native' | 'android'"
16
- ],
2
+ "mappings": "AAAA,cAA+B,iBAAiB;AAGhD,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM;;AAEb,OAAO,cAAM;AACb,OAAO,cAAM,kCAAkC;AAC/C,OAAO,cAAM;AACb,OAAO,cAAM;AACb,OAAO,cAAM;AAGb,OAAO,cAAM;AAKb,OAAO,cAAM;AAIb,OAAO,cAAM;;;;;;;AAYb,OAAO,cAAM,iBAAiB,QAAQ,QAAQ,WAAW",
3
+ "names": [],
17
4
  "sources": [
18
5
  "src/constants.native.ts"
19
6
  ],
7
+ "version": 3,
20
8
  "sourcesContent": [
21
- "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\n/** @deprecated use isBrowser instead */\nexport const isWindowDefined: 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"
22
- ],
23
- "version": 3
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\n/** @deprecated use isBrowser instead */\nexport const isWindowDefined: boolean = false\nexport const useIsomorphicLayoutEffect: typeof useEffect = useLayoutEffect\nexport const isChrome: boolean = false\nexport const isWebTouchable: boolean = false\nexport const isTouchable: boolean = true\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 isTV: boolean =\n Platform?.isTV ||\n process.env.TEST_NATIVE_PLATFORM === 'androidtv' ||\n process.env.TEST_NATIVE_PLATFORM === 'tvos'\n\nconst platforms = { ios: 'ios', android: 'android' } 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' =\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
+ ]
24
11
  }
@@ -4,8 +4,8 @@
4
4
  "sources": [
5
5
  "src/index.ts"
6
6
  ],
7
+ "version": 3,
7
8
  "sourcesContent": [
8
9
  "export * from './constants'\n"
9
- ],
10
- "version": 3
10
+ ]
11
11
  }
@@ -1,33 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var constants_exports = {};
16
- __export(constants_exports, {
17
- currentPlatform: () => currentPlatform,
18
- isAndroid: () => isAndroid,
19
- isBrowser: () => isBrowser,
20
- isChrome: () => isChrome,
21
- isClient: () => isClient,
22
- isIos: () => isIos,
23
- isServer: () => isServer,
24
- isTouchable: () => isTouchable,
25
- isWeb: () => isWeb,
26
- isWebTouchable: () => isWebTouchable,
27
- isWindowDefined: () => isWindowDefined,
28
- useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
29
- });
30
- module.exports = __toCommonJS(constants_exports);
31
- var import_react = require("react");
32
- const isWeb = !0, isBrowser = typeof window < "u", isServer = isWeb && !isBrowser, isClient = isWeb && isBrowser, isWindowDefined = isBrowser, 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";
33
- //# sourceMappingURL=constants.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/constants.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2C;AAEpC,MAAM,QAAiB,IACjB,YAAqB,OAAO,SAAW,KACvC,WAAoB,SAAS,CAAC,WAC9B,WAAoB,SAAS,WAE7B,kBAA2B,WAE3B,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
- }
package/dist/cjs/index.js DELETED
@@ -1,15 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var index_exports = {};
13
- module.exports = __toCommonJS(index_exports);
14
- __reExport(index_exports, require("./constants"), module.exports);
15
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,wBAAd;",
5
- "names": []
6
- }
@@ -1,17 +0,0 @@
1
- import { useEffect, useLayoutEffect } from "react";
2
- const isWeb = !0, isBrowser = typeof window < "u", isServer = isWeb && !isBrowser, isClient = isWeb && isBrowser, isWindowDefined = isBrowser, 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
- export {
4
- currentPlatform,
5
- isAndroid,
6
- isBrowser,
7
- isChrome,
8
- isClient,
9
- isIos,
10
- isServer,
11
- isTouchable,
12
- isWeb,
13
- isWebTouchable,
14
- isWindowDefined,
15
- useIsomorphicLayoutEffect
16
- };
17
- //# sourceMappingURL=constants.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/constants.ts"],
4
- "mappings": "AAAA,SAAS,WAAW,uBAAuB;AAEpC,MAAM,QAAiB,IACjB,YAAqB,OAAO,SAAW,KACvC,WAAoB,SAAS,CAAC,WAC9B,WAAoB,SAAS,WAE7B,kBAA2B,WAE3B,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
- "names": []
6
- }