@tamagui/compose-refs 2.0.0-rc.4 → 2.0.0-rc.40

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.
@@ -2,33 +2,35 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: true
33
+ }), mod);
32
34
  var compose_refs_exports = {};
33
35
  __export(compose_refs_exports, {
34
36
  composeRefs: () => composeRefs,
@@ -38,7 +40,12 @@ __export(compose_refs_exports, {
38
40
  module.exports = __toCommonJS(compose_refs_exports);
39
41
  var React = __toESM(require("react"), 1);
40
42
  function setRef(ref, value) {
41
- typeof ref == "function" ? ref(value) : ref && (ref.current = value);
43
+ if (typeof ref === "function") {
44
+ ref(value);
45
+ } else if (ref) {
46
+ ;
47
+ ref.current = value;
48
+ }
42
49
  }
43
50
  function composeRefs(...refs) {
44
51
  return node => refs.forEach(ref => setRef(ref, node));
@@ -4,33 +4,35 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
34
36
  var compose_refs_exports = {};
35
37
  __export(compose_refs_exports, {
36
38
  composeRefs: () => composeRefs,
@@ -40,10 +42,17 @@ __export(compose_refs_exports, {
40
42
  module.exports = __toCommonJS(compose_refs_exports);
41
43
  var React = __toESM(require("react"), 1);
42
44
  function setRef(ref, value) {
43
- typeof ref == "function" ? ref(value) : ref && (ref.current = value);
45
+ if (typeof ref === "function") {
46
+ ref(value);
47
+ } else if (ref) {
48
+ ;
49
+ ref.current = value;
50
+ }
44
51
  }
45
52
  function composeRefs() {
46
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
53
+ for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
54
+ refs[_key] = arguments[_key];
55
+ }
47
56
  return function (node) {
48
57
  return refs.forEach(function (ref) {
49
58
  return setRef(ref, node);
@@ -51,7 +60,9 @@ function composeRefs() {
51
60
  };
52
61
  }
53
62
  function useComposedRefs() {
54
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
63
+ for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
64
+ refs[_key] = arguments[_key];
65
+ }
55
66
  return React.useCallback(composeRefs(...refs), refs);
56
67
  }
57
68
  //# sourceMappingURL=compose-refs.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","compose_refs_exports","__export","composeRefs","setRef","useComposedRefs","module","exports","React","__toESM","require","ref","current","_len","arguments","length","refs","Array","_key","node","forEach"],"sources":["../../src/compose-refs.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,MAAA,EAAAA,CAAA,KAAAA,MAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA;AAAA;AAGAC,MAAA,CAAAC,OAAuB,GAAAX,YAAA,CAAAK,oBAAA;AAahB,IAAAO,KAAS,GAAAC,OAAU,CAAAC,OAAqB,CAAU;AACvD,SAAWN,OAAQO,GAAA,EAAAX,KAAA;EAKrB,OAAAW,GAAA,iBAAAA,GAAA,CAAAX,KAAA,IAAAW,GAAA,KAAAA,GAAA,CAAAC,OAAA,GAAAZ,KAAA;AAMO;AACL,SAAOG,WAAaA,CAAA;EACtB,SAAAU,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,IAMOF,IAAA,CAASE,IAAA,IAAAJ,SAAA,CAAAI,IAAsB;EACpC,OAAO,UAAMC,IAAA;IACf,OAAAH,IAAA,CAAAI,OAAA,WAAAT,GAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","compose_refs_exports","__export","composeRefs","setRef","useComposedRefs","module","exports","React","__toESM","require","ref","current","_len","arguments","length","refs","Array","_key","node"],"sources":["../../src/compose-refs.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,MAAA,EAAAA,CAAA,KAAAA,MAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA;AAAA;AAGAC,MAAA,CAAAC,OAAuB,GAAAX,YAAA,CAAAK,oBAAA;AAahB,IAAAO,KAAS,GAAAC,OAAU,CAAAC,OAAqB,CAAU;AACvD,SAAIN,MAAOA,CAAAO,GAAA,EAAQX,KAAA;EACjB,WAASW,GAAA;IACXA,GAAA,CAAAX,KAAW;EACT,WAAAW,GAAA;IAAE;IACJA,GAAA,CAAAC,OAAA,GAAAZ,KAAA;EACF;AAMO;AACL,SAAOG,WAAaA,CAAA;EACtB,SAAAU,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAMOF,IAAA,CAASE,IAAA,IAAAJ,SAAA,CAAAI,IAAsB;EACpC;EACF,iBAAAC,IAAA","ignoreList":[]}
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
7
8
  get: () => from[key],
8
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
10
  });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
15
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
10
  get: () => from[key],
10
11
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
12
  });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
17
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
18
+ value: true
17
19
  }), mod);
18
20
  var index_exports = {};
19
21
  module.exports = __toCommonJS(index_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
@@ -1,6 +1,11 @@
1
1
  import * as React from "react";
2
2
  function setRef(ref, value) {
3
- typeof ref == "function" ? ref(value) : ref && (ref.current = value);
3
+ if (typeof ref === "function") {
4
+ ref(value);
5
+ } else if (ref) {
6
+ ;
7
+ ref.current = value;
8
+ }
4
9
  }
5
10
  function composeRefs(...refs) {
6
11
  return node => refs.forEach(ref => setRef(ref, node));
@@ -1 +1 @@
1
- {"version":3,"names":["React","setRef","ref","value","current","composeRefs","refs","node","forEach","useComposedRefs","useCallback"],"sources":["../../src/compose-refs.tsx"],"sourcesContent":[null],"mappings":"AAGA,YAAYA,KAAA,MAAW;AAahB,SAASC,OAAUC,GAAA,EAAqBC,KAAA,EAAU;EACnD,OAAOD,GAAA,IAAQ,aACjBA,GAAA,CAAIC,KAAK,IACAD,GAAA,KACPA,GAAA,CAAkCE,OAAA,GAAUD,KAAA;AAElD;AAMO,SAASE,YAAA,GAAkBC,IAAA,EAAwB;EACxD,OAAQC,IAAA,IAAYD,IAAA,CAAKE,OAAA,CAASN,GAAA,IAAQD,MAAA,CAAOC,GAAA,EAAKK,IAAI,CAAC;AAC7D;AAMO,SAASE,gBAAA,GAAsBH,IAAA,EAAwB;EAC5D,OAAON,KAAA,CAAMU,WAAA,CAAYL,WAAA,CAAY,GAAGC,IAAI,GAAGA,IAAI;AACrD","ignoreList":[]}
1
+ {"version":3,"names":["React","setRef","ref","value","current","composeRefs","refs","node","forEach","useComposedRefs","useCallback"],"sources":["../../src/compose-refs.tsx"],"sourcesContent":[null],"mappings":"AAGA,YAAYA,KAAA,MAAW;AAahB,SAASC,OAAUC,GAAA,EAAqBC,KAAA,EAAU;EACvD,IAAI,OAAOD,GAAA,KAAQ,YAAY;IAC7BA,GAAA,CAAIC,KAAK;EACX,WAAWD,GAAA,EAAK;IACd;IAAEA,GAAA,CAAkCE,OAAA,GAAUD,KAAA;EAChD;AACF;AAMO,SAASE,YAAA,GAAkBC,IAAA,EAAwB;EACxD,OAAQC,IAAA,IAAYD,IAAA,CAAKE,OAAA,CAASN,GAAA,IAAQD,MAAA,CAAOC,GAAA,EAAKK,IAAI,CAAC;AAC7D;AAMO,SAASE,gBAAA,GAAsBH,IAAA,EAAwB;EAC5D,OAAON,KAAA,CAAMU,WAAA,CAAYL,WAAA,CAAY,GAAGC,IAAI,GAAGA,IAAI;AACrD","ignoreList":[]}
@@ -1,9 +1,16 @@
1
1
  import * as React from "react";
2
2
  function setRef(ref, value) {
3
- typeof ref == "function" ? ref(value) : ref && (ref.current = value);
3
+ if (typeof ref === "function") {
4
+ ref(value);
5
+ } else if (ref) {
6
+ ;
7
+ ref.current = value;
8
+ }
4
9
  }
5
10
  function composeRefs() {
6
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
11
+ for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
12
+ refs[_key] = arguments[_key];
13
+ }
7
14
  return function (node) {
8
15
  return refs.forEach(function (ref) {
9
16
  return setRef(ref, node);
@@ -11,7 +18,9 @@ function composeRefs() {
11
18
  };
12
19
  }
13
20
  function useComposedRefs() {
14
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
21
+ for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
22
+ refs[_key] = arguments[_key];
23
+ }
15
24
  return React.useCallback(composeRefs(...refs), refs);
16
25
  }
17
26
  export { composeRefs, setRef, useComposedRefs };
@@ -1 +1 @@
1
- {"version":3,"names":["React","setRef","ref","value","current","composeRefs","_len","arguments","length","refs","Array","_key","node","forEach"],"sources":["../../src/compose-refs.tsx"],"sourcesContent":[null],"mappings":"AAGA,YAAYA,KAAA,MAAW;AAahB,SAASC,OAAUC,GAAA,EAAqBC,KAAA,EAAU;EACnD,OAAOD,GAAA,IAAQ,aACjBA,GAAA,CAAIC,KAAK,IACAD,GAAA,KACPA,GAAA,CAAkCE,OAAA,GAAUD,KAAA;AAElD;AAMO,SAASE,YAAA;EACd,SAAQC,IAAA,GAAAC,SAAiB,CAAAC,MAAS,EAAAC,IAAA,GAAQ,IAAAC,KAAO,CAAKJ,IAAI,CAAC,EAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,IAC7DF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAMO,OAAS,UAAAC,IAAA;IACd,OAAOH,IAAM,CAAAI,OAAA,WAAYX,GAAA;MAC3B,OAAAD,MAAA,CAAAC,GAAA,EAAAU,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["React","setRef","ref","value","current","composeRefs","_len","arguments","length","refs","Array","_key","node","forEach"],"sources":["../../src/compose-refs.tsx"],"sourcesContent":[null],"mappings":"AAGA,YAAYA,KAAA,MAAW;AAahB,SAASC,OAAUC,GAAA,EAAqBC,KAAA,EAAU;EACvD,IAAI,OAAOD,GAAA,KAAQ,YAAY;IAC7BA,GAAA,CAAIC,KAAK;EACX,WAAWD,GAAA,EAAK;IACd;IAAEA,GAAA,CAAkCE,OAAA,GAAUD,KAAA;EAChD;AACF;AAMO,SAASE,YAAA;EACd,SAAQC,IAAA,GAAAC,SAAiB,CAAAC,MAAS,EAAAC,IAAA,GAAQ,IAAAC,KAAO,CAAKJ,IAAI,CAAC,EAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAC7DF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAMO;EACL,OAAO,UAAMC,IAAA;IACf,OAAAH,IAAA,CAAAI,OAAA,WAAAX,GAAA","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./compose-refs";
1
+ export * from "./compose-refs.mjs";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": "AAAA,cAAc;",
5
- "names": []
6
- }
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/compose-refs",
3
- "version": "2.0.0-rc.4",
3
+ "version": "2.0.0-rc.40",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -17,15 +17,12 @@
17
17
  "./package.json": "./package.json",
18
18
  ".": {
19
19
  "types": "./types/index.d.ts",
20
- "react-native": {
21
- "module": "./dist/esm/index.native.js",
22
- "import": "./dist/esm/index.native.js",
23
- "require": "./dist/cjs/index.native.js"
24
- },
20
+ "react-native": "./dist/esm/index.native.js",
21
+ "browser": "./dist/esm/index.mjs",
25
22
  "module": "./dist/esm/index.mjs",
26
23
  "import": "./dist/esm/index.mjs",
27
24
  "require": "./dist/cjs/index.cjs",
28
- "default": "./dist/cjs/index.native.js"
25
+ "default": "./dist/esm/index.mjs"
29
26
  }
30
27
  },
31
28
  "publishConfig": {
@@ -37,7 +34,7 @@
37
34
  "clean": "tamagui-build clean"
38
35
  },
39
36
  "devDependencies": {
40
- "@tamagui/build": "2.0.0-rc.4",
37
+ "@tamagui/build": "2.0.0-rc.40",
41
38
  "react": ">=19"
42
39
  },
43
40
  "peerDependencies": {
@@ -1,40 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var compose_refs_exports = {};
24
- __export(compose_refs_exports, {
25
- composeRefs: () => composeRefs,
26
- setRef: () => setRef,
27
- useComposedRefs: () => useComposedRefs
28
- });
29
- module.exports = __toCommonJS(compose_refs_exports);
30
- var React = __toESM(require("react"), 1);
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
- //# sourceMappingURL=compose-refs.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/compose-refs.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,YAAuB;AAahB,SAAS,OAAU,KAAqB,OAAU;AACvD,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;AAC5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
5
- "names": []
6
- }
package/dist/cjs/index.js DELETED
@@ -1,15 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var index_exports = {};
13
- module.exports = __toCommonJS(index_exports);
14
- __reExport(index_exports, require("./compose-refs"), module.exports);
15
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,2BAAd;",
5
- "names": []
6
- }
@@ -1,16 +0,0 @@
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
- setRef,
14
- useComposedRefs
15
- };
16
- //# sourceMappingURL=compose-refs.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/compose-refs.tsx"],
4
- "mappings": "AAGA,YAAY,WAAW;AAahB,SAAS,OAAU,KAAqB,OAAU;AACvD,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;AAC5D,SAAO,MAAM,YAAY,YAAY,GAAG,IAAI,GAAG,IAAI;AACrD;",
5
- "names": []
6
- }