@hanzogui/compose-refs 8.3.1 → 8.3.2

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.
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ // from radix
3
+ // https://raw.githubusercontent.com/radix-ui/primitives/main/packages/react/compose-refs/src/composeRefs.tsx
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.setRef = setRef;
6
+ exports.composeRefs = composeRefs;
7
+ exports.useComposedRefs = useComposedRefs;
8
+ const tslib_1 = require("tslib");
9
+ const React = tslib_1.__importStar(require("react"));
10
+ /**
11
+ * Set a given ref to a given value
12
+ * This utility takes care of different types of refs: callback refs and RefObject(s)
13
+ */
14
+ function setRef(ref, value) {
15
+ if (typeof ref === 'function') {
16
+ ref(value);
17
+ }
18
+ else if (ref) {
19
+ ;
20
+ ref.current = value;
21
+ }
22
+ }
23
+ /**
24
+ * A utility to compose multiple refs together
25
+ * Accepts callback refs and RefObject(s)
26
+ */
27
+ function composeRefs(...refs) {
28
+ return (node) => refs.forEach((ref) => setRef(ref, node));
29
+ }
30
+ /**
31
+ * A custom hook that composes multiple refs
32
+ * Accepts callback refs and RefObject(s)
33
+ */
34
+ function useComposedRefs(...refs) {
35
+ return React.useCallback(composeRefs(...refs), refs);
36
+ }
37
+ //# sourceMappingURL=compose-refs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-refs.js","sourceRoot":"","sources":["../../src/compose-refs.tsx"],"names":[],"mappings":";AAAA,aAAa;AACb,6GAA6G;;;;;;AAE7G,MAAY,KAAK,0CAAa;AAS9B;;;GAGG;AACH,gBAA0B,GAAmB,EAAE,KAAQ;IACrD,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;QAC9B,GAAG,CAAC,KAAK,CAAC,CAAA;IACZ,CAAC;SAAM,IAAI,GAAG,EAAE,CAAC;QACf,CAAC;QAAC,GAAiC,CAAC,OAAO,GAAG,KAAK,CAAA;IACrD,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,qBAA+B,GAAG,IAAsB;IACtD,OAAO,CAAC,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;AAC9D,CAAC;AAED;;;GAGG;AACH,yBAAmC,GAAG,IAAsB;IAC1D,OAAO,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;AACtD,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./compose-refs.js"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC"}
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -0,0 +1,31 @@
1
+ // from radix
2
+ // https://raw.githubusercontent.com/radix-ui/primitives/main/packages/react/compose-refs/src/composeRefs.tsx
3
+ import * as React from 'react';
4
+ /**
5
+ * Set a given ref to a given value
6
+ * This utility takes care of different types of refs: callback refs and RefObject(s)
7
+ */
8
+ export function setRef(ref, value) {
9
+ if (typeof ref === 'function') {
10
+ ref(value);
11
+ }
12
+ else if (ref) {
13
+ ;
14
+ ref.current = value;
15
+ }
16
+ }
17
+ /**
18
+ * A utility to compose multiple refs together
19
+ * Accepts callback refs and RefObject(s)
20
+ */
21
+ export function composeRefs(...refs) {
22
+ return (node) => refs.forEach((ref) => setRef(ref, node));
23
+ }
24
+ /**
25
+ * A custom hook that composes multiple refs
26
+ * Accepts callback refs and RefObject(s)
27
+ */
28
+ export function useComposedRefs(...refs) {
29
+ return React.useCallback(composeRefs(...refs), refs);
30
+ }
31
+ //# sourceMappingURL=compose-refs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-refs.js","sourceRoot":"","sources":["../../src/compose-refs.tsx"],"names":[],"mappings":"AAAA,aAAa;AACb,6GAA6G;AAE7G,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAI,GAAmB,EAAE,KAAQ;IACrD,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;QAC9B,GAAG,CAAC,KAAK,CAAC,CAAA;IACZ,CAAC;SAAM,IAAI,GAAG,EAAE,CAAC;QACf,CAAC;QAAC,GAAiC,CAAC,OAAO,GAAG,KAAK,CAAA;IACrD,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAI,GAAG,IAAsB;IACtD,OAAO,CAAC,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAI,GAAG,IAAsB;IAC1D,OAAO,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;AACtD,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./compose-refs.mjs";
2
- //# sourceMappingURL=index.js.map
1
+ export * from './compose-refs.js';
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAoB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzogui/compose-refs",
3
- "version": "8.3.1",
3
+ "version": "8.3.2",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -10,34 +10,39 @@
10
10
  ],
11
11
  "type": "module",
12
12
  "sideEffects": false,
13
- "main": "dist/cjs",
14
- "module": "dist/esm",
13
+ "main": "./dist/cjs/index.js",
14
+ "module": "./dist/esm/index.js",
15
15
  "types": "./types/index.d.ts",
16
16
  "exports": {
17
17
  "./package.json": "./package.json",
18
18
  ".": {
19
19
  "types": "./types/index.d.ts",
20
- "react-native": "./dist/esm/index.native.js",
21
- "browser": "./dist/esm/index.mjs",
22
- "module": "./dist/esm/index.mjs",
23
- "import": "./dist/esm/index.mjs",
24
- "require": "./dist/cjs/index.cjs",
25
- "default": "./dist/esm/index.mjs"
20
+ "react-native": "./dist/esm/index.js",
21
+ "browser": "./dist/esm/index.js",
22
+ "module": "./dist/esm/index.js",
23
+ "import": "./dist/esm/index.js",
24
+ "require": "./dist/cjs/index.js",
25
+ "default": "./dist/esm/index.js"
26
26
  }
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
31
  "scripts": {
32
- "build": "hanzogui-build",
32
+ "build": "hanzogui-build --skip-native",
33
33
  "watch": "hanzogui-build --watch",
34
34
  "clean": "hanzogui-build clean"
35
35
  },
36
36
  "devDependencies": {
37
- "@hanzogui/build": "8.3.1",
38
- "react": ">=19"
37
+ "@hanzogui/build": "8.3.2",
38
+ "react": "19.2.8"
39
39
  },
40
40
  "peerDependencies": {
41
- "react": ">=19"
41
+ "react": ">=19.2.8"
42
+ },
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/hanzoai/gui.git",
46
+ "directory": "pkgs/core/compose-refs"
42
47
  }
43
48
  }
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './compose-refs'
1
+ export * from './compose-refs.tsx'
@@ -1 +1 @@
1
- {"version":3,"file":"compose-refs.d.ts","sourceRoot":"","sources":["../src/compose-refs.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,KAAK,WAAW,CAAC,CAAC,IACd,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GACZ,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,GACrB,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAClB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAC9C,SAAS,CAAA;AAEb;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,QAMtD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,IAC9C,MAAM,CAAC,UAChB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,qBAE3D"}
1
+ {"version":3,"file":"compose-refs.d.ts","sourceRoot":"","sources":["../src/compose-refs.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,KAAK,WAAW,CAAC,CAAC,IACd,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GACZ,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,GACrB,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAClB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAC9C,SAAS,CAAA;AAEb;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,QAMtD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,UACxC,CAAC,UAChB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,qBAE3D"}
package/types/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './compose-refs';
1
+ export * from './compose-refs.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,55 +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;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
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, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- 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: true
30
- }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
34
- var compose_refs_exports = {};
35
- __export(compose_refs_exports, {
36
- composeRefs: () => composeRefs,
37
- setRef: () => setRef,
38
- useComposedRefs: () => useComposedRefs
39
- });
40
- module.exports = __toCommonJS(compose_refs_exports);
41
- var React = __toESM(require("react"), 1);
42
- function setRef(ref, value) {
43
- if (typeof ref === "function") {
44
- ref(value);
45
- } else if (ref) {
46
- ;
47
- ref.current = value;
48
- }
49
- }
50
- function composeRefs(...refs) {
51
- return node => refs.forEach(ref => setRef(ref, node));
52
- }
53
- function useComposedRefs(...refs) {
54
- return React.useCallback(composeRefs(...refs), refs);
55
- }
@@ -1,68 +0,0 @@
1
- "use strict";
2
-
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
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, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
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);
36
- var compose_refs_exports = {};
37
- __export(compose_refs_exports, {
38
- composeRefs: () => composeRefs,
39
- setRef: () => setRef,
40
- useComposedRefs: () => useComposedRefs
41
- });
42
- module.exports = __toCommonJS(compose_refs_exports);
43
- var React = __toESM(require("react"), 1);
44
- function setRef(ref, value) {
45
- if (typeof ref === "function") {
46
- ref(value);
47
- } else if (ref) {
48
- ;
49
- ref.current = value;
50
- }
51
- }
52
- function composeRefs() {
53
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
54
- refs[_key] = arguments[_key];
55
- }
56
- return function (node) {
57
- return refs.forEach(function (ref) {
58
- return setRef(ref, node);
59
- });
60
- };
61
- }
62
- function useComposedRefs() {
63
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
64
- refs[_key] = arguments[_key];
65
- }
66
- return React.useCallback(composeRefs(...refs), refs);
67
- }
68
- //# sourceMappingURL=compose-refs.native.js.map
@@ -1 +0,0 @@
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":[]}
@@ -1,20 +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)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
- get: () => from[key],
9
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
- });
11
- }
12
- 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", {
16
- value: true
17
- }), mod);
18
- var index_exports = {};
19
- module.exports = __toCommonJS(index_exports);
20
- __reExport(index_exports, require("./compose-refs.cjs"), module.exports);
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __copyProps = (to, from, except, desc) => {
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, {
10
- get: () => from[key],
11
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
- });
13
- }
14
- return to;
15
- };
16
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
18
- value: true
19
- }), mod);
20
- var index_exports = {};
21
- module.exports = __toCommonJS(index_exports);
22
- __reExport(index_exports, require("./compose-refs.native.js"), module.exports);
23
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
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,17 +0,0 @@
1
- import * as React from "react";
2
- function setRef(ref, value) {
3
- if (typeof ref === "function") {
4
- ref(value);
5
- } else if (ref) {
6
- ;
7
- ref.current = value;
8
- }
9
- }
10
- function composeRefs(...refs) {
11
- return node => refs.forEach(ref => setRef(ref, node));
12
- }
13
- function useComposedRefs(...refs) {
14
- return React.useCallback(composeRefs(...refs), refs);
15
- }
16
- export { composeRefs, setRef, useComposedRefs };
17
- //# sourceMappingURL=compose-refs.mjs.map
@@ -1 +0,0 @@
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,27 +0,0 @@
1
- import * as React from "react";
2
- function setRef(ref, value) {
3
- if (typeof ref === "function") {
4
- ref(value);
5
- } else if (ref) {
6
- ;
7
- ref.current = value;
8
- }
9
- }
10
- function composeRefs() {
11
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
12
- refs[_key] = arguments[_key];
13
- }
14
- return function (node) {
15
- return refs.forEach(function (ref) {
16
- return setRef(ref, node);
17
- });
18
- };
19
- }
20
- function useComposedRefs() {
21
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
22
- refs[_key] = arguments[_key];
23
- }
24
- return React.useCallback(composeRefs(...refs), refs);
25
- }
26
- export { composeRefs, setRef, useComposedRefs };
27
- //# sourceMappingURL=compose-refs.native.js.map
@@ -1 +0,0 @@
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":[]}
@@ -1,2 +0,0 @@
1
- export * from "./compose-refs.mjs";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export * from "./compose-refs.native.js";
2
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}