@siberiacancode/reactuse 0.2.15 → 0.2.17
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/cjs/helpers/createEventEmitter/createEventEmitter.cjs +2 -0
- package/dist/cjs/helpers/createEventEmitter/createEventEmitter.cjs.map +1 -0
- package/dist/cjs/helpers/createStore/createStore.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/helpers/createEventEmitter/createEventEmitter.mjs +34 -0
- package/dist/esm/helpers/createEventEmitter/createEventEmitter.mjs.map +1 -0
- package/dist/esm/helpers/createStore/createStore.mjs.map +1 -1
- package/dist/esm/index.mjs +333 -331
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/helpers/createEventEmitter/createEventEmitter.d.ts +17 -0
- package/dist/types/helpers/createStore/createStore.d.ts +0 -1
- package/dist/types/helpers/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),v=()=>{const r=new Map,a=(e,t)=>{r.get(e)?.forEach(n=>n(t))},u=(e,t)=>{const s=e,n=r.get(s);n&&(n.delete(t),n.size||r.delete(s))},o=(e,t)=>{const s=e;return r.has(s)||r.set(s,new Set),r.get(e).add(t),()=>{u(e,t)}};return{push:a,subscribe:o,unsubscribe:u,useSubscribe:(e,t)=>{const[s,n]=c.useState(void 0),i=c.useRef(t);return i.current=t,c.useEffect(()=>{const f=o(e,b=>{n(b),i.current?.(b)});return()=>{f()}},[e]),s}}};exports.createEventEmitter=v;
|
|
2
|
+
//# sourceMappingURL=createEventEmitter.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEventEmitter.cjs","sources":["../../../../src/helpers/createEventEmitter/createEventEmitter.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\n/**\n * @name createEventEmitter\n * @description - Creates a type-safe event emitter\n * @category Helpers\n *\n * @template Events - The type of events and their data\n * @returns {EventEmitterApi<Events>} - Object containing event emitter methods and hook\n *\n * @example\n * const { push, subscribe, unsubscribe, useSubscribe } = createEventEmitter<{ foo: number }>();\n */\nexport const createEventEmitter = <Events extends Record<string, any> = Record<string, any>>() => {\n type ListenerMap = Map<string, Set<(data: any) => void>>;\n const listeners: ListenerMap = new Map();\n\n const push = <Event extends keyof Events>(event: Event, data: Events[Event]) => {\n const eventListeners = listeners.get(event as string);\n eventListeners?.forEach((listener) => listener(data));\n };\n\n const unsubscribe = <Key extends keyof Events>(\n event: Key,\n listener: (data: Events[Key]) => void\n ) => {\n const eventKey = event as string;\n const eventListeners = listeners.get(eventKey);\n if (!eventListeners) return;\n eventListeners.delete(listener);\n if (!eventListeners.size) listeners.delete(eventKey);\n };\n\n const subscribe = <Key extends keyof Events>(\n event: Key,\n listener: (data: Events[Key]) => void\n ) => {\n const eventKey = event as string;\n if (!listeners.has(eventKey)) listeners.set(eventKey, new Set());\n const eventListeners = listeners.get(event as string)!;\n eventListeners.add(listener);\n\n return () => {\n unsubscribe(event, listener);\n };\n };\n\n const useSubscribe = <Event extends keyof Events>(\n event: Event,\n listener?: (data: Events[Event]) => void\n ) => {\n const [data, setData] = useState<Events[Event] | undefined>(undefined);\n const listenerRef = useRef(listener);\n listenerRef.current = listener;\n\n useEffect(() => {\n const onSubscribe = (data: Events[Event]) => {\n setData(data);\n listenerRef.current?.(data);\n };\n\n const unsubscribe = subscribe(event, onSubscribe);\n return () => {\n unsubscribe();\n };\n }, [event]);\n\n return data;\n };\n\n return {\n push,\n subscribe,\n unsubscribe,\n useSubscribe\n };\n};\n"],"names":["createEventEmitter","listeners","push","event","data","listener","unsubscribe","eventKey","eventListeners","subscribe","setData","useState","listenerRef","useRef","useEffect"],"mappings":"yGAaaA,EAAqB,IAAgE,CAEhG,MAAMC,MAA6B,IAE7BC,EAAO,CAA6BC,EAAcC,IAAwB,CACvDH,EAAU,IAAIE,CAAe,GACpC,QAASE,GAAaA,EAASD,CAAI,CAAC,CAAA,EAGhDE,EAAc,CAClBH,EACAE,IACG,CACH,MAAME,EAAWJ,EACXK,EAAiBP,EAAU,IAAIM,CAAQ,EACxCC,IACLA,EAAe,OAAOH,CAAQ,EACzBG,EAAe,MAAMP,EAAU,OAAOM,CAAQ,EAAA,EAG/CE,EAAY,CAChBN,EACAE,IACG,CACH,MAAME,EAAWJ,EACjB,OAAKF,EAAU,IAAIM,CAAQ,KAAa,IAAIA,EAAU,IAAI,GAAK,EACxCN,EAAU,IAAIE,CAAe,EACrC,IAAIE,CAAQ,EAEpB,IAAM,CACXC,EAAYH,EAAOE,CAAQ,CAAA,CAC7B,EA0BF,MAAO,CACL,KAAAH,EACA,UAAAO,EACA,YAAAH,EACA,aA3BmB,CACnBH,EACAE,IACG,CACH,KAAM,CAACD,EAAMM,CAAO,EAAIC,EAAAA,SAAoC,MAAS,EAC/DC,EAAcC,EAAAA,OAAOR,CAAQ,EACnC,OAAAO,EAAY,QAAUP,EAEtBS,EAAAA,UAAU,IAAM,CAMd,MAAMR,EAAcG,EAAUN,EALTC,GAAwB,CAC3CM,EAAQN,CAAI,EACZQ,EAAY,UAAUR,CAAI,CAAA,CAGoB,EAChD,MAAO,IAAM,CACXE,EAAAA,CAAY,CACd,EACC,CAACH,CAAK,CAAC,EAEHC,CAAA,CAOP,CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStore.cjs","sources":["../../../../src/helpers/createStore/createStore.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\ntype SetStateAction<Value> = ((prev: Value) => Value) | Value;\ntype StateCreator<Value> = (\n set: (action: SetStateAction<Value>) => void,\n get: () => Value\n) => Value;\n\nexport interface StoreApi<Value> {\n getInitialState: () => Value;\n getState: () => Value;\n setState: (action: SetStateAction<Value>) => void;\n subscribe: (listener: (state: Value, prevState: Value) => void) => () => void;\n}\n\n/**\n * @name createStore\n * @description - Creates a store with state management capabilities\n * @category Helpers\n *\n * @template Value - The type of the store state\n
|
|
1
|
+
{"version":3,"file":"createStore.cjs","sources":["../../../../src/helpers/createStore/createStore.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\ntype SetStateAction<Value> = ((prev: Value) => Value) | Value;\ntype StateCreator<Value> = (\n set: (action: SetStateAction<Value>) => void,\n get: () => Value\n) => Value;\n\nexport interface StoreApi<Value> {\n getInitialState: () => Value;\n getState: () => Value;\n setState: (action: SetStateAction<Value>) => void;\n subscribe: (listener: (state: Value, prevState: Value) => void) => () => void;\n}\n\n/**\n * @name createStore\n * @description - Creates a store with state management capabilities\n * @category Helpers\n *\n * @template Value - The type of the store state\n * @param {StateCreator<Value>} createState - Function that initializes the store state\n * @returns {StoreApi<Value>} - Object containing store methods and hook for accessing state\n *\n * @example\n * const { set, get, use, subscribe } = createStore((set) => ({\n * count: 0,\n * increment: () => set(state => ({ count: state.count + 1 }))\n * }));\n */\nexport const createStore = <Value>(createState: StateCreator<Value> | Value) => {\n type Listener = (state: Value, prevState: Value) => void;\n let state: Value;\n const listeners: Set<Listener> = new Set();\n\n const setState = (action: SetStateAction<Value>) => {\n const nextState =\n typeof action === 'function' ? (action as (state: Value) => Value)(state) : action;\n\n if (!Object.is(nextState, state)) {\n const prevState = state;\n state = nextState;\n listeners.forEach((listener) => listener(state, prevState));\n }\n };\n\n const getState = () => state;\n const getInitialState = () => state;\n\n const subscribe = (listener: Listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n if (typeof createState === 'function') {\n state = (createState as StateCreator<Value>)(setState, getState);\n } else {\n state = createState;\n }\n\n const useStore = <Selected>(selector: (state: Value) => Selected) =>\n useSyncExternalStore(\n subscribe,\n () => selector(getState()),\n () => selector(getInitialState())\n );\n\n return {\n set: setState,\n get: getState,\n use: useStore,\n subscribe\n };\n};\n"],"names":["createStore","createState","state","listeners","setState","action","nextState","prevState","listener","getState","getInitialState","subscribe","selector","useSyncExternalStore"],"mappings":"yGA8BaA,EAAsBC,GAA6C,CAE9E,IAAIC,EACJ,MAAMC,MAA+B,IAE/BC,EAAYC,GAAkC,CAClD,MAAMC,EACJ,OAAOD,GAAW,WAAcA,EAAmCH,CAAK,EAAIG,EAE9E,GAAI,CAAC,OAAO,GAAGC,EAAWJ,CAAK,EAAG,CAChC,MAAMK,EAAYL,EAClBA,EAAQI,EACRH,EAAU,QAASK,GAAaA,EAASN,EAAOK,CAAS,CAAC,CAAA,CAC5D,EAGIE,EAAW,IAAMP,EACjBQ,EAAkB,IAAMR,EAExBS,EAAaH,IACjBL,EAAU,IAAIK,CAAQ,EACf,IAAML,EAAU,OAAOK,CAAQ,GAExC,OAAI,OAAOP,GAAgB,WACzBC,EAASD,EAAoCG,EAAUK,CAAQ,EAE/DP,EAAQD,EAUH,CACL,IAAKG,EACL,IAAKK,EACL,IAV0BG,GAC1BC,EAAAA,qBACEF,EACA,IAAMC,EAASH,GAAU,EACzB,IAAMG,EAASF,EAAA,CAAiB,CAAA,EAOlC,UAAAC,CAAA,CAEJ"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./helpers/createContext/createContext.cjs"),m=require("./helpers/createReactiveContext/createReactiveContext.cjs"),R=require("./helpers/createStore/createStore.cjs"),p=require("./hooks/useActiveElement/useActiveElement.cjs"),y=require("./hooks/useAsync/useAsync.cjs"),O=require("./hooks/useBattery/useBattery.cjs"),v=require("./hooks/useBluetooth/useBluetooth.cjs"),I=require("./hooks/useBoolean/useBoolean.cjs"),e=require("./hooks/useBreakpoints/useBreakpoints.cjs"),k=require("./hooks/useBrowserLanguage/useBrowserLanguage.cjs"),D=require("./hooks/useClickOutside/useClickOutside.cjs"),h=require("./hooks/useClipboard/useClipboard.cjs"),A=require("./hooks/useConst/useConst.cjs"),s=require("./hooks/useCookie/useCookie.cjs"),i=require("./hooks/useCookies/useCookies.cjs"),b=require("./hooks/useCopy/useCopy.cjs"),L=require("./hooks/useCounter/useCounter.cjs"),M=require("./hooks/useCssVar/useCssVar.cjs"),f=require("./hooks/useDebounceCallback/useDebounceCallback.cjs"),_=require("./hooks/useDebounceValue/useDebounceValue.cjs"),N=require("./hooks/useDefault/useDefault.cjs"),B=require("./hooks/useDeviceMotion/useDeviceMotion.cjs"),K=require("./hooks/useDeviceOrientation/useDeviceOrientation.cjs"),F=require("./hooks/useDevicePixelRatio/useDevicePixelRatio.cjs"),V=require("./hooks/useDidUpdate/useDidUpdate.cjs"),U=require("./hooks/useDisclosure/useDisclosure.cjs"),w=require("./hooks/useDisplayMedia/useDisplayMedia.cjs"),W=require("./hooks/useDocumentEvent/useDocumentEvent.cjs"),x=require("./hooks/useDocumentTitle/useDocumentTitle.cjs"),H=require("./hooks/useDocumentVisibility/useDocumentVisibility.cjs"),Q=require("./hooks/useDoubleClick/useDoubleClick.cjs"),z=require("./hooks/useDropZone/useDropZone.cjs"),G=require("./hooks/useElementSize/useElementSize.cjs"),X=require("./hooks/useEvent/useEvent.cjs"),Z=require("./hooks/useEventListener/useEventListener.cjs"),j=require("./hooks/useEventSource/useEventSource.cjs"),J=require("./hooks/useEyeDropper/useEyeDropper.cjs"),Y=require("./hooks/useFavicon/useFavicon.cjs"),$=require("./hooks/useField/useField.cjs"),ee=require("./hooks/useFileDialog/useFileDialog.cjs"),se=require("./hooks/useFocus/useFocus.cjs"),ue=require("./hooks/useFps/useFps.cjs"),re=require("./hooks/useFul/useFul.cjs"),te=require("./hooks/useFullscreen/useFullscreen.cjs"),n=require("./hooks/useGamepad/useGamepad.cjs"),oe=require("./hooks/useGeolocation/useGeolocation.cjs"),ie=require("./hooks/useHash/useHash.cjs"),c=require("./hooks/useHotkeys/useHotkeys.cjs"),ne=require("./hooks/useHover/useHover.cjs"),ce=require("./hooks/useIdle/useIdle.cjs"),ae=require("./hooks/useImage/useImage.cjs"),le=require("./hooks/useInfiniteScroll/useInfiniteScroll.cjs"),Se=require("./hooks/useIntersectionObserver/useIntersectionObserver.cjs"),qe=require("./hooks/useInterval/useInterval.cjs"),de=require("./hooks/useIsFirstRender/useIsFirstRender.cjs"),ge=require("./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs"),Pe=require("./hooks/useKeyboard/useKeyboard.cjs"),Te=require("./hooks/useKeyPress/useKeyPress.cjs"),Ee=require("./hooks/useKeyPressEvent/useKeyPressEvent.cjs"),Ce=require("./hooks/useKeysPressed/useKeysPressed.cjs"),me=require("./hooks/useLastChanged/useLastChanged.cjs"),Re=require("./hooks/useLatest/useLatest.cjs"),pe=require("./hooks/useLess/useLess.cjs"),ye=require("./hooks/useList/useList.cjs"),Oe=require("./hooks/useLocalStorage/useLocalStorage.cjs"),ve=require("./hooks/useLockCallback/useLockCallback.cjs"),Ie=require("./hooks/useLogger/useLogger.cjs"),ke=require("./hooks/useLongPress/useLongPress.cjs"),De=require("./hooks/useMap/useMap.cjs"),he=require("./hooks/useMeasure/useMeasure.cjs"),Ae=require("./hooks/useMediaQuery/useMediaQuery.cjs"),be=require("./hooks/useMemory/useMemory.cjs"),Le=require("./hooks/useMount/useMount.cjs"),Me=require("./hooks/useMouse/useMouse.cjs"),fe=require("./hooks/useMutation/useMutation.cjs"),_e=require("./hooks/useMutationObserver/useMutationObserver.cjs"),a=require("./hooks/useNetwork/useNetwork.cjs"),Ne=require("./hooks/useOffsetPagination/useOffsetPagination.cjs"),Be=require("./hooks/useOnce/useOnce.cjs"),Ke=require("./hooks/useOnline/useOnline.cjs"),l=require("./hooks/useOperatingSystem/useOperatingSystem.cjs"),Fe=require("./hooks/useOptimistic/useOptimistic.cjs"),Ve=require("./hooks/useOrientation/useOrientation.cjs"),Ue=require("./hooks/useOtpCredential/useOtpCredential.cjs"),we=require("./hooks/usePageLeave/usePageLeave.cjs"),r=require("./hooks/usePaint/usePaint.cjs"),We=require("./hooks/useParallax/useParallax.cjs"),xe=require("./hooks/usePerformanceObserver/usePerformanceObserver.cjs"),He=require("./hooks/usePermission/usePermission.cjs"),Qe=require("./hooks/usePointerLock/usePointerLock.cjs"),ze=require("./hooks/usePostMessage/usePostMessage.cjs"),Ge=require("./hooks/usePreferredColorScheme/usePreferredColorScheme.cjs"),Xe=require("./hooks/usePreferredContrast/usePreferredContrast.cjs"),Ze=require("./hooks/usePreferredDark/usePreferredDark.cjs"),je=require("./hooks/usePreferredLanguages/usePreferredLanguages.cjs"),Je=require("./hooks/usePreferredReducedMotion/usePreferredReducedMotion.cjs"),Ye=require("./hooks/usePrevious/usePrevious.cjs"),$e=require("./hooks/useQuery/useQuery.cjs"),es=require("./hooks/useQueue/useQueue.cjs"),ss=require("./hooks/useRaf/useRaf.cjs"),us=require("./hooks/useRafValue/useRafValue.cjs"),rs=require("./hooks/useRefState/useRefState.cjs"),ts=require("./hooks/useRenderCount/useRenderCount.cjs"),os=require("./hooks/useRenderInfo/useRenderInfo.cjs"),is=require("./hooks/useRerender/useRerender.cjs"),ns=require("./hooks/useResizeObserver/useResizeObserver.cjs"),cs=require("./hooks/useScreenOrientation/useScreenOrientation.cjs"),S=require("./hooks/useScript/useScript.cjs"),as=require("./hooks/useScroll/useScroll.cjs"),ls=require("./hooks/useScrollIntoView/useScrollIntoView.cjs"),Ss=require("./hooks/useScrollTo/useScrollTo.cjs"),qs=require("./hooks/useSessionStorage/useSessionStorage.cjs"),ds=require("./hooks/useSet/useSet.cjs"),gs=require("./hooks/useShare/useShare.cjs"),q=require("./hooks/useSpeechRecognition/useSpeechRecognition.cjs"),Ps=require("./hooks/useSpeechSynthesis/useSpeechSynthesis.cjs"),d=require("./hooks/useStateHistory/useStateHistory.cjs"),Ts=require("./hooks/useStep/useStep.cjs"),Es=require("./hooks/useSticky/useSticky.cjs"),Cs=require("./hooks/useStopwatch/useStopwatch.cjs"),t=require("./hooks/useStorage/useStorage.cjs"),ms=require("./hooks/useTextDirection/useTextDirection.cjs"),g=require("./hooks/useTextSelection/useTextSelection.cjs"),Rs=require("./hooks/useThrottleCallback/useThrottleCallback.cjs"),ps=require("./hooks/useThrottleValue/useThrottleValue.cjs"),ys=require("./hooks/useTime/useTime.cjs"),Os=require("./hooks/useTimeout/useTimeout.cjs"),P=require("./hooks/useTimer/useTimer.cjs"),vs=require("./hooks/useToggle/useToggle.cjs"),Is=require("./hooks/useUnmount/useUnmount.cjs"),u=require("./hooks/useUrlSearchParam/useUrlSearchParam.cjs"),ks=require("./hooks/useUrlSearchParams/useUrlSearchParams.cjs"),Ds=require("./hooks/useVibrate/useVibrate.cjs"),hs=require("./hooks/useWakeLock/useWakeLock.cjs"),As=require("./hooks/useWebSocket/useWebSocket.cjs"),bs=require("./hooks/useWindowEvent/useWindowEvent.cjs"),Ls=require("./hooks/useWindowFocus/useWindowFocus.cjs"),T=require("./hooks/useWindowScroll/useWindowScroll.cjs"),Ms=require("./hooks/useWindowSize/useWindowSize.cjs"),fs=require("./hooks/useWizard/useWizard.cjs"),E=require("./utils/helpers/copy.cjs"),_s=require("./utils/helpers/debounce.cjs"),Ns=require("./utils/helpers/getDate.cjs"),o=require("./utils/helpers/getElement.cjs"),Bs=require("./utils/helpers/getRetry.cjs"),Ks=require("./utils/helpers/isTarget.cjs"),Fs=require("./utils/helpers/throttle.cjs");exports.createContext=C.createContext;exports.createReactiveContext=m.createReactiveContext;exports.createStore=R.createStore;exports.useActiveElement=p.useActiveElement;exports.useAsync=y.useAsync;exports.useBattery=O.useBattery;exports.useBluetooth=v.useBluetooth;exports.useBoolean=I.useBoolean;exports.BREAKPOINTS_ANT_DESIGN=e.BREAKPOINTS_ANT_DESIGN;exports.BREAKPOINTS_BOOTSTRAP_V5=e.BREAKPOINTS_BOOTSTRAP_V5;exports.BREAKPOINTS_MANTINE=e.BREAKPOINTS_MANTINE;exports.BREAKPOINTS_MASTER_CSS=e.BREAKPOINTS_MASTER_CSS;exports.BREAKPOINTS_MATERIAL_UI=e.BREAKPOINTS_MATERIAL_UI;exports.BREAKPOINTS_PRIME_FLEX=e.BREAKPOINTS_PRIME_FLEX;exports.BREAKPOINTS_QUASAR_V2=e.BREAKPOINTS_QUASAR_V2;exports.BREAKPOINTS_SEMANTIC=e.BREAKPOINTS_SEMANTIC;exports.BREAKPOINTS_TAILWIND=e.BREAKPOINTS_TAILWIND;exports.useBreakpoints=e.useBreakpoints;exports.useBrowserLanguage=k.useBrowserLanguage;exports.useClickOutside=D.useClickOutside;exports.useClipboard=h.useClipboard;exports.useConst=A.useConst;exports.COOKIE_EVENT=s.COOKIE_EVENT;exports.dispatchCookieEvent=s.dispatchCookieEvent;exports.getCookie=s.getCookie;exports.getCookies=s.getCookies;exports.removeCookie=s.removeCookie;exports.removeCookieItem=s.removeCookieItem;exports.setCookie=s.setCookie;exports.setCookieItem=s.setCookieItem;exports.useCookie=s.useCookie;exports.clearCookies=i.clearCookies;exports.useCookies=i.useCookies;exports.useCopy=b.useCopy;exports.useCounter=L.useCounter;exports.useCssVar=M.useCssVar;exports.useDebounceCallback=f.useDebounceCallback;exports.useDebounceValue=_.useDebounceValue;exports.useDefault=N.useDefault;exports.useDeviceMotion=B.useDeviceMotion;exports.useDeviceOrientation=K.useDeviceOrientation;exports.useDevicePixelRatio=F.useDevicePixelRatio;exports.useDidUpdate=V.useDidUpdate;exports.useDisclosure=U.useDisclosure;exports.useDisplayMedia=w.useDisplayMedia;exports.useDocumentEvent=W.useDocumentEvent;exports.useDocumentTitle=x.useDocumentTitle;exports.useDocumentVisibility=H.useDocumentVisibility;exports.useDoubleClick=Q.useDoubleClick;exports.useDropZone=z.useDropZone;exports.useElementSize=G.useElementSize;exports.useEvent=X.useEvent;exports.useEventListener=Z.useEventListener;exports.useEventSource=j.useEventSource;exports.useEyeDropper=J.useEyeDropper;exports.useFavicon=Y.useFavicon;exports.useField=$.useField;exports.useFileDialog=ee.useFileDialog;exports.useFocus=se.useFocus;exports.useFps=ue.useFps;exports.useFul=re.useFul;exports.useFullscreen=te.useFullscreen;exports.mapGamepadToXbox360Controller=n.mapGamepadToXbox360Controller;exports.useGamepad=n.useGamepad;exports.useGeolocation=oe.useGeolocation;exports.useHash=ie.useHash;exports.isHotkeyMatch=c.isHotkeyMatch;exports.useHotkeys=c.useHotkeys;exports.useHover=ne.useHover;exports.useIdle=ce.useIdle;exports.useImage=ae.useImage;exports.useInfiniteScroll=le.useInfiniteScroll;exports.useIntersectionObserver=Se.useIntersectionObserver;exports.useInterval=qe.useInterval;exports.useIsFirstRender=de.useIsFirstRender;exports.useIsomorphicLayoutEffect=ge.useIsomorphicLayoutEffect;exports.useKeyboard=Pe.useKeyboard;exports.useKeyPress=Te.useKeyPress;exports.useKeyPressEvent=Ee.useKeyPressEvent;exports.useKeysPressed=Ce.useKeysPressed;exports.useLastChanged=me.useLastChanged;exports.useLatest=Re.useLatest;exports.useLess=pe.useLess;exports.useList=ye.useList;exports.useLocalStorage=Oe.useLocalStorage;exports.useLockCallback=ve.useLockCallback;exports.useLogger=Ie.useLogger;exports.useLongPress=ke.useLongPress;exports.useMap=De.useMap;exports.useMeasure=he.useMeasure;exports.useMediaQuery=Ae.useMediaQuery;exports.useMemory=be.useMemory;exports.useMount=Le.useMount;exports.useMouse=Me.useMouse;exports.useMutation=fe.useMutation;exports.useMutationObserver=_e.useMutationObserver;exports.getConnection=a.getConnection;exports.useNetwork=a.useNetwork;exports.useOffsetPagination=Ne.useOffsetPagination;exports.useOnce=Be.useOnce;exports.useOnline=Ke.useOnline;exports.getOperatingSystem=l.getOperatingSystem;exports.useOperatingSystem=l.useOperatingSystem;exports.useOptimistic=Fe.useOptimistic;exports.useOrientation=Ve.useOrientation;exports.useOtpCredential=Ue.useOtpCredential;exports.usePageLeave=we.usePageLeave;exports.Paint=r.Paint;exports.Pointer=r.Pointer;exports.usePaint=r.usePaint;exports.useParallax=We.useParallax;exports.usePerformanceObserver=xe.usePerformanceObserver;exports.usePermission=He.usePermission;exports.usePointerLock=Qe.usePointerLock;exports.usePostMessage=ze.usePostMessage;exports.usePreferredColorScheme=Ge.usePreferredColorScheme;exports.usePreferredContrast=Xe.usePreferredContrast;exports.usePreferredDark=Ze.usePreferredDark;exports.usePreferredLanguages=je.usePreferredLanguages;exports.usePreferredReducedMotion=Je.usePreferredReducedMotion;exports.usePrevious=Ye.usePrevious;exports.useQuery=$e.useQuery;exports.useQueue=es.useQueue;exports.useRaf=ss.useRaf;exports.useRafValue=us.useRafValue;exports.useRefState=rs.useRefState;exports.useRenderCount=ts.useRenderCount;exports.useRenderInfo=os.useRenderInfo;exports.useRerender=is.useRerender;exports.useResizeObserver=ns.useResizeObserver;exports.useScreenOrientation=cs.useScreenOrientation;exports.SCRIPT_STATUS_ATTRIBUTE_NAME=S.SCRIPT_STATUS_ATTRIBUTE_NAME;exports.useScript=S.useScript;exports.useScroll=as.useScroll;exports.useScrollIntoView=ls.useScrollIntoView;exports.useScrollTo=Ss.useScrollTo;exports.useSessionStorage=qs.useSessionStorage;exports.useSet=ds.useSet;exports.useShare=gs.useShare;exports.getSpeechRecognition=q.getSpeechRecognition;exports.useSpeechRecognition=q.useSpeechRecognition;exports.useSpeechSynthesis=Ps.useSpeechSynthesis;exports.stateHistoryReducer=d.stateHistoryReducer;exports.useStateHistory=d.useStateHistory;exports.useStep=Ts.useStep;exports.useSticky=Es.useSticky;exports.useStopwatch=Cs.useStopwatch;exports.STORAGE_EVENT=t.STORAGE_EVENT;exports.dispatchStorageEvent=t.dispatchStorageEvent;exports.useStorage=t.useStorage;exports.useTextDirection=ms.useTextDirection;exports.getRangesSelection=g.getRangesSelection;exports.useTextSelection=g.useTextSelection;exports.useThrottleCallback=Rs.useThrottleCallback;exports.useThrottleValue=ps.useThrottleValue;exports.useTime=ys.useTime;exports.useTimeout=Os.useTimeout;exports.getTimeFromSeconds=P.getTimeFromSeconds;exports.useTimer=P.useTimer;exports.useToggle=vs.useToggle;exports.useUnmount=Is.useUnmount;exports.URL_SEARCH_PARAMS_EVENT=u.URL_SEARCH_PARAMS_EVENT;exports.createQueryString=u.createQueryString;exports.dispatchUrlSearchParamsEvent=u.dispatchUrlSearchParamsEvent;exports.getUrlSearchParams=u.getUrlSearchParams;exports.useUrlSearchParam=u.useUrlSearchParam;exports.useUrlSearchParams=ks.useUrlSearchParams;exports.useVibrate=Ds.useVibrate;exports.useWakeLock=hs.useWakeLock;exports.useWebSocket=As.useWebSocket;exports.useWindowEvent=bs.useWindowEvent;exports.useWindowFocus=Ls.useWindowFocus;exports.scrollTo=T.scrollTo;exports.useWindowScroll=T.useWindowScroll;exports.useWindowSize=Ms.useWindowSize;exports.useWizard=fs.useWizard;exports.copy=E.copy;exports.legacyCopyToClipboard=E.legacyCopyToClipboard;exports.debounce=_s.debounce;exports.getDate=Ns.getDate;exports.getElement=o.getElement;exports.target=o.target;exports.targetSymbol=o.targetSymbol;exports.getRetry=Bs.getRetry;exports.isTarget=Ks.isTarget;exports.throttle=Fs.throttle;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./helpers/createContext/createContext.cjs"),C=require("./helpers/createEventEmitter/createEventEmitter.cjs"),R=require("./helpers/createReactiveContext/createReactiveContext.cjs"),p=require("./helpers/createStore/createStore.cjs"),y=require("./hooks/useActiveElement/useActiveElement.cjs"),v=require("./hooks/useAsync/useAsync.cjs"),O=require("./hooks/useBattery/useBattery.cjs"),I=require("./hooks/useBluetooth/useBluetooth.cjs"),k=require("./hooks/useBoolean/useBoolean.cjs"),e=require("./hooks/useBreakpoints/useBreakpoints.cjs"),D=require("./hooks/useBrowserLanguage/useBrowserLanguage.cjs"),h=require("./hooks/useClickOutside/useClickOutside.cjs"),A=require("./hooks/useClipboard/useClipboard.cjs"),b=require("./hooks/useConst/useConst.cjs"),s=require("./hooks/useCookie/useCookie.cjs"),i=require("./hooks/useCookies/useCookies.cjs"),L=require("./hooks/useCopy/useCopy.cjs"),M=require("./hooks/useCounter/useCounter.cjs"),f=require("./hooks/useCssVar/useCssVar.cjs"),_=require("./hooks/useDebounceCallback/useDebounceCallback.cjs"),N=require("./hooks/useDebounceValue/useDebounceValue.cjs"),B=require("./hooks/useDefault/useDefault.cjs"),K=require("./hooks/useDeviceMotion/useDeviceMotion.cjs"),F=require("./hooks/useDeviceOrientation/useDeviceOrientation.cjs"),V=require("./hooks/useDevicePixelRatio/useDevicePixelRatio.cjs"),U=require("./hooks/useDidUpdate/useDidUpdate.cjs"),w=require("./hooks/useDisclosure/useDisclosure.cjs"),W=require("./hooks/useDisplayMedia/useDisplayMedia.cjs"),x=require("./hooks/useDocumentEvent/useDocumentEvent.cjs"),H=require("./hooks/useDocumentTitle/useDocumentTitle.cjs"),Q=require("./hooks/useDocumentVisibility/useDocumentVisibility.cjs"),z=require("./hooks/useDoubleClick/useDoubleClick.cjs"),G=require("./hooks/useDropZone/useDropZone.cjs"),X=require("./hooks/useElementSize/useElementSize.cjs"),Z=require("./hooks/useEvent/useEvent.cjs"),j=require("./hooks/useEventListener/useEventListener.cjs"),J=require("./hooks/useEventSource/useEventSource.cjs"),Y=require("./hooks/useEyeDropper/useEyeDropper.cjs"),$=require("./hooks/useFavicon/useFavicon.cjs"),ee=require("./hooks/useField/useField.cjs"),se=require("./hooks/useFileDialog/useFileDialog.cjs"),ue=require("./hooks/useFocus/useFocus.cjs"),re=require("./hooks/useFps/useFps.cjs"),te=require("./hooks/useFul/useFul.cjs"),oe=require("./hooks/useFullscreen/useFullscreen.cjs"),n=require("./hooks/useGamepad/useGamepad.cjs"),ie=require("./hooks/useGeolocation/useGeolocation.cjs"),ne=require("./hooks/useHash/useHash.cjs"),c=require("./hooks/useHotkeys/useHotkeys.cjs"),ce=require("./hooks/useHover/useHover.cjs"),ae=require("./hooks/useIdle/useIdle.cjs"),le=require("./hooks/useImage/useImage.cjs"),Se=require("./hooks/useInfiniteScroll/useInfiniteScroll.cjs"),qe=require("./hooks/useIntersectionObserver/useIntersectionObserver.cjs"),de=require("./hooks/useInterval/useInterval.cjs"),ge=require("./hooks/useIsFirstRender/useIsFirstRender.cjs"),Ee=require("./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs"),Pe=require("./hooks/useKeyboard/useKeyboard.cjs"),Te=require("./hooks/useKeyPress/useKeyPress.cjs"),me=require("./hooks/useKeyPressEvent/useKeyPressEvent.cjs"),Ce=require("./hooks/useKeysPressed/useKeysPressed.cjs"),Re=require("./hooks/useLastChanged/useLastChanged.cjs"),pe=require("./hooks/useLatest/useLatest.cjs"),ye=require("./hooks/useLess/useLess.cjs"),ve=require("./hooks/useList/useList.cjs"),Oe=require("./hooks/useLocalStorage/useLocalStorage.cjs"),Ie=require("./hooks/useLockCallback/useLockCallback.cjs"),ke=require("./hooks/useLogger/useLogger.cjs"),De=require("./hooks/useLongPress/useLongPress.cjs"),he=require("./hooks/useMap/useMap.cjs"),Ae=require("./hooks/useMeasure/useMeasure.cjs"),be=require("./hooks/useMediaQuery/useMediaQuery.cjs"),Le=require("./hooks/useMemory/useMemory.cjs"),Me=require("./hooks/useMount/useMount.cjs"),fe=require("./hooks/useMouse/useMouse.cjs"),_e=require("./hooks/useMutation/useMutation.cjs"),Ne=require("./hooks/useMutationObserver/useMutationObserver.cjs"),a=require("./hooks/useNetwork/useNetwork.cjs"),Be=require("./hooks/useOffsetPagination/useOffsetPagination.cjs"),Ke=require("./hooks/useOnce/useOnce.cjs"),Fe=require("./hooks/useOnline/useOnline.cjs"),l=require("./hooks/useOperatingSystem/useOperatingSystem.cjs"),Ve=require("./hooks/useOptimistic/useOptimistic.cjs"),Ue=require("./hooks/useOrientation/useOrientation.cjs"),we=require("./hooks/useOtpCredential/useOtpCredential.cjs"),We=require("./hooks/usePageLeave/usePageLeave.cjs"),r=require("./hooks/usePaint/usePaint.cjs"),xe=require("./hooks/useParallax/useParallax.cjs"),He=require("./hooks/usePerformanceObserver/usePerformanceObserver.cjs"),Qe=require("./hooks/usePermission/usePermission.cjs"),ze=require("./hooks/usePointerLock/usePointerLock.cjs"),Ge=require("./hooks/usePostMessage/usePostMessage.cjs"),Xe=require("./hooks/usePreferredColorScheme/usePreferredColorScheme.cjs"),Ze=require("./hooks/usePreferredContrast/usePreferredContrast.cjs"),je=require("./hooks/usePreferredDark/usePreferredDark.cjs"),Je=require("./hooks/usePreferredLanguages/usePreferredLanguages.cjs"),Ye=require("./hooks/usePreferredReducedMotion/usePreferredReducedMotion.cjs"),$e=require("./hooks/usePrevious/usePrevious.cjs"),es=require("./hooks/useQuery/useQuery.cjs"),ss=require("./hooks/useQueue/useQueue.cjs"),us=require("./hooks/useRaf/useRaf.cjs"),rs=require("./hooks/useRafValue/useRafValue.cjs"),ts=require("./hooks/useRefState/useRefState.cjs"),os=require("./hooks/useRenderCount/useRenderCount.cjs"),is=require("./hooks/useRenderInfo/useRenderInfo.cjs"),ns=require("./hooks/useRerender/useRerender.cjs"),cs=require("./hooks/useResizeObserver/useResizeObserver.cjs"),as=require("./hooks/useScreenOrientation/useScreenOrientation.cjs"),S=require("./hooks/useScript/useScript.cjs"),ls=require("./hooks/useScroll/useScroll.cjs"),Ss=require("./hooks/useScrollIntoView/useScrollIntoView.cjs"),qs=require("./hooks/useScrollTo/useScrollTo.cjs"),ds=require("./hooks/useSessionStorage/useSessionStorage.cjs"),gs=require("./hooks/useSet/useSet.cjs"),Es=require("./hooks/useShare/useShare.cjs"),q=require("./hooks/useSpeechRecognition/useSpeechRecognition.cjs"),Ps=require("./hooks/useSpeechSynthesis/useSpeechSynthesis.cjs"),d=require("./hooks/useStateHistory/useStateHistory.cjs"),Ts=require("./hooks/useStep/useStep.cjs"),ms=require("./hooks/useSticky/useSticky.cjs"),Cs=require("./hooks/useStopwatch/useStopwatch.cjs"),t=require("./hooks/useStorage/useStorage.cjs"),Rs=require("./hooks/useTextDirection/useTextDirection.cjs"),g=require("./hooks/useTextSelection/useTextSelection.cjs"),ps=require("./hooks/useThrottleCallback/useThrottleCallback.cjs"),ys=require("./hooks/useThrottleValue/useThrottleValue.cjs"),vs=require("./hooks/useTime/useTime.cjs"),Os=require("./hooks/useTimeout/useTimeout.cjs"),E=require("./hooks/useTimer/useTimer.cjs"),Is=require("./hooks/useToggle/useToggle.cjs"),ks=require("./hooks/useUnmount/useUnmount.cjs"),u=require("./hooks/useUrlSearchParam/useUrlSearchParam.cjs"),Ds=require("./hooks/useUrlSearchParams/useUrlSearchParams.cjs"),hs=require("./hooks/useVibrate/useVibrate.cjs"),As=require("./hooks/useWakeLock/useWakeLock.cjs"),bs=require("./hooks/useWebSocket/useWebSocket.cjs"),Ls=require("./hooks/useWindowEvent/useWindowEvent.cjs"),Ms=require("./hooks/useWindowFocus/useWindowFocus.cjs"),P=require("./hooks/useWindowScroll/useWindowScroll.cjs"),fs=require("./hooks/useWindowSize/useWindowSize.cjs"),_s=require("./hooks/useWizard/useWizard.cjs"),T=require("./utils/helpers/copy.cjs"),Ns=require("./utils/helpers/debounce.cjs"),Bs=require("./utils/helpers/getDate.cjs"),o=require("./utils/helpers/getElement.cjs"),Ks=require("./utils/helpers/getRetry.cjs"),Fs=require("./utils/helpers/isTarget.cjs"),Vs=require("./utils/helpers/throttle.cjs");exports.createContext=m.createContext;exports.createEventEmitter=C.createEventEmitter;exports.createReactiveContext=R.createReactiveContext;exports.createStore=p.createStore;exports.useActiveElement=y.useActiveElement;exports.useAsync=v.useAsync;exports.useBattery=O.useBattery;exports.useBluetooth=I.useBluetooth;exports.useBoolean=k.useBoolean;exports.BREAKPOINTS_ANT_DESIGN=e.BREAKPOINTS_ANT_DESIGN;exports.BREAKPOINTS_BOOTSTRAP_V5=e.BREAKPOINTS_BOOTSTRAP_V5;exports.BREAKPOINTS_MANTINE=e.BREAKPOINTS_MANTINE;exports.BREAKPOINTS_MASTER_CSS=e.BREAKPOINTS_MASTER_CSS;exports.BREAKPOINTS_MATERIAL_UI=e.BREAKPOINTS_MATERIAL_UI;exports.BREAKPOINTS_PRIME_FLEX=e.BREAKPOINTS_PRIME_FLEX;exports.BREAKPOINTS_QUASAR_V2=e.BREAKPOINTS_QUASAR_V2;exports.BREAKPOINTS_SEMANTIC=e.BREAKPOINTS_SEMANTIC;exports.BREAKPOINTS_TAILWIND=e.BREAKPOINTS_TAILWIND;exports.useBreakpoints=e.useBreakpoints;exports.useBrowserLanguage=D.useBrowserLanguage;exports.useClickOutside=h.useClickOutside;exports.useClipboard=A.useClipboard;exports.useConst=b.useConst;exports.COOKIE_EVENT=s.COOKIE_EVENT;exports.dispatchCookieEvent=s.dispatchCookieEvent;exports.getCookie=s.getCookie;exports.getCookies=s.getCookies;exports.removeCookie=s.removeCookie;exports.removeCookieItem=s.removeCookieItem;exports.setCookie=s.setCookie;exports.setCookieItem=s.setCookieItem;exports.useCookie=s.useCookie;exports.clearCookies=i.clearCookies;exports.useCookies=i.useCookies;exports.useCopy=L.useCopy;exports.useCounter=M.useCounter;exports.useCssVar=f.useCssVar;exports.useDebounceCallback=_.useDebounceCallback;exports.useDebounceValue=N.useDebounceValue;exports.useDefault=B.useDefault;exports.useDeviceMotion=K.useDeviceMotion;exports.useDeviceOrientation=F.useDeviceOrientation;exports.useDevicePixelRatio=V.useDevicePixelRatio;exports.useDidUpdate=U.useDidUpdate;exports.useDisclosure=w.useDisclosure;exports.useDisplayMedia=W.useDisplayMedia;exports.useDocumentEvent=x.useDocumentEvent;exports.useDocumentTitle=H.useDocumentTitle;exports.useDocumentVisibility=Q.useDocumentVisibility;exports.useDoubleClick=z.useDoubleClick;exports.useDropZone=G.useDropZone;exports.useElementSize=X.useElementSize;exports.useEvent=Z.useEvent;exports.useEventListener=j.useEventListener;exports.useEventSource=J.useEventSource;exports.useEyeDropper=Y.useEyeDropper;exports.useFavicon=$.useFavicon;exports.useField=ee.useField;exports.useFileDialog=se.useFileDialog;exports.useFocus=ue.useFocus;exports.useFps=re.useFps;exports.useFul=te.useFul;exports.useFullscreen=oe.useFullscreen;exports.mapGamepadToXbox360Controller=n.mapGamepadToXbox360Controller;exports.useGamepad=n.useGamepad;exports.useGeolocation=ie.useGeolocation;exports.useHash=ne.useHash;exports.isHotkeyMatch=c.isHotkeyMatch;exports.useHotkeys=c.useHotkeys;exports.useHover=ce.useHover;exports.useIdle=ae.useIdle;exports.useImage=le.useImage;exports.useInfiniteScroll=Se.useInfiniteScroll;exports.useIntersectionObserver=qe.useIntersectionObserver;exports.useInterval=de.useInterval;exports.useIsFirstRender=ge.useIsFirstRender;exports.useIsomorphicLayoutEffect=Ee.useIsomorphicLayoutEffect;exports.useKeyboard=Pe.useKeyboard;exports.useKeyPress=Te.useKeyPress;exports.useKeyPressEvent=me.useKeyPressEvent;exports.useKeysPressed=Ce.useKeysPressed;exports.useLastChanged=Re.useLastChanged;exports.useLatest=pe.useLatest;exports.useLess=ye.useLess;exports.useList=ve.useList;exports.useLocalStorage=Oe.useLocalStorage;exports.useLockCallback=Ie.useLockCallback;exports.useLogger=ke.useLogger;exports.useLongPress=De.useLongPress;exports.useMap=he.useMap;exports.useMeasure=Ae.useMeasure;exports.useMediaQuery=be.useMediaQuery;exports.useMemory=Le.useMemory;exports.useMount=Me.useMount;exports.useMouse=fe.useMouse;exports.useMutation=_e.useMutation;exports.useMutationObserver=Ne.useMutationObserver;exports.getConnection=a.getConnection;exports.useNetwork=a.useNetwork;exports.useOffsetPagination=Be.useOffsetPagination;exports.useOnce=Ke.useOnce;exports.useOnline=Fe.useOnline;exports.getOperatingSystem=l.getOperatingSystem;exports.useOperatingSystem=l.useOperatingSystem;exports.useOptimistic=Ve.useOptimistic;exports.useOrientation=Ue.useOrientation;exports.useOtpCredential=we.useOtpCredential;exports.usePageLeave=We.usePageLeave;exports.Paint=r.Paint;exports.Pointer=r.Pointer;exports.usePaint=r.usePaint;exports.useParallax=xe.useParallax;exports.usePerformanceObserver=He.usePerformanceObserver;exports.usePermission=Qe.usePermission;exports.usePointerLock=ze.usePointerLock;exports.usePostMessage=Ge.usePostMessage;exports.usePreferredColorScheme=Xe.usePreferredColorScheme;exports.usePreferredContrast=Ze.usePreferredContrast;exports.usePreferredDark=je.usePreferredDark;exports.usePreferredLanguages=Je.usePreferredLanguages;exports.usePreferredReducedMotion=Ye.usePreferredReducedMotion;exports.usePrevious=$e.usePrevious;exports.useQuery=es.useQuery;exports.useQueue=ss.useQueue;exports.useRaf=us.useRaf;exports.useRafValue=rs.useRafValue;exports.useRefState=ts.useRefState;exports.useRenderCount=os.useRenderCount;exports.useRenderInfo=is.useRenderInfo;exports.useRerender=ns.useRerender;exports.useResizeObserver=cs.useResizeObserver;exports.useScreenOrientation=as.useScreenOrientation;exports.SCRIPT_STATUS_ATTRIBUTE_NAME=S.SCRIPT_STATUS_ATTRIBUTE_NAME;exports.useScript=S.useScript;exports.useScroll=ls.useScroll;exports.useScrollIntoView=Ss.useScrollIntoView;exports.useScrollTo=qs.useScrollTo;exports.useSessionStorage=ds.useSessionStorage;exports.useSet=gs.useSet;exports.useShare=Es.useShare;exports.getSpeechRecognition=q.getSpeechRecognition;exports.useSpeechRecognition=q.useSpeechRecognition;exports.useSpeechSynthesis=Ps.useSpeechSynthesis;exports.stateHistoryReducer=d.stateHistoryReducer;exports.useStateHistory=d.useStateHistory;exports.useStep=Ts.useStep;exports.useSticky=ms.useSticky;exports.useStopwatch=Cs.useStopwatch;exports.STORAGE_EVENT=t.STORAGE_EVENT;exports.dispatchStorageEvent=t.dispatchStorageEvent;exports.useStorage=t.useStorage;exports.useTextDirection=Rs.useTextDirection;exports.getRangesSelection=g.getRangesSelection;exports.useTextSelection=g.useTextSelection;exports.useThrottleCallback=ps.useThrottleCallback;exports.useThrottleValue=ys.useThrottleValue;exports.useTime=vs.useTime;exports.useTimeout=Os.useTimeout;exports.getTimeFromSeconds=E.getTimeFromSeconds;exports.useTimer=E.useTimer;exports.useToggle=Is.useToggle;exports.useUnmount=ks.useUnmount;exports.URL_SEARCH_PARAMS_EVENT=u.URL_SEARCH_PARAMS_EVENT;exports.createQueryString=u.createQueryString;exports.dispatchUrlSearchParamsEvent=u.dispatchUrlSearchParamsEvent;exports.getUrlSearchParams=u.getUrlSearchParams;exports.useUrlSearchParam=u.useUrlSearchParam;exports.useUrlSearchParams=Ds.useUrlSearchParams;exports.useVibrate=hs.useVibrate;exports.useWakeLock=As.useWakeLock;exports.useWebSocket=bs.useWebSocket;exports.useWindowEvent=Ls.useWindowEvent;exports.useWindowFocus=Ms.useWindowFocus;exports.scrollTo=P.scrollTo;exports.useWindowScroll=P.useWindowScroll;exports.useWindowSize=fs.useWindowSize;exports.useWizard=_s.useWizard;exports.copy=T.copy;exports.legacyCopyToClipboard=T.legacyCopyToClipboard;exports.debounce=Ns.debounce;exports.getDate=Bs.getDate;exports.getElement=o.getElement;exports.target=o.target;exports.targetSymbol=o.targetSymbol;exports.getRetry=Ks.getRetry;exports.isTarget=Fs.isTarget;exports.throttle=Vs.throttle;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useState as a, useRef as v, useEffect as S } from "react";
|
|
2
|
+
const E = () => {
|
|
3
|
+
const r = /* @__PURE__ */ new Map(), b = (e, t) => {
|
|
4
|
+
r.get(e)?.forEach((n) => n(t));
|
|
5
|
+
}, c = (e, t) => {
|
|
6
|
+
const s = e, n = r.get(s);
|
|
7
|
+
n && (n.delete(t), n.size || r.delete(s));
|
|
8
|
+
}, o = (e, t) => {
|
|
9
|
+
const s = e;
|
|
10
|
+
return r.has(s) || r.set(s, /* @__PURE__ */ new Set()), r.get(e).add(t), () => {
|
|
11
|
+
c(e, t);
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
push: b,
|
|
16
|
+
subscribe: o,
|
|
17
|
+
unsubscribe: c,
|
|
18
|
+
useSubscribe: (e, t) => {
|
|
19
|
+
const [s, n] = a(void 0), u = v(t);
|
|
20
|
+
return u.current = t, S(() => {
|
|
21
|
+
const f = o(e, (i) => {
|
|
22
|
+
n(i), u.current?.(i);
|
|
23
|
+
});
|
|
24
|
+
return () => {
|
|
25
|
+
f();
|
|
26
|
+
};
|
|
27
|
+
}, [e]), s;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
E as createEventEmitter
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=createEventEmitter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEventEmitter.mjs","sources":["../../../../src/helpers/createEventEmitter/createEventEmitter.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\n/**\n * @name createEventEmitter\n * @description - Creates a type-safe event emitter\n * @category Helpers\n *\n * @template Events - The type of events and their data\n * @returns {EventEmitterApi<Events>} - Object containing event emitter methods and hook\n *\n * @example\n * const { push, subscribe, unsubscribe, useSubscribe } = createEventEmitter<{ foo: number }>();\n */\nexport const createEventEmitter = <Events extends Record<string, any> = Record<string, any>>() => {\n type ListenerMap = Map<string, Set<(data: any) => void>>;\n const listeners: ListenerMap = new Map();\n\n const push = <Event extends keyof Events>(event: Event, data: Events[Event]) => {\n const eventListeners = listeners.get(event as string);\n eventListeners?.forEach((listener) => listener(data));\n };\n\n const unsubscribe = <Key extends keyof Events>(\n event: Key,\n listener: (data: Events[Key]) => void\n ) => {\n const eventKey = event as string;\n const eventListeners = listeners.get(eventKey);\n if (!eventListeners) return;\n eventListeners.delete(listener);\n if (!eventListeners.size) listeners.delete(eventKey);\n };\n\n const subscribe = <Key extends keyof Events>(\n event: Key,\n listener: (data: Events[Key]) => void\n ) => {\n const eventKey = event as string;\n if (!listeners.has(eventKey)) listeners.set(eventKey, new Set());\n const eventListeners = listeners.get(event as string)!;\n eventListeners.add(listener);\n\n return () => {\n unsubscribe(event, listener);\n };\n };\n\n const useSubscribe = <Event extends keyof Events>(\n event: Event,\n listener?: (data: Events[Event]) => void\n ) => {\n const [data, setData] = useState<Events[Event] | undefined>(undefined);\n const listenerRef = useRef(listener);\n listenerRef.current = listener;\n\n useEffect(() => {\n const onSubscribe = (data: Events[Event]) => {\n setData(data);\n listenerRef.current?.(data);\n };\n\n const unsubscribe = subscribe(event, onSubscribe);\n return () => {\n unsubscribe();\n };\n }, [event]);\n\n return data;\n };\n\n return {\n push,\n subscribe,\n unsubscribe,\n useSubscribe\n };\n};\n"],"names":["createEventEmitter","listeners","push","event","data","listener","unsubscribe","eventKey","eventListeners","subscribe","setData","useState","listenerRef","useRef","useEffect"],"mappings":";AAaO,MAAMA,IAAqB,MAAgE;AAEhG,QAAMC,wBAA6B,IAAA,GAE7BC,IAAO,CAA6BC,GAAcC,MAAwB;AAE9E,IADuBH,EAAU,IAAIE,CAAe,GACpC,QAAQ,CAACE,MAAaA,EAASD,CAAI,CAAC;AAAA,EAAA,GAGhDE,IAAc,CAClBH,GACAE,MACG;AACH,UAAME,IAAWJ,GACXK,IAAiBP,EAAU,IAAIM,CAAQ;AAC7C,IAAKC,MACLA,EAAe,OAAOH,CAAQ,GACzBG,EAAe,QAAMP,EAAU,OAAOM,CAAQ;AAAA,EAAA,GAG/CE,IAAY,CAChBN,GACAE,MACG;AACH,UAAME,IAAWJ;AACjB,WAAKF,EAAU,IAAIM,CAAQ,OAAa,IAAIA,GAAU,oBAAI,KAAK,GACxCN,EAAU,IAAIE,CAAe,EACrC,IAAIE,CAAQ,GAEpB,MAAM;AACX,MAAAC,EAAYH,GAAOE,CAAQ;AAAA,IAAA;AAAA,EAC7B;AA0BF,SAAO;AAAA,IACL,MAAAH;AAAA,IACA,WAAAO;AAAA,IACA,aAAAH;AAAA,IACA,cA3BmB,CACnBH,GACAE,MACG;AACH,YAAM,CAACD,GAAMM,CAAO,IAAIC,EAAoC,MAAS,GAC/DC,IAAcC,EAAOR,CAAQ;AACnC,aAAAO,EAAY,UAAUP,GAEtBS,EAAU,MAAM;AAMd,cAAMR,IAAcG,EAAUN,GALV,CAACC,MAAwB;AAC3C,UAAAM,EAAQN,CAAI,GACZQ,EAAY,UAAUR,CAAI;AAAA,QAAA,CAGoB;AAChD,eAAO,MAAM;AACXE,UAAAA,EAAAA;AAAAA,QAAY;AAAA,MACd,GACC,CAACH,CAAK,CAAC,GAEHC;AAAA,IAAA;AAAA,EAOP;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStore.mjs","sources":["../../../../src/helpers/createStore/createStore.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\ntype SetStateAction<Value> = ((prev: Value) => Value) | Value;\ntype StateCreator<Value> = (\n set: (action: SetStateAction<Value>) => void,\n get: () => Value\n) => Value;\n\nexport interface StoreApi<Value> {\n getInitialState: () => Value;\n getState: () => Value;\n setState: (action: SetStateAction<Value>) => void;\n subscribe: (listener: (state: Value, prevState: Value) => void) => () => void;\n}\n\n/**\n * @name createStore\n * @description - Creates a store with state management capabilities\n * @category Helpers\n *\n * @template Value - The type of the store state\n
|
|
1
|
+
{"version":3,"file":"createStore.mjs","sources":["../../../../src/helpers/createStore/createStore.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\ntype SetStateAction<Value> = ((prev: Value) => Value) | Value;\ntype StateCreator<Value> = (\n set: (action: SetStateAction<Value>) => void,\n get: () => Value\n) => Value;\n\nexport interface StoreApi<Value> {\n getInitialState: () => Value;\n getState: () => Value;\n setState: (action: SetStateAction<Value>) => void;\n subscribe: (listener: (state: Value, prevState: Value) => void) => () => void;\n}\n\n/**\n * @name createStore\n * @description - Creates a store with state management capabilities\n * @category Helpers\n *\n * @template Value - The type of the store state\n * @param {StateCreator<Value>} createState - Function that initializes the store state\n * @returns {StoreApi<Value>} - Object containing store methods and hook for accessing state\n *\n * @example\n * const { set, get, use, subscribe } = createStore((set) => ({\n * count: 0,\n * increment: () => set(state => ({ count: state.count + 1 }))\n * }));\n */\nexport const createStore = <Value>(createState: StateCreator<Value> | Value) => {\n type Listener = (state: Value, prevState: Value) => void;\n let state: Value;\n const listeners: Set<Listener> = new Set();\n\n const setState = (action: SetStateAction<Value>) => {\n const nextState =\n typeof action === 'function' ? (action as (state: Value) => Value)(state) : action;\n\n if (!Object.is(nextState, state)) {\n const prevState = state;\n state = nextState;\n listeners.forEach((listener) => listener(state, prevState));\n }\n };\n\n const getState = () => state;\n const getInitialState = () => state;\n\n const subscribe = (listener: Listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n if (typeof createState === 'function') {\n state = (createState as StateCreator<Value>)(setState, getState);\n } else {\n state = createState;\n }\n\n const useStore = <Selected>(selector: (state: Value) => Selected) =>\n useSyncExternalStore(\n subscribe,\n () => selector(getState()),\n () => selector(getInitialState())\n );\n\n return {\n set: setState,\n get: getState,\n use: useStore,\n subscribe\n };\n};\n"],"names":["createStore","createState","state","listeners","setState","action","nextState","prevState","listener","getState","getInitialState","subscribe","selector","useSyncExternalStore"],"mappings":";AA8BO,MAAMA,IAAc,CAAQC,MAA6C;AAE9E,MAAIC;AACJ,QAAMC,wBAA+B,IAAA,GAE/BC,IAAW,CAACC,MAAkC;AAClD,UAAMC,IACJ,OAAOD,KAAW,aAAcA,EAAmCH,CAAK,IAAIG;AAE9E,QAAI,CAAC,OAAO,GAAGC,GAAWJ,CAAK,GAAG;AAChC,YAAMK,IAAYL;AAClB,MAAAA,IAAQI,GACRH,EAAU,QAAQ,CAACK,MAAaA,EAASN,GAAOK,CAAS,CAAC;AAAA,IAAA;AAAA,EAC5D,GAGIE,IAAW,MAAMP,GACjBQ,IAAkB,MAAMR,GAExBS,IAAY,CAACH,OACjBL,EAAU,IAAIK,CAAQ,GACf,MAAML,EAAU,OAAOK,CAAQ;AAExC,SAAI,OAAOP,KAAgB,aACzBC,IAASD,EAAoCG,GAAUK,CAAQ,IAE/DP,IAAQD,GAUH;AAAA,IACL,KAAKG;AAAA,IACL,KAAKK;AAAA,IACL,KAVe,CAAWG,MAC1BC;AAAA,MACEF;AAAA,MACA,MAAMC,EAASH,GAAU;AAAA,MACzB,MAAMG,EAASF,EAAA,CAAiB;AAAA,IAAA;AAAA,IAOlC,WAAAC;AAAA,EAAA;AAEJ;"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,336 +1,338 @@
|
|
|
1
1
|
import { createContext as r } from "./helpers/createContext/createContext.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import {
|
|
134
|
-
import {
|
|
135
|
-
import {
|
|
136
|
-
import {
|
|
137
|
-
import {
|
|
138
|
-
import {
|
|
139
|
-
import {
|
|
140
|
-
import {
|
|
141
|
-
import {
|
|
142
|
-
import {
|
|
143
|
-
import {
|
|
144
|
-
import {
|
|
145
|
-
import {
|
|
146
|
-
import {
|
|
147
|
-
import {
|
|
2
|
+
import { createEventEmitter as s } from "./helpers/createEventEmitter/createEventEmitter.mjs";
|
|
3
|
+
import { createReactiveContext as p } from "./helpers/createReactiveContext/createReactiveContext.mjs";
|
|
4
|
+
import { createStore as f } from "./helpers/createStore/createStore.mjs";
|
|
5
|
+
import { useActiveElement as a } from "./hooks/useActiveElement/useActiveElement.mjs";
|
|
6
|
+
import { useAsync as n } from "./hooks/useAsync/useAsync.mjs";
|
|
7
|
+
import { useBattery as l } from "./hooks/useBattery/useBattery.mjs";
|
|
8
|
+
import { useBluetooth as E } from "./hooks/useBluetooth/useBluetooth.mjs";
|
|
9
|
+
import { useBoolean as g } from "./hooks/useBoolean/useBoolean.mjs";
|
|
10
|
+
import { BREAKPOINTS_ANT_DESIGN as d, BREAKPOINTS_BOOTSTRAP_V5 as C, BREAKPOINTS_MANTINE as R, BREAKPOINTS_MASTER_CSS as I, BREAKPOINTS_MATERIAL_UI as O, BREAKPOINTS_PRIME_FLEX as y, BREAKPOINTS_QUASAR_V2 as A, BREAKPOINTS_SEMANTIC as k, BREAKPOINTS_TAILWIND as v, useBreakpoints as _ } from "./hooks/useBreakpoints/useBreakpoints.mjs";
|
|
11
|
+
import { useBrowserLanguage as D } from "./hooks/useBrowserLanguage/useBrowserLanguage.mjs";
|
|
12
|
+
import { useClickOutside as N } from "./hooks/useClickOutside/useClickOutside.mjs";
|
|
13
|
+
import { useClipboard as L } from "./hooks/useClipboard/useClipboard.mjs";
|
|
14
|
+
import { useConst as K } from "./hooks/useConst/useConst.mjs";
|
|
15
|
+
import { COOKIE_EVENT as F, dispatchCookieEvent as U, getCookie as w, getCookies as W, removeCookie as H, removeCookieItem as G, setCookie as Q, setCookieItem as z, useCookie as X } from "./hooks/useCookie/useCookie.mjs";
|
|
16
|
+
import { clearCookies as j, useCookies as q } from "./hooks/useCookies/useCookies.mjs";
|
|
17
|
+
import { useCopy as Y } from "./hooks/useCopy/useCopy.mjs";
|
|
18
|
+
import { useCounter as ee } from "./hooks/useCounter/useCounter.mjs";
|
|
19
|
+
import { useCssVar as re } from "./hooks/useCssVar/useCssVar.mjs";
|
|
20
|
+
import { useDebounceCallback as se } from "./hooks/useDebounceCallback/useDebounceCallback.mjs";
|
|
21
|
+
import { useDebounceValue as pe } from "./hooks/useDebounceValue/useDebounceValue.mjs";
|
|
22
|
+
import { useDefault as fe } from "./hooks/useDefault/useDefault.mjs";
|
|
23
|
+
import { useDeviceMotion as ae } from "./hooks/useDeviceMotion/useDeviceMotion.mjs";
|
|
24
|
+
import { useDeviceOrientation as ne } from "./hooks/useDeviceOrientation/useDeviceOrientation.mjs";
|
|
25
|
+
import { useDevicePixelRatio as le } from "./hooks/useDevicePixelRatio/useDevicePixelRatio.mjs";
|
|
26
|
+
import { useDidUpdate as Ee } from "./hooks/useDidUpdate/useDidUpdate.mjs";
|
|
27
|
+
import { useDisclosure as ge } from "./hooks/useDisclosure/useDisclosure.mjs";
|
|
28
|
+
import { useDisplayMedia as de } from "./hooks/useDisplayMedia/useDisplayMedia.mjs";
|
|
29
|
+
import { useDocumentEvent as Re } from "./hooks/useDocumentEvent/useDocumentEvent.mjs";
|
|
30
|
+
import { useDocumentTitle as Oe } from "./hooks/useDocumentTitle/useDocumentTitle.mjs";
|
|
31
|
+
import { useDocumentVisibility as Ae } from "./hooks/useDocumentVisibility/useDocumentVisibility.mjs";
|
|
32
|
+
import { useDoubleClick as ve } from "./hooks/useDoubleClick/useDoubleClick.mjs";
|
|
33
|
+
import { useDropZone as he } from "./hooks/useDropZone/useDropZone.mjs";
|
|
34
|
+
import { useElementSize as Me } from "./hooks/useElementSize/useElementSize.mjs";
|
|
35
|
+
import { useEvent as be } from "./hooks/useEvent/useEvent.mjs";
|
|
36
|
+
import { useEventListener as Be } from "./hooks/useEventListener/useEventListener.mjs";
|
|
37
|
+
import { useEventSource as Ve } from "./hooks/useEventSource/useEventSource.mjs";
|
|
38
|
+
import { useEyeDropper as Ue } from "./hooks/useEyeDropper/useEyeDropper.mjs";
|
|
39
|
+
import { useFavicon as We } from "./hooks/useFavicon/useFavicon.mjs";
|
|
40
|
+
import { useField as Ge } from "./hooks/useField/useField.mjs";
|
|
41
|
+
import { useFileDialog as ze } from "./hooks/useFileDialog/useFileDialog.mjs";
|
|
42
|
+
import { useFocus as Ze } from "./hooks/useFocus/useFocus.mjs";
|
|
43
|
+
import { useFps as qe } from "./hooks/useFps/useFps.mjs";
|
|
44
|
+
import { useFul as Ye } from "./hooks/useFul/useFul.mjs";
|
|
45
|
+
import { useFullscreen as eo } from "./hooks/useFullscreen/useFullscreen.mjs";
|
|
46
|
+
import { mapGamepadToXbox360Controller as ro, useGamepad as to } from "./hooks/useGamepad/useGamepad.mjs";
|
|
47
|
+
import { useGeolocation as mo } from "./hooks/useGeolocation/useGeolocation.mjs";
|
|
48
|
+
import { useHash as uo } from "./hooks/useHash/useHash.mjs";
|
|
49
|
+
import { isHotkeyMatch as xo, useHotkeys as ao } from "./hooks/useHotkeys/useHotkeys.mjs";
|
|
50
|
+
import { useHover as no } from "./hooks/useHover/useHover.mjs";
|
|
51
|
+
import { useIdle as lo } from "./hooks/useIdle/useIdle.mjs";
|
|
52
|
+
import { useImage as Eo } from "./hooks/useImage/useImage.mjs";
|
|
53
|
+
import { useInfiniteScroll as go } from "./hooks/useInfiniteScroll/useInfiniteScroll.mjs";
|
|
54
|
+
import { useIntersectionObserver as Co } from "./hooks/useIntersectionObserver/useIntersectionObserver.mjs";
|
|
55
|
+
import { useInterval as Io } from "./hooks/useInterval/useInterval.mjs";
|
|
56
|
+
import { useIsFirstRender as yo } from "./hooks/useIsFirstRender/useIsFirstRender.mjs";
|
|
57
|
+
import { useIsomorphicLayoutEffect as ko } from "./hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
|
|
58
|
+
import { useKeyboard as _o } from "./hooks/useKeyboard/useKeyboard.mjs";
|
|
59
|
+
import { useKeyPress as Do } from "./hooks/useKeyPress/useKeyPress.mjs";
|
|
60
|
+
import { useKeyPressEvent as No } from "./hooks/useKeyPressEvent/useKeyPressEvent.mjs";
|
|
61
|
+
import { useKeysPressed as Lo } from "./hooks/useKeysPressed/useKeysPressed.mjs";
|
|
62
|
+
import { useLastChanged as Ko } from "./hooks/useLastChanged/useLastChanged.mjs";
|
|
63
|
+
import { useLatest as Fo } from "./hooks/useLatest/useLatest.mjs";
|
|
64
|
+
import { useLess as wo } from "./hooks/useLess/useLess.mjs";
|
|
65
|
+
import { useList as Ho } from "./hooks/useList/useList.mjs";
|
|
66
|
+
import { useLocalStorage as Qo } from "./hooks/useLocalStorage/useLocalStorage.mjs";
|
|
67
|
+
import { useLockCallback as Xo } from "./hooks/useLockCallback/useLockCallback.mjs";
|
|
68
|
+
import { useLogger as jo } from "./hooks/useLogger/useLogger.mjs";
|
|
69
|
+
import { useLongPress as Jo } from "./hooks/useLongPress/useLongPress.mjs";
|
|
70
|
+
import { useMap as $o } from "./hooks/useMap/useMap.mjs";
|
|
71
|
+
import { useMeasure as or } from "./hooks/useMeasure/useMeasure.mjs";
|
|
72
|
+
import { useMediaQuery as tr } from "./hooks/useMediaQuery/useMediaQuery.mjs";
|
|
73
|
+
import { useMemory as mr } from "./hooks/useMemory/useMemory.mjs";
|
|
74
|
+
import { useMount as ur } from "./hooks/useMount/useMount.mjs";
|
|
75
|
+
import { useMouse as xr } from "./hooks/useMouse/useMouse.mjs";
|
|
76
|
+
import { useMutation as ir } from "./hooks/useMutation/useMutation.mjs";
|
|
77
|
+
import { useMutationObserver as cr } from "./hooks/useMutationObserver/useMutationObserver.mjs";
|
|
78
|
+
import { getConnection as Sr, useNetwork as Er } from "./hooks/useNetwork/useNetwork.mjs";
|
|
79
|
+
import { useOffsetPagination as gr } from "./hooks/useOffsetPagination/useOffsetPagination.mjs";
|
|
80
|
+
import { useOnce as dr } from "./hooks/useOnce/useOnce.mjs";
|
|
81
|
+
import { useOnline as Rr } from "./hooks/useOnline/useOnline.mjs";
|
|
82
|
+
import { getOperatingSystem as Or, useOperatingSystem as yr } from "./hooks/useOperatingSystem/useOperatingSystem.mjs";
|
|
83
|
+
import { useOptimistic as kr } from "./hooks/useOptimistic/useOptimistic.mjs";
|
|
84
|
+
import { useOrientation as _r } from "./hooks/useOrientation/useOrientation.mjs";
|
|
85
|
+
import { useOtpCredential as Dr } from "./hooks/useOtpCredential/useOtpCredential.mjs";
|
|
86
|
+
import { usePageLeave as Nr } from "./hooks/usePageLeave/usePageLeave.mjs";
|
|
87
|
+
import { Paint as Lr, Pointer as Br, usePaint as Kr } from "./hooks/usePaint/usePaint.mjs";
|
|
88
|
+
import { useParallax as Fr } from "./hooks/useParallax/useParallax.mjs";
|
|
89
|
+
import { usePerformanceObserver as wr } from "./hooks/usePerformanceObserver/usePerformanceObserver.mjs";
|
|
90
|
+
import { usePermission as Hr } from "./hooks/usePermission/usePermission.mjs";
|
|
91
|
+
import { usePointerLock as Qr } from "./hooks/usePointerLock/usePointerLock.mjs";
|
|
92
|
+
import { usePostMessage as Xr } from "./hooks/usePostMessage/usePostMessage.mjs";
|
|
93
|
+
import { usePreferredColorScheme as jr } from "./hooks/usePreferredColorScheme/usePreferredColorScheme.mjs";
|
|
94
|
+
import { usePreferredContrast as Jr } from "./hooks/usePreferredContrast/usePreferredContrast.mjs";
|
|
95
|
+
import { usePreferredDark as $r } from "./hooks/usePreferredDark/usePreferredDark.mjs";
|
|
96
|
+
import { usePreferredLanguages as ot } from "./hooks/usePreferredLanguages/usePreferredLanguages.mjs";
|
|
97
|
+
import { usePreferredReducedMotion as tt } from "./hooks/usePreferredReducedMotion/usePreferredReducedMotion.mjs";
|
|
98
|
+
import { usePrevious as mt } from "./hooks/usePrevious/usePrevious.mjs";
|
|
99
|
+
import { useQuery as ut } from "./hooks/useQuery/useQuery.mjs";
|
|
100
|
+
import { useQueue as xt } from "./hooks/useQueue/useQueue.mjs";
|
|
101
|
+
import { useRaf as it } from "./hooks/useRaf/useRaf.mjs";
|
|
102
|
+
import { useRafValue as ct } from "./hooks/useRafValue/useRafValue.mjs";
|
|
103
|
+
import { useRefState as St } from "./hooks/useRefState/useRefState.mjs";
|
|
104
|
+
import { useRenderCount as Tt } from "./hooks/useRenderCount/useRenderCount.mjs";
|
|
105
|
+
import { useRenderInfo as Pt } from "./hooks/useRenderInfo/useRenderInfo.mjs";
|
|
106
|
+
import { useRerender as Ct } from "./hooks/useRerender/useRerender.mjs";
|
|
107
|
+
import { useResizeObserver as It } from "./hooks/useResizeObserver/useResizeObserver.mjs";
|
|
108
|
+
import { useScreenOrientation as yt } from "./hooks/useScreenOrientation/useScreenOrientation.mjs";
|
|
109
|
+
import { SCRIPT_STATUS_ATTRIBUTE_NAME as kt, useScript as vt } from "./hooks/useScript/useScript.mjs";
|
|
110
|
+
import { useScroll as ht } from "./hooks/useScroll/useScroll.mjs";
|
|
111
|
+
import { useScrollIntoView as Mt } from "./hooks/useScrollIntoView/useScrollIntoView.mjs";
|
|
112
|
+
import { useScrollTo as bt } from "./hooks/useScrollTo/useScrollTo.mjs";
|
|
113
|
+
import { useSessionStorage as Bt } from "./hooks/useSessionStorage/useSessionStorage.mjs";
|
|
114
|
+
import { useSet as Vt } from "./hooks/useSet/useSet.mjs";
|
|
115
|
+
import { useShare as Ut } from "./hooks/useShare/useShare.mjs";
|
|
116
|
+
import { getSpeechRecognition as Wt, useSpeechRecognition as Ht } from "./hooks/useSpeechRecognition/useSpeechRecognition.mjs";
|
|
117
|
+
import { useSpeechSynthesis as Qt } from "./hooks/useSpeechSynthesis/useSpeechSynthesis.mjs";
|
|
118
|
+
import { stateHistoryReducer as Xt, useStateHistory as Zt } from "./hooks/useStateHistory/useStateHistory.mjs";
|
|
119
|
+
import { useStep as qt } from "./hooks/useStep/useStep.mjs";
|
|
120
|
+
import { useSticky as Yt } from "./hooks/useSticky/useSticky.mjs";
|
|
121
|
+
import { useStopwatch as es } from "./hooks/useStopwatch/useStopwatch.mjs";
|
|
122
|
+
import { STORAGE_EVENT as rs, dispatchStorageEvent as ts, useStorage as ss } from "./hooks/useStorage/useStorage.mjs";
|
|
123
|
+
import { useTextDirection as ps } from "./hooks/useTextDirection/useTextDirection.mjs";
|
|
124
|
+
import { getRangesSelection as fs, useTextSelection as xs } from "./hooks/useTextSelection/useTextSelection.mjs";
|
|
125
|
+
import { useThrottleCallback as is } from "./hooks/useThrottleCallback/useThrottleCallback.mjs";
|
|
126
|
+
import { useThrottleValue as cs } from "./hooks/useThrottleValue/useThrottleValue.mjs";
|
|
127
|
+
import { useTime as Ss } from "./hooks/useTime/useTime.mjs";
|
|
128
|
+
import { useTimeout as Ts } from "./hooks/useTimeout/useTimeout.mjs";
|
|
129
|
+
import { getTimeFromSeconds as Ps, useTimer as ds } from "./hooks/useTimer/useTimer.mjs";
|
|
130
|
+
import { useToggle as Rs } from "./hooks/useToggle/useToggle.mjs";
|
|
131
|
+
import { useUnmount as Os } from "./hooks/useUnmount/useUnmount.mjs";
|
|
132
|
+
import { URL_SEARCH_PARAMS_EVENT as As, createQueryString as ks, dispatchUrlSearchParamsEvent as vs, getUrlSearchParams as _s, useUrlSearchParam as hs } from "./hooks/useUrlSearchParam/useUrlSearchParam.mjs";
|
|
133
|
+
import { useUrlSearchParams as Ms } from "./hooks/useUrlSearchParams/useUrlSearchParams.mjs";
|
|
134
|
+
import { useVibrate as bs } from "./hooks/useVibrate/useVibrate.mjs";
|
|
135
|
+
import { useWakeLock as Bs } from "./hooks/useWakeLock/useWakeLock.mjs";
|
|
136
|
+
import { useWebSocket as Vs } from "./hooks/useWebSocket/useWebSocket.mjs";
|
|
137
|
+
import { useWindowEvent as Us } from "./hooks/useWindowEvent/useWindowEvent.mjs";
|
|
138
|
+
import { useWindowFocus as Ws } from "./hooks/useWindowFocus/useWindowFocus.mjs";
|
|
139
|
+
import { scrollTo as Gs, useWindowScroll as Qs } from "./hooks/useWindowScroll/useWindowScroll.mjs";
|
|
140
|
+
import { useWindowSize as Xs } from "./hooks/useWindowSize/useWindowSize.mjs";
|
|
141
|
+
import { useWizard as js } from "./hooks/useWizard/useWizard.mjs";
|
|
142
|
+
import { copy as Js, legacyCopyToClipboard as Ys } from "./utils/helpers/copy.mjs";
|
|
143
|
+
import { debounce as em } from "./utils/helpers/debounce.mjs";
|
|
144
|
+
import { getDate as rm } from "./utils/helpers/getDate.mjs";
|
|
145
|
+
import { getElement as sm, target as mm, targetSymbol as pm } from "./utils/helpers/getElement.mjs";
|
|
146
|
+
import { getRetry as fm } from "./utils/helpers/getRetry.mjs";
|
|
147
|
+
import { isTarget as am } from "./utils/helpers/isTarget.mjs";
|
|
148
|
+
import { throttle as nm } from "./utils/helpers/throttle.mjs";
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
150
|
+
d as BREAKPOINTS_ANT_DESIGN,
|
|
151
|
+
C as BREAKPOINTS_BOOTSTRAP_V5,
|
|
152
|
+
R as BREAKPOINTS_MANTINE,
|
|
153
|
+
I as BREAKPOINTS_MASTER_CSS,
|
|
154
|
+
O as BREAKPOINTS_MATERIAL_UI,
|
|
155
|
+
y as BREAKPOINTS_PRIME_FLEX,
|
|
156
|
+
A as BREAKPOINTS_QUASAR_V2,
|
|
157
|
+
k as BREAKPOINTS_SEMANTIC,
|
|
158
|
+
v as BREAKPOINTS_TAILWIND,
|
|
159
|
+
F as COOKIE_EVENT,
|
|
160
|
+
Lr as Paint,
|
|
161
|
+
Br as Pointer,
|
|
162
|
+
kt as SCRIPT_STATUS_ATTRIBUTE_NAME,
|
|
163
|
+
rs as STORAGE_EVENT,
|
|
164
|
+
As as URL_SEARCH_PARAMS_EVENT,
|
|
165
|
+
j as clearCookies,
|
|
166
|
+
Js as copy,
|
|
166
167
|
r as createContext,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
p as
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
rm as
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
a as
|
|
200
|
-
n as
|
|
201
|
-
l as
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
_ as
|
|
205
|
-
D as
|
|
206
|
-
N as
|
|
207
|
-
L as
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
q as
|
|
211
|
-
Y as
|
|
212
|
-
ee as
|
|
213
|
-
re as
|
|
214
|
-
se as
|
|
215
|
-
pe as
|
|
216
|
-
fe as
|
|
217
|
-
ae as
|
|
218
|
-
ne as
|
|
219
|
-
le as
|
|
220
|
-
|
|
221
|
-
ge as
|
|
222
|
-
de as
|
|
223
|
-
Re as
|
|
224
|
-
Oe as
|
|
225
|
-
Ae as
|
|
226
|
-
ve as
|
|
227
|
-
he as
|
|
228
|
-
Me as
|
|
229
|
-
be as
|
|
230
|
-
Be as
|
|
231
|
-
Ve as
|
|
232
|
-
Ue as
|
|
233
|
-
We as
|
|
234
|
-
Ge as
|
|
235
|
-
ze as
|
|
236
|
-
Ze as
|
|
237
|
-
qe as
|
|
238
|
-
Ye as
|
|
239
|
-
|
|
240
|
-
to as
|
|
241
|
-
mo as
|
|
242
|
-
|
|
243
|
-
ao as
|
|
244
|
-
no as
|
|
245
|
-
lo as
|
|
246
|
-
|
|
247
|
-
go as
|
|
248
|
-
Co as
|
|
249
|
-
Io as
|
|
250
|
-
yo as
|
|
251
|
-
|
|
252
|
-
Do as
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
Lo as
|
|
256
|
-
Ko as
|
|
257
|
-
Fo as
|
|
258
|
-
wo as
|
|
259
|
-
Ho as
|
|
260
|
-
Qo as
|
|
261
|
-
Xo as
|
|
262
|
-
jo as
|
|
263
|
-
Jo as
|
|
264
|
-
$o as
|
|
265
|
-
or as
|
|
266
|
-
tr as
|
|
267
|
-
mr as
|
|
268
|
-
ur as
|
|
269
|
-
xr as
|
|
270
|
-
ir as
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
gr as
|
|
274
|
-
dr as
|
|
275
|
-
|
|
276
|
-
yr as
|
|
277
|
-
kr as
|
|
278
|
-
_r as
|
|
279
|
-
Dr as
|
|
280
|
-
|
|
281
|
-
Kr as
|
|
282
|
-
Fr as
|
|
283
|
-
wr as
|
|
284
|
-
Hr as
|
|
285
|
-
Qr as
|
|
286
|
-
Xr as
|
|
287
|
-
jr as
|
|
288
|
-
Jr as
|
|
289
|
-
$r as
|
|
290
|
-
ot as
|
|
291
|
-
tt as
|
|
292
|
-
mt as
|
|
293
|
-
ut as
|
|
294
|
-
xt as
|
|
295
|
-
it as
|
|
296
|
-
ct as
|
|
297
|
-
St as
|
|
298
|
-
|
|
299
|
-
Pt as
|
|
300
|
-
Ct as
|
|
301
|
-
It as
|
|
302
|
-
|
|
303
|
-
vt as
|
|
304
|
-
ht as
|
|
305
|
-
Mt as
|
|
306
|
-
bt as
|
|
307
|
-
Bt as
|
|
308
|
-
Vt as
|
|
309
|
-
|
|
310
|
-
Ht as
|
|
311
|
-
|
|
312
|
-
Zt as
|
|
313
|
-
qt as
|
|
314
|
-
Yt as
|
|
315
|
-
|
|
316
|
-
ss as
|
|
317
|
-
|
|
318
|
-
xs as
|
|
319
|
-
is as
|
|
320
|
-
cs as
|
|
321
|
-
Ss as
|
|
322
|
-
|
|
323
|
-
ds as
|
|
324
|
-
Rs as
|
|
325
|
-
|
|
326
|
-
hs as
|
|
327
|
-
Ms as
|
|
328
|
-
bs as
|
|
329
|
-
Bs as
|
|
330
|
-
Vs as
|
|
331
|
-
Us as
|
|
332
|
-
|
|
333
|
-
Qs as
|
|
334
|
-
Xs as
|
|
168
|
+
s as createEventEmitter,
|
|
169
|
+
ks as createQueryString,
|
|
170
|
+
p as createReactiveContext,
|
|
171
|
+
f as createStore,
|
|
172
|
+
em as debounce,
|
|
173
|
+
U as dispatchCookieEvent,
|
|
174
|
+
ts as dispatchStorageEvent,
|
|
175
|
+
vs as dispatchUrlSearchParamsEvent,
|
|
176
|
+
Sr as getConnection,
|
|
177
|
+
w as getCookie,
|
|
178
|
+
W as getCookies,
|
|
179
|
+
rm as getDate,
|
|
180
|
+
sm as getElement,
|
|
181
|
+
Or as getOperatingSystem,
|
|
182
|
+
fs as getRangesSelection,
|
|
183
|
+
fm as getRetry,
|
|
184
|
+
Wt as getSpeechRecognition,
|
|
185
|
+
Ps as getTimeFromSeconds,
|
|
186
|
+
_s as getUrlSearchParams,
|
|
187
|
+
xo as isHotkeyMatch,
|
|
188
|
+
am as isTarget,
|
|
189
|
+
Ys as legacyCopyToClipboard,
|
|
190
|
+
ro as mapGamepadToXbox360Controller,
|
|
191
|
+
H as removeCookie,
|
|
192
|
+
G as removeCookieItem,
|
|
193
|
+
Gs as scrollTo,
|
|
194
|
+
Q as setCookie,
|
|
195
|
+
z as setCookieItem,
|
|
196
|
+
Xt as stateHistoryReducer,
|
|
197
|
+
mm as target,
|
|
198
|
+
pm as targetSymbol,
|
|
199
|
+
nm as throttle,
|
|
200
|
+
a as useActiveElement,
|
|
201
|
+
n as useAsync,
|
|
202
|
+
l as useBattery,
|
|
203
|
+
E as useBluetooth,
|
|
204
|
+
g as useBoolean,
|
|
205
|
+
_ as useBreakpoints,
|
|
206
|
+
D as useBrowserLanguage,
|
|
207
|
+
N as useClickOutside,
|
|
208
|
+
L as useClipboard,
|
|
209
|
+
K as useConst,
|
|
210
|
+
X as useCookie,
|
|
211
|
+
q as useCookies,
|
|
212
|
+
Y as useCopy,
|
|
213
|
+
ee as useCounter,
|
|
214
|
+
re as useCssVar,
|
|
215
|
+
se as useDebounceCallback,
|
|
216
|
+
pe as useDebounceValue,
|
|
217
|
+
fe as useDefault,
|
|
218
|
+
ae as useDeviceMotion,
|
|
219
|
+
ne as useDeviceOrientation,
|
|
220
|
+
le as useDevicePixelRatio,
|
|
221
|
+
Ee as useDidUpdate,
|
|
222
|
+
ge as useDisclosure,
|
|
223
|
+
de as useDisplayMedia,
|
|
224
|
+
Re as useDocumentEvent,
|
|
225
|
+
Oe as useDocumentTitle,
|
|
226
|
+
Ae as useDocumentVisibility,
|
|
227
|
+
ve as useDoubleClick,
|
|
228
|
+
he as useDropZone,
|
|
229
|
+
Me as useElementSize,
|
|
230
|
+
be as useEvent,
|
|
231
|
+
Be as useEventListener,
|
|
232
|
+
Ve as useEventSource,
|
|
233
|
+
Ue as useEyeDropper,
|
|
234
|
+
We as useFavicon,
|
|
235
|
+
Ge as useField,
|
|
236
|
+
ze as useFileDialog,
|
|
237
|
+
Ze as useFocus,
|
|
238
|
+
qe as useFps,
|
|
239
|
+
Ye as useFul,
|
|
240
|
+
eo as useFullscreen,
|
|
241
|
+
to as useGamepad,
|
|
242
|
+
mo as useGeolocation,
|
|
243
|
+
uo as useHash,
|
|
244
|
+
ao as useHotkeys,
|
|
245
|
+
no as useHover,
|
|
246
|
+
lo as useIdle,
|
|
247
|
+
Eo as useImage,
|
|
248
|
+
go as useInfiniteScroll,
|
|
249
|
+
Co as useIntersectionObserver,
|
|
250
|
+
Io as useInterval,
|
|
251
|
+
yo as useIsFirstRender,
|
|
252
|
+
ko as useIsomorphicLayoutEffect,
|
|
253
|
+
Do as useKeyPress,
|
|
254
|
+
No as useKeyPressEvent,
|
|
255
|
+
_o as useKeyboard,
|
|
256
|
+
Lo as useKeysPressed,
|
|
257
|
+
Ko as useLastChanged,
|
|
258
|
+
Fo as useLatest,
|
|
259
|
+
wo as useLess,
|
|
260
|
+
Ho as useList,
|
|
261
|
+
Qo as useLocalStorage,
|
|
262
|
+
Xo as useLockCallback,
|
|
263
|
+
jo as useLogger,
|
|
264
|
+
Jo as useLongPress,
|
|
265
|
+
$o as useMap,
|
|
266
|
+
or as useMeasure,
|
|
267
|
+
tr as useMediaQuery,
|
|
268
|
+
mr as useMemory,
|
|
269
|
+
ur as useMount,
|
|
270
|
+
xr as useMouse,
|
|
271
|
+
ir as useMutation,
|
|
272
|
+
cr as useMutationObserver,
|
|
273
|
+
Er as useNetwork,
|
|
274
|
+
gr as useOffsetPagination,
|
|
275
|
+
dr as useOnce,
|
|
276
|
+
Rr as useOnline,
|
|
277
|
+
yr as useOperatingSystem,
|
|
278
|
+
kr as useOptimistic,
|
|
279
|
+
_r as useOrientation,
|
|
280
|
+
Dr as useOtpCredential,
|
|
281
|
+
Nr as usePageLeave,
|
|
282
|
+
Kr as usePaint,
|
|
283
|
+
Fr as useParallax,
|
|
284
|
+
wr as usePerformanceObserver,
|
|
285
|
+
Hr as usePermission,
|
|
286
|
+
Qr as usePointerLock,
|
|
287
|
+
Xr as usePostMessage,
|
|
288
|
+
jr as usePreferredColorScheme,
|
|
289
|
+
Jr as usePreferredContrast,
|
|
290
|
+
$r as usePreferredDark,
|
|
291
|
+
ot as usePreferredLanguages,
|
|
292
|
+
tt as usePreferredReducedMotion,
|
|
293
|
+
mt as usePrevious,
|
|
294
|
+
ut as useQuery,
|
|
295
|
+
xt as useQueue,
|
|
296
|
+
it as useRaf,
|
|
297
|
+
ct as useRafValue,
|
|
298
|
+
St as useRefState,
|
|
299
|
+
Tt as useRenderCount,
|
|
300
|
+
Pt as useRenderInfo,
|
|
301
|
+
Ct as useRerender,
|
|
302
|
+
It as useResizeObserver,
|
|
303
|
+
yt as useScreenOrientation,
|
|
304
|
+
vt as useScript,
|
|
305
|
+
ht as useScroll,
|
|
306
|
+
Mt as useScrollIntoView,
|
|
307
|
+
bt as useScrollTo,
|
|
308
|
+
Bt as useSessionStorage,
|
|
309
|
+
Vt as useSet,
|
|
310
|
+
Ut as useShare,
|
|
311
|
+
Ht as useSpeechRecognition,
|
|
312
|
+
Qt as useSpeechSynthesis,
|
|
313
|
+
Zt as useStateHistory,
|
|
314
|
+
qt as useStep,
|
|
315
|
+
Yt as useSticky,
|
|
316
|
+
es as useStopwatch,
|
|
317
|
+
ss as useStorage,
|
|
318
|
+
ps as useTextDirection,
|
|
319
|
+
xs as useTextSelection,
|
|
320
|
+
is as useThrottleCallback,
|
|
321
|
+
cs as useThrottleValue,
|
|
322
|
+
Ss as useTime,
|
|
323
|
+
Ts as useTimeout,
|
|
324
|
+
ds as useTimer,
|
|
325
|
+
Rs as useToggle,
|
|
326
|
+
Os as useUnmount,
|
|
327
|
+
hs as useUrlSearchParam,
|
|
328
|
+
Ms as useUrlSearchParams,
|
|
329
|
+
bs as useVibrate,
|
|
330
|
+
Bs as useWakeLock,
|
|
331
|
+
Vs as useWebSocket,
|
|
332
|
+
Us as useWindowEvent,
|
|
333
|
+
Ws as useWindowFocus,
|
|
334
|
+
Qs as useWindowScroll,
|
|
335
|
+
Xs as useWindowSize,
|
|
336
|
+
js as useWizard
|
|
335
337
|
};
|
|
336
338
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name createEventEmitter
|
|
3
|
+
* @description - Creates a type-safe event emitter
|
|
4
|
+
* @category Helpers
|
|
5
|
+
*
|
|
6
|
+
* @template Events - The type of events and their data
|
|
7
|
+
* @returns {EventEmitterApi<Events>} - Object containing event emitter methods and hook
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const { push, subscribe, unsubscribe, useSubscribe } = createEventEmitter<{ foo: number }>();
|
|
11
|
+
*/
|
|
12
|
+
export declare const createEventEmitter: <Events extends Record<string, any> = Record<string, any>>() => {
|
|
13
|
+
push: <Event extends keyof Events>(event: Event, data: Events[Event]) => void;
|
|
14
|
+
subscribe: <Key extends keyof Events>(event: Key, listener: (data: Events[Key]) => void) => () => void;
|
|
15
|
+
unsubscribe: <Key extends keyof Events>(event: Key, listener: (data: Events[Key]) => void) => void;
|
|
16
|
+
useSubscribe: <Event extends keyof Events>(event: Event, listener?: (data: Events[Event]) => void) => Events[Event] | undefined;
|
|
17
|
+
};
|
|
@@ -12,7 +12,6 @@ export interface StoreApi<Value> {
|
|
|
12
12
|
* @category Helpers
|
|
13
13
|
*
|
|
14
14
|
* @template Value - The type of the store state
|
|
15
|
-
*
|
|
16
15
|
* @param {StateCreator<Value>} createState - Function that initializes the store state
|
|
17
16
|
* @returns {StoreApi<Value>} - Object containing store methods and hook for accessing state
|
|
18
17
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siberiacancode/reactuse",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "The ultimate collection of react hooks",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SIBERIA CAN CODE 🧊",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"react": "^19.1.0",
|
|
77
77
|
"react-dom": "^19.1.0",
|
|
78
78
|
"shx": "^0.4.0",
|
|
79
|
-
"vite": "^7.0.
|
|
79
|
+
"vite": "^7.0.2",
|
|
80
80
|
"vite-plugin-dts": "^4.5.4",
|
|
81
81
|
"vitest": "^3.2.4"
|
|
82
82
|
},
|