@tamagui/core 1.0.1-beta.99 → 1.0.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Tamagui.js +12 -6
- package/dist/cjs/Tamagui.js.map +2 -2
- package/dist/cjs/addTheme.js +77 -0
- package/dist/cjs/addTheme.js.map +7 -0
- package/dist/cjs/{conf.js → config.js} +25 -13
- package/dist/cjs/config.js.map +7 -0
- package/dist/cjs/constants/constants.js +16 -23
- package/dist/cjs/constants/constants.js.map +2 -2
- package/dist/cjs/constants/isDevTools.js +37 -0
- package/dist/cjs/constants/isDevTools.js.map +7 -0
- package/dist/cjs/constants/platform.js +16 -9
- 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/ButtonNestingContext.js +30 -0
- package/dist/cjs/contexts/ButtonNestingContext.js.map +7 -0
- 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 +583 -644
- package/dist/cjs/createComponent.js.map +3 -3
- package/dist/cjs/createFont.js +39 -19
- package/dist/cjs/createFont.js.map +2 -2
- package/dist/cjs/createFont.test.js +125 -0
- package/dist/cjs/createFont.test.js.map +7 -0
- package/dist/cjs/createShorthands.js +1 -0
- package/dist/cjs/createShorthands.js.map +2 -2
- package/dist/cjs/createTamagui.js +98 -193
- package/dist/cjs/createTamagui.js.map +3 -3
- package/dist/cjs/createTheme.js +1 -0
- package/dist/cjs/createTheme.js.map +2 -2
- package/dist/cjs/createTokens.js +1 -4
- package/dist/cjs/createTokens.js.map +2 -2
- package/dist/cjs/createTokens.test.js +27 -0
- package/dist/cjs/createTokens.test.js.map +7 -0
- package/dist/cjs/createVariable.js +36 -40
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/createVariable.test.js +7 -0
- package/dist/cjs/createVariable.test.js.map +7 -0
- package/dist/cjs/createVariables.js +15 -19
- package/dist/cjs/createVariables.js.map +2 -2
- package/dist/cjs/helpers/RNComponents.js +12 -11
- package/dist/cjs/helpers/RNComponents.js.map +2 -2
- package/dist/cjs/helpers/ThemeManager.js +230 -0
- package/dist/cjs/helpers/ThemeManager.js.map +7 -0
- package/dist/cjs/helpers/ThemeManager.test.js +465 -0
- package/dist/cjs/helpers/ThemeManager.test.js.map +7 -0
- package/dist/cjs/helpers/ThemeManagerContext.js +30 -0
- package/dist/cjs/helpers/ThemeManagerContext.js.map +7 -0
- package/dist/cjs/helpers/areEqualSets.js +1 -0
- package/dist/cjs/helpers/areEqualSets.js.map +1 -1
- package/dist/cjs/helpers/assignNativePropsToWeb.js +1 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.js.map +1 -1
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js +1 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js.map +1 -1
- package/dist/cjs/helpers/cache.js +43 -0
- package/dist/cjs/helpers/cache.js.map +7 -0
- package/dist/cjs/helpers/calc.js +1 -0
- package/dist/cjs/helpers/calc.js.map +3 -3
- package/dist/cjs/helpers/createMediaStyle.js +23 -9
- package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +185 -57
- 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/createShallowUpdate.js +13 -23
- package/dist/cjs/helpers/createShallowUpdate.js.map +2 -2
- package/dist/cjs/helpers/expandStyle.js +9 -30
- package/dist/cjs/helpers/expandStyle.js.map +3 -3
- package/dist/cjs/helpers/expandStyles.js +26 -37
- package/dist/cjs/helpers/expandStyles.js.map +2 -2
- package/dist/cjs/helpers/extendStaticConfig.js +35 -34
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/fixNativeShadow.js +1 -0
- 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/getBoundingClientRect.js +37 -0
- package/dist/cjs/helpers/getBoundingClientRect.js.map +7 -0
- package/dist/cjs/helpers/getExpandedShorthands.js +4 -3
- package/dist/cjs/helpers/getExpandedShorthands.js.map +2 -2
- package/dist/cjs/helpers/getFont.js +7 -2
- package/dist/cjs/helpers/getFont.js.map +2 -2
- package/dist/cjs/helpers/getFontLanguage.js +29 -0
- package/dist/cjs/helpers/getFontLanguage.js.map +7 -0
- package/dist/cjs/helpers/getRect.js +36 -0
- package/dist/cjs/helpers/getRect.js.map +7 -0
- package/dist/cjs/helpers/getSize.js +3 -2
- package/dist/cjs/helpers/getSize.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +538 -228
- package/dist/cjs/helpers/getSplitStyles.js.map +3 -3
- package/dist/cjs/helpers/getStackSize.js +1 -0
- package/dist/cjs/helpers/getStackSize.js.map +1 -1
- package/dist/cjs/helpers/getStylesAtomic.js +53 -65
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.native.js +1 -0
- package/dist/cjs/helpers/getStylesAtomic.native.js.map +2 -2
- package/dist/cjs/helpers/getThemeCSSRules.js +107 -0
- package/dist/cjs/helpers/getThemeCSSRules.js.map +7 -0
- package/dist/cjs/helpers/getThemeCSSRules.native.js +31 -0
- package/dist/cjs/helpers/getThemeCSSRules.native.js.map +7 -0
- package/dist/cjs/helpers/getVariantExtras.js +50 -7
- package/dist/cjs/helpers/getVariantExtras.js.map +2 -2
- package/dist/cjs/helpers/insertStyleRule.js +53 -28
- package/dist/cjs/helpers/insertStyleRule.js.map +3 -3
- package/dist/cjs/helpers/isObj.js +1 -0
- package/dist/cjs/helpers/isObj.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiComponent.js +1 -0
- package/dist/cjs/helpers/isTamaguiComponent.js.map +2 -2
- package/dist/cjs/helpers/isTamaguiElement.js +1 -0
- package/dist/cjs/helpers/isTamaguiElement.js.map +2 -2
- package/dist/cjs/helpers/matchMedia.js +7 -5
- package/dist/cjs/helpers/matchMedia.js.map +2 -2
- package/dist/cjs/helpers/matchMedia.native.js +5 -1
- package/dist/cjs/helpers/matchMedia.native.js.map +2 -2
- package/dist/cjs/helpers/mergeProps.js +19 -14
- package/dist/cjs/helpers/mergeProps.js.map +2 -2
- package/dist/cjs/helpers/mergeTransform.js +12 -8
- package/dist/cjs/helpers/mergeTransform.js.map +2 -2
- package/dist/cjs/helpers/normalizeColor.js +5 -1
- package/dist/cjs/helpers/normalizeColor.js.map +2 -2
- package/dist/cjs/helpers/normalizeValueWithProperty.js +47 -5
- package/dist/cjs/helpers/normalizeValueWithProperty.js.map +2 -2
- package/dist/cjs/helpers/proxyThemeVariables.js +3 -1
- package/dist/cjs/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/cjs/helpers/pseudoDescriptors.js +12 -0
- package/dist/cjs/helpers/pseudoDescriptors.js.map +2 -2
- package/dist/cjs/helpers/registerCSSVariable.js +8 -8
- package/dist/cjs/helpers/registerCSSVariable.js.map +2 -2
- package/dist/cjs/{constants/rnw.js → helpers/startTransition.js} +13 -9
- package/dist/cjs/helpers/startTransition.js.map +7 -0
- package/dist/cjs/helpers/themeable.js +17 -43
- 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/{constants/rnw.native.js → helpers/timer.js} +14 -7
- package/dist/cjs/helpers/timer.js.map +7 -0
- package/dist/cjs/helpers/useShallowSetState.js +49 -0
- package/dist/cjs/helpers/useShallowSetState.js.map +7 -0
- package/dist/cjs/helpers/validate.js +1 -124
- package/dist/cjs/helpers/validate.js.map +3 -3
- package/dist/cjs/helpers/withStaticProperties.js +1 -0
- 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 -0
- package/dist/cjs/hooks/useConstant.js.map +2 -2
- package/dist/cjs/hooks/useElementLayout.js +84 -0
- package/dist/cjs/hooks/useElementLayout.js.map +7 -0
- package/dist/cjs/hooks/useId.js +3 -32
- package/dist/cjs/hooks/useId.js.map +2 -2
- package/dist/cjs/hooks/useIsMounted.js +1 -0
- package/dist/cjs/hooks/useIsMounted.js.map +1 -1
- package/dist/cjs/hooks/useIsSSR.js +46 -0
- package/dist/cjs/hooks/useIsSSR.js.map +7 -0
- package/dist/cjs/hooks/useIsTouchDevice.js +4 -9
- package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/cjs/hooks/useMedia.js +165 -120
- package/dist/cjs/hooks/useMedia.js.map +3 -3
- package/dist/cjs/hooks/usePressable.js +2 -15
- 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 +182 -163
- package/dist/cjs/hooks/useTheme.js.map +3 -3
- package/dist/cjs/hooks/useThemeName.js +52 -0
- package/dist/cjs/hooks/useThemeName.js.map +7 -0
- package/dist/cjs/hooks/useUnmountEffect.js +1 -0
- package/dist/cjs/hooks/useUnmountEffect.js.map +1 -1
- package/dist/cjs/index.js +41 -30
- 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 +19 -15
- package/dist/cjs/insertFont.js.map +2 -2
- package/dist/cjs/setupReactNative.js +50 -0
- package/dist/cjs/setupReactNative.js.map +7 -0
- package/dist/cjs/static.js +2 -17
- package/dist/cjs/static.js.map +2 -2
- package/dist/cjs/styled.js +30 -49
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/types-rnw.js +1 -0
- package/dist/cjs/types-rnw.js.map +1 -1
- package/dist/cjs/types.js +1 -0
- package/dist/cjs/types.js.map +2 -2
- package/dist/cjs/{helpers/cssHash.js → updateTheme.js} +23 -26
- package/dist/cjs/updateTheme.js.map +7 -0
- package/dist/cjs/{Pressability.js → vendor/Pressability.js} +6 -2
- package/dist/cjs/vendor/Pressability.js.map +7 -0
- package/dist/cjs/{Pressability.native.js → vendor/Pressability.native.js} +6 -2
- 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 +49 -52
- 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 +32 -29
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/cjs/views/Theme.js +55 -23
- package/dist/cjs/views/Theme.js.map +3 -3
- package/dist/cjs/views/ThemeInverse.js +22 -20
- package/dist/cjs/views/ThemeInverse.js.map +2 -2
- package/dist/cjs/views/ThemeProvider.js +14 -27
- package/dist/cjs/views/ThemeProvider.js.map +3 -3
- package/dist/cjs/views/ThemeReset.js +11 -5
- package/dist/cjs/views/ThemeReset.js.map +3 -3
- package/dist/esm/Tamagui.js +7 -5
- package/dist/esm/Tamagui.js.map +2 -2
- package/dist/esm/addTheme.js +53 -0
- package/dist/esm/addTheme.js.map +7 -0
- package/dist/esm/{conf.js → config.js} +18 -8
- package/dist/esm/config.js.map +7 -0
- package/dist/esm/constants/constants.js +13 -24
- package/dist/esm/constants/constants.js.map +2 -2
- package/dist/esm/constants/isDevTools.js +13 -0
- package/dist/esm/constants/isDevTools.js.map +7 -0
- package/dist/esm/constants/platform.js +11 -7
- 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/ButtonNestingContext.js +6 -0
- package/dist/esm/contexts/ButtonNestingContext.js.map +7 -0
- 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 +583 -648
- package/dist/esm/createComponent.js.map +3 -3
- package/dist/esm/createFont.js +38 -19
- package/dist/esm/createFont.js.map +2 -2
- package/dist/esm/createFont.test.js +124 -0
- package/dist/esm/createFont.test.js.map +7 -0
- package/dist/esm/createShorthands.js +0 -0
- package/dist/esm/createShorthands.js.map +2 -2
- package/dist/esm/createTamagui.js +95 -192
- package/dist/esm/createTamagui.js.map +3 -3
- package/dist/esm/createTheme.js +0 -0
- package/dist/esm/createTheme.js.map +2 -2
- package/dist/esm/createTokens.js +0 -4
- package/dist/esm/createTokens.js.map +2 -2
- package/dist/esm/createTokens.test.js +26 -0
- package/dist/esm/createTokens.test.js.map +7 -0
- package/dist/esm/createVariable.js +32 -38
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/createVariable.test.js +6 -0
- package/dist/esm/createVariable.test.js.map +7 -0
- package/dist/esm/createVariables.js +14 -19
- package/dist/esm/createVariables.js.map +2 -2
- package/dist/esm/helpers/RNComponents.js +11 -8
- package/dist/esm/helpers/RNComponents.js.map +2 -2
- package/dist/esm/helpers/ThemeManager.js +186 -0
- package/dist/esm/helpers/ThemeManager.js.map +7 -0
- package/dist/esm/helpers/ThemeManager.test.js +464 -0
- package/dist/esm/helpers/ThemeManager.test.js.map +7 -0
- package/dist/esm/helpers/ThemeManagerContext.js +6 -0
- package/dist/esm/helpers/ThemeManagerContext.js.map +7 -0
- package/dist/esm/helpers/areEqualSets.js +0 -0
- package/dist/esm/helpers/areEqualSets.js.map +0 -0
- package/dist/esm/helpers/assignNativePropsToWeb.js +0 -0
- package/dist/esm/helpers/assignNativePropsToWeb.js.map +1 -1
- package/dist/esm/helpers/assignNativePropsToWeb.native.js +0 -0
- package/dist/esm/helpers/assignNativePropsToWeb.native.js.map +1 -1
- package/dist/esm/helpers/cache.js +18 -0
- package/dist/esm/helpers/cache.js.map +7 -0
- package/dist/esm/helpers/calc.js +0 -0
- package/dist/esm/helpers/calc.js.map +3 -3
- package/dist/esm/helpers/createMediaStyle.js +22 -9
- package/dist/esm/helpers/createMediaStyle.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +180 -55
- 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/createShallowUpdate.js +12 -25
- package/dist/esm/helpers/createShallowUpdate.js.map +2 -2
- package/dist/esm/helpers/expandStyle.js +8 -32
- package/dist/esm/helpers/expandStyle.js.map +3 -3
- package/dist/esm/helpers/expandStyles.js +25 -39
- package/dist/esm/helpers/expandStyles.js.map +2 -2
- package/dist/esm/helpers/extendStaticConfig.js +34 -36
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/fixNativeShadow.js +0 -0
- package/dist/esm/helpers/fixNativeShadow.js.map +0 -0
- package/dist/esm/helpers/getAnimationDriver.js +8 -0
- package/dist/esm/helpers/getAnimationDriver.js.map +7 -0
- package/dist/esm/helpers/getBoundingClientRect.js +13 -0
- package/dist/esm/helpers/getBoundingClientRect.js.map +7 -0
- package/dist/esm/helpers/getExpandedShorthands.js +2 -2
- package/dist/esm/helpers/getExpandedShorthands.js.map +2 -2
- package/dist/esm/helpers/getFont.js +6 -2
- package/dist/esm/helpers/getFont.js.map +2 -2
- package/dist/esm/helpers/getFontLanguage.js +5 -0
- package/dist/esm/helpers/getFontLanguage.js.map +7 -0
- package/dist/esm/helpers/getRect.js +12 -0
- package/dist/esm/helpers/getRect.js.map +7 -0
- package/dist/esm/helpers/getSize.js +2 -2
- package/dist/esm/helpers/getSize.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +551 -229
- package/dist/esm/helpers/getSplitStyles.js.map +3 -3
- package/dist/esm/helpers/getStackSize.js +0 -0
- package/dist/esm/helpers/getStackSize.js.map +1 -1
- package/dist/esm/helpers/getStylesAtomic.js +49 -59
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.js +0 -0
- package/dist/esm/helpers/getStylesAtomic.native.js.map +2 -2
- package/dist/esm/helpers/getThemeCSSRules.js +83 -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 +47 -6
- package/dist/esm/helpers/getVariantExtras.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +48 -25
- package/dist/esm/helpers/insertStyleRule.js.map +3 -3
- package/dist/esm/helpers/isObj.js +0 -0
- package/dist/esm/helpers/isObj.js.map +0 -0
- package/dist/esm/helpers/isTamaguiComponent.js +0 -0
- package/dist/esm/helpers/isTamaguiComponent.js.map +2 -2
- package/dist/esm/helpers/isTamaguiElement.js +0 -0
- package/dist/esm/helpers/isTamaguiElement.js.map +2 -2
- package/dist/esm/helpers/matchMedia.js +6 -5
- package/dist/esm/helpers/matchMedia.js.map +2 -2
- package/dist/esm/helpers/matchMedia.native.js +0 -0
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.js +18 -14
- package/dist/esm/helpers/mergeProps.js.map +2 -2
- package/dist/esm/helpers/mergeTransform.js +8 -6
- package/dist/esm/helpers/mergeTransform.js.map +2 -2
- package/dist/esm/helpers/normalizeColor.js +0 -0
- package/dist/esm/helpers/normalizeColor.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.js +44 -4
- package/dist/esm/helpers/normalizeValueWithProperty.js.map +2 -2
- package/dist/esm/helpers/proxyThemeVariables.js +2 -1
- package/dist/esm/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/esm/helpers/pseudoDescriptors.js +11 -0
- package/dist/esm/helpers/pseudoDescriptors.js.map +2 -2
- package/dist/esm/helpers/registerCSSVariable.js +5 -6
- package/dist/esm/helpers/registerCSSVariable.js.map +2 -2
- package/dist/esm/helpers/startTransition.js +6 -0
- package/dist/esm/helpers/startTransition.js.map +7 -0
- package/dist/esm/helpers/themeable.js +12 -44
- 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/timer.js +11 -0
- package/dist/esm/helpers/timer.js.map +7 -0
- package/dist/esm/helpers/useShallowSetState.js +25 -0
- package/dist/esm/helpers/useShallowSetState.js.map +7 -0
- package/dist/esm/helpers/validate.js +0 -98
- package/dist/esm/helpers/validate.js.map +3 -3
- package/dist/esm/helpers/withStaticProperties.js +0 -0
- package/dist/esm/helpers/withStaticProperties.js.map +0 -0
- package/dist/esm/hooks/getThemeUnwrapped.js +12 -0
- package/dist/esm/hooks/getThemeUnwrapped.js.map +7 -0
- package/dist/esm/hooks/useConstant.js +4 -1
- package/dist/esm/hooks/useConstant.js.map +2 -2
- package/dist/esm/hooks/useElementLayout.js +59 -0
- package/dist/esm/hooks/useElementLayout.js.map +7 -0
- package/dist/esm/hooks/useId.js +1 -28
- package/dist/esm/hooks/useId.js.map +2 -2
- package/dist/esm/hooks/useIsMounted.js +0 -0
- package/dist/esm/hooks/useIsMounted.js.map +1 -1
- package/dist/esm/hooks/useIsSSR.js +22 -0
- package/dist/esm/hooks/useIsSSR.js.map +7 -0
- package/dist/esm/hooks/useIsTouchDevice.js +3 -9
- package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/esm/hooks/useMedia.js +159 -122
- package/dist/esm/hooks/useMedia.js.map +3 -3
- package/dist/esm/hooks/usePressable.js +1 -16
- 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 +178 -162
- package/dist/esm/hooks/useTheme.js.map +3 -3
- package/dist/esm/hooks/useThemeName.js +28 -0
- package/dist/esm/hooks/useThemeName.js.map +7 -0
- package/dist/esm/hooks/useUnmountEffect.js +0 -0
- package/dist/esm/hooks/useUnmountEffect.js.map +1 -1
- package/dist/esm/index.js +37 -22
- 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 +18 -15
- package/dist/esm/insertFont.js.map +2 -2
- package/dist/esm/setupReactNative.js +24 -0
- package/dist/esm/setupReactNative.js.map +7 -0
- package/dist/esm/static.js +1 -17
- package/dist/esm/static.js.map +2 -2
- package/dist/esm/styled.js +29 -51
- 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/{Pressability.js → vendor/Pressability.js} +3 -1
- package/dist/esm/vendor/Pressability.js.map +7 -0
- package/dist/esm/{Pressability.native.js → vendor/Pressability.native.js} +3 -1
- 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 +47 -50
- package/dist/esm/views/Slot.js.map +2 -2
- package/dist/esm/views/Stack.js +3 -21
- 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 +29 -29
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/esm/views/Theme.js +48 -21
- package/dist/esm/views/Theme.js.map +2 -2
- package/dist/esm/views/ThemeInverse.js +20 -15
- package/dist/esm/views/ThemeInverse.js.map +2 -2
- package/dist/esm/views/ThemeProvider.js +11 -22
- package/dist/esm/views/ThemeProvider.js.map +2 -2
- package/dist/esm/views/ThemeReset.js +6 -4
- package/dist/esm/views/ThemeReset.js.map +2 -2
- package/package.json +51 -19
- package/reset.css +1 -9
- package/src/Tamagui.ts +48 -0
- package/src/__snapshots__/createTokens.test.ts.snap +877 -0
- package/src/addTheme.ts +65 -0
- package/src/config.ts +52 -0
- package/src/constants/constants.ts +19 -0
- package/src/constants/isDevTools.ts +12 -0
- package/src/contexts/ButtonNestingContext.tsx +3 -0
- package/src/contexts/FontLanguageContext.tsx +5 -0
- package/src/contexts/TextAncestorContext.tsx +3 -0
- package/src/createComponent.tsx +1280 -0
- package/src/createFont.test.ts +129 -0
- package/src/createFont.ts +52 -0
- package/src/createShorthands.ts +7 -0
- package/src/createTamagui.ts +230 -0
- package/src/createTheme.ts +13 -0
- package/src/createTokens.test.ts +29 -0
- package/src/createTokens.ts +35 -0
- package/src/createVariable.test.ts +7 -0
- package/src/createVariable.ts +79 -0
- package/src/createVariables.ts +42 -0
- package/src/helpers/RNComponents.tsx +14 -0
- package/src/helpers/ThemeManager.test.tsx +497 -0
- package/src/helpers/ThemeManager.tsx +252 -0
- package/src/helpers/ThemeManagerContext.tsx +5 -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/getBoundingClientRect.tsx +7 -0
- package/src/helpers/getExpandedShorthands.ts +15 -0
- package/src/helpers/getFontLanguage.ts +2 -0
- package/src/helpers/getRect.tsx +8 -0
- package/src/helpers/getSize.ts +22 -0
- package/src/helpers/getSplitStyles.tsx +980 -0
- package/src/helpers/getStylesAtomic.native.ts +4 -0
- package/src/helpers/getStylesAtomic.ts +275 -0
- package/src/helpers/getThemeCSSRules.native.ts +3 -0
- package/src/helpers/getThemeCSSRules.ts +112 -0
- package/src/helpers/getVariantExtras.tsx +85 -0
- package/src/helpers/insertStyleRule.tsx +163 -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 +23 -0
- package/src/helpers/normalizeColor.ts +53 -0
- package/src/helpers/normalizeValueWithProperty.ts +123 -0
- package/src/helpers/proxyThemeVariables.tsx +15 -0
- package/src/helpers/pseudoDescriptors.ts +40 -0
- package/src/helpers/registerCSSVariable.ts +11 -0
- package/src/helpers/themeable.tsx +44 -0
- package/src/helpers/themes.ts +69 -0
- package/src/helpers/timer.ts +9 -0
- package/src/helpers/useShallowSetState.tsx +29 -0
- package/src/helpers/withStaticProperties.tsx +7 -0
- package/src/hooks/getThemeUnwrapped.tsx +7 -0
- package/src/hooks/useElementLayout.tsx +85 -0
- package/src/hooks/useId.tsx +1 -0
- package/src/hooks/useIsTouchDevice.tsx +6 -0
- package/src/hooks/useMedia.tsx +265 -0
- package/src/hooks/useSafeRef.ts +48 -0
- package/src/hooks/useServerHooks.tsx +12 -0
- package/src/hooks/useTheme.tsx +243 -0
- package/src/hooks/useThemeName.tsx +27 -0
- package/src/index.ts +73 -0
- package/src/inject-styles.ts +20 -0
- package/src/insertFont.ts +70 -0
- package/src/setupReactNative.ts +20 -0
- package/src/static.ts +5 -0
- package/src/styled.tsx +172 -0
- package/src/types-rnw.tsx +162 -0
- package/src/types.tsx +1350 -0
- package/src/updateTheme.ts +26 -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 +59 -0
- package/src/views/Text.tsx +87 -0
- package/src/views/Theme.tsx +77 -0
- package/src/views/ThemeProvider.tsx +41 -0
- package/types/Tamagui.d.ts +9 -7
- package/types/addTheme.d.ts +32 -0
- package/types/config.d.ts +46 -0
- package/types/constants/constants.d.ts +14 -3
- package/types/constants/isDevTools.d.ts +2 -0
- package/types/contexts/ButtonNestingContext.d.ts +3 -0
- package/types/contexts/FontLanguageContext.d.ts +5 -0
- package/types/contexts/TextAncestorContext.d.ts +3 -0
- package/types/createComponent.d.ts +1 -24
- package/types/createFont.d.ts +0 -0
- package/types/createFont.test.d.ts +2 -0
- package/types/createShorthands.d.ts +2 -1
- package/types/createTamagui.d.ts +2 -25
- package/types/createTheme.d.ts +1 -1
- package/types/createTokens.d.ts +5 -5
- package/types/createTokens.test.d.ts +2 -0
- package/types/createVariable.d.ts +15 -10
- package/types/createVariable.test.d.ts +2 -0
- package/types/createVariables.d.ts +1 -1
- package/types/helpers/RNComponents.d.ts +1 -1
- package/types/helpers/ThemeManager.d.ts +36 -0
- package/types/helpers/ThemeManager.test.d.ts +2 -0
- package/types/helpers/ThemeManagerContext.d.ts +4 -0
- package/types/helpers/cache.d.ts +12 -0
- package/types/helpers/createMediaStyle.d.ts +2 -4
- package/types/helpers/createPropMapper.d.ts +3 -1
- package/types/helpers/createProxy.d.ts +2 -0
- package/types/helpers/expandStyle.d.ts +4 -0
- package/types/helpers/expandStyles.d.ts +20 -1
- package/types/helpers/extendStaticConfig.d.ts +0 -0
- package/types/helpers/fixNativeShadow.d.ts +0 -0
- package/types/helpers/getAnimationDriver.d.ts +6 -0
- package/types/helpers/getBoundingClientRect.d.ts +2 -0
- package/types/helpers/getExpandedShorthands.d.ts +0 -0
- package/types/helpers/getFontLanguage.d.ts +2 -0
- package/types/helpers/getRect.d.ts +9 -0
- package/types/helpers/getSize.d.ts +0 -0
- package/types/helpers/getSplitStyles.d.ts +32 -16
- package/types/helpers/getStylesAtomic.d.ts +11 -10
- package/types/helpers/getStylesAtomic.native.d.ts +0 -0
- package/types/helpers/getThemeCSSRules.d.ts +8 -0
- package/types/helpers/getThemeCSSRules.native.d.ts +2 -0
- package/types/helpers/getVariantExtras.d.ts +4 -6
- package/types/helpers/insertStyleRule.d.ts +8 -4
- package/types/helpers/isObj.d.ts +0 -0
- package/types/helpers/isTamaguiComponent.d.ts +1 -1
- package/types/helpers/isTamaguiElement.d.ts +5 -1
- package/types/helpers/matchMedia.d.ts +1 -1
- package/types/helpers/matchMedia.native.d.ts +0 -0
- package/types/helpers/mergeProps.d.ts +16 -1
- package/types/helpers/mergeTransform.d.ts +6 -4
- package/types/helpers/normalizeColor.d.ts +0 -0
- package/types/helpers/normalizeValueWithProperty.d.ts +5 -0
- package/types/helpers/proxyThemeVariables.d.ts +0 -0
- package/types/helpers/pseudoDescriptors.d.ts +8 -14
- package/types/helpers/registerCSSVariable.d.ts +3 -3
- package/types/helpers/themeable.d.ts +7 -7
- package/types/helpers/themes.d.ts +4 -0
- package/types/helpers/timer.d.ts +2 -0
- package/types/helpers/useShallowSetState.d.ts +4 -0
- package/types/helpers/withStaticProperties.d.ts +0 -0
- package/types/hooks/getThemeUnwrapped.d.ts +3 -0
- package/types/hooks/useElementLayout.d.ts +19 -0
- package/types/hooks/useId.d.ts +1 -8
- package/types/hooks/useIsTouchDevice.d.ts +0 -0
- package/types/hooks/useMedia.d.ts +22 -6
- package/types/hooks/useSafeRef.d.ts +4 -0
- package/types/hooks/useServerHooks.d.ts +4 -0
- package/types/hooks/useTheme.d.ts +11 -41
- package/types/hooks/useThemeName.d.ts +5 -0
- package/types/index.d.ts +17 -17
- package/types/inject-styles.d.ts +7 -0
- package/types/insertFont.d.ts +4 -1
- package/types/setupReactNative.d.ts +5 -0
- package/types/static.d.ts +1 -17
- package/types/styled.d.ts +6 -2
- package/types/types-rnw.d.ts +0 -0
- package/types/types.d.ts +298 -89
- package/types/updateTheme.d.ts +30 -0
- package/types/vendor/Pressability.d.ts +3 -0
- package/types/vendor/Pressability.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 +4 -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 +4 -3
- package/types/views/ThemeProvider.d.ts +0 -1
- package/dist/cjs/Pressability.js.map +0 -7
- package/dist/cjs/Pressability.native.js.map +0 -7
- package/dist/cjs/ThemeContext.js.map +0 -7
- package/dist/cjs/ThemeManager.js +0 -204
- package/dist/cjs/ThemeManager.js.map +0 -7
- package/dist/cjs/conf.js.map +0 -7
- package/dist/cjs/constants/rnw.js.map +0 -7
- package/dist/cjs/constants/rnw.native.js.map +0 -7
- package/dist/cjs/defaultComponentState.js +0 -1
- package/dist/cjs/helpers/createTamaguiProvider.js +0 -91
- package/dist/cjs/helpers/createTamaguiProvider.js.map +0 -7
- package/dist/cjs/helpers/cssHash.js.map +0 -7
- package/dist/cjs/helpers/getTextSize.js +0 -55
- package/dist/cjs/helpers/getTextSize.js.map +0 -7
- package/dist/cjs/helpers/nativeGestureHandler.native.js.map +0 -7
- package/dist/cjs/helpers/wrapThemeManagerContext.js +0 -37
- package/dist/cjs/helpers/wrapThemeManagerContext.js.map +0 -7
- package/dist/cjs/hooks/useFeatures.js +0 -230
- 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/views/TextAncestorContext.js +0 -43
- package/dist/cjs/views/TextAncestorContext.js.map +0 -7
- package/dist/esm/Pressability.js.map +0 -7
- package/dist/esm/Pressability.native.js.map +0 -7
- package/dist/esm/ThemeContext.js.map +0 -7
- package/dist/esm/ThemeManager.js +0 -179
- package/dist/esm/ThemeManager.js.map +0 -7
- package/dist/esm/conf.js.map +0 -7
- package/dist/esm/constants/rnw.js +0 -6
- package/dist/esm/constants/rnw.js.map +0 -7
- package/dist/esm/constants/rnw.native.js +0 -5
- package/dist/esm/constants/rnw.native.js.map +0 -7
- package/dist/esm/defaultComponentState.js +0 -1
- package/dist/esm/defaultComponentState.js.map +0 -7
- package/dist/esm/helpers/createTamaguiProvider.js +0 -67
- package/dist/esm/helpers/createTamaguiProvider.js.map +0 -7
- package/dist/esm/helpers/cssHash.js +0 -27
- package/dist/esm/helpers/cssHash.js.map +0 -7
- package/dist/esm/helpers/getTextSize.js +0 -32
- package/dist/esm/helpers/getTextSize.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 -11
- package/dist/esm/helpers/wrapThemeManagerContext.js.map +0 -7
- package/dist/esm/hooks/useFeatures.js +0 -206
- 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/views/TextAncestorContext.js +0 -15
- package/dist/esm/views/TextAncestorContext.js.map +0 -7
- package/types/Pressability.d.ts +0 -2
- package/types/Pressability.native.d.ts +0 -2
- package/types/Tamagui.d.ts.map +0 -1
- package/types/ThemeContext.d.ts +0 -7
- package/types/ThemeContext.d.ts.map +0 -1
- package/types/ThemeManager.d.ts +0 -52
- package/types/ThemeManager.d.ts.map +0 -1
- package/types/conf.d.ts +0 -26
- package/types/conf.d.ts.map +0 -1
- package/types/constants/platform.d.ts +0 -12
- package/types/constants/rnw.d.ts +0 -2
- package/types/constants/rnw.d.ts.map +0 -1
- package/types/constants/rnw.native.d.ts +0 -2
- package/types/contexts/ButtonInsideButtonContext.d.ts +0 -3
- package/types/createComponent.d.ts.map +0 -1
- package/types/createFont.d.ts.map +0 -1
- package/types/createTamagui.d.ts.map +0 -1
- package/types/createTokens.d.ts.map +0 -1
- package/types/defaultComponentState.d.ts +0 -1
- package/types/helpers/areEqualSets.d.ts +0 -2
- package/types/helpers/assignNativePropsToWeb.d.ts +0 -2
- package/types/helpers/assignNativePropsToWeb.d.ts.map +0 -1
- package/types/helpers/assignNativePropsToWeb.native.d.ts +0 -2
- package/types/helpers/calc.d.ts +0 -12
- package/types/helpers/calc.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 -3
- package/types/helpers/createTamaguiProvider.d.ts +0 -3
- package/types/helpers/createTamaguiProvider.d.ts.map +0 -1
- package/types/helpers/cssHash.d.ts +0 -2
- package/types/helpers/cssHash.d.ts.map +0 -1
- package/types/helpers/expandStyle.d.ts.map +0 -1
- package/types/helpers/expandStyles.d.ts.map +0 -1
- package/types/helpers/extendStaticConfig.d.ts.map +0 -1
- package/types/helpers/getExpandedShorthands.d.ts.map +0 -1
- package/types/helpers/getFont.d.ts +0 -3
- package/types/helpers/getFont.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/getStackSize.d.ts +0 -8
- package/types/helpers/getStackSize.d.ts.map +0 -1
- package/types/helpers/getStylesAtomic.d.ts.map +0 -1
- package/types/helpers/getVariantExtras.d.ts.map +0 -1
- package/types/helpers/isTamaguiComponent.d.ts.map +0 -1
- package/types/helpers/isTamaguiElement.d.ts.map +0 -1
- package/types/helpers/nativeGestureHandler.native.d.ts +0 -2
- package/types/helpers/normalizeColor.d.ts.map +0 -1
- package/types/helpers/normalizeValueWithProperty.d.ts.map +0 -1
- package/types/helpers/themeable.d.ts.map +0 -1
- package/types/helpers/validate.d.ts +0 -4
- package/types/helpers/wrapThemeManagerContext.d.ts +0 -3
- package/types/helpers/wrapThemeManagerContext.d.ts.map +0 -1
- package/types/hooks/useConstant.d.ts +0 -2
- package/types/hooks/useFeatures.d.ts +0 -24
- package/types/hooks/useFeatures.d.ts.map +0 -1
- package/types/hooks/useIsMounted.d.ts +0 -3
- package/types/hooks/useMedia.d.ts.map +0 -1
- package/types/hooks/usePressable.d.ts +0 -3
- package/types/hooks/usePrevious.d.ts +0 -1
- package/types/hooks/useTheme.d.ts.map +0 -1
- package/types/hooks/useUnmountEffect.d.ts +0 -2
- package/types/index.d.ts.map +0 -1
- package/types/insertFont.d.ts.map +0 -1
- package/types/static.d.ts.map +0 -1
- package/types/styled.d.ts.map +0 -1
- package/types/types.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 +0 -10
- package/types/views/ThemeInverse.d.ts.map +0 -1
- package/types/views/ThemeProvider.d.ts.map +0 -1
- package/types/views/ThemeReset.d.ts +0 -4
- package/types/views/ThemeReset.d.ts.map +0 -1
package/dist/cjs/types-rnw.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types-rnw.tsx"],
|
|
4
4
|
"sourcesContent": ["// The following list is sourced from:\n// - https://github.com/necolas/react-native-web/blob/0.17.5/packages/react-native-web/src/types/styles.js#L76\ntype RNWCursorValue =\n | 'alias'\n | 'all-scroll'\n | 'auto'\n | 'cell'\n | 'context-menu'\n | 'copy'\n | 'crosshair'\n | 'default'\n | 'grab'\n | 'grabbing'\n | 'help'\n | 'pointer'\n | 'progress'\n | 'wait'\n | 'text'\n | 'vertical-text'\n | 'move'\n | 'none'\n | 'no-drop'\n | 'not-allowed'\n | 'zoom-in'\n | 'zoom-out'\n | 'col-resize'\n | 'e-resize'\n | 'ew-resize'\n | 'n-resize'\n | 'ne-resize'\n | 'ns-resize'\n | 'nw-resize'\n | 'row-resize'\n | 's-resize'\n | 'se-resize'\n | 'sw-resize'\n | 'w-resize'\n | 'nesw-resize'\n | 'nwse-resize'\n\n// This list is the combination of the following two lists:\n// - https://github.com/necolas/react-native-web/blob/0.17.5/packages/react-native-web/src/modules/AccessibilityUtil/propsToAriaRole.js#L10\n// - https://github.com/necolas/react-native-web/blob/0.17.5/packages/react-native-web/src/modules/AccessibilityUtil/propsToAccessibilityComponent.js#L12\n// Plus the single hard-coded value \"label\" from here:\n// - https://github.com/necolas/react-native-web/blob/0.17.5/packages/react-native-web/src/modules/AccessibilityUtil/propsToAccessibilityComponent.js#L36\ntype RNWWebAccessibilityRole =\n | 'adjustable'\n | 'article'\n | 'banner'\n | 'blockquote'\n | 'button'\n | 'code'\n | 'complementary'\n | 'contentinfo'\n | 'deletion'\n | 'emphasis'\n | 'figure'\n | 'form'\n | 'header'\n | 'image'\n | 'imagebutton'\n | 'insertion'\n | 'keyboardkey'\n | 'label'\n | 'link'\n | 'list'\n | 'listitem'\n | 'main'\n | 'navigation'\n | 'none'\n | 'region'\n | 'search'\n | 'strong'\n | 'summary'\n | 'text'\n\nexport interface RNWViewProps {\n // our internal hack to pass className down (until styleq transition)\n dataSet?: any\n\n // TODO get proper types:\n target?: any\n rel?: any\n download?: any\n\n accessibilityRole?: RNWWebAccessibilityRole\n href?: string\n hrefAttrs?: {\n target?: '_blank' | '_self' | '_top' | 'blank' | 'self' | 'top'\n rel?: string\n download?: boolean\n }\n onMouseDown?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void\n onMouseUp?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void\n onMouseEnter?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void\n onMouseLeave?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void\n onFocus?: (event: React.FocusEvent<HTMLDivElement>) => void\n onScroll?: (event: React.UIEvent<HTMLDivElement, UIEvent>) => void\n // For compatibility with RNW internals\n onScrollShouldSetResponder?: unknown\n onScrollShouldSetResponderCapture?: unknown\n onSelectionChangeShouldSetResponder?: unknown\n onSelectionChangeShouldSetResponderCapture?: unknown\n}\n\nexport interface RNWTextProps {\n dir?: 'ltr' | 'rtl' | 'auto'\n focusable?: boolean\n accessibilityRole?: RNWWebAccessibilityRole\n accessibilityState?: {\n busy?: boolean\n checked?: boolean | 'mixed'\n disabled?: boolean\n expanded?: boolean\n grabbed?: boolean\n hidden?: boolean\n invalid?: boolean\n pressed?: boolean\n readonly?: boolean\n required?: boolean\n selected?: boolean\n }\n href?: string\n // TODO hrefAttrs or come up with proper html escape hatch\n // hrefAttrs?: {\n // target?: '_blank' | '_self' | '_top' | 'blank' | 'self' | 'top'\n // rel?: string\n // download?: boolean\n // }\n onMouseEnter?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void\n onMouseLeave?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void\n onFocus?: (event: React.FocusEvent<HTMLDivElement>) => void\n // For compatibility with RNW internals\n onMoveShouldSetResponder?: unknown\n onMoveShouldSetResponderCapture?: unknown\n onResponderEnd?: unknown\n onResponderGrant?: unknown\n onResponderMove?: unknown\n onResponderReject?: unknown\n onResponderRelease?: unknown\n onResponderStart?: unknown\n onResponderTerminate?: unknown\n onResponderTerminationRequest?: unknown\n onScrollShouldSetResponder?: unknown\n onScrollShouldSetResponderCapture?: unknown\n onSelectionChangeShouldSetResponder?: unknown\n onSelectionChangeShouldSetResponderCapture?: unknown\n onStartShouldSetResponder?: unknown\n onStartShouldSetResponderCapture?: unknown\n}\n\nexport interface RNWViewStyle {\n cursor?: RNWCursorValue\n transitionProperty?: string\n display?: 'flex' | 'inline-flex' | 'none'\n}\n\nexport interface RNWTextStyle {\n // The following list is sourced from:\n // - https://github.com/necolas/react-native-web/blob/0.17.5/packages/react-native-web/src/types/styles.js#L128\n userSelect?: 'all' | 'auto' | 'contain' | 'none' | 'text'\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/types.js
CHANGED
package/dist/cjs/types.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types.tsx"],
|
|
4
|
-
"sourcesContent": ["// TODO split this into own package @tamagui/types to share with animations packages\n\nimport { Properties } from 'csstype'\nimport React from 'react'\nimport {\n GestureResponderEvent,\n Image,\n TextProps as ReactTextProps,\n Text,\n TextInput,\n TextStyle,\n View,\n ViewProps,\n ViewStyle,\n} from 'react-native'\n\nimport { Variable } from './createVariable'\nimport { ResolveVariableTypes } from './helpers/createPropMapper'\nimport { RNWTextProps, RNWViewProps } from './types-rnw'\nimport { ThemeProviderProps } from './views/ThemeProvider'\n\nexport type SpaceDirection = 'vertical' | 'horizontal' | 'both'\n\nexport type TamaguiElement = HTMLElement | View\n\nexport type DebugProp = boolean | 'break' | 'verbose'\n\n//\n// base props that are accepted by createComponent (additional to react-native-web)\n//\nexport type TamaguiComponentPropsBase = {\n asChild?: boolean\n space?: SpaceTokens | null\n spaceDirection?: SpaceDirection\n separator?: React.ReactNode\n dangerouslySetInnerHTML?: { __html: string }\n animation?: AnimationProp\n animateOnly?: string[]\n children?: any | any[]\n debug?: DebugProp\n disabled?: boolean\n className?: string\n id?: string\n tag?: string\n theme?: ThemeName | null\n componentName?: string\n forceStyle?: 'hover' | 'press' | 'focus'\n onHoverIn?: (e: MouseEvent) => any\n onHoverOut?: (e: MouseEvent) => any\n onPress?: (e: GestureResponderEvent) => any\n onPressIn?: (e: GestureResponderEvent) => any\n onPressOut?: (e: GestureResponderEvent) => any\n // WEB ONLY\n onMouseEnter?: (e: MouseEvent) => any\n onMouseLeave?: (e: MouseEvent) => any\n onMouseDown?: (e: MouseEvent) => any\n // WEB STYLES\n userSelect?: Properties['userSelect']\n cursor?: Properties['cursor']\n}\n\nexport type ReactComponentWithRef<Props, Ref> = React.ForwardRefExoticComponent<\n Props & React.RefAttributes<Ref>\n>\n\nexport type ConfigListener = (conf: TamaguiInternalConfig) => void\n\n// to prevent things from going circular, hoisting some types in this file\n// to generally order them as building up towards TamaguiConfig\n\nexport type VariableVal = number | string | Variable\nexport type VariableColorVal = string | Variable\n\ntype GenericKey = string | number | symbol\n\nexport interface CreateTokens<Val extends VariableVal = VariableVal> {\n color: { [key: GenericKey]: Val }\n space: { [key: GenericKey]: Val }\n size: { [key: GenericKey]: Val }\n radius: { [key: GenericKey]: Val }\n zIndex: { [key: GenericKey]: Val }\n}\n\nexport type TamaguiBaseTheme = {\n // defined for our tamagui kit , we could do this inside `tamagui`\n // but maybe helpful to have some sort of universally shared things +\n // + enforce if they want their own, redefine in their design sys\n background: VariableColorVal\n backgroundHover: VariableColorVal\n backgroundPress: VariableColorVal\n backgroundFocus: VariableColorVal\n color: VariableColorVal\n colorHover: VariableColorVal\n colorPress: VariableColorVal\n colorFocus: VariableColorVal\n borderColor: VariableColorVal\n borderColorHover: VariableColorVal\n borderColorPress: VariableColorVal\n borderColorFocus: VariableColorVal\n shadowColor: VariableColorVal\n shadowColorHover: VariableColorVal\n shadowColorPress: VariableColorVal\n shadowColorFocus: VariableColorVal\n}\n\ntype GenericTokens = CreateTokens\ntype GenericThemes = {\n [key: string]:\n | Partial<TamaguiBaseTheme> & {\n [key: string]: VariableVal\n }\n}\ntype GenericShorthands = {\n // [key: string]: string\n}\n\ntype GenericMedia<K extends string = string> = {\n // name => media shorthand name (camelCase) => value\n [key in K]: {\n [key: string]: number | string\n }\n}\n\nexport type GenericFonts = {\n [key: string]: GenericFont\n}\n\ntype GenericAnimations = {\n [key: string]:\n | string\n | {\n [key: string]: any\n }\n}\n\n// this is the \"main\" typed object, which users re-define\n// (internal) keep all types directly on this object and reference them from elsewhere\n//\n// const config = createTamagui(...)\n// type MyConfig = typeof config\n// declare module 'tamagui' {\n// export interface TamaguiCustomConfig extends MyConfig {}\n// }\n// now your whole app/kit should be typed correctly\n//\nexport interface TamaguiCustomConfig {}\n\nexport interface TamaguiConfig\n extends Omit<GenericTamaguiConfig, keyof TamaguiCustomConfig>,\n TamaguiCustomConfig {}\n\nexport type CreateTamaguiConfig<\n A extends GenericTokens,\n B extends GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = Partial<Pick<ThemeProviderProps, 'defaultTheme' | 'disableRootThemeClass'>> & {\n fonts: F\n tokens: A\n themes: B\n shorthands: C\n media: D\n animations: AnimationDriver<E>\n defaultProps?: Record<string, Object>\n}\n\n// for use in creation functions so it doesnt get overwrtitten\nexport type GenericTamaguiConfig = CreateTamaguiConfig<\n GenericTokens,\n GenericThemes,\n GenericShorthands,\n GenericMedia,\n GenericAnimations,\n GenericFonts\n>\n\n// since TamaguiConfig will be re-declared, these will all be typed globally\nexport type ThemeObject = TamaguiConfig['themes'][keyof TamaguiConfig['themes']]\nexport type Tokens = TamaguiConfig['tokens']\nexport type Shorthands = TamaguiConfig['shorthands']\nexport type Media = TamaguiConfig['media']\nexport type Themes = TamaguiConfig['themes']\nexport type ThemeName = GetAltThemeNames<keyof Themes>\n// export type ThemeNameWithSubThemes = GetSubThemes<ThemeName>\nexport type ThemeKeys = keyof ThemeObject\nexport type ThemeTokens = `$${ThemeKeys}`\nexport type AnimationKeys = Omit<GetAnimationKeys<TamaguiConfig>, number>\n\ntype GetAltThemeNames<S> = (S extends `${string}_${infer Alt}` ? GetAltThemeNames<Alt> : S) | S\n\n// this is the config generated via createTamagui()\nexport type TamaguiInternalConfig<\n A extends GenericTokens = GenericTokens,\n B extends GenericThemes = GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = CreateTamaguiConfig<A, B, C, D, E, F> & {\n // TODO need to make it this but this breaks types, revisit\n // animations: E //AnimationDriver<E>\n Provider: (props: TamaguiProviderProps) => any\n // with $ prefixes for fast lookups (one time cost at startup vs every render)\n tokensParsed: CreateTokens<Variable>\n themeConfig: any\n fontsParsed: GenericFonts\n getCSS: () => string\n parsed: boolean\n\n // just passed in from CreateTamaguiProps\n themeClassNameOnRoot?: boolean\n}\n\nexport type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']['animations']\n\n// prevents const intersections from being clobbered into string, keeping the consts\nexport type UnionableString = string & {}\nexport type UnionableNumber = number & {}\nexport type PropTypes<A extends TamaguiComponent> = A extends React.FunctionComponent<infer Props>\n ? Props\n : unknown\n\nexport type GenericFont<Key extends number | string = number | string> = {\n size: { [key in Key]: number | Variable }\n lineHeight: Partial<{ [key in Key]: number | Variable }>\n letterSpacing: Partial<{ [key in Key]: number | Variable }>\n weight: Partial<{ [key in Key]: number | string | Variable }>\n family: string | Variable\n style?: Partial<{ [key in Key]: TextStyle['fontStyle'] | Variable }>\n transform?: Partial<{ [key in Key]: TextStyle['textTransform'] | Variable }>\n color?: Partial<{ [key in Key]: string | Variable }>\n}\n\n// media\nexport type MediaKeys = keyof Media\nexport type MediaQueryObject = { [key: string]: string | number | string }\nexport type MediaQueryKey = keyof Media\nexport type MediaPropKeys = `$${MediaQueryKey}`\nexport type MediaQueryState = { [key in MediaPropKeys]: boolean }\nexport type MediaProps<A> = {\n [key in MediaPropKeys]?: A\n}\nexport type MediaQueries = {\n [key in MediaQueryKey]: MediaQueryObject\n}\nexport type ConfigureMediaQueryOptions = {\n queries?: MediaQueries\n defaultActive?: MediaQueryKey[]\n}\n\nexport type TransformStyleProps = {\n x?: number\n y?: number\n perspective?: number\n scale?: number\n scaleX?: number\n scaleY?: number\n skewX?: string\n skewY?: string\n matrix?: number[]\n rotate?: string\n rotateY?: string\n rotateX?: string\n rotateZ?: string\n}\n\n// createComponent props helpers\n\n// animation=\"bouncy\"\n// animation={['bouncy', { }]}\n// { all: 'name' }\n\n// TODO can override for better types\nexport type AnimationConfigType = any\n\nexport type AnimationProp =\n | AnimationKeys\n | {\n [key: string]:\n | AnimationKeys\n | {\n type: AnimationKeys\n [key: string]: any\n }\n }\n | [\n AnimationKeys,\n {\n [key: string]:\n | AnimationKeys\n | {\n type?: AnimationKeys\n [key: string]: any\n }\n }\n ]\n\ntype GetTokenFontKeysFor<\n A extends\n | 'size'\n | 'weight'\n | 'letterSpacing'\n | 'family'\n | 'lineHeight'\n | 'transform'\n | 'style'\n | 'color'\n> = keyof TamaguiConfig['fonts']['body'][A]\n\ntype GetTokenString<A> = A extends string | number ? `$${A}` : `$${string}`\n\n// base tokens\nexport type SizeTokens = GetTokenString<keyof Tokens['size']> | number\nexport type SpaceTokens = GetTokenString<keyof Tokens['space']> | number | boolean\nexport type ColorTokens =\n | GetTokenString<keyof Tokens['color']>\n | GetTokenString<keyof ThemeObject>\n | CSSColorNames\nexport type ZIndexTokens = GetTokenString<keyof Tokens['zIndex']> | number\nexport type RadiusTokens = GetTokenString<keyof Tokens['radius']> | number\n\n// font tokens\nexport type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>\nexport type FontSizeTokens = GetTokenString<GetTokenFontKeysFor<'size'>> | number\nexport type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}` | number\nexport type FontWeightTokens =\n | `$${GetTokenFontKeysFor<'weight'>}`\n | `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`\nexport type FontColorTokens = `$${GetTokenFontKeysFor<'color'>}` | number\nexport type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}` | number\nexport type FontStyleTokens = `$${GetTokenFontKeysFor<'style'>}` | TextStyle['fontStyle']\nexport type FontTransformTokens =\n | `$${GetTokenFontKeysFor<'transform'>}`\n | TextStyle['textTransform']\n\n//\n// adds theme short values to relevant props\n//\n\nexport type ThemeValueByCategory<K extends string | number | symbol> = K extends 'theme'\n ? ThemeTokens\n : K extends 'size'\n ? SizeTokens\n : K extends 'font'\n ? FontTokens\n : K extends 'fontSize'\n ? FontSizeTokens\n : K extends 'space'\n ? SpaceTokens\n : K extends 'color'\n ? ColorTokens\n : K extends 'zIndex'\n ? ZIndexTokens\n : K extends 'lineHeight'\n ? FontLineHeightTokens\n : K extends 'fontWeight'\n ? FontWeightTokens\n : K extends 'letterSpacing'\n ? FontLetterSpacingTokens\n : {}\n\ntype FontKeys = 'fontFamily'\ntype FontSizeKeys = 'fontSize'\ntype FontWeightKeys = 'fontWeight'\ntype FontLetterSpacingKeys = 'letterSpacing'\ntype LineHeightKeys = 'lineHeight'\ntype ZIndexKeys = 'zIndex'\n\nexport type ThemeValueGet<K extends string | number | symbol> = K extends 'theme'\n ? ThemeTokens\n : K extends SizeKeys\n ? SizeTokens\n : K extends FontKeys\n ? FontTokens\n : K extends FontSizeKeys\n ? FontSizeTokens\n : K extends SpaceKeys\n ? K extends 'shadowOffset'\n ? { width: SpaceTokens; height: SpaceTokens }\n : SpaceTokens\n : K extends ColorKeys\n ? ColorTokens\n : K extends ZIndexKeys\n ? ZIndexTokens\n : K extends LineHeightKeys\n ? FontLineHeightTokens\n : K extends FontWeightKeys\n ? FontWeightTokens\n : K extends FontLetterSpacingKeys\n ? FontLetterSpacingTokens\n : never\n\nexport type ThemeValueFallback = UnionableString | Variable\n\nexport type WithThemeValues<T extends object> = {\n [K in keyof T]: ThemeValueGet<K> extends never\n ? T[K]\n : ThemeValueGet<K> | Exclude<T[K], string> | ThemeValueFallback\n}\n\n// adds shorthand props\nexport type WithShorthands<StyleProps> = {\n [Key in keyof Shorthands]?: Shorthands[Key] extends keyof StyleProps\n ? StyleProps[Shorthands[Key]] | null\n : undefined\n}\n\n// adds pseudo props\nexport type PseudoProps<A> = {\n hoverStyle?: A | null\n pressStyle?: A | null\n focusStyle?: A | null\n exitStyle?: A | null\n enterStyle?: A | null\n}\n\nexport type PseudoPropKeys = keyof PseudoProps<any>\n\nexport type PseudoStyles = {\n hoverStyle?: ViewStyle\n pressStyle?: ViewStyle\n focusStyle?: ViewStyle\n enterStyle?: ViewStyle\n exitStyle?: ViewStyle\n}\n\n//\n// add both theme and shorthands\n//\ntype WithThemeAndShorthands<A extends object> = WithThemeValues<A> &\n WithShorthands<WithThemeValues<A>>\n\n//\n// combines all of theme, shorthands, pseudos...\n//\ntype WithThemeShorthandsAndPseudos<A extends object> =\n | WithThemeAndShorthands<A> & PseudoProps<WithThemeAndShorthands<A>>\n\n//\n// ... media queries and animations\n//\ntype WithThemeShorthandsPseudosMediaAnimation<A extends object> = WithThemeShorthandsAndPseudos<A> &\n MediaProps<WithThemeShorthandsAndPseudos<A>>\n\n//\n// Stack\n//\n\ntype WebOnlyStyleProps = {\n // WEB ONLY\n cursor?: string\n // WEB ONLY\n contain?: 'none' | 'strict' | 'content' | 'size' | 'layout' | 'paint' | string\n // WEB ONLY values: inherit, inline, block, content\n display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex'\n // WEB ONLY pointerEvents can be a style prop\n pointerEvents?: ViewProps['pointerEvents']\n}\n\nexport type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> &\n TransformStyleProps &\n WebOnlyStyleProps\n\nexport type StackPropsBaseShared = Omit<ViewProps, 'display' | 'children'> &\n RNWViewProps &\n TamaguiComponentPropsBase\n\nexport type StackStyleProps = WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>\nexport type StackPropsBase = StackPropsBaseShared & WithThemeAndShorthands<StackStylePropsBase>\nexport type StackProps = StackPropsBaseShared & StackStyleProps\n\nexport type GestureReponderEvent = Exclude<View['props']['onResponderMove'], void> extends (\n event: infer Event\n) => void\n ? Event\n : never\n\n//\n// Text props\n//\n\nexport type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> &\n TransformStyleProps &\n WebOnlyStyleProps & {\n ellipse?: boolean\n selectable?: boolean\n textDecorationDistance?: number\n textOverflow?: Properties['textOverflow']\n whiteSpace?: Properties['whiteSpace']\n wordWrap?: Properties['wordWrap']\n }\n\nexport type TextPropsBaseShared = Omit<ReactTextProps, 'children'> &\n RNWTextProps &\n TamaguiComponentPropsBase\nexport type TextPropsBase = TextPropsBaseShared & WithThemeAndShorthands<TextStylePropsBase>\nexport type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>\nexport type TextProps = TextPropsBaseShared & TextStyleProps\n\n// could actually infer from parent\nexport type ViewOrTextProps = WithThemeShorthandsPseudosMediaAnimation<\n Omit<TextStylePropsBase, keyof StackStylePropsBase> & StackStylePropsBase\n>\n\n//\n// StaticComponent\n//\n\nexport type TamaguiComponent<\n Props = any,\n Ref = any,\n BaseProps = {},\n VariantProps = {}\n> = ReactComponentWithRef<Props, Ref> & StaticComponentObject\n\ntype StaticComponentObject = {\n staticConfig: StaticConfig\n /*\n * Only needed for more complex components\n * If you create a styled frame component this is a HoC to extract\n * styles from all parents.\n */\n extractable: <X>(a: X, opts?: Partial<StaticConfig>) => X\n}\n\nexport type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {\n disableInjectCSS?: boolean\n children?: React.ReactNode\n}\n\nexport type PropMapper = (\n key: string,\n value: any,\n theme: ThemeObject,\n props: Record<string, any>,\n state: Partial<SplitStyleState>,\n avoidDefaultProps?: boolean,\n debug?: DebugProp\n) => undefined | [string, any][]\n\nexport type StaticConfigParsed = StaticConfig & {\n parsed: true\n propMapper: PropMapper\n variantsParsed?: {\n [key: string]: {\n [key: string]: any\n }\n }\n}\n\nexport type GenericVariantDefinitions = {\n [key: string]: {\n [key: string]:\n | ((a: any, b: any) => any)\n | {\n [key: string]: any\n }\n }\n}\n\nexport type StaticConfig = {\n Component?: React.FunctionComponent<any> & StaticComponentObject\n\n variants?: GenericVariantDefinitions\n\n /**\n * Used for applying sub theme style\n */\n componentName?: string\n\n /**\n * (compiler) If you need to pass context or something, prevents from ever\n * flattening. The 'jsx' option means it will never flatten. if you\n * pass JSX as a children (if its purely string, it will still flatten).\n */\n neverFlatten?: boolean | 'jsx'\n\n /**\n * Determines ultimate output tag (Text vs View)\n */\n isText?: boolean\n\n /**\n * Attempts to attach focus styles at runtime (useful for native)\n */\n isInput?: boolean\n\n /**\n * React native web images need special handling for className support\n */\n isImage?: boolean\n\n /**\n * Which style keys are allowed to be extracted.\n */\n validStyles?: { [key: string]: boolean }\n\n /**\n * Same as React.defaultProps, be sure to sync\n */\n defaultProps: Record<string, any>\n\n /**\n * (compiler) If these props are encountered, bail on all optimization.\n */\n deoptProps?: Set<string>\n\n /**\n * (compiler) If these props are encountered, leave them un-extracted.\n */\n inlineProps?: Set<string>\n\n /**\n * (compiler) If not flattening, leave this prop as original value.\n * Only applies to style attributes\n */\n inlineWhenUnflattened?: Set<string>\n\n /**\n * (compiler) A bit odd, only for more advanced heirarchies.\n * Indicates that the component will set this prop so the\n * static extraction can ensure it sets them to ={undefined}\n * so they get overriddent. In the future, this can be smarter.\n */\n ensureOverriddenProp?: { [key: string]: boolean }\n\n /**\n * Auto-detected, but can ovverride. Wraps children to space them on top\n */\n isZStack?: boolean\n\n /**\n * Merges into defaultProps later on, used internally yonly\n */\n defaultVariants?: { [key: string]: any }\n\n /**\n * Auto-detect, but can ovverride, passes styles properly to react-native-web\n */\n isReactNativeWeb?: boolean\n\n /**\n * Used internally to keep reference to the original rnw component\n */\n reactNativeWebComponent?: any\n\n /**\n * Memoize the component\n */\n memo?: boolean\n\n /**\n * Auto-detect, but can ovverride, passes styles properly to react-native-web\n */\n isTamagui?: boolean\n\n /**\n * Used internally to handle extractable HoC separate\n */\n isExtractable?: boolean\n\n /**\n * Used insternally to attach default props to names\n */\n parentNames?: string[]\n}\n\n/**\n * --------------------------------------------\n * variants\n * --------------------------------------------\n */\n\nexport type StylableComponent =\n | TamaguiComponent\n | React.Component\n | React.ForwardRefExoticComponent<any>\n | ReactComponentWithRef<any, any>\n | (new (props: any) => any)\n | typeof View\n | typeof Text\n | typeof TextInput\n | typeof Image\n\nexport type GetStyledVariants<A extends TamaguiComponent> = A extends TamaguiComponent<\n any,\n any,\n any,\n infer Variants\n>\n ? Variants\n : never\n\nexport type GetBaseProps<A extends StylableComponent> = A extends TamaguiComponent<\n any,\n any,\n infer BaseProps\n>\n ? BaseProps\n : never\n\nexport type GetProps<A extends StylableComponent> = A extends TamaguiComponent<infer Props>\n ? Props\n : A extends React.Component<infer Props>\n ? GetGenericComponentTamaguiProps<Props>\n : A extends new (props: infer Props) => any\n ? GetGenericComponentTamaguiProps<Props>\n : {}\n\ntype GetGenericComponentTamaguiProps<P> = P &\n Omit<'textAlign' extends keyof P ? TextProps : StackProps, keyof P>\n\nexport type SpreadKeys =\n | '...fontSize'\n | '...fontStyle'\n | '...fontTransform'\n | '...lineHeight'\n | '...letterSpacing'\n | '...size'\n | '...space'\n | '...color'\n | '...zIndex'\n | '...theme'\n | '...radius'\n\nexport type VariantDefinitions<\n Parent extends StylableComponent = TamaguiComponent,\n MyProps extends Object = GetProps<Parent>,\n Val = any\n> = VariantDefinitionFromProps<MyProps, Val>\n\nexport type VariantDefinitionFromProps<MyProps, Val> = MyProps extends Object\n ? {\n [propName: string]:\n | VariantSpreadFunction<MyProps, Val>\n | ({\n [Key in SpreadKeys]?: Key extends '...fontSize'\n ? FontSizeVariantSpreadFunction<MyProps>\n : Key extends '...size'\n ? SizeVariantSpreadFunction<MyProps>\n : Key extends '...space'\n ? SpaceVariantSpreadFunction<MyProps>\n : Key extends '...color'\n ? ColorVariantSpreadFunction<MyProps>\n : Key extends '...lineHeight'\n ? FontLineHeightVariantSpreadFunction<MyProps>\n : Key extends '...fontTransform'\n ? FontTransformVariantSpreadFunction<MyProps>\n : Key extends '...fontStyle'\n ? FontStyleVariantSpreadFunction<MyProps>\n : Key extends '...letterSpacing'\n ? FontLetterSpacingVariantSpreadFunction<MyProps>\n : Key extends '...zIndex'\n ? ZIndexVariantSpreadFunction<MyProps>\n : Key extends '...radius'\n ? RadiusVariantSpreadFunction<MyProps>\n : Key extends '...theme'\n ? ThemeVariantSpreadFunction<MyProps>\n : never\n } & {\n [Key in string | number | 'true' | 'false']?:\n | MyProps\n | VariantSpreadFunction<MyProps, Val>\n } & {\n [Key in VariantTypeKeys]?: Key extends ':number'\n ? VariantSpreadFunction<MyProps, number>\n : Key extends ':boolean'\n ? VariantSpreadFunction<MyProps, boolean>\n : Key extends ':string'\n ? VariantSpreadFunction<MyProps, string>\n : never\n })\n }\n : never\n\nexport type GenericStackVariants = VariantDefinitionFromProps<StackProps, any>\nexport type GenericTextVariants = VariantDefinitionFromProps<StackProps, any>\n\nexport type GetVariantProps<Variants> = {\n [Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val>\n ? Val\n : GetVariantValues<keyof Variants[Key]>\n}\n\nexport type VariantSpreadExtras<Props> = {\n fonts: TamaguiConfig['fonts']\n tokens: TamaguiConfig['tokens']\n theme: Themes extends { [key: string]: infer B } ? B : unknown\n props: Props\n}\n\ntype PropLike = { [key: string]: any }\n\nexport type VariantSpreadFunction<Props extends PropLike, Val = any> = (\n val: Val,\n config: VariantSpreadExtras<Props>\n) =>\n | {\n [Key in keyof Props]: Props[Key] | Variable\n }\n | null\n | undefined\n\nexport type VariantTypeKeys = ':string' | ':boolean' | ':number'\n\nexport type GetVariantValues<Key> = Key extends `...${infer VariantSpread}`\n ? ThemeValueByCategory<VariantSpread>\n : Key extends 'true' | 'false'\n ? boolean\n : Key extends ':string'\n ? string\n : Key extends ':boolean'\n ? boolean\n : Key extends ':number'\n ? number\n : Key\n\nexport type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontSizeTokens\n>\nexport type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SizeTokens>\nexport type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SpaceTokens>\nexport type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>\nexport type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontLineHeightTokens\n>\nexport type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontLetterSpacingTokens\n>\nexport type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontStyleTokens\n>\nexport type FontTransformVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontTransformTokens\n>\nexport type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>\nexport type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, RadiusTokens>\nexport type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>\n\n/**\n * --------------------------------------------\n * end variants\n * --------------------------------------------\n */\n\ntype SizeKeys =\n | 'width'\n | 'height'\n | 'minWidth'\n | 'minHeight'\n | 'maxWidth'\n | 'maxHeight'\n | 'shadowRadius'\n\ntype ColorKeys =\n | 'color'\n | 'backgroundColor'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderTopColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n | 'shadowColor'\n | 'textShadowColor'\n\ntype SpaceKeys =\n | 'space'\n | 'padding'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingLeft'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingEnd'\n | 'paddingStart'\n | 'margin'\n | 'marginHorizontal'\n | 'marginVertical'\n | 'marginLeft'\n | 'marginTop'\n | 'marginBottom'\n | 'marginLeft'\n | 'marginRight'\n | 'marginEnd'\n | 'marginStart'\n | 'x'\n | 'y'\n | 'scale'\n | 'scaleX'\n | 'scaleY'\n | 'borderTopEndRadius'\n | 'borderTopLeftRadius'\n | 'borderTopRightRadius'\n | 'borderTopStartRadius'\n | 'borderBottomEndRadius'\n | 'borderBottomLeftRadius'\n | 'borderBottomRightRadius'\n | 'borderBottomStartRadius'\n | 'borderBottomWidth'\n | 'borderLeftWidth'\n | 'borderRadius'\n | 'borderRightWidth'\n | 'borderTopEndRadius'\n | 'borderTopLeftRadius'\n | 'borderTopRightRadius'\n | 'borderEndWidth'\n | 'borderStartWidth'\n | 'borderTopStartRadius'\n | 'borderTopWidth'\n | 'borderWidth'\n | 'left'\n | 'top'\n | 'right'\n | 'bottom'\n | 'shadowOffset'\n\ntype CSSColorNames =\n | 'aliceblue'\n | 'antiquewhite'\n | 'aqua'\n | 'aquamarine'\n | 'azure'\n | 'beige'\n | 'bisque'\n | 'black'\n | 'blanchedalmond'\n | 'blue'\n | 'blueviolet'\n | 'brown'\n | 'burlywood'\n | 'cadetblue'\n | 'chartreuse'\n | 'chocolate'\n | 'coral'\n | 'cornflowerblue'\n | 'cornsilk'\n | 'crimson'\n | 'cyan'\n | 'darkblue'\n | 'darkcyan'\n | 'darkgoldenrod'\n | 'darkgray'\n | 'darkgreen'\n | 'darkkhaki'\n | 'darkmagenta'\n | 'darkolivegreen'\n | 'darkorange'\n | 'darkorchid'\n | 'darkred'\n | 'darksalmon'\n | 'darkseagreen'\n | 'darkslateblue'\n | 'darkslategray'\n | 'darkturquoise'\n | 'darkviolet'\n | 'deeppink'\n | 'deepskyblue'\n | 'dimgray'\n | 'dodgerblue'\n | 'firebrick'\n | 'floralwhite'\n | 'forestgreen'\n | 'fuchsia'\n | 'gainsboro'\n | 'ghostwhite'\n | 'gold'\n | 'goldenrod'\n | 'gray'\n | 'green'\n | 'greenyellow'\n | 'honeydew'\n | 'hotpink'\n | 'indianred '\n | 'indigo '\n | 'ivory'\n | 'khaki'\n | 'lavender'\n | 'lavenderblush'\n | 'lawngreen'\n | 'lemonchiffon'\n | 'lightblue'\n | 'lightcoral'\n | 'lightcyan'\n | 'lightgoldenrodyellow'\n | 'lightgrey'\n | 'lightgreen'\n | 'lightpink'\n | 'lightsalmon'\n | 'lightseagreen'\n | 'lightskyblue'\n | 'lightslategray'\n | 'lightsteelblue'\n | 'lightyellow'\n | 'lime'\n | 'limegreen'\n | 'linen'\n | 'magenta'\n | 'maroon'\n | 'mediumaquamarine'\n | 'mediumblue'\n | 'mediumorchid'\n | 'mediumpurple'\n | 'mediumseagreen'\n | 'mediumslateblue'\n | 'mediumspringgreen'\n | 'mediumturquoise'\n | 'mediumvioletred'\n | 'midnightblue'\n | 'mintcream'\n | 'mistyrose'\n | 'moccasin'\n | 'navajowhite'\n | 'navy'\n | 'oldlace'\n | 'olive'\n | 'olivedrab'\n | 'orange'\n | 'orangered'\n | 'orchid'\n | 'palegoldenrod'\n | 'palegreen'\n | 'paleturquoise'\n | 'palevioletred'\n | 'papayawhip'\n | 'peachpuff'\n | 'peru'\n | 'pink'\n | 'plum'\n | 'powderblue'\n | 'purple'\n | 'red'\n | 'rosybrown'\n | 'royalblue'\n | 'saddlebrown'\n | 'salmon'\n | 'sandybrown'\n | 'seagreen'\n | 'seashell'\n | 'sienna'\n | 'silver'\n | 'skyblue'\n | 'slateblue'\n | 'slategray'\n | 'snow'\n | 'springgreen'\n | 'steelblue'\n | 'tan'\n | 'teal'\n | 'thistle'\n | 'tomato'\n | 'turquoise'\n | 'violet'\n | 'wheat'\n | 'white'\n | 'whitesmoke'\n | 'yellow'\n | 'yellowgreen'\n\nexport type TamaguiComponentState = {\n hover: boolean\n press: boolean\n pressIn: boolean\n focus: boolean\n mounted: boolean\n animation?: null | {\n style?: any\n avoidClasses?: boolean\n }\n}\n\nexport type SplitStyleState = TamaguiComponentState & {\n noClassNames?: boolean\n dynamicStylesInline?: boolean\n resolveVariablesAs?: ResolveVariableTypes\n fallbackProps?: Record<string, any>\n keepVariantsAsProps?: boolean\n hasTextAncestor?: boolean\n}\n\n// Animations:\n\ntype AnimationConfig = {\n [key: string]: any\n}\n\nexport type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {\n avoidClasses?: boolean\n useAnimations: UseAnimationHook\n animations: A\n View?: any\n Text?: any\n}\n\nexport type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>\n\nexport type UseAnimationHelpers = {\n staticConfig: StaticConfigParsed\n getStyle: (props?: {\n isEntering?: boolean\n isExiting?: boolean\n exitVariant?: string | null\n enterVariant?: string | null\n }) => ViewStyle\n state: SplitStyleState\n pseudos: PseudoProps<ViewStyle>\n // style: ViewStyle | null | undefined\n // isMounted: boolean\n // exitStyle?: ViewStyle | null\n onDidAnimate?: any\n delay?: number\n // mergedStyles(props?: { isExiting?: boolean }): ViewStyle\n}\n\nexport type UseAnimationHook = (\n props: UseAnimationProps,\n helpers: UseAnimationHelpers\n) => {\n style?: StackStylePropsBase | StackStylePropsBase[]\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["// TODO split this into own package @tamagui/types to share with animations packages\n\nimport type {\n Image,\n PressableProps,\n TextProps as ReactTextProps,\n Text,\n TextInput,\n TextStyle,\n View,\n ViewProps,\n ViewStyle,\n} from '@tamagui/types-react-native'\nimport type { Properties } from 'csstype'\nimport type {\n ComponentType,\n ForwardRefExoticComponent,\n FunctionComponent,\n HTMLAttributes,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react'\n\nimport type { Variable } from './createVariable'\nimport type { ResolveVariableTypes } from './helpers/createPropMapper'\nimport type { TamaguiReactElement } from './static'\nimport type { RNWTextProps, RNWViewProps } from './types-rnw'\nimport type { FontLanguageProps } from './views/FontLanguage.types'\nimport type { ThemeProviderProps } from './views/ThemeProvider'\n\nexport type SpaceDirection = 'vertical' | 'horizontal' | 'both'\n\nexport type TamaguiElement = HTMLElement | View\n\nexport type DebugProp = boolean | 'break' | 'verbose'\n\n// base props that are accepted by createComponent (additional to react-native-web)\n\ntype DivAttributes = HTMLAttributes<HTMLDivElement>\n\nexport type TamaguiComponentPropsBase = {\n hitSlop?: PressableProps['hitSlop']\n asChild?: boolean\n space?: SpaceTokens | null\n spaceDirection?: SpaceDirection\n separator?: ReactNode\n dangerouslySetInnerHTML?: { __html: string }\n animation?: AnimationProp\n animateOnly?: string[]\n children?: any | any[]\n debug?: DebugProp\n disabled?: boolean\n className?: string\n themeShallow?: boolean\n id?: string\n tag?: string\n theme?: ThemeName | null\n componentName?: string\n /**\n * Forces the pseudo style state to be on\n */\n forceStyle?: 'hover' | 'press' | 'focus'\n onHoverIn?: DivAttributes['onMouseEnter']\n onHoverOut?: DivAttributes['onMouseLeave']\n onPress?: PressableProps['onPress']\n onPressIn?: PressableProps['onPress']\n onPressOut?: PressableProps['onPress']\n // WEB ONLY\n onMouseEnter?: DivAttributes['onMouseEnter']\n onMouseLeave?: DivAttributes['onMouseLeave']\n onMouseDown?: DivAttributes['onMouseDown']\n}\n\nexport type ReactComponentWithRef<Props, Ref> = ForwardRefExoticComponent<\n Props & RefAttributes<Ref>\n>\n\nexport type ConfigListener = (conf: TamaguiInternalConfig) => void\n\n// to prevent things from going circular, hoisting some types in this file\n// to generally order them as building up towards TamaguiConfig\n\nexport type VariableVal = number | string | Variable\nexport type VariableColorVal = string | Variable\n\ntype GenericKey = string | number | symbol\n\nexport interface CreateTokens<Val extends VariableVal = VariableVal> {\n color: { [key: GenericKey]: Val }\n space: { [key: GenericKey]: Val }\n size: { [key: GenericKey]: Val }\n radius: { [key: GenericKey]: Val }\n zIndex: { [key: GenericKey]: Val }\n}\n\nexport type TamaguiBaseTheme = {\n // defined for our tamagui kit , we could do this inside `tamagui`\n // but maybe helpful to have some sort of universally shared things +\n // + enforce if they want their own, redefine in their design sys\n background: VariableColorVal\n backgroundHover: VariableColorVal\n backgroundPress: VariableColorVal\n backgroundFocus: VariableColorVal\n color: VariableColorVal\n colorHover: VariableColorVal\n colorPress: VariableColorVal\n colorFocus: VariableColorVal\n borderColor: VariableColorVal\n borderColorHover: VariableColorVal\n borderColorPress: VariableColorVal\n borderColorFocus: VariableColorVal\n shadowColor: VariableColorVal\n shadowColorHover: VariableColorVal\n shadowColorPress: VariableColorVal\n shadowColorFocus: VariableColorVal\n}\n\ntype GenericTokens = CreateTokens\ntype GenericThemes = {\n [key: string]:\n | Partial<TamaguiBaseTheme> & {\n [key: string]: VariableVal\n }\n}\n\ntype AllStyleKeys = keyof StackStylePropsBase | keyof TextStylePropsBase\n\nexport type CreateShorthands = {\n [key: string]: AllStyleKeys\n}\n\nexport type GenericShorthands = {}\n\n// sm: { minWidth: 100 }\ntype GenericMedia = {\n [key: string]: {\n [key: string]: number | string\n }\n}\n\nexport type GenericFonts = Record<string, GenericFont>\n\ntype GenericAnimations = {\n [key: string]:\n | string\n | {\n [key: string]: any\n }\n | any[]\n}\n\n// this is the \"main\" typed object, which users re-define\n// (internal) keep all types directly on this object and reference them from elsewhere\n//\n// const config = createTamagui(...)\n// type MyConfig = typeof config\n// declare module 'tamagui' {\n// export interface TamaguiCustomConfig extends MyConfig {}\n// }\n// now your whole app/kit should be typed correctly\n//\nexport interface TamaguiCustomConfig {}\n\nexport interface TamaguiConfig\n extends Omit<GenericTamaguiConfig, keyof TamaguiCustomConfig>,\n TamaguiCustomConfig {}\n\nexport type CreateTamaguiConfig<\n A extends GenericTokens,\n B extends GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = {\n fonts: RemoveLanguagePostfixes<F>\n fontLanguages: GetLanguagePostfixes<F> extends never ? string[] : GetLanguagePostfixes<F>[]\n tokens: A\n // parsed\n themes: {\n [Name in keyof B]: {\n [Key in keyof B[Name]]: Variable\n }\n }\n shorthands: C\n media: D\n animations: AnimationDriver<E>\n}\n\ntype GetLanguagePostfix<Set> = Set extends string\n ? Set extends `${string}_${infer Postfix}`\n ? Postfix\n : never\n : never\n\ntype OmitLanguagePostfix<Set> = Set extends string\n ? Set extends `${infer Prefix}_${string}`\n ? Prefix\n : Set\n : never\n\ntype RemoveLanguagePostfixes<F extends GenericFonts> = {\n [Key in OmitLanguagePostfix<keyof F>]: F[Key]\n}\n\ntype GetLanguagePostfixes<F extends GenericFonts> = GetLanguagePostfix<keyof F>\n\n// test RemoveLanguagePostfixes\n// type x = CreateTamaguiConfig<any, any, any, any, any, {\n// body: any,\n// body_en: any\n// }>['fonts']\n\ntype ConfProps<\n A extends GenericTokens,\n B extends GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = {\n tokens: A\n themes: B\n shorthands?: C\n media?: D\n animations?: AnimationDriver<E>\n fonts: F\n}\n\nexport type InferTamaguiConfig<Conf> = Conf extends ConfProps<\n infer A,\n infer B,\n infer C,\n infer D,\n infer E,\n infer F\n>\n ? TamaguiInternalConfig<A, B, C, D, E, F>\n : unknown\n\n// for use in creation functions so it doesnt get overwrtitten\nexport type GenericTamaguiConfig = CreateTamaguiConfig<\n GenericTokens,\n GenericThemes,\n GenericShorthands,\n GenericMedia,\n GenericAnimations,\n GenericFonts\n>\n\n// since TamaguiConfig will be re-declared, these will all be typed globally\nexport type ThemeDefinition = TamaguiConfig['themes'][keyof TamaguiConfig['themes']]\nexport type ThemeKeys = keyof ThemeDefinition\nexport type ThemeParsed = {\n [key in ThemeKeys]: Variable<any>\n}\nexport type Tokens = TamaguiConfig['tokens']\nexport type Shorthands = TamaguiConfig['shorthands']\nexport type Media = TamaguiConfig['media']\nexport type Themes = TamaguiConfig['themes']\nexport type ThemeName = Exclude<GetAltThemeNames<keyof Themes>, number>\nexport type ThemeTokens = `$${ThemeKeys}`\nexport type AnimationKeys = TamaguiConfig['animations'] extends AnimationDriver<infer Config>\n ? keyof Config\n : string\nexport type FontLanguages = ArrayIntersection<TamaguiConfig['fontLanguages']>\n\nexport interface ThemeProps {\n className?: string\n disableThemeClass?: boolean\n name?: Exclude<ThemeName, number> | null\n componentName?: string\n children?: any\n reset?: boolean\n debug?: boolean | 'verbose'\n inverse?: boolean\n}\n\ntype ArrayIntersection<A extends any[]> = A[keyof A]\n\ntype GetAltThemeNames<S> = (S extends `${string}_${infer Alt}` ? GetAltThemeNames<Alt> : S) | S\n\ntype SpacerPropsBase = {\n size?: number | SpaceTokens | null\n flex?: boolean | number\n direction?: SpaceDirection\n}\ntype SpacerOwnProps = SpacerPropsBase &\n //\n WithThemeShorthandsPseudosMediaAnimation<SpacerPropsBase>\n\nexport type SpacerProps = Omit<StackProps, 'flex' | 'direction' | 'size'> &\n //\n SpacerOwnProps\n\nexport type CreateTamaguiProps = {\n reactNative?: any\n shorthands?: CreateShorthands\n media?: GenericTamaguiConfig['media']\n animations?: AnimationDriver<any>\n fonts: GenericTamaguiConfig['fonts']\n tokens: GenericTamaguiConfig['tokens']\n themes: {\n [key: string]: {\n [key: string]: string | number | Variable\n }\n }\n\n /**\n * *Advanced use case* For all CSS extracted views, this has no effect.\n *\n * For SSR compatibility on the web, Tamagui will render once with the settings\n * from `mediaQueryDefaultActive` set for all media queries. Then, it will render\n * again after the initial render using the proper media query values. This is so that\n * hydration will match perfectly with the server.\n *\n * Setting disableSSR will avoid this second render by setting the media query state\n * to the actual browser dimensions on initial load. This is only useful for client-only\n * apps.\n *\n */\n disableSSR?: boolean\n\n /**\n * Disable inserting a theme class in the DOM or context, allowing you to manually place it higher.\n * For custom use cases like integration with next-theme.\n */\n disableRootThemeClass?: boolean\n\n defaultProps?: Record<string, any> & {\n Stack?: StackProps\n Text?: TextProps\n Spacer?: SpacerProps\n }\n\n // for the first render, determines which media queries are true\n // useful for SSR\n mediaQueryDefaultActive?: Record<MediaQueryKey, boolean>\n\n // what's between each CSS style rule, set to \"\\n\" to be easier to read\n // defaults: \"\\n\" when NODE_ENV=development, \"\" otherwise\n cssStyleSeparator?: string\n\n // (Advanced)\n // on the web, tamagui treats `dark` and `light` themes as special and\n // generates extra CSS to avoid having to re-render the entire page.\n // this CSS relies on specificity hacks that multiply by your sub-themes.\n // this sets the maxiumum number of nested dark/light themes you can do\n // defaults to 3 for a balance, but can be higher if you nest them deeply.\n maxDarkLightNesting?: number\n\n // adds @media(prefers-color-scheme) media queries for dark/light\n shouldAddPrefersColorThemes?: boolean\n\n // only if you put the theme classname on the html element we have to generate diff\n themeClassNameOnRoot?: boolean\n}\n\n// this is the config generated via createTamagui()\nexport type TamaguiInternalConfig<\n A extends GenericTokens = GenericTokens,\n B extends GenericThemes = GenericThemes,\n C extends GenericShorthands = GenericShorthands,\n D extends GenericMedia = GenericMedia,\n E extends GenericAnimations = GenericAnimations,\n F extends GenericFonts = GenericFonts\n> = Omit<CreateTamaguiProps, keyof GenericTamaguiConfig> &\n CreateTamaguiConfig<A, B, C, D, E, F> & {\n // TODO need to make it this but this breaks types, revisit\n // animations: E //AnimationDriver<E>\n // with $ prefixes for fast lookups (one time cost at startup vs every render)\n tokensParsed: CreateTokens<Variable>\n themeConfig: any\n fontsParsed: GenericFonts\n getCSS: () => string\n parsed: boolean\n inverseShorthands: Record<string, string>\n reactNative?: any\n }\n\nexport type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']\n\n// prevents const intersections from being clobbered into string, keeping the consts\nexport type UnionableString = string & {}\nexport type UnionableNumber = number & {}\nexport type PropTypes<A extends TamaguiComponent> = A extends FunctionComponent<infer Props>\n ? Props\n : unknown\n\nexport type GenericFont<Key extends number | string = number | string> = {\n size: { [key in Key]: number | Variable }\n lineHeight: Partial<{ [key in Key]: number | Variable }>\n letterSpacing: Partial<{ [key in Key]: number | Variable }>\n weight: Partial<{ [key in Key]: number | string | Variable }>\n family: string | Variable\n style?: Partial<{ [key in Key]: TextStyle['fontStyle'] | Variable }>\n transform?: Partial<{ [key in Key]: TextStyle['textTransform'] | Variable }>\n color?: Partial<{ [key in Key]: string | Variable }>\n // for native use only, lets you map to alternative fonts\n face?: Partial<{ [key in FontWeightSteps]: { normal?: string; italic?: string } }>\n}\n\n// media\nexport type MediaQueryObject = { [key: string]: string | number | string }\nexport type MediaQueryKey = keyof Media\nexport type MediaPropKeys = `$${MediaQueryKey}`\nexport type MediaQueryState = { [key in MediaPropKeys]: boolean }\nexport type MediaProps<A> = {\n [key in MediaPropKeys]?: A\n}\nexport type MediaQueries = {\n [key in MediaQueryKey]: MediaQueryObject\n}\n\nexport type TransformStyleProps = {\n x?: number\n y?: number\n perspective?: number\n scale?: number\n scaleX?: number\n scaleY?: number\n skewX?: string\n skewY?: string\n matrix?: number[]\n rotate?: string\n rotateY?: string\n rotateX?: string\n rotateZ?: string\n}\n\n// createComponent props helpers\n\n// animation=\"bouncy\"\n// animation={['bouncy', { }]}\n// { all: 'name' }\n\n// TODO can override for better types\nexport type AnimationConfigType = any\n\nexport type AnimationProp =\n | AnimationKeys\n | {\n [key: string]:\n | AnimationKeys\n | {\n type: AnimationKeys\n [key: string]: any\n }\n }\n | [\n AnimationKeys,\n {\n [key: string]:\n | AnimationKeys\n | {\n type?: AnimationKeys\n [key: string]: any\n }\n }\n ]\n\ntype GetTokenFontKeysFor<\n A extends\n | 'size'\n | 'weight'\n | 'letterSpacing'\n | 'family'\n | 'lineHeight'\n | 'transform'\n | 'style'\n | 'color'\n> = keyof TamaguiConfig['fonts']['body'][A]\n\ntype GetTokenString<A> = A extends string | number ? `$${A}` : `$${string}`\n\n// base tokens\nexport type SizeTokens = GetTokenString<keyof Tokens['size']> | number\nexport type SpaceTokens = GetTokenString<keyof Tokens['space']> | number | boolean\nexport type ColorTokens =\n | GetTokenString<keyof Tokens['color']>\n | GetTokenString<keyof ThemeParsed>\n | CSSColorNames\nexport type ZIndexTokens = GetTokenString<keyof Tokens['zIndex']> | number\nexport type RadiusTokens = GetTokenString<keyof Tokens['radius']> | number\n\n// font tokens\nexport type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>\nexport type FontSizeTokens = GetTokenString<GetTokenFontKeysFor<'size'>> | number\nexport type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}` | number\nexport type FontWeightSteps = `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`\nexport type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}` | FontWeightSteps\nexport type FontColorTokens = `$${GetTokenFontKeysFor<'color'>}` | number\nexport type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}` | number\nexport type FontStyleTokens = `$${GetTokenFontKeysFor<'style'>}` | TextStyle['fontStyle']\nexport type FontTransformTokens =\n | `$${GetTokenFontKeysFor<'transform'>}`\n | TextStyle['textTransform']\n\n//\n// adds theme short values to relevant props\n//\n\nexport type ThemeValueByCategory<K extends string | number | symbol> = K extends 'theme'\n ? ThemeTokens\n : K extends 'size'\n ? SizeTokens\n : K extends 'font'\n ? FontTokens\n : K extends 'fontSize'\n ? FontSizeTokens\n : K extends 'space'\n ? SpaceTokens\n : K extends 'color'\n ? ColorTokens\n : K extends 'zIndex'\n ? ZIndexTokens\n : K extends 'lineHeight'\n ? FontLineHeightTokens\n : K extends 'fontWeight'\n ? FontWeightTokens\n : K extends 'letterSpacing'\n ? FontLetterSpacingTokens\n : {}\n\ntype FontKeys = 'fontFamily'\ntype FontSizeKeys = 'fontSize'\ntype FontWeightKeys = 'fontWeight'\ntype FontLetterSpacingKeys = 'letterSpacing'\ntype LineHeightKeys = 'lineHeight'\ntype ZIndexKeys = 'zIndex'\n\nexport type ThemeValueGet<K extends string | number | symbol> = K extends 'theme'\n ? ThemeTokens\n : K extends SizeKeys\n ? SizeTokens\n : K extends FontKeys\n ? FontTokens\n : K extends FontSizeKeys\n ? FontSizeTokens\n : K extends `${`border${string | ''}Radius`}`\n ? RadiusTokens\n : K extends SpaceKeys\n ? K extends 'shadowOffset'\n ? { width: SpaceTokens; height: SpaceTokens }\n : SpaceTokens\n : K extends ColorKeys\n ? ColorTokens\n : K extends ZIndexKeys\n ? ZIndexTokens\n : K extends LineHeightKeys\n ? FontLineHeightTokens\n : K extends FontWeightKeys\n ? FontWeightTokens\n : K extends FontLetterSpacingKeys\n ? FontLetterSpacingTokens\n : never\n\nexport type ThemeValueFallback = UnionableString | Variable\n\nexport type WithThemeValues<T extends object> = {\n [K in keyof T]: ThemeValueGet<K> extends never\n ? T[K]\n : ThemeValueGet<K> | Exclude<T[K], string> | ThemeValueFallback\n}\n\n// adds shorthand props\nexport type WithShorthands<StyleProps> = {\n [Key in keyof Shorthands]?: Shorthands[Key] extends keyof StyleProps\n ? StyleProps[Shorthands[Key]] | null\n : undefined\n}\n\n// adds pseudo props\nexport type PseudoProps<A> = {\n hoverStyle?: A | null\n pressStyle?: A | null\n focusStyle?: A | null\n exitStyle?: A | null\n enterStyle?: A | null\n}\n\nexport type PseudoPropKeys = keyof PseudoProps<any>\n\nexport type PseudoStyles = {\n hoverStyle?: ViewStyle\n pressStyle?: ViewStyle\n focusStyle?: ViewStyle\n enterStyle?: ViewStyle\n exitStyle?: ViewStyle\n}\n\n//\n// add both theme and shorthands\n//\ntype WithThemeAndShorthands<A extends object> = WithThemeValues<A> &\n WithShorthands<WithThemeValues<A>>\n\n//\n// combines all of theme, shorthands, pseudos...\n//\ntype WithThemeShorthandsAndPseudos<A extends object> =\n | WithThemeAndShorthands<A> & PseudoProps<WithThemeAndShorthands<A>>\n\n//\n// ... media queries and animations\n//\ntype WithThemeShorthandsPseudosMediaAnimation<A extends object> = WithThemeShorthandsAndPseudos<A> &\n MediaProps<WithThemeShorthandsAndPseudos<A>>\n\n/**\n * Base style-only props (no media, pseudo):\n */\n\ntype StylePropsWebOnly = {\n // we make this a style prop as it is on web\n pointerEvents?: ViewProps['pointerEvents']\n // WEB ONLY\n cursor?: Properties['cursor']\n // WEB ONLY\n contain?: Properties['contain']\n // WEB ONLY values: inherit, inline, block, content\n display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex'\n // WEB ONLY\n userSelect?: Properties['userSelect']\n}\n\nexport type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> &\n TransformStyleProps &\n StylePropsWebOnly\n\nexport type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> &\n TransformStyleProps &\n StylePropsWebOnly & {\n ellipse?: boolean\n selectable?: boolean\n textDecorationDistance?: number\n textOverflow?: Properties['textOverflow']\n whiteSpace?: Properties['whiteSpace']\n wordWrap?: Properties['wordWrap']\n }\n\n//\n// Stack\n//\n\nexport type StackNonStyleProps = Omit<ViewProps, 'display' | 'children'> &\n RNWViewProps &\n TamaguiComponentPropsBase\n\nexport type StackStyleProps = WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>\nexport type StackPropsBase = StackNonStyleProps & WithThemeAndShorthands<StackStylePropsBase>\nexport type StackProps = StackNonStyleProps & StackStyleProps\n\n//\n// Text props\n//\n\nexport type TextNonStyleProps = Omit<ReactTextProps, 'children'> &\n RNWTextProps &\n TamaguiComponentPropsBase\n\nexport type TextPropsBase = TextNonStyleProps & WithThemeAndShorthands<TextStylePropsBase>\nexport type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>\nexport type TextProps = TextNonStyleProps & TextStyleProps\n\n// could actually infer from parent\nexport type ViewOrTextProps = WithThemeShorthandsPseudosMediaAnimation<\n Omit<TextStylePropsBase, keyof StackStylePropsBase> & StackStylePropsBase\n>\n\n//\n// StaticComponent\n//\n\nexport type TamaguiComponent<\n Props = any,\n Ref = any,\n BaseProps = {},\n VariantProps = {}\n> = ReactComponentWithRef<Props, Ref> & StaticComponentObject\n\ntype StaticComponentObject = {\n staticConfig: StaticConfig\n /*\n * Only needed for more complex components\n * If you create a styled frame component this is a HoC to extract\n * styles from all parents.\n */\n extractable: <X>(a: X, opts?: Partial<StaticConfig>) => X\n}\n\nexport type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {\n config: TamaguiInternalConfig\n disableInjectCSS?: boolean\n children?: ReactNode\n}\n\nexport type PropMapper = (\n key: string,\n value: any,\n theme: ThemeParsed,\n props: Record<string, any>,\n state: Partial<SplitStyleState>,\n languageContext?: FontLanguageProps,\n avoidDefaultProps?: boolean,\n debug?: DebugProp\n) => undefined | [string, any][]\n\nexport type StaticConfigParsed = StaticConfig & {\n parsed: true\n propMapper: PropMapper\n variantsParsed?: {\n [key: string]: {\n [key: string]: any\n }\n }\n}\n\nexport type GenericVariantDefinitions = {\n [key: string]: {\n [key: string]:\n | ((a: any, b: any) => any)\n | {\n [key: string]: any\n }\n }\n}\n\nexport type StaticConfigPublic = {\n /**\n * (compiler) If you need to pass context or something, prevents from ever\n * flattening. The 'jsx' option means it will never flatten. if you\n * pass JSX as a children (if its purely string, it will still flatten).\n */\n neverFlatten?: boolean | 'jsx'\n\n /**\n * Determines ultimate output tag (Text vs View)\n */\n isText?: boolean\n\n /**\n * Which style keys are allowed to be extracted.\n */\n validStyles?: { [key: string]: boolean }\n\n /**\n * (compiler) If these props are encountered, bail on all optimization.\n */\n deoptProps?: Set<string>\n\n /**\n * (compiler) If these props are encountered, leave them un-extracted.\n */\n inlineProps?: Set<string>\n\n /**\n * (compiler) If not flattening, leave this prop as original value.\n * Only applies to style attributes\n */\n inlineWhenUnflattened?: Set<string>\n\n /**\n * (compiler) A bit odd, only for more advanced heirarchies.\n * Indicates that the component will set this prop so the\n * static extraction can ensure it sets them to ={undefined}\n * so they get overriddent. In the future, this can be smarter.\n */\n ensureOverriddenProp?: { [key: string]: boolean }\n\n /**\n * Auto-detected, but can ovverride. Wraps children to space them on top\n */\n isZStack?: boolean\n\n /**\n * Auto-detect, but can override, passes styles properly to react-native-web\n */\n isReactNative?: boolean\n\n /**\n * By default if styled() doesn't recognize a parent Tamagui compoent or specific react-native views,\n * it will assume the passed in component only accepts style={} for react-native compatibility.\n * Setting `acceptsClassName: true` indicates Tamagui can pass in className props.\n */\n acceptsClassName?: boolean\n}\n\nexport type StaticConfig = StaticConfigPublic & {\n Component?: FunctionComponent<any> & StaticComponentObject\n\n variants?: GenericVariantDefinitions\n\n /**\n * Used for applying sub theme style\n */\n componentName?: string\n\n /**\n * Same as React.defaultProps, be sure to sync\n */\n defaultProps: Record<string, any>\n\n /**\n * Merges into defaultProps later on, used internally yonly\n */\n defaultVariants?: { [key: string]: any }\n\n /**\n * Memoize the component\n */\n memo?: boolean\n\n /**\n * Used insternally to attach default props to names\n */\n parentNames?: string[]\n\n /**\n * By default if styled() doesn't recognize a parent Tamagui compoent or specific react-native views,\n * it will assume the passed in component only accepts style={} for react-native compatibility.\n * Setting `acceptsClassName: true` indicates Tamagui can pass in className props.\n */\n acceptsClassName?: boolean\n\n /**\n * Used internally for handling focus\n */\n isInput?: boolean\n}\n\n/**\n * --------------------------------------------\n * variants\n * --------------------------------------------\n */\n\nexport type StylableComponent =\n | TamaguiComponent\n // * excessively deep type instantiation\n // | TamaguiReactElement\n | ComponentType<any>\n | ForwardRefExoticComponent<any>\n | ReactComponentWithRef<any, any>\n | (new (props: any) => any)\n | typeof View\n | typeof Text\n | typeof TextInput\n | typeof Image\n\nexport type GetStyledVariants<A extends TamaguiComponent> = A extends TamaguiComponent<\n any,\n any,\n any,\n infer Variants\n>\n ? Variants\n : never\n\nexport type GetBaseProps<A extends StylableComponent> = A extends TamaguiComponent<\n any,\n any,\n infer BaseProps\n>\n ? BaseProps\n : never\n\nexport type GetProps<A extends StylableComponent> = A extends TamaguiComponent<infer Props>\n ? Props\n : A extends TamaguiReactElement<infer Props>\n ? Props\n : A extends ComponentType<infer Props>\n ? GetGenericComponentTamaguiProps<Props>\n : A extends new (props: infer Props) => any\n ? GetGenericComponentTamaguiProps<Props>\n : {}\n\ntype GetGenericComponentTamaguiProps<P> = P &\n Omit<'textAlign' extends keyof P ? TextProps : StackProps, keyof P>\n\nexport type SpreadKeys =\n | '...fontSize'\n | '...fontStyle'\n | '...fontTransform'\n | '...lineHeight'\n | '...letterSpacing'\n | '...size'\n | '...space'\n | '...color'\n | '...zIndex'\n | '...theme'\n | '...radius'\n\nexport type VariantDefinitions<\n Parent extends StylableComponent = TamaguiComponent,\n MyProps extends Object = GetProps<Parent>,\n Val = any\n> = VariantDefinitionFromProps<MyProps, Val>\n\nexport type VariantDefinitionFromProps<MyProps, Val> = MyProps extends Object\n ? {\n [propName: string]:\n | VariantSpreadFunction<MyProps, Val>\n | ({\n [Key in SpreadKeys]?: Key extends '...fontSize'\n ? FontSizeVariantSpreadFunction<MyProps>\n : Key extends '...size'\n ? SizeVariantSpreadFunction<MyProps>\n : Key extends '...space'\n ? SpaceVariantSpreadFunction<MyProps>\n : Key extends '...color'\n ? ColorVariantSpreadFunction<MyProps>\n : Key extends '...lineHeight'\n ? FontLineHeightVariantSpreadFunction<MyProps>\n : Key extends '...fontTransform'\n ? FontTransformVariantSpreadFunction<MyProps>\n : Key extends '...fontStyle'\n ? FontStyleVariantSpreadFunction<MyProps>\n : Key extends '...letterSpacing'\n ? FontLetterSpacingVariantSpreadFunction<MyProps>\n : Key extends '...zIndex'\n ? ZIndexVariantSpreadFunction<MyProps>\n : Key extends '...radius'\n ? RadiusVariantSpreadFunction<MyProps>\n : Key extends '...theme'\n ? ThemeVariantSpreadFunction<MyProps>\n : never\n } & {\n [Key in string | number | 'true' | 'false']?:\n | MyProps\n | VariantSpreadFunction<MyProps, Val>\n } & {\n [Key in VariantTypeKeys]?: Key extends ':number'\n ? VariantSpreadFunction<MyProps, number>\n : Key extends ':boolean'\n ? VariantSpreadFunction<MyProps, boolean>\n : Key extends ':string'\n ? VariantSpreadFunction<MyProps, string>\n : never\n })\n }\n : never\n\nexport type GenericStackVariants = VariantDefinitionFromProps<StackProps, any>\nexport type GenericTextVariants = VariantDefinitionFromProps<StackProps, any>\n\nexport type GetVariantProps<Variants> = {\n [Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val>\n ? Val\n : GetVariantValues<keyof Variants[Key]>\n}\n\nexport type VariantSpreadExtras<Props> = {\n fonts: TamaguiConfig['fonts']\n tokens: TamaguiConfig['tokens']\n theme: Themes extends { [key: string]: infer B } ? B : unknown\n props: Props\n}\n\ntype PropLike = { [key: string]: any }\n\nexport type VariantSpreadFunction<Props extends PropLike, Val = any> = (\n val: Val,\n config: VariantSpreadExtras<Props>\n) =>\n | {\n [Key in keyof Props]: Props[Key] | Variable\n }\n | null\n | undefined\n\nexport type VariantTypeKeys = ':string' | ':boolean' | ':number'\n\nexport type GetVariantValues<Key> = Key extends `...${infer VariantSpread}`\n ? ThemeValueByCategory<VariantSpread>\n : Key extends 'true' | 'false'\n ? boolean\n : Key extends ':string'\n ? string\n : Key extends ':boolean'\n ? boolean\n : Key extends ':number'\n ? number\n : Key\n\nexport type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontSizeTokens\n>\nexport type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SizeTokens>\nexport type SpaceVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SpaceTokens>\nexport type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>\nexport type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontLineHeightTokens\n>\nexport type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontLetterSpacingTokens\n>\nexport type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontStyleTokens\n>\nexport type FontTransformVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<\n A,\n FontTransformTokens\n>\nexport type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>\nexport type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, RadiusTokens>\nexport type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>\n\n/**\n * --------------------------------------------\n * end variants\n * --------------------------------------------\n */\n\ntype SizeKeys =\n | 'width'\n | 'height'\n | 'minWidth'\n | 'minHeight'\n | 'maxWidth'\n | 'maxHeight'\n | 'shadowRadius'\n\ntype ColorKeys =\n | 'color'\n | 'backgroundColor'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderTopColor'\n | 'borderLeftColor'\n | 'borderRightColor'\n | 'shadowColor'\n | 'textShadowColor'\n\ntype SpaceKeys =\n | 'space'\n | 'padding'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingLeft'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingEnd'\n | 'paddingStart'\n | 'margin'\n | 'marginHorizontal'\n | 'marginVertical'\n | 'marginLeft'\n | 'marginTop'\n | 'marginBottom'\n | 'marginLeft'\n | 'marginRight'\n | 'marginEnd'\n | 'marginStart'\n | 'x'\n | 'y'\n | 'scale'\n | 'scaleX'\n | 'scaleY'\n | 'borderTopEndRadius'\n | 'borderTopLeftRadius'\n | 'borderTopRightRadius'\n | 'borderTopStartRadius'\n | 'borderBottomEndRadius'\n | 'borderBottomLeftRadius'\n | 'borderBottomRightRadius'\n | 'borderBottomStartRadius'\n | 'borderBottomWidth'\n | 'borderLeftWidth'\n | 'borderRadius'\n | 'borderRightWidth'\n | 'borderTopEndRadius'\n | 'borderTopLeftRadius'\n | 'borderTopRightRadius'\n | 'borderEndWidth'\n | 'borderStartWidth'\n | 'borderTopStartRadius'\n | 'borderTopWidth'\n | 'borderWidth'\n | 'left'\n | 'top'\n | 'right'\n | 'bottom'\n | 'shadowOffset'\n\ntype CSSColorNames =\n | 'aliceblue'\n | 'antiquewhite'\n | 'aqua'\n | 'aquamarine'\n | 'azure'\n | 'beige'\n | 'bisque'\n | 'black'\n | 'blanchedalmond'\n | 'blue'\n | 'blueviolet'\n | 'brown'\n | 'burlywood'\n | 'cadetblue'\n | 'chartreuse'\n | 'chocolate'\n | 'coral'\n | 'cornflowerblue'\n | 'cornsilk'\n | 'crimson'\n | 'cyan'\n | 'darkblue'\n | 'darkcyan'\n | 'darkgoldenrod'\n | 'darkgray'\n | 'darkgreen'\n | 'darkkhaki'\n | 'darkmagenta'\n | 'darkolivegreen'\n | 'darkorange'\n | 'darkorchid'\n | 'darkred'\n | 'darksalmon'\n | 'darkseagreen'\n | 'darkslateblue'\n | 'darkslategray'\n | 'darkturquoise'\n | 'darkviolet'\n | 'deeppink'\n | 'deepskyblue'\n | 'dimgray'\n | 'dodgerblue'\n | 'firebrick'\n | 'floralwhite'\n | 'forestgreen'\n | 'fuchsia'\n | 'gainsboro'\n | 'ghostwhite'\n | 'gold'\n | 'goldenrod'\n | 'gray'\n | 'green'\n | 'greenyellow'\n | 'honeydew'\n | 'hotpink'\n | 'indianred '\n | 'indigo '\n | 'ivory'\n | 'khaki'\n | 'lavender'\n | 'lavenderblush'\n | 'lawngreen'\n | 'lemonchiffon'\n | 'lightblue'\n | 'lightcoral'\n | 'lightcyan'\n | 'lightgoldenrodyellow'\n | 'lightgrey'\n | 'lightgreen'\n | 'lightpink'\n | 'lightsalmon'\n | 'lightseagreen'\n | 'lightskyblue'\n | 'lightslategray'\n | 'lightsteelblue'\n | 'lightyellow'\n | 'lime'\n | 'limegreen'\n | 'linen'\n | 'magenta'\n | 'maroon'\n | 'mediumaquamarine'\n | 'mediumblue'\n | 'mediumorchid'\n | 'mediumpurple'\n | 'mediumseagreen'\n | 'mediumslateblue'\n | 'mediumspringgreen'\n | 'mediumturquoise'\n | 'mediumvioletred'\n | 'midnightblue'\n | 'mintcream'\n | 'mistyrose'\n | 'moccasin'\n | 'navajowhite'\n | 'navy'\n | 'oldlace'\n | 'olive'\n | 'olivedrab'\n | 'orange'\n | 'orangered'\n | 'orchid'\n | 'palegoldenrod'\n | 'palegreen'\n | 'paleturquoise'\n | 'palevioletred'\n | 'papayawhip'\n | 'peachpuff'\n | 'peru'\n | 'pink'\n | 'plum'\n | 'powderblue'\n | 'purple'\n | 'red'\n | 'rosybrown'\n | 'royalblue'\n | 'saddlebrown'\n | 'salmon'\n | 'sandybrown'\n | 'seagreen'\n | 'seashell'\n | 'sienna'\n | 'silver'\n | 'skyblue'\n | 'slateblue'\n | 'slategray'\n | 'snow'\n | 'springgreen'\n | 'steelblue'\n | 'tan'\n | 'teal'\n | 'thistle'\n | 'tomato'\n | 'turquoise'\n | 'violet'\n | 'wheat'\n | 'white'\n | 'whitesmoke'\n | 'yellow'\n | 'yellowgreen'\n\nexport type TamaguiComponentState = {\n hover: boolean\n press: boolean\n pressIn: boolean\n focus: boolean\n unmounted: boolean\n mediaState?: null | Record<string, boolean>\n animation?: null | {\n style?: any\n avoidClasses?: boolean\n }\n}\n\nexport type SplitStyleState = TamaguiComponentState & {\n noClassNames?: boolean\n dynamicStylesInline?: boolean\n resolveVariablesAs?: ResolveVariableTypes\n fallbackProps?: Record<string, any>\n keepVariantsAsProps?: boolean\n hasTextAncestor?: boolean\n\n // for animations\n isExiting?: boolean\n exitVariant?: string\n enterVariant?: string\n}\n\n// Presence\n\nexport interface PresenceContextProps {\n id: string\n isPresent: boolean\n register: (id: string) => () => void\n onExitComplete?: (id: string) => void\n initial?: false | string | string[]\n custom?: any\n exitVariant?: string | null\n enterVariant?: string | null\n}\n\ntype SafeToRemoveCallback = () => void\ntype AlwaysPresent = [true, null, null]\ntype Present = [true, undefined, PresenceContextProps]\ntype NotPresent = [false, SafeToRemoveCallback, PresenceContextProps]\n\nexport type UsePresenceResult = AlwaysPresent | Present | NotPresent\n\n// Animations:\n\ntype AnimationConfig = {\n [key: string]: any\n}\n\n// includes a very limited adapter between various impls for number => style\n// this is useful only in limited scenarios like `Sheet`, but necessary in those cases\n\nexport type AnimatedNumberStrategy =\n // only values shared between reanimated/react-native for now\n | {\n type: 'spring'\n stiffness?: number\n damping?: number\n mass?: number\n overshootClamping?: boolean\n restSpeedThreshold?: number\n restDisplacementThreshold?: number\n }\n | { type: 'timing'; duration: number }\n | { type: 'direct' }\n\nexport type UniversalAnimatedNumber<A> = {\n getInstance(): A\n getValue(): number\n setValue(next: number, config?: AnimatedNumberStrategy): void\n stop(): void\n}\n\nexport type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {\n isReactNative?: boolean\n useAnimations: UseAnimationHook\n usePresence: () => UsePresenceResult\n useAnimatedNumber: (initial: number) => UniversalAnimatedNumber<any>\n useAnimatedNumberStyle: <V extends UniversalAnimatedNumber<any>>(\n val: V,\n getStyle: (current: any) => any\n ) => any\n useAnimatedNumberReaction: (\n val: UniversalAnimatedNumber<any>,\n onValue: (current: number) => void\n ) => void\n animations: A\n View?: any\n Text?: any\n}\n\nexport type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any>\n\nexport type UseAnimationHook = (props: {\n style: Record<string, any>\n props: Record<string, any>\n presence?: UsePresenceResult | null\n hostRef: RefObject<HTMLElement | View>\n staticConfig: StaticConfigParsed\n state: SplitStyleState\n pseudos: PseudoProps<ViewStyle>\n onDidAnimate?: any\n delay?: number\n}) => null | {\n style?: StackStylePropsBase | StackStylePropsBase[]\n}\n\nexport type GestureReponderEvent = Exclude<View['props']['onResponderMove'], void> extends (\n event: infer Event\n) => void\n ? Event\n : never\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -15,36 +16,32 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
16
|
return to;
|
|
16
17
|
};
|
|
17
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
20
|
-
|
|
19
|
+
var updateTheme_exports = {};
|
|
20
|
+
__export(updateTheme_exports, {
|
|
21
|
+
updateTheme: () => updateTheme
|
|
21
22
|
});
|
|
22
|
-
module.exports = __toCommonJS(
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
module.exports = __toCommonJS(updateTheme_exports);
|
|
24
|
+
var import_addTheme = require("./addTheme");
|
|
25
|
+
var import_useTheme = require("./hooks/useTheme");
|
|
26
|
+
function updateTheme({
|
|
27
|
+
name,
|
|
28
|
+
theme
|
|
29
|
+
}) {
|
|
30
|
+
const next = (0, import_addTheme.addTheme)({ name, theme, insertCSS: true, update: true });
|
|
31
|
+
if (process.env.TAMAGUI_TARGET === "native") {
|
|
32
|
+
import_useTheme.activeThemeManagers.forEach((manager) => {
|
|
33
|
+
if (manager.state.name === name) {
|
|
34
|
+
manager.updateState({
|
|
35
|
+
name,
|
|
36
|
+
forceTheme: next.theme
|
|
37
|
+
});
|
|
33
38
|
}
|
|
34
|
-
}
|
|
35
|
-
return res;
|
|
39
|
+
});
|
|
36
40
|
}
|
|
37
|
-
return
|
|
41
|
+
return next;
|
|
38
42
|
}
|
|
39
|
-
const validCSS = /[a-z0-9]/i;
|
|
40
|
-
const specials = {
|
|
41
|
-
".": "dot",
|
|
42
|
-
",": "_",
|
|
43
|
-
"%": "pct",
|
|
44
|
-
"-": "neg"
|
|
45
|
-
};
|
|
46
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
47
44
|
0 && (module.exports = {
|
|
48
|
-
|
|
45
|
+
updateTheme
|
|
49
46
|
});
|
|
50
|
-
//# sourceMappingURL=
|
|
47
|
+
//# sourceMappingURL=updateTheme.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/updateTheme.ts"],
|
|
4
|
+
"sourcesContent": ["import { addTheme } from './addTheme'\nimport { activeThemeManagers } from './hooks/useTheme'\nimport { ThemeDefinition } from './types'\n\nexport function updateTheme({\n name,\n theme,\n}: {\n name: string\n theme: Partial<Record<keyof ThemeDefinition, any>>\n}) {\n const next = addTheme({ name, theme, insertCSS: true, update: true })\n\n if (process.env.TAMAGUI_TARGET === 'native') {\n activeThemeManagers.forEach((manager) => {\n if (manager.state.name === name) {\n manager.updateState({\n name,\n forceTheme: next.theme,\n })\n }\n })\n }\n\n return next\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAyB;AACzB,sBAAoC;AAG7B,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AACF,GAGG;AACD,QAAM,WAAO,0BAAS,EAAE,MAAM,OAAO,WAAW,MAAM,QAAQ,KAAK,CAAC;AAEpE,MAAI,QAAQ,IAAI,mBAAmB,UAAU;AAC3C,wCAAoB,QAAQ,CAAC,YAAY;AACvC,UAAI,QAAQ,MAAM,SAAS,MAAM;AAC/B,gBAAQ,YAAY;AAAA,UAClB;AAAA,UACA,YAAY,KAAK;AAAA,QACnB,CAAC;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -17,12 +18,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
19
|
var Pressability_exports = {};
|
|
19
20
|
__export(Pressability_exports, {
|
|
20
|
-
Pressability: () => Pressability
|
|
21
|
+
Pressability: () => Pressability,
|
|
22
|
+
usePressability: () => usePressability
|
|
21
23
|
});
|
|
22
24
|
module.exports = __toCommonJS(Pressability_exports);
|
|
23
25
|
const Pressability = {};
|
|
26
|
+
const usePressability = {};
|
|
24
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
25
28
|
0 && (module.exports = {
|
|
26
|
-
Pressability
|
|
29
|
+
Pressability,
|
|
30
|
+
usePressability
|
|
27
31
|
});
|
|
28
32
|
//# sourceMappingURL=Pressability.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/vendor/Pressability.tsx"],
|
|
4
|
+
"sourcesContent": ["export const Pressability = {} as any\nexport const usePressability = {} as Function\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,eAAe,CAAC;AACtB,MAAM,kBAAkB,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -17,12 +18,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
19
|
var Pressability_native_exports = {};
|
|
19
20
|
__export(Pressability_native_exports, {
|
|
20
|
-
Pressability: () => Pressability
|
|
21
|
+
Pressability: () => Pressability,
|
|
22
|
+
usePressability: () => usePressability
|
|
21
23
|
});
|
|
22
24
|
module.exports = __toCommonJS(Pressability_native_exports);
|
|
23
25
|
const Pressability = require("react-native/Libraries/Pressability/Pressability").default;
|
|
26
|
+
const usePressability = require("react-native/Libraries/Pressability/usePressability").default;
|
|
24
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
25
28
|
0 && (module.exports = {
|
|
26
|
-
Pressability
|
|
29
|
+
Pressability,
|
|
30
|
+
usePressability
|
|
27
31
|
});
|
|
28
32
|
//# sourceMappingURL=Pressability.native.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/vendor/Pressability.native.tsx"],
|
|
4
|
+
"sourcesContent": ["export const Pressability = require('react-native/Libraries/Pressability/Pressability').default\nexport const usePressability =\n require('react-native/Libraries/Pressability/usePressability').default\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,eAAe,QAAQ,kDAAkD,EAAE;AACjF,MAAM,kBACX,QAAQ,qDAAqD,EAAE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var FontLanguage_exports = {};
|
|
20
|
+
__export(FontLanguage_exports, {
|
|
21
|
+
FontLanguage: () => FontLanguage
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(FontLanguage_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
const FontLanguage = ({ children, ...props }) => {
|
|
26
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
27
|
+
style: {
|
|
28
|
+
display: "contents"
|
|
29
|
+
},
|
|
30
|
+
className: Object.entries(props).map(([name, language]) => `t_lang-${name}-${language}`).join(" "),
|
|
31
|
+
children
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
FontLanguage
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=FontLanguage.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/views/FontLanguage.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\n\nimport { FontLanguageProps } from './FontLanguage.types'\n\nexport const FontLanguage = ({ children, ...props }: FontLanguageProps) => {\n return (\n <div\n style={{\n display: 'contents',\n }}\n className={Object.entries(props)\n .map(([name, language]) => `t_lang-${name}-${language}`)\n .join(' ')}\n >\n {children}\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMI;AAFG,MAAM,eAAe,CAAC,EAAE,aAAa,MAAM,MAAyB;AACzE,SACE,4CAAC;AAAA,IACC,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,WAAW,OAAO,QAAQ,KAAK,EAC5B,IAAI,CAAC,CAAC,MAAM,QAAQ,MAAM,UAAU,QAAQ,UAAU,EACtD,KAAK,GAAG;AAAA,IAEV;AAAA,GACH;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var FontLanguage_native_exports = {};
|
|
20
|
+
__export(FontLanguage_native_exports, {
|
|
21
|
+
FontLanguage: () => FontLanguage
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(FontLanguage_native_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_FontLanguageContext = require("../contexts/FontLanguageContext");
|
|
27
|
+
const FontLanguage = ({ children, ...props }) => {
|
|
28
|
+
const value = (0, import_react.useMemo)(() => props, [JSON.stringify(props)]);
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_FontLanguageContext.FontLanguageContext.Provider, {
|
|
30
|
+
value,
|
|
31
|
+
children
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
FontLanguage
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=FontLanguage.native.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/views/FontLanguage.native.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react'\n\nimport { FontLanguageContext } from '../contexts/FontLanguageContext'\nimport { FontLanguageProps } from './FontLanguage.types'\n\nexport const FontLanguage = ({ children, ...props }: FontLanguageProps) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = useMemo(() => props, [JSON.stringify(props)])\n return <FontLanguageContext.Provider value={value}>{children}</FontLanguageContext.Provider>\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQS;AART,mBAA+B;AAE/B,iCAAoC;AAG7B,MAAM,eAAe,CAAC,EAAE,aAAa,MAAM,MAAyB;AAEzE,QAAM,YAAQ,sBAAQ,MAAM,OAAO,CAAC,KAAK,UAAU,KAAK,CAAC,CAAC;AAC1D,SAAO,4CAAC,+CAAoB,UAApB;AAAA,IAA6B;AAAA,IAAe;AAAA,GAAS;AAC/D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -10,9 +11,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
10
11
|
}
|
|
11
12
|
return to;
|
|
12
13
|
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var
|
|
16
|
-
module.exports = __toCommonJS(
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=nativeGestureHandler.native.js.map
|
|
15
|
+
var FontLanguage_types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(FontLanguage_types_exports);
|
|
17
|
+
//# sourceMappingURL=FontLanguage.types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/views/FontLanguage.types.ts"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\n\nimport { FontLanguages, FontTokens } from '../types'\n\ntype FontFamilies = FontTokens extends `$${infer Token}` ? Token : never\n\nexport type LanguageContextType = Partial<{\n [key in FontFamilies]: FontLanguages | 'default'\n}>\n\nexport type FontLanguageProps = LanguageContextType & {\n children?: React.ReactNode\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|