@tamagui/core 1.0.0-beta.187 → 1.0.0-beta.2
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 +18 -1
- package/dist/cjs/Tamagui.js.map +2 -2
- package/dist/cjs/ThemeContext.js +4 -0
- package/dist/cjs/ThemeManager.js +30 -14
- package/dist/cjs/ThemeManager.js.map +2 -2
- package/dist/cjs/conf.js +10 -1
- package/dist/cjs/conf.js.map +2 -2
- package/dist/cjs/constants/constants.js +6 -0
- package/dist/cjs/constants/platform.js +15 -0
- package/dist/cjs/constants/platform.js.map +2 -2
- package/dist/cjs/constants/rnw.js +4 -0
- package/dist/cjs/contexts/ButtonInsideButtonContext.js +4 -0
- package/dist/cjs/createComponent.js +156 -130
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createFont.js +4 -0
- package/dist/cjs/createShorthands.js +4 -0
- package/dist/cjs/createTamagui.js +56 -27
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createTheme.js +4 -0
- package/dist/cjs/createTokens.js +7 -6
- package/dist/cjs/createTokens.js.map +2 -2
- package/dist/cjs/createVariable.js +18 -2
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/defaultComponentState.js +0 -30
- package/dist/cjs/defaultComponentState.js.map +3 -3
- package/dist/cjs/helpers/RNComponents.js +38 -0
- package/dist/cjs/helpers/RNComponents.js.map +7 -0
- package/dist/cjs/helpers/addStylesUsingClassname.js +19 -16
- package/dist/cjs/helpers/addStylesUsingClassname.js.map +2 -2
- package/dist/cjs/helpers/areEqualSets.js +4 -0
- package/dist/cjs/helpers/createMediaStyle.js +5 -0
- package/dist/cjs/helpers/createPropMapper.js +63 -61
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/createShallowUpdate.js +55 -0
- package/dist/cjs/helpers/createShallowUpdate.js.map +7 -0
- package/dist/cjs/helpers/createTamaguiProvider.js +5 -5
- package/dist/cjs/helpers/createTamaguiProvider.js.map +2 -2
- package/dist/cjs/helpers/extendStaticConfig.js +9 -6
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/fixNativeShadow.js +4 -0
- package/dist/cjs/helpers/fixNativeShadow.native.js +6 -2
- package/dist/cjs/helpers/fixNativeShadow.native.js.map +2 -2
- package/dist/cjs/helpers/getExpandedShorthands.js +4 -0
- package/dist/cjs/helpers/getSize.js +35 -0
- package/dist/cjs/helpers/getSize.js.map +7 -0
- package/dist/cjs/helpers/getSplitStyles.js +152 -64
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.js +20 -2
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.native.js +4 -0
- package/dist/cjs/helpers/insertStyleRule.js +46 -26
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/isObj.js +4 -0
- package/dist/cjs/helpers/isTamaguiElement.js +4 -0
- package/dist/cjs/helpers/matchMedia.js +4 -0
- package/dist/cjs/helpers/matchMedia.native.js +4 -0
- package/dist/cjs/helpers/proxyThemeVariables.js +40 -0
- package/dist/cjs/helpers/proxyThemeVariables.js.map +7 -0
- package/dist/cjs/helpers/themeable.js +7 -2
- package/dist/cjs/helpers/themeable.js.map +2 -2
- package/dist/cjs/helpers/validate.js +53 -11
- package/dist/cjs/helpers/validate.js.map +2 -2
- package/dist/cjs/helpers/withStaticProperties.js +4 -0
- package/dist/cjs/helpers/wrapThemeManagerContext.js +4 -0
- package/dist/cjs/hooks/useConstant.js +4 -0
- package/dist/cjs/hooks/useFeatures.js +101 -12
- package/dist/cjs/hooks/useFeatures.js.map +2 -2
- package/dist/cjs/hooks/useIsMounted.js +4 -0
- package/dist/cjs/hooks/useIsTouchDevice.js +8 -4
- package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/cjs/hooks/useMedia.js +30 -12
- package/dist/cjs/hooks/useMedia.js.map +2 -2
- package/dist/cjs/hooks/usePressable.js +4 -0
- package/dist/cjs/hooks/useTheme.js +36 -23
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/cjs/hooks/useUnmountEffect.js +4 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/static.js +3 -0
- package/dist/cjs/static.js.map +2 -2
- package/dist/cjs/styled.js +8 -15
- 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/Stack.js +5 -0
- package/dist/cjs/views/Stack.js.map +2 -2
- package/dist/cjs/views/Text.js +5 -0
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/cjs/views/TextAncestorContext.js +6 -0
- package/dist/cjs/views/Theme.js +11 -4
- package/dist/cjs/views/Theme.js.map +2 -2
- package/dist/cjs/views/ThemeInverse.js +5 -0
- package/dist/cjs/views/ThemeProvider.js +6 -1
- package/dist/cjs/views/ThemeProvider.js.map +2 -2
- package/dist/cjs/views/ThemeReset.js +4 -0
- package/dist/esm/Tamagui.js +10 -2
- package/dist/esm/Tamagui.js.map +2 -2
- package/dist/esm/ThemeManager.js +21 -11
- package/dist/esm/ThemeManager.js.map +2 -2
- package/dist/esm/conf.js +0 -1
- package/dist/esm/conf.js.map +2 -2
- package/dist/esm/constants/platform.js +2 -0
- package/dist/esm/constants/platform.js.map +2 -2
- package/dist/esm/createComponent.js +146 -133
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createTamagui.js +53 -28
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createTokens.js +2 -6
- package/dist/esm/createTokens.js.map +2 -2
- package/dist/esm/createVariable.js +8 -2
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/defaultComponentState.js +0 -11
- package/dist/esm/defaultComponentState.js.map +3 -3
- package/dist/esm/helpers/RNComponents.js +12 -0
- package/dist/esm/helpers/RNComponents.js.map +7 -0
- package/dist/esm/helpers/addStylesUsingClassname.js +16 -18
- package/dist/esm/helpers/addStylesUsingClassname.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +59 -61
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/createShallowUpdate.js +19 -0
- package/dist/esm/helpers/createShallowUpdate.js.map +7 -0
- package/dist/esm/helpers/createTamaguiProvider.js +1 -4
- package/dist/esm/helpers/createTamaguiProvider.js.map +2 -2
- package/dist/esm/helpers/extendStaticConfig.js +9 -6
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/fixNativeShadow.native.js +2 -2
- package/dist/esm/helpers/fixNativeShadow.native.js.map +2 -2
- package/dist/esm/helpers/getSize.js +13 -0
- package/dist/esm/helpers/getSize.js.map +7 -0
- package/dist/esm/helpers/getSplitStyles.js +152 -67
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.js +15 -2
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +36 -26
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/proxyThemeVariables.js +18 -0
- package/dist/esm/helpers/proxyThemeVariables.js.map +7 -0
- package/dist/esm/helpers/themeable.js +3 -2
- package/dist/esm/helpers/themeable.js.map +2 -2
- package/dist/esm/helpers/validate.js +24 -11
- package/dist/esm/helpers/validate.js.map +2 -2
- package/dist/esm/hooks/useFeatures.js +96 -17
- package/dist/esm/hooks/useFeatures.js.map +2 -2
- package/dist/esm/hooks/useIsTouchDevice.js +6 -6
- package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/esm/hooks/useMedia.js +19 -12
- package/dist/esm/hooks/useMedia.js.map +2 -2
- package/dist/esm/hooks/useTheme.js +28 -23
- package/dist/esm/hooks/useTheme.js.map +2 -2
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/static.js +3 -0
- package/dist/esm/static.js.map +2 -2
- package/dist/esm/styled.js +4 -12
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/views/Stack.js +1 -0
- package/dist/esm/views/Stack.js.map +2 -2
- package/dist/esm/views/Text.js +1 -0
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/esm/views/Theme.js +7 -4
- package/dist/esm/views/Theme.js.map +2 -2
- package/dist/esm/views/ThemeProvider.js +2 -1
- package/dist/esm/views/ThemeProvider.js.map +2 -2
- package/dist/jsx/Tamagui.js +10 -2
- package/dist/jsx/ThemeManager.js +21 -11
- package/dist/jsx/conf.js +0 -1
- package/dist/jsx/constants/platform.js +2 -0
- package/dist/jsx/createComponent.js +139 -127
- package/dist/jsx/createTamagui.js +53 -28
- package/dist/jsx/createTokens.js +2 -6
- package/dist/jsx/createVariable.js +8 -2
- package/dist/jsx/defaultComponentState.js +0 -11
- package/dist/jsx/helpers/RNComponents.js +11 -0
- package/dist/jsx/helpers/addStylesUsingClassname.js +16 -18
- package/dist/jsx/helpers/createPropMapper.js +59 -61
- package/dist/jsx/helpers/createShallowUpdate.js +18 -0
- package/dist/jsx/helpers/createTamaguiProvider.js +1 -2
- package/dist/jsx/helpers/extendStaticConfig.js +9 -6
- package/dist/jsx/helpers/fixNativeShadow.native.js +2 -2
- package/dist/jsx/helpers/getSize.js +12 -0
- package/dist/jsx/helpers/getSplitStyles.js +152 -67
- package/dist/jsx/helpers/getStylesAtomic.js +15 -2
- package/dist/jsx/helpers/insertStyleRule.js +36 -26
- package/dist/jsx/helpers/proxyThemeVariables.js +17 -0
- package/dist/jsx/helpers/themeable.js +3 -3
- package/dist/jsx/helpers/validate.js +24 -11
- package/dist/jsx/hooks/useFeatures.js +96 -17
- package/dist/jsx/hooks/useIsTouchDevice.js +6 -6
- package/dist/jsx/hooks/useMedia.js +19 -12
- package/dist/jsx/hooks/useTheme.js +28 -23
- package/dist/jsx/index.js +4 -0
- package/dist/jsx/static.js +3 -0
- package/dist/jsx/styled.js +4 -12
- package/dist/jsx/views/Stack.js +1 -0
- package/dist/jsx/views/Text.js +1 -0
- package/dist/jsx/views/Theme.js +7 -4
- package/dist/jsx/views/ThemeProvider.js +2 -2
- package/package.json +6 -6
- package/types/Tamagui.d.ts +18 -1
- package/types/Tamagui.d.ts.map +1 -1
- package/types/ThemeManager.d.ts +3 -3
- package/types/ThemeManager.d.ts.map +1 -1
- package/types/conf.d.ts +2 -0
- package/types/conf.d.ts.map +1 -1
- package/types/constants/platform.d.ts +1 -0
- package/types/constants/platform.d.ts.map +1 -1
- package/types/createComponent.d.ts +5 -7
- package/types/createComponent.d.ts.map +1 -1
- package/types/createFont.d.ts +1 -1
- package/types/createFont.d.ts.map +1 -1
- package/types/createTamagui.d.ts +3 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/createTokens.d.ts +0 -26
- package/types/createTokens.d.ts.map +1 -1
- package/types/createVariable.d.ts +1 -0
- package/types/createVariable.d.ts.map +1 -1
- package/types/defaultComponentState.d.ts +0 -12
- package/types/defaultComponentState.d.ts.map +1 -1
- package/types/helpers/RNComponents.d.ts +2 -0
- package/types/helpers/RNComponents.d.ts.map +1 -0
- package/types/helpers/addStylesUsingClassname.d.ts.map +1 -1
- package/types/helpers/createPropMapper.d.ts +2 -2
- package/types/helpers/createPropMapper.d.ts.map +1 -1
- package/types/helpers/createShallowUpdate.d.ts +4 -0
- package/types/helpers/createShallowUpdate.d.ts.map +1 -0
- package/types/helpers/createTamaguiProvider.d.ts +1 -1
- package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
- package/types/helpers/extendStaticConfig.d.ts +2 -2
- package/types/helpers/extendStaticConfig.d.ts.map +1 -1
- package/types/helpers/getSize.d.ts +3 -0
- package/types/helpers/getSize.d.ts.map +1 -0
- package/types/helpers/getSplitStyles.d.ts +15 -18
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts +2 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/proxyThemeVariables.d.ts +2 -0
- package/types/helpers/proxyThemeVariables.d.ts.map +1 -0
- package/types/helpers/themeable.d.ts +3 -1
- package/types/helpers/themeable.d.ts.map +1 -1
- package/types/helpers/validate.d.ts.map +1 -1
- package/types/hooks/useFeatures.d.ts +7 -5
- package/types/hooks/useFeatures.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +2 -6
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
- package/types/static.d.ts +3 -0
- package/types/static.d.ts.map +1 -1
- package/types/styled.d.ts +13 -8
- package/types/styled.d.ts.map +1 -1
- package/types/types-rnw.d.ts +0 -5
- package/types/types-rnw.d.ts.map +1 -1
- package/types/types.d.ts +147 -106
- package/types/types.d.ts.map +1 -1
- package/types/views/Stack.d.ts +2 -2
- package/types/views/Stack.d.ts.map +1 -1
- package/types/views/Text.d.ts +2 -2
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts +1 -0
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeProvider.d.ts +1 -0
- package/types/views/ThemeProvider.d.ts.map +1 -1
- package/LICENSE +0 -21
- package/dist/cjs/spacedChildren.js +0 -86
- package/dist/cjs/spacedChildren.js.map +0 -7
- package/dist/esm/spacedChildren.js +0 -52
- package/dist/esm/spacedChildren.js.map +0 -7
- package/dist/jsx/spacedChildren.js +0 -44
- package/types/spacedChildren.d.ts +0 -9
- package/types/spacedChildren.d.ts.map +0 -1
package/types/index.d.ts
CHANGED
|
@@ -8,11 +8,13 @@ export { createTokens } from './createTokens';
|
|
|
8
8
|
export * from './createVariable';
|
|
9
9
|
export * from './styled';
|
|
10
10
|
export * from './types';
|
|
11
|
+
export { RNWTextProps, RNWViewProps } from './types-rnw';
|
|
11
12
|
export { getHasConfigured, getConfig, getThemes, getTokens, onConfiguredOnce } from './conf';
|
|
12
13
|
export * from './constants/constants';
|
|
13
14
|
export * from './constants/platform';
|
|
14
15
|
export * from './constants/rnw';
|
|
15
16
|
export * from './helpers/getExpandedShorthands';
|
|
17
|
+
export * from './helpers/getSize';
|
|
16
18
|
export * from './helpers/getSplitStyles';
|
|
17
19
|
export * from './helpers/getStylesAtomic';
|
|
18
20
|
export * from './helpers/isObj';
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAE5F,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,iCAAiC,CAAA;AAC/C,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gCAAgC,CAAA;AAE9C,cAAc,sCAAsC,CAAA;AAEpD,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AAEzC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAE3C,cAAc,kBAAkB,CAAA"}
|
package/types/static.d.ts
CHANGED
|
@@ -3,12 +3,15 @@ export * from './createComponent';
|
|
|
3
3
|
export * from './createFont';
|
|
4
4
|
export * from './createTokens';
|
|
5
5
|
export * from './createTamagui';
|
|
6
|
+
export * from './createVariable';
|
|
6
7
|
export * from './constants/constants';
|
|
7
8
|
export * from './hooks/useMedia';
|
|
8
9
|
export * from './hooks/useTheme';
|
|
9
10
|
export * from './helpers/isObj';
|
|
10
11
|
export * from './helpers/getStylesAtomic';
|
|
12
|
+
export * from './helpers/proxyThemeVariables';
|
|
11
13
|
export * from './helpers/getSplitStyles';
|
|
12
14
|
export * from '@tamagui/helpers';
|
|
13
15
|
export * from './constants/rnw';
|
|
16
|
+
export * from './types';
|
|
14
17
|
//# sourceMappingURL=static.d.ts.map
|
package/types/static.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AAErC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AAErC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,SAAS,CAAA"}
|
package/types/styled.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { GetProps,
|
|
2
|
-
export declare
|
|
1
|
+
import { GetProps, GetVariantValues, MediaProps, PseudoProps, StaticConfig, StylableComponent, TamaguiComponent, VariantDefinitions, VariantSpreadFunction } from './types';
|
|
2
|
+
export declare type StyledOptions<ParentComponent extends StylableComponent> = GetProps<ParentComponent> & {
|
|
3
|
+
name?: string;
|
|
4
|
+
variants?: VariantDefinitions<ParentComponent> | undefined;
|
|
5
|
+
defaultVariants?: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare function styled<ParentComponent extends StylableComponent, Variants extends VariantDefinitions<ParentComponent> | symbol = VariantDefinitions<ParentComponent> | symbol>(Component: ParentComponent, options?: GetProps<ParentComponent> & {
|
|
3
10
|
name?: string;
|
|
4
11
|
variants?: Variants | undefined;
|
|
5
|
-
defaultVariants?:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} : never;
|
|
10
|
-
export {};
|
|
12
|
+
defaultVariants?: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
}, staticExtractionOptions?: Partial<StaticConfig>): TamaguiComponent<Variants extends symbol | void ? GetProps<ParentComponent> : (ParentComponent extends TamaguiComponent<any, any, infer P, {}> ? P : GetProps<ParentComponent>) & Omit<ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : {}, keyof (Variants extends symbol ? {} : { [Key in keyof Variants]?: (Variants[Key] extends VariantSpreadFunction<any, infer Val> ? Val : GetVariantValues<keyof Variants[Key]>) | undefined; })> & (Variants extends symbol ? {} : { [Key in keyof Variants]?: (Variants[Key] extends VariantSpreadFunction<any, infer Val> ? Val : GetVariantValues<keyof Variants[Key]>) | undefined; }) & MediaProps<Partial<(ParentComponent extends TamaguiComponent<any, any, infer P, {}> ? P : GetProps<ParentComponent>) & Omit<ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : {}, keyof (Variants extends symbol ? {} : { [Key in keyof Variants]?: (Variants[Key] extends VariantSpreadFunction<any, infer Val> ? Val : GetVariantValues<keyof Variants[Key]>) | undefined; })> & (Variants extends symbol ? {} : { [Key in keyof Variants]?: (Variants[Key] extends VariantSpreadFunction<any, infer Val> ? Val : GetVariantValues<keyof Variants[Key]>) | undefined; })>> & PseudoProps<Partial<(ParentComponent extends TamaguiComponent<any, any, infer P, {}> ? P : GetProps<ParentComponent>) & Omit<ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : {}, keyof (Variants extends symbol ? {} : { [Key in keyof Variants]?: (Variants[Key] extends VariantSpreadFunction<any, infer Val> ? Val : GetVariantValues<keyof Variants[Key]>) | undefined; })> & (Variants extends symbol ? {} : { [Key in keyof Variants]?: (Variants[Key] extends VariantSpreadFunction<any, infer Val> ? Val : GetVariantValues<keyof Variants[Key]>) | undefined; })>>, any, ParentComponent extends TamaguiComponent<any, any, infer P, {}> ? P : GetProps<ParentComponent>, (ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : {}) & (Variants extends symbol ? {} : { [Key in keyof Variants]?: (Variants[Key] extends VariantSpreadFunction<any, infer Val> ? Val : GetVariantValues<keyof Variants[Key]>) | undefined; })>;
|
|
11
16
|
//# sourceMappingURL=styled.d.ts.map
|
package/types/styled.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAGhB,oBAAY,aAAa,CAAC,eAAe,SAAS,iBAAiB,IAAI,QAAQ,CAAC,eAAe,CAAC,GAAG;IACjG,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;IAC1D,eAAe,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;CACzC,CAAA;AAED,wBAAgB,MAAM,CACpB,eAAe,SAAS,iBAAiB,EACzC,QAAQ,SAAS,kBAAkB,CAAC,eAAe,CAAC,GAAG,MAAM,GACzD,kBAAkB,CAAC,eAAe,CAAC,GACnC,MAAM,EAEV,SAAS,EAAE,eAAe,EAE1B,OAAO,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAE/B,eAAe,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;CACzC,EACD,uBAAuB,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,qnEA0EhD"}
|
package/types/types-rnw.d.ts
CHANGED
|
@@ -42,11 +42,6 @@ export interface RNWTextProps {
|
|
|
42
42
|
selected?: boolean;
|
|
43
43
|
};
|
|
44
44
|
href?: string;
|
|
45
|
-
hrefAttrs?: {
|
|
46
|
-
target?: '_blank' | '_self' | '_top' | 'blank' | 'self' | 'top';
|
|
47
|
-
rel?: string;
|
|
48
|
-
download?: boolean;
|
|
49
|
-
};
|
|
50
45
|
onMouseEnter?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
51
46
|
onMouseLeave?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
52
47
|
onFocus?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
package/types/types-rnw.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-rnw.d.ts","sourceRoot":"","sources":["../src/types-rnw.tsx"],"names":[],"mappings":";AAEA,aAAK,cAAc,GACf,OAAO,GACP,YAAY,GACZ,MAAM,GACN,MAAM,GACN,cAAc,GACd,MAAM,GACN,WAAW,GACX,SAAS,GACT,MAAM,GACN,UAAU,GACV,MAAM,GACN,SAAS,GACT,UAAU,GACV,MAAM,GACN,MAAM,GACN,eAAe,GACf,MAAM,GACN,MAAM,GACN,SAAS,GACT,aAA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"version":3,"file":"types-rnw.d.ts","sourceRoot":"","sources":["../src/types-rnw.tsx"],"names":[],"mappings":";AAEA,aAAK,cAAc,GACf,OAAO,GACP,YAAY,GACZ,MAAM,GACN,MAAM,GACN,cAAc,GACd,MAAM,GACN,WAAW,GACX,SAAS,GACT,MAAM,GACN,UAAU,GACV,MAAM,GACN,SAAS,GACT,UAAU,GACV,MAAM,GACN,MAAM,GACN,eAAe,GACf,MAAM,GACN,MAAM,GACN,SAAS,GACT,aAAa,GACb,SAAS,GACT,UAAU,GACV,YAAY,GACZ,UAAU,GACV,WAAW,GACX,UAAU,GACV,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,GACV,aAAa,GACb,aAAa,CAAA;AAOjB,aAAK,uBAAuB,GACxB,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,MAAM,GACN,eAAe,GACf,aAAa,GACb,UAAU,GACV,UAAU,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,OAAO,GACP,aAAa,GACb,WAAW,GACX,aAAa,GACb,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,GACV,MAAM,GACN,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,CAAA;AAOV,MAAM,WAAW,YAAY;IAE3B,OAAO,CAAC,EAAE,GAAG,CAAA;IAGb,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,QAAQ,CAAC,EAAE,GAAG,CAAA;IAEd,iBAAiB,CAAC,EAAE,uBAAuB,CAAA;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE;QACV,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAA;QAC/D,GAAG,CAAC,EAA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AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,MAAM,CAAA;CAC1C;AAED,MAAM,WAAW,YAAY;IAG3B,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;CAC1D"}
|
package/types/types.d.ts
CHANGED
|
@@ -11,9 +11,6 @@ export declare type VariableVal = number | string | Variable;
|
|
|
11
11
|
export declare type VariableColorVal = string | Variable;
|
|
12
12
|
declare type GenericKey = string | number | symbol;
|
|
13
13
|
export interface CreateTokens<Val extends VariableVal = VariableVal> {
|
|
14
|
-
font: {
|
|
15
|
-
[key: GenericKey]: GenericFont;
|
|
16
|
-
};
|
|
17
14
|
color: {
|
|
18
15
|
[key: GenericKey]: Val;
|
|
19
16
|
};
|
|
@@ -60,6 +57,9 @@ declare type GenericMedia<K extends string = string> = {
|
|
|
60
57
|
[key: string]: number | string;
|
|
61
58
|
};
|
|
62
59
|
};
|
|
60
|
+
declare type GenericFonts = {
|
|
61
|
+
[key: string]: GenericFont;
|
|
62
|
+
};
|
|
63
63
|
declare type GenericAnimations = {
|
|
64
64
|
[key: string]: string | {
|
|
65
65
|
[key: string]: any;
|
|
@@ -69,14 +69,15 @@ export interface TamaguiCustomConfig {
|
|
|
69
69
|
}
|
|
70
70
|
export interface TamaguiConfig extends Omit<GenericTamaguiConfig, keyof TamaguiCustomConfig>, TamaguiCustomConfig {
|
|
71
71
|
}
|
|
72
|
-
export declare type CreateTamaguiConfig<A extends GenericTokens, B extends GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations> = Partial<Pick<ThemeProviderProps, 'defaultTheme' | 'disableRootThemeClass'>> & {
|
|
72
|
+
export declare type CreateTamaguiConfig<A extends GenericTokens, B extends GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts> = Partial<Pick<ThemeProviderProps, 'defaultTheme' | 'disableRootThemeClass'>> & {
|
|
73
|
+
fonts: F;
|
|
73
74
|
tokens: A;
|
|
74
75
|
themes: B;
|
|
75
76
|
shorthands: C;
|
|
76
77
|
media: D;
|
|
77
78
|
animations: AnimationDriver<E>;
|
|
78
79
|
};
|
|
79
|
-
export declare type GenericTamaguiConfig = CreateTamaguiConfig<GenericTokens, GenericThemes, GenericShorthands, GenericMedia, GenericAnimations>;
|
|
80
|
+
export declare type GenericTamaguiConfig = CreateTamaguiConfig<GenericTokens, GenericThemes, GenericShorthands, GenericMedia, GenericAnimations, GenericFonts>;
|
|
80
81
|
export declare type ThemeObject = TamaguiConfig['themes'][keyof TamaguiConfig['themes']];
|
|
81
82
|
export declare type Tokens = TamaguiConfig['tokens'];
|
|
82
83
|
export declare type Shorthands = TamaguiConfig['shorthands'];
|
|
@@ -85,43 +86,53 @@ export declare type Themes = TamaguiConfig['themes'];
|
|
|
85
86
|
export declare type ThemeName = GetAltThemeNames<keyof Themes>;
|
|
86
87
|
export declare type ThemeKeys = keyof ThemeObject;
|
|
87
88
|
export declare type ThemeTokens = `$${ThemeKeys}`;
|
|
88
|
-
export declare type AnimationKeys = GetAnimationKeys<TamaguiConfig
|
|
89
|
+
export declare type AnimationKeys = GetAnimationKeys<TamaguiConfig>;
|
|
89
90
|
declare type GetAltThemeNames<S> = (S extends `${string}_${infer Alt}` ? GetAltThemeNames<Alt> : S) | S;
|
|
90
|
-
export declare type TamaguiInternalConfig<A extends GenericTokens = GenericTokens, B extends GenericThemes = GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations> = CreateTamaguiConfig<A, B, C, D, E> & {
|
|
91
|
+
export declare type TamaguiInternalConfig<A extends GenericTokens = GenericTokens, B extends GenericThemes = GenericThemes, C extends GenericShorthands = GenericShorthands, D extends GenericMedia = GenericMedia, E extends GenericAnimations = GenericAnimations, F extends GenericFonts = GenericFonts> = CreateTamaguiConfig<A, B, C, D, E, F> & {
|
|
91
92
|
Provider: (props: TamaguiProviderProps) => any;
|
|
92
93
|
tokensParsed: CreateTokens<Variable>;
|
|
93
94
|
themeConfig: any;
|
|
95
|
+
fontsParsed: GenericFonts;
|
|
94
96
|
getCSS: () => string;
|
|
95
97
|
parsed: boolean;
|
|
96
98
|
};
|
|
97
99
|
export declare type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']['animations'];
|
|
98
100
|
export declare type UnionableString = string & {};
|
|
99
101
|
export declare type UnionableNumber = number & {};
|
|
100
|
-
export declare type PropTypes<A extends
|
|
101
|
-
export declare type GenericFont = {
|
|
102
|
+
export declare type PropTypes<A extends TamaguiComponent> = A extends React.FunctionComponent<infer Props> ? Props : unknown;
|
|
103
|
+
export declare type GenericFont<Key extends number | string = number | string> = {
|
|
102
104
|
size: {
|
|
103
|
-
[key
|
|
104
|
-
};
|
|
105
|
-
lineHeight: {
|
|
106
|
-
[key: string | number]: number | Variable;
|
|
107
|
-
};
|
|
108
|
-
letterSpacing: {
|
|
109
|
-
[key: string | number]: number | Variable;
|
|
110
|
-
};
|
|
111
|
-
weight: {
|
|
112
|
-
[key: string | number]: number | string | Variable;
|
|
105
|
+
[key in Key]: number | Variable;
|
|
113
106
|
};
|
|
107
|
+
lineHeight: Partial<{
|
|
108
|
+
[key in Key]: number | Variable;
|
|
109
|
+
}>;
|
|
110
|
+
letterSpacing: Partial<{
|
|
111
|
+
[key in Key]: number | Variable;
|
|
112
|
+
}>;
|
|
113
|
+
weight: Partial<{
|
|
114
|
+
[key in Key]: number | string | Variable;
|
|
115
|
+
}>;
|
|
114
116
|
family: string | Variable;
|
|
117
|
+
style?: Partial<{
|
|
118
|
+
[key in Key]: TextStyle['fontStyle'] | Variable;
|
|
119
|
+
}>;
|
|
120
|
+
transform?: Partial<{
|
|
121
|
+
[key in Key]: TextStyle['textTransform'] | Variable;
|
|
122
|
+
}>;
|
|
123
|
+
color?: Partial<{
|
|
124
|
+
[key in Key]: string | Variable;
|
|
125
|
+
}>;
|
|
115
126
|
};
|
|
116
127
|
export declare type MediaKeys = keyof Media;
|
|
117
128
|
export declare type MediaQueryObject = {
|
|
118
129
|
[key: string]: string | number | string;
|
|
119
130
|
};
|
|
120
|
-
export declare type MediaQueryState = {
|
|
121
|
-
[key in string]: boolean;
|
|
122
|
-
};
|
|
123
131
|
export declare type MediaQueryKey = keyof Media;
|
|
124
132
|
export declare type MediaPropKeys = `$${MediaQueryKey}`;
|
|
133
|
+
export declare type MediaQueryState = {
|
|
134
|
+
[key in MediaPropKeys]: boolean;
|
|
135
|
+
};
|
|
125
136
|
export declare type MediaProps<A> = {
|
|
126
137
|
[key in MediaPropKeys]?: A;
|
|
127
138
|
};
|
|
@@ -147,8 +158,14 @@ export declare type TransformStyleProps = {
|
|
|
147
158
|
rotateX?: string;
|
|
148
159
|
rotateZ?: string;
|
|
149
160
|
};
|
|
150
|
-
declare type
|
|
151
|
-
|
|
161
|
+
export declare type TamaguiComponentPropsBase = {
|
|
162
|
+
space?: SpaceTokens;
|
|
163
|
+
dangerouslySetInnerHTML?: {
|
|
164
|
+
__html: string;
|
|
165
|
+
};
|
|
166
|
+
animation?: AnimationKeys;
|
|
167
|
+
animateOnly?: string[];
|
|
168
|
+
children?: any | any[];
|
|
152
169
|
debug?: boolean | 'break' | 'verbose';
|
|
153
170
|
disabled?: boolean;
|
|
154
171
|
className?: string;
|
|
@@ -160,22 +177,32 @@ declare type ComponentPropsBase = Something<{
|
|
|
160
177
|
onPress?: (e: GestureResponderEvent) => any;
|
|
161
178
|
onPressIn?: (e: GestureResponderEvent) => any;
|
|
162
179
|
onPressOut?: (e: GestureResponderEvent) => any;
|
|
163
|
-
onMouseEnter?: (e:
|
|
164
|
-
onMouseLeave?: (e:
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
declare type GetTokenFontKeysFor<A extends 'size' | 'weight' | 'letterSpacing' | 'family' | 'lineHeight'> = keyof
|
|
180
|
+
onMouseEnter?: (e: MouseEvent) => any;
|
|
181
|
+
onMouseLeave?: (e: MouseEvent) => any;
|
|
182
|
+
onMouseDown?: (e: MouseEvent) => any;
|
|
183
|
+
};
|
|
184
|
+
declare type GetTokenFontKeysFor<A extends 'size' | 'weight' | 'letterSpacing' | 'family' | 'lineHeight' | 'transform' | 'style' | 'color'> = keyof TamaguiConfig['fonts'][keyof TamaguiConfig['fonts']][A];
|
|
168
185
|
declare type GetTokenString<A> = A extends string | number ? `$${A}` : `$${string}`;
|
|
169
186
|
export declare type SizeTokens = GetTokenString<keyof Tokens['size']> | number;
|
|
170
|
-
export declare type FontTokens = GetTokenString<keyof Tokens['font']>;
|
|
171
|
-
export declare type FontSizeTokens = `$${GetTokenFontKeysFor<'size'>}` | number;
|
|
172
|
-
export declare type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}` | number;
|
|
173
|
-
export declare type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}` | `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`;
|
|
174
|
-
export declare type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}` | number;
|
|
175
187
|
export declare type SpaceTokens = GetTokenString<keyof Tokens['space']> | number | boolean;
|
|
176
188
|
export declare type ColorTokens = GetTokenString<keyof Tokens['color']> | GetTokenString<keyof ThemeObject> | CSSColorNames;
|
|
177
189
|
export declare type ZIndexTokens = GetTokenString<keyof Tokens['zIndex']> | number;
|
|
190
|
+
export declare type RadiusTokens = GetTokenString<keyof Tokens['radius']> | number;
|
|
191
|
+
export declare type FontTokens = GetTokenString<keyof TamaguiConfig['fonts']>;
|
|
192
|
+
export declare type FontSizeTokens = GetTokenString<GetTokenFontKeysFor<'size'>> | number;
|
|
193
|
+
export declare type FontLineHeightTokens = `$${GetTokenFontKeysFor<'lineHeight'>}` | number;
|
|
194
|
+
export declare type FontWeightTokens = `$${GetTokenFontKeysFor<'weight'>}` | `${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00`;
|
|
195
|
+
export declare type FontColorTokens = `$${GetTokenFontKeysFor<'color'>}` | number;
|
|
196
|
+
export declare type FontLetterSpacingTokens = `$${GetTokenFontKeysFor<'letterSpacing'>}` | number;
|
|
197
|
+
export declare type FontStyleTokens = `$${GetTokenFontKeysFor<'style'>}` | TextStyle['fontStyle'];
|
|
198
|
+
export declare type FontTransformTokens = `$${GetTokenFontKeysFor<'transform'>}` | TextStyle['textTransform'];
|
|
178
199
|
export declare type ThemeValueByCategory<K extends string | number | symbol> = K extends 'theme' ? ThemeTokens : K extends 'size' ? SizeTokens : K extends 'font' ? FontTokens : K extends 'fontSize' ? FontSizeTokens : K extends 'space' ? SpaceTokens : K extends 'color' ? ColorTokens : K extends 'zIndex' ? ZIndexTokens : K extends 'lineHeight' ? FontLineHeightTokens : K extends 'fontWeight' ? FontWeightTokens : K extends 'letterSpacing' ? FontLetterSpacingTokens : {};
|
|
200
|
+
declare type FontKeys = 'fontFamily';
|
|
201
|
+
declare type FontSizeKeys = 'fontSize';
|
|
202
|
+
declare type FontWeightKeys = 'fontWeight';
|
|
203
|
+
declare type FontLetterSpacingKeys = 'letterSpacing';
|
|
204
|
+
declare type LineHeightKeys = 'lineHeight';
|
|
205
|
+
declare type ZIndexKeys = 'zIndex';
|
|
179
206
|
export declare type ThemeValueGet<K extends string | number | symbol> = K extends 'theme' ? ThemeTokens : K extends SizeKeys ? SizeTokens : K extends FontKeys ? FontTokens : K extends FontSizeKeys ? FontSizeTokens : K extends SpaceKeys ? K extends 'shadowOffset' ? {
|
|
180
207
|
width: SpaceTokens;
|
|
181
208
|
height: SpaceTokens;
|
|
@@ -195,11 +222,16 @@ export declare type PseudoProps<A> = {
|
|
|
195
222
|
enterStyle?: A | null;
|
|
196
223
|
};
|
|
197
224
|
export declare type PsuedoPropKeys = keyof PseudoProps<any>;
|
|
225
|
+
export declare type PseudoStyles = {
|
|
226
|
+
hoverStyle?: ViewStyle;
|
|
227
|
+
pressStyle?: ViewStyle;
|
|
228
|
+
focusStyle?: ViewStyle;
|
|
229
|
+
enterStyle?: ViewStyle;
|
|
230
|
+
exitStyle?: ViewStyle;
|
|
231
|
+
};
|
|
198
232
|
declare type WithThemeAndShorthands<A extends object> = WithThemeValues<A> & WithShorthands<WithThemeValues<A>>;
|
|
199
233
|
declare type WithThemeShorthandsAndPseudos<A extends object> = WithThemeAndShorthands<A> & PseudoProps<WithThemeAndShorthands<A>>;
|
|
200
|
-
declare type WithThemeShorthandsPseudosMediaAnimation<A extends object> = WithThemeShorthandsAndPseudos<A> & MediaProps<WithThemeShorthandsAndPseudos<A
|
|
201
|
-
animation?: AnimationKeys;
|
|
202
|
-
};
|
|
234
|
+
declare type WithThemeShorthandsPseudosMediaAnimation<A extends object> = WithThemeShorthandsAndPseudos<A> & MediaProps<WithThemeShorthandsAndPseudos<A>>;
|
|
203
235
|
declare type WebOnlyStyleProps = {
|
|
204
236
|
cursor?: string;
|
|
205
237
|
contain?: 'none' | 'strict' | 'content' | 'size' | 'layout' | 'paint' | string;
|
|
@@ -207,10 +239,10 @@ declare type WebOnlyStyleProps = {
|
|
|
207
239
|
pointerEvents?: ViewProps['pointerEvents'];
|
|
208
240
|
};
|
|
209
241
|
export declare type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> & TransformStyleProps & WebOnlyStyleProps;
|
|
242
|
+
export declare type StackPropsBaseShared = Omit<ViewProps, 'display' | 'children'> & RNWViewProps & TamaguiComponentPropsBase;
|
|
210
243
|
export declare type StackStyleProps = WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>;
|
|
211
|
-
export declare type
|
|
212
|
-
|
|
213
|
-
};
|
|
244
|
+
export declare type StackPropsBase = StackPropsBaseShared & WithThemeAndShorthands<StackStylePropsBase>;
|
|
245
|
+
export declare type StackProps = StackPropsBaseShared & StackStyleProps;
|
|
214
246
|
export declare type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps & WebOnlyStyleProps & {
|
|
215
247
|
ellipse?: boolean;
|
|
216
248
|
selectable?: boolean;
|
|
@@ -221,23 +253,23 @@ export declare type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVi
|
|
|
221
253
|
wordWrap?: CSS.Properties['wordWrap'];
|
|
222
254
|
cursor?: CSS.Properties['cursor'];
|
|
223
255
|
};
|
|
256
|
+
export declare type TextPropsBaseShared = Omit<ReactTextProps, 'children'> & RNWTextProps & TamaguiComponentPropsBase;
|
|
257
|
+
export declare type TextPropsBase = TextPropsBaseShared & WithThemeAndShorthands<TextStylePropsBase>;
|
|
224
258
|
export declare type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>;
|
|
225
|
-
export declare type TextProps =
|
|
259
|
+
export declare type TextProps = TextPropsBaseShared & TextStyleProps;
|
|
226
260
|
export declare type ViewOrTextProps = WithThemeShorthandsPseudosMediaAnimation<Omit<TextStylePropsBase, keyof StackStylePropsBase> & StackStylePropsBase>;
|
|
227
|
-
export declare type
|
|
228
|
-
declare type StaticComponentObject
|
|
229
|
-
staticConfig:
|
|
230
|
-
|
|
231
|
-
extractable: <X>(a: X, opts?: StaticConfig) => X;
|
|
261
|
+
export declare type TamaguiComponent<Props = any, Ref = any, BaseProps = {}, VariantProps = {}> = ReactComponentWithRef<Props, Ref> & StaticComponentObject;
|
|
262
|
+
declare type StaticComponentObject = {
|
|
263
|
+
staticConfig: StaticConfig;
|
|
264
|
+
extractable: <X>(a: X, opts?: Partial<StaticConfig>) => X;
|
|
232
265
|
};
|
|
233
266
|
export declare type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {
|
|
234
267
|
injectCSS?: boolean;
|
|
235
|
-
|
|
236
|
-
children?: any;
|
|
268
|
+
children?: React.ReactNode;
|
|
237
269
|
};
|
|
238
270
|
export declare type StaticConfigParsed = StaticConfig & {
|
|
239
271
|
parsed: true;
|
|
240
|
-
propMapper: (key: string, value: any, theme: ThemeObject, props: any,
|
|
272
|
+
propMapper: (key: string, value: any, theme: ThemeObject, props: any, resolveVariablesAs?: ResolveVariableTypes, avoidDefaultProps?: boolean) => undefined | boolean | {
|
|
241
273
|
[key: string]: any;
|
|
242
274
|
};
|
|
243
275
|
variantsParsed?: {
|
|
@@ -247,7 +279,7 @@ export declare type StaticConfigParsed = StaticConfig & {
|
|
|
247
279
|
};
|
|
248
280
|
};
|
|
249
281
|
export declare type StaticConfig = {
|
|
250
|
-
Component?: React.FunctionComponent<any> & StaticComponentObject
|
|
282
|
+
Component?: React.FunctionComponent<any> & StaticComponentObject;
|
|
251
283
|
variants?: {
|
|
252
284
|
[key: string]: {
|
|
253
285
|
[key: string]: ((a: any, b: any) => any) | {
|
|
@@ -277,66 +309,70 @@ export declare type StaticConfig = {
|
|
|
277
309
|
memo?: boolean;
|
|
278
310
|
isTamagui?: boolean;
|
|
279
311
|
};
|
|
280
|
-
export declare type StylableComponent =
|
|
281
|
-
export declare type
|
|
282
|
-
export declare type
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
[Key in '...color'
|
|
289
|
-
}
|
|
290
|
-
[Key in
|
|
291
|
-
}
|
|
292
|
-
[Key in
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
} | {
|
|
298
|
-
[Key in string]: MyProps | VariantSpreadFunction<MyProps, any>;
|
|
299
|
-
};
|
|
300
|
-
};
|
|
301
|
-
export declare type GetVariantProps<Variants extends Object> = {
|
|
302
|
-
[key in keyof Variants]?: GetVariantValues<keyof Variants[key], keyof Variants[key]>;
|
|
312
|
+
export declare type StylableComponent = TamaguiComponent | React.Component | React.ForwardRefExoticComponent<any> | (new (props: any) => any) | typeof View | typeof Text | typeof TextInput | typeof Image;
|
|
313
|
+
export declare type GetBaseProps<A extends StylableComponent> = A extends TamaguiComponent<any, any, infer BaseProps> ? BaseProps : never;
|
|
314
|
+
export declare type GetProps<A extends StylableComponent> = A extends TamaguiComponent<infer Props> ? Props : A extends React.Component<infer Props> ? GetGenericComponentTamaguiProps<Props> : A extends new (props: infer Props) => any ? GetGenericComponentTamaguiProps<Props> : {};
|
|
315
|
+
declare type GetGenericComponentTamaguiProps<P> = P & Omit<'textAlign' extends keyof P ? TextProps : StackProps, keyof P>;
|
|
316
|
+
export declare type SpreadKeys = '...fontSize' | '...fontStyle' | '...fontTransform' | '...lineHeight' | '...letterSpacing' | '...size' | '...color' | '...zIndex' | '...theme' | '...radius';
|
|
317
|
+
export declare type VariantDefinitions<Parent extends StylableComponent = TamaguiComponent, MyProps extends Object = GetProps<Parent>, Val = any> = VariantDefinitionFromProps<MyProps, Val>;
|
|
318
|
+
export declare type VariantDefinitionFromProps<MyProps, Val> = MyProps extends Object ? {
|
|
319
|
+
[propName: string]: VariantSpreadFunction<MyProps, Val> | ({
|
|
320
|
+
[Key in SpreadKeys]?: Key extends '...fontSize' ? FontSizeVariantSpreadFunction<MyProps> : Key extends '...size' ? SizeVariantSpreadFunction<MyProps> : Key extends '...color' ? ColorVariantSpreadFunction<MyProps> : Key extends '...lineHeight' ? FontLineHeightVariantSpreadFunction<MyProps> : Key extends '...fontTransform' ? FontTransformVariantSpreadFunction<MyProps> : Key extends '...fontStyle' ? FontStyleVariantSpreadFunction<MyProps> : Key extends '...letterSpacing' ? FontLetterSpacingVariantSpreadFunction<MyProps> : Key extends '...zIndex' ? ZIndexVariantSpreadFunction<MyProps> : Key extends '...radius' ? RadiusVariantSpreadFunction<MyProps> : Key extends '...theme' ? ThemeVariantSpreadFunction<MyProps> : never;
|
|
321
|
+
} & {
|
|
322
|
+
[Key in string | number]?: MyProps | VariantSpreadFunction<MyProps, Val>;
|
|
323
|
+
} & {
|
|
324
|
+
[Key in VariantTypeKeys]?: Key extends ':number' ? VariantSpreadFunction<MyProps, number> : Key extends ':boolean' ? VariantSpreadFunction<MyProps, boolean> : Key extends ':string' ? VariantSpreadFunction<MyProps, string> : never;
|
|
325
|
+
});
|
|
326
|
+
} : never;
|
|
327
|
+
export declare type GetVariantProps<Variants> = {
|
|
328
|
+
[Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val> ? Val : GetVariantValues<keyof Variants[Key]>;
|
|
303
329
|
};
|
|
304
330
|
export declare type VariantSpreadExtras<Props> = {
|
|
331
|
+
fonts: TamaguiConfig['fonts'];
|
|
305
332
|
tokens: TamaguiConfig['tokens'];
|
|
306
333
|
theme: Themes extends {
|
|
307
334
|
[key: string]: infer B;
|
|
308
335
|
} ? B : unknown;
|
|
309
336
|
props: Props;
|
|
310
337
|
};
|
|
311
|
-
|
|
312
|
-
declare type WithVariableValues<A extends {
|
|
338
|
+
declare type PropLike = {
|
|
313
339
|
[key: string]: any;
|
|
314
|
-
}> = {
|
|
315
|
-
[Key in keyof A]: A[Key] | Variable;
|
|
316
340
|
};
|
|
317
|
-
export declare type
|
|
318
|
-
[
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
};
|
|
322
|
-
export declare type
|
|
323
|
-
export declare type
|
|
324
|
-
export declare type
|
|
325
|
-
export declare type
|
|
326
|
-
export declare type
|
|
327
|
-
export declare type
|
|
328
|
-
export declare type
|
|
329
|
-
export declare type
|
|
330
|
-
declare type
|
|
331
|
-
declare type
|
|
332
|
-
declare type
|
|
333
|
-
declare type
|
|
334
|
-
declare type FontLetterSpacingKeys = 'letterSpacing';
|
|
335
|
-
declare type LineHeightKeys = 'lineHeight';
|
|
336
|
-
declare type ZIndexKeys = 'zIndex';
|
|
337
|
-
declare type ColorKeys = 'color' | 'backgroundColor' | 'borderColor' | 'borderBottomColor' | 'borderTopColor' | 'borderLeftColor' | 'borderRightColor' | 'shadowColor';
|
|
341
|
+
export declare type VariantSpreadFunction<Props extends PropLike, Val = any> = (val: Val, config: VariantSpreadExtras<Props>) => {
|
|
342
|
+
[Key in keyof Props]: Props[Key] | Variable;
|
|
343
|
+
} | null | undefined;
|
|
344
|
+
export declare type VariantTypeKeys = ':string' | ':boolean' | ':number';
|
|
345
|
+
export declare type GetVariantValues<Key> = Key extends `...${infer VariantSpread}` ? ThemeValueByCategory<VariantSpread> : Key extends 'true' | 'false' ? boolean : Key extends ':string' ? string : Key extends ':boolean' ? boolean : Key extends ':number' ? number : Key;
|
|
346
|
+
export declare type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontSizeTokens>;
|
|
347
|
+
export declare type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SizeTokens>;
|
|
348
|
+
export declare type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>;
|
|
349
|
+
export declare type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLineHeightTokens>;
|
|
350
|
+
export declare type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLetterSpacingTokens>;
|
|
351
|
+
export declare type FontStyleVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontStyleTokens>;
|
|
352
|
+
export declare type FontTransformVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontTransformTokens>;
|
|
353
|
+
export declare type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>;
|
|
354
|
+
export declare type RadiusVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, RadiusTokens>;
|
|
355
|
+
export declare type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>;
|
|
356
|
+
declare type SizeKeys = 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight' | 'shadowRadius';
|
|
357
|
+
declare type ColorKeys = 'color' | 'backgroundColor' | 'borderColor' | 'borderBottomColor' | 'borderTopColor' | 'borderLeftColor' | 'borderRightColor' | 'shadowColor' | 'textShadowColor';
|
|
338
358
|
declare type SpaceKeys = 'space' | 'padding' | 'paddingHorizontal' | 'paddingVertical' | 'paddingLeft' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingEnd' | 'paddingStart' | 'margin' | 'marginHorizontal' | 'marginVertical' | 'marginLeft' | 'marginTop' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginEnd' | 'marginStart' | 'x' | 'y' | 'scale' | 'scaleX' | 'scaleY' | 'borderTopEndRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderTopStartRadius' | 'borderBottomEndRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius' | 'borderBottomStartRadius' | 'borderBottomWidth' | 'borderLeftWidth' | 'borderRadius' | 'borderRightWidth' | 'borderTopEndRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderEndWidth' | 'borderStartWidth' | 'borderTopStartRadius' | 'borderTopWidth' | 'borderWidth' | 'left' | 'top' | 'right' | 'bottom' | 'shadowOffset';
|
|
339
359
|
declare type CSSColorNames = 'aliceblue' | 'antiquewhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedalmond' | 'blue' | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkkhaki' | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' | 'darkslateblue' | 'darkslategray' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' | 'dimgray' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'fuchsia' | 'gainsboro' | 'ghostwhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenyellow' | 'honeydew' | 'hotpink' | 'indianred ' | 'indigo ' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgrey' | 'lightgreen' | 'lightpink' | 'lightsalmon' | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightsteelblue' | 'lightyellow' | 'lime' | 'limegreen' | 'linen' | 'magenta' | 'maroon' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' | 'mistyrose' | 'moccasin' | 'navajowhite' | 'navy' | 'oldlace' | 'olive' | 'olivedrab' | 'orange' | 'orangered' | 'orchid' | 'palegoldenrod' | 'palegreen' | 'paleturquoise' | 'palevioletred' | 'papayawhip' | 'peachpuff' | 'peru' | 'pink' | 'plum' | 'powderblue' | 'purple' | 'red' | 'rosybrown' | 'royalblue' | 'saddlebrown' | 'salmon' | 'sandybrown' | 'seagreen' | 'seashell' | 'sienna' | 'silver' | 'skyblue' | 'slateblue' | 'slategray' | 'snow' | 'springgreen' | 'steelblue' | 'tan' | 'teal' | 'thistle' | 'tomato' | 'turquoise' | 'violet' | 'wheat' | 'white' | 'whitesmoke' | 'yellow' | 'yellowgreen';
|
|
360
|
+
export declare type TamaguiComponentState = {
|
|
361
|
+
hover: boolean;
|
|
362
|
+
press: boolean;
|
|
363
|
+
pressIn: boolean;
|
|
364
|
+
focus: boolean;
|
|
365
|
+
mounted: boolean;
|
|
366
|
+
animation?: null | {
|
|
367
|
+
style?: any;
|
|
368
|
+
avoidClasses?: boolean;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
export declare type SplitStyleState = TamaguiComponentState & {
|
|
372
|
+
noClassNames?: boolean;
|
|
373
|
+
resolveVariablesAs?: ResolveVariableTypes;
|
|
374
|
+
fallbackProps?: Object;
|
|
375
|
+
};
|
|
340
376
|
declare type AnimationConfig = {
|
|
341
377
|
[key: string]: any;
|
|
342
378
|
};
|
|
@@ -347,19 +383,24 @@ export declare type AnimationDriver<A extends AnimationConfig = AnimationConfig>
|
|
|
347
383
|
View?: any;
|
|
348
384
|
Text?: any;
|
|
349
385
|
};
|
|
350
|
-
export declare type UseAnimationProps = {
|
|
386
|
+
export declare type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any> & {
|
|
351
387
|
animation: string;
|
|
352
|
-
[key: string]: any;
|
|
353
388
|
};
|
|
354
|
-
export declare type
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
389
|
+
export declare type UseAnimationHelpers = {
|
|
390
|
+
staticConfig: StaticConfigParsed;
|
|
391
|
+
getStyle: (props?: {
|
|
392
|
+
isEntering?: boolean;
|
|
393
|
+
exitVariant?: string | null;
|
|
394
|
+
enterVariant?: string | null;
|
|
395
|
+
}) => ViewStyle;
|
|
396
|
+
state: SplitStyleState;
|
|
397
|
+
pseudos: PseudoProps<ViewStyle>;
|
|
358
398
|
onDidAnimate?: any;
|
|
359
399
|
delay?: number;
|
|
360
400
|
};
|
|
361
|
-
export declare type UseAnimationHook = (props: UseAnimationProps,
|
|
362
|
-
style?: StackStylePropsBase;
|
|
401
|
+
export declare type UseAnimationHook = (props: UseAnimationProps, helpers: UseAnimationHelpers) => {
|
|
402
|
+
style?: StackStylePropsBase | StackStylePropsBase[];
|
|
403
|
+
safeToUnmount?: () => void;
|
|
363
404
|
};
|
|
364
405
|
export {};
|
|
365
406
|
//# sourceMappingURL=types.d.ts.map
|