@cp949/mui-react19 2.1.0 → 2.2.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 +75 -0
- package/dist/components/CopyButtonWrapper.d.ts +75 -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 +87 -0
- package/dist/components/FileButton.d.ts +87 -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 +13 -0
- package/dist/components/LengthLimitHelperText.d.ts +13 -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 +23 -0
- package/dist/components/flex/FlexColumn.d.ts +23 -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 +23 -0
- package/dist/components/flex/FlexRow.d.ts +23 -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 +30 -0
- package/dist/components/stack/StackColumn.d.ts +30 -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 +29 -0
- package/dist/components/stack/StackRow.d.ts +29 -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 +6 -0
- package/dist/hooks/useBehaviorSubject.d.ts +6 -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 +36 -0
- package/dist/hooks/useClipboard.d.ts +36 -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 +6 -0
- package/dist/hooks/useClosableEffect.d.ts +6 -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 +55 -0
- package/dist/hooks/useCustomCompareEffect.d.ts +55 -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 +55 -0
- package/dist/hooks/useDebounceEffect.d.ts +55 -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 +53 -0
- package/dist/hooks/useDebounceFn.d.ts +53 -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 +39 -0
- package/dist/hooks/useDebouncedCallback.d.ts +39 -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 +52 -0
- package/dist/hooks/useInterval.d.ts +52 -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 +32 -0
- package/dist/hooks/useLoadingVisible.d.ts +32 -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 +12 -0
- package/dist/hooks/useLocalStorage.d.ts +12 -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 +6 -0
- package/dist/hooks/useObservableLocalStorage.d.ts +6 -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 +6 -0
- package/dist/hooks/useObservableSessionStorage.d.ts +6 -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 +8 -0
- package/dist/hooks/useOs.d.ts +8 -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 +26 -0
- package/dist/hooks/useResizeObserver.d.ts +26 -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 +7 -0
- package/dist/hooks/useScript.d.ts +7 -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 +21 -0
- package/dist/hooks/useSessionStorage.d.ts +21 -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 +47 -0
- package/dist/hooks/useUncontrolled.d.ts +47 -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 +12 -0
- package/dist/hooks/useWindowSize.d.ts +12 -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 +69 -0
- package/dist/util/closables.d.ts +69 -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 +13 -7
- package/package.json +14 -15
- 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/file-drop/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
function e(...e){return e.filter(e=>e&&e.length>0&&e!==`.`).flatMap(e=>e.split(`/`)).filter(e=>e.length>0&&e!==`.`)}var t=class t{static join(...e){return t.split(...e).join(`/`)}static split=(...t)=>{let n=[];return t.forEach(t=>{Array.isArray(t)?t.forEach(t=>{typeof t==`string`&&t.length>0&&n.push(...e(t))}):typeof t==`string`&&t.length>0&&n.push(...e(t))}),n.filter(e=>typeof e==`string`&&e.length>0&&e!==`.`)};static pathStartsWith(e,n){return t.segmentsStartsWith(t.split(e),t.split(n))}static segmentsStartsWith(e,t){let n=e,r=t;return r.length>n.length?!1:r.every((e,t)=>e===n[t])}},n=class e{segments;path;constructor(e){this.segments=Array.isArray(e)?e:t.split(e),this.path=this.segments.join(`/`)}static EMPTY=new e([]);static from=(...n)=>new e(t.split(...n));join=(...n)=>{let r=t.split(...this.segments,...n);return new e(r)};changeLast=t=>{if(this.segments.length===0)return new e(t);let n=this.segments.slice();return n[n.length-1]=t,new e(n)};parentOrNull=()=>{if(this.segments.length===0)return null;let t=this.segments.slice(0,this.segments.length-1);return new e(t)};lastSegmentOrNull=()=>this.segments.length===0?null:this.segments[this.segments.length-1];lastSegment=()=>this.segments.length===0?``:this.segments[this.segments.length-1];startsWith=e=>typeof e==`string`?t.segmentsStartsWith(this.segments,t.split(e)):Array.isArray(e)?t.segmentsStartsWith(this.segments,e):t.segmentsStartsWith(this.segments,e.segments);toString(){return this.path}};const r=()=>{};function i(e=`warn`){let t=e!==`none`,n=e===`info`||e===`verbose`,i=e===`verbose`;return{info:n?(...e)=>console.log(...e):r,verbose:i?(...e)=>console.log(...e):r,debug:i?(...e)=>console.debug(...e):r,warn:t?(...e)=>console.warn(...e):r,error:n?(...e)=>console.error(...e):r}}function a(e){return e==null?`unknown`:typeof e==`string`?e:typeof e==`object`&&`message`in e&&typeof e.message==`string`?e.message:String(e)}async function o(e,t,n,r,a=`none`,l=!0,u=4){let d=i(a);if(t.isFile){let i=await s(t);if(!i){d.debug(`FileSystemEntry.getFile() error`,t);return}r(i)&&n.push({type:`file`,file:i,path:e.join(i.name)});return}if(!t.isDirectory)return;n.push({type:`dir`,path:e.join(t.name)});let f=e.join(t.name);d.info(`🔍 Traversing directory (Entry API): ${t.name} at path: ${f.toString()}`);let p=await c(t,a);d.verbose(` 📊 Total children found: ${p.length}`),p.forEach((e,t)=>{d.verbose(` 📄 Found [${t}]: ${e.name} (${e.isFile?`file`:`directory`})`)});let{simpleParallelMap:m}=await import(`../parallel-map-DyuHvxYY.js`),h=Math.max(1,u);if(l&&h>1&&p.length>1)d.info(` ⚡ Processing ${p.length} items in parallel (custom implementation, concurrency=${h})`),await m(p,async e=>{(e.isFile||e.isDirectory)&&await o(f,e,n,r,a,l,h)},h);else{d.info(` 📝 Processing ${p.length} item directly`);for(let e of p)(e.isFile||e.isDirectory)&&await o(f,e,n,r,a,l,h)}}async function s(e){try{return await new Promise((t,n)=>{e.file(e=>{t(e)},e=>{n(e)})})}catch{return null}}async function c(e,t=`none`){let n=i(t);try{return await l(e,t)}catch(e){return n.debug(a(e)),[]}}async function l(e,t=`none`){let n=i(t),r=e.createReader(),a=[];async function o(){return new Promise((e,t)=>{r.readEntries(t=>{t.length>0?(a=a.concat(t),e(o())):e(a)},e=>{n.warn(`readEntries() error`,e),t(e)})})}return await o(),a}async function u(e,t,n,r,a=`none`,o=!0,s=4){let c=i(a);if(t.kind===`file`){let i=await t.getFile();if(!i)return;r(i)&&n.push({type:`file`,file:i,path:e.join(i.name)});return}if(t.kind!==`directory`)return;n.push({type:`dir`,path:e.join(t.name)});let l=e.join(t.name);try{let e=[],i=t.values();c.info(`🔍 Traversing directory: ${t.name} at path: ${l.toString()}`);for await(let t of i)t&&(e.push(t),c.verbose(` 📄 Found: ${t.name} (${t.kind})`));c.verbose(` 📊 Total children found: ${e.length}`);let{simpleParallelMap:d}=await import(`../parallel-map-DyuHvxYY.js`),f=Math.max(1,s);if(o&&f>1&&e.length>1)c.info(` ⚡ Processing ${e.length} items in parallel (custom implementation, concurrency=${f})`),await d(e,async e=>{(e.kind===`file`||e.kind===`directory`)&&await u(l,e,n,r,a,o,f)},f);else{c.info(` 📝 Processing ${e.length} item directly`);for(let t of e)(t.kind===`file`||t.kind===`directory`)&&await u(l,t,n,r,a,o,f)}}catch(e){c.warn(`Directory traversal warning for ${t.name}:`,e)}}const d=(e,...t)=>t.every(t=>t in e);async function f(e,t,n,r,i=`none`,a=!0,s=4){if(d(t,`filesystem`,`fullPath`,`isDirectory`,`isFile`)){await o(e,t,n,r,i,a,s);return}if(d(t,`kind`,`isSameEntry`)){await u(e,t,n,r,i,a,s);return}let c=t;r(c)&&n.push({type:`file`,file:c,path:e.join(c.name)})}const p=e=>!0;async function m(e,t=p){let r=`getAsFileSystemHandle`in DataTransferItem.prototype,i=`webkitGetAsEntry`in DataTransferItem.prototype;if(!r&&!i){let r=Array.from(e.dataTransfer.files);return r.length===0?[]:r.filter(t).map(e=>({type:`file`,file:e,path:n.from(e.name).toString()}))}let a=[],o=Array.prototype.slice.call(e.dataTransfer.items).filter(e=>e.kind===`file`).map(e=>i?e.webkitGetAsEntry():r?e.getAsFileSystemHandle():e.getAsFile()).filter(Boolean),{simpleParallelMap:s}=await import(`../parallel-map-DyuHvxYY.js`);if(o.length>1)await s(o,async e=>{let r=e;await f(n.EMPTY,r,a,t)},4);else for(let e of o){let r=e;await f(n.EMPTY,r,a,t)}return a.map(e=>({...e,path:e.path.toString()}))}var h=class extends Error{code;item;constructor(e,t,n){super(n||`File drop error: ${e}`),this.code=e,this.item=t,this.name=`FileDropError`}},g=class e{static normalize(e){return e.replace(/\/+/g,`/`).replace(/\/$/,``)||`/`}static join(...t){return e.normalize(t.filter(Boolean).join(`/`))}static dirname(t){let n=e.normalize(t),r=n.lastIndexOf(`/`);return r<=0?`/`:n.slice(0,r)}static basename(t,n){let r=e.normalize(t).split(`/`).pop()||``;return n&&r.endsWith(n)?r.slice(0,-n.length):r}static extname(t){let n=e.basename(t),r=n.lastIndexOf(`.`);return r>0?n.slice(r):``}static relative(t,n){let r=e.normalize(t).split(`/`).filter(Boolean),i=e.normalize(n).split(`/`).filter(Boolean),a=0;for(;a<r.length&&a<i.length&&r[a]===i[a];)a++;let o=r.length-a,s=i.slice(a);return[...Array(o).fill(`..`),...s].join(`/`)||`.`}};function _(e,t){if(t.length===0)return!0;let n=g.extname(e.name).toLowerCase();return t.some(e=>e.toLowerCase()===n||e.toLowerCase()===n.slice(1))}function v(e,t){return e.size<=t}function y(e){if(/[<>:"/\\|?*]/.test(e))return!1;for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=0&&n<=31)return!1}return e.trim().length>0}function b(e){return e.type?e.type:{".txt":`text/plain`,".js":`text/javascript`,".ts":`text/typescript`,".json":`application/json`,".html":`text/html`,".css":`text/css`,".md":`text/markdown`,".pdf":`application/pdf`,".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".gif":`image/gif`,".svg":`image/svg+xml`}[g.extname(e.name).toLowerCase()]||`application/octet-stream`}function x(e,t,n=t){let r=g.extname(e.name),i=b(e);return{type:`file`,name:e.name,path:g.normalize(t),pathSegments:t.split(`/`).filter(Boolean),relativePath:g.normalize(n),size:e.size,lastModified:new Date(e.lastModified),file:e,mimeType:i,extension:r}}function S(e){let t=[];function n(e){let r={type:e.type,name:e.name,path:e.path,pathSegments:e.path.split(`/`).filter(Boolean),relativePath:e.path,size:e.metadata?.size,lastModified:e.metadata?.lastModified};t.push(r),e.children&&e.children.forEach(n)}return n(e),t}function C(e,t){if(!t(e))return null;let n=e.children?.map(e=>C(e,t)).filter(e=>e!==null);return{...e,children:n}}function w(e,t){if(t(e))return e;if(e.children)for(let n of e.children){let e=w(n,t);if(e)return e}return null}function T(e){let t={name:``,type:`directory`,path:``,children:[]},n=/* @__PURE__ */ new Map;n.set(``,t);let r=[...e].sort((e,t)=>e.pathSegments.length-t.pathSegments.length);for(let e of r){let r={name:e.name,type:e.type,path:e.path,metadata:e.size===void 0?void 0:{size:e.size,lastModified:e.lastModified,extension:g.extname(e.name),mimeType:e.mimeType},file:e.file};n.set(e.path,r);let i=g.dirname(e.path),a=n.get(i);if(!a&&i!==`/`&&i!==``){let e=i.split(`/`).filter(Boolean);a={name:e[e.length-1]||``,type:`directory`,path:i,children:[]},n.set(i,a)}!a&&(i===``||i===`/`)&&(a=t),a&&(a.children||(a.children=[]),a.children.push(r))}return t}var E=class{options;fileCount=0;constructor(e={}){this.options=e}filter(e){if(this.options.excludeDirectories&&e.type===`directory`)return{accepted:!1};if(e.type===`file`){let t=e.file;if(this.options.maxFiles&&this.fileCount>=this.options.maxFiles)return{accepted:!1,error:new h(`TOO_MANY_FILES`,e,`Maximum ${this.options.maxFiles} files allowed`)};if(this.options.maxSize&&!v(t,this.options.maxSize))return{accepted:!1,error:new h(`FILE_TOO_LARGE`,e,`File size ${t.size} exceeds limit ${this.options.maxSize}`)};if(this.options.allowedExtensions&&!_(t,this.options.allowedExtensions))return{accepted:!1,error:new h(`INVALID_FILE_TYPE`,e,`File type not allowed: ${t.name}`)};this.fileCount++}return this.options.accept&&!this.options.accept(e)?{accepted:!1}:{accepted:!0}}get currentFileCount(){return this.fileCount}reset(){this.fileCount=0}};const D={imagesOnly:()=>({allowedExtensions:[`.jpg`,`.jpeg`,`.png`,`.gif`,`.svg`,`.webp`],excludeDirectories:!0}),textOnly:()=>({allowedExtensions:[`.txt`,`.md`,`.json`,`.js`,`.ts`,`.html`,`.css`],excludeDirectories:!0}),smallFilesOnly:()=>({maxSize:1048576,excludeDirectories:!0}),developmentFiles:()=>({allowedExtensions:[`.js`,`.ts`,`.tsx`,`.jsx`,`.json`,`.md`,`.html`,`.css`,`.scss`,`.py`,`.java`,`.cpp`,`.c`,`.h`,`.yml`,`.yaml`,`.toml`]})};var O=class{startTime;totalItems;processedItems=0;currentItem;onProgress;constructor(e,t){this.totalItems=e,this.startTime=Date.now(),this.onProgress=t?.onProgress}setCurrentItem(e){this.currentItem=e,this.notifyProgress()}completeItem(){this.processedItems++,this.currentItem=void 0,this.notifyProgress()}notifyProgress(){if(!this.onProgress)return;let e=Date.now()-this.startTime,t=this.totalItems>0?Math.round(this.processedItems/this.totalItems*100):0,n;if(this.processedItems>0&&t<100){let t=e/this.processedItems,r=this.totalItems-this.processedItems;n=Math.round(t*r)}let r={totalItems:this.totalItems,processedItems:this.processedItems,currentItem:this.currentItem,percentage:t,estimatedTimeLeft:n};this.onProgress(r)}updateTotalItems(e){this.totalItems=e,this.notifyProgress()}get isComplete(){return this.processedItems>=this.totalItems}get elapsedTime(){return Date.now()-this.startTime}};async function k(e){if(`dataTransfer`in e){let t=`getAsFileSystemHandle`in DataTransferItem.prototype,n=`webkitGetAsEntry`in DataTransferItem.prototype;if(!t&&!n)return Array.from(e.dataTransfer.files);let r=Array.from(e.dataTransfer.items).filter(e=>e.kind===`file`).map(e=>n?e.webkitGetAsEntry():t?e.getAsFileSystemHandle():e.getAsFile()).filter(Boolean);return(await Promise.all(r.map(e=>e&&e instanceof Promise?e:Promise.resolve(e)))).filter(Boolean)}return`length`in e?Array.from(e):Array.isArray(e)?e:null}async function A(e,t,r,a={},o,s=`warn`,c){let l=[],u=[],d=0,{simpleParallelMap:p}=await import(`../parallel-map-DyuHvxYY.js`),m=Math.max(1,c?.concurrency??4),g=c?.parallel??!0,_=i(s),v=async e=>{if(o?.aborted)throw new h(`UNKNOWN`,void 0,`Operation aborted`);try{await f(n.EMPTY,e,l,e=>{d++,r.updateTotalItems(d);let n=x(e,e.name);r.setCurrentItem(n);let i=t.filter(n);return i.error&&(u.push(i.error),a.onError?.(i.error,n)),i.accepted||r.completeItem(),i.accepted},s,g,m)}catch(e){let t=e instanceof h?e:new h(`UNKNOWN`,void 0,String(e));u.push(t),a.onError?.(t)}};if(g&&m>1&&e.length>1)_.info(`🚀 Processing ${e.length} handles in parallel (custom implementation, concurrency=${m})`),await p(e,v,m);else{_.info(`📝 Processing ${e.length} handle directly`);for(let t of e)await v(t)}let y=[],b=[];r.updateTotalItems(d),_.info(`🔄 Processing ${l.length} total items from traversal`);for(let e of l)if(e.type===`file`){let t=x(e.file,e.path.toString(),e.path.toString());y.push(t),a.onFile?.(t),r.completeItem(),_.verbose(` ✅ File: ${e.path.toString()}`)}else{let t={type:`directory`,name:e.path.lastSegment(),path:e.path.toString(),pathSegments:e.path.segments,relativePath:e.path.toString()};b.push(t),_.verbose(` 📁 Directory: ${e.path.toString()}`)}return _.info(`📊 Final results: ${y.length} files, ${b.length} directories`),{items:y,directories:b,errors:u}}async function j(e,t={}){let n=Date.now(),r=N(t.debug);try{if(t.signal?.aborted)throw new h(`UNKNOWN`,void 0,`Operation aborted`);let i=await k(e);if(!i)throw new h(`UNSUPPORTED_API`,void 0,`Unsupported file drop source`);let a=i.length,o=new O(a,t.callbacks),s=new E(t.filter);if(i.length>0&&i[0]instanceof File){let e=i,r=[],a=[];for(let n of e){if(t.signal?.aborted)throw new h(`UNKNOWN`,void 0,`Operation aborted`);let e=x(n,n.name);o.setCurrentItem(e);let i=s.filter(e);i.accepted?(r.push(e),t.callbacks?.onFile?.(e)):i.error&&(a.push(i.error),t.callbacks?.onError?.(i.error,e)),o.completeItem()}return{files:r,directories:[],tree:T(r),metadata:{totalFiles:r.length,totalDirectories:0,totalSize:r.reduce((e,t)=>e+(t.size||0),0),processingTime:Date.now()-n},errors:a}}let{items:c,directories:l,errors:u}=await A(i,s,o,t.callbacks,t.signal,r,t.processing);return{files:c,directories:l,tree:T([...c,...l]),metadata:{totalFiles:c.length,totalDirectories:l.length,totalSize:c.reduce((e,t)=>e+(t.size||0),0),processingTime:Date.now()-n},errors:u}}catch(e){throw e instanceof h?e:new h(`UNKNOWN`,void 0,String(e))}}async function M(e,t={}){try{return await j(e,t)}catch(e){return{success:!1,error:e instanceof h?e:new h(`UNKNOWN`,void 0,String(e))}}}function N(e){return e===!0?`verbose`:e===!1?`none`:e===void 0?`warn`:e}export{h as FileDropError,g as FilePathUtils,D as FilterPresets,n as PathHolder,t as PathUtils,T as buildFileTree,C as filterTree,w as findInTree,S as flattenTree,m as handleFileTreeDropEvent,y as isValidFileName,v as isValidFileSize,_ as isValidFileType,j as processFileTreeDrop,M as processFileTreeDropSafe};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{PathHolder as e,PathUtils as t}from"./internal/path-util.js";import{handleFileTreeDropEvent as n}from"./handle-file-tree-drop.js";import{FileDropError as r}from"./types.js";import{FilePathUtils as i,buildFileTree as a,filterTree as o,findInTree as s,flattenTree as c,isValidFileName as l,isValidFileSize as u,isValidFileType as d}from"./utils/file-utils.js";import{FilterPresets as f}from"./utils/filter.js";import{processFileTreeDrop as p,processFileTreeDropSafe as m}from"./process-file-drop.js";export{r as FileDropError,i as FilePathUtils,f as FilterPresets,e as PathHolder,t as PathUtils,a as buildFileTree,o as filterTree,s as findInTree,c as flattenTree,n as handleFileTreeDropEvent,l as isValidFileName,u as isValidFileSize,d as isValidFileType,p as processFileTreeDrop,m as processFileTreeDropSafe};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=()=>{};function t(t=`warn`){let n=t!==`none`,r=t===`info`||t===`verbose`,i=t===`verbose`;return{info:r?(...e)=>console.log(...e):e,verbose:i?(...e)=>console.log(...e):e,debug:i?(...e)=>console.debug(...e):e,warn:n?(...e)=>console.warn(...e):e,error:r?(...e)=>console.error(...e):e}}exports.createFileDropLogger=t;
|
|
2
|
+
//# sourceMappingURL=debug-logger.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-logger.cjs","names":["noop","createFileDropLogger","isWarnEnabled","debugLevel","isInfoEnabled","isVerboseEnabled","args"],"sources":["../../../src/file-drop/internal/debug-logger.ts"],"sourcesContent":["import type { DebugLevel } from '../types.js';\n\n/**\n * file-drop 런타임 로그 정책을 레벨별 no-op 함수로 정규화한다.\n */\ntype LogArguments = readonly unknown[];\n\n/**\n * file-drop 내부 디버그 로그 출력 정책을 한곳에서 관리한다.\n */\nexport interface FileDropDebugLogger {\n /** 주요 처리 단계 로그 */\n info: (...args: LogArguments) => void;\n\n /** 항목 단위 상세 로그 */\n verbose: (...args: LogArguments) => void;\n\n /** 디버깅용 상세 진단 로그 */\n debug: (...args: LogArguments) => void;\n\n /** 비치명 경고 로그 */\n warn: (...args: LogArguments) => void;\n\n /** 실패 원인 확인용 오류 로그 */\n error: (...args: LogArguments) => void;\n}\n\nconst noop = () => {};\n\n/**\n * debug 레벨에 맞는 logger를 생성한다.\n *\n * 기본값인 `warn`에서는 경고 로그만 출력한다.\n */\nexport function createFileDropLogger(debugLevel: DebugLevel = 'warn'): FileDropDebugLogger {\n const isWarnEnabled = debugLevel !== 'none';\n const isInfoEnabled = debugLevel === 'info' || debugLevel === 'verbose';\n const isVerboseEnabled = debugLevel === 'verbose';\n\n return {\n info: isInfoEnabled ? (...args) => console.log(...args) : noop,\n verbose: isVerboseEnabled ? (...args) => console.log(...args) : noop,\n debug: isVerboseEnabled ? (...args) => console.debug(...args) : noop,\n warn: isWarnEnabled ? (...args) => console.warn(...args) : noop,\n error: isInfoEnabled ? (...args) => console.error(...args) : noop,\n };\n}\n"],"mappings":"AA2BA,MAAMA,MAAa,CAAC,EAOpB,SAAgBC,EAAqB,EAAyB,OAA6B,CACzF,IAAMC,EAAgBC,IAAe,OAC/BC,EAAgBD,IAAe,QAAUA,IAAe,UACxDE,EAAmBF,IAAe,UAExC,MAAO,CACL,KAAMC,GAAiB,GAAGE,IAAS,QAAQ,IAAI,GAAGA,CAAI,EAAIN,EAC1D,QAASK,GAAoB,GAAGC,IAAS,QAAQ,IAAI,GAAGA,CAAI,EAAIN,EAChE,MAAOK,GAAoB,GAAGC,IAAS,QAAQ,MAAM,GAAGA,CAAI,EAAIN,EAChE,KAAME,GAAiB,GAAGI,IAAS,QAAQ,KAAK,GAAGA,CAAI,EAAIN,EAC3D,MAAOI,GAAiB,GAAGE,IAAS,QAAQ,MAAM,GAAGA,CAAI,EAAIN,CAC/D,CACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=()=>{};function t(t=`warn`){let n=t!==`none`,r=t===`info`||t===`verbose`,i=t===`verbose`;return{info:r?(...e)=>console.log(...e):e,verbose:i?(...e)=>console.log(...e):e,debug:i?(...e)=>console.debug(...e):e,warn:n?(...e)=>console.warn(...e):e,error:r?(...e)=>console.error(...e):e}}export{t as createFileDropLogger};
|
|
2
|
+
//# sourceMappingURL=debug-logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-logger.js","names":["noop","createFileDropLogger","isWarnEnabled","debugLevel","isInfoEnabled","isVerboseEnabled","args"],"sources":["../../../src/file-drop/internal/debug-logger.ts"],"sourcesContent":["import type { DebugLevel } from '../types.js';\n\n/**\n * file-drop 런타임 로그 정책을 레벨별 no-op 함수로 정규화한다.\n */\ntype LogArguments = readonly unknown[];\n\n/**\n * file-drop 내부 디버그 로그 출력 정책을 한곳에서 관리한다.\n */\nexport interface FileDropDebugLogger {\n /** 주요 처리 단계 로그 */\n info: (...args: LogArguments) => void;\n\n /** 항목 단위 상세 로그 */\n verbose: (...args: LogArguments) => void;\n\n /** 디버깅용 상세 진단 로그 */\n debug: (...args: LogArguments) => void;\n\n /** 비치명 경고 로그 */\n warn: (...args: LogArguments) => void;\n\n /** 실패 원인 확인용 오류 로그 */\n error: (...args: LogArguments) => void;\n}\n\nconst noop = () => {};\n\n/**\n * debug 레벨에 맞는 logger를 생성한다.\n *\n * 기본값인 `warn`에서는 경고 로그만 출력한다.\n */\nexport function createFileDropLogger(debugLevel: DebugLevel = 'warn'): FileDropDebugLogger {\n const isWarnEnabled = debugLevel !== 'none';\n const isInfoEnabled = debugLevel === 'info' || debugLevel === 'verbose';\n const isVerboseEnabled = debugLevel === 'verbose';\n\n return {\n info: isInfoEnabled ? (...args) => console.log(...args) : noop,\n verbose: isVerboseEnabled ? (...args) => console.log(...args) : noop,\n debug: isVerboseEnabled ? (...args) => console.debug(...args) : noop,\n warn: isWarnEnabled ? (...args) => console.warn(...args) : noop,\n error: isInfoEnabled ? (...args) => console.error(...args) : noop,\n };\n}\n"],"mappings":"AA2BA,MAAMA,MAAa,CAAC,EAOpB,SAAgBC,EAAqB,EAAyB,OAA6B,CACzF,IAAMC,EAAgBC,IAAe,OAC/BC,EAAgBD,IAAe,QAAUA,IAAe,UACxDE,EAAmBF,IAAe,UAExC,MAAO,CACL,KAAMC,GAAiB,GAAGE,IAAS,QAAQ,IAAI,GAAGA,CAAI,EAAIN,EAC1D,QAASK,GAAoB,GAAGC,IAAS,QAAQ,IAAI,GAAGA,CAAI,EAAIN,EAChE,MAAOK,GAAoB,GAAGC,IAAS,QAAQ,MAAM,GAAGA,CAAI,EAAIN,EAChE,KAAME,GAAiB,GAAGI,IAAS,QAAQ,KAAK,GAAGA,CAAI,EAAIN,EAC3D,MAAOI,GAAiB,GAAGE,IAAS,QAAQ,MAAM,GAAGA,CAAI,EAAIN,CAC/D,CACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(...e){return e.filter(e=>e&&e.length>0&&e!==`.`).flatMap(e=>e.split(`/`)).filter(e=>e.length>0&&e!==`.`)}var t=class t{static join(...e){return t.split(...e).join(`/`)}static split=(...t)=>{let n=[];return t.forEach(t=>{Array.isArray(t)?t.forEach(t=>{typeof t==`string`&&t.length>0&&n.push(...e(t))}):typeof t==`string`&&t.length>0&&n.push(...e(t))}),n.filter(e=>typeof e==`string`&&e.length>0&&e!==`.`)};static pathStartsWith(e,n){return t.segmentsStartsWith(t.split(e),t.split(n))}static segmentsStartsWith(e,t){let n=e,r=t;return r.length>n.length?!1:r.every((e,t)=>e===n[t])}},n=class e{segments;path;constructor(e){this.segments=Array.isArray(e)?e:t.split(e),this.path=this.segments.join(`/`)}static EMPTY=new e([]);static from=(...n)=>new e(t.split(...n));join=(...n)=>{let r=t.split(...this.segments,...n);return new e(r)};changeLast=t=>{if(this.segments.length===0)return new e(t);let n=this.segments.slice();return n[n.length-1]=t,new e(n)};parentOrNull=()=>{if(this.segments.length===0)return null;let t=this.segments.slice(0,this.segments.length-1);return new e(t)};lastSegmentOrNull=()=>this.segments.length===0?null:this.segments[this.segments.length-1];lastSegment=()=>this.segments.length===0?``:this.segments[this.segments.length-1];startsWith=e=>typeof e==`string`?t.segmentsStartsWith(this.segments,t.split(e)):Array.isArray(e)?t.segmentsStartsWith(this.segments,e):t.segmentsStartsWith(this.segments,e.segments);toString(){return this.path}};exports.PathHolder=n,exports.PathUtils=t;
|
|
2
|
+
//# sourceMappingURL=path-util.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-util.cjs","names":["split_","args","it","PathUtils","arr","item","p1","p2","arr1","arr2","nm","i","PathHolder","path","segments","fileName","otherPath"],"sources":["../../../src/file-drop/internal/path-util.ts"],"sourcesContent":["function split_(...args: (string | undefined | null)[]): string[] {\n return args\n .filter((it) => it && it.length > 0 && it !== '.')\n .flatMap((it) => it!.split('/'))\n .filter((it) => it.length > 0 && it !== '.');\n}\n\n/**\n * Path utils\n * not support relative path\n */\nexport class PathUtils {\n static join(...args: (string[] | string | undefined | null)[]): string {\n return PathUtils.split(...args).join('/');\n }\n\n static split = (...args: (string[] | string | undefined | null)[]): string[] => {\n const arr = [] as string[];\n args.forEach((item) => {\n if (Array.isArray(item)) {\n item.forEach((it) => {\n if (typeof it === 'string' && it.length > 0) {\n arr.push(...split_(it));\n }\n });\n } else if (typeof item === 'string' && item.length > 0) {\n arr.push(...split_(item));\n }\n });\n\n return arr.filter((it) => typeof it === 'string' && it.length > 0 && it !== '.');\n };\n\n /**\n * check startsWith for path segments\n * pathStartsWith('a/b/c','a/b') = true\n * pathStartsWith('/a/b/c','a/b') = true\n * pathStartsWith('/a/b/c','/a/b') = true\n * pathStartsWith('/a/b/c','/a/b/') = true\n * pathStartsWith('/a//b//c//','//a//b//') = true\n */\n static pathStartsWith(p1: string, p2: string): boolean {\n return PathUtils.segmentsStartsWith(PathUtils.split(p1), PathUtils.split(p2));\n }\n\n /**\n * check startsWith for path segments\n * segmentsStartsWith([1,2,3], [1,2]) = true\n */\n static segmentsStartsWith(p1: string[], p2: string[]): boolean {\n const arr1 = p1;\n const arr2 = p2;\n if (arr2.length > arr1.length) return false;\n return arr2.every((nm, i) => nm === arr1[i]);\n }\n}\n\nexport class PathHolder {\n readonly segments: string[];\n\n readonly path: string;\n\n constructor(path: string | string[]) {\n if (Array.isArray(path)) {\n this.segments = path;\n } else {\n this.segments = PathUtils.split(path);\n }\n this.path = this.segments.join('/');\n }\n\n static EMPTY = new PathHolder([]);\n\n static from = (...args: (string[] | string | undefined | null)[]): PathHolder => {\n return new PathHolder(PathUtils.split(...args));\n };\n\n join = (...args: (string[] | string | undefined | null)[]): PathHolder => {\n const segments = PathUtils.split(...this.segments, ...args);\n return new PathHolder(segments);\n };\n\n changeLast = (fileName: string): PathHolder => {\n if (this.segments.length === 0) {\n return new PathHolder(fileName);\n }\n const segments = this.segments.slice();\n segments[segments.length - 1] = fileName;\n return new PathHolder(segments);\n };\n\n parentOrNull = (): PathHolder | null => {\n if (this.segments.length === 0) {\n return null;\n }\n const segments = this.segments.slice(0, this.segments.length - 1);\n return new PathHolder(segments);\n };\n\n lastSegmentOrNull = (): string | null => {\n if (this.segments.length === 0) {\n return null;\n }\n return this.segments[this.segments.length - 1]!;\n };\n\n lastSegment = (): string => {\n if (this.segments.length === 0) {\n return '';\n }\n return this.segments[this.segments.length - 1]!;\n };\n\n startsWith = (otherPath: string | string[] | PathHolder): boolean => {\n if (typeof otherPath === 'string') {\n return PathUtils.segmentsStartsWith(this.segments, PathUtils.split(otherPath));\n } else if (Array.isArray(otherPath)) {\n return PathUtils.segmentsStartsWith(this.segments, otherPath);\n }\n return PathUtils.segmentsStartsWith(this.segments, otherPath.segments);\n };\n\n toString() {\n return this.path;\n }\n}\n"],"mappings":"AAAA,SAASA,EAAO,GAAGC,EAA+C,CAChE,OAAOA,EACJ,OAAQ,GAAOC,GAAMA,EAAG,OAAS,GAAKA,IAAO,GAAG,CAAC,CACjD,QAAS,GAAOA,EAAI,MAAM,GAAG,CAAC,CAAC,CAC/B,OAAQ,GAAOA,EAAG,OAAS,GAAKA,IAAO,GAAG,CAC/C,CAMA,IAAaC,EAAb,MAAaA,CAAU,CACrB,OAAO,KAAK,GAAGF,EAAwD,CACrE,OAAOE,EAAU,MAAM,GAAGF,CAAI,CAAC,CAAC,KAAK,GAAG,CAC1C,CAEA,OAAO,OAAS,GAAGA,IAA6D,CAC9E,IAAMG,EAAM,CAAC,EAab,OAZAH,EAAK,QAAS,GAAS,CACjB,MAAM,QAAQI,CAAI,EACpBA,EAAK,QAAS,GAAO,CACf,OAAOH,GAAO,UAAYA,EAAG,OAAS,GACxCE,EAAI,KAAK,GAAGJ,EAAOE,CAAE,CAAC,CAE1B,CAAC,EACQ,OAAOG,GAAS,UAAYA,EAAK,OAAS,GACnDD,EAAI,KAAK,GAAGJ,EAAOK,CAAI,CAAC,CAE5B,CAAC,EAEMD,EAAI,OAAQ,GAAO,OAAOF,GAAO,UAAYA,EAAG,OAAS,GAAKA,IAAO,GAAG,CACjF,EAUA,OAAO,eAAe,EAAY,EAAqB,CACrD,OAAOC,EAAU,mBAAmBA,EAAU,MAAMG,CAAE,EAAGH,EAAU,MAAMI,CAAE,CAAC,CAC9E,CAMA,OAAO,mBAAmB,EAAc,EAAuB,CAC7D,IAAMC,EAAOF,EACPG,EAAOF,EAEb,OADIE,EAAK,OAASD,EAAK,OAAe,GAC/BC,EAAK,OAAO,EAAI,IAAMC,IAAOF,EAAKG,EAAE,CAC7C,CACF,EAEaC,EAAb,MAAaA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ts
|
|
2
|
+
/**
|
|
3
|
+
* Path utils
|
|
4
|
+
* not support relative path
|
|
5
|
+
*/
|
|
6
|
+
export declare class PathUtils {
|
|
7
|
+
static join(...args: (string[] | string | undefined | null)[]): string;
|
|
8
|
+
static split: (...args: (string[] | string | undefined | null)[]) => string[];
|
|
9
|
+
/**
|
|
10
|
+
* check startsWith for path segments
|
|
11
|
+
* pathStartsWith('a/b/c','a/b') = true
|
|
12
|
+
* pathStartsWith('/a/b/c','a/b') = true
|
|
13
|
+
* pathStartsWith('/a/b/c','/a/b') = true
|
|
14
|
+
* pathStartsWith('/a/b/c','/a/b/') = true
|
|
15
|
+
* pathStartsWith('/a//b//c//','//a//b//') = true
|
|
16
|
+
*/
|
|
17
|
+
static pathStartsWith(p1: string, p2: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* check startsWith for path segments
|
|
20
|
+
* segmentsStartsWith([1,2,3], [1,2]) = true
|
|
21
|
+
*/
|
|
22
|
+
static segmentsStartsWith(p1: string[], p2: string[]): boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare class PathHolder {
|
|
25
|
+
readonly segments: string[];
|
|
26
|
+
readonly path: string;
|
|
27
|
+
constructor(path: string | string[]);
|
|
28
|
+
static EMPTY: PathHolder;
|
|
29
|
+
static from: (...args: (string[] | string | undefined | null)[]) => PathHolder;
|
|
30
|
+
join: (...args: (string[] | string | undefined | null)[]) => PathHolder;
|
|
31
|
+
changeLast: (fileName: string) => PathHolder;
|
|
32
|
+
parentOrNull: () => PathHolder | null;
|
|
33
|
+
lastSegmentOrNull: () => string | null;
|
|
34
|
+
lastSegment: () => string;
|
|
35
|
+
startsWith: (otherPath: string | string[] | PathHolder) => boolean;
|
|
36
|
+
toString(): string;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//# sourceMappingURL=path-util.d.cts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//#region src/file-drop/internal/path-util.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Path utils
|
|
4
|
+
* not support relative path
|
|
5
|
+
*/
|
|
6
|
+
export declare class PathUtils {
|
|
7
|
+
static join(...args: (string[] | string | undefined | null)[]): string;
|
|
8
|
+
static split: (...args: (string[] | string | undefined | null)[]) => string[];
|
|
9
|
+
/**
|
|
10
|
+
* check startsWith for path segments
|
|
11
|
+
* pathStartsWith('a/b/c','a/b') = true
|
|
12
|
+
* pathStartsWith('/a/b/c','a/b') = true
|
|
13
|
+
* pathStartsWith('/a/b/c','/a/b') = true
|
|
14
|
+
* pathStartsWith('/a/b/c','/a/b/') = true
|
|
15
|
+
* pathStartsWith('/a//b//c//','//a//b//') = true
|
|
16
|
+
*/
|
|
17
|
+
static pathStartsWith(p1: string, p2: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* check startsWith for path segments
|
|
20
|
+
* segmentsStartsWith([1,2,3], [1,2]) = true
|
|
21
|
+
*/
|
|
22
|
+
static segmentsStartsWith(p1: string[], p2: string[]): boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare class PathHolder {
|
|
25
|
+
readonly segments: string[];
|
|
26
|
+
readonly path: string;
|
|
27
|
+
constructor(path: string | string[]);
|
|
28
|
+
static EMPTY: PathHolder;
|
|
29
|
+
static from: (...args: (string[] | string | undefined | null)[]) => PathHolder;
|
|
30
|
+
join: (...args: (string[] | string | undefined | null)[]) => PathHolder;
|
|
31
|
+
changeLast: (fileName: string) => PathHolder;
|
|
32
|
+
parentOrNull: () => PathHolder | null;
|
|
33
|
+
lastSegmentOrNull: () => string | null;
|
|
34
|
+
lastSegment: () => string;
|
|
35
|
+
startsWith: (otherPath: string | string[] | PathHolder) => boolean;
|
|
36
|
+
toString(): string;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//# sourceMappingURL=path-util.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(...e){return e.filter(e=>e&&e.length>0&&e!==`.`).flatMap(e=>e.split(`/`)).filter(e=>e.length>0&&e!==`.`)}var t=class t{static join(...e){return t.split(...e).join(`/`)}static split=(...t)=>{let n=[];return t.forEach(t=>{Array.isArray(t)?t.forEach(t=>{typeof t==`string`&&t.length>0&&n.push(...e(t))}):typeof t==`string`&&t.length>0&&n.push(...e(t))}),n.filter(e=>typeof e==`string`&&e.length>0&&e!==`.`)};static pathStartsWith(e,n){return t.segmentsStartsWith(t.split(e),t.split(n))}static segmentsStartsWith(e,t){let n=e,r=t;return r.length>n.length?!1:r.every((e,t)=>e===n[t])}},n=class e{segments;path;constructor(e){this.segments=Array.isArray(e)?e:t.split(e),this.path=this.segments.join(`/`)}static EMPTY=new e([]);static from=(...n)=>new e(t.split(...n));join=(...n)=>{let r=t.split(...this.segments,...n);return new e(r)};changeLast=t=>{if(this.segments.length===0)return new e(t);let n=this.segments.slice();return n[n.length-1]=t,new e(n)};parentOrNull=()=>{if(this.segments.length===0)return null;let t=this.segments.slice(0,this.segments.length-1);return new e(t)};lastSegmentOrNull=()=>this.segments.length===0?null:this.segments[this.segments.length-1];lastSegment=()=>this.segments.length===0?``:this.segments[this.segments.length-1];startsWith=e=>typeof e==`string`?t.segmentsStartsWith(this.segments,t.split(e)):Array.isArray(e)?t.segmentsStartsWith(this.segments,e):t.segmentsStartsWith(this.segments,e.segments);toString(){return this.path}};export{n as PathHolder,t as PathUtils};
|
|
2
|
+
//# sourceMappingURL=path-util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-util.js","names":["split_","args","it","PathUtils","arr","item","p1","p2","arr1","arr2","nm","i","PathHolder","path","segments","fileName","otherPath"],"sources":["../../../src/file-drop/internal/path-util.ts"],"sourcesContent":["function split_(...args: (string | undefined | null)[]): string[] {\n return args\n .filter((it) => it && it.length > 0 && it !== '.')\n .flatMap((it) => it!.split('/'))\n .filter((it) => it.length > 0 && it !== '.');\n}\n\n/**\n * Path utils\n * not support relative path\n */\nexport class PathUtils {\n static join(...args: (string[] | string | undefined | null)[]): string {\n return PathUtils.split(...args).join('/');\n }\n\n static split = (...args: (string[] | string | undefined | null)[]): string[] => {\n const arr = [] as string[];\n args.forEach((item) => {\n if (Array.isArray(item)) {\n item.forEach((it) => {\n if (typeof it === 'string' && it.length > 0) {\n arr.push(...split_(it));\n }\n });\n } else if (typeof item === 'string' && item.length > 0) {\n arr.push(...split_(item));\n }\n });\n\n return arr.filter((it) => typeof it === 'string' && it.length > 0 && it !== '.');\n };\n\n /**\n * check startsWith for path segments\n * pathStartsWith('a/b/c','a/b') = true\n * pathStartsWith('/a/b/c','a/b') = true\n * pathStartsWith('/a/b/c','/a/b') = true\n * pathStartsWith('/a/b/c','/a/b/') = true\n * pathStartsWith('/a//b//c//','//a//b//') = true\n */\n static pathStartsWith(p1: string, p2: string): boolean {\n return PathUtils.segmentsStartsWith(PathUtils.split(p1), PathUtils.split(p2));\n }\n\n /**\n * check startsWith for path segments\n * segmentsStartsWith([1,2,3], [1,2]) = true\n */\n static segmentsStartsWith(p1: string[], p2: string[]): boolean {\n const arr1 = p1;\n const arr2 = p2;\n if (arr2.length > arr1.length) return false;\n return arr2.every((nm, i) => nm === arr1[i]);\n }\n}\n\nexport class PathHolder {\n readonly segments: string[];\n\n readonly path: string;\n\n constructor(path: string | string[]) {\n if (Array.isArray(path)) {\n this.segments = path;\n } else {\n this.segments = PathUtils.split(path);\n }\n this.path = this.segments.join('/');\n }\n\n static EMPTY = new PathHolder([]);\n\n static from = (...args: (string[] | string | undefined | null)[]): PathHolder => {\n return new PathHolder(PathUtils.split(...args));\n };\n\n join = (...args: (string[] | string | undefined | null)[]): PathHolder => {\n const segments = PathUtils.split(...this.segments, ...args);\n return new PathHolder(segments);\n };\n\n changeLast = (fileName: string): PathHolder => {\n if (this.segments.length === 0) {\n return new PathHolder(fileName);\n }\n const segments = this.segments.slice();\n segments[segments.length - 1] = fileName;\n return new PathHolder(segments);\n };\n\n parentOrNull = (): PathHolder | null => {\n if (this.segments.length === 0) {\n return null;\n }\n const segments = this.segments.slice(0, this.segments.length - 1);\n return new PathHolder(segments);\n };\n\n lastSegmentOrNull = (): string | null => {\n if (this.segments.length === 0) {\n return null;\n }\n return this.segments[this.segments.length - 1]!;\n };\n\n lastSegment = (): string => {\n if (this.segments.length === 0) {\n return '';\n }\n return this.segments[this.segments.length - 1]!;\n };\n\n startsWith = (otherPath: string | string[] | PathHolder): boolean => {\n if (typeof otherPath === 'string') {\n return PathUtils.segmentsStartsWith(this.segments, PathUtils.split(otherPath));\n } else if (Array.isArray(otherPath)) {\n return PathUtils.segmentsStartsWith(this.segments, otherPath);\n }\n return PathUtils.segmentsStartsWith(this.segments, otherPath.segments);\n };\n\n toString() {\n return this.path;\n }\n}\n"],"mappings":"AAAA,SAASA,EAAO,GAAGC,EAA+C,CAChE,OAAOA,EACJ,OAAQ,GAAOC,GAAMA,EAAG,OAAS,GAAKA,IAAO,GAAG,CAAC,CACjD,QAAS,GAAOA,EAAI,MAAM,GAAG,CAAC,CAAC,CAC/B,OAAQ,GAAOA,EAAG,OAAS,GAAKA,IAAO,GAAG,CAC/C,CAMA,IAAaC,EAAb,MAAaA,CAAU,CACrB,OAAO,KAAK,GAAGF,EAAwD,CACrE,OAAOE,EAAU,MAAM,GAAGF,CAAI,CAAC,CAAC,KAAK,GAAG,CAC1C,CAEA,OAAO,OAAS,GAAGA,IAA6D,CAC9E,IAAMG,EAAM,CAAC,EAab,OAZAH,EAAK,QAAS,GAAS,CACjB,MAAM,QAAQI,CAAI,EACpBA,EAAK,QAAS,GAAO,CACf,OAAOH,GAAO,UAAYA,EAAG,OAAS,GACxCE,EAAI,KAAK,GAAGJ,EAAOE,CAAE,CAAC,CAE1B,CAAC,EACQ,OAAOG,GAAS,UAAYA,EAAK,OAAS,GACnDD,EAAI,KAAK,GAAGJ,EAAOK,CAAI,CAAC,CAE5B,CAAC,EAEMD,EAAI,OAAQ,GAAO,OAAOF,GAAO,UAAYA,EAAG,OAAS,GAAKA,IAAO,GAAG,CACjF,EAUA,OAAO,eAAe,EAAY,EAAqB,CACr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b,EAAU,mBAAmB,KAAK,SAAUA,EAAU,MAAMa,CAAS,CAAC,EACpE,MAAM,QAAQA,CAAS,EACzBb,EAAU,mBAAmB,KAAK,SAAUa,CAAS,EAEvDb,EAAU,mBAAmB,KAAK,SAAUa,EAAU,QAAQ,EAGvE,UAAW,CACT,OAAO,KAAK,IACd,CACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("./visit-file-system/visit-file-system-entry.cjs"),t=require("./visit-file-system/visit-file-system-handle.cjs"),n=(e,...t)=>t.every(t=>t in e);async function r(r,i,a,o,s=`none`,c=!0,l=4){if(n(i,`filesystem`,`fullPath`,`isDirectory`,`isFile`)){await e.visitByFileSystemEntry(r,i,a,o,s,c,l);return}if(n(i,`kind`,`isSameEntry`)){await t.visitByFileSystemHandle(r,i,a,o,s,c,l);return}let u=i;o(u)&&a.push({type:`file`,file:u,path:r.join(u.name)})}exports.traverseTree=r;
|
|
2
|
+
//# sourceMappingURL=traverse-tree.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traverse-tree.cjs","names":["visitByFileSystemEntry","visitByFileSystemHandle","require_visit_file_system_entry","require_visit_file_system_handle","hasProps","keys","it","target","traverseTree","handle","parent","output","callbackAccept","debugLevel","parallel","concurrency","file"],"sources":["../../../src/file-drop/internal/traverse-tree.ts"],"sourcesContent":["import type { DebugLevel } from '../types.js';\nimport type { PathHolder } from './path-util.js';\nimport type { PathAndEntry } from './visit-file-system/internal-types.js';\nimport { visitByFileSystemEntry } from './visit-file-system/visit-file-system-entry.js';\nimport { visitByFileSystemHandle } from './visit-file-system/visit-file-system-handle.js';\n\nconst hasProps = (target: object, ...keys: string[]): boolean => {\n return keys.every((it) => it in target);\n};\n\nexport async function traverseTree(\n parent: PathHolder,\n handle: FileSystemHandle | FileSystemEntry | File,\n output: PathAndEntry[],\n callbackAccept: (file: File) => boolean,\n debugLevel: DebugLevel = 'none',\n parallel = true,\n concurrency = 4,\n) {\n if (hasProps(handle, 'filesystem', 'fullPath', 'isDirectory', 'isFile')) {\n await visitByFileSystemEntry(\n parent,\n handle as FileSystemEntry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n concurrency,\n );\n return;\n }\n\n if (hasProps(handle, 'kind', 'isSameEntry')) {\n await visitByFileSystemHandle(\n parent,\n handle as FileSystemHandle,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n concurrency,\n );\n return;\n }\n\n // file은 디렉토리인지 알 수 없음\n const file = handle as File;\n if (callbackAccept(file)) {\n output.push({\n type: 'file',\n file,\n path: parent.join(file.name),\n });\n }\n}\n"],"mappings":"iIAMMI,GAAY,EAAgB,GAAGC,IAC5BA,EAAK,MAAO,GAAOC,KAAMC,CAAM,EAGxC,eAAsBC,EACpB,EACA,EACA,EACA,EACA,EAAyB,OACzB,EAAW,GACX,EAAc,EACd,CACA,GAAIJ,EAASK,EAAQ,aAAc,WAAY,cAAe,QAAQ,EAAG,CACvE,MAAMT,EAAAA,uBACJU,EACAD,EACAE,EACAC,EACAC,EACAC,EACAC,CACF,EACA,MACF,CAEA,GAAIX,EAASK,EAAQ,OAAQ,aAAa,EAAG,CAC3C,MAAMR,EAAAA,wBACJS,EACAD,EACAE,EACAC,EACAC,EACAC,EACAC,CACF,EACA,MACF,CAGA,IAAMC,EAAOP,EACTG,EAAeI,CAAI,GACrBL,EAAO,KAAK,CACV,KAAM,OACN,OACA,KAAMD,EAAO,KAAKM,EAAK,IAAI,CAC7B,CAAC,CAEL"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{visitByFileSystemEntry as e}from"./visit-file-system/visit-file-system-entry.js";import{visitByFileSystemHandle as t}from"./visit-file-system/visit-file-system-handle.js";const n=(e,...t)=>t.every(t=>t in e);async function r(r,i,a,o,s=`none`,c=!0,l=4){if(n(i,`filesystem`,`fullPath`,`isDirectory`,`isFile`)){await e(r,i,a,o,s,c,l);return}if(n(i,`kind`,`isSameEntry`)){await t(r,i,a,o,s,c,l);return}let u=i;o(u)&&a.push({type:`file`,file:u,path:r.join(u.name)})}export{r as traverseTree};
|
|
2
|
+
//# sourceMappingURL=traverse-tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traverse-tree.js","names":["hasProps","keys","it","target","traverseTree","handle","visitByFileSystemEntry","parent","output","callbackAccept","debugLevel","parallel","concurrency","visitByFileSystemHandle","file"],"sources":["../../../src/file-drop/internal/traverse-tree.ts"],"sourcesContent":["import type { DebugLevel } from '../types.js';\nimport type { PathHolder } from './path-util.js';\nimport type { PathAndEntry } from './visit-file-system/internal-types.js';\nimport { visitByFileSystemEntry } from './visit-file-system/visit-file-system-entry.js';\nimport { visitByFileSystemHandle } from './visit-file-system/visit-file-system-handle.js';\n\nconst hasProps = (target: object, ...keys: string[]): boolean => {\n return keys.every((it) => it in target);\n};\n\nexport async function traverseTree(\n parent: PathHolder,\n handle: FileSystemHandle | FileSystemEntry | File,\n output: PathAndEntry[],\n callbackAccept: (file: File) => boolean,\n debugLevel: DebugLevel = 'none',\n parallel = true,\n concurrency = 4,\n) {\n if (hasProps(handle, 'filesystem', 'fullPath', 'isDirectory', 'isFile')) {\n await visitByFileSystemEntry(\n parent,\n handle as FileSystemEntry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n concurrency,\n );\n return;\n }\n\n if (hasProps(handle, 'kind', 'isSameEntry')) {\n await visitByFileSystemHandle(\n parent,\n handle as FileSystemHandle,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n concurrency,\n );\n return;\n }\n\n // file은 디렉토리인지 알 수 없음\n const file = handle as File;\n if (callbackAccept(file)) {\n output.push({\n type: 'file',\n file,\n path: parent.join(file.name),\n });\n }\n}\n"],"mappings":"kLAMA,MAAMA,GAAY,EAAgB,GAAGC,IAC5BA,EAAK,MAAO,GAAOC,KAAMC,CAAM,EAGxC,eAAsBC,EACpB,EACA,EACA,EACA,EACA,EAAyB,OACzB,EAAW,GACX,EAAc,EACd,CACA,GAAIJ,EAASK,EAAQ,aAAc,WAAY,cAAe,QAAQ,EAAG,CACvE,MAAMC,EACJC,EACAF,EACAG,EACAC,EACAC,EACAC,EACAC,CACF,EACA,MACF,CAEA,GAAIZ,EAASK,EAAQ,OAAQ,aAAa,EAAG,CAC3C,MAAMQ,EACJN,EACAF,EACAG,EACAC,EACAC,EACAC,EACAC,CACF,EACA,MACF,CAGA,IAAME,EAAOT,EACTI,EAAeK,CAAI,GACrBN,EAAO,KAAK,CACV,KAAM,OACN,OACA,KAAMD,EAAO,KAAKO,EAAK,IAAI,CAC7B,CAAC,CAEL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.cjs","names":["errmsg","err"],"sources":["../../../src/file-drop/internal/util.ts"],"sourcesContent":["export function errmsg(err: unknown): string {\n if (typeof err === 'undefined' || err === null) return 'unknown';\n if (typeof err === 'string') return err;\n if (typeof err === 'object' && 'message' in err && typeof err.message === 'string') {\n return err.message;\n }\n return String(err);\n}\n"],"mappings":"AAAA,SAAgBA,EAAO,EAAsB,CAM3C,OALWC,GAA+B,KAAa,UACnD,OAAOA,GAAQ,SAAiBA,EAChC,OAAOA,GAAQ,UAAY,YAAaA,GAAO,OAAOA,EAAI,SAAY,SACjEA,EAAI,QAEN,OAAOA,CAAG,CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","names":["errmsg","err"],"sources":["../../../src/file-drop/internal/util.ts"],"sourcesContent":["export function errmsg(err: unknown): string {\n if (typeof err === 'undefined' || err === null) return 'unknown';\n if (typeof err === 'string') return err;\n if (typeof err === 'object' && 'message' in err && typeof err.message === 'string') {\n return err.message;\n }\n return String(err);\n}\n"],"mappings":"AAAA,SAAgBA,EAAO,EAAsB,CAM3C,OALWC,GAA+B,KAAa,UACnD,OAAOA,GAAQ,SAAiBA,EAChC,OAAOA,GAAQ,UAAY,YAAaA,GAAO,OAAOA,EAAI,SAAY,SACjEA,EAAI,QAEN,OAAOA,CAAG,CACnB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../debug-logger.cjs"),t=require("../util.cjs");async function n(t,a,o,s,c=`none`,l=!0,u=4){let d=e.createFileDropLogger(c);if(a.isFile){let e=await r(a);if(!e){d.debug(`FileSystemEntry.getFile() error`,a);return}s(e)&&o.push({type:`file`,file:e,path:t.join(e.name)});return}if(!a.isDirectory)return;o.push({type:`dir`,path:t.join(a.name)});let f=t.join(a.name);d.info(`🔍 Traversing directory (Entry API): ${a.name} at path: ${f.toString()}`);let p=await i(a,c);d.verbose(` 📊 Total children found: ${p.length}`),p.forEach((e,t)=>{d.verbose(` 📄 Found [${t}]: ${e.name} (${e.isFile?`file`:`directory`})`)});let{simpleParallelMap:m}=await Promise.resolve().then(()=>require("../../utils/parallel-map.cjs")),h=Math.max(1,u);if(l&&h>1&&p.length>1)d.info(` ⚡ Processing ${p.length} items in parallel (custom implementation, concurrency=${h})`),await m(p,async e=>{(e.isFile||e.isDirectory)&&await n(f,e,o,s,c,l,h)},h);else{d.info(` 📝 Processing ${p.length} item directly`);for(let e of p)(e.isFile||e.isDirectory)&&await n(f,e,o,s,c,l,h)}}async function r(e){try{return await new Promise((t,n)=>{e.file(e=>{t(e)},e=>{n(e)})})}catch{return null}}async function i(n,r=`none`){let i=e.createFileDropLogger(r);try{return await a(n,r)}catch(e){return i.debug(t.errmsg(e)),[]}}async function a(t,n=`none`){let r=e.createFileDropLogger(n),i=t.createReader(),a=[];async function o(){return new Promise((e,t)=>{i.readEntries(t=>{t.length>0?(a=a.concat(t),e(o())):e(a)},e=>{r.warn(`readEntries() error`,e),t(e)})})}return await o(),a}exports.visitByFileSystemEntry=n;
|
|
2
|
+
//# sourceMappingURL=visit-file-system-entry.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visit-file-system-entry.cjs","names":["createFileDropLogger","errmsg","require_debug_logger","require_util","visitByFileSystemEntry","logger","debugLevel","item","file","getFile","callbackAccept","output","parent","newParent","children","readEntries","index","child","normalizedConcurrency","concurrency","parallel","simpleParallelMap","entry","fileEntry","resolve","f","reject","err","readAllEntries","dirReader","allEntries","readEntriesRecursively","entries"],"sources":["../../../../src/file-drop/internal/visit-file-system/visit-file-system-entry.ts"],"sourcesContent":["import type { DebugLevel } from '../../types.js';\nimport { createFileDropLogger } from '../debug-logger.js';\nimport type { PathHolder } from '../path-util.js';\nimport { errmsg } from '../util.js';\nimport type { PathAndEntry } from './internal-types.js';\n\n/**\n * visitByFileSystemEntry\n */\nexport async function visitByFileSystemEntry(\n parent: PathHolder,\n item: FileSystemEntry,\n output: PathAndEntry[],\n callbackAccept: (file: File) => boolean,\n debugLevel: DebugLevel = 'none',\n parallel = true,\n concurrency = 4,\n) {\n const logger = createFileDropLogger(debugLevel);\n\n if (item.isFile) {\n const file = await getFile(item as FileSystemFileEntry);\n if (!file) {\n logger.debug('FileSystemEntry.getFile() error', item);\n return;\n }\n if (callbackAccept(file)) {\n output.push({\n type: 'file',\n file,\n path: parent.join(file.name),\n });\n }\n return;\n }\n\n if (!item.isDirectory) {\n // ignore\n return;\n }\n\n output.push({\n type: 'dir',\n path: parent.join(item.name),\n });\n\n const newParent = parent.join(item.name);\n logger.info(`🔍 Traversing directory (Entry API): ${item.name} at path: ${newParent.toString()}`);\n\n // 디렉터리 내부의 모든 엔트리를 재귀적으로 읽는다.\n const children = await readEntries(item as FileSystemDirectoryEntry, debugLevel);\n logger.verbose(` 📊 Total children found: ${children.length}`);\n\n children.forEach((child, index) => {\n logger.verbose(` 📄 Found [${index}]: ${child.name} (${child.isFile ? 'file' : 'directory'})`);\n });\n\n // 자체 구현한 parallelMap을 사용하여 성능 최적화\n const { simpleParallelMap } = await import('../../utils/parallel-map.js');\n\n const normalizedConcurrency = Math.max(1, concurrency);\n const shouldParallel = parallel && normalizedConcurrency > 1 && children.length > 1;\n\n if (shouldParallel) {\n // 여러 파일/디렉터리가 있으면 병렬 처리로 순회 시간을 줄인다.\n logger.info(\n ` ⚡ Processing ${children.length} items in parallel (custom implementation, concurrency=${normalizedConcurrency})`,\n );\n await simpleParallelMap(\n children,\n async (entry: FileSystemEntry) => {\n if (entry.isFile || entry.isDirectory) {\n await visitByFileSystemEntry(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n },\n normalizedConcurrency,\n ); // 최대 4개씩 동시 처리\n } else {\n // 단일 항목은 직접 처리 (오버헤드 방지)\n logger.info(` 📝 Processing ${children.length} item directly`);\n for (const entry of children) {\n if (entry.isFile || entry.isDirectory) {\n await visitByFileSystemEntry(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n }\n }\n}\n\nasync function getFile(fileEntry: FileSystemFileEntry): Promise<File | null> {\n try {\n return await new Promise((resolve, reject) => {\n fileEntry.file(\n (f) => {\n resolve(f);\n },\n (err) => {\n reject(err);\n },\n );\n });\n } catch {\n return null;\n }\n}\n\nasync function readEntries(\n item: FileSystemDirectoryEntry,\n debugLevel: DebugLevel = 'none',\n): Promise<FileSystemEntry[]> {\n const logger = createFileDropLogger(debugLevel);\n\n try {\n return await readAllEntries(item, debugLevel);\n } catch (err) {\n logger.debug(errmsg(err));\n return [];\n }\n}\nasync function readAllEntries(\n item: FileSystemDirectoryEntry,\n debugLevel: DebugLevel = 'none',\n): Promise<FileSystemEntry[]> {\n const logger = createFileDropLogger(debugLevel);\n const dirReader = item.createReader();\n let allEntries: FileSystemEntry[] = [];\n\n async function readEntriesRecursively() {\n return new Promise<FileSystemEntry[]>((resolve, reject) => {\n dirReader.readEntries(\n (entries) => {\n if (entries.length > 0) {\n allEntries = allEntries.concat(entries);\n // 아직 더 읽을 파일이 남아 있을 수 있으므로 재귀적으로 호출\n resolve(readEntriesRecursively());\n } else {\n // 더 이상 읽을 엔트리가 없으면 전체 리스트 반환\n resolve(allEntries);\n }\n },\n (err) => {\n logger.warn('readEntries() error', err);\n reject(err);\n },\n );\n });\n }\n\n await readEntriesRecurs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CAELb,EAAO,KAAK,mBAAmBS,EAAS,OAAO,eAAe,EAC9D,IAAK,IAAMQ,KAASR,GACdQ,EAAM,QAAUA,EAAM,cACxB,MAAMlB,EACJS,EACAS,EACAX,EACAD,EACAJ,EACAc,EACAF,CACF,CAGN,CACF,CAEA,eAAeT,EAAQ,EAAsD,CAC3E,GAAI,CACF,OAAO,MAAM,IAAI,SAAS,EAAS,IAAW,CAC5Cc,EAAU,KACP,GAAM,CACLC,EAAQC,CAAC,CACX,EACC,GAAQ,CACPC,EAAOC,CAAG,CACZ,CACF,CACF,CAAC,CACH,MAAQ,CACN,OAAO,IACT,CACF,CAEA,eAAeZ,EACb,EACA,EAAyB,OACG,CAC5B,IAAMV,EAASL,EAAAA,qBAAqBM,CAAU,EAE9C,GAAI,CACF,OAAO,MAAMsB,EAAerB,EAAMD,CAAU,CAC9C,OAASqB,EAAK,CAEZ,OADAtB,EAAO,MAAMJ,EAAAA,OAAO0B,CAAG,CAAC,EACjB,CAAC,CACV,CACF,CACA,eAAeC,EACb,EACA,EAAyB,OACG,CAC5B,IAAMvB,EAASL,EAAAA,qBAAqBM,CAAU,EACxCuB,EAAYtB,EAAK,aAAa,EAChCuB,EAAgC,CAAC,EAErC,eAAeC,GAAyB,CACtC,OAAO,IAAI,SAA4B,EAAS,IAAW,CACzDF,EAAU,YACP,GAAY,CACPG,EAAQ,OAAS,GACnB,EAAaF,EAAW,OAAOE,CAAO,EAEtCR,EAAQO,EAAuB,CAAC,GAGhCP,EAAQM,CAAU,CAEtB,EACC,GAAQ,CACPzB,EAAO,KAAK,sBAAuBsB,CAAG,EACtCD,EAAOC,CAAG,CACZ,CACF,CACF,CAAC,CACH,CAGA,OADA,MAAMI,EAAuB,EACtBD,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createFileDropLogger as e}from"../debug-logger.js";import{errmsg as t}from"../util.js";async function n(t,a,o,s,c=`none`,l=!0,u=4){let d=e(c);if(a.isFile){let e=await r(a);if(!e){d.debug(`FileSystemEntry.getFile() error`,a);return}s(e)&&o.push({type:`file`,file:e,path:t.join(e.name)});return}if(!a.isDirectory)return;o.push({type:`dir`,path:t.join(a.name)});let f=t.join(a.name);d.info(`🔍 Traversing directory (Entry API): ${a.name} at path: ${f.toString()}`);let p=await i(a,c);d.verbose(` 📊 Total children found: ${p.length}`),p.forEach((e,t)=>{d.verbose(` 📄 Found [${t}]: ${e.name} (${e.isFile?`file`:`directory`})`)});let{simpleParallelMap:m}=await import(`../../utils/parallel-map.js`),h=Math.max(1,u);if(l&&h>1&&p.length>1)d.info(` ⚡ Processing ${p.length} items in parallel (custom implementation, concurrency=${h})`),await m(p,async e=>{(e.isFile||e.isDirectory)&&await n(f,e,o,s,c,l,h)},h);else{d.info(` 📝 Processing ${p.length} item directly`);for(let e of p)(e.isFile||e.isDirectory)&&await n(f,e,o,s,c,l,h)}}async function r(e){try{return await new Promise((t,n)=>{e.file(e=>{t(e)},e=>{n(e)})})}catch{return null}}async function i(n,r=`none`){let i=e(r);try{return await a(n,r)}catch(e){return i.debug(t(e)),[]}}async function a(t,n=`none`){let r=e(n),i=t.createReader(),a=[];async function o(){return new Promise((e,t)=>{i.readEntries(t=>{t.length>0?(a=a.concat(t),e(o())):e(a)},e=>{r.warn(`readEntries() error`,e),t(e)})})}return await o(),a}export{n as visitByFileSystemEntry};
|
|
2
|
+
//# sourceMappingURL=visit-file-system-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visit-file-system-entry.js","names":["visitByFileSystemEntry","logger","createFileDropLogger","debugLevel","item","file","getFile","callbackAccept","output","parent","newParent","children","readEntries","index","child","normalizedConcurrency","concurrency","parallel","simpleParallelMap","entry","fileEntry","resolve","f","reject","err","readAllEntries","errmsg","dirReader","allEntries","readEntriesRecursively","entries"],"sources":["../../../../src/file-drop/internal/visit-file-system/visit-file-system-entry.ts"],"sourcesContent":["import type { DebugLevel } from '../../types.js';\nimport { createFileDropLogger } from '../debug-logger.js';\nimport type { PathHolder } from '../path-util.js';\nimport { errmsg } from '../util.js';\nimport type { PathAndEntry } from './internal-types.js';\n\n/**\n * visitByFileSystemEntry\n */\nexport async function visitByFileSystemEntry(\n parent: PathHolder,\n item: FileSystemEntry,\n output: PathAndEntry[],\n callbackAccept: (file: File) => boolean,\n debugLevel: DebugLevel = 'none',\n parallel = true,\n concurrency = 4,\n) {\n const logger = createFileDropLogger(debugLevel);\n\n if (item.isFile) {\n const file = await getFile(item as FileSystemFileEntry);\n if (!file) {\n logger.debug('FileSystemEntry.getFile() error', item);\n return;\n }\n if (callbackAccept(file)) {\n output.push({\n type: 'file',\n file,\n path: parent.join(file.name),\n });\n }\n return;\n }\n\n if (!item.isDirectory) {\n // ignore\n return;\n }\n\n output.push({\n type: 'dir',\n path: parent.join(item.name),\n });\n\n const newParent = parent.join(item.name);\n logger.info(`🔍 Traversing directory (Entry API): ${item.name} at path: ${newParent.toString()}`);\n\n // 디렉터리 내부의 모든 엔트리를 재귀적으로 읽는다.\n const children = await readEntries(item as FileSystemDirectoryEntry, debugLevel);\n logger.verbose(` 📊 Total children found: ${children.length}`);\n\n children.forEach((child, index) => {\n logger.verbose(` 📄 Found [${index}]: ${child.name} (${child.isFile ? 'file' : 'directory'})`);\n });\n\n // 자체 구현한 parallelMap을 사용하여 성능 최적화\n const { simpleParallelMap } = await import('../../utils/parallel-map.js');\n\n const normalizedConcurrency = Math.max(1, concurrency);\n const shouldParallel = parallel && normalizedConcurrency > 1 && children.length > 1;\n\n if (shouldParallel) {\n // 여러 파일/디렉터리가 있으면 병렬 처리로 순회 시간을 줄인다.\n logger.info(\n ` ⚡ Processing ${children.length} items in parallel (custom implementation, concurrency=${normalizedConcurrency})`,\n );\n await simpleParallelMap(\n children,\n async (entry: FileSystemEntry) => {\n if (entry.isFile || entry.isDirectory) {\n await visitByFileSystemEntry(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n },\n normalizedConcurrency,\n ); // 최대 4개씩 동시 처리\n } else {\n // 단일 항목은 직접 처리 (오버헤드 방지)\n logger.info(` 📝 Processing ${children.length} item directly`);\n for (const entry of children) {\n if (entry.isFile || entry.isDirectory) {\n await visitByFileSystemEntry(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n }\n }\n}\n\nasync function getFile(fileEntry: FileSystemFileEntry): Promise<File | null> {\n try {\n return await new Promise((resolve, reject) => {\n fileEntry.file(\n (f) => {\n resolve(f);\n },\n (err) => {\n reject(err);\n },\n );\n });\n } catch {\n return null;\n }\n}\n\nasync function readEntries(\n item: FileSystemDirectoryEntry,\n debugLevel: DebugLevel = 'none',\n): Promise<FileSystemEntry[]> {\n const logger = createFileDropLogger(debugLevel);\n\n try {\n return await readAllEntries(item, debugLevel);\n } catch (err) {\n logger.debug(errmsg(err));\n return [];\n }\n}\nasync function readAllEntries(\n item: FileSystemDirectoryEntry,\n debugLevel: DebugLevel = 'none',\n): Promise<FileSystemEntry[]> {\n const logger = createFileDropLogger(debugLevel);\n const dirReader = item.createReader();\n let allEntries: FileSystemEntry[] = [];\n\n async function readEntriesRecursively() {\n return new Promise<FileSystemEntry[]>((resolve, reject) => {\n dirReader.readEntries(\n (entries) => {\n if (entries.length > 0) {\n allEntries = allEntries.concat(entries);\n // 아직 더 읽을 파일이 남아 있을 수 있으므로 재귀적으로 호출\n resolve(readEntriesRecursively());\n } else {\n // 더 이상 읽을 엔트리가 없으면 전체 리스트 반환\n resolve(allEntries);\n }\n },\n (err) => {\n logger.warn('readEntries() error', err);\n reject(err);\n },\n );\n });\n }\n\n await readEntriesRecursively();\n return allEntries;\n}\n"],"mappings":"8FASA,eAAsBA,EACpB,EACA,EACA,EACA,EACA,EAAyB,OACzB,EAAW,GACX,EAAc,EACd,CACA,IAAMC,EAASC,EAAqBC,CAAU,EAE9C,GAAIC,EAAK,OAAQ,CACf,IAAMC,EAAO,MAAMC,EAAQF,CAA2B,EACtD,GAA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c,EAAU,KACP,GAAM,CACLC,EAAQC,CAAC,CACX,EACC,GAAQ,CACPC,EAAOC,CAAG,CACZ,CACF,CACF,CAAC,CACH,MAAQ,CACN,OAAO,IACT,CACF,CAEA,eAAeZ,EACb,EACA,EAAyB,OACG,CAC5B,IAAMX,EAASC,EAAqBC,CAAU,EAE9C,GAAI,CACF,OAAO,MAAMsB,EAAerB,EAAMD,CAAU,CAC9C,OAASqB,EAAK,CAEZ,OADAvB,EAAO,MAAMyB,EAAOF,CAAG,CAAC,EACjB,CAAC,CACV,CACF,CACA,eAAeC,EACb,EACA,EAAyB,OACG,CAC5B,IAAMxB,EAASC,EAAqBC,CAAU,EACxCwB,EAAYvB,EAAK,aAAa,EAChCwB,EAAgC,CAAC,EAErC,eAAeC,GAAyB,CACtC,OAAO,IAAI,SAA4B,EAAS,IAAW,CACzDF,EAAU,YACP,GAAY,CACPG,EAAQ,OAAS,GACnB,EAAaF,EAAW,OAAOE,CAAO,EAEtCT,EAAQQ,EAAuB,CAAC,GAGhCR,EAAQO,CAAU,CAEtB,EACC,GAAQ,CACP3B,EAAO,KAAK,sBAAuBuB,CAAG,EACtCD,EAAOC,CAAG,CACZ,CACF,CACF,CAAC,CACH,CAGA,OADA,MAAMK,EAAuB,EACtBD,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../debug-logger.cjs");async function t(n,r,i,a,o=`none`,s=!0,c=4){let l=e.createFileDropLogger(o);if(r.kind===`file`){let e=await r.getFile();if(!e)return;a(e)&&i.push({type:`file`,file:e,path:n.join(e.name)});return}if(r.kind!==`directory`)return;i.push({type:`dir`,path:n.join(r.name)});let u=n.join(r.name);try{let e=[],n=r.values();l.info(`🔍 Traversing directory: ${r.name} at path: ${u.toString()}`);for await(let t of n)t&&(e.push(t),l.verbose(` 📄 Found: ${t.name} (${t.kind})`));l.verbose(` 📊 Total children found: ${e.length}`);let{simpleParallelMap:d}=await Promise.resolve().then(()=>require("../../utils/parallel-map.cjs")),f=Math.max(1,c);if(s&&f>1&&e.length>1)l.info(` ⚡ Processing ${e.length} items in parallel (custom implementation, concurrency=${f})`),await d(e,async e=>{(e.kind===`file`||e.kind===`directory`)&&await t(u,e,i,a,o,s,f)},f);else{l.info(` 📝 Processing ${e.length} item directly`);for(let n of e)(n.kind===`file`||n.kind===`directory`)&&await t(u,n,i,a,o,s,f)}}catch(e){l.warn(`Directory traversal warning for ${r.name}:`,e)}}exports.visitByFileSystemHandle=t;
|
|
2
|
+
//# sourceMappingURL=visit-file-system-handle.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visit-file-system-handle.cjs","names":["createFileDropLogger","directoryHandle","require_debug_logger","visitByFileSystemHandle","logger","debugLevel","handle","file","callbackAccept","output","parent","newParent","children","iterator","entry","normalizedConcurrency","concurrency","parallel","simpleParallelMap","err"],"sources":["../../../../src/file-drop/internal/visit-file-system/visit-file-system-handle.ts"],"sourcesContent":["import type { DebugLevel } from '../../types.js';\nimport { createFileDropLogger } from '../debug-logger.js';\nimport type { PathHolder } from '../path-util.js';\nimport type { PathAndEntry } from './internal-types.js';\n\nexport async function visitByFileSystemHandle(\n parent: PathHolder,\n handle: FileSystemHandle,\n output: PathAndEntry[],\n callbackAccept: (file: File) => boolean,\n debugLevel: DebugLevel = 'none',\n parallel = true,\n concurrency = 4,\n) {\n const logger = createFileDropLogger(debugLevel);\n\n if (handle.kind === 'file') {\n const file = (await (handle as FileSystemFileHandle).getFile()) as File | null;\n if (!file) {\n return;\n }\n if (callbackAccept(file)) {\n output.push({\n type: 'file',\n file,\n path: parent.join(file.name),\n });\n }\n return;\n }\n\n if (handle.kind !== 'directory') {\n // 파일이나 디렉터리가 아닌 핸들은 순회 대상에서 제외한다.\n return;\n }\n\n output.push({\n type: 'dir',\n path: parent.join(handle.name),\n });\n\n const newParent = parent.join(handle.name);\n try {\n // FileSystemDirectoryHandle의 values()는 async iterator를 반환\n const children: FileSystemHandle[] = [];\n // FileSystemDirectoryHandle.values()는 일부 환경의 표준 타입에 없을 수 있으므로 인터페이스 확장 사용\n const directoryHandle = handle as FileSystemDirectoryHandle & {\n values(): AsyncIterableIterator<FileSystemHandle>;\n };\n const iterator = directoryHandle.values();\n\n logger.info(`🔍 Traversing directory: ${handle.name} at path: ${newParent.toString()}`);\n\n // async iterator를 배열로 변환\n for await (const entry of iterator) {\n if (entry) {\n children.push(entry);\n logger.verbose(` 📄 Found: ${entry.name} (${entry.kind})`);\n }\n }\n\n logger.verbose(` 📊 Total children found: ${children.length}`);\n\n // 자체 구현한 parallelMap 사용\n const { simpleParallelMap } = await import('../../utils/parallel-map.js');\n\n const normalizedConcurrency = Math.max(1, concurrency);\n const shouldParallel = parallel && normalizedConcurrency > 1 && children.length > 1;\n\n if (shouldParallel) {\n // 병렬 처리\n logger.info(\n ` ⚡ Processing ${children.length} items in parallel (custom implementation, concurrency=${normalizedConcurrency})`,\n );\n await simpleParallelMap(\n children,\n async (entry: FileSystemHandle) => {\n if (entry.kind === 'file' || entry.kind === 'directory') {\n await visitByFileSystemHandle(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n },\n normalizedConcurrency,\n );\n } else {\n // 단일 항목은 직접 처리\n logger.info(` 📝 Processing ${children.length} item directly`);\n for (const entry of children) {\n if (entry.kind === 'file' || entry.kind === 'directory') {\n await visitByFileSystemHandle(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n }\n }\n } catch (err) {\n logger.warn(`Directory traversal warning for ${handle.name}:`, err);\n }\n}\n"],"mappings":"uCAKA,eAAsBG,EACpB,EACA,EACA,EACA,EACA,EAAyB,OACzB,EAAW,GACX,EAAc,EACd,CACA,IAAMC,EAASJ,EAAAA,qBAAqBK,CAAU,EAE9C,GAAIC,EAAO,OAAS,OAAQ,CAC1B,IAAMC,EAAQ,MAAOD,EAAgC,QAAQ,EAC7D,GAAI,CAACC,EACH,OAEEC,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|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createFileDropLogger as e}from"../debug-logger.js";async function t(n,r,i,a,o=`none`,s=!0,c=4){let l=e(o);if(r.kind===`file`){let e=await r.getFile();if(!e)return;a(e)&&i.push({type:`file`,file:e,path:n.join(e.name)});return}if(r.kind!==`directory`)return;i.push({type:`dir`,path:n.join(r.name)});let u=n.join(r.name);try{let e=[],n=r.values();l.info(`🔍 Traversing directory: ${r.name} at path: ${u.toString()}`);for await(let t of n)t&&(e.push(t),l.verbose(` 📄 Found: ${t.name} (${t.kind})`));l.verbose(` 📊 Total children found: ${e.length}`);let{simpleParallelMap:d}=await import(`../../utils/parallel-map.js`),f=Math.max(1,c);if(s&&f>1&&e.length>1)l.info(` ⚡ Processing ${e.length} items in parallel (custom implementation, concurrency=${f})`),await d(e,async e=>{(e.kind===`file`||e.kind===`directory`)&&await t(u,e,i,a,o,s,f)},f);else{l.info(` 📝 Processing ${e.length} item directly`);for(let n of e)(n.kind===`file`||n.kind===`directory`)&&await t(u,n,i,a,o,s,f)}}catch(e){l.warn(`Directory traversal warning for ${r.name}:`,e)}}export{t as visitByFileSystemHandle};
|
|
2
|
+
//# sourceMappingURL=visit-file-system-handle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visit-file-system-handle.js","names":["directoryHandle","visitByFileSystemHandle","logger","createFileDropLogger","debugLevel","handle","file","callbackAccept","output","parent","newParent","children","iterator","entry","normalizedConcurrency","concurrency","parallel","simpleParallelMap","err"],"sources":["../../../../src/file-drop/internal/visit-file-system/visit-file-system-handle.ts"],"sourcesContent":["import type { DebugLevel } from '../../types.js';\nimport { createFileDropLogger } from '../debug-logger.js';\nimport type { PathHolder } from '../path-util.js';\nimport type { PathAndEntry } from './internal-types.js';\n\nexport async function visitByFileSystemHandle(\n parent: PathHolder,\n handle: FileSystemHandle,\n output: PathAndEntry[],\n callbackAccept: (file: File) => boolean,\n debugLevel: DebugLevel = 'none',\n parallel = true,\n concurrency = 4,\n) {\n const logger = createFileDropLogger(debugLevel);\n\n if (handle.kind === 'file') {\n const file = (await (handle as FileSystemFileHandle).getFile()) as File | null;\n if (!file) {\n return;\n }\n if (callbackAccept(file)) {\n output.push({\n type: 'file',\n file,\n path: parent.join(file.name),\n });\n }\n return;\n }\n\n if (handle.kind !== 'directory') {\n // 파일이나 디렉터리가 아닌 핸들은 순회 대상에서 제외한다.\n return;\n }\n\n output.push({\n type: 'dir',\n path: parent.join(handle.name),\n });\n\n const newParent = parent.join(handle.name);\n try {\n // FileSystemDirectoryHandle의 values()는 async iterator를 반환\n const children: FileSystemHandle[] = [];\n // FileSystemDirectoryHandle.values()는 일부 환경의 표준 타입에 없을 수 있으므로 인터페이스 확장 사용\n const directoryHandle = handle as FileSystemDirectoryHandle & {\n values(): AsyncIterableIterator<FileSystemHandle>;\n };\n const iterator = directoryHandle.values();\n\n logger.info(`🔍 Traversing directory: ${handle.name} at path: ${newParent.toString()}`);\n\n // async iterator를 배열로 변환\n for await (const entry of iterator) {\n if (entry) {\n children.push(entry);\n logger.verbose(` 📄 Found: ${entry.name} (${entry.kind})`);\n }\n }\n\n logger.verbose(` 📊 Total children found: ${children.length}`);\n\n // 자체 구현한 parallelMap 사용\n const { simpleParallelMap } = await import('../../utils/parallel-map.js');\n\n const normalizedConcurrency = Math.max(1, concurrency);\n const shouldParallel = parallel && normalizedConcurrency > 1 && children.length > 1;\n\n if (shouldParallel) {\n // 병렬 처리\n logger.info(\n ` ⚡ Processing ${children.length} items in parallel (custom implementation, concurrency=${normalizedConcurrency})`,\n );\n await simpleParallelMap(\n children,\n async (entry: FileSystemHandle) => {\n if (entry.kind === 'file' || entry.kind === 'directory') {\n await visitByFileSystemHandle(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n },\n normalizedConcurrency,\n );\n } else {\n // 단일 항목은 직접 처리\n logger.info(` 📝 Processing ${children.length} item directly`);\n for (const entry of children) {\n if (entry.kind === 'file' || entry.kind === 'directory') {\n await visitByFileSystemHandle(\n newParent,\n entry,\n output,\n callbackAccept,\n debugLevel,\n parallel,\n normalizedConcurrency,\n );\n }\n }\n }\n } catch (err) {\n logger.warn(`Directory traversal warning for ${handle.name}:`, err);\n }\n}\n"],"mappings":"0DAKA,eAAsBC,EACpB,EACA,EACA,EACA,EACA,EAAyB,OACzB,EAAW,GACX,EAAc,EACd,CACA,IAAMC,EAASC,EAAqBC,CAAU,EAE9C,GAAIC,EAAO,OAAS,OAAQ,CAC1B,IAAMC,EAAQ,MAAOD,EAAgC,QAAQ,EAC7D,GAAI,CAACC,EACH,OAEEC,EAAeD,CAAI,GACrBE,EAAO,KAAK,CACV,KAAM,OACN,OACA,KAAMC,EAAO,KAAKH,EAAK,IAAI,CAC7B,CAAC,EAEH,MACF,CAEA,GAAID,EAAO,OAAS,YAElB,OAGFG,EAAO,KAAK,CACV,KAAM,MACN,KAAMC,EAAO,KAAKJ,EAAO,IAAI,CAC/B,CAAC,EAED,IAAMK,EAAYD,EAAO,KAAKJ,EAAO,IAAI,EACzC,GAAI,CAEF,IAAMM,EAA+B,CAAC,EAKhCC,EAAWZ,EAAgB,OAAO,EAExCE,EAAO,KAAK,4BAA4BG,EAAO,KAAK,YAAYK,EAAU,SAAS,GAAG,EAGtF,UAAW,IAAMG,KAASD,EACpBC,IACFF,EAAS,KAAKE,CAAK,EACnBX,EAAO,QAAQ,eAAeW,EAAM,KAAK,IAAIA,EAAM,KAAK,EAAE,GAI9DX,EAAO,QAAQ,8BAA8BS,EAAS,QAAQ,EAG9D,GAAM,CAAE,qBAAsB,MAAM,OAAO,+BAErCG,EAAwB,KAAK,IAAI,EAAGC,CAAW,EAGrD,GAFuBC,GAAYF,EAAwB,GAAKH,EAAS,OAAS,EAIhFT,EAAO,KACL,kBAAkBS,EAAS,OAAO,yDAAyDG,EAAsB,EACnH,EACA,MAAMG,EACJN,EACA,KAAO,IAA4B,EAC7BE,EAAM,OAAS,QAAUA,EAAM,OAAS,cAC1C,MAAMZ,EACJS,EACAG,EACAL,EACAD,EACAH,EACAY,EACAF,CACF,CAEJ,EACAA,CACF,MACK,CAELZ,EAAO,KAAK,mBAAmBS,EAAS,OAAO,eAAe,EAC9D,IAAK,IAAME,KAASF,GACdE,EAAM,OAAS,QAAUA,EAAM,OAAS,cAC1C,MAAMZ,EACJS,EACAG,EACAL,EACAD,EACAH,EACAY,EACAF,CACF,CAGN,CACF,OAASI,EAAK,CACZhB,EAAO,KAAK,mCAAmCG,EAAO,KAAK,GAAIa,CAAG,CACpE,CACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("./internal/path-util.cjs"),t=require("./internal/debug-logger.cjs"),n=require("./internal/traverse-tree.cjs"),r=require("./types.cjs"),i=require("./utils/file-utils.cjs"),a=require("./utils/filter.cjs"),o=require("./utils/progress-tracker.cjs");async function s(e){if(`dataTransfer`in e){let t=`getAsFileSystemHandle`in DataTransferItem.prototype,n=`webkitGetAsEntry`in DataTransferItem.prototype;if(!t&&!n)return Array.from(e.dataTransfer.files);let r=Array.from(e.dataTransfer.items).filter(e=>e.kind===`file`).map(e=>n?e.webkitGetAsEntry():t?e.getAsFileSystemHandle():e.getAsFile()).filter(Boolean);return(await Promise.all(r.map(e=>e&&e instanceof Promise?e:Promise.resolve(e)))).filter(Boolean)}return`length`in e?Array.from(e):Array.isArray(e)?e:null}async function c(a,o,s,c={},l,u=`warn`,d){let f=[],p=[],m=0,{simpleParallelMap:h}=await Promise.resolve().then(()=>require("./utils/parallel-map.cjs")),g=Math.max(1,d?.concurrency??4),_=d?.parallel??!0,v=t.createFileDropLogger(u),y=async t=>{if(l?.aborted)throw new r.FileDropError(`UNKNOWN`,void 0,`Operation aborted`);try{await n.traverseTree(e.PathHolder.EMPTY,t,f,e=>{m++,s.updateTotalItems(m);let t=i.createFileItem(e,e.name);s.setCurrentItem(t);let n=o.filter(t);return n.error&&(p.push(n.error),c.onError?.(n.error,t)),n.accepted||s.completeItem(),n.accepted},u,_,g)}catch(e){let t=e instanceof r.FileDropError?e:new r.FileDropError(`UNKNOWN`,void 0,String(e));p.push(t),c.onError?.(t)}};if(_&&g>1&&a.length>1)v.info(`🚀 Processing ${a.length} handles in parallel (custom implementation, concurrency=${g})`),await h(a,y,g);else{v.info(`📝 Processing ${a.length} handle directly`);for(let e of a)await y(e)}let b=[],x=[];s.updateTotalItems(m),v.info(`🔄 Processing ${f.length} total items from traversal`);for(let e of f)if(e.type===`file`){let t=i.createFileItem(e.file,e.path.toString(),e.path.toString());b.push(t),c.onFile?.(t),s.completeItem(),v.verbose(` ✅ File: ${e.path.toString()}`)}else{let t={type:`directory`,name:e.path.lastSegment(),path:e.path.toString(),pathSegments:e.path.segments,relativePath:e.path.toString()};x.push(t),v.verbose(` 📁 Directory: ${e.path.toString()}`)}return v.info(`📊 Final results: ${b.length} files, ${x.length} directories`),{items:b,directories:x,errors:p}}async function l(e,t={}){let n=Date.now(),l=d(t.debug);try{if(t.signal?.aborted)throw new r.FileDropError(`UNKNOWN`,void 0,`Operation aborted`);let u=await s(e);if(!u)throw new r.FileDropError(`UNSUPPORTED_API`,void 0,`Unsupported file drop source`);let d=u.length,f=new o.ProgressTracker(d,t.callbacks),p=new a.FileFilter(t.filter);if(u.length>0&&u[0]instanceof File){let e=u,a=[],o=[];for(let n of e){if(t.signal?.aborted)throw new r.FileDropError(`UNKNOWN`,void 0,`Operation aborted`);let e=i.createFileItem(n,n.name);f.setCurrentItem(e);let s=p.filter(e);s.accepted?(a.push(e),t.callbacks?.onFile?.(e)):s.error&&(o.push(s.error),t.callbacks?.onError?.(s.error,e)),f.completeItem()}return{files:a,directories:[],tree:i.buildFileTree(a),metadata:{totalFiles:a.length,totalDirectories:0,totalSize:a.reduce((e,t)=>e+(t.size||0),0),processingTime:Date.now()-n},errors:o}}let{items:m,directories:h,errors:g}=await c(u,p,f,t.callbacks,t.signal,l,t.processing),_=[...m,...h];return{files:m,directories:h,tree:i.buildFileTree(_),metadata:{totalFiles:m.length,totalDirectories:h.length,totalSize:m.reduce((e,t)=>e+(t.size||0),0),processingTime:Date.now()-n},errors:g}}catch(e){throw e instanceof r.FileDropError?e:new r.FileDropError(`UNKNOWN`,void 0,String(e))}}async function u(e,t={}){try{return await l(e,t)}catch(e){return{success:!1,error:e instanceof r.FileDropError?e:new r.FileDropError(`UNKNOWN`,void 0,String(e))}}}function d(e){return e===!0?`verbose`:e===!1?`none`:e===void 0?`warn`:e}exports.processFileTreeDrop=l,exports.processFileTreeDropSafe=u;
|
|
2
|
+
//# sourceMappingURL=process-file-drop.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-file-drop.cjs","names":["createFileDropLogger","FileDropError","traverseTree","PathHolder","createFileItem","ProgressTracker","FileFilter","buildFileTree","require_path_util","require_debug_logger","require_traverse_tree","require_types","require_file_utils","require_filter","require_progress_tracker","normalizeSource","source","supportsFileSystemAccessAPI","supportsWebkitGetAsEntry","handles","item","handle","processFileTree","output","errors","totalFilesEncountered","normalizedConcurrency","processing","enableParallel","logger","debugLevel","processHandle","signal","tracker","file","filterResult","filter","callbacks","error","fileError","simpleParallelMap","items","directories","entry","processedFile","directory","processFileTreeDrop","startTime","normalizeDebugLevel","options","normalized","estimatedCount","files","sum","allItems","processFileTreeDropSafe","debug"],"sources":["../../src/file-drop/process-file-drop.ts"],"sourcesContent":["import { createFileDropLogger } from './internal/debug-logger.js';\nimport { PathHolder } from './internal/path-util.js';\nimport { traverseTree } from './internal/traverse-tree.js';\nimport type { PathAndEntry } from './internal/visit-file-system/internal-types.js';\nimport type {\n DebugLevel,\n FileDropOptions,\n FileDropSource,\n FileItem,\n ProcessedDirectory,\n ProcessedFile,\n ProcessingOptions,\n ProcessResult,\n SafeProcessResult,\n} from './types.js';\nimport { FileDropError } from './types.js';\nimport { buildFileTree, createFileItem } from './utils/file-utils.js';\nimport { FileFilter } from './utils/filter.js';\nimport { ProgressTracker } from './utils/progress-tracker.js';\n\n/**\n * 다양한 파일 드롭 소스를 내부적으로 처리 가능한 형태로 정규화\n * React DragEvent, FileList, FileSystemHandle[] 등을 통합 처리\n *\n * @internal\n * @param source - 정규화할 파일 드롭 소스\n * @returns 정규화된 File[] 또는 FileSystemHandle[] 배열, 실패시 null\n */\nasync function normalizeSource(\n source: FileDropSource,\n): Promise<File[] | FileSystemHandle[] | null> {\n if ('dataTransfer' in source) {\n // React DragEvent - 드래그앤드롭 이벤트 처리\n const supportsFileSystemAccessAPI = 'getAsFileSystemHandle' in DataTransferItem.prototype;\n const supportsWebkitGetAsEntry = 'webkitGetAsEntry' in DataTransferItem.prototype;\n\n // 브라우저가 고급 파일 API를 지원하지 않으면 기본 파일 리스트만 반환\n if (!supportsFileSystemAccessAPI && !supportsWebkitGetAsEntry) {\n return Array.from(source.dataTransfer.files);\n }\n\n // 브라우저 능력에 따라 적절한 API 사용\n // Chrome: getAsFileSystemHandle (최신)\n // Firefox/Safari: webkitGetAsEntry (레거시)\n const handles = Array.from(source.dataTransfer.items)\n .filter((item) => item.kind === 'file') // 파일 아이템만 필터링\n .map((item) => {\n if (supportsWebkitGetAsEntry) {\n return item.webkitGetAsEntry(); // 레거시 웹킷 API 사용\n } else if (supportsFileSystemAccessAPI) {\n // File System Access API - getAsFileSystemHandle은 표준 타입에 없음\n return (\n item as DataTransferItem & { getAsFileSystemHandle(): Promise<FileSystemHandle> }\n ).getAsFileSystemHandle();\n }\n return item.getAsFile(); // fallback\n })\n .filter(Boolean); // null/undefined 제거\n\n const resolvedHandles = await Promise.all(\n handles.map((handle) => {\n if (handle && handle instanceof Promise) {\n return handle;\n }\n return Promise.resolve(handle);\n }),\n );\n\n return resolvedHandles.filter(Boolean) as FileSystemHandle[];\n }\n\n if ('length' in source) {\n // FileList 또는 File[]\n return Array.from(source as FileList);\n }\n\n if (Array.isArray(source)) {\n // FileSystemHandle[]\n return source;\n }\n\n return null;\n}\n\n/**\n * 파일 핸들들을 순회하며 파일 트리를 처리\n * FileSystemHandle, FileSystemEntry, File 객체들을 병렬로 처리하여 성능 최적화\n *\n * @internal\n * @param handles - 처리할 파일/디렉토리 핸들 배열\n * @param filter - 파일 필터링 객체\n * @param tracker - 진행상황 추적 객체\n * @param callbacks - 콜백 함수들\n * @param signal - 중단 신호 (optional)\n * @returns 처리된 파일, 디렉토리, 에러 정보\n */\nasync function processFileTree(\n handles: (FileSystemHandle | FileSystemEntry | File)[],\n filter: FileFilter,\n tracker: ProgressTracker,\n callbacks: FileDropOptions['callbacks'] = {},\n signal?: AbortSignal,\n debugLevel: DebugLevel = 'warn',\n processing?: ProcessingOptions,\n): Promise<{ items: ProcessedFile[]; directories: ProcessedDirectory[]; errors: FileDropError[] }> {\n const output: PathAndEntry[] = [];\n const errors: FileDropError[] = [];\n let totalFilesEncountered = 0;\n\n // 자체 구현한 parallelMap 사용\n const { simpleParallelMap } = await import('./utils/parallel-map.js');\n\n const normalizedConcurrency = Math.max(1, processing?.concurrency ?? 4);\n const enableParallel = processing?.parallel ?? true;\n const logger = createFileDropLogger(debugLevel);\n\n const processHandle = async (handle: FileSystemHandle | FileSystemEntry | File) => {\n if (signal?.aborted) {\n throw new FileDropError('UNKNOWN', undefined, 'Operation aborted');\n }\n\n try {\n await traverseTree(\n PathHolder.EMPTY,\n handle,\n output,\n (file: File) => {\n totalFilesEncountered++;\n tracker.updateTotalItems(totalFilesEncountered);\n const item = createFileItem(file, file.name);\n tracker.setCurrentItem(item);\n\n const filterResult = filter.filter(item);\n if (filterResult.error) {\n errors.push(filterResult.error);\n callbacks.onError?.(filterResult.error, item);\n }\n\n if (!filterResult.accepted) {\n tracker.completeItem();\n }\n\n return filterResult.accepted;\n },\n debugLevel,\n enableParallel,\n normalizedConcurrency,\n );\n } catch (error) {\n const fileError =\n error instanceof FileDropError\n ? error\n : new FileDropError('UNKNOWN', undefined, String(error));\n errors.push(fileError);\n callbacks.onError?.(fileError);\n }\n };\n\n // 병렬 또는 순차 처리\n const shouldProcessInParallel = enableParallel && normalizedConcurrency > 1 && handles.length > 1;\n\n if (shouldProcessInParallel) {\n logger.info(\n `🚀 Processing ${handles.length} handles in parallel (custom implementation, concurrency=${normalizedConcurrency})`,\n );\n await simpleParallelMap(handles, processHandle, normalizedConcurrency);\n } else {\n logger.info(`📝 Processing ${handles.length} handle directly`);\n for (const handle of handles) {\n await processHandle(handle);\n }\n }\n\n // 결과 변환\n const items: ProcessedFile[] = [];\n const directories: ProcessedDirectory[] = [];\n\n tracker.updateTotalItems(totalFilesEncountered);\n\n logger.info(`🔄 Processing ${output.length} total items from traversal`);\n\n for (const entry of output) {\n if (entry.type === 'file') {\n const processedFile = createFileItem(\n entry.file,\n entry.path.toString(),\n entry.path.toString(),\n );\n items.push(processedFile);\n callbacks.onFile?.(processedFile);\n tracker.completeItem();\n logger.verbose(` ✅ File: ${entry.path.toString()}`);\n } else {\n const directory: ProcessedDirectory = {\n type: 'directory',\n name: entry.path.lastSegment(),\n path: entry.path.toString(),\n pathSegments: entry.path.segments,\n relativePath: entry.path.toString(),\n };\n directories.push(directory);\n logger.verbose(` 📁 Directory: ${entry.path.toString()}`);\n }\n }\n\n logger.info(`📊 Final results: ${items.length} files, ${directories.length} directories`);\n\n return { items, directories, errors };\n}\n\n/**\n * 파일 드래그앤드롭 이벤트를 처리하여 파일 트리를 순회하는 메인 API 함수\n *\n * React 드래그 이벤트, FileList, FileSystemHandle 배열 등 다양한 소스를 지원하며,\n * 깊은 디렉토리 구조도 완전히 순회합니다. 병렬 처리로 성능을 최적화하고,\n * 부분 실패시에도 처리 가능한 파일들은 계속 처리합니다.\n *\n * @example\n * ```tsx\n * // 기본 사용법\n * const handleDrop = async (event: React.DragEvent<HTMLDivElement>) => {\n * event.preventDefault();\n *\n * try {\n * const result = await processFileTreeDrop(event);\n * console.log(`처리된 파일: ${result.files.length}개`);\n * console.log(`처리 시간: ${result.metadata.processingTime}ms`);\n * } catch (error) {\n * console.error('파일 처리 중 오류:', error);\n * }\n * };\n * ```\n *\n * @example\n * ```tsx\n * // 고급 옵션 사용\n * const result = await processFileTreeDrop(event, {\n * filter: {\n * maxSize: 10 * 1024 * 1024, // 10MB 제한\n * maxFiles: 50, // 최대 50개 파일\n * allowedExtensions: ['.jpg', '.png', '.gif']\n * },\n * callbacks: {\n * onProgress: (progress) => {\n * console.log(`진행률: ${progress.percentage}%`);\n * },\n * onError: (error, item) => {\n * console.error(`${item?.name} 처리 실패:`, error.message);\n * }\n * },\n * signal: abortController.signal // 취소 가능\n * });\n * ```\n *\n * @param source - 파일 드롭 소스 (React DragEvent, FileList, FileSystemHandle[], File[])\n * @param options - 처리 옵션 (필터링, 콜백, 중단 신호 등)\n *\n * @returns Promise<ProcessResult> - 처리된 파일들, 디렉토리 구조, 메타데이터, 에러 정보\n *\n * @throws {FileDropError} 전체 처리가 실패한 경우\n * - 'UNSUPPORTED_API': 브라우저가 File API를 지원하지 않음\n * - 'ACCESS_DENIED': 파일 접근 권한이 거부됨\n * - 'UNKNOWN': 기타 알 수 없는 오류\n *\n * @see {@link processFileTreeDropSafe} 에러를 예외로 던지지 않는 안전한 버전\n * @see {@link FileDropOptions} 사용 가능한 모든 옵션\n * @see {@link ProcessResult} 반환 데이터 구조\n *\n * @since 1.0.0\n */\nexport async function processFileTreeDrop(\n source: FileDropSource,\n options: FileDropOptions = {},\n): Promise<ProcessResult> {\n const startTime = Date.now();\n const debugLevel = normalizeDebugLevel(options.debug);\n\n try {\n // 중단 신호 확인\n if (options.signal?.aborted) {\n throw new FileDropError('UNKNOWN', undefined, 'Operation aborted');\n }\n\n // 소스 정규화\n const normalized = await normalizeSource(source);\n if (!normalized) {\n throw new FileDropError('UNSUPPORTED_API', undefined, 'Unsupported file drop source');\n }\n\n // 초기 파일 개수 추정\n const estimatedCount = normalized.length;\n const tracker = new ProgressTracker(estimatedCount, options.callbacks);\n const filter = new FileFilter(options.filter);\n\n // 단순 파일 리스트인 경우\n if (normalized.length > 0 && normalized[0] instanceof File) {\n const files = normalized as File[];\n const items: ProcessedFile[] = [];\n const errors: FileDropError[] = [];\n\n for (const file of files) {\n if (options.signal?.aborted) {\n throw new FileDropError('UNKNOWN', undefined, 'Operation aborted');\n }\n\n const item = createFileItem(file, file.name);\n tracker.setCurrentItem(item);\n\n const filterResult = filter.filter(item);\n if (filterResult.accepted) {\n items.push(item);\n options.callbacks?.onFile?.(item);\n } else if (filterResult.error) {\n errors.push(filterResult.error);\n options.callbacks?.onError?.(filterResult.error, item);\n }\n\n tracker.completeItem();\n }\n\n // 트리 빌드\n const tree = buildFileTree(items);\n\n return {\n files: items,\n directories: [],\n tree,\n metadata: {\n totalFiles: items.length,\n totalDirectories: 0,\n totalSize: items.reduce((sum, item) => sum + (item.size || 0), 0),\n processingTime: Date.now() - startTime,\n },\n errors,\n };\n }\n\n // FileSystemHandle 처리\n const { items, directories, errors } = await processFileTree(\n normalized as FileSystemHandle[],\n filter,\n tracker,\n options.callbacks,\n options.signal,\n debugLevel,\n options.processing,\n );\n\n // 트리 빌드\n const allItems: FileItem[] = [...items, ...directories];\n const tree = buildFileTree(allItems);\n\n const result: ProcessResult = {\n files: items,\n directories,\n tree,\n metadata: {\n totalFiles: items.length,\n totalDirectories: directories.length,\n totalSize: items.reduce((sum, item) => sum + (item.size || 0), 0),\n processingTime: Date.now() - startTime,\n },\n errors,\n };\n\n return result;\n } catch (error) {\n const fileError =\n error instanceof FileDropError\n ? error\n : new FileDropError('UNKNOWN', undefined, String(error));\n\n throw fileError;\n }\n}\n\n/**\n * 안전한 버전의 파일 트리 처리 함수\n *\n * processFileTreeDrop과 동일한 기능을 제공하지만, 에러를 예외로 던지지 않고\n * 결과 객체에 포함시켜 반환합니다. 에러 처리가 복잡한 상황이나\n * 부분 실패를 허용해야 하는 경우에 유용합니다.\n *\n * @example\n * ```tsx\n * // 에러를 안전하게 처리\n * const result = await processFileTreeDropSafe(event, options);\n *\n * if ('error' in result) {\n * // 실패한 경우\n * console.error('처리 실패:', result.error.message);\n * console.log('에러 코드:', result.error.code);\n *\n * // 부분적으로 처리된 결과가 있다면 활용\n * if (result.partialResult) {\n * console.log('부분 결과:', result.partialResult.files.length, '개 파일');\n * }\n * } else {\n * // 성공한 경우\n * console.log('처리 성공:', result.files.length, '개 파일');\n * console.log('처리 시간:', result.metadata.processingTime, 'ms');\n * }\n * ```\n *\n * @example\n * ```tsx\n * // try-catch 없이 에러 처리\n * const handleDrop = async (event: React.DragEvent<HTMLDivElement>) => {\n * event.preventDefault();\n *\n * const result = await processFileTreeDropSafe(event, {\n * filter: { maxSize: 5 * 1024 * 1024 }, // 5MB 제한\n * callbacks: {\n * onError: (error, item) => {\n * // 개별 파일 에러는 여기서 처리\n * console.warn(`${item?.name} 건너뜀:`, error.message);\n * }\n * }\n * });\n *\n * // 타입 가드를 사용한 안전한 처리\n * if ('error' in result) {\n * setError(result.error.message);\n * } else {\n * setFiles(result.files);\n * setProcessingTime(result.metadata.processingTime);\n * }\n * };\n * ```\n *\n * @param source - 파일 드롭 소스 (React DragEvent, FileList, FileSystemHandle[], File[])\n * @param options - 처리 옵션 (필터링, 콜백, 중단 신호 등)\n *\n * @returns Promise<SafeProcessResult> - 성공시 ProcessResult, 실패시 ErrorResult\n * - 성공: ProcessResult와 동일한 구조\n * - 실패: { success: false, error: FileDropError, partialResult?: ProcessResult }\n *\n * @see {@link processFileTreeDrop} 에러를 예외로 던지는 기본 버전\n * @see {@link SafeProcessResult} 반환 타입 상세 정보\n * @see {@link ErrorResult} 실패시 반환 구조\n *\n * @since 1.0.0\n */\nexport async function processFileTreeDropSafe(\n source: FileDropSource,\n options: FileDropOptions = {},\n): Promise<SafeProcessResult> {\n try {\n const result = await processFileTreeDrop(source, options);\n return result;\n } catch (error) {\n const fileError =\n error instanceof FileDropError\n ? error\n : new FileDropError('UNKNOWN', undefined, String(error));\n\n return {\n success: false,\n error: fileError,\n };\n }\n}\n\nfunction normalizeDebugLevel(debug: FileDropOptions['debug']): DebugLevel {\n if (debug === true) return 'verbose';\n if (debug === false) return 'none';\n if (debug === undefined) return 'warn';\n return debug;\n}\n"],"mappings":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OACxBA,IAAU,IAAA,GAAkB,OACzBA,CACT"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { FileDropOptions, FileDropSource, ProcessResult, SafeProcessResult } from "./types.cjs";
|
|
2
|
+
//#region src/file-drop/process-file-drop.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* 파일 드래그앤드롭 이벤트를 처리하여 파일 트리를 순회하는 메인 API 함수
|
|
5
|
+
*
|
|
6
|
+
* React 드래그 이벤트, FileList, FileSystemHandle 배열 등 다양한 소스를 지원하며,
|
|
7
|
+
* 깊은 디렉토리 구조도 완전히 순회합니다. 병렬 처리로 성능을 최적화하고,
|
|
8
|
+
* 부분 실패시에도 처리 가능한 파일들은 계속 처리합니다.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* // 기본 사용법
|
|
13
|
+
* const handleDrop = async (event: React.DragEvent<HTMLDivElement>) => {
|
|
14
|
+
* event.preventDefault();
|
|
15
|
+
*
|
|
16
|
+
* try {
|
|
17
|
+
* const result = await processFileTreeDrop(event);
|
|
18
|
+
* console.log(`처리된 파일: ${result.files.length}개`);
|
|
19
|
+
* console.log(`처리 시간: ${result.metadata.processingTime}ms`);
|
|
20
|
+
* } catch (error) {
|
|
21
|
+
* console.error('파일 처리 중 오류:', error);
|
|
22
|
+
* }
|
|
23
|
+
* };
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* // 고급 옵션 사용
|
|
29
|
+
* const result = await processFileTreeDrop(event, {
|
|
30
|
+
* filter: {
|
|
31
|
+
* maxSize: 10 * 1024 * 1024, // 10MB 제한
|
|
32
|
+
* maxFiles: 50, // 최대 50개 파일
|
|
33
|
+
* allowedExtensions: ['.jpg', '.png', '.gif']
|
|
34
|
+
* },
|
|
35
|
+
* callbacks: {
|
|
36
|
+
* onProgress: (progress) => {
|
|
37
|
+
* console.log(`진행률: ${progress.percentage}%`);
|
|
38
|
+
* },
|
|
39
|
+
* onError: (error, item) => {
|
|
40
|
+
* console.error(`${item?.name} 처리 실패:`, error.message);
|
|
41
|
+
* }
|
|
42
|
+
* },
|
|
43
|
+
* signal: abortController.signal // 취소 가능
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @param source - 파일 드롭 소스 (React DragEvent, FileList, FileSystemHandle[], File[])
|
|
48
|
+
* @param options - 처리 옵션 (필터링, 콜백, 중단 신호 등)
|
|
49
|
+
*
|
|
50
|
+
* @returns Promise<ProcessResult> - 처리된 파일들, 디렉토리 구조, 메타데이터, 에러 정보
|
|
51
|
+
*
|
|
52
|
+
* @throws {FileDropError} 전체 처리가 실패한 경우
|
|
53
|
+
* - 'UNSUPPORTED_API': 브라우저가 File API를 지원하지 않음
|
|
54
|
+
* - 'ACCESS_DENIED': 파일 접근 권한이 거부됨
|
|
55
|
+
* - 'UNKNOWN': 기타 알 수 없는 오류
|
|
56
|
+
*
|
|
57
|
+
* @see {@link processFileTreeDropSafe} 에러를 예외로 던지지 않는 안전한 버전
|
|
58
|
+
* @see {@link FileDropOptions} 사용 가능한 모든 옵션
|
|
59
|
+
* @see {@link ProcessResult} 반환 데이터 구조
|
|
60
|
+
*
|
|
61
|
+
* @since 1.0.0
|
|
62
|
+
*/
|
|
63
|
+
export declare function processFileTreeDrop(source: FileDropSource, options?: FileDropOptions): Promise<ProcessResult>;
|
|
64
|
+
/**
|
|
65
|
+
* 안전한 버전의 파일 트리 처리 함수
|
|
66
|
+
*
|
|
67
|
+
* processFileTreeDrop과 동일한 기능을 제공하지만, 에러를 예외로 던지지 않고
|
|
68
|
+
* 결과 객체에 포함시켜 반환합니다. 에러 처리가 복잡한 상황이나
|
|
69
|
+
* 부분 실패를 허용해야 하는 경우에 유용합니다.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```tsx
|
|
73
|
+
* // 에러를 안전하게 처리
|
|
74
|
+
* const result = await processFileTreeDropSafe(event, options);
|
|
75
|
+
*
|
|
76
|
+
* if ('error' in result) {
|
|
77
|
+
* // 실패한 경우
|
|
78
|
+
* console.error('처리 실패:', result.error.message);
|
|
79
|
+
* console.log('에러 코드:', result.error.code);
|
|
80
|
+
*
|
|
81
|
+
* // 부분적으로 처리된 결과가 있다면 활용
|
|
82
|
+
* if (result.partialResult) {
|
|
83
|
+
* console.log('부분 결과:', result.partialResult.files.length, '개 파일');
|
|
84
|
+
* }
|
|
85
|
+
* } else {
|
|
86
|
+
* // 성공한 경우
|
|
87
|
+
* console.log('처리 성공:', result.files.length, '개 파일');
|
|
88
|
+
* console.log('처리 시간:', result.metadata.processingTime, 'ms');
|
|
89
|
+
* }
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```tsx
|
|
94
|
+
* // try-catch 없이 에러 처리
|
|
95
|
+
* const handleDrop = async (event: React.DragEvent<HTMLDivElement>) => {
|
|
96
|
+
* event.preventDefault();
|
|
97
|
+
*
|
|
98
|
+
* const result = await processFileTreeDropSafe(event, {
|
|
99
|
+
* filter: { maxSize: 5 * 1024 * 1024 }, // 5MB 제한
|
|
100
|
+
* callbacks: {
|
|
101
|
+
* onError: (error, item) => {
|
|
102
|
+
* // 개별 파일 에러는 여기서 처리
|
|
103
|
+
* console.warn(`${item?.name} 건너뜀:`, error.message);
|
|
104
|
+
* }
|
|
105
|
+
* }
|
|
106
|
+
* });
|
|
107
|
+
*
|
|
108
|
+
* // 타입 가드를 사용한 안전한 처리
|
|
109
|
+
* if ('error' in result) {
|
|
110
|
+
* setError(result.error.message);
|
|
111
|
+
* } else {
|
|
112
|
+
* setFiles(result.files);
|
|
113
|
+
* setProcessingTime(result.metadata.processingTime);
|
|
114
|
+
* }
|
|
115
|
+
* };
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* @param source - 파일 드롭 소스 (React DragEvent, FileList, FileSystemHandle[], File[])
|
|
119
|
+
* @param options - 처리 옵션 (필터링, 콜백, 중단 신호 등)
|
|
120
|
+
*
|
|
121
|
+
* @returns Promise<SafeProcessResult> - 성공시 ProcessResult, 실패시 ErrorResult
|
|
122
|
+
* - 성공: ProcessResult와 동일한 구조
|
|
123
|
+
* - 실패: { success: false, error: FileDropError, partialResult?: ProcessResult }
|
|
124
|
+
*
|
|
125
|
+
* @see {@link processFileTreeDrop} 에러를 예외로 던지는 기본 버전
|
|
126
|
+
* @see {@link SafeProcessResult} 반환 타입 상세 정보
|
|
127
|
+
* @see {@link ErrorResult} 실패시 반환 구조
|
|
128
|
+
*
|
|
129
|
+
* @since 1.0.0
|
|
130
|
+
*/
|
|
131
|
+
export declare function processFileTreeDropSafe(source: FileDropSource, options?: FileDropOptions): Promise<SafeProcessResult>;
|
|
132
|
+
//#endregion
|
|
133
|
+
//# sourceMappingURL=process-file-drop.d.cts.map
|