@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
|
@@ -33,307 +33,16 @@ __export(createComponent_exports, {
|
|
|
33
33
|
useComponentState: () => useComponentState
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(createComponent_exports);
|
|
36
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_config = require("./config"), import_constants2 = require("./constants/constants"), import_isDevTools = require("./constants/isDevTools"), import_ComponentContext = require("./contexts/ComponentContext"), import_createVariable = require("./createVariable"), import_defaultComponentState = require("./defaultComponentState"), import_createShallowSetState = require("./helpers/createShallowSetState"), import_getSplitStyles = require("./helpers/getSplitStyles"), import_isObj = require("./helpers/isObj"), import_log = require("./helpers/log"), import_mergeProps = require("./helpers/mergeProps"), import_setElementProps = require("./helpers/setElementProps"), import_themeable = require("./helpers/themeable"), import_useDidHydrateOnce = require("./hooks/useDidHydrateOnce"), import_useMedia = require("./hooks/useMedia"), import_useTheme = require("./hooks/useTheme"), import_setupHooks = require("./setupHooks"), import_Slot = require("./views/Slot"), import_Theme = require("./views/Theme"), import_ThemeDebug = require("./views/ThemeDebug");
|
|
37
|
-
function _array_like_to_array(arr, len) {
|
|
38
|
-
(len == null || len > arr.length) && (len = arr.length);
|
|
39
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
40
|
-
return arr2;
|
|
41
|
-
}
|
|
42
|
-
function _array_with_holes(arr) {
|
|
43
|
-
if (Array.isArray(arr)) return arr;
|
|
44
|
-
}
|
|
45
|
-
function _array_without_holes(arr) {
|
|
46
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
47
|
-
}
|
|
48
|
-
function _define_property(obj, key, value) {
|
|
49
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
50
|
-
value,
|
|
51
|
-
enumerable: !0,
|
|
52
|
-
configurable: !0,
|
|
53
|
-
writable: !0
|
|
54
|
-
}) : obj[key] = value, obj;
|
|
55
|
-
}
|
|
56
|
-
function _iterable_to_array(iter) {
|
|
57
|
-
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
58
|
-
}
|
|
59
|
-
function _iterable_to_array_limit(arr, i) {
|
|
60
|
-
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
61
|
-
if (_i != null) {
|
|
62
|
-
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
63
|
-
try {
|
|
64
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
65
|
-
;
|
|
66
|
-
} catch (err) {
|
|
67
|
-
_d = !0, _e = err;
|
|
68
|
-
} finally {
|
|
69
|
-
try {
|
|
70
|
-
!_n && _i.return != null && _i.return();
|
|
71
|
-
} finally {
|
|
72
|
-
if (_d) throw _e;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return _arr;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function _non_iterable_rest() {
|
|
79
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
80
|
-
}
|
|
81
|
-
function _non_iterable_spread() {
|
|
82
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
83
|
-
}
|
|
84
|
-
function _object_spread(target) {
|
|
85
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
86
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
87
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
88
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
89
|
-
}))), ownKeys2.forEach(function(key) {
|
|
90
|
-
_define_property(target, key, source[key]);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
return target;
|
|
94
|
-
}
|
|
95
|
-
function ownKeys(object, enumerableOnly) {
|
|
96
|
-
var keys = Object.keys(object);
|
|
97
|
-
if (Object.getOwnPropertySymbols) {
|
|
98
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
99
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
100
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
101
|
-
})), keys.push.apply(keys, symbols);
|
|
102
|
-
}
|
|
103
|
-
return keys;
|
|
104
|
-
}
|
|
105
|
-
function _object_spread_props(target, source) {
|
|
106
|
-
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
107
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
108
|
-
}), target;
|
|
109
|
-
}
|
|
110
|
-
function _object_without_properties(source, excluded) {
|
|
111
|
-
if (source == null) return {};
|
|
112
|
-
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
113
|
-
if (Object.getOwnPropertySymbols) {
|
|
114
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
115
|
-
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
116
|
-
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
117
|
-
}
|
|
118
|
-
return target;
|
|
119
|
-
}
|
|
120
|
-
function _object_without_properties_loose(source, excluded) {
|
|
121
|
-
if (source == null) return {};
|
|
122
|
-
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
123
|
-
for (i = 0; i < sourceKeys.length; i++)
|
|
124
|
-
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
125
|
-
return target;
|
|
126
|
-
}
|
|
127
|
-
function _sliced_to_array(arr, i) {
|
|
128
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
129
|
-
}
|
|
130
|
-
function _tagged_template_literal(strings, raw) {
|
|
131
|
-
return raw || (raw = strings.slice(0)), Object.freeze(Object.defineProperties(strings, {
|
|
132
|
-
raw: {
|
|
133
|
-
value: Object.freeze(raw)
|
|
134
|
-
}
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
function _to_consumable_array(arr) {
|
|
138
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
139
|
-
}
|
|
140
|
-
function _type_of(obj) {
|
|
141
|
-
"@swc/helpers - typeof";
|
|
142
|
-
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
143
|
-
}
|
|
144
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
145
|
-
if (o) {
|
|
146
|
-
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
147
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
148
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
149
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function _templateObject() {
|
|
153
|
-
var data = _tagged_template_literal([
|
|
154
|
-
"pre-use-state"
|
|
155
|
-
]);
|
|
156
|
-
return _templateObject = function() {
|
|
157
|
-
return data;
|
|
158
|
-
}, data;
|
|
159
|
-
}
|
|
160
|
-
function _templateObject1() {
|
|
161
|
-
var data = _tagged_template_literal([
|
|
162
|
-
"start (ignore)"
|
|
163
|
-
]);
|
|
164
|
-
return _templateObject1 = function() {
|
|
165
|
-
return data;
|
|
166
|
-
}, data;
|
|
167
|
-
}
|
|
168
|
-
function _templateObject2() {
|
|
169
|
-
var data = _tagged_template_literal([
|
|
170
|
-
"did-finish-ssr"
|
|
171
|
-
]);
|
|
172
|
-
return _templateObject2 = function() {
|
|
173
|
-
return data;
|
|
174
|
-
}, data;
|
|
175
|
-
}
|
|
176
|
-
function _templateObject3() {
|
|
177
|
-
var data = _tagged_template_literal([
|
|
178
|
-
"stateref"
|
|
179
|
-
]);
|
|
180
|
-
return _templateObject3 = function() {
|
|
181
|
-
return data;
|
|
182
|
-
}, data;
|
|
183
|
-
}
|
|
184
|
-
function _templateObject4() {
|
|
185
|
-
var data = _tagged_template_literal([
|
|
186
|
-
"use-state"
|
|
187
|
-
]);
|
|
188
|
-
return _templateObject4 = function() {
|
|
189
|
-
return data;
|
|
190
|
-
}, data;
|
|
191
|
-
}
|
|
192
|
-
function _templateObject5() {
|
|
193
|
-
var data = _tagged_template_literal([
|
|
194
|
-
"use-context"
|
|
195
|
-
]);
|
|
196
|
-
return _templateObject5 = function() {
|
|
197
|
-
return data;
|
|
198
|
-
}, data;
|
|
199
|
-
}
|
|
200
|
-
function _templateObject6() {
|
|
201
|
-
var data = _tagged_template_literal([
|
|
202
|
-
"theme-props"
|
|
203
|
-
]);
|
|
204
|
-
return _templateObject6 = function() {
|
|
205
|
-
return data;
|
|
206
|
-
}, data;
|
|
207
|
-
}
|
|
208
|
-
function _templateObject7() {
|
|
209
|
-
var data = _tagged_template_literal([
|
|
210
|
-
"pre-theme-media"
|
|
211
|
-
]);
|
|
212
|
-
return _templateObject7 = function() {
|
|
213
|
-
return data;
|
|
214
|
-
}, data;
|
|
215
|
-
}
|
|
216
|
-
function _templateObject8() {
|
|
217
|
-
var data = _tagged_template_literal([
|
|
218
|
-
"theme"
|
|
219
|
-
]);
|
|
220
|
-
return _templateObject8 = function() {
|
|
221
|
-
return data;
|
|
222
|
-
}, data;
|
|
223
|
-
}
|
|
224
|
-
function _templateObject9() {
|
|
225
|
-
var data = _tagged_template_literal([
|
|
226
|
-
"media"
|
|
227
|
-
]);
|
|
228
|
-
return _templateObject9 = function() {
|
|
229
|
-
return data;
|
|
230
|
-
}, data;
|
|
231
|
-
}
|
|
232
|
-
function _templateObject10() {
|
|
233
|
-
var data = _tagged_template_literal([
|
|
234
|
-
"split-styles"
|
|
235
|
-
]);
|
|
236
|
-
return _templateObject10 = function() {
|
|
237
|
-
return data;
|
|
238
|
-
}, data;
|
|
239
|
-
}
|
|
240
|
-
function _templateObject11() {
|
|
241
|
-
var data = _tagged_template_literal([
|
|
242
|
-
"animations"
|
|
243
|
-
]);
|
|
244
|
-
return _templateObject11 = function() {
|
|
245
|
-
return data;
|
|
246
|
-
}, data;
|
|
247
|
-
}
|
|
248
|
-
function _templateObject12() {
|
|
249
|
-
var data = _tagged_template_literal([
|
|
250
|
-
"destructure"
|
|
251
|
-
]);
|
|
252
|
-
return _templateObject12 = function() {
|
|
253
|
-
return data;
|
|
254
|
-
}, data;
|
|
255
|
-
}
|
|
256
|
-
function _templateObject13() {
|
|
257
|
-
var data = _tagged_template_literal([
|
|
258
|
-
"events-hooks"
|
|
259
|
-
]);
|
|
260
|
-
return _templateObject13 = function() {
|
|
261
|
-
return data;
|
|
262
|
-
}, data;
|
|
263
|
-
}
|
|
264
|
-
function _templateObject14() {
|
|
265
|
-
var data = _tagged_template_literal([
|
|
266
|
-
"events-setup"
|
|
267
|
-
]);
|
|
268
|
-
return _templateObject14 = function() {
|
|
269
|
-
return data;
|
|
270
|
-
}, data;
|
|
271
|
-
}
|
|
272
|
-
function _templateObject15() {
|
|
273
|
-
var data = _tagged_template_literal([
|
|
274
|
-
"events"
|
|
275
|
-
]);
|
|
276
|
-
return _templateObject15 = function() {
|
|
277
|
-
return data;
|
|
278
|
-
}, data;
|
|
279
|
-
}
|
|
280
|
-
function _templateObject16() {
|
|
281
|
-
var data = _tagged_template_literal([
|
|
282
|
-
"hooks"
|
|
283
|
-
]);
|
|
284
|
-
return _templateObject16 = function() {
|
|
285
|
-
return data;
|
|
286
|
-
}, data;
|
|
287
|
-
}
|
|
288
|
-
function _templateObject17() {
|
|
289
|
-
var data = _tagged_template_literal([
|
|
290
|
-
"spaced-as-child"
|
|
291
|
-
]);
|
|
292
|
-
return _templateObject17 = function() {
|
|
293
|
-
return data;
|
|
294
|
-
}, data;
|
|
295
|
-
}
|
|
296
|
-
function _templateObject18() {
|
|
297
|
-
var data = _tagged_template_literal([
|
|
298
|
-
"create-element"
|
|
299
|
-
]);
|
|
300
|
-
return _templateObject18 = function() {
|
|
301
|
-
return data;
|
|
302
|
-
}, data;
|
|
303
|
-
}
|
|
304
|
-
function _templateObject19() {
|
|
305
|
-
var data = _tagged_template_literal([
|
|
306
|
-
"group-context"
|
|
307
|
-
]);
|
|
308
|
-
return _templateObject19 = function() {
|
|
309
|
-
return data;
|
|
310
|
-
}, data;
|
|
311
|
-
}
|
|
312
|
-
function _templateObject20() {
|
|
313
|
-
var data = _tagged_template_literal([
|
|
314
|
-
"themed-children"
|
|
315
|
-
]);
|
|
316
|
-
return _templateObject20 = function() {
|
|
317
|
-
return data;
|
|
318
|
-
}, data;
|
|
319
|
-
}
|
|
320
|
-
function _templateObject21() {
|
|
321
|
-
var data = _tagged_template_literal([
|
|
322
|
-
"rest"
|
|
323
|
-
]);
|
|
324
|
-
return _templateObject21 = function() {
|
|
325
|
-
return data;
|
|
326
|
-
}, data;
|
|
327
|
-
}
|
|
328
|
-
var tamaguiConfig, time, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_config = require("./config"), import_constants2 = require("./constants/constants"), import_isDevTools = require("./constants/isDevTools"), import_ComponentContext = require("./contexts/ComponentContext"), import_createVariable = require("./createVariable"), import_defaultComponentState = require("./defaultComponentState"), import_createShallowSetState = require("./helpers/createShallowSetState"), import_getSplitStyles = require("./helpers/getSplitStyles"), import_isObj = require("./helpers/isObj"), import_log = require("./helpers/log"), import_mergeProps = require("./helpers/mergeProps"), import_setElementProps = require("./helpers/setElementProps"), import_themeable = require("./helpers/themeable"), import_useDidHydrateOnce = require("./hooks/useDidHydrateOnce"), import_useMedia = require("./hooks/useMedia"), import_useTheme = require("./hooks/useTheme"), import_setupHooks = require("./setupHooks"), import_Slot = require("./views/Slot"), import_Theme = require("./views/Theme"), import_ThemeDebug = require("./views/ThemeDebug"), tamaguiConfig, time, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
|
|
329
37
|
if (typeof document < "u") {
|
|
330
38
|
var cancelTouches = function() {
|
|
331
39
|
componentSetStates.forEach(function(setState) {
|
|
332
40
|
return setState(function(prev) {
|
|
333
|
-
return prev.press || prev.pressIn ?
|
|
41
|
+
return prev.press || prev.pressIn ? {
|
|
42
|
+
...prev,
|
|
334
43
|
press: !1,
|
|
335
44
|
pressIn: !1
|
|
336
|
-
}
|
|
45
|
+
} : prev;
|
|
337
46
|
});
|
|
338
47
|
}), componentSetStates.clear();
|
|
339
48
|
};
|
|
@@ -341,21 +50,22 @@ if (typeof document < "u") {
|
|
|
341
50
|
var devVisualizerConfig = import_config.devConfig === null || import_config.devConfig === void 0 ? void 0 : import_config.devConfig.visualizer;
|
|
342
51
|
if (devVisualizerConfig) {
|
|
343
52
|
debugKeyListeners = /* @__PURE__ */ new Set();
|
|
344
|
-
var tm, isShowing = !1, options =
|
|
53
|
+
var tm, isShowing = !1, options = {
|
|
345
54
|
key: "Alt",
|
|
346
|
-
delay: 800
|
|
347
|
-
|
|
55
|
+
delay: 800,
|
|
56
|
+
...typeof devVisualizerConfig == "object" ? devVisualizerConfig : {}
|
|
57
|
+
};
|
|
348
58
|
document.addEventListener("blur", function() {
|
|
349
59
|
clearTimeout(tm);
|
|
350
60
|
}), document.addEventListener("keydown", function(param) {
|
|
351
|
-
var
|
|
61
|
+
var { key, defaultPrevented } = param;
|
|
352
62
|
defaultPrevented || (clearTimeout(tm), key === options.key && (tm = setTimeout(function() {
|
|
353
63
|
isShowing = !0, debugKeyListeners == null || debugKeyListeners.forEach(function(l) {
|
|
354
64
|
return l(!0);
|
|
355
65
|
});
|
|
356
66
|
}, options.delay)));
|
|
357
67
|
}), document.addEventListener("keyup", function(param) {
|
|
358
|
-
var
|
|
68
|
+
var { key, defaultPrevented } = param;
|
|
359
69
|
defaultPrevented || key === options.key && (clearTimeout(tm), isShowing && (debugKeyListeners == null || debugKeyListeners.forEach(function(l) {
|
|
360
70
|
return l(!1);
|
|
361
71
|
})));
|
|
@@ -364,7 +74,7 @@ if (typeof document < "u") {
|
|
|
364
74
|
});
|
|
365
75
|
}
|
|
366
76
|
var useComponentState = function(props, param, staticConfig, config) {
|
|
367
|
-
var
|
|
77
|
+
var { animationDriver, groups } = param, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = import_react.default.useRef(void 0);
|
|
368
78
|
stateRef.current || (stateRef.current = {});
|
|
369
79
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
370
80
|
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
@@ -372,7 +82,7 @@ var useComponentState = function(props, param, staticConfig, config) {
|
|
|
372
82
|
}(), willBeAnimated = !import_constants.isServer && willBeAnimatedClient;
|
|
373
83
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
374
84
|
var presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationDriver == null ? void 0 : animationDriver.isReactNative);
|
|
375
|
-
process.env.NODE_ENV === "development" && time && time
|
|
85
|
+
process.env.NODE_ENV === "development" && time && time`pre-use-state`;
|
|
376
86
|
var hasEnterState = hasEnterStyle || isEntering, didHydrateOnce = willBeAnimated ? (0, import_useDidHydrateOnce.useDidHydrateOnce)() : !0, shouldEnter = hasEnterState || !didHydrateOnce && hasRNAnimation, shouldEnterFromUnhydrated = import_constants.isWeb && !didHydrateOnce, initialState = shouldEnter ? (
|
|
377
87
|
// on the very first render we switch all spring animation drivers to css rendering
|
|
378
88
|
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
@@ -382,19 +92,24 @@ var useComponentState = function(props, param, staticConfig, config) {
|
|
|
382
92
|
shouldEnterFromUnhydrated ? import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateShouldEnter
|
|
383
93
|
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
384
94
|
disabled != null && (initialState.disabled = disabled);
|
|
385
|
-
var states = import_react.default.useState(initialState), state = props.forceStyle ?
|
|
386
|
-
|
|
95
|
+
var states = import_react.default.useState(initialState), state = props.forceStyle ? {
|
|
96
|
+
...states[0],
|
|
97
|
+
[props.forceStyle]: !0
|
|
98
|
+
} : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
|
|
99
|
+
import_constants.isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({
|
|
100
|
+
...state
|
|
101
|
+
}));
|
|
387
102
|
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug);
|
|
388
103
|
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
389
|
-
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(
|
|
390
|
-
var
|
|
104
|
+
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`has presenceState ${JSON.stringify(presenceState)}`);
|
|
105
|
+
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
391
106
|
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
392
107
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
393
|
-
state.unmounted && env && staticConfig.variants[env] ? (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(
|
|
108
|
+
state.unmounted && env && staticConfig.variants[env] ? (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence ENTER "${env}"`), props[env] = !0) : isExiting && exv && (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence EXIT "${exv}"`), props[exv] = exitVariant !== enterExitVariant);
|
|
394
109
|
}
|
|
395
110
|
var shouldAvoidClasses = !import_constants.isWeb;
|
|
396
111
|
if (import_constants.isWeb) {
|
|
397
|
-
var disableClassName = props
|
|
112
|
+
var { disableClassName } = props, isAnimatedAndHydrated = isAnimated && !supportsCSSVars && didHydrateOnce && !import_constants.isServer, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || didHydrateOnce), isDisabledManually = disableClassName && !import_constants.isServer && didHydrateOnce && state.unmounted === !0;
|
|
398
113
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (shouldAvoidClasses = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
399
114
|
isAnimatedAndHydrated,
|
|
400
115
|
isDisabledManually,
|
|
@@ -406,12 +121,12 @@ var useComponentState = function(props, param, staticConfig, config) {
|
|
|
406
121
|
var listeners = /* @__PURE__ */ new Set();
|
|
407
122
|
curStateRef.group = {
|
|
408
123
|
listeners,
|
|
409
|
-
emit
|
|
124
|
+
emit(name, state2) {
|
|
410
125
|
listeners.forEach(function(l) {
|
|
411
126
|
return l(name, state2);
|
|
412
127
|
});
|
|
413
128
|
},
|
|
414
|
-
subscribe
|
|
129
|
+
subscribe(cb) {
|
|
415
130
|
return listeners.add(cb), function() {
|
|
416
131
|
listeners.delete(cb);
|
|
417
132
|
};
|
|
@@ -424,7 +139,10 @@ var useComponentState = function(props, param, staticConfig, config) {
|
|
|
424
139
|
og(state2), curStateRef.group.emit(groupName, {
|
|
425
140
|
pseudo: state2
|
|
426
141
|
});
|
|
427
|
-
var next =
|
|
142
|
+
var next = {
|
|
143
|
+
...groupContextState[groupName],
|
|
144
|
+
...state2
|
|
145
|
+
};
|
|
428
146
|
groupContextState[groupName] = next;
|
|
429
147
|
};
|
|
430
148
|
}
|
|
@@ -459,15 +177,18 @@ import_constants.isWeb && globalThis.document && (document.addEventListener("key
|
|
|
459
177
|
lastInteractionWasKeyboard.value = !1;
|
|
460
178
|
}));
|
|
461
179
|
function createComponent(staticConfig) {
|
|
462
|
-
var _staticConfig_defaultProps, componentName = staticConfig
|
|
180
|
+
var _staticConfig_defaultProps, { componentName } = staticConfig, config = null, defaultProps = staticConfig.defaultProps;
|
|
463
181
|
(0, import_config.onConfiguredOnce)(function(conf) {
|
|
464
182
|
if (config = conf, componentName) {
|
|
465
183
|
var _conf_defaultProps, defaultForComponent = (_conf_defaultProps = conf.defaultProps) === null || _conf_defaultProps === void 0 ? void 0 : _conf_defaultProps[componentName];
|
|
466
|
-
defaultForComponent && (defaultProps =
|
|
184
|
+
defaultForComponent && (defaultProps = {
|
|
185
|
+
...defaultForComponent,
|
|
186
|
+
...defaultProps
|
|
187
|
+
});
|
|
467
188
|
}
|
|
468
189
|
});
|
|
469
|
-
var
|
|
470
|
-
process.env.NODE_ENV === "development" && (!((_staticConfig_defaultProps = staticConfig.defaultProps) === null || _staticConfig_defaultProps === void 0) && _staticConfig_defaultProps.debug) && process.env.IS_STATIC !== "is_static" && (0, import_log.log)(
|
|
190
|
+
var { Component, isText, isZStack, isHOC, validStyles: _$validStyles = {}, variants = {} } = staticConfig;
|
|
191
|
+
process.env.NODE_ENV === "development" && (!((_staticConfig_defaultProps = staticConfig.defaultProps) === null || _staticConfig_defaultProps === void 0) && _staticConfig_defaultProps.debug) && process.env.IS_STATIC !== "is_static" && (0, import_log.log)(`\u{1F41B} [${componentName || "Component"}]`, {
|
|
471
192
|
staticConfig,
|
|
472
193
|
defaultProps,
|
|
473
194
|
defaultPropsKeyOrder: defaultProps ? Object.keys(defaultProps) : []
|
|
@@ -484,10 +205,10 @@ function createComponent(staticConfig) {
|
|
|
484
205
|
var _propsIn_datatestrenders, _current, _;
|
|
485
206
|
(_ = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _ !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
|
|
486
207
|
}
|
|
487
|
-
var componentContext = import_react.default.useContext(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue,
|
|
208
|
+
var componentContext = import_react.default.useContext(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
|
|
488
209
|
if (context) {
|
|
489
210
|
contextValue = import_react.default.useContext(context);
|
|
490
|
-
var inverseShorthands = (0, import_config.getConfig)()
|
|
211
|
+
var { inverseShorthands } = (0, import_config.getConfig)();
|
|
491
212
|
for (var key in context.props) {
|
|
492
213
|
var _propsIn_key, _ref, _ref1, propVal = (_ref1 = (_ref = (_propsIn_key = propsIn[key]) !== null && _propsIn_key !== void 0 ? _propsIn_key : propsIn[inverseShorthands[key]]) !== null && _ref !== void 0 ? _ref : defaultProps == null ? void 0 : defaultProps[key]) !== null && _ref1 !== void 0 ? _ref1 : defaultProps == null ? void 0 : defaultProps[inverseShorthands[key]];
|
|
493
214
|
if (propVal === void 0) {
|
|
@@ -497,7 +218,10 @@ function createComponent(staticConfig) {
|
|
|
497
218
|
overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = propVal;
|
|
498
219
|
}
|
|
499
220
|
}
|
|
500
|
-
var curDefaultProps = styledContextProps ?
|
|
221
|
+
var curDefaultProps = styledContextProps ? {
|
|
222
|
+
...defaultProps,
|
|
223
|
+
...styledContextProps
|
|
224
|
+
} : defaultProps, props = propsIn;
|
|
501
225
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
502
226
|
var debugProp = props.debug, componentName2 = props.componentName || staticConfig.componentName;
|
|
503
227
|
if (process.env.NODE_ENV === "development" && import_constants.isClient && import_react.default.useEffect(function() {
|
|
@@ -507,7 +231,7 @@ function createComponent(staticConfig) {
|
|
|
507
231
|
if (show) {
|
|
508
232
|
overlay = document.createElement("span"), overlay.style.inset = "0px", overlay.style.zIndex = "1000000", overlay.style.position = "absolute", overlay.style.borderColor = "red", overlay.style.borderWidth = "1px", overlay.style.borderStyle = "dotted";
|
|
509
233
|
var dataAt = node.getAttribute("data-at") || "", dataIn = node.getAttribute("data-in") || "", tooltip = document.createElement("span");
|
|
510
|
-
tooltip.style.position = "absolute", tooltip.style.top = "0px", tooltip.style.left = "0px", tooltip.style.padding = "3px", tooltip.style.background = "rgba(0,0,0,0.75)", tooltip.style.color = "rgba(255,255,255,1)", tooltip.style.fontSize = "12px", tooltip.style.lineHeight = "12px", tooltip.style.fontFamily = "monospace", tooltip.style.webkitFontSmoothing = "none", tooltip.innerText =
|
|
234
|
+
tooltip.style.position = "absolute", tooltip.style.top = "0px", tooltip.style.left = "0px", tooltip.style.padding = "3px", tooltip.style.background = "rgba(0,0,0,0.75)", tooltip.style.color = "rgba(255,255,255,1)", tooltip.style.fontSize = "12px", tooltip.style.lineHeight = "12px", tooltip.style.fontFamily = "monospace", tooltip.style.webkitFontSmoothing = "none", tooltip.innerText = `${componentName2 || ""} ${dataAt} ${dataIn}`.trim(), overlay.appendChild(tooltip), node.appendChild(overlay);
|
|
511
235
|
} else
|
|
512
236
|
overlay && node.removeChild(overlay);
|
|
513
237
|
};
|
|
@@ -520,15 +244,15 @@ function createComponent(staticConfig) {
|
|
|
520
244
|
var timer = require("@tamagui/timer").timer();
|
|
521
245
|
time = timer.start();
|
|
522
246
|
}
|
|
523
|
-
process.env.NODE_ENV === "development" && time && time(
|
|
524
|
-
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations,
|
|
525
|
-
process.env.NODE_ENV === "development" && time && time
|
|
247
|
+
process.env.NODE_ENV === "development" && time && time`start (ignore)`, process.env.NODE_ENV === "development" && time && time`did-finish-ssr`, process.env.NODE_ENV === "development" && time && time`stateref`;
|
|
248
|
+
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow, shouldAvoidClasses, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient } = useComponentState(props, componentContext, staticConfig, config), shouldForcePseudo = !!propsIn.forceStyle, noClassNames = shouldAvoidClasses || shouldForcePseudo;
|
|
249
|
+
process.env.NODE_ENV === "development" && time && time`use-state`;
|
|
526
250
|
var hasTextAncestor = !!(import_constants.isWeb && isText && componentContext.inText);
|
|
527
|
-
process.env.NODE_ENV === "development" && time && time
|
|
251
|
+
process.env.NODE_ENV === "development" && time && time`use-context`;
|
|
528
252
|
var isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
529
253
|
animationDriver && isAnimated && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
530
254
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
531
|
-
process.env.NODE_ENV === "development" && time && time
|
|
255
|
+
process.env.NODE_ENV === "development" && time && time`theme-props`, props.themeShallow && (curStateRef.themeShallow = !0);
|
|
532
256
|
var themeStateProps = {
|
|
533
257
|
componentName: componentName2,
|
|
534
258
|
disable: disableTheme,
|
|
@@ -538,8 +262,8 @@ function createComponent(staticConfig) {
|
|
|
538
262
|
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.shouldUpdate = function() {
|
|
539
263
|
return stateRef.current.isListeningToTheme;
|
|
540
264
|
}), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
541
|
-
var name =
|
|
542
|
-
if (console.info(
|
|
265
|
+
var name = `${componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (shouldAvoidClasses ? "(shouldAvoidClasses)" : " ") + (state.press || state.pressIn ? "(PRESSED)" : " ") + (state.hover ? "(HOVERED)" : " ") + (state.focus ? "(FOCUSED)" : " ") + ((presenceState == null ? void 0 : presenceState.isPresent) === !1 ? "(EXIT)" : ""), dataIs = propsIn["data-is"] || "", banner = `${internalID} ${name}${dataIs ? ` ${dataIs}` : ""} ${type}`;
|
|
266
|
+
if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"), import_constants.isServer)
|
|
543
267
|
(0, import_log.log)({
|
|
544
268
|
noClassNames,
|
|
545
269
|
isAnimated,
|
|
@@ -550,7 +274,7 @@ function createComponent(staticConfig) {
|
|
|
550
274
|
else {
|
|
551
275
|
console.groupEnd();
|
|
552
276
|
var ch = propsIn.children, childLog = typeof ch == "string" ? ch.length > 4 ? ch.slice(0, 4) + "..." : ch : "";
|
|
553
|
-
childLog.length && (childLog =
|
|
277
|
+
childLog.length && (childLog = `(children: ${childLog})`), console.groupCollapsed(`${childLog} Props:`), (0, import_log.log)("props in:", propsIn), (0, import_log.log)("final props:", props), (0, import_log.log)({
|
|
554
278
|
state,
|
|
555
279
|
staticConfig,
|
|
556
280
|
elementType,
|
|
@@ -567,13 +291,13 @@ function createComponent(staticConfig) {
|
|
|
567
291
|
}), console.groupEnd();
|
|
568
292
|
}
|
|
569
293
|
}
|
|
570
|
-
process.env.NODE_ENV === "development" && time && time
|
|
571
|
-
var
|
|
294
|
+
process.env.NODE_ENV === "development" && time && time`pre-theme-media`;
|
|
295
|
+
var [themeState, theme] = (0, import_useTheme.useThemeWithState)(themeStateProps);
|
|
572
296
|
elementType = Component || elementType;
|
|
573
297
|
var isStringElement = typeof elementType == "string";
|
|
574
|
-
process.env.NODE_ENV === "development" && time && time
|
|
298
|
+
process.env.NODE_ENV === "development" && time && time`theme`;
|
|
575
299
|
var mediaState = (0, import_useMedia.useMedia)(stateRef, componentContext, debugProp);
|
|
576
|
-
(0, import_createVariable.setDidGetVariableValue)(!1), process.env.NODE_ENV === "development" && time && time
|
|
300
|
+
(0, import_createVariable.setDidGetVariableValue)(!1), process.env.NODE_ENV === "development" && time && time`media`;
|
|
577
301
|
var resolveValues = (
|
|
578
302
|
// if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
|
|
579
303
|
isAnimated && !supportsCSSVars || isHOC && state.unmounted == !1 && hasAnimationProp ? "value" : "auto"
|
|
@@ -590,34 +314,37 @@ function createComponent(staticConfig) {
|
|
|
590
314
|
var _splitStyles;
|
|
591
315
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
592
316
|
}
|
|
593
|
-
process.env.NODE_ENV === "development" && time && time
|
|
317
|
+
process.env.NODE_ENV === "development" && time && time`split-styles`, curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
|
|
594
318
|
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClassNames && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
595
319
|
process.env.NODE_ENV === "development" && debugProp && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(stateRef, {
|
|
596
320
|
enabled: shouldListenForMedia,
|
|
597
321
|
keys: mediaListeningKeys
|
|
598
322
|
});
|
|
599
|
-
var
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
323
|
+
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
|
|
324
|
+
asChild,
|
|
325
|
+
children,
|
|
326
|
+
themeShallow,
|
|
327
|
+
spaceDirection: _spaceDirection,
|
|
328
|
+
onPress,
|
|
329
|
+
onLongPress,
|
|
330
|
+
onPressIn,
|
|
331
|
+
onPressOut,
|
|
332
|
+
onHoverIn,
|
|
333
|
+
onHoverOut,
|
|
334
|
+
onMouseUp,
|
|
335
|
+
onMouseDown,
|
|
336
|
+
onMouseEnter,
|
|
337
|
+
onMouseLeave,
|
|
338
|
+
onFocus,
|
|
339
|
+
onBlur,
|
|
340
|
+
separator,
|
|
341
|
+
// ignore from here on out
|
|
342
|
+
forceStyle: _forceStyle,
|
|
343
|
+
// @ts-ignore for next/link compat etc
|
|
344
|
+
onClick,
|
|
345
|
+
theme: _themeProp,
|
|
346
|
+
...nonTamaguiProps
|
|
347
|
+
} = viewPropsIn, viewProps = nonTamaguiProps;
|
|
621
348
|
!isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), elementType.acceptTagProp && (viewProps.tag = tagProp);
|
|
622
349
|
var animationStyles, shouldUseAnimation = (
|
|
623
350
|
// if it supports css vars we run it on server too to get matching initial style
|
|
@@ -636,23 +363,25 @@ function createComponent(staticConfig) {
|
|
|
636
363
|
staticConfig,
|
|
637
364
|
stateRef
|
|
638
365
|
});
|
|
639
|
-
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className =
|
|
366
|
+
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${viewProps.className || ""} ${animations.className}`)), process.env.NODE_ENV === "development" && time && time`animations`;
|
|
640
367
|
}
|
|
641
368
|
process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
|
|
642
369
|
|
|
643
|
-
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time && time
|
|
370
|
+
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time && time`destructure`, groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
644
371
|
stateRef.current.group.emit(groupName, {
|
|
645
372
|
layout: e.nativeEvent.layout
|
|
646
373
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
647
|
-
return
|
|
374
|
+
return {
|
|
375
|
+
...prev
|
|
376
|
+
};
|
|
648
377
|
}), stateRef.current.hasMeasured = !0;
|
|
649
378
|
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curStateRef.willHydrate)) || nonTamaguiProps, curStateRef.composedRef || (curStateRef.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
650
379
|
return stateRef.current.host = x;
|
|
651
380
|
}, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react.default.Children.toArray(props.children).forEach(function(item) {
|
|
652
381
|
typeof item == "string" && item !== `
|
|
653
|
-
` && console.error(
|
|
654
|
-
}), process.env.NODE_ENV === "development" && time && time
|
|
655
|
-
var
|
|
382
|
+
` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`);
|
|
383
|
+
}), process.env.NODE_ENV === "development" && time && time`events-hooks`;
|
|
384
|
+
var { pseudoGroups, mediaGroups } = splitStyles, unPress = function() {
|
|
656
385
|
return setStateShallow({
|
|
657
386
|
press: !1,
|
|
658
387
|
pressIn: !1
|
|
@@ -689,11 +418,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
689
418
|
}, [
|
|
690
419
|
state.unmounted,
|
|
691
420
|
disabled,
|
|
692
|
-
pseudoGroups ? Object.keys(
|
|
693
|
-
|
|
421
|
+
pseudoGroups ? Object.keys([
|
|
422
|
+
...pseudoGroups
|
|
423
|
+
]).join("") : 0,
|
|
424
|
+
mediaGroups ? Object.keys([
|
|
425
|
+
...mediaGroups
|
|
426
|
+
]).join("") : 0
|
|
694
427
|
]);
|
|
695
428
|
var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimePressStyle);
|
|
696
|
-
process.env.NODE_ENV === "development" && time && time
|
|
429
|
+
process.env.NODE_ENV === "development" && time && time`events-setup`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("\u{1FAA9} events()", {
|
|
697
430
|
runtimeFocusStyle,
|
|
698
431
|
runtimePressStyle,
|
|
699
432
|
runtimeHoverStyle,
|
|
@@ -704,20 +437,20 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
704
437
|
shouldAttach,
|
|
705
438
|
needsHoverState
|
|
706
439
|
});
|
|
707
|
-
var events = shouldAttach ?
|
|
440
|
+
var events = shouldAttach ? {
|
|
708
441
|
onPressOut: attachPress ? function(e) {
|
|
709
442
|
unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
710
|
-
} : void 0
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
443
|
+
} : void 0,
|
|
444
|
+
...(attachHover || attachPress) && {
|
|
445
|
+
onMouseEnter: function(e) {
|
|
446
|
+
var next = {};
|
|
447
|
+
needsHoverState && (next.hover = !0), needsPressState && state.pressIn && (next.press = !0), setStateShallow(next), onHoverIn == null || onHoverIn(e), onMouseEnter == null || onMouseEnter(e);
|
|
448
|
+
},
|
|
449
|
+
onMouseLeave: function(e) {
|
|
450
|
+
var next = {};
|
|
451
|
+
needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
452
|
+
}
|
|
715
453
|
},
|
|
716
|
-
onMouseLeave: function(e) {
|
|
717
|
-
var next = {};
|
|
718
|
-
needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
719
|
-
}
|
|
720
|
-
}), {
|
|
721
454
|
onPressIn: attachPress ? function(e) {
|
|
722
455
|
(runtimePressStyle || groupName) && setStateShallow({
|
|
723
456
|
press: !0,
|
|
@@ -726,30 +459,32 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
726
459
|
} : void 0,
|
|
727
460
|
onPress: attachPress ? function(e) {
|
|
728
461
|
unPress(), import_constants.isWeb && (onClick == null || onClick(e)), onPress == null || onPress(e);
|
|
729
|
-
} : void 0
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}, attachFocus && {
|
|
735
|
-
onFocus: function(e) {
|
|
736
|
-
pseudos != null && pseudos.focusVisibleStyle ? setTimeout(function() {
|
|
737
|
-
setStateShallow({
|
|
738
|
-
focus: !0,
|
|
739
|
-
focusVisible: !!lastInteractionWasKeyboard.value
|
|
740
|
-
});
|
|
741
|
-
}, 0) : setStateShallow({
|
|
742
|
-
focus: !0,
|
|
743
|
-
focusVisible: !1
|
|
744
|
-
}), onFocus == null || onFocus(e);
|
|
462
|
+
} : void 0,
|
|
463
|
+
...attachPress && onLongPress && {
|
|
464
|
+
onLongPress: function(e) {
|
|
465
|
+
unPress(), onLongPress == null || onLongPress(e);
|
|
466
|
+
}
|
|
745
467
|
},
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
468
|
+
...attachFocus && {
|
|
469
|
+
onFocus: function(e) {
|
|
470
|
+
pseudos != null && pseudos.focusVisibleStyle ? setTimeout(function() {
|
|
471
|
+
setStateShallow({
|
|
472
|
+
focus: !0,
|
|
473
|
+
focusVisible: !!lastInteractionWasKeyboard.value
|
|
474
|
+
});
|
|
475
|
+
}, 0) : setStateShallow({
|
|
476
|
+
focus: !0,
|
|
477
|
+
focusVisible: !1
|
|
478
|
+
}), onFocus == null || onFocus(e);
|
|
479
|
+
},
|
|
480
|
+
onBlur: function(e) {
|
|
481
|
+
setStateShallow({
|
|
482
|
+
focus: !1,
|
|
483
|
+
focusVisible: !1
|
|
484
|
+
}), onBlur == null || onBlur(e);
|
|
485
|
+
}
|
|
751
486
|
}
|
|
752
|
-
}
|
|
487
|
+
} : null;
|
|
753
488
|
if (events && !asChild) {
|
|
754
489
|
var _viewProps_focusable;
|
|
755
490
|
Object.assign(events, {
|
|
@@ -763,13 +498,13 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
763
498
|
minPressDuration: 0
|
|
764
499
|
});
|
|
765
500
|
}
|
|
766
|
-
process.env.NODE_ENV === "development" && time && time
|
|
501
|
+
process.env.NODE_ENV === "development" && time && time`events`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("events", {
|
|
767
502
|
events,
|
|
768
503
|
attachHover,
|
|
769
504
|
attachPress
|
|
770
505
|
}), (_hooks_useEvents = import_setupHooks.hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(import_setupHooks.hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
|
|
771
506
|
var direction = props.spaceDirection || "both";
|
|
772
|
-
process.env.NODE_ENV === "development" && time && time
|
|
507
|
+
process.env.NODE_ENV === "development" && time && time`hooks`;
|
|
773
508
|
var content = !children || asChild ? children : spacedChildren({
|
|
774
509
|
separator,
|
|
775
510
|
children,
|
|
@@ -786,37 +521,42 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
786
521
|
onPress,
|
|
787
522
|
onLongPress
|
|
788
523
|
});
|
|
789
|
-
process.env.NODE_ENV === "development" && time && time
|
|
524
|
+
process.env.NODE_ENV === "development" && time && time`spaced-as-child`;
|
|
790
525
|
var useChildrenResult;
|
|
791
526
|
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps, events, staticConfig)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react.default.createElement(elementType, viewProps, content);
|
|
792
527
|
var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
|
|
793
528
|
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResetPresence, {
|
|
794
529
|
children: content
|
|
795
|
-
})), process.env.NODE_ENV === "development" && time && time
|
|
530
|
+
})), process.env.NODE_ENV === "development" && time && time`create-element`;
|
|
796
531
|
var groupState = curStateRef.group, subGroupContext = import_react.default.useMemo(function() {
|
|
797
532
|
var _splitStyles_style, _splitStyles_style1;
|
|
798
533
|
if (!(!groupState || !groupName))
|
|
799
|
-
return groupState.listeners.clear(),
|
|
534
|
+
return groupState.listeners.clear(), {
|
|
535
|
+
...componentContext.groups,
|
|
800
536
|
// change reference so as we mutate it doesn't affect siblings etc
|
|
801
|
-
state:
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
537
|
+
state: {
|
|
538
|
+
...componentContext.groups.state,
|
|
539
|
+
[groupName]: {
|
|
540
|
+
pseudo: import_defaultComponentState.defaultComponentStateMounted,
|
|
541
|
+
// capture just initial width and height if they exist
|
|
542
|
+
// will have top, left, width, height (not x, y)
|
|
543
|
+
layout: {
|
|
544
|
+
width: fromPx((_splitStyles_style = splitStyles.style) === null || _splitStyles_style === void 0 ? void 0 : _splitStyles_style.width),
|
|
545
|
+
height: fromPx((_splitStyles_style1 = splitStyles.style) === null || _splitStyles_style1 === void 0 ? void 0 : _splitStyles_style1.height)
|
|
546
|
+
}
|
|
808
547
|
}
|
|
809
|
-
}
|
|
548
|
+
},
|
|
810
549
|
emit: groupState.emit,
|
|
811
550
|
subscribe: groupState.subscribe
|
|
812
|
-
}
|
|
551
|
+
};
|
|
813
552
|
}, [
|
|
814
553
|
groupName
|
|
815
554
|
]);
|
|
816
|
-
if (groupName && subGroupContext && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider,
|
|
555
|
+
if (groupName && subGroupContext && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
556
|
+
...componentContext,
|
|
817
557
|
groups: subGroupContext,
|
|
818
558
|
children: content
|
|
819
|
-
}))
|
|
559
|
+
})), process.env.NODE_ENV === "development" && time && time`group-context`, content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time && time`themed-children`, process.env.NODE_ENV === "development" && props.debug === "visualize" && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeDebug.ThemeDebug, {
|
|
820
560
|
themeState,
|
|
821
561
|
themeProps: props,
|
|
822
562
|
children: content
|
|
@@ -832,14 +572,16 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
832
572
|
}
|
|
833
573
|
if (overriddenContextProps) {
|
|
834
574
|
var Provider = staticConfig.context.Provider;
|
|
835
|
-
content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider,
|
|
575
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider, {
|
|
576
|
+
...contextValue,
|
|
577
|
+
...overriddenContextProps,
|
|
836
578
|
children: content
|
|
837
|
-
})
|
|
579
|
+
});
|
|
838
580
|
}
|
|
839
581
|
if (process.env.TAMAGUI_REACT_19 && !1)
|
|
840
582
|
var rulesToInsert, keys;
|
|
841
583
|
if (process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
842
|
-
var element1 = typeof elementType == "string" ? elementType : "Component", title =
|
|
584
|
+
var element1 = typeof elementType == "string" ? elementType : "Component", title = `render <${element1} /> (${internalID}) with props`;
|
|
843
585
|
if (import_constants.isWeb) {
|
|
844
586
|
console.groupCollapsed(title);
|
|
845
587
|
try {
|
|
@@ -882,7 +624,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
882
624
|
if (debugProp === "break")
|
|
883
625
|
debugger;
|
|
884
626
|
}
|
|
885
|
-
return process.env.NODE_ENV === "development" && time && (time
|
|
627
|
+
return process.env.NODE_ENV === "development" && time && (time`rest`, globalThis.willPrint || (globalThis.willPrint = !0, setTimeout(function() {
|
|
886
628
|
delete globalThis.willPrint, time.print(), time = null;
|
|
887
629
|
}, 50))), content;
|
|
888
630
|
});
|
|
@@ -890,11 +632,13 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
890
632
|
var res = component;
|
|
891
633
|
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = /* @__PURE__ */ import_react.default.memo(res)), res.staticConfig = staticConfig;
|
|
892
634
|
function extendStyledConfig(extended) {
|
|
893
|
-
return
|
|
635
|
+
return {
|
|
636
|
+
...staticConfig,
|
|
637
|
+
...extended,
|
|
894
638
|
neverFlatten: !0,
|
|
895
639
|
isHOC: !0,
|
|
896
640
|
isStyledHOC: !1
|
|
897
|
-
}
|
|
641
|
+
};
|
|
898
642
|
}
|
|
899
643
|
function extractable(Component2, extended) {
|
|
900
644
|
return Component2.staticConfig = extendStyledConfig(extended), Component2.styleable = styleable, Component2;
|
|
@@ -910,7 +654,7 @@ function Unspaced(props) {
|
|
|
910
654
|
}
|
|
911
655
|
Unspaced.isUnspaced = !0;
|
|
912
656
|
var getSpacerSize = function(size, param) {
|
|
913
|
-
var tokens = param
|
|
657
|
+
var { tokens } = param;
|
|
914
658
|
size = size === !0 ? "$true" : size;
|
|
915
659
|
var _tokens_space_size, sizePx = (_tokens_space_size = tokens.space[size]) !== null && _tokens_space_size !== void 0 ? _tokens_space_size : size;
|
|
916
660
|
return {
|
|
@@ -924,12 +668,13 @@ var getSpacerSize = function(size, param) {
|
|
|
924
668
|
memo: !0,
|
|
925
669
|
componentName: "Spacer",
|
|
926
670
|
validStyles: import_helpers.validStyles,
|
|
927
|
-
defaultProps:
|
|
671
|
+
defaultProps: {
|
|
672
|
+
...import_constants2.stackDefaultStyles,
|
|
928
673
|
// avoid nesting issues
|
|
929
674
|
tag: "span",
|
|
930
675
|
size: !0,
|
|
931
676
|
pointerEvents: "none"
|
|
932
|
-
}
|
|
677
|
+
},
|
|
933
678
|
variants: {
|
|
934
679
|
size: {
|
|
935
680
|
"...": getSpacerSize
|
|
@@ -953,7 +698,7 @@ var getSpacerSize = function(size, param) {
|
|
|
953
698
|
}
|
|
954
699
|
});
|
|
955
700
|
function spacedChildren(props) {
|
|
956
|
-
var _childrenList__type, _childrenList_,
|
|
701
|
+
var _childrenList__type, _childrenList_, { isZStack, children, space, direction, spaceFlex, separator, ensureKeys } = props, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null, areChildrenArray = Array.isArray(children);
|
|
957
702
|
if (!ensureKeys && !(hasSpace || hasSeparator || isZStack))
|
|
958
703
|
return children;
|
|
959
704
|
var childrenList = areChildrenArray ? children : import_react.default.Children.toArray(children), len = childrenList.length;
|
|
@@ -962,7 +707,7 @@ function spacedChildren(props) {
|
|
|
962
707
|
var final = [], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
963
708
|
try {
|
|
964
709
|
for (var _iterator = childrenList.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
965
|
-
var
|
|
710
|
+
var [index, child] = _step.value, _child_type, isEmpty = child == null || Array.isArray(child) && child.length === 0;
|
|
966
711
|
if (!isEmpty && /* @__PURE__ */ import_react.default.isValidElement(child) && (!((_child_type = child.type) === null || _child_type === void 0) && _child_type.shouldForwardSpace) && (child = /* @__PURE__ */ import_react.default.cloneElement(child, {
|
|
967
712
|
space,
|
|
968
713
|
spaceFlex,
|
|
@@ -972,22 +717,22 @@ function spacedChildren(props) {
|
|
|
972
717
|
children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AbsoluteFill, {
|
|
973
718
|
children: child
|
|
974
719
|
}) : child
|
|
975
|
-
},
|
|
720
|
+
}, `${index}0t`)), !(isUnspaced(child) && index === 0) && !isZStack) {
|
|
976
721
|
var next = childrenList[index + 1];
|
|
977
722
|
next && !isEmpty && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
|
|
978
|
-
key:
|
|
723
|
+
key: `_${index}_00t`,
|
|
979
724
|
direction,
|
|
980
725
|
space,
|
|
981
726
|
spaceFlex
|
|
982
727
|
})), final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, {
|
|
983
728
|
children: separator
|
|
984
|
-
},
|
|
985
|
-
key:
|
|
729
|
+
}, `${index}03t`)), hasSpace && final.push(createSpacer({
|
|
730
|
+
key: `_${index}01t`,
|
|
986
731
|
direction,
|
|
987
732
|
space,
|
|
988
733
|
spaceFlex
|
|
989
734
|
}))) : final.push(createSpacer({
|
|
990
|
-
key:
|
|
735
|
+
key: `_${index}02t`,
|
|
991
736
|
direction,
|
|
992
737
|
space,
|
|
993
738
|
spaceFlex
|
|
@@ -1007,20 +752,22 @@ function spacedChildren(props) {
|
|
|
1007
752
|
return process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)(" Spaced children", final, props), final;
|
|
1008
753
|
}
|
|
1009
754
|
function createSpacer(param) {
|
|
1010
|
-
var
|
|
1011
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spacer,
|
|
755
|
+
var { key, direction, space, spaceFlex } = param;
|
|
756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spacer, {
|
|
1012
757
|
size: space,
|
|
1013
|
-
direction
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
758
|
+
direction,
|
|
759
|
+
...typeof spaceFlex < "u" && {
|
|
760
|
+
flex: spaceFlex === !0 ? 1 : spaceFlex === !1 ? 0 : spaceFlex
|
|
761
|
+
}
|
|
762
|
+
}, key);
|
|
1017
763
|
}
|
|
1018
764
|
function isUnspaced(child) {
|
|
1019
765
|
var t = child == null ? void 0 : child.type;
|
|
1020
766
|
return (t == null ? void 0 : t.isVisuallyHidden) || (t == null ? void 0 : t.isUnspaced);
|
|
1021
767
|
}
|
|
1022
768
|
var AbsoluteFill = createComponent({
|
|
1023
|
-
defaultProps:
|
|
769
|
+
defaultProps: {
|
|
770
|
+
...import_constants2.stackDefaultStyles,
|
|
1024
771
|
flexDirection: "column",
|
|
1025
772
|
position: "absolute",
|
|
1026
773
|
top: 0,
|
|
@@ -1028,12 +775,12 @@ var AbsoluteFill = createComponent({
|
|
|
1028
775
|
bottom: 0,
|
|
1029
776
|
left: 0,
|
|
1030
777
|
pointerEvents: "box-none"
|
|
1031
|
-
}
|
|
778
|
+
}
|
|
1032
779
|
});
|
|
1033
780
|
function hasAnimatedStyleValue(style) {
|
|
1034
781
|
return Object.keys(style).some(function(k) {
|
|
1035
782
|
var val = style[k];
|
|
1036
|
-
return val &&
|
|
783
|
+
return val && typeof val == "object" && "_animation" in val;
|
|
1037
784
|
});
|
|
1038
785
|
}
|
|
1039
786
|
var fromPx = function(val) {
|
|
@@ -1042,25 +789,29 @@ var fromPx = function(val) {
|
|
|
1042
789
|
var _props_accessibilityState;
|
|
1043
790
|
return props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
|
|
1044
791
|
}, subscribeToContextGroup = function(param) {
|
|
1045
|
-
var
|
|
792
|
+
var { disabled = !1, setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
1046
793
|
if (pseudoGroups || mediaGroups) {
|
|
1047
794
|
var _componentContext_groups_subscribe, _componentContext_groups, current = {
|
|
1048
795
|
pseudo: {},
|
|
1049
796
|
media: {}
|
|
1050
797
|
};
|
|
1051
798
|
return process.env.NODE_ENV === "development" && !componentContext.groups && console.debug("No context group found"), (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 || (_componentContext_groups_subscribe = _componentContext_groups.subscribe) === null || _componentContext_groups_subscribe === void 0 ? void 0 : _componentContext_groups_subscribe.call(_componentContext_groups, function(name, param2) {
|
|
1052
|
-
var
|
|
1053
|
-
var group = _object_spread_props(_object_spread({}, state.group), _define_property({}, name, current));
|
|
1054
|
-
setStateShallow({
|
|
1055
|
-
group
|
|
1056
|
-
});
|
|
1057
|
-
};
|
|
799
|
+
var { layout, pseudo } = param2;
|
|
1058
800
|
if (pseudo && (pseudoGroups != null && pseudoGroups.has(String(name))))
|
|
1059
801
|
Object.assign(current.pseudo, pseudo), persist();
|
|
1060
802
|
else if (layout && mediaGroups) {
|
|
1061
803
|
var mediaState = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState);
|
|
1062
804
|
next !== current.media && (Object.assign(current.media, next), persist());
|
|
1063
805
|
}
|
|
806
|
+
function persist() {
|
|
807
|
+
var group = {
|
|
808
|
+
...state.group,
|
|
809
|
+
[name]: current
|
|
810
|
+
};
|
|
811
|
+
setStateShallow({
|
|
812
|
+
group
|
|
813
|
+
});
|
|
814
|
+
}
|
|
1064
815
|
});
|
|
1065
816
|
}
|
|
1066
817
|
};
|