@tamagui/use-constant 1.113.1 → 1.113.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.
@@ -1,12 +1,15 @@
1
1
  import * as React from "react";
2
2
  function useConstant(fn) {
3
- if (typeof document > "u") return React.useMemo(function () {
4
- return fn();
5
- }, []);
3
+ if (typeof document > "u")
4
+ return React.useMemo(function() {
5
+ return fn();
6
+ }, []);
6
7
  var ref = React.useRef();
7
8
  return ref.current || (ref.current = {
8
9
  v: fn()
9
10
  }), ref.current.v;
10
11
  }
11
- export { useConstant };
12
- //# sourceMappingURL=index.native.js.map
12
+ export {
13
+ useConstant
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["React","useConstant","fn","document","useMemo","ref","useRef"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAIhB,SAASC,YAAeC,EAAA,EAAgB;EAE7C,IAAI,OAAOC,QAAA,GAAa,KACtB,OAAOH,KAAA,CAAMI,OAAA,CAAQ,YAAS;IAGhC,OAAMF,EAAM;EAEZ,KAAK;EAKP,IAAAG,GAAA,GAAAL,KAAA,CAAAM,MAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Users/n8/tamagui/code/core/use-constant/src/index.ts"],
4
+ "mappings": "AAAA,YAAYA,WAAW;AAIhB,SAASC,YAAeC,IAAW;AAExC,MAAI,OAAOC,WAAa;AACtB,WAAOH,MAAMI,QAAQ,WAAA;aAAMF,GAAAA;OAAM,CAAA,CAAE;AAGrC,MAAMG,MAAML,MAAMM,OAAM;AAExB,SAAKD,IAAIE,YACPF,IAAIE,UAAU;IAAEC,GAAGN,GAAAA;EAAK,IAGnBG,IAAIE,QAAQC;AACrB;",
5
+ "names": ["React", "useConstant", "fn", "document", "useMemo", "ref", "useRef", "current", "v"]
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-constant",
3
- "version": "1.113.1",
3
+ "version": "1.113.2",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -28,7 +28,7 @@
28
28
  }
29
29
  },
30
30
  "devDependencies": {
31
- "@tamagui/build": "1.113.1",
31
+ "@tamagui/build": "1.113.2",
32
32
  "react": "^18.2.0 || ^19.0.0"
33
33
  },
34
34
  "publishConfig": {