@tamagui/use-force-update 2.7.7 → 3.0.0-beta.643.1

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,3 +1,4 @@
1
+
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -5,41 +6,34 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __getProtoOf = Object.getPrototypeOf;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  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;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
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
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
30
26
  }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
28
  var index_exports = {};
35
29
  __export(index_exports, {
36
- isServerSide: () => isServerSide,
37
- useForceUpdate: () => useForceUpdate
30
+ isServerSide: () => isServerSide,
31
+ useForceUpdate: () => useForceUpdate
38
32
  });
39
33
  module.exports = __toCommonJS(index_exports);
40
34
  var import_react = __toESM(require("react"), 1);
41
35
  const isServerSide = typeof window === "undefined";
42
36
  const idFn = () => {};
43
37
  function useForceUpdate() {
44
- return isServerSide ? idFn : import_react.default.useReducer(x => Math.random(), 0)[1];
45
- }
38
+ return isServerSide ? idFn : import_react.default.useReducer((x) => Math.random(), 0)[1];
39
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
28
+ }) : target, mod));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var index_exports = {};
31
+ __export(index_exports, {
32
+ isServerSide: () => isServerSide,
33
+ useForceUpdate: () => useForceUpdate
34
+ });
35
+ module.exports = __toCommonJS(index_exports);
36
+ var import_react = __toESM(require("react"), 1);
37
+ var isServerSide = false;
38
+ var idFn = function() {};
39
+ function useForceUpdate() {
40
+ return isServerSide ? idFn : import_react.default.useReducer(function(x) {
41
+ return Math.random();
42
+ }, 0)[1];
43
+ }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __create = Object.create;
4
5
  var __defProp = Object.defineProperty;
5
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -7,44 +8,38 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
8
  var __getProtoOf = Object.getPrototypeOf;
8
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
10
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
14
15
  };
15
16
  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;
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
23
24
  };
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
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
32
28
  }) : target, mod));
33
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
- value: true
35
- }), mod);
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
30
  var index_exports = {};
37
31
  __export(index_exports, {
38
- isServerSide: () => isServerSide,
39
- useForceUpdate: () => useForceUpdate
32
+ isServerSide: () => isServerSide,
33
+ useForceUpdate: () => useForceUpdate
40
34
  });
41
35
  module.exports = __toCommonJS(index_exports);
42
36
  var import_react = __toESM(require("react"), 1);
43
37
  var isServerSide = false;
44
- var idFn = function () {};
38
+ var idFn = function() {};
45
39
  function useForceUpdate() {
46
- return isServerSide ? idFn : import_react.default.useReducer(function (x) {
47
- return Math.random();
48
- }, 0)[1];
40
+ return isServerSide ? idFn : import_react.default.useReducer(function(x) {
41
+ return Math.random();
42
+ }, 0)[1];
49
43
  }
44
+
50
45
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["isNodeMode","mod","__esModule","__defProp","target","value","enumerable","__toCommonJS","__copyProps","index_exports","__export","isServerSide","useForceUpdate","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,UAAA,KAAAC,GAAA,KAAAA,GAAA,CAAAC,UAAA,GAAAC,SAAA,CAAAC,MAAA;EAAAC,KAAA,EAAAJ,GAAA;EAAAK,UAAA;AAAA,KAAAF,MAAA,EAAAH,GAAA;AAAA,IAAAM,YAAA,GAAkBN,GAAA,IAAAO,WAAA,CAAAL,SAAA;EAAAE,KAAA;AAAA,IAAAJ,GAAA;AAEX,IAAAQ,aAAM,IACX;AAEFC,QAAM,CAAAD,aAAa;EAACE,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAEbC,cAAS,EAAAA,CAAA,KAAAA;AACd;AAGFC,MAAA,CAAAC,OAAA,GAAAP,YAAA,CAAAE,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n\tisServerSide: () => isServerSide,\n\tuseForceUpdate: () => useForceUpdate\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_react = __toESM(require(\"react\"), 1);\nvar isServerSide = false;\nvar idFn = function() {};\nfunction useForceUpdate() {\n\treturn isServerSide ? idFn : import_react.default.useReducer(function(x) {\n\t\treturn Math.random();\n\t}, 0)[1];\n}\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKpG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CACpE,OAAO;CACP,YAAY;AACb,CAAC,IAAI,QACL,GACD;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,SAAS,eAAe;CACvB,oBAAoB;CACpB,sBAAsB;AACvB,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,IAAI,eAAe;AACnB,IAAI,OAAO,WAAW,CAAC;AACvB,SAAS,iBAAiB;CACzB,OAAO,eAAe,OAAO,aAAa,QAAQ,WAAW,SAAS,GAAG;EACxE,OAAO,KAAK,OAAO;CACpB,GAAG,CAAC,EAAE;AACP"}
package/dist/esm/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import React from "react";
2
+
2
3
  const isServerSide = typeof window === "undefined";
3
4
  const idFn = () => {};
4
5
  function useForceUpdate() {
5
- return isServerSide ? idFn : React.useReducer(x => Math.random(), 0)[1];
6
+ return isServerSide ? idFn : React.useReducer((x) => Math.random(), 0)[1];
6
7
  }
8
+
7
9
  export { isServerSide, useForceUpdate };
8
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","isServerSide","window","idFn","useForceUpdate","useReducer","x","Math","random"],"sources":["index.mjs"],"sourcesContent":["import React from \"react\";\n\nconst isServerSide = typeof window === \"undefined\";\nconst idFn = () => {};\nfunction useForceUpdate() {\n\treturn isServerSide ? idFn : React.useReducer((x) => Math.random(), 0)[1];\n}\n\nexport { isServerSide, useForceUpdate };"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,YAAY,GAAG,OAAOC,MAAM,KAAK,WAAW;AAClD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB,SAASC,cAAcA,CAAA,EAAG;EACzB,OAAOH,YAAY,GAAGE,IAAI,GAAGH,KAAK,CAACK,UAAU,CAAEC,CAAC,IAAKC,IAAI,CAACC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1E;AAEA,SAASP,YAAY,EAAEG,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import React from \"react\";\n\nconst isServerSide = typeof window === \"undefined\";\nconst idFn = () => {};\nfunction useForceUpdate() {\n\treturn isServerSide ? idFn : React.useReducer((x) => Math.random(), 0)[1];\n}\n\nexport { isServerSide, useForceUpdate };"],"mappings":";;;AAEA,MAAM,eAAe,OAAO,WAAW;AACvC,MAAM,aAAa,CAAC;AACpB,SAAS,iBAAiB;CACzB,OAAO,eAAe,OAAO,MAAM,YAAY,MAAM,KAAK,OAAO,GAAG,CAAC,EAAE;AACxE"}
@@ -1,8 +1,10 @@
1
1
  import React from "react";
2
+
2
3
  const isServerSide = typeof window === "undefined";
3
4
  const idFn = () => {};
4
5
  function useForceUpdate() {
5
- return isServerSide ? idFn : React.useReducer(x => Math.random(), 0)[1];
6
+ return isServerSide ? idFn : React.useReducer((x) => Math.random(), 0)[1];
6
7
  }
8
+
7
9
  export { isServerSide, useForceUpdate };
8
10
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","isServerSide","window","idFn","useForceUpdate","useReducer","x","Math","random"],"sources":["index.mjs"],"sourcesContent":["import React from \"react\";\n\nconst isServerSide = typeof window === \"undefined\";\nconst idFn = () => {};\nfunction useForceUpdate() {\n\treturn isServerSide ? idFn : React.useReducer((x) => Math.random(), 0)[1];\n}\n\nexport { isServerSide, useForceUpdate };"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,YAAY,GAAG,OAAOC,MAAM,KAAK,WAAW;AAClD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB,SAASC,cAAcA,CAAA,EAAG;EACzB,OAAOH,YAAY,GAAGE,IAAI,GAAGH,KAAK,CAACK,UAAU,CAAEC,CAAC,IAAKC,IAAI,CAACC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1E;AAEA,SAASP,YAAY,EAAEG,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import React from \"react\";\n\nconst isServerSide = typeof window === \"undefined\";\nconst idFn = () => {};\nfunction useForceUpdate() {\n\treturn isServerSide ? idFn : React.useReducer((x) => Math.random(), 0)[1];\n}\n\nexport { isServerSide, useForceUpdate };"],"mappings":";;;AAEA,MAAM,eAAe,OAAO,WAAW;AACvC,MAAM,aAAa,CAAC;AACpB,SAAS,iBAAiB;CACzB,OAAO,eAAe,OAAO,MAAM,YAAY,MAAM,KAAK,OAAO,GAAG,CAAC,EAAE;AACxE"}
@@ -1,10 +1,12 @@
1
1
  import React from "react";
2
+
2
3
  var isServerSide = false;
3
- var idFn = function () {};
4
+ var idFn = function() {};
4
5
  function useForceUpdate() {
5
- return false ? idFn : React.useReducer(function (x) {
6
- return Math.random();
7
- }, 0)[1];
6
+ return false ? idFn : React.useReducer(function(x) {
7
+ return Math.random();
8
+ }, 0)[1];
8
9
  }
10
+
9
11
  export { isServerSide, useForceUpdate };
10
12
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","isServerSide","idFn","useForceUpdate","useReducer","x","Math","random"],"sources":["index.native.js"],"sourcesContent":["import React from \"react\";\n\nvar isServerSide = false;\nvar idFn = function() {};\nfunction useForceUpdate() {\n\treturn false ? idFn : React.useReducer(function(x) {\n\t\treturn Math.random();\n\t}, 0)[1];\n}\n\nexport { isServerSide, useForceUpdate };"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,IAAIC,YAAY,GAAG,KAAK;AACxB,IAAIC,IAAI,GAAG,SAAAA,CAAA,EAAW,CAAC,CAAC;AACxB,SAASC,cAAcA,CAAA,EAAG;EACzB,OAAO,KAAK,GAAGD,IAAI,GAAGF,KAAK,CAACI,UAAU,CAAC,UAASC,CAAC,EAAE;IAClD,OAAOC,IAAI,CAACC,MAAM,CAAC,CAAC;EACrB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACT;AAEA,SAASN,YAAY,EAAEE,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["esm/index.native.js"],"sourcesContent":["import React from \"react\";\n\nvar isServerSide = false;\nvar idFn = function() {};\nfunction useForceUpdate() {\n\treturn false ? idFn : React.useReducer(function(x) {\n\t\treturn Math.random();\n\t}, 0)[1];\n}\n\nexport { isServerSide, useForceUpdate };"],"mappings":";;;AAEA,IAAI,eAAe;AACnB,IAAI,OAAO,WAAW,CAAC;AACvB,SAAS,iBAAiB;CACzB,OAAO,QAAQ,OAAO,MAAM,WAAW,SAAS,GAAG;EAClD,OAAO,KAAK,OAAO;CACpB,GAAG,CAAC,EAAE;AACP"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-force-update",
3
- "version": "2.7.7",
3
+ "version": "3.0.0-beta.643.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "files": [
6
6
  "src",
@@ -34,7 +34,7 @@
34
34
  "clean:build": "tamagui-build clean:build"
35
35
  },
36
36
  "devDependencies": {
37
- "@tamagui/build": "2.7.7",
37
+ "@tamagui/build": "3.0.0-beta.643.1",
38
38
  "react": ">=19"
39
39
  },
40
40
  "peerDependencies": {