@tamagui/helpers-tamagui 1.112.25 → 1.113.0
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/useCurrentColor.js +1 -0
- package/dist/cjs/useCurrentColor.js.map +1 -1
- package/dist/cjs/useCurrentColor.native.js +4 -1
- package/dist/cjs/useCurrentColor.native.js.map +1 -1
- package/dist/cjs/useGetThemedIcon.js.map +1 -1
- package/dist/cjs/useGetThemedIcon.native.js.map +1 -1
- package/dist/esm/useCurrentColor.js +1 -0
- package/dist/esm/useCurrentColor.js.map +1 -1
- package/dist/esm/useCurrentColor.mjs +3 -1
- package/dist/esm/useCurrentColor.mjs.map +1 -1
- package/dist/esm/useCurrentColor.native.js +3 -1
- package/dist/esm/useCurrentColor.native.js.map +1 -1
- package/dist/esm/useGetThemedIcon.js.map +1 -1
- package/dist/esm/useGetThemedIcon.mjs.map +1 -1
- package/dist/esm/useGetThemedIcon.native.js.map +1 -1
- package/package.json +4 -4
- package/src/useCurrentColor.tsx +1 -0
- package/src/useGetThemedIcon.tsx +0 -1
- package/types/useCurrentColor.d.ts +1 -1
- package/types/useCurrentColor.d.ts.map +1 -1
- package/types/useGetThemedIcon.d.ts.map +1 -1
|
@@ -21,6 +21,7 @@ var import_web = require("@tamagui/web");
|
|
|
21
21
|
const useCurrentColor = (colorProp) => {
|
|
22
22
|
const theme = (0, import_web.useTheme)();
|
|
23
23
|
return (0, import_web.getVariable)(
|
|
24
|
+
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions
|
|
24
25
|
colorProp || theme[colorProp]?.get("web") || theme.color?.get("web")
|
|
25
26
|
);
|
|
26
27
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAAsC;AAG/B,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,YAAQ,qBAAS;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAAsC;AAG/B,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,YAAQ,qBAAS;AAKvB,aAJY;AAAA;AAAA,IAEV,aAAa,MAAM,SAAgB,GAAG,IAAI,KAAK,KAAK,MAAM,OAAO,IAAI,KAAK;AAAA,EAC5E;AAEF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -19,7 +19,10 @@ __export(useCurrentColor_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(useCurrentColor_exports);
|
|
21
21
|
var import_web = require("@tamagui/web"), useCurrentColor = function(colorProp) {
|
|
22
|
-
var _theme_colorProp, _theme_color, theme = (0, import_web.useTheme)(), out = (0, import_web.getVariable)(
|
|
22
|
+
var _theme_colorProp, _theme_color, theme = (0, import_web.useTheme)(), out = (0, import_web.getVariable)(
|
|
23
|
+
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions
|
|
24
|
+
colorProp || ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get("web")) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get("web"))
|
|
25
|
+
);
|
|
23
26
|
return out;
|
|
24
27
|
};
|
|
25
28
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/helpers-tamagui/src/useCurrentColor.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AACA;;;;;iBAAsC,yBAGzBA,kBAAkB,SAACC,WAAAA;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AACA;;;;;iBAAsC,yBAGzBA,kBAAkB,SAACC,WAAAA;MAIfC,kBAAuCA,cAHhDA,YAAQC,qBAAAA,GACRC,UAAMC;;IAEVJ,eAAaC,mBAAAA,MAAMD,SAAAA,OAAiB,QAAvBC,qBAAAA,SAAAA,SAAAA,iBAAyBI,IAAI,KAAA,QAAUJ,eAAAA,MAAMK,WAAK,QAAXL,iBAAAA,SAAAA,SAAAA,aAAaI,IAAI,KAAA;EAAA;AAEvE,SAAOF;AACT;",
|
|
5
5
|
"names": ["useCurrentColor", "colorProp", "theme", "useTheme", "out", "getVariable", "get", "color"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGetThemedIcon.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,2BAElB,yBAAgC;AAEzB,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,YAAQ,wCAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OACD,OACD,aAAAA,QAAM,eAAe,EAAE,IAClB,aAAAA,QAAM,aAAa,IAAI;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA;AAAA,IAEA,GAAG,GAAG;AAAA,EACR,CAAC,IAEI,aAAAA,QAAM,cAAc,IAAI,KAAK;AAExC;",
|
|
5
5
|
"names": ["React"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/helpers-tamagui/src/useGetThemedIcon.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;mBAAkB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;mBAAkB,2BAElB,yBAAgC,8BAEnBA,mBAAmB,SAACC,OAAAA;AAC/B,MAAMC,YAAQC,wCAAgBF,MAAMC,KAAK;AACzC,SAAO,SAACE,IAAAA;AACN,WAAKA,OACDC,6BAAAA,QAAMC,eAAeF,EAAAA,IAChBC,6BAAAA,QAAME,aAAaH,IAAI;MAC5B,GAAGH;MACHC;;MAEA,GAAGE,GAAGH;IACR,CAAA,IAEKI,6BAAAA,QAAMG,cAAcJ,IAAIH,KAAAA;EACjC;AACF;",
|
|
5
5
|
"names": ["useGetThemedIcon", "props", "color", "useCurrentColor", "el", "React", "isValidElement", "cloneElement", "createElement"]
|
|
6
6
|
}
|
|
@@ -2,6 +2,7 @@ import { getVariable, useTheme } from "@tamagui/web";
|
|
|
2
2
|
const useCurrentColor = (colorProp) => {
|
|
3
3
|
const theme = useTheme();
|
|
4
4
|
return getVariable(
|
|
5
|
+
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions
|
|
5
6
|
colorProp || theme[colorProp]?.get("web") || theme.color?.get("web")
|
|
6
7
|
);
|
|
7
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"mappings": "AACA,SAAS,aAAa,gBAAgB;AAG/B,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;
|
|
4
|
+
"mappings": "AACA,SAAS,aAAa,gBAAgB;AAG/B,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AAKvB,SAJY;AAAA;AAAA,IAEV,aAAa,MAAM,SAAgB,GAAG,IAAI,KAAK,KAAK,MAAM,OAAO,IAAI,KAAK;AAAA,EAC5E;AAEF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { getVariable, useTheme } from "@tamagui/web";
|
|
2
2
|
const useCurrentColor = colorProp => {
|
|
3
3
|
const theme = useTheme();
|
|
4
|
-
return getVariable(
|
|
4
|
+
return getVariable(
|
|
5
|
+
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions
|
|
6
|
+
colorProp || theme[colorProp]?.get("web") || theme.color?.get("web"));
|
|
5
7
|
};
|
|
6
8
|
export { useCurrentColor };
|
|
7
9
|
//# sourceMappingURL=useCurrentColor.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getVariable","useTheme","useCurrentColor","colorProp","theme","get","color"],"sources":["../../src/useCurrentColor.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,WAAA,EAAaC,QAAA,QAAgB;AAG/B,MAAMC,eAAA,GAAmBC,SAAA,IAAyB;EACvD,MAAMC,KAAA,GAAQH,QAAA,CAAS;
|
|
1
|
+
{"version":3,"names":["getVariable","useTheme","useCurrentColor","colorProp","theme","get","color"],"sources":["../../src/useCurrentColor.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,WAAA,EAAaC,QAAA,QAAgB;AAG/B,MAAMC,eAAA,GAAmBC,SAAA,IAAyB;EACvD,MAAMC,KAAA,GAAQH,QAAA,CAAS;EAKvB,OAJYD,WAAA;EAAA;EAEVG,SAAA,IAAaC,KAAA,CAAMD,SAAgB,GAAGE,GAAA,CAAI,KAAK,KAAKD,KAAA,CAAME,KAAA,EAAOD,GAAA,CAAI,KAAK,CAC5E;AAEF","ignoreList":[]}
|
|
@@ -3,7 +3,9 @@ var useCurrentColor = function (colorProp) {
|
|
|
3
3
|
var _theme_colorProp,
|
|
4
4
|
_theme_color,
|
|
5
5
|
theme = useTheme(),
|
|
6
|
-
out = getVariable(
|
|
6
|
+
out = getVariable(
|
|
7
|
+
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions
|
|
8
|
+
colorProp || ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get("web")) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get("web")));
|
|
7
9
|
return out;
|
|
8
10
|
};
|
|
9
11
|
export { useCurrentColor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getVariable","useTheme","useCurrentColor","colorProp","_theme_colorProp","_theme_color","theme","out","get","color"],"sources":["../../src/useCurrentColor.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,WAAA,EAAaC,QAAA,QAAgB;AAG/B,IAAAC,eAAM,YAAAA,CAAmBC,SAAyB;EACvD,IAAAC,gBAAc;IAAAC,YAAS;IAAAC,KAAA,GAAAL,QAAA;IAAAM,GAAA,GAAAP,WAAA,
|
|
1
|
+
{"version":3,"names":["getVariable","useTheme","useCurrentColor","colorProp","_theme_colorProp","_theme_color","theme","out","get","color"],"sources":["../../src/useCurrentColor.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,WAAA,EAAaC,QAAA,QAAgB;AAG/B,IAAAC,eAAM,YAAAA,CAAmBC,SAAyB;EACvD,IAAAC,gBAAc;IAAAC,YAAS;IAAAC,KAAA,GAAAL,QAAA;IAAAM,GAAA,GAAAP,WAAA;IAKvB;IAJYG,SAAA,MAAAC,gBAAA,GAAAE,KAAA,CAAAH,SAAA,eAAAC,gBAAA,uBAAAA,gBAAA,CAAAI,GAAA,cAAAH,YAAA,GAAAC,KAAA,CAAAG,KAAA,cAAAJ,YAAA,uBAAAA,YAAA,CAAAG,GAAA;EAGZ,OAAAD,GAAA;AAEF","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGetThemedIcon.tsx"],
|
|
4
|
-
"mappings": "AAAA,OAAO,WAAW;
|
|
4
|
+
"mappings": "AAAA,OAAO,WAAW;AAElB,SAAS,uBAAuB;AAEzB,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,QAAQ,gBAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OACD,OACD,MAAM,eAAe,EAAE,IAClB,MAAM,aAAa,IAAI;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA;AAAA,IAEA,GAAG,GAAG;AAAA,EACR,CAAC,IAEI,MAAM,cAAc,IAAI,KAAK;AAExC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCurrentColor","useGetThemedIcon","props","color","el","isValidElement","cloneElement","createElement"],"sources":["../../src/useGetThemedIcon.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;
|
|
1
|
+
{"version":3,"names":["React","useCurrentColor","useGetThemedIcon","props","color","el","isValidElement","cloneElement","createElement"],"sources":["../../src/useGetThemedIcon.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAElB,SAASC,eAAA,QAAuB;AAEzB,MAAMC,gBAAA,GAAoBC,KAAA,IAA8C;EAC7E,MAAMC,KAAA,GAAQH,eAAA,CAAgBE,KAAA,CAAMC,KAAK;EACzC,OAAQC,EAAA,IACDA,EAAA,KACDL,KAAA,CAAMM,cAAA,CAAeD,EAAE,IAClBL,KAAA,CAAMO,YAAA,CAAaF,EAAA,EAAI;IAC5B,GAAGF,KAAA;IACHC,KAAA;IAAA;IAEA,GAAGC,EAAA,CAAGF;EACR,CAAC,IAEIH,KAAA,CAAMQ,aAAA,CAAcH,EAAA,EAAIF,KAAK;AAExC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCurrentColor","useGetThemedIcon","props","color","el","isValidElement","cloneElement","createElement"],"sources":["../../src/useGetThemedIcon.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;
|
|
1
|
+
{"version":3,"names":["React","useCurrentColor","useGetThemedIcon","props","color","el","isValidElement","cloneElement","createElement"],"sources":["../../src/useGetThemedIcon.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAElB,SAASC,eAAA,QAAuB;AAEzB,IAAAC,gBAAM,YAAAA,CAAoBC,KAA8C;EAC7E,IAAAC,KAAM,GAAAH,eAAQ,CAAAE,KAAgB,CAAAC,KAAM;EACpC,OAAO,UACAC,EAAA;IAGD,OAAGA,EAAA,oBAAAL,KAAA,CAAAM,cAAA,CAAAD,EAAA,mBAAAL,KAAA,CAAAO,YAAA,CAAAF,EAAA;MACH,GAAAF,KAAA;MAAAC,KAAA;MAEA;MACD,GAEIC,EAAA,CAAAF;IAEX,oBAAAH,KAAA,CAAAQ,aAAA,CAAAH,EAAA,EAAAF,KAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-tamagui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.113.0",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@tamagui/helpers": "1.
|
|
33
|
-
"@tamagui/web": "1.
|
|
32
|
+
"@tamagui/helpers": "1.113.0",
|
|
33
|
+
"@tamagui/web": "1.113.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@tamagui/build": "1.
|
|
36
|
+
"@tamagui/build": "1.113.0",
|
|
37
37
|
"react": "^18.2.0 || ^19.0.0",
|
|
38
38
|
"vitest": "2.1.1"
|
|
39
39
|
},
|
package/src/useCurrentColor.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import type { TextStyle } from 'react-native'
|
|
|
5
5
|
export const useCurrentColor = (colorProp: ColorProp) => {
|
|
6
6
|
const theme = useTheme()
|
|
7
7
|
const out = getVariable(
|
|
8
|
+
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions
|
|
8
9
|
colorProp || theme[colorProp as any]?.get('web') || theme.color?.get('web')
|
|
9
10
|
)
|
|
10
11
|
return out
|
package/src/useGetThemedIcon.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ColorTokens, UnionableString, Variable } from '@tamagui/web';
|
|
2
2
|
import type { TextStyle } from 'react-native';
|
|
3
|
-
export declare const useCurrentColor: (colorProp: ColorProp) =>
|
|
3
|
+
export declare const useCurrentColor: (colorProp: ColorProp) => any;
|
|
4
4
|
export type ColorProp = UnionableString | Variable | ColorTokens | TextStyle['color'] | undefined;
|
|
5
5
|
//# sourceMappingURL=useCurrentColor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentColor.d.ts","sourceRoot":"","sources":["../src/useCurrentColor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,eAAO,MAAM,eAAe,cAAe,SAAS,
|
|
1
|
+
{"version":3,"file":"useCurrentColor.d.ts","sourceRoot":"","sources":["../src/useCurrentColor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,eAAO,MAAM,eAAe,cAAe,SAAS,QAOnD,CAAA;AAED,MAAM,MAAM,SAAS,GACjB,eAAe,GACf,QAAQ,GACR,WAAW,GACX,SAAS,CAAC,OAAO,CAAC,GAClB,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetThemedIcon.d.ts","sourceRoot":"","sources":["../src/useGetThemedIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGetThemedIcon.d.ts","sourceRoot":"","sources":["../src/useGetThemedIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGlD,eAAO,MAAM,gBAAgB,UAAW;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,UAE5D,GAAG,QAYhB,CAAA"}
|