@tamagui/web 1.58.0 → 1.58.2
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/createTheme.js.map +1 -1
- package/dist/esm/createTheme.js.map +1 -1
- package/package.json +9 -9
- package/src/createTheme.ts +4 -7
- package/src/hooks/useTheme.tsx +1 -1
- package/types/createTheme.d.ts +4 -1
- package/types/createTheme.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/createTheme.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,MAAM,cAAc,CAA6B,UAAwB;AAC9E,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/web",
|
|
3
|
-
"version": "1.58.
|
|
3
|
+
"version": "1.58.2",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"reset.css"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tamagui/compose-refs": "1.58.
|
|
31
|
-
"@tamagui/constants": "1.58.
|
|
32
|
-
"@tamagui/helpers": "1.58.
|
|
33
|
-
"@tamagui/normalize-css-color": "1.58.
|
|
34
|
-
"@tamagui/timer": "1.58.
|
|
35
|
-
"@tamagui/use-did-finish-ssr": "1.58.
|
|
36
|
-
"@tamagui/use-force-update": "1.58.
|
|
30
|
+
"@tamagui/compose-refs": "1.58.2",
|
|
31
|
+
"@tamagui/constants": "1.58.2",
|
|
32
|
+
"@tamagui/helpers": "1.58.2",
|
|
33
|
+
"@tamagui/normalize-css-color": "1.58.2",
|
|
34
|
+
"@tamagui/timer": "1.58.2",
|
|
35
|
+
"@tamagui/use-did-finish-ssr": "1.58.2",
|
|
36
|
+
"@tamagui/use-force-update": "1.58.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "*"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "1.58.
|
|
42
|
+
"@tamagui/build": "1.58.2",
|
|
43
43
|
"@testing-library/react": "^13.4.0",
|
|
44
44
|
"csstype": "^3.0.10",
|
|
45
45
|
"react": "^18.2.0",
|
package/src/createTheme.ts
CHANGED
|
@@ -2,12 +2,9 @@ import type { Variable } from './createVariable'
|
|
|
2
2
|
|
|
3
3
|
type GenericTheme = { [key: string]: string | Variable }
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
): {
|
|
10
|
-
[K in keyof Theme]: Theme[K] | string | Variable
|
|
11
|
-
} => {
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated no need to use this anymore, can just remove the call and use plain objects
|
|
7
|
+
*/
|
|
8
|
+
export const createTheme = <Theme extends GenericTheme>(theme: Theme): Theme => {
|
|
12
9
|
return theme
|
|
13
10
|
}
|
package/src/hooks/useTheme.tsx
CHANGED
package/types/createTheme.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import type { Variable } from './createVariable';
|
|
|
2
2
|
type GenericTheme = {
|
|
3
3
|
[key: string]: string | Variable;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated no need to use this anymore, can just remove the call and use plain objects
|
|
7
|
+
*/
|
|
8
|
+
export declare const createTheme: <Theme extends GenericTheme>(theme: Theme) => Theme;
|
|
6
9
|
export {};
|
|
7
10
|
//# sourceMappingURL=createTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTheme.d.ts","sourceRoot":"","sources":["../src/createTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEhD,KAAK,YAAY,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAA;CAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"createTheme.d.ts","sourceRoot":"","sources":["../src/createTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEhD,KAAK,YAAY,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAA;CAAE,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,WAAW,qDAEvB,CAAA"}
|
|
@@ -8,7 +8,7 @@ export type ChangedThemeResponse = {
|
|
|
8
8
|
mounted?: boolean;
|
|
9
9
|
};
|
|
10
10
|
type ThemeGettable<Val> = Val & {
|
|
11
|
-
get: () => string | (Val extends Variable<infer X> ? X extends VariableValGeneric ? any : X : Val extends VariableVal ? string | number : unknown);
|
|
11
|
+
get: () => string | (Val extends Variable<infer X> ? X extends VariableValGeneric ? any : Exclude<X, Variable> : Val extends VariableVal ? string | number : unknown);
|
|
12
12
|
};
|
|
13
13
|
type UseThemeResult = {
|
|
14
14
|
[Key in keyof ThemeParsed]: ThemeGettable<ThemeParsed[Key]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAe,MAAM,mBAAmB,CAAA;AAEzD,OAAO,EACL,YAAY,EACZ,iBAAiB,EAElB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,UAAU,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