@tamagui/core 1.0.0-beta.9 → 1.0.1-beta.101
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/Pressability.js +28 -0
- package/dist/cjs/Pressability.js.map +7 -0
- package/dist/cjs/Pressability.native.js +28 -0
- package/dist/cjs/Pressability.native.js.map +7 -0
- package/dist/cjs/Tamagui.js +6 -8
- package/dist/cjs/Tamagui.js.map +2 -2
- package/dist/cjs/ThemeManager.js +25 -32
- package/dist/cjs/ThemeManager.js.map +2 -2
- package/dist/cjs/conf.js +20 -15
- package/dist/cjs/conf.js.map +2 -2
- package/dist/cjs/constants/constants.js +1 -1
- package/dist/cjs/constants/constants.js.map +1 -1
- package/dist/cjs/constants/platform.js +9 -9
- package/dist/cjs/constants/platform.js.map +2 -2
- package/dist/cjs/constants/rnw.js +5 -19
- package/dist/cjs/constants/rnw.js.map +2 -2
- package/dist/cjs/constants/rnw.native.js +28 -0
- package/dist/cjs/constants/rnw.native.js.map +7 -0
- package/dist/cjs/createComponent.js +612 -295
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createFont.js +2 -3
- package/dist/cjs/createFont.js.map +2 -2
- package/dist/cjs/createShorthands.js +0 -2
- package/dist/cjs/createShorthands.js.map +1 -1
- package/dist/cjs/createTamagui.js +147 -100
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createTheme.js +3 -2
- package/dist/cjs/createTheme.js.map +2 -2
- package/dist/cjs/createTokens.js +4 -21
- package/dist/cjs/createTokens.js.map +2 -2
- package/dist/cjs/createVariable.js +39 -14
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/createVariables.js +55 -0
- package/dist/cjs/createVariables.js.map +7 -0
- package/dist/cjs/helpers/areEqualSets.js +2 -3
- package/dist/cjs/helpers/areEqualSets.js.map +1 -1
- package/dist/cjs/helpers/assignNativePropsToWeb.js +187 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.js.map +7 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js +29 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js.map +7 -0
- package/dist/cjs/helpers/calc.js +70 -0
- package/dist/cjs/helpers/calc.js.map +7 -0
- package/dist/cjs/helpers/createMediaStyle.js +4 -4
- package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +133 -113
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/createShallowUpdate.js +3 -4
- package/dist/cjs/helpers/createShallowUpdate.js.map +2 -2
- package/dist/cjs/helpers/createTamaguiProvider.js +16 -18
- package/dist/cjs/helpers/createTamaguiProvider.js.map +2 -2
- package/dist/cjs/helpers/cssHash.js +50 -0
- package/dist/cjs/helpers/cssHash.js.map +7 -0
- package/dist/cjs/helpers/expandStyle.js +111 -0
- package/dist/cjs/helpers/expandStyle.js.map +7 -0
- package/dist/cjs/helpers/expandStyles.js +126 -0
- package/dist/cjs/helpers/expandStyles.js.map +7 -0
- package/dist/cjs/helpers/extendStaticConfig.js +25 -17
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/fixNativeShadow.js +2 -3
- package/dist/cjs/helpers/fixNativeShadow.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/getFont.js +61 -0
- package/dist/cjs/helpers/getFont.js.map +7 -0
- package/dist/cjs/helpers/getSize.js +17 -9
- package/dist/cjs/helpers/getSize.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +268 -168
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStackSize.js +45 -0
- package/dist/cjs/helpers/getStackSize.js.map +7 -0
- package/dist/cjs/helpers/getStylesAtomic.js +178 -118
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- 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 +3 -4
- package/dist/cjs/helpers/getTextSize.js.map +2 -2
- package/dist/cjs/helpers/getVariantExtras.js +46 -0
- package/dist/cjs/helpers/getVariantExtras.js.map +7 -0
- package/dist/cjs/helpers/insertStyleRule.js +55 -37
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/isObj.js +1 -2
- package/dist/cjs/helpers/isObj.js.map +1 -1
- package/dist/cjs/helpers/isTamaguiComponent.js +36 -0
- package/dist/cjs/helpers/isTamaguiComponent.js.map +7 -0
- package/dist/cjs/helpers/isTamaguiElement.js +4 -5
- package/dist/cjs/helpers/isTamaguiElement.js.map +2 -2
- 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 +49 -0
- package/dist/cjs/helpers/mergeProps.js.map +7 -0
- package/dist/cjs/helpers/mergeTransform.js +41 -0
- package/dist/cjs/helpers/mergeTransform.js.map +7 -0
- package/dist/cjs/helpers/nativeGestureHandler.native.js +18 -0
- package/dist/cjs/helpers/nativeGestureHandler.native.js.map +7 -0
- package/dist/cjs/helpers/normalizeColor.js +76 -0
- package/dist/cjs/helpers/normalizeColor.js.map +7 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.js +90 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.js.map +7 -0
- package/dist/cjs/helpers/proxyThemeVariables.js +1 -3
- package/dist/cjs/helpers/proxyThemeVariables.js.map +1 -1
- package/dist/cjs/helpers/pseudoDescriptors.js +41 -0
- package/dist/cjs/helpers/pseudoDescriptors.js.map +7 -0
- package/dist/cjs/helpers/registerCSSVariable.js +40 -0
- package/dist/cjs/helpers/registerCSSVariable.js.map +7 -0
- package/dist/cjs/helpers/themeable.js +3 -5
- package/dist/cjs/helpers/themeable.js.map +2 -2
- package/dist/cjs/helpers/validate.js +39 -37
- package/dist/cjs/helpers/validate.js.map +2 -2
- 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 +2 -2
- package/dist/cjs/hooks/useConstant.js +0 -2
- package/dist/cjs/hooks/useConstant.js.map +1 -1
- package/dist/cjs/hooks/useEvent.js +34 -0
- package/dist/cjs/hooks/useEvent.js.map +7 -0
- package/dist/cjs/hooks/useFeatures.js +22 -20
- package/dist/cjs/hooks/useFeatures.js.map +2 -2
- package/dist/cjs/hooks/useGet.js +39 -0
- package/dist/cjs/hooks/useGet.js.map +7 -0
- package/dist/cjs/hooks/useId.js +5 -6
- package/dist/cjs/hooks/useId.js.map +2 -2
- package/dist/cjs/hooks/useIsMounted.js +2 -4
- package/dist/cjs/hooks/useIsMounted.js.map +2 -2
- package/dist/cjs/hooks/useIsTouchDevice.js +3 -4
- package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
- 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/usePrevious.js +1 -0
- package/dist/cjs/hooks/usePrevious.js.map +7 -0
- package/dist/cjs/hooks/useTheme.js +21 -33
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/cjs/hooks/useUnmountEffect.js +0 -2
- package/dist/cjs/hooks/useUnmountEffect.js.map +1 -1
- package/dist/cjs/index.js +23 -12
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/insertFont.js +89 -0
- package/dist/cjs/insertFont.js.map +7 -0
- package/dist/cjs/static.js +3 -1
- package/dist/cjs/static.js.map +2 -2
- package/dist/cjs/styled.js +0 -2
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/types-rnw.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/views/Slot.js +40 -26
- package/dist/cjs/views/Slot.js.map +2 -2
- package/dist/cjs/views/Text.js +11 -15
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/cjs/views/TextAncestorContext.js +4 -6
- package/dist/cjs/views/TextAncestorContext.js.map +2 -2
- package/dist/cjs/views/Theme.js +6 -9
- package/dist/cjs/views/Theme.js.map +2 -2
- package/dist/cjs/views/ThemeInverse.js +7 -5
- package/dist/cjs/views/ThemeInverse.js.map +2 -2
- package/dist/cjs/views/ThemeProvider.js +6 -6
- package/dist/cjs/views/ThemeProvider.js.map +2 -2
- package/dist/cjs/views/ThemeReset.js +3 -3
- package/dist/cjs/views/ThemeReset.js.map +2 -2
- package/dist/esm/Pressability.js +5 -0
- package/dist/esm/Pressability.js.map +7 -0
- package/dist/esm/Pressability.native.js +5 -0
- package/dist/esm/Pressability.native.js.map +7 -0
- package/dist/esm/Tamagui.js +5 -8
- package/dist/esm/Tamagui.js.map +2 -2
- package/dist/esm/ThemeManager.js +25 -33
- package/dist/esm/ThemeManager.js.map +2 -2
- package/dist/esm/conf.js +18 -15
- package/dist/esm/conf.js.map +2 -2
- package/dist/esm/constants/constants.js +24 -9
- package/dist/esm/constants/constants.js.map +2 -2
- package/dist/esm/constants/platform.js +7 -7
- package/dist/esm/constants/platform.js.map +2 -2
- package/dist/esm/constants/rnw.js +2 -20
- package/dist/esm/constants/rnw.js.map +2 -2
- package/dist/esm/constants/rnw.native.js +5 -0
- package/dist/esm/constants/rnw.native.js.map +7 -0
- package/dist/esm/createComponent.js +705 -331
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createFont.js +2 -4
- package/dist/esm/createFont.js.map +2 -2
- package/dist/esm/createShorthands.js +0 -3
- package/dist/esm/createShorthands.js.map +1 -1
- package/dist/esm/createTamagui.js +172 -105
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createTheme.js +3 -3
- package/dist/esm/createTheme.js.map +2 -2
- package/dist/esm/createTokens.js +3 -20
- package/dist/esm/createTokens.js.map +2 -2
- package/dist/esm/createVariable.js +38 -14
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/createVariables.js +32 -0
- package/dist/esm/createVariables.js.map +7 -0
- package/dist/esm/helpers/areEqualSets.js +2 -4
- package/dist/esm/helpers/areEqualSets.js.map +1 -1
- package/dist/esm/helpers/assignNativePropsToWeb.js +164 -0
- package/dist/esm/helpers/assignNativePropsToWeb.js.map +7 -0
- package/dist/esm/helpers/assignNativePropsToWeb.native.js +6 -0
- package/dist/esm/helpers/assignNativePropsToWeb.native.js.map +7 -0
- package/dist/esm/helpers/calc.js +47 -0
- package/dist/esm/helpers/calc.js.map +7 -0
- package/dist/esm/helpers/createMediaStyle.js +4 -5
- package/dist/esm/helpers/createMediaStyle.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +131 -114
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/createShallowUpdate.js +19 -5
- package/dist/esm/helpers/createShallowUpdate.js.map +2 -2
- package/dist/esm/helpers/createTamaguiProvider.js +46 -19
- package/dist/esm/helpers/createTamaguiProvider.js.map +2 -2
- package/dist/esm/helpers/cssHash.js +27 -0
- package/dist/esm/helpers/cssHash.js.map +7 -0
- package/dist/esm/helpers/expandStyle.js +90 -0
- package/dist/esm/helpers/expandStyle.js.map +7 -0
- package/dist/esm/helpers/expandStyles.js +103 -0
- package/dist/esm/helpers/expandStyles.js.map +7 -0
- package/dist/esm/helpers/extendStaticConfig.js +46 -40
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/fixNativeShadow.js +2 -4
- package/dist/esm/helpers/fixNativeShadow.js.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.js +0 -3
- package/dist/esm/helpers/getExpandedShorthands.js.map +1 -1
- package/dist/{jsx/helpers/getTextSize.js → esm/helpers/getFont.js} +12 -7
- package/dist/esm/helpers/getFont.js.map +7 -0
- package/dist/esm/helpers/getSize.js +15 -9
- package/dist/esm/helpers/getSize.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +282 -176
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStackSize.js +22 -0
- package/dist/esm/helpers/getStackSize.js.map +7 -0
- package/dist/esm/helpers/getStylesAtomic.js +188 -110
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- 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 +3 -5
- package/dist/esm/helpers/getTextSize.js.map +2 -2
- package/dist/esm/helpers/getVariantExtras.js +23 -0
- package/dist/esm/helpers/getVariantExtras.js.map +7 -0
- package/dist/esm/helpers/insertStyleRule.js +55 -38
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/isObj.js +1 -3
- package/dist/esm/helpers/isObj.js.map +1 -1
- package/dist/esm/helpers/isTamaguiComponent.js +13 -0
- package/dist/esm/helpers/isTamaguiComponent.js.map +7 -0
- package/dist/esm/helpers/isTamaguiElement.js +4 -6
- package/dist/esm/helpers/isTamaguiElement.js.map +2 -2
- 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 +26 -0
- package/dist/esm/helpers/mergeProps.js.map +7 -0
- package/dist/esm/helpers/mergeTransform.js +17 -0
- package/dist/esm/helpers/mergeTransform.js.map +7 -0
- package/dist/esm/helpers/nativeGestureHandler.native.js +2 -0
- package/dist/esm/helpers/nativeGestureHandler.native.js.map +7 -0
- package/dist/esm/helpers/normalizeColor.js +49 -0
- package/dist/esm/helpers/normalizeColor.js.map +7 -0
- package/dist/esm/helpers/normalizeValueWithProperty.js +67 -0
- package/dist/esm/helpers/normalizeValueWithProperty.js.map +7 -0
- package/dist/esm/helpers/proxyThemeVariables.js +1 -4
- package/dist/esm/helpers/proxyThemeVariables.js.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.js +18 -0
- package/dist/esm/helpers/pseudoDescriptors.js.map +7 -0
- package/dist/esm/helpers/registerCSSVariable.js +15 -0
- package/dist/esm/helpers/registerCSSVariable.js.map +7 -0
- package/dist/esm/helpers/themeable.js +34 -5
- package/dist/esm/helpers/themeable.js.map +2 -2
- package/dist/esm/helpers/validate.js +42 -19
- package/dist/esm/helpers/validate.js.map +2 -2
- 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 +2 -2
- package/dist/esm/hooks/useConstant.js +0 -3
- package/dist/esm/hooks/useConstant.js.map +1 -1
- package/dist/esm/hooks/useEvent.js +11 -0
- package/dist/esm/hooks/useEvent.js.map +7 -0
- package/dist/esm/hooks/useFeatures.js +59 -26
- package/dist/esm/hooks/useFeatures.js.map +2 -2
- package/dist/esm/hooks/useGet.js +16 -0
- package/dist/esm/hooks/useGet.js.map +7 -0
- package/dist/esm/hooks/useId.js +8 -11
- package/dist/esm/hooks/useId.js.map +2 -2
- package/dist/esm/hooks/useIsMounted.js +1 -4
- package/dist/esm/hooks/useIsMounted.js.map +2 -2
- package/dist/esm/hooks/useIsTouchDevice.js +4 -6
- package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/esm/hooks/useMedia.js +28 -21
- package/dist/esm/hooks/useMedia.js.map +1 -1
- package/dist/esm/hooks/usePressable.js +18 -5
- package/dist/esm/hooks/usePressable.js.map +1 -1
- package/dist/esm/hooks/usePrevious.js +1 -0
- package/dist/esm/hooks/usePrevious.js.map +7 -0
- package/dist/esm/hooks/useTheme.js +45 -41
- package/dist/esm/hooks/useTheme.js.map +2 -2
- package/dist/esm/hooks/useUnmountEffect.js +0 -3
- package/dist/esm/hooks/useUnmountEffect.js.map +1 -1
- package/dist/esm/index.js +20 -9
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/insertFont.js +64 -0
- package/dist/esm/insertFont.js.map +7 -0
- package/dist/esm/static.js +3 -1
- package/dist/esm/static.js.map +2 -2
- package/dist/esm/styled.js +37 -11
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/views/Slot.js +74 -34
- package/dist/esm/views/Slot.js.map +2 -2
- package/dist/esm/views/Stack.js +21 -3
- package/dist/esm/views/Stack.js.map +1 -1
- package/dist/esm/views/Text.js +27 -19
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/esm/views/TextAncestorContext.js +4 -7
- package/dist/esm/views/TextAncestorContext.js.map +2 -2
- package/dist/esm/views/Theme.js +6 -10
- package/dist/esm/views/Theme.js.map +2 -2
- package/dist/esm/views/ThemeInverse.js +8 -7
- package/dist/esm/views/ThemeInverse.js.map +2 -2
- package/dist/esm/views/ThemeProvider.js +6 -7
- package/dist/esm/views/ThemeProvider.js.map +2 -2
- package/dist/esm/views/ThemeReset.js +3 -4
- package/dist/esm/views/ThemeReset.js.map +2 -2
- package/package.json +19 -11
- package/reset.css +41 -0
- package/types/Pressability.d.ts +2 -0
- package/types/Pressability.d.ts.map +1 -0
- package/types/Pressability.native.d.ts +2 -0
- package/types/Pressability.native.d.ts.map +1 -0
- package/types/Tamagui.d.ts +4 -6
- package/types/Tamagui.d.ts.map +1 -1
- package/types/ThemeContext.d.ts +0 -0
- package/types/ThemeContext.d.ts.map +0 -0
- package/types/ThemeManager.d.ts +10 -7
- package/types/ThemeManager.d.ts.map +1 -1
- package/types/conf.d.ts +3 -4
- package/types/conf.d.ts.map +1 -1
- package/types/constants/constants.d.ts +1 -1
- package/types/constants/constants.d.ts.map +1 -1
- package/types/constants/platform.d.ts +4 -4
- package/types/constants/platform.d.ts.map +1 -1
- package/types/constants/rnw.d.ts +1 -1
- package/types/constants/rnw.d.ts.map +1 -1
- package/types/constants/rnw.native.d.ts +2 -0
- package/types/constants/rnw.native.d.ts.map +1 -0
- package/types/contexts/ButtonInsideButtonContext.d.ts +0 -0
- package/types/contexts/ButtonInsideButtonContext.d.ts.map +0 -0
- package/types/createComponent.d.ts +40 -15
- 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 +10 -2
- package/types/createTamagui.d.ts.map +1 -1
- package/types/createTheme.d.ts +1 -1
- package/types/createTheme.d.ts.map +1 -1
- package/types/createTokens.d.ts +0 -1
- package/types/createTokens.d.ts.map +1 -1
- package/types/createVariable.d.ts +16 -11
- package/types/createVariable.d.ts.map +1 -1
- package/types/createVariables.d.ts +10 -0
- package/types/createVariables.d.ts.map +1 -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/assignNativePropsToWeb.d.ts +2 -0
- package/types/helpers/assignNativePropsToWeb.d.ts.map +1 -0
- package/types/helpers/assignNativePropsToWeb.native.d.ts +2 -0
- package/types/helpers/assignNativePropsToWeb.native.d.ts.map +1 -0
- package/types/helpers/calc.d.ts +12 -0
- package/types/helpers/calc.d.ts.map +1 -0
- package/types/helpers/createMediaStyle.d.ts +1 -1
- package/types/helpers/createMediaStyle.d.ts.map +1 -1
- package/types/helpers/createPropMapper.d.ts +4 -3
- package/types/helpers/createPropMapper.d.ts.map +1 -1
- package/types/helpers/createShallowUpdate.d.ts +1 -2
- package/types/helpers/createShallowUpdate.d.ts.map +1 -1
- package/types/helpers/createTamaguiProvider.d.ts +2 -5
- package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
- package/types/helpers/cssHash.d.ts +2 -0
- package/types/helpers/cssHash.d.ts.map +1 -0
- package/types/helpers/expandStyle.d.ts +2 -0
- package/types/helpers/expandStyle.d.ts.map +1 -0
- package/types/helpers/expandStyles.d.ts +7 -0
- package/types/helpers/expandStyles.d.ts.map +1 -0
- package/types/helpers/extendStaticConfig.d.ts +0 -0
- package/types/helpers/extendStaticConfig.d.ts.map +1 -1
- package/types/helpers/fixNativeShadow.d.ts +0 -0
- package/types/helpers/fixNativeShadow.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/getFont.d.ts +3 -0
- package/types/helpers/getFont.d.ts.map +1 -0
- package/types/helpers/getSize.d.ts +3 -2
- package/types/helpers/getSize.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +10 -7
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStackSize.d.ts +8 -0
- package/types/helpers/getStackSize.d.ts.map +1 -0
- package/types/helpers/getStylesAtomic.d.ts +7 -17
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.native.d.ts +0 -0
- package/types/helpers/getStylesAtomic.native.d.ts.map +0 -0
- package/types/helpers/getVariantExtras.d.ts +7 -0
- package/types/helpers/getVariantExtras.d.ts.map +1 -0
- package/types/helpers/insertStyleRule.d.ts +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/isObj.d.ts +0 -0
- package/types/helpers/isObj.d.ts.map +0 -0
- package/types/helpers/isTamaguiComponent.d.ts +5 -0
- package/types/helpers/isTamaguiComponent.d.ts.map +1 -0
- package/types/helpers/isTamaguiElement.d.ts +1 -1
- package/types/helpers/isTamaguiElement.d.ts.map +1 -1
- 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 +2 -0
- package/types/helpers/mergeProps.d.ts.map +1 -0
- package/types/helpers/mergeTransform.d.ts +7 -0
- package/types/helpers/mergeTransform.d.ts.map +1 -0
- package/types/helpers/nativeGestureHandler.native.d.ts +2 -0
- package/types/helpers/nativeGestureHandler.native.d.ts.map +1 -0
- package/types/helpers/normalizeColor.d.ts +3 -0
- package/types/helpers/normalizeColor.d.ts.map +1 -0
- package/types/helpers/normalizeValueWithProperty.d.ts +2 -0
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -0
- package/types/helpers/proxyThemeVariables.d.ts +0 -0
- package/types/helpers/proxyThemeVariables.d.ts.map +0 -0
- package/types/helpers/pseudoDescriptors.d.ts +16 -0
- package/types/helpers/pseudoDescriptors.d.ts.map +1 -0
- package/types/helpers/registerCSSVariable.d.ts +5 -0
- package/types/helpers/registerCSSVariable.d.ts.map +1 -0
- package/types/helpers/themeable.d.ts +0 -0
- package/types/helpers/themeable.d.ts.map +1 -1
- 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/useEvent.d.ts +4 -0
- package/types/hooks/useEvent.d.ts.map +1 -0
- package/types/hooks/useFeatures.d.ts +11 -5
- package/types/hooks/useFeatures.d.ts.map +1 -1
- package/types/hooks/useGet.d.ts +2 -0
- package/types/hooks/useGet.d.ts.map +1 -0
- package/types/hooks/useId.d.ts +0 -0
- package/types/hooks/useId.d.ts.map +1 -1
- package/types/hooks/useIsMounted.d.ts +0 -0
- package/types/hooks/useIsMounted.d.ts.map +1 -1
- 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 +1 -0
- package/types/hooks/usePrevious.d.ts.map +1 -0
- package/types/hooks/useTheme.d.ts +15 -6
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useUnmountEffect.d.ts +0 -0
- package/types/hooks/useUnmountEffect.d.ts.map +0 -0
- package/types/index.d.ts +18 -6
- package/types/index.d.ts.map +1 -1
- package/types/insertFont.d.ts +6 -0
- package/types/insertFont.d.ts.map +1 -0
- package/types/static.d.ts +3 -1
- package/types/static.d.ts.map +1 -1
- package/types/styled.d.ts +2 -2
- package/types/styled.d.ts.map +1 -1
- package/types/types-rnw.d.ts +0 -0
- package/types/types-rnw.d.ts.map +1 -1
- package/types/types.d.ts +71 -51
- package/types/types.d.ts.map +1 -1
- package/types/views/Slot.d.ts +1 -0
- package/types/views/Slot.d.ts.map +1 -1
- 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 +1 -1
- package/types/views/Theme.d.ts +1 -9
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeInverse.d.ts +0 -1
- package/types/views/ThemeInverse.d.ts.map +1 -1
- package/types/views/ThemeProvider.d.ts +2 -0
- package/types/views/ThemeProvider.d.ts.map +1 -1
- package/types/views/ThemeReset.d.ts +0 -0
- package/types/views/ThemeReset.d.ts.map +0 -0
- package/dist/cjs/helpers/addStylesUsingClassname.js +0 -87
- package/dist/cjs/helpers/addStylesUsingClassname.js.map +0 -7
- package/dist/cjs/helpers/fixNativeShadow.native.js +0 -63
- package/dist/cjs/helpers/fixNativeShadow.native.js.map +0 -7
- package/dist/cjs/helpers/getButtonSize.js +0 -45
- package/dist/cjs/helpers/getButtonSize.js.map +0 -7
- package/dist/esm/helpers/addStylesUsingClassname.js +0 -64
- package/dist/esm/helpers/addStylesUsingClassname.js.map +0 -7
- package/dist/esm/helpers/fixNativeShadow.native.js +0 -41
- package/dist/esm/helpers/fixNativeShadow.native.js.map +0 -7
- package/dist/esm/helpers/getButtonSize.js +0 -24
- package/dist/esm/helpers/getButtonSize.js.map +0 -7
- package/dist/jsx/Tamagui.js +0 -41
- package/dist/jsx/ThemeContext.js +0 -5
- package/dist/jsx/ThemeManager.js +0 -186
- package/dist/jsx/conf.js +0 -35
- package/dist/jsx/constants/constants.js +0 -17
- package/dist/jsx/constants/platform.js +0 -25
- package/dist/jsx/constants/rnw.js +0 -23
- package/dist/jsx/contexts/ButtonInsideButtonContext.js +0 -5
- package/dist/jsx/createComponent.js +0 -617
- package/dist/jsx/createFont.js +0 -27
- package/dist/jsx/createShorthands.js +0 -9
- package/dist/jsx/createTamagui.js +0 -201
- package/dist/jsx/createTheme.js +0 -6
- package/dist/jsx/createTokens.js +0 -28
- package/dist/jsx/createVariable.js +0 -48
- package/dist/jsx/defaultComponentState.js +0 -0
- package/dist/jsx/helpers/RNComponents.js +0 -11
- package/dist/jsx/helpers/addStylesUsingClassname.js +0 -63
- package/dist/jsx/helpers/areEqualSets.js +0 -15
- package/dist/jsx/helpers/createMediaStyle.js +0 -30
- package/dist/jsx/helpers/createPropMapper.js +0 -237
- package/dist/jsx/helpers/createShallowUpdate.js +0 -18
- package/dist/jsx/helpers/createTamaguiProvider.js +0 -34
- package/dist/jsx/helpers/extendStaticConfig.js +0 -61
- package/dist/jsx/helpers/fixNativeShadow.js +0 -7
- package/dist/jsx/helpers/fixNativeShadow.native.js +0 -40
- package/dist/jsx/helpers/getButtonSize.js +0 -23
- package/dist/jsx/helpers/getExpandedShorthands.js +0 -18
- package/dist/jsx/helpers/getSize.js +0 -12
- package/dist/jsx/helpers/getSplitStyles.js +0 -302
- package/dist/jsx/helpers/getStylesAtomic.js +0 -130
- package/dist/jsx/helpers/getStylesAtomic.native.js +0 -9
- package/dist/jsx/helpers/insertStyleRule.js +0 -94
- package/dist/jsx/helpers/isObj.js +0 -6
- package/dist/jsx/helpers/isTamaguiElement.js +0 -10
- package/dist/jsx/helpers/matchMedia.js +0 -17
- package/dist/jsx/helpers/matchMedia.native.js +0 -8
- package/dist/jsx/helpers/proxyThemeVariables.js +0 -17
- package/dist/jsx/helpers/themeable.js +0 -24
- package/dist/jsx/helpers/validate.js +0 -75
- package/dist/jsx/helpers/withStaticProperties.js +0 -9
- package/dist/jsx/helpers/wrapThemeManagerContext.js +0 -10
- package/dist/jsx/hooks/useConstant.js +0 -14
- package/dist/jsx/hooks/useFeatures.js +0 -167
- package/dist/jsx/hooks/useId.js +0 -34
- package/dist/jsx/hooks/useIsMounted.js +0 -18
- package/dist/jsx/hooks/useIsTouchDevice.js +0 -16
- package/dist/jsx/hooks/useMedia.js +0 -158
- package/dist/jsx/hooks/usePressable.js +0 -13
- package/dist/jsx/hooks/useTheme.js +0 -177
- package/dist/jsx/hooks/useUnmountEffect.js +0 -10
- package/dist/jsx/index.js +0 -54
- package/dist/jsx/static.js +0 -16
- package/dist/jsx/styled.js +0 -47
- package/dist/jsx/types-rnw.js +0 -0
- package/dist/jsx/types.js +0 -0
- package/dist/jsx/views/Slot.js +0 -56
- package/dist/jsx/views/Stack.js +0 -12
- package/dist/jsx/views/Text.js +0 -61
- package/dist/jsx/views/TextAncestorContext.js +0 -15
- package/dist/jsx/views/Theme.js +0 -31
- package/dist/jsx/views/ThemeInverse.js +0 -22
- package/dist/jsx/views/ThemeProvider.js +0 -35
- package/dist/jsx/views/ThemeReset.js +0 -34
- package/types/helpers/addStylesUsingClassname.d.ts +0 -3
- package/types/helpers/addStylesUsingClassname.d.ts.map +0 -1
- package/types/helpers/fixNativeShadow.native.d.ts +0 -2
- package/types/helpers/fixNativeShadow.native.d.ts.map +0 -1
- package/types/helpers/getButtonSize.d.ts +0 -8
- package/types/helpers/getButtonSize.d.ts.map +0 -1
- package/types/helpers/getTextSize.d.ts +0 -3
- package/types/helpers/getTextSize.d.ts.map +0 -1
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
var _a, _b;
|
|
1
|
+
import { TextAncestorContext as RNWTextAncestorContext } from "@tamagui/rnw";
|
|
4
2
|
import React, { createContext } from "react";
|
|
5
|
-
import { rnw } from "../constants/rnw";
|
|
6
3
|
const FallbackNativeContext = createContext(false);
|
|
7
|
-
const TextAncestorContext =
|
|
8
|
-
const TextAncestorProvider =
|
|
4
|
+
const TextAncestorContext = RNWTextAncestorContext ?? FallbackNativeContext;
|
|
5
|
+
const TextAncestorProvider = (props) => {
|
|
9
6
|
return /* @__PURE__ */ React.createElement(TextAncestorContext.Provider, {
|
|
10
7
|
value: false
|
|
11
8
|
}, props.children);
|
|
12
|
-
}
|
|
9
|
+
};
|
|
13
10
|
export {
|
|
14
11
|
FallbackNativeContext,
|
|
15
12
|
TextAncestorContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/TextAncestorContext.tsx"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { TextAncestorContext as RNWTextAncestorContext } from '@tamagui/rnw'\nimport React, { createContext } from 'react'\n\nexport const FallbackNativeContext = createContext(false)\n\nexport const TextAncestorContext = RNWTextAncestorContext ?? FallbackNativeContext\n\nexport const TextAncestorProvider = (props) => {\n return <TextAncestorContext.Provider value={false}>{props.children}</TextAncestorContext.Provider>\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AACA;AAEO,MAAM,wBAAwB,cAAc,KAAK;AAEjD,MAAM,sBAAsB,0BAA0B;AAEtD,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,26 +1,22 @@
|
|
|
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;
|
|
10
|
+
const contents = useMemo(() => missingTheme ? null : wrapThemeManagerContext(props.children, themeManager), [props.children, themeManager]);
|
|
11
|
+
if (missingTheme) {
|
|
12
12
|
if (name && !theme && process.env.NODE_ENV === "development") {
|
|
13
13
|
console.warn(`No theme found by name ${name}`);
|
|
14
14
|
}
|
|
15
15
|
return props.children;
|
|
16
16
|
}
|
|
17
|
-
const contents = useMemo(() => wrapThemeManagerContext(props.children, themeManager), [props.children, themeManager]);
|
|
18
17
|
if (isWeb) {
|
|
19
18
|
return /* @__PURE__ */ React.createElement("span", {
|
|
20
|
-
className: [
|
|
21
|
-
`tui_Theme`,
|
|
22
|
-
...!props.disableThemeClass ? [props.className, className].filter(Boolean) : []
|
|
23
|
-
].join(" "),
|
|
19
|
+
className: (!props.disableThemeClass ? [props.className, className].filter(Boolean) : []).join(" "),
|
|
24
20
|
style: {
|
|
25
21
|
display: "contents",
|
|
26
22
|
color: (_b = (_a = themes[name]) == null ? void 0 : _a.color) == null ? void 0 : _b.toString()
|
|
@@ -28,7 +24,7 @@ const Theme = memo(/* @__PURE__ */ __name(function Theme2(props) {
|
|
|
28
24
|
}, contents);
|
|
29
25
|
}
|
|
30
26
|
return contents;
|
|
31
|
-
}
|
|
27
|
+
});
|
|
32
28
|
export {
|
|
33
29
|
Theme
|
|
34
30
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Theme.tsx"],
|
|
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 {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import React, { memo, useEffect, useMemo, useRef } 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": "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,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { useIsomorphicLayoutEffect } from "../constants/platform";
|
|
4
3
|
import { useDefaultThemeName, useThemeName } from "../hooks/useTheme";
|
|
5
4
|
import { Theme } from "./Theme";
|
|
6
5
|
let inversions = {
|
|
@@ -10,15 +9,17 @@ let inversions = {
|
|
|
10
9
|
function setThemeInversions(next) {
|
|
11
10
|
inversions = next;
|
|
12
11
|
}
|
|
13
|
-
|
|
14
|
-
const ThemeInverse = /* @__PURE__ */ __name((props) => {
|
|
12
|
+
const ThemeInverse = (props) => {
|
|
15
13
|
const themeName = useThemeName();
|
|
16
14
|
const defaultTheme = useDefaultThemeName();
|
|
17
|
-
const name
|
|
15
|
+
const [name, setName] = useState(null);
|
|
16
|
+
useIsomorphicLayoutEffect(() => {
|
|
17
|
+
setName(inversions[themeName] || inversions[defaultTheme || ""] || null);
|
|
18
|
+
}, [defaultTheme, themeName]);
|
|
18
19
|
return /* @__PURE__ */ React.createElement(Theme, {
|
|
19
20
|
name
|
|
20
21
|
}, props.children);
|
|
21
|
-
}
|
|
22
|
+
};
|
|
22
23
|
export {
|
|
23
24
|
ThemeInverse,
|
|
24
25
|
setThemeInversions
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeInverse.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\n\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 = inversions[themeName] || inversions[defaultTheme || ''] || null\n return <Theme name={name}>{props.children}</Theme>\n}\n"],
|
|
5
|
-
"mappings": "
|
|
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": "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
|
}
|
|
@@ -16,11 +14,12 @@ const ThemeProvider = /* @__PURE__ */ __name((props) => {
|
|
|
16
14
|
return;
|
|
17
15
|
}
|
|
18
16
|
const cn = `${THEME_CLASSNAME_PREFIX}${props.defaultTheme}`;
|
|
19
|
-
document.body
|
|
17
|
+
const target = props.themeClassNameOnRoot ? document.documentElement : document.body;
|
|
18
|
+
target.classList.add(cn);
|
|
20
19
|
return () => {
|
|
21
|
-
|
|
20
|
+
target.classList.remove(cn);
|
|
22
21
|
};
|
|
23
|
-
}, [props.disableRootThemeClass]);
|
|
22
|
+
}, [props.defaultTheme, props.disableRootThemeClass]);
|
|
24
23
|
}
|
|
25
24
|
const themeContext = useMemo(() => {
|
|
26
25
|
return {
|
|
@@ -35,7 +34,7 @@ const ThemeProvider = /* @__PURE__ */ __name((props) => {
|
|
|
35
34
|
name: props.defaultTheme,
|
|
36
35
|
disableThemeClass: props.disableRootThemeClass
|
|
37
36
|
}, props.children));
|
|
38
|
-
}
|
|
37
|
+
};
|
|
39
38
|
export {
|
|
40
39
|
ThemeProvider
|
|
41
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeProvider.tsx"],
|
|
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 children?: any\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 document.body.classList.add(cn)\n return () => {\n
|
|
5
|
-
"mappings": "
|
|
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": "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") {
|
|
@@ -29,9 +27,10 @@ const ThemeReset = /* @__PURE__ */ __name((props) => {
|
|
|
29
27
|
}
|
|
30
28
|
return /* @__PURE__ */ React.createElement(Theme, {
|
|
31
29
|
className: "tui-theme-reset",
|
|
30
|
+
reset: true,
|
|
32
31
|
name
|
|
33
32
|
}, props.children);
|
|
34
|
-
}
|
|
33
|
+
};
|
|
35
34
|
export {
|
|
36
35
|
ThemeReset
|
|
37
36
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeReset.tsx"],
|
|
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\" name={name}>\n {props.children}\n </Theme>\n )\n}\n"],
|
|
5
|
-
"mappings": "
|
|
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": "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/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1-beta.101",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
7
|
-
"
|
|
7
|
+
"types": "./types/index.d.ts",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css"
|
|
10
10
|
],
|
|
@@ -16,13 +16,21 @@
|
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"types",
|
|
19
|
-
"dist"
|
|
19
|
+
"dist",
|
|
20
|
+
"reset.css"
|
|
20
21
|
],
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@
|
|
23
|
+
"@expo/match-media": "^0.3.0",
|
|
24
|
+
"@tamagui/compose-refs": "^1.0.1-beta.101",
|
|
25
|
+
"@tamagui/helpers": "^1.0.1-beta.101",
|
|
23
26
|
"@tamagui/ow": "^0.28.1",
|
|
24
|
-
"@tamagui/
|
|
25
|
-
"@tamagui/use-
|
|
27
|
+
"@tamagui/rnw": "^1.0.1-beta.101",
|
|
28
|
+
"@tamagui/use-debounce": "^1.0.1-beta.101",
|
|
29
|
+
"@tamagui/use-event": "^1.0.1-beta.101",
|
|
30
|
+
"@tamagui/use-force-update": "^1.0.1-beta.101",
|
|
31
|
+
"expo-screen-orientation": "^4.2.0",
|
|
32
|
+
"hyphenate-style-name": "^1.0.4",
|
|
33
|
+
"normalize-css-color": "^1.0.2",
|
|
26
34
|
"react": "*",
|
|
27
35
|
"react-dom": "*"
|
|
28
36
|
},
|
|
@@ -30,12 +38,12 @@
|
|
|
30
38
|
"react-native-web": "*"
|
|
31
39
|
},
|
|
32
40
|
"devDependencies": {
|
|
33
|
-
"@tamagui/build": "^1.0.
|
|
34
|
-
"@types/react": "^
|
|
41
|
+
"@tamagui/build": "^1.0.1-beta.101",
|
|
42
|
+
"@types/react": "^18.0.14",
|
|
35
43
|
"csstype": "^3.0.10",
|
|
36
|
-
"esbuild": "^0.14.
|
|
37
|
-
"react-native-web": "^0.
|
|
38
|
-
"typescript": "^4.
|
|
44
|
+
"esbuild": "^0.14.48",
|
|
45
|
+
"react-native-web": "^0.18.3",
|
|
46
|
+
"typescript": "^4.7.4"
|
|
39
47
|
},
|
|
40
48
|
"publishConfig": {
|
|
41
49
|
"access": "public"
|
package/reset.css
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* mimic the native viewport full width/height + flex */
|
|
2
|
+
body, #root, #__next {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
min-height: 100vh;
|
|
6
|
+
min-width: 100vw;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
* {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
a {
|
|
14
|
+
color: inherit;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
h1, h2, h3, h4, h5, h6 {
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
li, select, input, button, [role="slider"], [role="listbox"] {
|
|
23
|
+
outline: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
p,
|
|
27
|
+
input,
|
|
28
|
+
textarea,
|
|
29
|
+
button,
|
|
30
|
+
ul,
|
|
31
|
+
ol,
|
|
32
|
+
li,
|
|
33
|
+
pre,
|
|
34
|
+
dialog {
|
|
35
|
+
all: unset;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.is_Anchor:has(.is_Button) {
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pressability.d.ts","sourceRoot":"","sources":["../src/Pressability.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,KAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pressability.native.d.ts","sourceRoot":"","sources":["../src/Pressability.native.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,KAAsE,CAAA"}
|
package/types/Tamagui.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Helpers from '@tamagui/helpers';
|
|
2
|
-
import
|
|
2
|
+
import * as rnw from '@tamagui/rnw';
|
|
3
3
|
declare class TamaguiManager {
|
|
4
|
-
rnw:
|
|
4
|
+
rnw: typeof rnw;
|
|
5
5
|
Helpers: typeof Helpers;
|
|
6
|
-
get config(): TamaguiInternalConfig<import("./types").CreateTokens<import("./types").VariableVal>, {
|
|
6
|
+
get config(): import("./types").TamaguiInternalConfig<import("./types").CreateTokens<import("./types").VariableVal>, {
|
|
7
7
|
[key: string]: Partial<import("./types").TamaguiBaseTheme> & {
|
|
8
8
|
[key: string]: import("./types").VariableVal;
|
|
9
9
|
};
|
|
@@ -15,9 +15,7 @@ declare class TamaguiManager {
|
|
|
15
15
|
[key: string]: string | {
|
|
16
16
|
[key: string]: any;
|
|
17
17
|
};
|
|
18
|
-
},
|
|
19
|
-
[key: string]: import("./types").GenericFont<string | number>;
|
|
20
|
-
}>;
|
|
18
|
+
}, import("./types").GenericFonts>;
|
|
21
19
|
get insertedRules(): unknown[];
|
|
22
20
|
get allSelectors(): {};
|
|
23
21
|
get allTransforms(): {};
|
package/types/Tamagui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tamagui.d.ts","sourceRoot":"","sources":["../src/Tamagui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"Tamagui.d.ts","sourceRoot":"","sources":["../src/Tamagui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AAOnC,cAAM,cAAc;IAClB,GAAG,aAAM;IACT,OAAO,iBAAU;IAEjB,IAAI,MAAM;;;;;;;;;;;;uCAET;IAED,IAAI,aAAa,cAEhB;IAED,IAAI,YAAY,OAEf;IAED,IAAI,aAAa,OAEhB;IAED,IAAI,iBAAiB,qBAEpB;CACF;AAED,eAAO,MAAM,OAAO,gBAAuB,CAAA;AAI3C,eAAO,MAAM,sBAAsB,eAAgB,MAAM,QAExD,CAAA;AAED,eAAO,MAAM,kBAAkB,eAAgB,MAAM,SAAS,GAAG,SAEhE,CAAA"}
|
package/types/ThemeContext.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/types/ThemeManager.d.ts
CHANGED
|
@@ -7,25 +7,27 @@ export declare type SetActiveThemeProps = {
|
|
|
7
7
|
name?: string | null;
|
|
8
8
|
theme?: any;
|
|
9
9
|
};
|
|
10
|
+
export declare type GetNextThemeProps = {
|
|
11
|
+
themes?: Themes;
|
|
12
|
+
name?: string | null;
|
|
13
|
+
componentName?: string | null;
|
|
14
|
+
reset?: boolean;
|
|
15
|
+
};
|
|
10
16
|
export declare class ThemeManager {
|
|
11
|
-
#private;
|
|
12
17
|
name: string;
|
|
13
18
|
theme: ThemeObject | null;
|
|
14
19
|
parentManager: ThemeManager | null;
|
|
20
|
+
reset: boolean;
|
|
15
21
|
keys: Map<any, Set<string>>;
|
|
16
22
|
listeners: Map<any, Function>;
|
|
17
23
|
themeListeners: Set<ThemeListener>;
|
|
18
24
|
className: string | null;
|
|
19
|
-
constructor(name?: string, theme?: ThemeObject | null, parentManager?: ThemeManager | null);
|
|
25
|
+
constructor(name?: string, theme?: ThemeObject | null, parentManager?: ThemeManager | null, reset?: boolean);
|
|
20
26
|
get parentName(): string | null;
|
|
21
27
|
get fullName(): string;
|
|
22
28
|
getValue(key: string): import("./types").VariableVal | undefined;
|
|
23
29
|
update({ name, theme, className }?: SetActiveThemeProps): boolean;
|
|
24
|
-
getNextTheme(
|
|
25
|
-
themes?: Themes;
|
|
26
|
-
name?: string | null;
|
|
27
|
-
componentName?: string | null;
|
|
28
|
-
}, props?: any): {
|
|
30
|
+
getNextTheme(props?: GetNextThemeProps, debug?: any): {
|
|
29
31
|
name: string;
|
|
30
32
|
theme: Partial<import("./types").TamaguiBaseTheme> & {
|
|
31
33
|
[key: string]: import("./types").VariableVal;
|
|
@@ -38,6 +40,7 @@ export declare class ThemeManager {
|
|
|
38
40
|
}) | null;
|
|
39
41
|
className?: undefined;
|
|
40
42
|
};
|
|
43
|
+
getClassName(name: string): string;
|
|
41
44
|
track(uuid: any, keys: Set<string>): void;
|
|
42
45
|
notifyListeners(): void;
|
|
43
46
|
onChangeTheme(cb: ThemeListener): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeManager.d.ts","sourceRoot":"","sources":["../src/ThemeManager.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAE7C,aAAK,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,EAAE,YAAY,KAAK,IAAI,CAAA;AAE9E,oBAAY,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,qBAAa,YAAY
|
|
1
|
+
{"version":3,"file":"ThemeManager.d.ts","sourceRoot":"","sources":["../src/ThemeManager.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAE7C,aAAK,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,EAAE,YAAY,KAAK,IAAI,CAAA;AAE9E,oBAAY,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,oBAAY,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,qBAAa,YAAY;IAOd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,WAAW,GAAG,IAAI;IACzB,aAAa,EAAE,YAAY,GAAG,IAAI;IAClC,KAAK,EAAE,OAAO;IATvB,IAAI,wBAA8B;IAClC,SAAS,qBAA2B;IACpC,cAAc,qBAA2B;IACzC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;gBAGtB,IAAI,GAAE,MAAW,EACjB,KAAK,GAAE,WAAW,GAAG,IAAW,EAChC,aAAa,GAAE,YAAY,GAAG,IAAW,EACzC,KAAK,GAAE,OAAe;IAqB/B,IAAI,UAAU,kBAEb;IAED,IAAI,QAAQ,IAAI,MAAM,CAMrB;IAGD,QAAQ,CAAC,GAAG,EAAE,MAAM;IAmBpB,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,GAAE,mBAAwB;IAa3D,YAAY,CAAC,KAAK,GAAE,iBAAsB,EAAE,KAAK,CAAC,EAAE,GAAG;;;;;;;;;;;;;IAoFvD,YAAY,CAAC,IAAI,EAAE,MAAM;IAIzB,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC;IAKlC,eAAe;IAYf,aAAa,CAAC,EAAE,EAAE,aAAa;IAO/B,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,QAAQ;CAOjC;AAED,eAAO,MAAM,mBAAmB,8CAA2C,CAAA;AAC3E,eAAO,MAAM,YAAY,cAAqB,CAAA"}
|
package/types/conf.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConfigListener, TamaguiInternalConfig } from './types';
|
|
2
2
|
export declare const setConfig: (next: TamaguiInternalConfig) => void;
|
|
3
|
+
export declare const setConfigFont: (name: string, font: any, fontParsed: any) => void;
|
|
3
4
|
export declare const getHasConfigured: () => boolean;
|
|
4
5
|
export declare const getConfig: () => TamaguiInternalConfig<import("./types").CreateTokens<import("./types").VariableVal>, {
|
|
5
6
|
[key: string]: Partial<import("./types").TamaguiBaseTheme> & {
|
|
@@ -13,10 +14,8 @@ export declare const getConfig: () => TamaguiInternalConfig<import("./types").Cr
|
|
|
13
14
|
[key: string]: string | {
|
|
14
15
|
[key: string]: any;
|
|
15
16
|
};
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
}>;
|
|
19
|
-
export declare const getTokens: () => import("./types").CreateTokens<import("./createVariable").Variable>;
|
|
17
|
+
}, import("./types").GenericFonts>;
|
|
18
|
+
export declare const getTokens: () => import("./types").CreateTokens<import("./createVariable").Variable<any>>;
|
|
20
19
|
export declare const getThemes: () => {
|
|
21
20
|
[key: string]: Partial<import("./types").TamaguiBaseTheme> & {
|
|
22
21
|
[key: string]: import("./types").VariableVal;
|
package/types/conf.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conf.d.ts","sourceRoot":"","sources":["../src/conf.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conf.d.ts","sourceRoot":"","sources":["../src/conf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAI/D,eAAO,MAAM,SAAS,SAAU,qBAAqB,SAMpD,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,MAAM,QAAQ,GAAG,cAAc,GAAG,SAMrE,CAAA;AAED,eAAO,MAAM,gBAAgB,eAAe,CAAA;AAC5C,eAAO,MAAM,SAAS;;;;;;;;;;;;kCAAc,CAAA;AACpC,eAAO,MAAM,SAAS,gFAA2B,CAAA;AACjD,eAAO,MAAM,SAAS;;;;CAAqB,CAAA;AAE3C,eAAO,MAAM,eAAe,qBAA4B,CAAA;AAExD,eAAO,MAAM,gBAAgB,OAAQ,cAAc,SAMlD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,MAAM,CAAA;AACvC,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,MAAM,CAAA;AACvC,eAAO,MAAM,sBAAsB,OAAO,CAAA;AAE1C,eAAO,MAAM,kBAAkB;;;;;;CAS9B,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useLayoutEffect } from 'react';
|
|
2
2
|
export declare const isAndroid: boolean;
|
|
3
3
|
export declare const isIOS: boolean;
|
|
4
4
|
export declare const isWeb: boolean;
|
|
5
5
|
export declare const isSSR: boolean;
|
|
6
6
|
export declare const isClient: boolean;
|
|
7
|
-
export declare const useIsomorphicLayoutEffect: typeof
|
|
7
|
+
export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
8
8
|
export declare const isChrome: boolean;
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
9
|
+
export declare const isWebTouchable: boolean;
|
|
10
|
+
export declare const isTouchable: boolean;
|
|
11
11
|
export declare const isWebIOS: boolean;
|
|
12
12
|
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/constants/platform.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/constants/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,eAAe,EAAE,MAAM,OAAO,CAAA;AAGlD,eAAO,MAAM,SAAS,SAA6B,CAAA;AACnD,eAAO,MAAM,KAAK,SAAyB,CAAA;AAC3C,eAAO,MAAM,KAAK,SAAuC,CAAA;AACzD,eAAO,MAAM,KAAK,SAAyC,CAAA;AAC3D,eAAO,MAAM,QAAQ,SAAyC,CAAA;AAC9D,eAAO,MAAM,yBAAyB,wBAAmD,CAAA;AACzF,eAAO,MAAM,QAAQ,SAA+E,CAAA;AACpG,eAAO,MAAM,cAAc,SAA4D,CAAA;AACvF,eAAO,MAAM,WAAW,SAA2B,CAAA;AACnD,eAAO,MAAM,QAAQ,SAKA,CAAA"}
|
package/types/constants/rnw.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const rnw:
|
|
1
|
+
export declare const rnw: any;
|
|
2
2
|
//# sourceMappingURL=rnw.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rnw.d.ts","sourceRoot":"","sources":["../../src/constants/rnw.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"rnw.d.ts","sourceRoot":"","sources":["../../src/constants/rnw.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,KAAwB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rnw.native.d.ts","sourceRoot":"","sources":["../../src/constants/rnw.native.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,KAAY,CAAA"}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,19 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { SpaceTokens, StackProps, StaticConfig, StaticConfigParsed, StylableComponent, TamaguiComponent } from './types';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SpaceDirection, SpaceTokens, StackProps, StaticConfig, StaticConfigParsed, StylableComponent, TamaguiComponent, TamaguiElement } from './types';
|
|
4
3
|
export declare const mouseUps: Set<Function>;
|
|
5
|
-
export declare function createComponent<ComponentPropTypes extends Object = {}, Ref =
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
export declare function createComponent<ComponentPropTypes extends Object = {}, Ref = TamaguiElement, BaseProps = never>(configIn: Partial<StaticConfig> | StaticConfigParsed, ParentComponent?: StylableComponent): TamaguiComponent<ComponentPropTypes, Ref, BaseProps, {}>;
|
|
5
|
+
export declare const Unspaced: {
|
|
6
|
+
(props: {
|
|
7
|
+
children?: any;
|
|
8
|
+
}): any;
|
|
9
|
+
isUnspaced: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare type SpacerProps = Omit<StackProps, 'flex' | 'direction' | 'size'> & {
|
|
12
|
+
size?: number | SpaceTokens | null;
|
|
13
|
+
flex?: boolean | number;
|
|
14
|
+
direction?: SpaceDirection;
|
|
15
|
+
};
|
|
16
|
+
export declare const Spacer: TamaguiComponent<SpacerProps, TamaguiElement, never, {}>;
|
|
17
|
+
export declare type SpacedChildrenProps = {
|
|
12
18
|
isZStack?: boolean;
|
|
13
|
-
children
|
|
14
|
-
space?:
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
space?: SpaceTokens | number | null;
|
|
15
21
|
spaceFlex?: boolean | number;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
direction?: SpaceDirection;
|
|
23
|
+
separator?: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export declare function spacedChildren({ isZStack, children, space, direction, spaceFlex, separator, }: SpacedChildrenProps): React.ReactNode;
|
|
26
|
+
export declare function AbsoluteFill(props: {
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
}): JSX.Element;
|
|
29
|
+
export declare function processIDRefList(idRefList: string | Array<string>): string;
|
|
30
|
+
export declare const accessibilityRoleToWebRole: {
|
|
31
|
+
adjustable: string;
|
|
32
|
+
button: string;
|
|
33
|
+
header: string;
|
|
34
|
+
image: string;
|
|
35
|
+
imagebutton: null;
|
|
36
|
+
keyboardkey: null;
|
|
37
|
+
label: null;
|
|
38
|
+
link: string;
|
|
39
|
+
none: string;
|
|
40
|
+
search: string;
|
|
41
|
+
summary: string;
|
|
42
|
+
text: null;
|
|
43
|
+
};
|
|
19
44
|
//# sourceMappingURL=createComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAQA,OAAO,KAWN,MAAM,OAAO,CAAA;AAqBd,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAGhB,cAAc,EAGf,MAAM,SAAS,CAAA;AAgBhB,eAAO,MAAM,QAAQ,eAAsB,CAAA;AA0B3C,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,GAAG,EAAE,EACtC,GAAG,GAAG,cAAc,EACpB,SAAS,GAAG,KAAK,EACjB,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,kBAAkB,EAAE,eAAe,CAAC,EAAE,iBAAiB,4DA+6B1F;AAGD,eAAO,MAAM,QAAQ;YAAW;QAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAE;;CAEjD,CAAA;AAMD,oBAAY,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC,GAAG;IAC1E,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAA;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,cAAc,CAAA;CAC3B,CAAA;AACD,eAAO,MAAM,MAAM,0DA4CjB,CAAA;AAEF,oBAAY,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC5B,CAAA;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,GACV,EAAE,mBAAmB,mBA6ErB;AAsBD,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAMjE;AASD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAE1E;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;CAatC,CAAA"}
|
package/types/createFont.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|