@cp949/mui-react19 2.2.0 → 2.3.1

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 (664) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +1 -1
  2. package/dist/_virtual/_rolldown/runtime.js +1 -1
  3. package/dist/components/Center.cjs.map +1 -1
  4. package/dist/components/Center.d.cts +4 -7
  5. package/dist/components/Center.d.ts +4 -7
  6. package/dist/components/Center.js.map +1 -1
  7. package/dist/components/CooldownButton.cjs.map +1 -1
  8. package/dist/components/CooldownButton.d.cts +4 -7
  9. package/dist/components/CooldownButton.d.ts +4 -7
  10. package/dist/components/CooldownButton.js.map +1 -1
  11. package/dist/components/CooldownButtonBase.cjs.map +1 -1
  12. package/dist/components/CooldownButtonBase.d.cts +4 -7
  13. package/dist/components/CooldownButtonBase.d.ts +4 -7
  14. package/dist/components/CooldownButtonBase.js.map +1 -1
  15. package/dist/components/CooldownIconButton.cjs.map +1 -1
  16. package/dist/components/CooldownIconButton.d.cts +4 -7
  17. package/dist/components/CooldownIconButton.d.ts +4 -7
  18. package/dist/components/CooldownIconButton.js.map +1 -1
  19. package/dist/components/CopyButtonWrapper.cjs +1 -1
  20. package/dist/components/CopyButtonWrapper.cjs.map +1 -1
  21. package/dist/components/CopyButtonWrapper.d.cts +25 -9
  22. package/dist/components/CopyButtonWrapper.d.ts +25 -9
  23. package/dist/components/CopyButtonWrapper.js +1 -1
  24. package/dist/components/CopyButtonWrapper.js.map +1 -1
  25. package/dist/components/CustomTableBody.cjs.map +1 -1
  26. package/dist/components/CustomTableBody.d.cts +1 -4
  27. package/dist/components/CustomTableBody.d.ts +1 -4
  28. package/dist/components/CustomTableBody.js.map +1 -1
  29. package/dist/components/DebouncedButton.cjs.map +1 -1
  30. package/dist/components/DebouncedButton.d.cts +1 -4
  31. package/dist/components/DebouncedButton.d.ts +1 -4
  32. package/dist/components/DebouncedButton.js.map +1 -1
  33. package/dist/components/DebouncedButtonBase.cjs.map +1 -1
  34. package/dist/components/DebouncedButtonBase.d.cts +1 -4
  35. package/dist/components/DebouncedButtonBase.d.ts +1 -4
  36. package/dist/components/DebouncedButtonBase.js.map +1 -1
  37. package/dist/components/DebouncedIconButton.cjs.map +1 -1
  38. package/dist/components/DebouncedIconButton.d.cts +1 -4
  39. package/dist/components/DebouncedIconButton.d.ts +1 -4
  40. package/dist/components/DebouncedIconButton.js.map +1 -1
  41. package/dist/components/DebouncedRender.cjs.map +1 -1
  42. package/dist/components/DebouncedRender.d.cts +1 -4
  43. package/dist/components/DebouncedRender.d.ts +1 -4
  44. package/dist/components/DebouncedRender.js.map +1 -1
  45. package/dist/components/DelayedRender.cjs.map +1 -1
  46. package/dist/components/DelayedRender.d.cts +1 -4
  47. package/dist/components/DelayedRender.d.ts +1 -4
  48. package/dist/components/DelayedRender.js.map +1 -1
  49. package/dist/components/FileButton.cjs.map +1 -1
  50. package/dist/components/FileButton.d.cts +1 -3
  51. package/dist/components/FileButton.d.ts +1 -3
  52. package/dist/components/FileButton.js.map +1 -1
  53. package/dist/components/FlexItemsContainer.cjs.map +1 -1
  54. package/dist/components/FlexItemsContainer.d.cts +1 -4
  55. package/dist/components/FlexItemsContainer.d.ts +1 -4
  56. package/dist/components/FlexItemsContainer.js.map +1 -1
  57. package/dist/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -1
  58. package/dist/components/FloatingIndicator/FloatingIndicator.d.cts +1 -4
  59. package/dist/components/FloatingIndicator/FloatingIndicator.d.ts +1 -4
  60. package/dist/components/FloatingIndicator/FloatingIndicator.js.map +1 -1
  61. package/dist/components/FloatingIndicator/index.cjs.map +1 -1
  62. package/dist/components/FloatingIndicator/index.js.map +1 -1
  63. package/dist/components/FloatingIndicator/useFloatingIndicator.cjs +1 -1
  64. package/dist/components/FloatingIndicator/useFloatingIndicator.cjs.map +1 -1
  65. package/dist/components/FloatingIndicator/useFloatingIndicator.js +1 -1
  66. package/dist/components/FloatingIndicator/useFloatingIndicator.js.map +1 -1
  67. package/dist/components/Hide.cjs.map +1 -1
  68. package/dist/components/Hide.d.cts +1 -4
  69. package/dist/components/Hide.d.ts +1 -4
  70. package/dist/components/Hide.js.map +1 -1
  71. package/dist/components/Highlight/Highlight.cjs.map +1 -1
  72. package/dist/components/Highlight/Highlight.d.cts +5 -29
  73. package/dist/components/Highlight/Highlight.d.ts +4 -28
  74. package/dist/components/Highlight/Highlight.js.map +1 -1
  75. package/dist/components/Highlight/highlighter/highlighter.cjs.map +1 -1
  76. package/dist/components/Highlight/highlighter/highlighter.js.map +1 -1
  77. package/dist/components/LengthLimitHelperText.cjs.map +1 -1
  78. package/dist/components/LengthLimitHelperText.d.cts +2 -4
  79. package/dist/components/LengthLimitHelperText.d.ts +1 -3
  80. package/dist/components/LengthLimitHelperText.js.map +1 -1
  81. package/dist/components/LgOrUp.cjs.map +1 -1
  82. package/dist/components/LgOrUp.d.cts +1 -4
  83. package/dist/components/LgOrUp.d.ts +1 -4
  84. package/dist/components/LgOrUp.js.map +1 -1
  85. package/dist/components/ListPagination.cjs.map +1 -1
  86. package/dist/components/ListPagination.d.cts +4 -24
  87. package/dist/components/ListPagination.d.ts +4 -24
  88. package/dist/components/ListPagination.js.map +1 -1
  89. package/dist/components/Mark.cjs.map +1 -1
  90. package/dist/components/Mark.d.cts +5 -8
  91. package/dist/components/Mark.d.ts +4 -7
  92. package/dist/components/Mark.js.map +1 -1
  93. package/dist/components/MdOrDown.cjs.map +1 -1
  94. package/dist/components/MdOrDown.d.cts +1 -4
  95. package/dist/components/MdOrDown.d.ts +1 -4
  96. package/dist/components/MdOrDown.js.map +1 -1
  97. package/dist/components/MdOrUp.cjs.map +1 -1
  98. package/dist/components/MdOrUp.d.cts +1 -4
  99. package/dist/components/MdOrUp.d.ts +1 -4
  100. package/dist/components/MdOrUp.js.map +1 -1
  101. package/dist/components/Paper.cjs.map +1 -1
  102. package/dist/components/Paper.d.cts +3 -7
  103. package/dist/components/Paper.d.ts +3 -7
  104. package/dist/components/Paper.js.map +1 -1
  105. package/dist/components/PasswordTextField.cjs.map +1 -1
  106. package/dist/components/PasswordTextField.d.cts +1 -4
  107. package/dist/components/PasswordTextField.d.ts +1 -4
  108. package/dist/components/PasswordTextField.js.map +1 -1
  109. package/dist/components/SearchBoxDebouncer.cjs.map +1 -1
  110. package/dist/components/SearchBoxDebouncer.d.cts +1 -4
  111. package/dist/components/SearchBoxDebouncer.d.ts +1 -4
  112. package/dist/components/SearchBoxDebouncer.js.map +1 -1
  113. package/dist/components/SegmentedControl/SegmentedControl.cjs +1 -1
  114. package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  115. package/dist/components/SegmentedControl/SegmentedControl.d.cts +2 -5
  116. package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -4
  117. package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
  118. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  119. package/dist/components/SegmentedControl/components.cjs.map +1 -1
  120. package/dist/components/SegmentedControl/components.js.map +1 -1
  121. package/dist/components/Show.cjs.map +1 -1
  122. package/dist/components/Show.d.cts +1 -4
  123. package/dist/components/Show.d.ts +1 -4
  124. package/dist/components/Show.js.map +1 -1
  125. package/dist/components/SmOrDown.cjs.map +1 -1
  126. package/dist/components/SmOrDown.d.cts +1 -4
  127. package/dist/components/SmOrDown.d.ts +1 -4
  128. package/dist/components/SmOrDown.js.map +1 -1
  129. package/dist/components/SmOrUp.cjs.map +1 -1
  130. package/dist/components/SmOrUp.d.cts +1 -4
  131. package/dist/components/SmOrUp.d.ts +1 -4
  132. package/dist/components/SmOrUp.js.map +1 -1
  133. package/dist/components/Space.cjs.map +1 -1
  134. package/dist/components/Space.d.cts +4 -7
  135. package/dist/components/Space.d.ts +4 -7
  136. package/dist/components/Space.js.map +1 -1
  137. package/dist/components/Spoiler.cjs +1 -1
  138. package/dist/components/Spoiler.cjs.map +1 -1
  139. package/dist/components/Spoiler.d.cts +5 -8
  140. package/dist/components/Spoiler.d.ts +4 -7
  141. package/dist/components/Spoiler.js +1 -1
  142. package/dist/components/Spoiler.js.map +1 -1
  143. package/dist/components/XsOrDown.cjs.map +1 -1
  144. package/dist/components/XsOrDown.d.cts +1 -4
  145. package/dist/components/XsOrDown.d.ts +1 -4
  146. package/dist/components/XsOrDown.js.map +1 -1
  147. package/dist/components/YmTypography.cjs.map +1 -1
  148. package/dist/components/YmTypography.d.cts +1 -4
  149. package/dist/components/YmTypography.d.ts +1 -4
  150. package/dist/components/YmTypography.js.map +1 -1
  151. package/dist/components/YmdTextField.cjs.map +1 -1
  152. package/dist/components/YmdTextField.d.cts +1 -4
  153. package/dist/components/YmdTextField.d.ts +1 -4
  154. package/dist/components/YmdTextField.js.map +1 -1
  155. package/dist/components/YmdTypography.cjs.map +1 -1
  156. package/dist/components/YmdTypography.d.cts +1 -4
  157. package/dist/components/YmdTypography.d.ts +1 -4
  158. package/dist/components/YmdTypography.js.map +1 -1
  159. package/dist/components/absolute-box/create-absolute-box.cjs.map +1 -1
  160. package/dist/components/absolute-box/create-absolute-box.js.map +1 -1
  161. package/dist/components/bottom-absolute/BottomAbsolute.cjs.map +1 -1
  162. package/dist/components/bottom-absolute/BottomAbsolute.d.cts +2 -5
  163. package/dist/components/bottom-absolute/BottomAbsolute.d.ts +1 -4
  164. package/dist/components/bottom-absolute/BottomAbsolute.js.map +1 -1
  165. package/dist/components/bottom-absolute/BottomAbsoluteCenter.cjs.map +1 -1
  166. package/dist/components/bottom-absolute/BottomAbsoluteCenter.d.cts +2 -5
  167. package/dist/components/bottom-absolute/BottomAbsoluteCenter.d.ts +1 -4
  168. package/dist/components/bottom-absolute/BottomAbsoluteCenter.js.map +1 -1
  169. package/dist/components/bottom-absolute/BottomAbsoluteLeft.cjs.map +1 -1
  170. package/dist/components/bottom-absolute/BottomAbsoluteLeft.d.cts +2 -5
  171. package/dist/components/bottom-absolute/BottomAbsoluteLeft.d.ts +1 -4
  172. package/dist/components/bottom-absolute/BottomAbsoluteLeft.js.map +1 -1
  173. package/dist/components/bottom-absolute/BottomAbsoluteRight.cjs.map +1 -1
  174. package/dist/components/bottom-absolute/BottomAbsoluteRight.d.cts +2 -5
  175. package/dist/components/bottom-absolute/BottomAbsoluteRight.d.ts +1 -4
  176. package/dist/components/bottom-absolute/BottomAbsoluteRight.js.map +1 -1
  177. package/dist/components/center-absolute/CenterAbsolute.cjs.map +1 -1
  178. package/dist/components/center-absolute/CenterAbsolute.d.cts +2 -5
  179. package/dist/components/center-absolute/CenterAbsolute.d.ts +1 -4
  180. package/dist/components/center-absolute/CenterAbsolute.js.map +1 -1
  181. package/dist/components/center-absolute/CenterAbsoluteCenter.cjs.map +1 -1
  182. package/dist/components/center-absolute/CenterAbsoluteCenter.d.cts +2 -5
  183. package/dist/components/center-absolute/CenterAbsoluteCenter.d.ts +1 -4
  184. package/dist/components/center-absolute/CenterAbsoluteCenter.js.map +1 -1
  185. package/dist/components/center-absolute/CenterAbsoluteLeft.cjs.map +1 -1
  186. package/dist/components/center-absolute/CenterAbsoluteLeft.d.cts +2 -5
  187. package/dist/components/center-absolute/CenterAbsoluteLeft.d.ts +1 -4
  188. package/dist/components/center-absolute/CenterAbsoluteLeft.js.map +1 -1
  189. package/dist/components/center-absolute/CenterAbsoluteRight.cjs.map +1 -1
  190. package/dist/components/center-absolute/CenterAbsoluteRight.d.cts +2 -5
  191. package/dist/components/center-absolute/CenterAbsoluteRight.d.ts +1 -4
  192. package/dist/components/center-absolute/CenterAbsoluteRight.js.map +1 -1
  193. package/dist/components/flex/FlexColumn.cjs.map +1 -1
  194. package/dist/components/flex/FlexColumn.d.cts +1 -3
  195. package/dist/components/flex/FlexColumn.d.ts +1 -3
  196. package/dist/components/flex/FlexColumn.js.map +1 -1
  197. package/dist/components/flex/FlexRow.cjs.map +1 -1
  198. package/dist/components/flex/FlexRow.d.cts +1 -3
  199. package/dist/components/flex/FlexRow.d.ts +1 -3
  200. package/dist/components/flex/FlexRow.js.map +1 -1
  201. package/dist/components/flex/index.d.cts +1 -1
  202. package/dist/components/flex/index.d.ts +1 -1
  203. package/dist/components/flex/types.d.cts +2 -5
  204. package/dist/components/flex/types.d.ts +1 -4
  205. package/dist/components/layout/create-layout-component.cjs.map +1 -1
  206. package/dist/components/layout/create-layout-component.js.map +1 -1
  207. package/dist/components/portlet/Portlet.cjs.map +1 -1
  208. package/dist/components/portlet/Portlet.d.cts +1 -4
  209. package/dist/components/portlet/Portlet.d.ts +1 -4
  210. package/dist/components/portlet/Portlet.js.map +1 -1
  211. package/dist/components/portlet/PortletContent.cjs.map +1 -1
  212. package/dist/components/portlet/PortletContent.d.cts +4 -17
  213. package/dist/components/portlet/PortletContent.d.ts +4 -17
  214. package/dist/components/portlet/PortletContent.js.map +1 -1
  215. package/dist/components/portlet/PortletFooter.cjs.map +1 -1
  216. package/dist/components/portlet/PortletFooter.d.cts +4 -17
  217. package/dist/components/portlet/PortletFooter.d.ts +4 -17
  218. package/dist/components/portlet/PortletFooter.js.map +1 -1
  219. package/dist/components/portlet/PortletHeader.cjs.map +1 -1
  220. package/dist/components/portlet/PortletHeader.d.cts +4 -20
  221. package/dist/components/portlet/PortletHeader.d.ts +4 -20
  222. package/dist/components/portlet/PortletHeader.js.map +1 -1
  223. package/dist/components/portlet/PortletLabel.cjs.map +1 -1
  224. package/dist/components/portlet/PortletLabel.d.cts +5 -18
  225. package/dist/components/portlet/PortletLabel.d.ts +4 -17
  226. package/dist/components/portlet/PortletLabel.js.map +1 -1
  227. package/dist/components/portlet/PortletTitle.cjs.map +1 -1
  228. package/dist/components/portlet/PortletTitle.d.cts +4 -27
  229. package/dist/components/portlet/PortletTitle.d.ts +4 -27
  230. package/dist/components/portlet/PortletTitle.js.map +1 -1
  231. package/dist/components/portlet/PortletToolbar.cjs.map +1 -1
  232. package/dist/components/portlet/PortletToolbar.d.cts +4 -17
  233. package/dist/components/portlet/PortletToolbar.d.ts +4 -17
  234. package/dist/components/portlet/PortletToolbar.js.map +1 -1
  235. package/dist/components/portlet/index.d.cts +1 -1
  236. package/dist/components/portlet/index.d.ts +1 -1
  237. package/dist/components/stack/StackColumn.cjs.map +1 -1
  238. package/dist/components/stack/StackColumn.d.cts +1 -3
  239. package/dist/components/stack/StackColumn.d.ts +1 -3
  240. package/dist/components/stack/StackColumn.js.map +1 -1
  241. package/dist/components/stack/StackRow.cjs.map +1 -1
  242. package/dist/components/stack/StackRow.d.cts +1 -3
  243. package/dist/components/stack/StackRow.d.ts +1 -3
  244. package/dist/components/stack/StackRow.js.map +1 -1
  245. package/dist/components/top-absolute/TopAbsolute.cjs.map +1 -1
  246. package/dist/components/top-absolute/TopAbsolute.d.cts +2 -5
  247. package/dist/components/top-absolute/TopAbsolute.d.ts +1 -4
  248. package/dist/components/top-absolute/TopAbsolute.js.map +1 -1
  249. package/dist/components/top-absolute/TopAbsoluteCenter.cjs.map +1 -1
  250. package/dist/components/top-absolute/TopAbsoluteCenter.d.cts +2 -5
  251. package/dist/components/top-absolute/TopAbsoluteCenter.d.ts +1 -4
  252. package/dist/components/top-absolute/TopAbsoluteCenter.js.map +1 -1
  253. package/dist/components/top-absolute/TopAbsoluteLeft.cjs.map +1 -1
  254. package/dist/components/top-absolute/TopAbsoluteLeft.d.cts +2 -5
  255. package/dist/components/top-absolute/TopAbsoluteLeft.d.ts +1 -4
  256. package/dist/components/top-absolute/TopAbsoluteLeft.js.map +1 -1
  257. package/dist/components/top-absolute/TopAbsoluteRight.cjs.map +1 -1
  258. package/dist/components/top-absolute/TopAbsoluteRight.d.cts +2 -5
  259. package/dist/components/top-absolute/TopAbsoluteRight.d.ts +1 -4
  260. package/dist/components/top-absolute/TopAbsoluteRight.js.map +1 -1
  261. package/dist/eventemitter/eventemitter3.cjs +1 -1
  262. package/dist/eventemitter/eventemitter3.cjs.map +1 -1
  263. package/dist/eventemitter/eventemitter3.d.cts +1 -4
  264. package/dist/eventemitter/eventemitter3.d.ts +1 -4
  265. package/dist/eventemitter/eventemitter3.js +1 -1
  266. package/dist/eventemitter/eventemitter3.js.map +1 -1
  267. package/dist/eventemitter/types.d.cts +1 -4
  268. package/dist/eventemitter/types.d.ts +1 -4
  269. package/dist/file-drop/handle-file-tree-drop.cjs.map +1 -1
  270. package/dist/file-drop/handle-file-tree-drop.d.cts +1 -4
  271. package/dist/file-drop/handle-file-tree-drop.d.ts +1 -4
  272. package/dist/file-drop/handle-file-tree-drop.js.map +1 -1
  273. package/dist/file-drop/index.cjs +1 -1
  274. package/dist/file-drop/index.d.cts +1 -1
  275. package/dist/file-drop/index.d.ts +1 -1
  276. package/dist/file-drop/index.js +1 -1
  277. package/dist/file-drop/internal/debug-logger.cjs.map +1 -1
  278. package/dist/file-drop/internal/debug-logger.js.map +1 -1
  279. package/dist/file-drop/internal/path-util.cjs.map +1 -1
  280. package/dist/file-drop/internal/path-util.d.cts +1 -4
  281. package/dist/file-drop/internal/path-util.d.ts +1 -4
  282. package/dist/file-drop/internal/path-util.js.map +1 -1
  283. package/dist/file-drop/internal/traverse-tree.cjs.map +1 -1
  284. package/dist/file-drop/internal/traverse-tree.js.map +1 -1
  285. package/dist/file-drop/internal/util.cjs.map +1 -1
  286. package/dist/file-drop/internal/util.js.map +1 -1
  287. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.cjs.map +1 -1
  288. package/dist/file-drop/internal/visit-file-system/visit-file-system-entry.js.map +1 -1
  289. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.cjs.map +1 -1
  290. package/dist/file-drop/internal/visit-file-system/visit-file-system-handle.js.map +1 -1
  291. package/dist/file-drop/process-file-drop.cjs +1 -1
  292. package/dist/file-drop/process-file-drop.cjs.map +1 -1
  293. package/dist/file-drop/process-file-drop.d.cts +1 -4
  294. package/dist/file-drop/process-file-drop.d.ts +1 -4
  295. package/dist/file-drop/process-file-drop.js +1 -1
  296. package/dist/file-drop/process-file-drop.js.map +1 -1
  297. package/dist/file-drop/types.cjs.map +1 -1
  298. package/dist/file-drop/types.d.cts +1 -4
  299. package/dist/file-drop/types.d.ts +1 -4
  300. package/dist/file-drop/types.js.map +1 -1
  301. package/dist/file-drop/utils/file-utils.cjs +1 -1
  302. package/dist/file-drop/utils/file-utils.cjs.map +1 -1
  303. package/dist/file-drop/utils/file-utils.d.cts +1 -4
  304. package/dist/file-drop/utils/file-utils.d.ts +1 -4
  305. package/dist/file-drop/utils/file-utils.js +1 -1
  306. package/dist/file-drop/utils/file-utils.js.map +1 -1
  307. package/dist/file-drop/utils/filter.cjs.map +1 -1
  308. package/dist/file-drop/utils/filter.d.cts +1 -4
  309. package/dist/file-drop/utils/filter.d.ts +1 -4
  310. package/dist/file-drop/utils/filter.js.map +1 -1
  311. package/dist/file-drop/utils/parallel-map.cjs.map +1 -1
  312. package/dist/file-drop/utils/parallel-map.js.map +1 -1
  313. package/dist/file-drop/utils/progress-tracker.cjs.map +1 -1
  314. package/dist/file-drop/utils/progress-tracker.js.map +1 -1
  315. package/dist/helper/mui-css-vars.cjs.map +1 -1
  316. package/dist/helper/mui-css-vars.d.cts +1 -3
  317. package/dist/helper/mui-css-vars.d.ts +1 -3
  318. package/dist/helper/mui-css-vars.js.map +1 -1
  319. package/dist/helper/mui-media-queries.cjs.map +1 -1
  320. package/dist/helper/mui-media-queries.d.cts +1 -3
  321. package/dist/helper/mui-media-queries.d.ts +1 -3
  322. package/dist/helper/mui-media-queries.js.map +1 -1
  323. package/dist/hooks/index.cjs +1 -1
  324. package/dist/hooks/index.d.cts +2 -2
  325. package/dist/hooks/index.d.ts +2 -2
  326. package/dist/hooks/index.js +1 -1
  327. package/dist/hooks/types.d.cts +1 -4
  328. package/dist/hooks/types.d.ts +1 -4
  329. package/dist/hooks/useAbsolutePosition.cjs.map +1 -1
  330. package/dist/hooks/useAbsolutePosition.d.cts +1 -4
  331. package/dist/hooks/useAbsolutePosition.d.ts +1 -4
  332. package/dist/hooks/useAbsolutePosition.js.map +1 -1
  333. package/dist/hooks/useAudioUnlocked.cjs.map +1 -1
  334. package/dist/hooks/useAudioUnlocked.d.cts +1 -4
  335. package/dist/hooks/useAudioUnlocked.d.ts +1 -4
  336. package/dist/hooks/useAudioUnlocked.js.map +1 -1
  337. package/dist/hooks/useBehaviorSubject.cjs.map +1 -1
  338. package/dist/hooks/useBehaviorSubject.d.cts +1 -3
  339. package/dist/hooks/useBehaviorSubject.d.ts +1 -3
  340. package/dist/hooks/useBehaviorSubject.js.map +1 -1
  341. package/dist/hooks/useCallbackRef.cjs.map +1 -1
  342. package/dist/hooks/useCallbackRef.d.cts +1 -4
  343. package/dist/hooks/useCallbackRef.d.ts +1 -4
  344. package/dist/hooks/useCallbackRef.js.map +1 -1
  345. package/dist/hooks/useCenterInView.cjs.map +1 -1
  346. package/dist/hooks/useCenterInView.d.cts +1 -4
  347. package/dist/hooks/useCenterInView.d.ts +1 -4
  348. package/dist/hooks/useCenterInView.js.map +1 -1
  349. package/dist/hooks/useClipboard.cjs +1 -1
  350. package/dist/hooks/useClipboard.cjs.map +1 -1
  351. package/dist/hooks/useClipboard.d.cts +32 -12
  352. package/dist/hooks/useClipboard.d.ts +32 -12
  353. package/dist/hooks/useClipboard.js +1 -1
  354. package/dist/hooks/useClipboard.js.map +1 -1
  355. package/dist/hooks/useClosableEffect.cjs +1 -1
  356. package/dist/hooks/useClosableEffect.cjs.map +1 -1
  357. package/dist/hooks/useClosableEffect.d.cts +1 -3
  358. package/dist/hooks/useClosableEffect.d.ts +1 -3
  359. package/dist/hooks/useClosableEffect.js +1 -1
  360. package/dist/hooks/useClosableEffect.js.map +1 -1
  361. package/dist/hooks/useComposedRefs.cjs.map +1 -1
  362. package/dist/hooks/useComposedRefs.d.cts +1 -4
  363. package/dist/hooks/useComposedRefs.d.ts +1 -4
  364. package/dist/hooks/useComposedRefs.js.map +1 -1
  365. package/dist/hooks/useConstant.cjs.map +1 -1
  366. package/dist/hooks/useConstant.d.cts +1 -4
  367. package/dist/hooks/useConstant.d.ts +1 -4
  368. package/dist/hooks/useConstant.js.map +1 -1
  369. package/dist/hooks/useCooldown.cjs.map +1 -1
  370. package/dist/hooks/useCooldown.d.cts +1 -4
  371. package/dist/hooks/useCooldown.d.ts +1 -4
  372. package/dist/hooks/useCooldown.js.map +1 -1
  373. package/dist/hooks/useCustomCompareEffect.cjs +1 -1
  374. package/dist/hooks/useCustomCompareEffect.cjs.map +1 -1
  375. package/dist/hooks/useCustomCompareEffect.d.cts +1 -3
  376. package/dist/hooks/useCustomCompareEffect.d.ts +1 -3
  377. package/dist/hooks/useCustomCompareEffect.js +1 -1
  378. package/dist/hooks/useCustomCompareEffect.js.map +1 -1
  379. package/dist/hooks/useCustomCompareMemo.cjs +1 -1
  380. package/dist/hooks/useCustomCompareMemo.cjs.map +1 -1
  381. package/dist/hooks/useCustomCompareMemo.d.cts +1 -4
  382. package/dist/hooks/useCustomCompareMemo.d.ts +1 -4
  383. package/dist/hooks/useCustomCompareMemo.js +1 -1
  384. package/dist/hooks/useCustomCompareMemo.js.map +1 -1
  385. package/dist/hooks/useDebounceEffect.cjs.map +1 -1
  386. package/dist/hooks/useDebounceEffect.d.cts +1 -3
  387. package/dist/hooks/useDebounceEffect.d.ts +1 -3
  388. package/dist/hooks/useDebounceEffect.js.map +1 -1
  389. package/dist/hooks/useDebounceFn.cjs.map +1 -1
  390. package/dist/hooks/useDebounceFn.d.cts +1 -3
  391. package/dist/hooks/useDebounceFn.d.ts +1 -3
  392. package/dist/hooks/useDebounceFn.js.map +1 -1
  393. package/dist/hooks/useDebouncedCallback.cjs.map +1 -1
  394. package/dist/hooks/useDebouncedCallback.d.cts +1 -3
  395. package/dist/hooks/useDebouncedCallback.d.ts +1 -3
  396. package/dist/hooks/useDebouncedCallback.js.map +1 -1
  397. package/dist/hooks/useDebouncedParams.cjs +1 -1
  398. package/dist/hooks/useDebouncedParams.cjs.map +1 -1
  399. package/dist/hooks/useDebouncedParams.d.cts +1 -4
  400. package/dist/hooks/useDebouncedParams.d.ts +1 -4
  401. package/dist/hooks/useDebouncedParams.js +1 -1
  402. package/dist/hooks/useDebouncedParams.js.map +1 -1
  403. package/dist/hooks/useDebouncedState.cjs.map +1 -1
  404. package/dist/hooks/useDebouncedState.d.cts +5 -8
  405. package/dist/hooks/useDebouncedState.d.ts +5 -8
  406. package/dist/hooks/useDebouncedState.js.map +1 -1
  407. package/dist/hooks/useDebouncedValue.cjs +1 -1
  408. package/dist/hooks/useDebouncedValue.cjs.map +1 -1
  409. package/dist/hooks/useDebouncedValue.d.cts +1 -4
  410. package/dist/hooks/useDebouncedValue.d.ts +1 -4
  411. package/dist/hooks/useDebouncedValue.js +1 -1
  412. package/dist/hooks/useDebouncedValue.js.map +1 -1
  413. package/dist/hooks/useDeepCompareEffect.cjs +1 -1
  414. package/dist/hooks/useDeepCompareEffect.cjs.map +1 -1
  415. package/dist/hooks/useDeepCompareEffect.d.cts +1 -4
  416. package/dist/hooks/useDeepCompareEffect.d.ts +1 -4
  417. package/dist/hooks/useDeepCompareEffect.js +1 -1
  418. package/dist/hooks/useDeepCompareEffect.js.map +1 -1
  419. package/dist/hooks/useDeepCompareMemo.cjs.map +1 -1
  420. package/dist/hooks/useDeepCompareMemo.d.cts +1 -4
  421. package/dist/hooks/useDeepCompareMemo.d.ts +1 -4
  422. package/dist/hooks/useDeepCompareMemo.js.map +1 -1
  423. package/dist/hooks/useDidUpdate.cjs.map +1 -1
  424. package/dist/hooks/useDidUpdate.d.cts +1 -4
  425. package/dist/hooks/useDidUpdate.d.ts +1 -4
  426. package/dist/hooks/useDidUpdate.js.map +1 -1
  427. package/dist/hooks/useEffectOnce.cjs.map +1 -1
  428. package/dist/hooks/useEffectOnce.d.cts +1 -4
  429. package/dist/hooks/useEffectOnce.d.ts +1 -4
  430. package/dist/hooks/useEffectOnce.js.map +1 -1
  431. package/dist/hooks/useElementSize.cjs.map +1 -1
  432. package/dist/hooks/useElementSize.d.cts +1 -4
  433. package/dist/hooks/useElementSize.d.ts +1 -4
  434. package/dist/hooks/useElementSize.js.map +1 -1
  435. package/dist/hooks/useEventListener.cjs.map +1 -1
  436. package/dist/hooks/useEventListener.d.cts +1 -4
  437. package/dist/hooks/useEventListener.d.ts +1 -4
  438. package/dist/hooks/useEventListener.js.map +1 -1
  439. package/dist/hooks/useId.cjs.map +1 -1
  440. package/dist/hooks/useId.d.cts +1 -4
  441. package/dist/hooks/useId.d.ts +1 -4
  442. package/dist/hooks/useId.js.map +1 -1
  443. package/dist/hooks/useIdle.cjs.map +1 -1
  444. package/dist/hooks/useIdle.d.cts +1 -4
  445. package/dist/hooks/useIdle.d.ts +1 -4
  446. package/dist/hooks/useIdle.js.map +1 -1
  447. package/dist/hooks/useImageLoadCallback.cjs.map +1 -1
  448. package/dist/hooks/useImageLoadCallback.d.cts +1 -4
  449. package/dist/hooks/useImageLoadCallback.d.ts +1 -4
  450. package/dist/hooks/useImageLoadCallback.js.map +1 -1
  451. package/dist/hooks/useImageUpload.cjs +1 -1
  452. package/dist/hooks/useImageUpload.cjs.map +1 -1
  453. package/dist/hooks/useImageUpload.d.cts +1 -4
  454. package/dist/hooks/useImageUpload.d.ts +1 -4
  455. package/dist/hooks/useImageUpload.js +1 -1
  456. package/dist/hooks/useImageUpload.js.map +1 -1
  457. package/dist/hooks/useInterval.cjs.map +1 -1
  458. package/dist/hooks/useInterval.d.cts +1 -3
  459. package/dist/hooks/useInterval.d.ts +1 -3
  460. package/dist/hooks/useInterval.js.map +1 -1
  461. package/dist/hooks/useIsomorphicEffect.cjs.map +1 -1
  462. package/dist/hooks/useIsomorphicEffect.d.cts +2 -5
  463. package/dist/hooks/useIsomorphicEffect.d.ts +2 -5
  464. package/dist/hooks/useIsomorphicEffect.js.map +1 -1
  465. package/dist/hooks/useLatest.cjs.map +1 -1
  466. package/dist/hooks/useLatest.d.cts +1 -4
  467. package/dist/hooks/useLatest.d.ts +1 -4
  468. package/dist/hooks/useLatest.js.map +1 -1
  469. package/dist/hooks/useLgOrUp.cjs.map +1 -1
  470. package/dist/hooks/useLgOrUp.d.cts +1 -4
  471. package/dist/hooks/useLgOrUp.d.ts +1 -4
  472. package/dist/hooks/useLgOrUp.js.map +1 -1
  473. package/dist/hooks/useLifecycleLogger.cjs.map +1 -1
  474. package/dist/hooks/useLifecycleLogger.d.cts +1 -4
  475. package/dist/hooks/useLifecycleLogger.d.ts +1 -4
  476. package/dist/hooks/useLifecycleLogger.js.map +1 -1
  477. package/dist/hooks/useLoadingVisible.cjs +1 -1
  478. package/dist/hooks/useLoadingVisible.cjs.map +1 -1
  479. package/dist/hooks/useLoadingVisible.d.cts +1 -3
  480. package/dist/hooks/useLoadingVisible.d.ts +1 -3
  481. package/dist/hooks/useLoadingVisible.js +1 -1
  482. package/dist/hooks/useLoadingVisible.js.map +1 -1
  483. package/dist/hooks/useLocalStorage.cjs +1 -1
  484. package/dist/hooks/useLocalStorage.cjs.map +1 -1
  485. package/dist/hooks/useLocalStorage.d.cts +1 -3
  486. package/dist/hooks/useLocalStorage.d.ts +1 -3
  487. package/dist/hooks/useLocalStorage.js +1 -1
  488. package/dist/hooks/useLocalStorage.js.map +1 -1
  489. package/dist/hooks/useLocalStorageState.cjs.map +1 -1
  490. package/dist/hooks/useLocalStorageState.d.cts +1 -4
  491. package/dist/hooks/useLocalStorageState.d.ts +1 -4
  492. package/dist/hooks/useLocalStorageState.js.map +1 -1
  493. package/dist/hooks/useMdOrDown.cjs.map +1 -1
  494. package/dist/hooks/useMdOrDown.d.cts +1 -4
  495. package/dist/hooks/useMdOrDown.d.ts +1 -4
  496. package/dist/hooks/useMdOrDown.js.map +1 -1
  497. package/dist/hooks/useMdOrUp.cjs.map +1 -1
  498. package/dist/hooks/useMdOrUp.d.cts +1 -4
  499. package/dist/hooks/useMdOrUp.d.ts +1 -4
  500. package/dist/hooks/useMdOrUp.js.map +1 -1
  501. package/dist/hooks/useMount.cjs.map +1 -1
  502. package/dist/hooks/useMount.d.cts +1 -4
  503. package/dist/hooks/useMount.d.ts +1 -4
  504. package/dist/hooks/useMount.js.map +1 -1
  505. package/dist/hooks/useMounted.cjs.map +1 -1
  506. package/dist/hooks/useMounted.d.cts +1 -4
  507. package/dist/hooks/useMounted.d.ts +1 -4
  508. package/dist/hooks/useMounted.js.map +1 -1
  509. package/dist/hooks/useMountedState.cjs.map +1 -1
  510. package/dist/hooks/useMountedState.d.cts +1 -4
  511. package/dist/hooks/useMountedState.d.ts +1 -4
  512. package/dist/hooks/useMountedState.js.map +1 -1
  513. package/dist/hooks/useMutationObserver.cjs +1 -1
  514. package/dist/hooks/useMutationObserver.cjs.map +1 -1
  515. package/dist/hooks/useMutationObserver.d.cts +1 -4
  516. package/dist/hooks/useMutationObserver.d.ts +1 -4
  517. package/dist/hooks/useMutationObserver.js +1 -1
  518. package/dist/hooks/useMutationObserver.js.map +1 -1
  519. package/dist/hooks/useObservable.cjs.map +1 -1
  520. package/dist/hooks/useObservable.d.cts +1 -3
  521. package/dist/hooks/useObservable.d.ts +1 -4
  522. package/dist/hooks/useObservable.js.map +1 -1
  523. package/dist/hooks/useObservableLocalStorage.cjs.map +1 -1
  524. package/dist/hooks/useObservableLocalStorage.d.cts +1 -3
  525. package/dist/hooks/useObservableLocalStorage.d.ts +1 -3
  526. package/dist/hooks/useObservableLocalStorage.js.map +1 -1
  527. package/dist/hooks/useObservableSessionStorage.cjs.map +1 -1
  528. package/dist/hooks/useObservableSessionStorage.d.cts +1 -3
  529. package/dist/hooks/useObservableSessionStorage.d.ts +1 -3
  530. package/dist/hooks/useObservableSessionStorage.js.map +1 -1
  531. package/dist/hooks/useOs.cjs.map +1 -1
  532. package/dist/hooks/useOs.d.cts +1 -3
  533. package/dist/hooks/useOs.d.ts +1 -3
  534. package/dist/hooks/useOs.js.map +1 -1
  535. package/dist/hooks/useRafState.cjs.map +1 -1
  536. package/dist/hooks/useRafState.d.cts +1 -4
  537. package/dist/hooks/useRafState.d.ts +1 -4
  538. package/dist/hooks/useRafState.js.map +1 -1
  539. package/dist/hooks/useRefEffect.cjs.map +1 -1
  540. package/dist/hooks/useRefEffect.d.cts +1 -4
  541. package/dist/hooks/useRefEffect.d.ts +1 -4
  542. package/dist/hooks/useRefEffect.js.map +1 -1
  543. package/dist/hooks/useResizeObserver.cjs.map +1 -1
  544. package/dist/hooks/useResizeObserver.d.cts +1 -3
  545. package/dist/hooks/useResizeObserver.d.ts +1 -3
  546. package/dist/hooks/useResizeObserver.js.map +1 -1
  547. package/dist/hooks/useScript.cjs.map +1 -1
  548. package/dist/hooks/useScript.d.cts +1 -3
  549. package/dist/hooks/useScript.d.ts +1 -3
  550. package/dist/hooks/useScript.js.map +1 -1
  551. package/dist/hooks/useSessionStorage.cjs +1 -1
  552. package/dist/hooks/useSessionStorage.cjs.map +1 -1
  553. package/dist/hooks/useSessionStorage.d.cts +1 -3
  554. package/dist/hooks/useSessionStorage.d.ts +1 -3
  555. package/dist/hooks/useSessionStorage.js +1 -1
  556. package/dist/hooks/useSessionStorage.js.map +1 -1
  557. package/dist/hooks/useSessionStorageState.cjs.map +1 -1
  558. package/dist/hooks/useSessionStorageState.d.cts +1 -4
  559. package/dist/hooks/useSessionStorageState.d.ts +1 -4
  560. package/dist/hooks/useSessionStorageState.js.map +1 -1
  561. package/dist/hooks/useSmOrDown.cjs.map +1 -1
  562. package/dist/hooks/useSmOrDown.d.cts +1 -4
  563. package/dist/hooks/useSmOrDown.d.ts +1 -4
  564. package/dist/hooks/useSmOrDown.js.map +1 -1
  565. package/dist/hooks/useSmOrUp.cjs.map +1 -1
  566. package/dist/hooks/useSmOrUp.d.cts +1 -4
  567. package/dist/hooks/useSmOrUp.d.ts +1 -4
  568. package/dist/hooks/useSmOrUp.js.map +1 -1
  569. package/dist/hooks/useThrottledCallback.cjs.map +1 -1
  570. package/dist/hooks/useThrottledCallback.d.cts +2 -5
  571. package/dist/hooks/useThrottledCallback.d.ts +2 -5
  572. package/dist/hooks/useThrottledCallback.js.map +1 -1
  573. package/dist/hooks/useThrottledCallbackWithClearTimeout.cjs.map +1 -1
  574. package/dist/hooks/useThrottledCallbackWithClearTimeout.d.cts +2 -5
  575. package/dist/hooks/useThrottledCallbackWithClearTimeout.d.ts +2 -5
  576. package/dist/hooks/useThrottledCallbackWithClearTimeout.js.map +1 -1
  577. package/dist/hooks/useThrottledState.cjs.map +1 -1
  578. package/dist/hooks/useThrottledState.d.cts +2 -5
  579. package/dist/hooks/useThrottledState.d.ts +2 -5
  580. package/dist/hooks/useThrottledState.js.map +1 -1
  581. package/dist/hooks/useThrottledValue.cjs.map +1 -1
  582. package/dist/hooks/useThrottledValue.d.cts +1 -4
  583. package/dist/hooks/useThrottledValue.d.ts +1 -4
  584. package/dist/hooks/useThrottledValue.js.map +1 -1
  585. package/dist/hooks/useTimeout.cjs.map +1 -1
  586. package/dist/hooks/useTimeout.d.cts +6 -9
  587. package/dist/hooks/useTimeout.d.ts +6 -9
  588. package/dist/hooks/useTimeout.js.map +1 -1
  589. package/dist/hooks/useTimeoutData.cjs.map +1 -1
  590. package/dist/hooks/useTimeoutData.d.cts +1 -4
  591. package/dist/hooks/useTimeoutData.d.ts +1 -4
  592. package/dist/hooks/useTimeoutData.js.map +1 -1
  593. package/dist/hooks/useUncontrolled.cjs.map +1 -1
  594. package/dist/hooks/useUncontrolled.d.cts +1 -3
  595. package/dist/hooks/useUncontrolled.d.ts +1 -3
  596. package/dist/hooks/useUncontrolled.js.map +1 -1
  597. package/dist/hooks/useUnmount.cjs.map +1 -1
  598. package/dist/hooks/useUnmount.d.cts +1 -4
  599. package/dist/hooks/useUnmount.d.ts +1 -4
  600. package/dist/hooks/useUnmount.js.map +1 -1
  601. package/dist/hooks/useUpdate.cjs.map +1 -1
  602. package/dist/hooks/useUpdate.d.cts +1 -4
  603. package/dist/hooks/useUpdate.d.ts +1 -4
  604. package/dist/hooks/useUpdate.js.map +1 -1
  605. package/dist/hooks/useUpdateEffect.cjs.map +1 -1
  606. package/dist/hooks/useUpdateEffect.d.cts +1 -4
  607. package/dist/hooks/useUpdateEffect.d.ts +1 -4
  608. package/dist/hooks/useUpdateEffect.js.map +1 -1
  609. package/dist/hooks/useUpdateLayoutEffect.cjs.map +1 -1
  610. package/dist/hooks/useUpdateLayoutEffect.d.cts +1 -4
  611. package/dist/hooks/useUpdateLayoutEffect.d.ts +1 -4
  612. package/dist/hooks/useUpdateLayoutEffect.js.map +1 -1
  613. package/dist/hooks/useWindowEvent.cjs.map +1 -1
  614. package/dist/hooks/useWindowEvent.d.cts +3 -6
  615. package/dist/hooks/useWindowEvent.d.ts +3 -6
  616. package/dist/hooks/useWindowEvent.js.map +1 -1
  617. package/dist/hooks/useWindowSize.cjs.map +1 -1
  618. package/dist/hooks/useWindowSize.d.cts +1 -3
  619. package/dist/hooks/useWindowSize.d.ts +1 -3
  620. package/dist/hooks/useWindowSize.js.map +1 -1
  621. package/dist/hooks/useXsOrDown.cjs.map +1 -1
  622. package/dist/hooks/useXsOrDown.d.cts +1 -4
  623. package/dist/hooks/useXsOrDown.d.ts +1 -4
  624. package/dist/hooks/useXsOrDown.js.map +1 -1
  625. package/dist/index.d.cts +1 -1
  626. package/dist/index.d.ts +2 -2
  627. package/dist/misc/debounce.cjs.map +1 -1
  628. package/dist/misc/debounce.js.map +1 -1
  629. package/dist/misc/deepEq.cjs.map +1 -1
  630. package/dist/misc/deepEq.js.map +1 -1
  631. package/dist/persistence/codec.cjs.map +1 -1
  632. package/dist/persistence/codec.d.cts +1 -4
  633. package/dist/persistence/codec.d.ts +1 -4
  634. package/dist/persistence/codec.js.map +1 -1
  635. package/dist/persistence/useStorageState.cjs.map +1 -1
  636. package/dist/persistence/useStorageState.d.cts +1 -4
  637. package/dist/persistence/useStorageState.d.ts +1 -4
  638. package/dist/persistence/useStorageState.js.map +1 -1
  639. package/dist/util/closables.cjs.map +1 -1
  640. package/dist/util/closables.d.cts +1 -3
  641. package/dist/util/closables.d.ts +1 -3
  642. package/dist/util/closables.js.map +1 -1
  643. package/dist/util/event-utils.cjs.map +1 -1
  644. package/dist/util/event-utils.d.cts +1 -4
  645. package/dist/util/event-utils.d.ts +1 -4
  646. package/dist/util/event-utils.js.map +1 -1
  647. package/dist/util/internal-util.cjs.map +1 -1
  648. package/dist/util/internal-util.js.map +1 -1
  649. package/dist/util/misc-utils.cjs +1 -1
  650. package/dist/util/misc-utils.cjs.map +1 -1
  651. package/dist/util/misc-utils.d.cts +1 -4
  652. package/dist/util/misc-utils.d.ts +1 -4
  653. package/dist/util/misc-utils.js +1 -1
  654. package/dist/util/misc-utils.js.map +1 -1
  655. package/dist/util/override-props.cjs.map +1 -1
  656. package/dist/util/override-props.js.map +1 -1
  657. package/dist/util/sx-props.cjs.map +1 -1
  658. package/dist/util/sx-props.d.cts +2 -5
  659. package/dist/util/sx-props.d.ts +2 -5
  660. package/dist/util/sx-props.js.map +1 -1
  661. package/dist/util/ymd-date.cjs.map +1 -1
  662. package/dist/util/ymd-date.js.map +1 -1
  663. package/llm.txt +5 -4
  664. package/package.json +10 -9
@@ -1 +1 @@
1
- {"version":3,"file":"useFloatingIndicator.cjs","names":["isNotNil","useRef","useState","useLatest","require_useLatest","require_internal_util","require_useMutationObserver","require_useTimeout","react","toInt","value","isParent","childElement","parentElement","parent","useFloatingIndicator","transitionTimeout","initialized","setInitialized","hidden","setHidden","displayAfterTransitionEnd","updatePosition","target","indicatorRef","targetRect","parentRect","targetComputedStyle","parentComputedStyle","parentBorderWidth","targetBorderWidth","indicatorRect","excludeTargetBorderWidth","updatePositionWithoutAnimation","targetResizeObserver","parentResizeObserver","handleTransitionEnd","event","mutations","mutation"],"sources":["../../../src/components/FloatingIndicator/useFloatingIndicator.ts"],"sourcesContent":["'use client';\n\nimport { type RefObject, useEffect, useRef, useState } from 'react';\nimport { useLatest } from '../../hooks/useLatest.js';\nimport { useMutationObserver } from '../../hooks/useMutationObserver.js';\nimport { useTimeout } from '../../hooks/useTimeout.js';\nimport { isNotNil } from '../../util/internal-util.js';\n\n/**\n * 문자열 값을 정수로 변환하는 유틸리티 함수입니다.\n * @param value 변환할 값\n * @returns 정수 값으로 변환된 숫자\n */\nfunction toInt(value?: string) {\n return value ? parseInt(value, 10) : 0;\n}\n\n/**\n * 부모 요소가 자식 요소를 포함하는지 여부를 확인하는 함수입니다.\n * @param parentElement 부모 요소\n * @param childElement 자식 요소\n * @returns 부모가 자식을 포함하는 경우 true, 그렇지 않으면 false\n */\nfunction isParent(\n parentElement: HTMLElement | EventTarget | null,\n childElement: HTMLElement | null,\n) {\n if (!childElement || !parentElement) {\n return false;\n }\n\n let parent = childElement.parentNode;\n while (isNotNil(parent)) {\n if (parent === parentElement) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n}\n\ninterface UseFloatingIndicatorInput {\n /** 표시할 인디케이터의 대상 요소 */\n target: HTMLElement | null | undefined;\n\n /** 인디케이터가 위치할 부모 요소 */\n parent: HTMLElement | null | undefined;\n\n /** 인디케이터 DOM 참조 */\n indicatorRef: RefObject<HTMLDivElement | null>;\n\n /** 인디케이터 크기 계산 시 대상 요소의 보더 두께를 제외할지 여부 */\n excludeTargetBorderWidth?: boolean;\n\n /** 전환이 끝난 후에 인디케이터를 표시할지 여부 */\n displayAfterTransitionEnd?: boolean;\n}\n\n/**\n * `target` 요소의 위치와 크기를 기반으로 인디케이터를 위치시킵니다.\n * 인디케이터는 `parent` 요소를 기준으로 절대 위치가 지정되며, 보더 두께를 고려하여 계산됩니다.\n * @param target 대상 요소\n * @param parent 부모 요소\n * @param indicatorRef 인디케이터 DOM 참조\n * @param excludeTargetBorderWidth 대상 요소의 보더 두께를 제외할지 여부\n * @param displayAfterTransitionEnd 전환 종료 후에 인디케이터 표시 여부\n * @returns 초기화 여부와 숨김 상태 반환\n */\nexport function useFloatingIndicator({\n target,\n parent,\n indicatorRef,\n excludeTargetBorderWidth = false,\n displayAfterTransitionEnd = false,\n}: UseFloatingIndicatorInput) {\n const transitionTimeout = useRef(-1);\n const [initialized, setInitialized] = useState(false);\n\n const [hidden, setHidden] = useState(displayAfterTransitionEnd);\n\n /**\n * 인디케이터의 위치를 업데이트하는 함수입니다.\n * target과 parent 요소의 크기 및 위치를 계산하여 인디케이터에 적용합니다.\n */\n const updatePosition = useLatest(() => {\n if (!target || !parent || !indicatorRef.current) {\n return;\n }\n\n // getBoundingClientRect()를 사용하여 대상과 부모 요소의 크기 및 위치를 가져옵니다\n // getBoundingClientRect()는 보더의 두께를 포함합니다\n const targetRect = target.getBoundingClientRect();\n const parentRect = parent.getBoundingClientRect();\n\n const targetComputedStyle = window.getComputedStyle(target);\n const parentComputedStyle = window.getComputedStyle(parent);\n\n const parentBorderWidth = {\n top: toInt(parentComputedStyle.borderTopWidth),\n left: toInt(parentComputedStyle.borderLeftWidth),\n };\n\n const targetBorderWidth = {\n top: toInt(targetComputedStyle.borderTopWidth),\n bottom: toInt(targetComputedStyle.borderBottomWidth),\n left: toInt(targetComputedStyle.borderLeftWidth),\n right: toInt(targetComputedStyle.borderRightWidth),\n };\n\n // 인디케이터의 위치 및 크기 계산\n const indicatorRect = {\n top: targetRect.top - parentRect.top - parentBorderWidth.top,\n left: targetRect.left - parentRect.left - parentBorderWidth.left,\n width: targetRect.width,\n height: targetRect.height,\n };\n\n // 보더 두께 제외 설정이 활성화되면 보더 두께를 제외한 크기로 설정\n if (excludeTargetBorderWidth) {\n indicatorRect.top += targetBorderWidth.top;\n indicatorRect.left += targetBorderWidth.left;\n indicatorRect.height -= targetBorderWidth.top + targetBorderWidth.bottom;\n indicatorRect.width -= targetBorderWidth.left + targetBorderWidth.right;\n }\n\n // 인디케이터 스타일 업데이트\n indicatorRef.current.style.transform = `translateX(${indicatorRect.left}px) translateY(${indicatorRect.top}px)`;\n indicatorRef.current.style.width = `${indicatorRect.width}px`;\n indicatorRef.current.style.height = `${indicatorRect.height}px`;\n });\n\n /**\n * 애니메이션 없이 인디케이터의 위치를 업데이트하는 함수입니다.\n * 애니메이션을 제거한 후 즉시 위치를 업데이트하고, 잠시 후 다시 전환 지속 시간을 원상 복구합니다.\n */\n const updatePositionWithoutAnimation = useLatest(() => {\n window.clearTimeout(transitionTimeout.current);\n if (indicatorRef.current) {\n indicatorRef.current.style.transitionDuration = '0ms';\n }\n updatePosition.current();\n transitionTimeout.current = window.setTimeout(() => {\n if (indicatorRef.current) {\n indicatorRef.current.style.transitionDuration = '';\n }\n }, 30);\n });\n\n const targetResizeObserver = useRef<ResizeObserver | null>(null);\n const parentResizeObserver = useRef<ResizeObserver | null>(null);\n\n useEffect(() => {\n updatePosition.current();\n\n // target과 parent 요소에 리사이즈 이벤트 리스너 설정\n if (target) {\n targetResizeObserver.current = new ResizeObserver(updatePositionWithoutAnimation.current);\n targetResizeObserver.current.observe(target);\n\n if (parent) {\n parentResizeObserver.current = new ResizeObserver(updatePositionWithoutAnimation.current);\n parentResizeObserver.current.observe(parent);\n }\n\n return () => {\n targetResizeObserver.current?.disconnect();\n parentResizeObserver.current?.disconnect();\n };\n }\n\n return undefined;\n }, [parent, target, updatePosition, updatePositionWithoutAnimation]);\n\n useEffect(() => {\n if (parent) {\n const handleTransitionEnd = (event: TransitionEvent) => {\n if (isParent(event.target, parent)) {\n updatePositionWithoutAnimation.current();\n setHidden(false);\n }\n };\n\n parent.addEventListener('transitionend', handleTransitionEnd);\n return () => {\n parent.removeEventListener('transitionend', handleTransitionEnd);\n };\n }\n\n return undefined;\n }, [parent, updatePositionWithoutAnimation]);\n\n // 초기화 타이머 설정\n useTimeout(\n () => {\n setInitialized(true);\n },\n 20,\n { autoInvoke: true },\n );\n\n // DOM 변화 감지 및 처리\n useMutationObserver(\n (mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === 'dir') {\n updatePositionWithoutAnimation.current();\n }\n });\n },\n { attributes: true, attributeFilter: ['dir'] },\n () => document.documentElement,\n );\n\n return { initialized, hidden };\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"useFloatingIndicator.cjs","names":["isNotNil","useRef","useState","useLatest","useEffect","useTimeout","useMutationObserver","require_useLatest","require_useMutationObserver","require_useTimeout","require_internal_util","react","toInt","value","isParent","parentElement","childElement","parent","useFloatingIndicator","target","indicatorRef","excludeTargetBorderWidth","displayAfterTransitionEnd","transitionTimeout","initialized","setInitialized","hidden","setHidden","updatePosition","targetRect","parentRect","targetComputedStyle","parentComputedStyle","parentBorderWidth","targetBorderWidth","indicatorRect","updatePositionWithoutAnimation","targetResizeObserver","parentResizeObserver","handleTransitionEnd","event","mutations","mutation"],"sources":["../../../src/components/FloatingIndicator/useFloatingIndicator.ts"],"sourcesContent":["'use client';\n\nimport { type RefObject, useEffect, useRef, useState } from 'react';\nimport { useLatest } from '../../hooks/useLatest.js';\nimport { useMutationObserver } from '../../hooks/useMutationObserver.js';\nimport { useTimeout } from '../../hooks/useTimeout.js';\nimport { isNotNil } from '../../util/internal-util.js';\n\n/**\n * 문자열 값을 정수로 변환하는 유틸리티 함수입니다.\n * @param value 변환할 값\n * @returns 정수 값으로 변환된 숫자\n */\nfunction toInt(value?: string) {\n return value ? parseInt(value, 10) : 0;\n}\n\n/**\n * 부모 요소가 자식 요소를 포함하는지 여부를 확인하는 함수입니다.\n * @param parentElement 부모 요소\n * @param childElement 자식 요소\n * @returns 부모가 자식을 포함하는 경우 true, 그렇지 않으면 false\n */\nfunction isParent(\n parentElement: HTMLElement | EventTarget | null,\n childElement: HTMLElement | null,\n) {\n if (!childElement || !parentElement) {\n return false;\n }\n\n let parent = childElement.parentNode;\n while (isNotNil(parent)) {\n if (parent === parentElement) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n}\n\ninterface UseFloatingIndicatorInput {\n /** 표시할 인디케이터의 대상 요소 */\n target: HTMLElement | null | undefined;\n\n /** 인디케이터가 위치할 부모 요소 */\n parent: HTMLElement | null | undefined;\n\n /** 인디케이터 DOM 참조 */\n indicatorRef: RefObject<HTMLDivElement | null>;\n\n /** 인디케이터 크기 계산 시 대상 요소의 보더 두께를 제외할지 여부 */\n excludeTargetBorderWidth?: boolean;\n\n /** 전환이 끝난 후에 인디케이터를 표시할지 여부 */\n displayAfterTransitionEnd?: boolean;\n}\n\n/**\n * `target` 요소의 위치와 크기를 기반으로 인디케이터를 위치시킵니다.\n * 인디케이터는 `parent` 요소를 기준으로 절대 위치가 지정되며, 보더 두께를 고려하여 계산됩니다.\n * @param target 대상 요소\n * @param parent 부모 요소\n * @param indicatorRef 인디케이터 DOM 참조\n * @param excludeTargetBorderWidth 대상 요소의 보더 두께를 제외할지 여부\n * @param displayAfterTransitionEnd 전환 종료 후에 인디케이터 표시 여부\n * @returns 초기화 여부와 숨김 상태 반환\n */\nexport function useFloatingIndicator({\n target,\n parent,\n indicatorRef,\n excludeTargetBorderWidth = false,\n displayAfterTransitionEnd = false,\n}: UseFloatingIndicatorInput) {\n const transitionTimeout = useRef(-1);\n const [initialized, setInitialized] = useState(false);\n\n const [hidden, setHidden] = useState(displayAfterTransitionEnd);\n\n /**\n * 인디케이터의 위치를 업데이트하는 함수입니다.\n * target과 parent 요소의 크기 및 위치를 계산하여 인디케이터에 적용합니다.\n */\n const updatePosition = useLatest(() => {\n if (!target || !parent || !indicatorRef.current) {\n return;\n }\n\n // getBoundingClientRect()를 사용하여 대상과 부모 요소의 크기 및 위치를 가져옵니다\n // getBoundingClientRect()는 보더의 두께를 포함합니다\n const targetRect = target.getBoundingClientRect();\n const parentRect = parent.getBoundingClientRect();\n\n const targetComputedStyle = window.getComputedStyle(target);\n const parentComputedStyle = window.getComputedStyle(parent);\n\n const parentBorderWidth = {\n top: toInt(parentComputedStyle.borderTopWidth),\n left: toInt(parentComputedStyle.borderLeftWidth),\n };\n\n const targetBorderWidth = {\n top: toInt(targetComputedStyle.borderTopWidth),\n bottom: toInt(targetComputedStyle.borderBottomWidth),\n left: toInt(targetComputedStyle.borderLeftWidth),\n right: toInt(targetComputedStyle.borderRightWidth),\n };\n\n // 인디케이터의 위치 및 크기 계산\n const indicatorRect = {\n top: targetRect.top - parentRect.top - parentBorderWidth.top,\n left: targetRect.left - parentRect.left - parentBorderWidth.left,\n width: targetRect.width,\n height: targetRect.height,\n };\n\n // 보더 두께 제외 설정이 활성화되면 보더 두께를 제외한 크기로 설정\n if (excludeTargetBorderWidth) {\n indicatorRect.top += targetBorderWidth.top;\n indicatorRect.left += targetBorderWidth.left;\n indicatorRect.height -= targetBorderWidth.top + targetBorderWidth.bottom;\n indicatorRect.width -= targetBorderWidth.left + targetBorderWidth.right;\n }\n\n // 인디케이터 스타일 업데이트\n indicatorRef.current.style.transform = `translateX(${indicatorRect.left}px) translateY(${indicatorRect.top}px)`;\n indicatorRef.current.style.width = `${indicatorRect.width}px`;\n indicatorRef.current.style.height = `${indicatorRect.height}px`;\n });\n\n /**\n * 애니메이션 없이 인디케이터의 위치를 업데이트하는 함수입니다.\n * 애니메이션을 제거한 후 즉시 위치를 업데이트하고, 잠시 후 다시 전환 지속 시간을 원상 복구합니다.\n */\n const updatePositionWithoutAnimation = useLatest(() => {\n window.clearTimeout(transitionTimeout.current);\n if (indicatorRef.current) {\n indicatorRef.current.style.transitionDuration = '0ms';\n }\n updatePosition.current();\n transitionTimeout.current = window.setTimeout(() => {\n if (indicatorRef.current) {\n indicatorRef.current.style.transitionDuration = '';\n }\n }, 30);\n });\n\n const targetResizeObserver = useRef<ResizeObserver | null>(null);\n const parentResizeObserver = useRef<ResizeObserver | null>(null);\n\n useEffect(() => {\n updatePosition.current();\n\n // target과 parent 요소에 리사이즈 이벤트 리스너 설정\n if (target) {\n targetResizeObserver.current = new ResizeObserver(updatePositionWithoutAnimation.current);\n targetResizeObserver.current.observe(target);\n\n if (parent) {\n parentResizeObserver.current = new ResizeObserver(updatePositionWithoutAnimation.current);\n parentResizeObserver.current.observe(parent);\n }\n\n return () => {\n targetResizeObserver.current?.disconnect();\n parentResizeObserver.current?.disconnect();\n };\n }\n\n return undefined;\n }, [parent, target, updatePosition, updatePositionWithoutAnimation]);\n\n useEffect(() => {\n if (parent) {\n const handleTransitionEnd = (event: TransitionEvent) => {\n if (isParent(event.target, parent)) {\n updatePositionWithoutAnimation.current();\n setHidden(false);\n }\n };\n\n parent.addEventListener('transitionend', handleTransitionEnd);\n return () => {\n parent.removeEventListener('transitionend', handleTransitionEnd);\n };\n }\n\n return undefined;\n }, [parent, updatePositionWithoutAnimation]);\n\n // 초기화 타이머 설정\n useTimeout(\n () => {\n setInitialized(true);\n },\n 20,\n { autoInvoke: true },\n );\n\n // DOM 변화 감지 및 처리\n useMutationObserver(\n (mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === 'dir') {\n updatePositionWithoutAnimation.current();\n }\n });\n },\n { attributes: true, attributeFilter: ['dir'] },\n () => document.documentElement,\n );\n\n return { initialized, hidden };\n}\n"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use client";import{useLatest as e}from"../../hooks/useLatest.js";import{isNotNil as t}from"../../util/internal-util.js";import{useMutationObserver as n}from"../../hooks/useMutationObserver.js";import{useTimeout as r}from"../../hooks/useTimeout.js";import{useEffect as i,useRef as a,useState as o}from"react";function s(e){return e?parseInt(e,10):0}function c(e,n){if(!n||!e)return!1;let r=n.parentNode;for(;t(r);){if(r===e)return!0;r=r.parentNode}return!1}function l({target:t,parent:l,indicatorRef:u,excludeTargetBorderWidth:d=!1,displayAfterTransitionEnd:f=!1}){let p=a(-1),[m,h]=o(!1),[g,_]=o(f),v=e(()=>{if(!t||!l||!u.current)return;let e=t.getBoundingClientRect(),n=l.getBoundingClientRect(),r=window.getComputedStyle(t),i=window.getComputedStyle(l),a={top:s(i.borderTopWidth),left:s(i.borderLeftWidth)},o={top:s(r.borderTopWidth),bottom:s(r.borderBottomWidth),left:s(r.borderLeftWidth),right:s(r.borderRightWidth)},c={top:e.top-n.top-a.top,left:e.left-n.left-a.left,width:e.width,height:e.height};d&&(c.top+=o.top,c.left+=o.left,c.height-=o.top+o.bottom,c.width-=o.left+o.right),u.current.style.transform=`translateX(${c.left}px) translateY(${c.top}px)`,u.current.style.width=`${c.width}px`,u.current.style.height=`${c.height}px`}),y=e(()=>{window.clearTimeout(p.current),u.current&&(u.current.style.transitionDuration=`0ms`),v.current(),p.current=window.setTimeout(()=>{u.current&&(u.current.style.transitionDuration=``)},30)}),b=a(null),x=a(null);return i(()=>{if(v.current(),t)return b.current=new ResizeObserver(y.current),b.current.observe(t),l&&(x.current=new ResizeObserver(y.current),x.current.observe(l)),()=>{b.current?.disconnect(),x.current?.disconnect()}},[l,t,v,y]),i(()=>{if(l){let e=e=>{c(e.target,l)&&(y.current(),_(!1))};return l.addEventListener(`transitionend`,e),()=>{l.removeEventListener(`transitionend`,e)}}},[l,y]),r(()=>{h(!0)},20,{autoInvoke:!0}),n(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&y.current()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:m,hidden:g}}export{l as useFloatingIndicator};
1
+ "use client";import{useLatest as e}from"../../hooks/useLatest.js";import{useMutationObserver as t}from"../../hooks/useMutationObserver.js";import{useTimeout as n}from"../../hooks/useTimeout.js";import{isNotNil as r}from"../../util/internal-util.js";import{useEffect as i,useRef as a,useState as o}from"react";function s(e){return e?parseInt(e,10):0}function c(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;r(n);){if(n===e)return!0;n=n.parentNode}return!1}function l({target:r,parent:l,indicatorRef:u,excludeTargetBorderWidth:d=!1,displayAfterTransitionEnd:f=!1}){let p=a(-1),[m,h]=o(!1),[g,_]=o(f),v=e(()=>{if(!r||!l||!u.current)return;let e=r.getBoundingClientRect(),t=l.getBoundingClientRect(),n=window.getComputedStyle(r),i=window.getComputedStyle(l),a={top:s(i.borderTopWidth),left:s(i.borderLeftWidth)},o={top:s(n.borderTopWidth),bottom:s(n.borderBottomWidth),left:s(n.borderLeftWidth),right:s(n.borderRightWidth)},c={top:e.top-t.top-a.top,left:e.left-t.left-a.left,width:e.width,height:e.height};d&&(c.top+=o.top,c.left+=o.left,c.height-=o.top+o.bottom,c.width-=o.left+o.right),u.current.style.transform=`translateX(${c.left}px) translateY(${c.top}px)`,u.current.style.width=`${c.width}px`,u.current.style.height=`${c.height}px`}),y=e(()=>{window.clearTimeout(p.current),u.current&&(u.current.style.transitionDuration=`0ms`),v.current(),p.current=window.setTimeout(()=>{u.current&&(u.current.style.transitionDuration=``)},30)}),b=a(null),x=a(null);return i(()=>{if(v.current(),r)return b.current=new ResizeObserver(y.current),b.current.observe(r),l&&(x.current=new ResizeObserver(y.current),x.current.observe(l)),()=>{b.current?.disconnect(),x.current?.disconnect()}},[l,r,v,y]),i(()=>{if(l){let e=e=>{c(e.target,l)&&(y.current(),_(!1))};return l.addEventListener(`transitionend`,e),()=>{l.removeEventListener(`transitionend`,e)}}},[l,y]),n(()=>{h(!0)},20,{autoInvoke:!0}),t(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&y.current()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:m,hidden:g}}export{l as useFloatingIndicator};
2
2
  //# sourceMappingURL=useFloatingIndicator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFloatingIndicator.js","names":["toInt","value","isParent","childElement","parentElement","parent","isNotNil","useFloatingIndicator","transitionTimeout","useRef","initialized","setInitialized","useState","hidden","setHidden","displayAfterTransitionEnd","updatePosition","useLatest","target","indicatorRef","targetRect","parentRect","targetComputedStyle","parentComputedStyle","parentBorderWidth","targetBorderWidth","indicatorRect","excludeTargetBorderWidth","updatePositionWithoutAnimation","targetResizeObserver","parentResizeObserver","useEffect","handleTransitionEnd","event","useTimeout","useMutationObserver","mutations","mutation"],"sources":["../../../src/components/FloatingIndicator/useFloatingIndicator.ts"],"sourcesContent":["'use client';\n\nimport { type RefObject, useEffect, useRef, useState } from 'react';\nimport { useLatest } from '../../hooks/useLatest.js';\nimport { useMutationObserver } from '../../hooks/useMutationObserver.js';\nimport { useTimeout } from '../../hooks/useTimeout.js';\nimport { isNotNil } from '../../util/internal-util.js';\n\n/**\n * 문자열 값을 정수로 변환하는 유틸리티 함수입니다.\n * @param value 변환할 값\n * @returns 정수 값으로 변환된 숫자\n */\nfunction toInt(value?: string) {\n return value ? parseInt(value, 10) : 0;\n}\n\n/**\n * 부모 요소가 자식 요소를 포함하는지 여부를 확인하는 함수입니다.\n * @param parentElement 부모 요소\n * @param childElement 자식 요소\n * @returns 부모가 자식을 포함하는 경우 true, 그렇지 않으면 false\n */\nfunction isParent(\n parentElement: HTMLElement | EventTarget | null,\n childElement: HTMLElement | null,\n) {\n if (!childElement || !parentElement) {\n return false;\n }\n\n let parent = childElement.parentNode;\n while (isNotNil(parent)) {\n if (parent === parentElement) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n}\n\ninterface UseFloatingIndicatorInput {\n /** 표시할 인디케이터의 대상 요소 */\n target: HTMLElement | null | undefined;\n\n /** 인디케이터가 위치할 부모 요소 */\n parent: HTMLElement | null | undefined;\n\n /** 인디케이터 DOM 참조 */\n indicatorRef: RefObject<HTMLDivElement | null>;\n\n /** 인디케이터 크기 계산 시 대상 요소의 보더 두께를 제외할지 여부 */\n excludeTargetBorderWidth?: boolean;\n\n /** 전환이 끝난 후에 인디케이터를 표시할지 여부 */\n displayAfterTransitionEnd?: boolean;\n}\n\n/**\n * `target` 요소의 위치와 크기를 기반으로 인디케이터를 위치시킵니다.\n * 인디케이터는 `parent` 요소를 기준으로 절대 위치가 지정되며, 보더 두께를 고려하여 계산됩니다.\n * @param target 대상 요소\n * @param parent 부모 요소\n * @param indicatorRef 인디케이터 DOM 참조\n * @param excludeTargetBorderWidth 대상 요소의 보더 두께를 제외할지 여부\n * @param displayAfterTransitionEnd 전환 종료 후에 인디케이터 표시 여부\n * @returns 초기화 여부와 숨김 상태 반환\n */\nexport function useFloatingIndicator({\n target,\n parent,\n indicatorRef,\n excludeTargetBorderWidth = false,\n displayAfterTransitionEnd = false,\n}: UseFloatingIndicatorInput) {\n const transitionTimeout = useRef(-1);\n const [initialized, setInitialized] = useState(false);\n\n const [hidden, setHidden] = useState(displayAfterTransitionEnd);\n\n /**\n * 인디케이터의 위치를 업데이트하는 함수입니다.\n * target과 parent 요소의 크기 및 위치를 계산하여 인디케이터에 적용합니다.\n */\n const updatePosition = useLatest(() => {\n if (!target || !parent || !indicatorRef.current) {\n return;\n }\n\n // getBoundingClientRect()를 사용하여 대상과 부모 요소의 크기 및 위치를 가져옵니다\n // getBoundingClientRect()는 보더의 두께를 포함합니다\n const targetRect = target.getBoundingClientRect();\n const parentRect = parent.getBoundingClientRect();\n\n const targetComputedStyle = window.getComputedStyle(target);\n const parentComputedStyle = window.getComputedStyle(parent);\n\n const parentBorderWidth = {\n top: toInt(parentComputedStyle.borderTopWidth),\n left: toInt(parentComputedStyle.borderLeftWidth),\n };\n\n const targetBorderWidth = {\n top: toInt(targetComputedStyle.borderTopWidth),\n bottom: toInt(targetComputedStyle.borderBottomWidth),\n left: toInt(targetComputedStyle.borderLeftWidth),\n right: toInt(targetComputedStyle.borderRightWidth),\n };\n\n // 인디케이터의 위치 및 크기 계산\n const indicatorRect = {\n top: targetRect.top - parentRect.top - parentBorderWidth.top,\n left: targetRect.left - parentRect.left - parentBorderWidth.left,\n width: targetRect.width,\n height: targetRect.height,\n };\n\n // 보더 두께 제외 설정이 활성화되면 보더 두께를 제외한 크기로 설정\n if (excludeTargetBorderWidth) {\n indicatorRect.top += targetBorderWidth.top;\n indicatorRect.left += targetBorderWidth.left;\n indicatorRect.height -= targetBorderWidth.top + targetBorderWidth.bottom;\n indicatorRect.width -= targetBorderWidth.left + targetBorderWidth.right;\n }\n\n // 인디케이터 스타일 업데이트\n indicatorRef.current.style.transform = `translateX(${indicatorRect.left}px) translateY(${indicatorRect.top}px)`;\n indicatorRef.current.style.width = `${indicatorRect.width}px`;\n indicatorRef.current.style.height = `${indicatorRect.height}px`;\n });\n\n /**\n * 애니메이션 없이 인디케이터의 위치를 업데이트하는 함수입니다.\n * 애니메이션을 제거한 후 즉시 위치를 업데이트하고, 잠시 후 다시 전환 지속 시간을 원상 복구합니다.\n */\n const updatePositionWithoutAnimation = useLatest(() => {\n window.clearTimeout(transitionTimeout.current);\n if (indicatorRef.current) {\n indicatorRef.current.style.transitionDuration = '0ms';\n }\n updatePosition.current();\n transitionTimeout.current = window.setTimeout(() => {\n if (indicatorRef.current) {\n indicatorRef.current.style.transitionDuration = '';\n }\n }, 30);\n });\n\n const targetResizeObserver = useRef<ResizeObserver | null>(null);\n const parentResizeObserver = useRef<ResizeObserver | null>(null);\n\n useEffect(() => {\n updatePosition.current();\n\n // target과 parent 요소에 리사이즈 이벤트 리스너 설정\n if (target) {\n targetResizeObserver.current = new ResizeObserver(updatePositionWithoutAnimation.current);\n targetResizeObserver.current.observe(target);\n\n if (parent) {\n parentResizeObserver.current = new ResizeObserver(updatePositionWithoutAnimation.current);\n parentResizeObserver.current.observe(parent);\n }\n\n return () => {\n targetResizeObserver.current?.disconnect();\n parentResizeObserver.current?.disconnect();\n };\n }\n\n return undefined;\n }, [parent, target, updatePosition, updatePositionWithoutAnimation]);\n\n useEffect(() => {\n if (parent) {\n const handleTransitionEnd = (event: TransitionEvent) => {\n if (isParent(event.target, parent)) {\n updatePositionWithoutAnimation.current();\n setHidden(false);\n }\n };\n\n parent.addEventListener('transitionend', handleTransitionEnd);\n return () => {\n parent.removeEventListener('transitionend', handleTransitionEnd);\n };\n }\n\n return undefined;\n }, [parent, updatePositionWithoutAnimation]);\n\n // 초기화 타이머 설정\n useTimeout(\n () => {\n setInitialized(true);\n },\n 20,\n { autoInvoke: true },\n );\n\n // DOM 변화 감지 및 처리\n useMutationObserver(\n (mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === 'dir') {\n updatePositionWithoutAnimation.current();\n }\n });\n },\n { attributes: true, attributeFilter: ['dir'] },\n () => document.documentElement,\n );\n\n return { initialized, hidden };\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"useFloatingIndicator.js","names":["useLatest","useMutationObserver","useTimeout","isNotNil","useEffect","useRef","useState","toInt","value","isParent","parentElement","childElement","parent","useFloatingIndicator","target","indicatorRef","excludeTargetBorderWidth","displayAfterTransitionEnd","transitionTimeout","initialized","setInitialized","hidden","setHidden","updatePosition","targetRect","parentRect","targetComputedStyle","parentComputedStyle","parentBorderWidth","targetBorderWidth","indicatorRect","updatePositionWithoutAnimation","targetResizeObserver","parentResizeObserver","handleTransitionEnd","event","mutations","mutation"],"sources":["../../../src/components/FloatingIndicator/useFloatingIndicator.ts"],"sourcesContent":["'use client';\n\nimport { type RefObject, useEffect, useRef, useState } from 'react';\nimport { useLatest } from '../../hooks/useLatest.js';\nimport { useMutationObserver } from '../../hooks/useMutationObserver.js';\nimport { useTimeout } from '../../hooks/useTimeout.js';\nimport { isNotNil } from '../../util/internal-util.js';\n\n/**\n * 문자열 값을 정수로 변환하는 유틸리티 함수입니다.\n * @param value 변환할 값\n * @returns 정수 값으로 변환된 숫자\n */\nfunction toInt(value?: string) {\n return value ? parseInt(value, 10) : 0;\n}\n\n/**\n * 부모 요소가 자식 요소를 포함하는지 여부를 확인하는 함수입니다.\n * @param parentElement 부모 요소\n * @param childElement 자식 요소\n * @returns 부모가 자식을 포함하는 경우 true, 그렇지 않으면 false\n */\nfunction isParent(\n parentElement: HTMLElement | EventTarget | null,\n childElement: HTMLElement | null,\n) {\n if (!childElement || !parentElement) {\n return false;\n }\n\n let parent = childElement.parentNode;\n while (isNotNil(parent)) {\n if (parent === parentElement) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n}\n\ninterface UseFloatingIndicatorInput {\n /** 표시할 인디케이터의 대상 요소 */\n target: HTMLElement | null | undefined;\n\n /** 인디케이터가 위치할 부모 요소 */\n parent: HTMLElement | null | undefined;\n\n /** 인디케이터 DOM 참조 */\n indicatorRef: RefObject<HTMLDivElement | null>;\n\n /** 인디케이터 크기 계산 시 대상 요소의 보더 두께를 제외할지 여부 */\n excludeTargetBorderWidth?: boolean;\n\n /** 전환이 끝난 후에 인디케이터를 표시할지 여부 */\n displayAfterTransitionEnd?: boolean;\n}\n\n/**\n * `target` 요소의 위치와 크기를 기반으로 인디케이터를 위치시킵니다.\n * 인디케이터는 `parent` 요소를 기준으로 절대 위치가 지정되며, 보더 두께를 고려하여 계산됩니다.\n * @param target 대상 요소\n * @param parent 부모 요소\n * @param indicatorRef 인디케이터 DOM 참조\n * @param excludeTargetBorderWidth 대상 요소의 보더 두께를 제외할지 여부\n * @param displayAfterTransitionEnd 전환 종료 후에 인디케이터 표시 여부\n * @returns 초기화 여부와 숨김 상태 반환\n */\nexport function useFloatingIndicator({\n target,\n parent,\n indicatorRef,\n excludeTargetBorderWidth = false,\n displayAfterTransitionEnd = false,\n}: UseFloatingIndicatorInput) {\n const transitionTimeout = useRef(-1);\n const [initialized, setInitialized] = useState(false);\n\n const [hidden, setHidden] = useState(displayAfterTransitionEnd);\n\n /**\n * 인디케이터의 위치를 업데이트하는 함수입니다.\n * target과 parent 요소의 크기 및 위치를 계산하여 인디케이터에 적용합니다.\n */\n const updatePosition = useLatest(() => {\n if (!target || !parent || !indicatorRef.current) {\n return;\n }\n\n // getBoundingClientRect()를 사용하여 대상과 부모 요소의 크기 및 위치를 가져옵니다\n // getBoundingClientRect()는 보더의 두께를 포함합니다\n const targetRect = target.getBoundingClientRect();\n const parentRect = parent.getBoundingClientRect();\n\n const targetComputedStyle = window.getComputedStyle(target);\n const parentComputedStyle = window.getComputedStyle(parent);\n\n const parentBorderWidth = {\n top: toInt(parentComputedStyle.borderTopWidth),\n left: toInt(parentComputedStyle.borderLeftWidth),\n };\n\n const targetBorderWidth = {\n top: toInt(targetComputedStyle.borderTopWidth),\n bottom: toInt(targetComputedStyle.borderBottomWidth),\n left: toInt(targetComputedStyle.borderLeftWidth),\n right: toInt(targetComputedStyle.borderRightWidth),\n };\n\n // 인디케이터의 위치 및 크기 계산\n const indicatorRect = {\n top: targetRect.top - parentRect.top - parentBorderWidth.top,\n left: targetRect.left - parentRect.left - parentBorderWidth.left,\n width: targetRect.width,\n height: targetRect.height,\n };\n\n // 보더 두께 제외 설정이 활성화되면 보더 두께를 제외한 크기로 설정\n if (excludeTargetBorderWidth) {\n indicatorRect.top += targetBorderWidth.top;\n indicatorRect.left += targetBorderWidth.left;\n indicatorRect.height -= targetBorderWidth.top + targetBorderWidth.bottom;\n indicatorRect.width -= targetBorderWidth.left + targetBorderWidth.right;\n }\n\n // 인디케이터 스타일 업데이트\n indicatorRef.current.style.transform = `translateX(${indicatorRect.left}px) translateY(${indicatorRect.top}px)`;\n indicatorRef.current.style.width = `${indicatorRect.width}px`;\n indicatorRef.current.style.height = `${indicatorRect.height}px`;\n });\n\n /**\n * 애니메이션 없이 인디케이터의 위치를 업데이트하는 함수입니다.\n * 애니메이션을 제거한 후 즉시 위치를 업데이트하고, 잠시 후 다시 전환 지속 시간을 원상 복구합니다.\n */\n const updatePositionWithoutAnimation = useLatest(() => {\n window.clearTimeout(transitionTimeout.current);\n if (indicatorRef.current) {\n indicatorRef.current.style.transitionDuration = '0ms';\n }\n updatePosition.current();\n transitionTimeout.current = window.setTimeout(() => {\n if (indicatorRef.current) {\n indicatorRef.current.style.transitionDuration = '';\n }\n }, 30);\n });\n\n const targetResizeObserver = useRef<ResizeObserver | null>(null);\n const parentResizeObserver = useRef<ResizeObserver | null>(null);\n\n useEffect(() => {\n updatePosition.current();\n\n // target과 parent 요소에 리사이즈 이벤트 리스너 설정\n if (target) {\n targetResizeObserver.current = new ResizeObserver(updatePositionWithoutAnimation.current);\n targetResizeObserver.current.observe(target);\n\n if (parent) {\n parentResizeObserver.current = new ResizeObserver(updatePositionWithoutAnimation.current);\n parentResizeObserver.current.observe(parent);\n }\n\n return () => {\n targetResizeObserver.current?.disconnect();\n parentResizeObserver.current?.disconnect();\n };\n }\n\n return undefined;\n }, [parent, target, updatePosition, updatePositionWithoutAnimation]);\n\n useEffect(() => {\n if (parent) {\n const handleTransitionEnd = (event: TransitionEvent) => {\n if (isParent(event.target, parent)) {\n updatePositionWithoutAnimation.current();\n setHidden(false);\n }\n };\n\n parent.addEventListener('transitionend', handleTransitionEnd);\n return () => {\n parent.removeEventListener('transitionend', handleTransitionEnd);\n };\n }\n\n return undefined;\n }, [parent, updatePositionWithoutAnimation]);\n\n // 초기화 타이머 설정\n useTimeout(\n () => {\n setInitialized(true);\n },\n 20,\n { autoInvoke: true },\n );\n\n // DOM 변화 감지 및 처리\n useMutationObserver(\n (mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === 'dir') {\n updatePositionWithoutAnimation.current();\n }\n });\n },\n { attributes: true, attributeFilter: ['dir'] },\n () => document.documentElement,\n );\n\n return { initialized, hidden };\n}\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"Hide.cjs","names":["Hide"],"sources":["../../src/components/Hide.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nexport interface HideProps {\n /**\n * 개발자 설명\n */\n devComment?: unknown;\n\n children?: ReactNode;\n}\n\nexport function Hide(_props: HideProps) {\n return null;\n}\n"],"mappings":"AAWA,SAAgBA,EAAK,EAAmB,CACtC,OAAO,IACT"}
1
+ {"version":3,"file":"Hide.cjs","names":["Hide","_props"],"sources":["../../src/components/Hide.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nexport interface HideProps {\n /**\n * 개발자 설명\n */\n devComment?: unknown;\n\n children?: ReactNode;\n}\n\nexport function Hide(_props: HideProps) {\n return null;\n}\n"],"mappings":"AAWA,SAAgBA,EAAKC,EAAmB,CACtC,OAAO,IACT,C"}
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
- //#region src/components/Hide.d.ts
3
2
  export interface HideProps {
4
3
  /**
5
4
  * 개발자 설명
@@ -7,6 +6,4 @@ export interface HideProps {
7
6
  devComment?: unknown;
8
7
  children?: ReactNode;
9
8
  }
10
- export declare function Hide(_props: HideProps): null;
11
- //#endregion
12
- //# sourceMappingURL=Hide.d.cts.map
9
+ export declare function Hide(_props: HideProps): null;
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
- //#region src/components/Hide.d.ts
3
2
  export interface HideProps {
4
3
  /**
5
4
  * 개발자 설명
@@ -7,6 +6,4 @@ export interface HideProps {
7
6
  devComment?: unknown;
8
7
  children?: ReactNode;
9
8
  }
10
- export declare function Hide(_props: HideProps): null;
11
- //#endregion
12
- //# sourceMappingURL=Hide.d.ts.map
9
+ export declare function Hide(_props: HideProps): null;
@@ -1 +1 @@
1
- {"version":3,"file":"Hide.js","names":["Hide"],"sources":["../../src/components/Hide.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nexport interface HideProps {\n /**\n * 개발자 설명\n */\n devComment?: unknown;\n\n children?: ReactNode;\n}\n\nexport function Hide(_props: HideProps) {\n return null;\n}\n"],"mappings":"AAWA,SAAgBA,EAAK,EAAmB,CACtC,OAAO,IACT"}
1
+ {"version":3,"file":"Hide.js","names":["Hide","_props"],"sources":["../../src/components/Hide.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nexport interface HideProps {\n /**\n * 개발자 설명\n */\n devComment?: unknown;\n\n children?: ReactNode;\n}\n\nexport function Hide(_props: HideProps) {\n return null;\n}\n"],"mappings":"AAWA,SAAgBA,EAAKC,EAAmB,CACtC,OAAO,IACT,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Highlight.cjs","names":["useMemo","highlighter","Typography","Mark","require_runtime","require_Mark","require_highlighter","react_jsx_runtime","react","clsx","_mui_material_Typography","Highlight","restProps","props","highlightChunks","children","highlight","ignorecase","className","highlighted","includeDataAttribute","highlightSx","chunk"],"sources":["../../../src/components/Highlight/Highlight.tsx"],"sourcesContent":["'use client';\n\nimport type { SxProps, Theme } from '@mui/material/styles';\nimport Typography, { type TypographyProps } from '@mui/material/Typography';\nimport clsx from 'clsx';\nimport { type CSSProperties, type Ref, useMemo } from 'react';\nimport { Mark } from '../Mark.js';\nimport { highlighter } from './highlighter/highlighter.js';\n\n/**\n * 특정 텍스트의 부분 문자열을 강조 표시하는 컴포넌트입니다.\n *\n * - `highlight` 속성을 사용해 강조 표시할 문자열 또는 문자열 배열을 지정할 수 있습니다.\n * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.\n * - 다양한 사용자 정의 스타일과 속성을 지원합니다.\n */\nexport interface HighlightProps {\n /**\n * `sx` 속성을 사용해 스타일을 추가로 설정할 수 있습니다.\n */\n sx?: SxProps<Theme>;\n\n /**\n * 추가로 적용할 CSS 클래스 이름입니다.\n */\n className?: string;\n\n /**\n * 인라인 스타일을 적용할 수 있습니다.\n */\n style?: CSSProperties;\n\n /**\n * MUI `Typography` 컴포넌트의 `variant` 속성입니다.\n */\n variant?: TypographyProps['variant'];\n\n /**\n * 강조 표시할 부분 문자열 또는 문자열 배열입니다.\n *\n * @example\n * ```tsx\n * <Highlight highlight=\"React\">React is amazing!</Highlight>\n * <Highlight highlight={[\"React\", \"amazing\"]}>React is amazing!</Highlight>\n * ```\n */\n highlight: string | string[];\n\n /**\n * 강조 표시된 텍스트의 색상을 지정합니다.\n * `theme.colors` 키 또는 유효한 CSS 색상 값을 사용할 수 있습니다.\n * 기본값은 `yellow`입니다.\n */\n color?: string;\n\n /**\n * 강조 표시된 텍스트에 적용할 추가 스타일입니다.\n */\n highlightSx?: SxProps;\n\n /**\n * 강조 표시 작업을 수행할 문자열입니다.\n */\n children: string;\n\n /**\n * 대소문자를 무시하고 강조 표시할지 여부를 설정합니다.\n *\n * @default false\n */\n ignorecase?: boolean;\n\n /**\n * 강조 표시된 텍스트에 `data-highlight` 속성을 추가할지 여부를 설정합니다.\n *\n * @default false\n */\n includeDataAttribute?: boolean;\n\n ref?: Ref<HTMLElement>;\n}\n\n/**\n * `Highlight` 컴포넌트는 주어진 텍스트에서 특정 문자열을 강조 표시합니다.\n *\n * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.\n * - 대소문자 무시, 사용자 정의 색상 및 스타일 등 다양한 옵션을 제공합니다.\n *\n * @param props - `HighlightProps` 속성\n * @returns 강조 표시된 텍스트를 포함한 `Typography` 컴포넌트를 렌더링합니다.\n *\n * @example\n * ```tsx\n * <Highlight\n * highlight=\"highlight\"\n * color=\"red\"\n * ignorecase\n * includeDataAttribute\n * >\n * This is a highlight example.\n * </Highlight>\n * ```\n */\nexport const Highlight = (props: HighlightProps) => {\n const {\n sx,\n className,\n style,\n variant,\n highlight,\n color,\n highlightSx,\n ignorecase = false,\n includeDataAttribute = false,\n children,\n ref,\n ...restProps\n } = props;\n\n const highlightChunks = useMemo<{ chunk: string; highlighted: boolean }[]>(\n () => highlighter(children, highlight, { ignorecase }),\n [children, highlight, ignorecase],\n );\n\n return (\n <Typography\n ref={ref}\n variant={variant}\n className={clsx('Highlight-root', className)}\n sx={sx}\n style={style}\n {...restProps}\n >\n {highlightChunks.map(({ chunk, highlighted }, i) =>\n highlighted ? (\n includeDataAttribute ? (\n <Mark key={i} color={color} sx={highlightSx} data-highlight={chunk}>\n {chunk}\n </Mark>\n ) : (\n <Mark key={i} color={color} sx={highlightSx}>\n {chunk}\n </Mark>\n )\n ) : (\n <span key={i}>{chunk}</span>\n ),\n )}\n </Typography>\n );\n};\n\nHighlight.displayName = 'Highlight';\n"],"mappings":"6RAuGA,MAAaW,EAAa,GAA0B,CAClD,GAAM,CACJ,KACA,YACA,QACA,UACA,YACA,QACA,cACA,aAAa,GACb,uBAAuB,GACvB,WACA,MACA,GAAGC,GACDC,EAEEC,GAAA,EAAkBd,EAAAA,QAAAA,KAChBC,EAAAA,YAAYc,EAAUC,EAAW,CAAE,YAAW,CAAC,EACrD,CAACD,EAAUC,EAAWC,CAAU,CAClC,EAEA,MACE,iBAAA,EAAAV,EAAA,IAAA,CAACL,EAAAA,QAAD,CACO,MACI,UACT,WAAA,EAAWO,EAAA,QAAA,CAAK,iBAAkBS,CAAS,EACvC,KACG,QACP,GAAIN,EAEH,SAAAE,EAAgB,KAAK,CAAE,QAAO,eAAe,IAC5CK,EACEC,EACE,iBAAA,EAAAb,EAAA,IAAA,CAACJ,EAAAA,KAAD,CAAqB,QAAO,GAAIkB,EAAa,iBAAgBC,EAC1D,SAAAA,CACG,EAFK,CAEL,EAEN,iBAAA,EAAAf,EAAA,IAAA,CAACJ,EAAAA,KAAD,CAAqB,QAAO,GAAIkB,EAC7B,SAAAC,CACG,EAFK,CAEL,EAGR,iBAAA,EAAAf,EAAA,IAAA,CAAC,OAAD,CAAA,SAAee,CAAY,EAAhB,CAAgB,CAE/B,CACU,CAAA,CAEhB,EAEA,EAAU,YAAc"}
1
+ {"version":3,"file":"Highlight.cjs","names":["useMemo","highlighter","Typography","clsx","Mark","require_runtime","require_Mark","require_highlighter","react_jsx_runtime","react","clsx","_mui_material_Typography","Highlight","props","sx","className","style","variant","highlight","color","highlightSx","ignorecase","includeDataAttribute","children","ref","restProps","highlightChunks","chunk","highlighted"],"sources":["../../../src/components/Highlight/Highlight.tsx"],"sourcesContent":["'use client';\n\nimport type { SxProps, Theme } from '@mui/material/styles';\nimport Typography, { type TypographyProps } from '@mui/material/Typography';\nimport clsx from 'clsx';\nimport { type CSSProperties, type Ref, useMemo } from 'react';\nimport { Mark } from '../Mark.js';\nimport { highlighter } from './highlighter/highlighter.js';\n\n/**\n * 특정 텍스트의 부분 문자열을 강조 표시하는 컴포넌트입니다.\n *\n * - `highlight` 속성을 사용해 강조 표시할 문자열 또는 문자열 배열을 지정할 수 있습니다.\n * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.\n * - 다양한 사용자 정의 스타일과 속성을 지원합니다.\n */\nexport interface HighlightProps {\n /**\n * `sx` 속성을 사용해 스타일을 추가로 설정할 수 있습니다.\n */\n sx?: SxProps<Theme>;\n\n /**\n * 추가로 적용할 CSS 클래스 이름입니다.\n */\n className?: string;\n\n /**\n * 인라인 스타일을 적용할 수 있습니다.\n */\n style?: CSSProperties;\n\n /**\n * MUI `Typography` 컴포넌트의 `variant` 속성입니다.\n */\n variant?: TypographyProps['variant'];\n\n /**\n * 강조 표시할 부분 문자열 또는 문자열 배열입니다.\n *\n * @example\n * ```tsx\n * <Highlight highlight=\"React\">React is amazing!</Highlight>\n * <Highlight highlight={[\"React\", \"amazing\"]}>React is amazing!</Highlight>\n * ```\n */\n highlight: string | string[];\n\n /**\n * 강조 표시된 텍스트의 색상을 지정합니다.\n * `theme.colors` 키 또는 유효한 CSS 색상 값을 사용할 수 있습니다.\n * 기본값은 `yellow`입니다.\n */\n color?: string;\n\n /**\n * 강조 표시된 텍스트에 적용할 추가 스타일입니다.\n */\n highlightSx?: SxProps;\n\n /**\n * 강조 표시 작업을 수행할 문자열입니다.\n */\n children: string;\n\n /**\n * 대소문자를 무시하고 강조 표시할지 여부를 설정합니다.\n *\n * @default false\n */\n ignorecase?: boolean;\n\n /**\n * 강조 표시된 텍스트에 `data-highlight` 속성을 추가할지 여부를 설정합니다.\n *\n * @default false\n */\n includeDataAttribute?: boolean;\n\n ref?: Ref<HTMLElement>;\n}\n\n/**\n * `Highlight` 컴포넌트는 주어진 텍스트에서 특정 문자열을 강조 표시합니다.\n *\n * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.\n * - 대소문자 무시, 사용자 정의 색상 및 스타일 등 다양한 옵션을 제공합니다.\n *\n * @param props - `HighlightProps` 속성\n * @returns 강조 표시된 텍스트를 포함한 `Typography` 컴포넌트를 렌더링합니다.\n *\n * @example\n * ```tsx\n * <Highlight\n * highlight=\"highlight\"\n * color=\"red\"\n * ignorecase\n * includeDataAttribute\n * >\n * This is a highlight example.\n * </Highlight>\n * ```\n */\nexport const Highlight = (props: HighlightProps) => {\n const {\n sx,\n className,\n style,\n variant,\n highlight,\n color,\n highlightSx,\n ignorecase = false,\n includeDataAttribute = false,\n children,\n ref,\n ...restProps\n } = props;\n\n const highlightChunks = useMemo<{ chunk: string; highlighted: boolean }[]>(\n () => highlighter(children, highlight, { ignorecase }),\n [children, highlight, ignorecase],\n );\n\n return (\n <Typography\n ref={ref}\n variant={variant}\n className={clsx('Highlight-root', className)}\n sx={sx}\n style={style}\n {...restProps}\n >\n {highlightChunks.map(({ chunk, highlighted }, i) =>\n highlighted ? (\n includeDataAttribute ? (\n <Mark key={i} color={color} sx={highlightSx} data-highlight={chunk}>\n {chunk}\n </Mark>\n ) : (\n <Mark key={i} color={color} sx={highlightSx}>\n {chunk}\n </Mark>\n )\n ) : (\n <span key={i}>{chunk}</span>\n ),\n )}\n </Typography>\n );\n};\n\nHighlight.displayName = 'Highlight';\n"],"mappings":"A,6RAuGA,MAAaY,EAAaC,GAA0B,CAClD,GAAM,CACJC,KACAC,YACAC,QACAC,UACAC,YACAC,QACAC,cACAC,aAAa,GACbC,uBAAuB,GACvBC,WACAC,MACA,GAAGC,GACDZ,EAEEa,GAAA,EAAkB1B,EAAAA,QAAAA,KAChBC,EAAAA,YAAYsB,EAAUL,EAAW,CAAEG,YAAW,CAAC,EACrD,CAACE,EAAUL,EAAWG,CAAU,CAClC,EAEA,MACE,iBAAA,EAAAb,EAAA,IAAA,CAACN,EAAAA,QAAD,CACOsB,MACIP,UACT,WAAA,EAAWd,EAAAA,QAAAA,CAAK,iBAAkBY,CAAS,EACvCD,KACGE,QACP,GAAIS,EAEH,SAAAC,EAAgB,KAAK,CAAEC,QAAOC,eAAe,IAC5CA,EACEN,EACE,iBAAA,EAAAd,EAAA,IAAA,CAACJ,EAAAA,KAAD,CAAqBe,QAAO,GAAIC,EAAa,iBAAgBO,EAC1D,SAAAA,CACG,EAFK,CAEL,EAEN,iBAAA,EAAAnB,EAAA,IAAA,CAACJ,EAAAA,KAAD,CAAqBe,QAAO,GAAIC,EAC7B,SAAAO,CACG,EAFK,CAEL,EAGR,iBAAA,EAAAnB,EAAA,IAAA,CAAC,OAAD,CAAA,SAAemB,CAAY,EAAhB,CAAgB,CAE/B,CACU,CAAA,CAEhB,EAEAf,EAAU,YAAc,Y"}
@@ -1,7 +1,6 @@
1
- import { SxProps, Theme } from "@mui/material/styles";
2
1
  import { CSSProperties, Ref } from "react";
2
+ import { SxProps, Theme } from "@mui/material/styles";
3
3
  import { TypographyProps } from "@mui/material/Typography";
4
- //#region src/components/Highlight/Highlight.d.ts
5
4
  /**
6
5
  * 특정 텍스트의 부분 문자열을 강조 표시하는 컴포넌트입니다.
7
6
  *
@@ -64,30 +63,7 @@ export interface HighlightProps {
64
63
  includeDataAttribute?: boolean;
65
64
  ref?: Ref<HTMLElement>;
66
65
  }
67
- /**
68
- * `Highlight` 컴포넌트는 주어진 텍스트에서 특정 문자열을 강조 표시합니다.
69
- *
70
- * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.
71
- * - 대소문자 무시, 사용자 정의 색상 및 스타일 등 다양한 옵션을 제공합니다.
72
- *
73
- * @param props - `HighlightProps` 속성
74
- * @returns 강조 표시된 텍스트를 포함한 `Typography` 컴포넌트를 렌더링합니다.
75
- *
76
- * @example
77
- * ```tsx
78
- * <Highlight
79
- * highlight="highlight"
80
- * color="red"
81
- * ignorecase
82
- * includeDataAttribute
83
- * >
84
- * This is a highlight example.
85
- * </Highlight>
86
- * ```
87
- */
88
- export declare const Highlight: {
89
- (props: HighlightProps): import("react").JSX.Element;
90
- displayName: string;
91
- };
92
- //#endregion
93
- //# sourceMappingURL=Highlight.d.cts.map
66
+ export declare function Highlight(props: HighlightProps): import("react").JSX.Element;
67
+ export declare namespace Highlight {
68
+ var displayName: string;
69
+ }
@@ -1,7 +1,6 @@
1
1
  import { CSSProperties, Ref } from "react";
2
2
  import { TypographyProps } from "@mui/material/Typography";
3
3
  import { SxProps, Theme } from "@mui/material/styles";
4
- //#region src/components/Highlight/Highlight.d.ts
5
4
  /**
6
5
  * 특정 텍스트의 부분 문자열을 강조 표시하는 컴포넌트입니다.
7
6
  *
@@ -64,30 +63,7 @@ export interface HighlightProps {
64
63
  includeDataAttribute?: boolean;
65
64
  ref?: Ref<HTMLElement>;
66
65
  }
67
- /**
68
- * `Highlight` 컴포넌트는 주어진 텍스트에서 특정 문자열을 강조 표시합니다.
69
- *
70
- * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.
71
- * - 대소문자 무시, 사용자 정의 색상 및 스타일 등 다양한 옵션을 제공합니다.
72
- *
73
- * @param props - `HighlightProps` 속성
74
- * @returns 강조 표시된 텍스트를 포함한 `Typography` 컴포넌트를 렌더링합니다.
75
- *
76
- * @example
77
- * ```tsx
78
- * <Highlight
79
- * highlight="highlight"
80
- * color="red"
81
- * ignorecase
82
- * includeDataAttribute
83
- * >
84
- * This is a highlight example.
85
- * </Highlight>
86
- * ```
87
- */
88
- export declare const Highlight: {
89
- (props: HighlightProps): import("react").JSX.Element;
90
- displayName: string;
91
- };
92
- //#endregion
93
- //# sourceMappingURL=Highlight.d.ts.map
66
+ export declare function Highlight(props: HighlightProps): import("react").JSX.Element;
67
+ export declare namespace Highlight {
68
+ var displayName: string;
69
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"Highlight.js","names":["clsx","clsx$1","Typography","Highlight","restProps","props","highlightChunks","useMemo","highlighter","children","highlight","ignorecase","className","highlighted","includeDataAttribute","Mark","highlightSx","chunk"],"sources":["../../../src/components/Highlight/Highlight.tsx"],"sourcesContent":["'use client';\n\nimport type { SxProps, Theme } from '@mui/material/styles';\nimport Typography, { type TypographyProps } from '@mui/material/Typography';\nimport clsx from 'clsx';\nimport { type CSSProperties, type Ref, useMemo } from 'react';\nimport { Mark } from '../Mark.js';\nimport { highlighter } from './highlighter/highlighter.js';\n\n/**\n * 특정 텍스트의 부분 문자열을 강조 표시하는 컴포넌트입니다.\n *\n * - `highlight` 속성을 사용해 강조 표시할 문자열 또는 문자열 배열을 지정할 수 있습니다.\n * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.\n * - 다양한 사용자 정의 스타일과 속성을 지원합니다.\n */\nexport interface HighlightProps {\n /**\n * `sx` 속성을 사용해 스타일을 추가로 설정할 수 있습니다.\n */\n sx?: SxProps<Theme>;\n\n /**\n * 추가로 적용할 CSS 클래스 이름입니다.\n */\n className?: string;\n\n /**\n * 인라인 스타일을 적용할 수 있습니다.\n */\n style?: CSSProperties;\n\n /**\n * MUI `Typography` 컴포넌트의 `variant` 속성입니다.\n */\n variant?: TypographyProps['variant'];\n\n /**\n * 강조 표시할 부분 문자열 또는 문자열 배열입니다.\n *\n * @example\n * ```tsx\n * <Highlight highlight=\"React\">React is amazing!</Highlight>\n * <Highlight highlight={[\"React\", \"amazing\"]}>React is amazing!</Highlight>\n * ```\n */\n highlight: string | string[];\n\n /**\n * 강조 표시된 텍스트의 색상을 지정합니다.\n * `theme.colors` 키 또는 유효한 CSS 색상 값을 사용할 수 있습니다.\n * 기본값은 `yellow`입니다.\n */\n color?: string;\n\n /**\n * 강조 표시된 텍스트에 적용할 추가 스타일입니다.\n */\n highlightSx?: SxProps;\n\n /**\n * 강조 표시 작업을 수행할 문자열입니다.\n */\n children: string;\n\n /**\n * 대소문자를 무시하고 강조 표시할지 여부를 설정합니다.\n *\n * @default false\n */\n ignorecase?: boolean;\n\n /**\n * 강조 표시된 텍스트에 `data-highlight` 속성을 추가할지 여부를 설정합니다.\n *\n * @default false\n */\n includeDataAttribute?: boolean;\n\n ref?: Ref<HTMLElement>;\n}\n\n/**\n * `Highlight` 컴포넌트는 주어진 텍스트에서 특정 문자열을 강조 표시합니다.\n *\n * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.\n * - 대소문자 무시, 사용자 정의 색상 및 스타일 등 다양한 옵션을 제공합니다.\n *\n * @param props - `HighlightProps` 속성\n * @returns 강조 표시된 텍스트를 포함한 `Typography` 컴포넌트를 렌더링합니다.\n *\n * @example\n * ```tsx\n * <Highlight\n * highlight=\"highlight\"\n * color=\"red\"\n * ignorecase\n * includeDataAttribute\n * >\n * This is a highlight example.\n * </Highlight>\n * ```\n */\nexport const Highlight = (props: HighlightProps) => {\n const {\n sx,\n className,\n style,\n variant,\n highlight,\n color,\n highlightSx,\n ignorecase = false,\n includeDataAttribute = false,\n children,\n ref,\n ...restProps\n } = props;\n\n const highlightChunks = useMemo<{ chunk: string; highlighted: boolean }[]>(\n () => highlighter(children, highlight, { ignorecase }),\n [children, highlight, ignorecase],\n );\n\n return (\n <Typography\n ref={ref}\n variant={variant}\n className={clsx('Highlight-root', className)}\n sx={sx}\n style={style}\n {...restProps}\n >\n {highlightChunks.map(({ chunk, highlighted }, i) =>\n highlighted ? (\n includeDataAttribute ? (\n <Mark key={i} color={color} sx={highlightSx} data-highlight={chunk}>\n {chunk}\n </Mark>\n ) : (\n <Mark key={i} color={color} sx={highlightSx}>\n {chunk}\n </Mark>\n )\n ) : (\n <span key={i}>{chunk}</span>\n ),\n )}\n </Typography>\n );\n};\n\nHighlight.displayName = 'Highlight';\n"],"mappings":"8OAuGA,MAAaG,EAAa,GAA0B,CAClD,GAAM,CACJ,KACA,YACA,QACA,UACA,YACA,QACA,cACA,aAAa,GACb,uBAAuB,GACvB,WACA,MACA,GAAGC,GACDC,EAEEC,EAAkBC,MAChBC,EAAYC,EAAUC,EAAW,CAAE,YAAW,CAAC,EACrD,CAACD,EAAUC,EAAWC,CAAU,CAClC,EAEA,MACE,kBAACT,EAAD,CACO,MACI,UACT,UAAWF,EAAK,iBAAkBY,CAAS,EACvC,KACG,QACP,GAAIR,EAEH,SAAAE,EAAgB,KAAK,CAAE,QAAO,eAAe,IAC5CO,EACEC,EACE,kBAACC,EAAD,CAAqB,QAAO,GAAIC,EAAa,iBAAgBC,EAC1D,SAAAA,CACG,EAFK,CAEL,EAEN,kBAACF,EAAD,CAAqB,QAAO,GAAIC,EAC7B,SAAAC,CACG,EAFK,CAEL,EAGR,kBAAC,OAAD,CAAA,SAAeA,CAAY,EAAhB,CAAgB,CAE/B,CACU,CAAA,CAEhB,EAEA,EAAU,YAAc"}
1
+ {"version":3,"file":"Highlight.js","names":["clsx","Mark","highlighter","jsx","useMemo","clsx$1","Typography","Highlight","props","sx","className","style","variant","highlight","color","highlightSx","ignorecase","includeDataAttribute","children","ref","restProps","highlightChunks","chunk","highlighted"],"sources":["../../../src/components/Highlight/Highlight.tsx"],"sourcesContent":["'use client';\n\nimport type { SxProps, Theme } from '@mui/material/styles';\nimport Typography, { type TypographyProps } from '@mui/material/Typography';\nimport clsx from 'clsx';\nimport { type CSSProperties, type Ref, useMemo } from 'react';\nimport { Mark } from '../Mark.js';\nimport { highlighter } from './highlighter/highlighter.js';\n\n/**\n * 특정 텍스트의 부분 문자열을 강조 표시하는 컴포넌트입니다.\n *\n * - `highlight` 속성을 사용해 강조 표시할 문자열 또는 문자열 배열을 지정할 수 있습니다.\n * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.\n * - 다양한 사용자 정의 스타일과 속성을 지원합니다.\n */\nexport interface HighlightProps {\n /**\n * `sx` 속성을 사용해 스타일을 추가로 설정할 수 있습니다.\n */\n sx?: SxProps<Theme>;\n\n /**\n * 추가로 적용할 CSS 클래스 이름입니다.\n */\n className?: string;\n\n /**\n * 인라인 스타일을 적용할 수 있습니다.\n */\n style?: CSSProperties;\n\n /**\n * MUI `Typography` 컴포넌트의 `variant` 속성입니다.\n */\n variant?: TypographyProps['variant'];\n\n /**\n * 강조 표시할 부분 문자열 또는 문자열 배열입니다.\n *\n * @example\n * ```tsx\n * <Highlight highlight=\"React\">React is amazing!</Highlight>\n * <Highlight highlight={[\"React\", \"amazing\"]}>React is amazing!</Highlight>\n * ```\n */\n highlight: string | string[];\n\n /**\n * 강조 표시된 텍스트의 색상을 지정합니다.\n * `theme.colors` 키 또는 유효한 CSS 색상 값을 사용할 수 있습니다.\n * 기본값은 `yellow`입니다.\n */\n color?: string;\n\n /**\n * 강조 표시된 텍스트에 적용할 추가 스타일입니다.\n */\n highlightSx?: SxProps;\n\n /**\n * 강조 표시 작업을 수행할 문자열입니다.\n */\n children: string;\n\n /**\n * 대소문자를 무시하고 강조 표시할지 여부를 설정합니다.\n *\n * @default false\n */\n ignorecase?: boolean;\n\n /**\n * 강조 표시된 텍스트에 `data-highlight` 속성을 추가할지 여부를 설정합니다.\n *\n * @default false\n */\n includeDataAttribute?: boolean;\n\n ref?: Ref<HTMLElement>;\n}\n\n/**\n * `Highlight` 컴포넌트는 주어진 텍스트에서 특정 문자열을 강조 표시합니다.\n *\n * - 강조 표시된 텍스트는 `Mark` 컴포넌트를 사용하여 스타일링됩니다.\n * - 대소문자 무시, 사용자 정의 색상 및 스타일 등 다양한 옵션을 제공합니다.\n *\n * @param props - `HighlightProps` 속성\n * @returns 강조 표시된 텍스트를 포함한 `Typography` 컴포넌트를 렌더링합니다.\n *\n * @example\n * ```tsx\n * <Highlight\n * highlight=\"highlight\"\n * color=\"red\"\n * ignorecase\n * includeDataAttribute\n * >\n * This is a highlight example.\n * </Highlight>\n * ```\n */\nexport const Highlight = (props: HighlightProps) => {\n const {\n sx,\n className,\n style,\n variant,\n highlight,\n color,\n highlightSx,\n ignorecase = false,\n includeDataAttribute = false,\n children,\n ref,\n ...restProps\n } = props;\n\n const highlightChunks = useMemo<{ chunk: string; highlighted: boolean }[]>(\n () => highlighter(children, highlight, { ignorecase }),\n [children, highlight, ignorecase],\n );\n\n return (\n <Typography\n ref={ref}\n variant={variant}\n className={clsx('Highlight-root', className)}\n sx={sx}\n style={style}\n {...restProps}\n >\n {highlightChunks.map(({ chunk, highlighted }, i) =>\n highlighted ? (\n includeDataAttribute ? (\n <Mark key={i} color={color} sx={highlightSx} data-highlight={chunk}>\n {chunk}\n </Mark>\n ) : (\n <Mark key={i} color={color} sx={highlightSx}>\n {chunk}\n </Mark>\n )\n ) : (\n <span key={i}>{chunk}</span>\n ),\n )}\n </Typography>\n );\n};\n\nHighlight.displayName = 'Highlight';\n"],"mappings":"A,8OAuGA,MAAaO,EAAaC,GAA0B,CAClD,GAAM,CACJC,KACAC,YACAC,QACAC,UACAC,YACAC,QACAC,cACAC,aAAa,GACbC,uBAAuB,GACvBC,WACAC,MACA,GAAGC,GACDZ,EAEEa,EAAkBjB,MAChBF,EAAYgB,EAAUL,EAAW,CAAEG,YAAW,CAAC,EACrD,CAACE,EAAUL,EAAWG,CAAU,CAClC,EAEA,MACEb,kBAACG,EAAD,CACOa,MACIP,UACT,UAAWZ,EAAK,iBAAkBU,CAAS,EACvCD,KACGE,QACP,GAAIS,EAEH,SAAAC,EAAgB,KAAK,CAAEC,QAAOC,eAAe,IAC5CA,EACEN,EACEd,kBAACF,EAAD,CAAqBa,QAAO,GAAIC,EAAa,iBAAgBO,EAC1D,SAAAA,CACG,EAFK,CAEL,EAENnB,kBAACF,EAAD,CAAqBa,QAAO,GAAIC,EAC7B,SAAAO,CACG,EAFK,CAEL,EAGRnB,kBAAC,OAAD,CAAA,SAAemB,CAAY,EAAhB,CAAgB,CAE/B,CACU,CAAA,CAEhB,EAEAf,EAAU,YAAc,Y"}
@@ -1 +1 @@
1
- {"version":3,"file":"highlighter.cjs","names":["escapeRegex","value","highlighter","_highlight","ignorecase","option","highlight","part","matcher","b","a","re","chunk"],"sources":["../../../../src/components/Highlight/highlighter/highlighter.ts"],"sourcesContent":["function escapeRegex(value: string) {\n return value.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&');\n}\n\nexport function highlighter(\n value: string,\n _highlight: string | string[],\n option?: {\n ignorecase?: boolean;\n },\n) {\n if (!_highlight || _highlight.length === 0) {\n return [{ chunk: value, highlighted: false }];\n }\n\n const ignorecase = option?.ignorecase ?? true;\n\n const highlight = Array.isArray(_highlight)\n ? _highlight.map(escapeRegex)\n : escapeRegex(_highlight);\n\n const shouldHighlight = Array.isArray(highlight)\n ? highlight.filter((part) => part.trim().length > 0).length > 0\n : highlight.trim() !== '';\n\n if (!shouldHighlight) {\n return [{ chunk: value, highlighted: false }];\n }\n\n const matcher =\n typeof highlight === 'string'\n ? highlight.trim()\n : highlight\n .filter((part) => part.trim().length !== 0)\n .map((part) => part.trim())\n .sort((a, b) => b.length - a.length)\n .join('|');\n\n const re = new RegExp(`(${matcher})`, ignorecase ? 'gi' : 'g');\n const chunks = value\n .split(re)\n .map((part) => ({ chunk: part, highlighted: re.test(part) }))\n .filter(({ chunk }) => chunk);\n\n return chunks;\n}\n"],"mappings":"AAAA,SAASA,EAAY,EAAe,CAClC,OAAOC,EAAM,QAAQ,yBAA0B,MAAM,CACvD,CAEA,SAAgBC,EACd,EACA,EACA,EAGA,CACA,GAAI,CAACC,GAAcA,EAAW,SAAW,EACvC,MAAO,CAAC,CAAE,MAAOF,EAAO,YAAa,EAAM,CAAC,EAG9C,IAAMG,EAAaC,GAAQ,YAAc,GAEnCC,EAAY,MAAM,QAAQH,CAAU,EACtCA,EAAW,IAAIH,CAAW,EAC1BA,EAAYG,CAAU,EAM1B,GAAI,EAJoB,MAAM,QAAQG,CAAS,EAC3CA,EAAU,OAAQ,GAASC,EAAK,KAAK,CAAC,CAAC,OAAS,CAAC,CAAC,CAAC,OAAS,EAC5DD,EAAU,KAAK,IAAM,IAGvB,MAAO,CAAC,CAAE,MAAOL,EAAO,YAAa,EAAM,CAAC,EAG9C,IAAMO,EACJ,OAAOF,GAAc,SACjBA,EAAU,KAAK,EACfA,EACG,OAAQ,GAASC,EAAK,KAAK,CAAC,CAAC,SAAW,CAAC,CAAC,CAC1C,IAAK,GAASA,EAAK,KAAK,CAAC,CAAC,CAC1B,MAAM,EAAG,IAAME,EAAE,OAASC,EAAE,MAAM,CAAC,CACnC,KAAK,GAAG,EAEXC,EAAS,OAAO,IAAIH,EAAQ,GAAIJ,EAAa,KAAO,GAAG,EAM7D,OALeH,EACZ,MAAMU,CAAE,CAAC,CACT,IAAK,IAAU,CAAE,MAAOJ,EAAM,YAAaI,EAAG,KAAKJ,CAAI,CAAE,EAAE,CAAC,CAC5D,QAAQ,CAAE,WAAYK,CAEb,CACd"}
1
+ {"version":3,"file":"highlighter.cjs","names":["escapeRegex","value","highlighter","_highlight","option","ignorecase","highlight","part","matcher","a","b","re","chunk"],"sources":["../../../../src/components/Highlight/highlighter/highlighter.ts"],"sourcesContent":["function escapeRegex(value: string) {\n return value.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&');\n}\n\nexport function highlighter(\n value: string,\n _highlight: string | string[],\n option?: {\n ignorecase?: boolean;\n },\n) {\n if (!_highlight || _highlight.length === 0) {\n return [{ chunk: value, highlighted: false }];\n }\n\n const ignorecase = option?.ignorecase ?? true;\n\n const highlight = Array.isArray(_highlight)\n ? _highlight.map(escapeRegex)\n : escapeRegex(_highlight);\n\n const shouldHighlight = Array.isArray(highlight)\n ? highlight.filter((part) => part.trim().length > 0).length > 0\n : highlight.trim() !== '';\n\n if (!shouldHighlight) {\n return [{ chunk: value, highlighted: false }];\n }\n\n const matcher =\n typeof highlight === 'string'\n ? highlight.trim()\n : highlight\n .filter((part) => part.trim().length !== 0)\n .map((part) => part.trim())\n .sort((a, b) => b.length - a.length)\n .join('|');\n\n const re = new RegExp(`(${matcher})`, ignorecase ? 'gi' : 'g');\n const chunks = value\n .split(re)\n .map((part) => ({ chunk: part, highlighted: re.test(part) }))\n .filter(({ chunk }) => chunk);\n\n return chunks;\n}\n"],"mappings":"AAAA,SAASA,EAAYC,EAAe,CAClC,OAAOA,EAAM,QAAQ,yBAA0B,MAAM,CACvD,CAEA,SAAgBC,EACdD,EACAE,EACAC,EAGA,CACA,GAAI,CAACD,GAAcA,EAAW,SAAW,EACvC,MAAO,CAAC,CAAE,MAAOF,EAAO,YAAa,EAAM,CAAC,EAG9C,IAAMI,EAAaD,GAAQ,YAAc,GAEnCE,EAAY,MAAM,QAAQH,CAAU,EACtCA,EAAW,IAAIH,CAAW,EAC1BA,EAAYG,CAAU,EAM1B,GAAI,EAJoB,MAAM,QAAQG,CAAS,EAC3CA,EAAU,OAAQC,GAASA,EAAK,KAAK,CAAC,CAAC,OAAS,CAAC,CAAC,CAAC,OAAS,EAC5DD,EAAU,KAAK,IAAM,IAGvB,MAAO,CAAC,CAAE,MAAOL,EAAO,YAAa,EAAM,CAAC,EAG9C,IAAMO,EACJ,OAAOF,GAAc,SACjBA,EAAU,KAAK,EACfA,EACG,OAAQC,GAASA,EAAK,KAAK,CAAC,CAAC,SAAW,CAAC,CAAC,CAC1C,IAAKA,GAASA,EAAK,KAAK,CAAC,CAAC,CAC1B,MAAME,EAAGC,IAAMA,EAAE,OAASD,EAAE,MAAM,CAAC,CACnC,KAAK,GAAG,EAEXE,EAAS,OAAO,IAAIH,EAAQ,GAAIH,EAAa,KAAO,GAAG,EAM7D,OALeJ,EACZ,MAAMU,CAAE,CAAC,CACT,IAAKJ,IAAU,CAAE,MAAOA,EAAM,YAAaI,EAAG,KAAKJ,CAAI,CAAE,EAAE,CAAC,CAC5D,QAAQ,CAAEK,WAAYA,CAEb,CACd,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"highlighter.js","names":["escapeRegex","value","highlighter","_highlight","ignorecase","option","highlight","part","matcher","b","a","re","chunk"],"sources":["../../../../src/components/Highlight/highlighter/highlighter.ts"],"sourcesContent":["function escapeRegex(value: string) {\n return value.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&');\n}\n\nexport function highlighter(\n value: string,\n _highlight: string | string[],\n option?: {\n ignorecase?: boolean;\n },\n) {\n if (!_highlight || _highlight.length === 0) {\n return [{ chunk: value, highlighted: false }];\n }\n\n const ignorecase = option?.ignorecase ?? true;\n\n const highlight = Array.isArray(_highlight)\n ? _highlight.map(escapeRegex)\n : escapeRegex(_highlight);\n\n const shouldHighlight = Array.isArray(highlight)\n ? highlight.filter((part) => part.trim().length > 0).length > 0\n : highlight.trim() !== '';\n\n if (!shouldHighlight) {\n return [{ chunk: value, highlighted: false }];\n }\n\n const matcher =\n typeof highlight === 'string'\n ? highlight.trim()\n : highlight\n .filter((part) => part.trim().length !== 0)\n .map((part) => part.trim())\n .sort((a, b) => b.length - a.length)\n .join('|');\n\n const re = new RegExp(`(${matcher})`, ignorecase ? 'gi' : 'g');\n const chunks = value\n .split(re)\n .map((part) => ({ chunk: part, highlighted: re.test(part) }))\n .filter(({ chunk }) => chunk);\n\n return chunks;\n}\n"],"mappings":"AAAA,SAASA,EAAY,EAAe,CAClC,OAAOC,EAAM,QAAQ,yBAA0B,MAAM,CACvD,CAEA,SAAgBC,EACd,EACA,EACA,EAGA,CACA,GAAI,CAACC,GAAcA,EAAW,SAAW,EACvC,MAAO,CAAC,CAAE,MAAOF,EAAO,YAAa,EAAM,CAAC,EAG9C,IAAMG,EAAaC,GAAQ,YAAc,GAEnCC,EAAY,MAAM,QAAQH,CAAU,EACtCA,EAAW,IAAIH,CAAW,EAC1BA,EAAYG,CAAU,EAM1B,GAAI,EAJoB,MAAM,QAAQG,CAAS,EAC3CA,EAAU,OAAQ,GAASC,EAAK,KAAK,CAAC,CAAC,OAAS,CAAC,CAAC,CAAC,OAAS,EAC5DD,EAAU,KAAK,IAAM,IAGvB,MAAO,CAAC,CAAE,MAAOL,EAAO,YAAa,EAAM,CAAC,EAG9C,IAAMO,EACJ,OAAOF,GAAc,SACjBA,EAAU,KAAK,EACfA,EACG,OAAQ,GAASC,EAAK,KAAK,CAAC,CAAC,SAAW,CAAC,CAAC,CAC1C,IAAK,GAASA,EAAK,KAAK,CAAC,CAAC,CAC1B,MAAM,EAAG,IAAME,EAAE,OAASC,EAAE,MAAM,CAAC,CACnC,KAAK,GAAG,EAEXC,EAAS,OAAO,IAAIH,EAAQ,GAAIJ,EAAa,KAAO,GAAG,EAM7D,OALeH,EACZ,MAAMU,CAAE,CAAC,CACT,IAAK,IAAU,CAAE,MAAOJ,EAAM,YAAaI,EAAG,KAAKJ,CAAI,CAAE,EAAE,CAAC,CAC5D,QAAQ,CAAE,WAAYK,CAEb,CACd"}
1
+ {"version":3,"file":"highlighter.js","names":["escapeRegex","value","highlighter","_highlight","option","ignorecase","highlight","part","matcher","a","b","re","chunk"],"sources":["../../../../src/components/Highlight/highlighter/highlighter.ts"],"sourcesContent":["function escapeRegex(value: string) {\n return value.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&');\n}\n\nexport function highlighter(\n value: string,\n _highlight: string | string[],\n option?: {\n ignorecase?: boolean;\n },\n) {\n if (!_highlight || _highlight.length === 0) {\n return [{ chunk: value, highlighted: false }];\n }\n\n const ignorecase = option?.ignorecase ?? true;\n\n const highlight = Array.isArray(_highlight)\n ? _highlight.map(escapeRegex)\n : escapeRegex(_highlight);\n\n const shouldHighlight = Array.isArray(highlight)\n ? highlight.filter((part) => part.trim().length > 0).length > 0\n : highlight.trim() !== '';\n\n if (!shouldHighlight) {\n return [{ chunk: value, highlighted: false }];\n }\n\n const matcher =\n typeof highlight === 'string'\n ? highlight.trim()\n : highlight\n .filter((part) => part.trim().length !== 0)\n .map((part) => part.trim())\n .sort((a, b) => b.length - a.length)\n .join('|');\n\n const re = new RegExp(`(${matcher})`, ignorecase ? 'gi' : 'g');\n const chunks = value\n .split(re)\n .map((part) => ({ chunk: part, highlighted: re.test(part) }))\n .filter(({ chunk }) => chunk);\n\n return chunks;\n}\n"],"mappings":"AAAA,SAASA,EAAYC,EAAe,CAClC,OAAOA,EAAM,QAAQ,yBAA0B,MAAM,CACvD,CAEA,SAAgBC,EACdD,EACAE,EACAC,EAGA,CACA,GAAI,CAACD,GAAcA,EAAW,SAAW,EACvC,MAAO,CAAC,CAAE,MAAOF,EAAO,YAAa,EAAM,CAAC,EAG9C,IAAMI,EAAaD,GAAQ,YAAc,GAEnCE,EAAY,MAAM,QAAQH,CAAU,EACtCA,EAAW,IAAIH,CAAW,EAC1BA,EAAYG,CAAU,EAM1B,GAAI,EAJoB,MAAM,QAAQG,CAAS,EAC3CA,EAAU,OAAQC,GAASA,EAAK,KAAK,CAAC,CAAC,OAAS,CAAC,CAAC,CAAC,OAAS,EAC5DD,EAAU,KAAK,IAAM,IAGvB,MAAO,CAAC,CAAE,MAAOL,EAAO,YAAa,EAAM,CAAC,EAG9C,IAAMO,EACJ,OAAOF,GAAc,SACjBA,EAAU,KAAK,EACfA,EACG,OAAQC,GAASA,EAAK,KAAK,CAAC,CAAC,SAAW,CAAC,CAAC,CAC1C,IAAKA,GAASA,EAAK,KAAK,CAAC,CAAC,CAC1B,MAAME,EAAGC,IAAMA,EAAE,OAASD,EAAE,MAAM,CAAC,CACnC,KAAK,GAAG,EAEXE,EAAS,OAAO,IAAIH,EAAQ,GAAIH,EAAa,KAAO,GAAG,EAM7D,OALeJ,EACZ,MAAMU,CAAE,CAAC,CACT,IAAKJ,IAAU,CAAE,MAAOA,EAAM,YAAaI,EAAG,KAAKJ,CAAI,CAAE,EAAE,CAAC,CAC5D,QAAQ,CAAEK,WAAYA,CAEb,CACd,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"LengthLimitHelperText.cjs","names":["Box","require_runtime","_mui_material_Box","react_jsx_runtime","clsx","LengthLimitHelperText","props","error","currentLen","maxLen","text","className","sx"],"sources":["../../src/components/LengthLimitHelperText.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport type { SxProps } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\n\ninterface Props {\n sx?: SxProps;\n className?: string;\n text?: ReactNode;\n maxLen: number;\n currentLen?: number;\n}\n\nexport function LengthLimitHelperText(props: Props) {\n const { sx, className, text, maxLen, currentLen = 0 } = props;\n\n const error = currentLen > maxLen;\n\n if (text) {\n return (\n <Box\n className={clsx('LengthLimitHelperText-root', className)}\n component='span'\n sx={[\n {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n color: error ? 'error.main' : 'text.secondary',\n },\n ...(Array.isArray(sx) ? sx : [sx ?? false]),\n ]}\n >\n {typeof text === 'string' ? <span>{text}</span> : text}\n <Box component='span' sx={{ ml: 2, whiteSpace: 'nowrap' }}>\n {currentLen} / {maxLen}\n </Box>\n </Box>\n );\n }\n\n return (\n <Box\n className={clsx('LengthLimitHelperText-root', className)}\n component='span'\n sx={[\n {\n display: 'flex',\n justifyContent: 'flex-end',\n alignItems: 'center',\n color: error ? 'error.main' : 'text.secondary',\n whiteSpace: 'nowrap',\n },\n ...(Array.isArray(sx) ? sx : [sx ?? false]),\n ]}\n >\n {currentLen} / {maxLen}\n </Box>\n );\n}\n"],"mappings":"+KAaA,SAAgBK,EAAsB,EAAc,CAClD,GAAM,CAAE,KAAI,YAAW,OAAM,SAAQ,aAAa,GAAMC,EAElDC,EAAQC,EAAaC,EAyB3B,OAvBIC,EAEA,iBAAA,EAAAP,EAAA,KAAA,CAACH,EAAAA,QAAD,CACE,WAAA,EAAWI,EAAA,QAAA,CAAK,6BAA8BO,CAAS,EACvD,UAAU,OACV,GAAI,CACF,CACE,QAAS,OACT,eAAgB,gBAChB,WAAY,SACZ,MAAOJ,EAAQ,aAAe,gBAChC,EACA,GAAI,MAAM,QAAQK,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAC3C,EAXF,SAAA,CAaG,OAAOF,GAAS,SAAW,iBAAA,EAAAP,EAAA,IAAA,CAAC,OAAD,CAAA,SAAOO,CAAW,CAAA,EAAIA,EAClD,iBAAA,EAAAP,EAAA,KAAA,CAACH,EAAAA,QAAD,CAAK,UAAU,OAAO,GAAI,CAAE,GAAI,EAAG,WAAY,QAAS,EAAxD,SAAA,CACGQ,EAAW,MAAIC,CACb,CACF,CAAA,CAAA,IAKP,iBAAA,EAAAN,EAAA,KAAA,CAACH,EAAAA,QAAD,CACE,WAAA,EAAWI,EAAA,QAAA,CAAK,6BAA8BO,CAAS,EACvD,UAAU,OACV,GAAI,CACF,CACE,QAAS,OACT,eAAgB,WAChB,WAAY,SACZ,MAAOJ,EAAQ,aAAe,iBAC9B,WAAY,QACd,EACA,GAAI,MAAM,QAAQK,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAC3C,EAZF,SAAA,CAcGJ,EAAW,MAAIC,CACb,GAET"}
1
+ {"version":3,"file":"LengthLimitHelperText.cjs","names":["Box","clsx","require_runtime","_mui_material_Box","react_jsx_runtime","clsx","LengthLimitHelperText","props","sx","className","text","maxLen","currentLen","error"],"sources":["../../src/components/LengthLimitHelperText.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport type { SxProps } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\n\ninterface Props {\n sx?: SxProps;\n className?: string;\n text?: ReactNode;\n maxLen: number;\n currentLen?: number;\n}\n\nexport function LengthLimitHelperText(props: Props) {\n const { sx, className, text, maxLen, currentLen = 0 } = props;\n\n const error = currentLen > maxLen;\n\n if (text) {\n return (\n <Box\n className={clsx('LengthLimitHelperText-root', className)}\n component='span'\n sx={[\n {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n color: error ? 'error.main' : 'text.secondary',\n },\n ...(Array.isArray(sx) ? sx : [sx ?? false]),\n ]}\n >\n {typeof text === 'string' ? <span>{text}</span> : text}\n <Box component='span' sx={{ ml: 2, whiteSpace: 'nowrap' }}>\n {currentLen} / {maxLen}\n </Box>\n </Box>\n );\n }\n\n return (\n <Box\n className={clsx('LengthLimitHelperText-root', className)}\n component='span'\n sx={[\n {\n display: 'flex',\n justifyContent: 'flex-end',\n alignItems: 'center',\n color: error ? 'error.main' : 'text.secondary',\n whiteSpace: 'nowrap',\n },\n ...(Array.isArray(sx) ? sx : [sx ?? false]),\n ]}\n >\n {currentLen} / {maxLen}\n </Box>\n );\n}\n"],"mappings":"A,+KAaA,SAAgBM,EAAsBC,EAAc,CAClD,GAAM,CAAEC,KAAIC,YAAWC,OAAMC,SAAQC,aAAa,GAAML,EAElDM,EAAQD,EAAaD,EAyB3B,OAvBID,EAEA,iBAAA,EAAAN,EAAA,KAAA,CAACJ,EAAAA,QAAD,CACE,WAAA,EAAWC,EAAAA,QAAAA,CAAK,6BAA8BQ,CAAS,EACvD,UAAU,OACV,GAAI,CACF,CACE,QAAS,OACT,eAAgB,gBAChB,WAAY,SACZ,MAAOI,EAAQ,aAAe,gBAChC,EACA,GAAI,MAAM,QAAQL,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAC3C,EAXF,SAAA,CAaG,OAAOE,GAAS,SAAW,iBAAA,EAAAN,EAAA,IAAA,CAAC,OAAD,CAAA,SAAOM,CAAW,CAAA,EAAIA,EAClD,iBAAA,EAAAN,EAAA,KAAA,CAACJ,EAAAA,QAAD,CAAK,UAAU,OAAO,GAAI,CAAE,GAAI,EAAG,WAAY,QAAS,EAAxD,SAAA,CACGY,EAAW,MAAID,CACb,CACF,CAAA,CAAA,C,GAKP,iBAAA,EAAAP,EAAA,KAAA,CAACJ,EAAAA,QAAD,CACE,WAAA,EAAWC,EAAAA,QAAAA,CAAK,6BAA8BQ,CAAS,EACvD,UAAU,OACV,GAAI,CACF,CACE,QAAS,OACT,eAAgB,WAChB,WAAY,SACZ,MAAOI,EAAQ,aAAe,iBAC9B,WAAY,QACd,EACA,GAAI,MAAM,QAAQL,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAC3C,EAZF,SAAA,CAcGI,EAAW,MAAID,CACb,C,EAET,C"}
@@ -1,6 +1,5 @@
1
- import { SxProps } from "@mui/material/styles";
2
1
  import { ReactNode } from "react";
3
- //#region src/components/LengthLimitHelperText.d.ts
2
+ import { SxProps } from "@mui/material/styles";
4
3
  interface Props {
5
4
  sx?: SxProps;
6
5
  className?: string;
@@ -9,5 +8,4 @@ interface Props {
9
8
  currentLen?: number;
10
9
  }
11
10
  export declare function LengthLimitHelperText(props: Props): import("react").JSX.Element;
12
- //#endregion
13
- //# sourceMappingURL=LengthLimitHelperText.d.cts.map
11
+ export {};
@@ -1,6 +1,5 @@
1
1
  import { ReactNode } from "react";
2
2
  import { SxProps } from "@mui/material/styles";
3
- //#region src/components/LengthLimitHelperText.d.ts
4
3
  interface Props {
5
4
  sx?: SxProps;
6
5
  className?: string;
@@ -9,5 +8,4 @@ interface Props {
9
8
  currentLen?: number;
10
9
  }
11
10
  export declare function LengthLimitHelperText(props: Props): import("react").JSX.Element;
12
- //#endregion
13
- //# sourceMappingURL=LengthLimitHelperText.d.ts.map
11
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"LengthLimitHelperText.js","names":["clsx","Box","clsx$1","LengthLimitHelperText","props","error","currentLen","maxLen","text","className","sx"],"sources":["../../src/components/LengthLimitHelperText.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport type { SxProps } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\n\ninterface Props {\n sx?: SxProps;\n className?: string;\n text?: ReactNode;\n maxLen: number;\n currentLen?: number;\n}\n\nexport function LengthLimitHelperText(props: Props) {\n const { sx, className, text, maxLen, currentLen = 0 } = props;\n\n const error = currentLen > maxLen;\n\n if (text) {\n return (\n <Box\n className={clsx('LengthLimitHelperText-root', className)}\n component='span'\n sx={[\n {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n color: error ? 'error.main' : 'text.secondary',\n },\n ...(Array.isArray(sx) ? sx : [sx ?? false]),\n ]}\n >\n {typeof text === 'string' ? <span>{text}</span> : text}\n <Box component='span' sx={{ ml: 2, whiteSpace: 'nowrap' }}>\n {currentLen} / {maxLen}\n </Box>\n </Box>\n );\n }\n\n return (\n <Box\n className={clsx('LengthLimitHelperText-root', className)}\n component='span'\n sx={[\n {\n display: 'flex',\n justifyContent: 'flex-end',\n alignItems: 'center',\n color: error ? 'error.main' : 'text.secondary',\n whiteSpace: 'nowrap',\n },\n ...(Array.isArray(sx) ? sx : [sx ?? false]),\n ]}\n >\n {currentLen} / {maxLen}\n </Box>\n );\n}\n"],"mappings":"uGAaA,SAAgBG,EAAsB,EAAc,CAClD,GAAM,CAAE,KAAI,YAAW,OAAM,SAAQ,aAAa,GAAMC,EAElDC,EAAQC,EAAaC,EAyB3B,OAvBIC,EAEA,kBAACP,EAAD,CACE,UAAWD,EAAK,6BAA8BS,CAAS,EACvD,UAAU,OACV,GAAI,CACF,CACE,QAAS,OACT,eAAgB,gBAChB,WAAY,SACZ,MAAOJ,EAAQ,aAAe,gBAChC,EACA,GAAI,MAAM,QAAQK,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAC3C,EAXF,SAAA,CAaG,OAAOF,GAAS,SAAW,kBAAC,OAAD,CAAA,SAAOA,CAAW,CAAA,EAAIA,EAClD,kBAACP,EAAD,CAAK,UAAU,OAAO,GAAI,CAAE,GAAI,EAAG,WAAY,QAAS,EAAxD,SAAA,CACGK,EAAW,MAAIC,CACb,CACF,CAAA,CAAA,IAKP,kBAACN,EAAD,CACE,UAAWD,EAAK,6BAA8BS,CAAS,EACvD,UAAU,OACV,GAAI,CACF,CACE,QAAS,OACT,eAAgB,WAChB,WAAY,SACZ,MAAOJ,EAAQ,aAAe,iBAC9B,WAAY,QACd,EACA,GAAI,MAAM,QAAQK,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAC3C,EAZF,SAAA,CAcGJ,EAAW,MAAIC,CACb,GAET"}
1
+ {"version":3,"file":"LengthLimitHelperText.js","names":["clsx","Box","jsx","jsxs","clsx$1","LengthLimitHelperText","props","sx","className","text","maxLen","currentLen","error"],"sources":["../../src/components/LengthLimitHelperText.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport type { SxProps } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\n\ninterface Props {\n sx?: SxProps;\n className?: string;\n text?: ReactNode;\n maxLen: number;\n currentLen?: number;\n}\n\nexport function LengthLimitHelperText(props: Props) {\n const { sx, className, text, maxLen, currentLen = 0 } = props;\n\n const error = currentLen > maxLen;\n\n if (text) {\n return (\n <Box\n className={clsx('LengthLimitHelperText-root', className)}\n component='span'\n sx={[\n {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n color: error ? 'error.main' : 'text.secondary',\n },\n ...(Array.isArray(sx) ? sx : [sx ?? false]),\n ]}\n >\n {typeof text === 'string' ? <span>{text}</span> : text}\n <Box component='span' sx={{ ml: 2, whiteSpace: 'nowrap' }}>\n {currentLen} / {maxLen}\n </Box>\n </Box>\n );\n }\n\n return (\n <Box\n className={clsx('LengthLimitHelperText-root', className)}\n component='span'\n sx={[\n {\n display: 'flex',\n justifyContent: 'flex-end',\n alignItems: 'center',\n color: error ? 'error.main' : 'text.secondary',\n whiteSpace: 'nowrap',\n },\n ...(Array.isArray(sx) ? sx : [sx ?? false]),\n ]}\n >\n {currentLen} / {maxLen}\n </Box>\n );\n}\n"],"mappings":"A,uGAaA,SAAgBK,EAAsBC,EAAc,CAClD,GAAM,CAAEC,KAAIC,YAAWC,OAAMC,SAAQC,aAAa,GAAML,EAElDM,EAAQD,EAAaD,EAyB3B,OAvBID,EAEAN,kBAACF,EAAD,CACE,UAAWD,EAAK,6BAA8BQ,CAAS,EACvD,UAAU,OACV,GAAI,CACF,CACE,QAAS,OACT,eAAgB,gBAChB,WAAY,SACZ,MAAOI,EAAQ,aAAe,gBAChC,EACA,GAAI,MAAM,QAAQL,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAC3C,EAXF,SAAA,CAaG,OAAOE,GAAS,SAAWP,kBAAC,OAAD,CAAA,SAAOO,CAAW,CAAA,EAAIA,EAClDN,kBAACF,EAAD,CAAK,UAAU,OAAO,GAAI,CAAE,GAAI,EAAG,WAAY,QAAS,EAAxD,SAAA,CACGU,EAAW,MAAID,CACb,CACF,CAAA,CAAA,C,GAKPP,kBAACF,EAAD,CACE,UAAWD,EAAK,6BAA8BQ,CAAS,EACvD,UAAU,OACV,GAAI,CACF,CACE,QAAS,OACT,eAAgB,WAChB,WAAY,SACZ,MAAOI,EAAQ,aAAe,iBAC9B,WAAY,QACd,EACA,GAAI,MAAM,QAAQL,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAC3C,EAZF,SAAA,CAcGI,EAAW,MAAID,CACb,C,EAET,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"LgOrUp.cjs","names":["useMediaQuery","require_runtime","react_jsx_runtime","_mui_material_useMediaQuery","LgOrUp","props","theme","children"],"sources":["../../src/components/LgOrUp.tsx"],"sourcesContent":["'use client';\n\nimport type { Theme } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport type { ReactNode } from 'react';\n\nexport interface LgOrUpProps {\n children?: ReactNode | ReactNode[];\n}\n\nexport function LgOrUp(props: LgOrUpProps) {\n const { children } = props;\n const matched = useMediaQuery((theme: Theme) => theme.breakpoints.up('lg'));\n if (!matched || !children) return null;\n return <>{children}</>;\n}\n"],"mappings":"+JAUA,SAAgBI,EAAO,EAAoB,CACzC,GAAM,CAAE,YAAaC,EAGrB,MADI,EAAA,EADYL,EAAAA,QAAAA,CAAe,GAAiBM,EAAM,YAAY,GAAG,IAAI,CAC9D,GAAK,CAACC,EAAiB,KAC3B,iBAAA,EAAAL,EAAA,IAAA,CAAAA,EAAA,SAAA,CAAG,UAAW,CAAA,CACvB"}
1
+ {"version":3,"file":"LgOrUp.cjs","names":["useMediaQuery","require_runtime","react_jsx_runtime","_mui_material_useMediaQuery","LgOrUp","props","children","theme"],"sources":["../../src/components/LgOrUp.tsx"],"sourcesContent":["'use client';\n\nimport type { Theme } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport type { ReactNode } from 'react';\n\nexport interface LgOrUpProps {\n children?: ReactNode | ReactNode[];\n}\n\nexport function LgOrUp(props: LgOrUpProps) {\n const { children } = props;\n const matched = useMediaQuery((theme: Theme) => theme.breakpoints.up('lg'));\n if (!matched || !children) return null;\n return <>{children}</>;\n}\n"],"mappings":"A,+JAUA,SAAgBI,EAAOC,EAAoB,CACzC,GAAM,CAAEC,YAAaD,EAGrB,MADI,EAAA,EADYL,EAAAA,QAAAA,CAAeO,GAAiBA,EAAM,YAAY,GAAG,IAAI,CAC9D,GAAK,CAACD,EAAiB,KAC3B,iBAAA,EAAAJ,EAAA,IAAA,CAAAA,EAAA,SAAA,CAAGI,UAAW,CAAA,CACvB,C"}
@@ -1,8 +1,5 @@
1
1
  import { ReactNode } from "react";
2
- //#region src/components/LgOrUp.d.ts
3
2
  export interface LgOrUpProps {
4
3
  children?: ReactNode | ReactNode[];
5
4
  }
6
- export declare function LgOrUp(props: LgOrUpProps): import("react").JSX.Element | null;
7
- //#endregion
8
- //# sourceMappingURL=LgOrUp.d.cts.map
5
+ export declare function LgOrUp(props: LgOrUpProps): import("react").JSX.Element | null;
@@ -1,8 +1,5 @@
1
1
  import { ReactNode } from "react";
2
- //#region src/components/LgOrUp.d.ts
3
2
  export interface LgOrUpProps {
4
3
  children?: ReactNode | ReactNode[];
5
4
  }
6
- export declare function LgOrUp(props: LgOrUpProps): import("react").JSX.Element | null;
7
- //#endregion
8
- //# sourceMappingURL=LgOrUp.d.ts.map
5
+ export declare function LgOrUp(props: LgOrUpProps): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"LgOrUp.js","names":["useMediaQuery","LgOrUp","props","theme","children","Fragment"],"sources":["../../src/components/LgOrUp.tsx"],"sourcesContent":["'use client';\n\nimport type { Theme } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport type { ReactNode } from 'react';\n\nexport interface LgOrUpProps {\n children?: ReactNode | ReactNode[];\n}\n\nexport function LgOrUp(props: LgOrUpProps) {\n const { children } = props;\n const matched = useMediaQuery((theme: Theme) => theme.breakpoints.up('lg'));\n if (!matched || !children) return null;\n return <>{children}</>;\n}\n"],"mappings":"8GAUA,SAAgBC,EAAO,EAAoB,CACzC,GAAM,CAAE,YAAaC,EAGrB,MADI,CADYF,EAAe,GAAiBG,EAAM,YAAY,GAAG,IAAI,CAC9D,GAAK,CAACC,EAAiB,KAC3B,kBAAAC,EAAA,CAAG,UAAW,CAAA,CACvB"}
1
+ {"version":3,"file":"LgOrUp.js","names":["Fragment","jsx","useMediaQuery","LgOrUp","props","children","theme"],"sources":["../../src/components/LgOrUp.tsx"],"sourcesContent":["'use client';\n\nimport type { Theme } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport type { ReactNode } from 'react';\n\nexport interface LgOrUpProps {\n children?: ReactNode | ReactNode[];\n}\n\nexport function LgOrUp(props: LgOrUpProps) {\n const { children } = props;\n const matched = useMediaQuery((theme: Theme) => theme.breakpoints.up('lg'));\n if (!matched || !children) return null;\n return <>{children}</>;\n}\n"],"mappings":"A,8GAUA,SAAgBG,EAAOC,EAAoB,CACzC,GAAM,CAAEC,YAAaD,EAGrB,MADI,CADYF,EAAeI,GAAiBA,EAAM,YAAY,GAAG,IAAI,CAC9D,GAAK,CAACD,EAAiB,KAC3BJ,kBAAAD,EAAA,CAAGK,UAAW,CAAA,CACvB,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"ListPagination.cjs","names":["Center","Pagination","require_runtime","require_Center","react_jsx_runtime","clsx","_mui_material_Pagination","ListPagination","paginationProps","hidden","count","offset","handleChange","onChange","muiPage","disableAutoScroll","className","sx","page"],"sources":["../../src/components/ListPagination.tsx"],"sourcesContent":["'use client';\n\nimport Pagination, { type PaginationProps } from '@mui/material/Pagination';\nimport clsx from 'clsx';\nimport { Center } from './Center.js';\n\nexport interface ListPaginationProps\n extends Omit<PaginationProps, 'page' | 'count' | 'onChange' | 'hidden' | 'ref'> {\n /**\n * 현재 페이지 번호입니다.\n * 기본은 MUI `Pagination`과 같은 1-based이며, `zeroBased`가 true이면 첫 페이지가 `0`입니다.\n */\n page: number;\n\n /** 전체 페이지 수입니다. */\n count: number;\n\n /**\n * 사용자가 페이지를 바꿨을 때 호출합니다.\n * 전달되는 번호의 기준은 `page`와 같습니다.\n */\n onChange?: (pageNumber: number) => void;\n\n /**\n * `page`와 `onChange`의 페이지 번호를 0-based로 다룰지 여부입니다.\n * 서버가 0-based 페이지 번호를 쓸 때 변환 코드를 반복하지 않도록 제공합니다.\n * @default false\n */\n zeroBased?: boolean;\n\n /**\n * 컴포넌트를 강제로 숨길지 여부입니다.\n * @default false\n */\n hidden?: boolean;\n\n /**\n * 페이지 이동 후 화면 상단으로 스크롤하는 동작을 막을지 여부입니다.\n * @default false\n */\n disableAutoScroll?: boolean;\n}\n\n/**\n * 목록 화면 하단에 쓰는 페이지네이션입니다.\n * MUI `Pagination`을 가운데 정렬하고 위아래 여백(`py: 1.5`)을 더합니다.\n *\n * @remarks\n * - `count`가 1 이하이면 아무것도 렌더링하지 않습니다.\n * - 페이지를 바꾸면 기본으로 `window.scrollTo`로 화면 상단으로 이동합니다.\n * - `className`과 `sx`는 바깥 래퍼에 적용되고, 나머지 props는 MUI `Pagination`에 전달됩니다.\n *\n * @example\n * ```tsx\n * <ListPagination page={page} count={totalPages} onChange={setPage} />\n *\n * // 서버가 0-based 페이지 번호를 쓸 때\n * <ListPagination zeroBased page={pageNumber} count={totalPages} onChange={setPageNumber} />\n * ```\n */\nexport const ListPagination = ({\n page,\n count,\n onChange,\n zeroBased = false,\n hidden = false,\n disableAutoScroll = false,\n className,\n sx,\n ...paginationProps\n}: ListPaginationProps) => {\n if (hidden) return null;\n\n // 페이지가 하나뿐이면 보여줄 필요가 없다\n if (count <= 1) return null;\n\n // MUI는 1-based이므로 0-based 입력은 렌더링 직전에 보정한다\n const offset = zeroBased ? 1 : 0;\n\n const handleChange = (_: React.ChangeEvent<unknown>, muiPage: number) => {\n onChange?.(muiPage - offset);\n\n // 목록 문맥을 유지하기 위해 이동 후 상단으로 스크롤한다\n if (!disableAutoScroll) {\n window.scrollTo({ top: 0, behavior: 'instant' });\n }\n };\n\n return (\n <Center\n className={clsx(className, 'ListPagination-root')}\n sx={[{ py: 1.5 }, ...(Array.isArray(sx) ? sx : [sx ?? false])]}\n >\n <Pagination\n {...paginationProps}\n page={page + offset}\n count={count}\n onChange={onChange ? handleChange : undefined}\n />\n </Center>\n );\n};\n\nListPagination.displayName = 'ListPagination';\n"],"mappings":"6NA4DA,MAAaO,GAAkB,CAC7B,OACA,QACA,WACA,YAAY,GACZ,SAAS,GACT,oBAAoB,GACpB,YACA,KACA,GAAGC,KACsB,CAIzB,GAHIC,GAGAC,GAAS,EAAG,OAAO,KAGvB,IAAMC,EAAS,KAETC,GAAgB,EAA+B,IAAoB,CACvEC,IAAWC,EAAUH,CAAM,EAGtBI,GACH,OAAO,SAAS,CAAE,IAAK,EAAG,SAAU,SAAU,CAAC,CAEnD,EAEA,MACE,iBAAA,EAAAX,EAAA,IAAA,CAACJ,EAAAA,OAAD,CACE,WAAA,EAAWK,EAAA,QAAA,CAAKW,EAAW,qBAAqB,EAChD,GAAI,CAAC,CAAE,GAAI,GAAI,EAAG,GAAI,MAAM,QAAQC,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAAE,EAE7D,SAAA,iBAAA,EAAAb,EAAA,IAAA,CAACH,EAAAA,QAAD,CACE,GAAIO,EACJ,KAAMU,EAAOP,EACN,QACP,SAAUE,EAAWD,EAAe,IAAA,EACrC,CAAA,CACK,CAAA,CAEZ,EAEA,EAAe,YAAc"}
1
+ {"version":3,"file":"ListPagination.cjs","names":["Center","clsx","Pagination","require_runtime","require_Center","react_jsx_runtime","clsx","_mui_material_Pagination","ListPagination","page","count","onChange","zeroBased","hidden","disableAutoScroll","className","sx","paginationProps","offset","handleChange","_","muiPage"],"sources":["../../src/components/ListPagination.tsx"],"sourcesContent":["'use client';\n\nimport Pagination, { type PaginationProps } from '@mui/material/Pagination';\nimport clsx from 'clsx';\nimport { Center } from './Center.js';\n\nexport interface ListPaginationProps\n extends Omit<PaginationProps, 'page' | 'count' | 'onChange' | 'hidden' | 'ref'> {\n /**\n * 현재 페이지 번호입니다.\n * 기본은 MUI `Pagination`과 같은 1-based이며, `zeroBased`가 true이면 첫 페이지가 `0`입니다.\n */\n page: number;\n\n /** 전체 페이지 수입니다. */\n count: number;\n\n /**\n * 사용자가 페이지를 바꿨을 때 호출합니다.\n * 전달되는 번호의 기준은 `page`와 같습니다.\n */\n onChange?: (pageNumber: number) => void;\n\n /**\n * `page`와 `onChange`의 페이지 번호를 0-based로 다룰지 여부입니다.\n * 서버가 0-based 페이지 번호를 쓸 때 변환 코드를 반복하지 않도록 제공합니다.\n * @default false\n */\n zeroBased?: boolean;\n\n /**\n * 컴포넌트를 강제로 숨길지 여부입니다.\n * @default false\n */\n hidden?: boolean;\n\n /**\n * 페이지 이동 후 화면 상단으로 스크롤하는 동작을 막을지 여부입니다.\n * @default false\n */\n disableAutoScroll?: boolean;\n}\n\n/**\n * 목록 화면 하단에 쓰는 페이지네이션입니다.\n * MUI `Pagination`을 가운데 정렬하고 위아래 여백(`py: 1.5`)을 더합니다.\n *\n * @remarks\n * - `count`가 1 이하이면 아무것도 렌더링하지 않습니다.\n * - 페이지를 바꾸면 기본으로 `window.scrollTo`로 화면 상단으로 이동합니다.\n * - `className`과 `sx`는 바깥 래퍼에 적용되고, 나머지 props는 MUI `Pagination`에 전달됩니다.\n *\n * @example\n * ```tsx\n * <ListPagination page={page} count={totalPages} onChange={setPage} />\n *\n * // 서버가 0-based 페이지 번호를 쓸 때\n * <ListPagination zeroBased page={pageNumber} count={totalPages} onChange={setPageNumber} />\n * ```\n */\nexport const ListPagination = ({\n page,\n count,\n onChange,\n zeroBased = false,\n hidden = false,\n disableAutoScroll = false,\n className,\n sx,\n ...paginationProps\n}: ListPaginationProps) => {\n if (hidden) return null;\n\n // 페이지가 하나뿐이면 보여줄 필요가 없다\n if (count <= 1) return null;\n\n // MUI는 1-based이므로 0-based 입력은 렌더링 직전에 보정한다\n const offset = zeroBased ? 1 : 0;\n\n const handleChange = (_: React.ChangeEvent<unknown>, muiPage: number) => {\n onChange?.(muiPage - offset);\n\n // 목록 문맥을 유지하기 위해 이동 후 상단으로 스크롤한다\n if (!disableAutoScroll) {\n window.scrollTo({ top: 0, behavior: 'instant' });\n }\n };\n\n return (\n <Center\n className={clsx(className, 'ListPagination-root')}\n sx={[{ py: 1.5 }, ...(Array.isArray(sx) ? sx : [sx ?? false])]}\n >\n <Pagination\n {...paginationProps}\n page={page + offset}\n count={count}\n onChange={onChange ? handleChange : undefined}\n />\n </Center>\n );\n};\n\nListPagination.displayName = 'ListPagination';\n"],"mappings":"A,6NA4DA,MAAaQ,GAAkB,CAC7BC,OACAC,QACAC,WACAC,YAAY,GACZC,SAAS,GACTC,oBAAoB,GACpBC,YACAC,KACA,GAAGC,KACsB,CAIzB,GAHIJ,GAGAH,GAAS,EAAG,OAAO,KAGvB,IAAMQ,EAASN,KAETO,GAAgBC,EAA+BC,IAAoB,CACvEV,IAAWU,EAAUH,CAAM,EAGtBJ,GACH,OAAO,SAAS,CAAE,IAAK,EAAG,SAAU,SAAU,CAAC,CAEnD,EAEA,MACE,iBAAA,EAAAT,EAAA,IAAA,CAACL,EAAAA,OAAD,CACE,WAAA,EAAWC,EAAAA,QAAAA,CAAKc,EAAW,qBAAqB,EAChD,GAAI,CAAC,CAAE,GAAI,GAAI,EAAG,GAAI,MAAM,QAAQC,CAAE,EAAIA,EAAK,CAACA,GAAM,EAAK,CAAE,EAE7D,SAAA,iBAAA,EAAAX,EAAA,IAAA,CAACH,EAAAA,QAAD,CACE,GAAIe,EACJ,KAAMR,EAAOS,EACNR,QACP,SAAUC,EAAWQ,EAAe,IAAA,EACrC,CAAA,CACK,CAAA,CAEZ,EAEAX,EAAe,YAAc,iB"}
@@ -1,5 +1,4 @@
1
1
  import { PaginationProps } from "@mui/material/Pagination";
2
- //#region src/components/ListPagination.d.ts
3
2
  export interface ListPaginationProps extends Omit<PaginationProps, 'page' | 'count' | 'onChange' | 'hidden' | 'ref'> {
4
3
  /**
5
4
  * 현재 페이지 번호입니다.
@@ -30,26 +29,7 @@ export interface ListPaginationProps extends Omit<PaginationProps, 'page' | 'cou
30
29
  */
31
30
  disableAutoScroll?: boolean;
32
31
  }
33
- /**
34
- * 목록 화면 하단에 쓰는 페이지네이션입니다.
35
- * MUI `Pagination`을 가운데 정렬하고 위아래 여백(`py: 1.5`)을 더합니다.
36
- *
37
- * @remarks
38
- * - `count`가 1 이하이면 아무것도 렌더링하지 않습니다.
39
- * - 페이지를 바꾸면 기본으로 `window.scrollTo`로 화면 상단으로 이동합니다.
40
- * - `className`과 `sx`는 바깥 래퍼에 적용되고, 나머지 props는 MUI `Pagination`에 전달됩니다.
41
- *
42
- * @example
43
- * ```tsx
44
- * <ListPagination page={page} count={totalPages} onChange={setPage} />
45
- *
46
- * // 서버가 0-based 페이지 번호를 쓸 때
47
- * <ListPagination zeroBased page={pageNumber} count={totalPages} onChange={setPageNumber} />
48
- * ```
49
- */
50
- export declare const ListPagination: {
51
- ({ page, count, onChange, zeroBased, hidden, disableAutoScroll, className, sx, ...paginationProps }: ListPaginationProps): import("react").JSX.Element | null;
52
- displayName: string;
53
- };
54
- //#endregion
55
- //# sourceMappingURL=ListPagination.d.cts.map
32
+ export declare function ListPagination({ page, count, onChange, zeroBased, hidden, disableAutoScroll, className, sx, ...paginationProps }: ListPaginationProps): import("react").JSX.Element | null;
33
+ export declare namespace ListPagination {
34
+ var displayName: string;
35
+ }
@@ -1,5 +1,4 @@
1
1
  import { PaginationProps } from "@mui/material/Pagination";
2
- //#region src/components/ListPagination.d.ts
3
2
  export interface ListPaginationProps extends Omit<PaginationProps, 'page' | 'count' | 'onChange' | 'hidden' | 'ref'> {
4
3
  /**
5
4
  * 현재 페이지 번호입니다.
@@ -30,26 +29,7 @@ export interface ListPaginationProps extends Omit<PaginationProps, 'page' | 'cou
30
29
  */
31
30
  disableAutoScroll?: boolean;
32
31
  }
33
- /**
34
- * 목록 화면 하단에 쓰는 페이지네이션입니다.
35
- * MUI `Pagination`을 가운데 정렬하고 위아래 여백(`py: 1.5`)을 더합니다.
36
- *
37
- * @remarks
38
- * - `count`가 1 이하이면 아무것도 렌더링하지 않습니다.
39
- * - 페이지를 바꾸면 기본으로 `window.scrollTo`로 화면 상단으로 이동합니다.
40
- * - `className`과 `sx`는 바깥 래퍼에 적용되고, 나머지 props는 MUI `Pagination`에 전달됩니다.
41
- *
42
- * @example
43
- * ```tsx
44
- * <ListPagination page={page} count={totalPages} onChange={setPage} />
45
- *
46
- * // 서버가 0-based 페이지 번호를 쓸 때
47
- * <ListPagination zeroBased page={pageNumber} count={totalPages} onChange={setPageNumber} />
48
- * ```
49
- */
50
- export declare const ListPagination: {
51
- ({ page, count, onChange, zeroBased, hidden, disableAutoScroll, className, sx, ...paginationProps }: ListPaginationProps): import("react").JSX.Element | null;
52
- displayName: string;
53
- };
54
- //#endregion
55
- //# sourceMappingURL=ListPagination.d.ts.map
32
+ export declare function ListPagination({ page, count, onChange, zeroBased, hidden, disableAutoScroll, className, sx, ...paginationProps }: ListPaginationProps): import("react").JSX.Element | null;
33
+ export declare namespace ListPagination {
34
+ var displayName: string;
35
+ }