@tamagui/core 1.0.0-alpha.7 → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Tamagui.js +69 -0
- package/dist/cjs/Tamagui.js.map +7 -0
- package/dist/cjs/ThemeContext.js +29 -0
- package/dist/cjs/ThemeContext.js.map +7 -0
- package/dist/cjs/ThemeManager.js +211 -0
- package/dist/cjs/ThemeManager.js.map +7 -0
- package/dist/cjs/conf.js +64 -0
- package/dist/cjs/conf.js.map +7 -0
- package/dist/cjs/constants/constants.js +56 -0
- package/dist/cjs/constants/constants.js.map +7 -0
- package/dist/cjs/constants/platform.js +58 -0
- package/dist/cjs/constants/platform.js.map +7 -0
- package/dist/cjs/constants/pseudos.js +41 -0
- package/dist/cjs/constants/pseudos.js.map +7 -0
- package/dist/cjs/constants/rnw.js +46 -0
- package/dist/cjs/constants/rnw.js.map +7 -0
- package/dist/cjs/contexts/ButtonInsideButtonContext.js +29 -0
- package/dist/cjs/contexts/ButtonInsideButtonContext.js.map +7 -0
- package/dist/cjs/createComponent.js +677 -0
- package/dist/cjs/createComponent.js.map +7 -0
- package/dist/cjs/createFont.js +50 -0
- package/dist/cjs/createFont.js.map +7 -0
- package/dist/cjs/createShorthands.js +32 -0
- package/dist/cjs/createShorthands.js.map +7 -0
- package/dist/cjs/createTamagui.js +240 -0
- package/dist/cjs/createTamagui.js.map +7 -0
- package/dist/cjs/createTheme.js +29 -0
- package/dist/cjs/createTheme.js.map +7 -0
- package/dist/cjs/createTokens.js +52 -0
- package/dist/cjs/createTokens.js.map +7 -0
- package/dist/cjs/createVariable.js +77 -0
- package/dist/cjs/createVariable.js.map +7 -0
- package/dist/cjs/defaultComponentState.js +1 -0
- package/dist/{helpers/pseudos.js.map → cjs/defaultComponentState.js.map} +0 -0
- package/dist/cjs/helpers/RNComponents.js +38 -0
- package/dist/cjs/helpers/RNComponents.js.map +7 -0
- package/dist/cjs/helpers/addStylesUsingClassname.js +87 -0
- package/dist/cjs/helpers/addStylesUsingClassname.js.map +7 -0
- package/dist/cjs/helpers/areEqualSets.js +38 -0
- package/dist/cjs/helpers/areEqualSets.js.map +7 -0
- package/dist/cjs/helpers/createMediaStyle.js +54 -0
- package/dist/cjs/helpers/createMediaStyle.js.map +7 -0
- package/dist/cjs/helpers/createPropMapper.js +228 -0
- package/dist/cjs/helpers/createPropMapper.js.map +7 -0
- package/dist/cjs/helpers/createShallowUpdate.js +55 -0
- package/dist/cjs/helpers/createShallowUpdate.js.map +7 -0
- package/dist/cjs/helpers/createTamaguiProvider.js +93 -0
- package/dist/cjs/helpers/createTamaguiProvider.js.map +7 -0
- package/dist/cjs/helpers/extendStaticConfig.js +82 -0
- package/dist/cjs/helpers/extendStaticConfig.js.map +7 -0
- package/dist/cjs/helpers/fixNativeShadow.js +30 -0
- package/dist/cjs/helpers/fixNativeShadow.js.map +7 -0
- package/dist/cjs/helpers/fixNativeShadow.native.js +56 -0
- package/dist/cjs/helpers/fixNativeShadow.native.js.map +7 -0
- package/dist/cjs/helpers/getExpandedShorthands.js +41 -0
- package/dist/cjs/helpers/getExpandedShorthands.js.map +7 -0
- package/dist/cjs/helpers/getSize.js +35 -0
- package/dist/cjs/helpers/getSize.js.map +7 -0
- package/dist/cjs/helpers/getSplitStyles.js +307 -0
- package/dist/cjs/helpers/getSplitStyles.js.map +7 -0
- package/dist/cjs/helpers/getStylesAtomic.js +177 -0
- package/dist/cjs/helpers/getStylesAtomic.js.map +7 -0
- package/dist/cjs/helpers/getStylesAtomic.native.js +32 -0
- package/dist/cjs/helpers/getStylesAtomic.native.js.map +7 -0
- package/dist/cjs/helpers/getThemeParentClassName.js +33 -0
- package/dist/cjs/helpers/getThemeParentClassName.js.map +7 -0
- package/dist/cjs/helpers/insertStyleRule.js +122 -0
- package/dist/cjs/helpers/insertStyleRule.js.map +7 -0
- package/dist/cjs/helpers/isObj.js +29 -0
- package/dist/cjs/helpers/isObj.js.map +7 -0
- package/dist/cjs/helpers/isTamaguiElement.js +33 -0
- package/dist/cjs/helpers/isTamaguiElement.js.map +7 -0
- package/dist/cjs/helpers/matchMedia.js +40 -0
- package/dist/cjs/helpers/matchMedia.js.map +7 -0
- package/dist/cjs/helpers/matchMedia.native.js +34 -0
- package/dist/cjs/helpers/matchMedia.native.js.map +7 -0
- package/dist/cjs/helpers/proxyThemeVariables.js +40 -0
- package/dist/cjs/helpers/proxyThemeVariables.js.map +7 -0
- package/dist/cjs/helpers/themeable.js +83 -0
- package/dist/cjs/helpers/themeable.js.map +7 -0
- package/dist/cjs/helpers/validate.js +123 -0
- package/dist/cjs/helpers/validate.js.map +7 -0
- package/dist/cjs/helpers/withStaticProperties.js +32 -0
- package/dist/cjs/helpers/withStaticProperties.js.map +7 -0
- package/dist/cjs/helpers/wrapThemeManagerContext.js +39 -0
- package/dist/cjs/helpers/wrapThemeManagerContext.js.map +7 -0
- package/dist/cjs/hooks/useConstant.js +37 -0
- package/dist/cjs/hooks/useConstant.js.map +7 -0
- package/dist/cjs/hooks/useFeatures.js +228 -0
- package/dist/cjs/hooks/useFeatures.js.map +7 -0
- package/dist/cjs/hooks/useIsMounted.js +41 -0
- package/dist/cjs/hooks/useIsMounted.js.map +7 -0
- package/dist/cjs/hooks/useIsTouchDevice.js +39 -0
- package/dist/cjs/hooks/useIsTouchDevice.js.map +7 -0
- package/dist/cjs/hooks/useMedia.js +199 -0
- package/dist/cjs/hooks/useMedia.js.map +7 -0
- package/dist/cjs/hooks/usePressable.js +50 -0
- package/dist/cjs/hooks/usePressable.js.map +7 -0
- package/dist/cjs/hooks/useTheme.js +219 -0
- package/dist/cjs/hooks/useTheme.js.map +7 -0
- package/dist/cjs/hooks/useUnmountEffect.js +33 -0
- package/dist/cjs/hooks/useUnmountEffect.js.map +7 -0
- package/dist/cjs/index.js +83 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/static/postProcessStyles.js +40 -0
- package/dist/cjs/static/postProcessStyles.js.map +7 -0
- package/dist/cjs/static.js +33 -0
- package/dist/cjs/static.js.map +7 -0
- package/dist/cjs/styled.js +94 -0
- package/dist/cjs/styled.js.map +7 -0
- package/dist/cjs/tamagui-base.css +11 -0
- package/dist/cjs/tamagui-base.css.map +7 -0
- package/dist/cjs/types-rnw.js +16 -0
- package/dist/cjs/types-rnw.js.map +7 -0
- package/dist/cjs/types.js +16 -0
- package/dist/cjs/types.js.map +7 -0
- package/dist/cjs/views/Animated.js +132 -0
- package/dist/cjs/views/Animated.js.map +7 -0
- package/dist/cjs/views/Stack.js +52 -0
- package/dist/cjs/views/Stack.js.map +7 -0
- package/dist/cjs/views/Text.js +95 -0
- package/dist/cjs/views/Text.js.map +7 -0
- package/dist/cjs/views/TextAncestorContext.js +45 -0
- package/dist/cjs/views/TextAncestorContext.js.map +7 -0
- package/dist/cjs/views/Theme.js +60 -0
- package/dist/cjs/views/Theme.js.map +7 -0
- package/dist/cjs/views/ThemeContext.js +29 -0
- package/dist/cjs/views/ThemeContext.js.map +7 -0
- package/dist/cjs/views/ThemeInverse.js +52 -0
- package/dist/cjs/views/ThemeInverse.js.map +7 -0
- package/dist/cjs/views/ThemeManagerContext.js +85 -0
- package/dist/cjs/views/ThemeManagerContext.js.map +7 -0
- package/dist/cjs/views/ThemeProvider.js +67 -0
- package/dist/cjs/views/ThemeProvider.js.map +7 -0
- package/dist/cjs/views/ThemeReset.js +63 -0
- package/dist/cjs/views/ThemeReset.js.map +7 -0
- package/dist/esm/Tamagui.js +42 -0
- package/dist/esm/Tamagui.js.map +7 -0
- package/dist/{views → esm}/ThemeContext.js +0 -0
- package/dist/esm/ThemeContext.js.map +7 -0
- package/dist/esm/ThemeManager.js +187 -0
- package/dist/esm/ThemeManager.js.map +7 -0
- package/dist/esm/conf.js +36 -0
- package/dist/esm/conf.js.map +7 -0
- package/dist/{constants → esm/constants}/constants.js +4 -0
- package/dist/esm/constants/constants.js.map +7 -0
- package/dist/{constants → esm/constants}/platform.js +8 -1
- package/dist/esm/constants/platform.js.map +7 -0
- package/dist/{constants → esm/constants}/pseudos.js +0 -0
- package/dist/{constants → esm/constants}/pseudos.js.map +2 -2
- package/dist/{constants → esm/constants}/rnw.js +2 -0
- package/dist/esm/constants/rnw.js.map +7 -0
- package/dist/esm/contexts/ButtonInsideButtonContext.js +6 -0
- package/dist/esm/contexts/ButtonInsideButtonContext.js.map +7 -0
- package/dist/esm/createComponent.js +606 -0
- package/dist/esm/createComponent.js.map +7 -0
- package/dist/{createFont.js → esm/createFont.js} +0 -0
- package/dist/{createFont.js.map → esm/createFont.js.map} +2 -2
- package/dist/{createShorthands.js → esm/createShorthands.js} +0 -0
- package/dist/{createShorthands.js.map → esm/createShorthands.js.map} +2 -2
- package/dist/esm/createTamagui.js +202 -0
- package/dist/esm/createTamagui.js.map +7 -0
- package/dist/esm/createTheme.js +7 -0
- package/dist/esm/createTheme.js.map +7 -0
- package/dist/{createTokens.js → esm/createTokens.js} +2 -6
- package/dist/esm/createTokens.js.map +7 -0
- package/dist/esm/createVariable.js +49 -0
- package/dist/esm/createVariable.js.map +7 -0
- package/dist/esm/defaultComponentState.js +1 -0
- package/dist/{types.js.map → esm/defaultComponentState.js.map} +0 -0
- package/dist/esm/helpers/RNComponents.js +12 -0
- package/dist/esm/helpers/RNComponents.js.map +7 -0
- package/dist/{helpers → esm/helpers}/addStylesUsingClassname.js +20 -13
- package/dist/esm/helpers/addStylesUsingClassname.js.map +7 -0
- package/dist/esm/helpers/areEqualSets.js +16 -0
- package/dist/esm/helpers/areEqualSets.js.map +7 -0
- package/dist/{helpers → esm/helpers}/createMediaStyle.js +3 -6
- package/dist/esm/helpers/createMediaStyle.js.map +7 -0
- package/dist/esm/helpers/createPropMapper.js +206 -0
- package/dist/esm/helpers/createPropMapper.js.map +7 -0
- package/dist/esm/helpers/createShallowUpdate.js +19 -0
- package/dist/esm/helpers/createShallowUpdate.js.map +7 -0
- package/dist/esm/helpers/createTamaguiProvider.js +40 -0
- package/dist/esm/helpers/createTamaguiProvider.js.map +7 -0
- package/dist/{helpers → esm/helpers}/extendStaticConfig.js +17 -14
- package/dist/esm/helpers/extendStaticConfig.js.map +7 -0
- package/dist/{helpers → esm/helpers}/fixNativeShadow.js +0 -0
- package/dist/{helpers → esm/helpers}/fixNativeShadow.js.map +2 -2
- package/dist/esm/helpers/fixNativeShadow.native.js +34 -0
- package/dist/esm/helpers/fixNativeShadow.native.js.map +7 -0
- package/dist/esm/helpers/getExpandedShorthands.js +19 -0
- package/dist/esm/helpers/getExpandedShorthands.js.map +7 -0
- package/dist/esm/helpers/getSize.js +13 -0
- package/dist/esm/helpers/getSize.js.map +7 -0
- package/dist/esm/helpers/getSplitStyles.js +278 -0
- package/dist/esm/helpers/getSplitStyles.js.map +7 -0
- package/dist/esm/helpers/getStylesAtomic.js +131 -0
- package/dist/esm/helpers/getStylesAtomic.js.map +7 -0
- package/dist/{helpers → esm/helpers}/getStylesAtomic.native.js +0 -0
- package/dist/{helpers → esm/helpers}/getStylesAtomic.native.js.map +2 -2
- package/dist/esm/helpers/getThemeParentClassName.js +11 -0
- package/dist/esm/helpers/getThemeParentClassName.js.map +7 -0
- package/dist/esm/helpers/insertStyleRule.js +94 -0
- package/dist/esm/helpers/insertStyleRule.js.map +7 -0
- package/dist/{helpers → esm/helpers}/isObj.js +0 -0
- package/dist/{helpers → esm/helpers}/isObj.js.map +2 -2
- package/dist/{helpers → esm/helpers}/isTamaguiElement.js +2 -1
- package/dist/{helpers → esm/helpers}/isTamaguiElement.js.map +2 -2
- package/dist/{helpers → esm/helpers}/matchMedia.js +3 -0
- package/dist/esm/helpers/matchMedia.js.map +7 -0
- package/dist/{helpers → esm/helpers}/matchMedia.native.js +1 -0
- package/dist/esm/helpers/matchMedia.native.js.map +7 -0
- package/dist/esm/helpers/proxyThemeVariables.js +18 -0
- package/dist/esm/helpers/proxyThemeVariables.js.map +7 -0
- package/dist/{helpers → esm/helpers}/themeable.js +12 -10
- package/dist/esm/helpers/themeable.js.map +7 -0
- package/dist/esm/helpers/validate.js +76 -0
- package/dist/esm/helpers/validate.js.map +7 -0
- package/dist/esm/helpers/withStaticProperties.js +10 -0
- package/dist/esm/helpers/withStaticProperties.js.map +7 -0
- package/dist/esm/helpers/wrapThemeManagerContext.js +14 -0
- package/dist/esm/helpers/wrapThemeManagerContext.js.map +7 -0
- package/dist/{hooks → esm/hooks}/useConstant.js +0 -0
- package/dist/{hooks → esm/hooks}/useConstant.js.map +2 -2
- package/dist/esm/hooks/useFeatures.js +173 -0
- package/dist/esm/hooks/useFeatures.js.map +7 -0
- package/dist/esm/hooks/useIsMounted.js +19 -0
- package/dist/esm/hooks/useIsMounted.js.map +7 -0
- package/dist/esm/hooks/useIsTouchDevice.js +17 -0
- package/dist/esm/hooks/useIsTouchDevice.js.map +7 -0
- package/dist/{hooks → esm/hooks}/useMedia.js +31 -42
- package/dist/esm/hooks/useMedia.js.map +7 -0
- package/dist/{hooks → esm/hooks}/usePressable.js +2 -1
- package/dist/{hooks → esm/hooks}/usePressable.js.map +2 -2
- package/dist/esm/hooks/useTheme.js +178 -0
- package/dist/esm/hooks/useTheme.js.map +7 -0
- package/dist/esm/hooks/useUnmountEffect.js +11 -0
- package/dist/esm/hooks/useUnmountEffect.js.map +7 -0
- package/dist/{index.js → esm/index.js} +25 -5
- package/dist/esm/index.js.map +7 -0
- package/dist/{static → esm/static}/postProcessStyles.js +0 -0
- package/dist/{static → esm/static}/postProcessStyles.js.map +2 -2
- package/dist/{static.js → esm/static.js} +4 -2
- package/dist/esm/static.js.map +7 -0
- package/dist/esm/styled.js +45 -0
- package/dist/esm/styled.js.map +7 -0
- package/dist/esm/tamagui-base.css +11 -0
- package/dist/esm/tamagui-base.css.map +7 -0
- package/dist/esm/types-rnw.js +1 -0
- package/dist/esm/types-rnw.js.map +7 -0
- package/dist/{types.js → esm/types.js} +0 -0
- package/dist/esm/types.js.map +7 -0
- package/dist/{views → esm/views}/Animated.js +0 -0
- package/dist/{views → esm/views}/Animated.js.map +2 -2
- package/dist/{views → esm/views}/Stack.js +1 -0
- package/dist/esm/views/Stack.js.map +7 -0
- package/dist/{views → esm/views}/Text.js +6 -4
- package/dist/esm/views/Text.js.map +7 -0
- package/dist/esm/views/TextAncestorContext.js +18 -0
- package/dist/esm/views/TextAncestorContext.js.map +7 -0
- package/dist/esm/views/Theme.js +35 -0
- package/dist/esm/views/Theme.js.map +7 -0
- package/dist/esm/views/ThemeContext.js +6 -0
- package/dist/{views → esm/views}/ThemeContext.js.map +2 -2
- package/dist/{views → esm/views}/ThemeInverse.js +1 -1
- package/dist/{views → esm/views}/ThemeInverse.js.map +3 -3
- package/dist/{views → esm/views}/ThemeManagerContext.js +8 -7
- package/dist/esm/views/ThemeManagerContext.js.map +7 -0
- package/dist/esm/views/ThemeProvider.js +42 -0
- package/dist/esm/views/ThemeProvider.js.map +7 -0
- package/dist/esm/views/ThemeReset.js +38 -0
- package/dist/esm/views/ThemeReset.js.map +7 -0
- package/dist/jsx/Tamagui.js +41 -0
- package/dist/jsx/ThemeContext.js +5 -0
- package/dist/jsx/ThemeManager.js +186 -0
- package/dist/jsx/conf.js +35 -0
- package/dist/jsx/constants/constants.js +17 -0
- package/dist/jsx/constants/platform.js +25 -0
- package/dist/jsx/constants/pseudos.js +17 -0
- package/dist/jsx/constants/rnw.js +23 -0
- package/dist/jsx/contexts/ButtonInsideButtonContext.js +5 -0
- package/dist/jsx/createComponent.js +592 -0
- package/dist/jsx/createFont.js +27 -0
- package/dist/jsx/createShorthands.js +9 -0
- package/dist/jsx/createTamagui.js +201 -0
- package/dist/jsx/createTheme.js +6 -0
- package/dist/jsx/createTokens.js +28 -0
- package/dist/jsx/createVariable.js +48 -0
- package/dist/jsx/defaultComponentState.js +0 -0
- package/dist/jsx/helpers/RNComponents.js +11 -0
- package/dist/jsx/helpers/addStylesUsingClassname.js +63 -0
- package/dist/jsx/helpers/areEqualSets.js +15 -0
- package/dist/jsx/helpers/createMediaStyle.js +30 -0
- package/dist/jsx/helpers/createPropMapper.js +205 -0
- package/dist/jsx/helpers/createShallowUpdate.js +18 -0
- package/dist/jsx/helpers/createTamaguiProvider.js +34 -0
- package/dist/jsx/helpers/extendStaticConfig.js +61 -0
- package/dist/jsx/helpers/fixNativeShadow.js +7 -0
- package/dist/jsx/helpers/fixNativeShadow.native.js +33 -0
- package/dist/jsx/helpers/getExpandedShorthands.js +18 -0
- package/dist/jsx/helpers/getSize.js +12 -0
- package/dist/jsx/helpers/getSplitStyles.js +277 -0
- package/dist/jsx/helpers/getStylesAtomic.js +130 -0
- package/dist/jsx/helpers/getStylesAtomic.native.js +9 -0
- package/dist/jsx/helpers/getThemeParentClassName.js +10 -0
- package/dist/jsx/helpers/insertStyleRule.js +93 -0
- package/dist/jsx/helpers/isObj.js +6 -0
- package/dist/jsx/helpers/isTamaguiElement.js +10 -0
- package/dist/jsx/helpers/matchMedia.js +17 -0
- package/dist/jsx/helpers/matchMedia.native.js +8 -0
- package/dist/jsx/helpers/proxyThemeVariables.js +17 -0
- package/dist/jsx/helpers/themeable.js +24 -0
- package/dist/jsx/helpers/validate.js +75 -0
- package/dist/jsx/helpers/withStaticProperties.js +9 -0
- package/dist/jsx/helpers/wrapThemeManagerContext.js +10 -0
- package/dist/jsx/hooks/useConstant.js +14 -0
- package/dist/jsx/hooks/useFeatures.js +167 -0
- package/dist/jsx/hooks/useIsMounted.js +18 -0
- package/dist/jsx/hooks/useIsTouchDevice.js +16 -0
- package/dist/jsx/hooks/useMedia.js +159 -0
- package/dist/jsx/hooks/usePressable.js +13 -0
- package/dist/jsx/hooks/useTheme.js +177 -0
- package/dist/jsx/hooks/useUnmountEffect.js +10 -0
- package/dist/jsx/index.js +51 -0
- package/dist/jsx/static/postProcessStyles.js +17 -0
- package/dist/jsx/static.js +16 -0
- package/dist/jsx/styled.js +44 -0
- package/dist/jsx/tamagui-base.css +10 -0
- package/dist/jsx/types-rnw.js +0 -0
- package/dist/jsx/types.js +0 -0
- package/dist/jsx/views/Animated.js +74 -0
- package/dist/jsx/views/Stack.js +12 -0
- package/dist/jsx/views/Text.js +61 -0
- package/dist/jsx/views/TextAncestorContext.js +15 -0
- package/dist/jsx/views/Theme.js +31 -0
- package/dist/jsx/views/ThemeContext.js +5 -0
- package/dist/jsx/views/ThemeInverse.js +22 -0
- package/dist/jsx/views/ThemeManagerContext.js +61 -0
- package/dist/jsx/views/ThemeProvider.js +35 -0
- package/dist/jsx/views/ThemeReset.js +34 -0
- package/package.json +22 -19
- package/types/Tamagui.d.ts +30 -0
- package/types/Tamagui.d.ts.map +1 -0
- package/types/ThemeContext.d.ts +7 -0
- package/types/ThemeContext.d.ts.map +1 -0
- package/types/ThemeManager.d.ts +49 -0
- package/types/ThemeManager.d.ts.map +1 -0
- package/types/conf.d.ts +27 -0
- package/types/conf.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/constants/constants.d.ts +2 -0
- package/types/constants/constants.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/constants/platform.d.ts +3 -0
- package/types/constants/platform.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/constants/rnw.d.ts +0 -0
- package/types/constants/rnw.d.ts.map +1 -0
- package/types/contexts/ButtonInsideButtonContext.d.ts +3 -0
- package/types/contexts/ButtonInsideButtonContext.d.ts.map +1 -0
- package/types/createComponent.d.ts +19 -0
- package/types/createComponent.d.ts.map +1 -0
- package/types/createFont.d.ts +3 -0
- package/types/createFont.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/createShorthands.d.ts +0 -0
- package/types/createShorthands.d.ts.map +1 -0
- package/types/createTamagui.d.ts +18 -0
- package/types/createTamagui.d.ts.map +1 -0
- package/types/createTheme.d.ts +7 -0
- package/types/createTheme.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/createTokens.d.ts +0 -16
- package/types/createTokens.d.ts.map +1 -0
- package/types/createVariable.d.ts +20 -0
- package/types/createVariable.d.ts.map +1 -0
- package/types/defaultComponentState.d.ts +1 -0
- package/types/defaultComponentState.d.ts.map +1 -0
- package/types/helpers/RNComponents.d.ts +2 -0
- package/types/helpers/RNComponents.d.ts.map +1 -0
- package/types/helpers/addStylesUsingClassname.d.ts +3 -0
- package/types/helpers/addStylesUsingClassname.d.ts.map +1 -0
- package/types/helpers/areEqualSets.d.ts +2 -0
- package/types/helpers/areEqualSets.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/helpers/createMediaStyle.d.ts +1 -1
- package/types/helpers/createMediaStyle.d.ts.map +1 -0
- package/types/helpers/createPropMapper.d.ts +4 -0
- package/types/helpers/createPropMapper.d.ts.map +1 -0
- package/types/helpers/createShallowUpdate.d.ts +4 -0
- package/types/helpers/createShallowUpdate.d.ts.map +1 -0
- package/types/helpers/createTamaguiProvider.d.ts +7 -0
- package/types/helpers/createTamaguiProvider.d.ts.map +1 -0
- package/types/helpers/extendStaticConfig.d.ts +4 -0
- package/types/helpers/extendStaticConfig.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/helpers/fixNativeShadow.d.ts +0 -0
- package/types/helpers/fixNativeShadow.d.ts.map +1 -0
- package/types/helpers/fixNativeShadow.native.d.ts +2 -0
- package/types/helpers/fixNativeShadow.native.d.ts.map +1 -0
- package/types/helpers/getExpandedShorthands.d.ts +3 -0
- package/types/helpers/getExpandedShorthands.d.ts.map +1 -0
- package/types/helpers/getSize.d.ts +3 -0
- package/types/helpers/getSize.d.ts.map +1 -0
- package/types/helpers/getSplitStyles.d.ts +19 -0
- package/types/helpers/getSplitStyles.d.ts.map +1 -0
- package/types/helpers/getStylesAtomic.d.ts +27 -0
- package/types/helpers/getStylesAtomic.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/helpers/getStylesAtomic.native.d.ts +0 -0
- package/types/helpers/getStylesAtomic.native.d.ts.map +1 -0
- package/types/helpers/insertStyleRule.d.ts +8 -0
- package/types/helpers/insertStyleRule.d.ts.map +1 -0
- package/types/helpers/isObj.d.ts +2 -0
- package/types/helpers/isObj.d.ts.map +1 -0
- package/types/helpers/isTamaguiElement.d.ts +3 -0
- package/types/helpers/isTamaguiElement.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/helpers/matchMedia.d.ts +0 -0
- package/types/helpers/matchMedia.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/helpers/matchMedia.native.d.ts +0 -0
- package/types/helpers/matchMedia.native.d.ts.map +1 -0
- package/types/helpers/proxyThemeVariables.d.ts +2 -0
- package/types/helpers/proxyThemeVariables.d.ts.map +1 -0
- package/types/helpers/themeable.d.ts +12 -0
- package/types/helpers/themeable.d.ts.map +1 -0
- package/types/helpers/validate.d.ts +4 -0
- package/types/helpers/validate.d.ts.map +1 -0
- package/types/helpers/withStaticProperties.d.ts +2 -0
- package/types/helpers/withStaticProperties.d.ts.map +1 -0
- package/types/helpers/wrapThemeManagerContext.d.ts +3 -0
- package/types/helpers/wrapThemeManagerContext.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/hooks/useConstant.d.ts +0 -0
- package/types/hooks/useConstant.d.ts.map +1 -0
- package/types/hooks/useFeatures.d.ts +18 -0
- package/types/hooks/useFeatures.d.ts.map +1 -0
- package/types/hooks/useIsMounted.d.ts +3 -0
- package/types/hooks/useIsMounted.d.ts.map +1 -0
- package/types/hooks/useIsTouchDevice.d.ts +2 -0
- package/types/hooks/useIsTouchDevice.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/hooks/useMedia.d.ts +2 -6
- package/types/hooks/useMedia.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/hooks/usePressable.d.ts +0 -0
- package/types/hooks/usePressable.d.ts.map +1 -0
- package/types/hooks/useTheme.d.ts +36 -0
- package/types/hooks/useTheme.d.ts.map +1 -0
- package/types/hooks/useUnmountEffect.d.ts +2 -0
- package/types/hooks/useUnmountEffect.d.ts.map +1 -0
- package/types/index.d.ts +42 -0
- package/types/index.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/static.d.ts +7 -2
- package/types/static.d.ts.map +1 -0
- package/types/styled.d.ts +16 -0
- package/types/styled.d.ts.map +1 -0
- package/types/types-rnw.d.ts +74 -0
- package/types/types-rnw.d.ts.map +1 -0
- package/types/types.d.ts +406 -0
- package/types/types.d.ts.map +1 -0
- package/types/views/Stack.d.ts +4 -0
- package/types/views/Stack.d.ts.map +1 -0
- package/types/views/Text.d.ts +4 -0
- package/types/views/Text.d.ts.map +1 -0
- package/types/views/TextAncestorContext.d.ts +5 -0
- package/types/views/TextAncestorContext.d.ts.map +1 -0
- package/types/views/Theme.d.ts +12 -0
- package/types/views/Theme.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/views/ThemeInverse.d.ts +0 -0
- package/types/views/ThemeInverse.d.ts.map +1 -0
- package/{dist/packages/core/src → types}/views/ThemeProvider.d.ts +1 -1
- package/types/views/ThemeProvider.d.ts.map +1 -0
- package/types/views/ThemeReset.d.ts +4 -0
- package/types/views/ThemeReset.d.ts.map +1 -0
- package/LICENSE +0 -21
- package/dist/constants/constants.js.map +0 -7
- package/dist/constants/platform.js.map +0 -7
- package/dist/constants/rnw.js.map +0 -7
- package/dist/constants/styleConstants.js +0 -46
- package/dist/constants/styleConstants.js.map +0 -7
- package/dist/createComponent.js +0 -459
- package/dist/createComponent.js.map +0 -7
- package/dist/createTamagui.js +0 -166
- package/dist/createTamagui.js.map +0 -7
- package/dist/createTheme.js +0 -20
- package/dist/createTheme.js.map +0 -7
- package/dist/createTokens.js.map +0 -7
- package/dist/createVariable.js +0 -25
- package/dist/createVariable.js.map +0 -7
- package/dist/helpers/addStylesUsingClassname.js.map +0 -7
- package/dist/helpers/createMediaStyle.js.map +0 -7
- package/dist/helpers/createPropMapper.js +0 -153
- package/dist/helpers/createPropMapper.js.map +0 -7
- package/dist/helpers/createTamaguiProvider.js +0 -25
- package/dist/helpers/createTamaguiProvider.js.map +0 -7
- package/dist/helpers/extendStaticConfig.js.map +0 -7
- package/dist/helpers/fixNativeShadow.native.js +0 -30
- package/dist/helpers/fixNativeShadow.native.js.map +0 -7
- package/dist/helpers/getSplitStyles.js +0 -148
- package/dist/helpers/getSplitStyles.js.map +0 -7
- package/dist/helpers/getStylesAtomic.js +0 -83
- package/dist/helpers/getStylesAtomic.js.map +0 -7
- package/dist/helpers/insertStyleRule.js +0 -24
- package/dist/helpers/insertStyleRule.js.map +0 -7
- package/dist/helpers/isComponent.js +0 -10
- package/dist/helpers/isComponent.js.map +0 -7
- package/dist/helpers/isTamaguiComponent.js +0 -10
- package/dist/helpers/isTamaguiComponent.js.map +0 -7
- package/dist/helpers/matchMedia.js.map +0 -7
- package/dist/helpers/matchMedia.native.js.map +0 -7
- package/dist/helpers/pseudos.js +0 -1
- package/dist/helpers/themeable.js.map +0 -7
- package/dist/helpers/validate.js +0 -60
- package/dist/helpers/validate.js.map +0 -7
- package/dist/helpers/validateConfig.js +0 -46
- package/dist/helpers/validateConfig.js.map +0 -7
- package/dist/helpers/validateTokens.js +0 -29
- package/dist/helpers/validateTokens.js.map +0 -7
- package/dist/hooks/useFeatures.js +0 -75
- package/dist/hooks/useFeatures.js.map +0 -7
- package/dist/hooks/useForceUpdate.js +0 -28
- package/dist/hooks/useForceUpdate.js.map +0 -7
- package/dist/hooks/useMedia.js.map +0 -7
- package/dist/hooks/useTheme.js +0 -93
- package/dist/hooks/useTheme.js.map +0 -7
- package/dist/index.cjs +0 -2211
- package/dist/index.cjs.map +0 -7
- package/dist/index.js.map +0 -7
- package/dist/packages/core/src/constants/constants.d.ts.map +0 -1
- package/dist/packages/core/src/constants/platform.d.ts.map +0 -1
- package/dist/packages/core/src/constants/pseudos.d.ts +0 -15
- package/dist/packages/core/src/constants/pseudos.d.ts.map +0 -1
- package/dist/packages/core/src/constants/rnw.d.ts.map +0 -1
- package/dist/packages/core/src/createComponent.d.ts +0 -16
- package/dist/packages/core/src/createComponent.d.ts.map +0 -1
- package/dist/packages/core/src/createShorthands.d.ts.map +0 -1
- package/dist/packages/core/src/createTamagui.d.ts +0 -37
- package/dist/packages/core/src/createTamagui.d.ts.map +0 -1
- package/dist/packages/core/src/createTheme.d.ts +0 -5
- package/dist/packages/core/src/createTheme.d.ts.map +0 -1
- package/dist/packages/core/src/createTokens.d.ts.map +0 -1
- package/dist/packages/core/src/createVariable.d.ts +0 -14
- package/dist/packages/core/src/createVariable.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/addStylesUsingClassname.d.ts +0 -2
- package/dist/packages/core/src/helpers/addStylesUsingClassname.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/createMediaStyle.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/createTamaguiProvider.d.ts +0 -5
- package/dist/packages/core/src/helpers/createTamaguiProvider.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/extendStaticConfig.d.ts +0 -5
- package/dist/packages/core/src/helpers/extendStaticConfig.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/fixNativeShadow.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/fixNativeShadow.native.d.ts +0 -2
- package/dist/packages/core/src/helpers/fixNativeShadow.native.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/getSplitStyles.d.ts +0 -15
- package/dist/packages/core/src/helpers/getSplitStyles.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/getStylesAtomic.d.ts +0 -3
- package/dist/packages/core/src/helpers/getStylesAtomic.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/getStylesAtomic.native.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/insertStyleRule.d.ts +0 -2
- package/dist/packages/core/src/helpers/insertStyleRule.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/matchMedia.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/matchMedia.native.d.ts.map +0 -1
- package/dist/packages/core/src/helpers/themeable.d.ts +0 -10
- package/dist/packages/core/src/helpers/themeable.d.ts.map +0 -1
- package/dist/packages/core/src/hooks/useConstant.d.ts.map +0 -1
- package/dist/packages/core/src/hooks/useFeatures.d.ts +0 -5
- package/dist/packages/core/src/hooks/useFeatures.d.ts.map +0 -1
- package/dist/packages/core/src/hooks/useForceUpdate.d.ts +0 -2
- package/dist/packages/core/src/hooks/useForceUpdate.d.ts.map +0 -1
- package/dist/packages/core/src/hooks/useMedia.d.ts.map +0 -1
- package/dist/packages/core/src/hooks/usePressable.d.ts.map +0 -1
- package/dist/packages/core/src/hooks/useTheme.d.ts +0 -18
- package/dist/packages/core/src/hooks/useTheme.d.ts.map +0 -1
- package/dist/packages/core/src/index.d.ts +0 -27
- package/dist/packages/core/src/index.d.ts.map +0 -1
- package/dist/packages/core/src/static/postProcessStyles.d.ts +0 -7
- package/dist/packages/core/src/static/postProcessStyles.d.ts.map +0 -1
- package/dist/packages/core/src/static.d.ts.map +0 -1
- package/dist/packages/core/src/styled.d.ts +0 -16
- package/dist/packages/core/src/styled.d.ts.map +0 -1
- package/dist/packages/core/src/types.d.ts +0 -305
- package/dist/packages/core/src/types.d.ts.map +0 -1
- package/dist/packages/core/src/views/Animated.d.ts +0 -15
- package/dist/packages/core/src/views/Animated.d.ts.map +0 -1
- package/dist/packages/core/src/views/Stack.d.ts +0 -3
- package/dist/packages/core/src/views/Stack.d.ts.map +0 -1
- package/dist/packages/core/src/views/Text.d.ts +0 -3
- package/dist/packages/core/src/views/Text.d.ts.map +0 -1
- package/dist/packages/core/src/views/TextAncestorContext.d.ts +0 -3
- package/dist/packages/core/src/views/TextAncestorContext.d.ts.map +0 -1
- package/dist/packages/core/src/views/Theme.d.ts +0 -8
- package/dist/packages/core/src/views/Theme.d.ts.map +0 -1
- package/dist/packages/core/src/views/ThemeContext.d.ts +0 -18
- package/dist/packages/core/src/views/ThemeContext.d.ts.map +0 -1
- package/dist/packages/core/src/views/ThemeInverse.d.ts.map +0 -1
- package/dist/packages/core/src/views/ThemeManagerContext.d.ts +0 -15
- package/dist/packages/core/src/views/ThemeManagerContext.d.ts.map +0 -1
- package/dist/packages/core/src/views/ThemeProvider.d.ts.map +0 -1
- package/dist/packages/helpers/src/AllRules.d.ts +0 -3
- package/dist/packages/helpers/src/AllRules.d.ts.map +0 -1
- package/dist/packages/helpers/src/concatClassName.d.ts +0 -2
- package/dist/packages/helpers/src/concatClassName.d.ts.map +0 -1
- package/dist/packages/helpers/src/index.d.ts +0 -5
- package/dist/packages/helpers/src/index.d.ts.map +0 -1
- package/dist/packages/helpers/src/types.d.ts +0 -8
- package/dist/packages/helpers/src/types.d.ts.map +0 -1
- package/dist/packages/helpers/src/validStyleProps.d.ts +0 -475
- package/dist/packages/helpers/src/validStyleProps.d.ts.map +0 -1
- package/dist/static.js.map +0 -7
- package/dist/styled.js +0 -21
- package/dist/styled.js.map +0 -7
- package/dist/views/SafeAreaProvider.js +0 -30
- package/dist/views/SafeAreaProvider.js.map +0 -7
- package/dist/views/Stack.js.map +0 -7
- package/dist/views/Text.js.map +0 -7
- package/dist/views/TextAncestorContext.js +0 -18
- package/dist/views/TextAncestorContext.js.map +0 -7
- package/dist/views/Theme.js +0 -65
- package/dist/views/Theme.js.map +0 -7
- package/dist/views/ThemeManagerContext.js.map +0 -7
- package/dist/views/ThemeProvider.js +0 -45
- package/dist/views/ThemeProvider.js.map +0 -7
- package/src/constants/constants.ts +0 -12
- package/src/constants/platform.ts +0 -15
- package/src/constants/pseudos.ts +0 -14
- package/src/constants/rnw.tsx +0 -20
- package/src/createComponent.tsx +0 -608
- package/src/createFont.ts +0 -31
- package/src/createShorthands.ts +0 -5
- package/src/createTamagui.ts +0 -215
- package/src/createTheme.ts +0 -19
- package/src/createTokens.ts +0 -88
- package/src/createVariable.ts +0 -26
- package/src/helpers/addStylesUsingClassname.tsx +0 -60
- package/src/helpers/createMediaStyle.ts +0 -46
- package/src/helpers/createPropMapper.ts +0 -184
- package/src/helpers/createTamaguiProvider.tsx +0 -22
- package/src/helpers/extendStaticConfig.ts +0 -68
- package/src/helpers/fixNativeShadow.native.tsx +0 -27
- package/src/helpers/fixNativeShadow.tsx +0 -2
- package/src/helpers/getSplitStyles.tsx +0 -197
- package/src/helpers/getStylesAtomic.native.ts +0 -3
- package/src/helpers/getStylesAtomic.ts +0 -103
- package/src/helpers/insertStyleRule.tsx +0 -18
- package/src/helpers/isObj.ts +0 -1
- package/src/helpers/isTamaguiElement.tsx +0 -5
- package/src/helpers/matchMedia.native.ts +0 -3
- package/src/helpers/matchMedia.ts +0 -9
- package/src/helpers/themeable.tsx +0 -42
- package/src/helpers/validate.ts +0 -59
- package/src/hooks/useConstant.tsx +0 -10
- package/src/hooks/useFeatures.tsx +0 -78
- package/src/hooks/useMedia.tsx +0 -194
- package/src/hooks/usePressable.tsx +0 -9
- package/src/hooks/useTheme.tsx +0 -107
- package/src/index.ts +0 -32
- package/src/static/postProcessStyles.tsx +0 -20
- package/src/static.ts +0 -22
- package/src/styled.ts +0 -82
- package/src/types.tsx +0 -562
- package/src/views/Animated.tsx +0 -121
- package/src/views/Stack.tsx +0 -21
- package/src/views/Text.tsx +0 -66
- package/src/views/TextAncestorContext.tsx +0 -12
- package/src/views/Theme.tsx +0 -90
- package/src/views/ThemeContext.tsx +0 -5
- package/src/views/ThemeInverse.tsx +0 -22
- package/src/views/ThemeManagerContext.tsx +0 -60
- package/src/views/ThemeProvider.tsx +0 -52
- package/types.d.ts +0 -556
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var createVariable_exports = {};
|
|
20
|
+
__export(createVariable_exports, {
|
|
21
|
+
IS_VARIABLE_SYMBOL: () => IS_VARIABLE_SYMBOL,
|
|
22
|
+
Variable: () => Variable,
|
|
23
|
+
createCSSVariable: () => createCSSVariable,
|
|
24
|
+
createVariable: () => createVariable,
|
|
25
|
+
getVariableName: () => getVariableName,
|
|
26
|
+
getVariableValue: () => getVariableValue,
|
|
27
|
+
isVariable: () => isVariable
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(createVariable_exports);
|
|
30
|
+
var import_platform = require("./constants/platform");
|
|
31
|
+
var _a;
|
|
32
|
+
const IS_VARIABLE_SYMBOL = "__isVariable__";
|
|
33
|
+
class Variable {
|
|
34
|
+
constructor({ val, name }) {
|
|
35
|
+
this[_a] = true;
|
|
36
|
+
this.val = isVariable(val) ? val.val : val;
|
|
37
|
+
this.name = name;
|
|
38
|
+
this.variable = import_platform.isWeb ? createCSSVariable(name) : this.val;
|
|
39
|
+
}
|
|
40
|
+
toString() {
|
|
41
|
+
return `${import_platform.isWeb ? this.variable : this.val}`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
__name(Variable, "Variable");
|
|
45
|
+
_a = IS_VARIABLE_SYMBOL;
|
|
46
|
+
const createVariable = /* @__PURE__ */ __name((props) => new Variable(props), "createVariable");
|
|
47
|
+
function isVariable(v) {
|
|
48
|
+
return v instanceof Variable || v && v[IS_VARIABLE_SYMBOL];
|
|
49
|
+
}
|
|
50
|
+
__name(isVariable, "isVariable");
|
|
51
|
+
function getVariableValue(v) {
|
|
52
|
+
if (isVariable(v))
|
|
53
|
+
return v.val;
|
|
54
|
+
return v;
|
|
55
|
+
}
|
|
56
|
+
__name(getVariableValue, "getVariableValue");
|
|
57
|
+
function getVariableName(v) {
|
|
58
|
+
if (isVariable(v))
|
|
59
|
+
return v.name;
|
|
60
|
+
return v;
|
|
61
|
+
}
|
|
62
|
+
__name(getVariableName, "getVariableName");
|
|
63
|
+
const createCSSVariable = /* @__PURE__ */ __name((val, includeVar = true) => {
|
|
64
|
+
const name = val.replace(/[^a-z0-9\_\-]+/i, "_");
|
|
65
|
+
return includeVar ? `var(--${name})` : name;
|
|
66
|
+
}, "createCSSVariable");
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
IS_VARIABLE_SYMBOL,
|
|
70
|
+
Variable,
|
|
71
|
+
createCSSVariable,
|
|
72
|
+
createVariable,
|
|
73
|
+
getVariableName,
|
|
74
|
+
getVariableValue,
|
|
75
|
+
isVariable
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=createVariable.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/createVariable.ts"],
|
|
4
|
+
"sourcesContent": ["import { isWeb } from './constants/platform'\n\nexport const IS_VARIABLE_SYMBOL = '__isVariable__'\n\nexport class Variable {\n // because we have a separate node runtime we can't do instanceof\n // ran into issues with this and it's potentially fixable but for now\n // lets just do this\n [IS_VARIABLE_SYMBOL] = true\n\n name: string\n val: string | number\n variable: string | number\n\n constructor({ val, name }: VariableIn) {\n // converting to px breaks rn\n this.val = isVariable(val) ? val.val : val\n this.name = name\n this.variable = isWeb ? createCSSVariable(name) : this.val\n }\n\n toString() {\n return `${isWeb ? this.variable : this.val}`\n }\n}\n\ntype VariableIn = { val: string | number | Variable; name: string }\n\nexport const createVariable = (props: VariableIn) => new Variable(props)\n\nexport function isVariable(v: Variable | any): v is Variable {\n return v instanceof Variable || (v && v[IS_VARIABLE_SYMBOL])\n}\n\nexport function getVariableValue(v: Variable | any) {\n if (isVariable(v)) return v.val\n return v\n}\n\nexport function getVariableName(v: Variable | any) {\n if (isVariable(v)) return v.name\n return v\n}\n\n// bugfix { space: { 0.5: 10 } } was generating var(--space-0.5) (invalid CSS):\nexport const createCSSVariable = (val: string, includeVar = true) => {\n const name = val.replace(/[^a-z0-9\\_\\-]+/i, '_')\n return includeVar ? `var(--${name})` : name\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsB;AAAtB;AAEO,MAAM,qBAAqB;AAE3B,MAAM,SAAS;AAAA,EAUpB,YAAY,EAAE,KAAK,QAAoB;AANtC,eAAsB;AAQrB,SAAK,MAAM,WAAW,GAAG,IAAI,IAAI,MAAM;AACvC,SAAK,OAAO;AACZ,SAAK,WAAW,wBAAQ,kBAAkB,IAAI,IAAI,KAAK;AAAA,EACzD;AAAA,EAEA,WAAW;AACT,WAAO,GAAG,wBAAQ,KAAK,WAAW,KAAK;AAAA,EACzC;AACF;AApBO;AAJP,AAQG;AAoBI,MAAM,iBAAiB,wBAAC,UAAsB,IAAI,SAAS,KAAK,GAAzC;AAEvB,oBAAoB,GAAkC;AAC3D,SAAO,aAAa,YAAa,KAAK,EAAE;AAC1C;AAFgB;AAIT,0BAA0B,GAAmB;AAClD,MAAI,WAAW,CAAC;AAAG,WAAO,EAAE;AAC5B,SAAO;AACT;AAHgB;AAKT,yBAAyB,GAAmB;AACjD,MAAI,WAAW,CAAC;AAAG,WAAO,EAAE;AAC5B,SAAO;AACT;AAHgB;AAMT,MAAM,oBAAoB,wBAAC,KAAa,aAAa,SAAS;AACnE,QAAM,OAAO,IAAI,QAAQ,mBAAmB,GAAG;AAC/C,SAAO,aAAa,SAAS,UAAU;AACzC,GAHiC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=defaultComponentState.js.map
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var RNComponents_exports = {};
|
|
22
|
+
__export(RNComponents_exports, {
|
|
23
|
+
RNComponents: () => RNComponents
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(RNComponents_exports);
|
|
26
|
+
var ReactNative = __toESM(require("react-native"));
|
|
27
|
+
const RNComponents = /* @__PURE__ */ new WeakMap();
|
|
28
|
+
for (const key of ["Image", "TextInput", "Text", "View"]) {
|
|
29
|
+
const val = ReactNative[key];
|
|
30
|
+
if (val && typeof val === "object") {
|
|
31
|
+
RNComponents.set(val, true);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
RNComponents
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=RNComponents.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/RNComponents.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as ReactNative from 'react-native'\n\n// bye bye tree shaking... but only way to properly detect react-native components...\n// also neither rnw nor react support tree shaking atm\nexport const RNComponents = new WeakMap()\n\n// I was looping over all of them, but casuses deprecation warnings and there's only a few\n// we realistically support - lets whitelist rather than blacklist\nfor (const key of ['Image', 'TextInput', 'Text', 'View']) {\n const val = ReactNative[key]\n if (val && typeof val === 'object') {\n RNComponents.set(val, true)\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6B;AAItB,MAAM,eAAe,oBAAI,QAAQ;AAIxC,WAAW,OAAO,CAAC,SAAS,aAAa,QAAQ,MAAM,GAAG;AACxD,QAAM,MAAM,YAAY;AACxB,MAAI,OAAO,OAAO,QAAQ,UAAU;AAClC,iBAAa,IAAI,KAAK,IAAI;AAAA,EAC5B;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var addStylesUsingClassname_exports = {};
|
|
20
|
+
__export(addStylesUsingClassname_exports, {
|
|
21
|
+
addStylesUsingClassname: () => addStylesUsingClassname,
|
|
22
|
+
useStylesAsClassname: () => useStylesAsClassname
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(addStylesUsingClassname_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_getStylesAtomic = require("./getStylesAtomic");
|
|
27
|
+
var import_insertStyleRule = require("./insertStyleRule");
|
|
28
|
+
let added = /* @__PURE__ */ new Set();
|
|
29
|
+
function useStylesAsClassname(styles, disable = false, debug = false) {
|
|
30
|
+
if (!import_react.useInsertionEffect) {
|
|
31
|
+
return addStylesUsingClassname(disable ? styles : [], debug);
|
|
32
|
+
} else {
|
|
33
|
+
const insertions = [];
|
|
34
|
+
const className = addStylesUsingClassname(disable ? [] : styles, debug, (identifier, rules) => {
|
|
35
|
+
for (const rule of rules) {
|
|
36
|
+
insertions.push({ identifier, rule });
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
for (const { identifier, rule } of insertions) {
|
|
40
|
+
(0, import_insertStyleRule.updateInsertedCache)(identifier, rule);
|
|
41
|
+
}
|
|
42
|
+
(0, import_react.useInsertionEffect)(() => {
|
|
43
|
+
for (const { identifier, rule } of insertions) {
|
|
44
|
+
(0, import_insertStyleRule.insertStyleRule)(identifier, rule);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return className;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
__name(useStylesAsClassname, "useStylesAsClassname");
|
|
51
|
+
function addStylesUsingClassname(styles, debug = false, onAdd) {
|
|
52
|
+
let className = "";
|
|
53
|
+
for (const style of styles) {
|
|
54
|
+
if (!style)
|
|
55
|
+
continue;
|
|
56
|
+
if (Array.isArray(style)) {
|
|
57
|
+
className += " " + addStylesUsingClassname(style);
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const atomicStyles = (0, import_getStylesAtomic.getStylesAtomic)(style);
|
|
61
|
+
if (process.env.NODE_ENV === "development") {
|
|
62
|
+
if (debug === "verbose") {
|
|
63
|
+
console.log(" atomicStyles ", atomicStyles);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
for (const { identifier, rules } of atomicStyles) {
|
|
67
|
+
className += ` ${identifier}`;
|
|
68
|
+
if (added.has(identifier)) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
added.add(identifier);
|
|
72
|
+
if (onAdd) {
|
|
73
|
+
onAdd(identifier, rules);
|
|
74
|
+
} else {
|
|
75
|
+
(0, import_insertStyleRule.insertStyleRule)(identifier, rules[0]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return className;
|
|
80
|
+
}
|
|
81
|
+
__name(addStylesUsingClassname, "addStylesUsingClassname");
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
84
|
+
addStylesUsingClassname,
|
|
85
|
+
useStylesAsClassname
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=addStylesUsingClassname.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/addStylesUsingClassname.tsx"],
|
|
4
|
+
"sourcesContent": ["// @ts-ignore\nimport { useInsertionEffect } from 'react'\n\nimport { getStylesAtomic } from './getStylesAtomic'\nimport { insertStyleRule, updateInsertedCache } from './insertStyleRule'\n\n// TODO can drop most of this code once we drop support for 17\n// uses new useInsertionEffect for better perf if available\n\n// could be cleared occasionally\nlet added = new Set<string>()\n\nexport function useStylesAsClassname(styles: any[], disable = false, debug = false) {\n if (!useInsertionEffect) {\n return addStylesUsingClassname(disable ? styles : [], debug)\n } else {\n const insertions: any[] = []\n const className = addStylesUsingClassname(disable ? [] : styles, debug, (identifier, rules) => {\n for (const rule of rules) {\n insertions.push({ identifier, rule })\n }\n })\n // avoid race conditions in lookups because useInsertionEffect is delayed\n for (const { identifier, rule } of insertions) {\n updateInsertedCache(identifier, rule)\n }\n useInsertionEffect(() => {\n for (const { identifier, rule } of insertions) {\n insertStyleRule(identifier, rule)\n }\n })\n return className\n }\n}\n\nexport function addStylesUsingClassname(\n styles: any[],\n debug: boolean | 'verbose' = false,\n onAdd?: (identifier: string, rules: string[]) => any\n) {\n let className = ''\n for (const style of styles) {\n if (!style) continue\n if (Array.isArray(style)) {\n className += ' ' + addStylesUsingClassname(style)\n continue\n }\n const atomicStyles = getStylesAtomic(style)\n if (process.env.NODE_ENV === 'development') {\n if (debug === 'verbose') {\n console.log(' atomicStyles ', atomicStyles)\n }\n }\n for (const { identifier, rules } of atomicStyles) {\n className += ` ${identifier}`\n if (added.has(identifier)) {\n continue\n }\n added.add(identifier)\n if (onAdd) {\n onAdd(identifier, rules)\n } else {\n insertStyleRule(identifier, rules[0])\n }\n }\n }\n return className\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAmC;AAEnC,6BAAgC;AAChC,6BAAqD;AAMrD,IAAI,QAAQ,oBAAI,IAAY;AAErB,8BAA8B,QAAe,UAAU,OAAO,QAAQ,OAAO;AAClF,MAAI,CAAC,iCAAoB;AACvB,WAAO,wBAAwB,UAAU,SAAS,CAAC,GAAG,KAAK;AAAA,EAC7D,OAAO;AACL,UAAM,aAAoB,CAAC;AAC3B,UAAM,YAAY,wBAAwB,UAAU,CAAC,IAAI,QAAQ,OAAO,CAAC,YAAY,UAAU;AAC7F,iBAAW,QAAQ,OAAO;AACxB,mBAAW,KAAK,EAAE,YAAY,KAAK,CAAC;AAAA,MACtC;AAAA,IACF,CAAC;AAED,eAAW,EAAE,YAAY,UAAU,YAAY;AAC7C,sDAAoB,YAAY,IAAI;AAAA,IACtC;AACA,yCAAmB,MAAM;AACvB,iBAAW,EAAE,YAAY,UAAU,YAAY;AAC7C,oDAAgB,YAAY,IAAI;AAAA,MAClC;AAAA,IACF,CAAC;AACD,WAAO;AAAA,EACT;AACF;AArBgB;AAuBT,iCACL,QACA,QAA6B,OAC7B,OACA;AACA,MAAI,YAAY;AAChB,aAAW,SAAS,QAAQ;AAC1B,QAAI,CAAC;AAAO;AACZ,QAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,mBAAa,MAAM,wBAAwB,KAAK;AAChD;AAAA,IACF;AACA,UAAM,eAAe,4CAAgB,KAAK;AAC1C,QAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,UAAI,UAAU,WAAW;AACvB,gBAAQ,IAAI,kBAAkB,YAAY;AAAA,MAC5C;AAAA,IACF;AACA,eAAW,EAAE,YAAY,WAAW,cAAc;AAChD,mBAAa,IAAI;AACjB,UAAI,MAAM,IAAI,UAAU,GAAG;AACzB;AAAA,MACF;AACA,YAAM,IAAI,UAAU;AACpB,UAAI,OAAO;AACT,cAAM,YAAY,KAAK;AAAA,MACzB,OAAO;AACL,oDAAgB,YAAY,MAAM,EAAE;AAAA,MACtC;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAhCgB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var areEqualSets_exports = {};
|
|
20
|
+
__export(areEqualSets_exports, {
|
|
21
|
+
areEqualSets: () => areEqualSets
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(areEqualSets_exports);
|
|
24
|
+
const areEqualSets = /* @__PURE__ */ __name((a, b) => {
|
|
25
|
+
if (a.size !== b.size)
|
|
26
|
+
return false;
|
|
27
|
+
for (const val in a) {
|
|
28
|
+
if (!b.has(val)) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}, "areEqualSets");
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
areEqualSets
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=areEqualSets.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/areEqualSets.tsx"],
|
|
4
|
+
"sourcesContent": ["export const areEqualSets = (a: Set<string>, b: Set<string>) => {\n if (a.size !== b.size) return false\n for (const val in a) {\n if (!b.has(val)) {\n return false\n }\n }\n return true\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,eAAe,wBAAC,GAAgB,MAAmB;AAC9D,MAAI,EAAE,SAAS,EAAE;AAAM,WAAO;AAC9B,aAAW,OAAO,GAAG;AACnB,QAAI,CAAC,EAAE,IAAI,GAAG,GAAG;AACf,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT,GAR4B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var createMediaStyle_exports = {};
|
|
20
|
+
__export(createMediaStyle_exports, {
|
|
21
|
+
MEDIA_SEP: () => MEDIA_SEP,
|
|
22
|
+
createMediaStyle: () => createMediaStyle
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(createMediaStyle_exports);
|
|
25
|
+
var import_useMedia = require("../hooks/useMedia");
|
|
26
|
+
const MEDIA_SEP = "_";
|
|
27
|
+
const createMediaStyle = /* @__PURE__ */ __name(({ identifier, rules }, mediaKey, mediaQueries, negate, importance) => {
|
|
28
|
+
const mediaKeys = Object.keys(mediaQueries);
|
|
29
|
+
const importance_ = Math.max(0, importance == void 0 ? mediaKeys.indexOf(mediaKey) : importance || 0);
|
|
30
|
+
const precendencePrefix = new Array(importance_ + 1).fill(":root").join("");
|
|
31
|
+
const negKey = negate ? "0" : "";
|
|
32
|
+
const ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1);
|
|
33
|
+
const nextIdentifier = `${identifier.replace(ogPrefix, `${ogPrefix}${MEDIA_SEP}${mediaKey}${negKey}${MEDIA_SEP}`)}`;
|
|
34
|
+
const screenStr = negate ? "not all" : "screen";
|
|
35
|
+
const mediaSelector = (0, import_useMedia.mediaObjectToString)(mediaQueries[mediaKey]);
|
|
36
|
+
const mediaQuery = `${screenStr} and ${mediaSelector}`;
|
|
37
|
+
const styleInner = rules[0].replace(identifier, nextIdentifier);
|
|
38
|
+
let styleRule = "";
|
|
39
|
+
if (styleInner.includes("@media")) {
|
|
40
|
+
styleRule = styleInner.replace("{", ` and ${mediaQuery} {`);
|
|
41
|
+
} else {
|
|
42
|
+
styleRule = `@media ${mediaQuery} { ${precendencePrefix} ${styleInner} }`;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
styleRule,
|
|
46
|
+
identifier: nextIdentifier
|
|
47
|
+
};
|
|
48
|
+
}, "createMediaStyle");
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
MEDIA_SEP,
|
|
52
|
+
createMediaStyle
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=createMediaStyle.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/createMediaStyle.ts"],
|
|
4
|
+
"sourcesContent": ["import { StyleObject } from '@tamagui/helpers'\n\nimport { mediaObjectToString } from '../hooks/useMedia'\nimport { MediaQueries } from '../types'\n\n// TODO have this be used by extractMediaStyle in tamagui static\n// not synced to static/constants for now\nexport const MEDIA_SEP = '_'\n\nexport const createMediaStyle = (\n { identifier, rules }: StyleObject,\n mediaKey: string,\n mediaQueries: MediaQueries,\n negate?: boolean,\n importance?: number\n) => {\n const mediaKeys = Object.keys(mediaQueries)\n const importance_ = Math.max(\n 0,\n importance == undefined ? mediaKeys.indexOf(mediaKey) : importance || 0\n )\n const precendencePrefix = new Array(importance_ + 1).fill(':root').join('')\n const negKey = negate ? '0' : ''\n const ogPrefix = identifier.slice(0, identifier.indexOf('-') + 1)\n const nextIdentifier = `${identifier.replace(\n ogPrefix,\n `${ogPrefix}${MEDIA_SEP}${mediaKey}${negKey}${MEDIA_SEP}`\n )}`\n const screenStr = negate ? 'not all' : 'screen'\n const mediaSelector = mediaObjectToString(mediaQueries[mediaKey])\n const mediaQuery = `${screenStr} and ${mediaSelector}`\n const styleInner = rules[0].replace(identifier, nextIdentifier)\n // combines media queries if they already exist\n let styleRule = ''\n if (styleInner.includes('@media')) {\n // combine\n styleRule = styleInner.replace('{', ` and ${mediaQuery} {`)\n } else {\n styleRule = `@media ${mediaQuery} { ${precendencePrefix} ${styleInner} }`\n }\n return {\n styleRule,\n identifier: nextIdentifier,\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAAoC;AAK7B,MAAM,YAAY;AAElB,MAAM,mBAAmB,wBAC9B,EAAE,YAAY,SACd,UACA,cACA,QACA,eACG;AACH,QAAM,YAAY,OAAO,KAAK,YAAY;AAC1C,QAAM,cAAc,KAAK,IACvB,GACA,cAAc,SAAY,UAAU,QAAQ,QAAQ,IAAI,cAAc,CACxE;AACA,QAAM,oBAAoB,IAAI,MAAM,cAAc,CAAC,EAAE,KAAK,OAAO,EAAE,KAAK,EAAE;AAC1E,QAAM,SAAS,SAAS,MAAM;AAC9B,QAAM,WAAW,WAAW,MAAM,GAAG,WAAW,QAAQ,GAAG,IAAI,CAAC;AAChE,QAAM,iBAAiB,GAAG,WAAW,QACnC,UACA,GAAG,WAAW,YAAY,WAAW,SAAS,WAChD;AACA,QAAM,YAAY,SAAS,YAAY;AACvC,QAAM,gBAAgB,yCAAoB,aAAa,SAAS;AAChE,QAAM,aAAa,GAAG,iBAAiB;AACvC,QAAM,aAAa,MAAM,GAAG,QAAQ,YAAY,cAAc;AAE9D,MAAI,YAAY;AAChB,MAAI,WAAW,SAAS,QAAQ,GAAG;AAEjC,gBAAY,WAAW,QAAQ,KAAK,QAAQ,cAAc;AAAA,EAC5D,OAAO;AACL,gBAAY,UAAU,gBAAgB,qBAAqB;AAAA,EAC7D;AACA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,EACd;AACF,GAnCgC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var createPropMapper_exports = {};
|
|
20
|
+
__export(createPropMapper_exports, {
|
|
21
|
+
createPropMapper: () => createPropMapper
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(createPropMapper_exports);
|
|
24
|
+
var import_conf = require("../conf");
|
|
25
|
+
var import_platform = require("../constants/platform");
|
|
26
|
+
var import_createVariable = require("../createVariable");
|
|
27
|
+
var import_isObj = require("./isObj");
|
|
28
|
+
function getVariantFunction(variant, key, value) {
|
|
29
|
+
if (typeof variant === "function") {
|
|
30
|
+
return variant;
|
|
31
|
+
}
|
|
32
|
+
for (const cat in tokenCategories) {
|
|
33
|
+
if (key in tokenCategories[cat]) {
|
|
34
|
+
const spreadVariant = variant[`...${cat}`];
|
|
35
|
+
if (spreadVariant) {
|
|
36
|
+
return spreadVariant;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
let fn;
|
|
41
|
+
if (typeof value === "number") {
|
|
42
|
+
fn = variant[":number"];
|
|
43
|
+
} else if (typeof value === "string") {
|
|
44
|
+
fn = variant[":string"];
|
|
45
|
+
} else if (value === true || value === false) {
|
|
46
|
+
fn = variant[":boolean"];
|
|
47
|
+
}
|
|
48
|
+
fn = fn || variant[value];
|
|
49
|
+
return fn || variant["..."] || variant["...size"];
|
|
50
|
+
}
|
|
51
|
+
__name(getVariantFunction, "getVariantFunction");
|
|
52
|
+
const createPropMapper = /* @__PURE__ */ __name((staticConfig) => {
|
|
53
|
+
const variants = staticConfig.variants || {};
|
|
54
|
+
const defaultProps = staticConfig.defaultProps || {};
|
|
55
|
+
return (key, value, theme, props, returnVariablesAs = !!props.animation ? "value" : "auto", avoidDefaultProps = false) => {
|
|
56
|
+
const conf = (0, import_conf.getConfig)();
|
|
57
|
+
if (!conf) {
|
|
58
|
+
console.trace("no conf! err");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const fontFamily = props.fontFamily || defaultProps.fontFamily || "$body";
|
|
62
|
+
const variant = variants && variants[key];
|
|
63
|
+
if (variant && value !== void 0) {
|
|
64
|
+
let variantValue = getVariantFunction(variant, key, value);
|
|
65
|
+
if (variantValue) {
|
|
66
|
+
if (typeof variantValue === "function") {
|
|
67
|
+
const fn = variantValue;
|
|
68
|
+
variantValue = fn(value, {
|
|
69
|
+
fonts: conf.fontsParsed,
|
|
70
|
+
tokens: conf.tokensParsed,
|
|
71
|
+
theme,
|
|
72
|
+
props: avoidDefaultProps ? props : new Proxy(props, {
|
|
73
|
+
get(target, key2) {
|
|
74
|
+
if (Reflect.has(target, key2)) {
|
|
75
|
+
return Reflect.get(target, key2);
|
|
76
|
+
}
|
|
77
|
+
if (defaultProps) {
|
|
78
|
+
return Reflect.get(defaultProps, key2);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if ((0, import_isObj.isObj)(variantValue)) {
|
|
85
|
+
variantValue = resolveTokens(variantValue, conf, theme, fontFamily, returnVariablesAs);
|
|
86
|
+
}
|
|
87
|
+
return variantValue;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
let shouldReturn = false;
|
|
91
|
+
if (conf.shorthands[key]) {
|
|
92
|
+
shouldReturn = true;
|
|
93
|
+
key = conf.shorthands[key];
|
|
94
|
+
}
|
|
95
|
+
if (value) {
|
|
96
|
+
shouldReturn = true;
|
|
97
|
+
if (value[0] === "$") {
|
|
98
|
+
value = getToken(key, value, conf, theme, fontFamily, returnVariablesAs);
|
|
99
|
+
} else if ((0, import_createVariable.isVariable)(value)) {
|
|
100
|
+
value = getVariableValue(value, returnVariablesAs);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (shouldReturn) {
|
|
104
|
+
return {
|
|
105
|
+
[key]: value
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}, "createPropMapper");
|
|
110
|
+
const resolveTokens = /* @__PURE__ */ __name((input, conf, theme, fontFamily, resolveAs) => {
|
|
111
|
+
var _a;
|
|
112
|
+
let res = {};
|
|
113
|
+
for (const rKey in input) {
|
|
114
|
+
const fKey = conf.shorthands[rKey] || rKey;
|
|
115
|
+
const val = input[rKey];
|
|
116
|
+
if ((0, import_createVariable.isVariable)(val)) {
|
|
117
|
+
res[fKey] = resolveAs === "variable" ? val : !import_platform.isWeb || resolveAs === "value" ? val.val : val.variable;
|
|
118
|
+
} else if (typeof val === "string") {
|
|
119
|
+
const fVal = val[0] === "$" ? getToken(fKey, val, conf, theme, fontFamily, resolveAs) : val;
|
|
120
|
+
res[fKey] = fVal;
|
|
121
|
+
} else {
|
|
122
|
+
if ((0, import_isObj.isObj)(val)) {
|
|
123
|
+
res[fKey] = resolveTokens(val, conf, theme, fontFamily, resolveAs);
|
|
124
|
+
} else {
|
|
125
|
+
res[fKey] = input[fKey];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (process.env.NODE_ENV === "development") {
|
|
129
|
+
if (((_a = res[fKey]) == null ? void 0 : _a[0]) === "$") {
|
|
130
|
+
console.warn(`\u26A0\uFE0F Missing token in theme ${theme.name}:`, fKey, res[fKey]);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return res;
|
|
135
|
+
}, "resolveTokens");
|
|
136
|
+
const fontShorthand = {
|
|
137
|
+
fontSize: "size",
|
|
138
|
+
fontWeight: "weight"
|
|
139
|
+
};
|
|
140
|
+
const getToken = /* @__PURE__ */ __name((key, value, { tokensParsed, fontsParsed }, theme, fontFamily = "$body", resolveAs) => {
|
|
141
|
+
var _a, _b, _c;
|
|
142
|
+
let valOrVar;
|
|
143
|
+
let hasSet = false;
|
|
144
|
+
if (value in theme) {
|
|
145
|
+
valOrVar = theme[value];
|
|
146
|
+
hasSet = true;
|
|
147
|
+
} else {
|
|
148
|
+
switch (key) {
|
|
149
|
+
case "fontFamily":
|
|
150
|
+
valOrVar = ((_a = fontsParsed[value]) == null ? void 0 : _a.family) || value;
|
|
151
|
+
hasSet = true;
|
|
152
|
+
break;
|
|
153
|
+
case "fontSize":
|
|
154
|
+
case "lineHeight":
|
|
155
|
+
case "letterSpacing":
|
|
156
|
+
case "fontWeight":
|
|
157
|
+
valOrVar = ((_c = (_b = fontsParsed[fontFamily]) == null ? void 0 : _b[fontShorthand[key] || key]) == null ? void 0 : _c[value]) || value;
|
|
158
|
+
hasSet = true;
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
for (const cat in tokenCategories) {
|
|
162
|
+
if (key in tokenCategories[cat]) {
|
|
163
|
+
const res = tokensParsed[cat][value];
|
|
164
|
+
if (res) {
|
|
165
|
+
valOrVar = res;
|
|
166
|
+
hasSet = true;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (!hasSet) {
|
|
171
|
+
const spaceVar = tokensParsed.space[value];
|
|
172
|
+
if (spaceVar) {
|
|
173
|
+
valOrVar = spaceVar;
|
|
174
|
+
hasSet = true;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (hasSet) {
|
|
179
|
+
return getVariableValue(valOrVar, resolveAs);
|
|
180
|
+
}
|
|
181
|
+
if (process.env.NODE_ENV === "development") {
|
|
182
|
+
if (value && value[0] === "$") {
|
|
183
|
+
console.warn(`\u26A0\uFE0F Missing token:`, key, value, fontFamily, theme, fontsParsed);
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return value;
|
|
188
|
+
}, "getToken");
|
|
189
|
+
function getVariableValue(valOrVar, resolveAs = "auto") {
|
|
190
|
+
if ((0, import_createVariable.isVariable)(valOrVar)) {
|
|
191
|
+
if (resolveAs === "variable") {
|
|
192
|
+
return valOrVar;
|
|
193
|
+
}
|
|
194
|
+
if (!import_platform.isWeb || resolveAs === "value") {
|
|
195
|
+
return valOrVar.val;
|
|
196
|
+
}
|
|
197
|
+
return valOrVar.variable;
|
|
198
|
+
}
|
|
199
|
+
return valOrVar;
|
|
200
|
+
}
|
|
201
|
+
__name(getVariableValue, "getVariableValue");
|
|
202
|
+
const tokenCategories = {
|
|
203
|
+
radius: {
|
|
204
|
+
borderRadius: true
|
|
205
|
+
},
|
|
206
|
+
size: {
|
|
207
|
+
width: true,
|
|
208
|
+
height: true,
|
|
209
|
+
minWidth: true,
|
|
210
|
+
minHeight: true,
|
|
211
|
+
maxWidth: true,
|
|
212
|
+
maxHeight: true
|
|
213
|
+
},
|
|
214
|
+
color: {
|
|
215
|
+
color: true,
|
|
216
|
+
backgroundColor: true,
|
|
217
|
+
borderColor: true,
|
|
218
|
+
borderBottomColor: true,
|
|
219
|
+
borderTopColor: true,
|
|
220
|
+
borderLeftColor: true,
|
|
221
|
+
borderRightColor: true
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
225
|
+
0 && (module.exports = {
|
|
226
|
+
createPropMapper
|
|
227
|
+
});
|
|
228
|
+
//# sourceMappingURL=createPropMapper.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/createPropMapper.ts"],
|
|
4
|
+
"sourcesContent": ["import { getConfig } from '../conf'\nimport { isWeb } from '../constants/platform'\nimport { Variable, isVariable } from '../createVariable'\nimport { StaticConfig, TamaguiInternalConfig, VariantSpreadFunction } from '../types'\nimport { isObj } from './isObj'\n\nexport type ResolveVariableTypes = 'auto' | 'value' | 'variable' | 'both'\n\n// goes through specificity finding best matching variant function\nfunction getVariantFunction(variant: any, key: string, value: any) {\n if (typeof variant === 'function') {\n return variant\n }\n for (const cat in tokenCategories) {\n if (key in tokenCategories[cat]) {\n const spreadVariant = variant[`...${cat}`]\n if (spreadVariant) {\n return spreadVariant\n }\n }\n }\n let fn: any\n if (typeof value === 'number') {\n fn = variant[':number']\n } else if (typeof value === 'string') {\n fn = variant[':string']\n } else if (value === true || value === false) {\n fn = variant[':boolean']\n }\n fn = fn || variant[value]\n // fallback to size ultimately - could do token level detection\n return fn || variant['...'] || variant['...size']\n}\n\nexport const createPropMapper = (staticConfig: Partial<StaticConfig>) => {\n const variants = staticConfig.variants || {}\n const defaultProps = staticConfig.defaultProps || {}\n\n return (\n key: string,\n value: any,\n theme: any,\n props: any,\n returnVariablesAs: ResolveVariableTypes = !!props.animation ? 'value' : 'auto',\n avoidDefaultProps = false\n ) => {\n const conf = getConfig()\n if (!conf) {\n console.trace('no conf! err')\n return\n }\n\n // handled here because we need to resolve this off tokens, its the only one-off like this\n const fontFamily = props.fontFamily || defaultProps.fontFamily || '$body'\n const variant = variants && variants[key]\n\n if (variant && value !== undefined) {\n let variantValue = getVariantFunction(variant, key, value)\n\n if (variantValue) {\n if (typeof variantValue === 'function') {\n const fn = variantValue as VariantSpreadFunction<any>\n variantValue = fn(value, {\n fonts: conf.fontsParsed,\n tokens: conf.tokensParsed,\n theme,\n // TODO do this in splitstlye\n // we avoid passing in default props for media queries because that would confuse things like SizableText.size:\n props: avoidDefaultProps\n ? props\n : new Proxy(props, {\n get(target, key) {\n if (Reflect.has(target, key)) {\n return Reflect.get(target, key)\n }\n // these props may be extracted into classNames, but we still want to access them\n // at runtime, so we proxy back to defaultProps but don't pass them\n if (defaultProps) {\n return Reflect.get(defaultProps, key)\n }\n },\n }),\n })\n }\n\n if (isObj(variantValue)) {\n variantValue = resolveTokens(variantValue, conf, theme, fontFamily, returnVariablesAs)\n }\n\n return variantValue\n }\n }\n\n let shouldReturn = false\n\n // handle shorthands\n if (conf.shorthands[key]) {\n shouldReturn = true\n key = conf.shorthands[key]\n }\n\n if (value) {\n shouldReturn = true\n if (value[0] === '$') {\n value = getToken(key, value, conf, theme, fontFamily, returnVariablesAs)\n } else if (isVariable(value)) {\n value = getVariableValue(value, returnVariablesAs)\n }\n }\n\n if (shouldReturn) {\n return {\n [key]: value,\n }\n }\n }\n}\n\nconst resolveTokens = (\n input: Object,\n conf: TamaguiInternalConfig,\n theme: any,\n fontFamily: any,\n resolveAs?: ResolveVariableTypes\n) => {\n let res = {}\n for (const rKey in input) {\n const fKey = conf.shorthands[rKey] || rKey\n const val = input[rKey]\n if (isVariable(val)) {\n res[fKey] =\n resolveAs === 'variable' ? val : !isWeb || resolveAs === 'value' ? val.val : val.variable\n } else if (typeof val === 'string') {\n const fVal = val[0] === '$' ? getToken(fKey, val, conf, theme, fontFamily, resolveAs) : val\n res[fKey] = fVal\n } else {\n if (isObj(val)) {\n // for things like shadowOffset, hoverStyle which is a sub-object\n res[fKey] = resolveTokens(val, conf, theme, fontFamily, resolveAs)\n } else {\n // nullish values cant be tokens so need no exrta parsing\n res[fKey] = input[fKey]\n }\n }\n if (process.env.NODE_ENV === 'development') {\n if (res[fKey]?.[0] === '$') {\n console.warn(`\u26A0\uFE0F Missing token in theme ${theme.name}:`, fKey, res[fKey])\n }\n }\n }\n return res\n}\n\nconst fontShorthand = {\n fontSize: 'size',\n fontWeight: 'weight',\n}\n\nconst getToken = (\n key: string,\n value: string,\n { tokensParsed, fontsParsed }: TamaguiInternalConfig,\n theme: any,\n fontFamily: string | undefined = '$body',\n resolveAs?: ResolveVariableTypes\n) => {\n let valOrVar: any\n let hasSet = false\n if (value in theme) {\n valOrVar = theme[value]\n hasSet = true\n } else {\n switch (key) {\n case 'fontFamily':\n valOrVar = fontsParsed[value]?.family || value\n hasSet = true\n break\n case 'fontSize':\n case 'lineHeight':\n case 'letterSpacing':\n case 'fontWeight':\n valOrVar = fontsParsed[fontFamily]?.[fontShorthand[key] || key]?.[value] || value\n hasSet = true\n break\n }\n for (const cat in tokenCategories) {\n if (key in tokenCategories[cat]) {\n const res = tokensParsed[cat][value]\n if (res) {\n valOrVar = res\n hasSet = true\n }\n }\n }\n if (!hasSet) {\n const spaceVar = tokensParsed.space[value]\n if (spaceVar) {\n valOrVar = spaceVar\n hasSet = true\n }\n }\n }\n if (hasSet) {\n return getVariableValue(valOrVar, resolveAs)\n }\n if (process.env.NODE_ENV === 'development') {\n if (value && value[0] === '$') {\n console.warn(`\u26A0\uFE0F Missing token:`, key, value, fontFamily, theme, fontsParsed)\n return null\n }\n }\n return value\n}\n\nfunction getVariableValue(valOrVar: Variable | any, resolveAs: ResolveVariableTypes = 'auto') {\n if (isVariable(valOrVar)) {\n if (resolveAs === 'variable') {\n return valOrVar\n }\n if (!isWeb || resolveAs === 'value') {\n return valOrVar.val\n }\n return valOrVar.variable\n }\n return valOrVar\n}\n\n// just specificy the least costly, all else go to `space` (most keys - we can exclude)\nconst tokenCategories = {\n radius: {\n borderRadius: true,\n },\n size: {\n width: true,\n height: true,\n minWidth: true,\n minHeight: true,\n maxWidth: true,\n maxHeight: true,\n },\n color: {\n color: true,\n backgroundColor: true,\n borderColor: true,\n borderBottomColor: true,\n borderTopColor: true,\n borderLeftColor: true,\n borderRightColor: true,\n },\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|