@tamagui/core 1.0.0-alpha.0 → 1.0.0-alpha.5
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 +21 -0
- package/dist/constants/platform.js +1 -1
- package/dist/constants/platform.js.map +2 -2
- package/dist/createComponent.js +1 -1
- package/dist/createComponent.js.map +2 -2
- package/dist/hooks/useMedia.js +1 -1
- package/dist/hooks/useMedia.js.map +2 -2
- package/dist/hooks/useTheme.js +1 -1
- package/dist/hooks/useTheme.js.map +2 -2
- package/dist/index.cjs +57 -79
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +0 -1
- package/dist/index.js.map +2 -2
- package/package.json +12 -4
- package/src/constants/platform.ts +1 -1
- package/src/createComponent.tsx +2 -1
- package/src/hooks/useMedia.tsx +1 -1
- package/src/hooks/useTheme.tsx +1 -1
- package/src/index.ts +0 -1
- package/types.d.ts +0 -1
- package/.ultra.cache.json +0 -1
- package/_/constants/constants.js +0 -14
- package/_/constants/constants.js.map +0 -7
- package/_/constants/platform.js +0 -20
- package/_/constants/platform.js.map +0 -7
- package/_/constants/pseudos.js +0 -18
- package/_/constants/pseudos.js.map +0 -7
- package/_/constants/rnw.js +0 -22
- package/_/constants/rnw.js.map +0 -7
- package/_/createComponent.js +0 -427
- package/_/createComponent.js.map +0 -7
- package/_/createShorthands.js +0 -10
- package/_/createShorthands.js.map +0 -7
- package/_/createTamagui.js +0 -122
- package/_/createTamagui.js.map +0 -7
- package/_/createTheme.js +0 -20
- package/_/createTheme.js.map +0 -7
- package/_/createTokens.js +0 -29
- package/_/createTokens.js.map +0 -7
- package/_/createVariable.js +0 -22
- package/_/createVariable.js.map +0 -7
- package/_/helpers/addStylesUsingClassname.js +0 -32
- package/_/helpers/addStylesUsingClassname.js.map +0 -7
- package/_/helpers/createMediaStyle.js +0 -34
- package/_/helpers/createMediaStyle.js.map +0 -7
- package/_/helpers/createTamaguiProvider.js +0 -42
- package/_/helpers/createTamaguiProvider.js.map +0 -7
- package/_/helpers/extendStaticConfig.js +0 -176
- package/_/helpers/extendStaticConfig.js.map +0 -7
- package/_/helpers/fixNativeShadow.js +0 -8
- package/_/helpers/fixNativeShadow.js.map +0 -7
- package/_/helpers/fixNativeShadow.native.js +0 -30
- package/_/helpers/fixNativeShadow.native.js.map +0 -7
- package/_/helpers/getSplitStyles.js +0 -160
- package/_/helpers/getSplitStyles.js.map +0 -7
- package/_/helpers/getStylesAtomic.js +0 -84
- package/_/helpers/getStylesAtomic.js.map +0 -7
- package/_/helpers/getStylesAtomic.native.js +0 -10
- package/_/helpers/getStylesAtomic.native.js.map +0 -7
- package/_/helpers/insertStyleRule.js +0 -24
- package/_/helpers/insertStyleRule.js.map +0 -7
- package/_/helpers/matchMedia.js +0 -15
- package/_/helpers/matchMedia.js.map +0 -7
- package/_/helpers/matchMedia.native.js +0 -8
- package/_/helpers/matchMedia.native.js.map +0 -7
- package/_/helpers/themeable.js +0 -26
- package/_/helpers/themeable.js.map +0 -7
- package/_/hooks/useConstant.js +0 -15
- package/_/hooks/useConstant.js.map +0 -7
- package/_/hooks/useFeatures.js +0 -75
- package/_/hooks/useFeatures.js.map +0 -7
- package/_/hooks/useForceUpdate.js +0 -28
- package/_/hooks/useForceUpdate.js.map +0 -7
- package/_/hooks/useMedia.js +0 -173
- package/_/hooks/useMedia.js.map +0 -7
- package/_/hooks/usePressable.js +0 -14
- package/_/hooks/usePressable.js.map +0 -7
- package/_/hooks/useTheme.js +0 -94
- package/_/hooks/useTheme.js.map +0 -7
- package/_/index.js +0 -30
- package/_/index.js.map +0 -7
- package/_/static/postProcessStyles.js +0 -18
- package/_/static/postProcessStyles.js.map +0 -7
- package/_/static.js +0 -12
- package/_/static.js.map +0 -7
- package/_/styled.js +0 -21
- package/_/styled.js.map +0 -7
- package/_/types.js +0 -1
- package/_/types.js.map +0 -7
- package/_/views/Animated.js +0 -79
- package/_/views/Animated.js.map +0 -7
- package/_/views/Stack.js +0 -12
- package/_/views/Stack.js.map +0 -7
- package/_/views/Text.js +0 -60
- package/_/views/Text.js.map +0 -7
- package/_/views/TextAncestorContext.js +0 -19
- package/_/views/TextAncestorContext.js.map +0 -7
- package/_/views/Theme.js +0 -57
- package/_/views/Theme.js.map +0 -7
- package/_/views/ThemeContext.js +0 -6
- package/_/views/ThemeContext.js.map +0 -7
- package/_/views/ThemeInverse.js +0 -27
- package/_/views/ThemeInverse.js.map +0 -7
- package/_/views/ThemeManagerContext.js +0 -56
- package/_/views/ThemeManagerContext.js.map +0 -7
- package/_/views/ThemeProvider.js +0 -45
- package/_/views/ThemeProvider.js.map +0 -7
- package/src/hooks/useForceUpdate.tsx +0 -26
- package/tsconfig.json +0 -8
package/dist/index.js
CHANGED
|
@@ -16,7 +16,6 @@ export * from "./helpers/getStylesAtomic";
|
|
|
16
16
|
export * from "./helpers/matchMedia";
|
|
17
17
|
export * from "./helpers/themeable";
|
|
18
18
|
export * from "./hooks/useConstant";
|
|
19
|
-
export * from "./hooks/useForceUpdate";
|
|
20
19
|
export * from "./hooks/useMedia";
|
|
21
20
|
export * from "./hooks/useTheme";
|
|
22
21
|
export * from "./views/Animated";
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './createComponent'\nexport * from './createShorthands'\nexport * from './createTheme'\nexport * from './createTamagui'\nexport * from './createFont'\nexport { createTokens } from './createTokens'\nexport * from './createVariable'\nexport * from './styled'\nexport * from './types'\n\nexport * from './constants/pseudos'\nexport * from './constants/constants'\nexport * from './constants/platform'\nexport * from './constants/rnw'\n\nexport * from './helpers/isObj'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/matchMedia'\nexport * from './helpers/themeable'\n\nexport * from './hooks/useConstant'\nexport * from './hooks/
|
|
5
|
-
"mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;
|
|
4
|
+
"sourcesContent": ["export * from './createComponent'\nexport * from './createShorthands'\nexport * from './createTheme'\nexport * from './createTamagui'\nexport * from './createFont'\nexport { createTokens } from './createTokens'\nexport * from './createVariable'\nexport * from './styled'\nexport * from './types'\n\nexport * from './constants/pseudos'\nexport * from './constants/constants'\nexport * from './constants/platform'\nexport * from './constants/rnw'\n\nexport * from './helpers/isObj'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/matchMedia'\nexport * from './helpers/themeable'\n\nexport * from './hooks/useConstant'\nexport * from './hooks/useMedia'\nexport * from './hooks/useTheme'\n\nexport * from './views/Animated'\nexport * from './views/Stack'\nexport * from './views/Text'\nexport * from './views/Theme'\nexport * from './views/ThemeInverse'\nexport * from './views/ThemeProvider'\nexport * from './views/TextAncestorContext'\nexport * from './views/SafeAreaProvider'\n"],
|
|
5
|
+
"mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.5",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -9,8 +9,15 @@
|
|
|
9
9
|
"build": "tamagui-build",
|
|
10
10
|
"watch": "tamagui-build --watch"
|
|
11
11
|
},
|
|
12
|
+
"files": [
|
|
13
|
+
"types.d.ts",
|
|
14
|
+
"dist",
|
|
15
|
+
"src"
|
|
16
|
+
],
|
|
12
17
|
"dependencies": {
|
|
13
|
-
"@tamagui/helpers": "^1.0.0-alpha.
|
|
18
|
+
"@tamagui/helpers": "^1.0.0-alpha.5",
|
|
19
|
+
"@tamagui/use-debounce": "^1.0.0-alpha.5",
|
|
20
|
+
"@tamagui/use-force-update": "^1.0.0-alpha.5",
|
|
14
21
|
"react": "*",
|
|
15
22
|
"react-dom": "*",
|
|
16
23
|
"react-native-safe-area-context": "^3.3.0"
|
|
@@ -19,7 +26,7 @@
|
|
|
19
26
|
"react-native-web": "*"
|
|
20
27
|
},
|
|
21
28
|
"devDependencies": {
|
|
22
|
-
"@tamagui/build": "^1.0.0-alpha.
|
|
29
|
+
"@tamagui/build": "^1.0.0-alpha.2",
|
|
23
30
|
"@types/react": "^17.0.35",
|
|
24
31
|
"esbuild": "^0.11.20",
|
|
25
32
|
"typescript": "^4.4.4"
|
|
@@ -29,5 +36,6 @@
|
|
|
29
36
|
},
|
|
30
37
|
"engines": {
|
|
31
38
|
"node": ">=16"
|
|
32
|
-
}
|
|
39
|
+
},
|
|
40
|
+
"gitHead": "e12f14aa087c41ea5ba3933a05f33fada0be03c0"
|
|
33
41
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useLayoutEffect } from 'react'
|
|
2
2
|
import { Platform } from 'react-native'
|
|
3
3
|
|
|
4
|
-
export const isWeb = process.env.TAMAGUI_TARGET
|
|
4
|
+
export const isWeb = process.env.TAMAGUI_TARGET === 'web' ? true : Platform?.OS === 'web'
|
|
5
5
|
export const isSSR = isWeb && typeof window === 'undefined'
|
|
6
6
|
export const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect
|
|
7
7
|
export const isChrome = typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent || '')
|
package/src/createComponent.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { concatClassName, stylePropsView } from '@tamagui/helpers'
|
|
2
|
+
import { useForceUpdate } from '@tamagui/use-force-update'
|
|
2
3
|
import React, {
|
|
3
4
|
Children,
|
|
4
5
|
Fragment,
|
|
@@ -20,7 +21,6 @@ import { addStylesUsingClassname, useStylesAsClassname } from './helpers/addStyl
|
|
|
20
21
|
import { extendStaticConfig, parseStaticConfig } from './helpers/extendStaticConfig'
|
|
21
22
|
import { getSplitStyles } from './helpers/getSplitStyles'
|
|
22
23
|
import { useFeatures } from './hooks/useFeatures'
|
|
23
|
-
import { useForceUpdate } from './hooks/useForceUpdate'
|
|
24
24
|
import { usePressable } from './hooks/usePressable'
|
|
25
25
|
import {
|
|
26
26
|
SpaceTokens,
|
|
@@ -228,6 +228,7 @@ export function createComponent<A extends Object = DefaultProps>(
|
|
|
228
228
|
]
|
|
229
229
|
: [defaultsClassName, props.className, classNames, stylesClassNames]
|
|
230
230
|
|
|
231
|
+
// @ts-expect-error
|
|
231
232
|
const className = concatClassName(...classList)
|
|
232
233
|
if (process.env.NODE_ENV === 'development') {
|
|
233
234
|
if (props['debug']) {
|
package/src/hooks/useMedia.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useForceUpdate } from '@tamagui/use-force-update'
|
|
1
2
|
import { useRef } from 'react'
|
|
2
3
|
|
|
3
4
|
import { useIsomorphicLayoutEffect } from '../constants/platform'
|
|
@@ -9,7 +10,6 @@ import {
|
|
|
9
10
|
MediaQueryState,
|
|
10
11
|
} from '../types'
|
|
11
12
|
import { useConstant } from './useConstant'
|
|
12
|
-
import { useForceUpdate } from './useForceUpdate'
|
|
13
13
|
|
|
14
14
|
export const mediaState: { [key in keyof MediaQueryState]: boolean } = {} as any
|
|
15
15
|
const mediaQueryListeners: { [key: string]: Set<Function> } = {}
|
package/src/hooks/useTheme.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useForceUpdate } from '@tamagui/use-force-update'
|
|
1
2
|
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react'
|
|
2
3
|
|
|
3
4
|
import { useIsomorphicLayoutEffect } from '../constants/platform'
|
|
@@ -6,7 +7,6 @@ import { ThemeName } from '../types'
|
|
|
6
7
|
import { ThemeContext } from '../views/ThemeContext'
|
|
7
8
|
import { ThemeManagerContext } from '../views/ThemeManagerContext'
|
|
8
9
|
import { GET_DEFAULT_THEME } from '../views/ThemeProvider'
|
|
9
|
-
import { useForceUpdate } from './useForceUpdate'
|
|
10
10
|
|
|
11
11
|
type UseThemeState = {
|
|
12
12
|
uuid: Object
|
package/src/index.ts
CHANGED
package/types.d.ts
CHANGED
|
@@ -492,7 +492,6 @@ export interface ThemeableHOC {
|
|
|
492
492
|
<R extends ReactElement<any, any> | null, P extends ThemeableProps = {}>(component: (props: P) => R): (props: P) => R;
|
|
493
493
|
}
|
|
494
494
|
export declare function useConstant<T>(fn: () => T): T;
|
|
495
|
-
export declare function useForceUpdate(): Function;
|
|
496
495
|
export declare const mediaState: {
|
|
497
496
|
[key in keyof MediaQueryState]: boolean;
|
|
498
497
|
};
|
package/.ultra.cache.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"files":{"_":"1637340237894.082","dist":"1637340239389.5557",".npmignore":"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391","package.json":"de60daa54e38522f2f7718f7ea2811a470c0abb6","src/constants/constants.ts":"557e9930ddfa8fad6d74219ae7245c80551b8794","src/constants/platform.ts":"07382a90f555a7ec9d23ff16082ee088d64855a1","src/constants/pseudos.ts":"52c7655f92eaa265601eaf4a31b6db1688875321","src/constants/rnw.tsx":"ebc4ce292c30d344945b75e151a272023461f784","src/createComponent.tsx":"eb42db3252cf09744e49e5db195b1bbfa68c606a","src/createShorthands.ts":"7b5ce250bc5d049fcf9f5898efc60fdc91f2988d","src/createTamagui.ts":"f1df54b6772668e2e7ba8f229b4cbf64abd5aa58","src/createTheme.ts":"aa9b7c08901c1dff621a371912f3cbf1c2507301","src/createTokens.ts":"e9666b97efc926535f1edf1d0f757559b9008a03","src/createVariable.ts":"da248891d943b04d940205762b1239751af6c7cc","src/helpers/addStylesUsingClassname.tsx":"a08eb2d83f80fe8dbb2fd72ad4f44945c16b5ee9","src/helpers/createMediaStyle.ts":"3c5ff33628b5cc8de55bdcedc3133b968b5fb210","src/helpers/createTamaguiProvider.tsx":"f16ad749794f1bb20fada1444716d0264e60b9f9","src/helpers/extendStaticConfig.ts":"90cc21f26174b621635984e455d11b574e2b28d2","src/helpers/fixNativeShadow.native.tsx":"ff1ed30ed9ace81433046e719939a04190b477cc","src/helpers/fixNativeShadow.tsx":"7fb6e7d9604025d2023469f23aab7280244bbb03","src/helpers/getSplitStyles.tsx":"7626000da0d5016c1b4a08ae4101b5e16d2b3e34","src/helpers/getStylesAtomic.native.ts":"9054085df65d873432d974b369ac9dcb80f387ff","src/helpers/getStylesAtomic.ts":"e85e8ae07227d5b05f0f1aad7fae77b40e30c09d","src/helpers/insertStyleRule.tsx":"2fe177cb7efe1b2fb5b38c57835a6a3ea5e35443","src/helpers/matchMedia.native.ts":"7e28a480a564ba5d341d5d559cf1ddcaf5f0b76b","src/helpers/matchMedia.ts":"071b4358b4a141c8f55645e478af1e2527e88b67","src/helpers/themeable.tsx":"16e605a7ae27cec3e4d725817370ac3c250c52a4","src/hooks/useConstant.tsx":"f23ca6031dd13f73f4c5eb7089b5745dc2cdaedd","src/hooks/useFeatures.tsx":"3b917df55d6478ef6f3b9c21d7bef3e5bdcefe1b","src/hooks/useForceUpdate.tsx":"bd991b41de300151e93b2d7e8cdca6a0accefacc","src/hooks/useMedia.tsx":"aa6e326abbcc4bbcfdff75f6b0d6d43dba349a2b","src/hooks/usePressable.tsx":"4f55bdca7250e2d22d88f3578d8c8e62ce5c8453","src/hooks/useTheme.tsx":"9c11c3a5da0844cfb93ccbbfa861aedbe10b2552","src/index.ts":"0a4c125f40a30dbf9207ade1d1a8ccd26293200d","src/static.ts":"a6121ec395e37e7536a9c5bd5916fb054de2e2cc","src/static/postProcessStyles.tsx":"5e5579249eb99caab9f406af6ec801b7ff1db830","src/styled.ts":"734ad3b404f1782c2579771f5a421e9bebf28642","src/types.tsx":"10c0fd38a09701107a94a311413c7612f46324b3","src/views/Animated.tsx":"eac498149091b087c84a5d92c4a9b57bafd6c149","src/views/Stack.tsx":"62ef6b9307bb434ad08f4ab7f3f6d0ccb975a359","src/views/Text.tsx":"476bdde93a89840681bf981cfc06e10fc0bc837d","src/views/TextAncestorContext.tsx":"73b13b84778bddb2b4198d32daf1de668132b0bb","src/views/Theme.tsx":"4e9357aac5fc201f2dc359a8f6fd4a8581ceb9bf","src/views/ThemeContext.tsx":"788e2d26d8727dd9493944b5ae9c7ea241fd7ed4","src/views/ThemeInverse.tsx":"614b626451a57955e896cc709d28043bc9bbf391","src/views/ThemeManagerContext.tsx":"30f5f195c2d4b326c5b44f587ff88a1dd1a848ff","src/views/ThemeProvider.tsx":"dcdd80d625e61e9598baf4cb10fc7921962efb50","tsconfig.json":"d3effa0a1380f9664793b92aefd77a1bc96ce071","types.d.ts":"47dcbac539e5744c2d841f341661d351b546b3ef"},"deps":{"@tamagui/helpers":1637340256961.1,"@tamagui/esdx":1637340256835.24}}
|
package/_/constants/constants.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { isWeb } from "./platform";
|
|
2
|
-
const stackDefaultStyles = {
|
|
3
|
-
alignItems: "stretch",
|
|
4
|
-
flexShrink: 0,
|
|
5
|
-
...isWeb && {
|
|
6
|
-
display: "flex",
|
|
7
|
-
flexBasis: "auto",
|
|
8
|
-
boxSizing: "border-box"
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
stackDefaultStyles
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/constants/constants.ts"],
|
|
4
|
-
"sourcesContent": ["import { isWeb } from './platform'\n\nexport const stackDefaultStyles = {\n alignItems: 'stretch',\n flexShrink: 0,\n // more accurately match react-native defaults on web\n ...(isWeb && {\n display: 'flex',\n flexBasis: 'auto',\n boxSizing: 'border-box',\n }),\n}\n"],
|
|
5
|
-
"mappings": "AAAA;AAEO,MAAM,qBAAqB;AAAA,EAChC,YAAY;AAAA,EACZ,YAAY;AAAA,KAER,SAAS;AAAA,IACX,SAAS;AAAA,IACT,WAAW;AAAA,IACX,WAAW;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/_/constants/platform.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { useEffect, useLayoutEffect } from "react";
|
|
3
|
-
import { Platform } from "react-native";
|
|
4
|
-
const isWeb = process.env.TAMAGUI_TARGET === "web" || ((_a = Platform) == null ? void 0 : _a.OS) === "web";
|
|
5
|
-
const isSSR = isWeb && typeof window === "undefined";
|
|
6
|
-
const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect;
|
|
7
|
-
const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
|
|
8
|
-
const supportsTouchWeb = typeof window !== "undefined" && "ontouchstart" in window;
|
|
9
|
-
const isTouchDevice = !isWeb || supportsTouchWeb;
|
|
10
|
-
const isWebIOS = isWeb && typeof navigator !== "undefined" && (/iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && !window["MSStream"];
|
|
11
|
-
export {
|
|
12
|
-
isChrome,
|
|
13
|
-
isSSR,
|
|
14
|
-
isTouchDevice,
|
|
15
|
-
isWeb,
|
|
16
|
-
isWebIOS,
|
|
17
|
-
supportsTouchWeb,
|
|
18
|
-
useIsomorphicLayoutEffect
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=platform.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/constants/platform.ts"],
|
|
4
|
-
"sourcesContent": ["import { useEffect, useLayoutEffect } from 'react'\nimport { Platform } from 'react-native'\n\nexport const isWeb = process.env.TAMAGUI_TARGET === 'web' || Platform?.OS === 'web'\nexport const isSSR = isWeb && typeof window === 'undefined'\nexport const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect\nexport const isChrome = typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent || '')\nexport const supportsTouchWeb = typeof window !== 'undefined' && 'ontouchstart' in window\nexport const isTouchDevice = !isWeb || supportsTouchWeb\nexport const isWebIOS =\n isWeb &&\n typeof navigator !== 'undefined' &&\n (/iPad|iPhone|iPod/.test(navigator.platform) ||\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&\n !window['MSStream']\n"],
|
|
5
|
-
"mappings": "AAAA;AAAA;AACA;AAEO,MAAM,QAAQ,QAAQ,IAAI,mBAAmB,SAAS,uCAAU,QAAO;AACvE,MAAM,QAAQ,SAAS,OAAO,WAAW;AACzC,MAAM,4BAA4B,QAAQ,YAAY;AACtD,MAAM,WAAW,OAAO,cAAc,eAAe,SAAS,KAAK,UAAU,aAAa;AAC1F,MAAM,mBAAmB,OAAO,WAAW,eAAe,kBAAkB;AAC5E,MAAM,gBAAgB,CAAC,SAAS;AAChC,MAAM,WACX,SACA,OAAO,cAAc,eACpB,oBAAmB,KAAK,UAAU,aAChC,UAAU,aAAa,cAAc,UAAU,iBAAiB,MACnE,CAAC,OAAO;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/_/constants/pseudos.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const pseudos = {
|
|
2
|
-
focusStyle: {
|
|
3
|
-
name: "focus",
|
|
4
|
-
priority: 3
|
|
5
|
-
},
|
|
6
|
-
pressStyle: {
|
|
7
|
-
name: "active",
|
|
8
|
-
priority: 2
|
|
9
|
-
},
|
|
10
|
-
hoverStyle: {
|
|
11
|
-
name: "hover",
|
|
12
|
-
priority: 1
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
pseudos
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=pseudos.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/constants/pseudos.ts"],
|
|
4
|
-
"sourcesContent": ["export const pseudos = {\n focusStyle: {\n name: 'focus',\n priority: 3,\n },\n pressStyle: {\n name: 'active',\n priority: 2,\n },\n hoverStyle: {\n name: 'hover',\n priority: 1,\n },\n}\n"],
|
|
5
|
-
"mappings": "AAAO,MAAM,UAAU;AAAA,EACrB,YAAY;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA;AAAA,EAEZ,YAAY;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA;AAAA,EAEZ,YAAY;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/_/constants/rnw.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
const interopRequire = /* @__PURE__ */ __name((src) => "default" in src ? src.default : src, "interopRequire");
|
|
4
|
-
const rnw = {};
|
|
5
|
-
if (process.env.IS_STATIC === "is_static") {
|
|
6
|
-
const createCompileableStyle = require("react-native-web/dist/cjs/exports/StyleSheet/createCompileableStyle");
|
|
7
|
-
const createReactDOMStyle = require("react-native-web/dist/cjs/exports/StyleSheet/createReactDOMStyle");
|
|
8
|
-
const i18Style = require("react-native-web/dist/cjs/exports/StyleSheet/i18nStyle");
|
|
9
|
-
const atomic = require("react-native-web/dist/cjs/exports/StyleSheet/compile").atomic;
|
|
10
|
-
Object.assign(rnw, {
|
|
11
|
-
createCompileableStyle,
|
|
12
|
-
createReactDOMStyle,
|
|
13
|
-
i18Style,
|
|
14
|
-
atomic
|
|
15
|
-
});
|
|
16
|
-
} else if (process.env.TAMAGUI_TARGET === "web") {
|
|
17
|
-
Object.assign(rnw, interopRequire(require("react-native-web").TamaguiExports));
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
rnw
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=rnw.js.map
|
package/_/constants/rnw.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/constants/rnw.tsx"],
|
|
4
|
-
"sourcesContent": ["const interopRequire = (src: any) => ('default' in src ? src.default : src)\n\nexport const rnw: Record<string, any> = {}\n\n// in static mode, require them directly since we can't import react-native-web at all (it has flow stuff in it)\nif (process.env.IS_STATIC === 'is_static') {\n const createCompileableStyle = require('react-native-web/dist/cjs/exports/StyleSheet/createCompileableStyle')\n const createReactDOMStyle = require('react-native-web/dist/cjs/exports/StyleSheet/createReactDOMStyle')\n const i18Style = require('react-native-web/dist/cjs/exports/StyleSheet/i18nStyle')\n const atomic = require('react-native-web/dist/cjs/exports/StyleSheet/compile').atomic\n Object.assign(rnw, {\n createCompileableStyle,\n createReactDOMStyle,\n i18Style,\n atomic,\n })\n} else if (process.env.TAMAGUI_TARGET === 'web') {\n // when targeting web (client) import it like so\n Object.assign(rnw, interopRequire(require('react-native-web').TamaguiExports))\n}\n"],
|
|
5
|
-
"mappings": ";;AAAA,MAAM,iBAAiB,wBAAC,QAAc,aAAa,MAAM,IAAI,UAAU,KAAhD;AAEhB,MAAM,MAA2B;AAGxC,IAAI,QAAQ,IAAI,cAAc,aAAa;AACzC,QAAM,yBAAyB,QAAQ;AACvC,QAAM,sBAAsB,QAAQ;AACpC,QAAM,WAAW,QAAQ;AACzB,QAAM,SAAS,QAAQ,wDAAwD;AAC/E,SAAO,OAAO,KAAK;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,WAEO,QAAQ,IAAI,mBAAmB,OAAO;AAE/C,SAAO,OAAO,KAAK,eAAe,QAAQ,oBAAoB;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|