@tamagui/core 1.0.0-alpha.27 → 1.0.0-alpha.31
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/createComponent.js +23 -26
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createTamagui.js +60 -45
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createTheme.js +1 -32
- package/dist/cjs/createTheme.js.map +2 -2
- package/dist/cjs/hooks/useTheme.js +8 -2
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/esm/createComponent.js +23 -26
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createTamagui.js +60 -46
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createTheme.js +1 -16
- package/dist/esm/createTheme.js.map +2 -2
- package/dist/esm/hooks/useTheme.js +8 -2
- package/dist/esm/hooks/useTheme.js.map +2 -2
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/jsx/createComponent.js +23 -26
- package/dist/jsx/createTamagui.js +60 -46
- package/dist/jsx/createTheme.js +1 -16
- package/dist/jsx/hooks/useTheme.js +8 -2
- package/package.json +7 -7
- package/types/constants/constants.d.ts +8 -0
- package/types/constants/constants.d.ts.map +1 -0
- package/types/constants/platform.d.ts +9 -0
- package/types/constants/platform.d.ts.map +1 -0
- package/types/constants/pseudos.d.ts +15 -0
- package/types/constants/pseudos.d.ts.map +1 -0
- package/types/constants/rnw.d.ts +2 -0
- package/types/constants/rnw.d.ts.map +1 -0
- package/types/createComponent.d.ts +17 -0
- package/types/createComponent.d.ts.map +1 -0
- package/types/createFont.d.ts +3 -0
- package/types/createFont.d.ts.map +1 -0
- package/types/createShorthands.d.ts +2 -0
- package/types/createShorthands.d.ts.map +1 -0
- package/types/createTamagui.d.ts +54 -0
- package/types/createTamagui.d.ts.map +1 -0
- package/types/createTheme.d.ts +7 -0
- package/types/createTheme.d.ts.map +1 -0
- package/types/createTokens.d.ts +55 -0
- package/types/createTokens.d.ts.map +1 -0
- package/types/createVariable.d.ts +15 -0
- package/types/createVariable.d.ts.map +1 -0
- package/types/helpers/addStylesUsingClassname.d.ts +3 -0
- package/types/helpers/addStylesUsingClassname.d.ts.map +1 -0
- package/types/helpers/createMediaStyle.d.ts +8 -0
- package/types/helpers/createMediaStyle.d.ts.map +1 -0
- package/types/helpers/createPropMapper.d.ts +3 -0
- package/types/helpers/createPropMapper.d.ts.map +1 -0
- package/types/helpers/createTamaguiProvider.d.ts +5 -0
- package/types/helpers/createTamaguiProvider.d.ts.map +1 -0
- package/types/helpers/extendStaticConfig.d.ts +5 -0
- package/types/helpers/extendStaticConfig.d.ts.map +1 -0
- package/types/helpers/fixNativeShadow.d.ts +2 -0
- package/types/helpers/fixNativeShadow.d.ts.map +1 -0
- package/types/helpers/fixNativeShadow.native.d.ts +2 -0
- package/types/helpers/fixNativeShadow.native.d.ts.map +1 -0
- package/types/helpers/getSplitStyles.d.ts +15 -0
- package/types/helpers/getSplitStyles.d.ts.map +1 -0
- package/types/helpers/getStylesAtomic.d.ts +3 -0
- package/types/helpers/getStylesAtomic.d.ts.map +1 -0
- package/types/helpers/getStylesAtomic.native.d.ts +2 -0
- package/types/helpers/getStylesAtomic.native.d.ts.map +1 -0
- package/types/helpers/insertStyleRule.d.ts +2 -0
- package/types/helpers/insertStyleRule.d.ts.map +1 -0
- package/types/helpers/isObj.d.ts +2 -0
- package/types/helpers/isObj.d.ts.map +1 -0
- package/types/helpers/isTamaguiElement.d.ts +3 -0
- package/types/helpers/isTamaguiElement.d.ts.map +1 -0
- package/types/helpers/matchMedia.d.ts +2 -0
- package/types/helpers/matchMedia.d.ts.map +1 -0
- package/types/helpers/matchMedia.native.d.ts +3 -0
- package/types/helpers/matchMedia.native.d.ts.map +1 -0
- package/types/helpers/themeable.d.ts +10 -0
- package/types/helpers/themeable.d.ts.map +1 -0
- package/types/helpers/validate.d.ts +4 -0
- package/types/helpers/validate.d.ts.map +1 -0
- package/types/hooks/useConstant.d.ts +2 -0
- package/types/hooks/useConstant.d.ts.map +1 -0
- package/types/hooks/useFeatures.d.ts +5 -0
- package/types/hooks/useFeatures.d.ts.map +1 -0
- package/types/hooks/useMedia.d.ts +16 -0
- package/types/hooks/useMedia.d.ts.map +1 -0
- package/types/hooks/usePressable.d.ts +3 -0
- package/types/hooks/usePressable.d.ts.map +1 -0
- package/types/hooks/useTheme.d.ts +7 -0
- package/types/hooks/useTheme.d.ts.map +1 -0
- package/types/index.d.ts +29 -0
- package/types/index.d.ts.map +1 -0
- package/types/static/postProcessStyles.d.ts +7 -0
- package/types/static/postProcessStyles.d.ts.map +1 -0
- package/types/static.d.ts +15 -0
- package/types/static.d.ts.map +1 -0
- package/types/styled.d.ts +21 -0
- package/types/styled.d.ts.map +1 -0
- package/types/types.d.ts +314 -0
- package/types/types.d.ts.map +1 -0
- package/types/views/Animated.d.ts +15 -0
- package/types/views/Animated.d.ts.map +1 -0
- package/types/views/Stack.d.ts +3 -0
- package/types/views/Stack.d.ts.map +1 -0
- package/types/views/Text.d.ts +3 -0
- package/types/views/Text.d.ts.map +1 -0
- package/types/views/TextAncestorContext.d.ts +5 -0
- package/types/views/TextAncestorContext.d.ts.map +1 -0
- package/types/views/Theme.d.ts +8 -0
- package/types/views/Theme.d.ts.map +1 -0
- package/types/views/ThemeContext.d.ts +18 -0
- package/types/views/ThemeContext.d.ts.map +1 -0
- package/types/views/ThemeInverse.d.ts +10 -0
- package/types/views/ThemeInverse.d.ts.map +1 -0
- package/types/views/ThemeManagerContext.d.ts +22 -0
- package/types/views/ThemeManagerContext.d.ts.map +1 -0
- package/types/views/ThemeProvider.d.ts +10 -0
- package/types/views/ThemeProvider.d.ts.map +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class Variable {
|
|
2
|
+
name: string;
|
|
3
|
+
val: string | number;
|
|
4
|
+
variable: string | number;
|
|
5
|
+
constructor({ val, name }: VariableIn);
|
|
6
|
+
toString(): string;
|
|
7
|
+
}
|
|
8
|
+
declare type VariableIn = {
|
|
9
|
+
val: string | number;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const createVariable: (props: VariableIn) => Variable;
|
|
13
|
+
export declare function isVariable(v: Variable | any): v is Variable;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=createVariable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createVariable.d.ts","sourceRoot":"","sources":["../src/createVariable.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAQ;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;gBAEb,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,UAAU;IAOrC,QAAQ;CAGT;AAED,aAAK,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAExD,eAAO,MAAM,cAAc,UAAW,UAAU,aAAwB,CAAA;AAExE,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,GAAG,CAAC,IAAI,QAAQ,CAE3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addStylesUsingClassname.d.ts","sourceRoot":"","sources":["../../src/helpers/addStylesUsingClassname.tsx"],"names":[],"mappings":"AAWA,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,EAAE,UAmBjD;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,GAAG,EAAE,EACb,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,UAyBrD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StyleObject } from '@tamagui/helpers';
|
|
2
|
+
import { MediaQueries } from '../types';
|
|
3
|
+
export declare const MEDIA_SEP = "_";
|
|
4
|
+
export declare const createMediaStyle: ({ identifier, rules }: StyleObject, mediaKey: string, mediaQueries: MediaQueries, negate?: boolean | undefined, importance?: number) => {
|
|
5
|
+
styleRule: string;
|
|
6
|
+
identifier: string;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=createMediaStyle.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +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,eAAO,MAAM,gBAAgB,MAAO,YAAY,WAKjC,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QA2DxD,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TamaguiProviderProps } from '../types';
|
|
3
|
+
import { ThemeProviderProps } from '../views/ThemeProvider';
|
|
4
|
+
export declare function createTamaguiProvider(themeProps: ThemeProviderProps): ({ initialWindowMetrics, fallback, children, ...themePropsProvider }: TamaguiProviderProps) => JSX.Element;
|
|
5
|
+
//# sourceMappingURL=createTamaguiProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTamaguiProvider.d.ts","sourceRoot":"","sources":["../../src/helpers/createTamaguiProvider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,OAAO,EAAiB,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE1E,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,kBAAkB,yEAM/D,oBAAoB,iBASxB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StaticComponent, StaticConfig, StaticConfigParsed } from '../types';
|
|
3
|
+
export declare function extendStaticConfig(Component?: StaticComponent | React.Component<any>, config?: StaticConfig): StaticConfigParsed | null;
|
|
4
|
+
export declare const parseStaticConfig: (config: StaticConfig) => StaticConfigParsed;
|
|
5
|
+
//# sourceMappingURL=extendStaticConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extendStaticConfig.d.ts","sourceRoot":"","sources":["../../src/helpers/extendStaticConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAG5E,wBAAgB,kBAAkB,CAGhC,SAAS,CAAC,EAAE,eAAe,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,EAClD,MAAM,GAAE,YAAiB,GACxB,kBAAkB,GAAG,IAAI,CAiD3B;AAED,eAAO,MAAM,iBAAiB,WAAY,YAAY,KAAG,kBAMxD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixNativeShadow.d.ts","sourceRoot":"","sources":["../../src/helpers/fixNativeShadow.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,MAAO,GAAG,SAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixNativeShadow.native.d.ts","sourceRoot":"","sources":["../../src/helpers/fixNativeShadow.native.tsx"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,OAuBzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
|
+
import { StaticConfigParsed, ThemeObject } from '../types';
|
|
3
|
+
export declare type SplitStyles = ReturnType<typeof getSplitStyles>;
|
|
4
|
+
export declare const getSplitStyles: (props: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}, staticConfig: StaticConfigParsed, theme: ThemeObject, isSplittingDefaultProps?: boolean | undefined) => {
|
|
7
|
+
viewProps: Record<string, any>;
|
|
8
|
+
style: any[];
|
|
9
|
+
pseudos: {
|
|
10
|
+
hoverStyle?: ViewStyle | undefined;
|
|
11
|
+
pressStyle?: ViewStyle | undefined;
|
|
12
|
+
} | null;
|
|
13
|
+
classNames: string[] | null;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=getSplitStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAM1D,oBAAY,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAI3D,eAAO,MAAM,cAAc;;iBAEX,kBAAkB,SACzB,WAAW;;;;;;;;CAuInB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getStylesAtomic.d.ts","sourceRoot":"","sources":["../../src/helpers/getStylesAtomic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAqBnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,eAAe,UAAQ,iBAiBlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getStylesAtomic.native.d.ts","sourceRoot":"","sources":["../../src/helpers/getStylesAtomic.native.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,SAE9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertStyleRule.d.ts","sourceRoot":"","sources":["../../src/helpers/insertStyleRule.tsx"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,QAe3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isObj.d.ts","sourceRoot":"","sources":["../../src/helpers/isObj.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,MAAO,GAAG,QAAoD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isTamaguiElement.d.ts","sourceRoot":"","sources":["../../src/helpers/isTamaguiElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAA;AAE7C,eAAO,MAAM,gBAAgB,UAAW,GAAG,gFAE1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchMedia.d.ts","sourceRoot":"","sources":["../../src/helpers/matchMedia.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,KAgBZ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchMedia.native.d.ts","sourceRoot":"","sources":["../../src/helpers/matchMedia.native.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,2CAA2C,CAAA;AAEtE,eAAO,MAAM,UAAU,UAAW,MAAM,mBAA8B,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export declare type ThemeableProps = {
|
|
3
|
+
theme?: string | null;
|
|
4
|
+
themeInverse?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const themeable: ThemeableHOC;
|
|
7
|
+
export interface ThemeableHOC {
|
|
8
|
+
<R extends ReactElement<any, any> | null, P extends ThemeableProps = {}>(component: (props: P) => R): (props: P) => R;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=themeable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeable.d.ts","sourceRoot":"","sources":["../../src/helpers/themeable.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAKvD,oBAAY,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,YAyBvB,CAAA;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,CAAC,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,SAAS,cAAc,GAAG,EAAE,EACrE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GACzB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAA;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/helpers/validate.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,SAAU,GAAG,SAWvC,CAAA;AA4BD,eAAO,MAAM,cAAc,WAAY,GAAG,SAOzC,CAAA;AAED,eAAO,MAAM,YAAY,SAAU,GAAG,SAOrC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConstant.d.ts","sourceRoot":"","sources":["../../src/hooks/useConstant.tsx"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAM7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":";AAuBA,eAAO,MAAM,WAAW,UAAW,GAAG;;+BAYrC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ConfigureMediaQueryOptions, MediaQueries, MediaQueryObject, MediaQueryState } from '../types';
|
|
2
|
+
export declare const mediaState: {
|
|
3
|
+
[key in keyof MediaQueryState]: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const addMediaQueryListener: (key: string, cb: any) => void;
|
|
6
|
+
export declare const removeMediaQueryListener: (key: string, cb: any) => void;
|
|
7
|
+
export declare const mediaQueryConfig: MediaQueries;
|
|
8
|
+
export declare const getMedia: () => {
|
|
9
|
+
[x: string]: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const configureMedia: ({ queries, defaultActive, }?: ConfigureMediaQueryOptions) => void;
|
|
12
|
+
export declare const useMedia: () => {
|
|
13
|
+
[x: string]: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function mediaObjectToString(query: string | MediaQueryObject): string;
|
|
16
|
+
//# sourceMappingURL=useMedia.d.ts.map
|
|
@@ -0,0 +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,cAqB3B,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePressable.d.ts","sourceRoot":"","sources":["../../src/hooks/usePressable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAA;AAIxD,eAAO,MAAM,YAAY,UAAW,cAAc,wBAIjD,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThemeObject } from '../types';
|
|
2
|
+
export declare const useThemeName: (opts?: {
|
|
3
|
+
parent?: true | undefined;
|
|
4
|
+
} | undefined) => string;
|
|
5
|
+
export declare const useDefaultThemeName: () => string | number;
|
|
6
|
+
export declare const useTheme: () => ThemeObject;
|
|
7
|
+
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,WAAW,EAAE,MAAM,UAAU,CAAA;AAqBjD,eAAO,MAAM,YAAY;;wBAWxB,CAAA;AAED,eAAO,MAAM,mBAAmB,uBAE/B,CAAA;AAED,eAAO,MAAM,QAAQ,QAAO,WAmE3B,CAAA"}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './createComponent';
|
|
2
|
+
export * from './createShorthands';
|
|
3
|
+
export * from './createTheme';
|
|
4
|
+
export * from './createTamagui';
|
|
5
|
+
export * from './createFont';
|
|
6
|
+
export { createTokens } from './createTokens';
|
|
7
|
+
export * from './createVariable';
|
|
8
|
+
export * from './styled';
|
|
9
|
+
export * from './types';
|
|
10
|
+
export * from './constants/pseudos';
|
|
11
|
+
export * from './constants/constants';
|
|
12
|
+
export * from './constants/platform';
|
|
13
|
+
export * from './constants/rnw';
|
|
14
|
+
export * from './helpers/isObj';
|
|
15
|
+
export * from './helpers/getStylesAtomic';
|
|
16
|
+
export * from './helpers/matchMedia';
|
|
17
|
+
export * from './helpers/themeable';
|
|
18
|
+
export * from './helpers/isTamaguiElement';
|
|
19
|
+
export * from './hooks/useConstant';
|
|
20
|
+
export * from './hooks/useMedia';
|
|
21
|
+
export * from './hooks/useTheme';
|
|
22
|
+
export * from './views/Animated';
|
|
23
|
+
export * from './views/Stack';
|
|
24
|
+
export * from './views/Text';
|
|
25
|
+
export * from './views/Theme';
|
|
26
|
+
export * from './views/ThemeInverse';
|
|
27
|
+
export * from './views/ThemeProvider';
|
|
28
|
+
export * from './views/TextAncestorContext';
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAE1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StaticConfigParsed, ThemeObject } from '../types';
|
|
2
|
+
export declare const postProcessStyles: (inStyles: any, staticConfig: StaticConfigParsed, theme: ThemeObject) => {
|
|
3
|
+
style: {};
|
|
4
|
+
viewProps: Record<string, any>;
|
|
5
|
+
classNames: string[] | null;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=postProcessStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postProcessStyles.d.ts","sourceRoot":"","sources":["../../src/static/postProcessStyles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAyB,WAAW,EAAE,MAAM,UAAU,CAAA;AAIjF,eAAO,MAAM,iBAAiB,aAClB,GAAG,gBACC,kBAAkB,SACzB,WAAW;;;;CAWnB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './styled';
|
|
2
|
+
export * from './createComponent';
|
|
3
|
+
export * from './createFont';
|
|
4
|
+
export * from './createTokens';
|
|
5
|
+
export * from './createTamagui';
|
|
6
|
+
export * from './constants/constants';
|
|
7
|
+
export * from './hooks/useMedia';
|
|
8
|
+
export * from './hooks/useTheme';
|
|
9
|
+
export * from './helpers/isObj';
|
|
10
|
+
export * from './helpers/getStylesAtomic';
|
|
11
|
+
export * from './helpers/getSplitStyles';
|
|
12
|
+
export * from '@tamagui/helpers';
|
|
13
|
+
export * from './constants/pseudos';
|
|
14
|
+
export * from './static/postProcessStyles';
|
|
15
|
+
//# sourceMappingURL=static.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AAErC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,qBAAqB,CAAA;AAInC,cAAc,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MediaProps, StaticComponent, StaticConfig, TamaguiConfig, Themes, Tokens } from './types';
|
|
3
|
+
export declare function styled<ParentComponent extends StaticComponent | React.Component<any>, Variants extends GetVariants<ParentComponent>>(Component: ParentComponent, options?: GetProps<ParentComponent> & {
|
|
4
|
+
variants?: Variants;
|
|
5
|
+
}, staticExtractionOptions?: StaticConfig): StaticComponent<Omit<GetProps<ParentComponent>, keyof GetVariantProps<Variants>> & GetVariantProps<Variants> & MediaProps<GetVariantProps<Variants>>, any, import("./types").StaticConfigParsed, any>;
|
|
6
|
+
export declare type GetProps<A> = A extends StaticComponent<infer Props> ? Props : A extends React.Component<infer Props> ? Props : {};
|
|
7
|
+
export declare type GetVariants<ParentComponent extends StaticComponent | React.Component<any>> = void | {
|
|
8
|
+
[key: string]: {
|
|
9
|
+
[key: string]: Partial<GetProps<ParentComponent>> | ((val: any, config: {
|
|
10
|
+
tokens: TamaguiConfig['tokens'];
|
|
11
|
+
theme: Themes extends {
|
|
12
|
+
[key: string]: infer B;
|
|
13
|
+
} ? B : unknown;
|
|
14
|
+
props: GetProps<ParentComponent>;
|
|
15
|
+
}) => Partial<GetProps<ParentComponent>>);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare type GetVariantProps<Variants> = Variants extends void ? {} : {
|
|
19
|
+
[Key in keyof Variants]?: keyof Variants[Key] extends `...${infer VariantSpread}` ? VariantSpread extends keyof Tokens ? keyof Tokens[VariantSpread] extends string | number ? `$${keyof Tokens[VariantSpread]}` | null : unknown : unknown : keyof Variants[Key] extends 'true' ? boolean | null : keyof Exclude<Variants[Key], undefined>;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../src/styled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAElG,wBAAgB,MAAM,CACpB,eAAe,SAAS,eAAe,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,EAC9D,QAAQ,SAAS,WAAW,CAAC,eAAe,CAAC,EAE7C,SAAS,EAAE,eAAe,EAC1B,OAAO,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG;IACpC,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,EACD,uBAAuB,CAAC,EAAE,YAAY,yMAiBvC;AAID,oBAAY,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,eAAe,CAAC,MAAM,KAAK,CAAC,GAC5D,KAAK,GACL,CAAC,SAAS,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,GACtC,KAAK,GACL,EAAE,CAAA;AAEN,oBAAY,WAAW,CAAC,eAAe,SAAS,eAAe,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG;IAC/F,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,CAAC,GAAG,EAAE,MAAM,GACR,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,GAClC,CAAC,CACC,GAAG,EAAE,GAAG,EACR,MAAM,EAAE;YACN,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;YAC/B,KAAK,EAAE,MAAM,SAAS;gBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;aAAE,GAAG,CAAC,GAAG,OAAO,CAAA;YAC9D,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAA;SACjC,KACE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAA;KAC7C,CAAA;CACF,CAAA;AAED,oBAAY,eAAe,CAAC,QAAQ,IAAI,QAAQ,SAAS,IAAI,GACzD,EAAE,GACF;KAEG,GAAG,IAAI,MAAM,QAAQ,CAAC,CAAC,EAAE,MAAM,QAAQ,CAAC,GAAG,CAAC,SAAS,MAAM,MAAM,aAAa,EAAE,GAC7E,aAAa,SAAS,MAAM,MAAM,GAChC,MAAM,MAAM,CAAC,aAAa,CAAC,SAAS,MAAM,GAAG,MAAM,GACjD,IAAI,MAAM,MAAM,CAAC,aAAa,CAAC,EAAE,GAAG,IAAI,GACxC,OAAO,GACT,OAAO,GACT,MAAM,QAAQ,CAAC,GAAG,CAAC,SAAS,MAAM,GAClC,OAAO,GAAG,IAAI,GACd,MAAM,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC;CAC5C,CAAA"}
|