@tamagui/core 1.0.0-beta.179 → 1.0.0-beta.200

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 (109) 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 +22 -19
  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/devtools.js +32 -0
  8. package/dist/cjs/devtools.js.map +7 -0
  9. package/dist/cjs/helpers/RNComponents.js +34 -0
  10. package/dist/cjs/helpers/RNComponents.js.map +7 -0
  11. package/dist/cjs/helpers/createMediaStyle.js +3 -6
  12. package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
  13. package/dist/cjs/helpers/createShallowUpdate.js +51 -0
  14. package/dist/cjs/helpers/createShallowUpdate.js.map +7 -0
  15. package/dist/cjs/helpers/createTamaguiProvider.js +1 -5
  16. package/dist/cjs/helpers/createTamaguiProvider.js.map +2 -2
  17. package/dist/cjs/helpers/getSplitStyles.js +0 -4
  18. package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
  19. package/dist/cjs/hooks/useFeatures.js +1 -0
  20. package/dist/cjs/hooks/useFeatures.js.map +2 -2
  21. package/dist/cjs/hooks/useMedia.js +5 -31
  22. package/dist/cjs/hooks/useMedia.js.map +2 -2
  23. package/dist/cjs/styled.js +2 -12
  24. package/dist/cjs/styled.js.map +2 -2
  25. package/dist/cjs/tamagui-base.css +8 -0
  26. package/dist/cjs/tamagui-base.css.map +7 -0
  27. package/dist/cjs/types-rnw.js.map +1 -1
  28. package/dist/cjs/types.js.map +1 -1
  29. package/dist/cjs/views/Stack.js.map +2 -2
  30. package/dist/cjs/views/Text.js.map +2 -2
  31. package/dist/cjs/views/Theme.js +4 -16
  32. package/dist/cjs/views/Theme.js.map +2 -2
  33. package/dist/esm/constants/pseudos.js +18 -0
  34. package/dist/esm/constants/pseudos.js.map +7 -0
  35. package/dist/esm/createComponent.js +22 -19
  36. package/dist/esm/createComponent.js.map +2 -2
  37. package/dist/esm/createShallowUpdate.js +1 -0
  38. package/dist/esm/createShallowUpdate.js.map +7 -0
  39. package/dist/esm/devtools.js +14 -0
  40. package/dist/esm/devtools.js.map +7 -0
  41. package/dist/esm/helpers/RNComponents.js +12 -0
  42. package/dist/esm/helpers/RNComponents.js.map +7 -0
  43. package/dist/esm/helpers/createMediaStyle.js +3 -6
  44. package/dist/esm/helpers/createMediaStyle.js.map +2 -2
  45. package/dist/esm/helpers/createShallowUpdate.js +19 -0
  46. package/dist/esm/helpers/createShallowUpdate.js.map +7 -0
  47. package/dist/esm/helpers/createTamaguiProvider.js +1 -4
  48. package/dist/esm/helpers/createTamaguiProvider.js.map +2 -2
  49. package/dist/esm/helpers/getSplitStyles.js +0 -4
  50. package/dist/esm/helpers/getSplitStyles.js.map +2 -2
  51. package/dist/esm/hooks/useFeatures.js +1 -0
  52. package/dist/esm/hooks/useFeatures.js.map +2 -2
  53. package/dist/esm/hooks/useMedia.js +5 -31
  54. package/dist/esm/hooks/useMedia.js.map +2 -2
  55. package/dist/esm/styled.js +1 -8
  56. package/dist/esm/styled.js.map +2 -2
  57. package/dist/esm/tamagui-base.css +8 -0
  58. package/dist/esm/tamagui-base.css.map +7 -0
  59. package/dist/esm/views/Stack.js.map +2 -2
  60. package/dist/esm/views/Text.js.map +2 -2
  61. package/dist/esm/views/Theme.js +4 -16
  62. package/dist/esm/views/Theme.js.map +2 -2
  63. package/dist/jsx/constants/pseudos.js +17 -0
  64. package/dist/jsx/createComponent.js +18 -15
  65. package/dist/jsx/createShallowUpdate.js +0 -0
  66. package/dist/jsx/devtools.js +13 -0
  67. package/dist/jsx/helpers/RNComponents.js +11 -0
  68. package/dist/jsx/helpers/createMediaStyle.js +3 -6
  69. package/dist/jsx/helpers/createShallowUpdate.js +18 -0
  70. package/dist/jsx/helpers/createTamaguiProvider.js +1 -2
  71. package/dist/jsx/helpers/getSplitStyles.js +0 -4
  72. package/dist/jsx/hooks/useFeatures.js +1 -0
  73. package/dist/jsx/hooks/useMedia.js +5 -31
  74. package/dist/jsx/styled.js +1 -8
  75. package/dist/jsx/tamagui-base.css +7 -0
  76. package/dist/jsx/views/Theme.js +4 -16
  77. package/package.json +6 -6
  78. package/types/createComponent.d.ts +5 -6
  79. package/types/createComponent.d.ts.map +1 -1
  80. package/types/defaultComponentState.d.ts +0 -12
  81. package/types/defaultComponentState.d.ts.map +1 -1
  82. package/types/helpers/RNComponents.d.ts +2 -0
  83. package/types/helpers/RNComponents.d.ts.map +1 -0
  84. package/types/helpers/createMediaStyle.d.ts +1 -1
  85. package/types/helpers/createMediaStyle.d.ts.map +1 -1
  86. package/types/helpers/createPropMapper.d.ts +2 -2
  87. package/types/helpers/createPropMapper.d.ts.map +1 -1
  88. package/types/helpers/createShallowUpdate.d.ts +4 -0
  89. package/types/helpers/createShallowUpdate.d.ts.map +1 -0
  90. package/types/helpers/createTamaguiProvider.d.ts +1 -1
  91. package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
  92. package/types/helpers/getSplitStyles.d.ts +3 -14
  93. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  94. package/types/helpers/getStylesAtomic.d.ts.map +1 -1
  95. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  96. package/types/hooks/useFeatures.d.ts +7 -5
  97. package/types/hooks/useFeatures.d.ts.map +1 -1
  98. package/types/hooks/useMedia.d.ts.map +1 -1
  99. package/types/styled.d.ts +3 -7
  100. package/types/styled.d.ts.map +1 -1
  101. package/types/types-rnw.d.ts +0 -5
  102. package/types/types-rnw.d.ts.map +1 -1
  103. package/types/types.d.ts +77 -64
  104. package/types/types.d.ts.map +1 -1
  105. package/types/views/Stack.d.ts +2 -2
  106. package/types/views/Stack.d.ts.map +1 -1
  107. package/types/views/Text.d.ts +2 -2
  108. package/types/views/Text.d.ts.map +1 -1
  109. package/types/views/Theme.d.ts.map +1 -1
@@ -8,27 +8,15 @@ React["createElement"];
8
8
  const Theme = memo(/* @__PURE__ */ __name(function Theme2(props) {
9
9
  var _a, _b;
10
10
  const { name, theme, themeManager, themes, className } = useChangeThemeEffect(props.name, void 0, props);
11
- const contents = useMemo(() => {
12
- if (!name || !theme) {
13
- return props.children;
14
- }
15
- return wrapThemeManagerContext(props.children, themeManager);
16
- }, [props.children, themeManager]);
17
- if (!themes) {
18
- console.warn("Error, no themes in context", props);
19
- return props.children;
20
- }
21
- if (!name || !theme) {
22
- if (process.env.NODE_ENV === "development" && name && !theme) {
11
+ if (!themes || !name || !theme) {
12
+ if (name && !theme && process.env.NODE_ENV === "development") {
23
13
  console.warn(`No theme found by name ${name}`);
24
14
  }
25
15
  return props.children;
26
16
  }
17
+ const contents = useMemo(() => wrapThemeManagerContext(props.children, themeManager), [props.children, themeManager]);
27
18
  if (isWeb) {
28
- if (props.disableThemeClass) {
29
- return contents;
30
- }
31
- return <div className={props.className ? `${className || ""} ${props.className || ""}` : className || ""} style={{
19
+ return <div className={props.disableThemeClass ? "" : props.className ? `${className || ""} ${props.className || ""}` : className || ""} style={{
32
20
  display: "contents",
33
21
  color: (_b = (_a = themes[name]) == null ? void 0 : _a.color) == null ? void 0 : _b.toString()
34
22
  }}>{contents}</div>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "1.0.0-beta.179+a2bba1a8",
3
+ "version": "1.0.0-beta.200+9591831d",
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.179+a2bba1a8",
22
+ "@tamagui/helpers": "^1.0.0-beta.200+9591831d",
23
23
  "@tamagui/ow": "^0.28.1",
24
- "@tamagui/use-debounce": "^1.0.0-beta.179+a2bba1a8",
25
- "@tamagui/use-force-update": "^1.0.0-beta.179+a2bba1a8",
24
+ "@tamagui/use-debounce": "^1.0.0-beta.200+9591831d",
25
+ "@tamagui/use-force-update": "^1.0.0-beta.200+9591831d",
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.179+a2bba1a8",
33
+ "@tamagui/build": "^1.0.0-beta.200+9591831d",
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": "a2bba1a86895896d70f8d1b91a5faf94adf776e4"
43
+ "gitHead": "9591831d7d4a58cc4e01846e68a0d3324570b5c8"
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":";AAaA,OAAO,EAAoB,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAehE,OAAO,EAEL,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,4DAomBrD;AAKD,eAAO,MAAM,MAAM;;;;mBA4CjB,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;AAED,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,7 +1,7 @@
1
1
  import { StyleObject } from '@tamagui/helpers';
2
2
  import { MediaQueries } from '../types';
3
3
  export declare const MEDIA_SEP = "_";
4
- export declare const createMediaStyle: ({ identifier, rules }: StyleObject, mediaKey: string, mediaQueries: MediaQueries, negate?: boolean | undefined, importance?: number) => {
4
+ export declare const createMediaStyle: ({ identifier, rules }: StyleObject, mediaKey: string, mediaQueries: MediaQueries, negate?: boolean | undefined, importance?: number | undefined) => {
5
5
  styleRule: string;
6
6
  identifier: string;
7
7
  };
@@ -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;AAKvC,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';
3
- export declare const createPropMapper: (c: StaticConfig) => (key: string, value: any, theme: any, props: any, staticConfig: StaticConfig, returnVariablesAs?: ResolveVariableTypes, avoidDefaultProps?: boolean) => any;
2
+ export declare type ResolveVariableTypes = 'auto' | 'value' | 'variable' | 'both';
3
+ export declare const createPropMapper: (staticConfig: StaticConfig) => (key: string, value: any, theme: any, props: any, 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,iBAAkB,YAAY,WA6BlD,MAAM,SACJ,GAAG,SACH,GAAG,SACH,GAAG,sBACS,oBAAoB,qCAwE1C,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,27 +1,16 @@
1
1
  import { ViewStyle } from 'react-native';
2
- import { ComponentState } from '../defaultComponentState';
3
- import { StackProps, StaticConfigParsed, ThemeObject } from '../types';
4
- import { ResolveVariableTypes } from './createPropMapper';
2
+ import { PseudoStyles, SplitStyleState, StackProps, StaticConfigParsed, ThemeObject } from '../types';
5
3
  export declare type SplitStyles = ReturnType<typeof getSplitStyles>;
6
- export declare type PseudoStyles = {
7
- hoverStyle?: ViewStyle;
8
- pressStyle?: ViewStyle;
9
- focusStyle?: ViewStyle;
10
- enterStyle?: ViewStyle;
11
- exitStyle?: ViewStyle;
12
- };
13
4
  export declare type ClassNamesObject = Record<string, string>;
14
5
  export declare type SplitStyleResult = ReturnType<typeof getSplitStyles>;
15
6
  export declare const getSplitStyles: (props: {
16
7
  [key: string]: any;
17
- }, staticConfig: StaticConfigParsed, theme: ThemeObject, state: Partial<ComponentState> & {
18
- noClassNames?: boolean;
19
- resolveVariablesAs?: ResolveVariableTypes;
20
- }, defaultClassNames?: ClassNamesObject | null | undefined) => {
8
+ }, staticConfig: StaticConfigParsed, theme: ThemeObject, state: SplitStyleState, defaultClassNames?: ClassNamesObject | null | undefined) => {
21
9
  viewProps: StackProps;
22
10
  style: ViewStyle;
23
11
  medias: Record<string, ViewStyle>;
24
12
  pseudos: PseudoStyles;
25
13
  classNames: ClassNamesObject;
26
14
  };
15
+ export declare const getSubStyle: (styleIn: Object, staticConfig: StaticConfigParsed, theme: ThemeObject, props: any, state: SplitStyleState, avoidDefaultProps?: boolean | undefined) => ViewStyle;
27
16
  //# sourceMappingURL=getSplitStyles.d.ts.map
@@ -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,EAGL,YAAY,EAEZ,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,WAAW,EACZ,MAAM,UAAU,CAAA;AAOjB,oBAAY,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAW3D,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,eAAe;;;;;;CA2PvB,CAAA;AAED,eAAO,MAAM,WAAW,YACb,MAAM,gBACD,kBAAkB,SACzB,WAAW,SACX,GAAG,SACH,eAAe,8CAErB,SAuBF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"getStylesAtomic.d.ts","sourceRoot":"","sources":["../../src/helpers/getStylesAtomic.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAIZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAUxC,oBAAY,oBAAoB,GAAG,SAAS,GAAG;IAC7C,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;CACvB,CAAA;AAED,aAAK,kBAAkB,GAAG;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,GAAE,kBAAuB,iBAwB/F;AAgGD,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAanB,CAAA"}
1
+ {"version":3,"file":"getStylesAtomic.d.ts","sourceRoot":"","sources":["../../src/helpers/getStylesAtomic.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAIZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAUxC,oBAAY,oBAAoB,GAAG,SAAS,GAAG;IAC7C,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;CACvB,CAAA;AAED,aAAK,kBAAkB,GAAG;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,GAAE,kBAAuB,iBAwB/F;AAiGD,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAanB,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;AAuBxD,wBAAgB,cAAc,SA6B7B;AASD,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAmB/D"}
@@ -1,15 +1,17 @@
1
1
  /// <reference types="react" />
2
2
  import { ViewStyle } from 'react-native';
3
- import { ComponentState } from '../defaultComponentState';
4
- import { PseudoStyles } from '../static';
5
- import { UseAnimationHook } from '../types';
3
+ import { PseudoStyles, SplitStyleState } from '../types';
4
+ import { StaticConfigParsed, TamaguiComponentState, UseAnimationHook } from '../types';
6
5
  declare type FeatureUtils = {
7
6
  forceUpdate: Function;
8
- state: ComponentState;
9
- setStateShallow: (next: Partial<ComponentState>) => void;
7
+ state: SplitStyleState;
8
+ setStateShallow: (next: Partial<TamaguiComponentState>) => void;
10
9
  useAnimations?: UseAnimationHook;
11
10
  pseudos: PseudoStyles;
12
11
  style: ViewStyle | null | undefined;
12
+ staticConfig: StaticConfigParsed;
13
+ theme: any;
14
+ onDidAnimate?: () => void;
13
15
  };
14
16
  export declare const useFeatures: (props: any, utils?: FeatureUtils | undefined) => JSX.Element[];
15
17
  export {};
@@ -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;AAIxC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,EAEL,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAEjB,MAAM,UAAU,CAAA;AAQjB,aAAK,YAAY,GAAG;IAClB,WAAW,EAAE,QAAQ,CAAA;IACrB,KAAK,EAAE,eAAe,CAAA;IACtB,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;IACnC,YAAY,EAAE,kBAAkB,CAAA;IAChC,KAAK,EAAE,GAAG,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B,CAAA;AAeD,eAAO,MAAM,WAAW,UAAW,GAAG,oDAYrC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../src/hooks/useMedia.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,UAAU,CAAA;AAGjB,eAAO,MAAM,UAAU,EAAE;KAAG,GAAG,IAAI,MAAM,eAAe,GAAG,OAAO;CAAc,CAAA;AAGhF,eAAO,MAAM,qBAAqB,QAAS,MAAM,MAAM,GAAG,SAGzD,CAAA;AAED,eAAO,MAAM,wBAAwB,QAAS,MAAM,MAAM,GAAG,SAE5D,CAAA;AAID,eAAO,MAAM,gBAAgB,cAwB3B,CAAA;AAEF,eAAO,MAAM,QAAQ;;CAKpB,CAAA;AAED,eAAO,MAAM,cAAc,iCAGxB,0BAA0B,SAuC5B,CAAA;AASD,eAAO,MAAM,QAAQ;;CAiEpB,CAAA;AAMD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,UAgBnE"}
1
+ {"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../src/hooks/useMedia.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,UAAU,CAAA;AAGjB,eAAO,MAAM,UAAU,EAAE;KAAG,GAAG,IAAI,MAAM,eAAe,GAAG,OAAO;CAAc,CAAA;AAGhF,eAAO,MAAM,qBAAqB,QAAS,MAAM,MAAM,GAAG,SAGzD,CAAA;AAED,eAAO,MAAM,wBAAwB,QAAS,MAAM,MAAM,GAAG,SAE5D,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,YAAiB,CAAA;AAEhD,eAAO,MAAM,QAAQ;;CAEpB,CAAA;AAED,eAAO,MAAM,cAAc,iCAGxB,0BAA0B,SAwC5B,CAAA;AASD,eAAO,MAAM,QAAQ;;CAiEpB,CAAA;AAMD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,UAgBnE"}
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<ParentComponent> | symbol = VariantDefinitions<ParentComponent> | symbol>(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>) & Omit<ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : Object, keyof (Variants extends symbol ? {} : { [Key in keyof Variants]?: GetVariantValues<keyof Variants[Key]> | undefined; })> & (Variants extends symbol ? {} : { [Key in keyof Variants]?: 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 : Object, keyof (Variants extends symbol ? {} : { [Key in keyof Variants]?: GetVariantValues<keyof Variants[Key]> | undefined; })> & (Variants extends symbol ? {} : { [Key in keyof Variants]?: 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 : Object, keyof (Variants extends symbol ? {} : { [Key in keyof Variants]?: GetVariantValues<keyof Variants[Key]> | undefined; })> & (Variants extends symbol ? {} : { [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 symbol ? {} : { [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,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;IAC/B,eAAe,CAAC,EAAE,QAAQ,SAAS,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAA;CAC9E,EACD,uBAAuB,CAAC,EAAE,YAAY,2pDAuEvC"}
@@ -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,MAA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M,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"}
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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AAE,OAAO,CAAA;IACvC,0BAA0B,CAAC,EAAE,OAAO,CAAA;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
+ animateOnly?: 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;
@@ -195,11 +197,16 @@ export declare type PseudoProps<A> = {
195
197
  enterStyle?: A | null;
196
198
  };
197
199
  export declare type PsuedoPropKeys = keyof PseudoProps<any>;
200
+ export declare type PseudoStyles = {
201
+ hoverStyle?: ViewStyle;
202
+ pressStyle?: ViewStyle;
203
+ focusStyle?: ViewStyle;
204
+ enterStyle?: ViewStyle;
205
+ exitStyle?: ViewStyle;
206
+ };
198
207
  declare type WithThemeAndShorthands<A extends object> = WithThemeValues<A> & WithShorthands<WithThemeValues<A>>;
199
208
  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
- };
209
+ declare type WithThemeShorthandsPseudosMediaAnimation<A extends object> = WithThemeShorthandsAndPseudos<A> & MediaProps<WithThemeShorthandsAndPseudos<A>>;
203
210
  declare type WebOnlyStyleProps = {
204
211
  cursor?: string;
205
212
  contain?: 'none' | 'strict' | 'content' | 'size' | 'layout' | 'paint' | string;
@@ -207,10 +214,10 @@ declare type WebOnlyStyleProps = {
207
214
  pointerEvents?: ViewProps['pointerEvents'];
208
215
  };
209
216
  export declare type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> & TransformStyleProps & WebOnlyStyleProps;
217
+ export declare type StackPropsBaseShared = Omit<ViewProps, 'display' | 'children'> & RNWViewProps & TamaguiComponentPropsBase;
210
218
  export declare type StackStyleProps = WithThemeShorthandsPseudosMediaAnimation<StackStylePropsBase>;
211
- export declare type StackProps = Omit<ViewProps, 'display' | 'children'> & RNWViewProps & StackStyleProps & ComponentPropsBase & {
212
- children?: any | any[];
213
- };
219
+ export declare type StackPropsBase = StackPropsBaseShared & WithThemeAndShorthands<StackStylePropsBase>;
220
+ export declare type StackProps = StackPropsBaseShared & StackStyleProps;
214
221
  export declare type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps & WebOnlyStyleProps & {
215
222
  ellipse?: boolean;
216
223
  selectable?: boolean;
@@ -221,23 +228,23 @@ export declare type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVi
221
228
  wordWrap?: CSS.Properties['wordWrap'];
222
229
  cursor?: CSS.Properties['cursor'];
223
230
  };
231
+ export declare type TextPropsBaseShared = Omit<ReactTextProps, 'children'> & RNWTextProps & TamaguiComponentPropsBase;
232
+ export declare type TextPropsBase = TextPropsBaseShared & WithThemeAndShorthands<TextStylePropsBase>;
224
233
  export declare type TextStyleProps = WithThemeShorthandsPseudosMediaAnimation<TextStylePropsBase>;
225
- export declare type TextProps = ReactTextProps & RNWTextProps & TextStyleProps & ComponentPropsBase;
234
+ export declare type TextProps = TextPropsBaseShared & TextStyleProps;
226
235
  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;
236
+ export declare type TamaguiComponent<Props = any, Ref = any, BaseProps = {}, VariantProps = {}> = ReactComponentWithRef<Props, Ref> & StaticComponentObject;
237
+ declare type StaticComponentObject = {
238
+ staticConfig: StaticConfig;
231
239
  extractable: <X>(a: X, opts?: StaticConfig) => X;
232
240
  };
233
241
  export declare type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {
234
242
  injectCSS?: boolean;
235
- fallback?: any;
236
- children?: any;
243
+ children?: React.ReactNode;
237
244
  };
238
245
  export declare type StaticConfigParsed = StaticConfig & {
239
246
  parsed: true;
240
- propMapper: (key: string, value: any, theme: ThemeObject, props: any, staticConfig: StaticConfig, resolveVariablesAs?: ResolveVariableTypes, avoidDefaultProps?: boolean) => undefined | boolean | {
247
+ propMapper: (key: string, value: any, theme: ThemeObject, props: any, resolveVariablesAs?: ResolveVariableTypes, avoidDefaultProps?: boolean) => undefined | boolean | {
241
248
  [key: string]: any;
242
249
  };
243
250
  variantsParsed?: {
@@ -247,7 +254,7 @@ export declare type StaticConfigParsed = StaticConfig & {
247
254
  };
248
255
  };
249
256
  export declare type StaticConfig = {
250
- Component?: React.FunctionComponent<any> & StaticComponentObject<any, any>;
257
+ Component?: React.FunctionComponent<any> & StaticComponentObject;
251
258
  variants?: {
252
259
  [key: string]: {
253
260
  [key: string]: ((a: any, b: any) => any) | {
@@ -277,29 +284,19 @@ export declare type StaticConfig = {
277
284
  memo?: boolean;
278
285
  isTamagui?: boolean;
279
286
  };
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> = {
287
+ export declare type StylableComponent = TamaguiComponent | React.Component | React.ForwardRefExoticComponent<any> | (new (props: any) => any) | typeof View | typeof Text | typeof TextInput | typeof Image;
288
+ export declare type GetBaseProps<A extends StylableComponent> = A extends TamaguiComponent<any, any, infer BaseProps> ? BaseProps : never;
289
+ 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 : {};
290
+ export declare type SpreadKeys = '...fontSize' | '...size' | '...color' | '...lineHeight' | '...letterSpacing' | '...zIndex' | '...theme';
291
+ export declare type VariantDefinitions<Parent extends StylableComponent = TamaguiComponent, MyProps = GetProps<Parent>> = MyProps extends Object ? {
283
292
  [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>;
293
+ [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;
294
+ } & {
295
+ [Key in string]?: MyProps | VariantSpreadFunction<MyProps, any>;
299
296
  };
300
- };
297
+ } : never;
301
298
  export declare type GetVariantProps<Variants extends Object> = {
302
- [key in keyof Variants]?: GetVariantValues<keyof Variants[key], keyof Variants[key]>;
299
+ [Key in keyof Variants]?: GetVariantValues<keyof Variants[Key]>;
303
300
  };
304
301
  export declare type VariantSpreadExtras<Props> = {
305
302
  tokens: TamaguiConfig['tokens'];
@@ -308,25 +305,20 @@ export declare type VariantSpreadExtras<Props> = {
308
305
  } ? B : unknown;
309
306
  props: Props;
310
307
  };
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 {
308
+ declare type PropLike = {
313
309
  [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
310
  };
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>;
311
+ export declare type VariantSpreadFunction<Props extends PropLike, Val = any> = (val: Val, config: VariantSpreadExtras<Props>) => {
312
+ [Key in keyof Props]: Props[Key] | Variable;
313
+ } | null | undefined;
314
+ 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;
315
+ export declare type FontSizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontSizeTokens>;
316
+ export declare type SizeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, SizeTokens>;
317
+ export declare type ColorVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ColorTokens>;
318
+ export declare type FontLineHeightVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLineHeightTokens>;
319
+ export declare type FontLetterSpacingVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, FontLetterSpacingTokens>;
320
+ export declare type ZIndexVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ZIndexTokens>;
321
+ export declare type ThemeVariantSpreadFunction<A extends PropLike> = VariantSpreadFunction<A, ThemeTokens>;
330
322
  declare type SizeKeys = 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight';
331
323
  declare type FontKeys = 'fontFamily';
332
324
  declare type FontSizeKeys = 'fontSize';
@@ -337,6 +329,22 @@ declare type ZIndexKeys = 'zIndex';
337
329
  declare type ColorKeys = 'color' | 'backgroundColor' | 'borderColor' | 'borderBottomColor' | 'borderTopColor' | 'borderLeftColor' | 'borderRightColor' | 'shadowColor';
338
330
  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
331
  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';
332
+ export declare type TamaguiComponentState = {
333
+ hover: boolean;
334
+ press: boolean;
335
+ pressIn: boolean;
336
+ focus: boolean;
337
+ mounted: boolean;
338
+ animation?: null | {
339
+ style?: any;
340
+ avoidClasses?: boolean;
341
+ };
342
+ };
343
+ export declare type SplitStyleState = TamaguiComponentState & {
344
+ noClassNames?: boolean;
345
+ resolveVariablesAs?: ResolveVariableTypes;
346
+ fallbackProps?: Object;
347
+ };
340
348
  declare type AnimationConfig = {
341
349
  [key: string]: any;
342
350
  };
@@ -347,19 +355,24 @@ export declare type AnimationDriver<A extends AnimationConfig = AnimationConfig>
347
355
  View?: any;
348
356
  Text?: any;
349
357
  };
350
- export declare type UseAnimationProps = {
358
+ export declare type UseAnimationProps = TamaguiComponentPropsBase & Record<string, any> & {
351
359
  animation: string;
352
- [key: string]: any;
353
360
  };
354
- export declare type UseAnimationState = {
355
- style: ViewStyle | null | undefined;
356
- isMounted: boolean;
357
- exitStyle?: ViewStyle | null;
361
+ export declare type UseAnimationHelpers = {
362
+ staticConfig: StaticConfigParsed;
363
+ getStyle: (props?: {
364
+ isEntering?: boolean;
365
+ exitVariant?: string | null;
366
+ enterVariant?: string | null;
367
+ }) => ViewStyle;
368
+ state: SplitStyleState;
369
+ pseudos: PseudoProps<ViewStyle>;
358
370
  onDidAnimate?: any;
359
371
  delay?: number;
360
372
  };
361
- export declare type UseAnimationHook = (props: UseAnimationProps, state: UseAnimationState) => {
362
- style?: StackStylePropsBase;
373
+ export declare type UseAnimationHook = (props: UseAnimationProps, helpers: UseAnimationHelpers) => {
374
+ style?: StackStylePropsBase | StackStylePropsBase[];
375
+ safeToUnmount?: () => void;
363
376
  };
364
377
  export {};
365
378
  //# sourceMappingURL=types.d.ts.map