@tamagui/constants 1.6.3 → 1.7.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/dist/cjs/index.js +73 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/index.native.js +54 -0
- package/dist/cjs/index.native.js.map +7 -0
- package/dist/esm/index.js +40 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/index.mjs +40 -0
- package/dist/esm/index.mjs.map +7 -0
- package/dist/esm/index.native.js +22 -0
- package/dist/esm/index.native.js.map +7 -0
- package/dist/esm/index.native.mjs +22 -0
- package/dist/esm/index.native.mjs.map +7 -0
- package/package.json +10 -2
- package/types/index.d.ts +11 -0
- package/types/index.native.d.ts +11 -0
- package/types/constants.d.ts.map +0 -1
- package/types/constants.native.d.ts.map +0 -1
- /package/src/{constants.native.ts → index.native.ts} +0 -0
- /package/src/{constants.ts → index.ts} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var src_exports = {};
|
|
20
|
+
__export(src_exports, {
|
|
21
|
+
isChrome: () => isChrome,
|
|
22
|
+
isClient: () => isClient,
|
|
23
|
+
isRSC: () => isRSC,
|
|
24
|
+
isServer: () => isServer,
|
|
25
|
+
isTouchable: () => isTouchable,
|
|
26
|
+
isWeb: () => isWeb,
|
|
27
|
+
isWebTouchable: () => isWebTouchable,
|
|
28
|
+
isWindowDefined: () => isWindowDefined,
|
|
29
|
+
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(src_exports);
|
|
32
|
+
var import_react = require("react");
|
|
33
|
+
const import_meta = {};
|
|
34
|
+
const isWeb = process.env.TAMAGUI_TARGET === "web";
|
|
35
|
+
const isWindowDefined = typeof window !== "undefined";
|
|
36
|
+
const isServer = isWeb && !isWindowDefined;
|
|
37
|
+
const isClient = isWeb && isWindowDefined;
|
|
38
|
+
const isRSC = process.env.ENABLE_RSC ? (
|
|
39
|
+
// note this is statically analyzed so no funny business, just access it without optional chaining
|
|
40
|
+
// @ts-ignore
|
|
41
|
+
import_meta.env ? (
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
import_meta.env.SSR
|
|
44
|
+
) : false
|
|
45
|
+
) : false;
|
|
46
|
+
const idFn = () => {
|
|
47
|
+
};
|
|
48
|
+
const useIsomorphicLayoutEffect = isRSC ? idFn : isServer ? import_react.useEffect : import_react.useLayoutEffect;
|
|
49
|
+
const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
|
|
50
|
+
const isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
51
|
+
const isTouchable = !isWeb || isWebTouchable;
|
|
52
|
+
if (process.env.NODE_ENV === "development") {
|
|
53
|
+
if (!process.env.TAMAGUI_TARGET) {
|
|
54
|
+
console.warn(`Must set TAMAGUI_TARGET to "web" or "native"`);
|
|
55
|
+
} else if (isClient && process.env.TAMAGUI_TARGET !== "web" && process.env.TAMAGUI_IGNORE_TARGET !== "1") {
|
|
56
|
+
console.warn(
|
|
57
|
+
`Must set TAMAGUI_TARGET to "web" for web apps - if you have window defined outside of the browser, set TAMAGUI_IGNORE_TARGET=1 to hide this`
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
isChrome,
|
|
64
|
+
isClient,
|
|
65
|
+
isRSC,
|
|
66
|
+
isServer,
|
|
67
|
+
isTouchable,
|
|
68
|
+
isWeb,
|
|
69
|
+
isWebTouchable,
|
|
70
|
+
isWindowDefined,
|
|
71
|
+
useIsomorphicLayoutEffect
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb = process.env.TAMAGUI_TARGET === 'web'\nexport const isWindowDefined = typeof window !== 'undefined'\nexport const isServer = isWeb && !isWindowDefined\nexport const isClient = isWeb && isWindowDefined\n\n// may want to move to VITE_RSC_BUILD\nexport const isRSC = process.env.ENABLE_RSC\n ? // note this is statically analyzed so no funny business, just access it without optional chaining\n // @ts-ignore\n import.meta.env\n ? // @ts-ignore\n import.meta.env.SSR\n : false\n : false\n\nconst idFn = () => {}\nexport const useIsomorphicLayoutEffect = isRSC\n ? idFn\n : isServer\n ? useEffect\n : useLayoutEffect\nexport const isChrome =\n typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent || '')\n\nexport const isWebTouchable =\n isClient && ('ontouchstart' in window || navigator.maxTouchPoints > 0)\n\nexport const isTouchable = !isWeb || isWebTouchable\n\nif (process.env.NODE_ENV === 'development') {\n if (!process.env.TAMAGUI_TARGET) {\n // eslint-disable-next-line no-console\n console.warn(`Must set TAMAGUI_TARGET to \"web\" or \"native\"`)\n } else if (\n isClient &&\n process.env.TAMAGUI_TARGET !== 'web' &&\n process.env.TAMAGUI_IGNORE_TARGET !== '1'\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n `Must set TAMAGUI_TARGET to \"web\" for web apps - if you have window defined outside of the browser, set TAMAGUI_IGNORE_TARGET=1 to hide this`\n )\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2C;AAA3C;AAEO,MAAM,QAAQ,QAAQ,IAAI,mBAAmB;AAC7C,MAAM,kBAAkB,OAAO,WAAW;AAC1C,MAAM,WAAW,SAAS,CAAC;AAC3B,MAAM,WAAW,SAAS;AAG1B,MAAM,QAAQ,QAAQ,IAAI;AAAA;AAAA;AAAA,EAG7B,YAAY;AAAA;AAAA,IAEV,YAAY,IAAI;AAAA,MAChB;AAAA,IACF;AAEJ,MAAM,OAAO,MAAM;AAAC;AACb,MAAM,4BAA4B,QACrC,OACA,WACA,yBACA;AACG,MAAM,WACX,OAAO,cAAc,eAAe,SAAS,KAAK,UAAU,aAAa,EAAE;AAEtE,MAAM,iBACX,aAAa,kBAAkB,UAAU,UAAU,iBAAiB;AAE/D,MAAM,cAAc,CAAC,SAAS;AAErC,IAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,MAAI,CAAC,QAAQ,IAAI,gBAAgB;AAE/B,YAAQ,KAAK,8CAA8C;AAAA,EAC7D,WACE,YACA,QAAQ,IAAI,mBAAmB,SAC/B,QAAQ,IAAI,0BAA0B,KACtC;AAEA,YAAQ;AAAA,MACN;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_native_exports = {};
|
|
20
|
+
__export(index_native_exports, {
|
|
21
|
+
isChrome: () => isChrome,
|
|
22
|
+
isClient: () => isClient,
|
|
23
|
+
isRSC: () => isRSC,
|
|
24
|
+
isServer: () => isServer,
|
|
25
|
+
isTouchable: () => isTouchable,
|
|
26
|
+
isWeb: () => isWeb,
|
|
27
|
+
isWebTouchable: () => isWebTouchable,
|
|
28
|
+
isWindowDefined: () => isWindowDefined,
|
|
29
|
+
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(index_native_exports);
|
|
32
|
+
var import_react = require("react");
|
|
33
|
+
const isWeb = false;
|
|
34
|
+
const isWindowDefined = false;
|
|
35
|
+
const isServer = false;
|
|
36
|
+
const isClient = false;
|
|
37
|
+
const isRSC = false;
|
|
38
|
+
const useIsomorphicLayoutEffect = import_react.useLayoutEffect;
|
|
39
|
+
const isChrome = false;
|
|
40
|
+
const isWebTouchable = false;
|
|
41
|
+
const isTouchable = true;
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
isChrome,
|
|
45
|
+
isClient,
|
|
46
|
+
isRSC,
|
|
47
|
+
isServer,
|
|
48
|
+
isTouchable,
|
|
49
|
+
isWeb,
|
|
50
|
+
isWebTouchable,
|
|
51
|
+
isWindowDefined,
|
|
52
|
+
useIsomorphicLayoutEffect
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.native.ts"],
|
|
4
|
+
"sourcesContent": ["import { useLayoutEffect } from 'react'\n\nexport const isWeb = false\nexport const isWindowDefined = false\nexport const isServer = false\nexport const isClient = false\nexport const isRSC = false\nexport const useIsomorphicLayoutEffect = useLayoutEffect\nexport const isChrome = false\nexport const isWebTouchable = false\nexport const isTouchable = true\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;AAEzB,MAAM,QAAQ;AACd,MAAM,kBAAkB;AACxB,MAAM,WAAW;AACjB,MAAM,WAAW;AACjB,MAAM,QAAQ;AACd,MAAM,4BAA4B;AAClC,MAAM,WAAW;AACjB,MAAM,iBAAiB;AACvB,MAAM,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect } from "react";
|
|
2
|
+
const isWeb = process.env.TAMAGUI_TARGET === "web";
|
|
3
|
+
const isWindowDefined = typeof window !== "undefined";
|
|
4
|
+
const isServer = isWeb && !isWindowDefined;
|
|
5
|
+
const isClient = isWeb && isWindowDefined;
|
|
6
|
+
const isRSC = process.env.ENABLE_RSC ? (
|
|
7
|
+
// note this is statically analyzed so no funny business, just access it without optional chaining
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
import.meta.env ? (
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
import.meta.env.SSR
|
|
12
|
+
) : false
|
|
13
|
+
) : false;
|
|
14
|
+
const idFn = () => {
|
|
15
|
+
};
|
|
16
|
+
const useIsomorphicLayoutEffect = isRSC ? idFn : isServer ? useEffect : useLayoutEffect;
|
|
17
|
+
const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
|
|
18
|
+
const isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
19
|
+
const isTouchable = !isWeb || isWebTouchable;
|
|
20
|
+
if (process.env.NODE_ENV === "development") {
|
|
21
|
+
if (!process.env.TAMAGUI_TARGET) {
|
|
22
|
+
console.warn(`Must set TAMAGUI_TARGET to "web" or "native"`);
|
|
23
|
+
} else if (isClient && process.env.TAMAGUI_TARGET !== "web" && process.env.TAMAGUI_IGNORE_TARGET !== "1") {
|
|
24
|
+
console.warn(
|
|
25
|
+
`Must set TAMAGUI_TARGET to "web" for web apps - if you have window defined outside of the browser, set TAMAGUI_IGNORE_TARGET=1 to hide this`
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
isChrome,
|
|
31
|
+
isClient,
|
|
32
|
+
isRSC,
|
|
33
|
+
isServer,
|
|
34
|
+
isTouchable,
|
|
35
|
+
isWeb,
|
|
36
|
+
isWebTouchable,
|
|
37
|
+
isWindowDefined,
|
|
38
|
+
useIsomorphicLayoutEffect
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb = process.env.TAMAGUI_TARGET === 'web'\nexport const isWindowDefined = typeof window !== 'undefined'\nexport const isServer = isWeb && !isWindowDefined\nexport const isClient = isWeb && isWindowDefined\n\n// may want to move to VITE_RSC_BUILD\nexport const isRSC = process.env.ENABLE_RSC\n ? // note this is statically analyzed so no funny business, just access it without optional chaining\n // @ts-ignore\n import.meta.env\n ? // @ts-ignore\n import.meta.env.SSR\n : false\n : false\n\nconst idFn = () => {}\nexport const useIsomorphicLayoutEffect = isRSC\n ? idFn\n : isServer\n ? useEffect\n : useLayoutEffect\nexport const isChrome =\n typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent || '')\n\nexport const isWebTouchable =\n isClient && ('ontouchstart' in window || navigator.maxTouchPoints > 0)\n\nexport const isTouchable = !isWeb || isWebTouchable\n\nif (process.env.NODE_ENV === 'development') {\n if (!process.env.TAMAGUI_TARGET) {\n // eslint-disable-next-line no-console\n console.warn(`Must set TAMAGUI_TARGET to \"web\" or \"native\"`)\n } else if (\n isClient &&\n process.env.TAMAGUI_TARGET !== 'web' &&\n process.env.TAMAGUI_IGNORE_TARGET !== '1'\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n `Must set TAMAGUI_TARGET to \"web\" for web apps - if you have window defined outside of the browser, set TAMAGUI_IGNORE_TARGET=1 to hide this`\n )\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,WAAW,uBAAuB;AAEpC,MAAM,QAAQ,QAAQ,IAAI,mBAAmB;AAC7C,MAAM,kBAAkB,OAAO,WAAW;AAC1C,MAAM,WAAW,SAAS,CAAC;AAC3B,MAAM,WAAW,SAAS;AAG1B,MAAM,QAAQ,QAAQ,IAAI;AAAA;AAAA;AAAA,EAG7B,YAAY;AAAA;AAAA,IAEV,YAAY,IAAI;AAAA,MAChB;AAAA,IACF;AAEJ,MAAM,OAAO,MAAM;AAAC;AACb,MAAM,4BAA4B,QACrC,OACA,WACA,YACA;AACG,MAAM,WACX,OAAO,cAAc,eAAe,SAAS,KAAK,UAAU,aAAa,EAAE;AAEtE,MAAM,iBACX,aAAa,kBAAkB,UAAU,UAAU,iBAAiB;AAE/D,MAAM,cAAc,CAAC,SAAS;AAErC,IAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,MAAI,CAAC,QAAQ,IAAI,gBAAgB;AAE/B,YAAQ,KAAK,8CAA8C;AAAA,EAC7D,WACE,YACA,QAAQ,IAAI,mBAAmB,SAC/B,QAAQ,IAAI,0BAA0B,KACtC;AAEA,YAAQ;AAAA,MACN;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect } from "react";
|
|
2
|
+
const isWeb = process.env.TAMAGUI_TARGET === "web";
|
|
3
|
+
const isWindowDefined = typeof window !== "undefined";
|
|
4
|
+
const isServer = isWeb && !isWindowDefined;
|
|
5
|
+
const isClient = isWeb && isWindowDefined;
|
|
6
|
+
const isRSC = process.env.ENABLE_RSC ? (
|
|
7
|
+
// note this is statically analyzed so no funny business, just access it without optional chaining
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
import.meta.env ? (
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
import.meta.env.SSR
|
|
12
|
+
) : false
|
|
13
|
+
) : false;
|
|
14
|
+
const idFn = () => {
|
|
15
|
+
};
|
|
16
|
+
const useIsomorphicLayoutEffect = isRSC ? idFn : isServer ? useEffect : useLayoutEffect;
|
|
17
|
+
const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
|
|
18
|
+
const isWebTouchable = isClient && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
19
|
+
const isTouchable = !isWeb || isWebTouchable;
|
|
20
|
+
if (process.env.NODE_ENV === "development") {
|
|
21
|
+
if (!process.env.TAMAGUI_TARGET) {
|
|
22
|
+
console.warn(`Must set TAMAGUI_TARGET to "web" or "native"`);
|
|
23
|
+
} else if (isClient && process.env.TAMAGUI_TARGET !== "web" && process.env.TAMAGUI_IGNORE_TARGET !== "1") {
|
|
24
|
+
console.warn(
|
|
25
|
+
`Must set TAMAGUI_TARGET to "web" for web apps - if you have window defined outside of the browser, set TAMAGUI_IGNORE_TARGET=1 to hide this`
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
isChrome,
|
|
31
|
+
isClient,
|
|
32
|
+
isRSC,
|
|
33
|
+
isServer,
|
|
34
|
+
isTouchable,
|
|
35
|
+
isWeb,
|
|
36
|
+
isWebTouchable,
|
|
37
|
+
isWindowDefined,
|
|
38
|
+
useIsomorphicLayoutEffect
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { useEffect, useLayoutEffect } from 'react'\n\nexport const isWeb = process.env.TAMAGUI_TARGET === 'web'\nexport const isWindowDefined = typeof window !== 'undefined'\nexport const isServer = isWeb && !isWindowDefined\nexport const isClient = isWeb && isWindowDefined\n\n// may want to move to VITE_RSC_BUILD\nexport const isRSC = process.env.ENABLE_RSC\n ? // note this is statically analyzed so no funny business, just access it without optional chaining\n // @ts-ignore\n import.meta.env\n ? // @ts-ignore\n import.meta.env.SSR\n : false\n : false\n\nconst idFn = () => {}\nexport const useIsomorphicLayoutEffect = isRSC\n ? idFn\n : isServer\n ? useEffect\n : useLayoutEffect\nexport const isChrome =\n typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent || '')\n\nexport const isWebTouchable =\n isClient && ('ontouchstart' in window || navigator.maxTouchPoints > 0)\n\nexport const isTouchable = !isWeb || isWebTouchable\n\nif (process.env.NODE_ENV === 'development') {\n if (!process.env.TAMAGUI_TARGET) {\n // eslint-disable-next-line no-console\n console.warn(`Must set TAMAGUI_TARGET to \"web\" or \"native\"`)\n } else if (\n isClient &&\n process.env.TAMAGUI_TARGET !== 'web' &&\n process.env.TAMAGUI_IGNORE_TARGET !== '1'\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n `Must set TAMAGUI_TARGET to \"web\" for web apps - if you have window defined outside of the browser, set TAMAGUI_IGNORE_TARGET=1 to hide this`\n )\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,WAAW,uBAAuB;AAEpC,MAAM,QAAQ,QAAQ,IAAI,mBAAmB;AAC7C,MAAM,kBAAkB,OAAO,WAAW;AAC1C,MAAM,WAAW,SAAS,CAAC;AAC3B,MAAM,WAAW,SAAS;AAG1B,MAAM,QAAQ,QAAQ,IAAI;AAAA;AAAA;AAAA,EAG7B,YAAY;AAAA;AAAA,IAEV,YAAY,IAAI;AAAA,MAChB;AAAA,IACF;AAEJ,MAAM,OAAO,MAAM;AAAC;AACb,MAAM,4BAA4B,QACrC,OACA,WACA,YACA;AACG,MAAM,WACX,OAAO,cAAc,eAAe,SAAS,KAAK,UAAU,aAAa,EAAE;AAEtE,MAAM,iBACX,aAAa,kBAAkB,UAAU,UAAU,iBAAiB;AAE/D,MAAM,cAAc,CAAC,SAAS;AAErC,IAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,MAAI,CAAC,QAAQ,IAAI,gBAAgB;AAE/B,YAAQ,KAAK,8CAA8C;AAAA,EAC7D,WACE,YACA,QAAQ,IAAI,mBAAmB,SAC/B,QAAQ,IAAI,0BAA0B,KACtC;AAEA,YAAQ;AAAA,MACN;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
const isWeb = false;
|
|
3
|
+
const isWindowDefined = false;
|
|
4
|
+
const isServer = false;
|
|
5
|
+
const isClient = false;
|
|
6
|
+
const isRSC = false;
|
|
7
|
+
const useIsomorphicLayoutEffect = useLayoutEffect;
|
|
8
|
+
const isChrome = false;
|
|
9
|
+
const isWebTouchable = false;
|
|
10
|
+
const isTouchable = true;
|
|
11
|
+
export {
|
|
12
|
+
isChrome,
|
|
13
|
+
isClient,
|
|
14
|
+
isRSC,
|
|
15
|
+
isServer,
|
|
16
|
+
isTouchable,
|
|
17
|
+
isWeb,
|
|
18
|
+
isWebTouchable,
|
|
19
|
+
isWindowDefined,
|
|
20
|
+
useIsomorphicLayoutEffect
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.native.ts"],
|
|
4
|
+
"sourcesContent": ["import { useLayoutEffect } from 'react'\n\nexport const isWeb = false\nexport const isWindowDefined = false\nexport const isServer = false\nexport const isClient = false\nexport const isRSC = false\nexport const useIsomorphicLayoutEffect = useLayoutEffect\nexport const isChrome = false\nexport const isWebTouchable = false\nexport const isTouchable = true\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,uBAAuB;AAEzB,MAAM,QAAQ;AACd,MAAM,kBAAkB;AACxB,MAAM,WAAW;AACjB,MAAM,WAAW;AACjB,MAAM,QAAQ;AACd,MAAM,4BAA4B;AAClC,MAAM,WAAW;AACjB,MAAM,iBAAiB;AACvB,MAAM,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
const isWeb = false;
|
|
3
|
+
const isWindowDefined = false;
|
|
4
|
+
const isServer = false;
|
|
5
|
+
const isClient = false;
|
|
6
|
+
const isRSC = false;
|
|
7
|
+
const useIsomorphicLayoutEffect = useLayoutEffect;
|
|
8
|
+
const isChrome = false;
|
|
9
|
+
const isWebTouchable = false;
|
|
10
|
+
const isTouchable = true;
|
|
11
|
+
export {
|
|
12
|
+
isChrome,
|
|
13
|
+
isClient,
|
|
14
|
+
isRSC,
|
|
15
|
+
isServer,
|
|
16
|
+
isTouchable,
|
|
17
|
+
isWeb,
|
|
18
|
+
isWebTouchable,
|
|
19
|
+
isWindowDefined,
|
|
20
|
+
useIsomorphicLayoutEffect
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.native.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.native.ts"],
|
|
4
|
+
"sourcesContent": ["import { useLayoutEffect } from 'react'\n\nexport const isWeb = false\nexport const isWindowDefined = false\nexport const isServer = false\nexport const isClient = false\nexport const isRSC = false\nexport const useIsomorphicLayoutEffect = useLayoutEffect\nexport const isChrome = false\nexport const isWebTouchable = false\nexport const isTouchable = true\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,uBAAuB;AAEzB,MAAM,QAAQ;AACd,MAAM,kBAAkB;AACxB,MAAM,WAAW;AACjB,MAAM,WAAW;AACjB,MAAM,QAAQ;AACd,MAAM,4BAA4B;AAClC,MAAM,WAAW;AACjB,MAAM,iBAAiB;AACvB,MAAM,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/constants",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"types": "./types/constants.d.ts",
|
|
5
5
|
"main": "dist/cjs/constants",
|
|
6
6
|
"module": "dist/esm/constants",
|
|
@@ -18,9 +18,17 @@
|
|
|
18
18
|
"clean:build": "tamagui-build clean:build"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@tamagui/build": "1.
|
|
21
|
+
"@tamagui/build": "1.7.0",
|
|
22
22
|
"react": "^18.2.0"
|
|
23
23
|
},
|
|
24
|
+
"exports": {
|
|
25
|
+
"./package.json": "./package.json",
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./types/index.d.ts",
|
|
28
|
+
"import": "./dist/esm/index.mjs",
|
|
29
|
+
"require": "./dist/cjs/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
24
32
|
"peerDependencies": {
|
|
25
33
|
"react": "*"
|
|
26
34
|
},
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useLayoutEffect } from 'react';
|
|
2
|
+
export declare const isWeb: boolean;
|
|
3
|
+
export declare const isWindowDefined: boolean;
|
|
4
|
+
export declare const isServer: boolean;
|
|
5
|
+
export declare const isClient: boolean;
|
|
6
|
+
export declare const isRSC: any;
|
|
7
|
+
export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
8
|
+
export declare const isChrome: boolean;
|
|
9
|
+
export declare const isWebTouchable: boolean;
|
|
10
|
+
export declare const isTouchable: boolean;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useLayoutEffect } from 'react';
|
|
2
|
+
export declare const isWeb = false;
|
|
3
|
+
export declare const isWindowDefined = false;
|
|
4
|
+
export declare const isServer = false;
|
|
5
|
+
export declare const isClient = false;
|
|
6
|
+
export declare const isRSC = false;
|
|
7
|
+
export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
8
|
+
export declare const isChrome = false;
|
|
9
|
+
export declare const isWebTouchable = false;
|
|
10
|
+
export declare const isTouchable = true;
|
|
11
|
+
//# sourceMappingURL=index.native.d.ts.map
|
package/types/constants.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,eAAe,EAAE,MAAM,OAAO,CAAA;AAElD,eAAO,MAAM,KAAK,SAAuC,CAAA;AACzD,eAAO,MAAM,eAAe,SAAgC,CAAA;AAC5D,eAAO,MAAM,QAAQ,SAA4B,CAAA;AACjD,eAAO,MAAM,QAAQ,SAA2B,CAAA;AAGhD,eAAO,MAAM,KAAK,KAOT,CAAA;AAGT,eAAO,MAAM,yBAAyB,wBAInB,CAAA;AACnB,eAAO,MAAM,QAAQ,SACyD,CAAA;AAE9E,eAAO,MAAM,cAAc,SAC6C,CAAA;AAExE,eAAO,MAAM,WAAW,SAA2B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.native.d.ts","sourceRoot":"","sources":["../src/constants.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAEvC,eAAO,MAAM,KAAK,QAAQ,CAAA;AAC1B,eAAO,MAAM,eAAe,QAAQ,CAAA;AACpC,eAAO,MAAM,QAAQ,QAAQ,CAAA;AAC7B,eAAO,MAAM,QAAQ,QAAQ,CAAA;AAC7B,eAAO,MAAM,KAAK,QAAQ,CAAA;AAC1B,eAAO,MAAM,yBAAyB,wBAAkB,CAAA;AACxD,eAAO,MAAM,QAAQ,QAAQ,CAAA;AAC7B,eAAO,MAAM,cAAc,QAAQ,CAAA;AACnC,eAAO,MAAM,WAAW,OAAO,CAAA"}
|
|
File without changes
|
|
File without changes
|