@tamagui/web 1.110.5 → 1.111.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.native.js +3 -12
- package/dist/cjs/Tamagui.native.js.map +1 -1
- package/dist/cjs/_withStableStyle.native.js +6 -44
- package/dist/cjs/_withStableStyle.native.js.map +1 -1
- package/dist/cjs/config.js +15 -4
- package/dist/cjs/config.js.map +1 -1
- package/dist/cjs/config.native.js +20 -51
- package/dist/cjs/config.native.js.map +2 -2
- package/dist/cjs/constants/webToNativeProps.native.js +1 -1
- package/dist/cjs/constants/webToNativeProps.native.js.map +1 -1
- package/dist/cjs/createComponent.native.js +195 -444
- package/dist/cjs/createComponent.native.js.map +2 -2
- package/dist/cjs/createFont.native.js +7 -55
- package/dist/cjs/createFont.native.js.map +1 -1
- package/dist/cjs/createTamagui.native.js +50 -125
- package/dist/cjs/createTamagui.native.js.map +2 -2
- package/dist/cjs/createVariable.native.js +5 -9
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/createVariables.native.js +4 -9
- package/dist/cjs/createVariables.native.js.map +1 -1
- package/dist/cjs/defaultComponentState.native.js +5 -37
- package/dist/cjs/defaultComponentState.native.js.map +1 -1
- package/dist/cjs/helpers/ThemeManager.native.js +18 -67
- package/dist/cjs/helpers/ThemeManager.native.js.map +2 -2
- package/dist/cjs/helpers/createMediaStyle.native.js +11 -53
- package/dist/cjs/helpers/createMediaStyle.native.js.map +2 -2
- package/dist/cjs/helpers/createShallowSetState.native.js +5 -22
- package/dist/cjs/helpers/createShallowSetState.native.js.map +1 -1
- package/dist/cjs/helpers/createStyledContext.native.js +6 -46
- package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.native.js +16 -35
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/getGroupPropParts.native.js +1 -42
- package/dist/cjs/helpers/getGroupPropParts.native.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.native.js +75 -131
- package/dist/cjs/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/cjs/helpers/getVariantExtras.native.js +15 -73
- package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.native.js +12 -67
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/isObj.native.js +1 -5
- package/dist/cjs/helpers/isObj.native.js.map +1 -1
- package/dist/cjs/helpers/log.native.js +1 -29
- package/dist/cjs/helpers/log.native.js.map +1 -1
- package/dist/cjs/helpers/matchMedia.native.js +1 -26
- package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.native.js +5 -22
- package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
- package/dist/cjs/helpers/mergeVariants.native.js +8 -21
- package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeColor.native.js +3 -3
- package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
- package/dist/cjs/helpers/normalizeShadow.native.js +1 -1
- package/dist/cjs/helpers/normalizeShadow.native.js.map +2 -2
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +5 -43
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/objectIdentityKey.native.js +1 -5
- package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/cjs/helpers/propMapper.native.js +18 -64
- package/dist/cjs/helpers/propMapper.native.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeToParents.native.js +3 -3
- package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeVariables.native.js +2 -2
- package/dist/cjs/helpers/proxyThemeVariables.native.js.map +1 -1
- package/dist/cjs/helpers/pseudoDescriptors.native.js +3 -36
- package/dist/cjs/helpers/pseudoDescriptors.native.js.map +1 -1
- package/dist/cjs/helpers/registerCSSVariable.native.js +1 -1
- package/dist/cjs/helpers/registerCSSVariable.native.js.map +2 -2
- package/dist/cjs/helpers/themeable.native.js +6 -62
- package/dist/cjs/helpers/themeable.native.js.map +1 -1
- package/dist/cjs/helpers/transformsToString.native.js +1 -1
- package/dist/cjs/helpers/transformsToString.native.js.map +1 -1
- package/dist/cjs/hooks/useConfiguration.native.js +6 -61
- package/dist/cjs/hooks/useConfiguration.native.js.map +2 -2
- package/dist/cjs/hooks/useMedia.native.js +31 -108
- package/dist/cjs/hooks/useMedia.native.js.map +2 -2
- package/dist/cjs/hooks/useProps.native.js +18 -96
- package/dist/cjs/hooks/useProps.native.js.map +2 -2
- package/dist/cjs/hooks/useTheme.native.js +95 -176
- package/dist/cjs/hooks/useTheme.native.js.map +2 -2
- package/dist/cjs/hooks/useThemeName.native.js +1 -42
- package/dist/cjs/hooks/useThemeName.native.js.map +2 -2
- package/dist/cjs/inject-styles.native.js +1 -1
- package/dist/cjs/inject-styles.native.js.map +1 -1
- package/dist/cjs/insertFont.native.js +1 -1
- package/dist/cjs/insertFont.native.js.map +1 -1
- package/dist/cjs/styled.native.js +16 -65
- package/dist/cjs/styled.native.js.map +2 -2
- package/dist/cjs/views/Configuration.native.js +5 -22
- package/dist/cjs/views/Configuration.native.js.map +1 -1
- package/dist/cjs/views/FontLanguage.native.js +2 -22
- package/dist/cjs/views/FontLanguage.native.js.map +1 -1
- package/dist/cjs/views/Slot.native.js +17 -62
- package/dist/cjs/views/Slot.native.js.map +1 -1
- package/dist/cjs/views/Stack.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.native.js +2 -43
- package/dist/cjs/views/TamaguiProvider.native.js.map +2 -2
- package/dist/cjs/views/Text.native.js +9 -41
- package/dist/cjs/views/Text.native.js.map +2 -2
- package/dist/cjs/views/Theme.native.js +12 -38
- package/dist/cjs/views/Theme.native.js.map +2 -2
- package/dist/cjs/views/ThemeDebug.native.js +1 -1
- package/dist/cjs/views/ThemeDebug.native.js.map +1 -1
- package/dist/cjs/views/ThemeProvider.native.js +1 -1
- package/dist/cjs/views/ThemeProvider.native.js.map +1 -1
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/Tamagui.native.js +3 -12
- package/dist/esm/Tamagui.native.js.map +1 -1
- package/dist/esm/Tamagui.native.mjs +84 -0
- package/dist/esm/Tamagui.native.mjs.map +1 -0
- package/dist/esm/_withStableStyle.native.js +5 -42
- package/dist/esm/_withStableStyle.native.js.map +1 -1
- package/dist/esm/_withStableStyle.native.mjs +19 -0
- package/dist/esm/_withStableStyle.native.mjs.map +1 -0
- package/dist/esm/config.js +15 -4
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/config.mjs +16 -4
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +21 -51
- package/dist/esm/config.native.js.map +2 -2
- package/dist/esm/config.native.mjs +93 -0
- package/dist/esm/config.native.mjs.map +1 -0
- package/dist/esm/constants/accessibilityDirectMap.native.mjs +7 -0
- package/dist/esm/constants/accessibilityDirectMap.native.mjs.map +1 -0
- package/dist/esm/constants/constants.native.mjs +17 -0
- package/dist/esm/constants/constants.native.mjs.map +1 -0
- package/dist/esm/constants/isDevTools.native.mjs +8 -0
- package/dist/esm/constants/isDevTools.native.mjs.map +1 -0
- package/dist/esm/constants/webToNativeProps.native.js +1 -1
- package/dist/esm/constants/webToNativeProps.native.js.map +1 -1
- package/dist/esm/constants/webToNativeProps.native.mjs +88 -0
- package/dist/esm/constants/webToNativeProps.native.mjs.map +1 -0
- package/dist/esm/contexts/ComponentContext.native.mjs +14 -0
- package/dist/esm/contexts/ComponentContext.native.mjs.map +1 -0
- package/dist/esm/createComponent.native.js +212 -460
- package/dist/esm/createComponent.native.js.map +2 -2
- package/dist/esm/createComponent.native.mjs +969 -0
- package/dist/esm/createComponent.native.mjs.map +1 -0
- package/dist/esm/createFont.native.js +7 -55
- package/dist/esm/createFont.native.js.map +1 -1
- package/dist/esm/createFont.native.mjs +24 -0
- package/dist/esm/createFont.native.mjs.map +1 -0
- package/dist/esm/createShorthands.native.mjs +5 -0
- package/dist/esm/createShorthands.native.mjs.map +1 -0
- package/dist/esm/createTamagui.native.js +50 -124
- package/dist/esm/createTamagui.native.js.map +2 -2
- package/dist/esm/createTamagui.native.mjs +253 -0
- package/dist/esm/createTamagui.native.mjs.map +1 -0
- package/dist/esm/createTheme.native.mjs +5 -0
- package/dist/esm/createTheme.native.mjs.map +1 -0
- package/dist/esm/createTokens.native.mjs +6 -0
- package/dist/esm/createTokens.native.mjs.map +1 -0
- package/dist/esm/createVariable.native.js +5 -9
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/createVariable.native.mjs +68 -0
- package/dist/esm/createVariable.native.mjs.map +1 -0
- package/dist/esm/createVariables.native.js +3 -7
- package/dist/esm/createVariables.native.js.map +1 -1
- package/dist/esm/createVariables.native.mjs +36 -0
- package/dist/esm/createVariables.native.mjs.map +1 -0
- package/dist/esm/defaultComponentState.native.js +5 -37
- package/dist/esm/defaultComponentState.native.js.map +1 -1
- package/dist/esm/defaultComponentState.native.mjs +19 -0
- package/dist/esm/defaultComponentState.native.mjs.map +1 -0
- package/dist/esm/helpers/ThemeManager.native.js +23 -72
- package/dist/esm/helpers/ThemeManager.native.js.map +2 -2
- package/dist/esm/helpers/ThemeManager.native.mjs +220 -0
- package/dist/esm/helpers/ThemeManager.native.mjs.map +1 -0
- package/dist/esm/helpers/ThemeManagerContext.native.mjs +4 -0
- package/dist/esm/helpers/ThemeManagerContext.native.mjs.map +1 -0
- package/dist/esm/helpers/createMediaStyle.native.js +10 -51
- package/dist/esm/helpers/createMediaStyle.native.js.map +1 -1
- package/dist/esm/helpers/createMediaStyle.native.mjs +84 -0
- package/dist/esm/helpers/createMediaStyle.native.mjs.map +1 -0
- package/dist/esm/helpers/createShallowSetState.native.js +4 -20
- package/dist/esm/helpers/createShallowSetState.native.js.map +1 -1
- package/dist/esm/helpers/createShallowSetState.native.mjs +31 -0
- package/dist/esm/helpers/createShallowSetState.native.mjs.map +1 -0
- package/dist/esm/helpers/createStyledContext.native.js +6 -46
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.mjs +39 -0
- package/dist/esm/helpers/createStyledContext.native.mjs.map +1 -0
- package/dist/esm/helpers/defaultOffset.native.mjs +6 -0
- package/dist/esm/helpers/defaultOffset.native.mjs.map +1 -0
- package/dist/esm/helpers/expandStyle.native.js +15 -33
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.native.mjs +46 -0
- package/dist/esm/helpers/expandStyle.native.mjs.map +1 -0
- package/dist/esm/helpers/expandStyles.native.mjs +19 -0
- package/dist/esm/helpers/expandStyles.native.mjs.map +1 -0
- package/dist/esm/helpers/getExpandedShorthands.native.mjs +10 -0
- package/dist/esm/helpers/getExpandedShorthands.native.mjs.map +1 -0
- package/dist/esm/helpers/getFontLanguage.native.mjs +5 -0
- package/dist/esm/helpers/getFontLanguage.native.mjs.map +1 -0
- package/dist/esm/helpers/getGroupPropParts.native.js +1 -42
- package/dist/esm/helpers/getGroupPropParts.native.js.map +2 -2
- package/dist/esm/helpers/getGroupPropParts.native.mjs +14 -0
- package/dist/esm/helpers/getGroupPropParts.native.mjs.map +1 -0
- package/dist/esm/helpers/getSplitStyles.native.js +84 -139
- package/dist/esm/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.native.mjs +683 -0
- package/dist/esm/helpers/getSplitStyles.native.mjs.map +1 -0
- package/dist/esm/helpers/getStylesAtomic.native.mjs +8 -0
- package/dist/esm/helpers/getStylesAtomic.native.mjs.map +1 -0
- package/dist/esm/helpers/getThemeCSSRules.native.mjs +5 -0
- package/dist/esm/helpers/getThemeCSSRules.native.mjs.map +1 -0
- package/dist/esm/helpers/getVariantExtras.native.js +15 -72
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.native.mjs +42 -0
- package/dist/esm/helpers/getVariantExtras.native.mjs.map +1 -0
- package/dist/esm/helpers/insertStyleRule.native.js +11 -65
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.mjs +312 -0
- package/dist/esm/helpers/insertStyleRule.native.mjs.map +1 -0
- package/dist/esm/helpers/isActivePlatform.native.mjs +12 -0
- package/dist/esm/helpers/isActivePlatform.native.mjs.map +1 -0
- package/dist/esm/helpers/isObj.native.js +1 -5
- package/dist/esm/helpers/isObj.native.js.map +1 -1
- package/dist/esm/helpers/isObj.native.mjs +5 -0
- package/dist/esm/helpers/isObj.native.mjs.map +1 -0
- package/dist/esm/helpers/isTamaguiComponent.native.js +1 -1
- package/dist/esm/helpers/isTamaguiComponent.native.js.map +1 -1
- package/dist/esm/helpers/isTamaguiComponent.native.mjs +6 -0
- package/dist/esm/helpers/isTamaguiComponent.native.mjs.map +1 -0
- package/dist/esm/helpers/isTamaguiElement.native.mjs +7 -0
- package/dist/esm/helpers/isTamaguiElement.native.mjs.map +1 -0
- package/dist/esm/helpers/log.native.js +1 -29
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/log.native.mjs +14 -0
- package/dist/esm/helpers/log.native.mjs.map +1 -0
- package/dist/esm/helpers/matchMedia.native.js +1 -26
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/matchMedia.native.mjs +20 -0
- package/dist/esm/helpers/matchMedia.native.mjs.map +1 -0
- package/dist/esm/helpers/mergeProps.native.js +5 -21
- package/dist/esm/helpers/mergeProps.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.native.mjs +22 -0
- package/dist/esm/helpers/mergeProps.native.mjs.map +1 -0
- package/dist/esm/helpers/mergeVariants.native.js +9 -22
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.mjs +18 -0
- package/dist/esm/helpers/mergeVariants.native.mjs.map +1 -0
- package/dist/esm/helpers/normalizeColor.native.js +3 -3
- package/dist/esm/helpers/normalizeColor.native.js.map +1 -1
- package/dist/esm/helpers/normalizeColor.native.mjs +24 -0
- package/dist/esm/helpers/normalizeColor.native.mjs.map +1 -0
- package/dist/esm/helpers/normalizeShadow.native.js +1 -1
- package/dist/esm/helpers/normalizeShadow.native.js.map +1 -1
- package/dist/esm/helpers/normalizeShadow.native.mjs +26 -0
- package/dist/esm/helpers/normalizeShadow.native.mjs.map +1 -0
- package/dist/esm/helpers/normalizeStyle.native.mjs +26 -0
- package/dist/esm/helpers/normalizeStyle.native.mjs.map +1 -0
- package/dist/esm/helpers/normalizeStylePropKeys.native.mjs +14 -0
- package/dist/esm/helpers/normalizeStylePropKeys.native.mjs.map +1 -0
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +5 -42
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.mjs +35 -0
- package/dist/esm/helpers/normalizeValueWithProperty.native.mjs.map +1 -0
- package/dist/esm/helpers/objectIdentityKey.native.js +1 -5
- package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/esm/helpers/objectIdentityKey.native.mjs +16 -0
- package/dist/esm/helpers/objectIdentityKey.native.mjs.map +1 -0
- package/dist/esm/helpers/propMapper.native.js +22 -67
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.native.mjs +290 -0
- package/dist/esm/helpers/propMapper.native.mjs.map +1 -0
- package/dist/esm/helpers/proxyThemeToParents.native.js +3 -3
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.mjs +101 -0
- package/dist/esm/helpers/proxyThemeToParents.native.mjs.map +1 -0
- package/dist/esm/helpers/proxyThemeVariables.native.js +2 -2
- package/dist/esm/helpers/proxyThemeVariables.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeVariables.native.mjs +15 -0
- package/dist/esm/helpers/proxyThemeVariables.native.mjs.map +1 -0
- package/dist/esm/helpers/pseudoDescriptors.native.js +3 -36
- package/dist/esm/helpers/pseudoDescriptors.native.js.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.native.mjs +47 -0
- package/dist/esm/helpers/pseudoDescriptors.native.mjs.map +1 -0
- package/dist/esm/helpers/registerCSSVariable.native.js +1 -1
- package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.native.mjs +11 -0
- package/dist/esm/helpers/registerCSSVariable.native.mjs.map +1 -0
- package/dist/esm/helpers/setElementProps.native.mjs +7 -0
- package/dist/esm/helpers/setElementProps.native.mjs.map +1 -0
- package/dist/esm/helpers/skipProps.native.mjs +21 -0
- package/dist/esm/helpers/skipProps.native.mjs.map +1 -0
- package/dist/esm/helpers/themeable.native.js +7 -63
- package/dist/esm/helpers/themeable.native.js.map +1 -1
- package/dist/esm/helpers/themeable.native.mjs +36 -0
- package/dist/esm/helpers/themeable.native.mjs.map +1 -0
- package/dist/esm/helpers/themes.native.mjs +15 -0
- package/dist/esm/helpers/themes.native.mjs.map +1 -0
- package/dist/esm/helpers/timer.native.mjs +9 -0
- package/dist/esm/helpers/timer.native.mjs.map +1 -0
- package/dist/esm/helpers/transformsToString.native.js +1 -1
- package/dist/esm/helpers/transformsToString.native.js.map +1 -1
- package/dist/esm/helpers/transformsToString.native.mjs +14 -0
- package/dist/esm/helpers/transformsToString.native.mjs.map +1 -0
- package/dist/esm/helpers/webPropsToSkip.native.mjs +56 -0
- package/dist/esm/helpers/webPropsToSkip.native.mjs.map +1 -0
- package/dist/esm/hooks/useConfiguration.native.js +5 -59
- package/dist/esm/hooks/useConfiguration.native.js.map +2 -2
- package/dist/esm/hooks/useConfiguration.native.mjs +21 -0
- package/dist/esm/hooks/useConfiguration.native.mjs.map +1 -0
- package/dist/esm/hooks/useDidHydrateOnce.native.mjs +23 -0
- package/dist/esm/hooks/useDidHydrateOnce.native.mjs.map +1 -0
- package/dist/esm/hooks/useDisableSSR.native.js +1 -1
- package/dist/esm/hooks/useDisableSSR.native.js.map +1 -1
- package/dist/esm/hooks/useDisableSSR.native.mjs +7 -0
- package/dist/esm/hooks/useDisableSSR.native.mjs.map +1 -0
- package/dist/esm/hooks/useIsTouchDevice.native.mjs +7 -0
- package/dist/esm/hooks/useIsTouchDevice.native.mjs.map +1 -0
- package/dist/esm/hooks/useMedia.native.js +30 -106
- package/dist/esm/hooks/useMedia.native.js.map +2 -2
- package/dist/esm/hooks/useMedia.native.mjs +206 -0
- package/dist/esm/hooks/useMedia.native.mjs.map +1 -0
- package/dist/esm/hooks/useProps.native.js +18 -96
- package/dist/esm/hooks/useProps.native.js.map +2 -2
- package/dist/esm/hooks/useProps.native.mjs +74 -0
- package/dist/esm/hooks/useProps.native.mjs.map +1 -0
- package/dist/esm/hooks/useTheme.native.js +102 -182
- package/dist/esm/hooks/useTheme.native.js.map +2 -2
- package/dist/esm/hooks/useTheme.native.mjs +299 -0
- package/dist/esm/hooks/useTheme.native.mjs.map +1 -0
- package/dist/esm/hooks/useThemeName.native.js +3 -44
- package/dist/esm/hooks/useThemeName.native.js.map +2 -2
- package/dist/esm/hooks/useThemeName.native.mjs +16 -0
- package/dist/esm/hooks/useThemeName.native.mjs.map +1 -0
- package/dist/esm/index.native.mjs +66 -0
- package/dist/esm/index.native.mjs.map +1 -0
- package/dist/esm/inject-styles.native.js +1 -1
- package/dist/esm/inject-styles.native.js.map +1 -1
- package/dist/esm/inject-styles.native.mjs +15 -0
- package/dist/esm/inject-styles.native.mjs.map +1 -0
- package/dist/esm/insertFont.native.js +1 -1
- package/dist/esm/insertFont.native.js.map +1 -1
- package/dist/esm/insertFont.native.mjs +44 -0
- package/dist/esm/insertFont.native.mjs.map +1 -0
- package/dist/esm/interfaces/CSSColorNames.native.mjs +2 -0
- package/dist/esm/interfaces/CSSColorNames.native.mjs.map +1 -0
- package/dist/esm/interfaces/GetRef.native.mjs +2 -0
- package/dist/esm/interfaces/GetRef.native.mjs.map +1 -0
- package/dist/esm/interfaces/KeyTypes.native.mjs +2 -0
- package/dist/esm/interfaces/KeyTypes.native.mjs.map +1 -0
- package/dist/esm/interfaces/RNExclusiveTypes.native.mjs +2 -0
- package/dist/esm/interfaces/RNExclusiveTypes.native.mjs.map +1 -0
- package/dist/esm/interfaces/Role.native.mjs +2 -0
- package/dist/esm/interfaces/Role.native.mjs.map +1 -0
- package/dist/esm/interfaces/TamaguiComponentEvents.native.mjs +2 -0
- package/dist/esm/interfaces/TamaguiComponentEvents.native.mjs.map +1 -0
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.mjs +2 -0
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.mjs.map +1 -0
- package/dist/esm/interfaces/TamaguiComponentState.native.mjs +2 -0
- package/dist/esm/interfaces/TamaguiComponentState.native.mjs.map +1 -0
- package/dist/esm/interfaces/WebOnlyPressEvents.native.mjs +2 -0
- package/dist/esm/interfaces/WebOnlyPressEvents.native.mjs.map +1 -0
- package/dist/esm/setupHooks.native.mjs +7 -0
- package/dist/esm/setupHooks.native.mjs.map +1 -0
- package/dist/esm/setupReactNative.native.mjs +29 -0
- package/dist/esm/setupReactNative.native.mjs.map +1 -0
- package/dist/esm/styled.native.js +19 -68
- package/dist/esm/styled.native.js.map +2 -2
- package/dist/esm/styled.native.mjs +72 -0
- package/dist/esm/styled.native.mjs.map +1 -0
- package/dist/esm/type-utils.native.mjs +2 -0
- package/dist/esm/type-utils.native.mjs.map +1 -0
- package/dist/esm/types.native.mjs +3 -0
- package/dist/esm/types.native.mjs.map +1 -0
- package/dist/esm/views/Configuration.native.js +4 -20
- package/dist/esm/views/Configuration.native.js.map +1 -1
- package/dist/esm/views/Configuration.native.mjs +13 -0
- package/dist/esm/views/Configuration.native.mjs.map +1 -0
- package/dist/esm/views/FontLanguage.native.js +2 -21
- package/dist/esm/views/FontLanguage.native.js.map +1 -1
- package/dist/esm/views/FontLanguage.native.mjs +19 -0
- package/dist/esm/views/FontLanguage.native.mjs.map +1 -0
- package/dist/esm/views/FontLanguage.types.native.mjs +2 -0
- package/dist/esm/views/FontLanguage.types.native.mjs.map +1 -0
- package/dist/esm/views/Slot.native.js +16 -60
- package/dist/esm/views/Slot.native.js.map +1 -1
- package/dist/esm/views/Slot.native.mjs +59 -0
- package/dist/esm/views/Slot.native.mjs.map +1 -0
- package/dist/esm/views/Stack.native.mjs +11 -0
- package/dist/esm/views/Stack.native.mjs.map +1 -0
- package/dist/esm/views/TamaguiProvider.native.js +3 -44
- package/dist/esm/views/TamaguiProvider.native.js.map +2 -2
- package/dist/esm/views/TamaguiProvider.native.mjs +55 -0
- package/dist/esm/views/TamaguiProvider.native.mjs.map +1 -0
- package/dist/esm/views/Text.native.js +9 -41
- package/dist/esm/views/Text.native.js.map +2 -2
- package/dist/esm/views/Text.native.mjs +33 -0
- package/dist/esm/views/Text.native.mjs.map +1 -0
- package/dist/esm/views/Theme.native.js +12 -37
- package/dist/esm/views/Theme.native.js.map +2 -2
- package/dist/esm/views/Theme.native.mjs +123 -0
- package/dist/esm/views/Theme.native.mjs.map +1 -0
- package/dist/esm/views/ThemeDebug.native.js +1 -1
- package/dist/esm/views/ThemeDebug.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.native.mjs +11 -0
- package/dist/esm/views/ThemeDebug.native.mjs.map +1 -0
- package/dist/esm/views/ThemeProvider.native.js +1 -1
- package/dist/esm/views/ThemeProvider.native.js.map +1 -1
- package/dist/esm/views/ThemeProvider.native.mjs +28 -0
- package/dist/esm/views/ThemeProvider.native.mjs.map +1 -0
- package/dist/esm/views/View.native.mjs +10 -0
- package/dist/esm/views/View.native.mjs.map +1 -0
- package/package.json +11 -11
- package/src/config.ts +19 -3
- package/types/config.d.ts.map +1 -1
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { isAndroid, isClient, isServer, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
3
|
+
import { StyleObjectIdentifier, StyleObjectProperty, StyleObjectPseudo, stylePropsText, stylePropsTransform, tokenCategories, validPseudoKeys, validStyles } from "@tamagui/helpers";
|
|
4
|
+
import { getConfig, getFont } from "../config.mjs";
|
|
5
|
+
import "../constants/accessibilityDirectMap.mjs";
|
|
6
|
+
import "../constants/constants.mjs";
|
|
7
|
+
import { isDevTools } from "../constants/isDevTools.mjs";
|
|
8
|
+
import { getMediaImportanceIfMoreImportant, mediaState as globalMediaState, isMediaKey, mediaKeyMatch, mediaQueryConfig } from "../hooks/useMedia.mjs";
|
|
9
|
+
import { createMediaStyle } from "./createMediaStyle.mjs";
|
|
10
|
+
import { fixStyles } from "./expandStyles.mjs";
|
|
11
|
+
import { getGroupPropParts } from "./getGroupPropParts.mjs";
|
|
12
|
+
import { getStyleAtomic, getStylesAtomic, styleToCSS } from "./getStylesAtomic.mjs";
|
|
13
|
+
import "./insertStyleRule.mjs";
|
|
14
|
+
import { log } from "./log.mjs";
|
|
15
|
+
import { normalizeValueWithProperty } from "./normalizeValueWithProperty.mjs";
|
|
16
|
+
import { getPropMappedFontFamily, propMapper } from "./propMapper.mjs";
|
|
17
|
+
import { pseudoDescriptors, pseudoPriorities } from "./pseudoDescriptors.mjs";
|
|
18
|
+
import { skipProps } from "./skipProps.mjs";
|
|
19
|
+
import { transformsToString } from "./transformsToString.mjs";
|
|
20
|
+
import { isActivePlatform } from "./isActivePlatform.mjs";
|
|
21
|
+
var consoleGroupCollapsed = isWeb ? console.groupCollapsed : console.info,
|
|
22
|
+
conf,
|
|
23
|
+
PROP_SPLIT = "-";
|
|
24
|
+
function isValidStyleKey(key, staticConfig) {
|
|
25
|
+
var _staticConfig_accept,
|
|
26
|
+
validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
|
|
27
|
+
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
28
|
+
}
|
|
29
|
+
var getSplitStyles = function (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
|
|
30
|
+
conf = conf || getConfig(), isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
31
|
+
var {
|
|
32
|
+
shorthands
|
|
33
|
+
} = conf,
|
|
34
|
+
{
|
|
35
|
+
isHOC,
|
|
36
|
+
isText,
|
|
37
|
+
isInput,
|
|
38
|
+
variants,
|
|
39
|
+
isReactNative,
|
|
40
|
+
inlineProps,
|
|
41
|
+
inlineWhenUnflattened,
|
|
42
|
+
parentStaticConfig,
|
|
43
|
+
acceptsClassName
|
|
44
|
+
} = staticConfig,
|
|
45
|
+
viewProps = {},
|
|
46
|
+
mediaState = styleProps.mediaState || globalMediaState,
|
|
47
|
+
usedKeys = {},
|
|
48
|
+
shouldDoClasses = acceptsClassName && isWeb && !styleProps.noClassNames,
|
|
49
|
+
rulesToInsert = void 0,
|
|
50
|
+
classNames = {},
|
|
51
|
+
transforms = {},
|
|
52
|
+
pseudos = null,
|
|
53
|
+
space = props.space,
|
|
54
|
+
hasMedia = !1,
|
|
55
|
+
dynamicThemeAccess,
|
|
56
|
+
pseudoGroups,
|
|
57
|
+
mediaGroups,
|
|
58
|
+
className = props.className || "",
|
|
59
|
+
mediaStylesSeen = 0,
|
|
60
|
+
styleState = {
|
|
61
|
+
classNames,
|
|
62
|
+
conf,
|
|
63
|
+
props,
|
|
64
|
+
styleProps,
|
|
65
|
+
componentState,
|
|
66
|
+
staticConfig,
|
|
67
|
+
style: null,
|
|
68
|
+
theme,
|
|
69
|
+
usedKeys,
|
|
70
|
+
viewProps,
|
|
71
|
+
context,
|
|
72
|
+
debug,
|
|
73
|
+
skipThemeTokenResolution
|
|
74
|
+
};
|
|
75
|
+
process.env.NODE_ENV === "development" && debug && debug !== "profile" && isClient && (consoleGroupCollapsed("getSplitStyles (collapsed)"), log({
|
|
76
|
+
props,
|
|
77
|
+
staticConfig,
|
|
78
|
+
shouldDoClasses,
|
|
79
|
+
styleProps,
|
|
80
|
+
rulesToInsert,
|
|
81
|
+
componentState,
|
|
82
|
+
styleState,
|
|
83
|
+
theme: {
|
|
84
|
+
...theme
|
|
85
|
+
}
|
|
86
|
+
}), console.groupEnd());
|
|
87
|
+
var {
|
|
88
|
+
asChild
|
|
89
|
+
} = props,
|
|
90
|
+
{
|
|
91
|
+
accept
|
|
92
|
+
} = staticConfig,
|
|
93
|
+
{
|
|
94
|
+
noSkip,
|
|
95
|
+
disableExpandShorthands,
|
|
96
|
+
noExpand
|
|
97
|
+
} = styleProps,
|
|
98
|
+
{
|
|
99
|
+
webContainerType
|
|
100
|
+
} = conf.settings,
|
|
101
|
+
parentVariants = parentStaticConfig?.variants;
|
|
102
|
+
for (var keyOg in props) {
|
|
103
|
+
var _loop = function (i2) {
|
|
104
|
+
var _parentStaticConfig_variants;
|
|
105
|
+
if (expanded) {
|
|
106
|
+
var [k, v] = expanded[i2];
|
|
107
|
+
key = k, val = v;
|
|
108
|
+
}
|
|
109
|
+
if (val == null || key in usedKeys) return "continue";
|
|
110
|
+
if (isPseudo = key in validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && isMediaKey(key), isMediaOrPseudo1 = !!(isMedia || isPseudo), isVariant = variants && key in variants, inlineProps?.has(key) || process.env.IS_STATIC === "is_static" && inlineWhenUnflattened?.has(key)) {
|
|
111
|
+
var _props_key;
|
|
112
|
+
viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
|
|
113
|
+
}
|
|
114
|
+
var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo1 || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
|
|
115
|
+
if (shouldPassThrough2) return passDownProp(viewProps, key, val, isMediaOrPseudo1), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed(` - passing down prop ${key}`), log({
|
|
116
|
+
val,
|
|
117
|
+
after: {
|
|
118
|
+
...viewProps[key]
|
|
119
|
+
}
|
|
120
|
+
}), console.groupEnd()), "continue";
|
|
121
|
+
if (isPseudo) {
|
|
122
|
+
if (!val) return "continue";
|
|
123
|
+
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames),
|
|
124
|
+
descriptor = pseudoDescriptors[key],
|
|
125
|
+
isEnter = key === "enterStyle",
|
|
126
|
+
isExit = key === "exitStyle";
|
|
127
|
+
if (!descriptor) return "continue";
|
|
128
|
+
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
129
|
+
var _pseudos, _key;
|
|
130
|
+
if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") return Object.assign(pseudos[key], pseudoStyleObject), "continue";
|
|
131
|
+
}
|
|
132
|
+
if (shouldDoClasses && !isExit) {
|
|
133
|
+
var pseudoStyles = getStyleAtomic(pseudoStyleObject, descriptor);
|
|
134
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo (classes)", key), log({
|
|
135
|
+
pseudoStyleObject,
|
|
136
|
+
pseudoStyles
|
|
137
|
+
}), console.groupEnd());
|
|
138
|
+
var _iteratorNormalCompletion2 = !0,
|
|
139
|
+
_didIteratorError2 = !1,
|
|
140
|
+
_iteratorError2 = void 0;
|
|
141
|
+
try {
|
|
142
|
+
for (var _iterator2 = pseudoStyles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
|
|
143
|
+
var psuedoStyle = _step2.value,
|
|
144
|
+
fullKey = `${psuedoStyle[StyleObjectProperty]}${PROP_SPLIT}${descriptor.name}`;
|
|
145
|
+
fullKey in usedKeys || (addStyleToInsertRules(rulesToInsert, psuedoStyle), mergeClassName(transforms, classNames, fullKey, psuedoStyle[StyleObjectIdentifier], isMediaOrPseudo1, !0));
|
|
146
|
+
}
|
|
147
|
+
} catch (err) {
|
|
148
|
+
_didIteratorError2 = !0, _iteratorError2 = err;
|
|
149
|
+
} finally {
|
|
150
|
+
try {
|
|
151
|
+
!_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
|
|
152
|
+
} finally {
|
|
153
|
+
if (_didIteratorError2) throw _iteratorError2;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (!shouldDoClasses || isExit || isEnter) {
|
|
158
|
+
var descriptorKey = descriptor.stateKey || descriptor.name,
|
|
159
|
+
isDisabled = componentState[descriptorKey] === !1;
|
|
160
|
+
isExit && (isDisabled = !styleProps.isExiting), isEnter && componentState.unmounted === !1 && (isDisabled = !0), process.env.NODE_ENV === "development" && debug === "verbose" && (consoleGroupCollapsed("pseudo", key, {
|
|
161
|
+
isDisabled
|
|
162
|
+
}), log({
|
|
163
|
+
pseudoStyleObject,
|
|
164
|
+
isDisabled,
|
|
165
|
+
descriptor,
|
|
166
|
+
componentState
|
|
167
|
+
}), console.groupEnd());
|
|
168
|
+
var importance = descriptor.priority;
|
|
169
|
+
for (var pkey in pseudoStyleObject) {
|
|
170
|
+
var val12 = pseudoStyleObject[pkey];
|
|
171
|
+
if (isDisabled) applyDefaultStyle(pkey, styleState);else {
|
|
172
|
+
var curImportance = usedKeys[pkey] || 0,
|
|
173
|
+
shouldMerge = importance >= curImportance;
|
|
174
|
+
if (shouldMerge) {
|
|
175
|
+
var _pseudos1, _key1;
|
|
176
|
+
pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key] || (_pseudos1[_key1] = {}), pseudos[key][pkey] = val12, mergeStyle(styleState, pkey, val12);
|
|
177
|
+
}
|
|
178
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && log(" subKey", pkey, shouldMerge, {
|
|
179
|
+
importance,
|
|
180
|
+
curImportance,
|
|
181
|
+
pkey,
|
|
182
|
+
val: val12
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (!isDisabled) for (var key12 in val) {
|
|
187
|
+
var k1 = shorthands[key12] || key12;
|
|
188
|
+
usedKeys[k1] = Math.max(importance, usedKeys[k1] || 0);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return "continue";
|
|
192
|
+
}
|
|
193
|
+
if (isMedia) {
|
|
194
|
+
if (!val) return "continue";
|
|
195
|
+
var hasSpace = val.space,
|
|
196
|
+
mediaKeyShort = key.slice(1);
|
|
197
|
+
if (hasMedia || (hasMedia = !0), (hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && (typeof hasMedia != "object" && (hasMedia = {}), hasMedia[mediaKeyShort] = !0), isMedia === "platform" && !isActivePlatform(key)) return "continue";
|
|
198
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} ${key}`, {
|
|
199
|
+
key,
|
|
200
|
+
val,
|
|
201
|
+
props,
|
|
202
|
+
shouldDoClasses,
|
|
203
|
+
acceptsClassName,
|
|
204
|
+
componentState,
|
|
205
|
+
mediaState
|
|
206
|
+
}), shouldDoClasses) {
|
|
207
|
+
var mediaStyle = getSubStyle(styleState, key, val, !1);
|
|
208
|
+
if (hasSpace && (delete mediaStyle.space, mediaState[mediaKeyShort])) {
|
|
209
|
+
var importance1 = getMediaImportanceIfMoreImportant(mediaKeyShort, "space", usedKeys, !0);
|
|
210
|
+
importance1 && (space = val.space, usedKeys.space = importance1, process.env.NODE_ENV === "development" && debug === "verbose" && log(`Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance1})`));
|
|
211
|
+
}
|
|
212
|
+
var mediaStyles = getStylesAtomic(mediaStyle),
|
|
213
|
+
priority = mediaStylesSeen;
|
|
214
|
+
mediaStylesSeen += 1;
|
|
215
|
+
var _iteratorNormalCompletion12 = !0,
|
|
216
|
+
_didIteratorError12 = !1,
|
|
217
|
+
_iteratorError12 = void 0;
|
|
218
|
+
try {
|
|
219
|
+
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
|
|
220
|
+
var style3 = _step12.value,
|
|
221
|
+
property = style3[0];
|
|
222
|
+
if (!(property[0] === "$" && property.startsWith("$platform") && !isActivePlatform(property))) {
|
|
223
|
+
var out = createMediaStyle(style3, mediaKeyShort, mediaQueryConfig, isMedia, !1, priority);
|
|
224
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && log("\u{1F4FA} media style:", out);
|
|
225
|
+
var fullKey1 = `${style3[StyleObjectProperty]}${PROP_SPLIT}${mediaKeyShort}${style3[StyleObjectPseudo] || ""}`;
|
|
226
|
+
fullKey1 in usedKeys || (addStyleToInsertRules(rulesToInsert, out), mergeClassName(transforms, classNames, fullKey1, out[StyleObjectIdentifier], !0, !0));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
} catch (err) {
|
|
230
|
+
_didIteratorError12 = !0, _iteratorError12 = err;
|
|
231
|
+
} finally {
|
|
232
|
+
try {
|
|
233
|
+
!_iteratorNormalCompletion12 && _iterator12.return != null && _iterator12.return();
|
|
234
|
+
} finally {
|
|
235
|
+
if (_didIteratorError12) throw _iteratorError12;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
} else {
|
|
239
|
+
let mergeMediaStyle2 = function (key5, val3) {
|
|
240
|
+
var _styleState4;
|
|
241
|
+
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
242
|
+
var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, usedKeys, mediaState[mediaKeyShort], importanceBump, debug);
|
|
243
|
+
didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
|
|
244
|
+
};
|
|
245
|
+
var mergeMediaStyle = mergeMediaStyle2,
|
|
246
|
+
isThemeMedia = isMedia === "theme",
|
|
247
|
+
isGroupMedia = isMedia === "group",
|
|
248
|
+
isPlatformMedia = isMedia === "platform";
|
|
249
|
+
if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
|
|
250
|
+
if (!mediaState[mediaKeyShort]) return process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} \u274C DISABLED ${mediaKeyShort}`), "continue";
|
|
251
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F4FA} \u2705 ENABLED ${mediaKeyShort}`);
|
|
252
|
+
}
|
|
253
|
+
var mediaStyle1 = getSubStyle(styleState, key, val, !0),
|
|
254
|
+
importanceBump = 0;
|
|
255
|
+
if (isThemeMedia) {
|
|
256
|
+
dynamicThemeAccess = !0;
|
|
257
|
+
var mediaThemeName = mediaKeyShort.slice(6);
|
|
258
|
+
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) return "continue";
|
|
259
|
+
} else if (isGroupMedia) {
|
|
260
|
+
var _componentState_group,
|
|
261
|
+
groupInfo = getGroupPropParts(mediaKeyShort),
|
|
262
|
+
groupName = groupInfo.name,
|
|
263
|
+
groupContext = context?.groups.state[groupName];
|
|
264
|
+
if (!groupContext) return process.env.NODE_ENV === "development" && debug && log(`No parent with group prop, skipping styles: ${groupName}`), "continue";
|
|
265
|
+
var groupPseudoKey = groupInfo.pseudo,
|
|
266
|
+
groupMediaKey = groupInfo.media,
|
|
267
|
+
componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
268
|
+
if (groupMediaKey) {
|
|
269
|
+
mediaGroups || (mediaGroups = /* @__PURE__ */new Set()), mediaGroups.add(groupMediaKey);
|
|
270
|
+
var mediaState1 = componentGroupState?.media,
|
|
271
|
+
isActive = mediaState1?.[groupMediaKey];
|
|
272
|
+
if (!mediaState1 && groupContext.layout && (isActive = mediaKeyMatch(groupMediaKey, groupContext.layout)), process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F3D8}\uFE0F GROUP media ${groupMediaKey} active? ${isActive}`), !isActive) {
|
|
273
|
+
for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
|
|
274
|
+
return "continue";
|
|
275
|
+
}
|
|
276
|
+
importanceBump = 2;
|
|
277
|
+
}
|
|
278
|
+
if (groupPseudoKey) {
|
|
279
|
+
pseudoGroups || (pseudoGroups = /* @__PURE__ */new Set()), pseudoGroups.add(groupName);
|
|
280
|
+
var componentGroupPseudoState = (componentGroupState ||
|
|
281
|
+
// fallback to context initially
|
|
282
|
+
context.groups.state[groupName]).pseudo,
|
|
283
|
+
isActive1 = componentGroupPseudoState?.[groupPseudoKey],
|
|
284
|
+
priority1 = pseudoPriorities[groupPseudoKey];
|
|
285
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && log(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`), !isActive1) {
|
|
286
|
+
for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
|
|
287
|
+
return "continue";
|
|
288
|
+
}
|
|
289
|
+
importanceBump = priority1;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
for (var subKey in mediaStyle1) {
|
|
293
|
+
if (subKey === "space") {
|
|
294
|
+
space = valInit.space;
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
if (subKey[0] === "$") {
|
|
298
|
+
if (!isActivePlatform(subKey)) continue;
|
|
299
|
+
for (var subSubKey in mediaStyle1[subKey]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey][subSubKey]);
|
|
300
|
+
} else mergeMediaStyle2(subKey, mediaStyle1[subKey]);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return "continue";
|
|
304
|
+
}
|
|
305
|
+
if (key === "pointerEvents") return viewProps[key] = val, "continue";
|
|
306
|
+
if (
|
|
307
|
+
// is HOC we can just pass through the styles as props
|
|
308
|
+
// this fixes issues where style prop got merged with wrong priority
|
|
309
|
+
!isHOC && (isValidStyleKey(key, staticConfig) || isAndroid && key === "elevation")) return mergeStyle(styleState, key, val), "continue";
|
|
310
|
+
if (!isVariant) {
|
|
311
|
+
if (styleProps.styledContextProps && key in styleProps.styledContextProps) return "continue";
|
|
312
|
+
viewProps[key] = val;
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
keyInit = keyOg,
|
|
316
|
+
valInit = props[keyInit];
|
|
317
|
+
if (accept) {
|
|
318
|
+
var accepted = accept[keyInit];
|
|
319
|
+
if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") {
|
|
320
|
+
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames);
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
|
|
325
|
+
if (keyInit in skipProps && !noSkip && !isHOC) {
|
|
326
|
+
if (keyInit === "group" && 0) var identifier, containerType, containerCSS;
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
var valInitType = typeof valInit,
|
|
330
|
+
isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
331
|
+
if (0) {
|
|
332
|
+
if (staticConfig.isReactNative && keyInit.startsWith("data-")) var _viewProps, _dataSet;
|
|
333
|
+
if (isValidStyleKeyInit && valInitType === "string" && valInit[0] === "_") {
|
|
334
|
+
var isValidClassName, isMediaOrPseudo;
|
|
335
|
+
if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses) var _styleState;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
if (!isValidStyleKeyInit) {
|
|
339
|
+
if (!isAndroid && keyInit === "elevationAndroid") continue;
|
|
340
|
+
if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";else if (keyInit.startsWith("data-")) continue;
|
|
341
|
+
}
|
|
342
|
+
if (keyInit === "dataSet") {
|
|
343
|
+
for (var keyInit1 in valInit) viewProps[`data-${hyphenate(keyInit1)}`] = valInit[keyInit1];
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
if (0 && !noExpand) var didUseKeyInit;
|
|
347
|
+
var isShorthand = keyInit in shorthands,
|
|
348
|
+
isVariant = !isValidStyleKeyInit && variants && keyInit in variants,
|
|
349
|
+
isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant,
|
|
350
|
+
isPseudo = keyInit in validPseudoKeys,
|
|
351
|
+
isMedia = !isStyleLikeKey && !isPseudo && isMediaKey(keyInit),
|
|
352
|
+
isMediaOrPseudo1 = !!(isMedia || isPseudo);
|
|
353
|
+
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
|
|
354
|
+
var name = keyInit.split("-")[1];
|
|
355
|
+
context?.groups.subscribe && !context?.groups.state[name] && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
356
|
+
}
|
|
357
|
+
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
|
|
358
|
+
if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
|
|
359
|
+
var shouldPassProp = !isStyleProp ||
|
|
360
|
+
// is in parent variants
|
|
361
|
+
isHOC && parentVariants && keyInit in parentVariants || inlineProps?.has(keyInit),
|
|
362
|
+
parentVariant = parentVariants?.[keyInit],
|
|
363
|
+
isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in skipProps)),
|
|
364
|
+
shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
365
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`), log({
|
|
366
|
+
isVariant,
|
|
367
|
+
valInit,
|
|
368
|
+
shouldPassProp
|
|
369
|
+
}), isClient && log({
|
|
370
|
+
variants,
|
|
371
|
+
variant: variants?.[keyInit],
|
|
372
|
+
isVariant,
|
|
373
|
+
isHOCShouldPassThrough,
|
|
374
|
+
parentStaticConfig
|
|
375
|
+
})), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) {
|
|
376
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
if (!noSkip && keyInit in skipProps) {
|
|
380
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
384
|
+
var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit,
|
|
385
|
+
expanded = avoidPropMap ? null : propMapper(keyInit, valInit, styleState);
|
|
386
|
+
if (!avoidPropMap) {
|
|
387
|
+
if (!expanded) continue;
|
|
388
|
+
var next = getPropMappedFontFamily(expanded);
|
|
389
|
+
next && (styleState.fontFamily = next);
|
|
390
|
+
}
|
|
391
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
392
|
+
consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
|
|
393
|
+
try {
|
|
394
|
+
!isServer && isDevTools && (log({
|
|
395
|
+
expanded,
|
|
396
|
+
styleProps,
|
|
397
|
+
componentState,
|
|
398
|
+
isVariant,
|
|
399
|
+
variant: variants?.[keyInit],
|
|
400
|
+
shouldPassProp,
|
|
401
|
+
isHOCShouldPassThrough,
|
|
402
|
+
usedKeys: {
|
|
403
|
+
...usedKeys
|
|
404
|
+
}
|
|
405
|
+
}), log("expanded", expanded, `
|
|
406
|
+
usedKeys`, {
|
|
407
|
+
...usedKeys
|
|
408
|
+
}, `
|
|
409
|
+
current`, {
|
|
410
|
+
...styleState.style
|
|
411
|
+
}));
|
|
412
|
+
} catch {}
|
|
413
|
+
console.groupEnd();
|
|
414
|
+
}
|
|
415
|
+
for (var key = keyInit, val = valInit, max = expanded ? expanded.length : 1, i = 0; i < max; i++) _loop(i);
|
|
416
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
417
|
+
try {
|
|
418
|
+
log(" \u2714\uFE0F expand complete", keyInit), log("style", {
|
|
419
|
+
...styleState.style
|
|
420
|
+
}), log("transforms", {
|
|
421
|
+
...transforms
|
|
422
|
+
}), log("viewProps", {
|
|
423
|
+
...viewProps
|
|
424
|
+
});
|
|
425
|
+
} catch {}
|
|
426
|
+
console.groupEnd();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
var avoidNormalize = styleProps.noNormalize === !1;
|
|
432
|
+
if (!avoidNormalize) {
|
|
433
|
+
if (styleState.style && (fixStyles(styleState.style), isWeb && !isReactNative && styleToCSS(styleState.style)), styleState.flatTransforms) {
|
|
434
|
+
var _styleState1;
|
|
435
|
+
(_styleState1 = styleState).style || (_styleState1.style = {}), Object.entries(styleState.flatTransforms).sort(function (param, param1) {
|
|
436
|
+
var [a] = param,
|
|
437
|
+
[b] = param1;
|
|
438
|
+
return a.localeCompare(b);
|
|
439
|
+
}).forEach(function (param) {
|
|
440
|
+
var [key5, val3] = param;
|
|
441
|
+
mergeTransform(styleState.style, key5, val3, !0);
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
if (parentSplitStyles) {
|
|
445
|
+
if (0 && shouldDoClasses) for (var key1 in parentSplitStyles.classNames) var val1;
|
|
446
|
+
if (!shouldDoClasses) for (var key2 in parentSplitStyles.style) {
|
|
447
|
+
var _styleState2;
|
|
448
|
+
key2 in classNames || styleState.style && key2 in styleState.style || ((_styleState2 = styleState).style || (_styleState2.style = {}), styleState.style[key2] = parentSplitStyles.style[key2]);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
if (0) var _styleState_style, shouldStringifyTransforms;
|
|
453
|
+
if (0) {
|
|
454
|
+
if (styleState.style && shouldDoClasses) {
|
|
455
|
+
var retainedStyles, shouldRetain;
|
|
456
|
+
if (!styleState.style.$$css) {
|
|
457
|
+
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
458
|
+
try {
|
|
459
|
+
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, key3, value, identifier1, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
460
|
+
} catch (err) {} finally {
|
|
461
|
+
try {} finally {}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if (transforms) for (var namespace in transforms) {
|
|
465
|
+
var hash, val2, identifier2;
|
|
466
|
+
if (isClient && !insertedTransforms[identifier2]) var rule;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
if (isReactNative) {
|
|
470
|
+
if (viewProps.tabIndex === 0) var _viewProps1, _accessible;
|
|
471
|
+
} else if (viewProps.tabIndex == null) var _viewProps_focusable, isFocusable, role;
|
|
472
|
+
}
|
|
473
|
+
var styleProp = props.style;
|
|
474
|
+
if (styleProp) if (isHOC) viewProps.style = normalizeStyle(styleProp);else for (var isArray = Array.isArray(styleProp), len = isArray ? styleProp.length : 1, i1 = 0; i1 < len; i1++) {
|
|
475
|
+
var style = isArray ? styleProp[i1] : styleProp;
|
|
476
|
+
if (style) if (style.$$css) Object.assign(styleState.classNames, style);else {
|
|
477
|
+
var _styleState3;
|
|
478
|
+
(_styleState3 = styleState).style || (_styleState3.style = {}), Object.assign(styleState.style, normalizeStyle(style));
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
var style1 = styleState.style;
|
|
482
|
+
if (style1?.fontFamily) {
|
|
483
|
+
var _getFont,
|
|
484
|
+
faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
485
|
+
if (faceInfo) {
|
|
486
|
+
var _faceInfo_style_fontWeight_,
|
|
487
|
+
_faceInfo_style_fontWeight,
|
|
488
|
+
overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 || (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
|
|
489
|
+
overrideFace && (style1.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style1.fontWeight, delete style1.fontStyle);
|
|
490
|
+
}
|
|
491
|
+
process.env.NODE_ENV === "development" && debug && debug !== "profile" && log(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
|
|
492
|
+
}
|
|
493
|
+
var result = {
|
|
494
|
+
space,
|
|
495
|
+
hasMedia,
|
|
496
|
+
fontFamily: styleState.fontFamily,
|
|
497
|
+
viewProps,
|
|
498
|
+
style: styleState.style,
|
|
499
|
+
pseudos,
|
|
500
|
+
classNames,
|
|
501
|
+
rulesToInsert,
|
|
502
|
+
dynamicThemeAccess,
|
|
503
|
+
pseudoGroups,
|
|
504
|
+
mediaGroups
|
|
505
|
+
},
|
|
506
|
+
asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
507
|
+
if (!asChildExceptStyleLike) {
|
|
508
|
+
var style2 = styleState.style;
|
|
509
|
+
if (0) {
|
|
510
|
+
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
511
|
+
if (!styleProps.noMergeStyle) {
|
|
512
|
+
if (!(styleProps.isAnimated && !conf.animations.supportsCSSVars && isReactNative)) {
|
|
513
|
+
if (isReactNative) {
|
|
514
|
+
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
515
|
+
try {
|
|
516
|
+
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name1;
|
|
517
|
+
} catch (err) {} finally {
|
|
518
|
+
try {} finally {}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
} else style2 && !styleProps.noMergeStyle && (viewProps.style = style2);
|
|
524
|
+
}
|
|
525
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && isDevTools) {
|
|
526
|
+
consoleGroupCollapsed("\u{1F539} getSplitStyles ===>");
|
|
527
|
+
try {
|
|
528
|
+
var logs = {
|
|
529
|
+
...result,
|
|
530
|
+
className,
|
|
531
|
+
componentState,
|
|
532
|
+
transforms,
|
|
533
|
+
viewProps,
|
|
534
|
+
rulesToInsert,
|
|
535
|
+
parentSplitStyles
|
|
536
|
+
};
|
|
537
|
+
for (var key4 in logs) log(key4, logs[key4]);
|
|
538
|
+
} catch {}
|
|
539
|
+
console.groupEnd();
|
|
540
|
+
}
|
|
541
|
+
return result;
|
|
542
|
+
};
|
|
543
|
+
function mergeClassName(transforms, classNames, key, val) {
|
|
544
|
+
var isMediaOrPseudo = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1,
|
|
545
|
+
isInsertingNow = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1;
|
|
546
|
+
if (0 && !isInsertingNow && val[0] === "_" && val.startsWith("_transform-")) var _transforms, _ns, ns, transform;
|
|
547
|
+
}
|
|
548
|
+
function mergeStyle(styleState, key, val) {
|
|
549
|
+
var disableNormalize = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1,
|
|
550
|
+
{
|
|
551
|
+
classNames,
|
|
552
|
+
viewProps,
|
|
553
|
+
usedKeys,
|
|
554
|
+
styleProps,
|
|
555
|
+
staticConfig
|
|
556
|
+
} = styleState;
|
|
557
|
+
if (isWeb && val?.[0] === "_") {
|
|
558
|
+
var _usedKeys, _key;
|
|
559
|
+
classNames[key] = val, (_usedKeys = usedKeys)[_key = key] || (_usedKeys[_key] = 1);
|
|
560
|
+
} else if (key in stylePropsTransform) {
|
|
561
|
+
var _styleState;
|
|
562
|
+
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
563
|
+
} else {
|
|
564
|
+
var shouldNormalize = isWeb && !disableNormalize && !styleProps.noNormalize,
|
|
565
|
+
out = shouldNormalize ? normalizeValueWithProperty(val, key) : val;
|
|
566
|
+
if (
|
|
567
|
+
// accept is for props not styles
|
|
568
|
+
staticConfig.accept && key in staticConfig.accept) viewProps[key] = out;else {
|
|
569
|
+
var _styleState1;
|
|
570
|
+
(_styleState1 = styleState).style || (_styleState1.style = {}), styleState.style[key] = out;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
var getSubStyle = function (styleState, subKey, styleIn, avoidMergeTransform) {
|
|
575
|
+
var {
|
|
576
|
+
staticConfig,
|
|
577
|
+
conf: conf2,
|
|
578
|
+
styleProps
|
|
579
|
+
} = styleState,
|
|
580
|
+
styleOut = {};
|
|
581
|
+
for (var key in styleIn) {
|
|
582
|
+
var val = styleIn[key];
|
|
583
|
+
key = conf2.shorthands[key] || key;
|
|
584
|
+
var expanded = propMapper(key, val, styleState);
|
|
585
|
+
if (!(!expanded || !staticConfig.isHOC && key in skipProps && !styleProps.noSkip)) {
|
|
586
|
+
var _iteratorNormalCompletion = !0,
|
|
587
|
+
_didIteratorError = !1,
|
|
588
|
+
_iteratorError = void 0;
|
|
589
|
+
try {
|
|
590
|
+
for (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
591
|
+
var [skey, sval] = _step.value;
|
|
592
|
+
!avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : normalizeValueWithProperty(sval, key);
|
|
593
|
+
}
|
|
594
|
+
} catch (err) {
|
|
595
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
596
|
+
} finally {
|
|
597
|
+
try {
|
|
598
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
599
|
+
} finally {
|
|
600
|
+
if (_didIteratorError) throw _iteratorError;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
return styleProps.noNormalize || fixStyles(styleOut), styleOut;
|
|
606
|
+
},
|
|
607
|
+
useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : function () {},
|
|
608
|
+
useSplitStyles = function (a, b, c, d, e, f, g, h, i, j) {
|
|
609
|
+
conf = conf || getConfig();
|
|
610
|
+
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j);
|
|
611
|
+
return res;
|
|
612
|
+
};
|
|
613
|
+
function addStyleToInsertRules(rulesToInsert, styleObject) {
|
|
614
|
+
if (0) var identifier;
|
|
615
|
+
}
|
|
616
|
+
var defaultColor = process.env.TAMAGUI_DEFAULT_COLOR || "rgba(0,0,0,0)",
|
|
617
|
+
animatableDefaults = {
|
|
618
|
+
...Object.fromEntries(Object.entries(tokenCategories.color).map(function (param) {
|
|
619
|
+
var [k, v] = param;
|
|
620
|
+
return [k, defaultColor];
|
|
621
|
+
})),
|
|
622
|
+
opacity: 1,
|
|
623
|
+
scale: 1,
|
|
624
|
+
rotate: "0deg",
|
|
625
|
+
rotateY: "0deg",
|
|
626
|
+
rotateX: "0deg",
|
|
627
|
+
x: 0,
|
|
628
|
+
y: 0,
|
|
629
|
+
borderRadius: 0
|
|
630
|
+
},
|
|
631
|
+
lowercaseHyphenate = function (match) {
|
|
632
|
+
return `-${match.toLowerCase()}`;
|
|
633
|
+
},
|
|
634
|
+
hyphenate = function (str) {
|
|
635
|
+
return str.replace(/[A-Z]/g, lowercaseHyphenate);
|
|
636
|
+
},
|
|
637
|
+
mergeTransform = function (obj, key, val) {
|
|
638
|
+
var backwards = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1,
|
|
639
|
+
_obj;
|
|
640
|
+
typeof obj.transform != "string" && ((_obj = obj).transform || (_obj.transform = []), obj.transform[backwards ? "unshift" : "push"]({
|
|
641
|
+
[mapTransformKeys[key] || key]: val
|
|
642
|
+
}));
|
|
643
|
+
},
|
|
644
|
+
mapTransformKeys = {
|
|
645
|
+
x: "translateX",
|
|
646
|
+
y: "translateY"
|
|
647
|
+
};
|
|
648
|
+
function passDownProp(viewProps, key, val) {
|
|
649
|
+
var shouldMergeObject = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
|
|
650
|
+
if (shouldMergeObject) {
|
|
651
|
+
var next = {
|
|
652
|
+
...viewProps[key],
|
|
653
|
+
...val
|
|
654
|
+
};
|
|
655
|
+
delete viewProps[key], viewProps[key] = next;
|
|
656
|
+
} else viewProps[key] = val;
|
|
657
|
+
}
|
|
658
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value, importancesUsed, isSizeMedia, importanceBump, debugProp) {
|
|
659
|
+
var importance = getMediaImportanceIfMoreImportant(mediaKey, key, importancesUsed, isSizeMedia);
|
|
660
|
+
if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && log(`mergeMediaByImportance ${key} importance existing ${importancesUsed[key]} next ${importance}`), importance === null) return !1;
|
|
661
|
+
if (importancesUsed[key] = importance, key in pseudoDescriptors) {
|
|
662
|
+
var descriptor = pseudoDescriptors[key],
|
|
663
|
+
descriptorKey = descriptor.stateKey || descriptor.name,
|
|
664
|
+
isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
665
|
+
if (isDisabled) return !1;
|
|
666
|
+
for (var subKey in value) mergeStyle(styleState, subKey, value[subKey]);
|
|
667
|
+
} else mergeStyle(styleState, key, value);
|
|
668
|
+
return !0;
|
|
669
|
+
}
|
|
670
|
+
function normalizeStyle(style) {
|
|
671
|
+
var out = {};
|
|
672
|
+
for (var key in style) {
|
|
673
|
+
var val = style[key];
|
|
674
|
+
key in stylePropsTransform ? mergeTransform(out, key, val) : out[key] = normalizeValueWithProperty(val, key);
|
|
675
|
+
}
|
|
676
|
+
return isWeb && Array.isArray(out.transform) && (out.transform = transformsToString(out.transform)), fixStyles(out), out;
|
|
677
|
+
}
|
|
678
|
+
function applyDefaultStyle(pkey, styleState) {
|
|
679
|
+
var defaultValues = animatableDefaults[pkey];
|
|
680
|
+
defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues);
|
|
681
|
+
}
|
|
682
|
+
export { PROP_SPLIT, getSplitStyles, getSubStyle, useSplitStyles };
|
|
683
|
+
//# sourceMappingURL=getSplitStyles.native.mjs.map
|