@tamagui/helpers-tamagui 1.88.1 → 1.88.3

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/index.js CHANGED
@@ -15,11 +15,4 @@ __reExport(src_exports, require("@tamagui/helpers"), module.exports);
15
15
  __reExport(src_exports, require("./prevent"), module.exports);
16
16
  __reExport(src_exports, require("./useCurrentColor"), module.exports);
17
17
  __reExport(src_exports, require("./useGetThemedIcon"), module.exports);
18
- // Annotate the CommonJS export names for ESM import in node:
19
- 0 && (module.exports = {
20
- ...require("@tamagui/helpers"),
21
- ...require("./prevent"),
22
- ...require("./useCurrentColor"),
23
- ...require("./useGetThemedIcon")
24
- });
25
18
  //# sourceMappingURL=index.js.map
@@ -18,8 +18,4 @@ __export(prevent_exports, {
18
18
  });
19
19
  module.exports = __toCommonJS(prevent_exports);
20
20
  const prevent = (e) => [e.preventDefault(), e.stopPropagation()];
21
- // Annotate the CommonJS export names for ESM import in node:
22
- 0 && (module.exports = {
23
- prevent
24
- });
25
21
  //# sourceMappingURL=prevent.js.map
@@ -19,14 +19,9 @@ __export(useCurrentColor_exports, {
19
19
  module.exports = __toCommonJS(useCurrentColor_exports);
20
20
  var import_web = require("@tamagui/web");
21
21
  const useCurrentColor = (colorProp) => {
22
- var _a, _b;
23
22
  const theme = (0, import_web.useTheme)();
24
23
  return (0, import_web.getVariable)(
25
- colorProp || ((_a = theme[colorProp]) == null ? void 0 : _a.get("web")) || ((_b = theme.color) == null ? void 0 : _b.get("web"))
24
+ colorProp || theme[colorProp]?.get("web") || theme.color?.get("web")
26
25
  );
27
26
  };
28
- // Annotate the CommonJS export names for ESM import in node:
29
- 0 && (module.exports = {
30
- useCurrentColor
31
- });
32
27
  //# 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;AAAA,iBAMO;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AATzD;AAUE,QAAM,YAAQ,qBAAS;AAIvB,aAHY;AAAA,IACV,eAAa,WAAM,SAAgB,MAAtB,mBAAyB,IAAI,aAAU,WAAM,UAAN,mBAAa,IAAI;AAAA,EACvE;AAEF;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMO;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,YAAQ,qBAAS;AAIvB,aAHY;AAAA,IACV,aAAa,MAAM,SAAgB,GAAG,IAAI,KAAK,KAAK,MAAM,OAAO,IAAI,KAAK;AAAA,EAC5E;AAEF;",
5
5
  "names": []
6
6
  }
@@ -27,8 +27,4 @@ const useGetThemedIcon = (props) => {
27
27
  ...el.props
28
28
  }) : (0, import_react.createElement)(el, props));
29
29
  };
30
- // Annotate the CommonJS export names for ESM import in node:
31
- 0 && (module.exports = {
32
- useGetThemedIcon
33
- });
34
30
  //# sourceMappingURL=useGetThemedIcon.js.map
@@ -1,5 +1,26 @@
1
- export * from "@tamagui/helpers";
2
- export * from "./prevent";
3
- export * from "./useCurrentColor";
4
- export * from "./useGetThemedIcon";
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
12
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
13
+ var src_exports = {};
14
+ module.exports = __toCommonJS(src_exports);
15
+ __reExport(src_exports, require("@tamagui/helpers"), module.exports);
16
+ __reExport(src_exports, require("./prevent"), module.exports);
17
+ __reExport(src_exports, require("./useCurrentColor"), module.exports);
18
+ __reExport(src_exports, require("./useGetThemedIcon"), module.exports);
19
+ // Annotate the CommonJS export names for ESM import in node:
20
+ 0 && (module.exports = {
21
+ ...require("@tamagui/helpers"),
22
+ ...require("./prevent"),
23
+ ...require("./useCurrentColor"),
24
+ ...require("./useGetThemedIcon")
25
+ });
5
26
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,6BAAd;AACA,wBAAc,sBADd;AAEA,wBAAc,8BAFd;AAGA,wBAAc,+BAHd;",
5
5
  "names": []
6
6
  }
@@ -1,5 +1,26 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
+ var prevent_exports = {};
17
+ __export(prevent_exports, {
18
+ prevent: () => prevent
19
+ });
20
+ module.exports = __toCommonJS(prevent_exports);
1
21
  const prevent = (e) => [e.preventDefault(), e.stopPropagation()];
2
- export {
22
+ // Annotate the CommonJS export names for ESM import in node:
23
+ 0 && (module.exports = {
3
24
  prevent
4
- };
25
+ });
5
26
  //# sourceMappingURL=prevent.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/prevent.tsx"],
4
- "mappings": "AAAO,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,EAAE,gBAAgB,CAAC;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,EAAE,gBAAgB,CAAC;",
5
5
  "names": []
6
6
  }
@@ -1,14 +1,33 @@
1
- import {
2
- getVariable,
3
- useTheme
4
- } from "@tamagui/web";
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
+ var useCurrentColor_exports = {};
17
+ __export(useCurrentColor_exports, {
18
+ useCurrentColor: () => useCurrentColor
19
+ });
20
+ module.exports = __toCommonJS(useCurrentColor_exports);
21
+ var import_web = require("@tamagui/web");
5
22
  const useCurrentColor = (colorProp) => {
6
- const theme = useTheme();
7
- return getVariable(
8
- colorProp || theme[colorProp]?.get("web") || theme.color?.get("web")
23
+ var _a, _b;
24
+ const theme = (0, import_web.useTheme)();
25
+ return (0, import_web.getVariable)(
26
+ colorProp || ((_a = theme[colorProp]) == null ? void 0 : _a.get("web")) || ((_b = theme.color) == null ? void 0 : _b.get("web"))
9
27
  );
10
28
  };
11
- export {
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
12
31
  useCurrentColor
13
- };
32
+ });
14
33
  //# sourceMappingURL=useCurrentColor.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/useCurrentColor.tsx"],
4
- "mappings": "AAAA;AAAA,EAIE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AAIvB,SAHY;AAAA,IACV,aAAa,MAAM,SAAgB,GAAG,IAAI,KAAK,KAAK,MAAM,OAAO,IAAI,KAAK;AAAA,EAC5E;AAEF;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMO;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AATzD;AAUE,QAAM,YAAQ,qBAAS;AAIvB,aAHY;AAAA,IACV,eAAa,WAAM,SAAgB,MAAtB,mBAAyB,IAAI,aAAU,WAAM,UAAN,mBAAa,IAAI;AAAA,EACvE;AAEF;",
5
5
  "names": []
6
6
  }
@@ -1,15 +1,35 @@
1
- import { cloneElement, createElement, isValidElement } from "react";
2
- import { useCurrentColor } from "./useCurrentColor";
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
+ var useGetThemedIcon_exports = {};
17
+ __export(useGetThemedIcon_exports, {
18
+ useGetThemedIcon: () => useGetThemedIcon
19
+ });
20
+ module.exports = __toCommonJS(useGetThemedIcon_exports);
21
+ var import_react = require("react"), import_useCurrentColor = require("./useCurrentColor");
3
22
  const useGetThemedIcon = (props) => {
4
- const color = useCurrentColor(props.color);
5
- return (el) => el && (isValidElement(el) ? cloneElement(el, {
23
+ const color = (0, import_useCurrentColor.useCurrentColor)(props.color);
24
+ return (el) => el && ((0, import_react.isValidElement)(el) ? (0, import_react.cloneElement)(el, {
6
25
  ...props,
7
26
  color,
8
27
  // @ts-expect-error
9
28
  ...el.props
10
- }) : createElement(el, props));
29
+ }) : (0, import_react.createElement)(el, props));
11
30
  };
12
- export {
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
13
33
  useGetThemedIcon
14
- };
34
+ });
15
35
  //# sourceMappingURL=useGetThemedIcon.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/useGetThemedIcon.tsx"],
4
- "mappings": "AAAA,SAAS,cAAc,eAAe,sBAAsB;AAE5D,SAAoB,uBAAuB;AAEpC,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,QAAQ,gBAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OACD,OACD,eAAe,EAAE,IACZ,aAAa,IAAI;AAAA,IACtB,GAAG;AAAA,IACH;AAAA;AAAA,IAEA,GAAG,GAAG;AAAA,EACR,CAAC,IAEI,cAAc,IAAI,KAAK;AAElC;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4D,kBAE5D,yBAA2C;AAEpC,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,YAAQ,wCAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OACD,WACD,6BAAe,EAAE,QACZ,2BAAa,IAAI;AAAA,IACtB,GAAG;AAAA,IACH;AAAA;AAAA,IAEA,GAAG,GAAG;AAAA,EACR,CAAC,QAEI,4BAAc,IAAI,KAAK;AAElC;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/helpers-tamagui",
3
- "version": "1.88.1",
3
+ "version": "1.88.3",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "main": "dist/cjs",
@@ -19,11 +19,11 @@
19
19
  "clean:build": "tamagui-build clean:build"
20
20
  },
21
21
  "dependencies": {
22
- "@tamagui/helpers": "1.88.1",
23
- "@tamagui/web": "1.88.1"
22
+ "@tamagui/helpers": "1.88.3",
23
+ "@tamagui/web": "1.88.3"
24
24
  },
25
25
  "devDependencies": {
26
- "@tamagui/build": "1.88.1",
26
+ "@tamagui/build": "1.88.3",
27
27
  "react": "^18.2.0",
28
28
  "react-native": "^0.72.6",
29
29
  "vitest": "^0.34.3"