@tamagui/core 1.0.1-beta.20 → 1.0.1-beta.200
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/Tamagui.js +16 -12
- package/dist/cjs/Tamagui.js.map +2 -2
- package/dist/cjs/addTheme.js +80 -0
- package/dist/cjs/addTheme.js.map +7 -0
- package/dist/cjs/{conf.js → config.js} +34 -21
- package/dist/cjs/config.js.map +7 -0
- package/dist/cjs/constants/constants.js +17 -24
- package/dist/cjs/constants/constants.js.map +2 -2
- package/dist/cjs/{helpers/nativeGestureHandler.js → constants/isDevTools.js} +8 -8
- package/dist/cjs/constants/isDevTools.js.map +7 -0
- package/dist/cjs/constants/platform.js +32 -16
- package/dist/cjs/constants/platform.js.map +2 -2
- package/dist/cjs/constants/platform.native.js +62 -0
- package/dist/cjs/constants/platform.native.js.map +7 -0
- package/dist/cjs/contexts/ButtonInsideButtonContext.js +1 -0
- package/dist/cjs/contexts/ButtonInsideButtonContext.js.map +1 -1
- package/dist/cjs/contexts/FontLanguageContext.js +30 -0
- package/dist/cjs/contexts/FontLanguageContext.js.map +7 -0
- package/dist/cjs/contexts/TextAncestorContext.js +30 -0
- package/dist/cjs/contexts/TextAncestorContext.js.map +7 -0
- package/dist/cjs/{ThemeContext.js → contexts/ThemeContext.js} +1 -0
- package/dist/cjs/contexts/ThemeContext.js.map +7 -0
- package/dist/cjs/createComponent.js +876 -509
- package/dist/cjs/createComponent.js.map +3 -3
- package/dist/cjs/createFont.js +5 -8
- package/dist/cjs/createFont.js.map +2 -2
- package/dist/cjs/createShorthands.js +1 -2
- package/dist/cjs/createShorthands.js.map +2 -2
- package/dist/cjs/createTamagui.js +135 -184
- package/dist/cjs/createTamagui.js.map +3 -3
- package/dist/cjs/createTheme.js +4 -2
- package/dist/cjs/createTheme.js.map +2 -2
- package/dist/cjs/createTokens.js +5 -25
- package/dist/cjs/createTokens.js.map +2 -2
- package/dist/cjs/createVariable.js +51 -28
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/createVariables.js +52 -0
- package/dist/cjs/createVariables.js.map +7 -0
- package/dist/cjs/helpers/RNComponents.js +12 -11
- package/dist/cjs/helpers/RNComponents.js.map +2 -2
- package/dist/cjs/{ThemeManager.js → helpers/ThemeManager.js} +55 -60
- package/dist/cjs/helpers/ThemeManager.js.map +7 -0
- package/dist/cjs/helpers/areEqualSets.js +3 -3
- package/dist/cjs/helpers/areEqualSets.js.map +1 -1
- package/dist/cjs/helpers/assignNativePropsToWeb.js +188 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.js.map +7 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js +30 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js.map +7 -0
- package/dist/cjs/helpers/cache.js +43 -0
- package/dist/cjs/helpers/cache.js.map +7 -0
- package/dist/cjs/helpers/calc.js +71 -0
- package/dist/cjs/helpers/calc.js.map +7 -0
- package/dist/cjs/helpers/createMediaStyle.js +26 -12
- package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +272 -122
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/createProxy.js +43 -0
- package/dist/cjs/helpers/createProxy.js.map +7 -0
- package/dist/cjs/helpers/expandStyle.js +90 -0
- package/dist/cjs/helpers/expandStyle.js.map +7 -0
- package/dist/cjs/helpers/expandStyles.js +115 -0
- package/dist/cjs/helpers/expandStyles.js.map +7 -0
- package/dist/cjs/helpers/extendStaticConfig.js +48 -37
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/fixNativeShadow.js +3 -3
- package/dist/cjs/helpers/fixNativeShadow.js.map +1 -1
- package/dist/cjs/helpers/getAnimationDriver.js +32 -0
- package/dist/cjs/helpers/getAnimationDriver.js.map +7 -0
- package/dist/cjs/helpers/getExpandedShorthands.js +4 -5
- package/dist/cjs/helpers/getExpandedShorthands.js.map +2 -2
- package/dist/cjs/helpers/{getTextSize.js → getFont.js} +22 -12
- package/dist/cjs/helpers/getFont.js.map +7 -0
- package/dist/cjs/helpers/getFontLanguage.js +29 -0
- package/dist/cjs/helpers/getFontLanguage.js.map +7 -0
- package/dist/cjs/helpers/getSize.js +19 -10
- package/dist/cjs/helpers/getSize.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +503 -210
- package/dist/cjs/helpers/getSplitStyles.js.map +3 -3
- package/dist/cjs/helpers/getStackSize.js +46 -0
- package/dist/cjs/helpers/getStackSize.js.map +7 -0
- package/dist/cjs/helpers/getStylesAtomic.js +177 -131
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.native.js +1 -2
- package/dist/cjs/helpers/getStylesAtomic.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.js +103 -0
- package/dist/cjs/helpers/getThemeCSSRules.js.map +7 -0
- package/dist/cjs/{nativeGestureHandler.native.js → helpers/getThemeCSSRules.native.js} +18 -5
- package/dist/cjs/helpers/getThemeCSSRules.native.js.map +7 -0
- package/dist/cjs/helpers/getVariantExtras.js +89 -0
- package/dist/cjs/helpers/getVariantExtras.js.map +7 -0
- package/dist/cjs/helpers/insertStyleRule.js +90 -51
- package/dist/cjs/helpers/insertStyleRule.js.map +3 -3
- package/dist/cjs/helpers/isObj.js +2 -2
- package/dist/cjs/helpers/isObj.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiComponent.js +37 -0
- package/dist/cjs/helpers/isTamaguiComponent.js.map +7 -0
- package/dist/cjs/helpers/isTamaguiElement.js +5 -5
- package/dist/cjs/helpers/isTamaguiElement.js.map +2 -2
- package/dist/cjs/helpers/matchMedia.js +7 -6
- package/dist/cjs/helpers/matchMedia.js.map +2 -2
- package/dist/cjs/helpers/matchMedia.native.js +6 -3
- package/dist/cjs/helpers/matchMedia.native.js.map +2 -2
- package/dist/cjs/helpers/mergeProps.js +54 -0
- package/dist/cjs/helpers/mergeProps.js.map +7 -0
- package/dist/cjs/helpers/mergeTransform.js +42 -0
- package/dist/cjs/helpers/mergeTransform.js.map +7 -0
- package/dist/cjs/helpers/normalizeColor.js +80 -0
- package/dist/cjs/helpers/normalizeColor.js.map +7 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.js +123 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.js.map +7 -0
- package/dist/cjs/helpers/proxyThemeVariables.js +4 -4
- package/dist/cjs/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/cjs/helpers/pseudoDescriptors.js +42 -0
- package/dist/cjs/helpers/pseudoDescriptors.js.map +7 -0
- package/dist/cjs/helpers/registerCSSVariable.js +40 -0
- package/dist/cjs/helpers/registerCSSVariable.js.map +7 -0
- package/dist/cjs/helpers/{wrapThemeManagerContext.js → startTransition.js} +12 -15
- package/dist/cjs/helpers/startTransition.js.map +7 -0
- package/dist/cjs/helpers/themeable.js +17 -40
- package/dist/cjs/helpers/themeable.js.map +3 -3
- package/dist/cjs/helpers/themes.js +79 -0
- package/dist/cjs/helpers/themes.js.map +7 -0
- package/dist/cjs/helpers/useShallowSetState.js +44 -0
- package/dist/cjs/helpers/useShallowSetState.js.map +7 -0
- package/dist/cjs/helpers/validate.js +1 -122
- package/dist/cjs/helpers/validate.js.map +3 -3
- package/dist/cjs/helpers/withStaticProperties.js +3 -3
- package/dist/cjs/helpers/withStaticProperties.js.map +1 -1
- package/dist/cjs/hooks/getThemeUnwrapped.js +37 -0
- package/dist/cjs/hooks/getThemeUnwrapped.js.map +7 -0
- package/dist/cjs/hooks/useConstant.js +4 -2
- package/dist/cjs/hooks/useConstant.js.map +2 -2
- package/dist/cjs/hooks/useElementLayout.js +92 -0
- package/dist/cjs/hooks/useElementLayout.js.map +7 -0
- package/dist/cjs/hooks/useId.js +3 -33
- package/dist/cjs/hooks/useId.js.map +2 -2
- package/dist/cjs/hooks/useIsMounted.js +3 -4
- package/dist/cjs/hooks/useIsMounted.js.map +2 -2
- package/dist/cjs/hooks/useIsTouchDevice.js +6 -12
- package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/cjs/hooks/useMedia.js +166 -123
- package/dist/cjs/hooks/useMedia.js.map +3 -3
- package/dist/cjs/hooks/usePressable.js +4 -18
- package/dist/cjs/hooks/usePressable.js.map +1 -1
- package/dist/cjs/hooks/useSafeRef.js +58 -0
- package/dist/cjs/hooks/useSafeRef.js.map +7 -0
- package/dist/cjs/hooks/useServerHooks.js +36 -0
- package/dist/cjs/hooks/useServerHooks.js.map +7 -0
- package/dist/cjs/hooks/useTheme.js +168 -134
- package/dist/cjs/hooks/useTheme.js.map +3 -3
- package/dist/cjs/hooks/useUnmountEffect.js +1 -2
- package/dist/cjs/hooks/useUnmountEffect.js.map +1 -1
- package/dist/cjs/index.js +49 -26
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/inject-styles.js +40 -0
- package/dist/cjs/inject-styles.js.map +7 -0
- package/dist/cjs/injectStyles.js +40 -0
- package/dist/cjs/injectStyles.js.map +7 -0
- package/dist/cjs/insertFont.js +93 -0
- package/dist/cjs/insertFont.js.map +7 -0
- package/dist/cjs/react-native.js +22 -0
- package/dist/cjs/react-native.js.map +7 -0
- package/dist/cjs/setupReactNative.js +37 -0
- package/dist/cjs/setupReactNative.js.map +7 -0
- package/dist/cjs/static.js +2 -15
- package/dist/cjs/static.js.map +2 -2
- package/dist/cjs/styled.js +57 -51
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/types-rnw.js +1 -0
- package/dist/cjs/types-rnw.js.map +2 -2
- package/dist/cjs/types.js +1 -0
- package/dist/cjs/types.js.map +2 -2
- package/dist/cjs/updateTheme.js +47 -0
- package/dist/cjs/updateTheme.js.map +7 -0
- package/dist/cjs/vendor/Pressability.js +32 -0
- package/dist/cjs/vendor/Pressability.js.map +7 -0
- package/dist/cjs/vendor/Pressability.native.js +32 -0
- package/dist/cjs/vendor/Pressability.native.js.map +7 -0
- package/dist/cjs/views/FontLanguage.js +38 -0
- package/dist/cjs/views/FontLanguage.js.map +7 -0
- package/dist/cjs/views/FontLanguage.native.js +38 -0
- package/dist/cjs/views/FontLanguage.native.js.map +7 -0
- package/dist/cjs/{helpers/nativeGestureHandler.native.js → views/FontLanguage.types.js} +4 -5
- package/dist/cjs/views/FontLanguage.types.js.map +7 -0
- package/dist/cjs/views/Slot.js +64 -72
- package/dist/cjs/views/Slot.js.map +2 -2
- package/dist/cjs/views/Stack.js +4 -19
- package/dist/cjs/views/Stack.js.map +2 -2
- package/dist/cjs/views/TamaguiProvider.js +83 -0
- package/dist/cjs/views/TamaguiProvider.js.map +7 -0
- package/dist/cjs/views/Text.js +29 -29
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/cjs/views/Theme.js +43 -21
- package/dist/cjs/views/Theme.js.map +3 -3
- package/dist/cjs/views/ThemeInverse.js +25 -25
- package/dist/cjs/views/ThemeInverse.js.map +2 -2
- package/dist/cjs/views/ThemeProvider.js +35 -23
- package/dist/cjs/views/ThemeProvider.js.map +3 -3
- package/dist/cjs/views/ThemeReset.js +26 -20
- package/dist/cjs/views/ThemeReset.js.map +3 -3
- package/dist/esm/Tamagui.js +11 -12
- package/dist/esm/Tamagui.js.map +2 -2
- package/dist/esm/addTheme.js +56 -0
- package/dist/esm/addTheme.js.map +7 -0
- package/dist/esm/config.js +44 -0
- package/dist/esm/config.js.map +7 -0
- package/dist/esm/constants/constants.js +12 -8
- package/dist/esm/constants/constants.js.map +2 -2
- package/dist/esm/constants/isDevTools.js +5 -0
- package/dist/esm/constants/isDevTools.js.map +7 -0
- package/dist/esm/constants/platform.js +25 -12
- package/dist/esm/constants/platform.js.map +2 -2
- package/dist/esm/constants/platform.native.js +28 -0
- package/dist/esm/constants/platform.native.js.map +7 -0
- package/dist/esm/contexts/ButtonInsideButtonContext.js +0 -0
- package/dist/esm/contexts/ButtonInsideButtonContext.js.map +1 -1
- package/dist/esm/contexts/FontLanguageContext.js +6 -0
- package/dist/esm/contexts/FontLanguageContext.js.map +7 -0
- package/dist/esm/contexts/TextAncestorContext.js +6 -0
- package/dist/esm/contexts/TextAncestorContext.js.map +7 -0
- package/dist/esm/{ThemeContext.js → contexts/ThemeContext.js} +0 -0
- package/dist/esm/contexts/ThemeContext.js.map +7 -0
- package/dist/esm/createComponent.js +840 -415
- package/dist/esm/createComponent.js.map +3 -3
- package/dist/esm/createFont.js +4 -9
- package/dist/esm/createFont.js.map +2 -2
- package/dist/esm/createShorthands.js +0 -3
- package/dist/esm/createShorthands.js.map +2 -2
- package/dist/esm/createTamagui.js +134 -165
- package/dist/esm/createTamagui.js.map +3 -3
- package/dist/esm/createTheme.js +3 -3
- package/dist/esm/createTheme.js.map +2 -2
- package/dist/esm/createTokens.js +3 -24
- package/dist/esm/createTokens.js.map +2 -2
- package/dist/esm/createVariable.js +46 -26
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/createVariables.js +28 -0
- package/dist/esm/createVariables.js.map +7 -0
- package/dist/esm/helpers/RNComponents.js +11 -8
- package/dist/esm/helpers/RNComponents.js.map +2 -2
- package/dist/esm/{ThemeManager.js → helpers/ThemeManager.js} +54 -61
- package/dist/esm/helpers/ThemeManager.js.map +7 -0
- package/dist/esm/helpers/areEqualSets.js +2 -4
- package/dist/esm/helpers/areEqualSets.js.map +1 -1
- package/dist/esm/helpers/assignNativePropsToWeb.js +164 -0
- package/dist/esm/helpers/assignNativePropsToWeb.js.map +7 -0
- package/dist/esm/helpers/assignNativePropsToWeb.native.js +6 -0
- package/dist/esm/helpers/assignNativePropsToWeb.native.js.map +7 -0
- package/dist/esm/helpers/cache.js +18 -0
- package/dist/esm/helpers/cache.js.map +7 -0
- package/dist/esm/helpers/calc.js +47 -0
- package/dist/esm/helpers/calc.js.map +7 -0
- package/dist/esm/helpers/createMediaStyle.js +25 -13
- package/dist/esm/helpers/createMediaStyle.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +267 -123
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/createProxy.js +19 -0
- package/dist/esm/helpers/createProxy.js.map +7 -0
- package/dist/esm/helpers/expandStyle.js +66 -0
- package/dist/esm/helpers/expandStyle.js.map +7 -0
- package/dist/esm/helpers/expandStyles.js +89 -0
- package/dist/esm/helpers/expandStyles.js.map +7 -0
- package/dist/esm/helpers/extendStaticConfig.js +34 -28
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/fixNativeShadow.js +2 -4
- package/dist/esm/helpers/fixNativeShadow.js.map +1 -1
- package/dist/esm/helpers/getAnimationDriver.js +8 -0
- package/dist/esm/helpers/getAnimationDriver.js.map +7 -0
- package/dist/esm/helpers/getExpandedShorthands.js +2 -5
- package/dist/esm/helpers/getExpandedShorthands.js.map +2 -2
- package/dist/esm/helpers/{getTextSize.js → getFont.js} +17 -9
- package/dist/esm/helpers/getFont.js.map +7 -0
- package/dist/esm/helpers/getFontLanguage.js +5 -0
- package/dist/esm/helpers/getFontLanguage.js.map +7 -0
- package/dist/esm/helpers/getSize.js +16 -10
- package/dist/esm/helpers/getSize.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +498 -194
- package/dist/esm/helpers/getSplitStyles.js.map +3 -3
- package/dist/esm/helpers/getStackSize.js +22 -0
- package/dist/esm/helpers/getStackSize.js.map +7 -0
- package/dist/esm/helpers/getStylesAtomic.js +174 -108
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.js +0 -3
- package/dist/esm/helpers/getStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.js +79 -0
- package/dist/esm/helpers/getThemeCSSRules.js.map +7 -0
- package/dist/esm/helpers/getThemeCSSRules.native.js +7 -0
- package/dist/esm/helpers/getThemeCSSRules.native.js.map +7 -0
- package/dist/esm/helpers/getVariantExtras.js +64 -0
- package/dist/esm/helpers/getVariantExtras.js.map +7 -0
- package/dist/esm/helpers/insertStyleRule.js +85 -49
- package/dist/esm/helpers/insertStyleRule.js.map +3 -3
- package/dist/esm/helpers/isObj.js +1 -3
- package/dist/esm/helpers/isObj.js.map +1 -1
- package/dist/esm/helpers/isTamaguiComponent.js +13 -0
- package/dist/esm/helpers/isTamaguiComponent.js.map +7 -0
- package/dist/esm/helpers/isTamaguiElement.js +4 -6
- package/dist/esm/helpers/isTamaguiElement.js.map +2 -2
- package/dist/esm/helpers/matchMedia.js +6 -7
- package/dist/esm/helpers/matchMedia.js.map +2 -2
- package/dist/esm/helpers/matchMedia.native.js +1 -3
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.js +30 -0
- package/dist/esm/helpers/mergeProps.js.map +7 -0
- package/dist/esm/helpers/mergeTransform.js +17 -0
- package/dist/esm/helpers/mergeTransform.js.map +7 -0
- package/dist/esm/helpers/normalizeColor.js +49 -0
- package/dist/esm/helpers/normalizeColor.js.map +7 -0
- package/dist/esm/helpers/normalizeValueWithProperty.js +98 -0
- package/dist/esm/helpers/normalizeValueWithProperty.js.map +7 -0
- package/dist/esm/helpers/proxyThemeVariables.js +3 -5
- package/dist/esm/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/esm/helpers/pseudoDescriptors.js +18 -0
- package/dist/esm/helpers/pseudoDescriptors.js.map +7 -0
- package/dist/esm/helpers/registerCSSVariable.js +14 -0
- package/dist/esm/helpers/registerCSSVariable.js.map +7 -0
- package/dist/esm/helpers/startTransition.js +6 -0
- package/dist/esm/helpers/startTransition.js.map +7 -0
- package/dist/esm/helpers/themeable.js +11 -9
- package/dist/esm/helpers/themeable.js.map +2 -2
- package/dist/esm/helpers/themes.js +54 -0
- package/dist/esm/helpers/themes.js.map +7 -0
- package/dist/esm/helpers/useShallowSetState.js +20 -0
- package/dist/esm/helpers/useShallowSetState.js.map +7 -0
- package/dist/esm/helpers/validate.js +0 -75
- package/dist/esm/helpers/validate.js.map +3 -3
- package/dist/esm/helpers/withStaticProperties.js +2 -4
- package/dist/esm/helpers/withStaticProperties.js.map +1 -1
- package/dist/esm/hooks/getThemeUnwrapped.js +12 -0
- package/dist/esm/hooks/getThemeUnwrapped.js.map +7 -0
- package/dist/esm/hooks/useConstant.js +4 -4
- package/dist/esm/hooks/useConstant.js.map +2 -2
- package/dist/esm/hooks/useElementLayout.js +66 -0
- package/dist/esm/hooks/useElementLayout.js.map +7 -0
- package/dist/esm/hooks/useId.js +1 -31
- package/dist/esm/hooks/useId.js.map +2 -2
- package/dist/esm/hooks/useIsMounted.js +1 -4
- package/dist/esm/hooks/useIsMounted.js.map +2 -2
- package/dist/esm/hooks/useIsTouchDevice.js +5 -13
- package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/esm/hooks/useMedia.js +159 -113
- package/dist/esm/hooks/useMedia.js.map +3 -3
- package/dist/esm/hooks/usePressable.js +2 -4
- package/dist/esm/hooks/usePressable.js.map +1 -1
- package/dist/esm/hooks/useSafeRef.js +34 -0
- package/dist/esm/hooks/useSafeRef.js.map +7 -0
- package/dist/esm/hooks/useServerHooks.js +11 -0
- package/dist/esm/hooks/useServerHooks.js.map +7 -0
- package/dist/esm/hooks/useTheme.js +161 -111
- package/dist/esm/hooks/useTheme.js.map +3 -3
- package/dist/esm/hooks/useUnmountEffect.js +0 -3
- package/dist/esm/hooks/useUnmountEffect.js.map +1 -1
- package/dist/esm/index.js +44 -18
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/inject-styles.js +16 -0
- package/dist/esm/inject-styles.js.map +7 -0
- package/dist/esm/injectStyles.js +16 -0
- package/dist/esm/injectStyles.js.map +7 -0
- package/dist/esm/insertFont.js +67 -0
- package/dist/esm/insertFont.js.map +7 -0
- package/dist/esm/react-native.js +3 -0
- package/dist/esm/react-native.js.map +7 -0
- package/dist/esm/setupReactNative.js +12 -0
- package/dist/esm/setupReactNative.js.map +7 -0
- package/dist/esm/static.js +1 -15
- package/dist/esm/static.js.map +2 -2
- package/dist/esm/styled.js +50 -19
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/types-rnw.js +0 -0
- package/dist/esm/types-rnw.js.map +0 -0
- package/dist/esm/types.js +0 -0
- package/dist/esm/types.js.map +0 -0
- package/dist/esm/updateTheme.js +23 -0
- package/dist/esm/updateTheme.js.map +7 -0
- package/dist/esm/vendor/Pressability.js +7 -0
- package/dist/esm/vendor/Pressability.js.map +7 -0
- package/dist/esm/vendor/Pressability.native.js +7 -0
- package/dist/esm/vendor/Pressability.native.js.map +7 -0
- package/dist/esm/views/FontLanguage.js +14 -0
- package/dist/esm/views/FontLanguage.js.map +7 -0
- package/dist/esm/views/FontLanguage.native.js +14 -0
- package/dist/esm/views/FontLanguage.native.js.map +7 -0
- package/dist/esm/views/FontLanguage.types.js +1 -0
- package/dist/{cjs/defaultComponentState.js.map → esm/views/FontLanguage.types.js.map} +0 -0
- package/dist/esm/views/Slot.js +55 -37
- package/dist/esm/views/Slot.js.map +2 -2
- package/dist/esm/views/Stack.js +0 -0
- package/dist/esm/views/Stack.js.map +2 -2
- package/dist/esm/views/TamaguiProvider.js +53 -0
- package/dist/esm/views/TamaguiProvider.js.map +7 -0
- package/dist/esm/views/Text.js +14 -5
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/esm/views/Theme.js +35 -19
- package/dist/esm/views/Theme.js.map +3 -3
- package/dist/esm/views/ThemeInverse.js +22 -20
- package/dist/esm/views/ThemeInverse.js.map +2 -2
- package/dist/esm/views/ThemeProvider.js +28 -21
- package/dist/esm/views/ThemeProvider.js.map +2 -2
- package/dist/esm/views/ThemeReset.js +21 -20
- package/dist/esm/views/ThemeReset.js.map +2 -2
- package/package.json +52 -16
- package/reset.css +25 -4
- package/src/Tamagui.ts +48 -0
- package/src/addTheme.ts +68 -0
- package/src/config.ts +44 -0
- package/src/constants/constants.ts +19 -0
- package/src/constants/isDevTools.ts +6 -0
- package/src/contexts/ButtonInsideButtonContext.tsx +3 -0
- package/src/contexts/FontLanguageContext.tsx +5 -0
- package/src/contexts/TextAncestorContext.tsx +3 -0
- package/src/contexts/ThemeContext.tsx +5 -0
- package/src/createComponent.tsx +1460 -0
- package/src/createFont.ts +29 -0
- package/src/createShorthands.ts +7 -0
- package/src/createTamagui.ts +226 -0
- package/src/createTheme.ts +13 -0
- package/src/createTokens.ts +35 -0
- package/src/createVariable.ts +83 -0
- package/src/createVariables.ts +42 -0
- package/src/helpers/RNComponents.tsx +14 -0
- package/src/helpers/ThemeManager.tsx +227 -0
- package/src/helpers/areEqualSets.tsx +9 -0
- package/src/helpers/assignNativePropsToWeb.native.tsx +1 -0
- package/src/helpers/cache.ts +18 -0
- package/src/helpers/createMediaStyle.ts +55 -0
- package/src/helpers/createPropMapper.ts +526 -0
- package/src/helpers/createProxy.ts +16 -0
- package/src/helpers/expandStyle.ts +81 -0
- package/src/helpers/expandStyles.ts +106 -0
- package/src/helpers/extendStaticConfig.ts +75 -0
- package/src/helpers/fixNativeShadow.tsx +2 -0
- package/src/helpers/getAnimationDriver.tsx +5 -0
- package/src/helpers/getExpandedShorthands.ts +15 -0
- package/src/helpers/getFontLanguage.ts +2 -0
- package/src/helpers/getSize.ts +22 -0
- package/src/helpers/getSplitStyles.tsx +844 -0
- package/src/helpers/getStylesAtomic.native.ts +3 -0
- package/src/helpers/getStylesAtomic.ts +272 -0
- package/src/helpers/getThemeCSSRules.native.ts +3 -0
- package/src/helpers/getThemeCSSRules.ts +105 -0
- package/src/helpers/getVariantExtras.tsx +85 -0
- package/src/helpers/insertStyleRule.tsx +158 -0
- package/src/helpers/isObj.ts +1 -0
- package/src/helpers/isTamaguiComponent.tsx +15 -0
- package/src/helpers/isTamaguiElement.tsx +12 -0
- package/src/helpers/matchMedia.native.ts +6 -0
- package/src/helpers/matchMedia.ts +17 -0
- package/src/helpers/mergeProps.ts +56 -0
- package/src/helpers/mergeTransform.ts +16 -0
- package/src/helpers/normalizeColor.ts +53 -0
- package/src/helpers/normalizeValueWithProperty.ts +110 -0
- package/src/helpers/proxyThemeVariables.tsx +15 -0
- package/src/helpers/pseudoDescriptors.ts +18 -0
- package/src/helpers/registerCSSVariable.ts +11 -0
- package/src/helpers/themeable.tsx +45 -0
- package/src/helpers/themes.ts +69 -0
- package/src/helpers/useShallowSetState.tsx +19 -0
- package/src/helpers/withStaticProperties.tsx +7 -0
- package/src/hooks/getThemeUnwrapped.tsx +7 -0
- package/src/hooks/useElementLayout.tsx +90 -0
- package/src/hooks/useId.tsx +1 -0
- package/src/hooks/useIsTouchDevice.tsx +6 -0
- package/src/hooks/useMedia.tsx +260 -0
- package/src/hooks/useSafeRef.ts +48 -0
- package/src/hooks/useServerHooks.tsx +12 -0
- package/src/hooks/useTheme.tsx +300 -0
- package/src/index.ts +74 -0
- package/src/inject-styles.ts +20 -0
- package/src/insertFont.ts +70 -0
- package/src/setupReactNative.ts +9 -0
- package/src/static.ts +5 -0
- package/src/styled.tsx +204 -0
- package/src/types-rnw.tsx +162 -0
- package/src/types.tsx +1324 -0
- package/src/updateTheme.ts +23 -0
- package/src/vendor/Pressability.native.tsx +3 -0
- package/src/vendor/Pressability.tsx +2 -0
- package/src/views/FontLanguage.native.tsx +10 -0
- package/src/views/FontLanguage.tsx +18 -0
- package/src/views/FontLanguage.types.ts +13 -0
- package/src/views/Slot.tsx +147 -0
- package/src/views/Stack.tsx +24 -0
- package/src/views/TamaguiProvider.tsx +56 -0
- package/src/views/Text.tsx +81 -0
- package/src/views/Theme.tsx +72 -0
- package/src/views/ThemeInverse.tsx +33 -0
- package/src/views/ThemeProvider.tsx +63 -0
- package/src/views/ThemeReset.tsx +43 -0
- package/types/Tamagui.d.ts +11 -11
- package/types/addTheme.d.ts +11 -0
- package/types/config.d.ts +47 -0
- package/types/constants/constants.d.ts +15 -4
- package/types/constants/isDevTools.d.ts +2 -0
- package/types/constants/platform.d.ts +7 -6
- package/types/constants/platform.native.d.ts +13 -0
- package/types/contexts/FontLanguageContext.d.ts +5 -0
- package/types/contexts/TextAncestorContext.d.ts +3 -0
- package/types/{ThemeContext.d.ts → contexts/ThemeContext.d.ts} +1 -1
- package/types/createComponent.d.ts +17 -15
- package/types/createShorthands.d.ts +2 -1
- package/types/createTamagui.d.ts +2 -17
- package/types/createTheme.d.ts +1 -1
- package/types/createTokens.d.ts +5 -6
- package/types/createVariable.d.ts +24 -12
- package/types/createVariables.d.ts +10 -0
- package/types/helpers/RNComponents.d.ts +1 -1
- package/types/helpers/ThemeManager.d.ts +45 -0
- package/types/helpers/assignNativePropsToWeb.d.ts +2 -0
- package/types/helpers/assignNativePropsToWeb.native.d.ts +2 -0
- package/types/helpers/cache.d.ts +12 -0
- package/types/helpers/calc.d.ts +1 -0
- package/types/helpers/createMediaStyle.d.ts +2 -4
- package/types/helpers/createPropMapper.d.ts +6 -3
- package/types/helpers/createProxy.d.ts +2 -0
- package/types/helpers/expandStyle.d.ts +6 -0
- package/types/helpers/expandStyles.d.ts +26 -0
- package/types/helpers/getAnimationDriver.d.ts +6 -0
- package/types/helpers/getFont.d.ts +3 -0
- package/types/helpers/getFontLanguage.d.ts +2 -0
- package/types/helpers/getSize.d.ts +3 -2
- package/types/helpers/getSplitStyles.d.ts +15 -12
- package/types/helpers/getStackSize.d.ts +8 -0
- package/types/helpers/getStylesAtomic.d.ts +14 -23
- package/types/helpers/getThemeCSSRules.d.ts +8 -0
- package/types/helpers/getThemeCSSRules.native.d.ts +2 -0
- package/types/helpers/getVariantExtras.d.ts +5 -0
- package/types/helpers/insertStyleRule.d.ts +8 -4
- package/types/helpers/isTamaguiComponent.d.ts +5 -0
- package/types/helpers/isTamaguiElement.d.ts +5 -1
- package/types/helpers/matchMedia.d.ts +1 -1
- package/types/helpers/mergeProps.d.ts +17 -0
- package/types/helpers/mergeTransform.d.ts +7 -0
- package/types/helpers/normalizeColor.d.ts +3 -0
- package/types/helpers/normalizeValueWithProperty.d.ts +7 -0
- package/types/helpers/pseudoDescriptors.d.ts +16 -0
- package/types/helpers/registerCSSVariable.d.ts +5 -0
- package/types/helpers/startTransition.d.ts +3 -0
- package/types/helpers/themes.d.ts +4 -0
- package/types/helpers/useShallowSetState.d.ts +3 -0
- package/types/helpers/validate.d.ts +0 -3
- package/types/hooks/getThemeUnwrapped.d.ts +3 -0
- package/types/hooks/useElementLayout.d.ts +27 -0
- package/types/hooks/useId.d.ts +1 -8
- package/types/hooks/useMedia.d.ts +22 -6
- package/types/hooks/useMedia.test.d.ts +1 -0
- package/types/hooks/usePressablePressResponder.d.ts +84 -0
- package/types/hooks/useSafeRef.d.ts +4 -0
- package/types/hooks/useServerHooks.d.ts +4 -0
- package/types/hooks/useTheme.d.ts +21 -31
- package/types/index.d.ts +25 -14
- package/types/inject-styles.d.ts +7 -0
- package/types/injectStyles.d.ts +7 -0
- package/types/insertFont.d.ts +9 -0
- package/types/react-native.d.ts +8 -0
- package/types/setupReactNative.d.ts +3 -0
- package/types/static.d.ts +1 -15
- package/types/styled.d.ts +7 -3
- package/types/types.d.ts +311 -106
- package/types/updateTheme.d.ts +9 -0
- package/types/vendor/Pressability.d.ts +3 -0
- package/types/vendor/Pressability.native.d.ts +3 -0
- package/types/views/AbsoluteFill.d.ts +5 -0
- package/types/views/AbsoluteFill.native.d.ts +3 -0
- package/types/views/FontLanguage.d.ts +4 -0
- package/types/views/FontLanguage.native.d.ts +4 -0
- package/types/views/FontLanguage.types.d.ts +11 -0
- package/types/views/Slot.d.ts +5 -4
- package/types/views/Stack.d.ts +1 -1
- package/types/views/TamaguiProvider.d.ts +4 -0
- package/types/views/Text.d.ts +1 -1
- package/types/views/Theme.d.ts +3 -9
- package/types/views/ThemeInverse.d.ts +4 -8
- package/types/views/ThemeProvider.d.ts +2 -1
- package/dist/cjs/ThemeContext.js.map +0 -7
- package/dist/cjs/ThemeManager.js.map +0 -7
- package/dist/cjs/conf.js.map +0 -7
- package/dist/cjs/constants/rnw.js +0 -46
- package/dist/cjs/constants/rnw.js.map +0 -7
- package/dist/cjs/defaultComponentState.js +0 -1
- package/dist/cjs/helpers/addStylesUsingClassname.js +0 -87
- package/dist/cjs/helpers/addStylesUsingClassname.js.map +0 -7
- package/dist/cjs/helpers/createShallowUpdate.js +0 -55
- package/dist/cjs/helpers/createShallowUpdate.js.map +0 -7
- package/dist/cjs/helpers/createTamaguiProvider.js +0 -93
- package/dist/cjs/helpers/createTamaguiProvider.js.map +0 -7
- package/dist/cjs/helpers/fixNativeShadow.native.js +0 -53
- package/dist/cjs/helpers/fixNativeShadow.native.js.map +0 -7
- package/dist/cjs/helpers/getButtonSize.js +0 -45
- package/dist/cjs/helpers/getButtonSize.js.map +0 -7
- package/dist/cjs/helpers/getTextSize.js.map +0 -7
- package/dist/cjs/helpers/nativeGestureHandler.js.map +0 -7
- package/dist/cjs/helpers/nativeGestureHandler.native.js.map +0 -7
- package/dist/cjs/helpers/wrapThemeManagerContext.js.map +0 -7
- package/dist/cjs/hooks/useFeatures.js +0 -228
- package/dist/cjs/hooks/useFeatures.js.map +0 -7
- package/dist/cjs/hooks/usePrevious.js +0 -1
- package/dist/cjs/hooks/usePrevious.js.map +0 -7
- package/dist/cjs/nativeGestureHandler.native.js.map +0 -7
- package/dist/cjs/views/TextAncestorContext.js +0 -45
- package/dist/cjs/views/TextAncestorContext.js.map +0 -7
- package/dist/esm/ThemeContext.js.map +0 -7
- package/dist/esm/ThemeManager.js.map +0 -7
- package/dist/esm/conf.js +0 -36
- package/dist/esm/conf.js.map +0 -7
- package/dist/esm/constants/rnw.js +0 -24
- package/dist/esm/constants/rnw.js.map +0 -7
- package/dist/esm/defaultComponentState.js +0 -1
- package/dist/esm/defaultComponentState.js.map +0 -7
- package/dist/esm/helpers/addStylesUsingClassname.js +0 -64
- package/dist/esm/helpers/addStylesUsingClassname.js.map +0 -7
- package/dist/esm/helpers/createShallowUpdate.js +0 -19
- package/dist/esm/helpers/createShallowUpdate.js.map +0 -7
- package/dist/esm/helpers/createTamaguiProvider.js +0 -40
- package/dist/esm/helpers/createTamaguiProvider.js.map +0 -7
- package/dist/esm/helpers/fixNativeShadow.native.js +0 -32
- package/dist/esm/helpers/fixNativeShadow.native.js.map +0 -7
- package/dist/esm/helpers/getButtonSize.js +0 -24
- package/dist/esm/helpers/getButtonSize.js.map +0 -7
- package/dist/esm/helpers/getTextSize.js.map +0 -7
- package/dist/esm/helpers/nativeGestureHandler.js +0 -7
- package/dist/esm/helpers/nativeGestureHandler.js.map +0 -7
- package/dist/esm/helpers/nativeGestureHandler.native.js +0 -2
- package/dist/esm/helpers/nativeGestureHandler.native.js.map +0 -7
- package/dist/esm/helpers/wrapThemeManagerContext.js +0 -14
- package/dist/esm/helpers/wrapThemeManagerContext.js.map +0 -7
- package/dist/esm/hooks/useFeatures.js +0 -173
- package/dist/esm/hooks/useFeatures.js.map +0 -7
- package/dist/esm/hooks/usePrevious.js +0 -1
- package/dist/esm/hooks/usePrevious.js.map +0 -7
- package/dist/esm/nativeGestureHandler.native.js +0 -2
- package/dist/esm/nativeGestureHandler.native.js.map +0 -7
- package/dist/esm/views/TextAncestorContext.js +0 -18
- package/dist/esm/views/TextAncestorContext.js.map +0 -7
- package/dist/jsx/Tamagui.js +0 -41
- package/dist/jsx/ThemeContext.js +0 -5
- package/dist/jsx/ThemeManager.js +0 -186
- package/dist/jsx/conf.js +0 -35
- package/dist/jsx/constants/constants.js +0 -17
- package/dist/jsx/constants/platform.js +0 -25
- package/dist/jsx/constants/rnw.js +0 -23
- package/dist/jsx/contexts/ButtonInsideButtonContext.js +0 -5
- package/dist/jsx/createComponent.js +0 -636
- package/dist/jsx/createFont.js +0 -27
- package/dist/jsx/createShorthands.js +0 -9
- package/dist/jsx/createTamagui.js +0 -201
- package/dist/jsx/createTheme.js +0 -6
- package/dist/jsx/createTokens.js +0 -28
- package/dist/jsx/createVariable.js +0 -48
- package/dist/jsx/defaultComponentState.js +0 -0
- package/dist/jsx/helpers/RNComponents.js +0 -11
- package/dist/jsx/helpers/addStylesUsingClassname.js +0 -63
- package/dist/jsx/helpers/areEqualSets.js +0 -15
- package/dist/jsx/helpers/createMediaStyle.js +0 -30
- package/dist/jsx/helpers/createPropMapper.js +0 -237
- package/dist/jsx/helpers/createShallowUpdate.js +0 -18
- package/dist/jsx/helpers/createTamaguiProvider.js +0 -34
- package/dist/jsx/helpers/extendStaticConfig.js +0 -61
- package/dist/jsx/helpers/fixNativeShadow.js +0 -7
- package/dist/jsx/helpers/fixNativeShadow.native.js +0 -31
- package/dist/jsx/helpers/getButtonSize.js +0 -23
- package/dist/jsx/helpers/getExpandedShorthands.js +0 -18
- package/dist/jsx/helpers/getSize.js +0 -12
- package/dist/jsx/helpers/getSplitStyles.js +0 -322
- package/dist/jsx/helpers/getStylesAtomic.js +0 -130
- package/dist/jsx/helpers/getStylesAtomic.native.js +0 -9
- package/dist/jsx/helpers/getTextSize.js +0 -33
- package/dist/jsx/helpers/insertStyleRule.js +0 -94
- package/dist/jsx/helpers/isObj.js +0 -6
- package/dist/jsx/helpers/isTamaguiElement.js +0 -10
- package/dist/jsx/helpers/matchMedia.js +0 -17
- package/dist/jsx/helpers/matchMedia.native.js +0 -8
- package/dist/jsx/helpers/nativeGestureHandler.js +0 -6
- package/dist/jsx/helpers/nativeGestureHandler.native.js +0 -1
- package/dist/jsx/helpers/proxyThemeVariables.js +0 -17
- package/dist/jsx/helpers/themeable.js +0 -24
- package/dist/jsx/helpers/validate.js +0 -75
- package/dist/jsx/helpers/withStaticProperties.js +0 -9
- package/dist/jsx/helpers/wrapThemeManagerContext.js +0 -10
- package/dist/jsx/hooks/useConstant.js +0 -14
- package/dist/jsx/hooks/useFeatures.js +0 -167
- package/dist/jsx/hooks/useId.js +0 -34
- package/dist/jsx/hooks/useIsMounted.js +0 -18
- package/dist/jsx/hooks/useIsTouchDevice.js +0 -16
- package/dist/jsx/hooks/useMedia.js +0 -158
- package/dist/jsx/hooks/usePressable.js +0 -13
- package/dist/jsx/hooks/usePrevious.js +0 -0
- package/dist/jsx/hooks/useTheme.js +0 -177
- package/dist/jsx/hooks/useUnmountEffect.js +0 -10
- package/dist/jsx/index.js +0 -54
- package/dist/jsx/nativeGestureHandler.native.js +0 -1
- package/dist/jsx/static.js +0 -16
- package/dist/jsx/styled.js +0 -47
- package/dist/jsx/types-rnw.js +0 -0
- package/dist/jsx/types.js +0 -0
- package/dist/jsx/views/Slot.js +0 -75
- package/dist/jsx/views/Stack.js +0 -12
- package/dist/jsx/views/Text.js +0 -56
- package/dist/jsx/views/TextAncestorContext.js +0 -15
- package/dist/jsx/views/Theme.js +0 -31
- package/dist/jsx/views/ThemeInverse.js +0 -27
- package/dist/jsx/views/ThemeProvider.js +0 -35
- package/dist/jsx/views/ThemeReset.js +0 -34
- package/types/Tamagui.d.ts.map +0 -1
- package/types/ThemeContext.d.ts.map +0 -1
- package/types/ThemeManager.d.ts +0 -49
- package/types/ThemeManager.d.ts.map +0 -1
- package/types/conf.d.ts +0 -27
- package/types/conf.d.ts.map +0 -1
- package/types/constants/constants.d.ts.map +0 -1
- package/types/constants/platform.d.ts.map +0 -1
- package/types/constants/rnw.d.ts +0 -2
- package/types/constants/rnw.d.ts.map +0 -1
- package/types/contexts/ButtonInsideButtonContext.d.ts.map +0 -1
- package/types/createComponent.d.ts.map +0 -1
- package/types/createFont.d.ts.map +0 -1
- package/types/createShorthands.d.ts.map +0 -1
- package/types/createTamagui.d.ts.map +0 -1
- package/types/createTheme.d.ts.map +0 -1
- package/types/createTokens.d.ts.map +0 -1
- package/types/createVariable.d.ts.map +0 -1
- package/types/defaultComponentState.d.ts +0 -1
- package/types/defaultComponentState.d.ts.map +0 -1
- package/types/helpers/RNComponents.d.ts.map +0 -1
- package/types/helpers/addStylesUsingClassname.d.ts +0 -3
- package/types/helpers/addStylesUsingClassname.d.ts.map +0 -1
- package/types/helpers/areEqualSets.d.ts.map +0 -1
- package/types/helpers/createMediaStyle.d.ts.map +0 -1
- package/types/helpers/createPropMapper.d.ts.map +0 -1
- package/types/helpers/createShallowUpdate.d.ts +0 -4
- package/types/helpers/createShallowUpdate.d.ts.map +0 -1
- package/types/helpers/createTamaguiProvider.d.ts +0 -7
- package/types/helpers/createTamaguiProvider.d.ts.map +0 -1
- package/types/helpers/extendStaticConfig.d.ts.map +0 -1
- package/types/helpers/fixNativeShadow.d.ts.map +0 -1
- package/types/helpers/fixNativeShadow.native.d.ts +0 -3
- package/types/helpers/fixNativeShadow.native.d.ts.map +0 -1
- package/types/helpers/getButtonSize.d.ts +0 -8
- package/types/helpers/getButtonSize.d.ts.map +0 -1
- package/types/helpers/getExpandedShorthands.d.ts.map +0 -1
- package/types/helpers/getSize.d.ts.map +0 -1
- package/types/helpers/getSplitStyles.d.ts.map +0 -1
- package/types/helpers/getStylesAtomic.d.ts.map +0 -1
- package/types/helpers/getStylesAtomic.native.d.ts.map +0 -1
- package/types/helpers/getTextSize.d.ts +0 -3
- package/types/helpers/getTextSize.d.ts.map +0 -1
- package/types/helpers/insertStyleRule.d.ts.map +0 -1
- package/types/helpers/isObj.d.ts.map +0 -1
- package/types/helpers/isTamaguiElement.d.ts.map +0 -1
- package/types/helpers/matchMedia.d.ts.map +0 -1
- package/types/helpers/matchMedia.native.d.ts.map +0 -1
- package/types/helpers/nativeGestureHandler.d.ts +0 -2
- package/types/helpers/nativeGestureHandler.d.ts.map +0 -1
- package/types/helpers/nativeGestureHandler.native.d.ts +0 -2
- package/types/helpers/nativeGestureHandler.native.d.ts.map +0 -1
- package/types/helpers/proxyThemeVariables.d.ts.map +0 -1
- package/types/helpers/themeable.d.ts.map +0 -1
- package/types/helpers/validate.d.ts.map +0 -1
- package/types/helpers/withStaticProperties.d.ts.map +0 -1
- package/types/helpers/wrapThemeManagerContext.d.ts +0 -3
- package/types/helpers/wrapThemeManagerContext.d.ts.map +0 -1
- package/types/hooks/useConstant.d.ts.map +0 -1
- package/types/hooks/useFeatures.d.ts +0 -18
- package/types/hooks/useFeatures.d.ts.map +0 -1
- package/types/hooks/useId.d.ts.map +0 -1
- package/types/hooks/useIsMounted.d.ts.map +0 -1
- package/types/hooks/useIsTouchDevice.d.ts.map +0 -1
- package/types/hooks/useMedia.d.ts.map +0 -1
- package/types/hooks/usePressable.d.ts.map +0 -1
- package/types/hooks/usePrevious.d.ts +0 -1
- package/types/hooks/usePrevious.d.ts.map +0 -1
- package/types/hooks/useTheme.d.ts.map +0 -1
- package/types/hooks/useUnmountEffect.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/nativeGestureHandler.native.d.ts +0 -2
- package/types/nativeGestureHandler.native.d.ts.map +0 -1
- package/types/static.d.ts.map +0 -1
- package/types/styled.d.ts.map +0 -1
- package/types/types-rnw.d.ts.map +0 -1
- package/types/types.d.ts.map +0 -1
- package/types/views/Slot.d.ts.map +0 -1
- package/types/views/Stack.d.ts.map +0 -1
- package/types/views/Text.d.ts.map +0 -1
- package/types/views/TextAncestorContext.d.ts +0 -5
- package/types/views/TextAncestorContext.d.ts.map +0 -1
- package/types/views/Theme.d.ts.map +0 -1
- package/types/views/ThemeInverse.d.ts.map +0 -1
- package/types/views/ThemeProvider.d.ts.map +0 -1
- package/types/views/ThemeReset.d.ts.map +0 -1
package/types/types.d.ts
CHANGED
|
@@ -1,11 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { Variable } from './createVariable';
|
|
5
|
-
import { ResolveVariableTypes } from './helpers/createPropMapper';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import type { GestureResponderEvent, Image, PressableProps, TextProps as ReactTextProps, Text, TextInput, TextStyle, View, ViewProps, ViewStyle } from '@tamagui/types-react-native';
|
|
2
|
+
import type { Properties } from 'csstype';
|
|
3
|
+
import type { Component, ForwardRefExoticComponent, FunctionComponent, ReactNode, RefAttributes, RefObject } from 'react';
|
|
4
|
+
import type { Variable } from './createVariable';
|
|
5
|
+
import type { ResolveVariableTypes } from './helpers/createPropMapper';
|
|
6
|
+
import type { TamaguiReactElement } from './static';
|
|
7
|
+
import type { RNWTextProps, RNWViewProps } from './types-rnw';
|
|
8
|
+
import type { FontLanguageProps } from './views/FontLanguage.types';
|
|
9
|
+
import type { ThemeProviderProps } from './views/ThemeProvider';
|
|
10
|
+
export declare type SpaceDirection = 'vertical' | 'horizontal' | 'both';
|
|
11
|
+
export declare type TamaguiElement = HTMLElement | View;
|
|
12
|
+
export declare type DebugProp = boolean | 'break' | 'verbose';
|
|
13
|
+
export declare type TamaguiComponentPropsBase = {
|
|
14
|
+
hitSlop?: PressableProps['hitSlop'];
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
space?: SpaceTokens | null;
|
|
17
|
+
spaceDirection?: SpaceDirection;
|
|
18
|
+
separator?: ReactNode;
|
|
19
|
+
dangerouslySetInnerHTML?: {
|
|
20
|
+
__html: string;
|
|
21
|
+
};
|
|
22
|
+
animation?: AnimationProp;
|
|
23
|
+
animateOnly?: string[];
|
|
24
|
+
children?: any | any[];
|
|
25
|
+
debug?: DebugProp;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
themeShallow?: boolean;
|
|
29
|
+
id?: string;
|
|
30
|
+
tag?: string;
|
|
31
|
+
theme?: ThemeName | null;
|
|
32
|
+
componentName?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Forces the pseudo style state to be on
|
|
35
|
+
*/
|
|
36
|
+
forceStyle?: 'hover' | 'press' | 'focus';
|
|
37
|
+
onHoverIn?: (e: MouseEvent) => any;
|
|
38
|
+
onHoverOut?: (e: MouseEvent) => any;
|
|
39
|
+
onPress?: (e: GestureResponderEvent) => any;
|
|
40
|
+
onPressIn?: (e: GestureResponderEvent) => any;
|
|
41
|
+
onPressOut?: (e: GestureResponderEvent) => any;
|
|
42
|
+
onMouseEnter?: (e: MouseEvent) => any;
|
|
43
|
+
onMouseLeave?: (e: MouseEvent) => any;
|
|
44
|
+
onMouseDown?: (e: MouseEvent) => any;
|
|
45
|
+
};
|
|
46
|
+
export declare type ReactComponentWithRef<Props, Ref> = ForwardRefExoticComponent<Props & RefAttributes<Ref>>;
|
|
9
47
|
export declare type ConfigListener = (conf: TamaguiInternalConfig) => void;
|
|
10
48
|
export declare type VariableVal = number | string | Variable;
|
|
11
49
|
export declare type VariableColorVal = string | Variable;
|
|
@@ -51,55 +89,133 @@ declare type GenericThemes = {
|
|
|
51
89
|
[key: string]: VariableVal;
|
|
52
90
|
});
|
|
53
91
|
};
|
|
54
|
-
declare type
|
|
55
|
-
declare type
|
|
56
|
-
[key
|
|
92
|
+
declare type AllStyleKeys = keyof StackStylePropsBase | keyof TextStylePropsBase;
|
|
93
|
+
export declare type CreateShorthands = {
|
|
94
|
+
[key: string]: AllStyleKeys;
|
|
95
|
+
};
|
|
96
|
+
export declare type GenericShorthands = {};
|
|
97
|
+
declare type GenericMedia = {
|
|
98
|
+
[key: string]: {
|
|
57
99
|
[key: string]: number | string;
|
|
58
100
|
};
|
|
59
101
|
};
|
|
60
|
-
declare type GenericFonts =
|
|
61
|
-
[key: string]: GenericFont;
|
|
62
|
-
};
|
|
102
|
+
export declare type GenericFonts = Record<string, GenericFont>;
|
|
63
103
|
declare type GenericAnimations = {
|
|
64
104
|
[key: string]: string | {
|
|
65
105
|
[key: string]: any;
|
|
66
|
-
};
|
|
106
|
+
} | any[];
|
|
67
107
|
};
|
|
68
108
|
export interface TamaguiCustomConfig {
|
|
69
109
|
}
|
|
70
110
|
export interface TamaguiConfig extends Omit<GenericTamaguiConfig, keyof TamaguiCustomConfig>, TamaguiCustomConfig {
|
|
71
111
|
}
|
|
72
|
-
export declare type CreateTamaguiConfig<A extends GenericTokens, B extends GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts> =
|
|
73
|
-
fonts: F
|
|
112
|
+
export declare type CreateTamaguiConfig<A extends GenericTokens, B extends GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts> = {
|
|
113
|
+
fonts: RemoveLanguagePostfixes<F>;
|
|
114
|
+
fontLanguages: GetLanguagePostfixes<F> extends never ? string[] : GetLanguagePostfixes<F>[];
|
|
74
115
|
tokens: A;
|
|
75
|
-
themes:
|
|
116
|
+
themes: {
|
|
117
|
+
[Name in keyof B]: {
|
|
118
|
+
[Key in keyof B[Name]]: Variable;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
76
121
|
shorthands: C;
|
|
77
122
|
media: D;
|
|
78
123
|
animations: AnimationDriver<E>;
|
|
79
124
|
};
|
|
125
|
+
declare type GetLanguagePostfix<Set> = Set extends string ? Set extends `${string}_${infer Postfix}` ? Postfix : never : never;
|
|
126
|
+
declare type OmitLanguagePostfix<Set> = Set extends string ? Set extends `${infer Prefix}_${string}` ? Prefix : Set : never;
|
|
127
|
+
declare type RemoveLanguagePostfixes<F extends GenericFonts> = {
|
|
128
|
+
[Key in OmitLanguagePostfix<keyof F>]: F[Key];
|
|
129
|
+
};
|
|
130
|
+
declare type GetLanguagePostfixes<F extends GenericFonts> = GetLanguagePostfix<keyof F>;
|
|
131
|
+
declare type ConfProps<A extends GenericTokens, B extends GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts> = {
|
|
132
|
+
tokens: A;
|
|
133
|
+
themes: B;
|
|
134
|
+
shorthands?: C;
|
|
135
|
+
media?: D;
|
|
136
|
+
animations?: AnimationDriver<E>;
|
|
137
|
+
fonts: F;
|
|
138
|
+
};
|
|
139
|
+
export declare type InferTamaguiConfig<Conf> = Conf extends ConfProps<infer A, infer B, infer C, infer D, infer E, infer F> ? TamaguiInternalConfig<A, B, C, D, E, F> : unknown;
|
|
80
140
|
export declare type GenericTamaguiConfig = CreateTamaguiConfig<GenericTokens, GenericThemes, GenericShorthands, GenericMedia, GenericAnimations, GenericFonts>;
|
|
81
|
-
export declare type
|
|
141
|
+
export declare type ThemeDefinition = TamaguiConfig['themes'][keyof TamaguiConfig['themes']];
|
|
142
|
+
export declare type ThemeKeys = keyof ThemeDefinition;
|
|
143
|
+
export declare type ThemeParsed = {
|
|
144
|
+
[key in ThemeKeys]: Variable<any>;
|
|
145
|
+
};
|
|
82
146
|
export declare type Tokens = TamaguiConfig['tokens'];
|
|
83
147
|
export declare type Shorthands = TamaguiConfig['shorthands'];
|
|
84
148
|
export declare type Media = TamaguiConfig['media'];
|
|
85
149
|
export declare type Themes = TamaguiConfig['themes'];
|
|
86
150
|
export declare type ThemeName = GetAltThemeNames<keyof Themes>;
|
|
87
|
-
export declare type ThemeKeys = keyof ThemeObject;
|
|
88
151
|
export declare type ThemeTokens = `$${ThemeKeys}`;
|
|
89
|
-
export declare type AnimationKeys =
|
|
152
|
+
export declare type AnimationKeys = TamaguiConfig['animations'] extends AnimationDriver<infer Config> ? keyof Config : string;
|
|
153
|
+
export declare type FontLanguages = ArrayIntersection<TamaguiConfig['fontLanguages']>;
|
|
154
|
+
declare type ArrayIntersection<A extends any[]> = A[keyof A];
|
|
90
155
|
declare type GetAltThemeNames<S> = (S extends `${string}_${infer Alt}` ? GetAltThemeNames<Alt> : S) | S;
|
|
91
|
-
|
|
92
|
-
|
|
156
|
+
declare type SpacerPropsBase = {
|
|
157
|
+
size?: number | SpaceTokens | null;
|
|
158
|
+
flex?: boolean | number;
|
|
159
|
+
direction?: SpaceDirection;
|
|
160
|
+
};
|
|
161
|
+
declare type SpacerOwnProps = SpacerPropsBase & WithThemeShorthandsPseudosMediaAnimation<SpacerPropsBase>;
|
|
162
|
+
export declare type SpacerProps = Omit<StackProps, 'flex' | 'direction' | 'size'> & SpacerOwnProps;
|
|
163
|
+
export declare type CreateTamaguiProps = {
|
|
164
|
+
reactNative?: any;
|
|
165
|
+
shorthands?: CreateShorthands;
|
|
166
|
+
media?: GenericTamaguiConfig['media'];
|
|
167
|
+
animations?: AnimationDriver<any>;
|
|
168
|
+
fonts: GenericTamaguiConfig['fonts'];
|
|
169
|
+
tokens: GenericTamaguiConfig['tokens'];
|
|
170
|
+
themes: {
|
|
171
|
+
[key: string]: {
|
|
172
|
+
[key: string]: string | number | Variable;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
defaultTheme?: string;
|
|
176
|
+
/**
|
|
177
|
+
* *Advanced use case* For all CSS extracted views, this has no effect.
|
|
178
|
+
*
|
|
179
|
+
* For SSR compatibility on the web, Tamagui will render once with the settings
|
|
180
|
+
* from `mediaQueryDefaultActive` set for all media queries. Then, it will render
|
|
181
|
+
* again after the initial render using the proper media query values. This is so that
|
|
182
|
+
* hydration will match perfectly with the server.
|
|
183
|
+
*
|
|
184
|
+
* Setting disableSSR will avoid this second render by setting the media query state
|
|
185
|
+
* to the actual browser dimensions on initial load. This is only useful for client-only
|
|
186
|
+
* apps.
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
189
|
+
disableSSR?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Disable inserting a theme class in the DOM or context, allowing you to manually place it higher.
|
|
192
|
+
* For custom use cases like integration with next-theme.
|
|
193
|
+
*/
|
|
194
|
+
disableRootThemeClass?: boolean;
|
|
195
|
+
defaultProps?: Record<string, any> & {
|
|
196
|
+
Stack?: StackProps;
|
|
197
|
+
Text?: TextProps;
|
|
198
|
+
Spacer?: SpacerProps;
|
|
199
|
+
};
|
|
200
|
+
mediaQueryDefaultActive?: Record<MediaQueryKey, boolean>;
|
|
201
|
+
cssStyleSeparator?: string;
|
|
202
|
+
maxDarkLightNesting?: number;
|
|
203
|
+
shouldAddPrefersColorThemes?: boolean;
|
|
204
|
+
themeClassNameOnRoot?: boolean;
|
|
205
|
+
};
|
|
206
|
+
export declare type TamaguiInternalConfig<A extends GenericTokens = GenericTokens, B extends GenericThemes = GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts> = Omit<CreateTamaguiProps, keyof GenericTamaguiConfig> & CreateTamaguiConfig<A, B, C, D, E, F> & {
|
|
93
207
|
tokensParsed: CreateTokens<Variable>;
|
|
94
208
|
themeConfig: any;
|
|
95
209
|
fontsParsed: GenericFonts;
|
|
96
210
|
getCSS: () => string;
|
|
97
211
|
parsed: boolean;
|
|
212
|
+
inverseShorthands: Record<string, string>;
|
|
213
|
+
reactNative?: any;
|
|
98
214
|
};
|
|
99
|
-
export declare type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']
|
|
215
|
+
export declare type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations'];
|
|
100
216
|
export declare type UnionableString = string & {};
|
|
101
217
|
export declare type UnionableNumber = number & {};
|
|
102
|
-
export declare type PropTypes<A extends TamaguiComponent> = A extends
|
|
218
|
+
export declare type PropTypes<A extends TamaguiComponent> = A extends FunctionComponent<infer Props> ? Props : unknown;
|
|
103
219
|
export declare type GenericFont<Key extends number | string = number | string> = {
|
|
104
220
|
size: {
|
|
105
221
|
[key in Key]: number | Variable;
|
|
@@ -123,8 +239,13 @@ export declare type GenericFont<Key extends number | string = number | string> =
|
|
|
123
239
|
color?: Partial<{
|
|
124
240
|
[key in Key]: string | Variable;
|
|
125
241
|
}>;
|
|
242
|
+
face?: {
|
|
243
|
+
[key in FontWeightSteps]: {
|
|
244
|
+
normal?: string;
|
|
245
|
+
italic?: string;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
126
248
|
};
|
|
127
|
-
export declare type MediaKeys = keyof Media;
|
|
128
249
|
export declare type MediaQueryObject = {
|
|
129
250
|
[key: string]: string | number | string;
|
|
130
251
|
};
|
|
@@ -139,10 +260,6 @@ export declare type MediaProps<A> = {
|
|
|
139
260
|
export declare type MediaQueries = {
|
|
140
261
|
[key in MediaQueryKey]: MediaQueryObject;
|
|
141
262
|
};
|
|
142
|
-
export declare type ConfigureMediaQueryOptions = {
|
|
143
|
-
queries?: MediaQueries;
|
|
144
|
-
defaultActive?: MediaQueryKey[];
|
|
145
|
-
};
|
|
146
263
|
export declare type TransformStyleProps = {
|
|
147
264
|
x?: number;
|
|
148
265
|
y?: number;
|
|
@@ -173,41 +290,18 @@ export declare type AnimationProp = AnimationKeys | {
|
|
|
173
290
|
};
|
|
174
291
|
}
|
|
175
292
|
];
|
|
176
|
-
|
|
177
|
-
asChild?: boolean;
|
|
178
|
-
space?: SpaceTokens;
|
|
179
|
-
dangerouslySetInnerHTML?: {
|
|
180
|
-
__html: string;
|
|
181
|
-
};
|
|
182
|
-
animation?: AnimationProp;
|
|
183
|
-
animateOnly?: string[];
|
|
184
|
-
children?: any | any[];
|
|
185
|
-
debug?: boolean | 'break' | 'verbose';
|
|
186
|
-
disabled?: boolean;
|
|
187
|
-
className?: string;
|
|
188
|
-
id?: string;
|
|
189
|
-
tag?: string;
|
|
190
|
-
theme?: ThemeName | null;
|
|
191
|
-
onHoverIn?: (e: MouseEvent) => any;
|
|
192
|
-
onHoverOut?: (e: MouseEvent) => any;
|
|
193
|
-
onPress?: (e: GestureResponderEvent) => any;
|
|
194
|
-
onPressIn?: (e: GestureResponderEvent) => any;
|
|
195
|
-
onPressOut?: (e: GestureResponderEvent) => any;
|
|
196
|
-
onMouseEnter?: (e: MouseEvent) => any;
|
|
197
|
-
onMouseLeave?: (e: MouseEvent) => any;
|
|
198
|
-
onMouseDown?: (e: MouseEvent) => any;
|
|
199
|
-
};
|
|
200
|
-
declare type GetTokenFontKeysFor<A extends 'size' | 'weight' | 'letterSpacing' | 'family' | 'lineHeight' | 'transform' | 'style' | 'color'> = keyof TamaguiConfig['fonts'][keyof TamaguiConfig['fonts']][A];
|
|
293
|
+
declare type GetTokenFontKeysFor<A extends 'size' | 'weight' | 'letterSpacing' | 'family' | 'lineHeight' | 'transform' | 'style' | 'color'> = keyof TamaguiConfig['fonts']['body'][A];
|
|
201
294
|
declare type GetTokenString<A> = A extends string | number ? `$${A}` : `$${string}`;
|
|
202
295
|
export declare type SizeTokens = GetTokenString<keyof Tokens['size']> | number;
|
|
203
296
|
export declare type SpaceTokens = GetTokenString<keyof Tokens['space']> | number | boolean;
|
|
204
|
-
export declare type ColorTokens = GetTokenString<keyof Tokens['color']> | GetTokenString<keyof
|
|
297
|
+
export declare type ColorTokens = GetTokenString<keyof Tokens['color']> | GetTokenString<keyof ThemeParsed> | CSSColorNames;
|
|
205
298
|
export declare type ZIndexTokens = GetTokenString<keyof Tokens['zIndex']> | number;
|
|
206
299
|
export declare type RadiusTokens = GetTokenString<keyof Tokens['radius']> | number;
|
|
207
300
|
export declare type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>;
|
|
208
301
|
export declare type FontSizeTokens = GetTokenString<GetTokenFontKeysFor<'size'>> | number;
|
|
209
302
|
export declare type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}` | number;
|
|
210
|
-
export declare type
|
|
303
|
+
export declare type FontWeightSteps = `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`;
|
|
304
|
+
export declare type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}` | FontWeightSteps;
|
|
211
305
|
export declare type FontColorTokens = `$${GetTokenFontKeysFor<'color'>}` | number;
|
|
212
306
|
export declare type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}` | number;
|
|
213
307
|
export declare type FontStyleTokens = `$${GetTokenFontKeysFor<'style'>}` | TextStyle['fontStyle'];
|
|
@@ -237,7 +331,7 @@ export declare type PseudoProps<A> = {
|
|
|
237
331
|
exitStyle?: A | null;
|
|
238
332
|
enterStyle?: A | null;
|
|
239
333
|
};
|
|
240
|
-
export declare type
|
|
334
|
+
export declare type PseudoPropKeys = keyof PseudoProps<any>;
|
|
241
335
|
export declare type PseudoStyles = {
|
|
242
336
|
hoverStyle?: ViewStyle;
|
|
243
337
|
pressStyle?: ViewStyle;
|
|
@@ -248,31 +342,33 @@ export declare type PseudoStyles = {
|
|
|
248
342
|
declare type WithThemeAndShorthands<A extends object> = WithThemeValues<A> & WithShorthands<WithThemeValues<A>>;
|
|
249
343
|
declare type WithThemeShorthandsAndPseudos<A extends object> = WithThemeAndShorthands<A> & PseudoProps<WithThemeAndShorthands<A>>;
|
|
250
344
|
declare type WithThemeShorthandsPseudosMediaAnimation<A extends object> = WithThemeShorthandsAndPseudos<A> & MediaProps<WithThemeShorthandsAndPseudos<A>>;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
345
|
+
/**
|
|
346
|
+
* Base style-only props (no media, pseudo):
|
|
347
|
+
*/
|
|
348
|
+
declare type StylePropsWebOnly = {
|
|
255
349
|
pointerEvents?: ViewProps['pointerEvents'];
|
|
350
|
+
cursor?: Properties['cursor'];
|
|
351
|
+
contain?: Properties['contain'];
|
|
352
|
+
display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex';
|
|
353
|
+
userSelect?: Properties['userSelect'];
|
|
256
354
|
};
|
|
257
|
-
export declare type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> & TransformStyleProps &
|
|
258
|
-
export declare type
|
|
259
|
-
export declare type StackStyleProps = WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>;
|
|
260
|
-
export declare type StackPropsBase = StackPropsBaseShared & WithThemeAndShorthands<StackStylePropsBase>;
|
|
261
|
-
export declare type StackProps = StackPropsBaseShared & StackStyleProps;
|
|
262
|
-
export declare type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps & WebOnlyStyleProps & {
|
|
355
|
+
export declare type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> & TransformStyleProps & StylePropsWebOnly;
|
|
356
|
+
export declare type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps & StylePropsWebOnly & {
|
|
263
357
|
ellipse?: boolean;
|
|
264
358
|
selectable?: boolean;
|
|
265
359
|
textDecorationDistance?: number;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
export declare type
|
|
273
|
-
export declare type
|
|
360
|
+
textOverflow?: Properties['textOverflow'];
|
|
361
|
+
whiteSpace?: Properties['whiteSpace'];
|
|
362
|
+
wordWrap?: Properties['wordWrap'];
|
|
363
|
+
};
|
|
364
|
+
export declare type StackNonStyleProps = Omit<ViewProps, 'display' | 'children'> & RNWViewProps & TamaguiComponentPropsBase;
|
|
365
|
+
export declare type StackStyleProps = WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>;
|
|
366
|
+
export declare type StackPropsBase = StackNonStyleProps & WithThemeAndShorthands<StackStylePropsBase>;
|
|
367
|
+
export declare type StackProps = StackNonStyleProps & StackStyleProps;
|
|
368
|
+
export declare type TextNonStyleProps = Omit<ReactTextProps, 'children'> & RNWTextProps & TamaguiComponentPropsBase;
|
|
369
|
+
export declare type TextPropsBase = TextNonStyleProps & WithThemeAndShorthands<TextStylePropsBase>;
|
|
274
370
|
export declare type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>;
|
|
275
|
-
export declare type TextProps =
|
|
371
|
+
export declare type TextProps = TextNonStyleProps & TextStyleProps;
|
|
276
372
|
export declare type ViewOrTextProps = WithThemeShorthandsPseudosMediaAnimation<Omit<TextStylePropsBase, keyof StackStylePropsBase> & StackStylePropsBase>;
|
|
277
373
|
export declare type TamaguiComponent<Props = any, Ref = any, BaseProps = {}, VariantProps = {}> = ReactComponentWithRef<Props, Ref> & StaticComponentObject;
|
|
278
374
|
declare type StaticComponentObject = {
|
|
@@ -280,67 +376,140 @@ declare type StaticComponentObject = {
|
|
|
280
376
|
extractable: <X>(a: X, opts?: Partial<StaticConfig>) => X;
|
|
281
377
|
};
|
|
282
378
|
export declare type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {
|
|
283
|
-
|
|
284
|
-
|
|
379
|
+
config: TamaguiInternalConfig;
|
|
380
|
+
disableInjectCSS?: boolean;
|
|
381
|
+
children?: ReactNode;
|
|
285
382
|
};
|
|
383
|
+
export declare type PropMapper = (key: string, value: any, theme: ThemeParsed, props: Record<string, any>, state: Partial<SplitStyleState>, languageContext?: FontLanguageProps, avoidDefaultProps?: boolean, debug?: DebugProp) => undefined | [string, any][];
|
|
286
384
|
export declare type StaticConfigParsed = StaticConfig & {
|
|
287
385
|
parsed: true;
|
|
288
|
-
propMapper:
|
|
289
|
-
[key: string]: any;
|
|
290
|
-
};
|
|
386
|
+
propMapper: PropMapper;
|
|
291
387
|
variantsParsed?: {
|
|
292
388
|
[key: string]: {
|
|
293
389
|
[key: string]: any;
|
|
294
390
|
};
|
|
295
391
|
};
|
|
296
392
|
};
|
|
297
|
-
export declare type
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
[key: string]: ((a: any, b: any) => any) | {
|
|
302
|
-
[key: string]: any;
|
|
303
|
-
};
|
|
393
|
+
export declare type GenericVariantDefinitions = {
|
|
394
|
+
[key: string]: {
|
|
395
|
+
[key: string]: ((a: any, b: any) => any) | {
|
|
396
|
+
[key: string]: any;
|
|
304
397
|
};
|
|
305
398
|
};
|
|
306
|
-
|
|
399
|
+
};
|
|
400
|
+
export declare type StaticConfigPublic = {
|
|
401
|
+
/**
|
|
402
|
+
* (compiler) If you need to pass context or something, prevents from ever
|
|
403
|
+
* flattening. The 'jsx' option means it will never flatten. if you
|
|
404
|
+
* pass JSX as a children (if its purely string, it will still flatten).
|
|
405
|
+
*/
|
|
307
406
|
neverFlatten?: boolean | 'jsx';
|
|
407
|
+
/**
|
|
408
|
+
* Determines ultimate output tag (Text vs View)
|
|
409
|
+
*/
|
|
308
410
|
isText?: boolean;
|
|
309
|
-
|
|
310
|
-
|
|
411
|
+
/**
|
|
412
|
+
* Which style keys are allowed to be extracted.
|
|
413
|
+
*/
|
|
311
414
|
validStyles?: {
|
|
312
415
|
[key: string]: boolean;
|
|
313
416
|
};
|
|
314
|
-
|
|
417
|
+
/**
|
|
418
|
+
* (compiler) If these props are encountered, bail on all optimization.
|
|
419
|
+
*/
|
|
315
420
|
deoptProps?: Set<string>;
|
|
421
|
+
/**
|
|
422
|
+
* (compiler) If these props are encountered, leave them un-extracted.
|
|
423
|
+
*/
|
|
316
424
|
inlineProps?: Set<string>;
|
|
425
|
+
/**
|
|
426
|
+
* (compiler) If not flattening, leave this prop as original value.
|
|
427
|
+
* Only applies to style attributes
|
|
428
|
+
*/
|
|
429
|
+
inlineWhenUnflattened?: Set<string>;
|
|
430
|
+
/**
|
|
431
|
+
* (compiler) A bit odd, only for more advanced heirarchies.
|
|
432
|
+
* Indicates that the component will set this prop so the
|
|
433
|
+
* static extraction can ensure it sets them to ={undefined}
|
|
434
|
+
* so they get overriddent. In the future, this can be smarter.
|
|
435
|
+
*/
|
|
317
436
|
ensureOverriddenProp?: {
|
|
318
437
|
[key: string]: boolean;
|
|
319
438
|
};
|
|
439
|
+
/**
|
|
440
|
+
* Auto-detected, but can ovverride. Wraps children to space them on top
|
|
441
|
+
*/
|
|
320
442
|
isZStack?: boolean;
|
|
443
|
+
/**
|
|
444
|
+
* Auto-detect, but can override, passes styles properly to react-native-web
|
|
445
|
+
*/
|
|
446
|
+
isReactNative?: boolean;
|
|
447
|
+
/**
|
|
448
|
+
* By default if styled() doesn't recognize a parent Tamagui compoent or specific react-native views,
|
|
449
|
+
* it will assume the passed in component only accepts style={} for react-native compatibility.
|
|
450
|
+
* Setting `acceptsClassName: true` indicates Tamagui can pass in className props.
|
|
451
|
+
*/
|
|
452
|
+
acceptsClassName?: boolean;
|
|
453
|
+
};
|
|
454
|
+
export declare type StaticConfig = StaticConfigPublic & {
|
|
455
|
+
Component?: FunctionComponent<any> & StaticComponentObject;
|
|
456
|
+
variants?: GenericVariantDefinitions;
|
|
457
|
+
/**
|
|
458
|
+
* Used for applying sub theme style
|
|
459
|
+
*/
|
|
460
|
+
componentName?: string;
|
|
461
|
+
/**
|
|
462
|
+
* Same as React.defaultProps, be sure to sync
|
|
463
|
+
*/
|
|
464
|
+
defaultProps: Record<string, any>;
|
|
465
|
+
/**
|
|
466
|
+
* Merges into defaultProps later on, used internally yonly
|
|
467
|
+
*/
|
|
321
468
|
defaultVariants?: {
|
|
322
469
|
[key: string]: any;
|
|
323
470
|
};
|
|
324
|
-
|
|
325
|
-
|
|
471
|
+
/**
|
|
472
|
+
* Memoize the component
|
|
473
|
+
*/
|
|
326
474
|
memo?: boolean;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
475
|
+
/**
|
|
476
|
+
* Used internally to handle extractable HoC separate
|
|
477
|
+
*/
|
|
478
|
+
isHOC?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Used insternally to attach default props to names
|
|
481
|
+
*/
|
|
482
|
+
parentNames?: string[];
|
|
483
|
+
/**
|
|
484
|
+
* By default if styled() doesn't recognize a parent Tamagui compoent or specific react-native views,
|
|
485
|
+
* it will assume the passed in component only accepts style={} for react-native compatibility.
|
|
486
|
+
* Setting `acceptsClassName: true` indicates Tamagui can pass in className props.
|
|
487
|
+
*/
|
|
488
|
+
acceptsClassName?: boolean;
|
|
489
|
+
};
|
|
490
|
+
/**
|
|
491
|
+
* --------------------------------------------
|
|
492
|
+
* variants
|
|
493
|
+
* --------------------------------------------
|
|
494
|
+
*/
|
|
495
|
+
export declare type StylableComponent = TamaguiComponent | Component | ForwardRefExoticComponent<any> | ReactComponentWithRef<any, any> | (new (props: any) => any) | typeof View | typeof Text | typeof TextInput | typeof Image;
|
|
496
|
+
export declare type GetStyledVariants<A extends TamaguiComponent> = A extends TamaguiComponent<any, any, any, infer Variants> ? Variants : never;
|
|
330
497
|
export declare type GetBaseProps<A extends StylableComponent> = A extends TamaguiComponent<any, any, infer BaseProps> ? BaseProps : never;
|
|
331
|
-
export declare type GetProps<A extends StylableComponent> = A extends TamaguiComponent<infer Props> ? Props : A extends
|
|
498
|
+
export declare type GetProps<A extends StylableComponent> = A extends TamaguiComponent<infer Props> ? Props : A extends TamaguiReactElement<infer Props> ? Props : A extends Component<infer Props> ? GetGenericComponentTamaguiProps<Props> : A extends new (props: infer Props) => any ? GetGenericComponentTamaguiProps<Props> : {};
|
|
332
499
|
declare type GetGenericComponentTamaguiProps<P> = P & Omit<'textAlign' extends keyof P ? TextProps : StackProps, keyof P>;
|
|
333
|
-
export declare type SpreadKeys = '...fontSize' | '...fontStyle' | '...fontTransform' | '...lineHeight' | '...letterSpacing' | '...size' | '...color' | '...zIndex' | '...theme' | '...radius';
|
|
500
|
+
export declare type SpreadKeys = '...fontSize' | '...fontStyle' | '...fontTransform' | '...lineHeight' | '...letterSpacing' | '...size' | '...space' | '...color' | '...zIndex' | '...theme' | '...radius';
|
|
334
501
|
export declare type VariantDefinitions<Parent extends StylableComponent = TamaguiComponent, MyProps extends Object = GetProps<Parent>, Val = any> = VariantDefinitionFromProps<MyProps, Val>;
|
|
335
502
|
export declare type VariantDefinitionFromProps<MyProps, Val> = MyProps extends Object ? {
|
|
336
503
|
[propName: string]: VariantSpreadFunction<MyProps, Val> | ({
|
|
337
|
-
[Key in SpreadKeys]?: Key extends '...fontSize' ? FontSizeVariantSpreadFunction<MyProps> : Key extends '...size' ? SizeVariantSpreadFunction<MyProps> : Key extends '...color' ? ColorVariantSpreadFunction<MyProps> : Key extends '...lineHeight' ? FontLineHeightVariantSpreadFunction<MyProps> : Key extends '...fontTransform' ? FontTransformVariantSpreadFunction<MyProps> : Key extends '...fontStyle' ? FontStyleVariantSpreadFunction<MyProps> : Key extends '...letterSpacing' ? FontLetterSpacingVariantSpreadFunction<MyProps> : Key extends '...zIndex' ? ZIndexVariantSpreadFunction<MyProps> : Key extends '...radius' ? RadiusVariantSpreadFunction<MyProps> : Key extends '...theme' ? ThemeVariantSpreadFunction<MyProps> : never;
|
|
504
|
+
[Key in SpreadKeys]?: Key extends '...fontSize' ? FontSizeVariantSpreadFunction<MyProps> : Key extends '...size' ? SizeVariantSpreadFunction<MyProps> : Key extends '...space' ? SpaceVariantSpreadFunction<MyProps> : Key extends '...color' ? ColorVariantSpreadFunction<MyProps> : Key extends '...lineHeight' ? FontLineHeightVariantSpreadFunction<MyProps> : Key extends '...fontTransform' ? FontTransformVariantSpreadFunction<MyProps> : Key extends '...fontStyle' ? FontStyleVariantSpreadFunction<MyProps> : Key extends '...letterSpacing' ? FontLetterSpacingVariantSpreadFunction<MyProps> : Key extends '...zIndex' ? ZIndexVariantSpreadFunction<MyProps> : Key extends '...radius' ? RadiusVariantSpreadFunction<MyProps> : Key extends '...theme' ? ThemeVariantSpreadFunction<MyProps> : never;
|
|
338
505
|
} & {
|
|
339
|
-
[Key in string | number]?: MyProps | VariantSpreadFunction<MyProps, Val>;
|
|
506
|
+
[Key in string | number | 'true' | 'false']?: MyProps | VariantSpreadFunction<MyProps, Val>;
|
|
340
507
|
} & {
|
|
341
508
|
[Key in VariantTypeKeys]?: Key extends ':number' ? VariantSpreadFunction<MyProps, number> : Key extends ':boolean' ? VariantSpreadFunction<MyProps, boolean> : Key extends ':string' ? VariantSpreadFunction<MyProps, string> : never;
|
|
342
509
|
});
|
|
343
510
|
} : never;
|
|
511
|
+
export declare type GenericStackVariants = VariantDefinitionFromProps<StackProps, any>;
|
|
512
|
+
export declare type GenericTextVariants = VariantDefinitionFromProps<StackProps, any>;
|
|
344
513
|
export declare type GetVariantProps<Variants> = {
|
|
345
514
|
[Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val> ? Val : GetVariantValues<keyof Variants[Key]>;
|
|
346
515
|
};
|
|
@@ -362,6 +531,7 @@ export declare type VariantTypeKeys = ':string' | ':boolean' | ':number';
|
|
|
362
531
|
export declare type GetVariantValues<Key> = Key extends `...${infer VariantSpread}` ? ThemeValueByCategory<VariantSpread> : Key extends 'true' | 'false' ? boolean : Key extends ':string' ? string : Key extends ':boolean' ? boolean : Key extends ':number' ? number : Key;
|
|
363
532
|
export declare type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontSizeTokens>;
|
|
364
533
|
export declare type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SizeTokens>;
|
|
534
|
+
export declare type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SpaceTokens>;
|
|
365
535
|
export declare type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>;
|
|
366
536
|
export declare type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLineHeightTokens>;
|
|
367
537
|
export declare type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLetterSpacingTokens>;
|
|
@@ -370,6 +540,11 @@ export declare type FontTransformVariantSpreadFunction<A extends PropLike> = Var
|
|
|
370
540
|
export declare type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>;
|
|
371
541
|
export declare type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, RadiusTokens>;
|
|
372
542
|
export declare type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>;
|
|
543
|
+
/**
|
|
544
|
+
* --------------------------------------------
|
|
545
|
+
* end variants
|
|
546
|
+
* --------------------------------------------
|
|
547
|
+
*/
|
|
373
548
|
declare type SizeKeys = 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight' | 'shadowRadius';
|
|
374
549
|
declare type ColorKeys = 'color' | 'backgroundColor' | 'borderColor' | 'borderBottomColor' | 'borderTopColor' | 'borderLeftColor' | 'borderRightColor' | 'shadowColor' | 'textShadowColor';
|
|
375
550
|
declare type SpaceKeys = 'space' | 'padding' | 'paddingHorizontal' | 'paddingVertical' | 'paddingLeft' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingEnd' | 'paddingStart' | 'margin' | 'marginHorizontal' | 'marginVertical' | 'marginLeft' | 'marginTop' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginEnd' | 'marginStart' | 'x' | 'y' | 'scale' | 'scaleX' | 'scaleY' | 'borderTopEndRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderTopStartRadius' | 'borderBottomEndRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderBottomStartRadius' | 'borderBottomWidth' | 'borderLeftWidth' | 'borderRadius' | 'borderRightWidth' | 'borderTopEndRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderEndWidth' | 'borderStartWidth' | 'borderTopStartRadius' | 'borderTopWidth' | 'borderWidth' | 'left' | 'top' | 'right' | 'bottom' | 'shadowOffset';
|
|
@@ -380,6 +555,8 @@ export declare type TamaguiComponentState = {
|
|
|
380
555
|
pressIn: boolean;
|
|
381
556
|
focus: boolean;
|
|
382
557
|
mounted: boolean;
|
|
558
|
+
mediaState?: null | Record<string, boolean>;
|
|
559
|
+
hasAnimation?: boolean;
|
|
383
560
|
animation?: null | {
|
|
384
561
|
style?: any;
|
|
385
562
|
avoidClasses?: boolean;
|
|
@@ -387,24 +564,52 @@ export declare type TamaguiComponentState = {
|
|
|
387
564
|
};
|
|
388
565
|
export declare type SplitStyleState = TamaguiComponentState & {
|
|
389
566
|
noClassNames?: boolean;
|
|
567
|
+
dynamicStylesInline?: boolean;
|
|
390
568
|
resolveVariablesAs?: ResolveVariableTypes;
|
|
391
|
-
fallbackProps?:
|
|
569
|
+
fallbackProps?: Record<string, any>;
|
|
570
|
+
keepVariantsAsProps?: boolean;
|
|
571
|
+
hasTextAncestor?: boolean;
|
|
392
572
|
};
|
|
393
573
|
declare type AnimationConfig = {
|
|
394
574
|
[key: string]: any;
|
|
395
575
|
};
|
|
576
|
+
export declare type AnimatedNumberStrategy = {
|
|
577
|
+
type: 'spring';
|
|
578
|
+
stiffness?: number;
|
|
579
|
+
damping?: number;
|
|
580
|
+
mass?: number;
|
|
581
|
+
overshootClamping?: boolean;
|
|
582
|
+
restSpeedThreshold?: number;
|
|
583
|
+
restDisplacementThreshold?: number;
|
|
584
|
+
} | {
|
|
585
|
+
type: 'timing';
|
|
586
|
+
duration: number;
|
|
587
|
+
} | {
|
|
588
|
+
type: 'direct';
|
|
589
|
+
};
|
|
590
|
+
export declare type UniversalAnimatedNumber<A> = {
|
|
591
|
+
getInstance(): A;
|
|
592
|
+
getValue(): number;
|
|
593
|
+
setValue(next: number, config?: AnimatedNumberStrategy): void;
|
|
594
|
+
stop(): void;
|
|
595
|
+
};
|
|
396
596
|
export declare type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {
|
|
397
|
-
|
|
597
|
+
isReactNative?: boolean;
|
|
398
598
|
useAnimations: UseAnimationHook;
|
|
599
|
+
useAnimatedNumber: (initial: number) => UniversalAnimatedNumber<any>;
|
|
600
|
+
useAnimatedNumberStyle: <V extends UniversalAnimatedNumber<any>>(val: V, getStyle: (current: any) => any) => any;
|
|
601
|
+
useAnimatedNumberReaction: (val: UniversalAnimatedNumber<any>, onValue: (current: number) => void) => void;
|
|
399
602
|
animations: A;
|
|
400
603
|
View?: any;
|
|
401
604
|
Text?: any;
|
|
402
605
|
};
|
|
403
606
|
export declare type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>;
|
|
404
607
|
export declare type UseAnimationHelpers = {
|
|
608
|
+
hostRef: RefObject<HTMLElement | View>;
|
|
405
609
|
staticConfig: StaticConfigParsed;
|
|
406
610
|
getStyle: (props?: {
|
|
407
611
|
isEntering?: boolean;
|
|
612
|
+
isExiting?: boolean;
|
|
408
613
|
exitVariant?: string | null;
|
|
409
614
|
enterVariant?: string | null;
|
|
410
615
|
}) => ViewStyle;
|
|
@@ -413,9 +618,9 @@ export declare type UseAnimationHelpers = {
|
|
|
413
618
|
onDidAnimate?: any;
|
|
414
619
|
delay?: number;
|
|
415
620
|
};
|
|
416
|
-
export declare type UseAnimationHook = (props: UseAnimationProps, helpers: UseAnimationHelpers) => {
|
|
621
|
+
export declare type UseAnimationHook = (props: UseAnimationProps, helpers: UseAnimationHelpers) => null | {
|
|
417
622
|
style?: StackStylePropsBase | StackStylePropsBase[];
|
|
418
|
-
safeToUnmount?: () => void;
|
|
419
623
|
};
|
|
624
|
+
export declare type GestureReponderEvent = Exclude<View['props']['onResponderMove'], void> extends (event: infer Event) => void ? Event : never;
|
|
420
625
|
export {};
|
|
421
626
|
//# sourceMappingURL=types.d.ts.map
|