@tamagui/helpers-tamagui 1.121.12 → 1.122.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.
@@ -26,7 +26,5 @@ module.exports = __toCommonJS(useCurrentColor_exports);
26
26
  var import_web = require("@tamagui/web");
27
27
  const useCurrentColor = colorProp => {
28
28
  const theme = (0, import_web.useTheme)();
29
- return (0, import_web.getVariable)(
30
- // TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions
31
- colorProp || theme[colorProp]?.get("web") || theme.color?.get("web"));
29
+ return colorProp ? (0, import_web.getVariable)(colorProp) : theme[colorProp]?.get() || theme.color?.get();
32
30
  };
@@ -20,9 +20,6 @@ module.exports = __toCommonJS(useCurrentColor_exports);
20
20
  var import_web = require("@tamagui/web");
21
21
  const useCurrentColor = (colorProp) => {
22
22
  const theme = (0, import_web.useTheme)();
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
25
- colorProp || theme[colorProp]?.get("web") || theme.color?.get("web")
26
- );
23
+ return colorProp ? (0, import_web.getVariable)(colorProp) : theme[colorProp]?.get() || theme.color?.get();
27
24
  };
28
25
  //# sourceMappingURL=useCurrentColor.js.map
@@ -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;AAKvB,aAJY;AAAA;AAAA,IAEV,aAAa,MAAM,SAAgB,GAAG,IAAI,KAAK,KAAK,MAAM,OAAO,IAAI,KAAK;AAAA,EAC5E;AAEF;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAAsC;AAG/B,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,YAAQ,qBAAS;AAIvB,SAHY,gBACR,wBAAY,SAAS,IACrB,MAAM,SAAgB,GAAG,IAAI,KAAK,MAAM,OAAO,IAAI;AAEzD;",
5
5
  "names": []
6
6
  }
@@ -19,10 +19,7 @@ __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)(
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
- );
22
+ var _theme_colorProp, _theme_color, theme = (0, import_web.useTheme)(), out = colorProp ? (0, import_web.getVariable)(colorProp) : ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get()) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get());
26
23
  return out;
27
24
  };
28
25
  // 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;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;",
4
+ "mappings": ";;;;;;;;;;;;;;;AACA;;;;;iBAAsC,yBAGzBA,kBAAkB,SAACC,WAAAA;MAI1BC,kBAAkCA,cAHhCA,YAAQC,qBAAAA,GACRC,MAAMH,gBACRI,wBAAYJ,SAAAA,MACZC,mBAAAA,MAAMD,SAAAA,OAAiB,QAAvBC,qBAAAA,SAAAA,SAAAA,iBAAyBI,IAAG,QAAMJ,eAAAA,MAAMK,WAAK,QAAXL,iBAAAA,SAAAA,SAAAA,aAAaI,IAAG;AACtD,SAAOF;AACT;",
5
5
  "names": ["useCurrentColor", "colorProp", "theme", "useTheme", "out", "getVariable", "get", "color"]
6
6
  }
@@ -1,10 +1,7 @@
1
1
  import { getVariable, useTheme } from "@tamagui/web";
2
2
  const useCurrentColor = (colorProp) => {
3
3
  const theme = useTheme();
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")
7
- );
4
+ return colorProp ? getVariable(colorProp) : theme[colorProp]?.get() || theme.color?.get();
8
5
  };
9
6
  export {
10
7
  useCurrentColor
@@ -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;AAKvB,SAJY;AAAA;AAAA,IAEV,aAAa,MAAM,SAAgB,GAAG,IAAI,KAAK,KAAK,MAAM,OAAO,IAAI,KAAK;AAAA,EAC5E;AAEF;",
4
+ "mappings": "AACA,SAAS,aAAa,gBAAgB;AAG/B,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AAIvB,SAHY,YACR,YAAY,SAAS,IACrB,MAAM,SAAgB,GAAG,IAAI,KAAK,MAAM,OAAO,IAAI;AAEzD;",
5
5
  "names": []
6
6
  }
@@ -1,9 +1,7 @@
1
1
  import { getVariable, useTheme } from "@tamagui/web";
2
2
  const useCurrentColor = colorProp => {
3
3
  const theme = useTheme();
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"));
4
+ return colorProp ? getVariable(colorProp) : theme[colorProp]?.get() || theme.color?.get();
7
5
  };
8
6
  export { useCurrentColor };
9
7
  //# 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;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":[]}
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;EAIvB,OAHYE,SAAA,GACRH,WAAA,CAAYG,SAAS,IACrBC,KAAA,CAAMD,SAAgB,GAAGE,GAAA,CAAI,KAAKD,KAAA,CAAME,KAAA,EAAOD,GAAA,CAAI;AAEzD","ignoreList":[]}
@@ -1,9 +1,6 @@
1
1
  import { getVariable, useTheme } from "@tamagui/web";
2
2
  var useCurrentColor = function(colorProp) {
3
- var _theme_colorProp, _theme_color, theme = useTheme(), out = getVariable(
4
- // TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions
5
- 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"))
6
- );
3
+ var _theme_colorProp, _theme_color, theme = useTheme(), out = colorProp ? getVariable(colorProp) : ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get()) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get());
7
4
  return out;
8
5
  };
9
6
  export {
@@ -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,SAASA,aAAaC,gBAAgB;AAG/B,IAAMC,kBAAkB,SAACC,WAAAA;MAIfC,kBAAuCA,cAHhDA,QAAQH,SAAAA,GACRI,MAAML;;IAEVG,eAAaC,mBAAAA,MAAMD,SAAAA,OAAiB,QAAvBC,qBAAAA,SAAAA,SAAAA,iBAAyBE,IAAI,KAAA,QAAUF,eAAAA,MAAMG,WAAK,QAAXH,iBAAAA,SAAAA,SAAAA,aAAaE,IAAI,KAAA;EAAA;AAEvE,SAAOD;AACT;",
4
+ "mappings": "AACA,SAASA,aAAaC,gBAAgB;AAG/B,IAAMC,kBAAkB,SAACC,WAAAA;MAI1BC,kBAAkCA,cAHhCA,QAAQH,SAAAA,GACRI,MAAMF,YACRH,YAAYG,SAAAA,MACZC,mBAAAA,MAAMD,SAAAA,OAAiB,QAAvBC,qBAAAA,SAAAA,SAAAA,iBAAyBE,IAAG,QAAMF,eAAAA,MAAMG,WAAK,QAAXH,iBAAAA,SAAAA,SAAAA,aAAaE,IAAG;AACtD,SAAOD;AACT;",
5
5
  "names": ["getVariable", "useTheme", "useCurrentColor", "colorProp", "theme", "out", "get", "color"]
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/helpers-tamagui",
3
- "version": "1.121.12",
3
+ "version": "1.122.0",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "main": "dist/cjs",
@@ -32,11 +32,11 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@tamagui/helpers": "1.121.12",
36
- "@tamagui/web": "1.121.12"
35
+ "@tamagui/helpers": "1.122.0",
36
+ "@tamagui/web": "1.122.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@tamagui/build": "1.121.12",
39
+ "@tamagui/build": "1.122.0",
40
40
  "react": "*",
41
41
  "vitest": "^2.1.8"
42
42
  },
@@ -4,10 +4,9 @@ import type { TextStyle } from 'react-native'
4
4
 
5
5
  export const useCurrentColor = (colorProp: ColorProp) => {
6
6
  const theme = useTheme()
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
9
- colorProp || theme[colorProp as any]?.get('web') || theme.color?.get('web')
10
- )
7
+ const out = colorProp
8
+ ? getVariable(colorProp)
9
+ : theme[colorProp as any]?.get() || theme.color?.get()
11
10
  return out
12
11
  }
13
12