@lobehub/ui 5.3.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/es/Accordion/Accordion.d.mts +2 -2
  2. package/es/Accordion/AccordionItem.d.mts +2 -2
  3. package/es/ActionIcon/ActionIcon.d.mts +2 -2
  4. package/es/Alert/Alert.d.mts +2 -2
  5. package/es/AutoComplete/Select.d.mts +2 -2
  6. package/es/Avatar/AvatarGroup/index.d.mts +2 -2
  7. package/es/Burger/Burger.d.mts +2 -2
  8. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  9. package/es/Collapse/Collapse.d.mts +2 -2
  10. package/es/ConfigProvider/index.d.mts +2 -2
  11. package/es/CopyButton/CopyButton.d.mts +2 -2
  12. package/es/DatePicker/DatePicker.d.mts +2 -2
  13. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  14. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  15. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  16. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  17. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  18. package/es/Drawer/Drawer.d.mts +2 -2
  19. package/es/Dropdown/Dropdown.d.mts +2 -2
  20. package/es/EditableText/EditableText.d.mts +2 -2
  21. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  22. package/es/EmojiPicker/EmojiPicker.mjs +1 -1
  23. package/es/EmojiPicker/type.d.mts +1 -1
  24. package/es/Flex/FlexBasic.d.mts +2 -2
  25. package/es/FontLoader/index.d.mts +2 -2
  26. package/es/Footer/Footer.d.mts +2 -2
  27. package/es/Form/components/FormGroup.d.mts +2 -2
  28. package/es/Form/components/FormItem.d.mts +2 -2
  29. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  30. package/es/FormModal/FormModal.d.mts +2 -2
  31. package/es/Freeze/Freeze.d.mts +2 -2
  32. package/es/GuideCard/GuideCard.d.mts +2 -2
  33. package/es/Header/Header.d.mts +2 -2
  34. package/es/Highlighter/Highlighter.d.mts +2 -2
  35. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  36. package/es/Hotkey/Hotkey.d.mts +2 -2
  37. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  38. package/es/HotkeyInput/HotkeyInput.mjs +30 -8
  39. package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
  40. package/es/HotkeyInput/type.d.mts +3 -0
  41. package/es/Icon/Icon.d.mts +2 -2
  42. package/es/Icon/components/IconProvider.d.mts +3 -3
  43. package/es/Image/PreviewGroup.d.mts +2 -2
  44. package/es/ImageSelect/ImageSelect.d.mts +2 -2
  45. package/es/Input/Input.d.mts +2 -2
  46. package/es/Input/InputNumber.d.mts +2 -2
  47. package/es/Input/InputOPT.d.mts +2 -2
  48. package/es/Input/InputPassword.d.mts +2 -2
  49. package/es/Input/TextArea.d.mts +2 -2
  50. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  51. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  52. package/es/Layout/components/LayoutMain.d.mts +2 -2
  53. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  54. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  55. package/es/Layout/components/LayoutToc.d.mts +2 -2
  56. package/es/List/ListItem/index.d.mts +2 -2
  57. package/es/Markdown/Markdown.d.mts +2 -2
  58. package/es/Markdown/Markdown.mjs +2 -1
  59. package/es/Markdown/Markdown.mjs.map +1 -1
  60. package/es/Markdown/SyntaxMarkdown/StreamdownRender.mjs +56 -30
  61. package/es/Markdown/SyntaxMarkdown/StreamdownRender.mjs.map +1 -1
  62. package/es/Markdown/SyntaxMarkdown/style.mjs +2 -2
  63. package/es/Markdown/SyntaxMarkdown/style.mjs.map +1 -1
  64. package/es/Markdown/SyntaxMarkdown/useSmoothStreamContent.mjs +229 -0
  65. package/es/Markdown/SyntaxMarkdown/useSmoothStreamContent.mjs.map +1 -0
  66. package/es/Markdown/SyntaxMarkdown/useStreamQueue.mjs +8 -6
  67. package/es/Markdown/SyntaxMarkdown/useStreamQueue.mjs.map +1 -1
  68. package/es/Markdown/Typography.d.mts +2 -2
  69. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  70. package/es/Markdown/index.d.mts +2 -2
  71. package/es/Markdown/plugins/rehypeStreamAnimated.d.mts +2 -0
  72. package/es/Markdown/plugins/rehypeStreamAnimated.mjs +17 -5
  73. package/es/Markdown/plugins/rehypeStreamAnimated.mjs.map +1 -1
  74. package/es/Markdown/type.d.mts +3 -1
  75. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  76. package/es/Menu/Menu.d.mts +2 -2
  77. package/es/Mermaid/Mermaid.d.mts +2 -2
  78. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  79. package/es/Modal/Modal.d.mts +2 -2
  80. package/es/Modal/ModalProvider.d.mts +2 -2
  81. package/es/Modal/ModalStackItem.mjs +2 -2
  82. package/es/Modal/ModalStackItem.mjs.map +1 -1
  83. package/es/Modal/imperative.d.mts +2 -2
  84. package/es/MotionProvider/index.d.mts +2 -2
  85. package/es/Popover/index.d.mts +9 -8
  86. package/es/Popover/index.mjs +6 -6
  87. package/es/SearchBar/SearchBar.d.mts +2 -2
  88. package/es/Segmented/Segmented.d.mts +2 -2
  89. package/es/Select/Select.d.mts +2 -2
  90. package/es/SideNav/SideNav.d.mts +2 -2
  91. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  92. package/es/SortableList/components/DragHandle.d.mts +2 -2
  93. package/es/SortableList/components/SortableItem.d.mts +2 -2
  94. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  95. package/es/Toc/Toc.d.mts +2 -2
  96. package/es/Video/index.d.mts +2 -2
  97. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  98. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  99. package/es/awesome/Features/Features.d.mts +2 -2
  100. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  101. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  102. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  103. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  104. package/es/awesome/Hero/Hero.d.mts +2 -2
  105. package/es/awesome/Spline/Spine.d.mts +2 -2
  106. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  107. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  108. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  109. package/es/base-ui/ContextMenu/ContextMenuHost.d.mts +2 -2
  110. package/es/base-ui/DropdownMenu/DropdownMenu.d.mts +2 -2
  111. package/es/base-ui/DropdownMenu/atoms.d.mts +18 -18
  112. package/es/base-ui/Modal/atoms.d.mts +12 -12
  113. package/es/base-ui/Modal/context.d.mts +2 -2
  114. package/es/base-ui/Modal/imperative.d.mts +2 -2
  115. package/es/base-ui/Popover/ArrowIcon.d.mts +7 -0
  116. package/es/{Popover → base-ui/Popover}/ArrowIcon.mjs +1 -1
  117. package/es/base-ui/Popover/ArrowIcon.mjs.map +1 -0
  118. package/es/{Popover → base-ui/Popover}/Popover.d.mts +2 -2
  119. package/es/{Popover → base-ui/Popover}/Popover.mjs +2 -2
  120. package/es/base-ui/Popover/Popover.mjs.map +1 -0
  121. package/es/{Popover → base-ui/Popover}/PopoverGroup.d.mts +1 -1
  122. package/es/{Popover → base-ui/Popover}/PopoverGroup.mjs +4 -4
  123. package/es/base-ui/Popover/PopoverGroup.mjs.map +1 -0
  124. package/es/{Popover → base-ui/Popover}/PopoverInGroup.mjs +3 -3
  125. package/es/base-ui/Popover/PopoverInGroup.mjs.map +1 -0
  126. package/es/{Popover → base-ui/Popover}/PopoverPortal.d.mts +1 -1
  127. package/es/{Popover → base-ui/Popover}/PopoverPortal.mjs +2 -2
  128. package/es/base-ui/Popover/PopoverPortal.mjs.map +1 -0
  129. package/es/{Popover → base-ui/Popover}/PopoverStandalone.mjs +5 -5
  130. package/es/base-ui/Popover/PopoverStandalone.mjs.map +1 -0
  131. package/es/{Popover → base-ui/Popover}/atoms.d.mts +10 -10
  132. package/es/{Popover → base-ui/Popover}/atoms.mjs +4 -4
  133. package/es/base-ui/Popover/atoms.mjs.map +1 -0
  134. package/es/{Popover → base-ui/Popover}/context.d.mts +3 -3
  135. package/es/{Popover → base-ui/Popover}/context.mjs +1 -1
  136. package/es/base-ui/Popover/context.mjs.map +1 -0
  137. package/es/{Popover → base-ui/Popover}/groupContext.d.mts +1 -1
  138. package/es/{Popover → base-ui/Popover}/groupContext.mjs +1 -1
  139. package/es/base-ui/Popover/groupContext.mjs.map +1 -0
  140. package/es/base-ui/Popover/index.d.mts +8 -0
  141. package/es/{Popover → base-ui/Popover}/style.mjs +2 -2
  142. package/es/base-ui/Popover/style.mjs.map +1 -0
  143. package/es/{Popover → base-ui/Popover}/type.d.mts +4 -4
  144. package/es/{Popover → base-ui/Popover}/useMergedPopoverProps.mjs +1 -1
  145. package/es/base-ui/Popover/useMergedPopoverProps.mjs.map +1 -0
  146. package/es/base-ui/ScrollArea/atoms.d.mts +7 -7
  147. package/es/base-ui/Select/Select.d.mts +2 -2
  148. package/es/base-ui/Select/atoms.d.mts +19 -19
  149. package/es/base-ui/Switch/Switch.d.mts +2 -2
  150. package/es/base-ui/Switch/atoms.d.mts +4 -4
  151. package/es/base-ui/Toast/imperative.d.mts +2 -2
  152. package/es/base-ui/index.d.mts +9 -1
  153. package/es/base-ui/index.mjs +7 -1
  154. package/es/brand/LobeChat/index.d.mts +2 -2
  155. package/es/brand/LobeHub/index.d.mts +2 -2
  156. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  157. package/es/brand/LogoThree/index.d.mts +2 -2
  158. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  159. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  160. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  161. package/es/chat/ChatList/ChatList.d.mts +2 -2
  162. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  163. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  164. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  165. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  166. package/es/color/ColorScales/index.d.mts +2 -2
  167. package/es/color/CssVar/index.d.mts +2 -2
  168. package/es/i18n/context.d.mts +2 -2
  169. package/es/i18n/resources/en/hotkey.d.mts +1 -0
  170. package/es/i18n/resources/en/hotkey.mjs +1 -0
  171. package/es/i18n/resources/en/hotkey.mjs.map +1 -1
  172. package/es/i18n/resources/zhCn/hotkey.d.mts +1 -0
  173. package/es/i18n/resources/zhCn/hotkey.mjs +1 -0
  174. package/es/i18n/resources/zhCn/hotkey.mjs.map +1 -1
  175. package/es/icons/Discord/components/Avatar.d.mts +9 -0
  176. package/es/icons/Discord/components/Avatar.mjs +22 -0
  177. package/es/icons/Discord/components/Avatar.mjs.map +1 -0
  178. package/es/icons/Discord/components/Color.d.mts +7 -0
  179. package/es/icons/Discord/components/Color.mjs +30 -0
  180. package/es/icons/Discord/components/Color.mjs.map +1 -0
  181. package/es/icons/Discord/components/Mono.d.mts +7 -0
  182. package/es/icons/Discord/components/Mono.mjs +29 -0
  183. package/es/icons/Discord/components/Mono.mjs.map +1 -0
  184. package/es/icons/Discord/index.d.mts +15 -0
  185. package/es/icons/Discord/index.mjs +18 -0
  186. package/es/icons/Discord/index.mjs.map +1 -0
  187. package/es/icons/Discord/style.mjs +7 -0
  188. package/es/icons/Discord/style.mjs.map +1 -0
  189. package/es/icons/GoogleChat/components/Avatar.d.mts +9 -0
  190. package/es/icons/GoogleChat/components/Avatar.mjs +23 -0
  191. package/es/icons/GoogleChat/components/Avatar.mjs.map +1 -0
  192. package/es/icons/GoogleChat/components/Color.d.mts +7 -0
  193. package/es/icons/GoogleChat/components/Color.mjs +93 -0
  194. package/es/icons/GoogleChat/components/Color.mjs.map +1 -0
  195. package/es/icons/GoogleChat/components/Mono.d.mts +7 -0
  196. package/es/icons/GoogleChat/components/Mono.mjs +29 -0
  197. package/es/icons/GoogleChat/components/Mono.mjs.map +1 -0
  198. package/es/icons/GoogleChat/index.d.mts +15 -0
  199. package/es/icons/GoogleChat/index.mjs +18 -0
  200. package/es/icons/GoogleChat/index.mjs.map +1 -0
  201. package/es/icons/GoogleChat/style.mjs +7 -0
  202. package/es/icons/GoogleChat/style.mjs.map +1 -0
  203. package/es/icons/IMessage/components/Avatar.d.mts +9 -0
  204. package/es/icons/IMessage/components/Avatar.mjs +23 -0
  205. package/es/icons/IMessage/components/Avatar.mjs.map +1 -0
  206. package/es/icons/IMessage/components/Color.d.mts +7 -0
  207. package/es/icons/IMessage/components/Color.mjs +30 -0
  208. package/es/icons/IMessage/components/Color.mjs.map +1 -0
  209. package/es/icons/IMessage/components/Inner.mjs +29 -0
  210. package/es/icons/IMessage/components/Inner.mjs.map +1 -0
  211. package/es/icons/IMessage/components/Mono.d.mts +7 -0
  212. package/es/icons/IMessage/components/Mono.mjs +29 -0
  213. package/es/icons/IMessage/components/Mono.mjs.map +1 -0
  214. package/es/icons/IMessage/index.d.mts +15 -0
  215. package/es/icons/IMessage/index.mjs +18 -0
  216. package/es/icons/IMessage/index.mjs.map +1 -0
  217. package/es/icons/IMessage/style.mjs +7 -0
  218. package/es/icons/IMessage/style.mjs.map +1 -0
  219. package/es/icons/Lark/components/Avatar.d.mts +9 -0
  220. package/es/icons/Lark/components/Avatar.mjs +22 -0
  221. package/es/icons/Lark/components/Avatar.mjs.map +1 -0
  222. package/es/icons/Lark/components/Color.d.mts +7 -0
  223. package/es/icons/Lark/components/Color.mjs +41 -0
  224. package/es/icons/Lark/components/Color.mjs.map +1 -0
  225. package/es/icons/Lark/components/Mono.d.mts +7 -0
  226. package/es/icons/Lark/components/Mono.mjs +32 -0
  227. package/es/icons/Lark/components/Mono.mjs.map +1 -0
  228. package/es/icons/Lark/index.d.mts +15 -0
  229. package/es/icons/Lark/index.mjs +18 -0
  230. package/es/icons/Lark/index.mjs.map +1 -0
  231. package/es/icons/Lark/style.mjs +7 -0
  232. package/es/icons/Lark/style.mjs.map +1 -0
  233. package/es/icons/MicrosoftTeams/components/Avatar.d.mts +9 -0
  234. package/es/icons/MicrosoftTeams/components/Avatar.mjs +22 -0
  235. package/es/icons/MicrosoftTeams/components/Avatar.mjs.map +1 -0
  236. package/es/icons/MicrosoftTeams/components/Color.d.mts +7 -0
  237. package/es/icons/MicrosoftTeams/components/Color.mjs +50 -0
  238. package/es/icons/MicrosoftTeams/components/Color.mjs.map +1 -0
  239. package/es/icons/MicrosoftTeams/components/Mono.d.mts +7 -0
  240. package/es/icons/MicrosoftTeams/components/Mono.mjs +37 -0
  241. package/es/icons/MicrosoftTeams/components/Mono.mjs.map +1 -0
  242. package/es/icons/MicrosoftTeams/index.d.mts +15 -0
  243. package/es/icons/MicrosoftTeams/index.mjs +18 -0
  244. package/es/icons/MicrosoftTeams/index.mjs.map +1 -0
  245. package/es/icons/MicrosoftTeams/style.mjs +7 -0
  246. package/es/icons/MicrosoftTeams/style.mjs.map +1 -0
  247. package/es/icons/QQ/components/Avatar.d.mts +9 -0
  248. package/es/icons/QQ/components/Avatar.mjs +22 -0
  249. package/es/icons/QQ/components/Avatar.mjs.map +1 -0
  250. package/es/icons/QQ/components/Color.d.mts +7 -0
  251. package/es/icons/QQ/components/Color.mjs +61 -0
  252. package/es/icons/QQ/components/Color.mjs.map +1 -0
  253. package/es/icons/QQ/components/Mono.d.mts +7 -0
  254. package/es/icons/QQ/components/Mono.mjs +29 -0
  255. package/es/icons/QQ/components/Mono.mjs.map +1 -0
  256. package/es/icons/QQ/index.d.mts +15 -0
  257. package/es/icons/QQ/index.mjs +18 -0
  258. package/es/icons/QQ/index.mjs.map +1 -0
  259. package/es/icons/QQ/style.mjs +7 -0
  260. package/es/icons/QQ/style.mjs.map +1 -0
  261. package/es/icons/Slack/components/Avatar.d.mts +9 -0
  262. package/es/icons/Slack/components/Avatar.mjs +22 -0
  263. package/es/icons/Slack/components/Avatar.mjs.map +1 -0
  264. package/es/icons/Slack/components/Color.d.mts +7 -0
  265. package/es/icons/Slack/components/Color.mjs +45 -0
  266. package/es/icons/Slack/components/Color.mjs.map +1 -0
  267. package/es/icons/Slack/components/Mono.d.mts +7 -0
  268. package/es/icons/Slack/components/Mono.mjs +35 -0
  269. package/es/icons/Slack/components/Mono.mjs.map +1 -0
  270. package/es/icons/Slack/index.d.mts +15 -0
  271. package/es/icons/Slack/index.mjs +18 -0
  272. package/es/icons/Slack/index.mjs.map +1 -0
  273. package/es/icons/Slack/style.mjs +7 -0
  274. package/es/icons/Slack/style.mjs.map +1 -0
  275. package/es/icons/Telegram/components/Avatar.d.mts +9 -0
  276. package/es/icons/Telegram/components/Avatar.mjs +23 -0
  277. package/es/icons/Telegram/components/Avatar.mjs.map +1 -0
  278. package/es/icons/Telegram/components/Color.d.mts +7 -0
  279. package/es/icons/Telegram/components/Color.mjs +30 -0
  280. package/es/icons/Telegram/components/Color.mjs.map +1 -0
  281. package/es/icons/Telegram/components/Inner.mjs +29 -0
  282. package/es/icons/Telegram/components/Inner.mjs.map +1 -0
  283. package/es/icons/Telegram/components/Mono.d.mts +7 -0
  284. package/es/icons/Telegram/components/Mono.mjs +29 -0
  285. package/es/icons/Telegram/components/Mono.mjs.map +1 -0
  286. package/es/icons/Telegram/index.d.mts +15 -0
  287. package/es/icons/Telegram/index.mjs +18 -0
  288. package/es/icons/Telegram/index.mjs.map +1 -0
  289. package/es/icons/Telegram/style.mjs +7 -0
  290. package/es/icons/Telegram/style.mjs.map +1 -0
  291. package/es/icons/WeChat/components/Avatar.d.mts +9 -0
  292. package/es/icons/WeChat/components/Avatar.mjs +22 -0
  293. package/es/icons/WeChat/components/Avatar.mjs.map +1 -0
  294. package/es/icons/WeChat/components/Color.d.mts +7 -0
  295. package/es/icons/WeChat/components/Color.mjs +30 -0
  296. package/es/icons/WeChat/components/Color.mjs.map +1 -0
  297. package/es/icons/WeChat/components/Mono.d.mts +7 -0
  298. package/es/icons/WeChat/components/Mono.mjs +29 -0
  299. package/es/icons/WeChat/components/Mono.mjs.map +1 -0
  300. package/es/icons/WeChat/index.d.mts +15 -0
  301. package/es/icons/WeChat/index.mjs +18 -0
  302. package/es/icons/WeChat/index.mjs.map +1 -0
  303. package/es/icons/WeChat/style.mjs +7 -0
  304. package/es/icons/WeChat/style.mjs.map +1 -0
  305. package/es/icons/WhatsApp/components/Avatar.d.mts +9 -0
  306. package/es/icons/WhatsApp/components/Avatar.mjs +23 -0
  307. package/es/icons/WhatsApp/components/Avatar.mjs.map +1 -0
  308. package/es/icons/WhatsApp/components/Color.d.mts +7 -0
  309. package/es/icons/WhatsApp/components/Color.mjs +30 -0
  310. package/es/icons/WhatsApp/components/Color.mjs.map +1 -0
  311. package/es/icons/WhatsApp/components/Mono.d.mts +7 -0
  312. package/es/icons/WhatsApp/components/Mono.mjs +29 -0
  313. package/es/icons/WhatsApp/components/Mono.mjs.map +1 -0
  314. package/es/icons/WhatsApp/index.d.mts +15 -0
  315. package/es/icons/WhatsApp/index.mjs +18 -0
  316. package/es/icons/WhatsApp/index.mjs.map +1 -0
  317. package/es/icons/WhatsApp/style.mjs +7 -0
  318. package/es/icons/WhatsApp/style.mjs.map +1 -0
  319. package/es/icons/index.d.mts +17 -5
  320. package/es/icons/index.mjs +13 -1
  321. package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
  322. package/es/icons/lucideExtra/BrainOffIcon.d.mts +8 -0
  323. package/es/icons/lucideExtra/BrainOffIcon.mjs +31 -0
  324. package/es/icons/lucideExtra/BrainOffIcon.mjs.map +1 -0
  325. package/es/icons/lucideExtra/CreateBotIcon.d.mts +3 -3
  326. package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
  327. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
  328. package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
  329. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  330. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  331. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  332. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  333. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  334. package/es/icons/lucideExtra/RightClickIcon.d.mts +2 -2
  335. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  336. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +2 -2
  337. package/es/icons/lucideExtra/SkillsIcon.d.mts +3 -3
  338. package/es/icons/lucideExtra/ThinkIcon.d.mts +8 -0
  339. package/es/icons/lucideExtra/ThinkIcon.mjs +16 -0
  340. package/es/icons/lucideExtra/ThinkIcon.mjs.map +1 -0
  341. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  342. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  343. package/es/icons/lucideExtra/index.d.mts +2 -0
  344. package/es/index.d.mts +7 -7
  345. package/es/index.mjs +6 -6
  346. package/es/mdx/Mdx/index.d.mts +2 -2
  347. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  348. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  349. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  350. package/es/storybook/StoryBook/index.d.mts +2 -2
  351. package/package.json +1 -1
  352. package/es/Popover/ArrowIcon.d.mts +0 -7
  353. package/es/Popover/ArrowIcon.mjs.map +0 -1
  354. package/es/Popover/Popover.mjs.map +0 -1
  355. package/es/Popover/PopoverGroup.mjs.map +0 -1
  356. package/es/Popover/PopoverInGroup.mjs.map +0 -1
  357. package/es/Popover/PopoverPortal.mjs.map +0 -1
  358. package/es/Popover/PopoverStandalone.mjs.map +0 -1
  359. package/es/Popover/atoms.mjs.map +0 -1
  360. package/es/Popover/context.mjs.map +0 -1
  361. package/es/Popover/groupContext.mjs.map +0 -1
  362. package/es/Popover/style.mjs.map +0 -1
  363. package/es/Popover/useMergedPopoverProps.mjs.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { AccordionProps } from "./type.mjs";
2
- import * as react14 from "react";
2
+ import * as react28 from "react";
3
3
 
4
4
  //#region src/Accordion/Accordion.d.ts
5
- declare const Accordion: react14.NamedExoticComponent<AccordionProps>;
5
+ declare const Accordion: react28.NamedExoticComponent<AccordionProps>;
6
6
  //#endregion
7
7
  export { Accordion };
8
8
  //# sourceMappingURL=Accordion.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { AccordionItemProps } from "./type.mjs";
2
- import * as react15 from "react";
2
+ import * as react29 from "react";
3
3
 
4
4
  //#region src/Accordion/AccordionItem.d.ts
5
- declare const AccordionItem: react15.NamedExoticComponent<AccordionItemProps>;
5
+ declare const AccordionItem: react29.NamedExoticComponent<AccordionItemProps>;
6
6
  //#endregion
7
7
  export { AccordionItem };
8
8
  //# sourceMappingURL=AccordionItem.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { ActionIconProps } from "./type.mjs";
2
- import * as react22 from "react";
2
+ import * as react65 from "react";
3
3
 
4
4
  //#region src/ActionIcon/ActionIcon.d.ts
5
- declare const ActionIcon: react22.NamedExoticComponent<ActionIconProps>;
5
+ declare const ActionIcon: react65.NamedExoticComponent<ActionIconProps>;
6
6
  //#endregion
7
7
  export { ActionIcon };
8
8
  //# sourceMappingURL=ActionIcon.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { AlertProps } from "./type.mjs";
2
- import * as react18 from "react";
2
+ import * as react3 from "react";
3
3
 
4
4
  //#region src/Alert/Alert.d.ts
5
- declare const Alert: react18.NamedExoticComponent<AlertProps>;
5
+ declare const Alert: react3.NamedExoticComponent<AlertProps>;
6
6
  //#endregion
7
7
  export { Alert };
8
8
  //# sourceMappingURL=Alert.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { AutoCompleteProps } from "./type.mjs";
2
- import * as react16 from "react";
2
+ import * as react27 from "react";
3
3
 
4
4
  //#region src/AutoComplete/Select.d.ts
5
- declare const AutoComplete: react16.NamedExoticComponent<AutoCompleteProps>;
5
+ declare const AutoComplete: react27.NamedExoticComponent<AutoCompleteProps>;
6
6
  //#endregion
7
7
  export { AutoComplete };
8
8
  //# sourceMappingURL=Select.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { AvatarGroupProps } from "../type.mjs";
2
- import * as react12 from "react";
2
+ import * as react25 from "react";
3
3
 
4
4
  //#region src/Avatar/AvatarGroup/index.d.ts
5
- declare const AvatarGroup: react12.NamedExoticComponent<AvatarGroupProps>;
5
+ declare const AvatarGroup: react25.NamedExoticComponent<AvatarGroupProps>;
6
6
  //#endregion
7
7
  export { AvatarGroup };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { BurgerProps } from "./type.mjs";
2
- import * as react11 from "react";
2
+ import * as react26 from "react";
3
3
 
4
4
  //#region src/Burger/Burger.d.ts
5
- declare const Burger: react11.NamedExoticComponent<BurgerProps>;
5
+ declare const Burger: react26.NamedExoticComponent<BurgerProps>;
6
6
  //#endregion
7
7
  export { Burger };
8
8
  //# sourceMappingURL=Burger.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { CodeEditorProps } from "./type.mjs";
2
- import * as react17 from "react";
2
+ import * as react22 from "react";
3
3
 
4
4
  //#region src/CodeEditor/CodeEditor.d.ts
5
- declare const CodeEditor: react17.NamedExoticComponent<CodeEditorProps>;
5
+ declare const CodeEditor: react22.NamedExoticComponent<CodeEditorProps>;
6
6
  //#endregion
7
7
  export { CodeEditor };
8
8
  //# sourceMappingURL=CodeEditor.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { CollapseProps } from "./type.mjs";
2
- import * as react13 from "react";
2
+ import * as react21 from "react";
3
3
 
4
4
  //#region src/Collapse/Collapse.d.ts
5
- declare const Collapse: react13.NamedExoticComponent<CollapseProps>;
5
+ declare const Collapse: react21.NamedExoticComponent<CollapseProps>;
6
6
  //#endregion
7
7
  export { Collapse };
8
8
  //# sourceMappingURL=Collapse.d.mts.map
@@ -1,7 +1,7 @@
1
1
  import { TranslationResourcesInput } from "../i18n/types.mjs";
2
2
  import { MotionComponentType } from "../MotionProvider/index.mjs";
3
3
  import { CDN, CdnApi } from "../utils/genCdnUrl.mjs";
4
- import * as react26 from "react";
4
+ import * as react69 from "react";
5
5
  import { ElementType, ReactNode } from "react";
6
6
 
7
7
  //#region src/ConfigProvider/index.d.ts
@@ -19,7 +19,7 @@ interface ConfigProviderProps {
19
19
  motion: MotionComponentType;
20
20
  resources?: TranslationResourcesInput;
21
21
  }
22
- declare const ConfigProvider: react26.NamedExoticComponent<ConfigProviderProps>;
22
+ declare const ConfigProvider: react69.NamedExoticComponent<ConfigProviderProps>;
23
23
  type CdnFn = ({
24
24
  pkg,
25
25
  version,
@@ -1,8 +1,8 @@
1
1
  import { CopyButtonProps } from "./type.mjs";
2
- import * as react10 from "react";
2
+ import * as react20 from "react";
3
3
 
4
4
  //#region src/CopyButton/CopyButton.d.ts
5
- declare const CopyButton: react10.NamedExoticComponent<CopyButtonProps>;
5
+ declare const CopyButton: react20.NamedExoticComponent<CopyButtonProps>;
6
6
  //#endregion
7
7
  export { CopyButton };
8
8
  //# sourceMappingURL=CopyButton.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { DatePickerProps } from "./type.mjs";
2
- import * as react9 from "react";
2
+ import * as react19 from "react";
3
3
 
4
4
  //#region src/DatePicker/DatePicker.d.ts
5
- declare const DatePicker: react9.NamedExoticComponent<DatePickerProps>;
5
+ declare const DatePicker: react19.NamedExoticComponent<DatePickerProps>;
6
6
  //#endregion
7
7
  export { DatePicker };
8
8
  //# sourceMappingURL=DatePicker.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
- import * as react5 from "react";
2
+ import * as react16 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelBody.d.ts
5
5
  type DraggablePanelBodyProps = DivProps;
6
- declare const DraggablePanelBody: react5.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelBody: react16.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { DraggablePanelBody, DraggablePanelBodyProps };
9
9
  //# sourceMappingURL=DraggablePanelBody.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
- import * as react6 from "react";
2
+ import * as react15 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelContainer.d.ts
5
5
  type DraggablePanelContainerProps = DivProps;
6
- declare const DraggablePanelContainer: react6.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelContainer: react15.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { DraggablePanelContainer, DraggablePanelContainerProps };
9
9
  //# sourceMappingURL=DraggablePanelContainer.d.mts.map
@@ -1,9 +1,9 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
- import * as react7 from "react";
2
+ import * as react17 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelFooter.d.ts
5
5
  type DraggablePanelFooterProps = DivProps;
6
- declare const DraggablePanelFooter: react7.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelFooter: react17.NamedExoticComponent<DivProps>;
7
7
  //#endregion
8
8
  export { DraggablePanelFooter, DraggablePanelFooterProps };
9
9
  //# sourceMappingURL=DraggablePanelFooter.d.mts.map
@@ -1,5 +1,5 @@
1
1
  import { DivProps } from "../../types/index.mjs";
2
- import * as react8 from "react";
2
+ import * as react18 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelHeader.d.ts
5
5
  interface DraggablePanelHeaderProps extends Omit<DivProps, 'children'> {
@@ -9,7 +9,7 @@ interface DraggablePanelHeaderProps extends Omit<DivProps, 'children'> {
9
9
  setPin?: (pin: boolean) => void;
10
10
  title?: string;
11
11
  }
12
- declare const DraggablePanelHeader: react8.NamedExoticComponent<DraggablePanelHeaderProps>;
12
+ declare const DraggablePanelHeader: react18.NamedExoticComponent<DraggablePanelHeaderProps>;
13
13
  //#endregion
14
14
  export { DraggablePanelHeader, DraggablePanelHeaderProps };
15
15
  //# sourceMappingURL=DraggablePanelHeader.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { DraggableSideNavProps } from "./type.mjs";
2
- import * as react3 from "react";
2
+ import * as react14 from "react";
3
3
 
4
4
  //#region src/DraggableSideNav/DraggableSideNav.d.ts
5
- declare const DraggableSideNav: react3.NamedExoticComponent<DraggableSideNavProps>;
5
+ declare const DraggableSideNav: react14.NamedExoticComponent<DraggableSideNavProps>;
6
6
  //#endregion
7
7
  export { DraggableSideNav };
8
8
  //# sourceMappingURL=DraggableSideNav.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { DrawerProps } from "./type.mjs";
2
- import * as react4 from "react";
2
+ import * as react12 from "react";
3
3
 
4
4
  //#region src/Drawer/Drawer.d.ts
5
- declare const Drawer: react4.NamedExoticComponent<DrawerProps>;
5
+ declare const Drawer: react12.NamedExoticComponent<DrawerProps>;
6
6
  //#endregion
7
7
  export { Drawer };
8
8
  //# sourceMappingURL=Drawer.d.mts.map
@@ -1,5 +1,5 @@
1
1
  import { DropdownProps } from "./type.mjs";
2
- import * as react2 from "react";
2
+ import * as react13 from "react";
3
3
 
4
4
  //#region src/Dropdown/Dropdown.d.ts
5
5
 
@@ -9,7 +9,7 @@ import * as react2 from "react";
9
9
  * @see https://ui.lobehub.com/components/context-menu
10
10
  * @see https://ui.lobehub.com/components/dropdown-menu
11
11
  */
12
- declare const Dropdown: react2.NamedExoticComponent<DropdownProps>;
12
+ declare const Dropdown: react13.NamedExoticComponent<DropdownProps>;
13
13
  //#endregion
14
14
  export { Dropdown };
15
15
  //# sourceMappingURL=Dropdown.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { EditableTextProps } from "./type.mjs";
2
- import * as react0 from "react";
2
+ import * as react11 from "react";
3
3
 
4
4
  //#region src/EditableText/EditableText.d.ts
5
- declare const EditableText: react0.NamedExoticComponent<EditableTextProps>;
5
+ declare const EditableText: react11.NamedExoticComponent<EditableTextProps>;
6
6
  //#endregion
7
7
  export { EditableText };
8
8
  //# sourceMappingURL=EditableText.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { EmojiPickerProps } from "./type.mjs";
2
- import * as react1 from "react";
2
+ import * as react10 from "react";
3
3
 
4
4
  //#region src/EmojiPicker/EmojiPicker.d.ts
5
- declare const EmojiPicker: react1.NamedExoticComponent<EmojiPickerProps>;
5
+ declare const EmojiPicker: react10.NamedExoticComponent<EmojiPickerProps>;
6
6
  //#endregion
7
7
  export { EmojiPicker };
8
8
  //# sourceMappingURL=EmojiPicker.d.mts.map
@@ -7,7 +7,7 @@ import ActionIcon_default from "../ActionIcon/ActionIcon.mjs";
7
7
  import Avatar_default from "../Avatar/index.mjs";
8
8
  import { useTranslation } from "../i18n/useTranslation.mjs";
9
9
  import emojiPicker_default from "../i18n/resources/en/emojiPicker.mjs";
10
- import Popover_default from "../Popover/Popover.mjs";
10
+ import Popover_default from "../base-ui/Popover/Popover.mjs";
11
11
  import Tabs_default from "../Tabs/Tabs.mjs";
12
12
  import AvatarUploader_default from "./AvatarUploader.mjs";
13
13
  import { styles } from "./style.mjs";
@@ -1,6 +1,6 @@
1
1
  import { FlexboxProps } from "../Flex/type.mjs";
2
2
  import { AvatarProps } from "../Avatar/type.mjs";
3
- import { PopoverProps } from "../Popover/type.mjs";
3
+ import { PopoverProps } from "../base-ui/Popover/type.mjs";
4
4
  import "../Popover/index.mjs";
5
5
  import { CSSProperties, ReactNode } from "react";
6
6
 
@@ -1,8 +1,8 @@
1
1
  import { FlexBasicProps } from "./type.mjs";
2
- import * as react79 from "react";
2
+ import * as react57 from "react";
3
3
 
4
4
  //#region src/Flex/FlexBasic.d.ts
5
- declare const _default: react79.NamedExoticComponent<FlexBasicProps>;
5
+ declare const _default: react57.NamedExoticComponent<FlexBasicProps>;
6
6
  //#endregion
7
7
  export { _default };
8
8
  //# sourceMappingURL=FlexBasic.d.mts.map
@@ -1,10 +1,10 @@
1
- import * as react29 from "react";
1
+ import * as react72 from "react";
2
2
 
3
3
  //#region src/FontLoader/index.d.ts
4
4
  interface FontLoaderProps {
5
5
  url: string;
6
6
  }
7
- declare const FontLoader: react29.NamedExoticComponent<FontLoaderProps>;
7
+ declare const FontLoader: react72.NamedExoticComponent<FontLoaderProps>;
8
8
  //#endregion
9
9
  export { FontLoader, FontLoaderProps };
10
10
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FooterProps } from "./type.mjs";
2
- import * as react78 from "react";
2
+ import * as react9 from "react";
3
3
 
4
4
  //#region src/Footer/Footer.d.ts
5
- declare const Footer: react78.NamedExoticComponent<FooterProps>;
5
+ declare const Footer: react9.NamedExoticComponent<FooterProps>;
6
6
  //#endregion
7
7
  export { Footer };
8
8
  //# sourceMappingURL=Footer.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormGroupProps } from "../type.mjs";
2
- import * as react74 from "react";
2
+ import * as react7 from "react";
3
3
 
4
4
  //#region src/Form/components/FormGroup.d.ts
5
- declare const FormGroup: react74.NamedExoticComponent<FormGroupProps>;
5
+ declare const FormGroup: react7.NamedExoticComponent<FormGroupProps>;
6
6
  //#endregion
7
7
  export { FormGroup };
8
8
  //# sourceMappingURL=FormGroup.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormItemProps } from "../type.mjs";
2
- import * as react75 from "react";
2
+ import * as react5 from "react";
3
3
 
4
4
  //#region src/Form/components/FormItem.d.ts
5
- declare const FormItem: react75.NamedExoticComponent<FormItemProps>;
5
+ declare const FormItem: react5.NamedExoticComponent<FormItemProps>;
6
6
  //#endregion
7
7
  export { FormItem };
8
8
  //# sourceMappingURL=FormItem.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormSubmitFooterProps } from "../type.mjs";
2
- import * as react76 from "react";
2
+ import * as react6 from "react";
3
3
 
4
4
  //#region src/Form/components/FormSubmitFooter.d.ts
5
- declare const FormSubmitFooter: react76.NamedExoticComponent<FormSubmitFooterProps>;
5
+ declare const FormSubmitFooter: react6.NamedExoticComponent<FormSubmitFooterProps>;
6
6
  //#endregion
7
7
  export { FormSubmitFooter };
8
8
  //# sourceMappingURL=FormSubmitFooter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FormModalProps } from "./type.mjs";
2
- import * as react77 from "react";
2
+ import * as react8 from "react";
3
3
 
4
4
  //#region src/FormModal/FormModal.d.ts
5
- declare const FormModal: react77.NamedExoticComponent<FormModalProps>;
5
+ declare const FormModal: react8.NamedExoticComponent<FormModalProps>;
6
6
  //#endregion
7
7
  export { FormModal };
8
8
  //# sourceMappingURL=FormModal.d.mts.map
@@ -1,12 +1,12 @@
1
1
  import { FreezeProps } from "./type.mjs";
2
- import * as react_jsx_runtime19 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/Freeze/Freeze.d.ts
5
5
  declare const Freeze: {
6
6
  ({
7
7
  frozen,
8
8
  children
9
- }: FreezeProps): react_jsx_runtime19.JSX.Element;
9
+ }: FreezeProps): react_jsx_runtime0.JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { GuideCardProps } from "./type.mjs";
2
- import * as react120 from "react";
2
+ import * as react154 from "react";
3
3
 
4
4
  //#region src/GuideCard/GuideCard.d.ts
5
- declare const GuideCard: react120.NamedExoticComponent<GuideCardProps>;
5
+ declare const GuideCard: react154.NamedExoticComponent<GuideCardProps>;
6
6
  //#endregion
7
7
  export { GuideCard };
8
8
  //# sourceMappingURL=GuideCard.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HeaderProps } from "./type.mjs";
2
- import * as react0 from "react";
2
+ import * as react66 from "react";
3
3
 
4
4
  //#region src/Header/Header.d.ts
5
- declare const Header: react0.NamedExoticComponent<HeaderProps>;
5
+ declare const Header: react66.NamedExoticComponent<HeaderProps>;
6
6
  //#endregion
7
7
  export { Header };
8
8
  //# sourceMappingURL=Header.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HighlighterProps } from "./type.mjs";
2
- import * as react71 from "react";
2
+ import * as react35 from "react";
3
3
 
4
4
  //#region src/Highlighter/Highlighter.d.ts
5
- declare const Highlighter: react71.NamedExoticComponent<HighlighterProps>;
5
+ declare const Highlighter: react35.NamedExoticComponent<HighlighterProps>;
6
6
  //#endregion
7
7
  export { Highlighter };
8
8
  //# sourceMappingURL=Highlighter.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { SyntaxHighlighterProps } from "../type.mjs";
2
- import * as react72 from "react";
2
+ import * as react34 from "react";
3
3
 
4
4
  //#region src/Highlighter/SyntaxHighlighter/index.d.ts
5
- declare const SyntaxHighlighter: react72.NamedExoticComponent<SyntaxHighlighterProps>;
5
+ declare const SyntaxHighlighter: react34.NamedExoticComponent<SyntaxHighlighterProps>;
6
6
  //#endregion
7
7
  export { SyntaxHighlighter };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HotkeyProps } from "./type.mjs";
2
- import * as react73 from "react";
2
+ import * as react48 from "react";
3
3
 
4
4
  //#region src/Hotkey/Hotkey.d.ts
5
- declare const Hotkey: react73.NamedExoticComponent<HotkeyProps>;
5
+ declare const Hotkey: react48.NamedExoticComponent<HotkeyProps>;
6
6
  //#endregion
7
7
  export { Hotkey };
8
8
  //# sourceMappingURL=Hotkey.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { HotkeyInputProps } from "./type.mjs";
2
- import * as react70 from "react";
2
+ import * as react46 from "react";
3
3
 
4
4
  //#region src/HotkeyInput/HotkeyInput.d.ts
5
- declare const HotkeyInput: react70.NamedExoticComponent<HotkeyInputProps>;
5
+ declare const HotkeyInput: react46.NamedExoticComponent<HotkeyInputProps>;
6
6
  //#endregion
7
7
  export { HotkeyInput };
8
8
  //# sourceMappingURL=HotkeyInput.d.mts.map
@@ -12,11 +12,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
12
12
  import { cx, useThemeMode } from "antd-style";
13
13
  import useMergeState from "use-merge-value";
14
14
  import { isEqual } from "es-toolkit/compat";
15
- import { Undo2Icon } from "lucide-react";
15
+ import { Undo2Icon, XIcon } from "lucide-react";
16
16
  import { useHotkeys, useRecordHotkeys } from "react-hotkeys-hook";
17
17
 
18
18
  //#region src/HotkeyInput/HotkeyInput.tsx
19
- const HotkeyInput = memo(({ value = "", defaultValue = "", resetValue = "", onChange, onConflict, placeholder, disabled, shadow, allowReset = true, style, className, hotkeyConflicts = [], variant, texts, isApple, onBlur, onReset, onFocus }) => {
19
+ const HotkeyInput = memo(({ value = "", defaultValue = "", resetValue = "", onChange, onClear, onConflict, placeholder, disabled, shadow, allowClear, allowReset = true, style, className, hotkeyConflicts = [], variant, texts, isApple, onBlur, onReset, onFocus }) => {
20
20
  const [isFocused, setIsFocused] = useState(false);
21
21
  const [hasConflict, setHasConflict] = useState(false);
22
22
  const [hasInvalidCombination, setHasInvalidCombination] = useState(false);
@@ -106,6 +106,17 @@ const HotkeyInput = memo(({ value = "", defaultValue = "", resetValue = "", onCh
106
106
  stop();
107
107
  onBlur?.(e);
108
108
  };
109
+ const handleClear = (e) => {
110
+ e.preventDefault();
111
+ e.stopPropagation();
112
+ setHotkeyValue?.("");
113
+ resetKeys();
114
+ setHasConflict(false);
115
+ setHasInvalidCombination(false);
116
+ setIsFocused(false);
117
+ stop();
118
+ onClear?.(hotkeyValue);
119
+ };
109
120
  const handleReset = (e) => {
110
121
  e.preventDefault();
111
122
  e.stopPropagation();
@@ -125,6 +136,7 @@ const HotkeyInput = memo(({ value = "", defaultValue = "", resetValue = "", onCh
125
136
  };
126
137
  const placeholderText = placeholder ?? t("hotkey.placeholder");
127
138
  const resetTitle = texts?.reset ?? t("hotkey.reset");
139
+ const clearTitle = texts?.clear ?? t("hotkey.clear");
128
140
  const conflictText = texts?.conflicts ?? t("hotkey.conflict");
129
141
  const invalidText = texts?.invalidCombination ?? t("hotkey.invalidCombination");
130
142
  return /* @__PURE__ */ jsxs(FlexBasic_default, {
@@ -167,12 +179,22 @@ const HotkeyInput = memo(({ value = "", defaultValue = "", resetValue = "", onCh
167
179
  onBlur: handleBlur,
168
180
  onFocus: handleFocus
169
181
  }),
170
- !isFocused && allowReset && hotkeyValue && hotkeyValue !== resetValue && !disabled && /* @__PURE__ */ jsx(ActionIcon_default, {
171
- icon: Undo2Icon,
172
- size: "small",
173
- title: resetTitle,
174
- variant: "filled",
175
- onClick: handleReset
182
+ !isFocused && hotkeyValue && !disabled && (allowReset || allowClear) && /* @__PURE__ */ jsxs(FlexBasic_default, {
183
+ horizontal: true,
184
+ gap: 4,
185
+ children: [allowReset && hotkeyValue !== resetValue && /* @__PURE__ */ jsx(ActionIcon_default, {
186
+ icon: Undo2Icon,
187
+ size: "small",
188
+ title: resetTitle,
189
+ variant: "filled",
190
+ onClick: handleReset
191
+ }), allowClear && /* @__PURE__ */ jsx(ActionIcon_default, {
192
+ icon: XIcon,
193
+ size: "small",
194
+ title: clearTitle,
195
+ variant: "filled",
196
+ onClick: handleClear
197
+ })]
176
198
  })
177
199
  ]
178
200
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"HotkeyInput.mjs","names":["hotkeyMessages","useControlledState","modifiers: string[]","normalKeys: string[]","normalizedKey: any","Flexbox","Hotkey","ActionIcon"],"sources":["../../src/HotkeyInput/HotkeyInput.tsx"],"sourcesContent":["'use client';\n\nimport { type InputRef } from 'antd';\nimport { cx, useThemeMode } from 'antd-style';\nimport { isEqual } from 'es-toolkit/compat';\nimport { Undo2Icon } from 'lucide-react';\nimport {\n type FocusEvent,\n memo,\n type MouseEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useHotkeys, useRecordHotkeys } from 'react-hotkeys-hook';\nimport useControlledState from 'use-merge-value';\n\nimport ActionIcon from '@/ActionIcon';\nimport { Flexbox } from '@/Flex';\nimport Hotkey from '@/Hotkey';\nimport { checkIsAppleDevice, NORMATIVE_MODIFIER, splitKeysByPlus } from '@/Hotkey/utils';\nimport hotkeyMessages from '@/i18n/resources/en/hotkey';\nimport { useTranslation } from '@/i18n/useTranslation';\n\nimport { styles, variants } from './style';\nimport { type HotkeyInputProps } from './type';\n\nconst HotkeyInput = memo<HotkeyInputProps>(\n ({\n value = '',\n defaultValue = '',\n resetValue = '',\n onChange,\n onConflict,\n placeholder,\n disabled,\n shadow,\n allowReset = true,\n style,\n className,\n hotkeyConflicts = [],\n variant,\n texts,\n isApple,\n onBlur,\n onReset,\n onFocus,\n }) => {\n const [isFocused, setIsFocused] = useState(false);\n const [hasConflict, setHasConflict] = useState(false);\n const [hasInvalidCombination, setHasInvalidCombination] = useState(false);\n const inputRef = useRef<InputRef>(null);\n const { isDarkMode } = useThemeMode();\n const { t } = useTranslation(hotkeyMessages);\n const isAppleDevice = useMemo(() => checkIsAppleDevice(isApple), [isApple]);\n const [hotkeyValue, setHotkeyValue] = useControlledState(defaultValue, {\n defaultValue,\n onChange,\n value,\n });\n\n // 使用 useRecordHotkeys 处理快捷键录入\n const [recordedKeys, { start, stop, isRecording, resetKeys }] = useRecordHotkeys();\n\n useHotkeys(\n '*',\n () => {\n inputRef.current?.blur();\n },\n {\n enableOnContentEditable: true,\n enableOnFormTags: true,\n enabled: isRecording && !disabled,\n keydown: false,\n keyup: true,\n preventDefault: true,\n },\n );\n\n // 处理按键,保证格式正确:修饰键在前,最多一个非修饰键在后\n const formatKeys = useCallback((keysSet: Set<string>) => {\n const modifiers: string[] = [];\n const normalKeys: string[] = [];\n\n for (const key of keysSet) {\n // 处理不同表示的修饰键\n const normalizedKey: any = key.toLowerCase();\n if (NORMATIVE_MODIFIER.includes(normalizedKey)) {\n // 统一修饰键表示\n if (\n (!isAppleDevice && normalizedKey === 'ctrl') ||\n (isAppleDevice && normalizedKey === 'meta')\n ) {\n if (!modifiers.includes('mod')) modifiers.push('mod');\n } else if (!modifiers.includes(normalizedKey)) {\n modifiers.push(normalizedKey);\n }\n } else {\n normalKeys.push(key);\n }\n }\n\n // 至少需要一个修饰键\n if (modifiers.length === 0 && normalKeys.length > 0) {\n return { isValid: false, keys: [] };\n }\n\n // 只允许一个非修饰键,如果有多个,只保留最后一个\n const finalKey = normalKeys.length > 0 ? [normalKeys.at(-1)] : [];\n const shortcuts = [modifiers, finalKey];\n\n return {\n // 组合必须包含至少一个按键\n isValid: shortcuts.every((k) => k.length > 0),\n keys: shortcuts.flat(),\n };\n }, []);\n\n // 获取格式化后的按键字符串\n const { isValid, keys } = formatKeys(recordedKeys);\n const keysString = keys.join('+');\n\n // 检查快捷键冲突\n const checkHotkeyConflict = useCallback(\n (newHotkey: string): boolean => {\n return hotkeyConflicts\n .filter((conflictKey) => conflictKey !== resetValue)\n .some((conflictKey) => {\n const newKeys = splitKeysByPlus(newHotkey);\n const conflictKeys = splitKeysByPlus(conflictKey);\n return isEqual(newKeys, conflictKeys);\n });\n },\n [hotkeyConflicts],\n );\n\n // 当按键组合完成时处理结果\n useEffect(() => {\n if (recordedKeys.size > 0 && !isRecording) {\n if (!isValid) {\n setHasInvalidCombination(true);\n setHasConflict(false);\n return;\n }\n\n setHasInvalidCombination(false);\n const newKeysString = keysString;\n\n // 检查冲突\n const conflict = checkHotkeyConflict(newKeysString);\n if (conflict) {\n setHasConflict(true);\n onConflict?.(newKeysString);\n } else {\n setHasConflict(false);\n setHotkeyValue?.(newKeysString);\n }\n }\n }, [\n recordedKeys,\n isRecording,\n isValid,\n keysString,\n checkHotkeyConflict,\n setHotkeyValue,\n onConflict,\n ]);\n\n // 处理输入框焦点\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n if (disabled) return;\n setIsFocused(true);\n setHasConflict(false);\n setHasInvalidCombination(false);\n start(); // 开始记录\n onFocus?.(e);\n };\n\n const handleBlur = (e: FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n stop(); // 停止记录\n onBlur?.(e);\n };\n\n // 重置功能\n const handleReset = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setHotkeyValue?.(resetValue);\n resetKeys();\n setHasConflict(false);\n setHasInvalidCombination(false);\n setIsFocused(false);\n stop(); // 停止记录\n onReset?.(hotkeyValue, resetValue);\n };\n\n const handleClick = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (disabled || isFocused) return;\n inputRef.current?.focus();\n };\n\n const placeholderText = placeholder ?? t('hotkey.placeholder');\n const resetTitle = texts?.reset ?? t('hotkey.reset');\n const conflictText = texts?.conflicts ?? t('hotkey.conflict');\n const invalidText = texts?.invalidCombination ?? t('hotkey.invalidCombination');\n\n return (\n <Flexbox\n className={className}\n gap={8}\n style={{\n position: 'relative',\n ...style,\n }}\n >\n <Flexbox\n horizontal\n align={'center'}\n justify={'space-between'}\n className={cx(\n variants({\n disabled,\n error: hasConflict || hasInvalidCombination,\n focused: isFocused,\n shadow,\n variant: variant || (isDarkMode ? 'filled' : 'outlined'),\n }),\n )}\n onClick={handleClick}\n >\n <div style={{ pointerEvents: 'none' }}>\n {isRecording ? (\n <span className={styles.placeholder}>\n {keys.length > 0 ? <Hotkey keys={keysString} /> : placeholderText}\n </span>\n ) : hotkeyValue ? (\n <Hotkey keys={hotkeyValue} />\n ) : (\n <span className={styles.placeholder}>{placeholderText}</span>\n )}\n </div>\n\n {/* 隐藏的输入框,用于接收焦点 */}\n <input\n readOnly\n className={styles.hiddenInput}\n disabled={disabled}\n ref={inputRef as any}\n style={{ pointerEvents: 'none' }}\n onBlur={handleBlur}\n onFocus={handleFocus}\n />\n\n {!isFocused && allowReset && hotkeyValue && hotkeyValue !== resetValue && !disabled && (\n <ActionIcon\n icon={Undo2Icon}\n size={'small'}\n title={resetTitle}\n variant={'filled'}\n onClick={handleReset}\n />\n )}\n </Flexbox>\n {hasConflict && <div className={styles.errorText}>{conflictText}</div>}\n {hasInvalidCombination && <div className={styles.errorText}>{invalidText}</div>}\n </Flexbox>\n );\n },\n);\n\nHotkeyInput.displayName = 'HotkeyInput';\n\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AAa,WAAW;;CAGpC,MAAM,eAAe,MAAkB;AACrC,IAAE,gBAAgB;AAClB,IAAE,iBAAiB;AACnB,MAAI,YAAY,UAAW;AAC3B,WAAS,SAAS,OAAO;;CAG3B,MAAM,kBAAkB,eAAe,EAAE,qBAAqB;CAC9D,MAAM,aAAa,OAAO,SAAS,EAAE,eAAe;CACpD,MAAM,eAAe,OAAO,aAAa,EAAE,kBAAkB;CAC7D,MAAM,cAAc,OAAO,sBAAsB,EAAE,4BAA4B;AAE/E,QACE,qBAACC;EACY;EACX,KAAK;EACL,OAAO;GACL,UAAU;GACV,GAAG;GACJ;;GAED,qBAACA;IACC;IACA,OAAO;IACP,SAAS;IACT,WAAW,GACT,SAAS;KACP;KACA,OAAO,eAAe;KACtB,SAAS;KACT;KACA,SAAS,YAAY,aAAa,WAAW;KAC9C,CAAC,CACH;IACD,SAAS;;KAET,oBAAC;MAAI,OAAO,EAAE,eAAe,QAAQ;gBAClC,cACC,oBAAC;OAAK,WAAW,OAAO;iBACrB,KAAK,SAAS,IAAI,oBAACC,kBAAO,MAAM,aAAc,GAAG;QAC7C,GACL,cACF,oBAACA,kBAAO,MAAM,cAAe,GAE7B,oBAAC;OAAK,WAAW,OAAO;iBAAc;QAAuB;OAE3D;KAGN,oBAAC;MACC;MACA,WAAW,OAAO;MACR;MACV,KAAK;MACL,OAAO,EAAE,eAAe,QAAQ;MAChC,QAAQ;MACR,SAAS;OACT;KAED,CAAC,aAAa,cAAc,eAAe,gBAAgB,cAAc,CAAC,YACzE,oBAACC;MACC,MAAM;MACN,MAAM;MACN,OAAO;MACP,SAAS;MACT,SAAS;OACT;;KAEI;GACT,eAAe,oBAAC;IAAI,WAAW,OAAO;cAAY;KAAmB;GACrE,yBAAyB,oBAAC;IAAI,WAAW,OAAO;cAAY;KAAkB;;GACvE;EAGf;AAED,YAAY,cAAc;AAE1B,0BAAe"}
1
+ {"version":3,"file":"HotkeyInput.mjs","names":["hotkeyMessages","useControlledState","modifiers: string[]","normalKeys: string[]","normalizedKey: any","Flexbox","Hotkey","ActionIcon"],"sources":["../../src/HotkeyInput/HotkeyInput.tsx"],"sourcesContent":["'use client';\n\nimport { type InputRef } from 'antd';\nimport { cx, useThemeMode } from 'antd-style';\nimport { isEqual } from 'es-toolkit/compat';\nimport { Undo2Icon, XIcon } from 'lucide-react';\nimport {\n type FocusEvent,\n memo,\n type MouseEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useHotkeys, useRecordHotkeys } from 'react-hotkeys-hook';\nimport useControlledState from 'use-merge-value';\n\nimport ActionIcon from '@/ActionIcon';\nimport { Flexbox } from '@/Flex';\nimport Hotkey from '@/Hotkey';\nimport { checkIsAppleDevice, NORMATIVE_MODIFIER, splitKeysByPlus } from '@/Hotkey/utils';\nimport hotkeyMessages from '@/i18n/resources/en/hotkey';\nimport { useTranslation } from '@/i18n/useTranslation';\n\nimport { styles, variants } from './style';\nimport { type HotkeyInputProps } from './type';\n\nconst HotkeyInput = memo<HotkeyInputProps>(\n ({\n value = '',\n defaultValue = '',\n resetValue = '',\n onChange,\n onClear,\n onConflict,\n placeholder,\n disabled,\n shadow,\n allowClear,\n allowReset = true,\n style,\n className,\n hotkeyConflicts = [],\n variant,\n texts,\n isApple,\n onBlur,\n onReset,\n onFocus,\n }) => {\n const [isFocused, setIsFocused] = useState(false);\n const [hasConflict, setHasConflict] = useState(false);\n const [hasInvalidCombination, setHasInvalidCombination] = useState(false);\n const inputRef = useRef<InputRef>(null);\n const { isDarkMode } = useThemeMode();\n const { t } = useTranslation(hotkeyMessages);\n const isAppleDevice = useMemo(() => checkIsAppleDevice(isApple), [isApple]);\n const [hotkeyValue, setHotkeyValue] = useControlledState(defaultValue, {\n defaultValue,\n onChange,\n value,\n });\n\n // 使用 useRecordHotkeys 处理快捷键录入\n const [recordedKeys, { start, stop, isRecording, resetKeys }] = useRecordHotkeys();\n\n useHotkeys(\n '*',\n () => {\n inputRef.current?.blur();\n },\n {\n enableOnContentEditable: true,\n enableOnFormTags: true,\n enabled: isRecording && !disabled,\n keydown: false,\n keyup: true,\n preventDefault: true,\n },\n );\n\n // 处理按键,保证格式正确:修饰键在前,最多一个非修饰键在后\n const formatKeys = useCallback((keysSet: Set<string>) => {\n const modifiers: string[] = [];\n const normalKeys: string[] = [];\n\n for (const key of keysSet) {\n // 处理不同表示的修饰键\n const normalizedKey: any = key.toLowerCase();\n if (NORMATIVE_MODIFIER.includes(normalizedKey)) {\n // 统一修饰键表示\n if (\n (!isAppleDevice && normalizedKey === 'ctrl') ||\n (isAppleDevice && normalizedKey === 'meta')\n ) {\n if (!modifiers.includes('mod')) modifiers.push('mod');\n } else if (!modifiers.includes(normalizedKey)) {\n modifiers.push(normalizedKey);\n }\n } else {\n normalKeys.push(key);\n }\n }\n\n // 至少需要一个修饰键\n if (modifiers.length === 0 && normalKeys.length > 0) {\n return { isValid: false, keys: [] };\n }\n\n // 只允许一个非修饰键,如果有多个,只保留最后一个\n const finalKey = normalKeys.length > 0 ? [normalKeys.at(-1)] : [];\n const shortcuts = [modifiers, finalKey];\n\n return {\n // 组合必须包含至少一个按键\n isValid: shortcuts.every((k) => k.length > 0),\n keys: shortcuts.flat(),\n };\n }, []);\n\n // 获取格式化后的按键字符串\n const { isValid, keys } = formatKeys(recordedKeys);\n const keysString = keys.join('+');\n\n // 检查快捷键冲突\n const checkHotkeyConflict = useCallback(\n (newHotkey: string): boolean => {\n return hotkeyConflicts\n .filter((conflictKey) => conflictKey !== resetValue)\n .some((conflictKey) => {\n const newKeys = splitKeysByPlus(newHotkey);\n const conflictKeys = splitKeysByPlus(conflictKey);\n return isEqual(newKeys, conflictKeys);\n });\n },\n [hotkeyConflicts],\n );\n\n // 当按键组合完成时处理结果\n useEffect(() => {\n if (recordedKeys.size > 0 && !isRecording) {\n if (!isValid) {\n setHasInvalidCombination(true);\n setHasConflict(false);\n return;\n }\n\n setHasInvalidCombination(false);\n const newKeysString = keysString;\n\n // 检查冲突\n const conflict = checkHotkeyConflict(newKeysString);\n if (conflict) {\n setHasConflict(true);\n onConflict?.(newKeysString);\n } else {\n setHasConflict(false);\n setHotkeyValue?.(newKeysString);\n }\n }\n }, [\n recordedKeys,\n isRecording,\n isValid,\n keysString,\n checkHotkeyConflict,\n setHotkeyValue,\n onConflict,\n ]);\n\n // 处理输入框焦点\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n if (disabled) return;\n setIsFocused(true);\n setHasConflict(false);\n setHasInvalidCombination(false);\n start(); // 开始记录\n onFocus?.(e);\n };\n\n const handleBlur = (e: FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n stop(); // 停止记录\n onBlur?.(e);\n };\n\n const handleClear = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setHotkeyValue?.('');\n resetKeys();\n setHasConflict(false);\n setHasInvalidCombination(false);\n setIsFocused(false);\n stop();\n onClear?.(hotkeyValue);\n };\n\n // 重置功能\n const handleReset = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setHotkeyValue?.(resetValue);\n resetKeys();\n setHasConflict(false);\n setHasInvalidCombination(false);\n setIsFocused(false);\n stop(); // 停止记录\n onReset?.(hotkeyValue, resetValue);\n };\n\n const handleClick = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (disabled || isFocused) return;\n inputRef.current?.focus();\n };\n\n const placeholderText = placeholder ?? t('hotkey.placeholder');\n const resetTitle = texts?.reset ?? t('hotkey.reset');\n const clearTitle = texts?.clear ?? t('hotkey.clear');\n const conflictText = texts?.conflicts ?? t('hotkey.conflict');\n const invalidText = texts?.invalidCombination ?? t('hotkey.invalidCombination');\n\n return (\n <Flexbox\n className={className}\n gap={8}\n style={{\n position: 'relative',\n ...style,\n }}\n >\n <Flexbox\n horizontal\n align={'center'}\n justify={'space-between'}\n className={cx(\n variants({\n disabled,\n error: hasConflict || hasInvalidCombination,\n focused: isFocused,\n shadow,\n variant: variant || (isDarkMode ? 'filled' : 'outlined'),\n }),\n )}\n onClick={handleClick}\n >\n <div style={{ pointerEvents: 'none' }}>\n {isRecording ? (\n <span className={styles.placeholder}>\n {keys.length > 0 ? <Hotkey keys={keysString} /> : placeholderText}\n </span>\n ) : hotkeyValue ? (\n <Hotkey keys={hotkeyValue} />\n ) : (\n <span className={styles.placeholder}>{placeholderText}</span>\n )}\n </div>\n\n {/* 隐藏的输入框,用于接收焦点 */}\n <input\n readOnly\n className={styles.hiddenInput}\n disabled={disabled}\n ref={inputRef as any}\n style={{ pointerEvents: 'none' }}\n onBlur={handleBlur}\n onFocus={handleFocus}\n />\n\n {!isFocused && hotkeyValue && !disabled && (allowReset || allowClear) && (\n <Flexbox horizontal gap={4}>\n {allowReset && hotkeyValue !== resetValue && (\n <ActionIcon\n icon={Undo2Icon}\n size={'small'}\n title={resetTitle}\n variant={'filled'}\n onClick={handleReset}\n />\n )}\n {allowClear && (\n <ActionIcon\n icon={XIcon}\n size={'small'}\n title={clearTitle}\n variant={'filled'}\n onClick={handleClear}\n />\n )}\n </Flexbox>\n )}\n </Flexbox>\n {hasConflict && <div className={styles.errorText}>{conflictText}</div>}\n {hasInvalidCombination && <div className={styles.errorText}>{invalidText}</div>}\n </Flexbox>\n );\n },\n);\n\nHotkeyInput.displayName = 'HotkeyInput';\n\nexport default HotkeyInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,MAAM,cAAc,MACjB,EACC,QAAQ,IACR,eAAe,IACf,aAAa,IACb,UACA,SACA,YACA,aACA,UACA,QACA,YACA,aAAa,MACb,OACA,WACA,kBAAkB,EAAE,EACpB,SACA,OACA,SACA,QACA,SACA,cACI;CACJ,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CACjD,MAAM,CAAC,aAAa,kBAAkB,SAAS,MAAM;CACrD,MAAM,CAAC,uBAAuB,4BAA4B,SAAS,MAAM;CACzE,MAAM,WAAW,OAAiB,KAAK;CACvC,MAAM,EAAE,eAAe,cAAc;CACrC,MAAM,EAAE,MAAM,eAAeA,eAAe;C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AAe;CACpD,MAAM,eAAe,OAAO,aAAa,EAAE,kBAAkB;CAC7D,MAAM,cAAc,OAAO,sBAAsB,EAAE,4BAA4B;AAE/E,QACE,qBAACC;EACY;EACX,KAAK;EACL,OAAO;GACL,UAAU;GACV,GAAG;GACJ;;GAED,qBAACA;IACC;IACA,OAAO;IACP,SAAS;IACT,WAAW,GACT,SAAS;KACP;KACA,OAAO,eAAe;KACtB,SAAS;KACT;KACA,SAAS,YAAY,aAAa,WAAW;KAC9C,CAAC,CACH;IACD,SAAS;;KAET,oBAAC;MAAI,OAAO,EAAE,eAAe,QAAQ;gBAClC,cACC,oBAAC;OAAK,WAAW,OAAO;iBACrB,KAAK,SAAS,IAAI,oBAACC,kBAAO,MAAM,aAAc,GAAG;QAC7C,GACL,cACF,oBAACA,kBAAO,MAAM,cAAe,GAE7B,oBAAC;OAAK,WAAW,OAAO;iBAAc;QAAuB;OAE3D;KAGN,oBAAC;MACC;MACA,WAAW,OAAO;MACR;MACV,KAAK;MACL,OAAO,EAAE,eAAe,QAAQ;MAChC,QAAQ;MACR,SAAS;OACT;KAED,CAAC,aAAa,eAAe,CAAC,aAAa,cAAc,eACxD,qBAACD;MAAQ;MAAW,KAAK;iBACtB,cAAc,gBAAgB,cAC7B,oBAACE;OACC,MAAM;OACN,MAAM;OACN,OAAO;OACP,SAAS;OACT,SAAS;QACT,EAEH,cACC,oBAACA;OACC,MAAM;OACN,MAAM;OACN,OAAO;OACP,SAAS;OACT,SAAS;QACT;OAEI;;KAEJ;GACT,eAAe,oBAAC;IAAI,WAAW,OAAO;cAAY;KAAmB;GACrE,yBAAyB,oBAAC;IAAI,WAAW,OAAO;cAAY;KAAkB;;GACvE;EAGf;AAED,YAAY,cAAc;AAE1B,0BAAe"}
@@ -3,6 +3,7 @@ import { InputProps } from "antd";
3
3
 
4
4
  //#region src/HotkeyInput/type.d.ts
5
5
  interface HotkeyInputProps {
6
+ allowClear?: boolean;
6
7
  allowReset?: boolean;
7
8
  className?: string;
8
9
  defaultValue?: string;
@@ -11,6 +12,7 @@ interface HotkeyInputProps {
11
12
  isApple?: boolean;
12
13
  onBlur?: InputProps['onBlur'];
13
14
  onChange?: (value: string) => void;
15
+ onClear?: (currentValue: string) => void;
14
16
  onConflict?: (conflictKey: string) => void;
15
17
  onFocus?: InputProps['onFocus'];
16
18
  onReset?: (currentValue: string, resetValue: string) => void;
@@ -19,6 +21,7 @@ interface HotkeyInputProps {
19
21
  shadow?: boolean;
20
22
  style?: CSSProperties;
21
23
  texts?: {
24
+ clear?: string;
22
25
  conflicts?: string;
23
26
  invalidCombination?: string;
24
27
  reset?: string;