@tamagui/use-constant 1.135.4-1761749240853 → 1.135.4

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.
@@ -34,7 +34,7 @@ __export(index_exports, {
34
34
  useConstant: () => useConstant
35
35
  });
36
36
  module.exports = __toCommonJS(index_exports);
37
- var React = __toESM(require("react"), 1);
37
+ var React = __toESM(require("react"));
38
38
  function useConstant(fn) {
39
39
  if (typeof document > "u") return React.useMemo(() => fn(), []);
40
40
  const ref = React.useRef(void 0);
package/dist/cjs/index.js CHANGED
@@ -25,7 +25,7 @@ __export(index_exports, {
25
25
  useConstant: () => useConstant
26
26
  });
27
27
  module.exports = __toCommonJS(index_exports);
28
- var React = __toESM(require("react"), 1);
28
+ var React = __toESM(require("react"));
29
29
  function useConstant(fn) {
30
30
  if (typeof document > "u")
31
31
  return React.useMemo(() => fn(), []);
@@ -1,49 +1,44 @@
1
1
  "use strict";
2
-
3
2
  var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
9
7
  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, {
17
- get: () => from[key],
18
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
- });
20
- return to;
21
- };
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
+ };
22
16
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
17
  // If the importer is in node compatibility mode or this is not an ESM
24
18
  // file that has been converted to a CommonJS file using a Babel-
25
19
  // compatible transform (i.e. "__esModule" has not been set), then set
26
20
  // "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);
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
+ mod
23
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
34
24
  var index_exports = {};
35
25
  __export(index_exports, {
36
26
  useConstant: () => useConstant
37
27
  });
38
28
  module.exports = __toCommonJS(index_exports);
39
- var React = __toESM(require("react"), 1);
29
+ var React = __toESM(require("react"));
40
30
  function useConstant(fn) {
41
- if (typeof document > "u") return React.useMemo(function () {
42
- return fn();
43
- }, []);
31
+ if (typeof document > "u")
32
+ return React.useMemo(function() {
33
+ return fn();
34
+ }, []);
44
35
  var ref = React.useRef(void 0);
45
36
  return ref.current || (ref.current = {
46
37
  v: fn()
47
38
  }), ref.current.v;
48
39
  }
49
- //# sourceMappingURL=index.native.js.map
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ useConstant
43
+ });
44
+ //# sourceMappingURL=index.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","useConstant","module","exports","React","__toESM","require","fn","document","useMemo"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAuB,GAAAT,YAAA,CAAAK,aAAA;AAIhB,IAAAK,KAAS,GAAAC,OAAA,CAAAC,OAA+B;AAE7C,SAAIL,WAAOA,CAAAM,EAAA,EAAa;EACtB,WAAOC,QAAM,MAAQ,EAGvB,OAAMJ,KAAM,CAAAK,OAAM,aAA8B;IAEhD,OAASF,EAAA;EAKX","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AAChB,SAAS,YAAY,IAAI;AAE5B,MAAI,OAAO,WAAa;AACpB,WAAO,MAAM,QAAQ,WAAW;AAC5B,aAAO,GAAG;AAAA,IACd,GAAG,CAAC,CAAC;AAET,MAAI,MAAM,MAAM,OAAO,MAAS;AAChC,SAAK,IAAI,YACL,IAAI,UAAU;AAAA,IACV,GAAG,GAAG;AAAA,EACV,IAEG,IAAI,QAAQ;AACvB;",
5
+ "names": []
6
+ }
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-constant",
3
- "version": "1.135.4-1761749240853",
4
- "type": "module",
3
+ "version": "1.135.4",
5
4
  "types": "./types/index.d.ts",
6
5
  "main": "dist/cjs",
7
6
  "module": "dist/esm",
@@ -32,7 +31,7 @@
32
31
  }
33
32
  },
34
33
  "devDependencies": {
35
- "@tamagui/build": "1.135.4-1761749240853",
34
+ "@tamagui/build": "1.135.4",
36
35
  "react": "*"
37
36
  },
38
37
  "publishConfig": {
@@ -1,6 +1,8 @@
1
1
  {
2
- "mappings": "AAIA,OAAO,iBAAS,YAAY,GAAG,UAAU,IAAI",
3
- "names": [],
2
+ "mappings": "AAIA,OAAO,iBAAS,YAAY,GAAGA,UAAU,IAAI",
3
+ "names": [
4
+ "fn: () => T"
5
+ ],
4
6
  "sources": [
5
7
  "src/index.ts"
6
8
  ],