@tamagui/helpers-tamagui 1.88.21 → 1.88.23

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.
@@ -1,26 +1,5 @@
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
- });
1
+ export * from "@tamagui/helpers";
2
+ export * from "./prevent";
3
+ export * from "./useCurrentColor";
4
+ export * from "./useGetThemedIcon";
26
5
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,6BAAd;AACA,wBAAc,sBADd;AAEA,wBAAc,8BAFd;AAGA,wBAAc,+BAHd;",
4
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
5
5
  "names": []
6
6
  }
@@ -1,26 +1,5 @@
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);
21
1
  const prevent = (e) => [e.preventDefault(), e.stopPropagation()];
22
- // Annotate the CommonJS export names for ESM import in node:
23
- 0 && (module.exports = {
2
+ export {
24
3
  prevent
25
- });
4
+ };
26
5
  //# sourceMappingURL=prevent.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/prevent.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,EAAE,gBAAgB,CAAC;",
4
+ "mappings": "AAAO,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,EAAE,gBAAgB,CAAC;",
5
5
  "names": []
6
6
  }
@@ -1,33 +1,12 @@
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");
1
+ import { getVariable, useTheme } from "@tamagui/web";
22
2
  const useCurrentColor = (colorProp) => {
23
3
  var _a, _b;
24
- const theme = (0, import_web.useTheme)();
25
- return (0, import_web.getVariable)(
4
+ const theme = useTheme();
5
+ return getVariable(
26
6
  colorProp || ((_a = theme[colorProp]) == null ? void 0 : _a.get("web")) || ((_b = theme.color) == null ? void 0 : _b.get("web"))
27
7
  );
28
8
  };
29
- // Annotate the CommonJS export names for ESM import in node:
30
- 0 && (module.exports = {
9
+ export {
31
10
  useCurrentColor
32
- });
11
+ };
33
12
  //# 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;AAJzD;AAKE,QAAM,YAAQ,qBAAS;AAIvB,aAHY;AAAA,IACV,eAAa,WAAM,SAAgB,MAAtB,mBAAyB,IAAI,aAAU,WAAM,UAAN,mBAAa,IAAI;AAAA,EACvE;AAEF;",
4
+ "mappings": "AACA,SAAS,aAAa,gBAAgB;AAG/B,MAAM,kBAAkB,CAAC,cAAyB;AAJzD;AAKE,QAAM,QAAQ,SAAS;AAIvB,SAHY;AAAA,IACV,eAAa,WAAM,SAAgB,MAAtB,mBAAyB,IAAI,aAAU,WAAM,UAAN,mBAAa,IAAI;AAAA,EACvE;AAEF;",
5
5
  "names": []
6
6
  }
@@ -1,35 +1,15 @@
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");
1
+ import { cloneElement, createElement, isValidElement } from "react";
2
+ import { useCurrentColor } from "./useCurrentColor";
22
3
  const useGetThemedIcon = (props) => {
23
- const color = (0, import_useCurrentColor.useCurrentColor)(props.color);
24
- return (el) => el && ((0, import_react.isValidElement)(el) ? (0, import_react.cloneElement)(el, {
4
+ const color = useCurrentColor(props.color);
5
+ return (el) => el && (isValidElement(el) ? cloneElement(el, {
25
6
  ...props,
26
7
  color,
27
8
  // @ts-expect-error
28
9
  ...el.props
29
- }) : (0, import_react.createElement)(el, props));
10
+ }) : createElement(el, props));
30
11
  };
31
- // Annotate the CommonJS export names for ESM import in node:
32
- 0 && (module.exports = {
12
+ export {
33
13
  useGetThemedIcon
34
- });
14
+ };
35
15
  //# sourceMappingURL=useGetThemedIcon.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/useGetThemedIcon.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4D,kBAG5D,yBAAgC;AAEzB,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;",
4
+ "mappings": "AAAA,SAAS,cAAc,eAAe,sBAAsB;AAG5D,SAAS,uBAAuB;AAEzB,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;",
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.21",
3
+ "version": "1.88.23",
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.21",
23
- "@tamagui/web": "1.88.21"
22
+ "@tamagui/helpers": "1.88.23",
23
+ "@tamagui/web": "1.88.23"
24
24
  },
25
25
  "devDependencies": {
26
- "@tamagui/build": "1.88.21",
26
+ "@tamagui/build": "1.88.23",
27
27
  "react": "^18.2.0",
28
28
  "react-native": "^0.72.6",
29
29
  "vitest": "^0.34.3"