react-global-state-hooks 15.0.18 → 16.0.0

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/isRecord.js CHANGED
@@ -1 +1,37 @@
1
- var e;e=e=>(()=>{"use strict";var t={93(t){t.exports=e},867(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.isRecord=void 0;var s=o(93);Object.defineProperty(t,"isRecord",{enumerable:!0,get:function(){return s.isRecord}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(s).default}})}},o={};return function e(r){var s=o[r];if(void 0!==s)return s.exports;var a=o[r]={exports:{}};return t[r].call(a.exports,a,a.exports,e),a.exports}(867)})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/isRecord")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/isRecord"],e):"object"==typeof exports?exports["react-global-state-hooks"]=e(require("react-hooks-global-states/isRecord")):this["react-global-state-hooks"]=e(this["react-hooks-global-states/isRecord"]);
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;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/isRecord.ts
31
+ var isRecord_exports = {};
32
+ __export(isRecord_exports, {
33
+ default: () => import_isRecord.default,
34
+ isRecord: () => import_isRecord.isRecord
35
+ });
36
+ module.exports = __toCommonJS(isRecord_exports);
37
+ var import_isRecord = __toESM(require("react-hooks-global-states/isRecord"));
package/isRecord.mjs ADDED
@@ -0,0 +1,6 @@
1
+ // src/isRecord.ts
2
+ import { isRecord, default as default2 } from "react-hooks-global-states/isRecord";
3
+ export {
4
+ default2 as default,
5
+ isRecord
6
+ };
package/package.json CHANGED
@@ -1,82 +1,70 @@
1
1
  {
2
2
  "name": "react-global-state-hooks",
3
- "version": "15.0.18",
3
+ "version": "16.0.0",
4
4
  "description": "This is a package to easily handling global-state across your react components",
5
- "main": "./bundle.js",
5
+ "main": "./bundle.cjs",
6
+ "module": "./bundle.mjs",
6
7
  "types": "./index.d.ts",
7
8
  "sideEffects": false,
8
9
  "exports": {
9
10
  ".": {
10
- "import": "./bundle.js",
11
- "require": "./bundle.js",
12
- "types": "./index.d.ts"
11
+ "types": "./index.d.ts",
12
+ "import": "./bundle.mjs",
13
+ "require": "./bundle.cjs"
13
14
  },
14
15
  "./createContext": {
15
- "import": "./createContext.js",
16
- "require": "./createContext.js",
17
- "types": "./createContext.d.ts"
16
+ "types": "./createContext.d.ts",
17
+ "import": "./createContext.mjs",
18
+ "require": "./createContext.cjs"
18
19
  },
19
20
  "./GlobalStore": {
20
- "import": "./GlobalStore.js",
21
- "require": "./GlobalStore.js",
22
- "types": "./GlobalStore.d.ts"
21
+ "types": "./GlobalStore.d.ts",
22
+ "import": "./GlobalStore.mjs",
23
+ "require": "./GlobalStore.cjs"
23
24
  },
24
25
  "./createGlobalState": {
25
- "import": "./createGlobalState.js",
26
- "require": "./createGlobalState.js",
27
- "types": "./createGlobalState.d.ts"
26
+ "types": "./createGlobalState.d.ts",
27
+ "import": "./createGlobalState.mjs",
28
+ "require": "./createGlobalState.cjs"
28
29
  },
29
30
  "./types": {
30
- "import": "./types.js",
31
- "require": "./types.js",
32
- "types": "./types.d.ts"
31
+ "types": "./types.d.ts",
32
+ "import": "./types.mjs",
33
+ "require": "./types.cjs"
33
34
  },
34
35
  "./isRecord": {
35
- "import": "./isRecord.js",
36
- "require": "./isRecord.js",
37
- "types": "./isRecord.d.ts"
36
+ "types": "./isRecord.d.ts",
37
+ "import": "./isRecord.mjs",
38
+ "require": "./isRecord.cjs"
38
39
  },
39
40
  "./shallowCompare": {
40
- "import": "./shallowCompare.js",
41
- "require": "./shallowCompare.js",
42
- "types": "./shallowCompare.d.ts"
41
+ "types": "./shallowCompare.d.ts",
42
+ "import": "./shallowCompare.mjs",
43
+ "require": "./shallowCompare.cjs"
43
44
  },
44
45
  "./throwWrongKeyOnActionCollectionConfig": {
45
- "import": "./throwWrongKeyOnActionCollectionConfig.js",
46
- "require": "./throwWrongKeyOnActionCollectionConfig.js",
47
- "types": "./throwWrongKeyOnActionCollectionConfig.d.ts"
46
+ "types": "./throwWrongKeyOnActionCollectionConfig.d.ts",
47
+ "import": "./throwWrongKeyOnActionCollectionConfig.mjs",
48
+ "require": "./throwWrongKeyOnActionCollectionConfig.cjs"
48
49
  },
49
50
  "./uniqueId": {
50
- "import": "./uniqueId.js",
51
- "require": "./uniqueId.js",
52
- "types": "./uniqueId.d.ts"
51
+ "types": "./uniqueId.d.ts",
52
+ "import": "./uniqueId.mjs",
53
+ "require": "./uniqueId.cjs"
53
54
  },
54
55
  "./actions": {
55
- "import": "./actions.js",
56
- "require": "./actions.js",
57
- "types": "./actions.d.ts"
58
- }
56
+ "types": "./actions.d.ts",
57
+ "import": "./actions.mjs",
58
+ "require": "./actions.cjs"
59
+ },
60
+ "./package.json": "./package.json"
59
61
  },
60
62
  "files": [
61
63
  "*.js",
64
+ "*.cjs",
65
+ "*.mjs",
62
66
  "*.d.ts"
63
67
  ],
64
- "scripts": {
65
- "format": "prettier --write . --log-level silent && yarn lint:fix",
66
- "test": "yarn build && yarn jest",
67
- "test:debug:no-watch": "node --inspect-brk node_modules/.bin/jest --no-watchman --runInBand",
68
- "test:debug": "node --inspect-brk node_modules/.bin/jest --watch --runInBand",
69
- "test:quick": "yarn test --no-coverage --maxWorkers=4 -c --no-watchman -u",
70
- "test:coverage": "yarn test --maxWorkers=4 -c --colors --no-watchman --verbose --coverage",
71
- "build": "yarn ts-check && yarn clean && webpack --config webpack.config.js",
72
- "prepare": "yarn format && npm run build && yarn test:quick",
73
- "version": "npm run format && yarn build && yarn jest && git add -A",
74
- "postversion": "git push && git push --tags",
75
- "lint": "eslint . --max-warnings=0",
76
- "lint:fix": "eslint . --fix --max-warnings=0",
77
- "clean": "find . -maxdepth 1 -type f \\( -name '*.js' -o -name '*.d.ts' \\) ! -name 'webpack.config.js' ! -name 'eslint.config.mts' -exec rm {} + && rm -rf coverage",
78
- "ts-check": "tsc -p tsconfig.json --noEmit"
79
- },
80
68
  "repository": {
81
69
  "type": "git",
82
70
  "url": "git+https://github.com/johnny-quesada-developer/react-global-state-hooks.git"
@@ -108,52 +96,12 @@
108
96
  "url": "https://github.com/johnny-quesada-developer/react-global-state-hooks/issues"
109
97
  },
110
98
  "homepage": "https://github.com/johnny-quesada-developer/react-global-state-hooks#readme",
111
- "devDependencies": {
112
- "@babel/core": "^7.21.3",
113
- "@babel/plugin-proposal-class-properties": "^7.18.6",
114
- "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
115
- "@babel/plugin-transform-modules-commonjs": "^7.21.2",
116
- "@babel/preset-env": "^7.20.2",
117
- "@babel/preset-react": "^7.18.6",
118
- "@babel/preset-typescript": "^7.21.0",
119
- "@eslint/js": "^9.39.1",
120
- "@testing-library/dom": "^10.4.0",
121
- "@testing-library/react": "^16.3.0",
122
- "@types/jest": "^29.5.11",
123
- "@types/minimatch": "^6.0.0",
124
- "@types/react": "^18.2.45",
125
- "@types/react-dom": "^18.2.18",
126
- "@typescript-eslint/eslint-plugin": "^4.9.1",
127
- "@typescript-eslint/parser": "^4.9.1",
128
- "babel-loader": "^9.1.2",
129
- "clean-webpack-plugin": "^4.0.0",
130
- "easy-cancelable-promise": "^1.0.1",
131
- "eslint": "^9.39.1",
132
- "eslint-config-airbnb": "^18.2.1",
133
- "eslint-plugin-import": "^2.22.1",
134
- "eslint-plugin-jsx-a11y": "^6.4.1",
135
- "eslint-plugin-react": "^7.37.5",
136
- "eslint-plugin-react-hooks": "^4.2.0",
137
- "jest": "^29.7.0",
138
- "jest-environment-jsdom": "^30.0.4",
139
- "jiti": "^2.6.1",
140
- "prettier": "^3.6.2",
141
- "react": "^18.2.0",
142
- "react-dom": "^18.2.0",
143
- "ts-jest": "^29.1.1",
144
- "ts-loader": "^9.5.1",
145
- "tslib": "^2.6.2",
146
- "typescript": "^5.8.2",
147
- "typescript-eslint": "^8.46.3",
148
- "webpack": "^5.76.3",
149
- "webpack-cli": "^5.0.1"
150
- },
151
99
  "dependencies": {
152
- "json-storage-formatter": "^3.0.2",
153
- "react-hooks-global-states": "^15.0.18"
100
+ "json-storage-formatter": "4.0.0",
101
+ "react-hooks-global-states": "16.0.0"
154
102
  },
155
103
  "peerDependencies": {
156
- "json-storage-formatter": "^3.0.2",
104
+ "json-storage-formatter": "4.0.0",
157
105
  "react": ">=18.0.0"
158
106
  },
159
107
  "peerDependenciesMeta": {
@@ -0,0 +1,37 @@
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;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/shallowCompare.ts
31
+ var shallowCompare_exports = {};
32
+ __export(shallowCompare_exports, {
33
+ default: () => import_shallowCompare.default,
34
+ shallowCompare: () => import_shallowCompare.shallowCompare
35
+ });
36
+ module.exports = __toCommonJS(shallowCompare_exports);
37
+ var import_shallowCompare = __toESM(require("react-hooks-global-states/shallowCompare"));
package/shallowCompare.js CHANGED
@@ -1 +1,37 @@
1
- var e;e=e=>(()=>{"use strict";var t={154(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.shallowCompare=void 0;var a=o(859);Object.defineProperty(t,"shallowCompare",{enumerable:!0,get:function(){return a.shallowCompare}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(a).default}})},859(t){t.exports=e}},o={};return function e(r){var a=o[r];if(void 0!==a)return a.exports;var s=o[r]={exports:{}};return t[r].call(s.exports,s,s.exports,e),s.exports}(154)})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/shallowCompare")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/shallowCompare"],e):"object"==typeof exports?exports["react-global-state-hooks"]=e(require("react-hooks-global-states/shallowCompare")):this["react-global-state-hooks"]=e(this["react-hooks-global-states/shallowCompare"]);
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;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/shallowCompare.ts
31
+ var shallowCompare_exports = {};
32
+ __export(shallowCompare_exports, {
33
+ default: () => import_shallowCompare.default,
34
+ shallowCompare: () => import_shallowCompare.shallowCompare
35
+ });
36
+ module.exports = __toCommonJS(shallowCompare_exports);
37
+ var import_shallowCompare = __toESM(require("react-hooks-global-states/shallowCompare"));
@@ -0,0 +1,6 @@
1
+ // src/shallowCompare.ts
2
+ import { shallowCompare, default as default2 } from "react-hooks-global-states/shallowCompare";
3
+ export {
4
+ default2 as default,
5
+ shallowCompare
6
+ };
@@ -0,0 +1,37 @@
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;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/throwWrongKeyOnActionCollectionConfig.ts
31
+ var throwWrongKeyOnActionCollectionConfig_exports = {};
32
+ __export(throwWrongKeyOnActionCollectionConfig_exports, {
33
+ default: () => import_throwWrongKeyOnActionCollectionConfig.default,
34
+ throwWrongKeyOnActionCollectionConfig: () => import_throwWrongKeyOnActionCollectionConfig.throwWrongKeyOnActionCollectionConfig
35
+ });
36
+ module.exports = __toCommonJS(throwWrongKeyOnActionCollectionConfig_exports);
37
+ var import_throwWrongKeyOnActionCollectionConfig = __toESM(require("react-hooks-global-states/throwWrongKeyOnActionCollectionConfig"));
@@ -1 +1,37 @@
1
- var e;e=e=>(()=>{"use strict";var o={637(o){o.exports=e},681(e,o,t){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.default=o.throwWrongKeyOnActionCollectionConfig=void 0;var n=t(637);Object.defineProperty(o,"throwWrongKeyOnActionCollectionConfig",{enumerable:!0,get:function(){return n.throwWrongKeyOnActionCollectionConfig}}),Object.defineProperty(o,"default",{enumerable:!0,get:function(){return r(n).default}})}},t={};return function e(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return o[r].call(i.exports,i,i.exports,e),i.exports}(681)})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/throwWrongKeyOnActionCollectionConfig")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/throwWrongKeyOnActionCollectionConfig"],e):"object"==typeof exports?exports["react-global-state-hooks"]=e(require("react-hooks-global-states/throwWrongKeyOnActionCollectionConfig")):this["react-global-state-hooks"]=e(this["react-hooks-global-states/throwWrongKeyOnActionCollectionConfig"]);
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;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/throwWrongKeyOnActionCollectionConfig.ts
31
+ var throwWrongKeyOnActionCollectionConfig_exports = {};
32
+ __export(throwWrongKeyOnActionCollectionConfig_exports, {
33
+ default: () => import_throwWrongKeyOnActionCollectionConfig.default,
34
+ throwWrongKeyOnActionCollectionConfig: () => import_throwWrongKeyOnActionCollectionConfig.throwWrongKeyOnActionCollectionConfig
35
+ });
36
+ module.exports = __toCommonJS(throwWrongKeyOnActionCollectionConfig_exports);
37
+ var import_throwWrongKeyOnActionCollectionConfig = __toESM(require("react-hooks-global-states/throwWrongKeyOnActionCollectionConfig"));
@@ -0,0 +1,9 @@
1
+ // src/throwWrongKeyOnActionCollectionConfig.ts
2
+ import {
3
+ throwWrongKeyOnActionCollectionConfig,
4
+ default as default2
5
+ } from "react-hooks-global-states/throwWrongKeyOnActionCollectionConfig";
6
+ export {
7
+ default2 as default,
8
+ throwWrongKeyOnActionCollectionConfig
9
+ };
package/tryCatch.cjs ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/tryCatch.ts
21
+ var tryCatch_exports = {};
22
+ __export(tryCatch_exports, {
23
+ default: () => tryCatch_default
24
+ });
25
+ module.exports = __toCommonJS(tryCatch_exports);
26
+ function tryCatch(callback) {
27
+ try {
28
+ return { result: callback(), error: null };
29
+ } catch (error) {
30
+ return { result: null, error };
31
+ }
32
+ }
33
+ var tryCatch_default = tryCatch;
package/tryCatch.js ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/tryCatch.ts
21
+ var tryCatch_exports = {};
22
+ __export(tryCatch_exports, {
23
+ default: () => tryCatch_default
24
+ });
25
+ module.exports = __toCommonJS(tryCatch_exports);
26
+ function tryCatch(callback) {
27
+ try {
28
+ return { result: callback(), error: null };
29
+ } catch (error) {
30
+ return { result: null, error };
31
+ }
32
+ }
33
+ var tryCatch_default = tryCatch;
package/tryCatch.mjs ADDED
@@ -0,0 +1,12 @@
1
+ // src/tryCatch.ts
2
+ function tryCatch(callback) {
3
+ try {
4
+ return { result: callback(), error: null };
5
+ } catch (error) {
6
+ return { result: null, error };
7
+ }
8
+ }
9
+ var tryCatch_default = tryCatch;
10
+ export {
11
+ tryCatch_default as default
12
+ };
package/types.cjs ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
package/types.js CHANGED
@@ -1 +1,18 @@
1
- var e;e=()=>(()=>{"use strict";var e={};return(()=>{var t=e;Object.defineProperty(t,"__esModule",{value:!0})})(),e})(),"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["react-global-state-hooks"]=e():this["react-global-state-hooks"]=e();
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
package/types.mjs ADDED
File without changes
package/uniqueId.cjs ADDED
@@ -0,0 +1,37 @@
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;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/uniqueId.ts
31
+ var uniqueId_exports = {};
32
+ __export(uniqueId_exports, {
33
+ default: () => import_uniqueId.default,
34
+ uniqueId: () => import_uniqueId.uniqueId
35
+ });
36
+ module.exports = __toCommonJS(uniqueId_exports);
37
+ var import_uniqueId = __toESM(require("react-hooks-global-states/uniqueId"));
package/uniqueId.js CHANGED
@@ -1 +1,37 @@
1
- var e;e=e=>(()=>{"use strict";var t={240(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.uniqueId=void 0;var u=o(366);Object.defineProperty(t,"uniqueId",{enumerable:!0,get:function(){return u.uniqueId}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(u).default}})},366(t){t.exports=e}},o={};return function e(r){var u=o[r];if(void 0!==u)return u.exports;var a=o[r]={exports:{}};return t[r].call(a.exports,a,a.exports,e),a.exports}(240)})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/uniqueId")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/uniqueId"],e):"object"==typeof exports?exports["react-global-state-hooks"]=e(require("react-hooks-global-states/uniqueId")):this["react-global-state-hooks"]=e(this["react-hooks-global-states/uniqueId"]);
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;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/uniqueId.ts
31
+ var uniqueId_exports = {};
32
+ __export(uniqueId_exports, {
33
+ default: () => import_uniqueId.default,
34
+ uniqueId: () => import_uniqueId.uniqueId
35
+ });
36
+ module.exports = __toCommonJS(uniqueId_exports);
37
+ var import_uniqueId = __toESM(require("react-hooks-global-states/uniqueId"));
package/uniqueId.mjs ADDED
@@ -0,0 +1,6 @@
1
+ // src/uniqueId.ts
2
+ import { uniqueId, default as default2 } from "react-hooks-global-states/uniqueId";
3
+ export {
4
+ default2 as default,
5
+ uniqueId
6
+ };