@tamagui/use-callback-ref 1.88.1 → 1.88.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.
package/dist/cjs/index.js CHANGED
@@ -30,13 +30,6 @@ function useCallbackRef(callback) {
30
30
  const callbackRef = React.useRef(callback);
31
31
  return React.useEffect(() => {
32
32
  callbackRef.current = callback;
33
- }), React.useMemo(() => (...args) => {
34
- var _a;
35
- return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
36
- }, []);
33
+ }), React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
37
34
  }
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- useCallbackRef
41
- });
42
35
  //# 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;AAAA;AAAA;AAEA,YAAuB;AAMhB,SAAS,eACd,UACG;AACH,QAAM,cAAc,MAAM,OAAO,QAAQ;AAEzC,eAAM,UAAU,MAAM;AACpB,gBAAY,UAAU;AAAA,EACxB,CAAC,GAGM,MAAM,QAAQ,MAAO,IAAI,SAAM;AAlBxC;AAkB2C,6BAAY,YAAZ,qCAAsB,GAAG;AAAA,KAAa,CAAC,CAAC;AACnF;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AAMhB,SAAS,eACd,UACG;AACH,QAAM,cAAc,MAAM,OAAO,QAAQ;AAEzC,eAAM,UAAU,MAAM;AACpB,gBAAY,UAAU;AAAA,EACxB,CAAC,GAGM,MAAM,QAAQ,MAAO,IAAI,SAAS,YAAY,UAAU,GAAG,IAAI,GAAS,CAAC,CAAC;AACnF;",
5
5
  "names": []
6
6
  }
@@ -1,11 +1,43 @@
1
- import * as React from "react";
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 src_exports = {};
25
+ __export(src_exports, {
26
+ useCallbackRef: () => useCallbackRef
27
+ });
28
+ module.exports = __toCommonJS(src_exports);
29
+ var React = __toESM(require("react"));
2
30
  function useCallbackRef(callback) {
3
31
  const callbackRef = React.useRef(callback);
4
32
  return React.useEffect(() => {
5
33
  callbackRef.current = callback;
6
- }), React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
34
+ }), React.useMemo(() => (...args) => {
35
+ var _a;
36
+ return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
37
+ }, []);
7
38
  }
8
- export {
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
9
41
  useCallbackRef
10
- };
42
+ });
11
43
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "mappings": "AAEA,YAAY,WAAW;AAMhB,SAAS,eACd,UACG;AACH,QAAM,cAAc,MAAM,OAAO,QAAQ;AAEzC,eAAM,UAAU,MAAM;AACpB,gBAAY,UAAU;AAAA,EACxB,CAAC,GAGM,MAAM,QAAQ,MAAO,IAAI,SAAS,YAAY,UAAU,GAAG,IAAI,GAAS,CAAC,CAAC;AACnF;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AAMhB,SAAS,eACd,UACG;AACH,QAAM,cAAc,MAAM,OAAO,QAAQ;AAEzC,eAAM,UAAU,MAAM;AACpB,gBAAY,UAAU;AAAA,EACxB,CAAC,GAGM,MAAM,QAAQ,MAAO,IAAI,SAAM;AAlBxC;AAkB2C,6BAAY,YAAZ,qCAAsB,GAAG;AAAA,KAAa,CAAC,CAAC;AACnF;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-callback-ref",
3
- "version": "1.88.1",
3
+ "version": "1.88.2",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -18,7 +18,7 @@
18
18
  "clean:build": "tamagui-build clean:build"
19
19
  },
20
20
  "devDependencies": {
21
- "@tamagui/build": "1.88.1"
21
+ "@tamagui/build": "1.88.2"
22
22
  },
23
23
  "exports": {
24
24
  "./package.json": "./package.json",