@hanzogui/constants 7.0.0 → 7.3.0

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/LICENSE CHANGED
@@ -1,21 +1,42 @@
1
- MIT License
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026-present, Hanzo AI, Inc.
4
+
5
+ Portions of this software are derived from upstream code originally licensed under
6
+ the MIT License, with the following copyright notices retained per its terms:
2
7
 
3
8
  Copyright (c) 2020 Nate Wienert
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
9
+ Copyright (c) 2015-present, Nicolas Gallagher.
10
+ Copyright (c) 2015-present, Facebook, Inc.
11
+ Copyright (c) 2021 Radix
12
+ Copyright (c) 2017 Carmelo Pullara
13
+ Copyright (c) 2018 Framer B.V.
14
+ Copyright (c) 2022 WorkOS
15
+
16
+ All rights reserved.
17
+
18
+ Redistribution and use in source and binary forms, with or without
19
+ modification, are permitted provided that the following conditions are met:
20
+
21
+ 1. Redistributions of source code must retain the above copyright notice, this
22
+ list of conditions and the following disclaimer.
23
+
24
+ 2. Redistributions in binary form must reproduce the above copyright notice,
25
+ this list of conditions and the following disclaimer in the documentation
26
+ and/or other materials provided with the distribution.
27
+
28
+ 3. Neither the name of the copyright holder nor the names of its contributors
29
+ may be used to endorse or promote products derived from this software
30
+ without specific prior written permission.
31
+
32
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
36
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
37
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
39
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
40
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42
+ POSSIBILITY OF SUCH DAMAGE.
@@ -40,21 +40,14 @@ module.exports = __toCommonJS(constants_exports);
40
40
  var import_react = require("react");
41
41
  const isWeb = true;
42
42
  const isBrowser = typeof document !== "undefined";
43
- const isServer = isWeb && !isBrowser;
44
- const isClient = isWeb && isBrowser;
43
+ const isServer = !isBrowser;
44
+ const isClient = isBrowser;
45
45
  const isWindowDefined = isBrowser;
46
46
  const useIsomorphicLayoutEffect = isServer ? import_react.useEffect : import_react.useLayoutEffect;
47
47
  const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
48
48
  const isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
49
- const isTouchable = !isWeb || isWebTouchable;
50
- const isAndroid = process.env.TEST_NATIVE_PLATFORM === "android" ||
51
- // Android TV has Platform.OS === 'android' per react-native-tvos
52
- process.env.TEST_NATIVE_PLATFORM === "androidtv";
53
- const isIos = process.env.TEST_NATIVE_PLATFORM === "ios" ||
54
- // tvOS has Platform.OS === 'ios' per react-native-tvos
55
- process.env.TEST_NATIVE_PLATFORM === "tvos";
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";
56
52
  const isTV = process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
57
- const currentPlatform = "web";
58
- if (!process.env.TAMAGUI_TARGET) {
59
- process.env.TAMAGUI_TARGET = "web";
60
- }
53
+ const currentPlatform = "web";
@@ -53,12 +53,8 @@ var isTouchable = true;
53
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
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
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 platforms = {
56
+ var currentPlatform = ((import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) ? {
57
57
  ios: "ios",
58
58
  android: "android"
59
- };
60
- var currentPlatform = ((import_react_native.Platform === null || import_react_native.Platform === void 0 ? void 0 : import_react_native.Platform.OS) ? platforms[import_react_native.Platform.OS] : void 0) || "native";
61
- if (!process.env.TAMAGUI_TARGET) {
62
- process.env.TAMAGUI_TARGET = "native";
63
- }
59
+ }[import_react_native.Platform.OS] : void 0) || "native";
64
60
  //# sourceMappingURL=constants.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["constants_native_exports","__export","currentPlatform","isAndroid","isBrowser","isChrome","isClient","isIos","isServer","isTV","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","TAMAGUI_TARGET"],"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,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,yBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAjB,wBAAA;AAAA,IAAAkB,YAAA,GAAgCC,OAAA;AAChC,IAAAC,mBAAA,GAAyBD,OAAA;AAClB,IAAIR,KAAA,GAAQ;AACZ,IAAIP,SAAA,GAAY;AAChB,IAAII,QAAA,GAAW;AACf,IAAIF,QAAA,GAAW;AAC0B,IAAIO,eAAA,GAAkB;AAC/D,IAAIC,yBAAA,GAA4BI,YAAA,CAAAG,eAAA;AAChC,IAAIhB,QAAA,GAAW;AACf,IAAIO,cAAA,GAAiB;AACrB,IAAIF,WAAA,GAAc;AAGlB,IAAIP,SAAA,IAAaiB,mBAAA,CAAAE,QAAA,KAAa,QAAQF,mBAAA,CAAAE,QAAA,KAAa,SAAS,SAASF,mBAAA,CAAAE,QAAA,CAASC,EAAA,MAAQ,aAAaC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB,aAAaF,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAE1L,IAAInB,KAAA,IAASa,mBAAA,CAAAE,QAAA,KAAa,QAAQF,mBAAA,CAAAE,QAAA,KAAa,SAAS,SAASF,mBAAA,CAAAE,QAAA,CAASC,EAAA,MAAQ,SAASC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB,SAASF,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAC9K,IAAIjB,IAAA,IAAQW,mBAAA,CAAAE,QAAA,KAAa,QAAQF,mBAAA,CAAAE,QAAA,KAAa,SAAS,SAASF,mBAAA,CAAAE,QAAA,CAASb,IAAA,KAASe,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB,eAAeF,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAClL,IAAIC,SAAA,GAAY;EACZC,GAAA,EAAK;EACLC,OAAA,EAAS;AACb;AAMW,IAAI3B,eAAA,KAAoBkB,mBAAA,CAAAE,QAAA,KAAa,QAAQF,mBAAA,CAAAE,QAAA,KAAa,SAAS,SAASF,mBAAA,CAAAE,QAAA,CAASC,EAAA,IAAMI,SAAA,CAAUP,mBAAA,CAAAE,QAAA,CAASC,EAAE,IAAI,WAAc;AAK7I,IAAI,CAACC,OAAA,CAAQC,GAAA,CAAIK,cAAA,EAAgB;EAC7BN,OAAA,CAAQC,GAAA,CAAIK,cAAA,GAAiB;AACjC","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,CAAAC,EAAA","ignoreList":[]}
@@ -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":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__reExport","target","mod","secondTarget","__toCommonJS","value","index_exports","module","exports","require"],"sources":["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//# sourceMappingURL=index.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIV,iBAAiB,CAACO,IAAI,CAAC,EACrC,IAAI,CAACL,YAAY,CAACS,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/Cb,SAAS,CAACW,EAAE,EAAEI,GAAG,EAAE;MAAEE,GAAG,EAAEA,CAAA,KAAML,IAAI,CAACG,GAAG,CAAC;MAAEG,UAAU,EAAE,EAAEJ,IAAI,GAAGX,gBAAgB,CAACS,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACI;IAAW,CAAC,CAAC;EACxH;EACA,OAAOP,EAAE;AACX,CAAC;AACD,IAAIQ,UAAU,GAAGA,CAACC,MAAM,EAAEC,GAAG,EAAEC,YAAY,MAAMZ,WAAW,CAACU,MAAM,EAAEC,GAAG,EAAE,SAAS,CAAC,EAAEC,YAAY,IAAIZ,WAAW,CAACY,YAAY,EAAED,GAAG,EAAE,SAAS,CAAC,CAAC;AAChJ,IAAIE,YAAY,GAAIF,GAAG,IAAKX,WAAW,CAACV,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAEwB,KAAK,EAAE;AAAK,CAAC,CAAC,EAAEH,GAAG,CAAC;AAC1F,IAAII,aAAa,GAAG,CAAC,CAAC;AACtBC,MAAM,CAACC,OAAO,GAAGJ,YAAY,CAACE,aAAa,CAAC;AAC5CN,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,uBAAa,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC","ignoreList":[]}
@@ -1,23 +1,16 @@
1
1
  import { useEffect, useLayoutEffect } from "react";
2
2
  const isWeb = true;
3
3
  const isBrowser = typeof document !== "undefined";
4
- const isServer = isWeb && !isBrowser;
5
- const isClient = isWeb && isBrowser;
4
+ const isServer = !isBrowser;
5
+ const isClient = isBrowser;
6
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);
10
- const isTouchable = !isWeb || isWebTouchable;
11
- const isAndroid = process.env.TEST_NATIVE_PLATFORM === "android" ||
12
- // Android TV has Platform.OS === 'android' per react-native-tvos
13
- process.env.TEST_NATIVE_PLATFORM === "androidtv";
14
- const isIos = process.env.TEST_NATIVE_PLATFORM === "ios" ||
15
- // tvOS has Platform.OS === 'ios' per react-native-tvos
16
- process.env.TEST_NATIVE_PLATFORM === "tvos";
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";
17
13
  const isTV = process.env.TEST_NATIVE_PLATFORM === "androidtv" || process.env.TEST_NATIVE_PLATFORM === "tvos";
18
14
  const currentPlatform = "web";
19
- if (!process.env.TAMAGUI_TARGET) {
20
- process.env.TAMAGUI_TARGET = "web";
21
- }
22
15
  export { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isServer, isTV, isTouchable, isWeb, isWebTouchable, isWindowDefined, useIsomorphicLayoutEffect };
23
16
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useLayoutEffect","isWeb","isBrowser","document","isServer","isClient","isWindowDefined","useIsomorphicLayoutEffect","isChrome","navigator","test","userAgent","isWebTouchable","window","maxTouchPoints","isTouchable","isAndroid","process","env","TEST_NATIVE_PLATFORM","isIos","isTV","currentPlatform","TAMAGUI_TARGET"],"sources":["../../src/constants.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,EAAWC,eAAA,QAAuB;AAEpC,MAAMC,KAAA,GAAiB;AAGvB,MAAMC,SAAA,GAAqB,OAAOC,QAAA,KAAa;AAC/C,MAAMC,QAAA,GAAoBH,KAAA,IAAS,CAACC,SAAA;AACpC,MAAMG,QAAA,GAAoBJ,KAAA,IAASC,SAAA;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,kBAAkBQ,MAAA,IAAUJ,SAAA,CAAUK,cAAA,GAAiB;AAE/D,MAAMC,WAAA,GAAuB,CAACd,KAAA,IAASW,cAAA;AAKvC,MAAMI,SAAA,GACXC,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAAA;AAErCF,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAChC,MAAMC,KAAA,GACXH,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAAA;AAErCF,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAChC,MAAME,IAAA,GACXJ,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB,eACrCF,OAAA,CAAQC,GAAA,CAAIC,oBAAA,KAAyB;AAOhC,MAAMG,eAAA,GAAwD;AAMrE,IAAI,CAACL,OAAA,CAAQC,GAAA,CAAIK,cAAA,EAAgB;EAC/BN,OAAA,CAAQC,GAAA,CAAIK,cAAA,GAAiB;AAC/B","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useLayoutEffect","isWeb","isBrowser","document","isServer","isClient","isWindowDefined","useIsomorphicLayoutEffect","isChrome","navigator","test","userAgent","isWebTouchable","window","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;AAGvB,MAAMC,SAAA,GAAqB,OAAOC,QAAA,KAAa;AAC/C,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,kBAAkBQ,MAAA,IAAUJ,SAAA,CAAUK,cAAA,GAAiB;AAE/D,MAAMC,WAAA,GAAuBH,cAAU;AAKvC,MAAMI,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,EAAAd,SAAA,EAAAM,QAAyB,EAAAH,QACrC,EAAAe,KAAQ,EAAAhB,QAAI,EAAAiB,IAAA,EAAAN,WAAyB,EAAAd,KAAA,EAAAW,cAAA,EAAAN,eAAA,EAAAC,yBAAA","ignoreList":[]}
@@ -12,13 +12,9 @@ var isTouchable = true;
12
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
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
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 platforms = {
15
+ var currentPlatform = ((Platform === null || Platform === void 0 ? void 0 : Platform.OS) ? {
16
16
  ios: "ios",
17
17
  android: "android"
18
- };
19
- var currentPlatform = ((Platform === null || Platform === void 0 ? void 0 : Platform.OS) ? platforms[Platform.OS] : void 0) || "native";
20
- if (!process.env.TAMAGUI_TARGET) {
21
- process.env.TAMAGUI_TARGET = "native";
22
- }
18
+ }[Platform.OS] : void 0) || "native";
23
19
  export { currentPlatform, isAndroid, isBrowser, isChrome, isClient, isIos, isServer, isTV, isTouchable, isWeb, isWebTouchable, isWindowDefined, useIsomorphicLayoutEffect };
24
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","isTV","platforms","ios","android","currentPlatform","TAMAGUI_TARGET"],"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,SAAA,GAAY;EACZC,GAAA,EAAK;EACLC,OAAA,EAAS;AACb;AAMW,IAAIC,eAAA,KAAoBpB,QAAA,KAAa,QAAQA,QAAA,KAAa,SAAS,SAASA,QAAA,CAASW,EAAA,IAAMM,SAAA,CAAUjB,QAAA,CAASW,EAAE,IAAI,WAAc;AAK7I,IAAI,CAACC,OAAA,CAAQC,GAAA,CAAIQ,cAAA,EAAgB;EAC7BT,OAAA,CAAQC,GAAA,CAAIQ,cAAA,GAAiB;AACjC","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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzogui/constants",
3
- "version": "7.0.0",
3
+ "version": "7.3.0",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "files": [
6
6
  "src",
@@ -28,18 +28,20 @@
28
28
  "access": "public"
29
29
  },
30
30
  "scripts": {
31
- "build": "hanzo-gui-build",
32
- "watch": "hanzo-gui-build --watch",
33
- "clean": "hanzo-gui-build clean",
34
- "clean:build": "hanzo-gui-build clean:build"
31
+ "build": "gui-build",
32
+ "watch": "gui-build --watch",
33
+ "clean": "gui-build clean",
34
+ "clean:build": "gui-build clean:build"
35
35
  },
36
36
  "devDependencies": {
37
- "@hanzogui/build": "^7.0.0",
37
+ "@hanzogui/build": "7.3.0",
38
38
  "react": ">=19",
39
39
  "react-native": "0.83.2"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": ">=19",
43
43
  "react-native": "*"
44
- }
45
- }
44
+ },
45
+ "license": "BSD-3-Clause",
46
+ "author": "Hanzo AI <dev@hanzo.ai>"
47
+ }
@@ -37,10 +37,10 @@ const platforms = { ios: 'ios', android: 'android' } as const
37
37
  export const currentPlatform: 'web' | 'ios' | 'native' | 'android' =
38
38
  (Platform?.OS ? platforms[Platform.OS] : undefined) || 'native'
39
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,
40
+ // In Metro source mode, GUI_TARGET may not be set by the build tool.
41
+ // Set it here so all process.env.GUI_TARGET runtime checks work correctly.
42
+ // In pre-built dist, the build tool inlines GUI_TARGET as a literal string,
43
43
  // making this block dead code (if (!'native') → never executes).
44
- if (!process.env.TAMAGUI_TARGET) {
45
- process.env.TAMAGUI_TARGET = 'native'
44
+ if (!process.env.GUI_TARGET) {
45
+ process.env.GUI_TARGET = 'native'
46
46
  }
package/src/constants.ts CHANGED
@@ -43,10 +43,10 @@ export const isTV: boolean =
43
43
  */
44
44
  export const currentPlatform: 'web' | 'ios' | 'native' | 'android' = 'web'
45
45
 
46
- // In web source mode (Vite/webpack without pre-built dist), TAMAGUI_TARGET may not be set.
47
- // Set it here so all process.env.TAMAGUI_TARGET runtime checks work correctly.
48
- // In pre-built dist, the build tool inlines TAMAGUI_TARGET as a literal string,
46
+ // In web source mode (Vite/webpack without pre-built dist), GUI_TARGET may not be set.
47
+ // Set it here so all process.env.GUI_TARGET runtime checks work correctly.
48
+ // In pre-built dist, the build tool inlines GUI_TARGET as a literal string,
49
49
  // making this block dead code (if (!'web') → never executes).
50
- if (!process.env.TAMAGUI_TARGET) {
51
- process.env.TAMAGUI_TARGET = 'web'
50
+ if (!process.env.GUI_TARGET) {
51
+ process.env.GUI_TARGET = 'web'
52
52
  }
@@ -6,6 +6,6 @@
6
6
  ],
7
7
  "version": 3,
8
8
  "sourcesContent": [
9
- "import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb: boolean = true\n// check document not window — RN polyfills global.window but not document,\n// so this is the only reliable \"is DOM environment\" check.\nexport const isBrowser: boolean = typeof document !== '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"
9
+ "import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb: boolean = true\n// check document not window — RN polyfills global.window but not document,\n// so this is the only reliable \"is DOM environment\" check.\nexport const isBrowser: boolean = typeof document !== '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), GUI_TARGET may not be set.\n// Set it here so all process.env.GUI_TARGET runtime checks work correctly.\n// In pre-built dist, the build tool inlines GUI_TARGET as a literal string,\n// making this block dead code (if (!'web') → never executes).\nif (!process.env.GUI_TARGET) {\n process.env.GUI_TARGET = 'web'\n}\n"
10
10
  ]
11
11
  }
@@ -6,6 +6,6 @@
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\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"
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, GUI_TARGET may not be set by the build tool.\n// Set it here so all process.env.GUI_TARGET runtime checks work correctly.\n// In pre-built dist, the build tool inlines GUI_TARGET as a literal string,\n// making this block dead code (if (!'native') → never executes).\nif (!process.env.GUI_TARGET) {\n process.env.GUI_TARGET = 'native'\n}\n"
10
10
  ]
11
11
  }