@zentauri-ui/zentauri-components 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/cli/index.mjs +9 -5
- package/dist/hooks/index.d.ts +27 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useBodyScrollLock/index.d.ts +2 -0
- package/dist/hooks/useBodyScrollLock/index.d.ts.map +1 -0
- package/dist/hooks/useBodyScrollLock/useBodyScrollLock.d.ts +13 -0
- package/dist/hooks/useBodyScrollLock/useBodyScrollLock.d.ts.map +1 -0
- package/dist/hooks/useClickOutside/index.d.ts +2 -0
- package/dist/hooks/useClickOutside/index.d.ts.map +1 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +22 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts.map +1 -0
- package/dist/hooks/useClipboard/index.d.ts +2 -0
- package/dist/hooks/useClipboard/index.d.ts.map +1 -0
- package/dist/hooks/useClipboard/useClipboard.d.ts +21 -0
- package/dist/hooks/useClipboard/useClipboard.d.ts.map +1 -0
- package/dist/hooks/useControllableState/index.d.ts +2 -0
- package/dist/hooks/useControllableState/index.d.ts.map +1 -0
- package/dist/hooks/useControllableState/useControllableState.d.ts +21 -0
- package/dist/hooks/useControllableState/useControllableState.d.ts.map +1 -0
- package/dist/hooks/useDebouncedValue/index.d.ts +2 -0
- package/dist/hooks/useDebouncedValue/index.d.ts.map +1 -0
- package/dist/hooks/useDebouncedValue/useDebouncedValue.d.ts +13 -0
- package/dist/hooks/useDebouncedValue/useDebouncedValue.d.ts.map +1 -0
- package/dist/hooks/useDisclosure/index.d.ts +2 -0
- package/dist/hooks/useDisclosure/index.d.ts.map +1 -0
- package/dist/hooks/useDisclosure/useDisclosure.d.ts +24 -0
- package/dist/hooks/useDisclosure/useDisclosure.d.ts.map +1 -0
- package/dist/hooks/useDocumentTitle/index.d.ts +2 -0
- package/dist/hooks/useDocumentTitle/index.d.ts.map +1 -0
- package/dist/hooks/useDocumentTitle/useDocumentTitle.d.ts +18 -0
- package/dist/hooks/useDocumentTitle/useDocumentTitle.d.ts.map +1 -0
- package/dist/hooks/useFocusManagement/index.d.ts +2 -0
- package/dist/hooks/useFocusManagement/index.d.ts.map +1 -0
- package/dist/hooks/useFocusManagement/useFocusManagement.d.ts +22 -0
- package/dist/hooks/useFocusManagement/useFocusManagement.d.ts.map +1 -0
- package/dist/hooks/useHover/index.d.ts +2 -0
- package/dist/hooks/useHover/index.d.ts.map +1 -0
- package/dist/hooks/useHover/useHover.d.ts +13 -0
- package/dist/hooks/useHover/useHover.d.ts.map +1 -0
- package/dist/hooks/useInView/index.d.ts +2 -0
- package/dist/hooks/useInView/index.d.ts.map +1 -0
- package/dist/hooks/useInView/useInView.d.ts +17 -0
- package/dist/hooks/useInView/useInView.d.ts.map +1 -0
- package/dist/hooks/useIntersectionObserver/index.d.ts +2 -0
- package/dist/hooks/useIntersectionObserver/index.d.ts.map +1 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +17 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.d.ts.map +1 -0
- package/dist/hooks/useIsMounted/index.d.ts +2 -0
- package/dist/hooks/useIsMounted/index.d.ts.map +1 -0
- package/dist/hooks/useIsMounted/useIsMounted.d.ts +10 -0
- package/dist/hooks/useIsMounted/useIsMounted.d.ts.map +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect/index.d.ts +2 -0
- package/dist/hooks/useIsomorphicLayoutEffect/index.d.ts.map +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +9 -0
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/hooks/useLocalStorage/index.d.ts +2 -0
- package/dist/hooks/useLocalStorage/index.d.ts.map +1 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.d.ts +21 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery/index.d.ts +2 -0
- package/dist/hooks/useMediaQuery/index.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery/useMediaQuery.d.ts +12 -0
- package/dist/hooks/useMediaQuery/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useNetworkStatus/index.d.ts +2 -0
- package/dist/hooks/useNetworkStatus/index.d.ts.map +1 -0
- package/dist/hooks/useNetworkStatus/useNetworkStatus.d.ts +9 -0
- package/dist/hooks/useNetworkStatus/useNetworkStatus.d.ts.map +1 -0
- package/dist/hooks/usePageVisibility/index.d.ts +2 -0
- package/dist/hooks/usePageVisibility/index.d.ts.map +1 -0
- package/dist/hooks/usePageVisibility/usePageVisibility.d.ts +9 -0
- package/dist/hooks/usePageVisibility/usePageVisibility.d.ts.map +1 -0
- package/dist/hooks/usePagination/index.d.ts +2 -0
- package/dist/hooks/usePagination/index.d.ts.map +1 -0
- package/dist/hooks/usePagination/usePagination.d.ts +30 -0
- package/dist/hooks/usePagination/usePagination.d.ts.map +1 -0
- package/dist/hooks/usePrefersColorScheme/index.d.ts +2 -0
- package/dist/hooks/usePrefersColorScheme/index.d.ts.map +1 -0
- package/dist/hooks/usePrefersColorScheme/usePrefersColorScheme.d.ts +9 -0
- package/dist/hooks/usePrefersColorScheme/usePrefersColorScheme.d.ts.map +1 -0
- package/dist/hooks/usePrefersReducedMotion/index.d.ts +2 -0
- package/dist/hooks/usePrefersReducedMotion/index.d.ts.map +1 -0
- package/dist/hooks/usePrefersReducedMotion/usePrefersReducedMotion.d.ts +9 -0
- package/dist/hooks/usePrefersReducedMotion/usePrefersReducedMotion.d.ts.map +1 -0
- package/dist/hooks/useResizeObserver/index.d.ts +2 -0
- package/dist/hooks/useResizeObserver/index.d.ts.map +1 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.d.ts +21 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.d.ts.map +1 -0
- package/dist/hooks/useSessionStorage/index.d.ts +2 -0
- package/dist/hooks/useSessionStorage/index.d.ts.map +1 -0
- package/dist/hooks/useSessionStorage/useSessionStorage.d.ts +21 -0
- package/dist/hooks/useSessionStorage/useSessionStorage.d.ts.map +1 -0
- package/dist/hooks/useThrottledCallback/index.d.ts +2 -0
- package/dist/hooks/useThrottledCallback/index.d.ts.map +1 -0
- package/dist/hooks/useThrottledCallback/useThrottledCallback.d.ts +13 -0
- package/dist/hooks/useThrottledCallback/useThrottledCallback.d.ts.map +1 -0
- package/dist/hooks/useToggle/index.d.ts +2 -0
- package/dist/hooks/useToggle/index.d.ts.map +1 -0
- package/dist/hooks/useToggle/useToggle.d.ts +8 -0
- package/dist/hooks/useToggle/useToggle.d.ts.map +1 -0
- package/dist/hooks/useWindowSize/index.d.ts +2 -0
- package/dist/hooks/useWindowSize/index.d.ts.map +1 -0
- package/dist/hooks/useWindowSize/useWindowSize.d.ts +13 -0
- package/dist/hooks/useWindowSize/useWindowSize.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +6 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/ui/accordion/accordion-base.d.ts +20 -0
- package/dist/ui/accordion/accordion-base.d.ts.map +1 -0
- package/dist/ui/accordion/accordion.d.ts +8 -0
- package/dist/ui/accordion/accordion.d.ts.map +1 -0
- package/dist/ui/accordion/animated/accordion-content-animated.d.ts +6 -0
- package/dist/ui/accordion/animated/accordion-content-animated.d.ts.map +1 -0
- package/dist/ui/accordion/animated/accordion-root-animated.d.ts +6 -0
- package/dist/ui/accordion/animated/accordion-root-animated.d.ts.map +1 -0
- package/dist/ui/accordion/animated/animations.d.ts +6 -0
- package/dist/ui/accordion/animated/animations.d.ts.map +1 -0
- package/dist/ui/accordion/animated/index.d.ts +6 -0
- package/dist/ui/accordion/animated/index.d.ts.map +1 -0
- package/dist/ui/accordion/animated/types.d.ts +6 -0
- package/dist/ui/accordion/animated/types.d.ts.map +1 -0
- package/dist/ui/accordion/index.d.ts +5 -0
- package/dist/ui/accordion/index.d.ts.map +1 -0
- package/dist/ui/accordion/types.d.ts +39 -0
- package/dist/ui/accordion/types.d.ts.map +1 -0
- package/dist/ui/accordion/variants.d.ts +14 -0
- package/dist/ui/accordion/variants.d.ts.map +1 -0
- package/dist/ui/alert/alert-base.d.ts +28 -0
- package/dist/ui/alert/alert-base.d.ts.map +1 -0
- package/dist/ui/alert/alert.d.ts +6 -0
- package/dist/ui/alert/alert.d.ts.map +1 -0
- package/dist/ui/alert/animated/alert-animated.d.ts +3 -0
- package/dist/ui/alert/animated/alert-animated.d.ts.map +1 -0
- package/dist/ui/alert/animated/animations.d.ts +3 -0
- package/dist/ui/alert/animated/animations.d.ts.map +1 -0
- package/dist/ui/alert/animated/index.d.ts +4 -0
- package/dist/ui/alert/animated/index.d.ts.map +1 -0
- package/dist/ui/alert/animated/types.d.ts +8 -0
- package/dist/ui/alert/animated/types.d.ts.map +1 -0
- package/dist/ui/alert/index.d.ts +5 -0
- package/dist/ui/alert/index.d.ts.map +1 -0
- package/dist/ui/alert/types.d.ts +21 -0
- package/dist/ui/alert/types.d.ts.map +1 -0
- package/dist/ui/alert/variants.d.ts +11 -0
- package/dist/ui/alert/variants.d.ts.map +1 -0
- package/dist/ui/avatar/animated/animations.d.ts +3 -0
- package/dist/ui/avatar/animated/animations.d.ts.map +1 -0
- package/dist/ui/avatar/animated/avatar-animated.d.ts +6 -0
- package/dist/ui/avatar/animated/avatar-animated.d.ts.map +1 -0
- package/dist/ui/avatar/animated/index.d.ts +5 -0
- package/dist/ui/avatar/animated/index.d.ts.map +1 -0
- package/dist/ui/avatar/animated/types.d.ts +8 -0
- package/dist/ui/avatar/animated/types.d.ts.map +1 -0
- package/dist/ui/avatar/avatar-base.d.ts +25 -0
- package/dist/ui/avatar/avatar-base.d.ts.map +1 -0
- package/dist/ui/avatar/avatar.d.ts +8 -0
- package/dist/ui/avatar/avatar.d.ts.map +1 -0
- package/dist/ui/avatar/index.d.ts +5 -0
- package/dist/ui/avatar/index.d.ts.map +1 -0
- package/dist/ui/avatar/types.d.ts +25 -0
- package/dist/ui/avatar/types.d.ts.map +1 -0
- package/dist/ui/avatar/variants.d.ts +8 -0
- package/dist/ui/avatar/variants.d.ts.map +1 -0
- package/dist/ui/badge/animated/animations.d.ts +3 -0
- package/dist/ui/badge/animated/animations.d.ts.map +1 -0
- package/dist/ui/badge/animated/badge-animated.d.ts +6 -0
- package/dist/ui/badge/animated/badge-animated.d.ts.map +1 -0
- package/dist/ui/badge/animated/index.d.ts +4 -0
- package/dist/ui/badge/animated/index.d.ts.map +1 -0
- package/dist/ui/badge/animated/types.d.ts +10 -0
- package/dist/ui/badge/animated/types.d.ts.map +1 -0
- package/dist/ui/badge/badge-base.d.ts +6 -0
- package/dist/ui/badge/badge-base.d.ts.map +1 -0
- package/dist/ui/badge/badge.d.ts +6 -0
- package/dist/ui/badge/badge.d.ts.map +1 -0
- package/dist/ui/badge/index.d.ts +4 -0
- package/dist/ui/badge/index.d.ts.map +1 -0
- package/dist/ui/badge/types.d.ts +17 -0
- package/dist/ui/badge/types.d.ts.map +1 -0
- package/dist/ui/badge/variants.d.ts +40 -0
- package/dist/ui/badge/variants.d.ts.map +1 -0
- package/dist/ui/breadcrumb/breadcrumb.d.ts +33 -0
- package/dist/ui/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/ui/breadcrumb/index.d.ts +4 -0
- package/dist/ui/breadcrumb/index.d.ts.map +1 -0
- package/dist/ui/breadcrumb/types.d.ts +26 -0
- package/dist/ui/breadcrumb/types.d.ts.map +1 -0
- package/dist/ui/breadcrumb/variants.d.ts +11 -0
- package/dist/ui/breadcrumb/variants.d.ts.map +1 -0
- package/dist/ui/buttons/animated/animations.d.ts +3 -0
- package/dist/ui/buttons/animated/animations.d.ts.map +1 -0
- package/dist/ui/buttons/animated/button-animated.d.ts +6 -0
- package/dist/ui/buttons/animated/button-animated.d.ts.map +1 -0
- package/dist/ui/buttons/animated/index.d.ts +4 -0
- package/dist/ui/buttons/animated/index.d.ts.map +1 -0
- package/dist/ui/buttons/animated/types.d.ts +16 -0
- package/dist/ui/buttons/animated/types.d.ts.map +1 -0
- package/dist/ui/buttons/button-base.d.ts +6 -0
- package/dist/ui/buttons/button-base.d.ts.map +1 -0
- package/dist/ui/buttons/button.d.ts +6 -0
- package/dist/ui/buttons/button.d.ts.map +1 -0
- package/dist/ui/buttons/index.d.ts +4 -0
- package/dist/ui/buttons/index.d.ts.map +1 -0
- package/dist/ui/buttons/types.d.ts +10 -0
- package/dist/ui/buttons/types.d.ts.map +1 -0
- package/dist/ui/buttons/variants.d.ts +5 -0
- package/dist/ui/buttons/variants.d.ts.map +1 -0
- package/dist/ui/card/animated/animations.d.ts +7 -0
- package/dist/ui/card/animated/animations.d.ts.map +1 -0
- package/dist/ui/card/animated/card-animated.d.ts +6 -0
- package/dist/ui/card/animated/card-animated.d.ts.map +1 -0
- package/dist/ui/card/animated/index.d.ts +5 -0
- package/dist/ui/card/animated/index.d.ts.map +1 -0
- package/dist/ui/card/animated/types.d.ts +6 -0
- package/dist/ui/card/animated/types.d.ts.map +1 -0
- package/dist/ui/card/card-base.d.ts +26 -0
- package/dist/ui/card/card-base.d.ts.map +1 -0
- package/dist/ui/card/card.d.ts +6 -0
- package/dist/ui/card/card.d.ts.map +1 -0
- package/dist/ui/card/index.d.ts +5 -0
- package/dist/ui/card/index.d.ts.map +1 -0
- package/dist/ui/card/types.d.ts +29 -0
- package/dist/ui/card/types.d.ts.map +1 -0
- package/dist/ui/card/variants.d.ts +18 -0
- package/dist/ui/card/variants.d.ts.map +1 -0
- package/dist/ui/divider/animated/animations.d.ts +6 -0
- package/dist/ui/divider/animated/animations.d.ts.map +1 -0
- package/dist/ui/divider/animated/divider-animated.d.ts +6 -0
- package/dist/ui/divider/animated/divider-animated.d.ts.map +1 -0
- package/dist/ui/divider/animated/index.d.ts +3 -0
- package/dist/ui/divider/animated/index.d.ts.map +1 -0
- package/dist/ui/divider/animated/types.d.ts +8 -0
- package/dist/ui/divider/animated/types.d.ts.map +1 -0
- package/dist/ui/divider/divider-base.d.ts +6 -0
- package/dist/ui/divider/divider-base.d.ts.map +1 -0
- package/dist/ui/divider/divider.d.ts +6 -0
- package/dist/ui/divider/divider.d.ts.map +1 -0
- package/dist/ui/divider/index.d.ts +4 -0
- package/dist/ui/divider/index.d.ts.map +1 -0
- package/dist/ui/divider/types.d.ts +15 -0
- package/dist/ui/divider/types.d.ts.map +1 -0
- package/dist/ui/divider/variants.d.ts +14 -0
- package/dist/ui/divider/variants.d.ts.map +1 -0
- package/dist/ui/drawer/animated/animations.d.ts +3 -0
- package/dist/ui/drawer/animated/animations.d.ts.map +1 -0
- package/dist/ui/drawer/animated/drawer-content-animated.d.ts +6 -0
- package/dist/ui/drawer/animated/drawer-content-animated.d.ts.map +1 -0
- package/dist/ui/drawer/animated/index.d.ts +5 -0
- package/dist/ui/drawer/animated/index.d.ts.map +1 -0
- package/dist/ui/drawer/animated/types.d.ts +9 -0
- package/dist/ui/drawer/animated/types.d.ts.map +1 -0
- package/dist/ui/drawer/drawer-base.d.ts +35 -0
- package/dist/ui/drawer/drawer-base.d.ts.map +1 -0
- package/dist/ui/drawer/drawer.d.ts +2 -0
- package/dist/ui/drawer/drawer.d.ts.map +1 -0
- package/dist/ui/drawer/index.d.ts +4 -0
- package/dist/ui/drawer/index.d.ts.map +1 -0
- package/dist/ui/drawer/types.d.ts +33 -0
- package/dist/ui/drawer/types.d.ts.map +1 -0
- package/dist/ui/drawer/variants.d.ts +10 -0
- package/dist/ui/drawer/variants.d.ts.map +1 -0
- package/dist/ui/dropdown/dropdown.d.ts +6 -0
- package/dist/ui/dropdown/dropdown.d.ts.map +1 -0
- package/dist/ui/dropdown/index.d.ts +4 -0
- package/dist/ui/dropdown/index.d.ts.map +1 -0
- package/dist/ui/dropdown/types.d.ts +38 -0
- package/dist/ui/dropdown/types.d.ts.map +1 -0
- package/dist/ui/dropdown/variants.d.ts +12 -0
- package/dist/ui/dropdown/variants.d.ts.map +1 -0
- package/dist/ui/empty-state/animated/animations.d.ts +3 -0
- package/dist/ui/empty-state/animated/animations.d.ts.map +1 -0
- package/dist/ui/empty-state/animated/empty-state-animated.d.ts +6 -0
- package/dist/ui/empty-state/animated/empty-state-animated.d.ts.map +1 -0
- package/dist/ui/empty-state/animated/index.d.ts +4 -0
- package/dist/ui/empty-state/animated/index.d.ts.map +1 -0
- package/dist/ui/empty-state/animated/types.d.ts +14 -0
- package/dist/ui/empty-state/animated/types.d.ts.map +1 -0
- package/dist/ui/empty-state/empty-state-base.d.ts +23 -0
- package/dist/ui/empty-state/empty-state-base.d.ts.map +1 -0
- package/dist/ui/empty-state/empty-state.d.ts +6 -0
- package/dist/ui/empty-state/empty-state.d.ts.map +1 -0
- package/dist/ui/empty-state/index.d.ts +5 -0
- package/dist/ui/empty-state/index.d.ts.map +1 -0
- package/dist/ui/empty-state/types.d.ts +15 -0
- package/dist/ui/empty-state/types.d.ts.map +1 -0
- package/dist/ui/empty-state/variants.d.ts +12 -0
- package/dist/ui/empty-state/variants.d.ts.map +1 -0
- package/dist/ui/file-upload/file-upload.d.ts +8 -0
- package/dist/ui/file-upload/file-upload.d.ts.map +1 -0
- package/dist/ui/file-upload/index.d.ts +4 -0
- package/dist/ui/file-upload/index.d.ts.map +1 -0
- package/dist/ui/file-upload/types.d.ts +18 -0
- package/dist/ui/file-upload/types.d.ts.map +1 -0
- package/dist/ui/file-upload/variants.d.ts +4 -0
- package/dist/ui/file-upload/variants.d.ts.map +1 -0
- package/dist/ui/inputs/animated/animations.d.ts +3 -0
- package/dist/ui/inputs/animated/animations.d.ts.map +1 -0
- package/dist/ui/inputs/animated/index.d.ts +4 -0
- package/dist/ui/inputs/animated/index.d.ts.map +1 -0
- package/dist/ui/inputs/animated/input-animated.d.ts +6 -0
- package/dist/ui/inputs/animated/input-animated.d.ts.map +1 -0
- package/dist/ui/inputs/animated/types.d.ts +16 -0
- package/dist/ui/inputs/animated/types.d.ts.map +1 -0
- package/dist/ui/inputs/index.d.ts +4 -0
- package/dist/ui/inputs/index.d.ts.map +1 -0
- package/dist/ui/inputs/input-base.d.ts +6 -0
- package/dist/ui/inputs/input-base.d.ts.map +1 -0
- package/dist/ui/inputs/input.d.ts +6 -0
- package/dist/ui/inputs/input.d.ts.map +1 -0
- package/dist/ui/inputs/types.d.ts +12 -0
- package/dist/ui/inputs/types.d.ts.map +1 -0
- package/dist/ui/inputs/variants.d.ts +7 -0
- package/dist/ui/inputs/variants.d.ts.map +1 -0
- package/dist/ui/modal/animated/animations.d.ts +3 -0
- package/dist/ui/modal/animated/animations.d.ts.map +1 -0
- package/dist/ui/modal/animated/index.d.ts +4 -0
- package/dist/ui/modal/animated/index.d.ts.map +1 -0
- package/dist/ui/modal/animated/modal-content-animated.d.ts +6 -0
- package/dist/ui/modal/animated/modal-content-animated.d.ts.map +1 -0
- package/dist/ui/modal/animated/types.d.ts +9 -0
- package/dist/ui/modal/animated/types.d.ts.map +1 -0
- package/dist/ui/modal/index.d.ts +5 -0
- package/dist/ui/modal/index.d.ts.map +1 -0
- package/dist/ui/modal/modal-base.d.ts +47 -0
- package/dist/ui/modal/modal-base.d.ts.map +1 -0
- package/dist/ui/modal/modal.d.ts +6 -0
- package/dist/ui/modal/modal.d.ts.map +1 -0
- package/dist/ui/modal/types.d.ts +26 -0
- package/dist/ui/modal/types.d.ts.map +1 -0
- package/dist/ui/modal/variants.d.ts +10 -0
- package/dist/ui/modal/variants.d.ts.map +1 -0
- package/dist/ui/pagination/index.d.ts +5 -0
- package/dist/ui/pagination/index.d.ts.map +1 -0
- package/dist/ui/pagination/pagination.d.ts +17 -0
- package/dist/ui/pagination/pagination.d.ts.map +1 -0
- package/dist/ui/pagination/types.d.ts +56 -0
- package/dist/ui/pagination/types.d.ts.map +1 -0
- package/dist/ui/pagination/variants.d.ts +12 -0
- package/dist/ui/pagination/variants.d.ts.map +1 -0
- package/dist/ui/progress/animated/animations.d.ts +3 -0
- package/dist/ui/progress/animated/animations.d.ts.map +1 -0
- package/dist/ui/progress/animated/index.d.ts +4 -0
- package/dist/ui/progress/animated/index.d.ts.map +1 -0
- package/dist/ui/progress/animated/progress-animated.d.ts +16 -0
- package/dist/ui/progress/animated/progress-animated.d.ts.map +1 -0
- package/dist/ui/progress/animated/types.d.ts +23 -0
- package/dist/ui/progress/animated/types.d.ts.map +1 -0
- package/dist/ui/progress/index.d.ts +5 -0
- package/dist/ui/progress/index.d.ts.map +1 -0
- package/dist/ui/progress/progress-base.d.ts +23 -0
- package/dist/ui/progress/progress-base.d.ts.map +1 -0
- package/dist/ui/progress/progress.d.ts +6 -0
- package/dist/ui/progress/progress.d.ts.map +1 -0
- package/dist/ui/progress/types.d.ts +28 -0
- package/dist/ui/progress/types.d.ts.map +1 -0
- package/dist/ui/progress/variants.d.ts +15 -0
- package/dist/ui/progress/variants.d.ts.map +1 -0
- package/dist/ui/select/index.d.ts +4 -0
- package/dist/ui/select/index.d.ts.map +1 -0
- package/dist/ui/select/select.d.ts +10 -0
- package/dist/ui/select/select.d.ts.map +1 -0
- package/dist/ui/select/types.d.ts +48 -0
- package/dist/ui/select/types.d.ts.map +1 -0
- package/dist/ui/select/variants.d.ts +14 -0
- package/dist/ui/select/variants.d.ts.map +1 -0
- package/dist/ui/skeleton/animated/animations.d.ts +3 -0
- package/dist/ui/skeleton/animated/animations.d.ts.map +1 -0
- package/dist/ui/skeleton/animated/index.d.ts +4 -0
- package/dist/ui/skeleton/animated/index.d.ts.map +1 -0
- package/dist/ui/skeleton/animated/skeleton-animated.d.ts +22 -0
- package/dist/ui/skeleton/animated/skeleton-animated.d.ts.map +1 -0
- package/dist/ui/skeleton/animated/types.d.ts +30 -0
- package/dist/ui/skeleton/animated/types.d.ts.map +1 -0
- package/dist/ui/skeleton/index.d.ts +5 -0
- package/dist/ui/skeleton/index.d.ts.map +1 -0
- package/dist/ui/skeleton/skeleton-base.d.ts +24 -0
- package/dist/ui/skeleton/skeleton-base.d.ts.map +1 -0
- package/dist/ui/skeleton/skeleton.d.ts +2 -0
- package/dist/ui/skeleton/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton/types.d.ts +23 -0
- package/dist/ui/skeleton/types.d.ts.map +1 -0
- package/dist/ui/skeleton/variants.d.ts +38 -0
- package/dist/ui/skeleton/variants.d.ts.map +1 -0
- package/dist/ui/slider/index.d.ts +4 -0
- package/dist/ui/slider/index.d.ts.map +1 -0
- package/dist/ui/slider/slider.d.ts +51 -0
- package/dist/ui/slider/slider.d.ts.map +1 -0
- package/dist/ui/slider/types.d.ts +49 -0
- package/dist/ui/slider/types.d.ts.map +1 -0
- package/dist/ui/slider/variants.d.ts +13 -0
- package/dist/ui/slider/variants.d.ts.map +1 -0
- package/dist/ui/spinner/animated/index.d.ts +4 -0
- package/dist/ui/spinner/animated/index.d.ts.map +1 -0
- package/dist/ui/spinner/animated/spinner.d.ts +6 -0
- package/dist/ui/spinner/animated/spinner.d.ts.map +1 -0
- package/dist/ui/spinner/animated/types.d.ts +9 -0
- package/dist/ui/spinner/animated/types.d.ts.map +1 -0
- package/dist/ui/spinner/animated/variants.d.ts +6 -0
- package/dist/ui/spinner/animated/variants.d.ts.map +1 -0
- package/dist/ui/stepper/index.d.ts +4 -0
- package/dist/ui/stepper/index.d.ts.map +1 -0
- package/dist/ui/stepper/stepper.d.ts +33 -0
- package/dist/ui/stepper/stepper.d.ts.map +1 -0
- package/dist/ui/stepper/types.d.ts +25 -0
- package/dist/ui/stepper/types.d.ts.map +1 -0
- package/dist/ui/stepper/variants.d.ts +11 -0
- package/dist/ui/stepper/variants.d.ts.map +1 -0
- package/dist/ui/table/animated/animations.d.ts +3 -0
- package/dist/ui/table/animated/animations.d.ts.map +1 -0
- package/dist/ui/table/animated/index.d.ts +5 -0
- package/dist/ui/table/animated/index.d.ts.map +1 -0
- package/dist/ui/table/animated/table-animated.d.ts +5 -0
- package/dist/ui/table/animated/table-animated.d.ts.map +1 -0
- package/dist/ui/table/animated/types.d.ts +8 -0
- package/dist/ui/table/animated/types.d.ts.map +1 -0
- package/dist/ui/table/index.d.ts +4 -0
- package/dist/ui/table/index.d.ts.map +1 -0
- package/dist/ui/table/table-base.d.ts +38 -0
- package/dist/ui/table/table-base.d.ts.map +1 -0
- package/dist/ui/table/table.d.ts +2 -0
- package/dist/ui/table/table.d.ts.map +1 -0
- package/dist/ui/table/types.d.ts +33 -0
- package/dist/ui/table/types.d.ts.map +1 -0
- package/dist/ui/table/variants.d.ts +14 -0
- package/dist/ui/table/variants.d.ts.map +1 -0
- package/dist/ui/tabs/animated/animations.d.ts +5 -0
- package/dist/ui/tabs/animated/animations.d.ts.map +1 -0
- package/dist/ui/tabs/animated/index.d.ts +4 -0
- package/dist/ui/tabs/animated/index.d.ts.map +1 -0
- package/dist/ui/tabs/animated/tabs-content-animated.d.ts +6 -0
- package/dist/ui/tabs/animated/tabs-content-animated.d.ts.map +1 -0
- package/dist/ui/tabs/animated/types.d.ts +14 -0
- package/dist/ui/tabs/animated/types.d.ts.map +1 -0
- package/dist/ui/tabs/index.d.ts +4 -0
- package/dist/ui/tabs/index.d.ts.map +1 -0
- package/dist/ui/tabs/tabs-base.d.ts +8 -0
- package/dist/ui/tabs/tabs-base.d.ts.map +1 -0
- package/dist/ui/tabs/tabs.d.ts +2 -0
- package/dist/ui/tabs/tabs.d.ts.map +1 -0
- package/dist/ui/tabs/types.d.ts +40 -0
- package/dist/ui/tabs/types.d.ts.map +1 -0
- package/dist/ui/tabs/variants.d.ts +11 -0
- package/dist/ui/tabs/variants.d.ts.map +1 -0
- package/dist/ui/toast/animated/animations.d.ts +3 -0
- package/dist/ui/toast/animated/animations.d.ts.map +1 -0
- package/dist/ui/toast/animated/index.d.ts +4 -0
- package/dist/ui/toast/animated/index.d.ts.map +1 -0
- package/dist/ui/toast/animated/toast-animated.d.ts +10 -0
- package/dist/ui/toast/animated/toast-animated.d.ts.map +1 -0
- package/dist/ui/toast/animated/types.d.ts +5 -0
- package/dist/ui/toast/animated/types.d.ts.map +1 -0
- package/dist/ui/toast/index.d.ts +4 -0
- package/dist/ui/toast/index.d.ts.map +1 -0
- package/dist/ui/toast/toast-base.d.ts +35 -0
- package/dist/ui/toast/toast-base.d.ts.map +1 -0
- package/dist/ui/toast/toast.d.ts +2 -0
- package/dist/ui/toast/toast.d.ts.map +1 -0
- package/dist/ui/toast/types.d.ts +45 -0
- package/dist/ui/toast/types.d.ts.map +1 -0
- package/dist/ui/toast/variants.d.ts +8 -0
- package/dist/ui/toast/variants.d.ts.map +1 -0
- package/dist/ui/toggle/animated/animations.d.ts +3 -0
- package/dist/ui/toggle/animated/animations.d.ts.map +1 -0
- package/dist/ui/toggle/animated/index.d.ts +4 -0
- package/dist/ui/toggle/animated/index.d.ts.map +1 -0
- package/dist/ui/toggle/animated/toggle-animated.d.ts +6 -0
- package/dist/ui/toggle/animated/toggle-animated.d.ts.map +1 -0
- package/dist/ui/toggle/animated/types.d.ts +9 -0
- package/dist/ui/toggle/animated/types.d.ts.map +1 -0
- package/dist/ui/toggle/index.d.ts +4 -0
- package/dist/ui/toggle/index.d.ts.map +1 -0
- package/dist/ui/toggle/toggle-base.d.ts +6 -0
- package/dist/ui/toggle/toggle-base.d.ts.map +1 -0
- package/dist/ui/toggle/toggle.d.ts +6 -0
- package/dist/ui/toggle/toggle.d.ts.map +1 -0
- package/dist/ui/toggle/types.d.ts +14 -0
- package/dist/ui/toggle/types.d.ts.map +1 -0
- package/dist/ui/toggle/variants.d.ts +8 -0
- package/dist/ui/toggle/variants.d.ts.map +1 -0
- package/dist/ui/tooltip/animated/animations.d.ts +3 -0
- package/dist/ui/tooltip/animated/animations.d.ts.map +1 -0
- package/dist/ui/tooltip/animated/index.d.ts +4 -0
- package/dist/ui/tooltip/animated/index.d.ts.map +1 -0
- package/dist/ui/tooltip/animated/tooltip-content-animated.d.ts +3 -0
- package/dist/ui/tooltip/animated/tooltip-content-animated.d.ts.map +1 -0
- package/dist/ui/tooltip/animated/types.d.ts +9 -0
- package/dist/ui/tooltip/animated/types.d.ts.map +1 -0
- package/dist/ui/tooltip/index.d.ts +4 -0
- package/dist/ui/tooltip/index.d.ts.map +1 -0
- package/dist/ui/tooltip/tooltip-base.d.ts +7 -0
- package/dist/ui/tooltip/tooltip-base.d.ts.map +1 -0
- package/dist/ui/tooltip/tooltip.d.ts +2 -0
- package/dist/ui/tooltip/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip/types.d.ts +30 -0
- package/dist/ui/tooltip/types.d.ts.map +1 -0
- package/dist/ui/tooltip/variants.d.ts +6 -0
- package/dist/ui/tooltip/variants.d.ts.map +1 -0
- package/dist/vitest-setup.d.ts +2 -0
- package/dist/vitest-setup.d.ts.map +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -285,6 +285,7 @@ Call the published binary by name after the package (recommended so `npx` does n
|
|
|
285
285
|
```bash
|
|
286
286
|
npx @zentauri-ui/zentauri-components zentauri-components init
|
|
287
287
|
npx @zentauri-ui/zentauri-components zentauri-components add buttons inputs
|
|
288
|
+
npx @zentauri-ui/zentauri-components zentauri-components -h
|
|
288
289
|
```
|
|
289
290
|
|
|
290
291
|
**Hooks only** (copy `src/hooks/<name>` into your app, plus sibling hook dependencies such as `useMediaQuery` when needed):
|
|
@@ -370,7 +371,7 @@ From this package directory in the monorepo:
|
|
|
370
371
|
|
|
371
372
|
- `pnpm build` (or `npm run build`) — production bundle via `tsup` (Rollup treeshake + `scripts/prepend-use-client.mjs` via `onSuccess` so each UI entry under `dist/ui/`, including `dist/ui/<name>/animated.*`, starts with `"use client"` where needed)
|
|
372
373
|
- `pnpm dev` — `tsup` watch mode (same `onSuccess` hook after each rebuild)
|
|
373
|
-
- `pnpm test` / `pnpm test:watch` — **Vitest** and **Testing Library** unit tests
|
|
374
|
+
- `pnpm test` / `pnpm test:watch` — **Vitest** and **Testing Library** unit tests // covered 300+ test cases in total
|
|
374
375
|
- **`pnpm run generate:registry`** — runs `scripts/generate-registry.mjs`, which reads **`uiComponentNames`** and **`hooksEntryNames`** from `tsup.config.ts`, merges in **`spinner`**, applies fixed **`nameAliases`**, and writes **`cli/registry.json`** (`components` + `hooks`). Run this after adding or renaming UI areas or hook entries so the CLI stays in sync (the script prints counts).
|
|
375
376
|
- **`prepack`** — invokes `generate:registry` automatically before `npm pack` / publish so the published tarball always ships an up-to-date registry alongside `cli/index.mjs`.
|
|
376
377
|
|
package/cli/index.mjs
CHANGED
|
@@ -131,18 +131,22 @@ function loadRegistry() {
|
|
|
131
131
|
* // Terminal shows multi-line Usage / Options / examples (see string below).
|
|
132
132
|
*/
|
|
133
133
|
function printHelp() {
|
|
134
|
+
const reg = loadRegistry();
|
|
135
|
+
const componentsList = (reg.components ?? []).join("\n");
|
|
136
|
+
const hooksList = (reg.hooks ?? []).join("\n");
|
|
137
|
+
|
|
134
138
|
console.log(`Zentauri UI — copy component source into your app (shadcn-style)
|
|
135
139
|
|
|
136
140
|
Usage:
|
|
137
141
|
zentauri-components init [options] Create components.json with defaults
|
|
138
142
|
zentauri-components add <component> [...] Copy UI components (and their hooks)
|
|
139
|
-
zentauri-components add hook <hook> [...]
|
|
143
|
+
zentauri-components add hook <hook> [...] Copy hook source only (plus transitive hook deps)
|
|
140
144
|
|
|
141
145
|
List of components:
|
|
142
|
-
${
|
|
146
|
+
${componentsList}
|
|
143
147
|
|
|
144
148
|
List of hooks:
|
|
145
|
-
${
|
|
149
|
+
${hooksList}
|
|
146
150
|
|
|
147
151
|
(The zentauri-ui binary name works the same if your PATH exposes it.)
|
|
148
152
|
|
|
@@ -161,8 +165,8 @@ Use hooks from the package without copying (after npm install):
|
|
|
161
165
|
import { useWindowSize } from "@zentauri-ui/zentauri-components/hooks/useWindowSize";
|
|
162
166
|
|
|
163
167
|
Published package:
|
|
164
|
-
npx @zentauri-ui/zentauri-components init
|
|
165
|
-
npx @zentauri-ui/zentauri-components add accordion buttons inputs
|
|
168
|
+
npx @zentauri-ui/zentauri-components zentauri-components init
|
|
169
|
+
npx @zentauri-ui/zentauri-components zentauri-components add accordion buttons inputs
|
|
166
170
|
|
|
167
171
|
If npx does not pick the right binary:
|
|
168
172
|
npx --yes --package=@zentauri-ui/zentauri-components zentauri-components init
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { cn, clampPage, range } from "../lib/utils";
|
|
2
|
+
export { useBodyScrollLock } from "./useBodyScrollLock";
|
|
3
|
+
export { useClickOutside, type ClickOutsideEventType, type UseClickOutsideParams, } from "./useClickOutside";
|
|
4
|
+
export { useFocusManagement } from "./useFocusManagement";
|
|
5
|
+
export { buildPaginationItems, usePagination, type BuildPaginationItemsParams, type PaginationPageItem, } from "./usePagination";
|
|
6
|
+
export { useClipboard, type UseClipboardResult } from "./useClipboard";
|
|
7
|
+
export { useControllableState, type UseControllableStateParams, } from "./useControllableState";
|
|
8
|
+
export { useDebouncedValue } from "./useDebouncedValue";
|
|
9
|
+
export { useDisclosure, type UseDisclosureParams, type UseDisclosureResult, } from "./useDisclosure";
|
|
10
|
+
export { useDocumentTitle, type UseDocumentTitleParams } from "./useDocumentTitle";
|
|
11
|
+
export { useHover } from "./useHover";
|
|
12
|
+
export { useInView, type UseInViewParams } from "./useInView";
|
|
13
|
+
export { useIntersectionObserver, type UseIntersectionObserverParams, } from "./useIntersectionObserver";
|
|
14
|
+
export { useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect";
|
|
15
|
+
export { useIsMounted } from "./useIsMounted";
|
|
16
|
+
export { useLocalStorage, type UseLocalStorageResult } from "./useLocalStorage";
|
|
17
|
+
export { useMediaQuery } from "./useMediaQuery";
|
|
18
|
+
export { useNetworkStatus } from "./useNetworkStatus";
|
|
19
|
+
export { usePageVisibility } from "./usePageVisibility";
|
|
20
|
+
export { usePrefersColorScheme, type ColorSchemePreference, } from "./usePrefersColorScheme";
|
|
21
|
+
export { usePrefersReducedMotion } from "./usePrefersReducedMotion";
|
|
22
|
+
export { useResizeObserver, type ElementSize } from "./useResizeObserver";
|
|
23
|
+
export { useSessionStorage, type UseSessionStorageResult } from "./useSessionStorage";
|
|
24
|
+
export { useThrottledCallback } from "./useThrottledCallback";
|
|
25
|
+
export { useToggle } from "./useToggle";
|
|
26
|
+
export { useWindowSize, type WindowSize } from "./useWindowSize";
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EACL,oBAAoB,EACpB,KAAK,0BAA0B,GAChC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EACL,uBAAuB,EACvB,KAAK,6BAA6B,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,qBAAqB,EACrB,KAAK,qBAAqB,GAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBodyScrollLock/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locks the document body scroll while `locked` is true by setting `document.body.style.overflow`
|
|
3
|
+
* to `"hidden"`. Uses a module-level lock count so multiple concurrent callers (nested modals,
|
|
4
|
+
* drawer + modal, several hook instances) only restore the original inline `overflow` after the
|
|
5
|
+
* last lock releases.
|
|
6
|
+
*
|
|
7
|
+
* Typical use: modals, drawers, and full-screen overlays where background content must not scroll.
|
|
8
|
+
*
|
|
9
|
+
* @param locked - When `true`, body scroll is hidden; when `false`, this instance releases its
|
|
10
|
+
* lock; the prior overflow is restored only when no instance still holds a lock.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useBodyScrollLock: (locked: boolean) => void;
|
|
13
|
+
//# sourceMappingURL=useBodyScrollLock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBodyScrollLock.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBodyScrollLock/useBodyScrollLock.ts"],"names":[],"mappings":"AA0BA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,GAAI,QAAQ,OAAO,SAUhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useClickOutside/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import { Dispatch, SetStateAction } from "react";
|
|
3
|
+
/** DOM events that can represent an “outside” press for closing overlays. */
|
|
4
|
+
export type ClickOutsideEventType = "mousedown" | "pointerdown" | "touchstart";
|
|
5
|
+
export type UseClickOutsideParams = {
|
|
6
|
+
/** Called with `false` when a qualifying event target is outside `ref.current`. */
|
|
7
|
+
setOpen: (open: boolean) => void | Dispatch<SetStateAction<boolean>>;
|
|
8
|
+
/** Root element of the floating UI; clicks inside this node do not close. */
|
|
9
|
+
ref: RefObject<HTMLElement | null>;
|
|
10
|
+
/** Defaults to `["mousedown"]` for backward compatibility */
|
|
11
|
+
listenEvents?: ClickOutsideEventType[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Registers document-level listeners so that when the user activates outside of `ref`, `setOpen(false)`
|
|
15
|
+
* runs. Useful for dropdowns, popovers, and menus paired with `open` state.
|
|
16
|
+
*
|
|
17
|
+
* @param params.setOpen - State setter or callback that closes the surface.
|
|
18
|
+
* @param params.ref - Container ref; outside is determined with `contains()` on the event target.
|
|
19
|
+
* @param params.listenEvents - Which events to listen for; default is `mousedown` only.
|
|
20
|
+
*/
|
|
21
|
+
export declare const useClickOutside: ({ setOpen, ref, listenEvents, }: UseClickOutsideParams) => void;
|
|
22
|
+
//# sourceMappingURL=useClickOutside.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClickOutside.d.ts","sourceRoot":"","sources":["../../../src/hooks/useClickOutside/useClickOutside.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AAE5D,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAC7B,WAAW,GACX,aAAa,GACb,YAAY,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAAG;IAClC,mFAAmF;IACnF,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,6EAA6E;IAC7E,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACnC,6DAA6D;IAC7D,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACxC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,iCAI7B,qBAAqB,SAmBvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useClipboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type UseClipboardResult = {
|
|
2
|
+
/** `true` after a successful `copy` until the reset delay elapses or `reset` is called. */
|
|
3
|
+
copied: boolean;
|
|
4
|
+
/** Set when the Clipboard API is missing or `writeText` rejects (e.g. permission denied). */
|
|
5
|
+
error: Error | undefined;
|
|
6
|
+
/** Writes `text` via `navigator.clipboard.writeText`; returns whether the write succeeded. */
|
|
7
|
+
copy: (text: string) => Promise<boolean>;
|
|
8
|
+
/** Clears `copied`/`error` and cancels any pending auto-reset timeout. */
|
|
9
|
+
reset: () => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Wraps the async Clipboard API with React state for UX feedback (“Copied!”) and error surfacing.
|
|
13
|
+
*
|
|
14
|
+
* After a successful copy, `copied` flips to `true` for `resetDelay` ms (or stays true if `resetDelay` is 0).
|
|
15
|
+
* SSR-safe: `copy` resolves `false` with an error when `navigator.clipboard` is unavailable.
|
|
16
|
+
*
|
|
17
|
+
* @param resetDelay - Milliseconds before `copied` auto-clears after success; `0` disables auto-clear.
|
|
18
|
+
* @returns `{ copied, error, copy, reset }` for rendering and handlers.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useClipboard(resetDelay?: number): UseClipboardResult;
|
|
21
|
+
//# sourceMappingURL=useClipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useClipboard/useClipboard.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,2FAA2F;IAC3F,MAAM,EAAE,OAAO,CAAC;IAChB,6FAA6F;IAC7F,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,8FAA8F;IAC9F,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,0EAA0E;IAC1E,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,UAAU,SAAO,GAAG,kBAAkB,CA4ClE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useControllableState/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,KAAK,0BAA0B,GAChC,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type UseControllableStateParams<T> = {
|
|
2
|
+
/** When defined, the hook is controlled and this value is returned as state. */
|
|
3
|
+
value?: T;
|
|
4
|
+
/** Initial / fallback value when uncontrolled (`value` is `undefined`). */
|
|
5
|
+
defaultValue: T;
|
|
6
|
+
/** Notified on every `setValue` with the resolved next value (controlled and uncontrolled). */
|
|
7
|
+
onChange?: (next: T) => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Implements the React “controlled vs uncontrolled” pattern as a single state tuple.
|
|
11
|
+
*
|
|
12
|
+
* - If `value` is `undefined`, internal state mirrors `defaultValue` and updates on `setValue`.
|
|
13
|
+
* - If `value` is defined, returned state follows `value`; `setValue` still calls `onChange` so the parent can update.
|
|
14
|
+
* - `setValue` accepts either the next value or an updater `(prev) => next` (updater uses the current `value` in controlled mode).
|
|
15
|
+
*
|
|
16
|
+
* @typeParam T - State value type.
|
|
17
|
+
* @param params - `value`, `defaultValue`, and optional `onChange`.
|
|
18
|
+
* @returns `[value, setValue]` compatible with `useState`-style usage.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useControllableState<T>({ value: valueProp, defaultValue, onChange, }: UseControllableStateParams<T>): [T, (next: T | ((prev: T) => T)) => void];
|
|
21
|
+
//# sourceMappingURL=useControllableState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControllableState.d.ts","sourceRoot":"","sources":["../../../src/hooks/useControllableState/useControllableState.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI;IAC1C,gFAAgF;IAChF,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,2EAA2E;IAC3E,YAAY,EAAE,CAAC,CAAC;IAChB,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,KAAK,EAAE,SAAS,EAChB,YAAY,EACZ,QAAQ,GACT,EAAE,0BAA0B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAoB3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDebouncedValue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a lagged copy of `value` that only updates after `value` has been stable for `delayMs`.
|
|
3
|
+
* Each change to `value` or `delayMs` resets the timer; rapid updates collapse into one committed update.
|
|
4
|
+
*
|
|
5
|
+
* Common uses: search inputs, resize-driven layout, or any expensive work that should not run on every keystroke.
|
|
6
|
+
*
|
|
7
|
+
* @typeParam T - Value type (any JSON-serializable or referential type).
|
|
8
|
+
* @param value - Live value from props or state.
|
|
9
|
+
* @param delayMs - Debounce interval in milliseconds.
|
|
10
|
+
* @returns The last value that survived the full delay without a newer `value` arriving.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useDebouncedValue<T>(value: T, delayMs: number): T;
|
|
13
|
+
//# sourceMappingURL=useDebouncedValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebouncedValue.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDebouncedValue/useDebouncedValue.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,CAajE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDisclosure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type UseDisclosureParams = {
|
|
2
|
+
/** Controlled open flag; omit for uncontrolled usage with `defaultOpen`. */
|
|
3
|
+
open?: boolean;
|
|
4
|
+
/** Initial open state when uncontrolled. */
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
/** Fired whenever open state changes from user-driven `setOpen` / `open` / `close` / `toggle`. */
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
};
|
|
9
|
+
export type UseDisclosureResult = {
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
open: () => void;
|
|
12
|
+
close: () => void;
|
|
13
|
+
toggle: () => void;
|
|
14
|
+
setOpen: (open: boolean) => void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Boolean open/close state for overlays (dialogs, menus, collapsible regions) with optional control from the parent.
|
|
18
|
+
* Built on {@link useControllableState}; semantics match common headless UI libraries.
|
|
19
|
+
*
|
|
20
|
+
* @param params - Optional `open`, `defaultOpen`, and `onOpenChange`.
|
|
21
|
+
* @returns Helpers `open`, `close`, `toggle`, `setOpen`, and the current `isOpen` flag.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useDisclosure({ open: openProp, defaultOpen, onOpenChange, }?: UseDisclosureParams): UseDisclosureResult;
|
|
24
|
+
//# sourceMappingURL=useDisclosure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDisclosure.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDisclosure/useDisclosure.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,mBAAmB,GAAG;IAChC,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kGAAkG;IAClG,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EAAE,QAAQ,EACd,WAAmB,EACnB,YAAY,GACb,GAAE,mBAAwB,GAAG,mBAAmB,CA2BhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDocumentTitle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type UseDocumentTitleParams = {
|
|
2
|
+
title: string;
|
|
3
|
+
/** When true (default), restores the document title from before this hook mounted when the component unmounts */
|
|
4
|
+
restoreOnUnmount?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Keeps `document.title` in sync with `title` for the lifetime of the component.
|
|
8
|
+
*
|
|
9
|
+
* On first mount in the browser, the current title is captured. When `title` changes, the document title updates.
|
|
10
|
+
* If `restoreOnUnmount` is true when the component unmounts, the captured title is restored so nested routes or
|
|
11
|
+
* modals do not leak titles. Changing `restoreOnUnmount` while mounted does not run restore; only unmount does.
|
|
12
|
+
*
|
|
13
|
+
* @param params.title - Desired `document.title` string.
|
|
14
|
+
* @param params.restoreOnUnmount - Whether to restore the pre-mount title on unmount (default `true`). The value
|
|
15
|
+
* read at unmount time determines behavior, not mid-mount prop changes.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useDocumentTitle({ title, restoreOnUnmount, }: UseDocumentTitleParams): void;
|
|
18
|
+
//# sourceMappingURL=useDocumentTitle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDocumentTitle.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDocumentTitle/useDocumentTitle.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,iHAAiH;IACjH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,gBAAuB,GACxB,EAAE,sBAAsB,GAAG,IAAI,CAiC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFocusManagement/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Composes modal-like behavior for an open overlay: body scroll lock, Escape to close, and focus trapping.
|
|
4
|
+
*
|
|
5
|
+
* - Delegates scroll locking to {@link useBodyScrollLock} while `open` is true.
|
|
6
|
+
* - Listens for `Escape` on `window` and calls `setOpen(false)`.
|
|
7
|
+
* - When `open` becomes true, focuses the first visible focusable inside `contentRef`, or the container itself.
|
|
8
|
+
* - Traps focus within `contentRef` via a capturing `focusin` listener on `document` that redirects focus back inside.
|
|
9
|
+
* - On close/unmount of the open effect, restores focus to the element that was focused before the trap ran.
|
|
10
|
+
*
|
|
11
|
+
* @param params.open - Whether the overlay is visible.
|
|
12
|
+
* @param params.setOpen - Setter used for Escape and cleanup paths.
|
|
13
|
+
* @param params.contentRef - Root of the dialog/drawer content (must point at a focusable container or include focusables).
|
|
14
|
+
* @param params.focusableSelector - Query selector for tabbable elements; defaults to a common interactive set.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useFocusManagement: ({ open, setOpen, contentRef, focusableSelector, }: {
|
|
17
|
+
open: boolean;
|
|
18
|
+
setOpen: (open: boolean) => void;
|
|
19
|
+
contentRef: RefObject<HTMLDivElement | null>;
|
|
20
|
+
focusableSelector?: string;
|
|
21
|
+
}) => void;
|
|
22
|
+
//# sourceMappingURL=useFocusManagement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusManagement.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFocusManagement/useFocusManagement.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAAI,mDAKhC;IACD,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,UAAU,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,SA2CA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useHover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RefCallback } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Tracks pointer hover state for a single DOM node using `pointerenter` / `pointerleave`.
|
|
4
|
+
*
|
|
5
|
+
* When the ref target changes (or unmounts), hover is cleared so state does not stay `true` after
|
|
6
|
+
* retargeting without a `pointerleave` on the previous node.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam T - HTMLElement subtype for the ref callback (e.g. `HTMLDivElement`).
|
|
9
|
+
* @returns A tuple `[setRef, hovered]` where `setRef` is a callback ref to attach to the target element
|
|
10
|
+
* and `hovered` is `true` while the pointer is over that element (primary button agnostic).
|
|
11
|
+
*/
|
|
12
|
+
export declare function useHover<T extends HTMLElement>(): [RefCallback<T>, boolean];
|
|
13
|
+
//# sourceMappingURL=useHover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHover.d.ts","sourceRoot":"","sources":["../../../src/hooks/useHover/useHover.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGzC;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CA6B3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useInView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RefCallback } from "react";
|
|
2
|
+
export type UseInViewParams = IntersectionObserverInit & {
|
|
3
|
+
/** When `false`, no observer is attached (useful to pause work when off-screen lists are virtualized). */
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Convenience wrapper around {@link useIntersectionObserver} that exposes only a boolean `inView` flag.
|
|
8
|
+
*
|
|
9
|
+
* `inView` is `true` when the latest `IntersectionObserverEntry.isIntersecting` is truthy; otherwise `false`.
|
|
10
|
+
* Accepts the same `root`, `rootMargin`, `threshold`, and `enabled` options as the underlying observer.
|
|
11
|
+
*
|
|
12
|
+
* @typeParam T - Observed element type.
|
|
13
|
+
* @param params - IntersectionObserver options plus optional `enabled` flag.
|
|
14
|
+
* @returns `[setRef, inView]` callback ref and intersection boolean.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useInView<T extends Element>(params?: UseInViewParams): [RefCallback<T>, boolean];
|
|
17
|
+
//# sourceMappingURL=useInView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInView.d.ts","sourceRoot":"","sources":["../../../src/hooks/useInView/useInView.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAIzC,MAAM,MAAM,eAAe,GAAG,wBAAwB,GAAG;IACvD,0GAA0G;IAC1G,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,OAAO,EACzC,MAAM,GAAE,eAAoB,GAC3B,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAI3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIntersectionObserver/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,KAAK,6BAA6B,GACnC,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RefCallback } from "react";
|
|
2
|
+
export type UseIntersectionObserverParams = IntersectionObserverInit & {
|
|
3
|
+
/** When `false`, disconnects the observer until re-enabled (saves work for hidden or inactive content). */
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Observes a single element with the browser `IntersectionObserver` API and exposes the latest entry.
|
|
8
|
+
*
|
|
9
|
+
* Returns a callback ref: assign it to the element to measure. When `enabled` is false or `IntersectionObserver`
|
|
10
|
+
* is undefined (unsupported environment), the effect is a no-op and `entry` may stay `undefined`.
|
|
11
|
+
*
|
|
12
|
+
* @typeParam T - Observed element type.
|
|
13
|
+
* @param params - Standard `IntersectionObserverInit` fields plus optional `enabled` (default `true`).
|
|
14
|
+
* @returns `[setRef, entry]` where `entry` is the most recent callback record for the observed target.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useIntersectionObserver<T extends Element>(params?: UseIntersectionObserverParams): [RefCallback<T>, IntersectionObserverEntry | undefined];
|
|
17
|
+
//# sourceMappingURL=useIntersectionObserver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIntersectionObserver.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIntersectionObserver/useIntersectionObserver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGzC,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,GAAG;IACrE,2GAA2G;IAC3G,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,OAAO,EACvD,MAAM,GAAE,6BAAkC,GACzC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC,CA+BzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsMounted/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a stable function that reports whether the component is currently mounted.
|
|
3
|
+
*
|
|
4
|
+
* Useful to guard async completions (fetch, timers) so `setState` does not run after unmount.
|
|
5
|
+
* The returned function identity is stable across renders; it reads a ref updated in an effect.
|
|
6
|
+
*
|
|
7
|
+
* @returns `() => boolean` — `true` after mount until unmount cleanup runs.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useIsMounted(): () => boolean;
|
|
10
|
+
//# sourceMappingURL=useIsMounted.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsMounted.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsMounted/useIsMounted.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,MAAM,OAAO,CAS5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsomorphicLayoutEffect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Runs `useLayoutEffect` in the browser and `useEffect` on the server to avoid SSR warnings.
|
|
4
|
+
*
|
|
5
|
+
* Use for DOM measurements or synchronous paint updates that must run before the browser paints,
|
|
6
|
+
* but only when the code path is safe on the client; on the server the timing matches `useEffect`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
9
|
+
//# sourceMappingURL=useIsomorphicLayoutEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,kBACuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLocalStorage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type UseLocalStorageResult<T> = [
|
|
2
|
+
T,
|
|
3
|
+
(value: T | ((previous: T) => T)) => void,
|
|
4
|
+
() => void
|
|
5
|
+
];
|
|
6
|
+
/**
|
|
7
|
+
* Syncs JSON-serialized state with `window.localStorage` under a fixed key.
|
|
8
|
+
*
|
|
9
|
+
* - Initial read runs on the client; SSR uses `initialValue`.
|
|
10
|
+
* - `setValue` persists with `JSON.stringify` and updates React state; functional updates supported.
|
|
11
|
+
* - `remove` clears the key and resets state to `initialValue`.
|
|
12
|
+
* - Subscribes to the `storage` event so updates from other tabs (or same tab via `storage` dispatch quirks) reconcile.
|
|
13
|
+
* - Read/write failures (private mode, quota) fall back silently on read; write errors are swallowed except `remove` logs on failure.
|
|
14
|
+
*
|
|
15
|
+
* @typeParam T - Stored value type; must be compatible with `JSON.stringify` / `parse`.
|
|
16
|
+
* @param key - `localStorage` key.
|
|
17
|
+
* @param initialValue - Fallback when missing, invalid JSON, or during SSR.
|
|
18
|
+
* @returns `[stored, setValue, remove]` tuple mirroring `useState` plus explicit removal.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useLocalStorage<T>(key: string, initialValue: T): UseLocalStorageResult<T>;
|
|
21
|
+
//# sourceMappingURL=useLocalStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLocalStorage/useLocalStorage.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI;IACrC,CAAC;IACD,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI;IACzC,MAAM,IAAI;CACX,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,CAAC,GACd,qBAAqB,CAAC,CAAC,CAAC,CAkE1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useMediaQuery/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscribes to `window.matchMedia(query)` and returns whether the query currently matches.
|
|
3
|
+
*
|
|
4
|
+
* On the server or when `matchMedia` is missing, `defaultValue` is used for the initial render and the effect no-ops.
|
|
5
|
+
* The `change` listener keeps `matches` updated when the viewport or user settings change.
|
|
6
|
+
*
|
|
7
|
+
* @param query - A valid media query string, e.g. `"(min-width: 768px)"`.
|
|
8
|
+
* @param defaultValue - Value to use before hydration or when `matchMedia` is unavailable (default `false`).
|
|
9
|
+
* @returns Current `matches` boolean for the query.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useMediaQuery(query: string, defaultValue?: boolean): boolean;
|
|
12
|
+
//# sourceMappingURL=useMediaQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../../src/hooks/useMediaQuery/useMediaQuery.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,YAAY,UAAQ,GACnB,OAAO,CAmBT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNetworkStatus/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reflects browser online/offline connectivity using `navigator.onLine` and the `window` `"online"` / `"offline"` events.
|
|
3
|
+
*
|
|
4
|
+
* Defaults to `true` during SSR when `navigator` is undefined. Does not expose `connection` quality metrics—only reachability hints.
|
|
5
|
+
*
|
|
6
|
+
* @returns `true` when the browser believes the device is online, `false` when offline.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useNetworkStatus(): boolean;
|
|
9
|
+
//# sourceMappingURL=useNetworkStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNetworkStatus.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNetworkStatus/useNetworkStatus.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAqB1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePageVisibility/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks `document.visibilityState` (`"visible"`, `"hidden"`, or `"prerender"`) across tab visibility changes.
|
|
3
|
+
*
|
|
4
|
+
* Subscribes to `"visibilitychange"` so backgrounding a tab or switching windows updates state. SSR defaults to `"visible"`.
|
|
5
|
+
*
|
|
6
|
+
* @returns Current `DocumentVisibilityState` from the Page Visibility API.
|
|
7
|
+
*/
|
|
8
|
+
export declare function usePageVisibility(): DocumentVisibilityState;
|
|
9
|
+
//# sourceMappingURL=usePageVisibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePageVisibility.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePageVisibility/usePageVisibility.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,uBAAuB,CAmB3D"}
|