@tamagui/use-constant 1.111.7 → 1.111.9

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,15 +1,12 @@
1
1
  import * as React from "react";
2
2
  function useConstant(fn) {
3
- if (typeof document > "u")
4
- return React.useMemo(function() {
5
- return fn();
6
- }, []);
3
+ if (typeof document > "u") return React.useMemo(function () {
4
+ return fn();
5
+ }, []);
7
6
  var ref = React.useRef();
8
7
  return ref.current || (ref.current = {
9
8
  v: fn()
10
9
  }), ref.current.v;
11
10
  }
12
- export {
13
- useConstant
14
- };
15
- //# sourceMappingURL=index.js.map
11
+ export { useConstant };
12
+ //# sourceMappingURL=index.native.js.map
@@ -1,6 +1 @@
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
- }
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":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-constant",
3
- "version": "1.111.7",
3
+ "version": "1.111.9",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -20,7 +20,7 @@
20
20
  "exports": {
21
21
  "./package.json": "./package.json",
22
22
  ".": {
23
- "react-native-import": "./dist/esm/index.native.mjs",
23
+ "react-native-import": "./dist/esm/index.native.js",
24
24
  "react-native": "./dist/cjs/index.native.js",
25
25
  "types": "./types/index.d.ts",
26
26
  "import": "./dist/esm/index.mjs",
@@ -28,7 +28,7 @@
28
28
  }
29
29
  },
30
30
  "devDependencies": {
31
- "@tamagui/build": "1.111.7",
31
+ "@tamagui/build": "1.111.9",
32
32
  "react": "^18.2.0 || ^19.0.0"
33
33
  },
34
34
  "publishConfig": {
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- function useConstant(fn) {
3
- if (typeof document > "u") return React.useMemo(function () {
4
- return fn();
5
- }, []);
6
- var ref = React.useRef();
7
- return ref.current || (ref.current = {
8
- v: fn()
9
- }), ref.current.v;
10
- }
11
- export { useConstant };
12
- //# sourceMappingURL=index.native.mjs.map
@@ -1 +0,0 @@
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":[]}