react-global-state-hooks 10.1.0 → 10.1.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.
package/bundle.js CHANGED
@@ -1 +1 @@
1
- var e,t;e=this,t=(e,t,r,o,a,l,s,n,u,c,i,b)=>(()=>{"use strict";var j={45:t=>{t.exports=e},78:e=>{e.exports=t},361:e=>{e.exports=r},417:e=>{e.exports=o},487:e=>{e.exports=a},670:e=>{e.exports=l},673:e=>{e.exports=s},683:e=>{e.exports=n},778:e=>{e.exports=u},804:e=>{e.exports=c},923:e=>{e.exports=i},959:e=>{e.exports=b}},S={};function g(e){var t=S[e];if(void 0!==t)return t.exports;var r=S[e]={exports:{}};return j[e](r,r.exports,g),r.exports}var p={};return(()=>{var e=p;Object.defineProperty(e,"__esModule",{value:!0}),e.generateStackHash=e.setLocalStorageItem=e.getLocalStorageItem=e.createCustomGlobalState=e.createGlobalState=e.GlobalStoreAbstract=e.GlobalStore=e.useStableState=e.isRecord=e.throwWrongKeyOnActionCollectionConfig=e.uniqueId=e.shallowCompare=void 0;var t=g(673);Object.defineProperty(e,"shallowCompare",{enumerable:!0,get:function(){return t.shallowCompare}});var r=g(78);Object.defineProperty(e,"uniqueId",{enumerable:!0,get:function(){return r.uniqueId}});var o=g(361);Object.defineProperty(e,"throwWrongKeyOnActionCollectionConfig",{enumerable:!0,get:function(){return o.throwWrongKeyOnActionCollectionConfig}});var a=g(487);Object.defineProperty(e,"isRecord",{enumerable:!0,get:function(){return a.isRecord}});var l=g(923);Object.defineProperty(e,"useStableState",{enumerable:!0,get:function(){return l.useStableState}});var s=g(778);Object.defineProperty(e,"GlobalStore",{enumerable:!0,get:function(){return s.GlobalStore}});var n=g(804);Object.defineProperty(e,"GlobalStoreAbstract",{enumerable:!0,get:function(){return n.GlobalStoreAbstract}});var u=g(670);Object.defineProperty(e,"createGlobalState",{enumerable:!0,get:function(){return u.createGlobalState}});var c=g(417);Object.defineProperty(e,"createCustomGlobalState",{enumerable:!0,get:function(){return c.createCustomGlobalState}});var i=g(959);Object.defineProperty(e,"getLocalStorageItem",{enumerable:!0,get:function(){return i.getLocalStorageItem}});var b=g(683);Object.defineProperty(e,"setLocalStorageItem",{enumerable:!0,get:function(){return b.setLocalStorageItem}});var j=g(45);Object.defineProperty(e,"generateStackHash",{enumerable:!0,get:function(){return j.generateStackHash}})})(),p})(),"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./generateStackHash.js"),require("./uniqueId.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./createCustomGlobalState.js"),require("./isRecord.js"),require("./createGlobalState.js"),require("./shallowCompare.js"),require("./setLocalStorageItem.js"),require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./useStableState.js"),require("./getLocalStorageItem.js")):"function"==typeof define&&define.amd?define(["./generateStackHash.js","./uniqueId.js","./throwWrongKeyOnActionCollectionConfig.js","./createCustomGlobalState.js","./isRecord.js","./createGlobalState.js","./shallowCompare.js","./setLocalStorageItem.js","./GlobalStore.js","./GlobalStoreAbstract.js","./useStableState.js","./getLocalStorageItem.js"],t):"object"==typeof exports?exports["react-global-state-hooks"]=t(require("./generateStackHash.js"),require("./uniqueId.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./createCustomGlobalState.js"),require("./isRecord.js"),require("./createGlobalState.js"),require("./shallowCompare.js"),require("./setLocalStorageItem.js"),require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./useStableState.js"),require("./getLocalStorageItem.js")):e["react-global-state-hooks"]=t(e["./generateStackHash.js"],e["./uniqueId.js"],e["./throwWrongKeyOnActionCollectionConfig.js"],e["./createCustomGlobalState.js"],e["./isRecord.js"],e["./createGlobalState.js"],e["./shallowCompare.js"],e["./setLocalStorageItem.js"],e["./GlobalStore.js"],e["./GlobalStoreAbstract.js"],e["./useStableState.js"],e["./getLocalStorageItem.js"]);
1
+ var e,t;e=this,t=(e,t,r,o,a,n,s,l,c,u,i,b,j)=>(()=>{"use strict";var S={45:t=>{t.exports=e},78:e=>{e.exports=t},361:e=>{e.exports=r},417:e=>{e.exports=o},487:e=>{e.exports=a},623:e=>{e.exports=n},670:e=>{e.exports=s},673:e=>{e.exports=l},683:e=>{e.exports=c},778:e=>{e.exports=u},804:e=>{e.exports=i},923:e=>{e.exports=b},959:e=>{e.exports=j}},g={};function p(e){var t=g[e];if(void 0!==t)return t.exports;var r=g[e]={exports:{}};return S[e](r,r.exports,p),r.exports}var f={};return(()=>{var e=f;Object.defineProperty(e,"__esModule",{value:!0}),e.generateStackHash=e.setLocalStorageItem=e.getLocalStorageItem=e.createCustomGlobalState=e.createGlobalState=e.GlobalStoreAbstract=e.GlobalStore=e.createContext=e.useStableState=e.isRecord=e.throwWrongKeyOnActionCollectionConfig=e.uniqueId=e.shallowCompare=void 0;var t=p(673);Object.defineProperty(e,"shallowCompare",{enumerable:!0,get:function(){return t.shallowCompare}});var r=p(78);Object.defineProperty(e,"uniqueId",{enumerable:!0,get:function(){return r.uniqueId}});var o=p(361);Object.defineProperty(e,"throwWrongKeyOnActionCollectionConfig",{enumerable:!0,get:function(){return o.throwWrongKeyOnActionCollectionConfig}});var a=p(487);Object.defineProperty(e,"isRecord",{enumerable:!0,get:function(){return a.isRecord}});var n=p(923);Object.defineProperty(e,"useStableState",{enumerable:!0,get:function(){return n.useStableState}});var s=p(623);Object.defineProperty(e,"createContext",{enumerable:!0,get:function(){return s.createContext}});var l=p(778);Object.defineProperty(e,"GlobalStore",{enumerable:!0,get:function(){return l.GlobalStore}});var c=p(804);Object.defineProperty(e,"GlobalStoreAbstract",{enumerable:!0,get:function(){return c.GlobalStoreAbstract}});var u=p(670);Object.defineProperty(e,"createGlobalState",{enumerable:!0,get:function(){return u.createGlobalState}});var i=p(417);Object.defineProperty(e,"createCustomGlobalState",{enumerable:!0,get:function(){return i.createCustomGlobalState}});var b=p(959);Object.defineProperty(e,"getLocalStorageItem",{enumerable:!0,get:function(){return b.getLocalStorageItem}});var j=p(683);Object.defineProperty(e,"setLocalStorageItem",{enumerable:!0,get:function(){return j.setLocalStorageItem}});var S=p(45);Object.defineProperty(e,"generateStackHash",{enumerable:!0,get:function(){return S.generateStackHash}})})(),f})(),"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./generateStackHash.js"),require("./uniqueId.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./createCustomGlobalState.js"),require("./isRecord.js"),require("./createContext.js"),require("./createGlobalState.js"),require("./shallowCompare.js"),require("./setLocalStorageItem.js"),require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./useStableState.js"),require("./getLocalStorageItem.js")):"function"==typeof define&&define.amd?define(["./generateStackHash.js","./uniqueId.js","./throwWrongKeyOnActionCollectionConfig.js","./createCustomGlobalState.js","./isRecord.js","./createContext.js","./createGlobalState.js","./shallowCompare.js","./setLocalStorageItem.js","./GlobalStore.js","./GlobalStoreAbstract.js","./useStableState.js","./getLocalStorageItem.js"],t):"object"==typeof exports?exports["react-global-state-hooks"]=t(require("./generateStackHash.js"),require("./uniqueId.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./createCustomGlobalState.js"),require("./isRecord.js"),require("./createContext.js"),require("./createGlobalState.js"),require("./shallowCompare.js"),require("./setLocalStorageItem.js"),require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./useStableState.js"),require("./getLocalStorageItem.js")):e["react-global-state-hooks"]=t(e["./generateStackHash.js"],e["./uniqueId.js"],e["./throwWrongKeyOnActionCollectionConfig.js"],e["./createCustomGlobalState.js"],e["./isRecord.js"],e["./createContext.js"],e["./createGlobalState.js"],e["./shallowCompare.js"],e["./setLocalStorageItem.js"],e["./GlobalStore.js"],e["./GlobalStoreAbstract.js"],e["./useStableState.js"],e["./getLocalStorageItem.js"]);
@@ -1 +1 @@
1
- export { type Context, type ContextProvider, type ContextHook, type CreateContext, createContext, default, } from 'react-hooks-global-states/createContext';
1
+ export { type Context, type ContextProvider, type ContextHook, type CreateContext, type InferContextType, createContext, default, } from 'react-hooks-global-states/createContext';
@@ -1,4 +1,5 @@
1
1
  import { StateHook, StateSetter, BaseMetadata, ActionCollectionConfig, ActionCollectionResult, GlobalStoreCallbacks } from 'react-hooks-global-states/types';
2
+ export type { InferActionsType } from 'react-hooks-global-states/createGlobalState';
2
3
  import { LocalStorageConfig } from './types';
3
4
  export interface CreateGlobalState {
4
5
  <State>(state: State): StateHook<State, StateSetter<State>, BaseMetadata>;
package/index.d.ts CHANGED
@@ -8,11 +8,11 @@ export { uniqueId } from './uniqueId';
8
8
  export { throwWrongKeyOnActionCollectionConfig } from './throwWrongKeyOnActionCollectionConfig';
9
9
  export { isRecord } from './isRecord';
10
10
  export { useStableState } from './useStableState';
11
- export { type Context, type ContextProvider, type ContextHook, type CreateContext, type createContext, } from './createContext';
11
+ export { type Context, type ContextProvider, type ContextHook, type CreateContext, type InferContextType, createContext, } from './createContext';
12
12
  export { type LocalStorageConfig } from './types';
13
13
  export { GlobalStore } from './GlobalStore';
14
14
  export { GlobalStoreAbstract } from './GlobalStoreAbstract';
15
- export { CreateGlobalState, createGlobalState } from './createGlobalState';
15
+ export { CreateGlobalState, createGlobalState, type InferActionsType } from './createGlobalState';
16
16
  export { createCustomGlobalState, CustomCreateGlobalState } from './createCustomGlobalState';
17
17
  export { getLocalStorageItem } from './getLocalStorageItem';
18
18
  export { setLocalStorageItem } from './setLocalStorageItem';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-global-state-hooks",
3
- "version": "10.1.0",
3
+ "version": "10.1.2",
4
4
  "description": "This is a package to easily handling global-state across your react components No-redux, No-context.",
5
5
  "main": "./bundle.js",
6
6
  "types": "./index.d.ts",
@@ -161,6 +161,6 @@
161
161
  "react": ">=18.0.0"
162
162
  },
163
163
  "dependencies": {
164
- "react-hooks-global-states": "^10.0.1"
164
+ "react-hooks-global-states": "^10.0.2"
165
165
  }
166
166
  }