@tamagui/web 1.13.3 → 1.14.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 +1 -76
- package/dist/cjs/Tamagui.js.map +2 -2
- package/dist/cjs/addTheme.js +2 -77
- package/dist/cjs/addTheme.js.map +2 -2
- package/dist/cjs/config.js +1 -122
- package/dist/cjs/config.js.map +2 -2
- package/dist/cjs/constants/constants.js +1 -48
- package/dist/cjs/constants/constants.js.map +2 -2
- package/dist/cjs/constants/isDevTools.js +1 -36
- package/dist/cjs/constants/isDevTools.js.map +2 -2
- package/dist/cjs/contexts/AnimationDriverContext.js +1 -29
- package/dist/cjs/contexts/AnimationDriverContext.js.map +2 -2
- package/dist/cjs/contexts/ButtonNestingContext.js +1 -29
- package/dist/cjs/contexts/ButtonNestingContext.js.map +2 -2
- package/dist/cjs/contexts/FontLanguageContext.js +1 -29
- package/dist/cjs/contexts/FontLanguageContext.js.map +2 -2
- package/dist/cjs/contexts/TextAncestorContext.js +1 -29
- package/dist/cjs/contexts/TextAncestorContext.js.map +2 -2
- package/dist/cjs/createComponent.js +2 -874
- package/dist/cjs/createComponent.js.map +3 -3
- package/dist/cjs/createFont.js +1 -68
- package/dist/cjs/createFont.js.map +2 -2
- package/dist/cjs/createShorthands.js +1 -30
- package/dist/cjs/createShorthands.js.map +2 -2
- package/dist/cjs/createTamagui.js +5 -202
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createTheme.js +1 -30
- package/dist/cjs/createTheme.js.map +2 -2
- package/dist/cjs/createTokens.js +1 -38
- package/dist/cjs/createTokens.js.map +2 -2
- package/dist/cjs/createVariable.js +1 -110
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/createVariables.js +1 -59
- package/dist/cjs/createVariables.js.map +2 -2
- package/dist/cjs/helpers/ThemeManager.js +1 -236
- package/dist/cjs/helpers/ThemeManager.js.map +3 -3
- package/dist/cjs/helpers/ThemeManagerContext.js +1 -29
- package/dist/cjs/helpers/ThemeManagerContext.js.map +2 -2
- package/dist/cjs/helpers/createMediaStyle.js +1 -66
- package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +2 -431
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/createProxy.js +2 -41
- package/dist/cjs/helpers/createProxy.js.map +2 -2
- package/dist/cjs/helpers/defaultOffset.js +1 -28
- package/dist/cjs/helpers/defaultOffset.js.map +2 -2
- package/dist/cjs/helpers/expandStyle.js +1 -85
- package/dist/cjs/helpers/expandStyle.js.map +2 -2
- package/dist/cjs/helpers/expandStyles.js +1 -76
- package/dist/cjs/helpers/expandStyles.js.map +2 -2
- package/dist/cjs/helpers/extendStaticConfig.js +1 -91
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/getAnimationDriver.js +1 -31
- package/dist/cjs/helpers/getAnimationDriver.js.map +2 -2
- package/dist/cjs/helpers/getExpandedShorthands.js +1 -38
- package/dist/cjs/helpers/getExpandedShorthands.js.map +2 -2
- package/dist/cjs/helpers/getFontLanguage.js +1 -28
- package/dist/cjs/helpers/getFontLanguage.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +3 -865
- package/dist/cjs/helpers/getSplitStyles.js.map +3 -3
- package/dist/cjs/helpers/getStylesAtomic.js +1 -226
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.native.js +1 -37
- package/dist/cjs/helpers/getStylesAtomic.native.js.map +2 -2
- package/dist/cjs/helpers/getThemeCSSRules.js +4 -126
- package/dist/cjs/helpers/getThemeCSSRules.js.map +2 -2
- package/dist/cjs/helpers/getThemeCSSRules.native.js +1 -30
- package/dist/cjs/helpers/getThemeCSSRules.native.js.map +2 -2
- package/dist/cjs/helpers/getVariantExtras.js +1 -91
- package/dist/cjs/helpers/getVariantExtras.js.map +2 -2
- package/dist/cjs/helpers/insertStyleRule.js +2 -222
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/isObj.js +1 -28
- package/dist/cjs/helpers/isObj.js.map +2 -2
- package/dist/cjs/helpers/isTamaguiComponent.js +1 -31
- package/dist/cjs/helpers/isTamaguiComponent.js.map +2 -2
- package/dist/cjs/helpers/isTamaguiElement.js +1 -32
- package/dist/cjs/helpers/isTamaguiElement.js.map +2 -2
- package/dist/cjs/helpers/matchMedia.js +1 -41
- package/dist/cjs/helpers/matchMedia.js.map +2 -2
- package/dist/cjs/helpers/matchMedia.native.js +1 -47
- package/dist/cjs/helpers/matchMedia.native.js.map +2 -2
- package/dist/cjs/helpers/mergeProps.js +1 -53
- package/dist/cjs/helpers/mergeProps.js.map +2 -2
- package/dist/cjs/helpers/normalizeColor.js +1 -66
- package/dist/cjs/helpers/normalizeColor.js.map +2 -2
- package/dist/cjs/helpers/normalizeShadow.js +1 -46
- package/dist/cjs/helpers/normalizeShadow.js.map +2 -2
- package/dist/cjs/helpers/normalizeShadow.native.js +1 -54
- package/dist/cjs/helpers/normalizeShadow.native.js.map +2 -2
- package/dist/cjs/helpers/normalizeStylePropKeys.js +1 -28
- package/dist/cjs/helpers/normalizeStylePropKeys.js.map +2 -2
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js +1 -39
- package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +2 -2
- package/dist/cjs/helpers/normalizeValueWithProperty.js +1 -125
- package/dist/cjs/helpers/normalizeValueWithProperty.js.map +2 -2
- package/dist/cjs/helpers/proxyThemeVariables.js +1 -39
- package/dist/cjs/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/cjs/helpers/pseudoDescriptors.js +1 -52
- package/dist/cjs/helpers/pseudoDescriptors.js.map +2 -2
- package/dist/cjs/helpers/registerCSSVariable.js +1 -39
- package/dist/cjs/helpers/registerCSSVariable.js.map +2 -2
- package/dist/cjs/helpers/themeable.js +1 -61
- package/dist/cjs/helpers/themeable.js.map +2 -2
- package/dist/cjs/helpers/themes.js +1 -75
- package/dist/cjs/helpers/themes.js.map +2 -2
- package/dist/cjs/helpers/timer.js +1 -34
- package/dist/cjs/helpers/timer.js.map +2 -2
- package/dist/cjs/helpers/useShallowSetState.js +1 -58
- package/dist/cjs/helpers/useShallowSetState.js.map +2 -2
- package/dist/cjs/helpers/warnOnce.js +1 -37
- package/dist/cjs/helpers/warnOnce.js.map +2 -2
- package/dist/cjs/helpers/withStaticProperties.js +1 -32
- package/dist/cjs/helpers/withStaticProperties.js.map +2 -2
- package/dist/cjs/hooks/getThemeUnwrapped.js +1 -33
- package/dist/cjs/hooks/getThemeUnwrapped.js.map +2 -2
- package/dist/cjs/hooks/useAnimationDriver.js +1 -33
- package/dist/cjs/hooks/useAnimationDriver.js.map +2 -2
- package/dist/cjs/hooks/useId.js +1 -28
- package/dist/cjs/hooks/useId.js.map +2 -2
- package/dist/cjs/hooks/useIsTouchDevice.js +1 -32
- package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/cjs/hooks/useMedia.js +1 -264
- package/dist/cjs/hooks/useMedia.js.map +2 -2
- package/dist/cjs/hooks/useSafeRef.js +1 -58
- package/dist/cjs/hooks/useSafeRef.js.map +2 -2
- package/dist/cjs/hooks/useServerHooks.js +1 -35
- package/dist/cjs/hooks/useServerHooks.js.map +2 -2
- package/dist/cjs/hooks/useStyle.js +1 -60
- package/dist/cjs/hooks/useStyle.js.map +2 -2
- package/dist/cjs/hooks/useTheme.js +1 -229
- package/dist/cjs/hooks/useTheme.js.map +3 -3
- package/dist/cjs/hooks/useThemeName.js +1 -51
- package/dist/cjs/hooks/useThemeName.js.map +2 -2
- package/dist/cjs/index.js +1 -110
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/inject-styles.js +1 -39
- package/dist/cjs/inject-styles.js.map +2 -2
- package/dist/cjs/insertFont.js +1 -92
- package/dist/cjs/insertFont.js.map +2 -2
- package/dist/cjs/setupHooks.js +1 -33
- package/dist/cjs/setupHooks.js.map +2 -2
- package/dist/cjs/setupReactNative.js +1 -50
- package/dist/cjs/setupReactNative.js.map +2 -2
- package/dist/cjs/styled.js +1 -93
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/types.js +1 -16
- package/dist/cjs/types.js.map +3 -3
- package/dist/cjs/updateTheme.js +1 -46
- package/dist/cjs/updateTheme.js.map +2 -2
- package/dist/cjs/views/AnimationDriverProvider.js +1 -32
- package/dist/cjs/views/AnimationDriverProvider.js.map +2 -2
- package/dist/cjs/views/FontLanguage.js +1 -40
- package/dist/cjs/views/FontLanguage.js.map +2 -2
- package/dist/cjs/views/FontLanguage.native.js +1 -34
- package/dist/cjs/views/FontLanguage.native.js.map +2 -2
- package/dist/cjs/views/FontLanguage.types.js +1 -16
- package/dist/cjs/views/FontLanguage.types.js.map +2 -2
- package/dist/cjs/views/Slot.js +1 -91
- package/dist/cjs/views/Slot.js.map +2 -2
- package/dist/cjs/views/Stack.js +1 -37
- package/dist/cjs/views/Stack.js.map +2 -2
- package/dist/cjs/views/TamaguiProvider.js +1 -90
- package/dist/cjs/views/TamaguiProvider.js.map +2 -2
- package/dist/cjs/views/Text.js +1 -95
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/cjs/views/Theme.js +1 -80
- package/dist/cjs/views/Theme.js.map +3 -3
- package/dist/cjs/views/ThemeProvider.js +1 -69
- package/dist/cjs/views/ThemeProvider.js.map +2 -2
- package/dist/esm/Tamagui.js +1 -44
- package/dist/esm/Tamagui.js.map +2 -2
- package/dist/esm/Tamagui.mjs +1 -44
- package/dist/esm/Tamagui.mjs.map +2 -2
- package/dist/esm/addTheme.js +2 -53
- package/dist/esm/addTheme.js.map +2 -2
- package/dist/esm/addTheme.mjs +2 -53
- package/dist/esm/addTheme.mjs.map +2 -2
- package/dist/esm/config.js +1 -89
- package/dist/esm/config.js.map +2 -2
- package/dist/esm/config.mjs +1 -89
- package/dist/esm/config.mjs.map +2 -2
- package/dist/esm/constants/constants.js +1 -21
- package/dist/esm/constants/constants.js.map +2 -2
- package/dist/esm/constants/constants.mjs +1 -21
- package/dist/esm/constants/constants.mjs.map +2 -2
- package/dist/esm/constants/isDevTools.js +1 -12
- package/dist/esm/constants/isDevTools.js.map +2 -2
- package/dist/esm/constants/isDevTools.mjs +1 -12
- package/dist/esm/constants/isDevTools.mjs.map +2 -2
- package/dist/esm/contexts/AnimationDriverContext.js +1 -5
- package/dist/esm/contexts/AnimationDriverContext.js.map +2 -2
- package/dist/esm/contexts/AnimationDriverContext.mjs +1 -5
- package/dist/esm/contexts/AnimationDriverContext.mjs.map +2 -2
- package/dist/esm/contexts/ButtonNestingContext.js +1 -5
- package/dist/esm/contexts/ButtonNestingContext.js.map +2 -2
- package/dist/esm/contexts/ButtonNestingContext.mjs +1 -5
- package/dist/esm/contexts/ButtonNestingContext.mjs.map +2 -2
- package/dist/esm/contexts/FontLanguageContext.js +1 -5
- package/dist/esm/contexts/FontLanguageContext.js.map +2 -2
- package/dist/esm/contexts/FontLanguageContext.mjs +1 -5
- package/dist/esm/contexts/FontLanguageContext.mjs.map +2 -2
- package/dist/esm/contexts/TextAncestorContext.js +1 -5
- package/dist/esm/contexts/TextAncestorContext.js.map +2 -2
- package/dist/esm/contexts/TextAncestorContext.mjs +1 -5
- package/dist/esm/contexts/TextAncestorContext.mjs.map +2 -2
- package/dist/esm/createComponent.js +2 -846
- package/dist/esm/createComponent.js.map +3 -3
- package/dist/esm/createComponent.mjs +2 -846
- package/dist/esm/createComponent.mjs.map +3 -3
- package/dist/esm/createFont.js +1 -44
- package/dist/esm/createFont.js.map +2 -2
- package/dist/esm/createFont.mjs +1 -44
- package/dist/esm/createFont.mjs.map +2 -2
- package/dist/esm/createShorthands.js +1 -6
- package/dist/esm/createShorthands.js.map +2 -2
- package/dist/esm/createShorthands.mjs +1 -6
- package/dist/esm/createShorthands.mjs.map +2 -2
- package/dist/esm/createTamagui.js +5 -186
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createTamagui.mjs +5 -186
- package/dist/esm/createTamagui.mjs.map +2 -2
- package/dist/esm/createTheme.js +1 -6
- package/dist/esm/createTheme.js.map +2 -2
- package/dist/esm/createTheme.mjs +1 -6
- package/dist/esm/createTheme.mjs.map +2 -2
- package/dist/esm/createTokens.js +1 -14
- package/dist/esm/createTokens.js.map +2 -2
- package/dist/esm/createTokens.mjs +1 -14
- package/dist/esm/createTokens.mjs.map +2 -2
- package/dist/esm/createVariable.js +1 -77
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/createVariable.mjs +1 -77
- package/dist/esm/createVariable.mjs.map +2 -2
- package/dist/esm/createVariables.js +1 -34
- package/dist/esm/createVariables.js.map +2 -2
- package/dist/esm/createVariables.mjs +1 -34
- package/dist/esm/createVariables.mjs.map +2 -2
- package/dist/esm/helpers/ThemeManager.js +1 -211
- package/dist/esm/helpers/ThemeManager.js.map +3 -3
- package/dist/esm/helpers/ThemeManager.mjs +1 -211
- package/dist/esm/helpers/ThemeManager.mjs.map +3 -3
- package/dist/esm/helpers/ThemeManagerContext.js +1 -5
- package/dist/esm/helpers/ThemeManagerContext.js.map +2 -2
- package/dist/esm/helpers/ThemeManagerContext.mjs +1 -5
- package/dist/esm/helpers/ThemeManagerContext.mjs.map +2 -2
- package/dist/esm/helpers/createMediaStyle.js +1 -41
- package/dist/esm/helpers/createMediaStyle.js.map +2 -2
- package/dist/esm/helpers/createMediaStyle.mjs +1 -41
- package/dist/esm/helpers/createMediaStyle.mjs.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +2 -404
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.mjs +2 -404
- package/dist/esm/helpers/createPropMapper.mjs.map +2 -2
- package/dist/esm/helpers/createProxy.js +2 -17
- package/dist/esm/helpers/createProxy.js.map +2 -2
- package/dist/esm/helpers/createProxy.mjs +2 -17
- package/dist/esm/helpers/createProxy.mjs.map +2 -2
- package/dist/esm/helpers/defaultOffset.js +1 -4
- package/dist/esm/helpers/defaultOffset.js.map +2 -2
- package/dist/esm/helpers/defaultOffset.mjs +1 -4
- package/dist/esm/helpers/defaultOffset.mjs.map +2 -2
- package/dist/esm/helpers/expandStyle.js +1 -61
- package/dist/esm/helpers/expandStyle.js.map +2 -2
- package/dist/esm/helpers/expandStyle.mjs +1 -61
- package/dist/esm/helpers/expandStyle.mjs.map +2 -2
- package/dist/esm/helpers/expandStyles.js +1 -51
- package/dist/esm/helpers/expandStyles.js.map +2 -2
- package/dist/esm/helpers/expandStyles.mjs +1 -51
- package/dist/esm/helpers/expandStyles.mjs.map +2 -2
- package/dist/esm/helpers/extendStaticConfig.js +1 -66
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/extendStaticConfig.mjs +1 -66
- package/dist/esm/helpers/extendStaticConfig.mjs.map +2 -2
- package/dist/esm/helpers/getAnimationDriver.js +1 -7
- package/dist/esm/helpers/getAnimationDriver.js.map +2 -2
- package/dist/esm/helpers/getAnimationDriver.mjs +1 -7
- package/dist/esm/helpers/getAnimationDriver.mjs.map +2 -2
- package/dist/esm/helpers/getExpandedShorthands.js +1 -14
- package/dist/esm/helpers/getExpandedShorthands.js.map +2 -2
- package/dist/esm/helpers/getExpandedShorthands.mjs +1 -14
- package/dist/esm/helpers/getExpandedShorthands.mjs.map +2 -2
- package/dist/esm/helpers/getFontLanguage.js +1 -4
- package/dist/esm/helpers/getFontLanguage.js.map +2 -2
- package/dist/esm/helpers/getFontLanguage.mjs +1 -4
- package/dist/esm/helpers/getFontLanguage.mjs.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +3 -866
- package/dist/esm/helpers/getSplitStyles.js.map +3 -3
- package/dist/esm/helpers/getSplitStyles.mjs +3 -866
- package/dist/esm/helpers/getSplitStyles.mjs.map +3 -3
- package/dist/esm/helpers/getStylesAtomic.js +1 -200
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.mjs +1 -200
- package/dist/esm/helpers/getStylesAtomic.mjs.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.js +1 -11
- package/dist/esm/helpers/getStylesAtomic.native.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.mjs +1 -11
- package/dist/esm/helpers/getStylesAtomic.native.mjs.map +2 -2
- package/dist/esm/helpers/getThemeCSSRules.js +4 -102
- package/dist/esm/helpers/getThemeCSSRules.js.map +2 -2
- package/dist/esm/helpers/getThemeCSSRules.mjs +4 -102
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +2 -2
- package/dist/esm/helpers/getThemeCSSRules.native.js +1 -6
- package/dist/esm/helpers/getThemeCSSRules.native.js.map +2 -2
- package/dist/esm/helpers/getThemeCSSRules.native.mjs +1 -6
- package/dist/esm/helpers/getThemeCSSRules.native.mjs.map +2 -2
- package/dist/esm/helpers/getVariantExtras.js +1 -66
- package/dist/esm/helpers/getVariantExtras.js.map +2 -2
- package/dist/esm/helpers/getVariantExtras.mjs +1 -66
- package/dist/esm/helpers/getVariantExtras.mjs.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +2 -190
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.mjs +2 -190
- package/dist/esm/helpers/insertStyleRule.mjs.map +2 -2
- package/dist/esm/helpers/isObj.js +1 -4
- package/dist/esm/helpers/isObj.js.map +2 -2
- package/dist/esm/helpers/isObj.mjs +1 -4
- package/dist/esm/helpers/isObj.mjs.map +2 -2
- package/dist/esm/helpers/isTamaguiComponent.js +1 -7
- package/dist/esm/helpers/isTamaguiComponent.js.map +2 -2
- package/dist/esm/helpers/isTamaguiComponent.mjs +1 -7
- package/dist/esm/helpers/isTamaguiComponent.mjs.map +2 -2
- package/dist/esm/helpers/isTamaguiElement.js +1 -8
- package/dist/esm/helpers/isTamaguiElement.js.map +2 -2
- package/dist/esm/helpers/isTamaguiElement.mjs +1 -8
- package/dist/esm/helpers/isTamaguiElement.mjs.map +2 -2
- package/dist/esm/helpers/matchMedia.js +1 -16
- package/dist/esm/helpers/matchMedia.js.map +2 -2
- package/dist/esm/helpers/matchMedia.mjs +1 -16
- package/dist/esm/helpers/matchMedia.mjs.map +2 -2
- package/dist/esm/helpers/matchMedia.native.js +1 -22
- package/dist/esm/helpers/matchMedia.native.js.map +2 -2
- package/dist/esm/helpers/matchMedia.native.mjs +1 -22
- package/dist/esm/helpers/matchMedia.native.mjs.map +2 -2
- package/dist/esm/helpers/mergeProps.js +1 -29
- package/dist/esm/helpers/mergeProps.js.map +2 -2
- package/dist/esm/helpers/mergeProps.mjs +1 -29
- package/dist/esm/helpers/mergeProps.mjs.map +2 -2
- package/dist/esm/helpers/normalizeColor.js +1 -30
- package/dist/esm/helpers/normalizeColor.js.map +2 -2
- package/dist/esm/helpers/normalizeColor.mjs +1 -30
- package/dist/esm/helpers/normalizeColor.mjs.map +2 -2
- package/dist/esm/helpers/normalizeShadow.js +1 -22
- package/dist/esm/helpers/normalizeShadow.js.map +2 -2
- package/dist/esm/helpers/normalizeShadow.mjs +1 -22
- package/dist/esm/helpers/normalizeShadow.mjs.map +2 -2
- package/dist/esm/helpers/normalizeShadow.native.js +1 -30
- package/dist/esm/helpers/normalizeShadow.native.js.map +2 -2
- package/dist/esm/helpers/normalizeShadow.native.mjs +1 -30
- package/dist/esm/helpers/normalizeShadow.native.mjs.map +2 -2
- package/dist/esm/helpers/normalizeStylePropKeys.js +1 -4
- package/dist/esm/helpers/normalizeStylePropKeys.js.map +2 -2
- package/dist/esm/helpers/normalizeStylePropKeys.mjs +1 -4
- package/dist/esm/helpers/normalizeStylePropKeys.mjs.map +2 -2
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +1 -15
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +2 -2
- package/dist/esm/helpers/normalizeStylePropKeys.native.mjs +1 -15
- package/dist/esm/helpers/normalizeStylePropKeys.native.mjs.map +2 -2
- package/dist/esm/helpers/normalizeValueWithProperty.js +1 -100
- package/dist/esm/helpers/normalizeValueWithProperty.js.map +2 -2
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +1 -100
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +2 -2
- package/dist/esm/helpers/proxyThemeVariables.js +1 -15
- package/dist/esm/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/esm/helpers/proxyThemeVariables.mjs +1 -15
- package/dist/esm/helpers/proxyThemeVariables.mjs.map +2 -2
- package/dist/esm/helpers/pseudoDescriptors.js +1 -28
- package/dist/esm/helpers/pseudoDescriptors.js.map +2 -2
- package/dist/esm/helpers/pseudoDescriptors.mjs +1 -28
- package/dist/esm/helpers/pseudoDescriptors.mjs.map +2 -2
- package/dist/esm/helpers/registerCSSVariable.js +1 -13
- package/dist/esm/helpers/registerCSSVariable.js.map +2 -2
- package/dist/esm/helpers/registerCSSVariable.mjs +1 -13
- package/dist/esm/helpers/registerCSSVariable.mjs.map +2 -2
- package/dist/esm/helpers/themeable.js +1 -27
- package/dist/esm/helpers/themeable.js.map +2 -2
- package/dist/esm/helpers/themeable.mjs +1 -27
- package/dist/esm/helpers/themeable.mjs.map +2 -2
- package/dist/esm/helpers/themes.js +1 -50
- package/dist/esm/helpers/themes.js.map +2 -2
- package/dist/esm/helpers/themes.mjs +1 -50
- package/dist/esm/helpers/themes.mjs.map +2 -2
- package/dist/esm/helpers/timer.js +1 -10
- package/dist/esm/helpers/timer.js.map +2 -2
- package/dist/esm/helpers/timer.mjs +1 -10
- package/dist/esm/helpers/timer.mjs.map +2 -2
- package/dist/esm/helpers/useShallowSetState.js +1 -34
- package/dist/esm/helpers/useShallowSetState.js.map +2 -2
- package/dist/esm/helpers/useShallowSetState.mjs +1 -34
- package/dist/esm/helpers/useShallowSetState.mjs.map +2 -2
- package/dist/esm/helpers/warnOnce.js +1 -13
- package/dist/esm/helpers/warnOnce.js.map +2 -2
- package/dist/esm/helpers/warnOnce.mjs +1 -13
- package/dist/esm/helpers/warnOnce.mjs.map +2 -2
- package/dist/esm/helpers/withStaticProperties.js +1 -8
- package/dist/esm/helpers/withStaticProperties.js.map +2 -2
- package/dist/esm/helpers/withStaticProperties.mjs +1 -8
- package/dist/esm/helpers/withStaticProperties.mjs.map +2 -2
- package/dist/esm/hooks/getThemeUnwrapped.js +1 -8
- package/dist/esm/hooks/getThemeUnwrapped.js.map +2 -2
- package/dist/esm/hooks/getThemeUnwrapped.mjs +1 -8
- package/dist/esm/hooks/getThemeUnwrapped.mjs.map +2 -2
- package/dist/esm/hooks/useAnimationDriver.js +1 -9
- package/dist/esm/hooks/useAnimationDriver.js.map +2 -2
- package/dist/esm/hooks/useAnimationDriver.mjs +1 -9
- package/dist/esm/hooks/useAnimationDriver.mjs.map +2 -2
- package/dist/esm/hooks/useId.js +1 -4
- package/dist/esm/hooks/useId.js.map +2 -2
- package/dist/esm/hooks/useId.mjs +1 -4
- package/dist/esm/hooks/useId.mjs.map +2 -2
- package/dist/esm/hooks/useIsTouchDevice.js +1 -8
- package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/esm/hooks/useIsTouchDevice.mjs +1 -8
- package/dist/esm/hooks/useIsTouchDevice.mjs.map +2 -2
- package/dist/esm/hooks/useMedia.js +1 -225
- package/dist/esm/hooks/useMedia.js.map +2 -2
- package/dist/esm/hooks/useMedia.mjs +1 -225
- package/dist/esm/hooks/useMedia.mjs.map +2 -2
- package/dist/esm/hooks/useSafeRef.js +1 -34
- package/dist/esm/hooks/useSafeRef.js.map +2 -2
- package/dist/esm/hooks/useSafeRef.mjs +1 -34
- package/dist/esm/hooks/useSafeRef.mjs.map +2 -2
- package/dist/esm/hooks/useServerHooks.js +1 -10
- package/dist/esm/hooks/useServerHooks.js.map +2 -2
- package/dist/esm/hooks/useServerHooks.mjs +1 -10
- package/dist/esm/hooks/useServerHooks.mjs.map +2 -2
- package/dist/esm/hooks/useStyle.js +1 -36
- package/dist/esm/hooks/useStyle.js.map +2 -2
- package/dist/esm/hooks/useStyle.mjs +1 -36
- package/dist/esm/hooks/useStyle.mjs.map +2 -2
- package/dist/esm/hooks/useTheme.js +1 -204
- package/dist/esm/hooks/useTheme.js.map +3 -3
- package/dist/esm/hooks/useTheme.mjs +1 -204
- package/dist/esm/hooks/useTheme.mjs.map +3 -3
- package/dist/esm/hooks/useThemeName.js +1 -27
- package/dist/esm/hooks/useThemeName.js.map +2 -2
- package/dist/esm/hooks/useThemeName.mjs +1 -27
- package/dist/esm/hooks/useThemeName.mjs.map +2 -2
- package/dist/esm/index.js +1 -88
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.mjs +1 -88
- package/dist/esm/index.mjs.map +2 -2
- package/dist/esm/inject-styles.js +1 -15
- package/dist/esm/inject-styles.js.map +2 -2
- package/dist/esm/inject-styles.mjs +1 -15
- package/dist/esm/inject-styles.mjs.map +2 -2
- package/dist/esm/insertFont.js +1 -66
- package/dist/esm/insertFont.js.map +2 -2
- package/dist/esm/insertFont.mjs +1 -66
- package/dist/esm/insertFont.mjs.map +2 -2
- package/dist/esm/setupHooks.js +1 -8
- package/dist/esm/setupHooks.js.map +2 -2
- package/dist/esm/setupHooks.mjs +1 -8
- package/dist/esm/setupHooks.mjs.map +2 -2
- package/dist/esm/setupReactNative.js +1 -24
- package/dist/esm/setupReactNative.js.map +2 -2
- package/dist/esm/setupReactNative.mjs +1 -24
- package/dist/esm/setupReactNative.mjs.map +2 -2
- package/dist/esm/styled.js +1 -69
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/styled.mjs +1 -69
- package/dist/esm/styled.mjs.map +2 -2
- package/dist/esm/updateTheme.js +1 -22
- package/dist/esm/updateTheme.js.map +2 -2
- package/dist/esm/updateTheme.mjs +1 -22
- package/dist/esm/updateTheme.mjs.map +2 -2
- package/dist/esm/views/AnimationDriverProvider.js +1 -8
- package/dist/esm/views/AnimationDriverProvider.js.map +2 -2
- package/dist/esm/views/AnimationDriverProvider.mjs +1 -8
- package/dist/esm/views/AnimationDriverProvider.mjs.map +2 -2
- package/dist/esm/views/FontLanguage.js +1 -16
- package/dist/esm/views/FontLanguage.js.map +2 -2
- package/dist/esm/views/FontLanguage.mjs +1 -16
- package/dist/esm/views/FontLanguage.mjs.map +2 -2
- package/dist/esm/views/FontLanguage.native.js +1 -10
- package/dist/esm/views/FontLanguage.native.js.map +2 -2
- package/dist/esm/views/FontLanguage.native.mjs +1 -10
- package/dist/esm/views/FontLanguage.native.mjs.map +2 -2
- package/dist/esm/views/Slot.js +1 -65
- package/dist/esm/views/Slot.js.map +2 -2
- package/dist/esm/views/Slot.mjs +1 -65
- package/dist/esm/views/Slot.mjs.map +2 -2
- package/dist/esm/views/Stack.js +1 -13
- package/dist/esm/views/Stack.js.map +2 -2
- package/dist/esm/views/Stack.mjs +1 -13
- package/dist/esm/views/Stack.mjs.map +2 -2
- package/dist/esm/views/TamaguiProvider.js +1 -56
- package/dist/esm/views/TamaguiProvider.js.map +2 -2
- package/dist/esm/views/TamaguiProvider.mjs +1 -56
- package/dist/esm/views/TamaguiProvider.mjs.map +2 -2
- package/dist/esm/views/Text.js +1 -71
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/esm/views/Text.mjs +1 -71
- package/dist/esm/views/Text.mjs.map +2 -2
- package/dist/esm/views/Theme.js +1 -55
- package/dist/esm/views/Theme.js.map +3 -3
- package/dist/esm/views/Theme.mjs +1 -55
- package/dist/esm/views/Theme.mjs.map +3 -3
- package/dist/esm/views/ThemeProvider.js +1 -44
- package/dist/esm/views/ThemeProvider.js.map +2 -2
- package/dist/esm/views/ThemeProvider.mjs +1 -44
- package/dist/esm/views/ThemeProvider.mjs.map +2 -2
- package/package.json +9 -9
- package/src/createComponent.tsx +38 -5
- package/src/helpers/ThemeManager.tsx +40 -32
- package/src/helpers/getSplitStyles.tsx +0 -8
- package/src/hooks/useTheme.tsx +145 -93
- package/src/types.tsx +2 -2
- package/src/views/Theme.tsx +49 -27
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/ThemeManager.d.ts +1 -0
- package/types/helpers/ThemeManager.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +5 -7
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/types.d.ts +2 -2
- package/types/types.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/insertStyleRule.tsx"],
|
|
4
4
|
"sourcesContent": ["import { isClient } from '@tamagui/constants'\n\nimport type { RulesToInsert, StyleObject } from '../types.js'\n\nconst allSelectors: Record<string, string> = {}\nconst allRules: Record<string, string> = {}\nexport const insertedTransforms = {}\n\nexport const getAllSelectors = () => allSelectors\nexport const getAllRules = () => Object.values(allRules)\nexport const getAllTransforms = () => insertedTransforms\n\n// keep transforms in map for merging later\nfunction addTransform(identifier: string, css: string, rule?: CSSRule) {\n const s = css.indexOf('transform:')\n if (s === -1) {\n if (process.env.NODE_ENV === 'development') {\n console.error(`\u274C Invalid transform, likely used deg/% improperly ${identifier}`)\n }\n return\n }\n const startI = s + 'transform:'.length\n const endI = css.indexOf(';')\n const value = css.slice(startI, endI)\n if (!insertedTransforms[identifier]) {\n insertedTransforms[identifier] = value\n return true\n }\n}\n\n// gets existing ones (client side)\n// takes ~0.1ms for a fairly large page\n// used now for three things:\n// 1. debugging at dev time\n// 2. avoid duplicate insert styles at runtime\n// 3. used now for merging transforms atomically\n\n// multiple sheets could have the same ids so we have to count\n\n// only cache tamagui styles\nconst scannedCache = new WeakMap<CSSStyleSheet, string>()\nconst totalSelectorsInserted = new Map<string, number>()\n\nexport function listenForSheetChanges() {\n if (!isClient) return\n\n const mo = new MutationObserver((entries) => {\n for (const entry of entries) {\n if (\n (entry instanceof HTMLStyleElement && entry.sheet) ||\n (entry instanceof HTMLLinkElement && entry.href.endsWith('.css'))\n ) {\n scanAllSheets()\n break\n }\n }\n })\n\n mo.observe(document.head, {\n childList: true,\n })\n}\n\nlet lastScannedSheets: Set<CSSStyleSheet> | null = null\n\nexport function scanAllSheets() {\n if (process.env.NODE_ENV === 'test') return\n if (!isClient) return\n\n const sheets = document.styleSheets || []\n const prev = lastScannedSheets\n const current = new Set(sheets as any as CSSStyleSheet[])\n if (document.styleSheets) {\n for (const sheet of current) {\n sheet && updateSheetStyles(sheet)\n }\n lastScannedSheets = current\n }\n\n if (prev) {\n for (const sheet of prev) {\n if (sheet && !current.has(sheet)) {\n updateSheetStyles(sheet, true)\n }\n }\n }\n}\n\nfunction track(id: string, remove = false) {\n const next = (totalSelectorsInserted.get(id) || 0) + (remove ? -1 : 1)\n totalSelectorsInserted.set(id, next)\n return next\n}\n\nfunction updateSheetStyles(sheet: CSSStyleSheet, remove = false) {\n // avoid errors on cross origin sheets\n // https://stackoverflow.com/questions/49993633/uncaught-domexception-failed-to-read-the-cssrules-property\n let rules: CSSRuleList\n try {\n rules = sheet.cssRules\n } catch {\n return\n }\n\n const firstSelector = getTamaguiSelector(rules[0])?.[0]\n const lastSelector = getTamaguiSelector(rules[rules.length - 1])?.[0]\n const cacheKey = `${rules.length}${firstSelector}${lastSelector}`\n const lastScanned = scannedCache.get(sheet)\n\n if (!remove) {\n // avoid re-scanning\n if (lastScanned === cacheKey) {\n return\n }\n }\n\n const len = rules.length\n let fails = 0\n\n for (let i = 0; i < len; i++) {\n const rule = rules[i]\n if (!(rule instanceof CSSStyleRule)) continue\n\n const response = getTamaguiSelector(rule)\n\n if (!response) {\n fails++\n if (fails > 5) {\n // conservatively bail out of non-tamagui sheets\n return\n }\n continue\n }\n\n const [identifier, cssRule] = response\n\n // track references\n const total = track(identifier, remove)\n\n if (remove) {\n if (total === 0) {\n delete allSelectors[identifier]\n }\n } else if (!(identifier in allSelectors)) {\n const isTransform = identifier.startsWith('_transform')\n const shouldInsert = isTransform\n ? addTransform(identifier, cssRule.cssText, cssRule)\n : true\n if (shouldInsert) {\n allSelectors[identifier] = cssRule.cssText\n }\n }\n }\n\n scannedCache.set(sheet, cacheKey)\n}\n\nfunction getTamaguiSelector(\n rule: CSSRule | null\n): readonly [string, CSSStyleRule] | null {\n if (rule instanceof CSSStyleRule) {\n const text = rule.selectorText\n if (text[0] === '.' && text[1] === '_') {\n return [text.slice(1), rule]\n }\n if (text.startsWith(':root') && text.includes('._')) {\n return [getIdentifierFromTamaguiSelector(text), rule]\n }\n } else if (rule instanceof CSSMediaRule) {\n // tamagui only ever inserts 1 rule per media\n if (rule.cssRules.length > 1) return null\n return getTamaguiSelector(rule.cssRules[0])\n }\n return null\n}\n\nconst getIdentifierFromTamaguiSelector = (selector: string) =>\n selector\n .replace(/(:root)+\\s+/, '')\n .replace(/:[a-z]+$/, '')\n .slice(1)\n\nconst sheet = isClient\n ? document.head.appendChild(document.createElement('style')).sheet\n : null\n\nexport function updateRules(identifier: string, rules: string[]) {\n if (identifier in allRules) {\n return false\n }\n allRules[identifier] = rules.join(' ')\n if (identifier.startsWith('_transform')) {\n return addTransform(identifier, rules[0])\n }\n return true\n}\n\nexport function insertStyleRules(rulesToInsert: RulesToInsert) {\n if (!rulesToInsert.length || !sheet) {\n return\n }\n\n for (const { identifier, rules } of rulesToInsert) {\n if (!shouldInsertStyleRules(identifier)) {\n continue\n }\n\n allSelectors[identifier] = rules.join('\\n')\n track(identifier)\n updateRules(identifier, rules)\n\n for (const rule of rules) {\n if (process.env.NODE_ENV === 'production') {\n sheet.insertRule(rule, sheet.cssRules.length)\n } else {\n try {\n sheet.insertRule(rule, sheet.cssRules.length)\n } catch (err) {\n console.groupCollapsed(\n `Error inserting rule into CSSStyleSheet: ${String(err)}`\n )\n console.log({ rule, rulesToInsert })\n console.trace()\n console.groupEnd()\n }\n }\n }\n }\n}\n\nexport function shouldInsertStyleRules(identifier: string) {\n if (process.env.IS_STATIC === 'is_static') {\n return true\n }\n const total = totalSelectorsInserted.get(identifier)\n // note, -1, we are being conservative and leaving some in\n return total === undefined || total < 2\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["sheet"]
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["insertStyleRule_exports", "__export", "getAllRules", "getAllSelectors", "getAllTransforms", "insertStyleRules", "insertedTransforms", "listenForSheetChanges", "scanAllSheets", "shouldInsertStyleRules", "updateRules", "__toCommonJS", "import_constants", "allSelectors", "allRules", "addTransform", "identifier", "css", "rule", "startI", "endI", "value", "scannedCache", "totalSelectorsInserted", "entries", "entry", "lastScannedSheets", "sheets", "prev", "current", "sheet", "updateSheetStyles", "track", "id", "remove", "next", "_a", "_b", "rules", "firstSelector", "getTamaguiSelector", "lastSelector", "cacheKey", "lastScanned", "len", "fails", "i", "response", "cssRule", "total", "text", "getIdentifierFromTamaguiSelector", "selector", "rulesToInsert", "err"]
|
|
7
7
|
}
|
|
@@ -1,29 +1,2 @@
|
|
|
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 isObj_exports = {};
|
|
20
|
-
__export(isObj_exports, {
|
|
21
|
-
isObj: () => isObj
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(isObj_exports);
|
|
24
|
-
const isObj = (x) => x && !Array.isArray(x) && typeof x === "object";
|
|
25
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
-
0 && (module.exports = {
|
|
27
|
-
isObj
|
|
28
|
-
});
|
|
1
|
+
"use strict";var a=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var i=(r,o)=>{for(var y in o)a(r,y,{get:o[y],enumerable:!0})},j=(r,o,y,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of b(o))!c.call(r,t)&&t!==y&&a(r,t,{get:()=>o[t],enumerable:!(e=s(o,t))||e.enumerable});return r};var n=r=>j(a({},"__esModule",{value:!0}),r);var A={};i(A,{isObj:()=>p});module.exports=n(A);const p=r=>r&&!Array.isArray(r)&&typeof r=="object";0&&(module.exports={isObj});
|
|
29
2
|
//# sourceMappingURL=isObj.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/isObj.ts"],
|
|
4
4
|
"sourcesContent": ["export const isObj = (x: any) => x && !Array.isArray(x) && typeof x === 'object'\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAASE,GAAWA,GAAK,CAAC,MAAM,QAAQA,CAAC,GAAK,OAAOA,GAAM",
|
|
6
|
+
"names": ["isObj_exports", "__export", "isObj", "__toCommonJS", "x"]
|
|
7
7
|
}
|
|
@@ -1,32 +1,2 @@
|
|
|
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 isTamaguiComponent_exports = {};
|
|
20
|
-
__export(isTamaguiComponent_exports, {
|
|
21
|
-
isTamaguiComponent: () => isTamaguiComponent
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(isTamaguiComponent_exports);
|
|
24
|
-
function isTamaguiComponent(comp, name) {
|
|
25
|
-
const config = comp == null ? void 0 : comp["staticConfig"];
|
|
26
|
-
return (config == null ? void 0 : config.parsed) && (name ? name === config.componentName : true) || false;
|
|
27
|
-
}
|
|
28
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
-
0 && (module.exports = {
|
|
30
|
-
isTamaguiComponent
|
|
31
|
-
});
|
|
1
|
+
"use strict";var e=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var g=(i,t)=>{for(var n in t)e(i,n,{get:t[n],enumerable:!0})},C=(i,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of r(t))!f.call(i,a)&&a!==n&&e(i,a,{get:()=>t[a],enumerable:!(o=s(t,a))||o.enumerable});return i};var c=i=>C(e({},"__esModule",{value:!0}),i);var u={};g(u,{isTamaguiComponent:()=>d});module.exports=c(u);function d(i,t){const n=i==null?void 0:i.staticConfig;return(n==null?void 0:n.parsed)&&(t?t===n.componentName:!0)||!1}0&&(module.exports={isTamaguiComponent});
|
|
32
2
|
//# sourceMappingURL=isTamaguiComponent.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/isTamaguiComponent.tsx"],
|
|
4
4
|
"sourcesContent": ["import { StaticConfig, StaticConfigParsed } from '../types.js'\n\nexport function isTamaguiComponent<A>(\n comp: A,\n name?: string\n): comp is A & {\n staticConfig: StaticConfig\n} {\n const config = comp?.['staticConfig'] as StaticConfigParsed | undefined\n return (config?.parsed && (name ? name === config.componentName : true)) || false\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAEO,SAASE,EACdE,EACAC,EAGA,CACA,MAAMC,EAASF,GAAA,YAAAA,EAAO,aACtB,OAAQE,GAAA,YAAAA,EAAQ,UAAWD,EAAOA,IAASC,EAAO,cAAgB,KAAU,EAC9E",
|
|
6
|
+
"names": ["isTamaguiComponent_exports", "__export", "isTamaguiComponent", "__toCommonJS", "comp", "name", "config"]
|
|
7
7
|
}
|
|
@@ -1,33 +1,2 @@
|
|
|
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 isTamaguiElement_exports = {};
|
|
20
|
-
__export(isTamaguiElement_exports, {
|
|
21
|
-
isTamaguiElement: () => isTamaguiElement
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(isTamaguiElement_exports);
|
|
24
|
-
var import_react = require("react");
|
|
25
|
-
var import_isTamaguiComponent = require("./isTamaguiComponent.js");
|
|
26
|
-
const isTamaguiElement = (child, name) => {
|
|
27
|
-
return (0, import_react.isValidElement)(child) && (0, import_isTamaguiComponent.isTamaguiComponent)(child.type, name);
|
|
28
|
-
};
|
|
29
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
-
0 && (module.exports = {
|
|
31
|
-
isTamaguiElement
|
|
32
|
-
});
|
|
1
|
+
"use strict";var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var l=(t,m)=>{for(var i in m)a(t,i,{get:m[i],enumerable:!0})},u=(t,m,i,n)=>{if(m&&typeof m=="object"||typeof m=="function")for(let e of s(m))!g.call(t,e)&&e!==i&&a(t,e,{get:()=>m[e],enumerable:!(n=p(m,e))||n.enumerable});return t};var E=t=>u(a({},"__esModule",{value:!0}),t);var c={};l(c,{isTamaguiElement:()=>T});module.exports=E(c);var o=require("react"),r=require("./isTamaguiComponent.js");const T=(t,m)=>(0,o.isValidElement)(t)&&(0,r.isTamaguiComponent)(t.type,m);0&&(module.exports={isTamaguiElement});
|
|
33
2
|
//# sourceMappingURL=isTamaguiElement.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/isTamaguiElement.tsx"],
|
|
4
4
|
"sourcesContent": ["import { isValidElement } from 'react'\n\nimport { TamaguiReactElement } from '../types.js'\nimport { isTamaguiComponent } from './isTamaguiComponent.js'\n\nexport const isTamaguiElement = (\n child: any,\n name?: string\n): child is TamaguiReactElement => {\n return isValidElement(child) && isTamaguiComponent(child.type, name)\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA+B,iBAG/BC,EAAmC,mCAE5B,MAAMH,EAAmB,CAC9BI,EACAC,OAEO,kBAAeD,CAAK,MAAK,sBAAmBA,EAAM,KAAMC,CAAI",
|
|
6
|
+
"names": ["isTamaguiElement_exports", "__export", "isTamaguiElement", "__toCommonJS", "import_react", "import_isTamaguiComponent", "child", "name"]
|
|
7
7
|
}
|
|
@@ -1,42 +1,2 @@
|
|
|
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 matchMedia_exports = {};
|
|
20
|
-
__export(matchMedia_exports, {
|
|
21
|
-
matchMedia: () => matchMedia,
|
|
22
|
-
setupMatchMedia: () => setupMatchMedia
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(matchMedia_exports);
|
|
25
|
-
const matchMedia = typeof window !== "undefined" && window.matchMedia || matchMediaFallback;
|
|
26
|
-
function matchMediaFallback(_) {
|
|
27
|
-
return {
|
|
28
|
-
addListener() {
|
|
29
|
-
},
|
|
30
|
-
removeListener() {
|
|
31
|
-
},
|
|
32
|
-
matches: false
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function setupMatchMedia(_) {
|
|
36
|
-
}
|
|
37
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
-
0 && (module.exports = {
|
|
39
|
-
matchMedia,
|
|
40
|
-
setupMatchMedia
|
|
41
|
-
});
|
|
1
|
+
"use strict";var d=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var M=(e,t)=>{for(var i in t)d(e,i,{get:t[i],enumerable:!0})},s=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of c(t))!o.call(e,a)&&a!==i&&d(e,a,{get:()=>t[a],enumerable:!(n=r(t,a))||n.enumerable});return e};var h=e=>s(d({},"__esModule",{value:!0}),e);var p={};M(p,{matchMedia:()=>m,setupMatchMedia:()=>f});module.exports=h(p);const m=typeof window<"u"&&window.matchMedia||u;function u(e){return{addListener(){},removeListener(){},matches:!1}}function f(e){}0&&(module.exports={matchMedia,setupMatchMedia});
|
|
42
2
|
//# sourceMappingURL=matchMedia.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/matchMedia.ts"],
|
|
4
4
|
"sourcesContent": ["import { MatchMedia, MediaQueryList } from '../types.js'\n\nexport const matchMedia =\n (typeof window !== 'undefined' && window.matchMedia) || matchMediaFallback\n\nfunction matchMediaFallback(_: string): MediaQueryList {\n return {\n addListener() {},\n removeListener() {},\n matches: false,\n }\n}\n\nexport function setupMatchMedia(_: MatchMedia) {\n // no-op web\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,oBAAAC,IAAA,eAAAC,EAAAJ,GAEO,MAAME,EACV,OAAO,OAAW,KAAe,OAAO,YAAeG,EAE1D,SAASA,EAAmBC,EAA2B,CACrD,MAAO,CACL,aAAc,CAAC,EACf,gBAAiB,CAAC,EAClB,QAAS,EACX,CACF,CAEO,SAASH,EAAgBG,EAAe,CAE/C",
|
|
6
|
+
"names": ["matchMedia_exports", "__export", "matchMedia", "setupMatchMedia", "__toCommonJS", "matchMediaFallback", "_"]
|
|
7
7
|
}
|
|
@@ -1,48 +1,2 @@
|
|
|
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 matchMedia_native_exports = {};
|
|
20
|
-
__export(matchMedia_native_exports, {
|
|
21
|
-
matchMedia: () => matchMedia,
|
|
22
|
-
setupMatchMedia: () => setupMatchMedia
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(matchMedia_native_exports);
|
|
25
|
-
let matchMediaImpl = matchMediaFallback;
|
|
26
|
-
const matchMedia = (...args) => matchMediaImpl(...args);
|
|
27
|
-
function matchMediaFallback(query) {
|
|
28
|
-
if (process.env.NODE_ENV === "development") {
|
|
29
|
-
console.warn("warning: matchMedia implementation is not provided.");
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
addListener: () => {
|
|
33
|
-
},
|
|
34
|
-
removeListener: () => {
|
|
35
|
-
},
|
|
36
|
-
matches: false
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function setupMatchMedia(_) {
|
|
40
|
-
matchMediaImpl = _;
|
|
41
|
-
globalThis["matchMedia"] = _;
|
|
42
|
-
}
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
matchMedia,
|
|
46
|
-
setupMatchMedia
|
|
47
|
-
});
|
|
1
|
+
"use strict";var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var s=(e,a)=>{for(var i in a)n(e,i,{get:a[i],enumerable:!0})},m=(e,a,i,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of M(a))!o.call(e,t)&&t!==i&&n(e,t,{get:()=>a[t],enumerable:!(c=r(a,t))||c.enumerable});return e};var h=e=>m(n({},"__esModule",{value:!0}),e);var f={};s(f,{matchMedia:()=>l,setupMatchMedia:()=>u});module.exports=h(f);let d=p;const l=(...e)=>d(...e);function p(e){return process.env.NODE_ENV==="development"&&console.warn("warning: matchMedia implementation is not provided."),{addListener:()=>{},removeListener:()=>{},matches:!1}}function u(e){d=e,globalThis.matchMedia=e}0&&(module.exports={matchMedia,setupMatchMedia});
|
|
48
2
|
//# sourceMappingURL=matchMedia.native.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/matchMedia.native.ts"],
|
|
4
4
|
"sourcesContent": ["import { MatchMedia, MediaQueryList } from '../types.js'\n\nlet matchMediaImpl: MatchMedia = matchMediaFallback\n\nexport const matchMedia: MatchMedia = (...args) => matchMediaImpl(...args)\n\nfunction matchMediaFallback(query: string): MediaQueryList {\n if (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.warn('warning: matchMedia implementation is not provided.')\n }\n return {\n addListener: () => {},\n removeListener: () => {},\n matches: false,\n }\n}\n\nexport function setupMatchMedia(_: MatchMedia) {\n matchMediaImpl = _\n // @ts-ignore\n globalThis['matchMedia'] = _\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,EAAA,oBAAAC,IAAA,eAAAC,EAAAJ,GAEA,IAAIK,EAA6BC,EAE1B,MAAMJ,EAAyB,IAAIK,IAASF,EAAe,GAAGE,CAAI,EAEzE,SAASD,EAAmBE,EAA+B,CACzD,OAAI,QAAQ,IAAI,WAAa,eAE3B,QAAQ,KAAK,qDAAqD,EAE7D,CACL,YAAa,IAAM,CAAC,EACpB,eAAgB,IAAM,CAAC,EACvB,QAAS,EACX,CACF,CAEO,SAASL,EAAgBM,EAAe,CAC7CJ,EAAiBI,EAEjB,WAAW,WAAgBA,CAC7B",
|
|
6
|
+
"names": ["matchMedia_native_exports", "__export", "matchMedia", "setupMatchMedia", "__toCommonJS", "matchMediaImpl", "matchMediaFallback", "args", "query", "_"]
|
|
7
7
|
}
|
|
@@ -1,54 +1,2 @@
|
|
|
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 mergeProps_exports = {};
|
|
20
|
-
__export(mergeProps_exports, {
|
|
21
|
-
mergeProps: () => mergeProps
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(mergeProps_exports);
|
|
24
|
-
const mergeProps = (a, b, leaveOutClassNames = false, inverseShorthands) => {
|
|
25
|
-
const out = {};
|
|
26
|
-
const outCns = leaveOutClassNames ? {} : null;
|
|
27
|
-
for (const key in a) {
|
|
28
|
-
mergeProp(out, outCns, a, b, key, leaveOutClassNames, inverseShorthands);
|
|
29
|
-
}
|
|
30
|
-
for (const key in b) {
|
|
31
|
-
mergeProp(out, outCns, b, void 0, key, leaveOutClassNames, inverseShorthands);
|
|
32
|
-
}
|
|
33
|
-
return [out, outCns];
|
|
34
|
-
};
|
|
35
|
-
function mergeProp(out, outCns, a, b, key, leaveOutClassNames, inverseShorthands) {
|
|
36
|
-
const val = a[key];
|
|
37
|
-
const shorthand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null;
|
|
38
|
-
if (b && (key in b || shorthand && shorthand in b)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (shorthand) {
|
|
42
|
-
key = shorthand;
|
|
43
|
-
}
|
|
44
|
-
if (leaveOutClassNames && (val == null ? void 0 : val[0]) === "_") {
|
|
45
|
-
outCns[key] = val;
|
|
46
|
-
} else {
|
|
47
|
-
out[key] = val;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
mergeProps
|
|
53
|
-
});
|
|
1
|
+
"use strict";var i=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var j=(c,o)=>{for(var t in o)i(c,t,{get:o[t],enumerable:!0})},p=(c,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of A(o))!g.call(c,n)&&n!==t&&i(c,n,{get:()=>o[n],enumerable:!(r=y(o,n))||r.enumerable});return c};var l=c=>p(i({},"__esModule",{value:!0}),c);var P={};j(P,{mergeProps:()=>O});module.exports=l(P);const O=(c,o,t=!1,r)=>{const n={},f=t?{}:null;for(const e in c)u(n,f,c,o,e,t,r);for(const e in o)u(n,f,o,void 0,e,t,r);return[n,f]};function u(c,o,t,r,n,f,e){const d=t[n],R=(e==null?void 0:e[n])||null;r&&(n in r||R&&R in r)||(R&&(n=R),f&&(d==null?void 0:d[0])==="_"?o[n]=d:c[n]=d)}0&&(module.exports={mergeProps});
|
|
54
2
|
//# sourceMappingURL=mergeProps.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/mergeProps.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Preserves prop ordering, so that the order most closely matches the last spread objects\n * Useful for having { ...defaultProps, ...props } that ensure props ordering is always kept\n *\n * Given:\n * mergeProps({ a: 1, b: 2 }, { b: 1, a: 2 })\n * The final key order will be:\n * b, a\n *\n * Handles a couple special tamagui cases\n * - classNames can be extracted out separately\n * - shorthands can be expanded before merging\n */\n\ntype AnyRecord = Record<string, any>\n\nexport const mergeProps = (\n a: Object,\n b: Object,\n leaveOutClassNames = false,\n inverseShorthands?: AnyRecord\n) => {\n const out: AnyRecord = {}\n const outCns: AnyRecord = leaveOutClassNames ? {} : (null as any)\n for (const key in a) {\n mergeProp(out, outCns, a, b, key, leaveOutClassNames, inverseShorthands)\n }\n for (const key in b) {\n mergeProp(out, outCns, b, undefined, key, leaveOutClassNames, inverseShorthands)\n }\n return [out, outCns] as const\n}\n\nfunction mergeProp(\n out: AnyRecord,\n outCns: AnyRecord,\n a: Object,\n b: Object | undefined,\n key: string,\n leaveOutClassNames: boolean,\n inverseShorthands?: AnyRecord\n) {\n const val = a[key]\n const shorthand = inverseShorthands?.[key] || null\n if (b && (key in b || (shorthand && shorthand in b))) {\n return\n }\n if (shorthand) {\n key = shorthand\n }\n if (leaveOutClassNames && val?.[0] === '_') {\n outCns[key] = val\n } else {\n out[key] = val\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAgBO,MAAME,EAAa,CACxBE,EACAC,EACAC,EAAqB,GACrBC,IACG,CACH,MAAMC,EAAiB,CAAC,EAClBC,EAAoBH,EAAqB,CAAC,EAAK,KACrD,UAAWI,KAAON,EAChBO,EAAUH,EAAKC,EAAQL,EAAGC,EAAGK,EAAKJ,EAAoBC,CAAiB,EAEzE,UAAWG,KAAOL,EAChBM,EAAUH,EAAKC,EAAQJ,EAAG,OAAWK,EAAKJ,EAAoBC,CAAiB,EAEjF,MAAO,CAACC,EAAKC,CAAM,CACrB,EAEA,SAASE,EACPH,EACAC,EACAL,EACAC,EACAK,EACAJ,EACAC,EACA,CACA,MAAMK,EAAMR,EAAEM,CAAG,EACXG,GAAYN,GAAA,YAAAA,EAAoBG,KAAQ,KAC1CL,IAAMK,KAAOL,GAAMQ,GAAaA,KAAaR,KAG7CQ,IACFH,EAAMG,GAEJP,IAAsBM,GAAA,YAAAA,EAAM,MAAO,IACrCH,EAAOC,CAAG,EAAIE,EAEdJ,EAAIE,CAAG,EAAIE,EAEf",
|
|
6
|
+
"names": ["mergeProps_exports", "__export", "mergeProps", "__toCommonJS", "a", "b", "leaveOutClassNames", "inverseShorthands", "out", "outCns", "key", "mergeProp", "val", "shorthand"]
|
|
7
7
|
}
|
|
@@ -1,67 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var normalizeColor_exports = {};
|
|
30
|
-
__export(normalizeColor_exports, {
|
|
31
|
-
names: () => names,
|
|
32
|
-
normalizeColor: () => normalizeColor,
|
|
33
|
-
rgba: () => rgba
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(normalizeColor_exports);
|
|
36
|
-
var import_constants = require("@tamagui/constants");
|
|
37
|
-
var NCC = __toESM(require("@tamagui/normalize-css-color"));
|
|
38
|
-
const rgba = NCC.rgba;
|
|
39
|
-
const names = NCC.names;
|
|
40
|
-
const normalizeColor = (color, opacity) => {
|
|
41
|
-
if (!color)
|
|
42
|
-
return;
|
|
43
|
-
if (color[0] === "$")
|
|
44
|
-
return color;
|
|
45
|
-
if (import_constants.isWeb && opacity === 1)
|
|
46
|
-
return color;
|
|
47
|
-
const colorProcessed = NCC.normalizeCSSColor(color);
|
|
48
|
-
if (typeof colorProcessed === "number") {
|
|
49
|
-
const { r, g, b, a } = rgba(colorProcessed);
|
|
50
|
-
const alpha = (opacity ?? a ?? 1).toFixed(2);
|
|
51
|
-
return `rgba(${r},${g},${b},${alpha})`;
|
|
52
|
-
}
|
|
53
|
-
if (process.env.TAMAGUI_TARGET === "native") {
|
|
54
|
-
if (process.env.NODE_ENV === "development") {
|
|
55
|
-
console.warn(`Unknown color value: ${color}`);
|
|
56
|
-
}
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
return color;
|
|
60
|
-
};
|
|
61
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
-
0 && (module.exports = {
|
|
63
|
-
names,
|
|
64
|
-
normalizeColor,
|
|
65
|
-
rgba
|
|
66
|
-
});
|
|
1
|
+
"use strict";var l=Object.create;var s=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var C=(e,r)=>{for(var n in r)s(e,n,{get:r[n],enumerable:!0})},i=(e,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of c(r))!v.call(e,t)&&t!==n&&s(e,t,{get:()=>r[t],enumerable:!(o=$(r,t))||o.enumerable});return e};var x=(e,r,n)=>(n=e!=null?l(g(e)):{},i(r||!e||!e.__esModule?s(n,"default",{value:e,enumerable:!0}):n,e)),d=e=>i(s({},"__esModule",{value:!0}),e);var N={};C(N,{names:()=>A,normalizeColor:()=>E,rgba:()=>u});module.exports=d(N);var m=require("@tamagui/constants"),a=x(require("@tamagui/normalize-css-color"));const u=a.rgba,A=a.names,E=(e,r)=>{if(!e)return;if(e[0]==="$"||m.isWeb&&r===1)return e;const n=a.normalizeCSSColor(e);if(typeof n=="number"){const{r:o,g:t,b:f,a:p}=u(n),b=(r??p??1).toFixed(2);return`rgba(${o},${t},${f},${b})`}if(process.env.TAMAGUI_TARGET==="native"){process.env.NODE_ENV==="development"&&console.warn(`Unknown color value: ${e}`);return}return e};0&&(module.exports={names,normalizeColor,rgba});
|
|
67
2
|
//# sourceMappingURL=normalizeColor.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/normalizeColor.ts"],
|
|
4
4
|
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\nimport * as NCC from '@tamagui/normalize-css-color'\n\nexport const rgba = NCC.rgba\nexport const names = NCC.names\n\nexport const normalizeColor = (color?: string | null, opacity?: number) => {\n if (!color) return\n if (color[0] === '$') return color\n if (isWeb && opacity === 1) return color\n const colorProcessed = NCC.normalizeCSSColor(color)\n if (typeof colorProcessed === 'number') {\n const { r, g, b, a } = rgba(colorProcessed)\n const alpha = (opacity ?? a ?? 1).toFixed(2)\n return `rgba(${r},${g},${b},${alpha})`\n }\n if (process.env.TAMAGUI_TARGET === 'native') {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`Unknown color value: ${color}`)\n }\n // avoids errors\n return\n }\n return color\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,mBAAAC,EAAA,SAAAC,IAAA,eAAAC,EAAAL,GAAA,IAAAM,EAAsB,8BACtBC,EAAqB,2CAEd,MAAMH,EAAOG,EAAI,KACXL,EAAQK,EAAI,MAEZJ,EAAiB,CAACK,EAAuBC,IAAqB,CACzE,GAAI,CAACD,EAAO,OAEZ,GADIA,EAAM,CAAC,IAAM,KACb,SAASC,IAAY,EAAG,OAAOD,EACnC,MAAME,EAAiBH,EAAI,kBAAkBC,CAAK,EAClD,GAAI,OAAOE,GAAmB,SAAU,CACtC,KAAM,CAAE,EAAAC,EAAG,EAAAC,EAAG,EAAAC,EAAG,EAAAC,CAAE,EAAIV,EAAKM,CAAc,EACpCK,GAASN,GAAWK,GAAK,GAAG,QAAQ,CAAC,EAC3C,MAAO,QAAQH,KAAKC,KAAKC,KAAKE,IAChC,CACA,GAAI,QAAQ,IAAI,iBAAmB,SAAU,CACvC,QAAQ,IAAI,WAAa,eAC3B,QAAQ,KAAK,wBAAwBP,GAAO,EAG9C,MACF,CACA,OAAOA,CACT",
|
|
6
|
+
"names": ["normalizeColor_exports", "__export", "names", "normalizeColor", "rgba", "__toCommonJS", "import_constants", "NCC", "color", "opacity", "colorProcessed", "r", "g", "b", "a", "alpha"]
|
|
7
7
|
}
|
|
@@ -1,47 +1,2 @@
|
|
|
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 normalizeShadow_exports = {};
|
|
20
|
-
__export(normalizeShadow_exports, {
|
|
21
|
-
normalizeShadow: () => normalizeShadow
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(normalizeShadow_exports);
|
|
24
|
-
var import_defaultOffset = require("./defaultOffset.js");
|
|
25
|
-
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.js");
|
|
26
|
-
function normalizeShadow({
|
|
27
|
-
shadowColor,
|
|
28
|
-
shadowOffset,
|
|
29
|
-
shadowOpacity = 1,
|
|
30
|
-
shadowRadius
|
|
31
|
-
}) {
|
|
32
|
-
const { height, width } = shadowOffset || import_defaultOffset.defaultOffset;
|
|
33
|
-
return {
|
|
34
|
-
shadowOffset: {
|
|
35
|
-
width: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width || 0),
|
|
36
|
-
height: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height || 0)
|
|
37
|
-
},
|
|
38
|
-
shadowRadius: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0),
|
|
39
|
-
shadowColor,
|
|
40
|
-
shadowOpacity
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
normalizeShadow
|
|
46
|
-
});
|
|
1
|
+
"use strict";var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var u=(o,t)=>{for(var e in t)a(o,e,{get:t[e],enumerable:!0})},w=(o,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of s(t))!m.call(o,r)&&r!==e&&a(o,r,{get:()=>t[r],enumerable:!(i=n(t,r))||i.enumerable});return o};var l=o=>w(a({},"__esModule",{value:!0}),o);var c={};u(c,{normalizeShadow:()=>p});module.exports=l(c);var d=require("./defaultOffset.js"),h=require("./normalizeValueWithProperty.js");function p({shadowColor:o,shadowOffset:t,shadowOpacity:e=1,shadowRadius:i}){const{height:r,width:f}=t||d.defaultOffset;return{shadowOffset:{width:(0,h.normalizeValueWithProperty)(f||0),height:(0,h.normalizeValueWithProperty)(r||0)},shadowRadius:(0,h.normalizeValueWithProperty)(i||0),shadowColor:o,shadowOpacity:e}}0&&(module.exports={normalizeShadow});
|
|
47
2
|
//# sourceMappingURL=normalizeShadow.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/normalizeShadow.ts"],
|
|
4
4
|
"sourcesContent": ["import { defaultOffset } from './defaultOffset.js'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\n\nexport function normalizeShadow({\n shadowColor,\n shadowOffset,\n shadowOpacity = 1,\n shadowRadius,\n}: Record<string, any>) {\n const { height, width } = shadowOffset || defaultOffset\n return {\n shadowOffset: {\n width: normalizeValueWithProperty(width || 0),\n height: normalizeValueWithProperty(height || 0),\n },\n shadowRadius: normalizeValueWithProperty(shadowRadius || 0),\n shadowColor,\n shadowOpacity,\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA8B,8BAC9BC,EAA2C,2CAEpC,SAASH,EAAgB,CAC9B,YAAAI,EACA,aAAAC,EACA,cAAAC,EAAgB,EAChB,aAAAC,CACF,EAAwB,CACtB,KAAM,CAAE,OAAAC,EAAQ,MAAAC,CAAM,EAAIJ,GAAgB,gBAC1C,MAAO,CACL,aAAc,CACZ,SAAO,8BAA2BI,GAAS,CAAC,EAC5C,UAAQ,8BAA2BD,GAAU,CAAC,CAChD,EACA,gBAAc,8BAA2BD,GAAgB,CAAC,EAC1D,YAAAH,EACA,cAAAE,CACF,CACF",
|
|
6
|
+
"names": ["normalizeShadow_exports", "__export", "normalizeShadow", "__toCommonJS", "import_defaultOffset", "import_normalizeValueWithProperty", "shadowColor", "shadowOffset", "shadowOpacity", "shadowRadius", "height", "width"]
|
|
7
7
|
}
|
|
@@ -1,55 +1,2 @@
|
|
|
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 normalizeShadow_native_exports = {};
|
|
20
|
-
__export(normalizeShadow_native_exports, {
|
|
21
|
-
normalizeShadow: () => normalizeShadow
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(normalizeShadow_native_exports);
|
|
24
|
-
var import_normalize_css_color = require("@tamagui/normalize-css-color");
|
|
25
|
-
var import_defaultOffset = require("./defaultOffset.js");
|
|
26
|
-
var import_normalizeColor = require("./normalizeColor.js");
|
|
27
|
-
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.js");
|
|
28
|
-
function normalizeShadow({
|
|
29
|
-
shadowColor,
|
|
30
|
-
shadowOffset,
|
|
31
|
-
shadowOpacity,
|
|
32
|
-
shadowRadius
|
|
33
|
-
}) {
|
|
34
|
-
const { height, width } = shadowOffset || import_defaultOffset.defaultOffset;
|
|
35
|
-
const colorStr = String(shadowColor || "black");
|
|
36
|
-
const val = (0, import_normalize_css_color.normalizeCSSColor)(colorStr);
|
|
37
|
-
if (typeof val !== "number") {
|
|
38
|
-
throw new Error(`invalid shadow color ${colorStr}`);
|
|
39
|
-
}
|
|
40
|
-
const { r, g, b, a } = (0, import_normalizeColor.rgba)(val);
|
|
41
|
-
return {
|
|
42
|
-
shadowOffset: {
|
|
43
|
-
width: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width || 0),
|
|
44
|
-
height: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height || 0)
|
|
45
|
-
},
|
|
46
|
-
shadowRadius: (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0),
|
|
47
|
-
shadowColor: `rgb(${r},${g},${b})`,
|
|
48
|
-
shadowOpacity: shadowOpacity ?? a
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
-
0 && (module.exports = {
|
|
53
|
-
normalizeShadow
|
|
54
|
-
});
|
|
1
|
+
"use strict";var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var y=(r,o)=>{for(var i in o)n(r,i,{get:o[i],enumerable:!0})},$=(r,o,i,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of b(o))!S.call(r,t)&&t!==i&&n(r,t,{get:()=>o[t],enumerable:!(a=u(o,t))||a.enumerable});return r};var z=r=>$(n({},"__esModule",{value:!0}),r);var O={};y(O,{normalizeShadow:()=>C});module.exports=z(O);var d=require("@tamagui/normalize-css-color"),f=require("./defaultOffset.js"),l=require("./normalizeColor.js"),e=require("./normalizeValueWithProperty.js");function C({shadowColor:r,shadowOffset:o,shadowOpacity:i,shadowRadius:a}){const{height:t,width:m}=o||f.defaultOffset,h=String(r||"black"),s=(0,d.normalizeCSSColor)(h);if(typeof s!="number")throw new Error(`invalid shadow color ${h}`);const{r:c,g:w,b:p,a:g}=(0,l.rgba)(s);return{shadowOffset:{width:(0,e.normalizeValueWithProperty)(m||0),height:(0,e.normalizeValueWithProperty)(t||0)},shadowRadius:(0,e.normalizeValueWithProperty)(a||0),shadowColor:`rgb(${c},${w},${p})`,shadowOpacity:i??g}}0&&(module.exports={normalizeShadow});
|
|
55
2
|
//# sourceMappingURL=normalizeShadow.native.js.map
|