@tamagui/web 1.14.0 → 1.14.2
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 +76 -1
- package/dist/cjs/Tamagui.js.map +2 -2
- package/dist/cjs/addTheme.js +77 -2
- package/dist/cjs/addTheme.js.map +2 -2
- package/dist/cjs/config.js +122 -1
- package/dist/cjs/config.js.map +2 -2
- package/dist/cjs/constants/constants.js +48 -1
- package/dist/cjs/constants/constants.js.map +2 -2
- package/dist/cjs/constants/isDevTools.js +36 -1
- package/dist/cjs/constants/isDevTools.js.map +2 -2
- package/dist/cjs/contexts/AnimationDriverContext.js +29 -1
- package/dist/cjs/contexts/AnimationDriverContext.js.map +2 -2
- package/dist/cjs/contexts/ButtonNestingContext.js +29 -1
- package/dist/cjs/contexts/ButtonNestingContext.js.map +2 -2
- package/dist/cjs/contexts/FontLanguageContext.js +29 -1
- package/dist/cjs/contexts/FontLanguageContext.js.map +2 -2
- package/dist/cjs/contexts/TextAncestorContext.js +29 -1
- package/dist/cjs/contexts/TextAncestorContext.js.map +2 -2
- package/dist/cjs/createComponent.js +896 -2
- package/dist/cjs/createComponent.js.map +3 -3
- package/dist/cjs/createFont.js +68 -1
- package/dist/cjs/createFont.js.map +2 -2
- package/dist/cjs/createShorthands.js +30 -1
- package/dist/cjs/createShorthands.js.map +2 -2
- package/dist/cjs/createTamagui.js +202 -5
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createTheme.js +30 -1
- package/dist/cjs/createTheme.js.map +2 -2
- package/dist/cjs/createTokens.js +38 -1
- package/dist/cjs/createTokens.js.map +2 -2
- package/dist/cjs/createVariable.js +110 -1
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/createVariables.js +59 -1
- package/dist/cjs/createVariables.js.map +2 -2
- package/dist/cjs/helpers/ThemeManager.js +243 -1
- package/dist/cjs/helpers/ThemeManager.js.map +3 -3
- package/dist/cjs/helpers/ThemeManagerContext.js +29 -1
- package/dist/cjs/helpers/ThemeManagerContext.js.map +2 -2
- package/dist/cjs/helpers/createMediaStyle.js +66 -1
- package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +431 -2
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/createProxy.js +41 -2
- package/dist/cjs/helpers/createProxy.js.map +2 -2
- package/dist/cjs/helpers/defaultOffset.js +28 -1
- package/dist/cjs/helpers/defaultOffset.js.map +2 -2
- package/dist/cjs/helpers/expandStyle.js +85 -1
- package/dist/cjs/helpers/expandStyle.js.map +2 -2
- package/dist/cjs/helpers/expandStyles.js +76 -1
- package/dist/cjs/helpers/expandStyles.js.map +2 -2
- package/dist/cjs/helpers/extendStaticConfig.js +91 -1
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/getAnimationDriver.js +31 -1
- package/dist/cjs/helpers/getAnimationDriver.js.map +2 -2
- package/dist/cjs/helpers/getExpandedShorthands.js +38 -1
- package/dist/cjs/helpers/getExpandedShorthands.js.map +2 -2
- package/dist/cjs/helpers/getFontLanguage.js +28 -1
- package/dist/cjs/helpers/getFontLanguage.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +858 -3
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.js +226 -1
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.native.js +37 -1
- package/dist/cjs/helpers/getStylesAtomic.native.js.map +2 -2
- package/dist/cjs/helpers/getThemeCSSRules.js +126 -4
- package/dist/cjs/helpers/getThemeCSSRules.js.map +2 -2
- package/dist/cjs/helpers/getThemeCSSRules.native.js +30 -1
- package/dist/cjs/helpers/getThemeCSSRules.native.js.map +2 -2
- package/dist/cjs/helpers/getVariantExtras.js +91 -1
- package/dist/cjs/helpers/getVariantExtras.js.map +2 -2
- package/dist/cjs/helpers/insertStyleRule.js +222 -2
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/isObj.js +28 -1
- package/dist/cjs/helpers/isObj.js.map +2 -2
- package/dist/cjs/helpers/isTamaguiComponent.js +31 -1
- package/dist/cjs/helpers/isTamaguiComponent.js.map +2 -2
- package/dist/cjs/helpers/isTamaguiElement.js +32 -1
- package/dist/cjs/helpers/isTamaguiElement.js.map +2 -2
- package/dist/cjs/helpers/matchMedia.js +41 -1
- package/dist/cjs/helpers/matchMedia.js.map +2 -2
- package/dist/cjs/helpers/matchMedia.native.js +47 -1
- package/dist/cjs/helpers/matchMedia.native.js.map +2 -2
- package/dist/cjs/helpers/mergeProps.js +53 -1
- package/dist/cjs/helpers/mergeProps.js.map +2 -2
- package/dist/cjs/helpers/normalizeColor.js +66 -1
- package/dist/cjs/helpers/normalizeColor.js.map +2 -2
- package/dist/cjs/helpers/normalizeShadow.js +46 -1
- package/dist/cjs/helpers/normalizeShadow.js.map +2 -2
- package/dist/cjs/helpers/normalizeShadow.native.js +54 -1
- package/dist/cjs/helpers/normalizeShadow.native.js.map +2 -2
- package/dist/cjs/helpers/normalizeStylePropKeys.js +28 -1
- package/dist/cjs/helpers/normalizeStylePropKeys.js.map +2 -2
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js +39 -1
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +2 -2
- package/dist/cjs/helpers/normalizeValueWithProperty.js +125 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.js.map +2 -2
- package/dist/cjs/helpers/proxyThemeVariables.js +39 -1
- package/dist/cjs/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/cjs/helpers/pseudoDescriptors.js +52 -1
- package/dist/cjs/helpers/pseudoDescriptors.js.map +2 -2
- package/dist/cjs/helpers/registerCSSVariable.js +39 -1
- package/dist/cjs/helpers/registerCSSVariable.js.map +2 -2
- package/dist/cjs/helpers/themeable.js +61 -1
- package/dist/cjs/helpers/themeable.js.map +2 -2
- package/dist/cjs/helpers/themes.js +75 -1
- package/dist/cjs/helpers/themes.js.map +2 -2
- package/dist/cjs/helpers/timer.js +34 -1
- package/dist/cjs/helpers/timer.js.map +2 -2
- package/dist/cjs/helpers/useShallowSetState.js +58 -1
- package/dist/cjs/helpers/useShallowSetState.js.map +2 -2
- package/dist/cjs/helpers/warnOnce.js +37 -1
- package/dist/cjs/helpers/warnOnce.js.map +2 -2
- package/dist/cjs/helpers/withStaticProperties.js +32 -1
- package/dist/cjs/helpers/withStaticProperties.js.map +2 -2
- package/dist/cjs/hooks/getThemeUnwrapped.js +33 -1
- package/dist/cjs/hooks/getThemeUnwrapped.js.map +2 -2
- package/dist/cjs/hooks/useAnimationDriver.js +33 -1
- package/dist/cjs/hooks/useAnimationDriver.js.map +2 -2
- package/dist/cjs/hooks/useId.js +28 -1
- package/dist/cjs/hooks/useId.js.map +2 -2
- package/dist/cjs/hooks/useIsTouchDevice.js +32 -1
- package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/cjs/hooks/useMedia.js +264 -1
- package/dist/cjs/hooks/useMedia.js.map +2 -2
- package/dist/cjs/hooks/useSafeRef.js +58 -1
- package/dist/cjs/hooks/useSafeRef.js.map +2 -2
- package/dist/cjs/hooks/useServerHooks.js +35 -1
- package/dist/cjs/hooks/useServerHooks.js.map +2 -2
- package/dist/cjs/hooks/useStyle.js +60 -1
- package/dist/cjs/hooks/useStyle.js.map +2 -2
- package/dist/cjs/hooks/useTheme.js +276 -1
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/cjs/hooks/useThemeName.js +51 -1
- package/dist/cjs/hooks/useThemeName.js.map +2 -2
- package/dist/cjs/index.js +110 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/inject-styles.js +39 -1
- package/dist/cjs/inject-styles.js.map +2 -2
- package/dist/cjs/insertFont.js +92 -1
- package/dist/cjs/insertFont.js.map +2 -2
- package/dist/cjs/setupHooks.js +33 -1
- package/dist/cjs/setupHooks.js.map +2 -2
- package/dist/cjs/setupReactNative.js +50 -1
- package/dist/cjs/setupReactNative.js.map +2 -2
- package/dist/cjs/styled.js +93 -1
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/types.js +16 -1
- package/dist/cjs/types.js.map +2 -2
- package/dist/cjs/updateTheme.js +46 -1
- package/dist/cjs/updateTheme.js.map +2 -2
- package/dist/cjs/views/AnimationDriverProvider.js +32 -1
- package/dist/cjs/views/AnimationDriverProvider.js.map +2 -2
- package/dist/cjs/views/FontLanguage.js +40 -1
- package/dist/cjs/views/FontLanguage.js.map +2 -2
- package/dist/cjs/views/FontLanguage.native.js +34 -1
- package/dist/cjs/views/FontLanguage.native.js.map +2 -2
- package/dist/cjs/views/FontLanguage.types.js +16 -1
- package/dist/cjs/views/FontLanguage.types.js.map +2 -2
- package/dist/cjs/views/Slot.js +91 -1
- package/dist/cjs/views/Slot.js.map +2 -2
- package/dist/cjs/views/Stack.js +37 -1
- package/dist/cjs/views/Stack.js.map +2 -2
- package/dist/cjs/views/TamaguiProvider.js +90 -1
- package/dist/cjs/views/TamaguiProvider.js.map +2 -2
- package/dist/cjs/views/Text.js +95 -1
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/cjs/views/Theme.js +99 -1
- package/dist/cjs/views/Theme.js.map +3 -3
- package/dist/cjs/views/ThemeDebug.js +73 -0
- package/dist/cjs/views/ThemeDebug.js.map +7 -0
- package/dist/cjs/views/ThemeProvider.js +69 -1
- package/dist/cjs/views/ThemeProvider.js.map +2 -2
- package/dist/esm/Tamagui.js +44 -1
- package/dist/esm/Tamagui.js.map +2 -2
- package/dist/esm/Tamagui.mjs +44 -1
- package/dist/esm/Tamagui.mjs.map +2 -2
- package/dist/esm/addTheme.js +53 -2
- package/dist/esm/addTheme.js.map +2 -2
- package/dist/esm/addTheme.mjs +53 -2
- package/dist/esm/addTheme.mjs.map +2 -2
- package/dist/esm/config.js +89 -1
- package/dist/esm/config.js.map +2 -2
- package/dist/esm/config.mjs +89 -1
- package/dist/esm/config.mjs.map +2 -2
- package/dist/esm/constants/constants.js +21 -1
- package/dist/esm/constants/constants.js.map +2 -2
- package/dist/esm/constants/constants.mjs +21 -1
- package/dist/esm/constants/constants.mjs.map +2 -2
- package/dist/esm/constants/isDevTools.js +12 -1
- package/dist/esm/constants/isDevTools.js.map +2 -2
- package/dist/esm/constants/isDevTools.mjs +12 -1
- package/dist/esm/constants/isDevTools.mjs.map +2 -2
- package/dist/esm/contexts/AnimationDriverContext.js +5 -1
- package/dist/esm/contexts/AnimationDriverContext.js.map +2 -2
- package/dist/esm/contexts/AnimationDriverContext.mjs +5 -1
- package/dist/esm/contexts/AnimationDriverContext.mjs.map +2 -2
- package/dist/esm/contexts/ButtonNestingContext.js +5 -1
- package/dist/esm/contexts/ButtonNestingContext.js.map +2 -2
- package/dist/esm/contexts/ButtonNestingContext.mjs +5 -1
- package/dist/esm/contexts/ButtonNestingContext.mjs.map +2 -2
- package/dist/esm/contexts/FontLanguageContext.js +5 -1
- package/dist/esm/contexts/FontLanguageContext.js.map +2 -2
- package/dist/esm/contexts/FontLanguageContext.mjs +5 -1
- package/dist/esm/contexts/FontLanguageContext.mjs.map +2 -2
- package/dist/esm/contexts/TextAncestorContext.js +5 -1
- package/dist/esm/contexts/TextAncestorContext.js.map +2 -2
- package/dist/esm/contexts/TextAncestorContext.mjs +5 -1
- package/dist/esm/contexts/TextAncestorContext.mjs.map +2 -2
- package/dist/esm/createComponent.js +869 -2
- package/dist/esm/createComponent.js.map +3 -3
- package/dist/esm/createComponent.mjs +869 -2
- package/dist/esm/createComponent.mjs.map +3 -3
- package/dist/esm/createFont.js +44 -1
- package/dist/esm/createFont.js.map +2 -2
- package/dist/esm/createFont.mjs +44 -1
- package/dist/esm/createFont.mjs.map +2 -2
- package/dist/esm/createShorthands.js +6 -1
- package/dist/esm/createShorthands.js.map +2 -2
- package/dist/esm/createShorthands.mjs +6 -1
- package/dist/esm/createShorthands.mjs.map +2 -2
- package/dist/esm/createTamagui.js +186 -5
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createTamagui.mjs +186 -5
- package/dist/esm/createTamagui.mjs.map +2 -2
- package/dist/esm/createTheme.js +6 -1
- package/dist/esm/createTheme.js.map +2 -2
- package/dist/esm/createTheme.mjs +6 -1
- package/dist/esm/createTheme.mjs.map +2 -2
- package/dist/esm/createTokens.js +14 -1
- package/dist/esm/createTokens.js.map +2 -2
- package/dist/esm/createTokens.mjs +14 -1
- package/dist/esm/createTokens.mjs.map +2 -2
- package/dist/esm/createVariable.js +77 -1
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/createVariable.mjs +77 -1
- package/dist/esm/createVariable.mjs.map +2 -2
- package/dist/esm/createVariables.js +34 -1
- package/dist/esm/createVariables.js.map +2 -2
- package/dist/esm/createVariables.mjs +34 -1
- package/dist/esm/createVariables.mjs.map +2 -2
- package/dist/esm/helpers/ThemeManager.js +218 -1
- package/dist/esm/helpers/ThemeManager.js.map +3 -3
- package/dist/esm/helpers/ThemeManager.mjs +218 -1
- package/dist/esm/helpers/ThemeManager.mjs.map +3 -3
- package/dist/esm/helpers/ThemeManagerContext.js +5 -1
- package/dist/esm/helpers/ThemeManagerContext.js.map +2 -2
- package/dist/esm/helpers/ThemeManagerContext.mjs +5 -1
- package/dist/esm/helpers/ThemeManagerContext.mjs.map +2 -2
- package/dist/esm/helpers/createMediaStyle.js +41 -1
- package/dist/esm/helpers/createMediaStyle.js.map +2 -2
- package/dist/esm/helpers/createMediaStyle.mjs +41 -1
- package/dist/esm/helpers/createMediaStyle.mjs.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +404 -2
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.mjs +404 -2
- package/dist/esm/helpers/createPropMapper.mjs.map +2 -2
- package/dist/esm/helpers/createProxy.js +17 -2
- package/dist/esm/helpers/createProxy.js.map +2 -2
- package/dist/esm/helpers/createProxy.mjs +17 -2
- package/dist/esm/helpers/createProxy.mjs.map +2 -2
- package/dist/esm/helpers/defaultOffset.js +4 -1
- package/dist/esm/helpers/defaultOffset.js.map +2 -2
- package/dist/esm/helpers/defaultOffset.mjs +4 -1
- package/dist/esm/helpers/defaultOffset.mjs.map +2 -2
- package/dist/esm/helpers/expandStyle.js +61 -1
- package/dist/esm/helpers/expandStyle.js.map +2 -2
- package/dist/esm/helpers/expandStyle.mjs +61 -1
- package/dist/esm/helpers/expandStyle.mjs.map +2 -2
- package/dist/esm/helpers/expandStyles.js +51 -1
- package/dist/esm/helpers/expandStyles.js.map +2 -2
- package/dist/esm/helpers/expandStyles.mjs +51 -1
- package/dist/esm/helpers/expandStyles.mjs.map +2 -2
- package/dist/esm/helpers/extendStaticConfig.js +66 -1
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/extendStaticConfig.mjs +66 -1
- package/dist/esm/helpers/extendStaticConfig.mjs.map +2 -2
- package/dist/esm/helpers/getAnimationDriver.js +7 -1
- package/dist/esm/helpers/getAnimationDriver.js.map +2 -2
- package/dist/esm/helpers/getAnimationDriver.mjs +7 -1
- package/dist/esm/helpers/getAnimationDriver.mjs.map +2 -2
- package/dist/esm/helpers/getExpandedShorthands.js +14 -1
- package/dist/esm/helpers/getExpandedShorthands.js.map +2 -2
- package/dist/esm/helpers/getExpandedShorthands.mjs +14 -1
- package/dist/esm/helpers/getExpandedShorthands.mjs.map +2 -2
- package/dist/esm/helpers/getFontLanguage.js +4 -1
- package/dist/esm/helpers/getFontLanguage.js.map +2 -2
- package/dist/esm/helpers/getFontLanguage.mjs +4 -1
- package/dist/esm/helpers/getFontLanguage.mjs.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +859 -3
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.mjs +859 -3
- package/dist/esm/helpers/getSplitStyles.mjs.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.js +200 -1
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.mjs +200 -1
- package/dist/esm/helpers/getStylesAtomic.mjs.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.js +11 -1
- package/dist/esm/helpers/getStylesAtomic.native.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.mjs +11 -1
- package/dist/esm/helpers/getStylesAtomic.native.mjs.map +2 -2
- package/dist/esm/helpers/getThemeCSSRules.js +102 -4
- package/dist/esm/helpers/getThemeCSSRules.js.map +2 -2
- package/dist/esm/helpers/getThemeCSSRules.mjs +102 -4
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +2 -2
- package/dist/esm/helpers/getThemeCSSRules.native.js +6 -1
- package/dist/esm/helpers/getThemeCSSRules.native.js.map +2 -2
- package/dist/esm/helpers/getThemeCSSRules.native.mjs +6 -1
- package/dist/esm/helpers/getThemeCSSRules.native.mjs.map +2 -2
- package/dist/esm/helpers/getVariantExtras.js +66 -1
- package/dist/esm/helpers/getVariantExtras.js.map +2 -2
- package/dist/esm/helpers/getVariantExtras.mjs +66 -1
- package/dist/esm/helpers/getVariantExtras.mjs.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +190 -2
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.mjs +190 -2
- package/dist/esm/helpers/insertStyleRule.mjs.map +2 -2
- package/dist/esm/helpers/isObj.js +4 -1
- package/dist/esm/helpers/isObj.js.map +2 -2
- package/dist/esm/helpers/isObj.mjs +4 -1
- package/dist/esm/helpers/isObj.mjs.map +2 -2
- package/dist/esm/helpers/isTamaguiComponent.js +7 -1
- package/dist/esm/helpers/isTamaguiComponent.js.map +2 -2
- package/dist/esm/helpers/isTamaguiComponent.mjs +7 -1
- package/dist/esm/helpers/isTamaguiComponent.mjs.map +2 -2
- package/dist/esm/helpers/isTamaguiElement.js +8 -1
- package/dist/esm/helpers/isTamaguiElement.js.map +2 -2
- package/dist/esm/helpers/isTamaguiElement.mjs +8 -1
- package/dist/esm/helpers/isTamaguiElement.mjs.map +2 -2
- package/dist/esm/helpers/matchMedia.js +16 -1
- package/dist/esm/helpers/matchMedia.js.map +2 -2
- package/dist/esm/helpers/matchMedia.mjs +16 -1
- package/dist/esm/helpers/matchMedia.mjs.map +2 -2
- package/dist/esm/helpers/matchMedia.native.js +22 -1
- package/dist/esm/helpers/matchMedia.native.js.map +2 -2
- package/dist/esm/helpers/matchMedia.native.mjs +22 -1
- package/dist/esm/helpers/matchMedia.native.mjs.map +2 -2
- package/dist/esm/helpers/mergeProps.js +29 -1
- package/dist/esm/helpers/mergeProps.js.map +2 -2
- package/dist/esm/helpers/mergeProps.mjs +29 -1
- package/dist/esm/helpers/mergeProps.mjs.map +2 -2
- package/dist/esm/helpers/normalizeColor.js +30 -1
- package/dist/esm/helpers/normalizeColor.js.map +2 -2
- package/dist/esm/helpers/normalizeColor.mjs +30 -1
- package/dist/esm/helpers/normalizeColor.mjs.map +2 -2
- package/dist/esm/helpers/normalizeShadow.js +22 -1
- package/dist/esm/helpers/normalizeShadow.js.map +2 -2
- package/dist/esm/helpers/normalizeShadow.mjs +22 -1
- package/dist/esm/helpers/normalizeShadow.mjs.map +2 -2
- package/dist/esm/helpers/normalizeShadow.native.js +30 -1
- package/dist/esm/helpers/normalizeShadow.native.js.map +2 -2
- package/dist/esm/helpers/normalizeShadow.native.mjs +30 -1
- package/dist/esm/helpers/normalizeShadow.native.mjs.map +2 -2
- package/dist/esm/helpers/normalizeStylePropKeys.js +4 -1
- package/dist/esm/helpers/normalizeStylePropKeys.js.map +2 -2
- package/dist/esm/helpers/normalizeStylePropKeys.mjs +4 -1
- package/dist/esm/helpers/normalizeStylePropKeys.mjs.map +2 -2
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +15 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +2 -2
- package/dist/esm/helpers/normalizeStylePropKeys.native.mjs +15 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.mjs.map +2 -2
- package/dist/esm/helpers/normalizeValueWithProperty.js +100 -1
- package/dist/esm/helpers/normalizeValueWithProperty.js.map +2 -2
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +100 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +2 -2
- package/dist/esm/helpers/proxyThemeVariables.js +15 -1
- package/dist/esm/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/esm/helpers/proxyThemeVariables.mjs +15 -1
- package/dist/esm/helpers/proxyThemeVariables.mjs.map +2 -2
- package/dist/esm/helpers/pseudoDescriptors.js +28 -1
- package/dist/esm/helpers/pseudoDescriptors.js.map +2 -2
- package/dist/esm/helpers/pseudoDescriptors.mjs +28 -1
- package/dist/esm/helpers/pseudoDescriptors.mjs.map +2 -2
- package/dist/esm/helpers/registerCSSVariable.js +13 -1
- package/dist/esm/helpers/registerCSSVariable.js.map +2 -2
- package/dist/esm/helpers/registerCSSVariable.mjs +13 -1
- package/dist/esm/helpers/registerCSSVariable.mjs.map +2 -2
- package/dist/esm/helpers/themeable.js +27 -1
- package/dist/esm/helpers/themeable.js.map +2 -2
- package/dist/esm/helpers/themeable.mjs +27 -1
- package/dist/esm/helpers/themeable.mjs.map +2 -2
- package/dist/esm/helpers/themes.js +50 -1
- package/dist/esm/helpers/themes.js.map +2 -2
- package/dist/esm/helpers/themes.mjs +50 -1
- package/dist/esm/helpers/themes.mjs.map +2 -2
- package/dist/esm/helpers/timer.js +10 -1
- package/dist/esm/helpers/timer.js.map +2 -2
- package/dist/esm/helpers/timer.mjs +10 -1
- package/dist/esm/helpers/timer.mjs.map +2 -2
- package/dist/esm/helpers/useShallowSetState.js +34 -1
- package/dist/esm/helpers/useShallowSetState.js.map +2 -2
- package/dist/esm/helpers/useShallowSetState.mjs +34 -1
- package/dist/esm/helpers/useShallowSetState.mjs.map +2 -2
- package/dist/esm/helpers/warnOnce.js +13 -1
- package/dist/esm/helpers/warnOnce.js.map +2 -2
- package/dist/esm/helpers/warnOnce.mjs +13 -1
- package/dist/esm/helpers/warnOnce.mjs.map +2 -2
- package/dist/esm/helpers/withStaticProperties.js +8 -1
- package/dist/esm/helpers/withStaticProperties.js.map +2 -2
- package/dist/esm/helpers/withStaticProperties.mjs +8 -1
- package/dist/esm/helpers/withStaticProperties.mjs.map +2 -2
- package/dist/esm/hooks/getThemeUnwrapped.js +8 -1
- package/dist/esm/hooks/getThemeUnwrapped.js.map +2 -2
- package/dist/esm/hooks/getThemeUnwrapped.mjs +8 -1
- package/dist/esm/hooks/getThemeUnwrapped.mjs.map +2 -2
- package/dist/esm/hooks/useAnimationDriver.js +9 -1
- package/dist/esm/hooks/useAnimationDriver.js.map +2 -2
- package/dist/esm/hooks/useAnimationDriver.mjs +9 -1
- package/dist/esm/hooks/useAnimationDriver.mjs.map +2 -2
- package/dist/esm/hooks/useId.js +4 -1
- package/dist/esm/hooks/useId.js.map +2 -2
- package/dist/esm/hooks/useId.mjs +4 -1
- package/dist/esm/hooks/useId.mjs.map +2 -2
- package/dist/esm/hooks/useIsTouchDevice.js +8 -1
- package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/esm/hooks/useIsTouchDevice.mjs +8 -1
- package/dist/esm/hooks/useIsTouchDevice.mjs.map +2 -2
- package/dist/esm/hooks/useMedia.js +225 -1
- package/dist/esm/hooks/useMedia.js.map +2 -2
- package/dist/esm/hooks/useMedia.mjs +225 -1
- package/dist/esm/hooks/useMedia.mjs.map +2 -2
- package/dist/esm/hooks/useSafeRef.js +34 -1
- package/dist/esm/hooks/useSafeRef.js.map +2 -2
- package/dist/esm/hooks/useSafeRef.mjs +34 -1
- package/dist/esm/hooks/useSafeRef.mjs.map +2 -2
- package/dist/esm/hooks/useServerHooks.js +10 -1
- package/dist/esm/hooks/useServerHooks.js.map +2 -2
- package/dist/esm/hooks/useServerHooks.mjs +10 -1
- package/dist/esm/hooks/useServerHooks.mjs.map +2 -2
- package/dist/esm/hooks/useStyle.js +36 -1
- package/dist/esm/hooks/useStyle.js.map +2 -2
- package/dist/esm/hooks/useStyle.mjs +36 -1
- package/dist/esm/hooks/useStyle.mjs.map +2 -2
- package/dist/esm/hooks/useTheme.js +250 -1
- package/dist/esm/hooks/useTheme.js.map +2 -2
- package/dist/esm/hooks/useTheme.mjs +250 -1
- package/dist/esm/hooks/useTheme.mjs.map +2 -2
- package/dist/esm/hooks/useThemeName.js +27 -1
- package/dist/esm/hooks/useThemeName.js.map +2 -2
- package/dist/esm/hooks/useThemeName.mjs +27 -1
- package/dist/esm/hooks/useThemeName.mjs.map +2 -2
- package/dist/esm/index.js +88 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.mjs +88 -1
- package/dist/esm/index.mjs.map +2 -2
- package/dist/esm/inject-styles.js +15 -1
- package/dist/esm/inject-styles.js.map +2 -2
- package/dist/esm/inject-styles.mjs +15 -1
- package/dist/esm/inject-styles.mjs.map +2 -2
- package/dist/esm/insertFont.js +66 -1
- package/dist/esm/insertFont.js.map +2 -2
- package/dist/esm/insertFont.mjs +66 -1
- package/dist/esm/insertFont.mjs.map +2 -2
- package/dist/esm/setupHooks.js +8 -1
- package/dist/esm/setupHooks.js.map +2 -2
- package/dist/esm/setupHooks.mjs +8 -1
- package/dist/esm/setupHooks.mjs.map +2 -2
- package/dist/esm/setupReactNative.js +24 -1
- package/dist/esm/setupReactNative.js.map +2 -2
- package/dist/esm/setupReactNative.mjs +24 -1
- package/dist/esm/setupReactNative.mjs.map +2 -2
- package/dist/esm/styled.js +69 -1
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/styled.mjs +69 -1
- package/dist/esm/styled.mjs.map +2 -2
- package/dist/esm/updateTheme.js +22 -1
- package/dist/esm/updateTheme.js.map +2 -2
- package/dist/esm/updateTheme.mjs +22 -1
- package/dist/esm/updateTheme.mjs.map +2 -2
- package/dist/esm/views/AnimationDriverProvider.js +8 -1
- package/dist/esm/views/AnimationDriverProvider.js.map +2 -2
- package/dist/esm/views/AnimationDriverProvider.mjs +8 -1
- package/dist/esm/views/AnimationDriverProvider.mjs.map +2 -2
- package/dist/esm/views/FontLanguage.js +16 -1
- package/dist/esm/views/FontLanguage.js.map +2 -2
- package/dist/esm/views/FontLanguage.mjs +16 -1
- package/dist/esm/views/FontLanguage.mjs.map +2 -2
- package/dist/esm/views/FontLanguage.native.js +10 -1
- package/dist/esm/views/FontLanguage.native.js.map +2 -2
- package/dist/esm/views/FontLanguage.native.mjs +10 -1
- package/dist/esm/views/FontLanguage.native.mjs.map +2 -2
- package/dist/esm/views/Slot.js +65 -1
- package/dist/esm/views/Slot.js.map +2 -2
- package/dist/esm/views/Slot.mjs +65 -1
- package/dist/esm/views/Slot.mjs.map +2 -2
- package/dist/esm/views/Stack.js +13 -1
- package/dist/esm/views/Stack.js.map +2 -2
- package/dist/esm/views/Stack.mjs +13 -1
- package/dist/esm/views/Stack.mjs.map +2 -2
- package/dist/esm/views/TamaguiProvider.js +56 -1
- package/dist/esm/views/TamaguiProvider.js.map +2 -2
- package/dist/esm/views/TamaguiProvider.mjs +56 -1
- package/dist/esm/views/TamaguiProvider.mjs.map +2 -2
- package/dist/esm/views/Text.js +71 -1
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/esm/views/Text.mjs +71 -1
- package/dist/esm/views/Text.mjs.map +2 -2
- package/dist/esm/views/Theme.js +74 -1
- package/dist/esm/views/Theme.js.map +3 -3
- package/dist/esm/views/Theme.mjs +74 -1
- package/dist/esm/views/Theme.mjs.map +3 -3
- package/dist/esm/views/ThemeDebug.js +49 -0
- package/dist/esm/views/ThemeDebug.js.map +7 -0
- package/dist/esm/views/ThemeDebug.mjs +49 -0
- package/dist/esm/views/ThemeDebug.mjs.map +7 -0
- package/dist/esm/views/ThemeProvider.js +44 -1
- package/dist/esm/views/ThemeProvider.js.map +2 -2
- package/dist/esm/views/ThemeProvider.mjs +44 -1
- package/dist/esm/views/ThemeProvider.mjs.map +2 -2
- package/package.json +9 -9
- package/src/createComponent.tsx +7 -14
- package/src/helpers/ThemeManager.tsx +3 -3
- package/src/views/Theme.tsx +10 -20
- package/src/views/ThemeDebug.tsx +49 -0
- package/types/createComponent.d.ts.map +1 -1
- package/types/views/Theme.d.ts +3 -2
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts +9 -0
- package/types/views/ThemeDebug.d.ts.map +1 -0
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/defaultOffset.ts"],
|
|
4
4
|
"sourcesContent": ["export const defaultOffset = { height: 0, width: 0 }\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,gBAAgB,EAAE,QAAQ,GAAG,OAAO,EAAE;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,86 @@
|
|
|
1
|
-
"use strict";
|
|
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, all2) => {
|
|
7
|
+
for (var name in all2)
|
|
8
|
+
__defProp(target, name, { get: all2[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 expandStyle_exports = {};
|
|
20
|
+
__export(expandStyle_exports, {
|
|
21
|
+
expandStyle: () => expandStyle
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(expandStyle_exports);
|
|
24
|
+
var import_constants = require("@tamagui/constants");
|
|
25
|
+
var _a;
|
|
26
|
+
function expandStyle(key, value) {
|
|
27
|
+
if (process.env.TAMAGUI_TARGET === "web") {
|
|
28
|
+
if (key === "flex") {
|
|
29
|
+
return [
|
|
30
|
+
["flexGrow", value],
|
|
31
|
+
["flexShrink", 1],
|
|
32
|
+
["flexBasis", "auto"]
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
switch (key) {
|
|
36
|
+
case "textAlignVertical": {
|
|
37
|
+
return [["verticalAlign", value === "center" ? "middle" : value]];
|
|
38
|
+
}
|
|
39
|
+
case "writingDirection": {
|
|
40
|
+
return [["direction", value]];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const longKey = EXPANSIONS[key];
|
|
45
|
+
if (longKey) {
|
|
46
|
+
return longKey.map((key2) => {
|
|
47
|
+
return [key2, value];
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const all = ["Top", "Right", "Bottom", "Left"];
|
|
52
|
+
const horiz = ["Right", "Left"];
|
|
53
|
+
const vert = ["Top", "Bottom"];
|
|
54
|
+
const xy = ["X", "Y"];
|
|
55
|
+
const EXPANSIONS = {
|
|
56
|
+
borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
|
|
57
|
+
borderRadius: [
|
|
58
|
+
"TopLeftRadius",
|
|
59
|
+
"TopRightRadius",
|
|
60
|
+
"BottomRightRadius",
|
|
61
|
+
"BottomLeftRadius"
|
|
62
|
+
],
|
|
63
|
+
borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
|
|
64
|
+
margin: all,
|
|
65
|
+
marginHorizontal: horiz,
|
|
66
|
+
marginVertical: vert,
|
|
67
|
+
overscrollBehavior: xy,
|
|
68
|
+
padding: all,
|
|
69
|
+
paddingHorizontal: horiz,
|
|
70
|
+
paddingVertical: vert,
|
|
71
|
+
...import_constants.isWeb && {
|
|
72
|
+
// react-native only supports borderStyle
|
|
73
|
+
borderStyle: ["TopStyle", "RightStyle", "BottomStyle", "LeftStyle"],
|
|
74
|
+
// react-native doesn't support X / Y
|
|
75
|
+
overflow: xy
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
for (const parent in EXPANSIONS) {
|
|
79
|
+
const prefix = parent.slice(0, ((_a = /[A-Z]/.exec(parent)) == null ? void 0 : _a.index) ?? parent.length);
|
|
80
|
+
EXPANSIONS[parent] = EXPANSIONS[parent].map((k) => `${prefix}${k}`);
|
|
81
|
+
}
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
84
|
+
expandStyle
|
|
85
|
+
});
|
|
2
86
|
//# sourceMappingURL=expandStyle.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/expandStyle.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { isWeb } from '@tamagui/constants'\n\nexport function expandStyle(key: string, value: any) {\n if (process.env.TAMAGUI_TARGET === 'web') {\n if (key === 'flex') {\n return [\n ['flexGrow', value],\n ['flexShrink', 1],\n ['flexBasis', 'auto'],\n ]\n }\n\n // web only\n switch (key) {\n case 'textAlignVertical': {\n return [['verticalAlign', value === 'center' ? 'middle' : value]]\n }\n case 'writingDirection': {\n return [['direction', value]]\n }\n }\n }\n\n const longKey = EXPANSIONS[key]\n if (longKey) {\n return longKey.map((key) => {\n return [key, value]\n })\n }\n}\n\nconst all = ['Top', 'Right', 'Bottom', 'Left']\nconst horiz = ['Right', 'Left']\nconst vert = ['Top', 'Bottom']\nconst xy = ['X', 'Y']\n\nconst EXPANSIONS: Record<string, string[]> = {\n borderColor: ['TopColor', 'RightColor', 'BottomColor', 'LeftColor'],\n borderRadius: [\n 'TopLeftRadius',\n 'TopRightRadius',\n 'BottomRightRadius',\n 'BottomLeftRadius',\n ],\n borderWidth: ['TopWidth', 'RightWidth', 'BottomWidth', 'LeftWidth'],\n margin: all,\n marginHorizontal: horiz,\n marginVertical: vert,\n overscrollBehavior: xy,\n padding: all,\n paddingHorizontal: horiz,\n paddingVertical: vert,\n ...(isWeb && {\n // react-native only supports borderStyle\n borderStyle: ['TopStyle', 'RightStyle', 'BottomStyle', 'LeftStyle'],\n // react-native doesn't support X / Y\n overflow: xy,\n }),\n}\n\nfor (const parent in EXPANSIONS) {\n const prefix = parent.slice(0, /[A-Z]/.exec(parent)?.index ?? parent.length)\n EXPANSIONS[parent] = EXPANSIONS[parent].map((k) => `${prefix}${k}`)\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,uBAAsB;AALtB;AAOO,SAAS,YAAY,KAAa,OAAY;AACnD,MAAI,QAAQ,IAAI,mBAAmB,OAAO;AACxC,QAAI,QAAQ,QAAQ;AAClB,aAAO;AAAA,QACL,CAAC,YAAY,KAAK;AAAA,QAClB,CAAC,cAAc,CAAC;AAAA,QAChB,CAAC,aAAa,MAAM;AAAA,MACtB;AAAA,IACF;AAGA,YAAQ,KAAK;AAAA,MACX,KAAK,qBAAqB;AACxB,eAAO,CAAC,CAAC,iBAAiB,UAAU,WAAW,WAAW,KAAK,CAAC;AAAA,MAClE;AAAA,MACA,KAAK,oBAAoB;AACvB,eAAO,CAAC,CAAC,aAAa,KAAK,CAAC;AAAA,MAC9B;AAAA,IACF;AAAA,EACF;AAEA,QAAM,UAAU,WAAW,GAAG;AAC9B,MAAI,SAAS;AACX,WAAO,QAAQ,IAAI,CAACA,SAAQ;AAC1B,aAAO,CAACA,MAAK,KAAK;AAAA,IACpB,CAAC;AAAA,EACH;AACF;AAEA,MAAM,MAAM,CAAC,OAAO,SAAS,UAAU,MAAM;AAC7C,MAAM,QAAQ,CAAC,SAAS,MAAM;AAC9B,MAAM,OAAO,CAAC,OAAO,QAAQ;AAC7B,MAAM,KAAK,CAAC,KAAK,GAAG;AAEpB,MAAM,aAAuC;AAAA,EAC3C,aAAa,CAAC,YAAY,cAAc,eAAe,WAAW;AAAA,EAClE,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAa,CAAC,YAAY,cAAc,eAAe,WAAW;AAAA,EAClE,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,GAAI,0BAAS;AAAA;AAAA,IAEX,aAAa,CAAC,YAAY,cAAc,eAAe,WAAW;AAAA;AAAA,IAElE,UAAU;AAAA,EACZ;AACF;AAEA,WAAW,UAAU,YAAY;AAC/B,QAAM,SAAS,OAAO,MAAM,KAAG,aAAQ,KAAK,MAAM,MAAnB,mBAAsB,UAAS,OAAO,MAAM;AAC3E,aAAW,MAAM,IAAI,WAAW,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG;AACpE;",
|
|
6
|
+
"names": ["key"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,77 @@
|
|
|
1
|
-
"use strict";
|
|
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 expandStyles_exports = {};
|
|
20
|
+
__export(expandStyles_exports, {
|
|
21
|
+
expandStyles: () => expandStyles,
|
|
22
|
+
fixStyles: () => fixStyles
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(expandStyles_exports);
|
|
25
|
+
var import_constants = require("@tamagui/constants");
|
|
26
|
+
var import_config = require("../config.js");
|
|
27
|
+
var import_expandStyle = require("./expandStyle.js");
|
|
28
|
+
var import_normalizeShadow = require("./normalizeShadow");
|
|
29
|
+
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.js");
|
|
30
|
+
var import_pseudoDescriptors = require("./pseudoDescriptors.js");
|
|
31
|
+
let shorthands = null;
|
|
32
|
+
function expandStyles(style, config = (0, import_config.getConfig)()) {
|
|
33
|
+
const res = {};
|
|
34
|
+
for (let key in style) {
|
|
35
|
+
shorthands = shorthands || (config ? config.shorthands : null);
|
|
36
|
+
if (shorthands) {
|
|
37
|
+
key = shorthands[key] || key;
|
|
38
|
+
}
|
|
39
|
+
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
40
|
+
res[key] = expandStyles(style[key]);
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const val = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(style[key], key);
|
|
44
|
+
const out = (0, import_expandStyle.expandStyle)(key, val);
|
|
45
|
+
if (out) {
|
|
46
|
+
Object.assign(res, Object.fromEntries(out));
|
|
47
|
+
} else {
|
|
48
|
+
res[key] = val;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
fixStyles(res);
|
|
52
|
+
return res;
|
|
53
|
+
}
|
|
54
|
+
function fixStyles(style) {
|
|
55
|
+
if (style.shadowRadius || style.shadowColor || style.shadowOpacity || style.shadowOffset) {
|
|
56
|
+
Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
57
|
+
}
|
|
58
|
+
for (const key in borderDefaults) {
|
|
59
|
+
if (key in style && !style[borderDefaults[key]]) {
|
|
60
|
+
style[borderDefaults[key]] = "solid";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const nativeStyle = import_constants.isWeb ? null : "borderStyle";
|
|
65
|
+
const borderDefaults = {
|
|
66
|
+
borderWidth: "borderStyle",
|
|
67
|
+
borderBottomWidth: nativeStyle || "borderBottomStyle",
|
|
68
|
+
borderTopWidth: nativeStyle || "borderTopStyle",
|
|
69
|
+
borderLeftWidth: nativeStyle || "borderLeftStyle",
|
|
70
|
+
borderRightWidth: nativeStyle || "borderRightStyle"
|
|
71
|
+
};
|
|
72
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
73
|
+
0 && (module.exports = {
|
|
74
|
+
expandStyles,
|
|
75
|
+
fixStyles
|
|
76
|
+
});
|
|
2
77
|
//# sourceMappingURL=expandStyles.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/expandStyles.ts"],
|
|
4
4
|
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\n\nimport { getConfig } from '../config.js'\nimport { expandStyle } from './expandStyle.js'\nimport { normalizeShadow } from './normalizeShadow'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\nimport { pseudoDescriptors } from './pseudoDescriptors.js'\n\nlet shorthands: Record<string, string> | null = null\n\n/**\n * This is what you want to run before Object.assign() a style onto another.\n * It does the following:\n * 1. Turns user shorthands into longhands, ie px = paddingHorizontal\n * 2. Normalizes various inconsistent styles to be more consistent\n * 3. Expands react-native shorthands, ie paddingHorizontal => paddingLeft, paddingRight\n */\n\nexport function expandStyles(style: Record<string, any>, config = getConfig()) {\n const res: Record<string, any> = {}\n\n for (let key in style) {\n shorthands = shorthands || (config ? config.shorthands : null)\n if (shorthands) {\n key = shorthands[key] || key\n }\n if (key in pseudoDescriptors) {\n res[key] = expandStyles(style[key])\n continue\n }\n const val = normalizeValueWithProperty(style[key], key)\n // expand react-native shorthands\n const out = expandStyle(key, val)\n if (out) {\n Object.assign(res, Object.fromEntries(out))\n } else {\n res[key] = val\n }\n }\n\n fixStyles(res)\n\n return res\n}\n\nexport function fixStyles(style: Record<string, any>) {\n if (\n style.shadowRadius ||\n style.shadowColor ||\n style.shadowOpacity ||\n style.shadowOffset\n ) {\n Object.assign(style, normalizeShadow(style))\n }\n\n // TODO could be native-only\n // ensure border style set by default to solid\n for (const key in borderDefaults) {\n if (key in style && !style[borderDefaults[key]]) {\n style[borderDefaults[key]] = 'solid'\n }\n }\n}\n\n// native doesn't support specific border edge style\nconst nativeStyle = isWeb ? null : 'borderStyle'\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: nativeStyle || 'borderBottomStyle',\n borderTopWidth: nativeStyle || 'borderTopStyle',\n borderLeftWidth: nativeStyle || 'borderLeftStyle',\n borderRightWidth: nativeStyle || 'borderRightStyle',\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAsB;AAEtB,oBAA0B;AAC1B,yBAA4B;AAC5B,6BAAgC;AAChC,wCAA2C;AAC3C,+BAAkC;AAElC,IAAI,aAA4C;AAUzC,SAAS,aAAa,OAA4B,aAAS,yBAAU,GAAG;AAC7E,QAAM,MAA2B,CAAC;AAElC,WAAS,OAAO,OAAO;AACrB,iBAAa,eAAe,SAAS,OAAO,aAAa;AACzD,QAAI,YAAY;AACd,YAAM,WAAW,GAAG,KAAK;AAAA,IAC3B;AACA,QAAI,OAAO,4CAAmB;AAC5B,UAAI,GAAG,IAAI,aAAa,MAAM,GAAG,CAAC;AAClC;AAAA,IACF;AACA,UAAM,UAAM,8DAA2B,MAAM,GAAG,GAAG,GAAG;AAEtD,UAAM,UAAM,gCAAY,KAAK,GAAG;AAChC,QAAI,KAAK;AACP,aAAO,OAAO,KAAK,OAAO,YAAY,GAAG,CAAC;AAAA,IAC5C,OAAO;AACL,UAAI,GAAG,IAAI;AAAA,IACb;AAAA,EACF;AAEA,YAAU,GAAG;AAEb,SAAO;AACT;AAEO,SAAS,UAAU,OAA4B;AACpD,MACE,MAAM,gBACN,MAAM,eACN,MAAM,iBACN,MAAM,cACN;AACA,WAAO,OAAO,WAAO,wCAAgB,KAAK,CAAC;AAAA,EAC7C;AAIA,aAAW,OAAO,gBAAgB;AAChC,QAAI,OAAO,SAAS,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG;AAC/C,YAAM,eAAe,GAAG,CAAC,IAAI;AAAA,IAC/B;AAAA,EACF;AACF;AAGA,MAAM,cAAc,yBAAQ,OAAO;AACnC,MAAM,iBAAiB;AAAA,EACrB,aAAa;AAAA,EACb,mBAAmB,eAAe;AAAA,EAClC,gBAAgB,eAAe;AAAA,EAC/B,iBAAiB,eAAe;AAAA,EAChC,kBAAkB,eAAe;AACnC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,92 @@
|
|
|
1
|
-
"use strict";
|
|
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 extendStaticConfig_exports = {};
|
|
20
|
+
__export(extendStaticConfig_exports, {
|
|
21
|
+
extendStaticConfig: () => extendStaticConfig,
|
|
22
|
+
parseStaticConfig: () => parseStaticConfig
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(extendStaticConfig_exports);
|
|
25
|
+
var import_helpers = require("@tamagui/helpers");
|
|
26
|
+
var import_createPropMapper = require("./createPropMapper.js");
|
|
27
|
+
var import_mergeProps = require("./mergeProps.js");
|
|
28
|
+
function extendStaticConfig(config, parent) {
|
|
29
|
+
if (!(parent && "staticConfig" in parent)) {
|
|
30
|
+
return parseStaticConfig(config);
|
|
31
|
+
}
|
|
32
|
+
const parentStaticConfig = parent.staticConfig;
|
|
33
|
+
const variants = {
|
|
34
|
+
...parentStaticConfig.variants
|
|
35
|
+
};
|
|
36
|
+
if (config.variants) {
|
|
37
|
+
for (const key in config.variants) {
|
|
38
|
+
if (variants[key]) {
|
|
39
|
+
variants[key] = {
|
|
40
|
+
...variants[key],
|
|
41
|
+
...config.variants[key]
|
|
42
|
+
};
|
|
43
|
+
} else {
|
|
44
|
+
variants[key] = config.variants[key];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const parentNames = [...parentStaticConfig.parentNames || []];
|
|
49
|
+
if (parentStaticConfig.componentName) {
|
|
50
|
+
parentNames.push(parentStaticConfig.componentName);
|
|
51
|
+
}
|
|
52
|
+
const deoptProps = config.deoptProps || /* @__PURE__ */ new Set();
|
|
53
|
+
return parseStaticConfig({
|
|
54
|
+
...parentStaticConfig,
|
|
55
|
+
...config,
|
|
56
|
+
parentStaticConfig,
|
|
57
|
+
deoptProps,
|
|
58
|
+
variants,
|
|
59
|
+
parentNames,
|
|
60
|
+
validStyles: config.validStyles ? {
|
|
61
|
+
...parentStaticConfig.validStyles,
|
|
62
|
+
...config.validStyles
|
|
63
|
+
} : parentStaticConfig.validStyles || import_helpers.stylePropsView,
|
|
64
|
+
defaultProps: (0, import_mergeProps.mergeProps)(
|
|
65
|
+
{
|
|
66
|
+
...parentStaticConfig.defaultProps,
|
|
67
|
+
...parentStaticConfig.defaultVariants
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
...config.defaultProps,
|
|
71
|
+
...config.defaultVariants
|
|
72
|
+
}
|
|
73
|
+
)[0]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
const parseStaticConfig = (config) => {
|
|
77
|
+
const parsed = {
|
|
78
|
+
defaultProps: {},
|
|
79
|
+
...config,
|
|
80
|
+
parsed: true
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
...parsed,
|
|
84
|
+
propMapper: (0, import_createPropMapper.createPropMapper)(parsed)
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
88
|
+
0 && (module.exports = {
|
|
89
|
+
extendStaticConfig,
|
|
90
|
+
parseStaticConfig
|
|
91
|
+
});
|
|
2
92
|
//# sourceMappingURL=extendStaticConfig.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/extendStaticConfig.ts"],
|
|
4
4
|
"sourcesContent": ["import { stylePropsView } from '@tamagui/helpers'\n\nimport type { StaticConfig, StaticConfigParsed, StylableComponent } from '../types.js'\nimport { createPropMapper } from './createPropMapper.js'\nimport { mergeProps } from './mergeProps.js'\n\nexport function extendStaticConfig(\n config: Partial<StaticConfig>,\n parent?: StylableComponent\n) {\n if (!(parent && 'staticConfig' in parent)) {\n return parseStaticConfig(config)\n }\n\n const parentStaticConfig = parent.staticConfig as StaticConfig\n const variants = {\n ...parentStaticConfig.variants,\n }\n\n // merge variants... can we type this?\n if (config.variants) {\n for (const key in config.variants) {\n if (variants[key]) {\n variants[key] = {\n ...variants[key],\n ...config.variants[key],\n }\n } else {\n variants[key] = config.variants[key]\n }\n }\n }\n\n // include our own\n const parentNames = [...(parentStaticConfig.parentNames || [])]\n if (parentStaticConfig.componentName) {\n parentNames.push(parentStaticConfig.componentName)\n }\n\n const deoptProps = config.deoptProps || new Set<string>()\n // deoptProps.add('style')\n\n return parseStaticConfig({\n ...parentStaticConfig,\n ...config,\n parentStaticConfig,\n deoptProps,\n variants,\n parentNames,\n validStyles: config.validStyles\n ? {\n ...parentStaticConfig.validStyles,\n ...config.validStyles,\n }\n : parentStaticConfig.validStyles || stylePropsView,\n defaultProps: mergeProps(\n {\n ...parentStaticConfig.defaultProps,\n ...parentStaticConfig.defaultVariants,\n },\n {\n ...config.defaultProps,\n ...config.defaultVariants,\n }\n )[0],\n })\n}\n\nexport const parseStaticConfig = (config: Partial<StaticConfig>): StaticConfigParsed => {\n const parsed = {\n defaultProps: {},\n ...config,\n parsed: true,\n } as const\n return {\n ...parsed,\n propMapper: createPropMapper(parsed as StaticConfigParsed),\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA+B;AAG/B,8BAAiC;AACjC,wBAA2B;AAEpB,SAAS,mBACd,QACA,QACA;AACA,MAAI,EAAE,UAAU,kBAAkB,SAAS;AACzC,WAAO,kBAAkB,MAAM;AAAA,EACjC;AAEA,QAAM,qBAAqB,OAAO;AAClC,QAAM,WAAW;AAAA,IACf,GAAG,mBAAmB;AAAA,EACxB;AAGA,MAAI,OAAO,UAAU;AACnB,eAAW,OAAO,OAAO,UAAU;AACjC,UAAI,SAAS,GAAG,GAAG;AACjB,iBAAS,GAAG,IAAI;AAAA,UACd,GAAG,SAAS,GAAG;AAAA,UACf,GAAG,OAAO,SAAS,GAAG;AAAA,QACxB;AAAA,MACF,OAAO;AACL,iBAAS,GAAG,IAAI,OAAO,SAAS,GAAG;AAAA,MACrC;AAAA,IACF;AAAA,EACF;AAGA,QAAM,cAAc,CAAC,GAAI,mBAAmB,eAAe,CAAC,CAAE;AAC9D,MAAI,mBAAmB,eAAe;AACpC,gBAAY,KAAK,mBAAmB,aAAa;AAAA,EACnD;AAEA,QAAM,aAAa,OAAO,cAAc,oBAAI,IAAY;AAGxD,SAAO,kBAAkB;AAAA,IACvB,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,OAAO,cAChB;AAAA,MACE,GAAG,mBAAmB;AAAA,MACtB,GAAG,OAAO;AAAA,IACZ,IACA,mBAAmB,eAAe;AAAA,IACtC,kBAAc;AAAA,MACZ;AAAA,QACE,GAAG,mBAAmB;AAAA,QACtB,GAAG,mBAAmB;AAAA,MACxB;AAAA,MACA;AAAA,QACE,GAAG,OAAO;AAAA,QACV,GAAG,OAAO;AAAA,MACZ;AAAA,IACF,EAAE,CAAC;AAAA,EACL,CAAC;AACH;AAEO,MAAM,oBAAoB,CAAC,WAAsD;AACtF,QAAM,SAAS;AAAA,IACb,cAAc,CAAC;AAAA,IACf,GAAG;AAAA,IACH,QAAQ;AAAA,EACV;AACA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,gBAAY,0CAAiB,MAA4B;AAAA,EAC3D;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
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 getAnimationDriver_exports = {};
|
|
20
|
+
__export(getAnimationDriver_exports, {
|
|
21
|
+
getAnimationDriver: () => getAnimationDriver
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(getAnimationDriver_exports);
|
|
24
|
+
var import_config = require("../config.js");
|
|
25
|
+
function getAnimationDriver() {
|
|
26
|
+
return (0, import_config.getConfig)().animations;
|
|
27
|
+
}
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
getAnimationDriver
|
|
31
|
+
});
|
|
2
32
|
//# sourceMappingURL=getAnimationDriver.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/getAnimationDriver.tsx"],
|
|
4
4
|
"sourcesContent": ["import { getConfig } from '../config.js'\n\n/**\n * @deprecated use the `useAnimationDriver` hook instead\n */\nexport function getAnimationDriver() {\n return getConfig().animations\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAKnB,SAAS,qBAAqB;AACnC,aAAO,yBAAU,EAAE;AACrB;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
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 getExpandedShorthands_exports = {};
|
|
20
|
+
__export(getExpandedShorthands_exports, {
|
|
21
|
+
getExpandedShorthands: () => getExpandedShorthands
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(getExpandedShorthands_exports);
|
|
24
|
+
var import_config = require("../config.js");
|
|
25
|
+
function getExpandedShorthands(props) {
|
|
26
|
+
const shorthands = (0, import_config.getConfig)().shorthands;
|
|
27
|
+
if (!shorthands)
|
|
28
|
+
return props;
|
|
29
|
+
const res = {};
|
|
30
|
+
for (const key in props) {
|
|
31
|
+
res[shorthands[key] || key] = props[key];
|
|
32
|
+
}
|
|
33
|
+
return res;
|
|
34
|
+
}
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
getExpandedShorthands
|
|
38
|
+
});
|
|
2
39
|
//# sourceMappingURL=getExpandedShorthands.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/getExpandedShorthands.ts"],
|
|
4
4
|
"sourcesContent": ["import { getConfig } from '../config.js'\nimport { Shorthands } from '../types.js'\n\nexport function getExpandedShorthands<A extends Object>(\n props: A\n): Omit<A, keyof Shorthands> {\n const shorthands = getConfig().shorthands\n if (!shorthands) return props\n const res = {} as A\n for (const key in props) {\n // @ts-ignore\n res[shorthands[key] || key] = props[key]\n }\n return res\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAGnB,SAAS,sBACd,OAC2B;AAC3B,QAAM,iBAAa,yBAAU,EAAE;AAC/B,MAAI,CAAC;AAAY,WAAO;AACxB,QAAM,MAAM,CAAC;AACb,aAAW,OAAO,OAAO;AAEvB,QAAI,WAAW,GAAG,KAAK,GAAG,IAAI,MAAM,GAAG;AAAA,EACzC;AACA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
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 getFontLanguage_exports = {};
|
|
20
|
+
__export(getFontLanguage_exports, {
|
|
21
|
+
getFontLanguage: () => getFontLanguage
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(getFontLanguage_exports);
|
|
24
|
+
const getFontLanguage = (fontFamily) => fontFamily.includes("_") ? fontFamily.split("_")[1] : null;
|
|
25
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
+
0 && (module.exports = {
|
|
27
|
+
getFontLanguage
|
|
28
|
+
});
|
|
2
29
|
//# sourceMappingURL=getFontLanguage.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/getFontLanguage.ts"],
|
|
4
4
|
"sourcesContent": ["export const getFontLanguage = (fontFamily: string) =>\n fontFamily.includes('_') ? fontFamily.split('_')[1] : null\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,kBAAkB,CAAC,eAC9B,WAAW,SAAS,GAAG,IAAI,WAAW,MAAM,GAAG,EAAE,CAAC,IAAI;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|