@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.
- package/dist/cjs/constants/pseudos.js +37 -0
- package/dist/cjs/constants/pseudos.js.map +7 -0
- package/dist/cjs/createComponent.js +45 -45
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createShallowUpdate.js +1 -0
- package/dist/cjs/createShallowUpdate.js.map +7 -0
- package/dist/cjs/defaultComponentState.js +0 -30
- package/dist/cjs/defaultComponentState.js.map +3 -3
- package/dist/cjs/devtools.js +32 -0
- package/dist/cjs/devtools.js.map +7 -0
- package/dist/cjs/helpers/RNComponents.js +34 -0
- package/dist/cjs/helpers/RNComponents.js.map +7 -0
- package/dist/cjs/helpers/createMediaStyle.js +2 -0
- package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js.map +1 -1
- package/dist/cjs/helpers/createShallowUpdate.js +51 -0
- package/dist/cjs/helpers/createShallowUpdate.js.map +7 -0
- package/dist/cjs/helpers/createTamaguiProvider.js +1 -5
- package/dist/cjs/helpers/createTamaguiProvider.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +7 -7
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/insertStyleRule.js +6 -5
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/hooks/useFeatures.js +11 -6
- package/dist/cjs/hooks/useFeatures.js.map +2 -2
- package/dist/cjs/styled.js +2 -12
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/tamagui-base.css +8 -0
- package/dist/cjs/tamagui-base.css.map +7 -0
- package/dist/cjs/types-rnw.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/views/Stack.js.map +2 -2
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/cjs/views/Theme.js +4 -1
- package/dist/cjs/views/Theme.js.map +2 -2
- package/dist/esm/constants/pseudos.js +18 -0
- package/dist/esm/constants/pseudos.js.map +7 -0
- package/dist/esm/createComponent.js +43 -43
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createShallowUpdate.js +1 -0
- package/dist/esm/createShallowUpdate.js.map +7 -0
- package/dist/esm/defaultComponentState.js +0 -11
- package/dist/esm/defaultComponentState.js.map +3 -3
- package/dist/esm/devtools.js +14 -0
- package/dist/esm/devtools.js.map +7 -0
- package/dist/esm/helpers/RNComponents.js +12 -0
- package/dist/esm/helpers/RNComponents.js.map +7 -0
- package/dist/esm/helpers/createMediaStyle.js +2 -0
- package/dist/esm/helpers/createMediaStyle.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js.map +1 -1
- package/dist/esm/helpers/createShallowUpdate.js +19 -0
- package/dist/esm/helpers/createShallowUpdate.js.map +7 -0
- package/dist/esm/helpers/createTamaguiProvider.js +1 -4
- package/dist/esm/helpers/createTamaguiProvider.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +7 -7
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +6 -5
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/hooks/useFeatures.js +17 -11
- package/dist/esm/hooks/useFeatures.js.map +2 -2
- package/dist/esm/styled.js +1 -8
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/tamagui-base.css +8 -0
- package/dist/esm/tamagui-base.css.map +7 -0
- package/dist/esm/views/Stack.js.map +2 -2
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/esm/views/Theme.js +4 -1
- package/dist/esm/views/Theme.js.map +2 -2
- package/dist/jsx/constants/pseudos.js +17 -0
- package/dist/jsx/createComponent.js +39 -40
- package/dist/jsx/createShallowUpdate.js +0 -0
- package/dist/jsx/defaultComponentState.js +0 -11
- package/dist/jsx/devtools.js +13 -0
- package/dist/jsx/helpers/RNComponents.js +11 -0
- package/dist/jsx/helpers/createMediaStyle.js +2 -0
- package/dist/jsx/helpers/createShallowUpdate.js +18 -0
- package/dist/jsx/helpers/createTamaguiProvider.js +1 -2
- package/dist/jsx/helpers/getSplitStyles.js +7 -7
- package/dist/jsx/helpers/insertStyleRule.js +6 -5
- package/dist/jsx/hooks/useFeatures.js +17 -11
- package/dist/jsx/styled.js +1 -8
- package/dist/jsx/tamagui-base.css +7 -0
- package/dist/jsx/views/Theme.js +4 -1
- package/package.json +6 -6
- package/types/createComponent.d.ts +5 -6
- package/types/createComponent.d.ts.map +1 -1
- package/types/defaultComponentState.d.ts +0 -12
- package/types/defaultComponentState.d.ts.map +1 -1
- package/types/helpers/RNComponents.d.ts +2 -0
- package/types/helpers/RNComponents.d.ts.map +1 -0
- package/types/helpers/createMediaStyle.d.ts.map +1 -1
- package/types/helpers/createPropMapper.d.ts +1 -1
- package/types/helpers/createPropMapper.d.ts.map +1 -1
- package/types/helpers/createShallowUpdate.d.ts +4 -0
- package/types/helpers/createShallowUpdate.d.ts.map +1 -0
- package/types/helpers/createTamaguiProvider.d.ts +1 -1
- package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +2 -3
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/hooks/useFeatures.d.ts +3 -4
- package/types/hooks/useFeatures.d.ts.map +1 -1
- package/types/styled.d.ts +3 -7
- package/types/styled.d.ts.map +1 -1
- package/types/types-rnw.d.ts +0 -5
- package/types/types-rnw.d.ts.map +1 -1
- package/types/types.d.ts +61 -62
- package/types/types.d.ts.map +1 -1
- package/types/views/Stack.d.ts +2 -2
- package/types/views/Stack.d.ts.map +1 -1
- package/types/views/Text.d.ts +2 -2
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts.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
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
}, [
|
|
64
|
+
}, [styleKey]);
|
|
59
65
|
return null;
|
|
60
66
|
},
|
|
61
67
|
propNames: ["animation"]
|
package/dist/jsx/styled.js
CHANGED
|
@@ -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
|
-
|
|
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) {
|
package/dist/jsx/views/Theme.js
CHANGED
|
@@ -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={
|
|
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.
|
|
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.
|
|
22
|
+
"@tamagui/helpers": "^1.0.0-beta.207+3fd10ea6",
|
|
23
23
|
"@tamagui/ow": "^0.28.1",
|
|
24
|
-
"@tamagui/use-debounce": "^1.0.0-beta.
|
|
25
|
-
"@tamagui/use-force-update": "^1.0.0-beta.
|
|
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.
|
|
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": "
|
|
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,
|
|
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
|
|
6
|
-
export declare
|
|
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
|
-
},
|
|
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;
|
|
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":"
|
|
1
|
+
{"version":3,"file":"defaultComponentState.d.ts","sourceRoot":"","sources":["../src/defaultComponentState.tsx"],"names":[],"mappings":""}
|
|
@@ -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;;;
|
|
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;
|
|
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,
|
|
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,
|
|
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 {
|
|
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<
|
|
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;
|
|
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,
|
|
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:
|
|
9
|
-
setStateShallow: (next: Partial<
|
|
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,
|
|
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,
|
|
2
|
-
export declare function styled<ParentComponent extends StylableComponent, Variants extends VariantDefinitions<
|
|
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):
|
|
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
|
package/types/styled.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EACR,eAAe,
|
|
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"}
|
package/types/types-rnw.d.ts
CHANGED
|
@@ -42,11 +42,6 @@ export interface RNWTextProps {
|
|
|
42
42
|
selected?: boolean;
|
|
43
43
|
};
|
|
44
44
|
href?: string;
|
|
45
|
-
hrefAttrs?: {
|
|
46
|
-
target?: '_blank' | '_self' | '_top' | 'blank' | 'self' | 'top';
|
|
47
|
-
rel?: string;
|
|
48
|
-
download?: boolean;
|
|
49
|
-
};
|
|
50
45
|
onMouseEnter?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
51
46
|
onMouseLeave?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
52
47
|
onFocus?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
package/types/types-rnw.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-rnw.d.ts","sourceRoot":"","sources":["../src/types-rnw.tsx"],"names":[],"mappings":";AAEA,aAAK,cAAc,GACf,OAAO,GACP,YAAY,GACZ,MAAM,GACN,MAAM,GACN,cAAc,GACd,MAAM,GACN,WAAW,GACX,SAAS,GACT,MAAM,GACN,UAAU,GACV,MAAM,GACN,SAAS,GACT,UAAU,GACV,MAAM,GACN,MAAM,GACN,eAAe,GACf,MAAM,GACN,MAAM,GACN,SAAS,GACT,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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I,CAAA;IAC5E,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;IAE3D,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,+BAA+B,CAAC,EAAE,OAAO,CAAA;IACzC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,6BAA6B,CAAC,EAAE,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
|
|
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
|
|
151
|
-
|
|
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
|
|
212
|
-
|
|
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 =
|
|
227
|
+
export declare type TextProps = TextPropsBaseShared & TextStyleProps;
|
|
226
228
|
export declare type ViewOrTextProps = WithThemeShorthandsPseudosMediaAnimation<Omit<TextStylePropsBase, keyof StackStylePropsBase> & StackStylePropsBase>;
|
|
227
|
-
export declare type
|
|
228
|
-
declare type StaticComponentObject
|
|
229
|
-
staticConfig:
|
|
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
|
-
|
|
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
|
|
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 =
|
|
281
|
-
export declare type
|
|
282
|
-
export declare type
|
|
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'
|
|
285
|
-
}
|
|
286
|
-
[Key in
|
|
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
|
-
[
|
|
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
|
-
|
|
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
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
export declare type
|
|
326
|
-
export declare type
|
|
327
|
-
export declare type
|
|
328
|
-
export declare type
|
|
329
|
-
export declare type
|
|
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
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
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,
|
|
360
|
+
export declare type UseAnimationHook = (props: UseAnimationProps, helpers: UseAnimationHelpers) => {
|
|
362
361
|
style?: StackStylePropsBase;
|
|
363
362
|
};
|
|
364
363
|
export {};
|