diff --git a/package.json b/package.json index 2be1ef18..3246bc8b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "scripts": { "cli:build": "pnpm --filter @siberiacancode/cli build && pnpm --filter @siberiacancode/cli generate-registry", "cli:build:registry": "pnpm --filter useverse build:registry", - "docs:build": "pnpm --filter @siberiacancode/docs build", + "docs:build": "pnpm --filter @siberiacancode/docs build & pnpm format", "core:build:js": "pnpm --filter @siberiacancode/reactuse build:js", "lint": "pnpm --recursive lint", "format": "prettier --write .", diff --git a/packages/docs-v2/.source/demo.tsx b/packages/docs-v2/.source/demo.tsx new file mode 100644 index 00000000..f60dc41b --- /dev/null +++ b/packages/docs-v2/.source/demo.tsx @@ -0,0 +1,1270 @@ +// @ts-nocheck +// This file is autogenerated by scripts/build-examples.ts +// Do not edit this file directly. +import * as React from "react" + +export const ExamplesIndex: Record> = { + "useActiveElement": { + name: "useActiveElement", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useActiveElement/useActiveElement.demo.tsx") + return { default: mod.default } + }), + }, + + "useAsync": { + name: "useAsync", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useAsync/useAsync.demo.tsx") + return { default: mod.default } + }), + }, + + "useAsyncEffect": { + name: "useAsyncEffect", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useAsyncEffect/useAsyncEffect.demo.tsx") + return { default: mod.default } + }), + }, + + "useAudio": { + name: "useAudio", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useAudio/useAudio.demo.tsx") + return { default: mod.default } + }), + }, + + "useAutoScroll": { + name: "useAutoScroll", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useAutoScroll/useAutoScroll.demo.tsx") + return { default: mod.default } + }), + }, + + "useBatchedCallback": { + name: "useBatchedCallback", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useBatchedCallback/useBatchedCallback.demo.tsx") + return { default: mod.default } + }), + }, + + "useBattery": { + name: "useBattery", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useBattery/useBattery.demo.tsx") + return { default: mod.default } + }), + }, + + "useBluetooth": { + name: "useBluetooth", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useBluetooth/useBluetooth.demo.tsx") + return { default: mod.default } + }), + }, + + "useBoolean": { + name: "useBoolean", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useBoolean/useBoolean.demo.tsx") + return { default: mod.default } + }), + }, + + "useBreakpoints": { + name: "useBreakpoints", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useBreakpoints/useBreakpoints.demo.tsx") + return { default: mod.default } + }), + }, + + "useBroadcastChannel": { + name: "useBroadcastChannel", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useBroadcastChannel/useBroadcastChannel.demo.tsx") + return { default: mod.default } + }), + }, + + "useBrowserLanguage": { + name: "useBrowserLanguage", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useBrowserLanguage/useBrowserLanguage.demo.tsx") + return { default: mod.default } + }), + }, + + "useClickOutside": { + name: "useClickOutside", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useClickOutside/useClickOutside.demo.tsx") + return { default: mod.default } + }), + }, + + "useClipboard": { + name: "useClipboard", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useClipboard/useClipboard.demo.tsx") + return { default: mod.default } + }), + }, + + "useConst": { + name: "useConst", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useConst/useConst.demo.tsx") + return { default: mod.default } + }), + }, + + "useControllableState": { + name: "useControllableState", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useControllableState/useControllableState.demo.tsx") + return { default: mod.default } + }), + }, + + "useCookie": { + name: "useCookie", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useCookie/useCookie.demo.tsx") + return { default: mod.default } + }), + }, + + "useCookies": { + name: "useCookies", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useCookies/useCookies.demo.tsx") + return { default: mod.default } + }), + }, + + "useCopy": { + name: "useCopy", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useCopy/useCopy.demo.tsx") + return { default: mod.default } + }), + }, + + "useCounter": { + name: "useCounter", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useCounter/useCounter.demo.tsx") + return { default: mod.default } + }), + }, + + "useCssVar": { + name: "useCssVar", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useCssVar/useCssVar.demo.tsx") + return { default: mod.default } + }), + }, + + "useDebounceCallback": { + name: "useDebounceCallback", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDebounceCallback/useDebounceCallback.demo.tsx") + return { default: mod.default } + }), + }, + + "useDebounceEffect": { + name: "useDebounceEffect", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDebounceEffect/useDebounceEffect.demo.tsx") + return { default: mod.default } + }), + }, + + "useDebounceState": { + name: "useDebounceState", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDebounceState/useDebounceState.demo.tsx") + return { default: mod.default } + }), + }, + + "useDebounceValue": { + name: "useDebounceValue", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDebounceValue/useDebounceValue.demo.tsx") + return { default: mod.default } + }), + }, + + "useDefault": { + name: "useDefault", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDefault/useDefault.demo.tsx") + return { default: mod.default } + }), + }, + + "useDeviceMotion": { + name: "useDeviceMotion", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDeviceMotion/useDeviceMotion.demo.tsx") + return { default: mod.default } + }), + }, + + "useDeviceOrientation": { + name: "useDeviceOrientation", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDeviceOrientation/useDeviceOrientation.demo.tsx") + return { default: mod.default } + }), + }, + + "useDevicePixelRatio": { + name: "useDevicePixelRatio", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDevicePixelRatio/useDevicePixelRatio.demo.tsx") + return { default: mod.default } + }), + }, + + "useDidUpdate": { + name: "useDidUpdate", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDidUpdate/useDidUpdate.demo.tsx") + return { default: mod.default } + }), + }, + + "useDisclosure": { + name: "useDisclosure", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDisclosure/useDisclosure.demo.tsx") + return { default: mod.default } + }), + }, + + "useDisplayMedia": { + name: "useDisplayMedia", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDisplayMedia/useDisplayMedia.demo.tsx") + return { default: mod.default } + }), + }, + + "useDocumentEvent": { + name: "useDocumentEvent", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDocumentEvent/useDocumentEvent.demo.tsx") + return { default: mod.default } + }), + }, + + "useDocumentTitle": { + name: "useDocumentTitle", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDocumentTitle/useDocumentTitle.demo.tsx") + return { default: mod.default } + }), + }, + + "useDocumentVisibility": { + name: "useDocumentVisibility", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDocumentVisibility/useDocumentVisibility.demo.tsx") + return { default: mod.default } + }), + }, + + "useDoubleClick": { + name: "useDoubleClick", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDoubleClick/useDoubleClick.demo.tsx") + return { default: mod.default } + }), + }, + + "useDropZone": { + name: "useDropZone", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useDropZone/useDropZone.demo.tsx") + return { default: mod.default } + }), + }, + + "useEvent": { + name: "useEvent", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useEvent/useEvent.demo.tsx") + return { default: mod.default } + }), + }, + + "useEventListener": { + name: "useEventListener", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useEventListener/useEventListener.demo.tsx") + return { default: mod.default } + }), + }, + + "useEventSource": { + name: "useEventSource", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useEventSource/useEventSource.demo.tsx") + return { default: mod.default } + }), + }, + + "useEyeDropper": { + name: "useEyeDropper", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useEyeDropper/useEyeDropper.demo.tsx") + return { default: mod.default } + }), + }, + + "useFavicon": { + name: "useFavicon", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useFavicon/useFavicon.demo.tsx") + return { default: mod.default } + }), + }, + + "useField": { + name: "useField", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useField/useField.demo.tsx") + return { default: mod.default } + }), + }, + + "useFileDialog": { + name: "useFileDialog", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useFileDialog/useFileDialog.demo.tsx") + return { default: mod.default } + }), + }, + + "useFocus": { + name: "useFocus", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useFocus/useFocus.demo.tsx") + return { default: mod.default } + }), + }, + + "useFocusTrap": { + name: "useFocusTrap", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useFocusTrap/useFocusTrap.demo.tsx") + return { default: mod.default } + }), + }, + + "useFps": { + name: "useFps", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useFps/useFps.demo.tsx") + return { default: mod.default } + }), + }, + + "useFul": { + name: "useFul", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useFul/useFul.demo.tsx") + return { default: mod.default } + }), + }, + + "useFullscreen": { + name: "useFullscreen", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useFullscreen/useFullscreen.demo.tsx") + return { default: mod.default } + }), + }, + + "useGamepad": { + name: "useGamepad", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useGamepad/useGamepad.demo.tsx") + return { default: mod.default } + }), + }, + + "useGeolocation": { + name: "useGeolocation", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useGeolocation/useGeolocation.demo.tsx") + return { default: mod.default } + }), + }, + + "useHash": { + name: "useHash", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useHash/useHash.demo.tsx") + return { default: mod.default } + }), + }, + + "useHotkeys": { + name: "useHotkeys", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useHotkeys/useHotkeys.demo.tsx") + return { default: mod.default } + }), + }, + + "useHover": { + name: "useHover", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useHover/useHover.demo.tsx") + return { default: mod.default } + }), + }, + + "useIdle": { + name: "useIdle", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useIdle/useIdle.demo.tsx") + return { default: mod.default } + }), + }, + + "useImage": { + name: "useImage", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useImage/useImage.demo.tsx") + return { default: mod.default } + }), + }, + + "useInfiniteScroll": { + name: "useInfiniteScroll", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useInfiniteScroll/useInfiniteScroll.demo.tsx") + return { default: mod.default } + }), + }, + + "useIntersectionObserver": { + name: "useIntersectionObserver", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useIntersectionObserver/useIntersectionObserver.demo.tsx") + return { default: mod.default } + }), + }, + + "useInterval": { + name: "useInterval", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useInterval/useInterval.demo.tsx") + return { default: mod.default } + }), + }, + + "useIsFirstRender": { + name: "useIsFirstRender", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useIsFirstRender/useIsFirstRender.demo.tsx") + return { default: mod.default } + }), + }, + + "useIsomorphicLayoutEffect": { + name: "useIsomorphicLayoutEffect", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.demo.tsx") + return { default: mod.default } + }), + }, + + "useKeyPress": { + name: "useKeyPress", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useKeyPress/useKeyPress.demo.tsx") + return { default: mod.default } + }), + }, + + "useKeyPressEvent": { + name: "useKeyPressEvent", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useKeyPressEvent/useKeyPressEvent.demo.tsx") + return { default: mod.default } + }), + }, + + "useKeyboard": { + name: "useKeyboard", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useKeyboard/useKeyboard.demo.tsx") + return { default: mod.default } + }), + }, + + "useKeysPressed": { + name: "useKeysPressed", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useKeysPressed/useKeysPressed.demo.tsx") + return { default: mod.default } + }), + }, + + "useLastChanged": { + name: "useLastChanged", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useLastChanged/useLastChanged.demo.tsx") + return { default: mod.default } + }), + }, + + "useLatest": { + name: "useLatest", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useLatest/useLatest.demo.tsx") + return { default: mod.default } + }), + }, + + "useLess": { + name: "useLess", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useLess/useLess.demo.tsx") + return { default: mod.default } + }), + }, + + "useList": { + name: "useList", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useList/useList.demo.tsx") + return { default: mod.default } + }), + }, + + "useLocalStorage": { + name: "useLocalStorage", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useLocalStorage/useLocalStorage.demo.tsx") + return { default: mod.default } + }), + }, + + "useLockCallback": { + name: "useLockCallback", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useLockCallback/useLockCallback.demo.tsx") + return { default: mod.default } + }), + }, + + "useLockScroll": { + name: "useLockScroll", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useLockScroll/useLockScroll.demo.tsx") + return { default: mod.default } + }), + }, + + "useLogger": { + name: "useLogger", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useLogger/useLogger.demo.tsx") + return { default: mod.default } + }), + }, + + "useLongPress": { + name: "useLongPress", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useLongPress/useLongPress.demo.tsx") + return { default: mod.default } + }), + }, + + "useMap": { + name: "useMap", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMap/useMap.demo.tsx") + return { default: mod.default } + }), + }, + + "useMeasure": { + name: "useMeasure", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMeasure/useMeasure.demo.tsx") + return { default: mod.default } + }), + }, + + "useMediaControls": { + name: "useMediaControls", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMediaControls/useMediaControls.demo.tsx") + return { default: mod.default } + }), + }, + + "useMediaQuery": { + name: "useMediaQuery", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMediaQuery/useMediaQuery.demo.tsx") + return { default: mod.default } + }), + }, + + "useMemory": { + name: "useMemory", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMemory/useMemory.demo.tsx") + return { default: mod.default } + }), + }, + + "useMergedRef": { + name: "useMergedRef", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMergedRef/useMergedRef.demo.tsx") + return { default: mod.default } + }), + }, + + "useMount": { + name: "useMount", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMount/useMount.demo.tsx") + return { default: mod.default } + }), + }, + + "useMouse": { + name: "useMouse", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMouse/useMouse.demo.tsx") + return { default: mod.default } + }), + }, + + "useMutation": { + name: "useMutation", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMutation/useMutation.demo.tsx") + return { default: mod.default } + }), + }, + + "useMutationObserver": { + name: "useMutationObserver", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useMutationObserver/useMutationObserver.demo.tsx") + return { default: mod.default } + }), + }, + + "useNetwork": { + name: "useNetwork", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useNetwork/useNetwork.demo.tsx") + return { default: mod.default } + }), + }, + + "useObject": { + name: "useObject", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useObject/useObject.demo.tsx") + return { default: mod.default } + }), + }, + + "useOffsetPagination": { + name: "useOffsetPagination", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useOffsetPagination/useOffsetPagination.demo.tsx") + return { default: mod.default } + }), + }, + + "useOnce": { + name: "useOnce", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useOnce/useOnce.demo.tsx") + return { default: mod.default } + }), + }, + + "useOnline": { + name: "useOnline", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useOnline/useOnline.demo.tsx") + return { default: mod.default } + }), + }, + + "useOperatingSystem": { + name: "useOperatingSystem", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useOperatingSystem/useOperatingSystem.demo.tsx") + return { default: mod.default } + }), + }, + + "useOptimistic": { + name: "useOptimistic", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useOptimistic/useOptimistic.demo.tsx") + return { default: mod.default } + }), + }, + + "useOrientation": { + name: "useOrientation", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useOrientation/useOrientation.demo.tsx") + return { default: mod.default } + }), + }, + + "useOtpCredential": { + name: "useOtpCredential", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useOtpCredential/useOtpCredential.demo.tsx") + return { default: mod.default } + }), + }, + + "usePageLeave": { + name: "usePageLeave", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePageLeave/usePageLeave.demo.tsx") + return { default: mod.default } + }), + }, + + "usePaint": { + name: "usePaint", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePaint/usePaint.demo.tsx") + return { default: mod.default } + }), + }, + + "useParallax": { + name: "useParallax", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useParallax/useParallax.demo.tsx") + return { default: mod.default } + }), + }, + + "usePerformanceObserver": { + name: "usePerformanceObserver", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePerformanceObserver/usePerformanceObserver.demo.tsx") + return { default: mod.default } + }), + }, + + "usePermission": { + name: "usePermission", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePermission/usePermission.demo.tsx") + return { default: mod.default } + }), + }, + + "usePictureInPicture": { + name: "usePictureInPicture", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePictureInPicture/usePictureInPicture.demo.tsx") + return { default: mod.default } + }), + }, + + "usePointerLock": { + name: "usePointerLock", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePointerLock/usePointerLock.demo.tsx") + return { default: mod.default } + }), + }, + + "usePostMessage": { + name: "usePostMessage", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePostMessage/usePostMessage.demo.tsx") + return { default: mod.default } + }), + }, + + "usePreferredColorScheme": { + name: "usePreferredColorScheme", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePreferredColorScheme/usePreferredColorScheme.demo.tsx") + return { default: mod.default } + }), + }, + + "usePreferredContrast": { + name: "usePreferredContrast", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePreferredContrast/usePreferredContrast.demo.tsx") + return { default: mod.default } + }), + }, + + "usePreferredDark": { + name: "usePreferredDark", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePreferredDark/usePreferredDark.demo.tsx") + return { default: mod.default } + }), + }, + + "usePreferredLanguages": { + name: "usePreferredLanguages", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePreferredLanguages/usePreferredLanguages.demo.tsx") + return { default: mod.default } + }), + }, + + "usePreferredReducedMotion": { + name: "usePreferredReducedMotion", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePreferredReducedMotion/usePreferredReducedMotion.demo.tsx") + return { default: mod.default } + }), + }, + + "usePrevious": { + name: "usePrevious", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/usePrevious/usePrevious.demo.tsx") + return { default: mod.default } + }), + }, + + "useProgress": { + name: "useProgress", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useProgress/useProgress.demo.tsx") + return { default: mod.default } + }), + }, + + "useQuery": { + name: "useQuery", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useQuery/useQuery.demo.tsx") + return { default: mod.default } + }), + }, + + "useQueue": { + name: "useQueue", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useQueue/useQueue.demo.tsx") + return { default: mod.default } + }), + }, + + "useRaf": { + name: "useRaf", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useRaf/useRaf.demo.tsx") + return { default: mod.default } + }), + }, + + "useRafState": { + name: "useRafState", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useRafState/useRafState.demo.tsx") + return { default: mod.default } + }), + }, + + "useRefState": { + name: "useRefState", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useRefState/useRefState.demo.tsx") + return { default: mod.default } + }), + }, + + "useRenderCount": { + name: "useRenderCount", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useRenderCount/useRenderCount.demo.tsx") + return { default: mod.default } + }), + }, + + "useRenderInfo": { + name: "useRenderInfo", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useRenderInfo/useRenderInfo.demo.tsx") + return { default: mod.default } + }), + }, + + "useRerender": { + name: "useRerender", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useRerender/useRerender.demo.tsx") + return { default: mod.default } + }), + }, + + "useResizeObserver": { + name: "useResizeObserver", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useResizeObserver/useResizeObserver.demo.tsx") + return { default: mod.default } + }), + }, + + "useRightClick": { + name: "useRightClick", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useRightClick/useRightClick.demo.tsx") + return { default: mod.default } + }), + }, + + "useScript": { + name: "useScript", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useScript/useScript.demo.tsx") + return { default: mod.default } + }), + }, + + "useScroll": { + name: "useScroll", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useScroll/useScroll.demo.tsx") + return { default: mod.default } + }), + }, + + "useScrollIntoView": { + name: "useScrollIntoView", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useScrollIntoView/useScrollIntoView.demo.tsx") + return { default: mod.default } + }), + }, + + "useScrollTo": { + name: "useScrollTo", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useScrollTo/useScrollTo.demo.tsx") + return { default: mod.default } + }), + }, + + "useSessionStorage": { + name: "useSessionStorage", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useSessionStorage/useSessionStorage.demo.tsx") + return { default: mod.default } + }), + }, + + "useSet": { + name: "useSet", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useSet/useSet.demo.tsx") + return { default: mod.default } + }), + }, + + "useShallowEffect": { + name: "useShallowEffect", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useShallowEffect/useShallowEffect.demo.tsx") + return { default: mod.default } + }), + }, + + "useShare": { + name: "useShare", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useShare/useShare.demo.tsx") + return { default: mod.default } + }), + }, + + "useSize": { + name: "useSize", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useSize/useSize.demo.tsx") + return { default: mod.default } + }), + }, + + "useSpeechRecognition": { + name: "useSpeechRecognition", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useSpeechRecognition/useSpeechRecognition.demo.tsx") + return { default: mod.default } + }), + }, + + "useSpeechSynthesis": { + name: "useSpeechSynthesis", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useSpeechSynthesis/useSpeechSynthesis.demo.tsx") + return { default: mod.default } + }), + }, + + "useStateHistory": { + name: "useStateHistory", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useStateHistory/useStateHistory.demo.tsx") + return { default: mod.default } + }), + }, + + "useStep": { + name: "useStep", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useStep/useStep.demo.tsx") + return { default: mod.default } + }), + }, + + "useSticky": { + name: "useSticky", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useSticky/useSticky.demo.tsx") + return { default: mod.default } + }), + }, + + "useStopwatch": { + name: "useStopwatch", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useStopwatch/useStopwatch.demo.tsx") + return { default: mod.default } + }), + }, + + "useStorage": { + name: "useStorage", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useStorage/useStorage.demo.tsx") + return { default: mod.default } + }), + }, + + "useTextDirection": { + name: "useTextDirection", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useTextDirection/useTextDirection.demo.tsx") + return { default: mod.default } + }), + }, + + "useTextSelection": { + name: "useTextSelection", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useTextSelection/useTextSelection.demo.tsx") + return { default: mod.default } + }), + }, + + "useTextareaAutosize": { + name: "useTextareaAutosize", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useTextareaAutosize/useTextareaAutosize.demo.tsx") + return { default: mod.default } + }), + }, + + "useThrottleCallback": { + name: "useThrottleCallback", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useThrottleCallback/useThrottleCallback.demo.tsx") + return { default: mod.default } + }), + }, + + "useThrottleEffect": { + name: "useThrottleEffect", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useThrottleEffect/useThrottleEffect.demo.tsx") + return { default: mod.default } + }), + }, + + "useThrottleState": { + name: "useThrottleState", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useThrottleState/useThrottleState.demo.tsx") + return { default: mod.default } + }), + }, + + "useThrottleValue": { + name: "useThrottleValue", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useThrottleValue/useThrottleValue.demo.tsx") + return { default: mod.default } + }), + }, + + "useTime": { + name: "useTime", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useTime/useTime.demo.tsx") + return { default: mod.default } + }), + }, + + "useTimeout": { + name: "useTimeout", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useTimeout/useTimeout.demo.tsx") + return { default: mod.default } + }), + }, + + "useTimer": { + name: "useTimer", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useTimer/useTimer.demo.tsx") + return { default: mod.default } + }), + }, + + "useToggle": { + name: "useToggle", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useToggle/useToggle.demo.tsx") + return { default: mod.default } + }), + }, + + "useUnmount": { + name: "useUnmount", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useUnmount/useUnmount.demo.tsx") + return { default: mod.default } + }), + }, + + "useUrlSearchParam": { + name: "useUrlSearchParam", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useUrlSearchParam/useUrlSearchParam.demo.tsx") + return { default: mod.default } + }), + }, + + "useUrlSearchParams": { + name: "useUrlSearchParams", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useUrlSearchParams/useUrlSearchParams.demo.tsx") + return { default: mod.default } + }), + }, + + "useVibrate": { + name: "useVibrate", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useVibrate/useVibrate.demo.tsx") + return { default: mod.default } + }), + }, + + "useVirtualKeyboard": { + name: "useVirtualKeyboard", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useVirtualKeyboard/useVirtualKeyboard.demo.tsx") + return { default: mod.default } + }), + }, + + "useVisibility": { + name: "useVisibility", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useVisibility/useVisibility.demo.tsx") + return { default: mod.default } + }), + }, + + "useWakeLock": { + name: "useWakeLock", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useWakeLock/useWakeLock.demo.tsx") + return { default: mod.default } + }), + }, + + "useWebSocket": { + name: "useWebSocket", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useWebSocket/useWebSocket.demo.tsx") + return { default: mod.default } + }), + }, + + "useWindowEvent": { + name: "useWindowEvent", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useWindowEvent/useWindowEvent.demo.tsx") + return { default: mod.default } + }), + }, + + "useWindowFocus": { + name: "useWindowFocus", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useWindowFocus/useWindowFocus.demo.tsx") + return { default: mod.default } + }), + }, + + "useWindowScroll": { + name: "useWindowScroll", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useWindowScroll/useWindowScroll.demo.tsx") + return { default: mod.default } + }), + }, + + "useWindowSize": { + name: "useWindowSize", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useWindowSize/useWindowSize.demo.tsx") + return { default: mod.default } + }), + }, + + "useWizard": { + name: "useWizard", + component: React.lazy(async () => { + const mod = await import("../../core/src/hooks/useWizard/useWizard.demo.tsx") + return { default: mod.default } + }), + }, + } \ No newline at end of file diff --git a/packages/docs-v2/.source/index.ts b/packages/docs-v2/.source/index.ts new file mode 100644 index 00000000..da6a2915 --- /dev/null +++ b/packages/docs-v2/.source/index.ts @@ -0,0 +1,174 @@ +// @ts-nocheck -- skip type checking +import * as docs_169 from "../content/docs/hooks/usewizard.mdx?collection=docs" +import * as docs_168 from "../content/docs/hooks/usewindowsize.mdx?collection=docs" +import * as docs_167 from "../content/docs/hooks/usewindowscroll.mdx?collection=docs" +import * as docs_166 from "../content/docs/hooks/usewindowfocus.mdx?collection=docs" +import * as docs_165 from "../content/docs/hooks/usewindowevent.mdx?collection=docs" +import * as docs_164 from "../content/docs/hooks/usewebsocket.mdx?collection=docs" +import * as docs_163 from "../content/docs/hooks/usewakelock.mdx?collection=docs" +import * as docs_162 from "../content/docs/hooks/usevisibility.mdx?collection=docs" +import * as docs_161 from "../content/docs/hooks/usevirtualkeyboard.mdx?collection=docs" +import * as docs_160 from "../content/docs/hooks/usevibrate.mdx?collection=docs" +import * as docs_159 from "../content/docs/hooks/useurlsearchparams.mdx?collection=docs" +import * as docs_158 from "../content/docs/hooks/useurlsearchparam.mdx?collection=docs" +import * as docs_157 from "../content/docs/hooks/useunmount.mdx?collection=docs" +import * as docs_156 from "../content/docs/hooks/usetoggle.mdx?collection=docs" +import * as docs_155 from "../content/docs/hooks/usetimer.mdx?collection=docs" +import * as docs_154 from "../content/docs/hooks/usetimeout.mdx?collection=docs" +import * as docs_153 from "../content/docs/hooks/usetime.mdx?collection=docs" +import * as docs_152 from "../content/docs/hooks/usethrottlevalue.mdx?collection=docs" +import * as docs_151 from "../content/docs/hooks/usethrottlestate.mdx?collection=docs" +import * as docs_150 from "../content/docs/hooks/usethrottleeffect.mdx?collection=docs" +import * as docs_149 from "../content/docs/hooks/usethrottlecallback.mdx?collection=docs" +import * as docs_148 from "../content/docs/hooks/usetextselection.mdx?collection=docs" +import * as docs_147 from "../content/docs/hooks/usetextdirection.mdx?collection=docs" +import * as docs_146 from "../content/docs/hooks/usetextareaautosize.mdx?collection=docs" +import * as docs_145 from "../content/docs/hooks/usestorage.mdx?collection=docs" +import * as docs_144 from "../content/docs/hooks/usestopwatch.mdx?collection=docs" +import * as docs_143 from "../content/docs/hooks/usesticky.mdx?collection=docs" +import * as docs_142 from "../content/docs/hooks/usestep.mdx?collection=docs" +import * as docs_141 from "../content/docs/hooks/usestatehistory.mdx?collection=docs" +import * as docs_140 from "../content/docs/hooks/usespeechsynthesis.mdx?collection=docs" +import * as docs_139 from "../content/docs/hooks/usespeechrecognition.mdx?collection=docs" +import * as docs_138 from "../content/docs/hooks/usesize.mdx?collection=docs" +import * as docs_137 from "../content/docs/hooks/useshare.mdx?collection=docs" +import * as docs_136 from "../content/docs/hooks/useshalloweffect.mdx?collection=docs" +import * as docs_135 from "../content/docs/hooks/useset.mdx?collection=docs" +import * as docs_134 from "../content/docs/hooks/usesessionstorage.mdx?collection=docs" +import * as docs_133 from "../content/docs/hooks/usescrollto.mdx?collection=docs" +import * as docs_132 from "../content/docs/hooks/usescrollintoview.mdx?collection=docs" +import * as docs_131 from "../content/docs/hooks/usescroll.mdx?collection=docs" +import * as docs_130 from "../content/docs/hooks/usescript.mdx?collection=docs" +import * as docs_129 from "../content/docs/hooks/userightclick.mdx?collection=docs" +import * as docs_128 from "../content/docs/hooks/useresizeobserver.mdx?collection=docs" +import * as docs_127 from "../content/docs/hooks/usererender.mdx?collection=docs" +import * as docs_126 from "../content/docs/hooks/userenderinfo.mdx?collection=docs" +import * as docs_125 from "../content/docs/hooks/userendercount.mdx?collection=docs" +import * as docs_124 from "../content/docs/hooks/userefstate.mdx?collection=docs" +import * as docs_123 from "../content/docs/hooks/userafstate.mdx?collection=docs" +import * as docs_122 from "../content/docs/hooks/useraf.mdx?collection=docs" +import * as docs_121 from "../content/docs/hooks/usequeue.mdx?collection=docs" +import * as docs_120 from "../content/docs/hooks/usequery.mdx?collection=docs" +import * as docs_119 from "../content/docs/hooks/useprogress.mdx?collection=docs" +import * as docs_118 from "../content/docs/hooks/useprevious.mdx?collection=docs" +import * as docs_117 from "../content/docs/hooks/usepreferredreducedmotion.mdx?collection=docs" +import * as docs_116 from "../content/docs/hooks/usepreferredlanguages.mdx?collection=docs" +import * as docs_115 from "../content/docs/hooks/usepreferreddark.mdx?collection=docs" +import * as docs_114 from "../content/docs/hooks/usepreferredcontrast.mdx?collection=docs" +import * as docs_113 from "../content/docs/hooks/usepreferredcolorscheme.mdx?collection=docs" +import * as docs_112 from "../content/docs/hooks/usepostmessage.mdx?collection=docs" +import * as docs_111 from "../content/docs/hooks/usepointerlock.mdx?collection=docs" +import * as docs_110 from "../content/docs/hooks/usepictureinpicture.mdx?collection=docs" +import * as docs_109 from "../content/docs/hooks/usepermission.mdx?collection=docs" +import * as docs_108 from "../content/docs/hooks/useperformanceobserver.mdx?collection=docs" +import * as docs_107 from "../content/docs/hooks/useparallax.mdx?collection=docs" +import * as docs_106 from "../content/docs/hooks/usepaint.mdx?collection=docs" +import * as docs_105 from "../content/docs/hooks/usepageleave.mdx?collection=docs" +import * as docs_104 from "../content/docs/hooks/useotpcredential.mdx?collection=docs" +import * as docs_103 from "../content/docs/hooks/useorientation.mdx?collection=docs" +import * as docs_102 from "../content/docs/hooks/useoptimistic.mdx?collection=docs" +import * as docs_101 from "../content/docs/hooks/useoperatingsystem.mdx?collection=docs" +import * as docs_100 from "../content/docs/hooks/useonline.mdx?collection=docs" +import * as docs_99 from "../content/docs/hooks/useonce.mdx?collection=docs" +import * as docs_98 from "../content/docs/hooks/useoffsetpagination.mdx?collection=docs" +import * as docs_97 from "../content/docs/hooks/useobject.mdx?collection=docs" +import * as docs_96 from "../content/docs/hooks/usenetwork.mdx?collection=docs" +import * as docs_95 from "../content/docs/hooks/usemutationobserver.mdx?collection=docs" +import * as docs_94 from "../content/docs/hooks/usemutation.mdx?collection=docs" +import * as docs_93 from "../content/docs/hooks/usemouse.mdx?collection=docs" +import * as docs_92 from "../content/docs/hooks/usemount.mdx?collection=docs" +import * as docs_91 from "../content/docs/hooks/usemergedref.mdx?collection=docs" +import * as docs_90 from "../content/docs/hooks/usememory.mdx?collection=docs" +import * as docs_89 from "../content/docs/hooks/usemediaquery.mdx?collection=docs" +import * as docs_88 from "../content/docs/hooks/usemediacontrols.mdx?collection=docs" +import * as docs_87 from "../content/docs/hooks/usemeasure.mdx?collection=docs" +import * as docs_86 from "../content/docs/hooks/usemap.mdx?collection=docs" +import * as docs_85 from "../content/docs/hooks/uselongpress.mdx?collection=docs" +import * as docs_84 from "../content/docs/hooks/uselogger.mdx?collection=docs" +import * as docs_83 from "../content/docs/hooks/uselockscroll.mdx?collection=docs" +import * as docs_82 from "../content/docs/hooks/uselockcallback.mdx?collection=docs" +import * as docs_81 from "../content/docs/hooks/uselocalstorage.mdx?collection=docs" +import * as docs_80 from "../content/docs/hooks/uselist.mdx?collection=docs" +import * as docs_79 from "../content/docs/hooks/useless.mdx?collection=docs" +import * as docs_78 from "../content/docs/hooks/uselatest.mdx?collection=docs" +import * as docs_77 from "../content/docs/hooks/uselastchanged.mdx?collection=docs" +import * as docs_76 from "../content/docs/hooks/usekeyspressed.mdx?collection=docs" +import * as docs_75 from "../content/docs/hooks/usekeypressevent.mdx?collection=docs" +import * as docs_74 from "../content/docs/hooks/usekeypress.mdx?collection=docs" +import * as docs_73 from "../content/docs/hooks/usekeyboard.mdx?collection=docs" +import * as docs_72 from "../content/docs/hooks/useisomorphiclayouteffect.mdx?collection=docs" +import * as docs_71 from "../content/docs/hooks/useisfirstrender.mdx?collection=docs" +import * as docs_70 from "../content/docs/hooks/useinterval.mdx?collection=docs" +import * as docs_69 from "../content/docs/hooks/useintersectionobserver.mdx?collection=docs" +import * as docs_68 from "../content/docs/hooks/useinfinitescroll.mdx?collection=docs" +import * as docs_67 from "../content/docs/hooks/useimage.mdx?collection=docs" +import * as docs_66 from "../content/docs/hooks/useidle.mdx?collection=docs" +import * as docs_65 from "../content/docs/hooks/usehover.mdx?collection=docs" +import * as docs_64 from "../content/docs/hooks/usehotkeys.mdx?collection=docs" +import * as docs_63 from "../content/docs/hooks/usehash.mdx?collection=docs" +import * as docs_62 from "../content/docs/hooks/usegeolocation.mdx?collection=docs" +import * as docs_61 from "../content/docs/hooks/usegamepad.mdx?collection=docs" +import * as docs_60 from "../content/docs/hooks/usefullscreen.mdx?collection=docs" +import * as docs_59 from "../content/docs/hooks/useful.mdx?collection=docs" +import * as docs_58 from "../content/docs/hooks/usefps.mdx?collection=docs" +import * as docs_57 from "../content/docs/hooks/usefocustrap.mdx?collection=docs" +import * as docs_56 from "../content/docs/hooks/usefocus.mdx?collection=docs" +import * as docs_55 from "../content/docs/hooks/usefiledialog.mdx?collection=docs" +import * as docs_54 from "../content/docs/hooks/usefield.mdx?collection=docs" +import * as docs_53 from "../content/docs/hooks/usefavicon.mdx?collection=docs" +import * as docs_52 from "../content/docs/hooks/useeyedropper.mdx?collection=docs" +import * as docs_51 from "../content/docs/hooks/useeventsource.mdx?collection=docs" +import * as docs_50 from "../content/docs/hooks/useeventlistener.mdx?collection=docs" +import * as docs_49 from "../content/docs/hooks/useevent.mdx?collection=docs" +import * as docs_48 from "../content/docs/hooks/usedropzone.mdx?collection=docs" +import * as docs_47 from "../content/docs/hooks/usedoubleclick.mdx?collection=docs" +import * as docs_46 from "../content/docs/hooks/usedocumentvisibility.mdx?collection=docs" +import * as docs_45 from "../content/docs/hooks/usedocumenttitle.mdx?collection=docs" +import * as docs_44 from "../content/docs/hooks/usedocumentevent.mdx?collection=docs" +import * as docs_43 from "../content/docs/hooks/usedisplaymedia.mdx?collection=docs" +import * as docs_42 from "../content/docs/hooks/usedisclosure.mdx?collection=docs" +import * as docs_41 from "../content/docs/hooks/usedidupdate.mdx?collection=docs" +import * as docs_40 from "../content/docs/hooks/usedevicepixelratio.mdx?collection=docs" +import * as docs_39 from "../content/docs/hooks/usedeviceorientation.mdx?collection=docs" +import * as docs_38 from "../content/docs/hooks/usedevicemotion.mdx?collection=docs" +import * as docs_37 from "../content/docs/hooks/usedefault.mdx?collection=docs" +import * as docs_36 from "../content/docs/hooks/usedebouncevalue.mdx?collection=docs" +import * as docs_35 from "../content/docs/hooks/usedebouncestate.mdx?collection=docs" +import * as docs_34 from "../content/docs/hooks/usedebounceeffect.mdx?collection=docs" +import * as docs_33 from "../content/docs/hooks/usedebouncecallback.mdx?collection=docs" +import * as docs_32 from "../content/docs/hooks/usecssvar.mdx?collection=docs" +import * as docs_31 from "../content/docs/hooks/usecounter.mdx?collection=docs" +import * as docs_30 from "../content/docs/hooks/usecopy.mdx?collection=docs" +import * as docs_29 from "../content/docs/hooks/usecookies.mdx?collection=docs" +import * as docs_28 from "../content/docs/hooks/usecookie.mdx?collection=docs" +import * as docs_27 from "../content/docs/hooks/usecontrollablestate.mdx?collection=docs" +import * as docs_26 from "../content/docs/hooks/useconst.mdx?collection=docs" +import * as docs_25 from "../content/docs/hooks/useclipboard.mdx?collection=docs" +import * as docs_24 from "../content/docs/hooks/useclickoutside.mdx?collection=docs" +import * as docs_23 from "../content/docs/hooks/usebrowserlanguage.mdx?collection=docs" +import * as docs_22 from "../content/docs/hooks/usebroadcastchannel.mdx?collection=docs" +import * as docs_21 from "../content/docs/hooks/usebreakpoints.mdx?collection=docs" +import * as docs_20 from "../content/docs/hooks/useboolean.mdx?collection=docs" +import * as docs_19 from "../content/docs/hooks/usebluetooth.mdx?collection=docs" +import * as docs_18 from "../content/docs/hooks/usebattery.mdx?collection=docs" +import * as docs_17 from "../content/docs/hooks/usebatchedcallback.mdx?collection=docs" +import * as docs_16 from "../content/docs/hooks/useautoscroll.mdx?collection=docs" +import * as docs_15 from "../content/docs/hooks/useaudio.mdx?collection=docs" +import * as docs_14 from "../content/docs/hooks/useasynceffect.mdx?collection=docs" +import * as docs_13 from "../content/docs/hooks/useasync.mdx?collection=docs" +import * as docs_12 from "../content/docs/hooks/useactiveelement.mdx?collection=docs" +import * as docs_11 from "../content/docs/installation/vite.mdx?collection=docs" +import * as docs_10 from "../content/docs/installation/tanstack.mdx?collection=docs" +import * as docs_9 from "../content/docs/installation/tanstack-router.mdx?collection=docs" +import * as docs_8 from "../content/docs/installation/react-router.mdx?collection=docs" +import * as docs_7 from "../content/docs/installation/nextjs.mdx?collection=docs" +import * as docs_6 from "../content/docs/installation/manual.mdx?collection=docs" +import * as docs_5 from "../content/docs/(root)/target.mdx?collection=docs" +import * as docs_4 from "../content/docs/(root)/reactuse-json.mdx?collection=docs" +import * as docs_3 from "../content/docs/(root)/memoization.mdx?collection=docs" +import * as docs_2 from "../content/docs/(root)/installation.mdx?collection=docs" +import * as docs_1 from "../content/docs/(root)/index.mdx?collection=docs" +import * as docs_0 from "../content/docs/(root)/cli.mdx?collection=docs" +import { _runtime } from "fumadocs-mdx/runtime/next" +import * as _source from "../source.config" +export const docs = _runtime.docs([{ info: {"path":"(root)/cli.mdx","fullPath":"content/docs/(root)/cli.mdx"}, data: docs_0 }, { info: {"path":"(root)/index.mdx","fullPath":"content/docs/(root)/index.mdx"}, data: docs_1 }, { info: {"path":"(root)/installation.mdx","fullPath":"content/docs/(root)/installation.mdx"}, data: docs_2 }, { info: {"path":"(root)/memoization.mdx","fullPath":"content/docs/(root)/memoization.mdx"}, data: docs_3 }, { info: {"path":"(root)/reactuse-json.mdx","fullPath":"content/docs/(root)/reactuse-json.mdx"}, data: docs_4 }, { info: {"path":"(root)/target.mdx","fullPath":"content/docs/(root)/target.mdx"}, data: docs_5 }, { info: {"path":"installation/manual.mdx","fullPath":"content/docs/installation/manual.mdx"}, data: docs_6 }, { info: {"path":"installation/nextjs.mdx","fullPath":"content/docs/installation/nextjs.mdx"}, data: docs_7 }, { info: {"path":"installation/react-router.mdx","fullPath":"content/docs/installation/react-router.mdx"}, data: docs_8 }, { info: {"path":"installation/tanstack-router.mdx","fullPath":"content/docs/installation/tanstack-router.mdx"}, data: docs_9 }, { info: {"path":"installation/tanstack.mdx","fullPath":"content/docs/installation/tanstack.mdx"}, data: docs_10 }, { info: {"path":"installation/vite.mdx","fullPath":"content/docs/installation/vite.mdx"}, data: docs_11 }, { info: {"path":"hooks/useactiveelement.mdx","fullPath":"content/docs/hooks/useactiveelement.mdx"}, data: docs_12 }, { info: {"path":"hooks/useasync.mdx","fullPath":"content/docs/hooks/useasync.mdx"}, data: docs_13 }, { info: {"path":"hooks/useasynceffect.mdx","fullPath":"content/docs/hooks/useasynceffect.mdx"}, data: docs_14 }, { info: {"path":"hooks/useaudio.mdx","fullPath":"content/docs/hooks/useaudio.mdx"}, data: docs_15 }, { info: {"path":"hooks/useautoscroll.mdx","fullPath":"content/docs/hooks/useautoscroll.mdx"}, data: docs_16 }, { info: {"path":"hooks/usebatchedcallback.mdx","fullPath":"content/docs/hooks/usebatchedcallback.mdx"}, data: docs_17 }, { info: {"path":"hooks/usebattery.mdx","fullPath":"content/docs/hooks/usebattery.mdx"}, data: docs_18 }, { info: {"path":"hooks/usebluetooth.mdx","fullPath":"content/docs/hooks/usebluetooth.mdx"}, data: docs_19 }, { info: {"path":"hooks/useboolean.mdx","fullPath":"content/docs/hooks/useboolean.mdx"}, data: docs_20 }, { info: {"path":"hooks/usebreakpoints.mdx","fullPath":"content/docs/hooks/usebreakpoints.mdx"}, data: docs_21 }, { info: {"path":"hooks/usebroadcastchannel.mdx","fullPath":"content/docs/hooks/usebroadcastchannel.mdx"}, data: docs_22 }, { info: {"path":"hooks/usebrowserlanguage.mdx","fullPath":"content/docs/hooks/usebrowserlanguage.mdx"}, data: docs_23 }, { info: {"path":"hooks/useclickoutside.mdx","fullPath":"content/docs/hooks/useclickoutside.mdx"}, data: docs_24 }, { info: {"path":"hooks/useclipboard.mdx","fullPath":"content/docs/hooks/useclipboard.mdx"}, data: docs_25 }, { info: {"path":"hooks/useconst.mdx","fullPath":"content/docs/hooks/useconst.mdx"}, data: docs_26 }, { info: {"path":"hooks/usecontrollablestate.mdx","fullPath":"content/docs/hooks/usecontrollablestate.mdx"}, data: docs_27 }, { info: {"path":"hooks/usecookie.mdx","fullPath":"content/docs/hooks/usecookie.mdx"}, data: docs_28 }, { info: {"path":"hooks/usecookies.mdx","fullPath":"content/docs/hooks/usecookies.mdx"}, data: docs_29 }, { info: {"path":"hooks/usecopy.mdx","fullPath":"content/docs/hooks/usecopy.mdx"}, data: docs_30 }, { info: {"path":"hooks/usecounter.mdx","fullPath":"content/docs/hooks/usecounter.mdx"}, data: docs_31 }, { info: {"path":"hooks/usecssvar.mdx","fullPath":"content/docs/hooks/usecssvar.mdx"}, data: docs_32 }, { info: {"path":"hooks/usedebouncecallback.mdx","fullPath":"content/docs/hooks/usedebouncecallback.mdx"}, data: docs_33 }, { info: {"path":"hooks/usedebounceeffect.mdx","fullPath":"content/docs/hooks/usedebounceeffect.mdx"}, data: docs_34 }, { info: {"path":"hooks/usedebouncestate.mdx","fullPath":"content/docs/hooks/usedebouncestate.mdx"}, data: docs_35 }, { info: {"path":"hooks/usedebouncevalue.mdx","fullPath":"content/docs/hooks/usedebouncevalue.mdx"}, data: docs_36 }, { info: {"path":"hooks/usedefault.mdx","fullPath":"content/docs/hooks/usedefault.mdx"}, data: docs_37 }, { info: {"path":"hooks/usedevicemotion.mdx","fullPath":"content/docs/hooks/usedevicemotion.mdx"}, data: docs_38 }, { info: {"path":"hooks/usedeviceorientation.mdx","fullPath":"content/docs/hooks/usedeviceorientation.mdx"}, data: docs_39 }, { info: {"path":"hooks/usedevicepixelratio.mdx","fullPath":"content/docs/hooks/usedevicepixelratio.mdx"}, data: docs_40 }, { info: {"path":"hooks/usedidupdate.mdx","fullPath":"content/docs/hooks/usedidupdate.mdx"}, data: docs_41 }, { info: {"path":"hooks/usedisclosure.mdx","fullPath":"content/docs/hooks/usedisclosure.mdx"}, data: docs_42 }, { info: {"path":"hooks/usedisplaymedia.mdx","fullPath":"content/docs/hooks/usedisplaymedia.mdx"}, data: docs_43 }, { info: {"path":"hooks/usedocumentevent.mdx","fullPath":"content/docs/hooks/usedocumentevent.mdx"}, data: docs_44 }, { info: {"path":"hooks/usedocumenttitle.mdx","fullPath":"content/docs/hooks/usedocumenttitle.mdx"}, data: docs_45 }, { info: {"path":"hooks/usedocumentvisibility.mdx","fullPath":"content/docs/hooks/usedocumentvisibility.mdx"}, data: docs_46 }, { info: {"path":"hooks/usedoubleclick.mdx","fullPath":"content/docs/hooks/usedoubleclick.mdx"}, data: docs_47 }, { info: {"path":"hooks/usedropzone.mdx","fullPath":"content/docs/hooks/usedropzone.mdx"}, data: docs_48 }, { info: {"path":"hooks/useevent.mdx","fullPath":"content/docs/hooks/useevent.mdx"}, data: docs_49 }, { info: {"path":"hooks/useeventlistener.mdx","fullPath":"content/docs/hooks/useeventlistener.mdx"}, data: docs_50 }, { info: {"path":"hooks/useeventsource.mdx","fullPath":"content/docs/hooks/useeventsource.mdx"}, data: docs_51 }, { info: {"path":"hooks/useeyedropper.mdx","fullPath":"content/docs/hooks/useeyedropper.mdx"}, data: docs_52 }, { info: {"path":"hooks/usefavicon.mdx","fullPath":"content/docs/hooks/usefavicon.mdx"}, data: docs_53 }, { info: {"path":"hooks/usefield.mdx","fullPath":"content/docs/hooks/usefield.mdx"}, data: docs_54 }, { info: {"path":"hooks/usefiledialog.mdx","fullPath":"content/docs/hooks/usefiledialog.mdx"}, data: docs_55 }, { info: {"path":"hooks/usefocus.mdx","fullPath":"content/docs/hooks/usefocus.mdx"}, data: docs_56 }, { info: {"path":"hooks/usefocustrap.mdx","fullPath":"content/docs/hooks/usefocustrap.mdx"}, data: docs_57 }, { info: {"path":"hooks/usefps.mdx","fullPath":"content/docs/hooks/usefps.mdx"}, data: docs_58 }, { info: {"path":"hooks/useful.mdx","fullPath":"content/docs/hooks/useful.mdx"}, data: docs_59 }, { info: {"path":"hooks/usefullscreen.mdx","fullPath":"content/docs/hooks/usefullscreen.mdx"}, data: docs_60 }, { info: {"path":"hooks/usegamepad.mdx","fullPath":"content/docs/hooks/usegamepad.mdx"}, data: docs_61 }, { info: {"path":"hooks/usegeolocation.mdx","fullPath":"content/docs/hooks/usegeolocation.mdx"}, data: docs_62 }, { info: {"path":"hooks/usehash.mdx","fullPath":"content/docs/hooks/usehash.mdx"}, data: docs_63 }, { info: {"path":"hooks/usehotkeys.mdx","fullPath":"content/docs/hooks/usehotkeys.mdx"}, data: docs_64 }, { info: {"path":"hooks/usehover.mdx","fullPath":"content/docs/hooks/usehover.mdx"}, data: docs_65 }, { info: {"path":"hooks/useidle.mdx","fullPath":"content/docs/hooks/useidle.mdx"}, data: docs_66 }, { info: {"path":"hooks/useimage.mdx","fullPath":"content/docs/hooks/useimage.mdx"}, data: docs_67 }, { info: {"path":"hooks/useinfinitescroll.mdx","fullPath":"content/docs/hooks/useinfinitescroll.mdx"}, data: docs_68 }, { info: {"path":"hooks/useintersectionobserver.mdx","fullPath":"content/docs/hooks/useintersectionobserver.mdx"}, data: docs_69 }, { info: {"path":"hooks/useinterval.mdx","fullPath":"content/docs/hooks/useinterval.mdx"}, data: docs_70 }, { info: {"path":"hooks/useisfirstrender.mdx","fullPath":"content/docs/hooks/useisfirstrender.mdx"}, data: docs_71 }, { info: {"path":"hooks/useisomorphiclayouteffect.mdx","fullPath":"content/docs/hooks/useisomorphiclayouteffect.mdx"}, data: docs_72 }, { info: {"path":"hooks/usekeyboard.mdx","fullPath":"content/docs/hooks/usekeyboard.mdx"}, data: docs_73 }, { info: {"path":"hooks/usekeypress.mdx","fullPath":"content/docs/hooks/usekeypress.mdx"}, data: docs_74 }, { info: {"path":"hooks/usekeypressevent.mdx","fullPath":"content/docs/hooks/usekeypressevent.mdx"}, data: docs_75 }, { info: {"path":"hooks/usekeyspressed.mdx","fullPath":"content/docs/hooks/usekeyspressed.mdx"}, data: docs_76 }, { info: {"path":"hooks/uselastchanged.mdx","fullPath":"content/docs/hooks/uselastchanged.mdx"}, data: docs_77 }, { info: {"path":"hooks/uselatest.mdx","fullPath":"content/docs/hooks/uselatest.mdx"}, data: docs_78 }, { info: {"path":"hooks/useless.mdx","fullPath":"content/docs/hooks/useless.mdx"}, data: docs_79 }, { info: {"path":"hooks/uselist.mdx","fullPath":"content/docs/hooks/uselist.mdx"}, data: docs_80 }, { info: {"path":"hooks/uselocalstorage.mdx","fullPath":"content/docs/hooks/uselocalstorage.mdx"}, data: docs_81 }, { info: {"path":"hooks/uselockcallback.mdx","fullPath":"content/docs/hooks/uselockcallback.mdx"}, data: docs_82 }, { info: {"path":"hooks/uselockscroll.mdx","fullPath":"content/docs/hooks/uselockscroll.mdx"}, data: docs_83 }, { info: {"path":"hooks/uselogger.mdx","fullPath":"content/docs/hooks/uselogger.mdx"}, data: docs_84 }, { info: {"path":"hooks/uselongpress.mdx","fullPath":"content/docs/hooks/uselongpress.mdx"}, data: docs_85 }, { info: {"path":"hooks/usemap.mdx","fullPath":"content/docs/hooks/usemap.mdx"}, data: docs_86 }, { info: {"path":"hooks/usemeasure.mdx","fullPath":"content/docs/hooks/usemeasure.mdx"}, data: docs_87 }, { info: {"path":"hooks/usemediacontrols.mdx","fullPath":"content/docs/hooks/usemediacontrols.mdx"}, data: docs_88 }, { info: {"path":"hooks/usemediaquery.mdx","fullPath":"content/docs/hooks/usemediaquery.mdx"}, data: docs_89 }, { info: {"path":"hooks/usememory.mdx","fullPath":"content/docs/hooks/usememory.mdx"}, data: docs_90 }, { info: {"path":"hooks/usemergedref.mdx","fullPath":"content/docs/hooks/usemergedref.mdx"}, data: docs_91 }, { info: {"path":"hooks/usemount.mdx","fullPath":"content/docs/hooks/usemount.mdx"}, data: docs_92 }, { info: {"path":"hooks/usemouse.mdx","fullPath":"content/docs/hooks/usemouse.mdx"}, data: docs_93 }, { info: {"path":"hooks/usemutation.mdx","fullPath":"content/docs/hooks/usemutation.mdx"}, data: docs_94 }, { info: {"path":"hooks/usemutationobserver.mdx","fullPath":"content/docs/hooks/usemutationobserver.mdx"}, data: docs_95 }, { info: {"path":"hooks/usenetwork.mdx","fullPath":"content/docs/hooks/usenetwork.mdx"}, data: docs_96 }, { info: {"path":"hooks/useobject.mdx","fullPath":"content/docs/hooks/useobject.mdx"}, data: docs_97 }, { info: {"path":"hooks/useoffsetpagination.mdx","fullPath":"content/docs/hooks/useoffsetpagination.mdx"}, data: docs_98 }, { info: {"path":"hooks/useonce.mdx","fullPath":"content/docs/hooks/useonce.mdx"}, data: docs_99 }, { info: {"path":"hooks/useonline.mdx","fullPath":"content/docs/hooks/useonline.mdx"}, data: docs_100 }, { info: {"path":"hooks/useoperatingsystem.mdx","fullPath":"content/docs/hooks/useoperatingsystem.mdx"}, data: docs_101 }, { info: {"path":"hooks/useoptimistic.mdx","fullPath":"content/docs/hooks/useoptimistic.mdx"}, data: docs_102 }, { info: {"path":"hooks/useorientation.mdx","fullPath":"content/docs/hooks/useorientation.mdx"}, data: docs_103 }, { info: {"path":"hooks/useotpcredential.mdx","fullPath":"content/docs/hooks/useotpcredential.mdx"}, data: docs_104 }, { info: {"path":"hooks/usepageleave.mdx","fullPath":"content/docs/hooks/usepageleave.mdx"}, data: docs_105 }, { info: {"path":"hooks/usepaint.mdx","fullPath":"content/docs/hooks/usepaint.mdx"}, data: docs_106 }, { info: {"path":"hooks/useparallax.mdx","fullPath":"content/docs/hooks/useparallax.mdx"}, data: docs_107 }, { info: {"path":"hooks/useperformanceobserver.mdx","fullPath":"content/docs/hooks/useperformanceobserver.mdx"}, data: docs_108 }, { info: {"path":"hooks/usepermission.mdx","fullPath":"content/docs/hooks/usepermission.mdx"}, data: docs_109 }, { info: {"path":"hooks/usepictureinpicture.mdx","fullPath":"content/docs/hooks/usepictureinpicture.mdx"}, data: docs_110 }, { info: {"path":"hooks/usepointerlock.mdx","fullPath":"content/docs/hooks/usepointerlock.mdx"}, data: docs_111 }, { info: {"path":"hooks/usepostmessage.mdx","fullPath":"content/docs/hooks/usepostmessage.mdx"}, data: docs_112 }, { info: {"path":"hooks/usepreferredcolorscheme.mdx","fullPath":"content/docs/hooks/usepreferredcolorscheme.mdx"}, data: docs_113 }, { info: {"path":"hooks/usepreferredcontrast.mdx","fullPath":"content/docs/hooks/usepreferredcontrast.mdx"}, data: docs_114 }, { info: {"path":"hooks/usepreferreddark.mdx","fullPath":"content/docs/hooks/usepreferreddark.mdx"}, data: docs_115 }, { info: {"path":"hooks/usepreferredlanguages.mdx","fullPath":"content/docs/hooks/usepreferredlanguages.mdx"}, data: docs_116 }, { info: {"path":"hooks/usepreferredreducedmotion.mdx","fullPath":"content/docs/hooks/usepreferredreducedmotion.mdx"}, data: docs_117 }, { info: {"path":"hooks/useprevious.mdx","fullPath":"content/docs/hooks/useprevious.mdx"}, data: docs_118 }, { info: {"path":"hooks/useprogress.mdx","fullPath":"content/docs/hooks/useprogress.mdx"}, data: docs_119 }, { info: {"path":"hooks/usequery.mdx","fullPath":"content/docs/hooks/usequery.mdx"}, data: docs_120 }, { info: {"path":"hooks/usequeue.mdx","fullPath":"content/docs/hooks/usequeue.mdx"}, data: docs_121 }, { info: {"path":"hooks/useraf.mdx","fullPath":"content/docs/hooks/useraf.mdx"}, data: docs_122 }, { info: {"path":"hooks/userafstate.mdx","fullPath":"content/docs/hooks/userafstate.mdx"}, data: docs_123 }, { info: {"path":"hooks/userefstate.mdx","fullPath":"content/docs/hooks/userefstate.mdx"}, data: docs_124 }, { info: {"path":"hooks/userendercount.mdx","fullPath":"content/docs/hooks/userendercount.mdx"}, data: docs_125 }, { info: {"path":"hooks/userenderinfo.mdx","fullPath":"content/docs/hooks/userenderinfo.mdx"}, data: docs_126 }, { info: {"path":"hooks/usererender.mdx","fullPath":"content/docs/hooks/usererender.mdx"}, data: docs_127 }, { info: {"path":"hooks/useresizeobserver.mdx","fullPath":"content/docs/hooks/useresizeobserver.mdx"}, data: docs_128 }, { info: {"path":"hooks/userightclick.mdx","fullPath":"content/docs/hooks/userightclick.mdx"}, data: docs_129 }, { info: {"path":"hooks/usescript.mdx","fullPath":"content/docs/hooks/usescript.mdx"}, data: docs_130 }, { info: {"path":"hooks/usescroll.mdx","fullPath":"content/docs/hooks/usescroll.mdx"}, data: docs_131 }, { info: {"path":"hooks/usescrollintoview.mdx","fullPath":"content/docs/hooks/usescrollintoview.mdx"}, data: docs_132 }, { info: {"path":"hooks/usescrollto.mdx","fullPath":"content/docs/hooks/usescrollto.mdx"}, data: docs_133 }, { info: {"path":"hooks/usesessionstorage.mdx","fullPath":"content/docs/hooks/usesessionstorage.mdx"}, data: docs_134 }, { info: {"path":"hooks/useset.mdx","fullPath":"content/docs/hooks/useset.mdx"}, data: docs_135 }, { info: {"path":"hooks/useshalloweffect.mdx","fullPath":"content/docs/hooks/useshalloweffect.mdx"}, data: docs_136 }, { info: {"path":"hooks/useshare.mdx","fullPath":"content/docs/hooks/useshare.mdx"}, data: docs_137 }, { info: {"path":"hooks/usesize.mdx","fullPath":"content/docs/hooks/usesize.mdx"}, data: docs_138 }, { info: {"path":"hooks/usespeechrecognition.mdx","fullPath":"content/docs/hooks/usespeechrecognition.mdx"}, data: docs_139 }, { info: {"path":"hooks/usespeechsynthesis.mdx","fullPath":"content/docs/hooks/usespeechsynthesis.mdx"}, data: docs_140 }, { info: {"path":"hooks/usestatehistory.mdx","fullPath":"content/docs/hooks/usestatehistory.mdx"}, data: docs_141 }, { info: {"path":"hooks/usestep.mdx","fullPath":"content/docs/hooks/usestep.mdx"}, data: docs_142 }, { info: {"path":"hooks/usesticky.mdx","fullPath":"content/docs/hooks/usesticky.mdx"}, data: docs_143 }, { info: {"path":"hooks/usestopwatch.mdx","fullPath":"content/docs/hooks/usestopwatch.mdx"}, data: docs_144 }, { info: {"path":"hooks/usestorage.mdx","fullPath":"content/docs/hooks/usestorage.mdx"}, data: docs_145 }, { info: {"path":"hooks/usetextareaautosize.mdx","fullPath":"content/docs/hooks/usetextareaautosize.mdx"}, data: docs_146 }, { info: {"path":"hooks/usetextdirection.mdx","fullPath":"content/docs/hooks/usetextdirection.mdx"}, data: docs_147 }, { info: {"path":"hooks/usetextselection.mdx","fullPath":"content/docs/hooks/usetextselection.mdx"}, data: docs_148 }, { info: {"path":"hooks/usethrottlecallback.mdx","fullPath":"content/docs/hooks/usethrottlecallback.mdx"}, data: docs_149 }, { info: {"path":"hooks/usethrottleeffect.mdx","fullPath":"content/docs/hooks/usethrottleeffect.mdx"}, data: docs_150 }, { info: {"path":"hooks/usethrottlestate.mdx","fullPath":"content/docs/hooks/usethrottlestate.mdx"}, data: docs_151 }, { info: {"path":"hooks/usethrottlevalue.mdx","fullPath":"content/docs/hooks/usethrottlevalue.mdx"}, data: docs_152 }, { info: {"path":"hooks/usetime.mdx","fullPath":"content/docs/hooks/usetime.mdx"}, data: docs_153 }, { info: {"path":"hooks/usetimeout.mdx","fullPath":"content/docs/hooks/usetimeout.mdx"}, data: docs_154 }, { info: {"path":"hooks/usetimer.mdx","fullPath":"content/docs/hooks/usetimer.mdx"}, data: docs_155 }, { info: {"path":"hooks/usetoggle.mdx","fullPath":"content/docs/hooks/usetoggle.mdx"}, data: docs_156 }, { info: {"path":"hooks/useunmount.mdx","fullPath":"content/docs/hooks/useunmount.mdx"}, data: docs_157 }, { info: {"path":"hooks/useurlsearchparam.mdx","fullPath":"content/docs/hooks/useurlsearchparam.mdx"}, data: docs_158 }, { info: {"path":"hooks/useurlsearchparams.mdx","fullPath":"content/docs/hooks/useurlsearchparams.mdx"}, data: docs_159 }, { info: {"path":"hooks/usevibrate.mdx","fullPath":"content/docs/hooks/usevibrate.mdx"}, data: docs_160 }, { info: {"path":"hooks/usevirtualkeyboard.mdx","fullPath":"content/docs/hooks/usevirtualkeyboard.mdx"}, data: docs_161 }, { info: {"path":"hooks/usevisibility.mdx","fullPath":"content/docs/hooks/usevisibility.mdx"}, data: docs_162 }, { info: {"path":"hooks/usewakelock.mdx","fullPath":"content/docs/hooks/usewakelock.mdx"}, data: docs_163 }, { info: {"path":"hooks/usewebsocket.mdx","fullPath":"content/docs/hooks/usewebsocket.mdx"}, data: docs_164 }, { info: {"path":"hooks/usewindowevent.mdx","fullPath":"content/docs/hooks/usewindowevent.mdx"}, data: docs_165 }, { info: {"path":"hooks/usewindowfocus.mdx","fullPath":"content/docs/hooks/usewindowfocus.mdx"}, data: docs_166 }, { info: {"path":"hooks/usewindowscroll.mdx","fullPath":"content/docs/hooks/usewindowscroll.mdx"}, data: docs_167 }, { info: {"path":"hooks/usewindowsize.mdx","fullPath":"content/docs/hooks/usewindowsize.mdx"}, data: docs_168 }, { info: {"path":"hooks/usewizard.mdx","fullPath":"content/docs/hooks/usewizard.mdx"}, data: docs_169 }], [{"info":{"path":"meta.json","fullPath":"content/docs/meta.json"},"data":{"root":true}}, {"info":{"path":"hooks/useactiveelement.props.json","fullPath":"content/docs/hooks/useactiveelement.props.json"},"data":{"description":"Hook that returns the active element"}}, {"info":{"path":"hooks/useasync.props.json","fullPath":"content/docs/hooks/useasync.props.json"},"data":{"description":"Hook that provides the state of an async callback"}}, {"info":{"path":"hooks/useasynceffect.props.json","fullPath":"content/docs/hooks/useasynceffect.props.json"},"data":{"description":"Hook that triggers the effect callback on updates"}}, {"info":{"path":"hooks/useaudio.props.json","fullPath":"content/docs/hooks/useaudio.props.json"},"data":{"description":"Hook that manages audio playback with sprite support"}}, {"info":{"path":"hooks/useautoscroll.props.json","fullPath":"content/docs/hooks/useautoscroll.props.json"},"data":{"description":"Hook that automatically scrolls a list element to the bottom"}}, {"info":{"path":"hooks/usebatchedcallback.props.json","fullPath":"content/docs/hooks/usebatchedcallback.props.json"},"data":{"description":"Hook that batches calls and forwards them to a callback"}}, {"info":{"path":"hooks/usebattery.props.json","fullPath":"content/docs/hooks/usebattery.props.json"},"data":{"description":"Hook for getting information about battery status"}}, {"info":{"path":"hooks/usebluetooth.props.json","fullPath":"content/docs/hooks/usebluetooth.props.json"},"data":{"description":"Hook for getting information about bluetooth"}}, {"info":{"path":"hooks/useboolean.props.json","fullPath":"content/docs/hooks/useboolean.props.json"},"data":{"description":"Hook provides opportunity to manage boolean state"}}, {"info":{"path":"hooks/usebreakpoints.props.json","fullPath":"content/docs/hooks/usebreakpoints.props.json"},"data":{"description":"Hook that manages breakpoints"}}, {"info":{"path":"hooks/usebroadcastchannel.props.json","fullPath":"content/docs/hooks/usebroadcastchannel.props.json"},"data":{"description":"that provides cross-tab/window communication"}}, {"info":{"path":"hooks/usebrowserlanguage.props.json","fullPath":"content/docs/hooks/usebrowserlanguage.props.json"},"data":{"description":"Hook that returns the current browser language"}}, {"info":{"path":"hooks/useclickoutside.props.json","fullPath":"content/docs/hooks/useclickoutside.props.json"},"data":{"description":"Hook to handle click events outside the specified target element(s)"}}, {"info":{"path":"hooks/useclipboard.props.json","fullPath":"content/docs/hooks/useclipboard.props.json"},"data":{"description":"Hook that manages a copy to clipboard"}}, {"info":{"path":"hooks/useconst.props.json","fullPath":"content/docs/hooks/useconst.props.json"},"data":{"description":"Hook that returns the constant value"}}, {"info":{"path":"hooks/usecontrollablestate.props.json","fullPath":"content/docs/hooks/usecontrollablestate.props.json"},"data":{"description":"Hook that manages both controlled and uncontrolled state patterns"}}, {"info":{"path":"hooks/usecookie.props.json","fullPath":"content/docs/hooks/usecookie.props.json"},"data":{"description":"Hook that manages cookie value"}}, {"info":{"path":"hooks/usecookies.props.json","fullPath":"content/docs/hooks/usecookies.props.json"},"data":{"description":"Hook that manages cookie values"}}, {"info":{"path":"hooks/usecopy.props.json","fullPath":"content/docs/hooks/usecopy.props.json"},"data":{"description":"Hook that manages copying text with status reset"}}, {"info":{"path":"hooks/usecounter.props.json","fullPath":"content/docs/hooks/usecounter.props.json"},"data":{"description":"Hook that manages a counter"}}, {"info":{"path":"hooks/usecssvar.props.json","fullPath":"content/docs/hooks/usecssvar.props.json"},"data":{"description":"Hook that returns the value of a css variable"}}, {"info":{"path":"hooks/usedebouncecallback.props.json","fullPath":"content/docs/hooks/usedebouncecallback.props.json"},"data":{"description":"Hook that creates a debounced callback"}}, {"info":{"path":"hooks/usedebounceeffect.props.json","fullPath":"content/docs/hooks/usedebounceeffect.props.json"},"data":{"description":"Hook that runs an effect after a delay when dependencies change"}}, {"info":{"path":"hooks/usedebouncestate.props.json","fullPath":"content/docs/hooks/usedebouncestate.props.json"},"data":{"description":"Hook that creates a debounced state"}}, {"info":{"path":"hooks/usedebouncevalue.props.json","fullPath":"content/docs/hooks/usedebouncevalue.props.json"},"data":{"description":"Hook that creates a debounced value"}}, {"info":{"path":"hooks/usedefault.props.json","fullPath":"content/docs/hooks/usedefault.props.json"},"data":{"description":"Hook that returns the default value"}}, {"info":{"path":"hooks/usedevicemotion.props.json","fullPath":"content/docs/hooks/usedevicemotion.props.json"},"data":{"description":"Hook that work with device motion"}}, {"info":{"path":"hooks/usedeviceorientation.props.json","fullPath":"content/docs/hooks/usedeviceorientation.props.json"},"data":{"description":"Hook that provides the current device orientation"}}, {"info":{"path":"hooks/usedevicepixelratio.props.json","fullPath":"content/docs/hooks/usedevicepixelratio.props.json"},"data":{"description":"Hook that returns the device's pixel ratio"}}, {"info":{"path":"hooks/usedidupdate.props.json","fullPath":"content/docs/hooks/usedidupdate.props.json"},"data":{"description":"Hook that triggers the effect callback on updates"}}, {"info":{"path":"hooks/usedisclosure.props.json","fullPath":"content/docs/hooks/usedisclosure.props.json"},"data":{"description":"Hook that allows you to open and close a modal"}}, {"info":{"path":"hooks/usedisplaymedia.props.json","fullPath":"content/docs/hooks/usedisplaymedia.props.json"},"data":{"description":"Hook that provides screen sharing functionality"}}, {"info":{"path":"hooks/usedocumentevent.props.json","fullPath":"content/docs/hooks/usedocumentevent.props.json"},"data":{"description":"Hook attaches an event listener to the document object for the specified event"}}, {"info":{"path":"hooks/usedocumenttitle.props.json","fullPath":"content/docs/hooks/usedocumenttitle.props.json"},"data":{"description":"Hook that manages the document title and allows updating it"}}, {"info":{"path":"hooks/usedocumentvisibility.props.json","fullPath":"content/docs/hooks/usedocumentvisibility.props.json"},"data":{"description":"Hook that provides the current visibility state of the document"}}, {"info":{"path":"hooks/usedoubleclick.props.json","fullPath":"content/docs/hooks/usedoubleclick.props.json"},"data":{"description":"Hook that defines the logic when double clicking an element"}}, {"info":{"path":"hooks/usedropzone.props.json","fullPath":"content/docs/hooks/usedropzone.props.json"},"data":{"description":"Hook that provides drop zone functionality"}}, {"info":{"path":"hooks/useevent.props.json","fullPath":"content/docs/hooks/useevent.props.json"},"data":{"description":"Hook that creates an event and returns a stable reference of it"}}, {"info":{"path":"hooks/useeventlistener.props.json","fullPath":"content/docs/hooks/useeventlistener.props.json"},"data":{"description":"Hook that attaches an event listener to the specified target"}}, {"info":{"path":"hooks/useeventsource.props.json","fullPath":"content/docs/hooks/useeventsource.props.json"},"data":{"description":"Hook that provides a reactive wrapper for event source"}}, {"info":{"path":"hooks/useeyedropper.props.json","fullPath":"content/docs/hooks/useeyedropper.props.json"},"data":{"description":"Hook that gives you access to the eye dropper"}}, {"info":{"path":"hooks/usefavicon.props.json","fullPath":"content/docs/hooks/usefavicon.props.json"},"data":{"description":"Hook that manages the favicon"}}, {"info":{"path":"hooks/usefield.props.json","fullPath":"content/docs/hooks/usefield.props.json"},"data":{"description":"Hook to manage a form field"}}, {"info":{"path":"hooks/usefiledialog.props.json","fullPath":"content/docs/hooks/usefiledialog.props.json"},"data":{"description":"Hook to handle file input"}}, {"info":{"path":"hooks/usefocus.props.json","fullPath":"content/docs/hooks/usefocus.props.json"},"data":{"description":"Hook that allows you to focus on a specific element"}}, {"info":{"path":"hooks/usefocustrap.props.json","fullPath":"content/docs/hooks/usefocustrap.props.json"},"data":{"description":"Hook that traps focus within a given element"}}, {"info":{"path":"hooks/usefps.props.json","fullPath":"content/docs/hooks/usefps.props.json"},"data":{"description":"Hook that measures frames per second"}}, {"info":{"path":"hooks/useful.props.json","fullPath":"content/docs/hooks/useful.props.json"},"data":{"description":"Hook that can be so useful"}}, {"info":{"path":"hooks/usefullscreen.props.json","fullPath":"content/docs/hooks/usefullscreen.props.json"},"data":{"description":"Hook to handle fullscreen events"}}, {"info":{"path":"hooks/usegamepad.props.json","fullPath":"content/docs/hooks/usegamepad.props.json"},"data":{"description":"Hook for getting information about gamepad"}}, {"info":{"path":"hooks/usegeolocation.props.json","fullPath":"content/docs/hooks/usegeolocation.props.json"},"data":{"description":"Hook that returns the current geolocation"}}, {"info":{"path":"hooks/usehash.props.json","fullPath":"content/docs/hooks/usehash.props.json"},"data":{"description":"Hook that manages the hash value"}}, {"info":{"path":"hooks/usehotkeys.props.json","fullPath":"content/docs/hooks/usehotkeys.props.json"},"data":{"description":"Hook that listens for hotkeys"}}, {"info":{"path":"hooks/usehover.props.json","fullPath":"content/docs/hooks/usehover.props.json"},"data":{"description":"Hook that defines the logic when hovering an element"}}, {"info":{"path":"hooks/useidle.props.json","fullPath":"content/docs/hooks/useidle.props.json"},"data":{"description":"Hook that defines the logic when the user is idle"}}, {"info":{"path":"hooks/useimage.props.json","fullPath":"content/docs/hooks/useimage.props.json"},"data":{"description":"Hook that load an image in the browser"}}, {"info":{"path":"hooks/useinfinitescroll.props.json","fullPath":"content/docs/hooks/useinfinitescroll.props.json"},"data":{"description":"Hook that defines the logic for infinite scroll"}}, {"info":{"path":"hooks/useintersectionobserver.props.json","fullPath":"content/docs/hooks/useintersectionobserver.props.json"},"data":{"description":"Hook that gives you intersection observer state"}}, {"info":{"path":"hooks/useinterval.props.json","fullPath":"content/docs/hooks/useinterval.props.json"},"data":{"description":"Hook that makes and interval and returns controlling functions"}}, {"info":{"path":"hooks/useisfirstrender.props.json","fullPath":"content/docs/hooks/useisfirstrender.props.json"},"data":{"description":"Hook that returns true if the component is first render"}}, {"info":{"path":"hooks/useisomorphiclayouteffect.props.json","fullPath":"content/docs/hooks/useisomorphiclayouteffect.props.json"},"data":{"description":"Hook conditionally selects either `useLayoutEffect` or `useEffect` based on the environment"}}, {"info":{"path":"hooks/usekeyboard.props.json","fullPath":"content/docs/hooks/usekeyboard.props.json"},"data":{"description":"Hook that helps to listen for keyboard events"}}, {"info":{"path":"hooks/usekeypress.props.json","fullPath":"content/docs/hooks/usekeypress.props.json"},"data":{"description":"Hook that listens for key press events"}}, {"info":{"path":"hooks/usekeypressevent.props.json","fullPath":"content/docs/hooks/usekeypressevent.props.json"},"data":{"description":"Hook that listens for key press events on specified targets"}}, {"info":{"path":"hooks/usekeyspressed.props.json","fullPath":"content/docs/hooks/usekeyspressed.props.json"},"data":{"description":"all currently pressed keyboard keys and their codes"}}, {"info":{"path":"hooks/uselastchanged.props.json","fullPath":"content/docs/hooks/uselastchanged.props.json"},"data":{"description":"Hook for records the timestamp of the last change"}}, {"info":{"path":"hooks/uselatest.props.json","fullPath":"content/docs/hooks/uselatest.props.json"},"data":{"description":"Hook that returns the stable reference of the value"}}, {"info":{"path":"hooks/useless.props.json","fullPath":"content/docs/hooks/useless.props.json"},"data":{"description":"Hook that can be so useless"}}, {"info":{"path":"hooks/uselist.props.json","fullPath":"content/docs/hooks/uselist.props.json"},"data":{"description":"Hook that provides state and helper methods to manage a list of items"}}, {"info":{"path":"hooks/uselocalstorage.props.json","fullPath":"content/docs/hooks/uselocalstorage.props.json"},"data":{"description":"Hook that manages local storage value"}}, {"info":{"path":"hooks/uselockcallback.props.json","fullPath":"content/docs/hooks/uselockcallback.props.json"},"data":{"description":"Hook that prevents a callback from being executed multiple times simultaneously"}}, {"info":{"path":"hooks/uselockscroll.props.json","fullPath":"content/docs/hooks/uselockscroll.props.json"},"data":{"description":"Hook that locks scroll on an element or document body"}}, {"info":{"path":"hooks/uselogger.props.json","fullPath":"content/docs/hooks/uselogger.props.json"},"data":{"description":"Hook for debugging lifecycle"}}, {"info":{"path":"hooks/uselongpress.props.json","fullPath":"content/docs/hooks/uselongpress.props.json"},"data":{"description":"Hook that defines the logic when long pressing an element"}}, {"info":{"path":"hooks/usemap.props.json","fullPath":"content/docs/hooks/usemap.props.json"},"data":{"description":"Hook that manages a map structure"}}, {"info":{"path":"hooks/usemeasure.props.json","fullPath":"content/docs/hooks/usemeasure.props.json"},"data":{"description":"Hook to measure the size and position of an element"}}, {"info":{"path":"hooks/usemediacontrols.props.json","fullPath":"content/docs/hooks/usemediacontrols.props.json"},"data":{"description":"that provides controls for HTML media elements (audio/video)"}}, {"info":{"path":"hooks/usemediaquery.props.json","fullPath":"content/docs/hooks/usemediaquery.props.json"},"data":{"description":"Hook that manages a media query"}}, {"info":{"path":"hooks/usememory.props.json","fullPath":"content/docs/hooks/usememory.props.json"},"data":{"description":"Hook that gives you current memory usage"}}, {"info":{"path":"hooks/usemergedref.props.json","fullPath":"content/docs/hooks/usemergedref.props.json"},"data":{"description":"Hook that merges multiple refs into a single ref"}}, {"info":{"path":"hooks/usemount.props.json","fullPath":"content/docs/hooks/usemount.props.json"},"data":{"description":"Hook that executes a callback when the component mounts"}}, {"info":{"path":"hooks/usemouse.props.json","fullPath":"content/docs/hooks/usemouse.props.json"},"data":{"description":"Hook that manages a mouse position"}}, {"info":{"path":"hooks/usemutation.props.json","fullPath":"content/docs/hooks/usemutation.props.json"},"data":{"description":"Hook that defines the logic when mutate data"}}, {"info":{"path":"hooks/usemutationobserver.props.json","fullPath":"content/docs/hooks/usemutationobserver.props.json"},"data":{"description":"Hook that gives you mutation observer state"}}, {"info":{"path":"hooks/usenetwork.props.json","fullPath":"content/docs/hooks/usenetwork.props.json"},"data":{"description":"Hook to track network status"}}, {"info":{"path":"hooks/useobject.props.json","fullPath":"content/docs/hooks/useobject.props.json"},"data":{"description":"Hook that provides state and helper methods to manage an object"}}, {"info":{"path":"hooks/useoffsetpagination.props.json","fullPath":"content/docs/hooks/useoffsetpagination.props.json"},"data":{"description":"Hook that defines the logic when pagination"}}, {"info":{"path":"hooks/useonce.props.json","fullPath":"content/docs/hooks/useonce.props.json"},"data":{"description":"Hook that runs an effect only once. Please do not use it in production code!"}}, {"info":{"path":"hooks/useonline.props.json","fullPath":"content/docs/hooks/useonline.props.json"},"data":{"description":"Hook that manages if the user is online"}}, {"info":{"path":"hooks/useoperatingsystem.props.json","fullPath":"content/docs/hooks/useoperatingsystem.props.json"},"data":{"description":"Hook that returns the operating system of the current browser"}}, {"info":{"path":"hooks/useoptimistic.props.json","fullPath":"content/docs/hooks/useoptimistic.props.json"},"data":{"description":"Hook that allows get optimistic value before its update"}}, {"info":{"path":"hooks/useorientation.props.json","fullPath":"content/docs/hooks/useorientation.props.json"},"data":{"description":"Hook that provides the current screen orientation"}}, {"info":{"path":"hooks/useotpcredential.props.json","fullPath":"content/docs/hooks/useotpcredential.props.json"},"data":{"description":"Hook that creates an otp credential"}}, {"info":{"path":"hooks/usepageleave.props.json","fullPath":"content/docs/hooks/usepageleave.props.json"},"data":{"description":"Hook what calls given function when mouse leaves the page"}}, {"info":{"path":"hooks/usepaint.props.json","fullPath":"content/docs/hooks/usepaint.props.json"},"data":{"description":"Hook that allows you to draw in a specific area"}}, {"info":{"path":"hooks/useparallax.props.json","fullPath":"content/docs/hooks/useparallax.props.json"},"data":{"description":"Hook to help create parallax effect"}}, {"info":{"path":"hooks/useperformanceobserver.props.json","fullPath":"content/docs/hooks/useperformanceobserver.props.json"},"data":{"description":"Hook that allows you to observe performance entries"}}, {"info":{"path":"hooks/usepermission.props.json","fullPath":"content/docs/hooks/usepermission.props.json"},"data":{"description":"Hook that gives you the state of permission"}}, {"info":{"path":"hooks/usepictureinpicture.props.json","fullPath":"content/docs/hooks/usepictureinpicture.props.json"},"data":{"description":"Hook that provides Picture-in-Picture functionality for video elements"}}, {"info":{"path":"hooks/usepointerlock.props.json","fullPath":"content/docs/hooks/usepointerlock.props.json"},"data":{"description":"Hook that provides reactive pointer lock"}}, {"info":{"path":"hooks/usepostmessage.props.json","fullPath":"content/docs/hooks/usepostmessage.props.json"},"data":{"description":"Hook that allows you to receive messages from other origins"}}, {"info":{"path":"hooks/usepreferredcolorscheme.props.json","fullPath":"content/docs/hooks/usepreferredcolorscheme.props.json"},"data":{"description":"Hook that returns user preferred color scheme"}}, {"info":{"path":"hooks/usepreferredcontrast.props.json","fullPath":"content/docs/hooks/usepreferredcontrast.props.json"},"data":{"description":"Hook that returns the contrast preference"}}, {"info":{"path":"hooks/usepreferreddark.props.json","fullPath":"content/docs/hooks/usepreferreddark.props.json"},"data":{"description":"Hook that returns if the user prefers dark mode"}}, {"info":{"path":"hooks/usepreferredlanguages.props.json","fullPath":"content/docs/hooks/usepreferredlanguages.props.json"},"data":{"description":"that returns a browser preferred languages from navigator"}}, {"info":{"path":"hooks/usepreferredreducedmotion.props.json","fullPath":"content/docs/hooks/usepreferredreducedmotion.props.json"},"data":{"description":"Hook that returns the reduced motion preference"}}, {"info":{"path":"hooks/useprevious.props.json","fullPath":"content/docs/hooks/useprevious.props.json"},"data":{"description":"Hook that returns the previous value"}}, {"info":{"path":"hooks/useprogress.props.json","fullPath":"content/docs/hooks/useprogress.props.json"},"data":{"description":"Hook that creates a lightweight progress bar"}}, {"info":{"path":"hooks/usequery.props.json","fullPath":"content/docs/hooks/usequery.props.json"},"data":{"description":"Hook that defines the logic when query data"}}, {"info":{"path":"hooks/usequeue.props.json","fullPath":"content/docs/hooks/usequeue.props.json"},"data":{"description":"Hook that manages a queue"}}, {"info":{"path":"hooks/useraf.props.json","fullPath":"content/docs/hooks/useraf.props.json"},"data":{"description":"Hook that defines the logic for raf callback"}}, {"info":{"path":"hooks/userafstate.props.json","fullPath":"content/docs/hooks/userafstate.props.json"},"data":{"description":"Hook that returns the value and a function to set the value"}}, {"info":{"path":"hooks/userefstate.props.json","fullPath":"content/docs/hooks/userefstate.props.json"},"data":{"description":"Hook that returns the state reference of the value"}}, {"info":{"path":"hooks/userendercount.props.json","fullPath":"content/docs/hooks/userendercount.props.json"},"data":{"description":"Hook returns count component render times"}}, {"info":{"path":"hooks/userenderinfo.props.json","fullPath":"content/docs/hooks/userenderinfo.props.json"},"data":{"description":"Hook for getting information about component rerender"}}, {"info":{"path":"hooks/usererender.props.json","fullPath":"content/docs/hooks/usererender.props.json"},"data":{"description":"Hook that defines the logic to force rerender a component"}}, {"info":{"path":"hooks/useresizeobserver.props.json","fullPath":"content/docs/hooks/useresizeobserver.props.json"},"data":{"description":"Hook that gives you resize observer state"}}, {"info":{"path":"hooks/userightclick.props.json","fullPath":"content/docs/hooks/userightclick.props.json"},"data":{"description":"Hook that handles right-click events and long press on mobile devices"}}, {"info":{"path":"hooks/usescript.props.json","fullPath":"content/docs/hooks/usescript.props.json"},"data":{"description":"Hook that manages a script with onLoad, onError, and removeOnUnmount functionalities"}}, {"info":{"path":"hooks/usescroll.props.json","fullPath":"content/docs/hooks/usescroll.props.json"},"data":{"description":"Hook that allows you to control scroll a element"}}, {"info":{"path":"hooks/usescrollintoview.props.json","fullPath":"content/docs/hooks/usescrollintoview.props.json"},"data":{"description":"Hook that provides functionality to scroll an element into view"}}, {"info":{"path":"hooks/usescrollto.props.json","fullPath":"content/docs/hooks/usescrollto.props.json"},"data":{"description":"Hook for scrolling to a specific element"}}, {"info":{"path":"hooks/usesessionstorage.props.json","fullPath":"content/docs/hooks/usesessionstorage.props.json"},"data":{"description":"Hook that manages session storage value"}}, {"info":{"path":"hooks/useset.props.json","fullPath":"content/docs/hooks/useset.props.json"},"data":{"description":"Hook that manages a set structure"}}, {"info":{"path":"hooks/useshalloweffect.props.json","fullPath":"content/docs/hooks/useshalloweffect.props.json"},"data":{"description":"Hook that executes an effect only when dependencies change shallowly or deeply"}}, {"info":{"path":"hooks/useshare.props.json","fullPath":"content/docs/hooks/useshare.props.json"},"data":{"description":"Hook that utilizes the share api"}}, {"info":{"path":"hooks/usesize.props.json","fullPath":"content/docs/hooks/usesize.props.json"},"data":{"description":"Hook that observes and returns the width and height of element"}}, {"info":{"path":"hooks/usespeechrecognition.props.json","fullPath":"content/docs/hooks/usespeechrecognition.props.json"},"data":{"description":"Hook that provides a streamlined interface for incorporating speech-to-text functionality"}}, {"info":{"path":"hooks/usespeechsynthesis.props.json","fullPath":"content/docs/hooks/usespeechsynthesis.props.json"},"data":{"description":"Hook that provides speech synthesis functionality"}}, {"info":{"path":"hooks/usestatehistory.props.json","fullPath":"content/docs/hooks/usestatehistory.props.json"},"data":{"description":"Hook that manages state with history functionality"}}, {"info":{"path":"hooks/usestep.props.json","fullPath":"content/docs/hooks/usestep.props.json"},"data":{"description":"Hook that create stepper"}}, {"info":{"path":"hooks/usesticky.props.json","fullPath":"content/docs/hooks/usesticky.props.json"},"data":{"description":"Hook that allows you to detect that your sticky component is stuck"}}, {"info":{"path":"hooks/usestopwatch.props.json","fullPath":"content/docs/hooks/usestopwatch.props.json"},"data":{"description":"Hook that creates a stopwatch functionality"}}, {"info":{"path":"hooks/usestorage.props.json","fullPath":"content/docs/hooks/usestorage.props.json"},"data":{"description":"Hook that manages storage value"}}, {"info":{"path":"hooks/usetextareaautosize.props.json","fullPath":"content/docs/hooks/usetextareaautosize.props.json"},"data":{"description":"Hook that automatically adjusts textarea height based on content"}}, {"info":{"path":"hooks/usetextdirection.props.json","fullPath":"content/docs/hooks/usetextdirection.props.json"},"data":{"description":"Hook that can get and set the direction of the element"}}, {"info":{"path":"hooks/usetextselection.props.json","fullPath":"content/docs/hooks/usetextselection.props.json"},"data":{"description":"Hook that manages the text selection"}}, {"info":{"path":"hooks/usethrottlecallback.props.json","fullPath":"content/docs/hooks/usethrottlecallback.props.json"},"data":{"description":"Hook that creates a throttled callback"}}, {"info":{"path":"hooks/usethrottleeffect.props.json","fullPath":"content/docs/hooks/usethrottleeffect.props.json"},"data":{"description":"Hook that runs an effect at most once per delay period when dependencies change"}}, {"info":{"path":"hooks/usethrottlestate.props.json","fullPath":"content/docs/hooks/usethrottlestate.props.json"},"data":{"description":"Hook that creates a throttled state"}}, {"info":{"path":"hooks/usethrottlevalue.props.json","fullPath":"content/docs/hooks/usethrottlevalue.props.json"},"data":{"description":"Hook that creates a throttled value"}}, {"info":{"path":"hooks/usetime.props.json","fullPath":"content/docs/hooks/usetime.props.json"},"data":{"description":"Hook that gives you current time in different values"}}, {"info":{"path":"hooks/usetimeout.props.json","fullPath":"content/docs/hooks/usetimeout.props.json"},"data":{"description":"Hook that executes a callback function after a specified delay"}}, {"info":{"path":"hooks/usetimer.props.json","fullPath":"content/docs/hooks/usetimer.props.json"},"data":{"description":"Hook that creates a timer functionality"}}, {"info":{"path":"hooks/usetoggle.props.json","fullPath":"content/docs/hooks/usetoggle.props.json"},"data":{"description":"Hook that create toggle"}}, {"info":{"path":"hooks/useunmount.props.json","fullPath":"content/docs/hooks/useunmount.props.json"},"data":{"description":"Hook that defines the logic when unmounting a component"}}, {"info":{"path":"hooks/useurlsearchparam.props.json","fullPath":"content/docs/hooks/useurlsearchparam.props.json"},"data":{"description":"Hook that provides reactive URLSearchParams for a single key"}}, {"info":{"path":"hooks/useurlsearchparams.props.json","fullPath":"content/docs/hooks/useurlsearchparams.props.json"},"data":{"description":"Hook that provides reactive URLSearchParams"}}, {"info":{"path":"hooks/usevibrate.props.json","fullPath":"content/docs/hooks/usevibrate.props.json"},"data":{"description":"Hook that provides vibrate api"}}, {"info":{"path":"hooks/usevirtualkeyboard.props.json","fullPath":"content/docs/hooks/usevirtualkeyboard.props.json"},"data":{"description":"Hook that manages virtual keyboard state"}}, {"info":{"path":"hooks/usevisibility.props.json","fullPath":"content/docs/hooks/usevisibility.props.json"},"data":{"description":"Hook that gives you visibility observer state"}}, {"info":{"path":"hooks/usewakelock.props.json","fullPath":"content/docs/hooks/usewakelock.props.json"},"data":{"description":"Hook that provides a wake lock functionality"}}, {"info":{"path":"hooks/usewebsocket.props.json","fullPath":"content/docs/hooks/usewebsocket.props.json"},"data":{"description":"Hook that connects to a WebSocket server and handles incoming and outgoing messages"}}, {"info":{"path":"hooks/usewindowevent.props.json","fullPath":"content/docs/hooks/usewindowevent.props.json"},"data":{"description":"Hook attaches an event listener to the window object for the specified event"}}, {"info":{"path":"hooks/usewindowfocus.props.json","fullPath":"content/docs/hooks/usewindowfocus.props.json"},"data":{"description":"Hook that provides the current focus state of the window"}}, {"info":{"path":"hooks/usewindowscroll.props.json","fullPath":"content/docs/hooks/usewindowscroll.props.json"},"data":{"description":"Hook that manages the window scroll position"}}, {"info":{"path":"hooks/usewindowsize.props.json","fullPath":"content/docs/hooks/usewindowsize.props.json"},"data":{"description":"Hook that manages a window size"}}, {"info":{"path":"hooks/usewizard.props.json","fullPath":"content/docs/hooks/usewizard.props.json"},"data":{"description":"Hook that manages a wizard"}}]) \ No newline at end of file diff --git a/packages/docs-v2/.source/source.config.mjs b/packages/docs-v2/.source/source.config.mjs new file mode 100644 index 00000000..3b4e37b0 --- /dev/null +++ b/packages/docs-v2/.source/source.config.mjs @@ -0,0 +1,79 @@ +// source.config.ts +import { defineConfig, defineDocs } from "fumadocs-mdx/config"; + +// lib/highlight-code.ts +import { LRUCache } from "lru-cache"; +import { codeToHtml } from "shiki"; +var highlightCache = new LRUCache({ + max: 500, + ttl: 1e3 * 60 * 60 + // 1 hour. +}); +var transformers = [ + { + code(node) { + if (node.tagName === "code") { + const raw = this.source; + node.properties["__raw__"] = raw; + if (raw.startsWith("npm install")) { + node.properties["__npm__"] = raw; + node.properties["__yarn__"] = raw.replace("npm install", "yarn add"); + node.properties["__pnpm__"] = raw.replace("npm install", "pnpm add"); + node.properties["__bun__"] = raw.replace("npm install", "bun add"); + } + if (raw.startsWith("npx create-")) { + node.properties["__npm__"] = raw; + node.properties["__yarn__"] = raw.replace("npx create-", "yarn create "); + node.properties["__pnpm__"] = raw.replace("npx create-", "pnpm create "); + node.properties["__bun__"] = raw.replace("npx", "bunx --bun"); + } + if (raw.startsWith("npm create")) { + node.properties["__npm__"] = raw; + node.properties["__yarn__"] = raw.replace("npm create", "yarn create"); + node.properties["__pnpm__"] = raw.replace("npm create", "pnpm create"); + node.properties["__bun__"] = raw.replace("npm create", "bun create"); + } + if (raw.startsWith("npx")) { + node.properties["__npm__"] = raw; + node.properties["__yarn__"] = raw.replace("npx", "yarn"); + node.properties["__pnpm__"] = raw.replace("npx", "pnpm dlx"); + node.properties["__bun__"] = raw.replace("npx", "bunx --bun"); + } + if (raw.startsWith("npm run")) { + node.properties["__npm__"] = raw; + node.properties["__yarn__"] = raw.replace("npm run", "yarn"); + node.properties["__pnpm__"] = raw.replace("npm run", "pnpm"); + node.properties["__bun__"] = raw.replace("npm run", "bun"); + } + } + } + } +]; + +// source.config.ts +import rehypePrettyCode from "rehype-pretty-code"; +var source_config_default = defineConfig({ + mdxOptions: { + rehypePlugins: (plugins) => { + plugins.shift(); + plugins.push([ + rehypePrettyCode, + { + theme: { + dark: "github-dark", + light: "github-light-default" + }, + transformers + } + ]); + return plugins; + } + } +}); +var docs = defineDocs({ + dir: "content/docs" +}); +export { + source_config_default as default, + docs +}; diff --git a/packages/docs-v2/app/(app)/(root)/page.tsx b/packages/docs-v2/app/(app)/(root)/page.tsx new file mode 100644 index 00000000..1935f731 --- /dev/null +++ b/packages/docs-v2/app/(app)/(root)/page.tsx @@ -0,0 +1,107 @@ +import { + PageActions, + PageHeader, + PageHeaderDescription, + PageHeaderHeading +} from '@/components/page-header'; +import { Button } from '@/components/ui/button'; +import { type Metadata } from 'next'; +import Image from 'next/image'; +import Link from 'next/link'; + +const title = 'reactuse'; + +const description = + 'Improve your react applications with our library 📦 designed for comfort and speed'; + +const cardsData = [ + { + title: 'Lightweight & Scalable', + details: + 'Hooks are lightweight and easy to use, making it simple to integrate into any project.', + icon: <> + }, + { + title: 'Clean & consistent', + details: 'Hooks follow a unified approach for consistency and maintainability.', + icon: <> + }, + { + title: 'Customizable', + details: 'Install and customize hooks effortlessly using our CLI', + icon: <> + }, + { + title: 'Large collection', + details: + 'Extensive collection of hooks for all your needs, from state management to browser APIs.', + icon: <> + }, + { + title: 'Tree shakable', + details: + 'The hooks are tree shakable, so you only import the hooks you need in your application.', + icon: <> + }, + { + title: 'Active community', + details: 'Join our active community on Github and help make reactuse even better.', + icon: <> + } +]; + +export const metadata: Metadata = { + title, + description +}; + +export default function IndexPage() { + return ( +
+ + {title} + {description} + + + + + +
+ {cardsData.map((card) => { + const Icon = card.icon; + return ( +
+
+
+
+

{card.title}

+

{card.details}

+
+ ); + })} +
+
+
Team & Contributors
+
+ +
+ SIBERIA CAN CODE +
SIBERIA CAN CODE
+
+ +
+
+
+
+ ); +} diff --git a/packages/docs-v2/app/(app)/layout.tsx b/packages/docs-v2/app/(app)/layout.tsx new file mode 100644 index 00000000..772b2913 --- /dev/null +++ b/packages/docs-v2/app/(app)/layout.tsx @@ -0,0 +1,13 @@ +import { SiteHeader } from "@/components/site-header" + +export default function AppLayout({ children }: { children: React.ReactNode }) { + return ( +
+ +
{children}
+
+ ) +} diff --git a/packages/docs-v2/app/api/search/route.ts b/packages/docs-v2/app/api/search/route.ts new file mode 100644 index 00000000..3bafe9c5 --- /dev/null +++ b/packages/docs-v2/app/api/search/route.ts @@ -0,0 +1,5 @@ +import { createFromSource } from "fumadocs-core/search/server" + +import { source } from "@/lib/source" + +export const { GET } = createFromSource(source) diff --git a/packages/docs-v2/app/docs/[[...slug]]/page.tsx b/packages/docs-v2/app/docs/[[...slug]]/page.tsx new file mode 100644 index 00000000..4cd3b8b3 --- /dev/null +++ b/packages/docs-v2/app/docs/[[...slug]]/page.tsx @@ -0,0 +1,154 @@ +import Link from 'next/link'; +import { notFound } from 'next/navigation'; +import { mdxComponents } from '@/mdx-components'; +import { IconArrowLeft, IconArrowRight } from '@tabler/icons-react'; +import { findNeighbour } from 'fumadocs-core/page-tree'; + +import { source } from '@/lib/source'; +import { absoluteUrl } from '@/lib/utils'; +import { Button } from '@/ui/button'; +import { DocsCopyPage } from '@/components/docs-copy-page'; +import { DocsTableOfContents } from '@/components/docs-toc'; + +export const revalidate = false; +export const dynamic = 'force-static'; +export const dynamicParams = false; + +export function generateStaticParams() { + return source.generateParams(); +} + +export async function generateMetadata(props: { params: Promise<{ slug: string[] }> }) { + const params = await props.params; + const page = source.getPage(params.slug); + + if (!page) { + notFound(); + } + + const doc = page.data; + + if (!doc.title || !doc.description) { + notFound(); + } + + return { + title: doc.title, + description: doc.description, + twitter: { + card: 'summary_large_image', + title: doc.title, + description: doc.description, + images: [ + { + url: `/og?title=${encodeURIComponent( + doc.title + )}&description=${encodeURIComponent(doc.description)}` + } + ] + } + }; +} + +export default async function Page(props: { params: Promise<{ slug: string[] }> }) { + const params = await props.params; + const page = source.getPage(params.slug); + if (!page) { + notFound(); + } + + const doc = page.data; + const MDX = doc.body; + const isChangelog = params.slug?.[0] === 'changelog'; + const neighbours = isChangelog + ? { previous: null, next: null } + : findNeighbour(source.pageTree, page.url); + const raw = await page.data.getText('raw'); + + return ( +
+
+
+
+
+
+
+

+ {doc.title} +

+
+
+ +
+
+ {neighbours.previous && ( + + )} + {neighbours.next && ( + + )} +
+
+
+ {doc.description && ( +

+ {doc.description} +

+ )} +
+
+
+ +
+
+ {neighbours.previous && ( + + )} + {neighbours.next && ( + + )} +
+
+
+
+
+ {doc.toc?.length && ( +
+ +
+ )} +
+
+ ); +} diff --git a/packages/docs-v2/app/docs/layout.tsx b/packages/docs-v2/app/docs/layout.tsx new file mode 100644 index 00000000..e614cb8d --- /dev/null +++ b/packages/docs-v2/app/docs/layout.tsx @@ -0,0 +1,33 @@ +// import { DocsLayout } from 'fumadocs-ui/layouts/docs'; +// import type { ReactNode } from 'react'; +// import { source } from '@/lib/source'; + +// export default function Layout({ children }: { children: ReactNode }) { +// return {children}; +// } + +import { source } from '@/lib/source'; +import { DocsSidebar } from '@/components/docs-sidebar'; +import { SidebarProvider } from '@/ui/sidebar'; +import { SiteHeader } from '@/components/site-header'; + +export default function DocsLayout({ children }: { children: React.ReactNode }) { + return ( + <> + +
+ + +
{children}
+
+
+ + ); +} diff --git a/packages/docs-v2/app/layout.tsx b/packages/docs-v2/app/layout.tsx new file mode 100644 index 00000000..0520efa7 --- /dev/null +++ b/packages/docs-v2/app/layout.tsx @@ -0,0 +1,22 @@ +import type { ReactNode } from 'react'; +import { ThemeProvider } from '@/components/theme-provider'; +import { TooltipProvider } from '@/ui/tooltip'; + +import { Geist } from 'next/font/google'; +import { cn } from '@/lib/utils'; + +import '@/styles/global.css'; + +const geist = Geist({ subsets: ['latin'], variable: '--font-sans' }); + +export default function Layout({ children }: { children: ReactNode }) { + return ( + + + + {children} + + + + ); +} diff --git a/packages/docs-v2/components.json b/packages/docs-v2/components.json new file mode 100644 index 00000000..c8563259 --- /dev/null +++ b/packages/docs-v2/components.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": true, + "tsx": true, + "tailwind": { + "css": "app/globals.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} diff --git a/packages/docs-v2/components/callout.tsx b/packages/docs-v2/components/callout.tsx new file mode 100644 index 00000000..13c8760b --- /dev/null +++ b/packages/docs-v2/components/callout.tsx @@ -0,0 +1,29 @@ +import { cn } from '@/lib/utils'; +import { Alert, AlertDescription, AlertTitle } from '@/ui/alert'; + +export function Callout({ + title, + children, + icon, + className, + variant = 'default', + ...props +}: React.ComponentProps & { + icon?: React.ReactNode; + variant?: 'default' | 'info' | 'warning'; +}) { + return ( + + {icon} + {title && {title}} + {children} + + ); +} diff --git a/packages/docs-v2/components/code-block-command.tsx b/packages/docs-v2/components/code-block-command.tsx new file mode 100644 index 00000000..1687e3ff --- /dev/null +++ b/packages/docs-v2/components/code-block-command.tsx @@ -0,0 +1,97 @@ +'use client'; + +import * as React from 'react'; +import { IconCheck, IconCopy, IconTerminal } from '@tabler/icons-react'; +import { copyToClipboardWithMeta } from '@/components/copy-button'; +import { Button } from '@/ui/button'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/ui/tabs'; + +export function CodeBlockCommand({ + __npm__, + __yarn__, + __pnpm__, + __bun__ +}: React.ComponentProps<'pre'> & { + __npm__?: string; + __yarn__?: string; + __pnpm__?: string; + __bun__?: string; +}) { + const [hasCopied, setHasCopied] = React.useState(false); + + React.useEffect(() => { + if (hasCopied) { + const timer = setTimeout(() => setHasCopied(false), 2000); + return () => clearTimeout(timer); + } + }, [hasCopied]); + + const packageManager = 'pnpm'; + const tabs = React.useMemo(() => { + return { + pnpm: __pnpm__, + npm: __npm__, + yarn: __yarn__, + bun: __bun__ + }; + }, [__npm__, __pnpm__, __yarn__, __bun__]); + + const copyCommand = React.useCallback(() => { + const command = tabs[packageManager]; + + if (!command) { + return; + } + + copyToClipboardWithMeta(command); + setHasCopied(true); + }, [packageManager, tabs]); + + return ( +
+ +
+
+ +
+ + {Object.entries(tabs).map(([key]) => { + return ( + + {key} + + ); + })} + +
+
+ {Object.entries(tabs).map(([key, value]) => { + return ( + +
+                  
+                    {value}
+                  
+                
+
+ ); + })} +
+
+ +
+ ); +} diff --git a/packages/docs-v2/components/code.tsx b/packages/docs-v2/components/code.tsx new file mode 100644 index 00000000..9a9558bb --- /dev/null +++ b/packages/docs-v2/components/code.tsx @@ -0,0 +1,19 @@ +import { highlightCode } from '@/lib/highlight-code'; +import { CodeBlock, Pre } from 'fumadocs-ui/components/codeblock'; + +interface Props { + code: string; +} + +export const Code = async (props: Props) => { + const html = await highlightCode(props.code); + + return ( + +
+ + ); +}; diff --git a/packages/docs-v2/components/command-menu.tsx b/packages/docs-v2/components/command-menu.tsx new file mode 100644 index 00000000..f7c9f0fe --- /dev/null +++ b/packages/docs-v2/components/command-menu.tsx @@ -0,0 +1,146 @@ +'use client'; +import { useMemo, useState } from 'react'; +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, + DialogTrigger +} from './ui/dialog'; +import { Button } from './ui/button'; +import { cn } from '@/lib/utils'; +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList +} from './ui/command'; +import { useDocsSearch } from 'fumadocs-core/search/client'; +import { useDebouncedCallback } from '@/hooks/use-debounced-callback'; +import { usePathname, useRouter } from 'next/navigation'; +import { Spinner } from './spinner'; +import { getCurrentBase, getPagesFromFolder } from '@/lib/page-tree'; +import { source } from '@/lib/source'; + +interface Props { + tree: typeof source.pageTree; + navItems: { href: string; label: string }[]; +} + +export const CommandMenu = (props: Props) => { + const { tree, navItems } = props; + + const router = useRouter(); + const pathname = usePathname(); + const currentBase = getCurrentBase(pathname); + const [open, setOpen] = useState(false); + + const { setSearch, query } = useDocsSearch({ + type: 'fetch' + }); + + const handleChangeSearch = useDebouncedCallback((value: string) => { + setSearch(value); + }, 500); + + const pageGroupsSection = useMemo(() => { + return tree.children.map((group) => { + if (group.type !== 'folder') { + return null; + } + + const pages = getPagesFromFolder(group, currentBase); + + if (pages.length === 0) { + return null; + } + + return ( + + {pages.map((item) => { + return ( + handleRedirect(item.url)} + > + {item.name} + + ); + })} + + ); + }); + }, [tree.children, currentBase, router]); + + const handleRedirect = (href: string) => { + router.push(href); + setOpen(false); + }; + + return ( + + + + + + + Search documentation... + Search for a command to run... + + +
+ + {query.isLoading && ( +
+ +
+ )} +
+ + + {query.isLoading ? 'Searching...' : 'No results found.'} + + + {navItems.map((item) => ( + handleRedirect(item.href)} + > + {item.label} + + ))} + + {pageGroupsSection} + +
+
+
+ ); +}; diff --git a/packages/docs-v2/components/copy-button.tsx b/packages/docs-v2/components/copy-button.tsx new file mode 100644 index 00000000..0494b227 --- /dev/null +++ b/packages/docs-v2/components/copy-button.tsx @@ -0,0 +1,52 @@ +'use client'; + +import * as React from 'react'; +import { IconCheck, IconCopy } from '@tabler/icons-react'; + +import { cn } from '@/lib/utils'; +import { Button } from '@/ui/button'; + +export function copyToClipboardWithMeta(value: string) { + navigator.clipboard.writeText(value); +} + +export function CopyButton({ + value, + className, + variant = 'ghost', + ...props +}: React.ComponentProps & { + value: string; + src?: string; + tooltip?: string; +}) { + const [hasCopied, setHasCopied] = React.useState(false); + + React.useEffect(() => { + if (hasCopied) { + const timer = setTimeout(() => setHasCopied(false), 2000); + return () => clearTimeout(timer); + } + }, [hasCopied]); + + return ( + + ); +} diff --git a/packages/docs-v2/components/demo.tsx b/packages/docs-v2/components/demo.tsx new file mode 100644 index 00000000..1ad3fa5c --- /dev/null +++ b/packages/docs-v2/components/demo.tsx @@ -0,0 +1,16 @@ +'use client'; + +import { HookProps } from '@/lib/parse-hook'; +import { ExamplesIndex } from '../.source/demo'; + +export const DocDemo = (props: HookProps) => { + const example = ExamplesIndex[props.name]; + + if (!example) { + return null; + } + + const Demo = example.component; + + return ; +}; diff --git a/packages/docs-v2/components/docs-copy-page.tsx b/packages/docs-v2/components/docs-copy-page.tsx new file mode 100644 index 00000000..76c5963b --- /dev/null +++ b/packages/docs-v2/components/docs-copy-page.tsx @@ -0,0 +1,158 @@ +'use client'; + +import { IconCheck, IconChevronDown, IconCopy } from '@tabler/icons-react'; + +import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard'; +import { Button } from '@/ui/button'; +import { Separator } from '@/ui/separator'; + +function getPromptUrl(baseURL: string, url: string) { + return `${baseURL}?q=${encodeURIComponent( + `I’m looking at this shadcn/ui documentation: ${url}. +Help me understand how to use it. Be ready to explain concepts, give examples, or help debug based on it. + ` + )}`; +} + +const menuItems = { + markdown: (url: string) => ( + + + + + View as Markdown + + ), + v0: (url: string) => ( + + + + + Open in v0 + + ), + chatgpt: (url: string) => ( + + + + + Open in ChatGPT + + ), + claude: (url: string) => ( + + + + + Open in Claude + + ), + scira: (url: string) => ( + + + + + + + + + + + Open in Scira + + ) +}; + +export function DocsCopyPage({ page, url }: { page: string; url: string }) { + const { copyToClipboard, isCopied } = useCopyToClipboard(); + + const trigger = ( + + ); + + return ( +
+ + +
+ ); +} diff --git a/packages/docs-v2/components/docs-sidebar.tsx b/packages/docs-v2/components/docs-sidebar.tsx new file mode 100644 index 00000000..98008770 --- /dev/null +++ b/packages/docs-v2/components/docs-sidebar.tsx @@ -0,0 +1,126 @@ +'use client'; + +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; + +import { getCurrentBase, getPagesFromFolder } from '@/lib/page-tree'; +import type { source } from '@/lib/source'; +import { + Sidebar, + SidebarContent, + SidebarGroup, + SidebarGroupContent, + SidebarGroupLabel, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem +} from '@/ui/sidebar'; + +const TOP_LEVEL_SECTIONS = [ + { name: 'Introduction', href: '/docs' }, + { + name: 'Installation', + href: '/docs/installation' + }, + { + name: 'reactuse.json', + href: '/docs/reactuse-json' + }, + { + name: 'CLI', + href: '/docs/cli' + }, + { + name: 'target', + href: '/docs/target' + }, + { + name: 'memoization', + href: '/docs/memoization' + } +]; + +const EXCLUDED_SECTIONS = ['Introduction']; + +export function DocsSidebar({ + tree, + ...props +}: React.ComponentProps & { tree: typeof source.pageTree }) { + const pathname = usePathname(); + const currentBase = getCurrentBase(pathname); + + return ( + +
+
+
+ + + + Sections + + + + {TOP_LEVEL_SECTIONS.map(({ name, href }) => { + return ( + + + + + {name} + + + + ); + })} + + + + {tree.children.map((item) => { + if (EXCLUDED_SECTIONS.includes((item.name as string) ?? '')) { + return null; + } + + return ( + + + {item.name} + + + {item.type === 'folder' && ( + + {getPagesFromFolder(item, currentBase).map((page) => { + return ( + + + + + {page.name} + + + + ); + })} + + )} + + + ); + })} +
+ + + ); +} diff --git a/packages/docs-v2/components/docs-toc.tsx b/packages/docs-v2/components/docs-toc.tsx new file mode 100644 index 00000000..2d5b2e83 --- /dev/null +++ b/packages/docs-v2/components/docs-toc.tsx @@ -0,0 +1,116 @@ +'use client'; + +import * as React from 'react'; +import { IconMenu3 } from '@tabler/icons-react'; + +import { cn } from '@/lib/utils'; +import { Button } from './ui/button'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger +} from './ui/dropdown-menu'; + +function useActiveItem(itemIds: string[]) { + const [activeId, setActiveId] = React.useState(null); + + React.useEffect(() => { + const observer = new IntersectionObserver( + (entries) => { + for (const entry of entries) { + if (entry.isIntersecting) { + setActiveId(entry.target.id); + } + } + }, + { rootMargin: '0% 0% -80% 0%' } + ); + + for (const id of itemIds ?? []) { + const element = document.getElementById(id); + if (element) { + observer.observe(element); + } + } + + return () => { + for (const id of itemIds ?? []) { + const element = document.getElementById(id); + if (element) { + observer.unobserve(element); + } + } + }; + }, [itemIds]); + + return activeId; +} + +export function DocsTableOfContents({ + toc, + variant = 'list', + className +}: { + toc: { + title?: React.ReactNode; + url: string; + depth: number; + }[]; + variant?: 'dropdown' | 'list'; + className?: string; +}) { + const [open, setOpen] = React.useState(false); + const itemIds = React.useMemo(() => toc.map((item) => item.url.replace('#', '')), [toc]); + const activeHeading = useActiveItem(itemIds); + + if (!toc?.length) { + return null; + } + + if (variant === 'dropdown') { + return ( + + + + + + {toc.map((item) => ( + { + setOpen(false); + }} + data-depth={item.depth} + className='data-[depth=3]:pl-6 data-[depth=4]:pl-8' + > + {item.title} + + ))} + + + ); + } + + return ( +
+

+ On This Page +

+ {toc.map((item) => ( + + {item.title} + + ))} +
+ ); +} diff --git a/packages/docs-v2/components/examples.tsx b/packages/docs-v2/components/examples.tsx new file mode 100644 index 00000000..e0abbea2 --- /dev/null +++ b/packages/docs-v2/components/examples.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export const Examples = () => { + return
Examples
; +}; diff --git a/packages/docs-v2/components/github-link.tsx b/packages/docs-v2/components/github-link.tsx new file mode 100644 index 00000000..3cd00172 --- /dev/null +++ b/packages/docs-v2/components/github-link.tsx @@ -0,0 +1,34 @@ +import * as React from 'react'; +import Link from 'next/link'; + +import { siteConfig } from '@/lib/config'; +import { Icons } from '@/components/icons'; +import { Button } from '@/ui/button'; +import { Skeleton } from '@/ui/skeleton'; + +export function GitHubLink() { + return ( + + ); +} + +async function StarsCount() { + const data = await fetch('https://api.github.com/repos/siberiacancode/reactuse', { + next: { revalidate: 86400 } + }); + const json = await data.json(); + + const formattedCount = + json.stargazers_count >= 1000 + ? `${Math.round(json.stargazers_count / 1000)}k` + : json.stargazers_count.toLocaleString(); + + return {formattedCount}; +} diff --git a/packages/docs-v2/components/hook-doc-page.tsx b/packages/docs-v2/components/hook-doc-page.tsx new file mode 100644 index 00000000..d92837d0 --- /dev/null +++ b/packages/docs-v2/components/hook-doc-page.tsx @@ -0,0 +1,109 @@ +import { Callout } from './callout'; +import { Badge } from './ui/badge'; +import { HookProps } from '@/lib/parse-hook'; +import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from './ui/table'; +import { Avatar, AvatarFallback, AvatarImage } from './ui/avatar'; +import { timeAgo } from '@/lib/utils'; +import { Code } from './code'; + + +export const DocHeader = (props: HookProps) => ( + <> +
+
+ + {props.category} + + + {props.usage} + + + test coverage + +
+

Last changed: {timeAgo(props.lastModified)}

+
+ + {props.warning && ( + +

Important

+ {props.warning} +
+ )} + + {props.browserapi && ( + +

TIP

+ This hook uses {props.browserapi} browser api to provide enhanced functionality. Make sure + to check for compatibility with different browsers when using this api +
+ )} + +); + +export const DocUsageExamples = (props: HookProps) => + props.examples.map((example) => ); + +export const DocContributors = (props: HookProps) => ( +
+ {props.contributors.map(({ name, avatar }) => ( +
+ + + {name[0]} + +

{name}

+
+ ))} +
+); + +export const DocTableApi = (props: HookProps) => + props.apiParameters.map((group) => ( +
+ <> + {group.parameters.length > 0 && ( + <> +

Parameters

+ + + + Name + Type + Default + Note + + + + {group.parameters.map((parameter) => ( + + + {parameter.name} + {parameter.optional ? '?' : ''} + + {parameter.type} + {parameter.default ?? '-'} + {parameter.description} + + ))} + +
+ + )} + {group.returns && ( + <> +

Return

+ + {group.returns.type} + + + )} + +
+ )); diff --git a/packages/docs-v2/components/hook-preview.tsx b/packages/docs-v2/components/hook-preview.tsx new file mode 100644 index 00000000..e8bcd3bd --- /dev/null +++ b/packages/docs-v2/components/hook-preview.tsx @@ -0,0 +1,142 @@ +import * as React from 'react'; +import Image from 'next/image'; + +// import { ComponentPreviewTabs } from '@/components/component-preview-tabs'; +// import { ComponentSource } from '@/components/component-source'; +import { ExamplesIndex } from '@/__index__'; + +export function getDemoComponent(name: string) { + return ExamplesIndex?.[name]?.component; +} + +function DemoSuspense({ + children, + name +}: { + children: React.ReactNode; + name: string; +}) { + return ( + + Loading demo for{' '} + {name} + … +

+ }> + {children} +
+ ); +} + +export function HookPreview({ + name, + type, + className, + previewClassName, + align = 'center', + hideCode = false, + chromeLessOnMobile = false, + styleName = 'new-york-v4', + direction = 'ltr', + caption, + ...props +}: React.ComponentProps<'div'> & { + name: string; + styleName?: string; + align?: 'center' | 'start' | 'end'; + description?: string; + hideCode?: boolean; + type?: 'block' | 'component' | 'example'; + chromeLessOnMobile?: boolean; + previewClassName?: string; + direction?: 'ltr' | 'rtl'; + caption?: string; +}) { + if (type === 'block') { + const content = ( +
+ {name} + {name} +
+