@cp949/mui-react19 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/{rolldown-runtime-Chgba0Kb.cjs → _virtual/_rolldown/runtime.cjs} +1 -1
- package/dist/{rolldown-runtime-DK3Fl9T5.js → _virtual/_rolldown/runtime.js} +1 -1
- package/dist/components/Center.cjs +2 -0
- package/dist/components/Center.cjs.map +1 -0
- package/dist/components/Center.d.cts +11 -0
- package/dist/components/Center.d.ts +11 -0
- package/dist/components/Center.js +2 -0
- package/dist/components/Center.js.map +1 -0
- package/dist/components/CooldownButton.cjs +2 -0
- package/dist/components/CooldownButton.cjs.map +1 -0
- package/dist/components/CooldownButton.d.cts +14 -0
- package/dist/components/CooldownButton.d.ts +14 -0
- package/dist/components/CooldownButton.js +2 -0
- package/dist/components/CooldownButton.js.map +1 -0
- package/dist/components/CooldownButtonBase.cjs +2 -0
- package/dist/components/CooldownButtonBase.cjs.map +1 -0
- package/dist/components/CooldownButtonBase.d.cts +14 -0
- package/dist/components/CooldownButtonBase.d.ts +14 -0
- package/dist/components/CooldownButtonBase.js +2 -0
- package/dist/components/CooldownButtonBase.js.map +1 -0
- package/dist/components/CooldownIconButton.cjs +2 -0
- package/dist/components/CooldownIconButton.cjs.map +1 -0
- package/dist/components/CooldownIconButton.d.cts +14 -0
- package/dist/components/CooldownIconButton.d.ts +14 -0
- package/dist/components/CooldownIconButton.js +2 -0
- package/dist/components/CooldownIconButton.js.map +1 -0
- package/dist/components/CopyButtonWrapper.cjs +2 -0
- package/dist/components/CopyButtonWrapper.cjs.map +1 -0
- package/dist/components/CopyButtonWrapper.d.cts +94 -0
- package/dist/components/CopyButtonWrapper.d.ts +94 -0
- package/dist/components/CopyButtonWrapper.js +2 -0
- package/dist/components/CopyButtonWrapper.js.map +1 -0
- package/dist/components/CustomTableBody.cjs +2 -0
- package/dist/components/CustomTableBody.cjs.map +1 -0
- package/dist/components/CustomTableBody.d.cts +9 -0
- package/dist/components/CustomTableBody.d.ts +9 -0
- package/dist/components/CustomTableBody.js +2 -0
- package/dist/components/CustomTableBody.js.map +1 -0
- package/dist/components/DebouncedButton.cjs +2 -0
- package/dist/components/DebouncedButton.cjs.map +1 -0
- package/dist/components/DebouncedButton.d.cts +11 -0
- package/dist/components/DebouncedButton.d.ts +11 -0
- package/dist/components/DebouncedButton.js +2 -0
- package/dist/components/DebouncedButton.js.map +1 -0
- package/dist/components/DebouncedButtonBase.cjs +2 -0
- package/dist/components/DebouncedButtonBase.cjs.map +1 -0
- package/dist/components/DebouncedButtonBase.d.cts +11 -0
- package/dist/components/DebouncedButtonBase.d.ts +11 -0
- package/dist/components/DebouncedButtonBase.js +2 -0
- package/dist/components/DebouncedButtonBase.js.map +1 -0
- package/dist/components/DebouncedIconButton.cjs +2 -0
- package/dist/components/DebouncedIconButton.cjs.map +1 -0
- package/dist/components/DebouncedIconButton.d.cts +11 -0
- package/dist/components/DebouncedIconButton.d.ts +11 -0
- package/dist/components/DebouncedIconButton.js +2 -0
- package/dist/components/DebouncedIconButton.js.map +1 -0
- package/dist/components/DebouncedRender.cjs +2 -0
- package/dist/components/DebouncedRender.cjs.map +1 -0
- package/dist/components/DebouncedRender.d.cts +31 -0
- package/dist/components/DebouncedRender.d.ts +31 -0
- package/dist/components/DebouncedRender.js +2 -0
- package/dist/components/DebouncedRender.js.map +1 -0
- package/dist/components/DelayedRender.cjs +2 -0
- package/dist/components/DelayedRender.cjs.map +1 -0
- package/dist/components/DelayedRender.d.cts +34 -0
- package/dist/components/DelayedRender.d.ts +34 -0
- package/dist/components/DelayedRender.js +2 -0
- package/dist/components/DelayedRender.js.map +1 -0
- package/dist/components/FileButton.cjs +2 -0
- package/dist/components/FileButton.cjs.map +1 -0
- package/dist/components/FileButton.d.cts +88 -0
- package/dist/components/FileButton.d.ts +88 -0
- package/dist/components/FileButton.js +2 -0
- package/dist/components/FileButton.js.map +1 -0
- package/dist/components/FlexItemsContainer.cjs +2 -0
- package/dist/components/FlexItemsContainer.cjs.map +1 -0
- package/dist/components/FlexItemsContainer.d.cts +51 -0
- package/dist/components/FlexItemsContainer.d.ts +51 -0
- package/dist/components/FlexItemsContainer.js +2 -0
- package/dist/components/FlexItemsContainer.js.map +1 -0
- package/dist/components/FloatingIndicator/FloatingIndicator.cjs +2 -0
- package/dist/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -0
- package/dist/components/FloatingIndicator/FloatingIndicator.d.cts +27 -0
- package/dist/components/FloatingIndicator/FloatingIndicator.d.ts +27 -0
- package/dist/components/FloatingIndicator/FloatingIndicator.js +2 -0
- package/dist/components/FloatingIndicator/FloatingIndicator.js.map +1 -0
- package/dist/components/FloatingIndicator/index.cjs +2 -0
- package/dist/components/FloatingIndicator/index.cjs.map +1 -0
- package/dist/components/FloatingIndicator/index.d.cts +2 -0
- package/dist/components/FloatingIndicator/index.d.ts +2 -0
- package/dist/components/FloatingIndicator/index.js +2 -0
- package/dist/components/FloatingIndicator/index.js.map +1 -0
- package/dist/components/FloatingIndicator/useFloatingIndicator.cjs +2 -0
- package/dist/components/FloatingIndicator/useFloatingIndicator.cjs.map +1 -0
- package/dist/components/FloatingIndicator/useFloatingIndicator.js +2 -0
- package/dist/components/FloatingIndicator/useFloatingIndicator.js.map +1 -0
- package/dist/components/Hide.cjs +2 -0
- package/dist/components/Hide.cjs.map +1 -0
- package/dist/components/Hide.d.cts +12 -0
- package/dist/components/Hide.d.ts +12 -0
- package/dist/components/Hide.js +2 -0
- package/dist/components/Hide.js.map +1 -0
- package/dist/components/Highlight/Highlight.cjs +2 -0
- package/dist/components/Highlight/Highlight.cjs.map +1 -0
- package/dist/components/Highlight/Highlight.d.cts +93 -0
- package/dist/components/Highlight/Highlight.d.ts +93 -0
- package/dist/components/Highlight/Highlight.js +2 -0
- package/dist/components/Highlight/Highlight.js.map +1 -0
- package/dist/components/Highlight/highlighter/highlighter.cjs +2 -0
- package/dist/components/Highlight/highlighter/highlighter.cjs.map +1 -0
- package/dist/components/Highlight/highlighter/highlighter.js +2 -0
- package/dist/components/Highlight/highlighter/highlighter.js.map +1 -0
- package/dist/components/Highlight/index.d.cts +2 -0
- package/dist/components/Highlight/index.d.ts +2 -0
- package/dist/components/LengthLimitHelperText.cjs +2 -0
- package/dist/components/LengthLimitHelperText.cjs.map +1 -0
- package/dist/components/LengthLimitHelperText.d.cts +14 -0
- package/dist/components/LengthLimitHelperText.d.ts +14 -0
- package/dist/components/LengthLimitHelperText.js +2 -0
- package/dist/components/LengthLimitHelperText.js.map +1 -0
- package/dist/components/LgOrUp.cjs +2 -0
- package/dist/components/LgOrUp.cjs.map +1 -0
- package/dist/components/LgOrUp.d.cts +8 -0
- package/dist/components/LgOrUp.d.ts +8 -0
- package/dist/components/LgOrUp.js +2 -0
- package/dist/components/LgOrUp.js.map +1 -0
- package/dist/components/ListPagination.cjs +2 -0
- package/dist/components/ListPagination.cjs.map +1 -0
- package/dist/components/ListPagination.d.cts +55 -0
- package/dist/components/ListPagination.d.ts +55 -0
- package/dist/components/ListPagination.js +2 -0
- package/dist/components/ListPagination.js.map +1 -0
- package/dist/components/Mark.cjs +2 -0
- package/dist/components/Mark.cjs.map +1 -0
- package/dist/components/Mark.d.cts +17 -0
- package/dist/components/Mark.d.ts +17 -0
- package/dist/components/Mark.js +2 -0
- package/dist/components/Mark.js.map +1 -0
- package/dist/components/MdOrDown.cjs +2 -0
- package/dist/components/MdOrDown.cjs.map +1 -0
- package/dist/components/MdOrDown.d.cts +8 -0
- package/dist/components/MdOrDown.d.ts +8 -0
- package/dist/components/MdOrDown.js +2 -0
- package/dist/components/MdOrDown.js.map +1 -0
- package/dist/components/MdOrUp.cjs +2 -0
- package/dist/components/MdOrUp.cjs.map +1 -0
- package/dist/components/MdOrUp.d.cts +8 -0
- package/dist/components/MdOrUp.d.ts +8 -0
- package/dist/components/MdOrUp.js +2 -0
- package/dist/components/MdOrUp.js.map +1 -0
- package/dist/components/Paper.cjs +2 -0
- package/dist/components/Paper.cjs.map +1 -0
- package/dist/components/Paper.d.cts +10 -0
- package/dist/components/Paper.d.ts +10 -0
- package/dist/components/Paper.js +2 -0
- package/dist/components/Paper.js.map +1 -0
- package/dist/components/PasswordTextField.cjs +2 -0
- package/dist/components/PasswordTextField.cjs.map +1 -0
- package/dist/components/PasswordTextField.d.cts +25 -0
- package/dist/components/PasswordTextField.d.ts +25 -0
- package/dist/components/PasswordTextField.js +2 -0
- package/dist/components/PasswordTextField.js.map +1 -0
- package/dist/components/SearchBoxDebouncer.cjs +2 -0
- package/dist/components/SearchBoxDebouncer.cjs.map +1 -0
- package/dist/components/SearchBoxDebouncer.d.cts +46 -0
- package/dist/components/SearchBoxDebouncer.d.ts +46 -0
- package/dist/components/SearchBoxDebouncer.js +2 -0
- package/dist/components/SearchBoxDebouncer.js.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.cjs +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.cts +57 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +57 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/components/SegmentedControl/components.cjs +2 -0
- package/dist/components/SegmentedControl/components.cjs.map +1 -0
- package/dist/components/SegmentedControl/components.js +2 -0
- package/dist/components/SegmentedControl/components.js.map +1 -0
- package/dist/components/SegmentedControl/index.d.cts +2 -0
- package/dist/components/SegmentedControl/index.d.ts +2 -0
- package/dist/components/Show.cjs +2 -0
- package/dist/components/Show.cjs.map +1 -0
- package/dist/components/Show.d.cts +10 -0
- package/dist/components/Show.d.ts +10 -0
- package/dist/components/Show.js +2 -0
- package/dist/components/Show.js.map +1 -0
- package/dist/components/SmOrDown.cjs +2 -0
- package/dist/components/SmOrDown.cjs.map +1 -0
- package/dist/components/SmOrDown.d.cts +8 -0
- package/dist/components/SmOrDown.d.ts +8 -0
- package/dist/components/SmOrDown.js +2 -0
- package/dist/components/SmOrDown.js.map +1 -0
- package/dist/components/SmOrUp.cjs +2 -0
- package/dist/components/SmOrUp.cjs.map +1 -0
- package/dist/components/SmOrUp.d.cts +8 -0
- package/dist/components/SmOrUp.d.ts +8 -0
- package/dist/components/SmOrUp.js +2 -0
- package/dist/components/SmOrUp.js.map +1 -0
- package/dist/components/Space.cjs +2 -0
- package/dist/components/Space.cjs.map +1 -0
- package/dist/components/Space.d.cts +14 -0
- package/dist/components/Space.d.ts +14 -0
- package/dist/components/Space.js +2 -0
- package/dist/components/Space.js.map +1 -0
- package/dist/components/Spoiler.cjs +2 -0
- package/dist/components/Spoiler.cjs.map +1 -0
- package/dist/components/Spoiler.d.cts +33 -0
- package/dist/components/Spoiler.d.ts +33 -0
- package/dist/components/Spoiler.js +2 -0
- package/dist/components/Spoiler.js.map +1 -0
- package/dist/components/XsOrDown.cjs +2 -0
- package/dist/components/XsOrDown.cjs.map +1 -0
- package/dist/components/XsOrDown.d.cts +8 -0
- package/dist/components/XsOrDown.d.ts +8 -0
- package/dist/components/XsOrDown.js +2 -0
- package/dist/components/XsOrDown.js.map +1 -0
- package/dist/components/YmTypography.cjs +2 -0
- package/dist/components/YmTypography.cjs.map +1 -0
- package/dist/components/YmTypography.d.cts +23 -0
- package/dist/components/YmTypography.d.ts +23 -0
- package/dist/components/YmTypography.js +2 -0
- package/dist/components/YmTypography.js.map +1 -0
- package/dist/components/YmdTextField.cjs +2 -0
- package/dist/components/YmdTextField.cjs.map +1 -0
- package/dist/components/YmdTextField.d.cts +48 -0
- package/dist/components/YmdTextField.d.ts +48 -0
- package/dist/components/YmdTextField.js +2 -0
- package/dist/components/YmdTextField.js.map +1 -0
- package/dist/components/YmdTypography.cjs +2 -0
- package/dist/components/YmdTypography.cjs.map +1 -0
- package/dist/components/YmdTypography.d.cts +23 -0
- package/dist/components/YmdTypography.d.ts +23 -0
- package/dist/components/YmdTypography.js +2 -0
- package/dist/components/YmdTypography.js.map +1 -0
- package/dist/components/absolute-box/create-absolute-box.cjs +2 -0
- package/dist/components/absolute-box/create-absolute-box.cjs.map +1 -0
- package/dist/components/absolute-box/create-absolute-box.js +2 -0
- package/dist/components/absolute-box/create-absolute-box.js.map +1 -0
- package/dist/components/bottom-absolute/BottomAbsolute.cjs +2 -0
- package/dist/components/bottom-absolute/BottomAbsolute.cjs.map +1 -0
- package/dist/components/bottom-absolute/BottomAbsolute.d.cts +20 -0
- package/dist/components/bottom-absolute/BottomAbsolute.d.ts +20 -0
- package/dist/components/bottom-absolute/BottomAbsolute.js +2 -0
- package/dist/components/bottom-absolute/BottomAbsolute.js.map +1 -0
- package/dist/components/bottom-absolute/BottomAbsoluteCenter.cjs +2 -0
- package/dist/components/bottom-absolute/BottomAbsoluteCenter.cjs.map +1 -0
- package/dist/components/bottom-absolute/BottomAbsoluteCenter.d.cts +10 -0
- package/dist/components/bottom-absolute/BottomAbsoluteCenter.d.ts +10 -0
- package/dist/components/bottom-absolute/BottomAbsoluteCenter.js +2 -0
- package/dist/components/bottom-absolute/BottomAbsoluteCenter.js.map +1 -0
- package/dist/components/bottom-absolute/BottomAbsoluteLeft.cjs +2 -0
- package/dist/components/bottom-absolute/BottomAbsoluteLeft.cjs.map +1 -0
- package/dist/components/bottom-absolute/BottomAbsoluteLeft.d.cts +11 -0
- package/dist/components/bottom-absolute/BottomAbsoluteLeft.d.ts +11 -0
- package/dist/components/bottom-absolute/BottomAbsoluteLeft.js +2 -0
- package/dist/components/bottom-absolute/BottomAbsoluteLeft.js.map +1 -0
- package/dist/components/bottom-absolute/BottomAbsoluteRight.cjs +2 -0
- package/dist/components/bottom-absolute/BottomAbsoluteRight.cjs.map +1 -0
- package/dist/components/bottom-absolute/BottomAbsoluteRight.d.cts +11 -0
- package/dist/components/bottom-absolute/BottomAbsoluteRight.d.ts +11 -0
- package/dist/components/bottom-absolute/BottomAbsoluteRight.js +2 -0
- package/dist/components/bottom-absolute/BottomAbsoluteRight.js.map +1 -0
- package/dist/components/bottom-absolute/index.d.cts +5 -0
- package/dist/components/bottom-absolute/index.d.ts +5 -0
- package/dist/components/center-absolute/CenterAbsolute.cjs +2 -0
- package/dist/components/center-absolute/CenterAbsolute.cjs.map +1 -0
- package/dist/components/center-absolute/CenterAbsolute.d.cts +19 -0
- package/dist/components/center-absolute/CenterAbsolute.d.ts +19 -0
- package/dist/components/center-absolute/CenterAbsolute.js +2 -0
- package/dist/components/center-absolute/CenterAbsolute.js.map +1 -0
- package/dist/components/center-absolute/CenterAbsoluteCenter.cjs +2 -0
- package/dist/components/center-absolute/CenterAbsoluteCenter.cjs.map +1 -0
- package/dist/components/center-absolute/CenterAbsoluteCenter.d.cts +9 -0
- package/dist/components/center-absolute/CenterAbsoluteCenter.d.ts +9 -0
- package/dist/components/center-absolute/CenterAbsoluteCenter.js +2 -0
- package/dist/components/center-absolute/CenterAbsoluteCenter.js.map +1 -0
- package/dist/components/center-absolute/CenterAbsoluteLeft.cjs +2 -0
- package/dist/components/center-absolute/CenterAbsoluteLeft.cjs.map +1 -0
- package/dist/components/center-absolute/CenterAbsoluteLeft.d.cts +10 -0
- package/dist/components/center-absolute/CenterAbsoluteLeft.d.ts +10 -0
- package/dist/components/center-absolute/CenterAbsoluteLeft.js +2 -0
- package/dist/components/center-absolute/CenterAbsoluteLeft.js.map +1 -0
- package/dist/components/center-absolute/CenterAbsoluteRight.cjs +2 -0
- package/dist/components/center-absolute/CenterAbsoluteRight.cjs.map +1 -0
- package/dist/components/center-absolute/CenterAbsoluteRight.d.cts +10 -0
- package/dist/components/center-absolute/CenterAbsoluteRight.d.ts +10 -0
- package/dist/components/center-absolute/CenterAbsoluteRight.js +2 -0
- package/dist/components/center-absolute/CenterAbsoluteRight.js.map +1 -0
- package/dist/components/center-absolute/index.d.cts +5 -0
- package/dist/components/center-absolute/index.d.ts +5 -0
- package/dist/components/flex/FlexColumn.cjs +2 -0
- package/dist/components/flex/FlexColumn.cjs.map +1 -0
- package/dist/components/flex/FlexColumn.d.cts +24 -0
- package/dist/components/flex/FlexColumn.d.ts +24 -0
- package/dist/components/flex/FlexColumn.js +2 -0
- package/dist/components/flex/FlexColumn.js.map +1 -0
- package/dist/components/flex/FlexRow.cjs +2 -0
- package/dist/components/flex/FlexRow.cjs.map +1 -0
- package/dist/components/flex/FlexRow.d.cts +24 -0
- package/dist/components/flex/FlexRow.d.ts +24 -0
- package/dist/components/flex/FlexRow.js +2 -0
- package/dist/components/flex/FlexRow.js.map +1 -0
- package/dist/components/flex/index.d.cts +4 -0
- package/dist/components/flex/index.d.ts +4 -0
- package/dist/components/flex/types.d.cts +11 -0
- package/dist/components/flex/types.d.ts +11 -0
- package/dist/components/index.d.cts +69 -0
- package/dist/components/index.d.ts +69 -0
- package/dist/components/layout/create-layout-component.cjs +2 -0
- package/dist/components/layout/create-layout-component.cjs.map +1 -0
- package/dist/components/layout/create-layout-component.js +2 -0
- package/dist/components/layout/create-layout-component.js.map +1 -0
- package/dist/components/portlet/Portlet.cjs +2 -0
- package/dist/components/portlet/Portlet.cjs.map +1 -0
- package/dist/components/portlet/Portlet.d.cts +40 -0
- package/dist/components/portlet/Portlet.d.ts +40 -0
- package/dist/components/portlet/Portlet.js +2 -0
- package/dist/components/portlet/Portlet.js.map +1 -0
- package/dist/components/portlet/PortletContent.cjs +2 -0
- package/dist/components/portlet/PortletContent.cjs.map +1 -0
- package/dist/components/portlet/PortletContent.d.cts +21 -0
- package/dist/components/portlet/PortletContent.d.ts +21 -0
- package/dist/components/portlet/PortletContent.js +2 -0
- package/dist/components/portlet/PortletContent.js.map +1 -0
- package/dist/components/portlet/PortletFooter.cjs +2 -0
- package/dist/components/portlet/PortletFooter.cjs.map +1 -0
- package/dist/components/portlet/PortletFooter.d.cts +21 -0
- package/dist/components/portlet/PortletFooter.d.ts +21 -0
- package/dist/components/portlet/PortletFooter.js +2 -0
- package/dist/components/portlet/PortletFooter.js.map +1 -0
- package/dist/components/portlet/PortletHeader.cjs +2 -0
- package/dist/components/portlet/PortletHeader.cjs.map +1 -0
- package/dist/components/portlet/PortletHeader.d.cts +25 -0
- package/dist/components/portlet/PortletHeader.d.ts +25 -0
- package/dist/components/portlet/PortletHeader.js +2 -0
- package/dist/components/portlet/PortletHeader.js.map +1 -0
- package/dist/components/portlet/PortletLabel.cjs +2 -0
- package/dist/components/portlet/PortletLabel.cjs.map +1 -0
- package/dist/components/portlet/PortletLabel.d.cts +25 -0
- package/dist/components/portlet/PortletLabel.d.ts +25 -0
- package/dist/components/portlet/PortletLabel.js +2 -0
- package/dist/components/portlet/PortletLabel.js.map +1 -0
- package/dist/components/portlet/PortletTitle.cjs +2 -0
- package/dist/components/portlet/PortletTitle.cjs.map +1 -0
- package/dist/components/portlet/PortletTitle.d.cts +48 -0
- package/dist/components/portlet/PortletTitle.d.ts +48 -0
- package/dist/components/portlet/PortletTitle.js +2 -0
- package/dist/components/portlet/PortletTitle.js.map +1 -0
- package/dist/components/portlet/PortletToolbar.cjs +2 -0
- package/dist/components/portlet/PortletToolbar.cjs.map +1 -0
- package/dist/components/portlet/PortletToolbar.d.cts +19 -0
- package/dist/components/portlet/PortletToolbar.d.ts +19 -0
- package/dist/components/portlet/PortletToolbar.js +2 -0
- package/dist/components/portlet/PortletToolbar.js.map +1 -0
- package/dist/components/portlet/index.d.cts +8 -0
- package/dist/components/portlet/index.d.ts +8 -0
- package/dist/components/stack/StackColumn.cjs +2 -0
- package/dist/components/stack/StackColumn.cjs.map +1 -0
- package/dist/components/stack/StackColumn.d.cts +31 -0
- package/dist/components/stack/StackColumn.d.ts +31 -0
- package/dist/components/stack/StackColumn.js +2 -0
- package/dist/components/stack/StackColumn.js.map +1 -0
- package/dist/components/stack/StackRow.cjs +2 -0
- package/dist/components/stack/StackRow.cjs.map +1 -0
- package/dist/components/stack/StackRow.d.cts +30 -0
- package/dist/components/stack/StackRow.d.ts +30 -0
- package/dist/components/stack/StackRow.js +2 -0
- package/dist/components/stack/StackRow.js.map +1 -0
- package/dist/components/stack/index.d.cts +3 -0
- package/dist/components/stack/index.d.ts +3 -0
- package/dist/components/top-absolute/TopAbsolute.cjs +2 -0
- package/dist/components/top-absolute/TopAbsolute.cjs.map +1 -0
- package/dist/components/top-absolute/TopAbsolute.d.cts +38 -0
- package/dist/components/top-absolute/TopAbsolute.d.ts +38 -0
- package/dist/components/top-absolute/TopAbsolute.js +2 -0
- package/dist/components/top-absolute/TopAbsolute.js.map +1 -0
- package/dist/components/top-absolute/TopAbsoluteCenter.cjs +2 -0
- package/dist/components/top-absolute/TopAbsoluteCenter.cjs.map +1 -0
- package/dist/components/top-absolute/TopAbsoluteCenter.d.cts +40 -0
- package/dist/components/top-absolute/TopAbsoluteCenter.d.ts +40 -0
- package/dist/components/top-absolute/TopAbsoluteCenter.js +2 -0
- package/dist/components/top-absolute/TopAbsoluteCenter.js.map +1 -0
- package/dist/components/top-absolute/TopAbsoluteLeft.cjs +2 -0
- package/dist/components/top-absolute/TopAbsoluteLeft.cjs.map +1 -0
- package/dist/components/top-absolute/TopAbsoluteLeft.d.cts +46 -0
- package/dist/components/top-absolute/TopAbsoluteLeft.d.ts +46 -0
- package/dist/components/top-absolute/TopAbsoluteLeft.js +2 -0
- package/dist/components/top-absolute/TopAbsoluteLeft.js.map +1 -0
- package/dist/components/top-absolute/TopAbsoluteRight.cjs +2 -0
- package/dist/components/top-absolute/TopAbsoluteRight.cjs.map +1 -0
- package/dist/components/top-absolute/TopAbsoluteRight.d.cts +46 -0
- package/dist/components/top-absolute/TopAbsoluteRight.d.ts +46 -0
- package/dist/components/top-absolute/TopAbsoluteRight.js +2 -0
- package/dist/components/top-absolute/TopAbsoluteRight.js.map +1 -0
- package/dist/components/top-absolute/index.d.cts +5 -0
- package/dist/components/top-absolute/index.d.ts +5 -0
- package/dist/eventemitter/eventemitter3.cjs +2 -0
- package/dist/eventemitter/eventemitter3.cjs.map +1 -0
- package/dist/eventemitter/eventemitter3.d.cts +53 -0
- package/dist/eventemitter/eventemitter3.d.ts +53 -0
- package/dist/eventemitter/eventemitter3.js +2 -0
- package/dist/eventemitter/eventemitter3.js.map +1 -0
- package/dist/eventemitter/types.d.cts +17 -0
- package/dist/eventemitter/types.d.ts +17 -0
- package/dist/file-drop/handle-file-tree-drop.cjs +2 -0
- package/dist/file-drop/handle-file-tree-drop.cjs.map +1 -0
- package/dist/file-drop/handle-file-tree-drop.d.cts +46 -0
- package/dist/file-drop/handle-file-tree-drop.d.ts +46 -0
- package/dist/file-drop/handle-file-tree-drop.js +2 -0
- package/dist/file-drop/handle-file-tree-drop.js.map +1 -0
- package/dist/file-drop/index.cjs +1 -2
- package/dist/file-drop/index.d.cts +7 -756
- package/dist/file-drop/index.d.ts +7 -756
- package/dist/file-drop/index.js +1 -2
- package/dist/file-drop/internal/debug-logger.cjs +2 -0
- package/dist/file-drop/internal/debug-logger.cjs.map +1 -0
- package/dist/file-drop/internal/debug-logger.js +2 -0
- package/dist/file-drop/internal/debug-logger.js.map +1 -0
- package/dist/file-drop/internal/path-util.cjs +2 -0
- package/dist/file-drop/internal/path-util.cjs.map +1 -0
- package/dist/file-drop/internal/path-util.d.cts +39 -0
- package/dist/file-drop/internal/path-util.d.ts +39 -0
- package/dist/file-drop/internal/path-util.js +2 -0
- package/dist/file-drop/internal/path-util.js.map +1 -0
- package/dist/file-drop/internal/traverse-tree.cjs +2 -0
- package/dist/file-drop/internal/traverse-tree.cjs.map +1 -0
- package/dist/file-drop/internal/traverse-tree.js +2 -0
- package/dist/file-drop/internal/traverse-tree.js.map +1 -0
- package/dist/file-drop/internal/util.cjs +2 -0
- package/dist/file-drop/internal/util.cjs.map +1 -0
- package/dist/file-drop/internal/util.js +2 -0
- package/dist/file-drop/internal/util.js.map +1 -0
- package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.cjs +2 -0
- package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.cjs.map +1 -0
- package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.js +2 -0
- package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.js.map +1 -0
- package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.cjs +2 -0
- package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.cjs.map +1 -0
- package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.js +2 -0
- package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.js.map +1 -0
- package/dist/file-drop/process-file-drop.cjs +2 -0
- package/dist/file-drop/process-file-drop.cjs.map +1 -0
- package/dist/file-drop/process-file-drop.d.cts +133 -0
- package/dist/file-drop/process-file-drop.d.ts +133 -0
- package/dist/file-drop/process-file-drop.js +2 -0
- package/dist/file-drop/process-file-drop.js.map +1 -0
- package/dist/file-drop/types.cjs +2 -0
- package/dist/file-drop/types.cjs.map +1 -0
- package/dist/file-drop/types.d.cts +489 -0
- package/dist/file-drop/types.d.ts +489 -0
- package/dist/file-drop/types.js +2 -0
- package/dist/file-drop/types.js.map +1 -0
- package/dist/file-drop/utils/file-utils.cjs +2 -0
- package/dist/file-drop/utils/file-utils.cjs.map +1 -0
- package/dist/file-drop/utils/file-utils.d.cts +31 -0
- package/dist/file-drop/utils/file-utils.d.ts +31 -0
- package/dist/file-drop/utils/file-utils.js +2 -0
- package/dist/file-drop/utils/file-utils.js.map +1 -0
- package/dist/file-drop/utils/filter.cjs +2 -0
- package/dist/file-drop/utils/filter.cjs.map +1 -0
- package/dist/file-drop/utils/filter.d.cts +25 -0
- package/dist/file-drop/utils/filter.d.ts +25 -0
- package/dist/file-drop/utils/filter.js +2 -0
- package/dist/file-drop/utils/filter.js.map +1 -0
- package/dist/{parallel-map-_ZhC5iBn.cjs → file-drop/utils/parallel-map.cjs} +1 -1
- package/dist/file-drop/utils/parallel-map.cjs.map +1 -0
- package/dist/{parallel-map-DyuHvxYY.js → file-drop/utils/parallel-map.js} +1 -1
- package/dist/file-drop/utils/parallel-map.js.map +1 -0
- package/dist/file-drop/utils/progress-tracker.cjs +2 -0
- package/dist/file-drop/utils/progress-tracker.cjs.map +1 -0
- package/dist/file-drop/utils/progress-tracker.js +2 -0
- package/dist/file-drop/utils/progress-tracker.js.map +1 -0
- package/dist/helper/index.cjs +1 -2
- package/dist/helper/index.d.cts +3 -97
- package/dist/helper/index.d.ts +3 -97
- package/dist/helper/index.js +1 -2
- package/dist/helper/mui-css-vars.cjs +2 -0
- package/dist/helper/mui-css-vars.cjs.map +1 -0
- package/dist/helper/mui-css-vars.d.cts +62 -0
- package/dist/helper/mui-css-vars.d.ts +62 -0
- package/dist/helper/mui-css-vars.js +2 -0
- package/dist/helper/mui-css-vars.js.map +1 -0
- package/dist/helper/mui-media-queries.cjs +2 -0
- package/dist/helper/mui-media-queries.cjs.map +1 -0
- package/dist/helper/mui-media-queries.d.cts +38 -0
- package/dist/helper/mui-media-queries.d.ts +38 -0
- package/dist/helper/mui-media-queries.js +2 -0
- package/dist/helper/mui-media-queries.js.map +1 -0
- package/dist/hooks/index.cjs +1 -2
- package/dist/hooks/index.d.cts +69 -1483
- package/dist/hooks/index.d.ts +69 -1483
- package/dist/hooks/index.js +1 -2
- package/dist/hooks/types.d.cts +13 -0
- package/dist/hooks/types.d.ts +13 -0
- package/dist/hooks/useAbsolutePosition.cjs +2 -0
- package/dist/hooks/useAbsolutePosition.cjs.map +1 -0
- package/dist/hooks/useAbsolutePosition.d.cts +13 -0
- package/dist/hooks/useAbsolutePosition.d.ts +13 -0
- package/dist/hooks/useAbsolutePosition.js +2 -0
- package/dist/hooks/useAbsolutePosition.js.map +1 -0
- package/dist/hooks/useAudioUnlocked.cjs +2 -0
- package/dist/hooks/useAudioUnlocked.cjs.map +1 -0
- package/dist/hooks/useAudioUnlocked.d.cts +32 -0
- package/dist/hooks/useAudioUnlocked.d.ts +32 -0
- package/dist/hooks/useAudioUnlocked.js +2 -0
- package/dist/hooks/useAudioUnlocked.js.map +1 -0
- package/dist/hooks/useBehaviorSubject.cjs +2 -0
- package/dist/hooks/useBehaviorSubject.cjs.map +1 -0
- package/dist/hooks/useBehaviorSubject.d.cts +7 -0
- package/dist/hooks/useBehaviorSubject.d.ts +7 -0
- package/dist/hooks/useBehaviorSubject.js +2 -0
- package/dist/hooks/useBehaviorSubject.js.map +1 -0
- package/dist/hooks/useCallbackRef.cjs +2 -0
- package/dist/hooks/useCallbackRef.cjs.map +1 -0
- package/dist/hooks/useCallbackRef.d.cts +33 -0
- package/dist/hooks/useCallbackRef.d.ts +33 -0
- package/dist/hooks/useCallbackRef.js +2 -0
- package/dist/hooks/useCallbackRef.js.map +1 -0
- package/dist/hooks/useCenterInView.cjs +2 -0
- package/dist/hooks/useCenterInView.cjs.map +1 -0
- package/dist/hooks/useCenterInView.d.cts +29 -0
- package/dist/hooks/useCenterInView.d.ts +29 -0
- package/dist/hooks/useCenterInView.js +2 -0
- package/dist/hooks/useCenterInView.js.map +1 -0
- package/dist/hooks/useClipboard.cjs +2 -0
- package/dist/hooks/useClipboard.cjs.map +1 -0
- package/dist/hooks/useClipboard.d.cts +59 -0
- package/dist/hooks/useClipboard.d.ts +59 -0
- package/dist/hooks/useClipboard.js +2 -0
- package/dist/hooks/useClipboard.js.map +1 -0
- package/dist/hooks/useClosableEffect.cjs +2 -0
- package/dist/hooks/useClosableEffect.cjs.map +1 -0
- package/dist/hooks/useClosableEffect.d.cts +7 -0
- package/dist/hooks/useClosableEffect.d.ts +7 -0
- package/dist/hooks/useClosableEffect.js +2 -0
- package/dist/hooks/useClosableEffect.js.map +1 -0
- package/dist/hooks/useComposedRefs.cjs +2 -0
- package/dist/hooks/useComposedRefs.cjs.map +1 -0
- package/dist/hooks/useComposedRefs.d.cts +15 -0
- package/dist/hooks/useComposedRefs.d.ts +15 -0
- package/dist/hooks/useComposedRefs.js +2 -0
- package/dist/hooks/useComposedRefs.js.map +1 -0
- package/dist/hooks/useConstant.cjs +2 -0
- package/dist/hooks/useConstant.cjs.map +1 -0
- package/dist/hooks/useConstant.d.cts +4 -0
- package/dist/hooks/useConstant.d.ts +4 -0
- package/dist/hooks/useConstant.js +2 -0
- package/dist/hooks/useConstant.js.map +1 -0
- package/dist/hooks/useCooldown.cjs +2 -0
- package/dist/hooks/useCooldown.cjs.map +1 -0
- package/dist/hooks/useCooldown.d.cts +26 -0
- package/dist/hooks/useCooldown.d.ts +26 -0
- package/dist/hooks/useCooldown.js +2 -0
- package/dist/hooks/useCooldown.js.map +1 -0
- package/dist/hooks/useCustomCompareEffect.cjs +2 -0
- package/dist/hooks/useCustomCompareEffect.cjs.map +1 -0
- package/dist/hooks/useCustomCompareEffect.d.cts +56 -0
- package/dist/hooks/useCustomCompareEffect.d.ts +56 -0
- package/dist/hooks/useCustomCompareEffect.js +2 -0
- package/dist/hooks/useCustomCompareEffect.js.map +1 -0
- package/dist/hooks/useCustomCompareMemo.cjs +2 -0
- package/dist/hooks/useCustomCompareMemo.cjs.map +1 -0
- package/dist/hooks/useCustomCompareMemo.d.cts +14 -0
- package/dist/hooks/useCustomCompareMemo.d.ts +14 -0
- package/dist/hooks/useCustomCompareMemo.js +2 -0
- package/dist/hooks/useCustomCompareMemo.js.map +1 -0
- package/dist/hooks/useDebounceEffect.cjs +2 -0
- package/dist/hooks/useDebounceEffect.cjs.map +1 -0
- package/dist/hooks/useDebounceEffect.d.cts +56 -0
- package/dist/hooks/useDebounceEffect.d.ts +56 -0
- package/dist/hooks/useDebounceEffect.js +2 -0
- package/dist/hooks/useDebounceEffect.js.map +1 -0
- package/dist/hooks/useDebounceFn.cjs +2 -0
- package/dist/hooks/useDebounceFn.cjs.map +1 -0
- package/dist/hooks/useDebounceFn.d.cts +54 -0
- package/dist/hooks/useDebounceFn.d.ts +54 -0
- package/dist/hooks/useDebounceFn.js +2 -0
- package/dist/hooks/useDebounceFn.js.map +1 -0
- package/dist/hooks/useDebouncedCallback.cjs +2 -0
- package/dist/hooks/useDebouncedCallback.cjs.map +1 -0
- package/dist/hooks/useDebouncedCallback.d.cts +40 -0
- package/dist/hooks/useDebouncedCallback.d.ts +40 -0
- package/dist/hooks/useDebouncedCallback.js +2 -0
- package/dist/hooks/useDebouncedCallback.js.map +1 -0
- package/dist/hooks/useDebouncedParams.cjs +2 -0
- package/dist/hooks/useDebouncedParams.cjs.map +1 -0
- package/dist/hooks/useDebouncedParams.d.cts +43 -0
- package/dist/hooks/useDebouncedParams.d.ts +43 -0
- package/dist/hooks/useDebouncedParams.js +2 -0
- package/dist/hooks/useDebouncedParams.js.map +1 -0
- package/dist/hooks/useDebouncedState.cjs +2 -0
- package/dist/hooks/useDebouncedState.cjs.map +1 -0
- package/dist/hooks/useDebouncedState.d.cts +36 -0
- package/dist/hooks/useDebouncedState.d.ts +36 -0
- package/dist/hooks/useDebouncedState.js +2 -0
- package/dist/hooks/useDebouncedState.js.map +1 -0
- package/dist/hooks/useDebouncedValue.cjs +2 -0
- package/dist/hooks/useDebouncedValue.cjs.map +1 -0
- package/dist/hooks/useDebouncedValue.d.cts +23 -0
- package/dist/hooks/useDebouncedValue.d.ts +23 -0
- package/dist/hooks/useDebouncedValue.js +2 -0
- package/dist/hooks/useDebouncedValue.js.map +1 -0
- package/dist/hooks/useDeepCompareEffect.cjs +2 -0
- package/dist/hooks/useDeepCompareEffect.cjs.map +1 -0
- package/dist/hooks/useDeepCompareEffect.d.cts +50 -0
- package/dist/hooks/useDeepCompareEffect.d.ts +50 -0
- package/dist/hooks/useDeepCompareEffect.js +2 -0
- package/dist/hooks/useDeepCompareEffect.js.map +1 -0
- package/dist/hooks/useDeepCompareMemo.cjs +2 -0
- package/dist/hooks/useDeepCompareMemo.cjs.map +1 -0
- package/dist/hooks/useDeepCompareMemo.d.cts +13 -0
- package/dist/hooks/useDeepCompareMemo.d.ts +13 -0
- package/dist/hooks/useDeepCompareMemo.js +2 -0
- package/dist/hooks/useDeepCompareMemo.js.map +1 -0
- package/dist/hooks/useDidUpdate.cjs +2 -0
- package/dist/hooks/useDidUpdate.cjs.map +1 -0
- package/dist/hooks/useDidUpdate.d.cts +5 -0
- package/dist/hooks/useDidUpdate.d.ts +5 -0
- package/dist/hooks/useDidUpdate.js +2 -0
- package/dist/hooks/useDidUpdate.js.map +1 -0
- package/dist/hooks/useEffectOnce.cjs +2 -0
- package/dist/hooks/useEffectOnce.cjs.map +1 -0
- package/dist/hooks/useEffectOnce.d.cts +28 -0
- package/dist/hooks/useEffectOnce.d.ts +28 -0
- package/dist/hooks/useEffectOnce.js +2 -0
- package/dist/hooks/useEffectOnce.js.map +1 -0
- package/dist/hooks/useElementSize.cjs +2 -0
- package/dist/hooks/useElementSize.cjs.map +1 -0
- package/dist/hooks/useElementSize.d.cts +30 -0
- package/dist/hooks/useElementSize.d.ts +30 -0
- package/dist/hooks/useElementSize.js +2 -0
- package/dist/hooks/useElementSize.js.map +1 -0
- package/dist/hooks/useEventListener.cjs +2 -0
- package/dist/hooks/useEventListener.cjs.map +1 -0
- package/dist/hooks/useEventListener.d.cts +4 -0
- package/dist/hooks/useEventListener.d.ts +4 -0
- package/dist/hooks/useEventListener.js +2 -0
- package/dist/hooks/useEventListener.js.map +1 -0
- package/dist/hooks/useId.cjs +2 -0
- package/dist/hooks/useId.cjs.map +1 -0
- package/dist/hooks/useId.d.cts +13 -0
- package/dist/hooks/useId.d.ts +13 -0
- package/dist/hooks/useId.js +2 -0
- package/dist/hooks/useId.js.map +1 -0
- package/dist/hooks/useIdle.cjs +2 -0
- package/dist/hooks/useIdle.cjs.map +1 -0
- package/dist/hooks/useIdle.d.cts +49 -0
- package/dist/hooks/useIdle.d.ts +49 -0
- package/dist/hooks/useIdle.js +2 -0
- package/dist/hooks/useIdle.js.map +1 -0
- package/dist/hooks/useImageLoadCallback.cjs +2 -0
- package/dist/hooks/useImageLoadCallback.cjs.map +1 -0
- package/dist/hooks/useImageLoadCallback.d.cts +44 -0
- package/dist/hooks/useImageLoadCallback.d.ts +44 -0
- package/dist/hooks/useImageLoadCallback.js +2 -0
- package/dist/hooks/useImageLoadCallback.js.map +1 -0
- package/dist/hooks/useImageUpload.cjs +2 -0
- package/dist/hooks/useImageUpload.cjs.map +1 -0
- package/dist/hooks/useImageUpload.d.cts +92 -0
- package/dist/hooks/useImageUpload.d.ts +92 -0
- package/dist/hooks/useImageUpload.js +2 -0
- package/dist/hooks/useImageUpload.js.map +1 -0
- package/dist/hooks/useInterval.cjs +2 -0
- package/dist/hooks/useInterval.cjs.map +1 -0
- package/dist/hooks/useInterval.d.cts +53 -0
- package/dist/hooks/useInterval.d.ts +53 -0
- package/dist/hooks/useInterval.js +2 -0
- package/dist/hooks/useInterval.js.map +1 -0
- package/dist/hooks/useIsomorphicEffect.cjs +2 -0
- package/dist/hooks/useIsomorphicEffect.cjs.map +1 -0
- package/dist/hooks/useIsomorphicEffect.d.cts +26 -0
- package/dist/hooks/useIsomorphicEffect.d.ts +26 -0
- package/dist/hooks/useIsomorphicEffect.js +2 -0
- package/dist/hooks/useIsomorphicEffect.js.map +1 -0
- package/dist/hooks/useLatest.cjs +2 -0
- package/dist/hooks/useLatest.cjs.map +1 -0
- package/dist/hooks/useLatest.d.cts +4 -0
- package/dist/hooks/useLatest.d.ts +4 -0
- package/dist/hooks/useLatest.js +2 -0
- package/dist/hooks/useLatest.js.map +1 -0
- package/dist/hooks/useLgOrUp.cjs +2 -0
- package/dist/hooks/useLgOrUp.cjs.map +1 -0
- package/dist/hooks/useLgOrUp.d.cts +5 -0
- package/dist/hooks/useLgOrUp.d.ts +5 -0
- package/dist/hooks/useLgOrUp.js +2 -0
- package/dist/hooks/useLgOrUp.js.map +1 -0
- package/dist/hooks/useLifecycleLogger.cjs +2 -0
- package/dist/hooks/useLifecycleLogger.cjs.map +1 -0
- package/dist/hooks/useLifecycleLogger.d.cts +11 -0
- package/dist/hooks/useLifecycleLogger.d.ts +11 -0
- package/dist/hooks/useLifecycleLogger.js +2 -0
- package/dist/hooks/useLifecycleLogger.js.map +1 -0
- package/dist/hooks/useLoadingVisible.cjs +2 -0
- package/dist/hooks/useLoadingVisible.cjs.map +1 -0
- package/dist/hooks/useLoadingVisible.d.cts +33 -0
- package/dist/hooks/useLoadingVisible.d.ts +33 -0
- package/dist/hooks/useLoadingVisible.js +2 -0
- package/dist/hooks/useLoadingVisible.js.map +1 -0
- package/dist/hooks/useLocalStorage.cjs +2 -0
- package/dist/hooks/useLocalStorage.cjs.map +1 -0
- package/dist/hooks/useLocalStorage.d.cts +13 -0
- package/dist/hooks/useLocalStorage.d.ts +13 -0
- package/dist/hooks/useLocalStorage.js +2 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useLocalStorageState.cjs +2 -0
- package/dist/hooks/useLocalStorageState.cjs.map +1 -0
- package/dist/hooks/useLocalStorageState.d.cts +9 -0
- package/dist/hooks/useLocalStorageState.d.ts +9 -0
- package/dist/hooks/useLocalStorageState.js +2 -0
- package/dist/hooks/useLocalStorageState.js.map +1 -0
- package/dist/hooks/useMdOrDown.cjs +2 -0
- package/dist/hooks/useMdOrDown.cjs.map +1 -0
- package/dist/hooks/useMdOrDown.d.cts +5 -0
- package/dist/hooks/useMdOrDown.d.ts +5 -0
- package/dist/hooks/useMdOrDown.js +2 -0
- package/dist/hooks/useMdOrDown.js.map +1 -0
- package/dist/hooks/useMdOrUp.cjs +2 -0
- package/dist/hooks/useMdOrUp.cjs.map +1 -0
- package/dist/hooks/useMdOrUp.d.cts +5 -0
- package/dist/hooks/useMdOrUp.d.ts +5 -0
- package/dist/hooks/useMdOrUp.js +2 -0
- package/dist/hooks/useMdOrUp.js.map +1 -0
- package/dist/hooks/useMount.cjs +2 -0
- package/dist/hooks/useMount.cjs.map +1 -0
- package/dist/hooks/useMount.d.cts +27 -0
- package/dist/hooks/useMount.d.ts +27 -0
- package/dist/hooks/useMount.js +2 -0
- package/dist/hooks/useMount.js.map +1 -0
- package/dist/hooks/useMounted.cjs +2 -0
- package/dist/hooks/useMounted.cjs.map +1 -0
- package/dist/hooks/useMounted.d.cts +24 -0
- package/dist/hooks/useMounted.d.ts +24 -0
- package/dist/hooks/useMounted.js +2 -0
- package/dist/hooks/useMounted.js.map +1 -0
- package/dist/hooks/useMountedState.cjs +2 -0
- package/dist/hooks/useMountedState.cjs.map +1 -0
- package/dist/hooks/useMountedState.d.cts +38 -0
- package/dist/hooks/useMountedState.d.ts +38 -0
- package/dist/hooks/useMountedState.js +2 -0
- package/dist/hooks/useMountedState.js.map +1 -0
- package/dist/hooks/useMutationObserver.cjs +2 -0
- package/dist/hooks/useMutationObserver.cjs.map +1 -0
- package/dist/hooks/useMutationObserver.d.cts +28 -0
- package/dist/hooks/useMutationObserver.d.ts +28 -0
- package/dist/hooks/useMutationObserver.js +2 -0
- package/dist/hooks/useMutationObserver.js.map +1 -0
- package/dist/hooks/useObservable.cjs +2 -0
- package/dist/hooks/useObservable.cjs.map +1 -0
- package/dist/hooks/useObservable.d.cts +6 -0
- package/dist/hooks/useObservable.d.ts +7 -0
- package/dist/hooks/useObservable.js +2 -0
- package/dist/hooks/useObservable.js.map +1 -0
- package/dist/hooks/useObservableLocalStorage.cjs +2 -0
- package/dist/hooks/useObservableLocalStorage.cjs.map +1 -0
- package/dist/hooks/useObservableLocalStorage.d.cts +7 -0
- package/dist/hooks/useObservableLocalStorage.d.ts +7 -0
- package/dist/hooks/useObservableLocalStorage.js +2 -0
- package/dist/hooks/useObservableLocalStorage.js.map +1 -0
- package/dist/hooks/useObservableSessionStorage.cjs +2 -0
- package/dist/hooks/useObservableSessionStorage.cjs.map +1 -0
- package/dist/hooks/useObservableSessionStorage.d.cts +7 -0
- package/dist/hooks/useObservableSessionStorage.d.ts +7 -0
- package/dist/hooks/useObservableSessionStorage.js +2 -0
- package/dist/hooks/useObservableSessionStorage.js.map +1 -0
- package/dist/hooks/useOs.cjs +2 -0
- package/dist/hooks/useOs.cjs.map +1 -0
- package/dist/hooks/useOs.d.cts +9 -0
- package/dist/hooks/useOs.d.ts +9 -0
- package/dist/hooks/useOs.js +2 -0
- package/dist/hooks/useOs.js.map +1 -0
- package/dist/hooks/useRafState.cjs +2 -0
- package/dist/hooks/useRafState.cjs.map +1 -0
- package/dist/hooks/useRafState.d.cts +5 -0
- package/dist/hooks/useRafState.d.ts +5 -0
- package/dist/hooks/useRafState.js +2 -0
- package/dist/hooks/useRafState.js.map +1 -0
- package/dist/hooks/useRefEffect.cjs +2 -0
- package/dist/hooks/useRefEffect.cjs.map +1 -0
- package/dist/hooks/useRefEffect.d.cts +27 -0
- package/dist/hooks/useRefEffect.d.ts +27 -0
- package/dist/hooks/useRefEffect.js +2 -0
- package/dist/hooks/useRefEffect.js.map +1 -0
- package/dist/hooks/useResizeObserver.cjs +2 -0
- package/dist/hooks/useResizeObserver.cjs.map +1 -0
- package/dist/hooks/useResizeObserver.d.cts +27 -0
- package/dist/hooks/useResizeObserver.d.ts +27 -0
- package/dist/hooks/useResizeObserver.js +2 -0
- package/dist/hooks/useResizeObserver.js.map +1 -0
- package/dist/hooks/useScript.cjs +2 -0
- package/dist/hooks/useScript.cjs.map +1 -0
- package/dist/hooks/useScript.d.cts +8 -0
- package/dist/hooks/useScript.d.ts +8 -0
- package/dist/hooks/useScript.js +2 -0
- package/dist/hooks/useScript.js.map +1 -0
- package/dist/hooks/useSessionStorage.cjs +2 -0
- package/dist/hooks/useSessionStorage.cjs.map +1 -0
- package/dist/hooks/useSessionStorage.d.cts +22 -0
- package/dist/hooks/useSessionStorage.d.ts +22 -0
- package/dist/hooks/useSessionStorage.js +2 -0
- package/dist/hooks/useSessionStorage.js.map +1 -0
- package/dist/hooks/useSessionStorageState.cjs +2 -0
- package/dist/hooks/useSessionStorageState.cjs.map +1 -0
- package/dist/hooks/useSessionStorageState.d.cts +9 -0
- package/dist/hooks/useSessionStorageState.d.ts +9 -0
- package/dist/hooks/useSessionStorageState.js +2 -0
- package/dist/hooks/useSessionStorageState.js.map +1 -0
- package/dist/hooks/useSmOrDown.cjs +2 -0
- package/dist/hooks/useSmOrDown.cjs.map +1 -0
- package/dist/hooks/useSmOrDown.d.cts +5 -0
- package/dist/hooks/useSmOrDown.d.ts +5 -0
- package/dist/hooks/useSmOrDown.js +2 -0
- package/dist/hooks/useSmOrDown.js.map +1 -0
- package/dist/hooks/useSmOrUp.cjs +2 -0
- package/dist/hooks/useSmOrUp.cjs.map +1 -0
- package/dist/hooks/useSmOrUp.d.cts +5 -0
- package/dist/hooks/useSmOrUp.d.ts +5 -0
- package/dist/hooks/useSmOrUp.js +2 -0
- package/dist/hooks/useSmOrUp.js.map +1 -0
- package/dist/hooks/useThrottledCallback.cjs +2 -0
- package/dist/hooks/useThrottledCallback.cjs.map +1 -0
- package/dist/hooks/useThrottledCallback.d.cts +24 -0
- package/dist/hooks/useThrottledCallback.d.ts +24 -0
- package/dist/hooks/useThrottledCallback.js +2 -0
- package/dist/hooks/useThrottledCallback.js.map +1 -0
- package/dist/hooks/useThrottledCallbackWithClearTimeout.cjs +2 -0
- package/dist/hooks/useThrottledCallbackWithClearTimeout.cjs.map +1 -0
- package/dist/hooks/useThrottledCallbackWithClearTimeout.d.cts +30 -0
- package/dist/hooks/useThrottledCallbackWithClearTimeout.d.ts +30 -0
- package/dist/hooks/useThrottledCallbackWithClearTimeout.js +2 -0
- package/dist/hooks/useThrottledCallbackWithClearTimeout.js.map +1 -0
- package/dist/hooks/useThrottledState.cjs +2 -0
- package/dist/hooks/useThrottledState.cjs.map +1 -0
- package/dist/hooks/useThrottledState.d.cts +31 -0
- package/dist/hooks/useThrottledState.d.ts +31 -0
- package/dist/hooks/useThrottledState.js +2 -0
- package/dist/hooks/useThrottledState.js.map +1 -0
- package/dist/hooks/useThrottledValue.cjs +2 -0
- package/dist/hooks/useThrottledValue.cjs.map +1 -0
- package/dist/hooks/useThrottledValue.d.cts +21 -0
- package/dist/hooks/useThrottledValue.d.ts +21 -0
- package/dist/hooks/useThrottledValue.js +2 -0
- package/dist/hooks/useThrottledValue.js.map +1 -0
- package/dist/hooks/useTimeout.cjs +2 -0
- package/dist/hooks/useTimeout.cjs.map +1 -0
- package/dist/hooks/useTimeout.d.cts +38 -0
- package/dist/hooks/useTimeout.d.ts +38 -0
- package/dist/hooks/useTimeout.js +2 -0
- package/dist/hooks/useTimeout.js.map +1 -0
- package/dist/hooks/useTimeoutData.cjs +2 -0
- package/dist/hooks/useTimeoutData.cjs.map +1 -0
- package/dist/hooks/useTimeoutData.d.cts +7 -0
- package/dist/hooks/useTimeoutData.d.ts +7 -0
- package/dist/hooks/useTimeoutData.js +2 -0
- package/dist/hooks/useTimeoutData.js.map +1 -0
- package/dist/hooks/useUncontrolled.cjs +2 -0
- package/dist/hooks/useUncontrolled.cjs.map +1 -0
- package/dist/hooks/useUncontrolled.d.cts +48 -0
- package/dist/hooks/useUncontrolled.d.ts +48 -0
- package/dist/hooks/useUncontrolled.js +2 -0
- package/dist/hooks/useUncontrolled.js.map +1 -0
- package/dist/hooks/useUnmount.cjs +2 -0
- package/dist/hooks/useUnmount.cjs.map +1 -0
- package/dist/hooks/useUnmount.d.cts +4 -0
- package/dist/hooks/useUnmount.d.ts +4 -0
- package/dist/hooks/useUnmount.js +2 -0
- package/dist/hooks/useUnmount.js.map +1 -0
- package/dist/hooks/useUpdate.cjs +2 -0
- package/dist/hooks/useUpdate.cjs.map +1 -0
- package/dist/hooks/useUpdate.d.cts +4 -0
- package/dist/hooks/useUpdate.d.ts +4 -0
- package/dist/hooks/useUpdate.js +2 -0
- package/dist/hooks/useUpdate.js.map +1 -0
- package/dist/hooks/useUpdateEffect.cjs +2 -0
- package/dist/hooks/useUpdateEffect.cjs.map +1 -0
- package/dist/hooks/useUpdateEffect.d.cts +5 -0
- package/dist/hooks/useUpdateEffect.d.ts +5 -0
- package/dist/hooks/useUpdateEffect.js +2 -0
- package/dist/hooks/useUpdateEffect.js.map +1 -0
- package/dist/hooks/useUpdateLayoutEffect.cjs +2 -0
- package/dist/hooks/useUpdateLayoutEffect.cjs.map +1 -0
- package/dist/hooks/useUpdateLayoutEffect.d.cts +5 -0
- package/dist/hooks/useUpdateLayoutEffect.d.ts +5 -0
- package/dist/hooks/useUpdateLayoutEffect.js +2 -0
- package/dist/hooks/useUpdateLayoutEffect.js.map +1 -0
- package/dist/hooks/useWindowEvent.cjs +2 -0
- package/dist/hooks/useWindowEvent.cjs.map +1 -0
- package/dist/hooks/useWindowEvent.d.cts +24 -0
- package/dist/hooks/useWindowEvent.d.ts +24 -0
- package/dist/hooks/useWindowEvent.js +2 -0
- package/dist/hooks/useWindowEvent.js.map +1 -0
- package/dist/hooks/useWindowSize.cjs +2 -0
- package/dist/hooks/useWindowSize.cjs.map +1 -0
- package/dist/hooks/useWindowSize.d.cts +13 -0
- package/dist/hooks/useWindowSize.d.ts +13 -0
- package/dist/hooks/useWindowSize.js +2 -0
- package/dist/hooks/useWindowSize.js.map +1 -0
- package/dist/hooks/useXsOrDown.cjs +2 -0
- package/dist/hooks/useXsOrDown.cjs.map +1 -0
- package/dist/hooks/useXsOrDown.d.cts +5 -0
- package/dist/hooks/useXsOrDown.d.ts +5 -0
- package/dist/hooks/useXsOrDown.js +2 -0
- package/dist/hooks/useXsOrDown.js.map +1 -0
- package/dist/index.cjs +1 -2
- package/dist/index.d.cts +65 -1406
- package/dist/index.d.ts +65 -1406
- package/dist/index.js +1 -2
- package/dist/misc/debounce.cjs +2 -0
- package/dist/misc/debounce.cjs.map +1 -0
- package/dist/misc/debounce.js +2 -0
- package/dist/misc/debounce.js.map +1 -0
- package/dist/misc/deepEq.cjs +2 -0
- package/dist/misc/deepEq.cjs.map +1 -0
- package/dist/misc/deepEq.js +2 -0
- package/dist/misc/deepEq.js.map +1 -0
- package/dist/persistence/codec.cjs +2 -0
- package/dist/persistence/codec.cjs.map +1 -0
- package/dist/persistence/codec.d.cts +21 -0
- package/dist/persistence/codec.d.ts +21 -0
- package/dist/persistence/codec.js +2 -0
- package/dist/persistence/codec.js.map +1 -0
- package/dist/persistence/index.d.cts +2 -0
- package/dist/persistence/index.d.ts +2 -0
- package/dist/persistence/useStorageState.cjs +2 -0
- package/dist/persistence/useStorageState.cjs.map +1 -0
- package/dist/persistence/useStorageState.d.cts +39 -0
- package/dist/persistence/useStorageState.d.ts +39 -0
- package/dist/persistence/useStorageState.js +2 -0
- package/dist/persistence/useStorageState.js.map +1 -0
- package/dist/util/closables.cjs +2 -0
- package/dist/util/closables.cjs.map +1 -0
- package/dist/util/closables.d.cts +70 -0
- package/dist/util/closables.d.ts +70 -0
- package/dist/util/closables.js +2 -0
- package/dist/util/closables.js.map +1 -0
- package/dist/util/event-utils.cjs +2 -0
- package/dist/util/event-utils.cjs.map +1 -0
- package/dist/util/event-utils.d.cts +12 -0
- package/dist/util/event-utils.d.ts +12 -0
- package/dist/util/event-utils.js +2 -0
- package/dist/util/event-utils.js.map +1 -0
- package/dist/util/internal-util.cjs +2 -0
- package/dist/util/internal-util.cjs.map +1 -0
- package/dist/util/internal-util.js +2 -0
- package/dist/util/internal-util.js.map +1 -0
- package/dist/util/misc-utils.cjs +2 -0
- package/dist/util/misc-utils.cjs.map +1 -0
- package/dist/util/misc-utils.d.cts +15 -0
- package/dist/util/misc-utils.d.ts +15 -0
- package/dist/util/misc-utils.js +2 -0
- package/dist/util/misc-utils.js.map +1 -0
- package/dist/util/override-props.cjs +2 -0
- package/dist/util/override-props.cjs.map +1 -0
- package/dist/util/override-props.js +2 -0
- package/dist/util/override-props.js.map +1 -0
- package/dist/util/sx-props.cjs +2 -0
- package/dist/util/sx-props.cjs.map +1 -0
- package/dist/util/sx-props.d.cts +22 -0
- package/dist/util/sx-props.d.ts +22 -0
- package/dist/util/sx-props.js +2 -0
- package/dist/util/sx-props.js.map +1 -0
- package/dist/util/ymd-date.cjs +2 -0
- package/dist/util/ymd-date.cjs.map +1 -0
- package/dist/util/ymd-date.js +2 -0
- package/dist/util/ymd-date.js.map +1 -0
- package/llm.txt +16 -9
- package/package.json +21 -22
- package/dist/closables-CeOGJV-d.d.cts +0 -136
- package/dist/closables-CeOGJV-d.d.ts +0 -136
- package/dist/file-drop/index.cjs.map +0 -1
- package/dist/file-drop/index.js.map +0 -1
- package/dist/helper/index.cjs.map +0 -1
- package/dist/helper/index.js.map +0 -1
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/misc-utils-B2de-HS4.cjs +0 -2
- package/dist/misc-utils-B2de-HS4.cjs.map +0 -1
- package/dist/misc-utils-BXQ8UU0R.js +0 -2
- package/dist/misc-utils-BXQ8UU0R.js.map +0 -1
- package/dist/parallel-map-DyuHvxYY.js.map +0 -1
- package/dist/parallel-map-_ZhC5iBn.cjs.map +0 -1
package/dist/hooks/index.d.cts
CHANGED
|
@@ -1,1483 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
* @returns 최신 콜백 함수를 호출할 수 있는 메모이제이션된 함수.
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```tsx
|
|
74
|
-
* const Component = () => {
|
|
75
|
-
* const [count, setCount] = useState(0);
|
|
76
|
-
* const handleClick = useCallbackRef(() => {
|
|
77
|
-
* console.log(`현재 카운트는 ${count}입니다.`);
|
|
78
|
-
* });
|
|
79
|
-
*
|
|
80
|
-
* useEffect(() => {
|
|
81
|
-
* const timer = setInterval(() => {
|
|
82
|
-
* handleClick();
|
|
83
|
-
* }, 1000);
|
|
84
|
-
* return () => clearInterval(timer);
|
|
85
|
-
* }, [handleClick]);
|
|
86
|
-
*
|
|
87
|
-
* return <button onClick={() => setCount(count + 1)}>카운트 증가</button>;
|
|
88
|
-
* };
|
|
89
|
-
* ```
|
|
90
|
-
*/
|
|
91
|
-
export declare function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T;
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/hooks/useCenterInView.d.ts
|
|
94
|
-
/**
|
|
95
|
-
* 특정 요소가 뷰포트의 세로 중앙에 위치해 있는지를 감지하는 커스텀 React 훅입니다.
|
|
96
|
-
*
|
|
97
|
-
* 요소의 세로 중심점이 뷰포트 중심(`window.innerHeight / 2`)과의 거리 차가
|
|
98
|
-
* 지정된 오차 범위(`offset`) 이내에 있는 경우, `isCenter` 값이 `true`가 됩니다.
|
|
99
|
-
*
|
|
100
|
-
* 이 훅은 요소가 뷰포트 중앙에 시각적으로 들어왔는지를 감지하는 데 유용합니다.
|
|
101
|
-
*
|
|
102
|
-
* @param offset - 중심 간 거리 차이 허용 범위(px). 기본값은 0이며, 값이 클수록 더 넓은 범위를 "중앙"으로 인식합니다.
|
|
103
|
-
* @returns 객체 형태로 `ref`와 `isCenter`를 반환합니다.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```tsx
|
|
107
|
-
* const { ref, isCenter } = useCenterInView(50);
|
|
108
|
-
*
|
|
109
|
-
* return (
|
|
110
|
-
* <div ref={ref}>
|
|
111
|
-
* {isCenter ? '중앙에 있어요!' : '중앙이 아님'}
|
|
112
|
-
* </div>
|
|
113
|
-
* );
|
|
114
|
-
* ```
|
|
115
|
-
*/
|
|
116
|
-
export declare function useCenterInView(offset?: number): {
|
|
117
|
-
ref: React.RefObject<HTMLDivElement | null>;
|
|
118
|
-
isCenter: boolean;
|
|
119
|
-
};
|
|
120
|
-
//#endregion
|
|
121
|
-
//#region src/hooks/useClipboard.d.ts
|
|
122
|
-
/**
|
|
123
|
-
* 클립보드 복사 기능을 제공하는 React 훅입니다.
|
|
124
|
-
*
|
|
125
|
-
* @param options - 옵션 객체입니다.
|
|
126
|
-
* @param options.timeout - 복사 완료 상태가 유지되는 시간(밀리초)입니다. 기본값은 2000ms입니다.
|
|
127
|
-
* @returns
|
|
128
|
-
* - `copy`: 문자열을 클립보드에 복사하고 성공 여부를 반환하는 함수
|
|
129
|
-
* - `reset`: 상태를 초기화하는 함수
|
|
130
|
-
* - `error`: 클립보드 복사 중 발생한 오류
|
|
131
|
-
* - `copied`: 복사 성공 여부
|
|
132
|
-
*
|
|
133
|
-
* @example
|
|
134
|
-
* ```tsx
|
|
135
|
-
* const { copy, reset, error, copied } = useClipboard({ timeout: 3000 });
|
|
136
|
-
*
|
|
137
|
-
* return (
|
|
138
|
-
* <div>
|
|
139
|
-
* <button onClick={() => copy('복사할 내용')}>복사</button>
|
|
140
|
-
* {copied && <span>복사되었습니다!</span>}
|
|
141
|
-
* {error && <span>복사 실패: {error.message}</span>}
|
|
142
|
-
* <button onClick={reset}>초기화</button>
|
|
143
|
-
* </div>
|
|
144
|
-
* );
|
|
145
|
-
* ```
|
|
146
|
-
*/
|
|
147
|
-
export declare function useClipboard({ timeout }?: {
|
|
148
|
-
timeout?: number | undefined;
|
|
149
|
-
}): {
|
|
150
|
-
copy: (valueToCopy: string) => Promise<boolean>;
|
|
151
|
-
reset: () => void;
|
|
152
|
-
error: Error | null;
|
|
153
|
-
copied: boolean;
|
|
154
|
-
};
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/hooks/useClosableEffect.d.ts
|
|
157
|
-
type Callback = ((closable: Closables) => VoidFunction | undefined) | ((closable: Closables) => void);
|
|
158
|
-
export declare function useClosableEffect(callback: Callback, deps: unknown[]): void;
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region src/hooks/useComposedRefs.d.ts
|
|
161
|
-
type PossibleRef<T> = React.Ref<T> | undefined;
|
|
162
|
-
/**
|
|
163
|
-
* A utility to compose multiple refs together
|
|
164
|
-
* Accepts callback refs and RefObject(s)
|
|
165
|
-
*/
|
|
166
|
-
declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void;
|
|
167
|
-
/**
|
|
168
|
-
* A custom hook that composes multiple refs
|
|
169
|
-
* Accepts callback refs and RefObject(s)
|
|
170
|
-
*/
|
|
171
|
-
declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void;
|
|
172
|
-
//#endregion
|
|
173
|
-
//#region src/hooks/useConstant.d.ts
|
|
174
|
-
export declare function useConstant<T>(fn: () => T): T;
|
|
175
|
-
//#endregion
|
|
176
|
-
//#region src/hooks/useCooldown.d.ts
|
|
177
|
-
/**
|
|
178
|
-
* useCooldown
|
|
179
|
-
*
|
|
180
|
-
* 트리거 호출 시 콜백을 즉시 실행하고, 지정한 시간(cooldown) 동안 재호출을 막는 React 훅
|
|
181
|
-
*
|
|
182
|
-
* @param callback - 쿨다운 종료 전까지 1회만 허용할 콜백 함수. `undefined`이면 트리거가 아무 동작도 하지 않음
|
|
183
|
-
* @param cooldown - 쿨다운 지속 시간(ms)
|
|
184
|
-
*
|
|
185
|
-
* @returns 쿨다운 상태와 트리거 함수가 담긴 객체
|
|
186
|
-
* - `isCooldown`: 현재 쿨다운 중인지 여부
|
|
187
|
-
* - `trigger`: 콜백을 감싼 트리거 함수. 쿨다운 중에는 호출을 무시함
|
|
188
|
-
*
|
|
189
|
-
* @example
|
|
190
|
-
* ```tsx
|
|
191
|
-
* const { isCooldown, trigger } = useCooldown(onClick, 1000);
|
|
192
|
-
*
|
|
193
|
-
* return <button onClick={trigger} disabled={isCooldown} />;
|
|
194
|
-
* ```
|
|
195
|
-
*/
|
|
196
|
-
export declare function useCooldown<T extends (...args: any[]) => void = () => void>(callback: T | undefined, cooldown: number): {
|
|
197
|
-
isCooldown: boolean;
|
|
198
|
-
trigger: (...args: Parameters<T>) => void;
|
|
199
|
-
};
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region src/hooks/useCustomCompareEffect.d.ts
|
|
202
|
-
type DepsEqualFnType<TDeps extends DependencyList> = (prevDeps: TDeps, nextDeps: TDeps) => boolean;
|
|
203
|
-
/**
|
|
204
|
-
* 사용자 정의 비교 함수를 사용하여 `useEffect`의 의존성 배열을 커스텀 비교 방식으로 처리할 수 있는 커스텀 훅입니다.
|
|
205
|
-
*
|
|
206
|
-
* 이 훅은 의존성 배열이 React의 기본 비교 방식(얕은 비교)을 따르지 않고, 사용자가 제공한 비교 함수(`depsEqual`)를 통해
|
|
207
|
-
* 의존성 변경 여부를 판단합니다. 이를 통해 중첩된 객체나 배열 등의 복잡한 데이터 구조를 의존성 배열로 사용할 때,
|
|
208
|
-
* React의 `useEffect`를 더욱 유연하게 활용할 수 있습니다.
|
|
209
|
-
*
|
|
210
|
-
* @template TDeps - 의존성 배열의 타입. `DependencyList`를 확장하여 일반적으로 배열 형태를 기대합니다.
|
|
211
|
-
*
|
|
212
|
-
* @param effect - 실행할 효과 함수. `useEffect`의 콜백 함수와 동일한 형태입니다.
|
|
213
|
-
* @param deps - 의존성 배열. 훅에서 이 배열의 변경 여부를 감지하여 효과 함수를 실행합니다.
|
|
214
|
-
* @param depsEqual - 사용자 정의 비교 함수. 이전 의존성과 새로운 의존성을 비교하여 같으면 `true`, 다르면 `false`를 반환해야 합니다.
|
|
215
|
-
*
|
|
216
|
-
* @example
|
|
217
|
-
* ```tsx
|
|
218
|
-
* import { useCustomCompareEffect } from './useCustomCompareEffect';
|
|
219
|
-
*
|
|
220
|
-
* function MyComponent({ complexObject }: { complexObject: { key: string } }) {
|
|
221
|
-
* const customCompare = (prevDeps: [{ key: string }], nextDeps: [{ key: string }]) =>
|
|
222
|
-
* prevDeps[0].key === nextDeps[0].key;
|
|
223
|
-
*
|
|
224
|
-
* useCustomCompareEffect(
|
|
225
|
-
* () => {
|
|
226
|
-
* console.log('complexObject가 변경되었습니다.');
|
|
227
|
-
* },
|
|
228
|
-
* [complexObject],
|
|
229
|
-
* customCompare
|
|
230
|
-
* );
|
|
231
|
-
*
|
|
232
|
-
* return <div>Custom Compare Effect Example</div>;
|
|
233
|
-
* }
|
|
234
|
-
* ```
|
|
235
|
-
*
|
|
236
|
-
* @why
|
|
237
|
-
* - 기본 `useEffect`는 의존성 배열에서 얕은 비교(참조 비교)를 수행하기 때문에, 중첩 객체나 배열 등의 복잡한 데이터 구조를 의존성으로 사용할 때 부적합합니다.
|
|
238
|
-
* - `useCustomCompareEffect`는 사용자 정의 비교 함수를 제공함으로써, 이러한 제한을 해결하고 더 세밀한 비교 로직을 구현할 수 있도록 합니다.
|
|
239
|
-
*
|
|
240
|
-
* @warning
|
|
241
|
-
* - **빈 의존성 배열 사용 금지**: 이 훅은 의존성이 없는 경우(`[]`) 적합하지 않으므로, 기본 `useEffect`를 사용하는 것이 좋습니다.
|
|
242
|
-
* - **모두 기본 값(primitive)인 의존성 배열 사용 금지**: 의존성 배열이 모두 기본 값일 경우 기본 `useEffect`를 사용하는 것이 더 적합합니다.
|
|
243
|
-
* - **`depsEqual` 콜백 필수**: `depsEqual`은 의존성을 비교하기 위한 필수 콜백입니다.
|
|
244
|
-
*
|
|
245
|
-
* @internalDetails
|
|
246
|
-
* - `useRef`를 사용하여 이전 의존성을 저장합니다.
|
|
247
|
-
* - 사용자가 제공한 `depsEqual` 함수로 이전 의존성과 새 의존성을 비교합니다.
|
|
248
|
-
* - 비교 결과가 다르면 `effect`를 실행하고, 새 의존성을 `ref`에 저장합니다.
|
|
249
|
-
*
|
|
250
|
-
* @returns 없음. 이 훅은 `useEffect`와 동일하게 부수 효과를 실행하며, 반환값은 없습니다.
|
|
251
|
-
*/
|
|
252
|
-
export declare const useCustomCompareEffect: <TDeps extends DependencyList>(effect: EffectCallback, deps: TDeps, depsEqual: DepsEqualFnType<TDeps>) => void;
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region src/hooks/useCustomCompareMemo.d.ts
|
|
255
|
-
/**
|
|
256
|
-
* Like useMemo but uses provided comparator function to validate dependency changes.
|
|
257
|
-
*
|
|
258
|
-
* @param factory useMemo factory function
|
|
259
|
-
* @param deps useMemo dependency list
|
|
260
|
-
* @param comparator function to validate dependency changes
|
|
261
|
-
* @returns useMemo result
|
|
262
|
-
*/
|
|
263
|
-
export declare const useCustomCompareMemo: <T, Deps extends DependencyList>(factory: () => T, deps: Deps, comparator: DependenciesComparator<Deps>) => T;
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region src/hooks/useDebouncedCallback.d.ts
|
|
266
|
-
interface UseDebouncedCallbackOptions {
|
|
267
|
-
leading?: boolean;
|
|
268
|
-
trailing?: boolean;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* useDebouncedCallback
|
|
272
|
-
*
|
|
273
|
-
* 디바운싱된 콜백 함수를 반환하는 React 훅
|
|
274
|
-
*
|
|
275
|
-
* @param callback - 디바운스 처리할 콜백 함수
|
|
276
|
-
* @param wait - 디바운스 대기 시간(ms)
|
|
277
|
-
* @param options - leading, trailing 설정
|
|
278
|
-
*
|
|
279
|
-
* @returns 디바운스된 콜백과 취소 함수가 포함된 객체
|
|
280
|
-
*
|
|
281
|
-
* @example
|
|
282
|
-
* ```tsx
|
|
283
|
-
* const debouncedUpdate = useDebouncedCallback(
|
|
284
|
-
* () => {
|
|
285
|
-
* console.log("Debounced!");
|
|
286
|
-
* },
|
|
287
|
-
* 200,
|
|
288
|
-
* { leading: true, trailing: false }
|
|
289
|
-
* );
|
|
290
|
-
*
|
|
291
|
-
* // 호출
|
|
292
|
-
* debouncedUpdate(); // 즉시 실행
|
|
293
|
-
* debouncedUpdate(); // 무시됨
|
|
294
|
-
*
|
|
295
|
-
* // 취소
|
|
296
|
-
* debouncedUpdate.cancel();
|
|
297
|
-
* ```
|
|
298
|
-
*/
|
|
299
|
-
export declare function useDebouncedCallback<T extends (...args: any[]) => void>(callback: T, wait: number, options?: UseDebouncedCallbackOptions): T & {
|
|
300
|
-
cancel: () => void;
|
|
301
|
-
};
|
|
302
|
-
//#endregion
|
|
303
|
-
//#region src/hooks/useDebouncedParams.d.ts
|
|
304
|
-
export interface UseDebouncedParamsOptions {
|
|
305
|
-
/** 마지막 입력 후 발행까지 기다릴 시간(ms). 기본값: 200 */
|
|
306
|
-
delayMs?: number;
|
|
307
|
-
}
|
|
308
|
-
export interface UseDebouncedParamsResult<T> {
|
|
309
|
-
/** 화면에 보여줄 초안 검색 조건. 입력 즉시 갱신된다. */
|
|
310
|
-
params: Partial<T>;
|
|
311
|
-
/** 초안에 부분 변경을 병합하고 발행을 예약한다. */
|
|
312
|
-
onChange: (updated: Partial<T>) => void;
|
|
313
|
-
/** 대기 중인 입력이 있으면 기다리지 않고 바로 발행한다. 없으면 아무 일도 하지 않는다. */
|
|
314
|
-
flush: () => void;
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* 검색 조건 입력을 초안으로 보관하고, 입력이 멈추면 한 번만 외부로 발행하는 훅.
|
|
318
|
-
*
|
|
319
|
-
* 외부 조건(`params`)이 바뀌면 초안을 외부 값으로 맞춘다. 단, 이 훅이 발행한 값이
|
|
320
|
-
* 부모를 거쳐 돌아온 경우(에코)는 초안을 되돌리지 않는다. 부모의 갱신이 비동기여도
|
|
321
|
-
* 그 사이에 입력한 내용이 사라지지 않는다.
|
|
322
|
-
*
|
|
323
|
-
* @param params - 외부 검색 조건. 깊은 비교로 변경 여부를 판단한다.
|
|
324
|
-
* @param onChange - 디바운스가 끝난 시점에 초안 전체를 전달받는 콜백. 항상 최신 콜백이 호출된다.
|
|
325
|
-
* @param options - `delayMs`: 발행 지연 시간(ms)
|
|
326
|
-
* @returns `params`(초안), `onChange`(입력 핸들러), `flush`(즉시 발행)
|
|
327
|
-
*
|
|
328
|
-
* @remarks
|
|
329
|
-
* - 외부 값이 발행값과 다르게 돌아오면(부모가 값을 보정한 경우 등) 외부 값이 우선하고, 대기 중인 입력은 버린다.
|
|
330
|
-
* - 대기 중에 언마운트하면 입력을 발행하지 않고 버린다.
|
|
331
|
-
*
|
|
332
|
-
* @example
|
|
333
|
-
* ```tsx
|
|
334
|
-
* const { params: draft, onChange, flush } = useDebouncedParams(searchParams, setSearchParams);
|
|
335
|
-
*
|
|
336
|
-
* <TextField
|
|
337
|
-
* value={draft.keyword ?? ''}
|
|
338
|
-
* onChange={(e) => onChange({ keyword: e.target.value })}
|
|
339
|
-
* onKeyDown={(e) => e.key === 'Enter' && flush()}
|
|
340
|
-
* />
|
|
341
|
-
* ```
|
|
342
|
-
*/
|
|
343
|
-
export declare function useDebouncedParams<T>(params: Partial<T>, onChange: (params: Partial<T>) => void, options?: UseDebouncedParamsOptions): UseDebouncedParamsResult<T>;
|
|
344
|
-
//#endregion
|
|
345
|
-
//#region src/hooks/useDebouncedState.d.ts
|
|
346
|
-
/**
|
|
347
|
-
* 상태 업데이트를 지연시키는 커스텀 훅.
|
|
348
|
-
* `useState`와 비슷하지만 상태 업데이트를 지연(debounce)시킬 수 있는 React 커스텀 훅입니다.
|
|
349
|
-
*
|
|
350
|
-
* @template T - 상태 값의 타입. 기본값은 `any`입니다.
|
|
351
|
-
* @param defaultValue - 초기 상태 값.
|
|
352
|
-
* @param wait - 상태 업데이트 지연 시간(밀리초 단위).
|
|
353
|
-
* @param options - 상태 업데이트 동작 방식을 설정하는 옵션 객체. 기본값은 `{ leading: false }`입니다.
|
|
354
|
-
* - `leading`: `true`일 경우, 상태 업데이트가 지연 없이 즉시 한 번 발생하며 이후 변경은 지연됩니다.
|
|
355
|
-
*
|
|
356
|
-
* @returns 반환값은 다음과 같습니다:
|
|
357
|
-
* - `value`: 현재 상태 값.
|
|
358
|
-
* - `debouncedSetValue`: 상태를 업데이트하는 함수로, 업데이트가 지연됩니다.
|
|
359
|
-
*
|
|
360
|
-
* @example
|
|
361
|
-
* ```tsx
|
|
362
|
-
* const [value, setValue] = useDebouncedState("", 500, { leading: true });
|
|
363
|
-
*
|
|
364
|
-
* const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
365
|
-
* setValue(e.target.value);
|
|
366
|
-
* };
|
|
367
|
-
*
|
|
368
|
-
* return (
|
|
369
|
-
* <input value={value} onChange={handleChange} />
|
|
370
|
-
* );
|
|
371
|
-
* ```
|
|
372
|
-
*/
|
|
373
|
-
export declare function useDebouncedState<T>(defaultValue: T // 초기 상태 값
|
|
374
|
-
, wait: number // 지연 시간 (밀리초)
|
|
375
|
-
, options?: {
|
|
376
|
-
leading: boolean;
|
|
377
|
-
}): readonly [T, (next: SetStateAction<T>) => void];
|
|
378
|
-
//#endregion
|
|
379
|
-
//#region src/hooks/useDebouncedValue.d.ts
|
|
380
|
-
/**
|
|
381
|
-
* 값의 변화를 지연시키는 커스텀 훅
|
|
382
|
-
*
|
|
383
|
-
* @template T - 값의 타입. 기본값은 `any`.
|
|
384
|
-
* @param value - 지연 처리할 값.
|
|
385
|
-
* @param wait - 지연 시간(밀리초 단위).
|
|
386
|
-
* @param options - 지연 처리 동작 방식을 설정하는 옵션.
|
|
387
|
-
* - `leading`: 첫 번째 업데이트를 즉시 처리할지 여부 (기본값: `false`).
|
|
388
|
-
*
|
|
389
|
-
* @returns 지연 처리된 값과 타이머를 취소하는 함수.
|
|
390
|
-
*/
|
|
391
|
-
export declare function useDebouncedValue<T>(
|
|
392
|
-
/** 지연 처리할 값 */
|
|
393
|
-
value: T,
|
|
394
|
-
/** 지연 시간(밀리초 단위) */
|
|
395
|
-
wait: number,
|
|
396
|
-
/** 옵션: 첫 업데이트 즉시 처리 여부 */
|
|
397
|
-
options?: {
|
|
398
|
-
leading: boolean;
|
|
399
|
-
}): readonly [T, () => void];
|
|
400
|
-
//#endregion
|
|
401
|
-
//#region src/hooks/useDebounceEffect.d.ts
|
|
402
|
-
interface DebounceOptions$1 {
|
|
403
|
-
wait?: number;
|
|
404
|
-
leading?: boolean;
|
|
405
|
-
trailing?: boolean;
|
|
406
|
-
maxWait?: number;
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* 디바운스 처리된 `effect`를 제공하는 React 커스텀 훅입니다.
|
|
410
|
-
* 특정 의존성 배열(`deps`)이 변경될 때, 지정된 지연 시간(`wait`) 이후에 `effect`가 실행됩니다.
|
|
411
|
-
* 이 훅은 디바운스 옵션을 지원하며, `useDebounceFn` 및 `useUpdateEffect`를 활용하여 구현되었습니다.
|
|
412
|
-
*
|
|
413
|
-
* @param effect 디바운스 처리 후 실행할 이펙트 콜백 함수. React의 `useEffect`와 동일한 방식으로 동작합니다.
|
|
414
|
-
* @param deps 이펙트가 다시 실행될 때 참조할 의존성 배열. 기본값은 빈 배열(`[]`)입니다.
|
|
415
|
-
* @param options 디바운스 옵션 객체
|
|
416
|
-
* @param options.wait 함수 실행을 지연할 시간(밀리초). 기본값은 1000ms.
|
|
417
|
-
* @param options.leading `true`로 설정하면, 지연 타이머가 시작될 때 함수가 즉시 실행됩니다. 기본값은 `false`.
|
|
418
|
-
* @param options.trailing `true`로 설정하면, 지연 타이머가 종료될 때 함수가 실행됩니다. 기본값은 `true`.
|
|
419
|
-
* @param options.maxWait 함수가 지연될 수 있는 최대 시간. 설정하지 않으면 무제한입니다.
|
|
420
|
-
*
|
|
421
|
-
* @example
|
|
422
|
-
* ```typescript
|
|
423
|
-
* import { useDebounceEffect } from "./useDebounceEffect";
|
|
424
|
-
* import React, { useState } from "react";
|
|
425
|
-
*
|
|
426
|
-
* const ExampleComponent = () => {
|
|
427
|
-
* const [value, setValue] = useState("");
|
|
428
|
-
*
|
|
429
|
-
* useDebounceEffect(() => {
|
|
430
|
-
* console.log("Debounced effect:", value);
|
|
431
|
-
* }, [value], { wait: 500 });
|
|
432
|
-
*
|
|
433
|
-
* return (
|
|
434
|
-
* <input
|
|
435
|
-
* type="text"
|
|
436
|
-
* value={value}
|
|
437
|
-
* onChange={(e) => setValue(e.target.value)}
|
|
438
|
-
* placeholder="Type something..."
|
|
439
|
-
* />
|
|
440
|
-
* );
|
|
441
|
-
* };
|
|
442
|
-
* ```
|
|
443
|
-
*
|
|
444
|
-
* @remarks
|
|
445
|
-
* 이 훅은 두 단계로 동작합니다:
|
|
446
|
-
* 1. `deps` 배열이 변경될 때 `useDebounceFn`을 통해 디바운스 처리된 콜백이 실행됩니다.
|
|
447
|
-
* 2. 디바운스 처리된 콜백이 완료되면 `effect`가 실행됩니다.
|
|
448
|
-
*
|
|
449
|
-
* @see `useDebounceFn` 디바운스 처리된 함수 생성에 사용됩니다.
|
|
450
|
-
* @see `useUpdateEffect` 업데이트 시점에 이펙트를 실행하는 데 사용됩니다.
|
|
451
|
-
*/
|
|
452
|
-
export declare function useDebounceEffect(effect: EffectCallback, deps?: DependencyList, options?: DebounceOptions$1): void;
|
|
453
|
-
//#endregion
|
|
454
|
-
//#region src/hooks/useDebounceFn.d.ts
|
|
455
|
-
interface DebounceOptions {
|
|
456
|
-
wait?: number;
|
|
457
|
-
leading?: boolean;
|
|
458
|
-
trailing?: boolean;
|
|
459
|
-
maxWait?: number;
|
|
460
|
-
}
|
|
461
|
-
type noop = (...args: any[]) => any;
|
|
462
|
-
/**
|
|
463
|
-
* 주어진 함수 `fn`을 디바운스 처리하여, 특정 시간(`wait`) 동안 호출이 연속적으로 발생하지 않으면 실행되도록 합니다.
|
|
464
|
-
* 디바운스된 함수는 `run`, `cancel`, `flush` 메서드를 제공합니다.
|
|
465
|
-
*
|
|
466
|
-
* @param fn 디바운스 처리할 함수
|
|
467
|
-
* @param options 디바운스 옵션
|
|
468
|
-
* @param options.wait 함수 실행을 지연할 시간(밀리초). 기본값은 1000ms.
|
|
469
|
-
* @param options.leading `true`로 설정하면, 지연 타이머가 시작될 때 함수가 즉시 실행됩니다. 기본값은 `false`.
|
|
470
|
-
* @param options.trailing `true`로 설정하면, 지연 타이머가 종료될 때 함수가 실행됩니다. 기본값은 `true`.
|
|
471
|
-
* @param options.maxWait 함수가 지연될 수 있는 최대 시간. 설정하지 않으면 무제한입니다.
|
|
472
|
-
* @returns 디바운스된 함수와 제어 메서드를 포함하는 객체를 반환합니다.
|
|
473
|
-
* @returns.run 디바운스된 함수 실행
|
|
474
|
-
* @returns.cancel 지연 중인 함수 실행 취소
|
|
475
|
-
* @returns.flush 지연 중인 함수를 즉시 실행
|
|
476
|
-
*
|
|
477
|
-
* @example
|
|
478
|
-
* ```typescript
|
|
479
|
-
* const MyComponent = () => {
|
|
480
|
-
* const { run, cancel, flush } = useDebounceFn(
|
|
481
|
-
* (value: string) => {
|
|
482
|
-
* console.log(value);
|
|
483
|
-
* },
|
|
484
|
-
* { wait: 500, leading: true, trailing: false }
|
|
485
|
-
* );
|
|
486
|
-
*
|
|
487
|
-
* return (
|
|
488
|
-
* <input
|
|
489
|
-
* type="text"
|
|
490
|
-
* onChange={(e) => run(e.target.value)}
|
|
491
|
-
* onBlur={() => flush()}
|
|
492
|
-
* />
|
|
493
|
-
* );
|
|
494
|
-
* };
|
|
495
|
-
* ```
|
|
496
|
-
*/
|
|
497
|
-
export declare function useDebounceFn<T extends noop>(fn: T, options?: DebounceOptions): {
|
|
498
|
-
run: ((...args: Parameters<T>) => ReturnType<T>) & {
|
|
499
|
-
cancel: () => void;
|
|
500
|
-
flush: () => ReturnType<T> | undefined;
|
|
501
|
-
};
|
|
502
|
-
cancel: () => void;
|
|
503
|
-
flush: () => ReturnType<T> | undefined;
|
|
504
|
-
};
|
|
505
|
-
//#endregion
|
|
506
|
-
//#region src/hooks/useDeepCompareEffect.d.ts
|
|
507
|
-
/**
|
|
508
|
-
* 의존성 배열의 깊은 비교(Deep Comparison)를 수행하여 `useEffect`를 실행하는 커스텀 훅입니다.
|
|
509
|
-
*
|
|
510
|
-
* React의 기본 `useEffect`는 의존성 배열의 얕은 비교(Shallow Comparison)를 통해 변화 여부를 판단합니다.
|
|
511
|
-
* 이 훅은 `deepEq` 함수를 사용하여 의존성 배열의 깊은 비교를 수행하고, 배열의 복잡한 데이터 구조(중첩 객체, 배열 등)에서도
|
|
512
|
-
* 적절히 변경 사항을 감지하여 효과를 실행할 수 있도록 지원합니다.
|
|
513
|
-
*
|
|
514
|
-
* @param effect - 실행할 효과 함수. `useEffect`와 동일한 형태로, 컴포넌트가 렌더링될 때 실행됩니다.
|
|
515
|
-
* @param deps - 의존성 배열. 이 배열의 변경 여부를 깊은 비교를 통해 판단하여 `effect`를 실행합니다.
|
|
516
|
-
*
|
|
517
|
-
* @example
|
|
518
|
-
* ```tsx
|
|
519
|
-
* import React, { useState } from 'react';
|
|
520
|
-
* import { useDeepCompareEffect } from './useDeepCompareEffect';
|
|
521
|
-
*
|
|
522
|
-
* function MyComponent() {
|
|
523
|
-
* const [data, setData] = useState({ key: 'value' });
|
|
524
|
-
*
|
|
525
|
-
* useDeepCompareEffect(() => {
|
|
526
|
-
* console.log('데이터가 변경되었습니다:', data);
|
|
527
|
-
* }, [data]);
|
|
528
|
-
*
|
|
529
|
-
* return (
|
|
530
|
-
* <button onClick={() => setData({ key: 'value' })}>
|
|
531
|
-
* 데이터 변경 시도
|
|
532
|
-
* </button>
|
|
533
|
-
* );
|
|
534
|
-
* }
|
|
535
|
-
* ```
|
|
536
|
-
*
|
|
537
|
-
* @why
|
|
538
|
-
* - 기본 `useEffect`는 의존성 배열의 얕은 비교를 수행하므로, 객체나 배열과 같은 복잡한 데이터 구조의 변경 여부를 제대로 감지하지 못할 수 있습니다.
|
|
539
|
-
* - `useDeepCompareEffect`는 의존성 배열의 깊은 비교를 수행하여 이러한 문제를 해결합니다.
|
|
540
|
-
*
|
|
541
|
-
* @warning
|
|
542
|
-
* - **빈 의존성 배열 사용 금지**: 의존성 배열이 비어 있는 경우 기본 `useEffect`를 사용하는 것이 적합합니다.
|
|
543
|
-
* - **모든 값이 기본 값(Primitive)인 경우**: 의존성 배열이 모두 기본 값이라면 기본 `useEffect`를 사용하는 것이 더 효율적입니다.
|
|
544
|
-
* - **깊은 비교 비용**: `deepEq` 함수는 깊은 비교를 수행하므로, 의존성 배열이 매우 크거나 복잡한 경우 성능에 영향을 줄 수 있습니다.
|
|
545
|
-
*
|
|
546
|
-
* @internalDetails
|
|
547
|
-
* - `useCustomCompareEffect`를 내부적으로 호출하며, `deepEq`를 비교 함수로 사용하여 의존성 배열의 깊은 비교를 수행합니다.
|
|
548
|
-
* - 개발 환경에서는 `deps`에 대해 여러 가지 유효성 검사를 수행하여 잘못된 사용을 방지합니다.
|
|
549
|
-
*
|
|
550
|
-
* @returns 없음. 이 훅은 `useEffect`와 동일하게 부수 효과를 실행하며, 반환값은 없습니다.
|
|
551
|
-
*/
|
|
552
|
-
export declare const useDeepCompareEffect: (effect: EffectCallback, deps: DependencyList) => void;
|
|
553
|
-
//#endregion
|
|
554
|
-
//#region src/hooks/useDeepCompareMemo.d.ts
|
|
555
|
-
/**
|
|
556
|
-
* Like useMemo but validates dependency changes using deep equality check instead of reference check.
|
|
557
|
-
*
|
|
558
|
-
* @param factory Function calculating the value to be memoized.
|
|
559
|
-
* @param deps The list of all reactive values referenced inside `factory`.
|
|
560
|
-
* @returns Initially returns the result of calling `factory`. On subsequent renders, it will return
|
|
561
|
-
* the same value, if dependencies haven't changed, or the result of calling `factory` again, if they have changed.
|
|
562
|
-
*/
|
|
563
|
-
export declare function useDeepCompareMemo<T, Deps extends DependencyList>(factory: () => T, deps: Deps): T;
|
|
564
|
-
//#endregion
|
|
565
|
-
//#region src/hooks/useDidUpdate.d.ts
|
|
566
|
-
export declare function useDidUpdate(fn: EffectCallback, dependencies?: DependencyList): void;
|
|
567
|
-
//#endregion
|
|
568
|
-
//#region src/hooks/useEffectOnce.d.ts
|
|
569
|
-
/**
|
|
570
|
-
* 컴포넌트가 마운트될 때 한 번만 실행되는 `useEffect`를 구현하기 위한 커스텀 훅입니다.
|
|
571
|
-
*
|
|
572
|
-
* React의 `useEffect`는 의존성 배열을 통해 특정 조건에서만 실행되도록 제어할 수 있습니다.
|
|
573
|
-
* 이 훅은 의존성 배열을 빈 배열(`[]`)로 고정하여 **컴포넌트가 처음 렌더링될 때** 한 번만 실행되는 효과를 단순화합니다.
|
|
574
|
-
*
|
|
575
|
-
* @param effect - 컴포넌트가 처음 렌더링될 때 실행될 효과 함수. `useEffect`에서 사용하는 것과 동일한 형태입니다.
|
|
576
|
-
*
|
|
577
|
-
* @example
|
|
578
|
-
* ```tsx
|
|
579
|
-
* function MyComponent() {
|
|
580
|
-
* useEffectOnce(() => {
|
|
581
|
-
* console.log("컴포넌트가 마운트되었습니다.");
|
|
582
|
-
* return () => {
|
|
583
|
-
* console.log("컴포넌트가 언마운트되었습니다.");
|
|
584
|
-
* };
|
|
585
|
-
* });
|
|
586
|
-
*
|
|
587
|
-
* return <div>My Component</div>;
|
|
588
|
-
* }
|
|
589
|
-
* ```
|
|
590
|
-
* @returns 없음. `useEffect`와 동일하게 동작하며, 반환값은 없습니다.
|
|
591
|
-
*/
|
|
592
|
-
export declare const useEffectOnce: (effect: EffectCallback) => void;
|
|
593
|
-
//#endregion
|
|
594
|
-
//#region src/hooks/useElementSize.d.ts
|
|
595
|
-
/**
|
|
596
|
-
* 요소의 참조(ref)와 해당 요소의 너비(width) 및 높이(height)를 제공하는 커스텀 React 훅.
|
|
597
|
-
* `useResizeObserver` 훅을 활용하여 요소의 크기를 관찰합니다.
|
|
598
|
-
*
|
|
599
|
-
* @template T - 관찰할 HTML 요소의 타입. 기본값은 `HTMLElement`입니다.
|
|
600
|
-
* @param options - 관찰을 설정하기 위한 선택적인 `ResizeObserverOptions` 객체.
|
|
601
|
-
* @returns 객체 형태의 반환값:
|
|
602
|
-
* - `ref`: 관찰할 요소에 연결하기 위한 React 참조 객체.
|
|
603
|
-
* - `width`: 관찰된 요소의 현재 너비.
|
|
604
|
-
* - `height`: 관찰된 요소의 현재 높이.
|
|
605
|
-
*
|
|
606
|
-
* @example
|
|
607
|
-
* ```tsx
|
|
608
|
-
* const { ref, width, height } = useElementSize();
|
|
609
|
-
*
|
|
610
|
-
* return (
|
|
611
|
-
* <div ref={ref} style={{ resize: "both", overflow: "auto" }}>
|
|
612
|
-
* Width: {width}, Height: {height}
|
|
613
|
-
* </div>
|
|
614
|
-
* );
|
|
615
|
-
* ```
|
|
616
|
-
*/
|
|
617
|
-
export declare function useElementSize<T extends HTMLElement = HTMLElement>(options?: ResizeObserverOptions): {
|
|
618
|
-
ref: import("react").RefObject<T | null>;
|
|
619
|
-
width: number;
|
|
620
|
-
height: number;
|
|
621
|
-
};
|
|
622
|
-
//#endregion
|
|
623
|
-
//#region src/hooks/useEventListener.d.ts
|
|
624
|
-
export declare function useEventListener<K extends keyof HTMLElementEventMap, T extends HTMLElement = HTMLElement>(type: K, listener: (this: T, ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): import("react").RefObject<T | undefined>;
|
|
625
|
-
//#endregion
|
|
626
|
-
//#region src/hooks/useId.d.ts
|
|
627
|
-
/**
|
|
628
|
-
* React 19 네이티브 `useId`를 사용해 안정적인 고유 id를 생성한다.
|
|
629
|
-
*
|
|
630
|
-
* - `staticId`가 string이면 그대로 반환한다(override).
|
|
631
|
-
* - 인자가 없으면 네이티브 id를 그대로 반환한다(React 19 id는 콜론 미포함).
|
|
632
|
-
*
|
|
633
|
-
* @param staticId 고정 id. string이면 그대로 반환된다.
|
|
634
|
-
* @returns 고정 id 또는 네이티브 id.
|
|
635
|
-
*/
|
|
636
|
-
export declare function useId(staticId?: string): string;
|
|
637
|
-
//#endregion
|
|
638
|
-
//#region src/hooks/useIdle.d.ts
|
|
639
|
-
/**
|
|
640
|
-
* 사용자의 비활성 상태를 감지하고, 비활성 여부를 반환하는 커스텀 훅입니다.
|
|
641
|
-
*
|
|
642
|
-
* 이 훅은 사용자의 특정 이벤트(마우스 움직임, 키보드 입력 등)를 감지하여 비활성 상태인지(active 상태가 아닌지)를 판단합니다.
|
|
643
|
-
* 사용자가 지정한 시간(`ms`) 동안 이벤트가 발생하지 않으면 비활성 상태로 간주됩니다.
|
|
644
|
-
*
|
|
645
|
-
* @param ms - 비활성 상태로 간주하기 위한 시간(밀리초). 기본값은 1분(60,000ms)입니다.
|
|
646
|
-
* @param initialState - 초기 비활성 상태 값. 기본값은 `false`입니다(초기에는 활성 상태로 간주).
|
|
647
|
-
* @param events - 비활성 상태를 해제하기 위해 감지할 이벤트 배열. 기본값은 `["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"]`입니다.
|
|
648
|
-
*
|
|
649
|
-
* @returns `boolean` 값으로 현재 비활성 상태인지 여부를 반환합니다.
|
|
650
|
-
*
|
|
651
|
-
* @example
|
|
652
|
-
* ```tsx
|
|
653
|
-
* import React from "react";
|
|
654
|
-
* import { useIdle } from "./useIdle";
|
|
655
|
-
*
|
|
656
|
-
* function MyComponent() {
|
|
657
|
-
* const isIdle = useIdle(5000); // 5초 동안 사용자 입력이 없으면 비활성 상태로 간주
|
|
658
|
-
*
|
|
659
|
-
* return (
|
|
660
|
-
* <div>
|
|
661
|
-
* {isIdle ? "사용자가 비활성 상태입니다." : "사용자가 활성 상태입니다."}
|
|
662
|
-
* </div>
|
|
663
|
-
* );
|
|
664
|
-
* }
|
|
665
|
-
* ```
|
|
666
|
-
*
|
|
667
|
-
* @why
|
|
668
|
-
* - 사용자의 비활성 상태를 감지하여 자동 로그아웃, 화면 잠금, 에너지 절약 모드 전환 등의 기능을 구현할 때 유용합니다.
|
|
669
|
-
* - 기본적으로 여러 사용자 입력 이벤트를 감지하며, 필요에 따라 감지할 이벤트를 커스터마이징할 수 있습니다.
|
|
670
|
-
* - 내부 `throttle` 유틸을 사용하여 이벤트 핸들러 호출 빈도를 줄여 성능을 최적화합니다.
|
|
671
|
-
*
|
|
672
|
-
* @internalDetails
|
|
673
|
-
* - 이벤트 핸들러는 `throttle`을 사용하여 50ms 간격으로 호출됩니다.
|
|
674
|
-
* - `window`와 `document`에 여러 이벤트 리스너를 등록하여 사용자 입력을 감지합니다.
|
|
675
|
-
* - `setTimeout`을 사용하여 지정된 시간(`ms`) 동안 이벤트가 없으면 비활성 상태로 전환합니다.
|
|
676
|
-
* - `visibilitychange` 이벤트를 감지하여 사용자가 브라우저 탭을 다시 활성화했을 때 상태를 업데이트합니다.
|
|
677
|
-
*
|
|
678
|
-
* @warning
|
|
679
|
-
* - **이벤트 배열 변경 시**: `events`가 변경되면 기존 리스너가 모두 제거되고 새로운 리스너가 등록됩니다.
|
|
680
|
-
* - **성능 주의**: 감지할 이벤트가 많을 경우 성능에 영향을 미칠 수 있으므로, 필요 없는 이벤트는 제거하는 것이 좋습니다.
|
|
681
|
-
*
|
|
682
|
-
* @returns `boolean` 값으로 비활성 상태(`true`) 또는 활성 상태(`false`)를 나타냅니다.
|
|
683
|
-
*/
|
|
684
|
-
export declare const useIdle: (ms?: number, initialState?: boolean, events?: string[]) => boolean;
|
|
685
|
-
//#endregion
|
|
686
|
-
//#region src/hooks/useImageLoadCallback.d.ts
|
|
687
|
-
/**
|
|
688
|
-
* 이미지 로드 상태를 감지하고 로드 또는 실패 시 콜백을 호출하는 React 훅입니다.
|
|
689
|
-
*
|
|
690
|
-
* @param img - 감지할 대상 `HTMLImageElement`입니다. `null`이면 훅이 동작하지 않습니다.
|
|
691
|
-
* @param options - 이미지 로드 상태와 관련된 설정 및 콜백 함수들입니다.
|
|
692
|
-
* @param options.keepListening - `true`로 설정하면 이미지의 `src` 속성이 변경될 때마다 이벤트를 감시합니다.
|
|
693
|
-
* `false`로 설정하면 첫 로드 이후 감시를 중단합니다. 기본값은 `false`입니다.
|
|
694
|
-
* @param options.onLoaded - 이미지가 성공적으로 로드되었을 때 호출되는 콜백 함수입니다. `img`를 인수로 받습니다.
|
|
695
|
-
* @param options.onError - 이미지 로드에 실패했을 때 호출되는 선택적 콜백 함수입니다. `img`와 오류 객체를 인수로 받습니다.
|
|
696
|
-
* @param deps - 의존성 배열로, 해당 배열의 값이 변경되면 훅이 다시 실행됩니다. 기본값은 빈 배열입니다.
|
|
697
|
-
*
|
|
698
|
-
* @returns 없음
|
|
699
|
-
*
|
|
700
|
-
* @example
|
|
701
|
-
* ```tsx
|
|
702
|
-
* const imgRef = useRef<HTMLImageElement | null>(null);
|
|
703
|
-
*
|
|
704
|
-
* useImageLoadCallback(imgRef.current, {
|
|
705
|
-
* keepListening: true,
|
|
706
|
-
* onLoaded: (img) => console.log("Image loaded:", img.src),
|
|
707
|
-
* onError: (img, error) => console.error("Image load failed:", img.src, error),
|
|
708
|
-
* });
|
|
709
|
-
*
|
|
710
|
-
* return <img ref={imgRef} src="https://via.placeholder.com/300" alt="Example" />;
|
|
711
|
-
* ```
|
|
712
|
-
*
|
|
713
|
-
* @remarks
|
|
714
|
-
* - 이미지가 이미 로드된 경우 (`img.complete`)에도 콜백이 호출됩니다.
|
|
715
|
-
* - `MutationObserver`를 사용하여 이미지의 `src` 속성 변경을 감지하고 다시 로드 상태를 확인합니다.
|
|
716
|
-
* - `keepListening` 설정에 따라 로드 상태를 지속적으로 감시할 수 있습니다.
|
|
717
|
-
*
|
|
718
|
-
* @dependencies
|
|
719
|
-
* - React: `useEffect`, `useState`
|
|
720
|
-
* - DOM API: `addEventListener`, `removeEventListener`, `MutationObserver`
|
|
721
|
-
*/
|
|
722
|
-
export declare function useImageLoadCallback(img: HTMLImageElement | null, options: {
|
|
723
|
-
keepListening?: boolean;
|
|
724
|
-
onLoaded: (img: HTMLImageElement) => void;
|
|
725
|
-
onError?: (img: HTMLImageElement, error: unknown) => void;
|
|
726
|
-
}, deps?: React$1.DependencyList): void;
|
|
727
|
-
//#endregion
|
|
728
|
-
//#region src/hooks/useImageUpload.d.ts
|
|
729
|
-
/**
|
|
730
|
-
* 파일 업로드의 결과를 나타내는 데이터 구조.
|
|
731
|
-
*
|
|
732
|
-
* 파일 업로드가 성공적으로 완료된 후 반환되는 정보를 정의합니다.
|
|
733
|
-
*/
|
|
734
|
-
export interface FileUploadResult {
|
|
735
|
-
/**
|
|
736
|
-
* 업로드된 파일의 고유 ID.
|
|
737
|
-
* 서버 또는 데이터베이스에서 파일을 식별하는 데 사용됩니다.
|
|
738
|
-
*/
|
|
739
|
-
id: string;
|
|
740
|
-
/**
|
|
741
|
-
* 업로드된 파일의 URL.
|
|
742
|
-
* 업로드된 파일에 접근하거나 다운로드할 수 있는 경로를 제공합니다.
|
|
743
|
-
*/
|
|
744
|
-
url: string;
|
|
745
|
-
/**
|
|
746
|
-
* 업로드된 파일의 총 크기(바이트 단위).
|
|
747
|
-
* 선택적 속성으로, 서버가 파일 크기를 반환하지 않는 경우 undefined일 수 있습니다.
|
|
748
|
-
*/
|
|
749
|
-
totalBytes?: number;
|
|
750
|
-
/**
|
|
751
|
-
* 업로드된 파일의 이름.
|
|
752
|
-
* 파일의 원래 이름 또는 서버에서 생성한 이름일 수 있습니다.
|
|
753
|
-
*/
|
|
754
|
-
fileName?: string;
|
|
755
|
-
/**
|
|
756
|
-
* 업로드된 파일의 MIME 타입.
|
|
757
|
-
* 예: `image/jpeg`, `application/pdf` 등 파일의 유형을 나타냅니다.
|
|
758
|
-
*/
|
|
759
|
-
contentType?: string;
|
|
760
|
-
}
|
|
761
|
-
/**
|
|
762
|
-
* React 커스텀 훅으로 이미지를 업로드하고 업로드 상태를 관리합니다.
|
|
763
|
-
*
|
|
764
|
-
* 이 훅은 Blob 파일을 업로드하는 비동기 작업을 처리하며, 업로드 완료 시 결과를 콜백으로 반환합니다.
|
|
765
|
-
* 또한, 업로드 상태(loading)를 관리합니다.
|
|
766
|
-
*
|
|
767
|
-
* @param file - 업로드할 파일(Blob). null 또는 undefined인 경우 업로드를 중단합니다.
|
|
768
|
-
* @param handleFileUpload - 파일 업로드를 처리하는 비동기 함수. Blob 파일을 받아 서버에 업로드하고 업로드 결과를 반환해야 합니다.
|
|
769
|
-
* @param callback - 업로드 완료 또는 실패 시 호출되는 콜백. 업로드 성공 시 결과(`FileUploadResult` 객체)를, 실패 또는 취소 시 null을 전달합니다.
|
|
770
|
-
*
|
|
771
|
-
* @returns 업로드가 진행 중인 상태를 나타내는 boolean 값. `true`면 업로드 중이고, `false`면 업로드가 완료되었거나 중단된 상태입니다.
|
|
772
|
-
*
|
|
773
|
-
* @example
|
|
774
|
-
* ```tsx
|
|
775
|
-
* import { useImageUpload } from './useImageUpload';
|
|
776
|
-
*
|
|
777
|
-
* function FileUploader() {
|
|
778
|
-
* const [file, setFile] = useState<Blob | null>(null);
|
|
779
|
-
* const loading = useImageUpload(
|
|
780
|
-
* file,
|
|
781
|
-
* async (file) => {
|
|
782
|
-
* // 서버에 파일 업로드 로직
|
|
783
|
-
* const response = await uploadFileToServer(file);
|
|
784
|
-
* return {
|
|
785
|
-
* id: response.id,
|
|
786
|
-
* url: response.url,
|
|
787
|
-
* totalBytes: response.size,
|
|
788
|
-
* fileName: response.name,
|
|
789
|
-
* contentType: response.type,
|
|
790
|
-
* };
|
|
791
|
-
* },
|
|
792
|
-
* (result) => {
|
|
793
|
-
* if (result) {
|
|
794
|
-
* console.log('Upload success:', result.url);
|
|
795
|
-
* } else {
|
|
796
|
-
* console.log('Upload canceled or failed');
|
|
797
|
-
* }
|
|
798
|
-
* }
|
|
799
|
-
* );
|
|
800
|
-
*
|
|
801
|
-
* const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
802
|
-
* const file = event.target.files?.[0];
|
|
803
|
-
* if (file) {
|
|
804
|
-
* setFile(file);
|
|
805
|
-
* }
|
|
806
|
-
* };
|
|
807
|
-
*
|
|
808
|
-
* return (
|
|
809
|
-
* <div>
|
|
810
|
-
* <input type="file" onChange={handleChange} />
|
|
811
|
-
* {loading && <p>Uploading...</p>}
|
|
812
|
-
* </div>
|
|
813
|
-
* );
|
|
814
|
-
* }
|
|
815
|
-
* ```
|
|
816
|
-
*/
|
|
817
|
-
export declare function useImageUpload(file: Blob | null | undefined, handleFileUpload: (file: Blob) => Promise<FileUploadResult>, callback: (imageUrl: FileUploadResult | null) => void): boolean;
|
|
818
|
-
//#endregion
|
|
819
|
-
//#region src/hooks/useInterval.d.ts
|
|
820
|
-
interface UseIntervalOptions {
|
|
821
|
-
/** If set, the interval will start automatically when the component is mounted, `false` by default */
|
|
822
|
-
autoInvoke?: boolean;
|
|
823
|
-
}
|
|
824
|
-
/**
|
|
825
|
-
* 특정 작업을 주어진 간격으로 실행할 수 있는 React Hook입니다.
|
|
826
|
-
*
|
|
827
|
-
* @param fn - 주어진 간격마다 호출될 콜백 함수입니다.
|
|
828
|
-
* @param interval - 작업을 실행할 간격(밀리초)입니다.
|
|
829
|
-
* @param options - 옵션 객체입니다.
|
|
830
|
-
* @param options.autoInvoke - 컴포넌트가 마운트될 때 자동으로 interval을 시작할지 여부를 설정합니다. 기본값은 `false`입니다.
|
|
831
|
-
*
|
|
832
|
-
* @returns `{ start, stop, toggle, active }`
|
|
833
|
-
* - `start`: interval을 시작하는 함수입니다.
|
|
834
|
-
* - `stop`: interval을 중지하는 함수입니다.
|
|
835
|
-
* - `toggle`: interval의 상태를 토글(시작/중지)하는 함수입니다.
|
|
836
|
-
* - `active`: interval이 활성화되었는지 여부를 나타내는 boolean 값입니다.
|
|
837
|
-
*
|
|
838
|
-
* @example
|
|
839
|
-
* ```tsx
|
|
840
|
-
* function Counter() {
|
|
841
|
-
* const [count, setCount] = useState(0);
|
|
842
|
-
* const { start, stop, toggle, active } = useInterval(() => {
|
|
843
|
-
* setCount((prev) => prev + 1);
|
|
844
|
-
* }, 1000, { autoInvoke: true });
|
|
845
|
-
*
|
|
846
|
-
* return (
|
|
847
|
-
* <div>
|
|
848
|
-
* <p>Count: {count}</p>
|
|
849
|
-
* <button onClick={start}>Start</button>
|
|
850
|
-
* <button onClick={stop}>Stop</button>
|
|
851
|
-
* <button onClick={toggle}>{active ? 'Pause' : 'Resume'}</button>
|
|
852
|
-
* </div>
|
|
853
|
-
* );
|
|
854
|
-
* }
|
|
855
|
-
* ```
|
|
856
|
-
*
|
|
857
|
-
* @remarks
|
|
858
|
-
* - 이 Hook은 `window.setInterval`을 내부적으로 사용하여 특정 작업을 반복 실행합니다.
|
|
859
|
-
* - `fn`이 변경되면 최신 함수 참조를 유지하며, interval은 자동으로 최신 함수로 업데이트됩니다.
|
|
860
|
-
* - `autoInvoke`가 `true`로 설정되면, 컴포넌트가 마운트될 때 자동으로 interval이 시작됩니다.
|
|
861
|
-
* - 컴포넌트가 언마운트될 때 interval은 자동으로 정리됩니다.
|
|
862
|
-
*/
|
|
863
|
-
export declare function useInterval(fn: () => void, interval: number, { autoInvoke }?: UseIntervalOptions): {
|
|
864
|
-
start: () => void;
|
|
865
|
-
stop: () => void;
|
|
866
|
-
toggle: () => void;
|
|
867
|
-
active: boolean;
|
|
868
|
-
};
|
|
869
|
-
//#endregion
|
|
870
|
-
//#region src/hooks/useIsomorphicEffect.d.ts
|
|
871
|
-
/**
|
|
872
|
-
* 브라우저와 서버 환경 모두에서 안전하게 사용할 수 있는 React 효과 훅.
|
|
873
|
-
*
|
|
874
|
-
* - 클라이언트 환경: `useLayoutEffect` 사용 (DOM 업데이트 후 즉시 실행)
|
|
875
|
-
* - 서버 환경: `useEffect` 사용 (SSR 시 경고 방지)
|
|
876
|
-
*
|
|
877
|
-
* @returns React의 `useLayoutEffect` 또는 `useEffect`.
|
|
878
|
-
*
|
|
879
|
-
* @example
|
|
880
|
-
* ```tsx
|
|
881
|
-
* import { useIsomorphicEffect } from './useIsomorphicEffect';
|
|
882
|
-
*
|
|
883
|
-
* const Component = () => {
|
|
884
|
-
* useIsomorphicEffect(() => {
|
|
885
|
-
* console.log('렌더링 완료 후 실행');
|
|
886
|
-
* }, []);
|
|
887
|
-
*
|
|
888
|
-
* return <div>내용</div>;
|
|
889
|
-
* };
|
|
890
|
-
* ```
|
|
891
|
-
*/
|
|
892
|
-
export declare const useIsomorphicEffect: typeof useEffect;
|
|
893
|
-
//#endregion
|
|
894
|
-
//#region src/hooks/useLatest.d.ts
|
|
895
|
-
export declare function useLatest<T>(value: T): import("react").RefObject<T>;
|
|
896
|
-
//#endregion
|
|
897
|
-
//#region src/hooks/useLgOrUp.d.ts
|
|
898
|
-
export declare function useLgOrUp(options?: UseMediaQueryOptions): boolean;
|
|
899
|
-
//#endregion
|
|
900
|
-
//#region src/hooks/useLifecycleLogger.d.ts
|
|
901
|
-
/**
|
|
902
|
-
* This hook provides a console log when the component mounts, updates and unmounts.
|
|
903
|
-
*
|
|
904
|
-
* @param componentName Provides the name of the component in which the life cycle is being logged
|
|
905
|
-
* @param deps Dependencies list, as for `useEffect` hook
|
|
906
|
-
*/
|
|
907
|
-
export declare function useLifecycleLogger(componentName: string, deps?: DependencyList): void;
|
|
908
|
-
//#endregion
|
|
909
|
-
//#region src/hooks/useLoadingVisible.d.ts
|
|
910
|
-
/**
|
|
911
|
-
* 로딩 지연 훅
|
|
912
|
-
* 용도: 예를 들어, 100ms내로 작업이 빠르게 완료되는 경우
|
|
913
|
-
* 로딩중 UI를 표시 않는 것이 나을 수 있습니다.
|
|
914
|
-
* 그래서 postponeTime을 통해, 로딩중 UI표시를 지연시킬 시간을
|
|
915
|
-
* 설정합니다.
|
|
916
|
-
*
|
|
917
|
-
* 예시1) postponeTime=100ms이고, 작업시간이 1000ms인 경우
|
|
918
|
-
* 900ms동안만 로딩중 UI가 표시됩니다.
|
|
919
|
-
* 예시2) postponeTime=100ms이고, 작업시간이 150ms인 경우
|
|
920
|
-
* 50ms동안만 로딩중 UI가 표시됩니다.
|
|
921
|
-
*
|
|
922
|
-
* 예시2의 50ms는 너무 짧아서 로딩중 UI가 제대로 표시되지 못할 것입니다.
|
|
923
|
-
* 짧게라도 반드시 로딩중 UI를 반드시 표시하고 싶다면,
|
|
924
|
-
* minVisibleTime을 설정할 수 있습니다.
|
|
925
|
-
*
|
|
926
|
-
* postponeTime=200ms, minVisibleTime=300ms를 설정하였고
|
|
927
|
-
* 작업시간은 400ms라고 가정하면,
|
|
928
|
-
* setLoading(true)를 호출하면, 아래와 같은 타임라인으로 동작합니다.
|
|
929
|
-
* 0ms: setLoading(true) 호출
|
|
930
|
-
* 200ms: 로딩중 UI 표시
|
|
931
|
-
* 400ms: 작업이 완료하여 setLoading(false)를 호출, false지만 로딩중 UI는 표시됨
|
|
932
|
-
* 500ms: 로딩중 UI 감춤
|
|
933
|
-
*/
|
|
934
|
-
interface Options$1 {
|
|
935
|
-
minVisibleTime?: number;
|
|
936
|
-
postponeTime?: number;
|
|
937
|
-
}
|
|
938
|
-
export declare function useLoadingVisible(paramLoading: boolean, opts?: Options$1): boolean;
|
|
939
|
-
//#endregion
|
|
940
|
-
//#region src/hooks/useLocalStorage.d.ts
|
|
941
|
-
type parserOptions$1<T> = {
|
|
942
|
-
raw: true;
|
|
943
|
-
} | {
|
|
944
|
-
raw: false;
|
|
945
|
-
serializer: (value: T) => string;
|
|
946
|
-
deserializer: (value: string) => T;
|
|
947
|
-
};
|
|
948
|
-
export declare const useLocalStorage: <T>(key: string, initialValue?: T, options?: parserOptions$1<T>) => [T | undefined, Dispatch<SetStateAction<T | undefined>>, () => void];
|
|
949
|
-
//#endregion
|
|
950
|
-
//#region src/persistence/codec.d.ts
|
|
951
|
-
/**
|
|
952
|
-
* A codec that can encode and decode values of type V to and from strings.
|
|
953
|
-
* @typeParam V The type of values that can be encoded and decoded.
|
|
954
|
-
*/
|
|
955
|
-
interface Codec<V> {
|
|
956
|
-
/**
|
|
957
|
-
* Decodes a string value into a value of type V.
|
|
958
|
-
* @param value The value to decode.
|
|
959
|
-
* @returns The decoded value.
|
|
960
|
-
*/
|
|
961
|
-
parse: (value: string) => V;
|
|
962
|
-
/**
|
|
963
|
-
* Encodes a value of type V into a string.
|
|
964
|
-
* @param value The value to encode.
|
|
965
|
-
* @returns The encoded value.
|
|
966
|
-
*/
|
|
967
|
-
stringify: (value: V) => string;
|
|
968
|
-
}
|
|
969
|
-
//#endregion
|
|
970
|
-
//#region src/persistence/useStorageState.d.ts
|
|
971
|
-
type StorageStateInitializer<T> = () => T | null;
|
|
972
|
-
type UseStorageStateHookResult<T> = [T | null, Dispatch<SetStateAction<T | null>>];
|
|
973
|
-
interface DefaultStorageStateoptions<T = string> {
|
|
974
|
-
codec?: Codec<T>;
|
|
975
|
-
}
|
|
976
|
-
interface StorageStateOptions<T> extends DefaultStorageStateoptions<T> {
|
|
977
|
-
codec: Codec<T>;
|
|
978
|
-
}
|
|
979
|
-
interface UseStorageState {
|
|
980
|
-
/**
|
|
981
|
-
* Sync state to local or session storage so that it persists through a page refresh. Usage is
|
|
982
|
-
* similar to useState except we pass in a storage key that uniquely identifies the value.
|
|
983
|
-
* @param key The key to use for storing the value in local or session storage.
|
|
984
|
-
* @param initializer The initial value to use if the key is not present in storage.
|
|
985
|
-
* @param options Additional options for the storage state.
|
|
986
|
-
*/
|
|
987
|
-
(key: string | null, initializer?: string | null | StorageStateInitializer<string>, options?: DefaultStorageStateoptions): UseStorageStateHookResult<string>;
|
|
988
|
-
/**
|
|
989
|
-
* Sync state to local or session storage so that it persists through a page refresh. Usage is
|
|
990
|
-
* similar to useState except we pass in a storage key that uniquely identifies the value.
|
|
991
|
-
* @param key The key to use for storing the value in local or session storage.
|
|
992
|
-
* @param initializer The initial value to use if the key is not present in storage.
|
|
993
|
-
* @param options Additional options for the storage state.
|
|
994
|
-
*/
|
|
995
|
-
<T>(key: string | null, initializer: T | null | StorageStateInitializer<T>, options: StorageStateOptions<T>): UseStorageStateHookResult<T>;
|
|
996
|
-
/**
|
|
997
|
-
* Sync state to local or session storage so that it persists through a page refresh. Usage is
|
|
998
|
-
* similar to useState except we pass in a storage key that uniquely identifies the value.
|
|
999
|
-
* @param key The key to use for storing the value in local or session storage.
|
|
1000
|
-
* @param initializer The initial value to use if the key is not present in storage.
|
|
1001
|
-
* @param options Additional options for the storage state.
|
|
1002
|
-
*/
|
|
1003
|
-
<T>(key: string | null, initializer?: T | null | StorageStateInitializer<T>, options?: StorageStateOptions<T>): UseStorageStateHookResult<T>;
|
|
1004
|
-
}
|
|
1005
|
-
//#endregion
|
|
1006
|
-
//#region src/hooks/useLocalStorageState.d.ts
|
|
1007
|
-
/**
|
|
1008
|
-
* @deprecated use useLocalStorage()
|
|
1009
|
-
*/
|
|
1010
|
-
export declare const useLocalStorageState: UseStorageState;
|
|
1011
|
-
//#endregion
|
|
1012
|
-
//#region src/hooks/useMdOrDown.d.ts
|
|
1013
|
-
export declare function useMdOrDown(options?: UseMediaQueryOptions): boolean;
|
|
1014
|
-
//#endregion
|
|
1015
|
-
//#region src/hooks/useMdOrUp.d.ts
|
|
1016
|
-
export declare function useMdOrUp(options?: UseMediaQueryOptions): boolean;
|
|
1017
|
-
//#endregion
|
|
1018
|
-
//#region src/hooks/useMount.d.ts
|
|
1019
|
-
/**
|
|
1020
|
-
* 컴포넌트가 마운트될 때 한 번만 실행되는 로직을 처리하기 위한 커스텀 훅입니다.
|
|
1021
|
-
*
|
|
1022
|
-
* 이 훅은 `useEffectOnce`를 기반으로 동작하며, 컴포넌트가 마운트될 때 전달된 콜백 함수를 실행합니다.
|
|
1023
|
-
* `useEffectOnce`를 직접 사용하는 것보다 `useMount`라는 명확한 이름을 통해 의도를 더 직관적으로 나타냅니다.
|
|
1024
|
-
*
|
|
1025
|
-
* @param fn - 컴포넌트가 마운트될 때 실행할 콜백 함수. 이 함수는 마운트 시점에 한 번만 호출됩니다.
|
|
1026
|
-
*
|
|
1027
|
-
* @example
|
|
1028
|
-
* ```tsx
|
|
1029
|
-
* import React from "react";
|
|
1030
|
-
* import { useMount } from "./useMount";
|
|
1031
|
-
*
|
|
1032
|
-
* function MyComponent() {
|
|
1033
|
-
* useMount(() => {
|
|
1034
|
-
* console.log("컴포넌트가 마운트되었습니다.");
|
|
1035
|
-
* });
|
|
1036
|
-
*
|
|
1037
|
-
* return <div>My Component</div>;
|
|
1038
|
-
* }
|
|
1039
|
-
* ```
|
|
1040
|
-
* @returns 없음. 이 훅은 단지 전달된 콜백 함수를 실행하며 반환값은 없습니다.
|
|
1041
|
-
*/
|
|
1042
|
-
export declare const useMount: (fn: () => void) => void;
|
|
1043
|
-
//#endregion
|
|
1044
|
-
//#region src/hooks/useMounted.d.ts
|
|
1045
|
-
/**
|
|
1046
|
-
* 컴포넌트가 마운트되었는지 여부를 반환하는 React 훅입니다.
|
|
1047
|
-
*
|
|
1048
|
-
* SSR 환경에서 서버 렌더링 시에는 `false`를 반환하고,
|
|
1049
|
-
* 클라이언트에서 마운트된 후에는 `true`를 반환합니다.
|
|
1050
|
-
*
|
|
1051
|
-
* @returns 컴포넌트가 마운트되었으면 `true`, 아니면 `false`
|
|
1052
|
-
*
|
|
1053
|
-
* @example
|
|
1054
|
-
* ```tsx
|
|
1055
|
-
* function MyComponent() {
|
|
1056
|
-
* const mounted = useMounted();
|
|
1057
|
-
*
|
|
1058
|
-
* // 클라이언트 전용 렌더링
|
|
1059
|
-
* if (!mounted) return null;
|
|
1060
|
-
*
|
|
1061
|
-
* return <div>Client-side only content</div>;
|
|
1062
|
-
* }
|
|
1063
|
-
* ```
|
|
1064
|
-
*/
|
|
1065
|
-
export declare function useMounted(): boolean;
|
|
1066
|
-
//#endregion
|
|
1067
|
-
//#region src/hooks/useMountedState.d.ts
|
|
1068
|
-
/**
|
|
1069
|
-
* 컴포넌트가 마운트 상태인지 여부를 반환하는 커스텀 훅입니다.
|
|
1070
|
-
*
|
|
1071
|
-
* 이 훅은 컴포넌트의 현재 마운트 상태를 안전하게 확인하기 위해 사용됩니다.
|
|
1072
|
-
* 비동기 작업이나 이벤트 핸들러 내에서 컴포넌트가 마운트된 상태인지 확인할 때 유용합니다.
|
|
1073
|
-
*
|
|
1074
|
-
* @returns `() => boolean` 함수를 반환하며, 호출 시 컴포넌트가 현재 마운트 상태인지(`true` 또는 `false`)를 반환합니다.
|
|
1075
|
-
*
|
|
1076
|
-
* @example
|
|
1077
|
-
* ```tsx
|
|
1078
|
-
* import React, { useState, useEffect } from 'react';
|
|
1079
|
-
* import useMountedState from './useMountedState';
|
|
1080
|
-
*
|
|
1081
|
-
* function MyComponent() {
|
|
1082
|
-
* const isMounted = useMountedState();
|
|
1083
|
-
* const [data, setData] = useState<string | null>(null);
|
|
1084
|
-
*
|
|
1085
|
-
* useEffect(() => {
|
|
1086
|
-
* setTimeout(() => {
|
|
1087
|
-
* if (isMounted()) {
|
|
1088
|
-
* setData('데이터가 성공적으로 로드되었습니다.');
|
|
1089
|
-
* }
|
|
1090
|
-
* }, 3000);
|
|
1091
|
-
* }, [isMounted]);
|
|
1092
|
-
*
|
|
1093
|
-
* return <div>{data || '로딩 중...'}</div>;
|
|
1094
|
-
* }
|
|
1095
|
-
* ```
|
|
1096
|
-
*
|
|
1097
|
-
* @internalDetails
|
|
1098
|
-
* - `mountedRef`는 컴포넌트의 마운트 상태를 저장합니다.
|
|
1099
|
-
* - `useEffect`는 컴포넌트가 마운트되면 `true`, 언마운트되면 `false`로 설정합니다.
|
|
1100
|
-
* - `useCallback`을 사용하여 `get` 함수가 항상 동일한 참조를 가지도록 보장합니다.
|
|
1101
|
-
*/
|
|
1102
|
-
export declare function useMountedState(): () => boolean;
|
|
1103
|
-
//#endregion
|
|
1104
|
-
//#region src/hooks/useMutationObserver.d.ts
|
|
1105
|
-
/**
|
|
1106
|
-
* DOM의 변화를 감지하고 콜백을 실행하는 React 훅
|
|
1107
|
-
*
|
|
1108
|
-
* @template T - 감시 대상 HTMLElement의 타입 (기본값은 `any`)
|
|
1109
|
-
* @param callback - DOM 변경을 감지했을 때 호출되는 MutationCallback
|
|
1110
|
-
* @param options - MutationObserver를 초기화할 때 사용하는 옵션 (MutationObserverInit 객체)
|
|
1111
|
-
* @param target - 감시할 대상 요소 또는 해당 요소를 반환하는 함수 (선택적, 기본값은 `ref`를 사용)
|
|
1112
|
-
* @returns `ref` - DOM 요소에 바인딩할 수 있는 React Ref 객체
|
|
1113
|
-
*
|
|
1114
|
-
* @example
|
|
1115
|
-
* ```tsx
|
|
1116
|
-
* const App = () => {
|
|
1117
|
-
* const callback = (mutations: MutationRecord[]) => {
|
|
1118
|
-
* mutations.forEach(mutation => {
|
|
1119
|
-
* console.log(mutation);
|
|
1120
|
-
* });
|
|
1121
|
-
* };
|
|
1122
|
-
*
|
|
1123
|
-
* const ref = useMutationObserver<HTMLDivElement>(callback, { childList: true });
|
|
1124
|
-
*
|
|
1125
|
-
* return <div ref={ref}>감시 대상 요소</div>;
|
|
1126
|
-
* };
|
|
1127
|
-
* ```
|
|
1128
|
-
*/
|
|
1129
|
-
export declare function useMutationObserver<T extends HTMLElement = HTMLElement>(callback: MutationCallback, options: MutationObserverInit, target?: HTMLElement | (() => HTMLElement) | null): React.RefObject<T | null>;
|
|
1130
|
-
//#endregion
|
|
1131
|
-
//#region src/hooks/useObservable.d.ts
|
|
1132
|
-
declare function useObservable<T>(observable: null | undefined | Observable<T> | (() => Observable<T>)): T | undefined;
|
|
1133
|
-
declare function useObservable<T>(observable: null | undefined | Observable<T> | (() => Observable<T>), initialValue: T): T;
|
|
1134
|
-
//#endregion
|
|
1135
|
-
//#region src/hooks/useObservableLocalStorage.d.ts
|
|
1136
|
-
type SetStateFn$1<T> = (value: T | undefined) => void;
|
|
1137
|
-
type GetFn$1<T> = () => T;
|
|
1138
|
-
export declare function useObservableLocalStorage<T>(key: string, initialValue: T | GetFn$1<T>): [T, SetStateFn$1<T | null>];
|
|
1139
|
-
//#endregion
|
|
1140
|
-
//#region src/hooks/useObservableSessionStorage.d.ts
|
|
1141
|
-
type SetStateFn<T> = (value: T | undefined) => void;
|
|
1142
|
-
type GetFn<T> = () => T;
|
|
1143
|
-
export declare function useObservableSessionStorage<T>(key: string, initialValue: T | GetFn<T>): [T, SetStateFn<T | null>];
|
|
1144
|
-
//#endregion
|
|
1145
|
-
//#region src/hooks/useOs.d.ts
|
|
1146
|
-
export type OS = 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux';
|
|
1147
|
-
interface UseOsOptions {
|
|
1148
|
-
getValueInEffect: boolean;
|
|
1149
|
-
}
|
|
1150
|
-
export declare function useOs(options?: UseOsOptions): OS;
|
|
1151
|
-
//#endregion
|
|
1152
|
-
//#region src/hooks/useRafState.d.ts
|
|
1153
|
-
export declare const useRafState: <S>(initialState: S | (() => S)) => [S, Dispatch<SetStateAction<S>>];
|
|
1154
|
-
//#endregion
|
|
1155
|
-
//#region src/hooks/useRefEffect.d.ts
|
|
1156
|
-
export type CleanupCallback = () => void;
|
|
1157
|
-
/**
|
|
1158
|
-
* DOM ref가 연결되거나 변경될 때 콜백을 실행하고, 이전 요소에 대한 정리 함수를 자동으로 호출하는 훅입니다.
|
|
1159
|
-
*
|
|
1160
|
-
* @template RefElement - ref로 연결할 HTML 요소 타입. 기본값은 `HTMLElement`입니다.
|
|
1161
|
-
* @param callback - 요소가 연결될 때 실행할 함수. 정리 함수가 필요하면 반환할 수 있습니다.
|
|
1162
|
-
* @param deps - ref 콜백을 다시 생성할 의존성 목록입니다.
|
|
1163
|
-
* @returns React `ref` prop에 전달할 수 있는 콜백 ref 함수입니다.
|
|
1164
|
-
*
|
|
1165
|
-
* @example
|
|
1166
|
-
* ```tsx
|
|
1167
|
-
* const ref = useRefEffect<HTMLDivElement>((element) => {
|
|
1168
|
-
* console.log('mounted', element);
|
|
1169
|
-
*
|
|
1170
|
-
* return () => {
|
|
1171
|
-
* console.log('unmounted', element);
|
|
1172
|
-
* };
|
|
1173
|
-
* }, []);
|
|
1174
|
-
*
|
|
1175
|
-
* return <div ref={ref} />;
|
|
1176
|
-
* ```
|
|
1177
|
-
*/
|
|
1178
|
-
export declare function useRefEffect<RefElement extends HTMLElement = HTMLElement>(callback: (element: RefElement) => CleanupCallback | undefined, deps: DependencyList): (element: RefElement | null) => void;
|
|
1179
|
-
//#endregion
|
|
1180
|
-
//#region src/hooks/useResizeObserver.d.ts
|
|
1181
|
-
type ObserverRect = Omit<DOMRectReadOnly, 'toJSON'>;
|
|
1182
|
-
/**
|
|
1183
|
-
* 요소에 대한 `ref`를 제공하고 크기 조정(resize) 이벤트를 관찰하는 커스텀 React 훅.
|
|
1184
|
-
* 이 훅은 요소의 크기와 위치(DOMRect)를 반환합니다.
|
|
1185
|
-
*
|
|
1186
|
-
* @template T - 관찰할 HTML 요소의 타입. 기본값은 `HTMLElement`입니다.
|
|
1187
|
-
* @param options - 관찰을 설정하기 위한 선택적인 `ResizeObserverOptions` 객체.
|
|
1188
|
-
* @returns 튜플 형태의 반환값:
|
|
1189
|
-
* - `ref`: 관찰할 요소에 연결하기 위한 React 참조 객체.
|
|
1190
|
-
* - `rect`: 관찰된 요소의 DOMRect 속성(크기와 위치).
|
|
1191
|
-
*
|
|
1192
|
-
* @example
|
|
1193
|
-
* ```tsx
|
|
1194
|
-
* const [ref, rect] = useResizeObserver();
|
|
1195
|
-
*
|
|
1196
|
-
* return (
|
|
1197
|
-
* <div ref={ref} style={{ resize: "both", overflow: "auto" }}>
|
|
1198
|
-
* Width: {rect.width}, Height: {rect.height}
|
|
1199
|
-
* </div>
|
|
1200
|
-
* );
|
|
1201
|
-
* ```
|
|
1202
|
-
*/
|
|
1203
|
-
export declare function useResizeObserver<T extends HTMLElement = HTMLElement>(options?: ResizeObserverOptions): readonly [import("react").RefObject<T | null>, ObserverRect];
|
|
1204
|
-
//#endregion
|
|
1205
|
-
//#region src/hooks/useScript.d.ts
|
|
1206
|
-
type LoadingState = 'unknown' | 'loading' | 'ready' | 'error';
|
|
1207
|
-
export declare function useScript(src: string, options?: {
|
|
1208
|
-
removeOnUnmount?: boolean;
|
|
1209
|
-
}): LoadingState;
|
|
1210
|
-
//#endregion
|
|
1211
|
-
//#region src/hooks/useSessionStorage.d.ts
|
|
1212
|
-
type parserOptions<T> = {
|
|
1213
|
-
raw: true;
|
|
1214
|
-
} | {
|
|
1215
|
-
raw: false;
|
|
1216
|
-
serializer: (value: T) => string;
|
|
1217
|
-
deserializer: (value: string) => T;
|
|
1218
|
-
};
|
|
1219
|
-
/**
|
|
1220
|
-
* Persist state in sessionStorage.
|
|
1221
|
-
*
|
|
1222
|
-
* Returns `[value, setValue, removeValue]`.
|
|
1223
|
-
* - `setValue(next)` writes to sessionStorage and updates state.
|
|
1224
|
-
* - `removeValue()` removes the key from sessionStorage and resets state to `undefined`.
|
|
1225
|
-
*
|
|
1226
|
-
* On SSR/non-browser environments the hook returns `initialValue` and the setter/remove are no-ops.
|
|
1227
|
-
*/
|
|
1228
|
-
export declare const useSessionStorage: <T>(key: string, initialValue?: T, options?: parserOptions<T>) => [T | undefined, Dispatch<SetStateAction<T | undefined>>, () => void];
|
|
1229
|
-
//#endregion
|
|
1230
|
-
//#region src/hooks/useSessionStorageState.d.ts
|
|
1231
|
-
/**
|
|
1232
|
-
* @deprecated use useSessionStorage()
|
|
1233
|
-
*/
|
|
1234
|
-
export declare const useSessionStorageState: UseStorageState;
|
|
1235
|
-
//#endregion
|
|
1236
|
-
//#region src/hooks/useSmOrDown.d.ts
|
|
1237
|
-
export declare function useSmOrDown(options?: UseMediaQueryOptions): boolean;
|
|
1238
|
-
//#endregion
|
|
1239
|
-
//#region src/hooks/useSmOrUp.d.ts
|
|
1240
|
-
export declare function useSmOrUp(options?: UseMediaQueryOptions): boolean;
|
|
1241
|
-
//#endregion
|
|
1242
|
-
//#region src/hooks/useThrottledCallback.d.ts
|
|
1243
|
-
/**
|
|
1244
|
-
* 주어진 콜백 함수를 지정된 시간 간격(`wait`)으로 호출하도록 제한하는 간단한 쓰로틀링 React 훅.
|
|
1245
|
-
*
|
|
1246
|
-
* 내부적으로 `useThrottledCallbackWithClearTimeout`을 사용하며, 타이머 정리 기능 없이 쓰로틀링된 콜백 함수만 반환합니다.
|
|
1247
|
-
*
|
|
1248
|
-
* @template T - 콜백 함수의 타입.
|
|
1249
|
-
* @param callback - 쓰로틀링할 콜백 함수.
|
|
1250
|
-
* @param wait - 호출 간격(밀리초 단위).
|
|
1251
|
-
* @returns 쓰로틀링된 콜백 함수.
|
|
1252
|
-
*
|
|
1253
|
-
* @example
|
|
1254
|
-
* ```tsx
|
|
1255
|
-
* const throttledClick = useThrottledCallback(() => {
|
|
1256
|
-
* console.log("클릭!");
|
|
1257
|
-
* }, 1000);
|
|
1258
|
-
*
|
|
1259
|
-
* return <button onClick={throttledClick}>클릭</button>;
|
|
1260
|
-
* ```
|
|
1261
|
-
*/
|
|
1262
|
-
export declare function useThrottledCallback<T extends (...args: any[]) => any>(callback: T // 쓰로틀링할 콜백 함수
|
|
1263
|
-
, wait: number): (...args: Parameters<T>) => void;
|
|
1264
|
-
//#endregion
|
|
1265
|
-
//#region src/hooks/useThrottledCallbackWithClearTimeout.d.ts
|
|
1266
|
-
/**
|
|
1267
|
-
* 주어진 콜백 함수를 지정된 시간 간격(`wait`)으로 호출하는 커스텀 React 훅.
|
|
1268
|
-
*
|
|
1269
|
-
* 이 훅은 마지막 호출 이후 일정 시간이 지나야 콜백이 다시 호출되도록 제한합니다(Throttle).
|
|
1270
|
-
* 또한 타이머를 수동으로 정리할 수 있는 기능을 제공합니다.
|
|
1271
|
-
*
|
|
1272
|
-
* @template T - 콜백 함수의 타입.
|
|
1273
|
-
* @param callback - 쓰로틀링할 콜백 함수.
|
|
1274
|
-
* @param wait - 호출 간격(밀리초 단위).
|
|
1275
|
-
* @returns 배열 형태의 반환값:
|
|
1276
|
-
* - `throttled`: 쓰로틀링된 콜백 함수.
|
|
1277
|
-
* - `clearTimeout`: 현재 실행 중인 타이머를 취소하는 함수.
|
|
1278
|
-
*
|
|
1279
|
-
* @example
|
|
1280
|
-
* ```tsx
|
|
1281
|
-
* const [throttledClick, clearThrottle] = useThrottledCallbackWithClearTimeout(() => {
|
|
1282
|
-
* console.log("클릭!");
|
|
1283
|
-
* }, 1000);
|
|
1284
|
-
*
|
|
1285
|
-
* return (
|
|
1286
|
-
* <button onClick={throttledClick}>클릭</button>
|
|
1287
|
-
* <button onClick={clearThrottle}>쓰로틀링 취소</button>
|
|
1288
|
-
* );
|
|
1289
|
-
* ```
|
|
1290
|
-
*/
|
|
1291
|
-
export declare function useThrottledCallbackWithClearTimeout<T extends (...args: any[]) => any>(callback: T // 쓰로틀링할 콜백 함수
|
|
1292
|
-
, wait: number): readonly [(...args: Parameters<T>) => void, () => void];
|
|
1293
|
-
//#endregion
|
|
1294
|
-
//#region src/hooks/useThrottledState.d.ts
|
|
1295
|
-
/**
|
|
1296
|
-
* 쓰로틀링된 상태(state)와 상태를 업데이트하는 함수를 제공하는 React 커스텀 훅.
|
|
1297
|
-
*
|
|
1298
|
-
* 이 훅은 상태 업데이트를 지정된 시간 간격(`wait`)으로 제한하여, 불필요한 연속 업데이트를 방지합니다.
|
|
1299
|
-
*
|
|
1300
|
-
* @template T - 상태 값의 타입. 기본값은 `any`.
|
|
1301
|
-
* @param defaultValue - 초기 상태 값.
|
|
1302
|
-
* @param wait - 상태 업데이트 간격(밀리초 단위).
|
|
1303
|
-
* @returns 배열 형태의 반환값:
|
|
1304
|
-
* - `value`: 현재 상태 값.
|
|
1305
|
-
* - `setThrottledValue`: 상태를 쓰로틀링하여 업데이트하는 함수.
|
|
1306
|
-
*
|
|
1307
|
-
* @example
|
|
1308
|
-
* ```tsx
|
|
1309
|
-
* const [value, setValue] = useThrottledState(0, 1000);
|
|
1310
|
-
*
|
|
1311
|
-
* const handleClick = () => setValue(value + 1);
|
|
1312
|
-
*
|
|
1313
|
-
* return (
|
|
1314
|
-
* <div>
|
|
1315
|
-
* <p>값: {value}</p>
|
|
1316
|
-
* <button onClick={handleClick}>값 증가</button>
|
|
1317
|
-
* </div>
|
|
1318
|
-
* );
|
|
1319
|
-
* ```
|
|
1320
|
-
*/
|
|
1321
|
-
export declare function useThrottledState<T>(defaultValue: T // 초기 상태 값
|
|
1322
|
-
, wait: number): readonly [T, (value: import("react").SetStateAction<T>) => void];
|
|
1323
|
-
//#endregion
|
|
1324
|
-
//#region src/hooks/useThrottledValue.d.ts
|
|
1325
|
-
/**
|
|
1326
|
-
* 주어진 값을 쓰로틀링하여 지정된 시간 간격(`wait`) 후에 최신 값을 반환하는 커스텀 React 훅.
|
|
1327
|
-
*
|
|
1328
|
-
* 이 훅은 입력 값(`value`)이 변경될 때마다, 지정된 `wait` 시간 간격으로 업데이트된 값을 제공합니다.
|
|
1329
|
-
*
|
|
1330
|
-
* @template T - 쓰로틀링할 값의 타입.
|
|
1331
|
-
* @param value - 쓰로틀링할 값.
|
|
1332
|
-
* @param wait - 값 업데이트 간격(밀리초 단위).
|
|
1333
|
-
* @returns 쓰로틀링된 값을 반환.
|
|
1334
|
-
*
|
|
1335
|
-
* @example
|
|
1336
|
-
* ```tsx
|
|
1337
|
-
* const throttledValue = useThrottledValue(inputValue, 500);
|
|
1338
|
-
*
|
|
1339
|
-
* return <p>쓰로틀링된 값: {throttledValue}</p>;
|
|
1340
|
-
* ```
|
|
1341
|
-
*/
|
|
1342
|
-
export declare function useThrottledValue<T>(value: T, wait: number): T;
|
|
1343
|
-
//#endregion
|
|
1344
|
-
//#region src/hooks/useTimeout.d.ts
|
|
1345
|
-
/**
|
|
1346
|
-
* 특정 작업을 일정 시간 후 실행할 수 있는 타이머 훅
|
|
1347
|
-
*
|
|
1348
|
-
* 이 훅은 `setTimeout`과 `clearTimeout`을 관리하는 기능을 캡슐화하여, 타이머를 쉽게 시작하거나 정리할 수 있게 합니다.
|
|
1349
|
-
* 옵션에 따라 자동 실행(`autoInvoke`)도 지원합니다.
|
|
1350
|
-
*
|
|
1351
|
-
* @param callback - 지연 시간이 지난 후 실행할 함수.
|
|
1352
|
-
* @param delay - 타이머 지연 시간(밀리초).
|
|
1353
|
-
* @param options - 타이머 동작 방식을 설정하는 옵션 객체. 기본값은 `{ autoInvoke: false }`.
|
|
1354
|
-
* - `autoInvoke`: `true`일 경우, 컴포넌트가 마운트될 때 타이머가 자동으로 시작됩니다.
|
|
1355
|
-
*
|
|
1356
|
-
* @returns 객체 형태의 반환값:
|
|
1357
|
-
* - `start`: 타이머를 시작하는 함수.
|
|
1358
|
-
* - `clear`: 타이머를 취소하는 함수.
|
|
1359
|
-
*
|
|
1360
|
-
* @example
|
|
1361
|
-
* ```tsx
|
|
1362
|
-
* const { start, clear } = useTimeout(() => {
|
|
1363
|
-
* console.log("5초 후 실행");
|
|
1364
|
-
* }, 5000, { autoInvoke: true });
|
|
1365
|
-
*
|
|
1366
|
-
* return (
|
|
1367
|
-
* <button onClick={start}>타이머 시작</button>
|
|
1368
|
-
* <button onClick={clear}>타이머 정리</button>
|
|
1369
|
-
* );
|
|
1370
|
-
* ```
|
|
1371
|
-
*/
|
|
1372
|
-
export declare function useTimeout(callback: (...callbackParams: unknown[]) => void // 지연 시간이 지난 후 실행할 함수
|
|
1373
|
-
, delay: number // 타이머 지연 시간 (밀리초)
|
|
1374
|
-
, options?: {
|
|
1375
|
-
autoInvoke: boolean;
|
|
1376
|
-
}): {
|
|
1377
|
-
start: (...callbackParams: unknown[]) => void;
|
|
1378
|
-
clear: () => void;
|
|
1379
|
-
};
|
|
1380
|
-
//#endregion
|
|
1381
|
-
//#region src/hooks/useTimeoutData.d.ts
|
|
1382
|
-
/**
|
|
1383
|
-
* 시간이 지나면 자동으로 사라지는 데이터
|
|
1384
|
-
*/
|
|
1385
|
-
export declare function useTimeoutData<T>(timeoutMs: number): [T | null, (t: T | null) => void];
|
|
1386
|
-
//#endregion
|
|
1387
|
-
//#region src/hooks/useUncontrolled.d.ts
|
|
1388
|
-
interface UseUncontrolledInput<T> {
|
|
1389
|
-
/**
|
|
1390
|
-
* 제어 상태 값 (controlled state).
|
|
1391
|
-
* 값이 전달되면 해당 값이 항상 반환됩니다.
|
|
1392
|
-
*/
|
|
1393
|
-
value?: T;
|
|
1394
|
-
/**
|
|
1395
|
-
* 비제어 상태의 초기 값 (uncontrolled state).
|
|
1396
|
-
* `value`가 제공되지 않았을 때 사용됩니다.
|
|
1397
|
-
*/
|
|
1398
|
-
defaultValue?: T;
|
|
1399
|
-
/**
|
|
1400
|
-
* `value`와 `defaultValue`가 모두 제공되지 않을 때 사용되는 최종 기본 값.
|
|
1401
|
-
*/
|
|
1402
|
-
finalValue?: T;
|
|
1403
|
-
/**
|
|
1404
|
-
* 제어 상태 변화 시 호출되는 콜백 함수.
|
|
1405
|
-
*
|
|
1406
|
-
* @param value - 변경된 값
|
|
1407
|
-
* @param payload - 추가 데이터
|
|
1408
|
-
*/
|
|
1409
|
-
onChange?: (value: T, ...payload: unknown[]) => void;
|
|
1410
|
-
}
|
|
1411
|
-
/**
|
|
1412
|
-
* 제어 상태와 비제어 상태를 동시에 지원하는 React 훅.
|
|
1413
|
-
*
|
|
1414
|
-
* 이 훅은 컴포넌트가 "제어 상태(controlled state)"와
|
|
1415
|
-
* "비제어 상태(uncontrolled state)"를 쉽게 다룰 수 있도록 설계되었습니다.
|
|
1416
|
-
*
|
|
1417
|
-
* @template T - 상태 값의 타입
|
|
1418
|
-
* @param params - 제어 상태와 비제어 상태를 관리하기 위한 입력 값
|
|
1419
|
-
* @returns [현재 상태 값, 상태를 업데이트하는 함수, 제어 상태 여부]
|
|
1420
|
-
*
|
|
1421
|
-
* @example
|
|
1422
|
-
* ```tsx
|
|
1423
|
-
* const [value, setValue, isControlled] = useUncontrolled({
|
|
1424
|
-
* value: controlledValue, // 제어 상태 값
|
|
1425
|
-
* defaultValue: 10, // 초기 값
|
|
1426
|
-
* finalValue: 0, // 최종 기본 값
|
|
1427
|
-
* onChange: (val) => console.log(val), // 변경 시 콜백
|
|
1428
|
-
* });
|
|
1429
|
-
* ```
|
|
1430
|
-
*/
|
|
1431
|
-
export declare function useUncontrolled<T>({ value, defaultValue, finalValue, onChange }: UseUncontrolledInput<T>): [T, (value: T, ...payload: unknown[]) => void, boolean];
|
|
1432
|
-
//#endregion
|
|
1433
|
-
//#region src/hooks/useUnmount.d.ts
|
|
1434
|
-
export declare const useUnmount: (fn: () => void) => void;
|
|
1435
|
-
//#endregion
|
|
1436
|
-
//#region src/hooks/useUpdate.d.ts
|
|
1437
|
-
export declare const useUpdate: () => () => void;
|
|
1438
|
-
//#endregion
|
|
1439
|
-
//#region src/hooks/useUpdateEffect.d.ts
|
|
1440
|
-
export declare const useUpdateEffect: (effect: EffectCallback, deps?: DependencyList) => void;
|
|
1441
|
-
//#endregion
|
|
1442
|
-
//#region src/hooks/useUpdateLayoutEffect.d.ts
|
|
1443
|
-
export declare const useUpdateLayoutEffect: (effect: EffectCallback, deps?: DependencyList) => void;
|
|
1444
|
-
//#endregion
|
|
1445
|
-
//#region src/hooks/useWindowEvent.d.ts
|
|
1446
|
-
/**
|
|
1447
|
-
* 지정된 타입의 윈도우 이벤트를 등록하고 관리하는 React 커스텀 훅.
|
|
1448
|
-
*
|
|
1449
|
-
* @template K - 이벤트 타입을 나타내는 문자열 타입.
|
|
1450
|
-
* @param type - 등록할 윈도우 이벤트의 타입(예: "resize", "click").
|
|
1451
|
-
* @param listener - 이벤트가 발생했을 때 실행될 콜백 함수.
|
|
1452
|
-
* - 표준 이벤트 타입(`WindowEventMap`)의 경우 타입에 맞는 이벤트 객체를 전달받음.
|
|
1453
|
-
* - 사용자 정의 이벤트의 경우 `CustomEvent` 객체를 전달받음.
|
|
1454
|
-
* @param options - 이벤트 리스너 등록 시 사용할 옵션(선택 사항).
|
|
1455
|
-
* - `boolean` 또는 `AddEventListenerOptions`를 지원.
|
|
1456
|
-
*
|
|
1457
|
-
* @example
|
|
1458
|
-
* ```tsx
|
|
1459
|
-
* useWindowEvent("resize", () => {
|
|
1460
|
-
* console.log("창 크기가 변경되었습니다.");
|
|
1461
|
-
* });
|
|
1462
|
-
* ```
|
|
1463
|
-
*/
|
|
1464
|
-
export declare function useWindowEvent<K extends string>(type: K // 등록할 윈도우 이벤트의 타입
|
|
1465
|
-
, listener: K extends keyof WindowEventMap ? (this: Window, ev: WindowEventMap[K]) => void : (this: Window, ev: CustomEvent) => void // 사용자 정의 이벤트 리스너
|
|
1466
|
-
, options?: boolean | AddEventListenerOptions): void;
|
|
1467
|
-
//#endregion
|
|
1468
|
-
//#region src/hooks/useWindowSize.d.ts
|
|
1469
|
-
interface Options {
|
|
1470
|
-
initialWidth?: number;
|
|
1471
|
-
initialHeight?: number;
|
|
1472
|
-
onChange?: (width: number, height: number) => void;
|
|
1473
|
-
}
|
|
1474
|
-
export declare const useWindowSize: ({ initialWidth, initialHeight, onChange }?: Options) => {
|
|
1475
|
-
width: number;
|
|
1476
|
-
height: number;
|
|
1477
|
-
};
|
|
1478
|
-
//#endregion
|
|
1479
|
-
//#region src/hooks/useXsOrDown.d.ts
|
|
1480
|
-
export declare function useXsOrDown(options?: UseMediaQueryOptions): boolean;
|
|
1481
|
-
//#endregion
|
|
1482
|
-
export { composeRefs, useComposedRefs, useObservable };
|
|
1483
|
-
//# sourceMappingURL=index.d.cts.map
|
|
1
|
+
import { useAbsolutePosition } from "./useAbsolutePosition.cjs";
|
|
2
|
+
import { useAudioUnlocked } from "./useAudioUnlocked.cjs";
|
|
3
|
+
import { useBehaviorSubject } from "./useBehaviorSubject.cjs";
|
|
4
|
+
import { useCallbackRef } from "./useCallbackRef.cjs";
|
|
5
|
+
import { useCenterInView } from "./useCenterInView.cjs";
|
|
6
|
+
import { UseClipboardOptions, useClipboard } from "./useClipboard.cjs";
|
|
7
|
+
import { useClosableEffect } from "./useClosableEffect.cjs";
|
|
8
|
+
import { composeRefs, useComposedRefs } from "./useComposedRefs.cjs";
|
|
9
|
+
import { useConstant } from "./useConstant.cjs";
|
|
10
|
+
import { useCooldown } from "./useCooldown.cjs";
|
|
11
|
+
import { useCustomCompareEffect } from "./useCustomCompareEffect.cjs";
|
|
12
|
+
import { useCustomCompareMemo } from "./useCustomCompareMemo.cjs";
|
|
13
|
+
import { useDebouncedCallback } from "./useDebouncedCallback.cjs";
|
|
14
|
+
import { UseDebouncedParamsOptions, UseDebouncedParamsResult, useDebouncedParams } from "./useDebouncedParams.cjs";
|
|
15
|
+
import { useDebouncedState } from "./useDebouncedState.cjs";
|
|
16
|
+
import { useDebouncedValue } from "./useDebouncedValue.cjs";
|
|
17
|
+
import { useDebounceEffect } from "./useDebounceEffect.cjs";
|
|
18
|
+
import { useDebounceFn } from "./useDebounceFn.cjs";
|
|
19
|
+
import { useDeepCompareEffect } from "./useDeepCompareEffect.cjs";
|
|
20
|
+
import { useDeepCompareMemo } from "./useDeepCompareMemo.cjs";
|
|
21
|
+
import { useDidUpdate } from "./useDidUpdate.cjs";
|
|
22
|
+
import { useEffectOnce } from "./useEffectOnce.cjs";
|
|
23
|
+
import { useElementSize } from "./useElementSize.cjs";
|
|
24
|
+
import { useEventListener } from "./useEventListener.cjs";
|
|
25
|
+
import { useId } from "./useId.cjs";
|
|
26
|
+
import { useIdle } from "./useIdle.cjs";
|
|
27
|
+
import { useImageLoadCallback } from "./useImageLoadCallback.cjs";
|
|
28
|
+
import { FileUploadResult, useImageUpload } from "./useImageUpload.cjs";
|
|
29
|
+
import { useInterval } from "./useInterval.cjs";
|
|
30
|
+
import { useIsomorphicEffect } from "./useIsomorphicEffect.cjs";
|
|
31
|
+
import { useLatest } from "./useLatest.cjs";
|
|
32
|
+
import { useLgOrUp } from "./useLgOrUp.cjs";
|
|
33
|
+
import { useLifecycleLogger } from "./useLifecycleLogger.cjs";
|
|
34
|
+
import { useLoadingVisible } from "./useLoadingVisible.cjs";
|
|
35
|
+
import { useLocalStorage } from "./useLocalStorage.cjs";
|
|
36
|
+
import { useLocalStorageState } from "./useLocalStorageState.cjs";
|
|
37
|
+
import { useMdOrDown } from "./useMdOrDown.cjs";
|
|
38
|
+
import { useMdOrUp } from "./useMdOrUp.cjs";
|
|
39
|
+
import { useMount } from "./useMount.cjs";
|
|
40
|
+
import { useMounted } from "./useMounted.cjs";
|
|
41
|
+
import { useMountedState } from "./useMountedState.cjs";
|
|
42
|
+
import { useMutationObserver } from "./useMutationObserver.cjs";
|
|
43
|
+
import useObservable from "./useObservable.cjs";
|
|
44
|
+
import { useObservableLocalStorage } from "./useObservableLocalStorage.cjs";
|
|
45
|
+
import { useObservableSessionStorage } from "./useObservableSessionStorage.cjs";
|
|
46
|
+
import { OS, useOs } from "./useOs.cjs";
|
|
47
|
+
import { useRafState } from "./useRafState.cjs";
|
|
48
|
+
import { CleanupCallback, useRefEffect } from "./useRefEffect.cjs";
|
|
49
|
+
import { useResizeObserver } from "./useResizeObserver.cjs";
|
|
50
|
+
import { useScript } from "./useScript.cjs";
|
|
51
|
+
import { useSessionStorage } from "./useSessionStorage.cjs";
|
|
52
|
+
import { useSessionStorageState } from "./useSessionStorageState.cjs";
|
|
53
|
+
import { useSmOrDown } from "./useSmOrDown.cjs";
|
|
54
|
+
import { useSmOrUp } from "./useSmOrUp.cjs";
|
|
55
|
+
import { useThrottledCallback } from "./useThrottledCallback.cjs";
|
|
56
|
+
import { useThrottledCallbackWithClearTimeout } from "./useThrottledCallbackWithClearTimeout.cjs";
|
|
57
|
+
import { useThrottledState } from "./useThrottledState.cjs";
|
|
58
|
+
import { useThrottledValue } from "./useThrottledValue.cjs";
|
|
59
|
+
import { useTimeout } from "./useTimeout.cjs";
|
|
60
|
+
import { useTimeoutData } from "./useTimeoutData.cjs";
|
|
61
|
+
import { useUncontrolled } from "./useUncontrolled.cjs";
|
|
62
|
+
import { useUnmount } from "./useUnmount.cjs";
|
|
63
|
+
import { useUpdate } from "./useUpdate.cjs";
|
|
64
|
+
import { useUpdateEffect } from "./useUpdateEffect.cjs";
|
|
65
|
+
import { useUpdateLayoutEffect } from "./useUpdateLayoutEffect.cjs";
|
|
66
|
+
import { useWindowEvent } from "./useWindowEvent.cjs";
|
|
67
|
+
import { useWindowSize } from "./useWindowSize.cjs";
|
|
68
|
+
import { useXsOrDown } from "./useXsOrDown.cjs";
|
|
69
|
+
export { CleanupCallback, FileUploadResult, OS, UseClipboardOptions, UseDebouncedParamsOptions, UseDebouncedParamsResult, composeRefs, useAbsolutePosition, useAudioUnlocked, useBehaviorSubject, useCallbackRef, useCenterInView, useClipboard, useClosableEffect, useComposedRefs, useConstant, useCooldown, useCustomCompareEffect, useCustomCompareMemo, useDebounceEffect, useDebounceFn, useDebouncedCallback, useDebouncedParams, useDebouncedState, useDebouncedValue, useDeepCompareEffect, useDeepCompareMemo, useDidUpdate, useEffectOnce, useElementSize, useEventListener, useId, useIdle, useImageLoadCallback, useImageUpload, useInterval, useIsomorphicEffect, useLatest, useLgOrUp, useLifecycleLogger, useLoadingVisible, useLocalStorage, useLocalStorageState, useMdOrDown, useMdOrUp, useMount, useMounted, useMountedState, useMutationObserver, useObservable, useObservableLocalStorage, useObservableSessionStorage, useOs, useRafState, useRefEffect, useResizeObserver, useScript, useSessionStorage, useSessionStorageState, useSmOrDown, useSmOrUp, useThrottledCallback, useThrottledCallbackWithClearTimeout, useThrottledState, useThrottledValue, useTimeout, useTimeoutData, useUncontrolled, useUnmount, useUpdate, useUpdateEffect, useUpdateLayoutEffect, useWindowEvent, useWindowSize, useXsOrDown };
|