@tamagui/create-theme 1.5.5 → 1.5.6
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/package.json +3 -3
- package/types/createTheme.d.ts +0 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/create-theme",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tamagui/web": "^1.5.
|
|
30
|
+
"@tamagui/web": "^1.5.6"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@tamagui/build": "^1.5.
|
|
33
|
+
"@tamagui/build": "^1.5.6"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
package/types/createTheme.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Variable } from '@tamagui/web';
|
|
2
|
-
export type ThemeMask = Record<string, string | number>;
|
|
3
|
-
export type Palette = string[];
|
|
4
|
-
export type ShiftMaskProps = {
|
|
5
|
-
by: number;
|
|
6
|
-
max: number;
|
|
7
|
-
min?: number;
|
|
8
|
-
};
|
|
9
|
-
export type MaskOptions = {
|
|
10
|
-
skip?: Partial<ThemeMask>;
|
|
11
|
-
};
|
|
12
|
-
type GenericTheme = {
|
|
13
|
-
[key: string]: string | Variable;
|
|
14
|
-
};
|
|
15
|
-
type CreateMask = <A extends ThemeMask>(template: A, options: MaskOptions) => A;
|
|
16
|
-
export declare function createTheme<Definition extends ThemeMask, Extras extends Record<string, string> = {}>(palette: Palette, definition: Definition, options?: {
|
|
17
|
-
nonInheritedValues?: Extras;
|
|
18
|
-
}): {
|
|
19
|
-
[key in keyof Definition | keyof Extras]: string;
|
|
20
|
-
};
|
|
21
|
-
type SubThemeKeys<ParentKeys, ChildKeys> = `${ParentKeys extends string ? ParentKeys : never}_${ChildKeys extends string ? ChildKeys : never}`;
|
|
22
|
-
export declare function addChildren<Theme extends GenericTheme, Themes extends {
|
|
23
|
-
[key: string]: Theme;
|
|
24
|
-
}, GetChildren extends (name: keyof Themes, theme: Theme) => {
|
|
25
|
-
[key: string]: Theme;
|
|
26
|
-
}>(themes: Themes, getChildren: GetChildren): Themes & {
|
|
27
|
-
[key in SubThemeKeys<keyof Themes, keyof ReturnType<GetChildren>>]: Theme;
|
|
28
|
-
};
|
|
29
|
-
export declare const createWeakenMask: ({ by, max, min, inverseNegatives, }: ShiftMaskProps & {
|
|
30
|
-
inverseNegatives?: boolean | undefined;
|
|
31
|
-
}) => CreateMask;
|
|
32
|
-
export declare const createStrengthenMask: (props: ShiftMaskProps) => CreateMask;
|
|
33
|
-
export declare function applyMask<Theme extends GenericTheme>(theme: Theme, mask: CreateMask, options?: MaskOptions): Theme;
|
|
34
|
-
export {};
|
|
35
|
-
//# sourceMappingURL=createTheme.d.ts.map
|