@cp949/mui-react19 2.0.3 → 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.
Files changed (990) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  4. package/dist/_virtual/_rolldown/runtime.js +1 -0
  5. package/dist/components/Center.cjs +2 -0
  6. package/dist/components/Center.cjs.map +1 -0
  7. package/dist/components/Center.d.cts +11 -0
  8. package/dist/components/Center.d.ts +11 -0
  9. package/dist/components/Center.js +2 -0
  10. package/dist/components/Center.js.map +1 -0
  11. package/dist/components/CooldownButton.cjs +2 -0
  12. package/dist/components/CooldownButton.cjs.map +1 -0
  13. package/dist/components/CooldownButton.d.cts +14 -0
  14. package/dist/components/CooldownButton.d.ts +14 -0
  15. package/dist/components/CooldownButton.js +2 -0
  16. package/dist/components/CooldownButton.js.map +1 -0
  17. package/dist/components/CooldownButtonBase.cjs +2 -0
  18. package/dist/components/CooldownButtonBase.cjs.map +1 -0
  19. package/dist/components/CooldownButtonBase.d.cts +14 -0
  20. package/dist/components/CooldownButtonBase.d.ts +14 -0
  21. package/dist/components/CooldownButtonBase.js +2 -0
  22. package/dist/components/CooldownButtonBase.js.map +1 -0
  23. package/dist/components/CooldownIconButton.cjs +2 -0
  24. package/dist/components/CooldownIconButton.cjs.map +1 -0
  25. package/dist/components/CooldownIconButton.d.cts +14 -0
  26. package/dist/components/CooldownIconButton.d.ts +14 -0
  27. package/dist/components/CooldownIconButton.js +2 -0
  28. package/dist/components/CooldownIconButton.js.map +1 -0
  29. package/dist/components/CopyButtonWrapper.cjs +2 -0
  30. package/dist/components/CopyButtonWrapper.cjs.map +1 -0
  31. package/dist/components/CopyButtonWrapper.d.cts +75 -0
  32. package/dist/components/CopyButtonWrapper.d.ts +75 -0
  33. package/dist/components/CopyButtonWrapper.js +2 -0
  34. package/dist/components/CopyButtonWrapper.js.map +1 -0
  35. package/dist/components/CustomTableBody.cjs +2 -0
  36. package/dist/components/CustomTableBody.cjs.map +1 -0
  37. package/dist/components/CustomTableBody.d.cts +9 -0
  38. package/dist/components/CustomTableBody.d.ts +9 -0
  39. package/dist/components/CustomTableBody.js +2 -0
  40. package/dist/components/CustomTableBody.js.map +1 -0
  41. package/dist/components/DebouncedButton.cjs +2 -0
  42. package/dist/components/DebouncedButton.cjs.map +1 -0
  43. package/dist/components/DebouncedButton.d.cts +11 -0
  44. package/dist/components/DebouncedButton.d.ts +11 -0
  45. package/dist/components/DebouncedButton.js +2 -0
  46. package/dist/components/DebouncedButton.js.map +1 -0
  47. package/dist/components/DebouncedButtonBase.cjs +2 -0
  48. package/dist/components/DebouncedButtonBase.cjs.map +1 -0
  49. package/dist/components/DebouncedButtonBase.d.cts +11 -0
  50. package/dist/components/DebouncedButtonBase.d.ts +11 -0
  51. package/dist/components/DebouncedButtonBase.js +2 -0
  52. package/dist/components/DebouncedButtonBase.js.map +1 -0
  53. package/dist/components/DebouncedIconButton.cjs +2 -0
  54. package/dist/components/DebouncedIconButton.cjs.map +1 -0
  55. package/dist/components/DebouncedIconButton.d.cts +11 -0
  56. package/dist/components/DebouncedIconButton.d.ts +11 -0
  57. package/dist/components/DebouncedIconButton.js +2 -0
  58. package/dist/components/DebouncedIconButton.js.map +1 -0
  59. package/dist/components/DebouncedRender.cjs +2 -0
  60. package/dist/components/DebouncedRender.cjs.map +1 -0
  61. package/dist/components/DebouncedRender.d.cts +31 -0
  62. package/dist/components/DebouncedRender.d.ts +31 -0
  63. package/dist/components/DebouncedRender.js +2 -0
  64. package/dist/components/DebouncedRender.js.map +1 -0
  65. package/dist/components/DelayedRender.cjs +2 -0
  66. package/dist/components/DelayedRender.cjs.map +1 -0
  67. package/dist/components/DelayedRender.d.cts +34 -0
  68. package/dist/components/DelayedRender.d.ts +34 -0
  69. package/dist/components/DelayedRender.js +2 -0
  70. package/dist/components/DelayedRender.js.map +1 -0
  71. package/dist/components/FileButton.cjs +2 -0
  72. package/dist/components/FileButton.cjs.map +1 -0
  73. package/dist/components/FileButton.d.cts +87 -0
  74. package/dist/components/FileButton.d.ts +87 -0
  75. package/dist/components/FileButton.js +2 -0
  76. package/dist/components/FileButton.js.map +1 -0
  77. package/dist/components/FlexItemsContainer.cjs +2 -0
  78. package/dist/components/FlexItemsContainer.cjs.map +1 -0
  79. package/dist/components/FlexItemsContainer.d.cts +51 -0
  80. package/dist/components/FlexItemsContainer.d.ts +51 -0
  81. package/dist/components/FlexItemsContainer.js +2 -0
  82. package/dist/components/FlexItemsContainer.js.map +1 -0
  83. package/dist/components/FloatingIndicator/FloatingIndicator.cjs +2 -0
  84. package/dist/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -0
  85. package/dist/components/FloatingIndicator/FloatingIndicator.d.cts +27 -0
  86. package/dist/components/FloatingIndicator/FloatingIndicator.d.ts +27 -0
  87. package/dist/components/FloatingIndicator/FloatingIndicator.js +2 -0
  88. package/dist/components/FloatingIndicator/FloatingIndicator.js.map +1 -0
  89. package/dist/components/FloatingIndicator/index.cjs +2 -0
  90. package/dist/components/FloatingIndicator/index.cjs.map +1 -0
  91. package/dist/components/FloatingIndicator/index.d.cts +2 -0
  92. package/dist/components/FloatingIndicator/index.d.ts +2 -0
  93. package/dist/components/FloatingIndicator/index.js +2 -0
  94. package/dist/components/FloatingIndicator/index.js.map +1 -0
  95. package/dist/components/FloatingIndicator/useFloatingIndicator.cjs +2 -0
  96. package/dist/components/FloatingIndicator/useFloatingIndicator.cjs.map +1 -0
  97. package/dist/components/FloatingIndicator/useFloatingIndicator.js +2 -0
  98. package/dist/components/FloatingIndicator/useFloatingIndicator.js.map +1 -0
  99. package/dist/components/Hide.cjs +2 -0
  100. package/dist/components/Hide.cjs.map +1 -0
  101. package/dist/components/Hide.d.cts +12 -0
  102. package/dist/components/Hide.d.ts +12 -0
  103. package/dist/components/Hide.js +2 -0
  104. package/dist/components/Hide.js.map +1 -0
  105. package/dist/components/Highlight/Highlight.cjs +2 -0
  106. package/dist/components/Highlight/Highlight.cjs.map +1 -0
  107. package/dist/components/Highlight/Highlight.d.cts +93 -0
  108. package/dist/components/Highlight/Highlight.d.ts +93 -0
  109. package/dist/components/Highlight/Highlight.js +2 -0
  110. package/dist/components/Highlight/Highlight.js.map +1 -0
  111. package/dist/components/Highlight/highlighter/highlighter.cjs +2 -0
  112. package/dist/components/Highlight/highlighter/highlighter.cjs.map +1 -0
  113. package/dist/components/Highlight/highlighter/highlighter.js +2 -0
  114. package/dist/components/Highlight/highlighter/highlighter.js.map +1 -0
  115. package/dist/components/Highlight/index.d.cts +2 -0
  116. package/dist/components/Highlight/index.d.ts +2 -0
  117. package/dist/components/LengthLimitHelperText.cjs +2 -0
  118. package/dist/components/LengthLimitHelperText.cjs.map +1 -0
  119. package/dist/components/LengthLimitHelperText.d.cts +13 -0
  120. package/dist/components/LengthLimitHelperText.d.ts +13 -0
  121. package/dist/components/LengthLimitHelperText.js +2 -0
  122. package/dist/components/LengthLimitHelperText.js.map +1 -0
  123. package/dist/components/LgOrUp.cjs +2 -0
  124. package/dist/components/LgOrUp.cjs.map +1 -0
  125. package/dist/components/LgOrUp.d.cts +8 -0
  126. package/dist/components/LgOrUp.d.ts +8 -0
  127. package/dist/components/LgOrUp.js +2 -0
  128. package/dist/components/LgOrUp.js.map +1 -0
  129. package/dist/components/ListPagination.cjs +2 -0
  130. package/dist/components/ListPagination.cjs.map +1 -0
  131. package/dist/components/ListPagination.d.cts +55 -0
  132. package/dist/components/ListPagination.d.ts +55 -0
  133. package/dist/components/ListPagination.js +2 -0
  134. package/dist/components/ListPagination.js.map +1 -0
  135. package/dist/components/Mark.cjs +2 -0
  136. package/dist/components/Mark.cjs.map +1 -0
  137. package/dist/components/Mark.d.cts +17 -0
  138. package/dist/components/Mark.d.ts +17 -0
  139. package/dist/components/Mark.js +2 -0
  140. package/dist/components/Mark.js.map +1 -0
  141. package/dist/components/MdOrDown.cjs +2 -0
  142. package/dist/components/MdOrDown.cjs.map +1 -0
  143. package/dist/components/MdOrDown.d.cts +8 -0
  144. package/dist/components/MdOrDown.d.ts +8 -0
  145. package/dist/components/MdOrDown.js +2 -0
  146. package/dist/components/MdOrDown.js.map +1 -0
  147. package/dist/components/MdOrUp.cjs +2 -0
  148. package/dist/components/MdOrUp.cjs.map +1 -0
  149. package/dist/components/MdOrUp.d.cts +8 -0
  150. package/dist/components/MdOrUp.d.ts +8 -0
  151. package/dist/components/MdOrUp.js +2 -0
  152. package/dist/components/MdOrUp.js.map +1 -0
  153. package/dist/components/Paper.cjs +2 -0
  154. package/dist/components/Paper.cjs.map +1 -0
  155. package/dist/components/Paper.d.cts +10 -0
  156. package/dist/components/Paper.d.ts +10 -0
  157. package/dist/components/Paper.js +2 -0
  158. package/dist/components/Paper.js.map +1 -0
  159. package/dist/components/PasswordTextField.cjs +2 -0
  160. package/dist/components/PasswordTextField.cjs.map +1 -0
  161. package/dist/components/PasswordTextField.d.cts +25 -0
  162. package/dist/components/PasswordTextField.d.ts +25 -0
  163. package/dist/components/PasswordTextField.js +2 -0
  164. package/dist/components/PasswordTextField.js.map +1 -0
  165. package/dist/components/SearchBoxDebouncer.cjs +2 -0
  166. package/dist/components/SearchBoxDebouncer.cjs.map +1 -0
  167. package/dist/components/SearchBoxDebouncer.d.cts +46 -0
  168. package/dist/components/SearchBoxDebouncer.d.ts +46 -0
  169. package/dist/components/SearchBoxDebouncer.js +2 -0
  170. package/dist/components/SearchBoxDebouncer.js.map +1 -0
  171. package/dist/components/SegmentedControl/SegmentedControl.cjs +2 -0
  172. package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -0
  173. package/dist/components/SegmentedControl/SegmentedControl.d.cts +57 -0
  174. package/dist/components/SegmentedControl/SegmentedControl.d.ts +57 -0
  175. package/dist/components/SegmentedControl/SegmentedControl.js +2 -0
  176. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
  177. package/dist/components/SegmentedControl/components.cjs +2 -0
  178. package/dist/components/SegmentedControl/components.cjs.map +1 -0
  179. package/dist/components/SegmentedControl/components.js +2 -0
  180. package/dist/components/SegmentedControl/components.js.map +1 -0
  181. package/dist/components/SegmentedControl/index.d.cts +2 -0
  182. package/dist/components/SegmentedControl/index.d.ts +2 -0
  183. package/dist/components/Show.cjs +2 -0
  184. package/dist/components/Show.cjs.map +1 -0
  185. package/dist/components/Show.d.cts +10 -0
  186. package/dist/components/Show.d.ts +10 -0
  187. package/dist/components/Show.js +2 -0
  188. package/dist/components/Show.js.map +1 -0
  189. package/dist/components/SmOrDown.cjs +2 -0
  190. package/dist/components/SmOrDown.cjs.map +1 -0
  191. package/dist/components/SmOrDown.d.cts +8 -0
  192. package/dist/components/SmOrDown.d.ts +8 -0
  193. package/dist/components/SmOrDown.js +2 -0
  194. package/dist/components/SmOrDown.js.map +1 -0
  195. package/dist/components/SmOrUp.cjs +2 -0
  196. package/dist/components/SmOrUp.cjs.map +1 -0
  197. package/dist/components/SmOrUp.d.cts +8 -0
  198. package/dist/components/SmOrUp.d.ts +8 -0
  199. package/dist/components/SmOrUp.js +2 -0
  200. package/dist/components/SmOrUp.js.map +1 -0
  201. package/dist/components/Space.cjs +2 -0
  202. package/dist/components/Space.cjs.map +1 -0
  203. package/dist/components/Space.d.cts +14 -0
  204. package/dist/components/Space.d.ts +14 -0
  205. package/dist/components/Space.js +2 -0
  206. package/dist/components/Space.js.map +1 -0
  207. package/dist/components/Spoiler.cjs +2 -0
  208. package/dist/components/Spoiler.cjs.map +1 -0
  209. package/dist/components/Spoiler.d.cts +33 -0
  210. package/dist/components/Spoiler.d.ts +33 -0
  211. package/dist/components/Spoiler.js +2 -0
  212. package/dist/components/Spoiler.js.map +1 -0
  213. package/dist/components/XsOrDown.cjs +2 -0
  214. package/dist/components/XsOrDown.cjs.map +1 -0
  215. package/dist/components/XsOrDown.d.cts +8 -0
  216. package/dist/components/XsOrDown.d.ts +8 -0
  217. package/dist/components/XsOrDown.js +2 -0
  218. package/dist/components/XsOrDown.js.map +1 -0
  219. package/dist/components/YmTypography.cjs +2 -0
  220. package/dist/components/YmTypography.cjs.map +1 -0
  221. package/dist/components/YmTypography.d.cts +23 -0
  222. package/dist/components/YmTypography.d.ts +23 -0
  223. package/dist/components/YmTypography.js +2 -0
  224. package/dist/components/YmTypography.js.map +1 -0
  225. package/dist/components/YmdTextField.cjs +2 -0
  226. package/dist/components/YmdTextField.cjs.map +1 -0
  227. package/dist/components/YmdTextField.d.cts +48 -0
  228. package/dist/components/YmdTextField.d.ts +48 -0
  229. package/dist/components/YmdTextField.js +2 -0
  230. package/dist/components/YmdTextField.js.map +1 -0
  231. package/dist/components/YmdTypography.cjs +2 -0
  232. package/dist/components/YmdTypography.cjs.map +1 -0
  233. package/dist/components/YmdTypography.d.cts +23 -0
  234. package/dist/components/YmdTypography.d.ts +23 -0
  235. package/dist/components/YmdTypography.js +2 -0
  236. package/dist/components/YmdTypography.js.map +1 -0
  237. package/dist/components/absolute-box/create-absolute-box.cjs +2 -0
  238. package/dist/components/absolute-box/create-absolute-box.cjs.map +1 -0
  239. package/dist/components/absolute-box/create-absolute-box.js +2 -0
  240. package/dist/components/absolute-box/create-absolute-box.js.map +1 -0
  241. package/dist/components/bottom-absolute/BottomAbsolute.cjs +2 -0
  242. package/dist/components/bottom-absolute/BottomAbsolute.cjs.map +1 -0
  243. package/dist/components/bottom-absolute/BottomAbsolute.d.cts +20 -0
  244. package/dist/components/bottom-absolute/BottomAbsolute.d.ts +20 -0
  245. package/dist/components/bottom-absolute/BottomAbsolute.js +2 -0
  246. package/dist/components/bottom-absolute/BottomAbsolute.js.map +1 -0
  247. package/dist/components/bottom-absolute/BottomAbsoluteCenter.cjs +2 -0
  248. package/dist/components/bottom-absolute/BottomAbsoluteCenter.cjs.map +1 -0
  249. package/dist/components/bottom-absolute/BottomAbsoluteCenter.d.cts +10 -0
  250. package/dist/components/bottom-absolute/BottomAbsoluteCenter.d.ts +10 -0
  251. package/dist/components/bottom-absolute/BottomAbsoluteCenter.js +2 -0
  252. package/dist/components/bottom-absolute/BottomAbsoluteCenter.js.map +1 -0
  253. package/dist/components/bottom-absolute/BottomAbsoluteLeft.cjs +2 -0
  254. package/dist/components/bottom-absolute/BottomAbsoluteLeft.cjs.map +1 -0
  255. package/dist/components/bottom-absolute/BottomAbsoluteLeft.d.cts +11 -0
  256. package/dist/components/bottom-absolute/BottomAbsoluteLeft.d.ts +11 -0
  257. package/dist/components/bottom-absolute/BottomAbsoluteLeft.js +2 -0
  258. package/dist/components/bottom-absolute/BottomAbsoluteLeft.js.map +1 -0
  259. package/dist/components/bottom-absolute/BottomAbsoluteRight.cjs +2 -0
  260. package/dist/components/bottom-absolute/BottomAbsoluteRight.cjs.map +1 -0
  261. package/dist/components/bottom-absolute/BottomAbsoluteRight.d.cts +11 -0
  262. package/dist/components/bottom-absolute/BottomAbsoluteRight.d.ts +11 -0
  263. package/dist/components/bottom-absolute/BottomAbsoluteRight.js +2 -0
  264. package/dist/components/bottom-absolute/BottomAbsoluteRight.js.map +1 -0
  265. package/dist/components/bottom-absolute/index.d.cts +5 -0
  266. package/dist/components/bottom-absolute/index.d.ts +5 -0
  267. package/dist/components/center-absolute/CenterAbsolute.cjs +2 -0
  268. package/dist/components/center-absolute/CenterAbsolute.cjs.map +1 -0
  269. package/dist/components/center-absolute/CenterAbsolute.d.cts +19 -0
  270. package/dist/components/center-absolute/CenterAbsolute.d.ts +19 -0
  271. package/dist/components/center-absolute/CenterAbsolute.js +2 -0
  272. package/dist/components/center-absolute/CenterAbsolute.js.map +1 -0
  273. package/dist/components/center-absolute/CenterAbsoluteCenter.cjs +2 -0
  274. package/dist/components/center-absolute/CenterAbsoluteCenter.cjs.map +1 -0
  275. package/dist/components/center-absolute/CenterAbsoluteCenter.d.cts +9 -0
  276. package/dist/components/center-absolute/CenterAbsoluteCenter.d.ts +9 -0
  277. package/dist/components/center-absolute/CenterAbsoluteCenter.js +2 -0
  278. package/dist/components/center-absolute/CenterAbsoluteCenter.js.map +1 -0
  279. package/dist/components/center-absolute/CenterAbsoluteLeft.cjs +2 -0
  280. package/dist/components/center-absolute/CenterAbsoluteLeft.cjs.map +1 -0
  281. package/dist/components/center-absolute/CenterAbsoluteLeft.d.cts +10 -0
  282. package/dist/components/center-absolute/CenterAbsoluteLeft.d.ts +10 -0
  283. package/dist/components/center-absolute/CenterAbsoluteLeft.js +2 -0
  284. package/dist/components/center-absolute/CenterAbsoluteLeft.js.map +1 -0
  285. package/dist/components/center-absolute/CenterAbsoluteRight.cjs +2 -0
  286. package/dist/components/center-absolute/CenterAbsoluteRight.cjs.map +1 -0
  287. package/dist/components/center-absolute/CenterAbsoluteRight.d.cts +10 -0
  288. package/dist/components/center-absolute/CenterAbsoluteRight.d.ts +10 -0
  289. package/dist/components/center-absolute/CenterAbsoluteRight.js +2 -0
  290. package/dist/components/center-absolute/CenterAbsoluteRight.js.map +1 -0
  291. package/dist/components/center-absolute/index.d.cts +5 -0
  292. package/dist/components/center-absolute/index.d.ts +5 -0
  293. package/dist/components/flex/FlexColumn.cjs +2 -0
  294. package/dist/components/flex/FlexColumn.cjs.map +1 -0
  295. package/dist/components/flex/FlexColumn.d.cts +23 -0
  296. package/dist/components/flex/FlexColumn.d.ts +23 -0
  297. package/dist/components/flex/FlexColumn.js +2 -0
  298. package/dist/components/flex/FlexColumn.js.map +1 -0
  299. package/dist/components/flex/FlexRow.cjs +2 -0
  300. package/dist/components/flex/FlexRow.cjs.map +1 -0
  301. package/dist/components/flex/FlexRow.d.cts +23 -0
  302. package/dist/components/flex/FlexRow.d.ts +23 -0
  303. package/dist/components/flex/FlexRow.js +2 -0
  304. package/dist/components/flex/FlexRow.js.map +1 -0
  305. package/dist/components/flex/index.d.cts +4 -0
  306. package/dist/components/flex/index.d.ts +4 -0
  307. package/dist/components/flex/types.d.cts +11 -0
  308. package/dist/components/flex/types.d.ts +11 -0
  309. package/dist/components/index.d.cts +69 -0
  310. package/dist/components/index.d.ts +69 -0
  311. package/dist/components/layout/create-layout-component.cjs +2 -0
  312. package/dist/components/layout/create-layout-component.cjs.map +1 -0
  313. package/dist/components/layout/create-layout-component.js +2 -0
  314. package/dist/components/layout/create-layout-component.js.map +1 -0
  315. package/dist/components/portlet/Portlet.cjs +2 -0
  316. package/dist/components/portlet/Portlet.cjs.map +1 -0
  317. package/dist/components/portlet/Portlet.d.cts +40 -0
  318. package/dist/components/portlet/Portlet.d.ts +40 -0
  319. package/dist/components/portlet/Portlet.js +2 -0
  320. package/dist/components/portlet/Portlet.js.map +1 -0
  321. package/dist/components/portlet/PortletContent.cjs +2 -0
  322. package/dist/components/portlet/PortletContent.cjs.map +1 -0
  323. package/dist/components/portlet/PortletContent.d.cts +21 -0
  324. package/dist/components/portlet/PortletContent.d.ts +21 -0
  325. package/dist/components/portlet/PortletContent.js +2 -0
  326. package/dist/components/portlet/PortletContent.js.map +1 -0
  327. package/dist/components/portlet/PortletFooter.cjs +2 -0
  328. package/dist/components/portlet/PortletFooter.cjs.map +1 -0
  329. package/dist/components/portlet/PortletFooter.d.cts +21 -0
  330. package/dist/components/portlet/PortletFooter.d.ts +21 -0
  331. package/dist/components/portlet/PortletFooter.js +2 -0
  332. package/dist/components/portlet/PortletFooter.js.map +1 -0
  333. package/dist/components/portlet/PortletHeader.cjs +2 -0
  334. package/dist/components/portlet/PortletHeader.cjs.map +1 -0
  335. package/dist/components/portlet/PortletHeader.d.cts +25 -0
  336. package/dist/components/portlet/PortletHeader.d.ts +25 -0
  337. package/dist/components/portlet/PortletHeader.js +2 -0
  338. package/dist/components/portlet/PortletHeader.js.map +1 -0
  339. package/dist/components/portlet/PortletLabel.cjs +2 -0
  340. package/dist/components/portlet/PortletLabel.cjs.map +1 -0
  341. package/dist/components/portlet/PortletLabel.d.cts +25 -0
  342. package/dist/components/portlet/PortletLabel.d.ts +25 -0
  343. package/dist/components/portlet/PortletLabel.js +2 -0
  344. package/dist/components/portlet/PortletLabel.js.map +1 -0
  345. package/dist/components/portlet/PortletTitle.cjs +2 -0
  346. package/dist/components/portlet/PortletTitle.cjs.map +1 -0
  347. package/dist/components/portlet/PortletTitle.d.cts +48 -0
  348. package/dist/components/portlet/PortletTitle.d.ts +48 -0
  349. package/dist/components/portlet/PortletTitle.js +2 -0
  350. package/dist/components/portlet/PortletTitle.js.map +1 -0
  351. package/dist/components/portlet/PortletToolbar.cjs +2 -0
  352. package/dist/components/portlet/PortletToolbar.cjs.map +1 -0
  353. package/dist/components/portlet/PortletToolbar.d.cts +19 -0
  354. package/dist/components/portlet/PortletToolbar.d.ts +19 -0
  355. package/dist/components/portlet/PortletToolbar.js +2 -0
  356. package/dist/components/portlet/PortletToolbar.js.map +1 -0
  357. package/dist/components/portlet/index.d.cts +8 -0
  358. package/dist/components/portlet/index.d.ts +8 -0
  359. package/dist/components/stack/StackColumn.cjs +2 -0
  360. package/dist/components/stack/StackColumn.cjs.map +1 -0
  361. package/dist/components/stack/StackColumn.d.cts +30 -0
  362. package/dist/components/stack/StackColumn.d.ts +30 -0
  363. package/dist/components/stack/StackColumn.js +2 -0
  364. package/dist/components/stack/StackColumn.js.map +1 -0
  365. package/dist/components/stack/StackRow.cjs +2 -0
  366. package/dist/components/stack/StackRow.cjs.map +1 -0
  367. package/dist/components/stack/StackRow.d.cts +29 -0
  368. package/dist/components/stack/StackRow.d.ts +29 -0
  369. package/dist/components/stack/StackRow.js +2 -0
  370. package/dist/components/stack/StackRow.js.map +1 -0
  371. package/dist/components/stack/index.d.cts +3 -0
  372. package/dist/components/stack/index.d.ts +3 -0
  373. package/dist/components/top-absolute/TopAbsolute.cjs +2 -0
  374. package/dist/components/top-absolute/TopAbsolute.cjs.map +1 -0
  375. package/dist/components/top-absolute/TopAbsolute.d.cts +38 -0
  376. package/dist/components/top-absolute/TopAbsolute.d.ts +38 -0
  377. package/dist/components/top-absolute/TopAbsolute.js +2 -0
  378. package/dist/components/top-absolute/TopAbsolute.js.map +1 -0
  379. package/dist/components/top-absolute/TopAbsoluteCenter.cjs +2 -0
  380. package/dist/components/top-absolute/TopAbsoluteCenter.cjs.map +1 -0
  381. package/dist/components/top-absolute/TopAbsoluteCenter.d.cts +40 -0
  382. package/dist/components/top-absolute/TopAbsoluteCenter.d.ts +40 -0
  383. package/dist/components/top-absolute/TopAbsoluteCenter.js +2 -0
  384. package/dist/components/top-absolute/TopAbsoluteCenter.js.map +1 -0
  385. package/dist/components/top-absolute/TopAbsoluteLeft.cjs +2 -0
  386. package/dist/components/top-absolute/TopAbsoluteLeft.cjs.map +1 -0
  387. package/dist/components/top-absolute/TopAbsoluteLeft.d.cts +46 -0
  388. package/dist/components/top-absolute/TopAbsoluteLeft.d.ts +46 -0
  389. package/dist/components/top-absolute/TopAbsoluteLeft.js +2 -0
  390. package/dist/components/top-absolute/TopAbsoluteLeft.js.map +1 -0
  391. package/dist/components/top-absolute/TopAbsoluteRight.cjs +2 -0
  392. package/dist/components/top-absolute/TopAbsoluteRight.cjs.map +1 -0
  393. package/dist/components/top-absolute/TopAbsoluteRight.d.cts +46 -0
  394. package/dist/components/top-absolute/TopAbsoluteRight.d.ts +46 -0
  395. package/dist/components/top-absolute/TopAbsoluteRight.js +2 -0
  396. package/dist/components/top-absolute/TopAbsoluteRight.js.map +1 -0
  397. package/dist/components/top-absolute/index.d.cts +5 -0
  398. package/dist/components/top-absolute/index.d.ts +5 -0
  399. package/dist/eventemitter/eventemitter3.cjs +2 -0
  400. package/dist/eventemitter/eventemitter3.cjs.map +1 -0
  401. package/dist/eventemitter/eventemitter3.d.cts +53 -0
  402. package/dist/eventemitter/eventemitter3.d.ts +53 -0
  403. package/dist/eventemitter/eventemitter3.js +2 -0
  404. package/dist/eventemitter/eventemitter3.js.map +1 -0
  405. package/dist/eventemitter/types.d.cts +17 -0
  406. package/dist/eventemitter/types.d.ts +17 -0
  407. package/dist/file-drop/handle-file-tree-drop.cjs +2 -0
  408. package/dist/file-drop/handle-file-tree-drop.cjs.map +1 -0
  409. package/dist/file-drop/handle-file-tree-drop.d.cts +46 -0
  410. package/dist/file-drop/handle-file-tree-drop.d.ts +46 -0
  411. package/dist/file-drop/handle-file-tree-drop.js +2 -0
  412. package/dist/file-drop/handle-file-tree-drop.js.map +1 -0
  413. package/dist/file-drop/index.cjs +1 -2
  414. package/dist/file-drop/index.d.cts +7 -749
  415. package/dist/file-drop/index.d.ts +7 -749
  416. package/dist/file-drop/index.js +1 -2
  417. package/dist/file-drop/internal/debug-logger.cjs +2 -0
  418. package/dist/file-drop/internal/debug-logger.cjs.map +1 -0
  419. package/dist/file-drop/internal/debug-logger.js +2 -0
  420. package/dist/file-drop/internal/debug-logger.js.map +1 -0
  421. package/dist/file-drop/internal/path-util.cjs +2 -0
  422. package/dist/file-drop/internal/path-util.cjs.map +1 -0
  423. package/dist/file-drop/internal/path-util.d.cts +39 -0
  424. package/dist/file-drop/internal/path-util.d.ts +39 -0
  425. package/dist/file-drop/internal/path-util.js +2 -0
  426. package/dist/file-drop/internal/path-util.js.map +1 -0
  427. package/dist/file-drop/internal/traverse-tree.cjs +2 -0
  428. package/dist/file-drop/internal/traverse-tree.cjs.map +1 -0
  429. package/dist/file-drop/internal/traverse-tree.js +2 -0
  430. package/dist/file-drop/internal/traverse-tree.js.map +1 -0
  431. package/dist/file-drop/internal/util.cjs +2 -0
  432. package/dist/file-drop/internal/util.cjs.map +1 -0
  433. package/dist/file-drop/internal/util.js +2 -0
  434. package/dist/file-drop/internal/util.js.map +1 -0
  435. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.cjs +2 -0
  436. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.cjs.map +1 -0
  437. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.js +2 -0
  438. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.js.map +1 -0
  439. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.cjs +2 -0
  440. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.cjs.map +1 -0
  441. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.js +2 -0
  442. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.js.map +1 -0
  443. package/dist/file-drop/process-file-drop.cjs +2 -0
  444. package/dist/file-drop/process-file-drop.cjs.map +1 -0
  445. package/dist/file-drop/process-file-drop.d.cts +133 -0
  446. package/dist/file-drop/process-file-drop.d.ts +133 -0
  447. package/dist/file-drop/process-file-drop.js +2 -0
  448. package/dist/file-drop/process-file-drop.js.map +1 -0
  449. package/dist/file-drop/types.cjs +2 -0
  450. package/dist/file-drop/types.cjs.map +1 -0
  451. package/dist/file-drop/types.d.cts +489 -0
  452. package/dist/file-drop/types.d.ts +489 -0
  453. package/dist/file-drop/types.js +2 -0
  454. package/dist/file-drop/types.js.map +1 -0
  455. package/dist/file-drop/utils/file-utils.cjs +2 -0
  456. package/dist/file-drop/utils/file-utils.cjs.map +1 -0
  457. package/dist/file-drop/utils/file-utils.d.cts +31 -0
  458. package/dist/file-drop/utils/file-utils.d.ts +31 -0
  459. package/dist/file-drop/utils/file-utils.js +2 -0
  460. package/dist/file-drop/utils/file-utils.js.map +1 -0
  461. package/dist/file-drop/utils/filter.cjs +2 -0
  462. package/dist/file-drop/utils/filter.cjs.map +1 -0
  463. package/dist/file-drop/utils/filter.d.cts +25 -0
  464. package/dist/file-drop/utils/filter.d.ts +25 -0
  465. package/dist/file-drop/utils/filter.js +2 -0
  466. package/dist/file-drop/utils/filter.js.map +1 -0
  467. package/dist/file-drop/utils/parallel-map.cjs +2 -0
  468. package/dist/file-drop/utils/parallel-map.cjs.map +1 -0
  469. package/dist/file-drop/utils/parallel-map.js +2 -0
  470. package/dist/file-drop/utils/parallel-map.js.map +1 -0
  471. package/dist/file-drop/utils/progress-tracker.cjs +2 -0
  472. package/dist/file-drop/utils/progress-tracker.cjs.map +1 -0
  473. package/dist/file-drop/utils/progress-tracker.js +2 -0
  474. package/dist/file-drop/utils/progress-tracker.js.map +1 -0
  475. package/dist/helper/index.cjs +1 -2
  476. package/dist/helper/index.d.cts +3 -113
  477. package/dist/helper/index.d.ts +3 -113
  478. package/dist/helper/index.js +1 -2
  479. package/dist/helper/mui-css-vars.cjs +2 -0
  480. package/dist/helper/mui-css-vars.cjs.map +1 -0
  481. package/dist/helper/mui-css-vars.d.cts +62 -0
  482. package/dist/helper/mui-css-vars.d.ts +62 -0
  483. package/dist/helper/mui-css-vars.js +2 -0
  484. package/dist/helper/mui-css-vars.js.map +1 -0
  485. package/dist/helper/mui-media-queries.cjs +2 -0
  486. package/dist/helper/mui-media-queries.cjs.map +1 -0
  487. package/dist/helper/mui-media-queries.d.cts +38 -0
  488. package/dist/helper/mui-media-queries.d.ts +38 -0
  489. package/dist/helper/mui-media-queries.js +2 -0
  490. package/dist/helper/mui-media-queries.js.map +1 -0
  491. package/dist/hooks/index.cjs +1 -2
  492. package/dist/hooks/index.d.cts +69 -1373
  493. package/dist/hooks/index.d.ts +69 -1373
  494. package/dist/hooks/index.js +1 -2
  495. package/dist/hooks/types.d.cts +13 -0
  496. package/dist/hooks/types.d.ts +13 -0
  497. package/dist/hooks/useAbsolutePosition.cjs +2 -0
  498. package/dist/hooks/useAbsolutePosition.cjs.map +1 -0
  499. package/dist/hooks/useAbsolutePosition.d.cts +13 -0
  500. package/dist/hooks/useAbsolutePosition.d.ts +13 -0
  501. package/dist/hooks/useAbsolutePosition.js +2 -0
  502. package/dist/hooks/useAbsolutePosition.js.map +1 -0
  503. package/dist/hooks/useAudioUnlocked.cjs +2 -0
  504. package/dist/hooks/useAudioUnlocked.cjs.map +1 -0
  505. package/dist/hooks/useAudioUnlocked.d.cts +32 -0
  506. package/dist/hooks/useAudioUnlocked.d.ts +32 -0
  507. package/dist/hooks/useAudioUnlocked.js +2 -0
  508. package/dist/hooks/useAudioUnlocked.js.map +1 -0
  509. package/dist/hooks/useBehaviorSubject.cjs +2 -0
  510. package/dist/hooks/useBehaviorSubject.cjs.map +1 -0
  511. package/dist/hooks/useBehaviorSubject.d.cts +6 -0
  512. package/dist/hooks/useBehaviorSubject.d.ts +6 -0
  513. package/dist/hooks/useBehaviorSubject.js +2 -0
  514. package/dist/hooks/useBehaviorSubject.js.map +1 -0
  515. package/dist/hooks/useCallbackRef.cjs +2 -0
  516. package/dist/hooks/useCallbackRef.cjs.map +1 -0
  517. package/dist/hooks/useCallbackRef.d.cts +33 -0
  518. package/dist/hooks/useCallbackRef.d.ts +33 -0
  519. package/dist/hooks/useCallbackRef.js +2 -0
  520. package/dist/hooks/useCallbackRef.js.map +1 -0
  521. package/dist/hooks/useCenterInView.cjs +2 -0
  522. package/dist/hooks/useCenterInView.cjs.map +1 -0
  523. package/dist/hooks/useCenterInView.d.cts +29 -0
  524. package/dist/hooks/useCenterInView.d.ts +29 -0
  525. package/dist/hooks/useCenterInView.js +2 -0
  526. package/dist/hooks/useCenterInView.js.map +1 -0
  527. package/dist/hooks/useClipboard.cjs +2 -0
  528. package/dist/hooks/useClipboard.cjs.map +1 -0
  529. package/dist/hooks/useClipboard.d.cts +36 -0
  530. package/dist/hooks/useClipboard.d.ts +36 -0
  531. package/dist/hooks/useClipboard.js +2 -0
  532. package/dist/hooks/useClipboard.js.map +1 -0
  533. package/dist/hooks/useClosableEffect.cjs +2 -0
  534. package/dist/hooks/useClosableEffect.cjs.map +1 -0
  535. package/dist/hooks/useClosableEffect.d.cts +6 -0
  536. package/dist/hooks/useClosableEffect.d.ts +6 -0
  537. package/dist/hooks/useClosableEffect.js +2 -0
  538. package/dist/hooks/useClosableEffect.js.map +1 -0
  539. package/dist/hooks/useComposedRefs.cjs +2 -0
  540. package/dist/hooks/useComposedRefs.cjs.map +1 -0
  541. package/dist/hooks/useComposedRefs.d.cts +15 -0
  542. package/dist/hooks/useComposedRefs.d.ts +15 -0
  543. package/dist/hooks/useComposedRefs.js +2 -0
  544. package/dist/hooks/useComposedRefs.js.map +1 -0
  545. package/dist/hooks/useConstant.cjs +2 -0
  546. package/dist/hooks/useConstant.cjs.map +1 -0
  547. package/dist/hooks/useConstant.d.cts +4 -0
  548. package/dist/hooks/useConstant.d.ts +4 -0
  549. package/dist/hooks/useConstant.js +2 -0
  550. package/dist/hooks/useConstant.js.map +1 -0
  551. package/dist/hooks/useCooldown.cjs +2 -0
  552. package/dist/hooks/useCooldown.cjs.map +1 -0
  553. package/dist/hooks/useCooldown.d.cts +26 -0
  554. package/dist/hooks/useCooldown.d.ts +26 -0
  555. package/dist/hooks/useCooldown.js +2 -0
  556. package/dist/hooks/useCooldown.js.map +1 -0
  557. package/dist/hooks/useCustomCompareEffect.cjs +2 -0
  558. package/dist/hooks/useCustomCompareEffect.cjs.map +1 -0
  559. package/dist/hooks/useCustomCompareEffect.d.cts +55 -0
  560. package/dist/hooks/useCustomCompareEffect.d.ts +55 -0
  561. package/dist/hooks/useCustomCompareEffect.js +2 -0
  562. package/dist/hooks/useCustomCompareEffect.js.map +1 -0
  563. package/dist/hooks/useCustomCompareMemo.cjs +2 -0
  564. package/dist/hooks/useCustomCompareMemo.cjs.map +1 -0
  565. package/dist/hooks/useCustomCompareMemo.d.cts +14 -0
  566. package/dist/hooks/useCustomCompareMemo.d.ts +14 -0
  567. package/dist/hooks/useCustomCompareMemo.js +2 -0
  568. package/dist/hooks/useCustomCompareMemo.js.map +1 -0
  569. package/dist/hooks/useDebounceEffect.cjs +2 -0
  570. package/dist/hooks/useDebounceEffect.cjs.map +1 -0
  571. package/dist/hooks/useDebounceEffect.d.cts +55 -0
  572. package/dist/hooks/useDebounceEffect.d.ts +55 -0
  573. package/dist/hooks/useDebounceEffect.js +2 -0
  574. package/dist/hooks/useDebounceEffect.js.map +1 -0
  575. package/dist/hooks/useDebounceFn.cjs +2 -0
  576. package/dist/hooks/useDebounceFn.cjs.map +1 -0
  577. package/dist/hooks/useDebounceFn.d.cts +53 -0
  578. package/dist/hooks/useDebounceFn.d.ts +53 -0
  579. package/dist/hooks/useDebounceFn.js +2 -0
  580. package/dist/hooks/useDebounceFn.js.map +1 -0
  581. package/dist/hooks/useDebouncedCallback.cjs +2 -0
  582. package/dist/hooks/useDebouncedCallback.cjs.map +1 -0
  583. package/dist/hooks/useDebouncedCallback.d.cts +39 -0
  584. package/dist/hooks/useDebouncedCallback.d.ts +39 -0
  585. package/dist/hooks/useDebouncedCallback.js +2 -0
  586. package/dist/hooks/useDebouncedCallback.js.map +1 -0
  587. package/dist/hooks/useDebouncedParams.cjs +2 -0
  588. package/dist/hooks/useDebouncedParams.cjs.map +1 -0
  589. package/dist/hooks/useDebouncedParams.d.cts +43 -0
  590. package/dist/hooks/useDebouncedParams.d.ts +43 -0
  591. package/dist/hooks/useDebouncedParams.js +2 -0
  592. package/dist/hooks/useDebouncedParams.js.map +1 -0
  593. package/dist/hooks/useDebouncedState.cjs +2 -0
  594. package/dist/hooks/useDebouncedState.cjs.map +1 -0
  595. package/dist/hooks/useDebouncedState.d.cts +36 -0
  596. package/dist/hooks/useDebouncedState.d.ts +36 -0
  597. package/dist/hooks/useDebouncedState.js +2 -0
  598. package/dist/hooks/useDebouncedState.js.map +1 -0
  599. package/dist/hooks/useDebouncedValue.cjs +2 -0
  600. package/dist/hooks/useDebouncedValue.cjs.map +1 -0
  601. package/dist/hooks/useDebouncedValue.d.cts +23 -0
  602. package/dist/hooks/useDebouncedValue.d.ts +23 -0
  603. package/dist/hooks/useDebouncedValue.js +2 -0
  604. package/dist/hooks/useDebouncedValue.js.map +1 -0
  605. package/dist/hooks/useDeepCompareEffect.cjs +2 -0
  606. package/dist/hooks/useDeepCompareEffect.cjs.map +1 -0
  607. package/dist/hooks/useDeepCompareEffect.d.cts +50 -0
  608. package/dist/hooks/useDeepCompareEffect.d.ts +50 -0
  609. package/dist/hooks/useDeepCompareEffect.js +2 -0
  610. package/dist/hooks/useDeepCompareEffect.js.map +1 -0
  611. package/dist/hooks/useDeepCompareMemo.cjs +2 -0
  612. package/dist/hooks/useDeepCompareMemo.cjs.map +1 -0
  613. package/dist/hooks/useDeepCompareMemo.d.cts +13 -0
  614. package/dist/hooks/useDeepCompareMemo.d.ts +13 -0
  615. package/dist/hooks/useDeepCompareMemo.js +2 -0
  616. package/dist/hooks/useDeepCompareMemo.js.map +1 -0
  617. package/dist/hooks/useDidUpdate.cjs +2 -0
  618. package/dist/hooks/useDidUpdate.cjs.map +1 -0
  619. package/dist/hooks/useDidUpdate.d.cts +5 -0
  620. package/dist/hooks/useDidUpdate.d.ts +5 -0
  621. package/dist/hooks/useDidUpdate.js +2 -0
  622. package/dist/hooks/useDidUpdate.js.map +1 -0
  623. package/dist/hooks/useEffectOnce.cjs +2 -0
  624. package/dist/hooks/useEffectOnce.cjs.map +1 -0
  625. package/dist/hooks/useEffectOnce.d.cts +28 -0
  626. package/dist/hooks/useEffectOnce.d.ts +28 -0
  627. package/dist/hooks/useEffectOnce.js +2 -0
  628. package/dist/hooks/useEffectOnce.js.map +1 -0
  629. package/dist/hooks/useElementSize.cjs +2 -0
  630. package/dist/hooks/useElementSize.cjs.map +1 -0
  631. package/dist/hooks/useElementSize.d.cts +30 -0
  632. package/dist/hooks/useElementSize.d.ts +30 -0
  633. package/dist/hooks/useElementSize.js +2 -0
  634. package/dist/hooks/useElementSize.js.map +1 -0
  635. package/dist/hooks/useEventListener.cjs +2 -0
  636. package/dist/hooks/useEventListener.cjs.map +1 -0
  637. package/dist/hooks/useEventListener.d.cts +4 -0
  638. package/dist/hooks/useEventListener.d.ts +4 -0
  639. package/dist/hooks/useEventListener.js +2 -0
  640. package/dist/hooks/useEventListener.js.map +1 -0
  641. package/dist/hooks/useId.cjs +2 -0
  642. package/dist/hooks/useId.cjs.map +1 -0
  643. package/dist/hooks/useId.d.cts +13 -0
  644. package/dist/hooks/useId.d.ts +13 -0
  645. package/dist/hooks/useId.js +2 -0
  646. package/dist/hooks/useId.js.map +1 -0
  647. package/dist/hooks/useIdle.cjs +2 -0
  648. package/dist/hooks/useIdle.cjs.map +1 -0
  649. package/dist/hooks/useIdle.d.cts +49 -0
  650. package/dist/hooks/useIdle.d.ts +49 -0
  651. package/dist/hooks/useIdle.js +2 -0
  652. package/dist/hooks/useIdle.js.map +1 -0
  653. package/dist/hooks/useImageLoadCallback.cjs +2 -0
  654. package/dist/hooks/useImageLoadCallback.cjs.map +1 -0
  655. package/dist/hooks/useImageLoadCallback.d.cts +44 -0
  656. package/dist/hooks/useImageLoadCallback.d.ts +44 -0
  657. package/dist/hooks/useImageLoadCallback.js +2 -0
  658. package/dist/hooks/useImageLoadCallback.js.map +1 -0
  659. package/dist/hooks/useImageUpload.cjs +2 -0
  660. package/dist/hooks/useImageUpload.cjs.map +1 -0
  661. package/dist/hooks/useImageUpload.d.cts +92 -0
  662. package/dist/hooks/useImageUpload.d.ts +92 -0
  663. package/dist/hooks/useImageUpload.js +2 -0
  664. package/dist/hooks/useImageUpload.js.map +1 -0
  665. package/dist/hooks/useInterval.cjs +2 -0
  666. package/dist/hooks/useInterval.cjs.map +1 -0
  667. package/dist/hooks/useInterval.d.cts +52 -0
  668. package/dist/hooks/useInterval.d.ts +52 -0
  669. package/dist/hooks/useInterval.js +2 -0
  670. package/dist/hooks/useInterval.js.map +1 -0
  671. package/dist/hooks/useIsomorphicEffect.cjs +2 -0
  672. package/dist/hooks/useIsomorphicEffect.cjs.map +1 -0
  673. package/dist/hooks/useIsomorphicEffect.d.cts +26 -0
  674. package/dist/hooks/useIsomorphicEffect.d.ts +26 -0
  675. package/dist/hooks/useIsomorphicEffect.js +2 -0
  676. package/dist/hooks/useIsomorphicEffect.js.map +1 -0
  677. package/dist/hooks/useLatest.cjs +2 -0
  678. package/dist/hooks/useLatest.cjs.map +1 -0
  679. package/dist/hooks/useLatest.d.cts +4 -0
  680. package/dist/hooks/useLatest.d.ts +4 -0
  681. package/dist/hooks/useLatest.js +2 -0
  682. package/dist/hooks/useLatest.js.map +1 -0
  683. package/dist/hooks/useLgOrUp.cjs +2 -0
  684. package/dist/hooks/useLgOrUp.cjs.map +1 -0
  685. package/dist/hooks/useLgOrUp.d.cts +5 -0
  686. package/dist/hooks/useLgOrUp.d.ts +5 -0
  687. package/dist/hooks/useLgOrUp.js +2 -0
  688. package/dist/hooks/useLgOrUp.js.map +1 -0
  689. package/dist/hooks/useLifecycleLogger.cjs +2 -0
  690. package/dist/hooks/useLifecycleLogger.cjs.map +1 -0
  691. package/dist/hooks/useLifecycleLogger.d.cts +11 -0
  692. package/dist/hooks/useLifecycleLogger.d.ts +11 -0
  693. package/dist/hooks/useLifecycleLogger.js +2 -0
  694. package/dist/hooks/useLifecycleLogger.js.map +1 -0
  695. package/dist/hooks/useLoadingVisible.cjs +2 -0
  696. package/dist/hooks/useLoadingVisible.cjs.map +1 -0
  697. package/dist/hooks/useLoadingVisible.d.cts +32 -0
  698. package/dist/hooks/useLoadingVisible.d.ts +32 -0
  699. package/dist/hooks/useLoadingVisible.js +2 -0
  700. package/dist/hooks/useLoadingVisible.js.map +1 -0
  701. package/dist/hooks/useLocalStorage.cjs +2 -0
  702. package/dist/hooks/useLocalStorage.cjs.map +1 -0
  703. package/dist/hooks/useLocalStorage.d.cts +12 -0
  704. package/dist/hooks/useLocalStorage.d.ts +12 -0
  705. package/dist/hooks/useLocalStorage.js +2 -0
  706. package/dist/hooks/useLocalStorage.js.map +1 -0
  707. package/dist/hooks/useLocalStorageState.cjs +2 -0
  708. package/dist/hooks/useLocalStorageState.cjs.map +1 -0
  709. package/dist/hooks/useLocalStorageState.d.cts +9 -0
  710. package/dist/hooks/useLocalStorageState.d.ts +9 -0
  711. package/dist/hooks/useLocalStorageState.js +2 -0
  712. package/dist/hooks/useLocalStorageState.js.map +1 -0
  713. package/dist/hooks/useMdOrDown.cjs +2 -0
  714. package/dist/hooks/useMdOrDown.cjs.map +1 -0
  715. package/dist/hooks/useMdOrDown.d.cts +5 -0
  716. package/dist/hooks/useMdOrDown.d.ts +5 -0
  717. package/dist/hooks/useMdOrDown.js +2 -0
  718. package/dist/hooks/useMdOrDown.js.map +1 -0
  719. package/dist/hooks/useMdOrUp.cjs +2 -0
  720. package/dist/hooks/useMdOrUp.cjs.map +1 -0
  721. package/dist/hooks/useMdOrUp.d.cts +5 -0
  722. package/dist/hooks/useMdOrUp.d.ts +5 -0
  723. package/dist/hooks/useMdOrUp.js +2 -0
  724. package/dist/hooks/useMdOrUp.js.map +1 -0
  725. package/dist/hooks/useMount.cjs +2 -0
  726. package/dist/hooks/useMount.cjs.map +1 -0
  727. package/dist/hooks/useMount.d.cts +27 -0
  728. package/dist/hooks/useMount.d.ts +27 -0
  729. package/dist/hooks/useMount.js +2 -0
  730. package/dist/hooks/useMount.js.map +1 -0
  731. package/dist/hooks/useMounted.cjs +2 -0
  732. package/dist/hooks/useMounted.cjs.map +1 -0
  733. package/dist/hooks/useMounted.d.cts +24 -0
  734. package/dist/hooks/useMounted.d.ts +24 -0
  735. package/dist/hooks/useMounted.js +2 -0
  736. package/dist/hooks/useMounted.js.map +1 -0
  737. package/dist/hooks/useMountedState.cjs +2 -0
  738. package/dist/hooks/useMountedState.cjs.map +1 -0
  739. package/dist/hooks/useMountedState.d.cts +38 -0
  740. package/dist/hooks/useMountedState.d.ts +38 -0
  741. package/dist/hooks/useMountedState.js +2 -0
  742. package/dist/hooks/useMountedState.js.map +1 -0
  743. package/dist/hooks/useMutationObserver.cjs +2 -0
  744. package/dist/hooks/useMutationObserver.cjs.map +1 -0
  745. package/dist/hooks/useMutationObserver.d.cts +28 -0
  746. package/dist/hooks/useMutationObserver.d.ts +28 -0
  747. package/dist/hooks/useMutationObserver.js +2 -0
  748. package/dist/hooks/useMutationObserver.js.map +1 -0
  749. package/dist/hooks/useObservable.cjs +2 -0
  750. package/dist/hooks/useObservable.cjs.map +1 -0
  751. package/dist/hooks/useObservable.d.cts +6 -0
  752. package/dist/hooks/useObservable.d.ts +7 -0
  753. package/dist/hooks/useObservable.js +2 -0
  754. package/dist/hooks/useObservable.js.map +1 -0
  755. package/dist/hooks/useObservableLocalStorage.cjs +2 -0
  756. package/dist/hooks/useObservableLocalStorage.cjs.map +1 -0
  757. package/dist/hooks/useObservableLocalStorage.d.cts +6 -0
  758. package/dist/hooks/useObservableLocalStorage.d.ts +6 -0
  759. package/dist/hooks/useObservableLocalStorage.js +2 -0
  760. package/dist/hooks/useObservableLocalStorage.js.map +1 -0
  761. package/dist/hooks/useObservableSessionStorage.cjs +2 -0
  762. package/dist/hooks/useObservableSessionStorage.cjs.map +1 -0
  763. package/dist/hooks/useObservableSessionStorage.d.cts +6 -0
  764. package/dist/hooks/useObservableSessionStorage.d.ts +6 -0
  765. package/dist/hooks/useObservableSessionStorage.js +2 -0
  766. package/dist/hooks/useObservableSessionStorage.js.map +1 -0
  767. package/dist/hooks/useOs.cjs +2 -0
  768. package/dist/hooks/useOs.cjs.map +1 -0
  769. package/dist/hooks/useOs.d.cts +8 -0
  770. package/dist/hooks/useOs.d.ts +8 -0
  771. package/dist/hooks/useOs.js +2 -0
  772. package/dist/hooks/useOs.js.map +1 -0
  773. package/dist/hooks/useRafState.cjs +2 -0
  774. package/dist/hooks/useRafState.cjs.map +1 -0
  775. package/dist/hooks/useRafState.d.cts +5 -0
  776. package/dist/hooks/useRafState.d.ts +5 -0
  777. package/dist/hooks/useRafState.js +2 -0
  778. package/dist/hooks/useRafState.js.map +1 -0
  779. package/dist/hooks/useRefEffect.cjs +2 -0
  780. package/dist/hooks/useRefEffect.cjs.map +1 -0
  781. package/dist/hooks/useRefEffect.d.cts +27 -0
  782. package/dist/hooks/useRefEffect.d.ts +27 -0
  783. package/dist/hooks/useRefEffect.js +2 -0
  784. package/dist/hooks/useRefEffect.js.map +1 -0
  785. package/dist/hooks/useResizeObserver.cjs +2 -0
  786. package/dist/hooks/useResizeObserver.cjs.map +1 -0
  787. package/dist/hooks/useResizeObserver.d.cts +26 -0
  788. package/dist/hooks/useResizeObserver.d.ts +26 -0
  789. package/dist/hooks/useResizeObserver.js +2 -0
  790. package/dist/hooks/useResizeObserver.js.map +1 -0
  791. package/dist/hooks/useScript.cjs +2 -0
  792. package/dist/hooks/useScript.cjs.map +1 -0
  793. package/dist/hooks/useScript.d.cts +7 -0
  794. package/dist/hooks/useScript.d.ts +7 -0
  795. package/dist/hooks/useScript.js +2 -0
  796. package/dist/hooks/useScript.js.map +1 -0
  797. package/dist/hooks/useSessionStorage.cjs +2 -0
  798. package/dist/hooks/useSessionStorage.cjs.map +1 -0
  799. package/dist/hooks/useSessionStorage.d.cts +21 -0
  800. package/dist/hooks/useSessionStorage.d.ts +21 -0
  801. package/dist/hooks/useSessionStorage.js +2 -0
  802. package/dist/hooks/useSessionStorage.js.map +1 -0
  803. package/dist/hooks/useSessionStorageState.cjs +2 -0
  804. package/dist/hooks/useSessionStorageState.cjs.map +1 -0
  805. package/dist/hooks/useSessionStorageState.d.cts +9 -0
  806. package/dist/hooks/useSessionStorageState.d.ts +9 -0
  807. package/dist/hooks/useSessionStorageState.js +2 -0
  808. package/dist/hooks/useSessionStorageState.js.map +1 -0
  809. package/dist/hooks/useSmOrDown.cjs +2 -0
  810. package/dist/hooks/useSmOrDown.cjs.map +1 -0
  811. package/dist/hooks/useSmOrDown.d.cts +5 -0
  812. package/dist/hooks/useSmOrDown.d.ts +5 -0
  813. package/dist/hooks/useSmOrDown.js +2 -0
  814. package/dist/hooks/useSmOrDown.js.map +1 -0
  815. package/dist/hooks/useSmOrUp.cjs +2 -0
  816. package/dist/hooks/useSmOrUp.cjs.map +1 -0
  817. package/dist/hooks/useSmOrUp.d.cts +5 -0
  818. package/dist/hooks/useSmOrUp.d.ts +5 -0
  819. package/dist/hooks/useSmOrUp.js +2 -0
  820. package/dist/hooks/useSmOrUp.js.map +1 -0
  821. package/dist/hooks/useThrottledCallback.cjs +2 -0
  822. package/dist/hooks/useThrottledCallback.cjs.map +1 -0
  823. package/dist/hooks/useThrottledCallback.d.cts +24 -0
  824. package/dist/hooks/useThrottledCallback.d.ts +24 -0
  825. package/dist/hooks/useThrottledCallback.js +2 -0
  826. package/dist/hooks/useThrottledCallback.js.map +1 -0
  827. package/dist/hooks/useThrottledCallbackWithClearTimeout.cjs +2 -0
  828. package/dist/hooks/useThrottledCallbackWithClearTimeout.cjs.map +1 -0
  829. package/dist/hooks/useThrottledCallbackWithClearTimeout.d.cts +30 -0
  830. package/dist/hooks/useThrottledCallbackWithClearTimeout.d.ts +30 -0
  831. package/dist/hooks/useThrottledCallbackWithClearTimeout.js +2 -0
  832. package/dist/hooks/useThrottledCallbackWithClearTimeout.js.map +1 -0
  833. package/dist/hooks/useThrottledState.cjs +2 -0
  834. package/dist/hooks/useThrottledState.cjs.map +1 -0
  835. package/dist/hooks/useThrottledState.d.cts +31 -0
  836. package/dist/hooks/useThrottledState.d.ts +31 -0
  837. package/dist/hooks/useThrottledState.js +2 -0
  838. package/dist/hooks/useThrottledState.js.map +1 -0
  839. package/dist/hooks/useThrottledValue.cjs +2 -0
  840. package/dist/hooks/useThrottledValue.cjs.map +1 -0
  841. package/dist/hooks/useThrottledValue.d.cts +21 -0
  842. package/dist/hooks/useThrottledValue.d.ts +21 -0
  843. package/dist/hooks/useThrottledValue.js +2 -0
  844. package/dist/hooks/useThrottledValue.js.map +1 -0
  845. package/dist/hooks/useTimeout.cjs +2 -0
  846. package/dist/hooks/useTimeout.cjs.map +1 -0
  847. package/dist/hooks/useTimeout.d.cts +38 -0
  848. package/dist/hooks/useTimeout.d.ts +38 -0
  849. package/dist/hooks/useTimeout.js +2 -0
  850. package/dist/hooks/useTimeout.js.map +1 -0
  851. package/dist/hooks/useTimeoutData.cjs +2 -0
  852. package/dist/hooks/useTimeoutData.cjs.map +1 -0
  853. package/dist/hooks/useTimeoutData.d.cts +7 -0
  854. package/dist/hooks/useTimeoutData.d.ts +7 -0
  855. package/dist/hooks/useTimeoutData.js +2 -0
  856. package/dist/hooks/useTimeoutData.js.map +1 -0
  857. package/dist/hooks/useUncontrolled.cjs +2 -0
  858. package/dist/hooks/useUncontrolled.cjs.map +1 -0
  859. package/dist/hooks/useUncontrolled.d.cts +47 -0
  860. package/dist/hooks/useUncontrolled.d.ts +47 -0
  861. package/dist/hooks/useUncontrolled.js +2 -0
  862. package/dist/hooks/useUncontrolled.js.map +1 -0
  863. package/dist/hooks/useUnmount.cjs +2 -0
  864. package/dist/hooks/useUnmount.cjs.map +1 -0
  865. package/dist/hooks/useUnmount.d.cts +4 -0
  866. package/dist/hooks/useUnmount.d.ts +4 -0
  867. package/dist/hooks/useUnmount.js +2 -0
  868. package/dist/hooks/useUnmount.js.map +1 -0
  869. package/dist/hooks/useUpdate.cjs +2 -0
  870. package/dist/hooks/useUpdate.cjs.map +1 -0
  871. package/dist/hooks/useUpdate.d.cts +4 -0
  872. package/dist/hooks/useUpdate.d.ts +4 -0
  873. package/dist/hooks/useUpdate.js +2 -0
  874. package/dist/hooks/useUpdate.js.map +1 -0
  875. package/dist/hooks/useUpdateEffect.cjs +2 -0
  876. package/dist/hooks/useUpdateEffect.cjs.map +1 -0
  877. package/dist/hooks/useUpdateEffect.d.cts +5 -0
  878. package/dist/hooks/useUpdateEffect.d.ts +5 -0
  879. package/dist/hooks/useUpdateEffect.js +2 -0
  880. package/dist/hooks/useUpdateEffect.js.map +1 -0
  881. package/dist/hooks/useUpdateLayoutEffect.cjs +2 -0
  882. package/dist/hooks/useUpdateLayoutEffect.cjs.map +1 -0
  883. package/dist/hooks/useUpdateLayoutEffect.d.cts +5 -0
  884. package/dist/hooks/useUpdateLayoutEffect.d.ts +5 -0
  885. package/dist/hooks/useUpdateLayoutEffect.js +2 -0
  886. package/dist/hooks/useUpdateLayoutEffect.js.map +1 -0
  887. package/dist/hooks/useWindowEvent.cjs +2 -0
  888. package/dist/hooks/useWindowEvent.cjs.map +1 -0
  889. package/dist/hooks/useWindowEvent.d.cts +24 -0
  890. package/dist/hooks/useWindowEvent.d.ts +24 -0
  891. package/dist/hooks/useWindowEvent.js +2 -0
  892. package/dist/hooks/useWindowEvent.js.map +1 -0
  893. package/dist/hooks/useWindowSize.cjs +2 -0
  894. package/dist/hooks/useWindowSize.cjs.map +1 -0
  895. package/dist/hooks/useWindowSize.d.cts +12 -0
  896. package/dist/hooks/useWindowSize.d.ts +12 -0
  897. package/dist/hooks/useWindowSize.js +2 -0
  898. package/dist/hooks/useWindowSize.js.map +1 -0
  899. package/dist/hooks/useXsOrDown.cjs +2 -0
  900. package/dist/hooks/useXsOrDown.cjs.map +1 -0
  901. package/dist/hooks/useXsOrDown.d.cts +5 -0
  902. package/dist/hooks/useXsOrDown.d.ts +5 -0
  903. package/dist/hooks/useXsOrDown.js +2 -0
  904. package/dist/hooks/useXsOrDown.js.map +1 -0
  905. package/dist/index.cjs +1 -2
  906. package/dist/index.d.cts +65 -1058
  907. package/dist/index.d.ts +65 -1058
  908. package/dist/index.js +1 -2
  909. package/dist/misc/debounce.cjs +2 -0
  910. package/dist/misc/debounce.cjs.map +1 -0
  911. package/dist/misc/debounce.js +2 -0
  912. package/dist/misc/debounce.js.map +1 -0
  913. package/dist/misc/deepEq.cjs +2 -0
  914. package/dist/misc/deepEq.cjs.map +1 -0
  915. package/dist/misc/deepEq.js +2 -0
  916. package/dist/misc/deepEq.js.map +1 -0
  917. package/dist/persistence/codec.cjs +2 -0
  918. package/dist/persistence/codec.cjs.map +1 -0
  919. package/dist/persistence/codec.d.cts +21 -0
  920. package/dist/persistence/codec.d.ts +21 -0
  921. package/dist/persistence/codec.js +2 -0
  922. package/dist/persistence/codec.js.map +1 -0
  923. package/dist/persistence/index.d.cts +2 -0
  924. package/dist/persistence/index.d.ts +2 -0
  925. package/dist/persistence/useStorageState.cjs +2 -0
  926. package/dist/persistence/useStorageState.cjs.map +1 -0
  927. package/dist/persistence/useStorageState.d.cts +39 -0
  928. package/dist/persistence/useStorageState.d.ts +39 -0
  929. package/dist/persistence/useStorageState.js +2 -0
  930. package/dist/persistence/useStorageState.js.map +1 -0
  931. package/dist/util/closables.cjs +2 -0
  932. package/dist/util/closables.cjs.map +1 -0
  933. package/dist/util/closables.d.cts +69 -0
  934. package/dist/util/closables.d.ts +69 -0
  935. package/dist/util/closables.js +2 -0
  936. package/dist/util/closables.js.map +1 -0
  937. package/dist/util/event-utils.cjs +2 -0
  938. package/dist/util/event-utils.cjs.map +1 -0
  939. package/dist/util/event-utils.d.cts +12 -0
  940. package/dist/util/event-utils.d.ts +12 -0
  941. package/dist/util/event-utils.js +2 -0
  942. package/dist/util/event-utils.js.map +1 -0
  943. package/dist/util/internal-util.cjs +2 -0
  944. package/dist/util/internal-util.cjs.map +1 -0
  945. package/dist/util/internal-util.js +2 -0
  946. package/dist/util/internal-util.js.map +1 -0
  947. package/dist/util/misc-utils.cjs +2 -0
  948. package/dist/util/misc-utils.cjs.map +1 -0
  949. package/dist/util/misc-utils.d.cts +15 -0
  950. package/dist/util/misc-utils.d.ts +15 -0
  951. package/dist/util/misc-utils.js +2 -0
  952. package/dist/util/misc-utils.js.map +1 -0
  953. package/dist/util/override-props.cjs +2 -0
  954. package/dist/util/override-props.cjs.map +1 -0
  955. package/dist/util/override-props.js +2 -0
  956. package/dist/util/override-props.js.map +1 -0
  957. package/dist/util/sx-props.cjs +2 -0
  958. package/dist/util/sx-props.cjs.map +1 -0
  959. package/dist/util/sx-props.d.cts +22 -0
  960. package/dist/util/sx-props.d.ts +22 -0
  961. package/dist/util/sx-props.js +2 -0
  962. package/dist/util/sx-props.js.map +1 -0
  963. package/dist/util/ymd-date.cjs +2 -0
  964. package/dist/util/ymd-date.cjs.map +1 -0
  965. package/dist/util/ymd-date.js +2 -0
  966. package/dist/util/ymd-date.js.map +1 -0
  967. package/llm.txt +356 -0
  968. package/package.json +29 -28
  969. package/dist/chunk-2OEB5VHZ.js +0 -2
  970. package/dist/chunk-2OEB5VHZ.js.map +0 -1
  971. package/dist/chunk-4C666HHU.js +0 -2
  972. package/dist/chunk-4C666HHU.js.map +0 -1
  973. package/dist/chunk-M4G6J7DP.cjs +0 -2
  974. package/dist/chunk-M4G6J7DP.cjs.map +0 -1
  975. package/dist/chunk-QNR3IXPA.cjs +0 -2
  976. package/dist/chunk-QNR3IXPA.cjs.map +0 -1
  977. package/dist/closables-BK0Db72u.d.cts +0 -135
  978. package/dist/closables-BK0Db72u.d.ts +0 -135
  979. package/dist/file-drop/index.cjs.map +0 -1
  980. package/dist/file-drop/index.js.map +0 -1
  981. package/dist/helper/index.cjs.map +0 -1
  982. package/dist/helper/index.js.map +0 -1
  983. package/dist/hooks/index.cjs.map +0 -1
  984. package/dist/hooks/index.js.map +0 -1
  985. package/dist/index.cjs.map +0 -1
  986. package/dist/index.js.map +0 -1
  987. package/dist/parallel-map-M764G6IE.js +0 -2
  988. package/dist/parallel-map-M764G6IE.js.map +0 -1
  989. package/dist/parallel-map-V2OVUIFQ.cjs +0 -2
  990. package/dist/parallel-map-V2OVUIFQ.cjs.map +0 -1
@@ -1,2 +1 @@
1
- import"../chunk-4C666HHU.js";function $(...t){return t.filter(e=>e&&e.length>0&&e!==".").flatMap(e=>e.split("/")).filter(e=>e.length>0&&e!==".")}var P=class t{static join(...e){return t.split(...e).join("/")}static split=(...e)=>{let r=[];return e.forEach(i=>{Array.isArray(i)?i.forEach(s=>{typeof s=="string"&&s.length>0&&r.push(...$(s))}):typeof i=="string"&&i.length>0&&r.push(...$(i))}),r.filter(i=>typeof i=="string"&&i.length>0&&i!==".")};static pathStartsWith(e,r){return t.segmentsStartsWith(t.split(e),t.split(r))}static segmentsStartsWith(e,r){let i=e,s=r;return s.length>i.length?!1:s.every((o,l)=>o===i[l])}},S=class t{segments;path;constructor(e){Array.isArray(e)?this.segments=e:this.segments=P.split(e),this.path=this.segments.join("/")}static EMPTY=new t([]);static from=(...e)=>new t(P.split(...e));join=(...e)=>{let r=P.split(...this.segments,...e);return new t(r)};changeLast=e=>{if(this.segments.length===0)return new t(e);let r=this.segments.slice();return r[r.length-1]=e,new t(r)};parentOrNull=()=>{if(this.segments.length===0)return null;let e=this.segments.slice(0,this.segments.length-1);return new t(e)};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"?P.segmentsStartsWith(this.segments,P.split(e)):Array.isArray(e)?P.segmentsStartsWith(this.segments,e):P.segmentsStartsWith(this.segments,e.segments);toString(){return this.path}};var T=()=>{};function E(t="warn"){let e=t!=="none",r=t==="info"||t==="verbose",i=t==="verbose";return{info:r?(...s)=>console.log(...s):T,verbose:i?(...s)=>console.log(...s):T,debug:i?(...s)=>console.debug(...s):T,warn:e?(...s)=>console.warn(...s):T,error:r?(...s)=>console.error(...s):T}}function C(t){return typeof t>"u"||t===null?"unknown":typeof t=="string"?t:typeof t=="object"&&"message"in t&&typeof t.message=="string"?t.message:String(t)}async function A(t,e,r,i,s="none",o=!0,l=4){let n=E(s);if(e.isFile){let m=await U(e);if(!m){n.debug("FileSystemEntry.getFile() error",e);return}i(m)&&r.push({type:"file",file:m,path:t.join(m.name)});return}if(!e.isDirectory)return;r.push({type:"dir",path:t.join(e.name)});let a=t.join(e.name);n.info(`\u{1F50D} Traversing directory (Entry API): ${e.name} at path: ${a.toString()}`);let c=await V(e,s);n.verbose(` \u{1F4CA} Total children found: ${c.length}`),c.forEach((m,h)=>{n.verbose(` \u{1F4C4} Found [${h}]: ${m.name} (${m.isFile?"file":"directory"})`)});let{simpleParallelMap:I}=await import("../parallel-map-M764G6IE.js"),g=Math.max(1,l);if(o&&g>1&&c.length>1)n.info(` \u26A1 Processing ${c.length} items in parallel (custom implementation, concurrency=${g})`),await I(c,async m=>{(m.isFile||m.isDirectory)&&await A(a,m,r,i,s,o,g)},g);else{n.info(` \u{1F4DD} Processing ${c.length} item directly`);for(let m of c)(m.isFile||m.isDirectory)&&await A(a,m,r,i,s,o,g)}}async function U(t){try{return await new Promise((e,r)=>{t.file(i=>{e(i)},i=>{r(i)})})}catch{return null}}async function V(t,e="none"){let r=E(e);try{return await G(t,e)}catch(i){return r.debug(C(i)),[]}}async function G(t,e="none"){let r=E(e),i=t.createReader(),s=[];async function o(){return new Promise((l,n)=>{i.readEntries(a=>{a.length>0?(s=s.concat(a),l(o())):l(s)},a=>{r.warn("readEntries() error",a),n(a)})})}return await o(),s}async function O(t,e,r,i,s="none",o=!0,l=4){let n=E(s);if(e.kind==="file"){let c=await e.getFile();if(!c)return;i(c)&&r.push({type:"file",file:c,path:t.join(c.name)});return}if(e.kind!=="directory")return;r.push({type:"dir",path:t.join(e.name)});let a=t.join(e.name);try{let c=[],g=e.values();n.info(`\u{1F50D} Traversing directory: ${e.name} at path: ${a.toString()}`);for await(let p of g)p&&(c.push(p),n.verbose(` \u{1F4C4} Found: ${p.name} (${p.kind})`));n.verbose(` \u{1F4CA} Total children found: ${c.length}`);let{simpleParallelMap:D}=await import("../parallel-map-M764G6IE.js"),m=Math.max(1,l);if(o&&m>1&&c.length>1)n.info(` \u26A1 Processing ${c.length} items in parallel (custom implementation, concurrency=${m})`),await D(c,async p=>{(p.kind==="file"||p.kind==="directory")&&await O(a,p,r,i,s,o,m)},m);else{n.info(` \u{1F4DD} Processing ${c.length} item directly`);for(let p of c)(p.kind==="file"||p.kind==="directory")&&await O(a,p,r,i,s,o,m)}}catch(c){n.warn(`Directory traversal warning for ${e.name}:`,c)}}var R=(t,...e)=>e.every(r=>r in t);async function v(t,e,r,i,s="none",o=!0,l=4){if(R(e,"filesystem","fullPath","isDirectory","isFile")){await A(t,e,r,i,s,o,l);return}if(R(e,"kind","isSameEntry")){await O(t,e,r,i,s,o,l);return}let n=e;i(n)&&r.push({type:"file",file:n,path:t.join(n.name)})}var Y=t=>!0;async function K(t,e=Y){let r="getAsFileSystemHandle"in DataTransferItem.prototype,i="webkitGetAsEntry"in DataTransferItem.prototype;if(!r&&!i){let n=Array.from(t.dataTransfer.files);return n.length===0?[]:n.filter(e).map(a=>({type:"file",file:a,path:S.from(a.name).toString()}))}let s=[],o=Array.prototype.slice.call(t.dataTransfer.items).filter(n=>n.kind==="file").map(n=>i?n.webkitGetAsEntry():r?n.getAsFileSystemHandle():n.getAsFile()).filter(Boolean),{simpleParallelMap:l}=await import("../parallel-map-M764G6IE.js");if(o.length>1)await l(o,async n=>{let a=n;await v(S.EMPTY,a,s,e)},4);else for(let n of o){let a=n;await v(S.EMPTY,a,s,e)}return s.map(n=>({...n,path:n.path.toString()}))}var d=class extends Error{constructor(r,i,s){super(s||`File drop error: ${r}`);this.code=r;this.item=i;this.name="FileDropError"}code;item};var F=class t{static normalize(e){return e.replace(/\/+/g,"/").replace(/\/$/,"")||"/"}static join(...e){return t.normalize(e.filter(Boolean).join("/"))}static dirname(e){let r=t.normalize(e),i=r.lastIndexOf("/");return i<=0?"/":r.slice(0,i)}static basename(e,r){let s=t.normalize(e).split("/").pop()||"";return r&&s.endsWith(r)?s.slice(0,-r.length):s}static extname(e){let r=t.basename(e),i=r.lastIndexOf(".");return i>0?r.slice(i):""}static relative(e,r){let i=t.normalize(e).split("/").filter(Boolean),s=t.normalize(r).split("/").filter(Boolean),o=0;for(;o<i.length&&o<s.length&&i[o]===s[o];)o++;let l=i.length-o,n=s.slice(o);return[...Array(l).fill(".."),...n].join("/")||"."}};function z(t,e){if(e.length===0)return!0;let r=F.extname(t.name).toLowerCase();return e.some(i=>i.toLowerCase()===r||i.toLowerCase()===r.slice(1))}function M(t,e){return t.size<=e}function _(t){if(/[<>:"/\\|?*]/.test(t))return!1;for(let r=0;r<t.length;r+=1){let i=t.charCodeAt(r);if(i>=0&&i<=31)return!1}return t.trim().length>0}function q(t){if(t.type)return t.type;let e=F.extname(t.name).toLowerCase();return{".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"}[e]||"application/octet-stream"}function j(t,e,r=e){let i=F.extname(t.name),s=q(t);return{type:"file",name:t.name,path:F.normalize(e),pathSegments:e.split("/").filter(Boolean),relativePath:F.normalize(r),size:t.size,lastModified:new Date(t.lastModified),file:t,mimeType:s,extension:i}}function J(t){let e=[];function r(i){let s={type:i.type,name:i.name,path:i.path,pathSegments:i.path.split("/").filter(Boolean),relativePath:i.path,size:i.metadata?.size,lastModified:i.metadata?.lastModified};e.push(s),i.children&&i.children.forEach(r)}return r(t),e}function k(t,e){if(!e(t))return null;let r=t.children?.map(i=>k(i,e)).filter(i=>i!==null);return{...t,children:r}}function W(t,e){if(e(t))return t;if(t.children)for(let r of t.children){let i=W(r,e);if(i)return i}return null}function N(t){let e={name:"",type:"directory",path:"",children:[]},r=new Map;r.set("",e);let i=[...t].sort((s,o)=>s.pathSegments.length-o.pathSegments.length);for(let s of i){let o={name:s.name,type:s.type,path:s.path,metadata:s.size!==void 0?{size:s.size,lastModified:s.lastModified,extension:F.extname(s.name),mimeType:s.mimeType}:void 0,file:s.file};r.set(s.path,o);let l=F.dirname(s.path),n=r.get(l);if(!n&&l!=="/"&&l!==""){let a=l.split("/").filter(Boolean);n={name:a[a.length-1]||"",type:"directory",path:l,children:[]},r.set(l,n)}!n&&(l===""||l==="/")&&(n=e),n&&(n.children||(n.children=[]),n.children.push(o))}return e}var H=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 r=e.file;if(this.options.maxFiles&&this.fileCount>=this.options.maxFiles)return{accepted:!1,error:new d("TOO_MANY_FILES",e,`Maximum ${this.options.maxFiles} files allowed`)};if(this.options.maxSize&&!M(r,this.options.maxSize))return{accepted:!1,error:new d("FILE_TOO_LARGE",e,`File size ${r.size} exceeds limit ${this.options.maxSize}`)};if(this.options.allowedExtensions&&!z(r,this.options.allowedExtensions))return{accepted:!1,error:new d("INVALID_FILE_TYPE",e,`File type not allowed: ${r.name}`)};this.fileCount++}return this.options.accept&&!this.options.accept(e)?{accepted:!1}:{accepted:!0}}get currentFileCount(){return this.fileCount}reset(){this.fileCount=0}};var Q={imagesOnly:()=>({allowedExtensions:[".jpg",".jpeg",".png",".gif",".svg",".webp"],excludeDirectories:!0}),textOnly:()=>({allowedExtensions:[".txt",".md",".json",".js",".ts",".html",".css"],excludeDirectories:!0}),smallFilesOnly:()=>({maxSize:1024*1024,excludeDirectories:!0}),developmentFiles:()=>({allowedExtensions:[".js",".ts",".tsx",".jsx",".json",".md",".html",".css",".scss",".py",".java",".cpp",".c",".h",".yml",".yaml",".toml"]})};var L=class{startTime;totalItems;processedItems=0;currentItem;onProgress;constructor(e,r){this.totalItems=e,this.startTime=Date.now(),this.onProgress=r?.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,r=this.totalItems>0?Math.round(this.processedItems/this.totalItems*100):0,i;if(this.processedItems>0&&r<100){let o=e/this.processedItems,l=this.totalItems-this.processedItems;i=Math.round(o*l)}let s={totalItems:this.totalItems,processedItems:this.processedItems,currentItem:this.currentItem,percentage:r,estimatedTimeLeft:i};this.onProgress(s)}updateTotalItems(e){this.totalItems=e,this.notifyProgress()}get isComplete(){return this.processedItems>=this.totalItems}get elapsedTime(){return Date.now()-this.startTime}};async function X(t){if("dataTransfer"in t){let e="getAsFileSystemHandle"in DataTransferItem.prototype,r="webkitGetAsEntry"in DataTransferItem.prototype;if(!e&&!r)return Array.from(t.dataTransfer.files);let i=Array.from(t.dataTransfer.items).filter(o=>o.kind==="file").map(o=>r?o.webkitGetAsEntry():e?o.getAsFileSystemHandle():o.getAsFile()).filter(Boolean);return(await Promise.all(i.map(o=>o&&o instanceof Promise?o:Promise.resolve(o)))).filter(Boolean)}return"length"in t?Array.from(t):Array.isArray(t)?t:null}async function Z(t,e,r,i={},s,o="warn",l){let n=[],a=[],c=0,{simpleParallelMap:I}=await import("../parallel-map-M764G6IE.js"),g=Math.max(1,l?.concurrency??4),D=l?.parallel??!0,m=E(o),h=async f=>{if(s?.aborted)throw new d("UNKNOWN",void 0,"Operation aborted");try{await v(S.EMPTY,f,n,u=>{c++,r.updateTotalItems(c);let y=j(u,u.name);r.setCurrentItem(y);let w=e.filter(y);return w.error&&(a.push(w.error),i.onError?.(w.error,y)),w.accepted||r.completeItem(),w.accepted},o,D,g)}catch(u){let y=u instanceof d?u:new d("UNKNOWN",void 0,String(u));a.push(y),i.onError?.(y)}};if(D&&g>1&&t.length>1)m.info(`\u{1F680} Processing ${t.length} handles in parallel (custom implementation, concurrency=${g})`),await I(t,h,g);else{m.info(`\u{1F4DD} Processing ${t.length} handle directly`);for(let f of t)await h(f)}let x=[],b=[];r.updateTotalItems(c),m.info(`\u{1F504} Processing ${n.length} total items from traversal`);for(let f of n)if(f.type==="file"){let u=j(f.file,f.path.toString(),f.path.toString());x.push(u),i.onFile?.(u),r.completeItem(),m.verbose(` \u2705 File: ${f.path.toString()}`)}else{let u={type:"directory",name:f.path.lastSegment(),path:f.path.toString(),pathSegments:f.path.segments,relativePath:f.path.toString()};b.push(u),m.verbose(` \u{1F4C1} Directory: ${f.path.toString()}`)}return m.info(`\u{1F4CA} Final results: ${x.length} files, ${b.length} directories`),{items:x,directories:b,errors:a}}async function B(t,e={}){let r=Date.now(),i=te(e.debug);try{if(e.signal?.aborted)throw new d("UNKNOWN",void 0,"Operation aborted");let s=await X(t);if(!s)throw new d("UNSUPPORTED_API",void 0,"Unsupported file drop source");let o=s.length,l=new L(o,e.callbacks),n=new H(e.filter);if(s.length>0&&s[0]instanceof File){let h=s,p=[],x=[];for(let f of h){if(e.signal?.aborted)throw new d("UNKNOWN",void 0,"Operation aborted");let u=j(f,f.name);l.setCurrentItem(u);let y=n.filter(u);y.accepted?(p.push(u),e.callbacks?.onFile?.(u)):y.error&&(x.push(y.error),e.callbacks?.onError?.(y.error,u)),l.completeItem()}let b=N(p);return{files:p,directories:[],tree:b,metadata:{totalFiles:p.length,totalDirectories:0,totalSize:p.reduce((f,u)=>f+(u.size||0),0),processingTime:Date.now()-r},errors:x}}let{items:a,directories:c,errors:I}=await Z(s,n,l,e.callbacks,e.signal,i,e.processing),g=[...a,...c],D=N(g);return{files:a,directories:c,tree:D,metadata:{totalFiles:a.length,totalDirectories:c.length,totalSize:a.reduce((h,p)=>h+(p.size||0),0),processingTime:Date.now()-r},errors:I}}catch(s){throw s instanceof d?s:new d("UNKNOWN",void 0,String(s))}}async function ee(t,e={}){try{return await B(t,e)}catch(r){return{success:!1,error:r instanceof d?r:new d("UNKNOWN",void 0,String(r))}}}function te(t){return t===!0?"verbose":t===!1?"none":t===void 0?"warn":t}export{d as FileDropError,F as FilePathUtils,Q as FilterPresets,S as PathHolder,P as PathUtils,N as buildFileTree,k as filterTree,W as findInTree,J as flattenTree,K as handleFileTreeDropEvent,_ as isValidFileName,M as isValidFileSize,z as isValidFileType,B as processFileTreeDrop,ee 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,CAAW,CACtB,SAEA,KAEA,YAAY,EAAyB,CACnC,AAGE,KAAK,SAHH,MAAM,QAAQC,CAAI,EACJA,EAEAV,EAAU,MAAMU,CAAI,EAEtC,KAAK,KAAO,KAAK,SAAS,KAAK,GAAG,CACpC,CAEA,OAAO,MAAQ,IAAID,EAAW,CAAC,CAAC,EAEhC,OAAO,MAAQ,GAAGX,IACT,IAAIW,EAAWT,EAAU,MAAM,GAAGF,CAAI,CAAC,EAGhD,MAAQ,GAAGA,IAA+D,CACxE,IAAMa,EAAWX,EAAU,MAAM,GAAG,KAAK,SAAU,GAAGF,CAAI,EAC1D,OAAO,IAAIW,EAAWE,CAAQ,CAChC,EAEA,WAAc,GAAiC,CAC7C,GAAI,KAAK,SAAS,SAAW,EAC3B,OAAO,IAAIF,EAAWG,CAAQ,EAEhC,IAAMD,EAAW,KAAK,SAAS,MAAM,EAErC,MADA,GAASA,EAAS,OAAS,GAAKC,EACzB,IAAIH,EAAWE,CAAQ,CAChC,EAEA,iBAAwC,CACtC,GAAI,KAAK,SAAS,SAAW,EAC3B,OAAO,KAET,IAAMA,EAAW,KAAK,SAAS,MAAM,EAAG,KAAK,SAAS,OAAS,CAAC,EAChE,OAAO,IAAIF,EAAWE,CAAQ,CAChC,EAEA,sBACM,KAAK,SAAS,SAAW,EACpB,KAEF,KAAK,SAAS,KAAK,SAAS,OAAS,GAG9C,gBACM,KAAK,SAAS,SAAW,EACpB,GAEF,KAAK,SAAS,KAAK,SAAS,OAAS,GAG9C,WAAc,GACR,OAAOE,GAAc,SAChBb,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,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.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,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,CAAW,CACtB,SAEA,KAEA,YAAY,EAAyB,CACnC,AAGE,KAAK,SAHH,MAAM,QAAQC,CAAI,EACJA,EAEAV,EAAU,MAAMU,CAAI,EAEtC,KAAK,KAAO,KAAK,SAAS,KAAK,GAAG,CACpC,CAEA,OAAO,MAAQ,IAAID,EAAW,CAAC,CAAC,EAEhC,OAAO,MAAQ,GAAGX,IACT,IAAIW,EAAWT,EAAU,MAAM,GAAGF,CAAI,CAAC,EAGhD,MAAQ,GAAGA,IAA+D,CACxE,IAAMa,EAAWX,EAAU,MAAM,GAAG,KAAK,SAAU,GAAGF,CAAI,EAC1D,OAAO,IAAIW,EAAWE,CAAQ,CAChC,EAEA,WAAc,GAAiC,CAC7C,GAAI,KAAK,SAAS,SAAW,EAC3B,OAAO,IAAIF,EAAWG,CAAQ,EAEhC,IAAMD,EAAW,KAAK,SAAS,MAAM,EAErC,MADA,GAASA,EAAS,OAAS,GAAKC,EACzB,IAAIH,EAAWE,CAAQ,CAChC,EAEA,iBAAwC,CACtC,GAAI,KAAK,SAAS,SAAW,EAC3B,OAAO,KAET,IAAMA,EAAW,KAAK,SAAS,MAAM,EAAG,KAAK,SAAS,OAAS,CAAC,EAChE,OAAO,IAAIF,EAAWE,CAAQ,CAChC,EAEA,sBACM,KAAK,SAAS,SAAW,EACpB,KAEF,KAAK,SAAS,KAAK,SAAS,OAAS,GAG9C,gBACM,KAAK,SAAS,SAAW,EACpB,GAEF,KAAK,SAAS,KAAK,SAAS,OAAS,GAG9C,WAAc,GACR,OAAOE,GAAc,SAChBb,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,2 @@
1
+ function e(e){return e==null?`unknown`:typeof e==`string`?e:typeof e==`object`&&`message`in e&&typeof e.message==`string`?e.message:String(e)}exports.errmsg=e;
2
+ //# sourceMappingURL=util.cjs.map
@@ -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,2 @@
1
+ function e(e){return e==null?`unknown`:typeof e==`string`?e:typeof e==`object`&&`message`in e&&typeof e.message==`string`?e.message:String(e)}export{e as errmsg};
2
+ //# sourceMappingURL=util.js.map
@@ -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 readEntriesRecursively();\n return allEntries;\n}\n"],"mappings":"gEASA,eAAsBI,EACpB,EACA,EACA,EACA,EACA,EAAyB,OACzB,EAAW,GACX,EAAc,EACd,CACA,IAAMC,EAASL,EAAAA,qBAAqBM,CAAU,EAE9C,GAAIC,EAAK,OAAQ,CACf,IAAMC,EAAO,MAAMC,EAAQF,CAA2B,EACtD,GAAI,CAACC,EAAM,CACTH,EAAO,MAAM,kCAAmCE,CAAI,EACpD,MACF,CACIG,EAAeF,CAAI,GACrBG,EAAO,KAAK,CACV,KAAM,OACN,OACA,KAAMC,EAAO,KAAKJ,EAAK,IAAI,CAC7B,CAAC,EAEH,MACF,CAEA,GAAI,CAACD,EAAK,YAER,OAGFI,EAAO,KAAK,CACV,KAAM,MACN,KAAMC,EAAO,KAAKL,EAAK,IAAI,CAC7B,CAAC,EAED,IAAMM,EAAYD,EAAO,KAAKL,EAAK,IAAI,EACvCF,EAAO,KAAK,wCAAwCE,EAAK,KAAK,YAAYM,EAAU,SAAS,GAAG,EAGhG,IAAMC,EAAW,MAAMC,EAAYR,EAAkCD,CAAU,EAC/ED,EAAO,QAAQ,8BAA8BS,EAAS,QAAQ,EAE9DA,EAAS,SAAS,EAAO,IAAU,CACjCT,EAAO,QAAQ,eAAeW,EAAM,KAAKC,EAAM,KAAK,IAAIA,EAAM,OAAS,OAAS,YAAY,EAAE,CAChG,CAAC,EAGD,GAAM,CAAE,qBAAsB,MAAA,QAAA,QAAA,CAAA,CAAA,SAAA,QAAM,8BAAA,CAAA,EAE9BC,EAAwB,KAAK,IAAI,EAAGC,CAAW,EAGrD,GAFuBC,GAAYF,EAAwB,GAAKJ,EAAS,OAAS,EAIhFT,EAAO,KACL,kBAAkBS,EAAS,OAAO,yDAAyDI,EAAsB,EACnH,EACA,MAAMG,EACJP,EACA,KAAO,IAA2B,EAC5BQ,EAAM,QAAUA,EAAM,cACxB,MAAMlB,EACJS,EACAS,EACAX,EACAD,EACAJ,EACAc,EACAF,CACF,CAEJ,EACAA,CACF,MACK,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,GAAI,CAACC,EAAM,CACTJ,EAAO,MAAM,kCAAmCG,CAAI,EACpD,MACF,CACIG,EAAeF,CAAI,GACrBG,EAAO,KAAK,CACV,KAAM,OACN,OACA,KAAMC,EAAO,KAAKJ,EAAK,IAAI,CAC7B,CAAC,EAEH,MACF,CAEA,GAAI,CAACD,EAAK,YAER,OAGFI,EAAO,KAAK,CACV,KAAM,MACN,KAAMC,EAAO,KAAKL,EAAK,IAAI,CAC7B,CAAC,EAED,IAAMM,EAAYD,EAAO,KAAKL,EAAK,IAAI,EACvCH,EAAO,KAAK,wCAAwCG,EAAK,KAAK,YAAYM,EAAU,SAAS,GAAG,EAGhG,IAAMC,EAAW,MAAMC,EAAYR,EAAkCD,CAAU,EAC/EF,EAAO,QAAQ,8BAA8BU,EAAS,QAAQ,EAE9DA,EAAS,SAAS,EAAO,IAAU,CACjCV,EAAO,QAAQ,eAAeY,EAAM,KAAKC,EAAM,KAAK,IAAIA,EAAM,OAAS,OAAS,YAAY,EAAE,CAChG,CAAC,EAGD,GAAM,CAAE,qBAAsB,MAAM,OAAO,+BAErCC,EAAwB,KAAK,IAAI,EAAGC,CAAW,EAGrD,GAFuBC,GAAYF,EAAwB,GAAKJ,EAAS,OAAS,EAIhFV,EAAO,KACL,kBAAkBU,EAAS,OAAO,yDAAyDI,EAAsB,EACnH,EACA,MAAMG,EACJP,EACA,KAAO,IAA2B,EAC5BQ,EAAM,QAAUA,EAAM,cACxB,MAAMnB,EACJU,EACAS,EACAX,EACAD,EACAJ,EACAc,EACAF,CACF,CAEJ,EACAA,CACF,MACK,CAELd,EAAO,KAAK,mBAAmBU,EAAS,OAAO,eAAe,EAC9D,IAAK,IAAMQ,KAASR,GACdQ,EAAM,QAAUA,EAAM,cACxB,MAAMnB,EACJU,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,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,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,EAExCG,EAAO,KAAK,4BAA4BE,EAAO,KAAK,YAAYK,EAAU,SAAS,GAAG,EAGtF,UAAW,IAAMG,KAASD,EACpBC,IACFF,EAAS,KAAKE,CAAK,EACnBV,EAAO,QAAQ,eAAeU,EAAM,KAAK,IAAIA,EAAM,KAAK,EAAE,GAI9DV,EAAO,QAAQ,8BAA8BQ,EAAS,QAAQ,EAG9D,GAAM,CAAE,qBAAsB,MAAA,QAAA,QAAA,CAAA,CAAA,SAAA,QAAM,8BAAA,CAAA,EAE9BG,EAAwB,KAAK,IAAI,EAAGC,CAAW,EAGrD,GAFuBC,GAAYF,EAAwB,GAAKH,EAAS,OAAS,EAIhFR,EAAO,KACL,kBAAkBQ,EAAS,OAAO,yDAAyDG,EAAsB,EACnH,EACA,MAAMG,EACJN,EACA,KAAO,IAA4B,EAC7BE,EAAM,OAAS,QAAUA,EAAM,OAAS,cAC1C,MAAMX,EACJQ,EACAG,EACAL,EACAD,EACAH,EACAY,EACAF,CACF,CAEJ,EACAA,CACF,MACK,CAELX,EAAO,KAAK,mBAAmBQ,EAAS,OAAO,eAAe,EAC9D,IAAK,IAAME,KAASF,GACdE,EAAM,OAAS,QAAUA,EAAM,OAAS,cAC1C,MAAMX,EACJQ,EACAG,EACAL,EACAD,EACAH,EACAY,EACAF,CACF,CAGN,CACF,OAASI,EAAK,CACZf,EAAO,KAAK,mCAAmCE,EAAO,KAAK,GAAIa,CAAG,CACpE,CACF"}
@@ -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":"sQA4BA,eAAee,EACb,EAC6C,CAC7C,GAAI,iBAAkBC,EAAQ,CAE5B,IAAMC,EAA8B,0BAA2B,iBAAiB,UAC1EC,EAA2B,qBAAsB,iBAAiB,UAGxE,GAAI,CAACD,GAA+B,CAACC,EACnC,OAAO,MAAM,KAAKF,EAAO,aAAa,KAAK,EAM7C,IAAMG,EAAU,MAAM,KAAKH,EAAO,aAAa,KAAK,CAAC,CAClD,OAAQ,GAASI,EAAK,OAAS,MAAM,CAAC,CACtC,IAAK,GACAF,EACKE,EAAK,iBAAiB,EACpBH,EAGPG,EACA,sBAAsB,EAEnBA,EAAK,UAAU,CACvB,CAAC,CACD,OAAO,OAAO,EAWjB,OAAO,MATuB,QAAQ,IACpCD,EAAQ,IAAK,GACPE,GAAUA,aAAkB,QACvBA,EAEF,QAAQ,QAAQA,CAAM,CAC9B,CACH,EAAA,CAEuB,OAAO,OAAO,CACvC,CAYA,MAVI,WAAYL,EAEP,MAAM,KAAKA,CAAkB,EAGlC,MAAM,QAAQA,CAAM,EAEfA,EAGF,IACT,CAcA,eAAeM,EACb,EACA,EACA,EACA,EAA0C,CAAC,EAC3C,EACA,EAAyB,OACzB,EACiG,CACjG,IAAMC,EAAyB,CAAC,EAC1BC,EAA0B,CAAC,EAC7BC,EAAwB,EAGtB,CAAE,qBAAsB,MAAA,QAAA,QAAA,CAAA,CAAA,SAAA,QAAM,0BAAA,CAAA,EAE9BC,EAAwB,KAAK,IAAI,EAAGC,GAAY,aAAe,CAAC,EAChEC,EAAiBD,GAAY,UAAY,GACzCE,EAAS7B,EAAAA,qBAAqB8B,CAAU,EAExCC,EAAgB,KAAO,IAAsD,CACjF,GAAIC,GAAQ,QACV,MAAM,IAAI/B,EAAAA,cAAc,UAAW,IAAA,GAAW,mBAAmB,EAGnE,GAAI,CACF,MAAMC,EAAAA,aACJC,EAAAA,WAAW,MACXkB,EACAE,EACC,GAAe,CACd,IACAU,EAAQ,iBAAiBR,CAAqB,EAC9C,IAAML,EAAOhB,EAAAA,eAAe8B,EAAMA,EAAK,IAAI,EAC3CD,EAAQ,eAAeb,CAAI,EAE3B,IAAMe,EAAeC,EAAO,OAAOhB,CAAI,EAUvC,OATIe,EAAa,QACfX,EAAO,KAAKW,EAAa,KAAK,EAC9BE,EAAU,UAAUF,EAAa,MAAOf,CAAI,GAGzCe,EAAa,UAChBF,EAAQ,aAAa,EAGhBE,EAAa,QACtB,EACAL,EACAF,EACAF,CACF,CACF,OAASY,EAAO,CACd,IAAMC,EACJD,aAAiBrC,EAAAA,cACbqC,EACA,IAAIrC,EAAAA,cAAc,UAAW,IAAA,GAAW,OAAOqC,CAAK,CAAC,EAC3Dd,EAAO,KAAKe,CAAS,EACrBF,EAAU,UAAUE,CAAS,CAC/B,CACF,EAKA,GAFgCX,GAAkBF,EAAwB,GAAKP,EAAQ,OAAS,EAG9FU,EAAO,KACL,iBAAiBV,EAAQ,OAAO,2DAA2DO,EAAsB,EACnH,EACA,MAAMc,EAAkBrB,EAASY,EAAeL,CAAqB,MAChE,CACLG,EAAO,KAAK,iBAAiBV,EAAQ,OAAO,iBAAiB,EAC7D,IAAK,IAAME,KAAUF,EACnB,MAAMY,EAAcV,CAAM,CAE9B,CAGA,IAAMoB,EAAyB,CAAC,EAC1BC,EAAoC,CAAC,EAE3CT,EAAQ,iBAAiBR,CAAqB,EAE9CI,EAAO,KAAK,iBAAiBN,EAAO,OAAO,4BAA4B,EAEvE,IAAK,IAAMoB,KAASpB,EAClB,GAAIoB,EAAM,OAAS,OAAQ,CACzB,IAAMC,EAAgBxC,EAAAA,eACpBuC,EAAM,KACNA,EAAM,KAAK,SAAS,EACpBA,EAAM,KAAK,SAAS,CACtB,EACAF,EAAM,KAAKG,CAAa,EACxBP,EAAU,SAASO,CAAa,EAChCX,EAAQ,aAAa,EACrBJ,EAAO,QAAQ,aAAac,EAAM,KAAK,SAAS,GAAG,CACrD,KAAO,CACL,IAAME,EAAgC,CACpC,KAAM,YACN,KAAMF,EAAM,KAAK,YAAY,EAC7B,KAAMA,EAAM,KAAK,SAAS,EAC1B,aAAcA,EAAM,KAAK,SACzB,aAAcA,EAAM,KAAK,SAAS,CACpC,EACAD,EAAY,KAAKG,CAAS,EAC1BhB,EAAO,QAAQ,mBAAmBc,EAAM,KAAK,SAAS,GAAG,CAC3D,CAKF,OAFAd,EAAO,KAAK,qBAAqBY,EAAM,OAAO,UAAUC,EAAY,OAAO,aAAa,EAEjF,CAAE,QAAO,cAAa,QAAO,CACtC,CA8DA,eAAsBI,EACpB,EACA,EAA2B,CAAC,EACJ,CACxB,IAAMC,EAAY,KAAK,IAAI,EACrBjB,EAAakB,EAAoBC,EAAQ,KAAK,EAEpD,GAAI,CAEF,GAAIA,EAAQ,QAAQ,QAClB,MAAM,IAAIhD,EAAAA,cAAc,UAAW,IAAA,GAAW,mBAAmB,EAInE,IAAMiD,EAAa,MAAMnC,EAAgBC,CAAM,EAC/C,GAAI,CAACkC,EACH,MAAM,IAAIjD,EAAAA,cAAc,kBAAmB,IAAA,GAAW,8BAA8B,EAItF,IAAMkD,EAAiBD,EAAW,OAC5BjB,EAAU,IAAI5B,EAAAA,gBAAgB8C,EAAgBF,EAAQ,SAAS,EAC/Db,EAAS,IAAI9B,EAAAA,WAAW2C,EAAQ,MAAM,EAG5C,GAAIC,EAAW,OAAS,GAAKA,EAAW,aAAc,KAAM,CAC1D,IAAME,EAAQF,EACRT,EAAyB,CAAC,EAC1BjB,EAA0B,CAAC,EAEjC,IAAK,IAAMU,KAAQkB,EAAO,CACxB,GAAIH,EAAQ,QAAQ,QAClB,MAAM,IAAIhD,EAAAA,cAAc,UAAW,IAAA,GAAW,mBAAmB,EAGnE,IAAMmB,EAAOhB,EAAAA,eAAe8B,EAAMA,EAAK,IAAI,EAC3CD,EAAQ,eAAeb,CAAI,EAE3B,IAAMe,EAAeC,EAAO,OAAOhB,CAAI,EACnCe,EAAa,UACfM,EAAM,KAAKrB,CAAI,EACf6B,EAAQ,WAAW,SAAS7B,CAAI,GACvBe,EAAa,QACtBX,EAAO,KAAKW,EAAa,KAAK,EAC9Bc,EAAQ,WAAW,UAAUd,EAAa,MAAOf,CAAI,GAGvDa,EAAQ,aAAa,CACvB,CAKA,MAAO,CACL,MAAOQ,EACP,YAAa,CAAC,EACd,KALWlC,EAAAA,cAAckC,CAKtB,EACH,SAAU,CACR,WAAYA,EAAM,OAClB,iBAAkB,EAClB,UAAWA,EAAM,QAAQ,EAAK,IAASY,GAAOjC,EAAK,MAAQ,GAAI,CAAC,EAChE,eAAgB,KAAK,IAAI,EAAI2B,CAC/B,EACA,QACF,CACF,CAGA,GAAM,CAAE,QAAO,cAAa,UAAW,MAAMzB,EAC3C4B,EACAd,EACAH,EACAgB,EAAQ,UACRA,EAAQ,OACRnB,EACAmB,EAAQ,UACV,EAGMK,EAAuB,CAAC,GAAGb,EAAO,GAAGC,CAAW,EAgBtD,MAAO,CAZL,MAAOD,EACP,cACA,KALWlC,EAAAA,cAAc+C,CAKtB,EACH,SAAU,CACR,WAAYb,EAAM,OAClB,iBAAkBC,EAAY,OAC9B,UAAWD,EAAM,QAAQ,EAAK,IAASY,GAAOjC,EAAK,MAAQ,GAAI,CAAC,EAChE,eAAgB,KAAK,IAAI,EAAI2B,CAC/B,EACA,QAGU,CACd,OAAST,EAAO,CAMd,MAJEA,aAAiBrC,EAAAA,cACbqC,EACA,IAAIrC,EAAAA,cAAc,UAAW,IAAA,GAAW,OAAOqC,CAAK,CAAC,CAG7D,CACF,CAqEA,eAAsBiB,EACpB,EACA,EAA2B,CAAC,EACA,CAC5B,GAAI,CAEF,OAAO,MADcT,EAAoB9B,EAAQiC,CAAO,CAE1D,OAASX,EAAO,CAMd,MAAO,CACL,QAAS,GACT,MANAA,aAAiBrC,EAAAA,cACbqC,EACA,IAAIrC,EAAAA,cAAc,UAAW,IAAA,GAAW,OAAOqC,CAAK,CAAC,CAK3D,CACF,CACF,CAEA,SAASU,EAAoB,EAA6C,CAIxE,OAHIQ,IAAU,GAAa,UACvBA,IAAU,GAAc,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