@tamagui/core 1.0.1-beta.70 → 1.0.1-beta.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Tamagui.js +4 -6
- package/dist/cjs/Tamagui.js.map +1 -1
- package/dist/cjs/ThemeManager.js +3 -5
- package/dist/cjs/ThemeManager.js.map +1 -1
- package/dist/cjs/conf.js +11 -11
- package/dist/cjs/conf.js.map +2 -2
- package/dist/cjs/constants/rnw.js +1 -2
- package/dist/cjs/constants/rnw.js.map +1 -1
- package/dist/cjs/createComponent.js +13 -18
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createFont.js +2 -3
- package/dist/cjs/createFont.js.map +1 -1
- package/dist/cjs/createShorthands.js +0 -2
- package/dist/cjs/createShorthands.js.map +1 -1
- package/dist/cjs/createTamagui.js +4 -7
- package/dist/cjs/createTamagui.js.map +1 -1
- package/dist/cjs/createTheme.js +2 -3
- package/dist/cjs/createTheme.js.map +1 -1
- package/dist/cjs/createTokens.js +0 -2
- package/dist/cjs/createTokens.js.map +1 -1
- package/dist/cjs/createVariable.js +4 -10
- package/dist/cjs/createVariable.js.map +1 -1
- package/dist/cjs/createVariables.js +2 -3
- package/dist/cjs/createVariables.js.map +1 -1
- package/dist/cjs/helpers/areEqualSets.js +2 -3
- package/dist/cjs/helpers/areEqualSets.js.map +1 -1
- package/dist/cjs/helpers/calc.js +4 -5
- package/dist/cjs/helpers/calc.js.map +1 -1
- package/dist/cjs/helpers/createMediaStyle.js +2 -3
- package/dist/cjs/helpers/createMediaStyle.js.map +1 -1
- package/dist/cjs/helpers/createPropMapper.js +12 -15
- package/dist/cjs/helpers/createPropMapper.js.map +1 -1
- package/dist/cjs/helpers/createShallowUpdate.js +0 -2
- package/dist/cjs/helpers/createShallowUpdate.js.map +1 -1
- package/dist/cjs/helpers/createTamaguiProvider.js +2 -4
- package/dist/cjs/helpers/createTamaguiProvider.js.map +1 -1
- package/dist/cjs/helpers/extendStaticConfig.js +2 -4
- package/dist/cjs/helpers/extendStaticConfig.js.map +1 -1
- package/dist/cjs/helpers/fixNativeShadow.js +2 -3
- package/dist/cjs/helpers/fixNativeShadow.js.map +1 -1
- package/dist/cjs/helpers/fixNativeShadow.native.js +0 -2
- package/dist/cjs/helpers/fixNativeShadow.native.js.map +1 -1
- package/dist/cjs/helpers/generateAtomicStyles.js +11 -21
- package/dist/cjs/helpers/generateAtomicStyles.js.map +1 -1
- package/dist/cjs/helpers/getExpandedShorthands.js +0 -2
- package/dist/cjs/helpers/getExpandedShorthands.js.map +1 -1
- package/dist/cjs/helpers/getSize.js +4 -5
- package/dist/cjs/helpers/getSize.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.js +11 -14
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStackSize.js +2 -3
- package/dist/cjs/helpers/getStackSize.js.map +1 -1
- package/dist/cjs/helpers/getStylesAtomic.js +0 -3
- package/dist/cjs/helpers/getStylesAtomic.js.map +1 -1
- package/dist/cjs/helpers/getStylesAtomic.native.js +0 -2
- package/dist/cjs/helpers/getStylesAtomic.native.js.map +1 -1
- package/dist/cjs/helpers/getTextSize.js +2 -3
- package/dist/cjs/helpers/getTextSize.js.map +1 -1
- package/dist/cjs/helpers/getVariantExtras.js +0 -2
- package/dist/cjs/helpers/getVariantExtras.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.js +3 -8
- package/dist/cjs/helpers/insertStyleRule.js.map +1 -1
- package/dist/cjs/helpers/isObj.js +1 -2
- package/dist/cjs/helpers/isObj.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiComponent.js +0 -2
- package/dist/cjs/helpers/isTamaguiComponent.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiElement.js +2 -3
- package/dist/cjs/helpers/isTamaguiElement.js.map +1 -1
- package/dist/cjs/helpers/matchMedia.js +2 -3
- package/dist/cjs/helpers/matchMedia.js.map +1 -1
- package/dist/cjs/helpers/matchMedia.native.js +1 -2
- package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.js +2 -3
- package/dist/cjs/helpers/mergeProps.js.map +1 -1
- package/dist/cjs/helpers/mergeTransform.js +2 -3
- package/dist/cjs/helpers/mergeTransform.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeVariables.js +1 -3
- package/dist/cjs/helpers/proxyThemeVariables.js.map +1 -1
- package/dist/cjs/helpers/registerCSSVariable.js +2 -3
- package/dist/cjs/helpers/registerCSSVariable.js.map +1 -1
- package/dist/cjs/helpers/themeable.js +2 -4
- package/dist/cjs/helpers/themeable.js.map +1 -1
- package/dist/cjs/helpers/validate.js +6 -7
- package/dist/cjs/helpers/validate.js.map +1 -1
- package/dist/cjs/helpers/withStaticProperties.js +2 -3
- package/dist/cjs/helpers/withStaticProperties.js.map +1 -1
- package/dist/cjs/helpers/wrapThemeManagerContext.js +0 -2
- package/dist/cjs/helpers/wrapThemeManagerContext.js.map +1 -1
- package/dist/cjs/hooks/useConstant.js +0 -2
- package/dist/cjs/hooks/useConstant.js.map +1 -1
- package/dist/cjs/hooks/useFeatures.js +7 -13
- package/dist/cjs/hooks/useFeatures.js.map +2 -2
- package/dist/cjs/hooks/useId.js +0 -3
- package/dist/cjs/hooks/useId.js.map +1 -1
- package/dist/cjs/hooks/useIsMounted.js +0 -2
- package/dist/cjs/hooks/useIsMounted.js.map +1 -1
- package/dist/cjs/hooks/useIsTouchDevice.js +2 -3
- package/dist/cjs/hooks/useIsTouchDevice.js.map +1 -1
- package/dist/cjs/hooks/useMedia.js +11 -15
- package/dist/cjs/hooks/useMedia.js.map +1 -1
- package/dist/cjs/hooks/usePressable.js +2 -3
- package/dist/cjs/hooks/usePressable.js.map +1 -1
- package/dist/cjs/hooks/useTheme.js +10 -11
- package/dist/cjs/hooks/useTheme.js.map +1 -1
- package/dist/cjs/hooks/useUnmountEffect.js +0 -2
- package/dist/cjs/hooks/useUnmountEffect.js.map +1 -1
- package/dist/cjs/insertFont.js +1 -5
- package/dist/cjs/insertFont.js.map +2 -2
- package/dist/cjs/styled.js +0 -2
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/views/Slot.js +2 -5
- package/dist/cjs/views/Slot.js.map +1 -1
- package/dist/cjs/views/Text.js +2 -1
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/cjs/views/TextAncestorContext.js +2 -3
- package/dist/cjs/views/TextAncestorContext.js.map +1 -1
- package/dist/cjs/views/Theme.js +2 -3
- package/dist/cjs/views/Theme.js.map +1 -1
- package/dist/cjs/views/ThemeInverse.js +2 -4
- package/dist/cjs/views/ThemeInverse.js.map +1 -1
- package/dist/cjs/views/ThemeProvider.js +2 -3
- package/dist/cjs/views/ThemeProvider.js.map +1 -1
- package/dist/cjs/views/ThemeReset.js +2 -3
- package/dist/cjs/views/ThemeReset.js.map +1 -1
- package/dist/esm/Tamagui.js +4 -7
- package/dist/esm/Tamagui.js.map +1 -1
- package/dist/esm/ThemeManager.js +3 -6
- package/dist/esm/ThemeManager.js.map +1 -1
- package/dist/esm/conf.js +11 -12
- package/dist/esm/conf.js.map +2 -2
- package/dist/esm/constants/rnw.js +1 -3
- package/dist/esm/constants/rnw.js.map +1 -1
- package/dist/esm/createComponent.js +13 -19
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createFont.js +2 -4
- package/dist/esm/createFont.js.map +1 -1
- package/dist/esm/createShorthands.js +0 -3
- package/dist/esm/createShorthands.js.map +1 -1
- package/dist/esm/createTamagui.js +4 -8
- package/dist/esm/createTamagui.js.map +1 -1
- package/dist/esm/createTheme.js +2 -4
- package/dist/esm/createTheme.js.map +1 -1
- package/dist/esm/createTokens.js +0 -3
- package/dist/esm/createTokens.js.map +1 -1
- package/dist/esm/createVariable.js +4 -11
- package/dist/esm/createVariable.js.map +1 -1
- package/dist/esm/createVariables.js +2 -4
- package/dist/esm/createVariables.js.map +1 -1
- package/dist/esm/helpers/areEqualSets.js +2 -4
- package/dist/esm/helpers/areEqualSets.js.map +1 -1
- package/dist/esm/helpers/calc.js +4 -6
- package/dist/esm/helpers/calc.js.map +1 -1
- package/dist/esm/helpers/createMediaStyle.js +2 -4
- package/dist/esm/helpers/createMediaStyle.js.map +1 -1
- package/dist/esm/helpers/createPropMapper.js +12 -16
- package/dist/esm/helpers/createPropMapper.js.map +1 -1
- package/dist/esm/helpers/createShallowUpdate.js +0 -3
- package/dist/esm/helpers/createShallowUpdate.js.map +1 -1
- package/dist/esm/helpers/createTamaguiProvider.js +2 -5
- package/dist/esm/helpers/createTamaguiProvider.js.map +1 -1
- package/dist/esm/helpers/extendStaticConfig.js +2 -5
- package/dist/esm/helpers/extendStaticConfig.js.map +1 -1
- package/dist/esm/helpers/fixNativeShadow.js +2 -4
- package/dist/esm/helpers/fixNativeShadow.js.map +1 -1
- package/dist/esm/helpers/fixNativeShadow.native.js +0 -3
- package/dist/esm/helpers/fixNativeShadow.native.js.map +1 -1
- package/dist/esm/helpers/generateAtomicStyles.js +11 -22
- package/dist/esm/helpers/generateAtomicStyles.js.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.js +0 -3
- package/dist/esm/helpers/getExpandedShorthands.js.map +1 -1
- package/dist/esm/helpers/getSize.js +4 -6
- package/dist/esm/helpers/getSize.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.js +11 -15
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStackSize.js +2 -4
- package/dist/esm/helpers/getStackSize.js.map +1 -1
- package/dist/esm/helpers/getStylesAtomic.js +0 -4
- package/dist/esm/helpers/getStylesAtomic.js.map +1 -1
- package/dist/esm/helpers/getStylesAtomic.native.js +0 -3
- package/dist/esm/helpers/getStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getTextSize.js +2 -4
- package/dist/esm/helpers/getTextSize.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.js +0 -3
- package/dist/esm/helpers/getVariantExtras.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.js +3 -9
- package/dist/esm/helpers/insertStyleRule.js.map +1 -1
- package/dist/esm/helpers/isObj.js +1 -3
- package/dist/esm/helpers/isObj.js.map +1 -1
- package/dist/esm/helpers/isTamaguiComponent.js +0 -3
- package/dist/esm/helpers/isTamaguiComponent.js.map +1 -1
- package/dist/esm/helpers/isTamaguiElement.js +2 -4
- package/dist/esm/helpers/isTamaguiElement.js.map +1 -1
- package/dist/esm/helpers/matchMedia.js +2 -4
- package/dist/esm/helpers/matchMedia.js.map +1 -1
- package/dist/esm/helpers/matchMedia.native.js +1 -3
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.js +2 -4
- package/dist/esm/helpers/mergeProps.js.map +1 -1
- package/dist/esm/helpers/mergeTransform.js +2 -4
- package/dist/esm/helpers/mergeTransform.js.map +1 -1
- package/dist/esm/helpers/proxyThemeVariables.js +1 -4
- package/dist/esm/helpers/proxyThemeVariables.js.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.js +2 -4
- package/dist/esm/helpers/registerCSSVariable.js.map +1 -1
- package/dist/esm/helpers/themeable.js +2 -5
- package/dist/esm/helpers/themeable.js.map +1 -1
- package/dist/esm/helpers/validate.js +6 -8
- package/dist/esm/helpers/validate.js.map +1 -1
- package/dist/esm/helpers/withStaticProperties.js +2 -4
- package/dist/esm/helpers/withStaticProperties.js.map +1 -1
- package/dist/esm/helpers/wrapThemeManagerContext.js +0 -3
- package/dist/esm/helpers/wrapThemeManagerContext.js.map +1 -1
- package/dist/esm/hooks/useConstant.js +0 -3
- package/dist/esm/hooks/useConstant.js.map +1 -1
- package/dist/esm/hooks/useFeatures.js +7 -14
- package/dist/esm/hooks/useFeatures.js.map +2 -2
- package/dist/esm/hooks/useId.js +0 -4
- package/dist/esm/hooks/useId.js.map +1 -1
- package/dist/esm/hooks/useIsMounted.js +0 -3
- package/dist/esm/hooks/useIsMounted.js.map +1 -1
- package/dist/esm/hooks/useIsTouchDevice.js +2 -4
- package/dist/esm/hooks/useIsTouchDevice.js.map +1 -1
- package/dist/esm/hooks/useMedia.js +11 -16
- package/dist/esm/hooks/useMedia.js.map +1 -1
- package/dist/esm/hooks/usePressable.js +2 -4
- package/dist/esm/hooks/usePressable.js.map +1 -1
- package/dist/esm/hooks/useTheme.js +10 -12
- package/dist/esm/hooks/useTheme.js.map +1 -1
- package/dist/esm/hooks/useUnmountEffect.js +0 -3
- package/dist/esm/hooks/useUnmountEffect.js.map +1 -1
- package/dist/esm/insertFont.js +1 -6
- package/dist/esm/insertFont.js.map +2 -2
- package/dist/esm/styled.js +0 -3
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/views/Slot.js +2 -6
- package/dist/esm/views/Slot.js.map +1 -1
- package/dist/esm/views/Text.js +2 -1
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/esm/views/TextAncestorContext.js +2 -4
- package/dist/esm/views/TextAncestorContext.js.map +1 -1
- package/dist/esm/views/Theme.js +2 -4
- package/dist/esm/views/Theme.js.map +1 -1
- package/dist/esm/views/ThemeInverse.js +2 -5
- package/dist/esm/views/ThemeInverse.js.map +1 -1
- package/dist/esm/views/ThemeProvider.js +2 -4
- package/dist/esm/views/ThemeProvider.js.map +1 -1
- package/dist/esm/views/ThemeReset.js +2 -4
- package/dist/esm/views/ThemeReset.js.map +1 -1
- package/dist/jsx/Tamagui.js +4 -7
- package/dist/jsx/ThemeManager.js +3 -6
- package/dist/jsx/conf.js +11 -12
- package/dist/jsx/constants/rnw.js +1 -3
- package/dist/jsx/createComponent.js +13 -19
- package/dist/jsx/createFont.js +2 -4
- package/dist/jsx/createShorthands.js +0 -3
- package/dist/jsx/createTamagui.js +4 -8
- package/dist/jsx/createTheme.js +2 -4
- package/dist/jsx/createTokens.js +0 -3
- package/dist/jsx/createVariable.js +4 -11
- package/dist/jsx/createVariables.js +2 -4
- package/dist/jsx/helpers/areEqualSets.js +2 -4
- package/dist/jsx/helpers/calc.js +4 -6
- package/dist/jsx/helpers/createMediaStyle.js +2 -4
- package/dist/jsx/helpers/createPropMapper.js +12 -16
- package/dist/jsx/helpers/createShallowUpdate.js +0 -3
- package/dist/jsx/helpers/createTamaguiProvider.js +2 -5
- package/dist/jsx/helpers/extendStaticConfig.js +2 -5
- package/dist/jsx/helpers/fixNativeShadow.js +2 -4
- package/dist/jsx/helpers/fixNativeShadow.native.js +0 -3
- package/dist/jsx/helpers/generateAtomicStyles.js +11 -22
- package/dist/jsx/helpers/getExpandedShorthands.js +0 -3
- package/dist/jsx/helpers/getSize.js +4 -6
- package/dist/jsx/helpers/getSplitStyles.js +11 -15
- package/dist/jsx/helpers/getStackSize.js +2 -4
- package/dist/jsx/helpers/getStylesAtomic.js +0 -4
- package/dist/jsx/helpers/getStylesAtomic.native.js +0 -3
- package/dist/jsx/helpers/getTextSize.js +2 -4
- package/dist/jsx/helpers/getVariantExtras.js +0 -3
- package/dist/jsx/helpers/insertStyleRule.js +3 -9
- package/dist/jsx/helpers/isObj.js +1 -3
- package/dist/jsx/helpers/isTamaguiComponent.js +0 -3
- package/dist/jsx/helpers/isTamaguiElement.js +2 -4
- package/dist/jsx/helpers/matchMedia.js +2 -4
- package/dist/jsx/helpers/matchMedia.native.js +1 -3
- package/dist/jsx/helpers/mergeProps.js +2 -4
- package/dist/jsx/helpers/mergeTransform.js +2 -4
- package/dist/jsx/helpers/proxyThemeVariables.js +1 -4
- package/dist/jsx/helpers/registerCSSVariable.js +2 -4
- package/dist/jsx/helpers/themeable.js +2 -5
- package/dist/jsx/helpers/validate.js +6 -8
- package/dist/jsx/helpers/withStaticProperties.js +2 -4
- package/dist/jsx/helpers/wrapThemeManagerContext.js +0 -3
- package/dist/jsx/hooks/useConstant.js +0 -3
- package/dist/jsx/hooks/useFeatures.js +7 -14
- package/dist/jsx/hooks/useId.js +0 -4
- package/dist/jsx/hooks/useIsMounted.js +0 -3
- package/dist/jsx/hooks/useIsTouchDevice.js +2 -4
- package/dist/jsx/hooks/useMedia.js +11 -16
- package/dist/jsx/hooks/usePressable.js +2 -4
- package/dist/jsx/hooks/useTheme.js +10 -12
- package/dist/jsx/hooks/useUnmountEffect.js +0 -3
- package/dist/jsx/insertFont.js +1 -6
- package/dist/jsx/styled.js +0 -3
- package/dist/jsx/views/Slot.js +2 -6
- package/dist/jsx/views/Text.js +2 -1
- package/dist/jsx/views/TextAncestorContext.js +2 -4
- package/dist/jsx/views/Theme.js +2 -4
- package/dist/jsx/views/ThemeInverse.js +2 -5
- package/dist/jsx/views/ThemeProvider.js +2 -4
- package/dist/jsx/views/ThemeReset.js +2 -4
- package/package.json +6 -6
- package/reset.css +0 -1
- package/types/Pressability.d.ts +0 -0
- package/types/Pressability.d.ts.map +0 -0
- package/types/Pressability.native.d.ts +0 -0
- package/types/Pressability.native.d.ts.map +0 -0
- package/types/Tamagui.d.ts +0 -0
- package/types/Tamagui.d.ts.map +0 -0
- package/types/ThemeContext.d.ts +0 -0
- package/types/ThemeContext.d.ts.map +0 -0
- package/types/ThemeManager.d.ts +0 -0
- package/types/ThemeManager.d.ts.map +0 -0
- package/types/conf.d.ts +1 -1
- package/types/conf.d.ts.map +1 -1
- package/types/constants/constants.d.ts +0 -0
- package/types/constants/constants.d.ts.map +0 -0
- package/types/constants/platform.d.ts +0 -0
- package/types/constants/platform.d.ts.map +0 -0
- package/types/constants/rnw.d.ts +0 -0
- package/types/constants/rnw.d.ts.map +0 -0
- package/types/contexts/ButtonInsideButtonContext.d.ts +0 -0
- package/types/contexts/ButtonInsideButtonContext.d.ts.map +0 -0
- package/types/createComponent.d.ts +0 -0
- package/types/createComponent.d.ts.map +1 -1
- package/types/createFont.d.ts +0 -0
- package/types/createFont.d.ts.map +0 -0
- package/types/createShorthands.d.ts +0 -0
- package/types/createShorthands.d.ts.map +0 -0
- package/types/createTamagui.d.ts +0 -0
- package/types/createTamagui.d.ts.map +0 -0
- package/types/createTheme.d.ts +0 -0
- package/types/createTheme.d.ts.map +0 -0
- package/types/createTokens.d.ts +0 -0
- package/types/createTokens.d.ts.map +0 -0
- package/types/createVariable.d.ts +0 -0
- package/types/createVariable.d.ts.map +0 -0
- package/types/createVariables.d.ts +0 -0
- package/types/createVariables.d.ts.map +0 -0
- package/types/defaultComponentState.d.ts +0 -0
- package/types/defaultComponentState.d.ts.map +0 -0
- package/types/helpers/RNComponents.d.ts +0 -0
- package/types/helpers/RNComponents.d.ts.map +0 -0
- package/types/helpers/areEqualSets.d.ts +0 -0
- package/types/helpers/areEqualSets.d.ts.map +0 -0
- package/types/helpers/calc.d.ts +0 -0
- package/types/helpers/calc.d.ts.map +0 -0
- package/types/helpers/createMediaStyle.d.ts +0 -0
- package/types/helpers/createMediaStyle.d.ts.map +0 -0
- package/types/helpers/createPropMapper.d.ts +0 -0
- package/types/helpers/createPropMapper.d.ts.map +0 -0
- package/types/helpers/createShallowUpdate.d.ts +0 -0
- package/types/helpers/createShallowUpdate.d.ts.map +0 -0
- package/types/helpers/createTamaguiProvider.d.ts +0 -0
- package/types/helpers/createTamaguiProvider.d.ts.map +0 -0
- package/types/helpers/extendStaticConfig.d.ts +0 -0
- package/types/helpers/extendStaticConfig.d.ts.map +0 -0
- package/types/helpers/fixNativeShadow.d.ts +0 -0
- package/types/helpers/fixNativeShadow.d.ts.map +0 -0
- package/types/helpers/fixNativeShadow.native.d.ts +0 -0
- package/types/helpers/fixNativeShadow.native.d.ts.map +0 -0
- package/types/helpers/generateAtomicStyles.d.ts +0 -0
- package/types/helpers/generateAtomicStyles.d.ts.map +0 -0
- package/types/helpers/getExpandedShorthands.d.ts +0 -0
- package/types/helpers/getExpandedShorthands.d.ts.map +0 -0
- package/types/helpers/getSize.d.ts +0 -0
- package/types/helpers/getSize.d.ts.map +0 -0
- package/types/helpers/getSplitStyles.d.ts +0 -0
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStackSize.d.ts +0 -0
- package/types/helpers/getStackSize.d.ts.map +0 -0
- package/types/helpers/getStylesAtomic.d.ts +0 -0
- package/types/helpers/getStylesAtomic.d.ts.map +0 -0
- package/types/helpers/getStylesAtomic.native.d.ts +0 -0
- package/types/helpers/getStylesAtomic.native.d.ts.map +0 -0
- package/types/helpers/getTextSize.d.ts +0 -0
- package/types/helpers/getTextSize.d.ts.map +0 -0
- package/types/helpers/getVariantExtras.d.ts +0 -0
- package/types/helpers/getVariantExtras.d.ts.map +0 -0
- package/types/helpers/insertStyleRule.d.ts +0 -0
- package/types/helpers/insertStyleRule.d.ts.map +0 -0
- package/types/helpers/isObj.d.ts +0 -0
- package/types/helpers/isObj.d.ts.map +0 -0
- package/types/helpers/isTamaguiComponent.d.ts +0 -0
- package/types/helpers/isTamaguiComponent.d.ts.map +0 -0
- package/types/helpers/isTamaguiElement.d.ts +0 -0
- package/types/helpers/isTamaguiElement.d.ts.map +0 -0
- package/types/helpers/matchMedia.d.ts +0 -0
- package/types/helpers/matchMedia.d.ts.map +0 -0
- package/types/helpers/matchMedia.native.d.ts +0 -0
- package/types/helpers/matchMedia.native.d.ts.map +0 -0
- package/types/helpers/mergeProps.d.ts +0 -0
- package/types/helpers/mergeProps.d.ts.map +0 -0
- package/types/helpers/mergeTransform.d.ts +0 -0
- package/types/helpers/mergeTransform.d.ts.map +0 -0
- package/types/helpers/nativeGestureHandler.native.d.ts +0 -0
- package/types/helpers/nativeGestureHandler.native.d.ts.map +0 -0
- package/types/helpers/proxyThemeVariables.d.ts +0 -0
- package/types/helpers/proxyThemeVariables.d.ts.map +0 -0
- package/types/helpers/pseudos.d.ts +0 -0
- package/types/helpers/pseudos.d.ts.map +0 -0
- package/types/helpers/registerCSSVariable.d.ts +0 -0
- package/types/helpers/registerCSSVariable.d.ts.map +0 -0
- package/types/helpers/themeable.d.ts +0 -0
- package/types/helpers/themeable.d.ts.map +0 -0
- package/types/helpers/validate.d.ts +0 -0
- package/types/helpers/validate.d.ts.map +0 -0
- package/types/helpers/withStaticProperties.d.ts +0 -0
- package/types/helpers/withStaticProperties.d.ts.map +0 -0
- package/types/helpers/wrapThemeManagerContext.d.ts +0 -0
- package/types/helpers/wrapThemeManagerContext.d.ts.map +0 -0
- package/types/hooks/useConstant.d.ts +0 -0
- package/types/hooks/useConstant.d.ts.map +0 -0
- package/types/hooks/useFeatures.d.ts +0 -0
- package/types/hooks/useFeatures.d.ts.map +0 -0
- package/types/hooks/useId.d.ts +0 -0
- package/types/hooks/useId.d.ts.map +0 -0
- package/types/hooks/useIsMounted.d.ts +0 -0
- package/types/hooks/useIsMounted.d.ts.map +0 -0
- package/types/hooks/useIsTouchDevice.d.ts +0 -0
- package/types/hooks/useIsTouchDevice.d.ts.map +0 -0
- package/types/hooks/useMedia.d.ts +0 -0
- package/types/hooks/useMedia.d.ts.map +0 -0
- package/types/hooks/usePressable.d.ts +0 -0
- package/types/hooks/usePressable.d.ts.map +0 -0
- package/types/hooks/usePrevious.d.ts +0 -0
- package/types/hooks/usePrevious.d.ts.map +0 -0
- package/types/hooks/useTheme.d.ts +0 -0
- package/types/hooks/useTheme.d.ts.map +0 -0
- package/types/hooks/useUnmountEffect.d.ts +0 -0
- package/types/hooks/useUnmountEffect.d.ts.map +0 -0
- package/types/index.d.ts +0 -0
- package/types/index.d.ts.map +0 -0
- package/types/insertFont.d.ts +0 -0
- package/types/insertFont.d.ts.map +0 -0
- package/types/static.d.ts +0 -0
- package/types/static.d.ts.map +0 -0
- package/types/styled.d.ts +0 -0
- package/types/styled.d.ts.map +0 -0
- package/types/types-rnw.d.ts +0 -0
- package/types/types-rnw.d.ts.map +0 -0
- package/types/types.d.ts +1 -0
- package/types/types.d.ts.map +1 -1
- package/types/views/Slot.d.ts +0 -0
- package/types/views/Slot.d.ts.map +0 -0
- package/types/views/Stack.d.ts +0 -0
- package/types/views/Stack.d.ts.map +0 -0
- package/types/views/Text.d.ts +0 -0
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/TextAncestorContext.d.ts +0 -0
- package/types/views/TextAncestorContext.d.ts.map +0 -0
- package/types/views/Theme.d.ts +0 -0
- package/types/views/Theme.d.ts.map +0 -0
- package/types/views/ThemeInverse.d.ts +0 -0
- package/types/views/ThemeInverse.d.ts.map +0 -0
- package/types/views/ThemeProvider.d.ts +0 -0
- package/types/views/ThemeProvider.d.ts.map +0 -0
- package/types/views/ThemeReset.d.ts +0 -0
- package/types/views/ThemeReset.d.ts.map +0 -0
- package/dist/cjs/helpers/nativeGestureHandler.js +0 -29
- package/dist/cjs/helpers/nativeGestureHandler.js.map +0 -7
- package/dist/cjs/helpers/prefixStyles.js +0 -192
- package/dist/cjs/helpers/prefixStyles.js.map +0 -7
- package/dist/cjs/nativeGestureHandler.native.js +0 -18
- package/dist/cjs/nativeGestureHandler.native.js.map +0 -7
- package/dist/cjs/registerCSSVariable.js +0 -41
- package/dist/cjs/registerCSSVariable.js.map +0 -7
- package/dist/esm/helpers/nativeGestureHandler.js +0 -7
- package/dist/esm/helpers/nativeGestureHandler.js.map +0 -7
- package/dist/esm/helpers/prefixStyles.js +0 -166
- package/dist/esm/helpers/prefixStyles.js.map +0 -7
- package/dist/esm/nativeGestureHandler.native.js +0 -2
- package/dist/esm/nativeGestureHandler.native.js.map +0 -7
- package/dist/esm/registerCSSVariable.js +0 -17
- package/dist/esm/registerCSSVariable.js.map +0 -7
- package/dist/jsx/helpers/nativeGestureHandler.js +0 -6
- package/dist/jsx/helpers/prefixStyles.js +0 -165
- package/dist/jsx/nativeGestureHandler.native.js +0 -1
- package/dist/jsx/registerCSSVariable.js +0 -16
- package/types/helpers/prefixStyles.d.ts +0 -5
- package/types/helpers/prefixStyles.d.ts.map +0 -1
- package/types/registerCSSVariable.d.ts +0 -5
- package/types/registerCSSVariable.d.ts.map +0 -1
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Slot.tsx"],
|
|
4
4
|
"sourcesContent": ["// via radix\n\nimport { composeRefs } from '@tamagui/compose-refs'\nimport * as React from 'react'\n\nimport { isWeb } from '../constants/platform'\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\nexport type SlotProps = {\n children?: React.ReactNode\n}\n\nexport const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n )\n})\n\nSlot.displayName = 'Slot'\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode\n}\n\nconst SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n\n if (React.isValidElement(children)) {\n const childProps = {\n ...mergeProps(children, slotProps),\n ref: composeRefs(forwardedRef, (children as any).ref),\n }\n return React.cloneElement(children, childProps)\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null\n})\n\nSlotClone.displayName = 'SlotClone'\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nexport const Slottable = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>\n\n// function isSlottable(child: React.ReactNode): child is React.ReactElement {\n// return React.isValidElement(child)\n// }\n\nconst pressMap = isWeb\n ? {\n onPress: 'onClick',\n onPressOut: 'onMouseUp',\n onPressIn: 'onMouseDown',\n }\n : {}\n\nfunction mergeProps(child: any, slotProps: AnyProps) {\n const childProps = child.props\n\n // all child props should override\n const overrideProps = { ...childProps }\n const isHTMLChild = typeof child.type === 'string'\n\n if (isHTMLChild) {\n for (const key in pressMap) {\n if (key in slotProps) {\n slotProps[pressMap[key]] = slotProps[key]\n delete slotProps[key]\n }\n }\n }\n\n for (let propName in childProps) {\n const slotPropValue = slotProps[propName]\n const childPropValue = childProps[propName]\n\n if (isHTMLChild && pressMap[propName]) {\n propName = pressMap[propName]\n delete overrideProps[propName]\n }\n\n const isHandler = handleRegex.test(propName)\n // if it's a handler, modify the override by composing the base handler\n if (isHandler) {\n overrideProps[propName] = mergeEvent(childPropValue, slotPropValue)\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue }\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ')\n }\n }\n\n return { ...slotProps, ...overrideProps }\n}\n\nconst handleRegex = /^on[A-Z]/\n\nexport function mergeEvent(a?: Function, b?: Function) {\n return (...args: unknown[]) => {\n a?.(...args)\n b?.(...args)\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAEA;AACA;AAEA;AAUO,MAAM,OAAO,MAAM,WAAmC,CAAC,OAAO,iBAAiB;AACpF,QAAM,EAAE,aAAa,cAAc;AACnC,SACE,oCAAC;AAAA,IAAW,GAAG;AAAA,IAAW,KAAK;AAAA,KAC5B,QACH;AAEJ,CAAC;AAED,KAAK,cAAc;AAUnB,MAAM,YAAY,MAAM,WAAgC,CAAC,OAAO,iBAAiB;AAC/E,QAAM,EAAE,aAAa,cAAc;AAEnC,MAAI,MAAM,eAAe,QAAQ,GAAG;AAClC,UAAM,aAAa;AAAA,MACjB,GAAG,WAAW,UAAU,SAAS;AAAA,MACjC,KAAK,YAAY,cAAe,SAAiB,GAAG;AAAA,IACtD;AACA,WAAO,MAAM,aAAa,UAAU,UAAU;AAAA,EAChD;AAEA,SAAO,MAAM,SAAS,MAAM,QAAQ,IAAI,IAAI,MAAM,SAAS,KAAK,IAAI,IAAI;AAC1E,CAAC;AAED,UAAU,cAAc;AAMjB,MAAM,YAAY,CAAC,EAAE,eAA8C;AACxE,SAAO,0DAAG,QAAS;AACrB;AAUA,MAAM,WAAW,QACb;AAAA,EACE,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AACb,IACA,CAAC;AAEL,oBAAoB,OAAY,WAAqB;AACnD,QAAM,aAAa,MAAM;AAGzB,QAAM,gBAAgB,EAAE,GAAG,WAAW;AACtC,QAAM,cAAc,OAAO,MAAM,SAAS;AAE1C,MAAI,aAAa;AACf,eAAW,OAAO,UAAU;AAC1B,UAAI,OAAO,WAAW;AACpB,kBAAU,SAAS,QAAQ,UAAU;AACrC,eAAO,UAAU;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAEA,WAAS,YAAY,YAAY;AAC/B,UAAM,gBAAgB,UAAU;AAChC,UAAM,iBAAiB,WAAW;AAElC,QAAI,eAAe,SAAS,WAAW;AACrC,iBAAW,SAAS;AACpB,aAAO,cAAc;AAAA,IACvB;AAEA,UAAM,YAAY,YAAY,KAAK,QAAQ;AAE3C,QAAI,WAAW;AACb,oBAAc,YAAY,WAAW,gBAAgB,aAAa;AAAA,IACpE,WAES,aAAa,SAAS;AAC7B,oBAAc,YAAY,EAAE,GAAG,eAAe,GAAG,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,YAAY,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAEA,MAAM,cAAc;AAEb,oBAAoB,GAAc,GAAc;AACrD,SAAO,IAAI,SAAoB;AAC7B,2BAAI,GAAG;AACP,2BAAI,GAAG;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/views/Text.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Text.tsx"],
|
|
4
|
-
"sourcesContent": ["import { stylePropsTextOnly, validStyles } from '@tamagui/helpers'\nimport { Text as TextView } from 'react-native'\n\nimport { isWeb } from '../constants/platform'\nimport { createComponent } from '../createComponent'\nimport { TextProps, TextPropsBase } from '../types'\n\nconst ellipseStyle = {\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n}\n\nexport const Text = createComponent<TextProps, TextView, TextPropsBase>({\n componentName: 'Text',\n isText: true,\n\n defaultProps: {\n display: 'flex',\n fontFamily: 'System',\n ...(isWeb && {\n display: 'inline',\n boxSizing: 'border-box',\n wordWrap: 'break-word',\n }),\n },\n\n variants: {\n numberOfLines: {\n 1: isWeb ? ellipseStyle : { numberOfLines: 1 },\n\n ':number': (numberOfLines) =>\n isWeb\n ? numberOfLines >= 1\n ? { WebkitLineClamp: numberOfLines }\n : null\n : { numberOfLines },\n },\n\n selectable: {\n true: {\n userSelect: 'text',\n cursor: 'text',\n },\n false: {\n userSelect: 'none',\n },\n },\n\n pressable: {\n true: {\n cursor: 'pointer',\n },\n },\n\n ellipse: {\n true: isWeb\n ? ellipseStyle\n : {\n numberOfLines: 1,\n lineBreakMode: 'clip',\n },\n },\n },\n\n deoptProps: new Set(isWeb ? [] : ['ellipse']),\n\n validStyles: {\n ...validStyles,\n ...stylePropsTextOnly,\n },\n})\n"],
|
|
5
|
-
"mappings": "AAAA;AAGA;AACA;AAGA,MAAM,eAAe;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AACd;AAEO,MAAM,OAAO,gBAAoD;AAAA,EACtE,eAAe;AAAA,EACf,QAAQ;AAAA,EAER,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,GAAI,SAAS;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EAEA,UAAU;AAAA,IACR,eAAe;AAAA,MACb,GAAG,QAAQ,eAAe,EAAE,eAAe,EAAE;AAAA,MAE7C,WAAW,CAAC,kBACV,QACI,iBAAiB,IACf,EAAE,iBAAiB,cAAc,IACjC,OACF,EAAE,cAAc;AAAA,IACxB;AAAA,IAEA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,QAAQ;AAAA,MACV;AAAA,MACA,OAAO;AAAA,QACL,YAAY;AAAA,
|
|
4
|
+
"sourcesContent": ["import { stylePropsTextOnly, validStyles } from '@tamagui/helpers'\nimport { Text as TextView } from 'react-native'\n\nimport { isWeb } from '../constants/platform'\nimport { createComponent } from '../createComponent'\nimport { TextProps, TextPropsBase } from '../types'\n\nconst ellipseStyle = {\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n}\n\nexport const Text = createComponent<TextProps, TextView, TextPropsBase>({\n componentName: 'Text',\n isText: true,\n\n defaultProps: {\n display: 'flex',\n fontFamily: 'System',\n ...(isWeb && {\n display: 'inline',\n boxSizing: 'border-box',\n wordWrap: 'break-word',\n }),\n },\n\n variants: {\n numberOfLines: {\n 1: isWeb ? ellipseStyle : { numberOfLines: 1 },\n\n ':number': (numberOfLines) =>\n isWeb\n ? numberOfLines >= 1\n ? { WebkitLineClamp: numberOfLines }\n : null\n : { numberOfLines },\n },\n\n selectable: {\n true: {\n userSelect: 'text',\n cursor: 'text',\n },\n false: {\n userSelect: 'none',\n cursor: 'inherit',\n },\n },\n\n pressable: {\n true: {\n cursor: 'pointer',\n },\n },\n\n ellipse: {\n true: isWeb\n ? ellipseStyle\n : {\n numberOfLines: 1,\n lineBreakMode: 'clip',\n },\n },\n },\n\n deoptProps: new Set(isWeb ? [] : ['ellipse']),\n\n validStyles: {\n ...validStyles,\n ...stylePropsTextOnly,\n },\n})\n"],
|
|
5
|
+
"mappings": "AAAA;AAGA;AACA;AAGA,MAAM,eAAe;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AACd;AAEO,MAAM,OAAO,gBAAoD;AAAA,EACtE,eAAe;AAAA,EACf,QAAQ;AAAA,EAER,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,GAAI,SAAS;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EAEA,UAAU;AAAA,IACR,eAAe;AAAA,MACb,GAAG,QAAQ,eAAe,EAAE,eAAe,EAAE;AAAA,MAE7C,WAAW,CAAC,kBACV,QACI,iBAAiB,IACf,EAAE,iBAAiB,cAAc,IACjC,OACF,EAAE,cAAc;AAAA,IACxB;AAAA,IAEA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,QAAQ;AAAA,MACV;AAAA,MACA,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IAEA,WAAW;AAAA,MACT,MAAM;AAAA,QACJ,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IAEA,SAAS;AAAA,MACP,MAAM,QACF,eACA;AAAA,QACE,eAAe;AAAA,QACf,eAAe;AAAA,MACjB;AAAA,IACN;AAAA,EACF;AAAA,EAEA,YAAY,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;AAAA,EAE5C,aAAa;AAAA,IACX,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
var _a, _b;
|
|
4
2
|
import React, { createContext } from "react";
|
|
5
3
|
import { rnw } from "../constants/rnw";
|
|
6
4
|
const FallbackNativeContext = createContext(false);
|
|
7
5
|
const TextAncestorContext = (_b = (_a = rnw) == null ? void 0 : _a.TextAncestorContext) != null ? _b : FallbackNativeContext;
|
|
8
|
-
const TextAncestorProvider =
|
|
6
|
+
const TextAncestorProvider = (props) => {
|
|
9
7
|
return /* @__PURE__ */ React.createElement(TextAncestorContext.Provider, {
|
|
10
8
|
value: false
|
|
11
9
|
}, props.children);
|
|
12
|
-
}
|
|
10
|
+
};
|
|
13
11
|
export {
|
|
14
12
|
FallbackNativeContext,
|
|
15
13
|
TextAncestorContext,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/TextAncestorContext.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { createContext } from 'react'\n\nimport { rnw } from '../constants/rnw'\n\nexport const FallbackNativeContext = createContext(false)\n\nexport const TextAncestorContext = rnw?.TextAncestorContext ?? FallbackNativeContext\n\nexport const TextAncestorProvider = (props) => {\n return <TextAncestorContext.Provider value={false}>{props.children}</TextAncestorContext.Provider>\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA;AAAA;AAEA;AAEO,MAAM,wBAAwB,cAAc,KAAK;AAEjD,MAAM,sBAAsB,uCAAK,wBAAL,YAA4B;AAExD,MAAM,uBAAuB,CAAC,UAAU;AAC7C,SAAO,oCAAC,oBAAoB,UAApB;AAAA,IAA6B,OAAO;AAAA,KAAQ,MAAM,QAAS;AACrE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/views/Theme.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import React, { memo, useMemo } from "react";
|
|
4
2
|
import { isWeb } from "../constants/platform";
|
|
5
3
|
import { wrapThemeManagerContext } from "../helpers/wrapThemeManagerContext";
|
|
6
4
|
import { useChangeThemeEffect } from "../hooks/useTheme";
|
|
7
5
|
React["createElement"];
|
|
8
|
-
const Theme = memo(
|
|
6
|
+
const Theme = memo(function Theme2(props) {
|
|
9
7
|
var _a, _b;
|
|
10
8
|
const { name, theme, themeManager, themes, className } = useChangeThemeEffect(props.name, props.componentName, props);
|
|
11
9
|
const missingTheme = !themes || !name || !theme;
|
|
@@ -26,7 +24,7 @@ const Theme = memo(/* @__PURE__ */ __name(function Theme2(props) {
|
|
|
26
24
|
}, contents);
|
|
27
25
|
}
|
|
28
26
|
return contents;
|
|
29
|
-
}
|
|
27
|
+
});
|
|
30
28
|
export {
|
|
31
29
|
Theme
|
|
32
30
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Theme.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { memo, useMemo } from 'react'\n\nimport { isWeb } from '../constants/platform'\nimport { wrapThemeManagerContext } from '../helpers/wrapThemeManagerContext'\nimport { useChangeThemeEffect } from '../hooks/useTheme'\nimport { ThemeProps } from '../hooks/useTheme'\n\n// bugfix esbuild strips react jsx: 'preserve'\nReact['createElement']\n\nexport const Theme = memo(function Theme(props: ThemeProps) {\n const { name, theme, themeManager, themes, className } = useChangeThemeEffect(\n props.name,\n props.componentName,\n props\n )\n\n const missingTheme = !themes || !name || !theme\n\n // memo here, changing theme without re-rendering all children is a critical optimization\n // may require some effort of end user to memoize but without this memo they'd have no option\n const contents = useMemo(\n () => (missingTheme ? null : wrapThemeManagerContext(props.children, themeManager)),\n [props.children, themeManager]\n )\n\n if (missingTheme) {\n if (name && !theme && process.env.NODE_ENV === 'development') {\n console.warn(`No theme found by name ${name}`)\n }\n return props.children\n }\n\n if (isWeb) {\n return (\n <span\n className={(!props.disableThemeClass\n ? [props.className, className].filter(Boolean)\n : []\n ).join(' ')}\n style={{\n display: 'contents',\n // in order to provide currentColor, set color by default\n color: themes[name]?.color?.toString(),\n }}\n >\n {contents}\n </span>\n )\n }\n\n return contents\n})\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA;AAEA;AACA;AACA;AAIA,MAAM;AAEC,MAAM,QAAQ,KAAK,gBAAe,OAAmB;AAV5D;AAWE,QAAM,EAAE,MAAM,OAAO,cAAc,QAAQ,cAAc,qBACvD,MAAM,MACN,MAAM,eACN,KACF;AAEA,QAAM,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC;AAI1C,QAAM,WAAW,QACf,MAAO,eAAe,OAAO,wBAAwB,MAAM,UAAU,YAAY,GACjF,CAAC,MAAM,UAAU,YAAY,CAC/B;AAEA,MAAI,cAAc;AAChB,QAAI,QAAQ,CAAC,SAAS,QAAQ,IAAI,aAAa,eAAe;AAC5D,cAAQ,KAAK,0BAA0B,MAAM;AAAA,IAC/C;AACA,WAAO,MAAM;AAAA,EACf;AAEA,MAAI,OAAO;AACT,WACE,oCAAC;AAAA,MACC,WAAY,EAAC,MAAM,oBACf,CAAC,MAAM,WAAW,SAAS,EAAE,OAAO,OAAO,IAC3C,CAAC,GACH,KAAK,GAAG;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,QAET,OAAO,mBAAO,UAAP,mBAAc,UAAd,mBAAqB;AAAA,MAC9B;AAAA,OAEC,QACH;AAAA,EAEJ;AAEA,SAAO;AACT,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import React, { useState } from "react";
|
|
4
2
|
import { useIsomorphicLayoutEffect } from "../constants/platform";
|
|
5
3
|
import { useDefaultThemeName, useThemeName } from "../hooks/useTheme";
|
|
@@ -11,8 +9,7 @@ let inversions = {
|
|
|
11
9
|
function setThemeInversions(next) {
|
|
12
10
|
inversions = next;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
const ThemeInverse = /* @__PURE__ */ __name((props) => {
|
|
12
|
+
const ThemeInverse = (props) => {
|
|
16
13
|
const themeName = useThemeName();
|
|
17
14
|
const defaultTheme = useDefaultThemeName();
|
|
18
15
|
const [name, setName] = useState(null);
|
|
@@ -22,7 +19,7 @@ const ThemeInverse = /* @__PURE__ */ __name((props) => {
|
|
|
22
19
|
return /* @__PURE__ */ React.createElement(Theme, {
|
|
23
20
|
name
|
|
24
21
|
}, props.children);
|
|
25
|
-
}
|
|
22
|
+
};
|
|
26
23
|
export {
|
|
27
24
|
ThemeInverse,
|
|
28
25
|
setThemeInversions
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeInverse.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { useState } from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { useDefaultThemeName, useThemeName } from '../hooks/useTheme'\nimport { Theme } from './Theme'\n\ntype StringRecord = { [key: string]: string }\n\nlet inversions: StringRecord = {\n light: 'dark',\n dark: 'light',\n}\n\nexport function setThemeInversions(next: StringRecord) {\n inversions = next\n}\n\nexport const ThemeInverse = (props: { children: any }) => {\n const themeName = useThemeName()\n const defaultTheme = useDefaultThemeName()\n const [name, setName] = useState<null | string>(null)\n\n // ssr\n useIsomorphicLayoutEffect(() => {\n setName(inversions[themeName] || inversions[defaultTheme || ''] || null)\n }, [defaultTheme, themeName])\n\n return <Theme name={name}>{props.children}</Theme>\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA;AAEA;AACA;AACA;AAIA,IAAI,aAA2B;AAAA,EAC7B,OAAO;AAAA,EACP,MAAM;AACR;AAEO,4BAA4B,MAAoB;AACrD,eAAa;AACf;AAEO,MAAM,eAAe,CAAC,UAA6B;AACxD,QAAM,YAAY,aAAa;AAC/B,QAAM,eAAe,oBAAoB;AACzC,QAAM,CAAC,MAAM,WAAW,SAAwB,IAAI;AAGpD,4BAA0B,MAAM;AAC9B,YAAQ,WAAW,cAAc,WAAW,gBAAgB,OAAO,IAAI;AAAA,EACzE,GAAG,CAAC,cAAc,SAAS,CAAC;AAE5B,SAAO,oCAAC;AAAA,IAAM;AAAA,KAAa,MAAM,QAAS;AAC5C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import React, { useLayoutEffect, useMemo } from "react";
|
|
4
2
|
import { getHasConfigured } from "../conf";
|
|
5
3
|
import { THEME_CLASSNAME_PREFIX } from "../constants/constants";
|
|
6
4
|
import { ThemeContext } from "../ThemeContext";
|
|
7
5
|
import { Theme } from "./Theme";
|
|
8
6
|
React["createElement"];
|
|
9
|
-
const ThemeProvider =
|
|
7
|
+
const ThemeProvider = (props) => {
|
|
10
8
|
if (!getHasConfigured()) {
|
|
11
9
|
throw new Error(`Missing configureThemes() call, add to your root file`);
|
|
12
10
|
}
|
|
@@ -36,7 +34,7 @@ const ThemeProvider = /* @__PURE__ */ __name((props) => {
|
|
|
36
34
|
name: props.defaultTheme,
|
|
37
35
|
disableThemeClass: props.disableRootThemeClass
|
|
38
36
|
}, props.children));
|
|
39
|
-
}
|
|
37
|
+
};
|
|
40
38
|
export {
|
|
41
39
|
ThemeProvider
|
|
42
40
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeProvider.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { useLayoutEffect, useMemo } from 'react'\n\nimport { getHasConfigured } from '../conf'\nimport { THEME_CLASSNAME_PREFIX } from '../constants/constants'\nimport { ThemeContext } from '../ThemeContext'\nimport { Theme } from './Theme'\n\n// bugfix esbuild strips react jsx: 'preserve'\nReact['createElement']\n\nexport type ThemeProviderProps = {\n className?: string\n themes: any\n defaultTheme: string\n disableRootThemeClass?: boolean\n themeClassNameOnRoot?: boolean\n children?: any\n reset?: boolean\n}\n\nexport const ThemeProvider = (props: ThemeProviderProps) => {\n if (!getHasConfigured()) {\n throw new Error(`Missing configureThemes() call, add to your root file`)\n }\n\n // ensure theme is attached to root body node as well to work with modals by default\n if (typeof document !== 'undefined') {\n useLayoutEffect(() => {\n if (props.disableRootThemeClass) {\n return\n }\n const cn = `${THEME_CLASSNAME_PREFIX}${props.defaultTheme}`\n const target = props.themeClassNameOnRoot ? document.documentElement : document.body\n target.classList.add(cn)\n return () => {\n target.classList.remove(cn)\n }\n }, [props.defaultTheme, props.disableRootThemeClass])\n }\n\n const themeContext = useMemo(() => {\n return {\n themes: props.themes,\n defaultTheme: props.defaultTheme,\n }\n }, [props.themes])\n\n return (\n <ThemeContext.Provider value={themeContext}>\n <Theme\n className={props.className}\n name={props.defaultTheme}\n disableThemeClass={props.disableRootThemeClass}\n >\n {props.children}\n </Theme>\n </ThemeContext.Provider>\n )\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA;AAEA;AACA;AACA;AACA;AAGA,MAAM;AAYC,MAAM,gBAAgB,CAAC,UAA8B;AAC1D,MAAI,CAAC,iBAAiB,GAAG;AACvB,UAAM,IAAI,MAAM,uDAAuD;AAAA,EACzE;AAGA,MAAI,OAAO,aAAa,aAAa;AACnC,oBAAgB,MAAM;AACpB,UAAI,MAAM,uBAAuB;AAC/B;AAAA,MACF;AACA,YAAM,KAAK,GAAG,yBAAyB,MAAM;AAC7C,YAAM,SAAS,MAAM,uBAAuB,SAAS,kBAAkB,SAAS;AAChF,aAAO,UAAU,IAAI,EAAE;AACvB,aAAO,MAAM;AACX,eAAO,UAAU,OAAO,EAAE;AAAA,MAC5B;AAAA,IACF,GAAG,CAAC,MAAM,cAAc,MAAM,qBAAqB,CAAC;AAAA,EACtD;AAEA,QAAM,eAAe,QAAQ,MAAM;AACjC,WAAO;AAAA,MACL,QAAQ,MAAM;AAAA,MACd,cAAc,MAAM;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,MAAM,MAAM,CAAC;AAEjB,SACE,oCAAC,aAAa,UAAb;AAAA,IAAsB,OAAO;AAAA,KAC5B,oCAAC;AAAA,IACC,WAAW,MAAM;AAAA,IACjB,MAAM,MAAM;AAAA,IACZ,mBAAmB,MAAM;AAAA,KAExB,MAAM,QACT,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import React, { useContext, useLayoutEffect, useState } from "react";
|
|
4
2
|
import { isWeb } from "../constants/platform";
|
|
5
3
|
import { ThemeManagerContext } from "../ThemeManager";
|
|
6
4
|
import { Theme } from "./Theme";
|
|
7
5
|
React["createElement"];
|
|
8
|
-
const ThemeReset =
|
|
6
|
+
const ThemeReset = (props) => {
|
|
9
7
|
const themeManager = useContext(ThemeManagerContext);
|
|
10
8
|
const [name, setName] = useState(null);
|
|
11
9
|
if (!isWeb || typeof document !== "undefined") {
|
|
@@ -32,7 +30,7 @@ const ThemeReset = /* @__PURE__ */ __name((props) => {
|
|
|
32
30
|
reset: true,
|
|
33
31
|
name
|
|
34
32
|
}, props.children);
|
|
35
|
-
}
|
|
33
|
+
};
|
|
36
34
|
export {
|
|
37
35
|
ThemeReset
|
|
38
36
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeReset.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { useContext, useLayoutEffect, useState } from 'react'\n\nimport { isWeb } from '../constants/platform'\nimport { ThemeManagerContext } from '../ThemeManager'\nimport { Theme } from './Theme'\n\n// bugfix esbuild strips react jsx: 'preserve'\nReact['createElement']\n\n// resets the theme to the parent theme\nexport const ThemeReset = (props: { children?: any }) => {\n const themeManager = useContext(ThemeManagerContext)\n const [name, setName] = useState<string | null>(null)\n\n // this component doesn't work with SSR, so must run only client side\n // we could at least prevent more flickering by having the ssr head script\n // that changes to dark initially also go through and change all of these\n if (!isWeb || typeof document !== 'undefined') {\n useLayoutEffect(() => {\n if (!themeManager) return\n if (name !== themeManager.parentName) {\n setName(themeManager.parentName)\n }\n }, [themeManager?.parentName])\n\n useLayoutEffect(() => {\n if (!themeManager) return\n return themeManager.onChangeTheme(() => {\n setName(themeManager.parentName)\n })\n }, [])\n }\n\n if (!themeManager || !props.children) {\n return props.children || null\n }\n\n return (\n <Theme className=\"tui-theme-reset\" reset name={name}>\n {props.children}\n </Theme>\n )\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA;AAEA;AACA;AACA;AAGA,MAAM;AAGC,MAAM,aAAa,CAAC,UAA8B;AACvD,QAAM,eAAe,WAAW,mBAAmB;AACnD,QAAM,CAAC,MAAM,WAAW,SAAwB,IAAI;AAKpD,MAAI,CAAC,SAAS,OAAO,aAAa,aAAa;AAC7C,oBAAgB,MAAM;AACpB,UAAI,CAAC;AAAc;AACnB,UAAI,SAAS,aAAa,YAAY;AACpC,gBAAQ,aAAa,UAAU;AAAA,MACjC;AAAA,IACF,GAAG,CAAC,6CAAc,UAAU,CAAC;AAE7B,oBAAgB,MAAM;AACpB,UAAI,CAAC;AAAc;AACnB,aAAO,aAAa,cAAc,MAAM;AACtC,gBAAQ,aAAa,UAAU;AAAA,MACjC,CAAC;AAAA,IACH,GAAG,CAAC,CAAC;AAAA,EACP;AAEA,MAAI,CAAC,gBAAgB,CAAC,MAAM,UAAU;AACpC,WAAO,MAAM,YAAY;AAAA,EAC3B;AAEA,SACE,oCAAC;AAAA,IAAM,WAAU;AAAA,IAAkB,OAAK;AAAA,IAAC;AAAA,KACtC,MAAM,QACT;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/Tamagui.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import * as Helpers from "@tamagui/helpers";
|
|
4
2
|
import { getConfig } from "./conf";
|
|
5
3
|
import { rnw } from "./constants/rnw";
|
|
@@ -25,15 +23,14 @@ class TamaguiManager {
|
|
|
25
23
|
return identifierToValue;
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
|
-
__name(TamaguiManager, "TamaguiManager");
|
|
29
26
|
const Tamagui = new TamaguiManager();
|
|
30
27
|
const identifierToValue = /* @__PURE__ */ new Map();
|
|
31
|
-
const getValueFromIdentifier =
|
|
28
|
+
const getValueFromIdentifier = (identifier) => {
|
|
32
29
|
return identifierToValue.get(identifier);
|
|
33
|
-
}
|
|
34
|
-
const setIdentifierValue =
|
|
30
|
+
};
|
|
31
|
+
const setIdentifierValue = (identifier, value) => {
|
|
35
32
|
identifierToValue.set(identifier, value);
|
|
36
|
-
}
|
|
33
|
+
};
|
|
37
34
|
export {
|
|
38
35
|
Tamagui,
|
|
39
36
|
getValueFromIdentifier,
|
package/dist/jsx/ThemeManager.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
var __accessCheck = (obj, member, msg) => {
|
|
4
2
|
if (!member.has(obj))
|
|
5
3
|
throw TypeError("Cannot " + msg);
|
|
@@ -182,14 +180,13 @@ class ThemeManager {
|
|
|
182
180
|
};
|
|
183
181
|
}
|
|
184
182
|
}
|
|
185
|
-
__name(ThemeManager, "ThemeManager");
|
|
186
183
|
_getClassName = new WeakSet();
|
|
187
|
-
getClassName_fn =
|
|
184
|
+
getClassName_fn = function(name) {
|
|
188
185
|
return `${THEME_CLASSNAME_PREFIX}${name} t_Theme`.replace("light_", "").replace("dark_", "");
|
|
189
|
-
}
|
|
186
|
+
};
|
|
190
187
|
const ThemeManagerContext = createContext(null);
|
|
191
188
|
const emptyManager = new ThemeManager();
|
|
192
|
-
const withoutComponentName =
|
|
189
|
+
const withoutComponentName = (name) => name.replace(/(\_[A-Z][a-zA-Z]+)+$/g, "");
|
|
193
190
|
export {
|
|
194
191
|
ThemeManager,
|
|
195
192
|
ThemeManagerContext,
|
package/dist/jsx/conf.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
let conf;
|
|
4
|
-
const setConfig =
|
|
2
|
+
const setConfig = (next) => {
|
|
5
3
|
conf = next;
|
|
6
4
|
if (configListeners.size) {
|
|
7
5
|
configListeners.forEach((cb) => cb(conf));
|
|
8
6
|
configListeners.clear();
|
|
9
7
|
}
|
|
10
|
-
}
|
|
11
|
-
const setConfigFont =
|
|
8
|
+
};
|
|
9
|
+
const setConfigFont = (name, font, fontParsed) => {
|
|
12
10
|
if (process.env.NODE_ENV === "development") {
|
|
13
11
|
if (!conf)
|
|
14
12
|
throw new Error(`Haven't called createTamagui yet`);
|
|
15
13
|
}
|
|
16
14
|
Object.assign(conf.fonts, { [name]: font });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
15
|
+
Object.assign(conf.fontsParsed, { [`$${name}`]: fontParsed });
|
|
16
|
+
};
|
|
17
|
+
const getHasConfigured = () => !!conf;
|
|
18
|
+
const getConfig = () => conf;
|
|
19
|
+
const getTokens = () => conf.tokensParsed;
|
|
20
|
+
const getThemes = () => conf.themes;
|
|
22
21
|
const configListeners = /* @__PURE__ */ new Set();
|
|
23
|
-
const onConfiguredOnce =
|
|
22
|
+
const onConfiguredOnce = (cb) => {
|
|
24
23
|
if (conf) {
|
|
25
24
|
cb(conf);
|
|
26
25
|
} else {
|
|
27
26
|
configListeners.add(cb);
|
|
28
27
|
}
|
|
29
|
-
}
|
|
28
|
+
};
|
|
30
29
|
export {
|
|
31
30
|
configListeners,
|
|
32
31
|
getConfig,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
const interopRequire = /* @__PURE__ */ __name((x) => "default" in x ? x.default : x, "interopRequire");
|
|
1
|
+
const interopRequire = (x) => "default" in x ? x.default : x;
|
|
4
2
|
const rnw = {};
|
|
5
3
|
if (process.env.IS_STATIC === "is_static") {
|
|
6
4
|
Object.assign(rnw, interopRequire(require("react-native-web/dist/cjs/tamagui-exports")));
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import { composeEventHandlers, stylePropsView, validStyles } from "@tamagui/helpers";
|
|
4
2
|
import { useForceUpdate } from "@tamagui/use-force-update";
|
|
5
3
|
import React, {
|
|
@@ -64,7 +62,6 @@ function mergeShorthands({ defaultProps }, { shorthands }) {
|
|
|
64
62
|
defaultProps[shorthands[key] || key] = defaultProps[key];
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
|
-
__name(mergeShorthands, "mergeShorthands");
|
|
68
65
|
let initialTheme;
|
|
69
66
|
function createComponent(configIn, ParentComponent) {
|
|
70
67
|
const staticConfig = (() => {
|
|
@@ -289,7 +286,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
289
286
|
viewProps.ref = forwardedRef;
|
|
290
287
|
}
|
|
291
288
|
}
|
|
292
|
-
if (props.href !=
|
|
289
|
+
if (props.href != void 0 && hrefAttrs != void 0) {
|
|
293
290
|
const { download, rel, target } = hrefAttrs;
|
|
294
291
|
if (download != null) {
|
|
295
292
|
viewProps.download = download;
|
|
@@ -301,8 +298,11 @@ function createComponent(configIn, ParentComponent) {
|
|
|
301
298
|
viewProps.target = target.charAt(0) !== "_" ? "_" + target : target;
|
|
302
299
|
}
|
|
303
300
|
}
|
|
301
|
+
const _focusable = focusable != void 0 ? focusable : accessible;
|
|
304
302
|
const role = viewProps.role;
|
|
305
|
-
|
|
303
|
+
if (props["debug"]) {
|
|
304
|
+
console.log("_focusable", focusable);
|
|
305
|
+
}
|
|
306
306
|
if (_focusable === false) {
|
|
307
307
|
viewProps.tabIndex = "-1";
|
|
308
308
|
}
|
|
@@ -314,10 +314,9 @@ function createComponent(configIn, ParentComponent) {
|
|
|
314
314
|
if (_focusable !== false) {
|
|
315
315
|
viewProps.tabIndex = "0";
|
|
316
316
|
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}
|
|
317
|
+
}
|
|
318
|
+
if (_focusable === true) {
|
|
319
|
+
viewProps.tabIndex = "0";
|
|
321
320
|
}
|
|
322
321
|
} else {
|
|
323
322
|
viewProps = nonTamaguiProps;
|
|
@@ -325,6 +324,9 @@ function createComponent(configIn, ParentComponent) {
|
|
|
325
324
|
viewProps.ref = forwardedRef;
|
|
326
325
|
}
|
|
327
326
|
}
|
|
327
|
+
if (props["debug"]) {
|
|
328
|
+
console.log("viewProps", elementType, viewProps.role, viewProps.tabIndex);
|
|
329
|
+
}
|
|
328
330
|
if (!isText && isWeb) {
|
|
329
331
|
Children.toArray(props.children).forEach((item) => {
|
|
330
332
|
if (typeof item === "string") {
|
|
@@ -714,11 +716,10 @@ function createComponent(configIn, ParentComponent) {
|
|
|
714
716
|
};
|
|
715
717
|
return res;
|
|
716
718
|
}
|
|
717
|
-
__name(createComponent, "createComponent");
|
|
718
719
|
const DefaultProps = /* @__PURE__ */ new Map();
|
|
719
|
-
const Unspaced =
|
|
720
|
+
const Unspaced = (props) => {
|
|
720
721
|
return props.children;
|
|
721
|
-
}
|
|
722
|
+
};
|
|
722
723
|
Unspaced["isUnspaced"] = true;
|
|
723
724
|
const Spacer = createComponent({
|
|
724
725
|
memo: true,
|
|
@@ -825,26 +826,21 @@ function spacedChildren({
|
|
|
825
826
|
}
|
|
826
827
|
return final;
|
|
827
828
|
}
|
|
828
|
-
__name(spacedChildren, "spacedChildren");
|
|
829
829
|
function createSpacer({ key, direction, space, spaceFlex }) {
|
|
830
830
|
return <Spacer key={key} direction={direction === "both" ? void 0 : direction === "row" || direction === "row-reverse" ? "horizontal" : "vertical"} size={space} {...spaceFlex && {
|
|
831
831
|
flex: spaceFlex
|
|
832
832
|
}} />;
|
|
833
833
|
}
|
|
834
|
-
__name(createSpacer, "createSpacer");
|
|
835
834
|
function isUnspaced(child) {
|
|
836
835
|
var _a, _b;
|
|
837
836
|
return ((_a = child == null ? void 0 : child["type"]) == null ? void 0 : _a["isVisuallyHidden"]) || ((_b = child == null ? void 0 : child["type"]) == null ? void 0 : _b["isUnspaced"]);
|
|
838
837
|
}
|
|
839
|
-
__name(isUnspaced, "isUnspaced");
|
|
840
838
|
function AbsoluteFill(props) {
|
|
841
839
|
return <View pointerEvents="box-none" style={StyleSheet.absoluteFill}>{props.children}</View>;
|
|
842
840
|
}
|
|
843
|
-
__name(AbsoluteFill, "AbsoluteFill");
|
|
844
841
|
function processIDRefList(idRefList) {
|
|
845
842
|
return Array.isArray(idRefList) ? idRefList.join(" ") : idRefList;
|
|
846
843
|
}
|
|
847
|
-
__name(processIDRefList, "processIDRefList");
|
|
848
844
|
const accessibilityRoleToWebRole = {
|
|
849
845
|
adjustable: "slider",
|
|
850
846
|
button: "button",
|
|
@@ -1018,7 +1014,6 @@ function assignNativePropsToWeb(elementType, viewProps, nativeProps) {
|
|
|
1018
1014
|
viewProps.id = nativeProps.nativeID;
|
|
1019
1015
|
}
|
|
1020
1016
|
}
|
|
1021
|
-
__name(assignNativePropsToWeb, "assignNativePropsToWeb");
|
|
1022
1017
|
function addPseudoToStyles(styles, initialPseudos, pseudos, name, force = false) {
|
|
1023
1018
|
const pseudoStyle = pseudos[name];
|
|
1024
1019
|
const shouldNestObject = isWeb && name !== "enterStyle" && name !== "exitStyle";
|
|
@@ -1028,7 +1023,6 @@ function addPseudoToStyles(styles, initialPseudos, pseudos, name, force = false)
|
|
|
1028
1023
|
styles.push(shouldNestObject && !force ? { [name]: style } : style);
|
|
1029
1024
|
}
|
|
1030
1025
|
}
|
|
1031
|
-
__name(addPseudoToStyles, "addPseudoToStyles");
|
|
1032
1026
|
export {
|
|
1033
1027
|
AbsoluteFill,
|
|
1034
1028
|
Spacer,
|
package/dist/jsx/createFont.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import { validateFont } from "./helpers/validate";
|
|
4
|
-
const createFont =
|
|
2
|
+
const createFont = (font) => {
|
|
5
3
|
if (process.env.NODE_ENV === "development") {
|
|
6
4
|
validateFont(font);
|
|
7
5
|
}
|
|
@@ -21,7 +19,7 @@ const createFont = /* @__PURE__ */ __name((font) => {
|
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
return Object.freeze(font);
|
|
24
|
-
}
|
|
22
|
+
};
|
|
25
23
|
export {
|
|
26
24
|
createFont
|
|
27
25
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
function createShorthands(shorthands) {
|
|
4
2
|
return Object.freeze(shorthands);
|
|
5
3
|
}
|
|
6
|
-
__name(createShorthands, "createShorthands");
|
|
7
4
|
export {
|
|
8
5
|
createShorthands
|
|
9
6
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import { configListeners, getHasConfigured, setConfig } from "./conf";
|
|
4
2
|
import { THEME_CLASSNAME_PREFIX } from "./constants/constants";
|
|
5
3
|
import { isWeb } from "./constants/platform";
|
|
@@ -173,10 +171,10 @@ function createTamagui(config) {
|
|
|
173
171
|
};
|
|
174
172
|
})();
|
|
175
173
|
const tokensParsed = parseTokens(config.tokens);
|
|
176
|
-
const getCSS =
|
|
174
|
+
const getCSS = () => {
|
|
177
175
|
return `${themeConfig.css}
|
|
178
176
|
${getInsertedRules().join("\n")}`;
|
|
179
|
-
}
|
|
177
|
+
};
|
|
180
178
|
if (config.shorthands) {
|
|
181
179
|
for (const key in config.shorthands) {
|
|
182
180
|
reversedShorthands[config.shorthands[key]] = key;
|
|
@@ -211,9 +209,8 @@ ${getInsertedRules().join("\n")}`;
|
|
|
211
209
|
}
|
|
212
210
|
return next;
|
|
213
211
|
}
|
|
214
|
-
__name(createTamagui, "createTamagui");
|
|
215
212
|
const reversedShorthands = {};
|
|
216
|
-
const parseTokens =
|
|
213
|
+
const parseTokens = (tokens) => {
|
|
217
214
|
const res = {};
|
|
218
215
|
for (const key in tokens) {
|
|
219
216
|
res[key] = {};
|
|
@@ -222,7 +219,7 @@ const parseTokens = /* @__PURE__ */ __name((tokens) => {
|
|
|
222
219
|
}
|
|
223
220
|
}
|
|
224
221
|
return res;
|
|
225
|
-
}
|
|
222
|
+
};
|
|
226
223
|
function ensureThemeVariable(theme, key) {
|
|
227
224
|
const val = theme[key];
|
|
228
225
|
const themeKey = key;
|
|
@@ -242,7 +239,6 @@ function ensureThemeVariable(theme, key) {
|
|
|
242
239
|
}
|
|
243
240
|
}
|
|
244
241
|
}
|
|
245
|
-
__name(ensureThemeVariable, "ensureThemeVariable");
|
|
246
242
|
export {
|
|
247
243
|
createTamagui,
|
|
248
244
|
reversedShorthands
|
package/dist/jsx/createTheme.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
const createTheme = /* @__PURE__ */ __name((theme) => {
|
|
1
|
+
const createTheme = (theme) => {
|
|
4
2
|
return theme;
|
|
5
|
-
}
|
|
3
|
+
};
|
|
6
4
|
export {
|
|
7
5
|
createTheme
|
|
8
6
|
};
|
package/dist/jsx/createTokens.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import { createVariables } from "./createVariables";
|
|
4
2
|
import { validateTokens } from "./helpers/validate";
|
|
5
3
|
function createTokens(tokens) {
|
|
@@ -8,7 +6,6 @@ function createTokens(tokens) {
|
|
|
8
6
|
}
|
|
9
7
|
return createVariables(tokens);
|
|
10
8
|
}
|
|
11
|
-
__name(createTokens, "createTokens");
|
|
12
9
|
export {
|
|
13
10
|
createTokens
|
|
14
11
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
var _a;
|
|
4
2
|
import { isWeb } from "./constants/platform";
|
|
5
3
|
const IS_VARIABLE_SYMBOL = "__isVariable__";
|
|
@@ -20,37 +18,32 @@ class Variable {
|
|
|
20
18
|
return `${isWeb ? this.variable : this.val}`;
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
|
-
__name(Variable, "Variable");
|
|
24
21
|
_a = IS_VARIABLE_SYMBOL;
|
|
25
|
-
const createVariable =
|
|
22
|
+
const createVariable = (props) => {
|
|
26
23
|
if (isVariable(props)) {
|
|
27
24
|
return props;
|
|
28
25
|
}
|
|
29
26
|
return new Variable(props);
|
|
30
|
-
}
|
|
27
|
+
};
|
|
31
28
|
function isVariable(v) {
|
|
32
29
|
return !!(v instanceof Variable || v && v[IS_VARIABLE_SYMBOL]);
|
|
33
30
|
}
|
|
34
|
-
__name(isVariable, "isVariable");
|
|
35
31
|
function getVariableValue(v) {
|
|
36
32
|
if (isVariable(v))
|
|
37
33
|
return v.val;
|
|
38
34
|
return v;
|
|
39
35
|
}
|
|
40
|
-
__name(getVariableValue, "getVariableValue");
|
|
41
36
|
function getVariableName(v) {
|
|
42
37
|
if (isVariable(v))
|
|
43
38
|
return v.name;
|
|
44
39
|
return v;
|
|
45
40
|
}
|
|
46
|
-
__name(getVariableName, "getVariableName");
|
|
47
41
|
function getVariableVariable(v) {
|
|
48
42
|
if (isVariable(v))
|
|
49
43
|
return v.variable;
|
|
50
44
|
return v;
|
|
51
45
|
}
|
|
52
|
-
|
|
53
|
-
const createCSSVariable = /* @__PURE__ */ __name((nameProp, includeVar = true) => {
|
|
46
|
+
const createCSSVariable = (nameProp, includeVar = true) => {
|
|
54
47
|
if (process.env.NODE_ENV === "development") {
|
|
55
48
|
if (!nameProp || typeof nameProp !== "string") {
|
|
56
49
|
console.warn("invalid name", nameProp);
|
|
@@ -59,7 +52,7 @@ const createCSSVariable = /* @__PURE__ */ __name((nameProp, includeVar = true) =
|
|
|
59
52
|
}
|
|
60
53
|
const name = nameProp.replace(/[^a-z0-9\_\-]+/i, "_");
|
|
61
54
|
return includeVar ? `var(--${name})` : name;
|
|
62
|
-
}
|
|
55
|
+
};
|
|
63
56
|
export {
|
|
64
57
|
Variable,
|
|
65
58
|
createCSSVariable,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import { createVariable, isVariable } from "./createVariable";
|
|
4
|
-
const createVariables =
|
|
2
|
+
const createVariables = (tokens, parentPath = "") => {
|
|
5
3
|
const res = {};
|
|
6
4
|
for (const key in tokens) {
|
|
7
5
|
let val = tokens[key];
|
|
@@ -27,7 +25,7 @@ const createVariables = /* @__PURE__ */ __name((tokens, parentPath = "") => {
|
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
27
|
return res;
|
|
30
|
-
}
|
|
28
|
+
};
|
|
31
29
|
export {
|
|
32
30
|
createVariables
|
|
33
31
|
};
|