@willbooster/shared-lib-react 4.0.0 → 4.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"useNoHydrationError.cjs","sources":["../../src/hooks/useNoHydrationError.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nfunction emptyFunction(): void {}\nfunction emptySubscribe(): () => void {\n return emptyFunction;\n}\n\n// cf. https://tkdodo.eu/blog/avoiding-hydration-mismatches-with-use-sync-external-store\nexport function useNoHydrationError<T>(clientValue: T, ssrValue: T): T {\n return useSyncExternalStore(\n emptySubscribe,\n () => clientValue,\n () => ssrValue\n );\n}\n"],"names":["emptyFunction","emptySubscribe","clientValue","ssrValue","useSyncExternalStore"],"mappings":"oCAEA,SAASA,IAAsB,CAC/B,SAASC,IACP,OAAOD,CACT,6BAGO,SAAgCE,EAAgBC,GACrD,OAAOC,EAAAA,qBACLH,EACA,IAAMC,EACN,IAAMC,EAEV"}
1
+ {"version":3,"file":"useNoHydrationError.cjs","sources":["../../src/hooks/useNoHydrationError.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nfunction emptyFunction(): void {}\nfunction emptySubscribe(): () => void {\n return emptyFunction;\n}\n\n// cf. https://tkdodo.eu/blog/avoiding-hydration-mismatches-with-use-sync-external-store\nexport function useNoHydrationError<T>(clientValue: T, ssrValue: T): T {\n return useSyncExternalStore(\n emptySubscribe,\n () => clientValue,\n () => ssrValue\n );\n}\n"],"names":["emptyFunction","emptySubscribe","clientValue","ssrValue","useSyncExternalStore"],"mappings":"oCAEA,SAASA,IAAuB,CAChC,SAASC,IACP,OAAOD,CACT,6BAGO,SAAgCE,EAAgBC,GACrD,OAAOC,EAAAA,qBACLH,EACA,IAAMC,EACN,IAAMC,EAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"useNoHydrationError.js","sources":["../../src/hooks/useNoHydrationError.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nfunction emptyFunction(): void {}\nfunction emptySubscribe(): () => void {\n return emptyFunction;\n}\n\n// cf. https://tkdodo.eu/blog/avoiding-hydration-mismatches-with-use-sync-external-store\nexport function useNoHydrationError<T>(clientValue: T, ssrValue: T): T {\n return useSyncExternalStore(\n emptySubscribe,\n () => clientValue,\n () => ssrValue\n );\n}\n"],"names":["emptyFunction","emptySubscribe","useNoHydrationError","clientValue","ssrValue","useSyncExternalStore"],"mappings":"6CAEA,SAASA,IAAsB,CAC/B,SAASC,IACP,OAAOD,CACT,CAGO,SAASE,EAAuBC,EAAgBC,GACrD,OAAOC,EACLJ,EACA,IAAME,EACN,IAAMC,EAEV"}
1
+ {"version":3,"file":"useNoHydrationError.js","sources":["../../src/hooks/useNoHydrationError.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nfunction emptyFunction(): void {}\nfunction emptySubscribe(): () => void {\n return emptyFunction;\n}\n\n// cf. https://tkdodo.eu/blog/avoiding-hydration-mismatches-with-use-sync-external-store\nexport function useNoHydrationError<T>(clientValue: T, ssrValue: T): T {\n return useSyncExternalStore(\n emptySubscribe,\n () => clientValue,\n () => ssrValue\n );\n}\n"],"names":["emptyFunction","emptySubscribe","useNoHydrationError","clientValue","ssrValue","useSyncExternalStore"],"mappings":"6CAEA,SAASA,IAAuB,CAChC,SAASC,IACP,OAAOD,CACT,CAGO,SAASE,EAAuBC,EAAgBC,GACrD,OAAOC,EACLJ,EACA,IAAME,EACN,IAAMC,EAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"useStorage.cjs","sources":["../../src/hooks/useStorage.ts"],"sourcesContent":["import type React from 'react';\nimport { useMemo, useCallback, useEffect, useSyncExternalStore } from 'react';\n\nexport type UseStorageOptions<T> =\n | {\n parseAfterJsonParse?: (value: unknown) => T;\n ssrJsonText: string;\n }\n | { parseAfterJsonParse?: (value: unknown) => T };\n\nexport function useStorage<T>(\n nonReactiveStorageType: 'localStorage' | 'sessionStorage',\n key: string,\n initialValueOrFunc: T | (() => T),\n nonReactiveOptions: UseStorageOptions<T> = {}\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n const jsonText = useSyncExternalStore(\n (callback) => {\n const newCallback = (event: StorageEvent): void => {\n if (event.key === key) callback();\n };\n globalThis.addEventListener('storage', newCallback);\n return () => globalThis.removeEventListener('storage', newCallback);\n },\n () => window[nonReactiveStorageType].getItem(key),\n () => 'ssrJsonText' in nonReactiveOptions && nonReactiveOptions.ssrJsonText\n );\n const value = useMemo(() => {\n try {\n if (jsonText) {\n const json = JSON.parse(jsonText) as unknown as T;\n return nonReactiveOptions?.parseAfterJsonParse ? nonReactiveOptions?.parseAfterJsonParse(json) : json;\n }\n } catch {\n // do nothing\n }\n return typeof initialValueOrFunc === 'function' ? (initialValueOrFunc as () => T)() : initialValueOrFunc;\n }, [jsonText, initialValueOrFunc]);\n\n const setState = useCallback(\n (valueOrFunc: T | ((prevState: T) => T)) => {\n const nextState = typeof valueOrFunc === 'function' ? (valueOrFunc as (prevState: T) => T)(value) : valueOrFunc;\n\n // eslint-disable-next-line unicorn/no-null\n let newValue: string | null = null;\n if (nextState === undefined || nextState === null) {\n window[nonReactiveStorageType].removeItem(key);\n } else {\n newValue = JSON.stringify(nextState);\n window[nonReactiveStorageType].setItem(key, newValue);\n }\n globalThis.dispatchEvent(new StorageEvent('storage', { key, newValue }));\n },\n\n [key, value]\n );\n\n useEffect(() => {\n const resolvedInitialValue =\n typeof initialValueOrFunc === 'function' ? (initialValueOrFunc as () => T)() : initialValueOrFunc;\n if (window[nonReactiveStorageType].getItem(key) === null && resolvedInitialValue !== undefined) {\n window[nonReactiveStorageType].setItem(key, JSON.stringify(resolvedInitialValue));\n }\n }, [key, initialValueOrFunc]);\n\n return [value, setState];\n}\n"],"names":["nonReactiveStorageType","key","initialValueOrFunc","nonReactiveOptions","jsonText","useSyncExternalStore","callback","newCallback","event","globalThis","addEventListener","removeEventListener","window","getItem","ssrJsonText","value","useMemo","json","JSON","parse","parseAfterJsonParse","_unused","setState","useCallback","valueOrFunc","nextState","newValue","removeItem","stringify","setItem","dispatchEvent","StorageEvent","useEffect","resolvedInitialValue","undefined"],"mappings":"uDAUO,SACLA,EACAC,EACAC,EACAC,EAA2C,CAAA,GAE3C,MAAMC,EAAWC,EAAAA,qBACdC,IACC,MAAMC,EAAeC,IACfA,EAAMP,MAAQA,GAAKK,KAGzB,OADAG,WAAWC,iBAAiB,UAAWH,GAChC,IAAME,WAAWE,oBAAoB,UAAWJ,IAEzD,IAAMK,OAAOZ,GAAwBa,QAAQZ,GAC7C,IAAM,gBAAiBE,GAAsBA,EAAmBW,aAE5DC,EAAQC,EAAAA,QAAQ,KACpB,IACE,GAAIZ,EAAU,CACZ,MAAMa,EAAOC,KAAKC,MAAMf,GACxB,OAAyB,MAAlBD,GAAAA,EAAoBiB,oBAAwC,MAAlBjB,OAAkB,EAAlBA,EAAoBiB,oBAAoBH,GAAQA,CACnG,EACA,MAAAI,GACA,CAEF,MAAqC,mBAAvBnB,EAAqCA,IAAmCA,GACrF,CAACE,EAAUF,IAERoB,EAAWC,EAAAA,YACdC,IACC,MAAMC,EAAmC,mBAAhBD,EAA8BA,EAAoCT,GAASS,EAGpG,IAAIE,EAA0B,KAC1BD,QACFb,OAAOZ,GAAwB2B,WAAW1B,IAE1CyB,EAAWR,KAAKU,UAAUH,GAC1Bb,OAAOZ,GAAwB6B,QAAQ5B,EAAKyB,IAE9CjB,WAAWqB,cAAc,IAAIC,aAAa,UAAW,CAAE9B,MAAKyB,eAG9D,CAACzB,EAAKc,IAWR,OARAiB,EAAAA,UAAU,KACR,MAAMC,EAC0B,mBAAvB/B,EAAqCA,IAAmCA,EAC7B,OAAhDU,OAAOZ,GAAwBa,QAAQZ,SAA0CiC,IAAzBD,GAC1DrB,OAAOZ,GAAwB6B,QAAQ5B,EAAKiB,KAAKU,UAAUK,KAE5D,CAAChC,EAAKC,IAEF,CAACa,EAAOO,EACjB"}
1
+ {"version":3,"file":"useStorage.cjs","sources":["../../src/hooks/useStorage.ts"],"sourcesContent":["import type React from 'react';\nimport { useMemo, useCallback, useEffect, useSyncExternalStore } from 'react';\n\nexport type UseStorageOptions<T> =\n | {\n parseAfterJsonParse?: (value: unknown) => T;\n ssrJsonText: string;\n }\n | { parseAfterJsonParse?: (value: unknown) => T };\n\nexport function useStorage<T>(\n nonReactiveStorageType: 'localStorage' | 'sessionStorage',\n key: string,\n initialValueOrFunc: T | (() => T),\n nonReactiveOptions: UseStorageOptions<T> = {}\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n const jsonText = useSyncExternalStore(\n (callback) => {\n const newCallback = (event: StorageEvent): void => {\n if (event.key === key) callback();\n };\n globalThis.addEventListener('storage', newCallback);\n return () => globalThis.removeEventListener('storage', newCallback);\n },\n () => window[nonReactiveStorageType].getItem(key),\n () => 'ssrJsonText' in nonReactiveOptions && nonReactiveOptions.ssrJsonText\n );\n const value = useMemo(() => {\n try {\n if (jsonText) {\n const json = JSON.parse(jsonText) as unknown as T;\n return nonReactiveOptions?.parseAfterJsonParse ? nonReactiveOptions?.parseAfterJsonParse(json) : json;\n }\n } catch {\n // do nothing\n }\n return typeof initialValueOrFunc === 'function' ? (initialValueOrFunc as () => T)() : initialValueOrFunc;\n }, [jsonText, initialValueOrFunc]);\n\n const setState = useCallback(\n (valueOrFunc: T | ((prevState: T) => T)) => {\n const nextState = typeof valueOrFunc === 'function' ? (valueOrFunc as (prevState: T) => T)(value) : valueOrFunc;\n\n // eslint-disable-next-line unicorn/no-null\n let newValue: string | null = null;\n if (nextState === undefined || nextState === null) {\n window[nonReactiveStorageType].removeItem(key);\n } else {\n newValue = JSON.stringify(nextState);\n window[nonReactiveStorageType].setItem(key, newValue);\n }\n globalThis.dispatchEvent(new StorageEvent('storage', { key, newValue }));\n },\n\n [key, value]\n );\n\n useEffect(() => {\n const resolvedInitialValue =\n typeof initialValueOrFunc === 'function' ? (initialValueOrFunc as () => T)() : initialValueOrFunc;\n if (window[nonReactiveStorageType].getItem(key) === null && resolvedInitialValue !== undefined) {\n window[nonReactiveStorageType].setItem(key, JSON.stringify(resolvedInitialValue));\n }\n }, [key, initialValueOrFunc]);\n\n return [value, setState];\n}\n"],"names":["nonReactiveStorageType","key","initialValueOrFunc","nonReactiveOptions","jsonText","useSyncExternalStore","callback","newCallback","event","globalThis","addEventListener","removeEventListener","window","getItem","ssrJsonText","value","useMemo","json","JSON","parse","parseAfterJsonParse","_unused","setState","useCallback","valueOrFunc","nextState","newValue","removeItem","stringify","setItem","dispatchEvent","StorageEvent","useEffect","resolvedInitialValue","undefined"],"mappings":"uDAUO,SACLA,EACAC,EACAC,EACAC,EAA2C,CAAA,GAE3C,MAAMC,EAAWC,EAAAA,qBACdC,IACC,MAAMC,EAAeC,IACfA,EAAMP,MAAQA,GAAKK,KAGzB,OADAG,WAAWC,iBAAiB,UAAWH,GAChC,IAAME,WAAWE,oBAAoB,UAAWJ,IAEzD,IAAMK,OAAOZ,GAAwBa,QAAQZ,GAC7C,IAAM,gBAAiBE,GAAsBA,EAAmBW,aAE5DC,EAAQC,EAAAA,QAAQ,KACpB,IACE,GAAIZ,EAAU,CACZ,MAAMa,EAAOC,KAAKC,MAAMf,GACxB,OAAyB,MAAlBD,GAAAA,EAAoBiB,oBAAwC,MAAlBjB,OAAkB,EAAlBA,EAAoBiB,oBAAoBH,GAAQA,CACnG,CACF,CAAE,MAAAI,GACA,CAEF,MAAqC,mBAAvBnB,EAAqCA,IAAmCA,GACrF,CAACE,EAAUF,IAERoB,EAAWC,EAAAA,YACdC,IACC,MAAMC,EAAmC,mBAAhBD,EAA8BA,EAAoCT,GAASS,EAGpG,IAAIE,EAA0B,KAC1BD,QACFb,OAAOZ,GAAwB2B,WAAW1B,IAE1CyB,EAAWR,KAAKU,UAAUH,GAC1Bb,OAAOZ,GAAwB6B,QAAQ5B,EAAKyB,IAE9CjB,WAAWqB,cAAc,IAAIC,aAAa,UAAW,CAAE9B,MAAKyB,eAG9D,CAACzB,EAAKc,IAWR,OARAiB,EAAAA,UAAU,KACR,MAAMC,EAC0B,mBAAvB/B,EAAqCA,IAAmCA,EAC7B,OAAhDU,OAAOZ,GAAwBa,QAAQZ,SAA0CiC,IAAzBD,GAC1DrB,OAAOZ,GAAwB6B,QAAQ5B,EAAKiB,KAAKU,UAAUK,KAE5D,CAAChC,EAAKC,IAEF,CAACa,EAAOO,EACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useStorage.js","sources":["../../src/hooks/useStorage.ts"],"sourcesContent":["import type React from 'react';\nimport { useMemo, useCallback, useEffect, useSyncExternalStore } from 'react';\n\nexport type UseStorageOptions<T> =\n | {\n parseAfterJsonParse?: (value: unknown) => T;\n ssrJsonText: string;\n }\n | { parseAfterJsonParse?: (value: unknown) => T };\n\nexport function useStorage<T>(\n nonReactiveStorageType: 'localStorage' | 'sessionStorage',\n key: string,\n initialValueOrFunc: T | (() => T),\n nonReactiveOptions: UseStorageOptions<T> = {}\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n const jsonText = useSyncExternalStore(\n (callback) => {\n const newCallback = (event: StorageEvent): void => {\n if (event.key === key) callback();\n };\n globalThis.addEventListener('storage', newCallback);\n return () => globalThis.removeEventListener('storage', newCallback);\n },\n () => window[nonReactiveStorageType].getItem(key),\n () => 'ssrJsonText' in nonReactiveOptions && nonReactiveOptions.ssrJsonText\n );\n const value = useMemo(() => {\n try {\n if (jsonText) {\n const json = JSON.parse(jsonText) as unknown as T;\n return nonReactiveOptions?.parseAfterJsonParse ? nonReactiveOptions?.parseAfterJsonParse(json) : json;\n }\n } catch {\n // do nothing\n }\n return typeof initialValueOrFunc === 'function' ? (initialValueOrFunc as () => T)() : initialValueOrFunc;\n }, [jsonText, initialValueOrFunc]);\n\n const setState = useCallback(\n (valueOrFunc: T | ((prevState: T) => T)) => {\n const nextState = typeof valueOrFunc === 'function' ? (valueOrFunc as (prevState: T) => T)(value) : valueOrFunc;\n\n // eslint-disable-next-line unicorn/no-null\n let newValue: string | null = null;\n if (nextState === undefined || nextState === null) {\n window[nonReactiveStorageType].removeItem(key);\n } else {\n newValue = JSON.stringify(nextState);\n window[nonReactiveStorageType].setItem(key, newValue);\n }\n globalThis.dispatchEvent(new StorageEvent('storage', { key, newValue }));\n },\n\n [key, value]\n );\n\n useEffect(() => {\n const resolvedInitialValue =\n typeof initialValueOrFunc === 'function' ? (initialValueOrFunc as () => T)() : initialValueOrFunc;\n if (window[nonReactiveStorageType].getItem(key) === null && resolvedInitialValue !== undefined) {\n window[nonReactiveStorageType].setItem(key, JSON.stringify(resolvedInitialValue));\n }\n }, [key, initialValueOrFunc]);\n\n return [value, setState];\n}\n"],"names":["useStorage","nonReactiveStorageType","key","initialValueOrFunc","nonReactiveOptions","jsonText","useSyncExternalStore","callback","newCallback","event","globalThis","addEventListener","removeEventListener","window","getItem","ssrJsonText","value","useMemo","json","JSON","parse","parseAfterJsonParse","_unused","setState","useCallback","valueOrFunc","nextState","newValue","removeItem","stringify","setItem","dispatchEvent","StorageEvent","useEffect","resolvedInitialValue","undefined"],"mappings":"0FAUO,SAASA,EACdC,EACAC,EACAC,EACAC,EAA2C,CAAA,GAE3C,MAAMC,EAAWC,EACdC,IACC,MAAMC,EAAeC,IACfA,EAAMP,MAAQA,GAAKK,KAGzB,OADAG,WAAWC,iBAAiB,UAAWH,GAChC,IAAME,WAAWE,oBAAoB,UAAWJ,IAEzD,IAAMK,OAAOZ,GAAwBa,QAAQZ,GAC7C,IAAM,gBAAiBE,GAAsBA,EAAmBW,aAE5DC,EAAQC,EAAQ,KACpB,IACE,GAAIZ,EAAU,CACZ,MAAMa,EAAOC,KAAKC,MAAMf,GACxB,OAAyB,MAAlBD,GAAAA,EAAoBiB,oBAAwC,MAAlBjB,OAAkB,EAAlBA,EAAoBiB,oBAAoBH,GAAQA,CACnG,EACA,MAAAI,GACA,CAEF,MAAqC,mBAAvBnB,EAAqCA,IAAmCA,GACrF,CAACE,EAAUF,IAERoB,EAAWC,EACdC,IACC,MAAMC,EAAmC,mBAAhBD,EAA8BA,EAAoCT,GAASS,EAGpG,IAAIE,EAA0B,KAC1BD,QACFb,OAAOZ,GAAwB2B,WAAW1B,IAE1CyB,EAAWR,KAAKU,UAAUH,GAC1Bb,OAAOZ,GAAwB6B,QAAQ5B,EAAKyB,IAE9CjB,WAAWqB,cAAc,IAAIC,aAAa,UAAW,CAAE9B,MAAKyB,eAG9D,CAACzB,EAAKc,IAWR,OARAiB,EAAU,KACR,MAAMC,EAC0B,mBAAvB/B,EAAqCA,IAAmCA,EAC7B,OAAhDU,OAAOZ,GAAwBa,QAAQZ,SAA0CiC,IAAzBD,GAC1DrB,OAAOZ,GAAwB6B,QAAQ5B,EAAKiB,KAAKU,UAAUK,KAE5D,CAAChC,EAAKC,IAEF,CAACa,EAAOO,EACjB"}
1
+ {"version":3,"file":"useStorage.js","sources":["../../src/hooks/useStorage.ts"],"sourcesContent":["import type React from 'react';\nimport { useMemo, useCallback, useEffect, useSyncExternalStore } from 'react';\n\nexport type UseStorageOptions<T> =\n | {\n parseAfterJsonParse?: (value: unknown) => T;\n ssrJsonText: string;\n }\n | { parseAfterJsonParse?: (value: unknown) => T };\n\nexport function useStorage<T>(\n nonReactiveStorageType: 'localStorage' | 'sessionStorage',\n key: string,\n initialValueOrFunc: T | (() => T),\n nonReactiveOptions: UseStorageOptions<T> = {}\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n const jsonText = useSyncExternalStore(\n (callback) => {\n const newCallback = (event: StorageEvent): void => {\n if (event.key === key) callback();\n };\n globalThis.addEventListener('storage', newCallback);\n return () => globalThis.removeEventListener('storage', newCallback);\n },\n () => window[nonReactiveStorageType].getItem(key),\n () => 'ssrJsonText' in nonReactiveOptions && nonReactiveOptions.ssrJsonText\n );\n const value = useMemo(() => {\n try {\n if (jsonText) {\n const json = JSON.parse(jsonText) as unknown as T;\n return nonReactiveOptions?.parseAfterJsonParse ? nonReactiveOptions?.parseAfterJsonParse(json) : json;\n }\n } catch {\n // do nothing\n }\n return typeof initialValueOrFunc === 'function' ? (initialValueOrFunc as () => T)() : initialValueOrFunc;\n }, [jsonText, initialValueOrFunc]);\n\n const setState = useCallback(\n (valueOrFunc: T | ((prevState: T) => T)) => {\n const nextState = typeof valueOrFunc === 'function' ? (valueOrFunc as (prevState: T) => T)(value) : valueOrFunc;\n\n // eslint-disable-next-line unicorn/no-null\n let newValue: string | null = null;\n if (nextState === undefined || nextState === null) {\n window[nonReactiveStorageType].removeItem(key);\n } else {\n newValue = JSON.stringify(nextState);\n window[nonReactiveStorageType].setItem(key, newValue);\n }\n globalThis.dispatchEvent(new StorageEvent('storage', { key, newValue }));\n },\n\n [key, value]\n );\n\n useEffect(() => {\n const resolvedInitialValue =\n typeof initialValueOrFunc === 'function' ? (initialValueOrFunc as () => T)() : initialValueOrFunc;\n if (window[nonReactiveStorageType].getItem(key) === null && resolvedInitialValue !== undefined) {\n window[nonReactiveStorageType].setItem(key, JSON.stringify(resolvedInitialValue));\n }\n }, [key, initialValueOrFunc]);\n\n return [value, setState];\n}\n"],"names":["useStorage","nonReactiveStorageType","key","initialValueOrFunc","nonReactiveOptions","jsonText","useSyncExternalStore","callback","newCallback","event","globalThis","addEventListener","removeEventListener","window","getItem","ssrJsonText","value","useMemo","json","JSON","parse","parseAfterJsonParse","_unused","setState","useCallback","valueOrFunc","nextState","newValue","removeItem","stringify","setItem","dispatchEvent","StorageEvent","useEffect","resolvedInitialValue","undefined"],"mappings":"0FAUO,SAASA,EACdC,EACAC,EACAC,EACAC,EAA2C,CAAA,GAE3C,MAAMC,EAAWC,EACdC,IACC,MAAMC,EAAeC,IACfA,EAAMP,MAAQA,GAAKK,KAGzB,OADAG,WAAWC,iBAAiB,UAAWH,GAChC,IAAME,WAAWE,oBAAoB,UAAWJ,IAEzD,IAAMK,OAAOZ,GAAwBa,QAAQZ,GAC7C,IAAM,gBAAiBE,GAAsBA,EAAmBW,aAE5DC,EAAQC,EAAQ,KACpB,IACE,GAAIZ,EAAU,CACZ,MAAMa,EAAOC,KAAKC,MAAMf,GACxB,OAAyB,MAAlBD,GAAAA,EAAoBiB,oBAAwC,MAAlBjB,OAAkB,EAAlBA,EAAoBiB,oBAAoBH,GAAQA,CACnG,CACF,CAAE,MAAAI,GACA,CAEF,MAAqC,mBAAvBnB,EAAqCA,IAAmCA,GACrF,CAACE,EAAUF,IAERoB,EAAWC,EACdC,IACC,MAAMC,EAAmC,mBAAhBD,EAA8BA,EAAoCT,GAASS,EAGpG,IAAIE,EAA0B,KAC1BD,QACFb,OAAOZ,GAAwB2B,WAAW1B,IAE1CyB,EAAWR,KAAKU,UAAUH,GAC1Bb,OAAOZ,GAAwB6B,QAAQ5B,EAAKyB,IAE9CjB,WAAWqB,cAAc,IAAIC,aAAa,UAAW,CAAE9B,MAAKyB,eAG9D,CAACzB,EAAKc,IAWR,OARAiB,EAAU,KACR,MAAMC,EAC0B,mBAAvB/B,EAAqCA,IAAmCA,EAC7B,OAAhDU,OAAOZ,GAAwBa,QAAQZ,SAA0CiC,IAAzBD,GAC1DrB,OAAOZ,GAAwB6B,QAAQ5B,EAAKiB,KAAKU,UAAUK,KAE5D,CAAChC,EAAKC,IAEF,CAACa,EAAOO,EACjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/shared-lib-react",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "license": "Apache-2.0",
5
5
  "author": "WillBooster Inc.",
6
6
  "sideEffects": false,
@@ -23,38 +23,38 @@
23
23
  "build": "build-ts lib",
24
24
  "build-storybook": "build-storybook",
25
25
  "check-all-for-ai": "yarn check-for-ai && yarn test --silent",
26
- "check-for-ai": "yarn install > /dev/null && yarn format > /dev/null && yarn lint-fix --quiet && yarn typecheck",
26
+ "check-for-ai": "yarn install > /dev/null && yarn format > /dev/null 2> /dev/null || true && yarn lint-fix --quiet && yarn typecheck",
27
27
  "cleanup": "yarn format && yarn lint-fix",
28
28
  "format": "sort-package-json && yarn prettify",
29
29
  "lint": "eslint --color",
30
30
  "lint-fix": "yarn lint --fix --rule \"{ react-hooks/exhaustive-deps: 0 }\"",
31
- "prettify": "prettier --cache --color --write \"**/{.*/,}*.{cjs,css,cts,htm,html,js,json,json5,jsonc,jsx,md,mjs,mts,scss,ts,tsx,vue,yaml,yml}\" \"!**/test{-,/}fixtures/**\"",
31
+ "prettify": "prettier --cache --color --write \"**/{.*/,}*.{cjs,css,cts,htm,html,java,js,json,json5,jsonc,jsx,md,mjs,mts,scss,ts,tsx,vue,yaml,yml}\" \"!**/test{-,/}fixtures/**\"",
32
32
  "storybook": "start-storybook -p 6006",
33
33
  "test/ci": "yarn build-storybook",
34
34
  "typecheck": "tsc --noEmit --Pretty"
35
35
  },
36
36
  "prettier": "@willbooster/prettier-config",
37
37
  "devDependencies": {
38
- "@babel/core": "7.27.7",
38
+ "@babel/core": "7.28.0",
39
39
  "@mdx-js/react": "3.1.0",
40
40
  "@storybook/addon-actions": "9.0.8",
41
- "@storybook/addon-docs": "9.0.14",
41
+ "@storybook/addon-docs": "9.0.16",
42
42
  "@storybook/addon-essentials": "8.6.14",
43
43
  "@storybook/addon-interactions": "8.6.14",
44
- "@storybook/addon-links": "9.0.14",
44
+ "@storybook/addon-links": "9.0.16",
45
45
  "@storybook/builder-webpack4": "6.5.16",
46
46
  "@storybook/manager-webpack4": "6.5.16",
47
- "@storybook/react": "9.0.14",
47
+ "@storybook/react": "9.0.16",
48
48
  "@storybook/testing-library": "0.2.2",
49
49
  "@types/eslint": "9.6.1",
50
50
  "@types/micromatch": "4.0.9",
51
51
  "@types/react": "19.1.8",
52
52
  "@types/react-dom": "19.1.6",
53
- "@willbooster/eslint-config-ts-react": "11.4.4",
54
- "@willbooster/prettier-config": "10.1.3",
53
+ "@willbooster/eslint-config-ts-react": "11.5.0",
54
+ "@willbooster/prettier-config": "10.2.0",
55
55
  "babel-loader": "10.0.0",
56
- "build-ts": "15.0.7",
57
- "eslint": "9.30.0",
56
+ "build-ts": "15.0.12",
57
+ "eslint": "9.30.1",
58
58
  "eslint-config-flat-gitignore": "2.1.0",
59
59
  "eslint-config-prettier": "10.1.5",
60
60
  "eslint-import-resolver-typescript": "4.4.4",
@@ -64,19 +64,19 @@
64
64
  "eslint-plugin-react-hooks": "5.2.0",
65
65
  "eslint-plugin-sort-class-members": "1.21.0",
66
66
  "eslint-plugin-sort-destructure-keys": "2.0.0",
67
- "eslint-plugin-storybook": "9.0.14",
67
+ "eslint-plugin-storybook": "9.0.16",
68
68
  "eslint-plugin-unicorn": "59.0.1",
69
69
  "eslint-plugin-unused-imports": "4.1.4",
70
- "globals": "16.2.0",
70
+ "globals": "16.3.0",
71
71
  "lint-staged": "16.1.2",
72
72
  "micromatch": "4.0.8",
73
73
  "prettier": "3.6.2",
74
- "prettier-plugin-java": "2.6.8",
74
+ "prettier-plugin-java": "2.7.1",
75
75
  "react": "19.1.0",
76
76
  "react-dom": "19.1.0",
77
- "sort-package-json": "3.3.1",
77
+ "sort-package-json": "3.4.0",
78
78
  "typescript": "5.8.3",
79
- "typescript-eslint": "8.35.0",
79
+ "typescript-eslint": "8.36.0",
80
80
  "vitest": "3.2.4"
81
81
  },
82
82
  "peerDependencies": {