@tamagui/core 1.0.1-beta.190 → 1.0.1-beta.192
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/addTheme.js.map +2 -2
- package/dist/cjs/createComponent.js +14 -13
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createShorthands.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +4 -2
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/createProxy.js +43 -0
- package/dist/cjs/helpers/createProxy.js.map +7 -0
- package/dist/cjs/helpers/expandStyles.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +11 -11
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/insertStyleRule.js +5 -9
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/proxyThemeVariables.js +5 -3
- package/dist/cjs/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/views/Slot.js +12 -18
- package/dist/cjs/views/Slot.js.map +2 -2
- package/dist/esm/addTheme.js.map +2 -2
- package/dist/esm/createComponent.js +14 -13
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createShorthands.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +4 -2
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/createProxy.js +19 -0
- package/dist/esm/helpers/createProxy.js.map +7 -0
- package/dist/esm/helpers/expandStyles.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +11 -11
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +5 -9
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/proxyThemeVariables.js +5 -3
- package/dist/esm/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/esm/views/Slot.js +12 -12
- package/dist/esm/views/Slot.js.map +2 -2
- package/package.json +13 -12
- package/src/addTheme.ts +1 -0
- package/src/createComponent.tsx +16 -13
- package/src/createShorthands.ts +4 -2
- package/src/helpers/createPropMapper.ts +5 -2
- package/src/helpers/expandStyles.ts +1 -0
- package/src/helpers/getSplitStyles.tsx +10 -11
- package/src/helpers/insertStyleRule.tsx +11 -11
- package/src/helpers/proxyThemeVariables.tsx +6 -4
- package/src/types.tsx +58 -39
- package/src/views/Slot.tsx +16 -20
- package/types/Tamagui.d.ts +1 -1
- package/types/config.d.ts +1 -1
- package/types/createShorthands.d.ts +2 -1
- package/types/helpers/expandStyles.d.ts +5 -5
- package/types/helpers/insertStyleRule.d.ts +1 -1
- package/types/types.d.ts +30 -19
- package/types/views/Slot.d.ts +4 -4
- package/src/constants/platform.native.ts +0 -14
- package/src/constants/platform.ts +0 -41
- package/src/helpers/validate.ts +0 -80
- package/types/conf.d.ts +0 -26
- package/types/createComponent.server.d.ts +0 -36
- package/types/helpers/createShallowUpdate.d.ts +0 -3
- package/types/helpers/cssHash.d.ts +0 -2
- package/types/helpers/useAnimationDriver.d.ts +0 -1
- package/types/hooks/useAnimationDriver.d.ts +0 -1
- package/types/hooks/useDidFinishSSR.d.ts +0 -3
- package/types/hooks/useFeatures.d.ts +0 -23
- package/types/hooks/useIsSSR.d.ts +0 -4
- package/types/hooks/useServerContext.d.ts +0 -2
package/src/helpers/validate.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// // published a patched version that works on native
|
|
2
|
-
// // @ts-ignore
|
|
3
|
-
// import { default as ow } from '@tamagui/ow/dev-only'
|
|
4
|
-
|
|
5
|
-
// let Config: any
|
|
6
|
-
// let Tokens: any
|
|
7
|
-
// let FontRequired: any
|
|
8
|
-
// let FontOptional: any
|
|
9
|
-
|
|
10
|
-
// export const validateConfig = (conf: any) => {
|
|
11
|
-
// if (!conf) {
|
|
12
|
-
// console.warn('no conf?')
|
|
13
|
-
// return
|
|
14
|
-
// }
|
|
15
|
-
// try {
|
|
16
|
-
// ow(conf, Config)
|
|
17
|
-
// } catch (err: any) {
|
|
18
|
-
// console.warn('Given config:\n', JSON.stringify(conf, null, 2), err)
|
|
19
|
-
// }
|
|
20
|
-
// }
|
|
21
|
-
|
|
22
|
-
// export const validateTokens = (tokens: any) => {
|
|
23
|
-
// try {
|
|
24
|
-
// ow(tokens, Tokens)
|
|
25
|
-
// } catch (err: any) {
|
|
26
|
-
// console.warn('Given tokens:\n', JSON.stringify(tokens, null, 2), err)
|
|
27
|
-
// }
|
|
28
|
-
// }
|
|
29
|
-
|
|
30
|
-
// export const validateFont = (font: any) => {
|
|
31
|
-
// try {
|
|
32
|
-
// const { style, transform, color, ...required } = font
|
|
33
|
-
// ow(required, FontRequired)
|
|
34
|
-
// ow({ style, transform, color }, FontOptional)
|
|
35
|
-
// } catch (err: any) {
|
|
36
|
-
// console.warn('Given font:\n', JSON.stringify(font, null, 2), err)
|
|
37
|
-
// }
|
|
38
|
-
// }
|
|
39
|
-
|
|
40
|
-
// if (process.env.NODE_ENV === 'development') {
|
|
41
|
-
// const fontReq = {
|
|
42
|
-
// family: ow.string,
|
|
43
|
-
// size: ow.object.nonEmpty.valuesOfType(ow.number),
|
|
44
|
-
// lineHeight: ow.object.nonEmpty.valuesOfType(ow.number),
|
|
45
|
-
// weight: ow.object.nonEmpty.valuesOfType(ow.string),
|
|
46
|
-
// letterSpacing: ow.object.nonEmpty.valuesOfType(ow.number),
|
|
47
|
-
// }
|
|
48
|
-
// const fontOpt = {
|
|
49
|
-
// style: ow.optional.object.valuesOfType(ow.string),
|
|
50
|
-
// transform: ow.optional.object.valuesOfType(ow.string),
|
|
51
|
-
// color: ow.optional.object.valuesOfType(ow.any(ow.string, ow.object)),
|
|
52
|
-
// }
|
|
53
|
-
|
|
54
|
-
// Config = ow.object.exactShape({
|
|
55
|
-
// defaultTheme: ow.optional.string,
|
|
56
|
-
// disableRootThemeClass: ow.optional.boolean,
|
|
57
|
-
// shorthands: ow.optional.object.valuesOfType(ow.string),
|
|
58
|
-
// themes: ow.object.valuesOfType(ow.object),
|
|
59
|
-
// tokens: ow.object.valuesOfType(ow.object),
|
|
60
|
-
// media: ow.object.valuesOfType(ow.object),
|
|
61
|
-
// animations: ow.object.valuesOfType(ow.object),
|
|
62
|
-
// fonts: ow.object.valuesOfType(
|
|
63
|
-
// ow.object.partialShape({
|
|
64
|
-
// ...fontReq,
|
|
65
|
-
// ...fontOpt,
|
|
66
|
-
// })
|
|
67
|
-
// ),
|
|
68
|
-
// })
|
|
69
|
-
|
|
70
|
-
// FontRequired = ow.object.exactShape(fontReq)
|
|
71
|
-
// FontOptional = ow.object.partialShape(fontOpt)
|
|
72
|
-
|
|
73
|
-
// Tokens = ow.object.exactShape({
|
|
74
|
-
// size: ow.object.nonEmpty.valuesOfType(ow.any(ow.number, ow.object)),
|
|
75
|
-
// space: ow.object.nonEmpty.valuesOfType(ow.any(ow.number, ow.object)),
|
|
76
|
-
// zIndex: ow.object.nonEmpty.valuesOfType(ow.any(ow.number, ow.object)),
|
|
77
|
-
// radius: ow.object.nonEmpty.valuesOfType(ow.any(ow.number, ow.object)),
|
|
78
|
-
// color: ow.object.nonEmpty.valuesOfType(ow.any(ow.string, ow.object)),
|
|
79
|
-
// })
|
|
80
|
-
// }
|
package/types/conf.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ConfigListener, TamaguiInternalConfig } from './types';
|
|
2
|
-
export declare const setConfig: (next: TamaguiInternalConfig) => void;
|
|
3
|
-
export declare const setConfigFont: (name: string, font: any, fontParsed: any) => void;
|
|
4
|
-
export declare const getHasConfigured: () => boolean;
|
|
5
|
-
export declare const getConfig: () => TamaguiInternalConfig<import("./types").CreateTokens<import("./types").VariableVal>, {
|
|
6
|
-
[key: string]: Partial<import("./types").TamaguiBaseTheme> & {
|
|
7
|
-
[key: string]: import("./types").VariableVal;
|
|
8
|
-
};
|
|
9
|
-
}, {}, {
|
|
10
|
-
[key: string]: {
|
|
11
|
-
[key: string]: string | number;
|
|
12
|
-
};
|
|
13
|
-
}, {
|
|
14
|
-
[key: string]: string | {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
};
|
|
17
|
-
}, import("./types").GenericFonts>;
|
|
18
|
-
export declare const getTokens: () => import("./types").CreateTokens<import("./createVariable").Variable<import("./createVariable").VariableValue>>;
|
|
19
|
-
export declare const getThemes: () => {
|
|
20
|
-
[key: string]: Partial<import("./types").TamaguiBaseTheme> & {
|
|
21
|
-
[key: string]: import("./types").VariableVal;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export declare const configListeners: Set<ConfigListener>;
|
|
25
|
-
export declare const onConfiguredOnce: (cb: ConfigListener) => void;
|
|
26
|
-
//# sourceMappingURL=conf.d.ts.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SpaceDirection, SpaceTokens, SpacerProps, StaticConfig, StaticConfigParsed, StylableComponent, TamaguiComponent, TamaguiElement } from './types';
|
|
3
|
-
export declare const mouseUps: Set<Function>;
|
|
4
|
-
export declare function createComponent<ComponentPropTypes extends Object = {}, Ref = TamaguiElement, BaseProps = never>(configIn: Partial<StaticConfig> | StaticConfigParsed, ParentComponent?: StylableComponent): TamaguiComponent<ComponentPropTypes, Ref, BaseProps, {}>;
|
|
5
|
-
export declare const Unspaced: {
|
|
6
|
-
(props: {
|
|
7
|
-
children?: any;
|
|
8
|
-
}): any;
|
|
9
|
-
isUnspaced: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare const Spacer: TamaguiComponent<SpacerProps, TamaguiElement, never, {}>;
|
|
12
|
-
export declare type SpacedChildrenProps = {
|
|
13
|
-
isZStack?: boolean;
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
space?: SpaceTokens | number | null;
|
|
16
|
-
spaceFlex?: boolean | number;
|
|
17
|
-
direction?: SpaceDirection;
|
|
18
|
-
separator?: React.ReactNode;
|
|
19
|
-
};
|
|
20
|
-
export declare function spacedChildren({ isZStack, children, space, direction, spaceFlex, separator, }: SpacedChildrenProps): React.ReactNode;
|
|
21
|
-
export declare function processIDRefList(idRefList: string | Array<string>): string;
|
|
22
|
-
export declare const accessibilityRoleToWebRole: {
|
|
23
|
-
adjustable: string;
|
|
24
|
-
button: string;
|
|
25
|
-
header: string;
|
|
26
|
-
image: string;
|
|
27
|
-
imagebutton: null;
|
|
28
|
-
keyboardkey: null;
|
|
29
|
-
label: null;
|
|
30
|
-
link: string;
|
|
31
|
-
none: string;
|
|
32
|
-
search: string;
|
|
33
|
-
summary: string;
|
|
34
|
-
text: null;
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=createComponent.server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=useAnimationDriver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=useAnimationDriver.d.ts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { View, ViewStyle } from 'react-native';
|
|
3
|
-
import { PseudoStyles, SplitStyleState, StaticConfigParsed, TamaguiComponentState, UseAnimationHook } from '../types';
|
|
4
|
-
declare type FeatureUtils = {
|
|
5
|
-
forceUpdate: Function;
|
|
6
|
-
state: SplitStyleState;
|
|
7
|
-
setStateShallow: (next: Partial<TamaguiComponentState>) => void;
|
|
8
|
-
useAnimations?: UseAnimationHook;
|
|
9
|
-
pseudos: PseudoStyles;
|
|
10
|
-
style: ViewStyle | null | undefined;
|
|
11
|
-
staticConfig: StaticConfigParsed;
|
|
12
|
-
theme: any;
|
|
13
|
-
onDidAnimate?: () => void;
|
|
14
|
-
hostRef: RefObject<HTMLElement | View>;
|
|
15
|
-
};
|
|
16
|
-
export declare const useFeatures: (props: any, utils?: FeatureUtils) => {
|
|
17
|
-
elements: JSX.Element[];
|
|
18
|
-
enabled: {
|
|
19
|
-
mediaQuery?: boolean | undefined;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=useFeatures.d.ts.map
|