@tamagui/core 1.0.0-beta.189 → 1.0.0-beta.207

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.
Files changed (113) hide show
  1. package/dist/cjs/constants/pseudos.js +37 -0
  2. package/dist/cjs/constants/pseudos.js.map +7 -0
  3. package/dist/cjs/createComponent.js +45 -45
  4. package/dist/cjs/createComponent.js.map +2 -2
  5. package/dist/cjs/createShallowUpdate.js +1 -0
  6. package/dist/cjs/createShallowUpdate.js.map +7 -0
  7. package/dist/cjs/defaultComponentState.js +0 -30
  8. package/dist/cjs/defaultComponentState.js.map +3 -3
  9. package/dist/cjs/devtools.js +32 -0
  10. package/dist/cjs/devtools.js.map +7 -0
  11. package/dist/cjs/helpers/RNComponents.js +34 -0
  12. package/dist/cjs/helpers/RNComponents.js.map +7 -0
  13. package/dist/cjs/helpers/createMediaStyle.js +2 -0
  14. package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
  15. package/dist/cjs/helpers/createPropMapper.js.map +1 -1
  16. package/dist/cjs/helpers/createShallowUpdate.js +51 -0
  17. package/dist/cjs/helpers/createShallowUpdate.js.map +7 -0
  18. package/dist/cjs/helpers/createTamaguiProvider.js +1 -5
  19. package/dist/cjs/helpers/createTamaguiProvider.js.map +2 -2
  20. package/dist/cjs/helpers/getSplitStyles.js +7 -7
  21. package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
  22. package/dist/cjs/helpers/insertStyleRule.js +6 -5
  23. package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
  24. package/dist/cjs/hooks/useFeatures.js +11 -6
  25. package/dist/cjs/hooks/useFeatures.js.map +2 -2
  26. package/dist/cjs/styled.js +2 -12
  27. package/dist/cjs/styled.js.map +2 -2
  28. package/dist/cjs/tamagui-base.css +8 -0
  29. package/dist/cjs/tamagui-base.css.map +7 -0
  30. package/dist/cjs/types-rnw.js.map +1 -1
  31. package/dist/cjs/types.js.map +1 -1
  32. package/dist/cjs/views/Stack.js.map +2 -2
  33. package/dist/cjs/views/Text.js.map +2 -2
  34. package/dist/cjs/views/Theme.js +4 -1
  35. package/dist/cjs/views/Theme.js.map +2 -2
  36. package/dist/esm/constants/pseudos.js +18 -0
  37. package/dist/esm/constants/pseudos.js.map +7 -0
  38. package/dist/esm/createComponent.js +43 -43
  39. package/dist/esm/createComponent.js.map +2 -2
  40. package/dist/esm/createShallowUpdate.js +1 -0
  41. package/dist/esm/createShallowUpdate.js.map +7 -0
  42. package/dist/esm/defaultComponentState.js +0 -11
  43. package/dist/esm/defaultComponentState.js.map +3 -3
  44. package/dist/esm/devtools.js +14 -0
  45. package/dist/esm/devtools.js.map +7 -0
  46. package/dist/esm/helpers/RNComponents.js +12 -0
  47. package/dist/esm/helpers/RNComponents.js.map +7 -0
  48. package/dist/esm/helpers/createMediaStyle.js +2 -0
  49. package/dist/esm/helpers/createMediaStyle.js.map +2 -2
  50. package/dist/esm/helpers/createPropMapper.js.map +1 -1
  51. package/dist/esm/helpers/createShallowUpdate.js +19 -0
  52. package/dist/esm/helpers/createShallowUpdate.js.map +7 -0
  53. package/dist/esm/helpers/createTamaguiProvider.js +1 -4
  54. package/dist/esm/helpers/createTamaguiProvider.js.map +2 -2
  55. package/dist/esm/helpers/getSplitStyles.js +7 -7
  56. package/dist/esm/helpers/getSplitStyles.js.map +2 -2
  57. package/dist/esm/helpers/insertStyleRule.js +6 -5
  58. package/dist/esm/helpers/insertStyleRule.js.map +2 -2
  59. package/dist/esm/hooks/useFeatures.js +17 -11
  60. package/dist/esm/hooks/useFeatures.js.map +2 -2
  61. package/dist/esm/styled.js +1 -8
  62. package/dist/esm/styled.js.map +2 -2
  63. package/dist/esm/tamagui-base.css +8 -0
  64. package/dist/esm/tamagui-base.css.map +7 -0
  65. package/dist/esm/views/Stack.js.map +2 -2
  66. package/dist/esm/views/Text.js.map +2 -2
  67. package/dist/esm/views/Theme.js +4 -1
  68. package/dist/esm/views/Theme.js.map +2 -2
  69. package/dist/jsx/constants/pseudos.js +17 -0
  70. package/dist/jsx/createComponent.js +39 -40
  71. package/dist/jsx/createShallowUpdate.js +0 -0
  72. package/dist/jsx/defaultComponentState.js +0 -11
  73. package/dist/jsx/devtools.js +13 -0
  74. package/dist/jsx/helpers/RNComponents.js +11 -0
  75. package/dist/jsx/helpers/createMediaStyle.js +2 -0
  76. package/dist/jsx/helpers/createShallowUpdate.js +18 -0
  77. package/dist/jsx/helpers/createTamaguiProvider.js +1 -2
  78. package/dist/jsx/helpers/getSplitStyles.js +7 -7
  79. package/dist/jsx/helpers/insertStyleRule.js +6 -5
  80. package/dist/jsx/hooks/useFeatures.js +17 -11
  81. package/dist/jsx/styled.js +1 -8
  82. package/dist/jsx/tamagui-base.css +7 -0
  83. package/dist/jsx/views/Theme.js +4 -1
  84. package/package.json +6 -6
  85. package/types/createComponent.d.ts +5 -6
  86. package/types/createComponent.d.ts.map +1 -1
  87. package/types/defaultComponentState.d.ts +0 -12
  88. package/types/defaultComponentState.d.ts.map +1 -1
  89. package/types/helpers/RNComponents.d.ts +2 -0
  90. package/types/helpers/RNComponents.d.ts.map +1 -0
  91. package/types/helpers/createMediaStyle.d.ts.map +1 -1
  92. package/types/helpers/createPropMapper.d.ts +1 -1
  93. package/types/helpers/createPropMapper.d.ts.map +1 -1
  94. package/types/helpers/createShallowUpdate.d.ts +4 -0
  95. package/types/helpers/createShallowUpdate.d.ts.map +1 -0
  96. package/types/helpers/createTamaguiProvider.d.ts +1 -1
  97. package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
  98. package/types/helpers/getSplitStyles.d.ts +2 -3
  99. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  100. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  101. package/types/hooks/useFeatures.d.ts +3 -4
  102. package/types/hooks/useFeatures.d.ts.map +1 -1
  103. package/types/styled.d.ts +3 -7
  104. package/types/styled.d.ts.map +1 -1
  105. package/types/types-rnw.d.ts +0 -5
  106. package/types/types-rnw.d.ts.map +1 -1
  107. package/types/types.d.ts +61 -62
  108. package/types/types.d.ts.map +1 -1
  109. package/types/views/Stack.d.ts +2 -2
  110. package/types/views/Stack.d.ts.map +1 -1
  111. package/types/views/Text.d.ts +2 -2
  112. package/types/views/Text.d.ts.map +1 -1
  113. package/types/views/Theme.d.ts.map +1 -1
@@ -40,22 +40,28 @@ function loadAnimationFeature() {
40
40
  console.error("no useAnimations hook provided");
41
41
  return null;
42
42
  }
43
- const animatedStyleIn = {
44
- ...style,
45
- ...state.hover && pseudos.hoverStyle,
46
- ...state.focus && pseudos.focusStyle,
47
- ...state.press && pseudos.pressStyle
48
- };
49
- const res = useAnimations(props, {
50
- isMounted: state.mounted,
51
- style: animatedStyleIn,
52
- exitStyle: pseudos == null ? void 0 : pseudos.exitStyle
43
+ const propsWithAnimation = props;
44
+ const styleKey = JSON.stringify(style);
45
+ const res = useAnimations(propsWithAnimation, {
46
+ styleKey,
47
+ style: style || {},
48
+ state,
49
+ pseudos,
50
+ mergedStyles(props2) {
51
+ return {
52
+ ...style,
53
+ ...state.hover && pseudos.hoverStyle,
54
+ ...state.focus && pseudos.focusStyle,
55
+ ...state.press && pseudos.pressStyle,
56
+ ...(props2 == null ? void 0 : props2.isExiting) && pseudos.exitStyle
57
+ };
58
+ }
53
59
  });
54
60
  useIsomorphicLayoutEffect(() => {
55
61
  setStateShallow({
56
62
  animation: res
57
63
  });
58
- }, [JSON.stringify(style)]);
64
+ }, [styleKey]);
59
65
  return null;
60
66
  },
61
67
  propNames: ["animation"]
@@ -1,16 +1,9 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import * as ReactNative from "react-native";
4
3
  import { Image, Text, TextInput } from "react-native";
5
4
  import { createComponent } from "./createComponent";
6
5
  import { extendStaticConfig } from "./helpers/extendStaticConfig";
7
- const RNComponents = /* @__PURE__ */ new WeakMap();
8
- for (const key of ["Image", "TextInput", "Text", "View"]) {
9
- const val = ReactNative[key];
10
- if (val && typeof val === "object") {
11
- RNComponents.set(val, true);
12
- }
13
- }
6
+ import { RNComponents } from "./helpers/RNComponents";
14
7
  function styled(Component, options, staticExtractionOptions) {
15
8
  const staticConfigProps = (() => {
16
9
  if (options) {
@@ -0,0 +1,7 @@
1
+ .tamagui-absolute-fill {
2
+ position: absolute;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ }
@@ -16,7 +16,10 @@ const Theme = memo(/* @__PURE__ */ __name(function Theme2(props) {
16
16
  }
17
17
  const contents = useMemo(() => wrapThemeManagerContext(props.children, themeManager), [props.children, themeManager]);
18
18
  if (isWeb) {
19
- return <div className={props.disableThemeClass ? "" : props.className ? `${className || ""} ${props.className || ""}` : className || ""} style={{
19
+ return <div className={[
20
+ `tui_Theme`,
21
+ ...!props.disableThemeClass ? [props.className, className].filter(Boolean) : []
22
+ ].join(" ")} style={{
20
23
  display: "contents",
21
24
  color: (_b = (_a = themes[name]) == null ? void 0 : _a.color) == null ? void 0 : _b.toString()
22
25
  }}>{contents}</div>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "1.0.0-beta.189+64107267",
3
+ "version": "1.0.0-beta.207+3fd10ea6",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -19,10 +19,10 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "@tamagui/helpers": "^1.0.0-beta.189+64107267",
22
+ "@tamagui/helpers": "^1.0.0-beta.207+3fd10ea6",
23
23
  "@tamagui/ow": "^0.28.1",
24
- "@tamagui/use-debounce": "^1.0.0-beta.189+64107267",
25
- "@tamagui/use-force-update": "^1.0.0-beta.189+64107267",
24
+ "@tamagui/use-debounce": "^1.0.0-beta.207+3fd10ea6",
25
+ "@tamagui/use-force-update": "^1.0.0-beta.207+3fd10ea6",
26
26
  "react": "*",
27
27
  "react-dom": "*"
28
28
  },
@@ -30,7 +30,7 @@
30
30
  "react-native-web": "*"
31
31
  },
32
32
  "devDependencies": {
33
- "@tamagui/build": "^1.0.0-beta.189+64107267",
33
+ "@tamagui/build": "^1.0.0-beta.207+3fd10ea6",
34
34
  "@types/react": "^17.0.35",
35
35
  "csstype": "^3.0.10",
36
36
  "esbuild": "^0.14.36",
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "6410726774260b4de48c270c81a17b168995a3b7"
43
+ "gitHead": "3fd10ea6d026fac0339fbc1a501ee304f4985b05"
44
44
  }
@@ -1,14 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import { View, ViewStyle } from 'react-native';
3
- import { SpaceTokens, StackProps, StaticComponent, StaticConfig, StaticConfigParsed } from './types';
3
+ import { SpaceTokens, StackProps, StaticConfig, StaticConfigParsed, TamaguiComponent, TamaguiComponentState } from './types';
4
+ export declare const defaultComponentState: TamaguiComponentState;
4
5
  export declare const mouseUps: Set<Function>;
5
- declare type DefaultProps = {};
6
- export declare function createComponent<ComponentPropTypes extends Object = DefaultProps, Ref = View>(configIn: Partial<StaticConfig> | StaticConfigParsed): StaticComponent<ComponentPropTypes, {}, Ref, StaticConfigParsed>;
7
- export declare const Spacer: StaticComponent<Omit<StackProps, "flex" | "direction"> & {
6
+ export declare function createComponent<ComponentPropTypes extends Object = {}, Ref = View, BaseProps = never>(configIn: Partial<StaticConfig> | StaticConfigParsed): TamaguiComponent<ComponentPropTypes, Ref, BaseProps, {}>;
7
+ export declare const Spacer: TamaguiComponent<Omit<StackProps, "flex" | "direction"> & {
8
8
  size?: SpaceTokens | undefined;
9
9
  flex?: number | boolean | undefined;
10
10
  direction?: "horizontal" | "vertical" | undefined;
11
- }, {}, View, StaticConfigParsed>;
11
+ }, View, never, {}>;
12
12
  export declare function spacedChildren({ isZStack, children, space, flexDirection, spaceFlex, }: {
13
13
  isZStack?: boolean;
14
14
  children: any;
@@ -17,5 +17,4 @@ export declare function spacedChildren({ isZStack, children, space, flexDirectio
17
17
  flexDirection?: ViewStyle['flexDirection'];
18
18
  }): any[];
19
19
  export declare const AbsoluteFill: (props: any) => JSX.Element;
20
- export {};
21
20
  //# sourceMappingURL=createComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAoB,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAmBhE,OAAO,EACL,WAAW,EACX,UAAU,EACV,eAAe,EACf,YAAY,EACZ,kBAAkB,EAGnB,MAAM,SAAS,CAAA;AAGhB,eAAO,MAAM,QAAQ,eAAsB,CAAA;AAS3C,aAAK,YAAY,GAAG,EAAE,CAAA;AAetB,wBAAgB,eAAe,CAAC,kBAAkB,SAAS,MAAM,GAAG,YAAY,EAAE,GAAG,GAAG,IAAI,EAC1F,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,kBAAkB,oEA2lBrD;AAKD,eAAO,MAAM,MAAM;;;;gCA2CjB,CAAA;AAEF,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,aAAa,EACb,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,GAAG,CAAA;IACb,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;CAC3C,SA2CA;AA4CD,eAAO,MAAM,YAAY,UAAW,GAAG,gBAepC,CAAA"}
1
+ {"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAoB,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAoBhE,OAAO,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EAGtB,MAAM,SAAS,CAAA;AAKhB,eAAO,MAAM,qBAAqB,EAAE,qBAQnC,CAAA;AAED,eAAO,MAAM,QAAQ,eAAsB,CAAA;AAQ3C,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,GAAG,EAAE,EACtC,GAAG,GAAG,IAAI,EACV,SAAS,GAAG,KAAK,EACjB,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,kBAAkB,4DAmmBrD;AAKD,eAAO,MAAM,MAAM;;;;mBA2CjB,CAAA;AAEF,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,aAAa,EACb,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,GAAG,CAAA;IACb,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;CAC3C,SA2CA;AA4CD,eAAO,MAAM,YAAY,UAAW,GAAG,gBAiBpC,CAAA"}
@@ -1,13 +1 @@
1
- export declare type ComponentState = typeof defaultComponentState;
2
- export declare const defaultComponentState: {
3
- hover: boolean;
4
- press: boolean;
5
- pressIn: boolean;
6
- focus: boolean;
7
- mounted: boolean;
8
- animation: {
9
- style?: any;
10
- avoidClasses?: boolean | undefined;
11
- } | null;
12
- };
13
1
  //# sourceMappingURL=defaultComponentState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultComponentState.d.ts","sourceRoot":"","sources":["../src/defaultComponentState.tsx"],"names":[],"mappings":"AAAA,oBAAY,cAAc,GAAG,OAAO,qBAAqB,CAAA;AAEzD,eAAO,MAAM,qBAAqB;;;;;;;gBAQtB,GAAG;;;CAGd,CAAA"}
1
+ {"version":3,"file":"defaultComponentState.d.ts","sourceRoot":"","sources":["../src/defaultComponentState.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const RNComponents: WeakMap<object, any>;
2
+ //# sourceMappingURL=RNComponents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNComponents.d.ts","sourceRoot":"","sources":["../../src/helpers/RNComponents.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,sBAAgB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"createMediaStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/createMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAIvC,eAAO,MAAM,SAAS,MAAM,CAAA;AAE5B,eAAO,MAAM,gBAAgB,0BACJ,WAAW,YACxB,MAAM,gBACF,YAAY;;;CAgC3B,CAAA"}
1
+ {"version":3,"file":"createMediaStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/createMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAIvC,eAAO,MAAM,SAAS,MAAM,CAAA;AAE5B,eAAO,MAAM,gBAAgB,0BACJ,WAAW,YACxB,MAAM,gBACF,YAAY;;;CAiC3B,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { StaticConfig } from '../types';
2
- export declare type ResolveVariableTypes = 'auto' | 'value' | 'variable';
2
+ export declare type ResolveVariableTypes = 'auto' | 'value' | 'variable' | 'both';
3
3
  export declare const createPropMapper: (c: StaticConfig) => (key: string, value: any, theme: any, props: any, staticConfig: StaticConfig, returnVariablesAs?: ResolveVariableTypes, avoidDefaultProps?: boolean) => any;
4
4
  //# sourceMappingURL=createPropMapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createPropMapper.d.ts","sourceRoot":"","sources":["../../src/helpers/createPropMapper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAyB,MAAM,UAAU,CAAA;AAG9D,oBAAY,oBAAoB,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;AAEhE,eAAO,MAAM,gBAAgB,MAAO,YAAY,WA6BvC,MAAM,SACJ,GAAG,SACH,GAAG,SACH,GAAG,gBACI,YAAY,sBACP,oBAAoB,qCAiF1C,CAAA"}
1
+ {"version":3,"file":"createPropMapper.d.ts","sourceRoot":"","sources":["../../src/helpers/createPropMapper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAyB,MAAM,UAAU,CAAA;AAG9D,oBAAY,oBAAoB,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAA;AAEzE,eAAO,MAAM,gBAAgB,MAAO,YAAY,WA6BvC,MAAM,SACJ,GAAG,SACH,GAAG,SACH,GAAG,gBACI,YAAY,sBACP,oBAAoB,qCAiF1C,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TamaguiComponentState } from '../types';
3
+ export declare function createShallowUpdate(setter: React.Dispatch<React.SetStateAction<TamaguiComponentState>>): (next: Partial<TamaguiComponentState>) => void;
4
+ //# sourceMappingURL=createShallowUpdate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createShallowUpdate.d.ts","sourceRoot":"","sources":["../../src/helpers/createShallowUpdate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEhD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,UAErD,QAAQ,qBAAqB,CAAC,UAU7C"}
@@ -3,5 +3,5 @@ import { TamaguiProviderProps } from '../types';
3
3
  import { ThemeProviderProps } from '../views/ThemeProvider';
4
4
  export declare function createTamaguiProvider({ getCSS, ...themeProps }: ThemeProviderProps & {
5
5
  getCSS: () => string;
6
- }): ({ injectCSS, fallback, children, ...themePropsProvider }: TamaguiProviderProps) => JSX.Element;
6
+ }): ({ injectCSS, children, ...themePropsProvider }: TamaguiProviderProps) => JSX.Element;
7
7
  //# sourceMappingURL=createTamaguiProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createTamaguiProvider.d.ts","sourceRoot":"","sources":["../../src/helpers/createTamaguiProvider.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,OAAO,EAAiB,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE1E,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,GAAG,UAAU,EACd,EAAE,kBAAkB,GAAG;IACtB,MAAM,EAAE,MAAM,MAAM,CAAA;CACrB,8DAMI,oBAAoB,iBAwBxB"}
1
+ {"version":3,"file":"createTamaguiProvider.d.ts","sourceRoot":"","sources":["../../src/helpers/createTamaguiProvider.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,OAAO,EAAiB,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE1E,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,GAAG,UAAU,EACd,EAAE,kBAAkB,GAAG;IACtB,MAAM,EAAE,MAAM,MAAM,CAAA;CACrB,oDAKI,oBAAoB,iBAwBxB"}
@@ -1,6 +1,5 @@
1
1
  import { ViewStyle } from 'react-native';
2
- import { ComponentState } from '../defaultComponentState';
3
- import { StackProps, StaticConfigParsed, ThemeObject } from '../types';
2
+ import { StackProps, StaticConfigParsed, TamaguiComponentState, ThemeObject } from '../types';
4
3
  import { ResolveVariableTypes } from './createPropMapper';
5
4
  export declare type SplitStyles = ReturnType<typeof getSplitStyles>;
6
5
  export declare type PseudoStyles = {
@@ -14,7 +13,7 @@ export declare type ClassNamesObject = Record<string, string>;
14
13
  export declare type SplitStyleResult = ReturnType<typeof getSplitStyles>;
15
14
  export declare const getSplitStyles: (props: {
16
15
  [key: string]: any;
17
- }, staticConfig: StaticConfigParsed, theme: ThemeObject, state: Partial<ComponentState> & {
16
+ }, staticConfig: StaticConfigParsed, theme: ThemeObject, state: Partial<TamaguiComponentState> & {
18
17
  noClassNames?: boolean;
19
18
  resolveVariablesAs?: ResolveVariableTypes;
20
19
  }, defaultClassNames?: ClassNamesObject | null | undefined) => {
@@ -1 +1 @@
1
- {"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,EAIL,UAAU,EACV,kBAAkB,EAClB,WAAW,EACZ,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAKzD,oBAAY,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAW3D,oBAAY,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAErD,oBAAY,gBAAgB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAqBhE,eAAO,MAAM,cAAc;;iBAEX,kBAAkB,SACzB,WAAW,SACX,QAAQ,cAAc,CAAC,GAAG;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,oBAAoB,CAAA;CAC1C;;;;;;CAqPF,CAAA"}
1
+ {"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAIxC,OAAO,EAIL,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACZ,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAKzD,oBAAY,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAW3D,oBAAY,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAErD,oBAAY,gBAAgB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAqBhE,eAAO,MAAM,cAAc;;iBAEX,kBAAkB,SACzB,WAAW,SACX,QAAQ,qBAAqB,CAAC,GAAG;IACtC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,oBAAoB,CAAA;CAC1C;;;;;;CA8PF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"insertStyleRule.d.ts","sourceRoot":"","sources":["../../src/helpers/insertStyleRule.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,IAAK,CAAA;AAEpC,eAAO,MAAM,eAAe,UAAqB,CAAA;AACjD,eAAO,MAAM,gBAAgB,iBAAyC,CAAA;AACtE,eAAO,MAAM,gBAAgB,UAA2B,CAAA;AAsBxD,wBAAgB,cAAc,SA4B7B;AASD,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAgB/D"}
1
+ {"version":3,"file":"insertStyleRule.d.ts","sourceRoot":"","sources":["../../src/helpers/insertStyleRule.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,IAAK,CAAA;AAEpC,eAAO,MAAM,eAAe,UAAqB,CAAA;AACjD,eAAO,MAAM,gBAAgB,iBAAyC,CAAA;AACtE,eAAO,MAAM,gBAAgB,UAA2B,CAAA;AAsBxD,wBAAgB,cAAc,SA6B7B;AASD,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAgB/D"}
@@ -1,12 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import { ViewStyle } from 'react-native';
3
- import { ComponentState } from '../defaultComponentState';
4
3
  import { PseudoStyles } from '../static';
5
- import { UseAnimationHook } from '../types';
4
+ import { TamaguiComponentState, UseAnimationHook } from '../types';
6
5
  declare type FeatureUtils = {
7
6
  forceUpdate: Function;
8
- state: ComponentState;
9
- setStateShallow: (next: Partial<ComponentState>) => void;
7
+ state: TamaguiComponentState;
8
+ setStateShallow: (next: Partial<TamaguiComponentState>) => void;
10
9
  useAnimations?: UseAnimationHook;
11
10
  pseudos: PseudoStyles;
12
11
  style: ViewStyle | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAQ3C,aAAK,YAAY,GAAG;IAClB,WAAW,EAAE,QAAQ,CAAA;IACrB,KAAK,EAAE,cAAc,CAAA;IACrB,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;IACxD,aAAa,CAAC,EAAE,gBAAgB,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;CACpC,CAAA;AAeD,eAAO,MAAM,WAAW,UAAW,GAAG,oDAYrC,CAAA"}
1
+ {"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAqB,MAAM,UAAU,CAAA;AAQrF,aAAK,YAAY,GAAG;IAClB,WAAW,EAAE,QAAQ,CAAA;IACrB,KAAK,EAAE,qBAAqB,CAAA;IAC5B,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAA;IAC/D,aAAa,CAAC,EAAE,gBAAgB,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;CACpC,CAAA;AAeD,eAAO,MAAM,WAAW,UAAW,GAAG,oDAYrC,CAAA"}
package/types/styled.d.ts CHANGED
@@ -1,11 +1,7 @@
1
- import { GetProps, GetVariantProps, MediaProps, PseudoProps, StaticComponent, StaticConfig, StylableComponent, VariantDefinitions } from './types';
2
- export declare function styled<ParentComponent extends StylableComponent, Variants extends VariantDefinitions<any> | symbol = VariantDefinitions<GetProps<ParentComponent>> | symbol>(Component: ParentComponent, options?: GetProps<ParentComponent> & {
1
+ import { GetProps, GetVariantProps, GetVariantValues, MediaProps, PseudoProps, StaticConfig, StylableComponent, TamaguiComponent, VariantDefinitions } from './types';
2
+ export declare function styled<ParentComponent extends StylableComponent, Variants extends VariantDefinitions<{}> = {}>(Component: ParentComponent, options?: GetProps<ParentComponent> & {
3
3
  name?: string;
4
4
  variants?: Variants | undefined;
5
5
  defaultVariants?: Variants extends Object ? GetVariantProps<Variants> : never;
6
- }, staticExtractionOptions?: StaticConfig): StaticComponent<Variants extends symbol | undefined ? GetProps<ParentComponent> : Omit<GetProps<ParentComponent> extends Object ? GetProps<ParentComponent> : {}, `$${string}` | keyof PseudoProps<any> | ((Variants extends symbol ? never : keyof Variants[keyof Variants]) extends never ? 1234556123312321 : Variants extends symbol ? never : keyof Variants[keyof Variants])> & (Variants extends symbol ? {} : Expand<GetVariantProps<Variants>>) & MediaProps<(Variants extends symbol ? {} : Expand<GetVariantProps<Variants>>) & ((Variants extends symbol ? never : keyof Variants[keyof Variants]) extends never ? GetProps<ParentComponent> : Omit<GetProps<ParentComponent>, Variants extends symbol ? never : keyof Variants[keyof Variants]>)> & PseudoProps<(Variants extends symbol ? {} : Expand<GetVariantProps<Variants>>) & ((Variants extends symbol ? never : keyof Variants[keyof Variants]) extends never ? GetProps<ParentComponent> : Omit<GetProps<ParentComponent>, Variants extends symbol ? never : keyof Variants[keyof Variants]>)>, Variants extends symbol ? {} : Expand<GetVariantProps<Variants>>, any, import("./types").StaticConfigParsed>;
7
- declare type Expand<T> = T extends infer O ? {
8
- [K in keyof O]?: O[K];
9
- } : never;
10
- export {};
6
+ }, staticExtractionOptions?: StaticConfig): TamaguiComponent<Variants extends symbol | void ? GetProps<ParentComponent> : (ParentComponent extends TamaguiComponent<any, any, infer P, {}> ? P : GetProps<ParentComponent>) & (ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : Object) & (Variants extends Object ? { [Key in keyof Variants]?: GetVariantValues<keyof Variants[Key]> | undefined; } : {}) & MediaProps<(ParentComponent extends TamaguiComponent<any, any, infer P, {}> ? P : GetProps<ParentComponent>) & (ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : Object) & (Variants extends Object ? { [Key in keyof Variants]?: GetVariantValues<keyof Variants[Key]> | undefined; } : {})> & PseudoProps<(ParentComponent extends TamaguiComponent<any, any, infer P, {}> ? P : GetProps<ParentComponent>) & (ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : Object) & (Variants extends Object ? { [Key in keyof Variants]?: 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 : Object) & (Variants extends Object ? { [Key in keyof Variants]?: GetVariantValues<keyof Variants[Key]> | undefined; } : {})>;
11
7
  //# sourceMappingURL=styled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EACR,eAAe,EAEf,UAAU,EACV,WAAW,EAEX,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAchB,wBAAgB,MAAM,CACpB,eAAe,SAAS,iBAAiB,EAGzC,QAAQ,SAAS,kBAAkB,CAAC,GAAG,CAAC,GAAG,MAAM,GAC7C,kBAAkB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,GAC7C,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;IAC/B,eAAe,CAAC,EAAE,QAAQ,SAAS,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAA;CAC9E,EACD,uBAAuB,CAAC,EAAE,YAAY,unCAuDvC;AAGD,aAAK,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,KAAK,CAAA"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAEhB,wBAAgB,MAAM,CACpB,eAAe,SAAS,iBAAiB,EAGzC,QAAQ,SAAS,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,EAE5C,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;IAC/B,eAAe,CAAC,EAAE,QAAQ,SAAS,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAA;CAC9E,EACD,uBAAuB,CAAC,EAAE,YAAY,kxCAuEvC"}
@@ -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;
@@ -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,SA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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"}
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,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,C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A;IACpC,iCAAiC,CAAC,EAAE,OAAO,CAAA;IAC3C,mCAAmC,CAAC,EAAE,OAAO,CAAA;IAC7C,0CAA0C,CAAC,EAAE,OAAO,CAAA;IACpD,yBAAyB,CAAC,EAAE,OAAO,CAAA;IACnC,gCAAgC,CAAC,EAAE,OAAO,CAAA;CAC3C;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
@@ -97,7 +97,7 @@ export declare type TamaguiInternalConfig<A extends GenericTokens = GenericToken
97
97
  export declare type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']['animations'];
98
98
  export declare type UnionableString = string & {};
99
99
  export declare type UnionableNumber = number & {};
100
- export declare type PropTypes<A extends StaticComponent> = A extends React.FunctionComponent<infer Props> ? Props : unknown;
100
+ export declare type PropTypes<A extends TamaguiComponent> = A extends React.FunctionComponent<infer Props> ? Props : unknown;
101
101
  export declare type GenericFont = {
102
102
  size: {
103
103
  [key: string | number]: number | Variable;
@@ -147,8 +147,10 @@ export declare type TransformStyleProps = {
147
147
  rotateX?: string;
148
148
  rotateZ?: string;
149
149
  };
150
- declare type Something<A> = A extends symbol ? Something<{}> : A;
151
- declare type ComponentPropsBase = Something<{
150
+ export declare type TamaguiComponentPropsBase = {
151
+ animation?: AnimationKeys;
152
+ animateProps?: string[];
153
+ children?: any | any[];
152
154
  debug?: boolean | 'break' | 'verbose';
153
155
  disabled?: boolean;
154
156
  className?: string;
@@ -163,7 +165,7 @@ declare type ComponentPropsBase = Something<{
163
165
  onMouseEnter?: (e: GestureResponderEvent) => any;
164
166
  onMouseLeave?: (e: GestureResponderEvent) => any;
165
167
  space?: SpaceTokens;
166
- }>;
168
+ };
167
169
  declare type GetTokenFontKeysFor<A extends 'size' | 'weight' | 'letterSpacing' | 'family' | 'lineHeight'> = keyof Tokens['font'][keyof Tokens['font']][A];
168
170
  declare type GetTokenString<A> = A extends string | number ? `$${A}` : `$${string}`;
169
171
  export declare type SizeTokens = GetTokenString<keyof Tokens['size']> | number;
@@ -197,9 +199,7 @@ export declare type PseudoProps<A> = {
197
199
  export declare type PsuedoPropKeys = keyof PseudoProps<any>;
198
200
  declare type WithThemeAndShorthands<A extends object> = WithThemeValues<A> & WithShorthands<WithThemeValues<A>>;
199
201
  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
- };
202
+ declare type WithThemeShorthandsPseudosMediaAnimation<A extends object> = WithThemeShorthandsAndPseudos<A> & MediaProps<WithThemeShorthandsAndPseudos<A>>;
203
203
  declare type WebOnlyStyleProps = {
204
204
  cursor?: string;
205
205
  contain?: 'none' | 'strict' | 'content' | 'size' | 'layout' | 'paint' | string;
@@ -207,10 +207,10 @@ declare type WebOnlyStyleProps = {
207
207
  pointerEvents?: ViewProps['pointerEvents'];
208
208
  };
209
209
  export declare type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> & TransformStyleProps & WebOnlyStyleProps;
210
+ export declare type StackPropsBaseShared = Omit<ViewProps, 'display' | 'children'> & RNWViewProps & TamaguiComponentPropsBase;
210
211
  export declare type StackStyleProps = WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>;
211
- export declare type StackProps = Omit<ViewProps, 'display' | 'children'> & RNWViewProps & StackStyleProps & ComponentPropsBase & {
212
- children?: any | any[];
213
- };
212
+ export declare type StackPropsBase = StackPropsBaseShared & WithThemeAndShorthands<StackStylePropsBase>;
213
+ export declare type StackProps = StackPropsBaseShared & StackStyleProps;
214
214
  export declare type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps & WebOnlyStyleProps & {
215
215
  ellipse?: boolean;
216
216
  selectable?: boolean;
@@ -221,19 +221,19 @@ export declare type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVi
221
221
  wordWrap?: CSS.Properties['wordWrap'];
222
222
  cursor?: CSS.Properties['cursor'];
223
223
  };
224
+ export declare type TextPropsBaseShared = Omit<ReactTextProps, 'children'> & RNWTextProps & TamaguiComponentPropsBase;
225
+ export declare type TextPropsBase = TextPropsBaseShared & WithThemeAndShorthands<TextStylePropsBase>;
224
226
  export declare type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>;
225
- export declare type TextProps = ReactTextProps & RNWTextProps & TextStyleProps & ComponentPropsBase;
227
+ export declare type TextProps = TextPropsBaseShared & TextStyleProps;
226
228
  export declare type ViewOrTextProps = WithThemeShorthandsPseudosMediaAnimation<Omit<TextStylePropsBase, keyof StackStylePropsBase> & StackStylePropsBase>;
227
- export declare type StaticComponent<Props = any, VariantProps = any, Ref = any, StaticConfParsed extends StaticConfigParsed = StaticConfigParsed> = React.ForwardRefExoticComponent<React.PropsWithoutRef<Props> & React.RefAttributes<Ref>> & StaticComponentObject<StaticConfParsed, VariantProps>;
228
- declare type StaticComponentObject<Conf extends StaticConfigParsed, VariantProps extends any> = {
229
- staticConfig: Conf;
230
- variantProps?: VariantProps;
229
+ export declare type TamaguiComponent<Props = any, Ref = any, BaseProps = {}, VariantProps = {}> = ReactComponentWithRef<Props, Ref> & StaticComponentObject;
230
+ declare type StaticComponentObject = {
231
+ staticConfig: StaticConfig;
231
232
  extractable: <X>(a: X, opts?: StaticConfig) => X;
232
233
  };
233
234
  export declare type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {
234
235
  injectCSS?: boolean;
235
- fallback?: any;
236
- children?: any;
236
+ children?: React.ReactNode;
237
237
  };
238
238
  export declare type StaticConfigParsed = StaticConfig & {
239
239
  parsed: true;
@@ -247,7 +247,7 @@ export declare type StaticConfigParsed = StaticConfig & {
247
247
  };
248
248
  };
249
249
  export declare type StaticConfig = {
250
- Component?: React.FunctionComponent<any> & StaticComponentObject<any, any>;
250
+ Component?: React.FunctionComponent<any> & StaticComponentObject;
251
251
  variants?: {
252
252
  [key: string]: {
253
253
  [key: string]: ((a: any, b: any) => any) | {
@@ -277,29 +277,19 @@ export declare type StaticConfig = {
277
277
  memo?: boolean;
278
278
  isTamagui?: boolean;
279
279
  };
280
- export declare type StylableComponent = StaticComponent | React.Component | React.ForwardRefExoticComponent<any> | (new (props: any) => any) | typeof View | typeof Text | typeof TextInput | typeof Image;
281
- export declare type GetProps<A extends StylableComponent> = A extends StaticComponent<infer Props> ? Props : A extends React.Component<infer Props> ? Omit<Props, keyof StackProps> & StackProps : A extends new (props: infer Props) => any ? Omit<Props, keyof StackProps> & StackProps : {};
282
- export declare type VariantDefinitions<MyProps> = {
280
+ export declare type StylableComponent = TamaguiComponent | React.Component | React.ForwardRefExoticComponent<any> | (new (props: any) => any) | typeof View | typeof Text | typeof TextInput | typeof Image;
281
+ export declare type GetBaseProps<A extends StylableComponent> = A extends TamaguiComponent<any, any, infer BaseProps> ? BaseProps : never;
282
+ export declare type GetProps<A extends StylableComponent> = A extends TamaguiComponent<infer Props> ? Props : A extends React.Component<infer Props> ? Omit<Props, keyof StackProps> & StackProps : A extends new (props: infer Props) => any ? Omit<Props, keyof StackProps> & StackProps : {};
283
+ export declare type SpreadKeys = '...fontSize' | '...size' | '...color' | '...lineHeight' | '...letterSpacing' | '...zIndex' | '...theme';
284
+ export declare type VariantDefinitions<MyProps = {}> = MyProps extends Object ? {
283
285
  [propName: string]: {
284
- [Key in '...fontSize']?: FontSizeVariantSpreadFunction<MyProps>;
285
- } | {
286
- [Key in '...size']?: SizeVariantSpreadFunction<MyProps>;
287
- } | {
288
- [Key in '...color']?: ColorVariantSpreadFunction<MyProps>;
289
- } | {
290
- [Key in '...lineHeight']?: FontLineHeightVariantSpreadFunction<MyProps>;
291
- } | {
292
- [Key in '...letterSpacing']?: FontLetterSpacingVariantSpreadFunction<MyProps>;
293
- } | {
294
- [Key in '...zIndex']?: ZIndexVariantSpreadFunction<MyProps>;
295
- } | {
296
- [Key in '...theme']?: ThemeVariantSpreadFunction<MyProps>;
297
- } | {
298
- [Key in string]: MyProps | VariantSpreadFunction<MyProps, any>;
286
+ [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 '...letterSpacing' ? FontLetterSpacingVariantSpreadFunction<MyProps> : Key extends '...zIndex' ? ZIndexVariantSpreadFunction<MyProps> : Key extends '...theme' ? ThemeVariantSpreadFunction<MyProps> : never;
287
+ } & {
288
+ [Key in string]?: MyProps | VariantSpreadFunction<MyProps, any>;
299
289
  };
300
- };
290
+ } : never;
301
291
  export declare type GetVariantProps<Variants extends Object> = {
302
- [key in keyof Variants]?: GetVariantValues<keyof Variants[key], keyof Variants[key]>;
292
+ [Key in keyof Variants]?: GetVariantValues<keyof Variants[Key]>;
303
293
  };
304
294
  export declare type VariantSpreadExtras<Props> = {
305
295
  tokens: TamaguiConfig['tokens'];
@@ -308,25 +298,20 @@ export declare type VariantSpreadExtras<Props> = {
308
298
  } ? B : unknown;
309
299
  props: Props;
310
300
  };
311
- export declare type VariantSpreadFunction<Props, Val = any> = (val: Val, config: VariantSpreadExtras<Props>) => WithVariableValues<TextStylePropsBase> | WithVariableValues<StackStylePropsBase> | null | undefined;
312
- declare type WithVariableValues<A extends {
301
+ declare type PropLike = {
313
302
  [key: string]: any;
314
- }> = {
315
- [Key in keyof A]: A[Key] | Variable;
316
- };
317
- export declare type GetVariants<Props> = void | {
318
- [key: string]: {
319
- [key: string]: Partial<Props> | VariantSpreadFunction<Props>;
320
- };
321
303
  };
322
- export declare type GetVariantValues<Key, Val> = Key extends `...${infer VariantSpread}` ? ThemeValueByCategory<VariantSpread> : Key extends 'true' | 'false' ? boolean : Key extends ':string' ? string : Key extends ':boolean' ? boolean : Key extends ':number' ? number : Val;
323
- export declare type FontSizeVariantSpreadFunction<A> = VariantSpreadFunction<A, FontSizeTokens>;
324
- export declare type SizeVariantSpreadFunction<A> = VariantSpreadFunction<A, SizeTokens>;
325
- export declare type ColorVariantSpreadFunction<A> = VariantSpreadFunction<A, ColorTokens>;
326
- export declare type FontLineHeightVariantSpreadFunction<A> = VariantSpreadFunction<A, FontLineHeightTokens>;
327
- export declare type FontLetterSpacingVariantSpreadFunction<A> = VariantSpreadFunction<A, FontLetterSpacingTokens>;
328
- export declare type ZIndexVariantSpreadFunction<A> = VariantSpreadFunction<A, ZIndexTokens>;
329
- export declare type ThemeVariantSpreadFunction<A> = VariantSpreadFunction<A, ThemeTokens>;
304
+ export declare type VariantSpreadFunction<Props extends PropLike, Val = any> = (val: Val, config: VariantSpreadExtras<Props>) => {
305
+ [Key in keyof Props]: Props[Key] | Variable;
306
+ } | null | undefined;
307
+ 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;
308
+ export declare type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontSizeTokens>;
309
+ export declare type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SizeTokens>;
310
+ export declare type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>;
311
+ export declare type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLineHeightTokens>;
312
+ export declare type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLetterSpacingTokens>;
313
+ export declare type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>;
314
+ export declare type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>;
330
315
  declare type SizeKeys = 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight';
331
316
  declare type FontKeys = 'fontFamily';
332
317
  declare type FontSizeKeys = 'fontSize';
@@ -337,6 +322,17 @@ declare type ZIndexKeys = 'zIndex';
337
322
  declare type ColorKeys = 'color' | 'backgroundColor' | 'borderColor' | 'borderBottomColor' | 'borderTopColor' | 'borderLeftColor' | 'borderRightColor' | 'shadowColor';
338
323
  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
324
  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';
325
+ export declare type TamaguiComponentState = {
326
+ hover: boolean;
327
+ press: boolean;
328
+ pressIn: boolean;
329
+ focus: boolean;
330
+ mounted: boolean;
331
+ animation?: null | {
332
+ style?: any;
333
+ avoidClasses?: boolean;
334
+ };
335
+ };
340
336
  declare type AnimationConfig = {
341
337
  [key: string]: any;
342
338
  };
@@ -347,18 +343,21 @@ export declare type AnimationDriver<A extends AnimationConfig = AnimationConfig>
347
343
  View?: any;
348
344
  Text?: any;
349
345
  };
350
- export declare type UseAnimationProps = {
346
+ export declare type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any> & {
351
347
  animation: string;
352
- [key: string]: any;
353
348
  };
354
- export declare type UseAnimationState = {
355
- style: ViewStyle | null | undefined;
356
- isMounted: boolean;
357
- exitStyle?: ViewStyle | null;
349
+ export declare type UseAnimationHelpers = {
350
+ styleKey: string;
351
+ style: ViewStyle;
352
+ state: TamaguiComponentState;
353
+ pseudos: PseudoProps<ViewStyle>;
358
354
  onDidAnimate?: any;
359
355
  delay?: number;
356
+ mergedStyles(props?: {
357
+ isExiting?: boolean;
358
+ }): ViewStyle;
360
359
  };
361
- export declare type UseAnimationHook = (props: UseAnimationProps, state: UseAnimationState) => {
360
+ export declare type UseAnimationHook = (props: UseAnimationProps, helpers: UseAnimationHelpers) => {
362
361
  style?: StackStylePropsBase;
363
362
  };
364
363
  export {};