@tamagui/compose-refs 1.61.3 → 1.62.1

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,20 +1,15 @@
1
- "use strict";
2
1
  var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
14
11
  for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
13
  return to;
19
14
  };
20
15
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
@@ -22,10 +17,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
17
  // file that has been converted to a CommonJS file using a Babel-
23
18
  // compatible transform (i.e. "__esModule" has not been set), then set
24
19
  // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
26
21
  mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
29
23
  var compose_refs_exports = {};
30
24
  __export(compose_refs_exports, {
31
25
  composeRefs: () => composeRefs,
@@ -34,12 +28,7 @@ __export(compose_refs_exports, {
34
28
  module.exports = __toCommonJS(compose_refs_exports);
35
29
  var React = __toESM(require("react"));
36
30
  function setRef(ref, value) {
37
- if (typeof ref === "function") {
38
- ref(value);
39
- } else if (ref) {
40
- ;
41
- ref.current = value;
42
- }
31
+ typeof ref == "function" ? ref(value) : ref && (ref.current = value);
43
32
  }
44
33
  function composeRefs(...refs) {
45
34
  return (node) => refs.forEach((ref) => setRef(ref, node));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/compose-refs.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,YAAuB;AAYvB,SAAS,OAAU,KAAqB,OAAU;AAChD,MAAI,OAAO,QAAQ,YAAY;AAC7B,QAAI,KAAK;AAAA,EACX,WAAW,KAAK;AACd;AAAC,IAAC,IAAkC,UAAU;AAAA,EAChD;AACF;AAMO,SAAS,eAAkB,MAAwB;AACxD,SAAO,CAAC,SAAY,KAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAC7D;AAMO,SAAS,mBAAsB,MAAwB;AAE5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,YAAuB;AAYvB,SAAS,OAAU,KAAqB,OAAU;AAChD,EAAI,OAAO,OAAQ,aACjB,IAAI,KAAK,IACA,QACP,IAAkC,UAAU;AAElD;AAMO,SAAS,eAAkB,MAAwB;AACxD,SAAO,CAAC,SAAY,KAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAC7D;AAMO,SAAS,mBAAsB,MAAwB;AAE5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: !0 });
10
+ }, __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from == "object" || typeof from == "function")
12
+ for (let key of __getOwnPropNames(from))
13
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
+ mod
23
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
+ var compose_refs_exports = {};
25
+ __export(compose_refs_exports, {
26
+ composeRefs: () => composeRefs,
27
+ useComposedRefs: () => useComposedRefs
28
+ });
29
+ module.exports = __toCommonJS(compose_refs_exports);
30
+ var React = __toESM(require("react"));
31
+ function setRef(ref, value) {
32
+ typeof ref == "function" ? ref(value) : ref && (ref.current = value);
33
+ }
34
+ function composeRefs(...refs) {
35
+ return (node) => refs.forEach((ref) => setRef(ref, node));
36
+ }
37
+ function useComposedRefs(...refs) {
38
+ return React.useCallback(composeRefs(...refs), refs);
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ composeRefs,
43
+ useComposedRefs
44
+ });
45
+ //# sourceMappingURL=compose-refs.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/compose-refs.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,YAAuB;AAYvB,SAAS,OAAU,KAAqB,OAAU;AAChD,EAAI,OAAO,OAAQ,aACjB,IAAI,KAAK,IACA,QACP,IAAkC,UAAU;AAElD;AAMO,SAAS,eAAkB,MAAwB;AACxD,SAAO,CAAC,SAAY,KAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAC7D;AAMO,SAAS,mBAAsB,MAAwB;AAE5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
5
+ "names": []
6
+ }
package/dist/cjs/index.js CHANGED
@@ -1,18 +1,14 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
6
+ if (from && typeof from == "object" || typeof from == "function")
8
7
  for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
8
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
9
  return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
10
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
12
  var src_exports = {};
17
13
  module.exports = __toCommonJS(src_exports);
18
14
  __reExport(src_exports, require("./compose-refs"), module.exports);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,2BAAd;",
4
+ "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,2BAAd;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,20 @@
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("./compose-refs"), module.exports);
16
+ // Annotate the CommonJS export names for ESM import in node:
17
+ 0 && (module.exports = {
18
+ ...require("./compose-refs")
19
+ });
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,2BAAd;",
5
+ "names": []
6
+ }
@@ -1,11 +1,6 @@
1
1
  import * as React from "react";
2
2
  function setRef(ref, value) {
3
- if (typeof ref === "function") {
4
- ref(value);
5
- } else if (ref) {
6
- ;
7
- ref.current = value;
8
- }
3
+ typeof ref == "function" ? ref(value) : ref && (ref.current = value);
9
4
  }
10
5
  function composeRefs(...refs) {
11
6
  return (node) => refs.forEach((ref) => setRef(ref, node));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/compose-refs.tsx"],
4
- "mappings": "AAGA,YAAY,WAAW;AAYvB,SAAS,OAAU,KAAqB,OAAU;AAChD,MAAI,OAAO,QAAQ,YAAY;AAC7B,QAAI,KAAK;AAAA,EACX,WAAW,KAAK;AACd;AAAC,IAAC,IAAkC,UAAU;AAAA,EAChD;AACF;AAMO,SAAS,eAAkB,MAAwB;AACxD,SAAO,CAAC,SAAY,KAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAC7D;AAMO,SAAS,mBAAsB,MAAwB;AAE5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
4
+ "mappings": "AAGA,YAAY,WAAW;AAYvB,SAAS,OAAU,KAAqB,OAAU;AAChD,EAAI,OAAO,OAAQ,aACjB,IAAI,KAAK,IACA,QACP,IAAkC,UAAU;AAElD;AAMO,SAAS,eAAkB,MAAwB;AACxD,SAAO,CAAC,SAAY,KAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAC7D;AAMO,SAAS,mBAAsB,MAAwB;AAE5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
5
5
  "names": []
6
6
  }
@@ -1,11 +1,6 @@
1
1
  import * as React from "react";
2
2
  function setRef(ref, value) {
3
- if (typeof ref === "function") {
4
- ref(value);
5
- } else if (ref) {
6
- ;
7
- ref.current = value;
8
- }
3
+ typeof ref == "function" ? ref(value) : ref && (ref.current = value);
9
4
  }
10
5
  function composeRefs(...refs) {
11
6
  return (node) => refs.forEach((ref) => setRef(ref, node));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/compose-refs.tsx"],
4
- "mappings": "AAGA,YAAY,WAAW;AAYvB,SAAS,OAAU,KAAqB,OAAU;AAChD,MAAI,OAAO,QAAQ,YAAY;AAC7B,QAAI,KAAK;AAAA,EACX,WAAW,KAAK;AACd;AAAC,IAAC,IAAkC,UAAU;AAAA,EAChD;AACF;AAMO,SAAS,eAAkB,MAAwB;AACxD,SAAO,CAAC,SAAY,KAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAC7D;AAMO,SAAS,mBAAsB,MAAwB;AAE5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
4
+ "mappings": "AAGA,YAAY,WAAW;AAYvB,SAAS,OAAU,KAAqB,OAAU;AAChD,EAAI,OAAO,OAAQ,aACjB,IAAI,KAAK,IACA,QACP,IAAkC,UAAU;AAElD;AAMO,SAAS,eAAkB,MAAwB;AACxD,SAAO,CAAC,SAAY,KAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAC7D;AAMO,SAAS,mBAAsB,MAAwB;AAE5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ function setRef(ref, value) {
3
+ typeof ref == "function" ? ref(value) : ref && (ref.current = value);
4
+ }
5
+ function composeRefs(...refs) {
6
+ return (node) => refs.forEach((ref) => setRef(ref, node));
7
+ }
8
+ function useComposedRefs(...refs) {
9
+ return React.useCallback(composeRefs(...refs), refs);
10
+ }
11
+ export {
12
+ composeRefs,
13
+ useComposedRefs
14
+ };
15
+ //# sourceMappingURL=compose-refs.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/compose-refs.tsx"],
4
+ "mappings": "AAGA,YAAY,WAAW;AAYvB,SAAS,OAAU,KAAqB,OAAU;AAChD,EAAI,OAAO,OAAQ,aACjB,IAAI,KAAK,IACA,QACP,IAAkC,UAAU;AAElD;AAMO,SAAS,eAAkB,MAAwB;AACxD,SAAO,CAAC,SAAY,KAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAC7D;AAMO,SAAS,mBAAsB,MAAwB;AAE5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
5
+ "names": []
6
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./compose-refs";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": "AAAA,cAAc;",
5
+ "names": []
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/compose-refs",
3
- "version": "1.61.3",
3
+ "version": "1.62.1",
4
4
  "sideEffects": false,
5
5
  "source": "src/index.ts",
6
6
  "types": "./types/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  "react": "*"
21
21
  },
22
22
  "devDependencies": {
23
- "@tamagui/build": "1.61.3",
23
+ "@tamagui/build": "1.62.1",
24
24
  "react": "^18.2.0"
25
25
  },
26
26
  "publishConfig": {