@willbooster/shared-lib-react 3.1.1 → 3.2.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/dist/VersionOverlay.cjs.map +1 -1
- package/dist/VersionOverlay.js.map +1 -1
- package/dist/hooks/useInterval.cjs +2 -0
- package/dist/hooks/useInterval.cjs.map +1 -0
- package/dist/hooks/useInterval.d.ts +1 -0
- package/dist/hooks/useInterval.js +2 -0
- package/dist/hooks/useInterval.js.map +1 -0
- package/dist/hooks/useLocalStorage.cjs +2 -0
- package/dist/hooks/useLocalStorage.cjs.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +2 -0
- package/dist/hooks/useLocalStorage.js +2 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useSessionStorage.cjs +2 -0
- package/dist/hooks/useSessionStorage.cjs.map +1 -0
- package/dist/hooks/useSessionStorage.d.ts +2 -0
- package/dist/hooks/useSessionStorage.js +2 -0
- package/dist/hooks/useSessionStorage.js.map +1 -0
- package/dist/hooks/useStorage.cjs +2 -0
- package/dist/hooks/useStorage.cjs.map +1 -0
- package/dist/hooks/useStorage.d.ts +2 -0
- package/dist/hooks/useStorage.js +2 -0
- package/dist/hooks/useStorage.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/package.json +35 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionOverlay.cjs","sources":["../src/VersionOverlay.tsx"],"sourcesContent":["import type React from 'react';\n\nconst css = `\n@media print {\n .wb-shared-version {\n display: none;\n }\n}`;\n\nexport const VersionOverlay: React.FC = () => (\n <>\n <style type=\"text/css\">{css}</style>\n <div\n className=\"wb-shared-version\"\n style={{\n bottom: 4,\n left: 4,\n opacity: 0.5,\n pointerEvents: 'none',\n position: 'fixed',\n userSelect: 'none',\n fontSize: '0.75rem',\n }}\n >\n {process.env.NEXT_PUBLIC_WB_VERSION || process.env.WB_VERSION || 'dev'} on{' '}\n {process.env.NEXT_PUBLIC_WB_ENV || process.env.WB_ENV || 'local'}\n </div>\n </>\n);\n"],"names":["VersionOverlay","_jsxs","jsxs","_Fragment","children","_jsx","jsx","type","className","style","bottom","left","opacity","pointerEvents","position","userSelect","fontSize","process","env","NEXT_PUBLIC_WB_VERSION","WB_VERSION","NEXT_PUBLIC_WB_ENV","WB_ENV"],"mappings":"uEASwCA,IACtCC,EAAAC,KAAAC,WAAA,CAAAC,UACEC,EAAAC,IAAA,QAAA,CAAOC,KAAK,WAAUH,
|
|
1
|
+
{"version":3,"file":"VersionOverlay.cjs","sources":["../src/VersionOverlay.tsx"],"sourcesContent":["import type React from 'react';\n\nconst css = `\n@media print {\n .wb-shared-version {\n display: none;\n }\n}`;\n\nexport const VersionOverlay: React.FC = () => (\n <>\n <style type=\"text/css\">{css}</style>\n <div\n className=\"wb-shared-version\"\n style={{\n bottom: 4,\n left: 4,\n opacity: 0.5,\n pointerEvents: 'none',\n position: 'fixed',\n userSelect: 'none',\n fontSize: '0.75rem',\n }}\n >\n {process.env.NEXT_PUBLIC_WB_VERSION || process.env.WB_VERSION || 'dev'} on{' '}\n {process.env.NEXT_PUBLIC_WB_ENV || process.env.WB_ENV || 'local'}\n </div>\n </>\n);\n"],"names":["VersionOverlay","_jsxs","jsxs","_Fragment","children","_jsx","jsx","type","className","style","bottom","left","opacity","pointerEvents","position","userSelect","fontSize","process","env","NEXT_PUBLIC_WB_VERSION","WB_VERSION","NEXT_PUBLIC_WB_ENV","WB_ENV"],"mappings":"uEASwCA,IACtCC,EAAAC,KAAAC,WAAA,CAAAC,UACEC,EAAAC,IAAA,QAAA,CAAOC,KAAK,WAAUH,SATd,yEAURH,EAAAC,KAAA,MAAA,CACEM,UAAU,oBACVC,MAAO,CACLC,OAAQ,EACRC,KAAM,EACNC,QAAS,GACTC,cAAe,OACfC,SAAU,QACVC,WAAY,OACZC,SAAU,WACVZ,SAEDa,CAAAA,QAAQC,IAAIC,wBAA0BF,QAAQC,IAAIE,YAAc,MAAM,MAAI,IAC1EH,QAAQC,IAAIG,oBAAsBJ,QAAQC,IAAII,QAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionOverlay.js","sources":["../src/VersionOverlay.tsx"],"sourcesContent":["import type React from 'react';\n\nconst css = `\n@media print {\n .wb-shared-version {\n display: none;\n }\n}`;\n\nexport const VersionOverlay: React.FC = () => (\n <>\n <style type=\"text/css\">{css}</style>\n <div\n className=\"wb-shared-version\"\n style={{\n bottom: 4,\n left: 4,\n opacity: 0.5,\n pointerEvents: 'none',\n position: 'fixed',\n userSelect: 'none',\n fontSize: '0.75rem',\n }}\n >\n {process.env.NEXT_PUBLIC_WB_VERSION || process.env.WB_VERSION || 'dev'} on{' '}\n {process.env.NEXT_PUBLIC_WB_ENV || process.env.WB_ENV || 'local'}\n </div>\n </>\n);\n"],"names":["VersionOverlay","_jsxs","_Fragment","children","_jsx","type","className","style","bottom","left","opacity","pointerEvents","position","userSelect","fontSize","process","env","NEXT_PUBLIC_WB_VERSION","WB_VERSION","NEXT_PUBLIC_WB_ENV","WB_ENV"],"mappings":"gEAEA,MAOaA,EAA2BA,IACtCC,EAAAC,EAAA,CAAAC,UACEC,EAAA,QAAA,CAAOC,KAAK,WAAUF,
|
|
1
|
+
{"version":3,"file":"VersionOverlay.js","sources":["../src/VersionOverlay.tsx"],"sourcesContent":["import type React from 'react';\n\nconst css = `\n@media print {\n .wb-shared-version {\n display: none;\n }\n}`;\n\nexport const VersionOverlay: React.FC = () => (\n <>\n <style type=\"text/css\">{css}</style>\n <div\n className=\"wb-shared-version\"\n style={{\n bottom: 4,\n left: 4,\n opacity: 0.5,\n pointerEvents: 'none',\n position: 'fixed',\n userSelect: 'none',\n fontSize: '0.75rem',\n }}\n >\n {process.env.NEXT_PUBLIC_WB_VERSION || process.env.WB_VERSION || 'dev'} on{' '}\n {process.env.NEXT_PUBLIC_WB_ENV || process.env.WB_ENV || 'local'}\n </div>\n </>\n);\n"],"names":["VersionOverlay","_jsxs","_Fragment","children","_jsx","type","className","style","bottom","left","opacity","pointerEvents","position","userSelect","fontSize","process","env","NEXT_PUBLIC_WB_VERSION","WB_VERSION","NEXT_PUBLIC_WB_ENV","WB_ENV"],"mappings":"gEAEA,MAOaA,EAA2BA,IACtCC,EAAAC,EAAA,CAAAC,UACEC,EAAA,QAAA,CAAOC,KAAK,WAAUF,SATd,yEAURF,EAAA,MAAA,CACEK,UAAU,oBACVC,MAAO,CACLC,OAAQ,EACRC,KAAM,EACNC,QAAS,GACTC,cAAe,OACfC,SAAU,QACVC,WAAY,OACZC,SAAU,WACVX,SAEDY,CAAAA,QAAQC,IAAIC,wBAA0BF,QAAQC,IAAIE,YAAc,MAAM,MAAI,IAC1EH,QAAQC,IAAIG,oBAAsBJ,QAAQC,IAAII,QAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInterval.cjs","sources":["../../src/hooks/useInterval.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react';\n\nexport function useInterval(immutableCallback: () => void, milliseconds: number): () => void {\n const timerId = useRef<number>();\n\n const clearInterval = useCallback(() => {\n window.clearInterval(timerId.current);\n }, []);\n\n useEffect(() => {\n timerId.current = window.setInterval(immutableCallback, milliseconds);\n return clearInterval;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [milliseconds]);\n\n return clearInterval;\n}\n"],"names":["immutableCallback","milliseconds","timerId","useRef","clearInterval","useCallback","window","current","useEffect","setInterval"],"mappings":"wDAEO,SAAqBA,EAA+BC,GACzD,MAAMC,EAAUC,EAAAA,SAEVC,EAAgBC,EAAAA,aAAY,KAChCC,OAAOF,cAAcF,EAAQK,QAAQ,GACpC,IAQH,OANAC,EAAAA,WAAU,KACRN,EAAQK,QAAUD,OAAOG,YAAYT,EAAmBC,GACjDG,IAEN,CAACH,IAEGG,CACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useInterval(immutableCallback: () => void, milliseconds: number): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInterval.js","sources":["../../src/hooks/useInterval.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react';\n\nexport function useInterval(immutableCallback: () => void, milliseconds: number): () => void {\n const timerId = useRef<number>();\n\n const clearInterval = useCallback(() => {\n window.clearInterval(timerId.current);\n }, []);\n\n useEffect(() => {\n timerId.current = window.setInterval(immutableCallback, milliseconds);\n return clearInterval;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [milliseconds]);\n\n return clearInterval;\n}\n"],"names":["useInterval","immutableCallback","milliseconds","timerId","useRef","clearInterval","useCallback","window","current","useEffect","setInterval"],"mappings":"+DAEO,SAASA,EAAYC,EAA+BC,GACzD,MAAMC,EAAUC,IAEVC,EAAgBC,GAAY,KAChCC,OAAOF,cAAcF,EAAQK,QAAQ,GACpC,IAQH,OANAC,GAAU,KACRN,EAAQK,QAAUD,OAAOG,YAAYT,EAAmBC,GACjDG,IAEN,CAACH,IAEGG,CACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocalStorage.cjs","sources":["../../src/hooks/useLocalStorage.ts"],"sourcesContent":["import type React from 'react';\n\nimport { useStorage } from './useStorage.js';\n\nexport function useLocalStorage<T>(\n key: string,\n initialValue: T,\n ssrValue: T,\n parseAfterJsonParse?: (value: unknown) => T\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n return useStorage('localStorage', key, initialValue, ssrValue, parseAfterJsonParse);\n}\n"],"names":["key","initialValue","ssrValue","parseAfterJsonParse","useStorage"],"mappings":"uEAIO,SACLA,EACAC,EACAC,EACAC,GAEA,OAAOC,EAAAA,WAAW,eAAgBJ,EAAKC,EAAcC,EAAUC,EACjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocalStorage.js","sources":["../../src/hooks/useLocalStorage.ts"],"sourcesContent":["import type React from 'react';\n\nimport { useStorage } from './useStorage.js';\n\nexport function useLocalStorage<T>(\n key: string,\n initialValue: T,\n ssrValue: T,\n parseAfterJsonParse?: (value: unknown) => T\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n return useStorage('localStorage', key, initialValue, ssrValue, parseAfterJsonParse);\n}\n"],"names":["useLocalStorage","key","initialValue","ssrValue","parseAfterJsonParse","useStorage"],"mappings":"6CAIO,SAASA,EACdC,EACAC,EACAC,EACAC,GAEA,OAAOC,EAAW,eAAgBJ,EAAKC,EAAcC,EAAUC,EACjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSessionStorage.cjs","sources":["../../src/hooks/useSessionStorage.ts"],"sourcesContent":["import type React from 'react';\n\nimport { useStorage } from './useStorage.js';\n\nexport function useSessionStorage<T>(\n key: string,\n initialValue: T,\n ssrValue: T,\n parseAfterJsonParse?: (value: unknown) => T\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n return useStorage('sessionStorage', key, initialValue, ssrValue, parseAfterJsonParse);\n}\n"],"names":["key","initialValue","ssrValue","parseAfterJsonParse","useStorage"],"mappings":"yEAIO,SACLA,EACAC,EACAC,EACAC,GAEA,OAAOC,EAAAA,WAAW,iBAAkBJ,EAAKC,EAAcC,EAAUC,EACnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSessionStorage.js","sources":["../../src/hooks/useSessionStorage.ts"],"sourcesContent":["import type React from 'react';\n\nimport { useStorage } from './useStorage.js';\n\nexport function useSessionStorage<T>(\n key: string,\n initialValue: T,\n ssrValue: T,\n parseAfterJsonParse?: (value: unknown) => T\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n return useStorage('sessionStorage', key, initialValue, ssrValue, parseAfterJsonParse);\n}\n"],"names":["useSessionStorage","key","initialValue","ssrValue","parseAfterJsonParse","useStorage"],"mappings":"6CAIO,SAASA,EACdC,EACAC,EACAC,EACAC,GAEA,OAAOC,EAAW,iBAAkBJ,EAAKC,EAAcC,EAAUC,EACnE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react");function t(e){return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}exports.useStorage=function(n,r,o,s,i){const c=e.useSyncExternalStore(t,(()=>{const e=window[n].getItem(r);try{if(e){const t=JSON.parse(e);return i?i(t):t}}catch(e){}return o}),(()=>s)),u=e.useCallback((e=>{try{const t="function"==typeof e?e(c):e;null==t?window[n].removeItem(r):window[n].setItem(r,JSON.stringify(t))}catch(e){console.warn(e)}}),[r,c]);return e.useEffect((()=>{null===window[n].getItem(r)&&void 0!==o&&window[n].setItem(r,JSON.stringify(o))}),[r,o]),[c,u]};
|
|
2
|
+
//# sourceMappingURL=useStorage.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStorage.cjs","sources":["../../src/hooks/useStorage.ts"],"sourcesContent":["import type React from 'react';\nimport { useCallback, useEffect, useSyncExternalStore } from 'react';\n\nexport function useStorage<T>(\n storageType: 'localStorage' | 'sessionStorage',\n key: string,\n initialValue: T,\n ssrValue: T,\n parseAfterJsonParse?: (value: unknown) => T\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n const value = useSyncExternalStore<T>(\n subscribeStorageEvent,\n () => {\n const jsonText = window[storageType].getItem(key);\n try {\n if (jsonText) {\n const json = JSON.parse(jsonText);\n return parseAfterJsonParse ? parseAfterJsonParse(json) : json;\n }\n } catch {\n // do nothing\n }\n return initialValue;\n },\n () => ssrValue\n );\n\n const setState = useCallback(\n (valueOrFunc: T | ((prevState: T) => T)) => {\n try {\n const nextState = typeof valueOrFunc === 'function' ? (valueOrFunc as (prevState: T) => T)(value) : valueOrFunc;\n\n if (nextState === undefined || nextState === null) {\n window[storageType].removeItem(key);\n } else {\n window[storageType].setItem(key, JSON.stringify(nextState));\n }\n } catch (error) {\n console.warn(error);\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [key, value]\n );\n\n useEffect(() => {\n if (window[storageType].getItem(key) === null && initialValue !== undefined) {\n window[storageType].setItem(key, JSON.stringify(initialValue));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key, initialValue]);\n\n return [value, setState];\n}\n\nfunction subscribeStorageEvent(callback: (this: Window, ev: StorageEvent) => unknown) {\n window.addEventListener('storage', callback);\n return () => window.removeEventListener('storage', callback);\n}\n"],"names":["subscribeStorageEvent","callback","window","addEventListener","removeEventListener","storageType","key","initialValue","ssrValue","parseAfterJsonParse","value","useSyncExternalStore","jsonText","getItem","json","JSON","parse","_unused","setState","useCallback","valueOrFunc","nextState","removeItem","setItem","stringify","error","console","warn","useEffect","undefined"],"mappings":"oCAuDA,SAASA,EAAsBC,GAE7B,OADAC,OAAOC,iBAAiB,UAAWF,GAC5B,IAAMC,OAAOE,oBAAoB,UAAWH,EACrD,oBAvDO,SACLI,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAQC,uBACZX,GACA,KACE,MAAMY,EAAWV,OAAOG,GAAaQ,QAAQP,GAC7C,IACE,GAAIM,EAAU,CACZ,MAAME,EAAOC,KAAKC,MAAMJ,GACxB,OAAOH,EAAsBA,EAAoBK,GAAQA,CAC3D,CACD,CAAC,MAAAG,GACA,CAEF,OAAOV,CAAY,IAErB,IAAMC,IAGFU,EAAWC,EAAWA,aACzBC,IACC,IACE,MAAMC,EAAmC,mBAAhBD,EAA8BA,EAAoCV,GAASU,EAEhGC,QACFnB,OAAOG,GAAaiB,WAAWhB,GAE/BJ,OAAOG,GAAakB,QAAQjB,EAAKS,KAAKS,UAAUH,GAEnD,CAAC,MAAOI,GACPC,QAAQC,KAAKF,EACf,IAGF,CAACnB,EAAKI,IAUR,OAPAkB,EAAAA,WAAU,KACiC,OAArC1B,OAAOG,GAAaQ,QAAQP,SAAkCuB,IAAjBtB,GAC/CL,OAAOG,GAAakB,QAAQjB,EAAKS,KAAKS,UAAUjB,GAClD,GAEC,CAACD,EAAKC,IAEF,CAACG,EAAOQ,EACjB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useSyncExternalStore as t,useCallback as n,useEffect as e}from"react";function o(o,i,w,s,c){const d=t(r,(()=>{const t=window[o].getItem(i);try{if(t){const n=JSON.parse(t);return c?c(n):n}}catch(t){}return w}),(()=>s)),m=n((t=>{try{const n="function"==typeof t?t(d):t;null==n?window[o].removeItem(i):window[o].setItem(i,JSON.stringify(n))}catch(t){console.warn(t)}}),[i,d]);return e((()=>{null===window[o].getItem(i)&&void 0!==w&&window[o].setItem(i,JSON.stringify(w))}),[i,w]),[d,m]}function r(t){return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}export{o as useStorage};
|
|
2
|
+
//# sourceMappingURL=useStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStorage.js","sources":["../../src/hooks/useStorage.ts"],"sourcesContent":["import type React from 'react';\nimport { useCallback, useEffect, useSyncExternalStore } from 'react';\n\nexport function useStorage<T>(\n storageType: 'localStorage' | 'sessionStorage',\n key: string,\n initialValue: T,\n ssrValue: T,\n parseAfterJsonParse?: (value: unknown) => T\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n const value = useSyncExternalStore<T>(\n subscribeStorageEvent,\n () => {\n const jsonText = window[storageType].getItem(key);\n try {\n if (jsonText) {\n const json = JSON.parse(jsonText);\n return parseAfterJsonParse ? parseAfterJsonParse(json) : json;\n }\n } catch {\n // do nothing\n }\n return initialValue;\n },\n () => ssrValue\n );\n\n const setState = useCallback(\n (valueOrFunc: T | ((prevState: T) => T)) => {\n try {\n const nextState = typeof valueOrFunc === 'function' ? (valueOrFunc as (prevState: T) => T)(value) : valueOrFunc;\n\n if (nextState === undefined || nextState === null) {\n window[storageType].removeItem(key);\n } else {\n window[storageType].setItem(key, JSON.stringify(nextState));\n }\n } catch (error) {\n console.warn(error);\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [key, value]\n );\n\n useEffect(() => {\n if (window[storageType].getItem(key) === null && initialValue !== undefined) {\n window[storageType].setItem(key, JSON.stringify(initialValue));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key, initialValue]);\n\n return [value, setState];\n}\n\nfunction subscribeStorageEvent(callback: (this: Window, ev: StorageEvent) => unknown) {\n window.addEventListener('storage', callback);\n return () => window.removeEventListener('storage', callback);\n}\n"],"names":["useStorage","storageType","key","initialValue","ssrValue","parseAfterJsonParse","value","useSyncExternalStore","subscribeStorageEvent","jsonText","window","getItem","json","JSON","parse","_unused","setState","useCallback","valueOrFunc","nextState","removeItem","setItem","stringify","error","console","warn","useEffect","undefined","callback","addEventListener","removeEventListener"],"mappings":"6EAGO,SAASA,EACdC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAQC,EACZC,GACA,KACE,MAAMC,EAAWC,OAAOT,GAAaU,QAAQT,GAC7C,IACE,GAAIO,EAAU,CACZ,MAAMG,EAAOC,KAAKC,MAAML,GACxB,OAAOJ,EAAsBA,EAAoBO,GAAQA,CAC3D,CACD,CAAC,MAAAG,GACA,CAEF,OAAOZ,CAAY,IAErB,IAAMC,IAGFY,EAAWC,GACdC,IACC,IACE,MAAMC,EAAmC,mBAAhBD,EAA8BA,EAAoCZ,GAASY,EAEhGC,QACFT,OAAOT,GAAamB,WAAWlB,GAE/BQ,OAAOT,GAAaoB,QAAQnB,EAAKW,KAAKS,UAAUH,GAEnD,CAAC,MAAOI,GACPC,QAAQC,KAAKF,EACf,IAGF,CAACrB,EAAKI,IAUR,OAPAoB,GAAU,KACiC,OAArChB,OAAOT,GAAaU,QAAQT,SAAkCyB,IAAjBxB,GAC/CO,OAAOT,GAAaoB,QAAQnB,EAAKW,KAAKS,UAAUnB,GAClD,GAEC,CAACD,EAAKC,IAEF,CAACG,EAAOU,EACjB,CAEA,SAASR,EAAsBoB,GAE7B,OADAlB,OAAOmB,iBAAiB,UAAWD,GAC5B,IAAMlB,OAAOoB,oBAAoB,UAAWF,EACrD"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var r=require("./VersionOverlay.cjs");exports.
|
|
1
|
+
"use strict";var e=require("./hooks/useInterval.cjs"),s=require("./hooks/useLocalStorage.cjs"),r=require("./hooks/useSessionStorage.cjs"),o=require("./VersionOverlay.cjs");exports.useInterval=e.useInterval,exports.useLocalStorage=s.useLocalStorage,exports.useSessionStorage=r.useSessionStorage,exports.VersionOverlay=o.VersionOverlay;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{VersionOverlay}from"./VersionOverlay.js";
|
|
1
|
+
export{useInterval}from"./hooks/useInterval.js";export{useLocalStorage}from"./hooks/useLocalStorage.js";export{useSessionStorage}from"./hooks/useSessionStorage.js";export{VersionOverlay}from"./VersionOverlay.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/shared-lib-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "WillBooster Inc.",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
"require": "./dist/
|
|
11
|
-
"import": "./dist/
|
|
12
|
-
"types": "./dist/
|
|
9
|
+
"useInterval": {
|
|
10
|
+
"require": "./dist/hooks/useInterval.cjs",
|
|
11
|
+
"import": "./dist/hooks/useInterval.js",
|
|
12
|
+
"types": "./dist/hooks/useInterval.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"useLocalStorage": {
|
|
15
|
+
"require": "./dist/hooks/useLocalStorage.cjs",
|
|
16
|
+
"import": "./dist/hooks/useLocalStorage.js",
|
|
17
|
+
"types": "./dist/hooks/useLocalStorage.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"useSessionStorage": {
|
|
20
|
+
"require": "./dist/hooks/useSessionStorage.cjs",
|
|
21
|
+
"import": "./dist/hooks/useSessionStorage.js",
|
|
22
|
+
"types": "./dist/hooks/useSessionStorage.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"VersionOverlay": {
|
|
25
|
+
"require": "./dist/VersionOverlay.cjs",
|
|
26
|
+
"import": "./dist/VersionOverlay.js",
|
|
27
|
+
"types": "./dist/VersionOverlay.d.ts"
|
|
13
28
|
}
|
|
14
29
|
},
|
|
15
30
|
"main": "dist/index.cjs",
|
|
@@ -33,40 +48,40 @@
|
|
|
33
48
|
},
|
|
34
49
|
"prettier": "@willbooster/prettier-config",
|
|
35
50
|
"devDependencies": {
|
|
36
|
-
"@babel/core": "7.24.
|
|
51
|
+
"@babel/core": "7.24.7",
|
|
37
52
|
"@mdx-js/react": "3.0.1",
|
|
38
|
-
"@storybook/addon-actions": "8.1.
|
|
39
|
-
"@storybook/addon-docs": "8.1.
|
|
40
|
-
"@storybook/addon-essentials": "8.1.
|
|
41
|
-
"@storybook/addon-interactions": "8.1.
|
|
42
|
-
"@storybook/addon-links": "8.1.
|
|
53
|
+
"@storybook/addon-actions": "8.1.6",
|
|
54
|
+
"@storybook/addon-docs": "8.1.6",
|
|
55
|
+
"@storybook/addon-essentials": "8.1.6",
|
|
56
|
+
"@storybook/addon-interactions": "8.1.6",
|
|
57
|
+
"@storybook/addon-links": "8.1.6",
|
|
43
58
|
"@storybook/builder-webpack4": "6.5.16",
|
|
44
59
|
"@storybook/manager-webpack4": "6.5.16",
|
|
45
|
-
"@storybook/react": "8.1.
|
|
60
|
+
"@storybook/react": "8.1.6",
|
|
46
61
|
"@storybook/testing-library": "0.2.2",
|
|
47
62
|
"@types/eslint": "8.56.10",
|
|
48
63
|
"@types/micromatch": "4.0.7",
|
|
49
|
-
"@types/react": "18.3.
|
|
64
|
+
"@types/react": "18.3.3",
|
|
50
65
|
"@types/react-dom": "18.3.0",
|
|
51
|
-
"@typescript-eslint/eslint-plugin": "7.
|
|
52
|
-
"@typescript-eslint/parser": "7.
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "7.12.0",
|
|
67
|
+
"@typescript-eslint/parser": "7.12.0",
|
|
53
68
|
"@willbooster/eslint-config-ts-react": "10.2.0",
|
|
54
69
|
"@willbooster/prettier-config": "9.1.2",
|
|
55
70
|
"babel-loader": "9.1.3",
|
|
56
|
-
"build-ts": "13.1.
|
|
71
|
+
"build-ts": "13.1.8",
|
|
57
72
|
"eslint": "8.57.0",
|
|
58
73
|
"eslint-config-prettier": "9.1.0",
|
|
59
74
|
"eslint-import-resolver-typescript": "3.6.1",
|
|
60
75
|
"eslint-plugin-import": "2.29.1",
|
|
61
|
-
"eslint-plugin-react": "7.34.
|
|
76
|
+
"eslint-plugin-react": "7.34.2",
|
|
62
77
|
"eslint-plugin-react-hooks": "4.6.2",
|
|
63
78
|
"eslint-plugin-sort-class-members": "1.20.0",
|
|
64
79
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
65
80
|
"eslint-plugin-storybook": "0.8.0",
|
|
66
81
|
"eslint-plugin-unicorn": "53.0.0",
|
|
67
|
-
"lint-staged": "15.2.
|
|
68
|
-
"micromatch": "4.0.
|
|
69
|
-
"prettier": "3.
|
|
82
|
+
"lint-staged": "15.2.5",
|
|
83
|
+
"micromatch": "4.0.7",
|
|
84
|
+
"prettier": "3.3.1",
|
|
70
85
|
"react": "18.3.1",
|
|
71
86
|
"react-dom": "18.3.1",
|
|
72
87
|
"sort-package-json": "2.10.0",
|