@lobehub/ui 4.22.0 → 4.23.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 (152) hide show
  1. package/es/Accordion/Accordion.d.mts +2 -2
  2. package/es/Accordion/AccordionItem.d.mts +2 -2
  3. package/es/Accordion/style.mjs +0 -5
  4. package/es/Accordion/style.mjs.map +1 -1
  5. package/es/ActionIcon/ActionIcon.d.mts +2 -2
  6. package/es/Alert/Alert.d.mts +2 -2
  7. package/es/AutoComplete/Select.d.mts +2 -2
  8. package/es/Avatar/AvatarGroup/index.d.mts +2 -2
  9. package/es/Burger/Burger.d.mts +2 -2
  10. package/es/CodeDiff/CodeDiff.d.mts +2 -2
  11. package/es/CodeDiff/PatchDiff.d.mts +2 -2
  12. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  13. package/es/Collapse/Collapse.d.mts +2 -2
  14. package/es/ConfigProvider/index.d.mts +2 -2
  15. package/es/ContextMenu/ContextMenuHost.d.mts +2 -2
  16. package/es/CopyButton/CopyButton.d.mts +2 -2
  17. package/es/DatePicker/DatePicker.d.mts +2 -2
  18. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  19. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  20. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  21. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  22. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  23. package/es/Drawer/Drawer.d.mts +2 -2
  24. package/es/Dropdown/Dropdown.d.mts +2 -2
  25. package/es/DropdownMenu/DropdownMenu.d.mts +2 -2
  26. package/es/DropdownMenu/atoms.d.mts +16 -16
  27. package/es/EditableText/EditableText.d.mts +2 -2
  28. package/es/EditorSlashMenu/EditorSlashMenu.d.mts +51 -0
  29. package/es/EditorSlashMenu/EditorSlashMenu.mjs +99 -0
  30. package/es/EditorSlashMenu/EditorSlashMenu.mjs.map +1 -0
  31. package/es/EditorSlashMenu/MenuItemRenderer.mjs +42 -0
  32. package/es/EditorSlashMenu/MenuItemRenderer.mjs.map +1 -0
  33. package/es/EditorSlashMenu/atoms.d.mts +114 -0
  34. package/es/EditorSlashMenu/atoms.mjs +113 -0
  35. package/es/EditorSlashMenu/atoms.mjs.map +1 -0
  36. package/es/EditorSlashMenu/index.d.mts +4 -0
  37. package/es/EditorSlashMenu/index.d.ts +1 -0
  38. package/es/EditorSlashMenu/index.js +1 -0
  39. package/es/EditorSlashMenu/index.mjs +6 -0
  40. package/es/EditorSlashMenu/style.mjs +30 -0
  41. package/es/EditorSlashMenu/style.mjs.map +1 -0
  42. package/es/EditorSlashMenu/type.d.mts +37 -0
  43. package/es/EditorSlashMenu/useKeyboardNavigation.mjs +51 -0
  44. package/es/EditorSlashMenu/useKeyboardNavigation.mjs.map +1 -0
  45. package/es/EditorSlashMenu/useNormalizedItems.mjs +37 -0
  46. package/es/EditorSlashMenu/useNormalizedItems.mjs.map +1 -0
  47. package/es/EditorSlashMenu/utils.mjs +13 -0
  48. package/es/EditorSlashMenu/utils.mjs.map +1 -0
  49. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  50. package/es/Flex/FlexBasic.d.mts +2 -2
  51. package/es/FontLoader/index.d.mts +2 -2
  52. package/es/Footer/Footer.d.mts +2 -2
  53. package/es/Form/components/FormGroup.d.mts +2 -2
  54. package/es/Form/components/FormItem.d.mts +2 -2
  55. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  56. package/es/FormModal/FormModal.d.mts +2 -2
  57. package/es/GuideCard/GuideCard.d.mts +2 -2
  58. package/es/Header/Header.d.mts +2 -2
  59. package/es/Highlighter/Highlighter.d.mts +2 -2
  60. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  61. package/es/Hotkey/Hotkey.d.mts +2 -2
  62. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  63. package/es/Icon/Icon.d.mts +2 -2
  64. package/es/Icon/components/IconProvider.d.mts +3 -3
  65. package/es/Image/PreviewGroup.d.mts +2 -2
  66. package/es/ImageSelect/ImageSelect.d.mts +2 -2
  67. package/es/Input/Input.d.mts +2 -2
  68. package/es/Input/InputNumber.d.mts +2 -2
  69. package/es/Input/InputOPT.d.mts +2 -2
  70. package/es/Input/InputPassword.d.mts +2 -2
  71. package/es/Input/TextArea.d.mts +2 -2
  72. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  73. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  74. package/es/Layout/components/LayoutMain.d.mts +2 -2
  75. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  76. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  77. package/es/Layout/components/LayoutToc.d.mts +2 -2
  78. package/es/List/ListItem/index.d.mts +2 -2
  79. package/es/LobeSelect/LobeSelect.d.mts +2 -2
  80. package/es/LobeSelect/atoms.d.mts +3 -3
  81. package/es/Markdown/Markdown.d.mts +2 -2
  82. package/es/Markdown/Typography.d.mts +2 -2
  83. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  84. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  85. package/es/Menu/Menu.d.mts +2 -2
  86. package/es/Mermaid/Mermaid.d.mts +2 -2
  87. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  88. package/es/Modal/Modal.d.mts +2 -2
  89. package/es/Modal/ModalProvider.d.mts +2 -2
  90. package/es/Modal/imperative.d.mts +2 -2
  91. package/es/MotionProvider/index.d.mts +2 -2
  92. package/es/Popover/ArrowIcon.d.mts +2 -2
  93. package/es/Popover/atoms.d.mts +9 -9
  94. package/es/Popover/context.d.mts +2 -2
  95. package/es/SearchBar/SearchBar.d.mts +2 -2
  96. package/es/Segmented/Segmented.d.mts +2 -2
  97. package/es/Select/Select.d.mts +2 -2
  98. package/es/SideNav/SideNav.d.mts +2 -2
  99. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  100. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  101. package/es/Toast/imperative.d.mts +3 -3
  102. package/es/Toc/Toc.d.mts +2 -2
  103. package/es/Tooltip/TooltipInGroup.mjs +23 -17
  104. package/es/Tooltip/TooltipInGroup.mjs.map +1 -1
  105. package/es/Video/index.d.mts +2 -2
  106. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  107. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  108. package/es/awesome/Features/Features.d.mts +2 -2
  109. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  110. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  111. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  112. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  113. package/es/awesome/Hero/Hero.d.mts +2 -2
  114. package/es/awesome/Spline/Spine.d.mts +2 -2
  115. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  116. package/es/brand/LobeChat/index.d.mts +2 -2
  117. package/es/brand/LobeHub/index.d.mts +2 -2
  118. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  119. package/es/brand/LogoThree/index.d.mts +2 -2
  120. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  121. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  122. package/es/chat/ChatList/ChatList.d.mts +2 -2
  123. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  124. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  125. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  126. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  127. package/es/color/ColorScales/index.d.mts +2 -2
  128. package/es/color/CssVar/index.d.mts +2 -2
  129. package/es/i18n/context.d.mts +2 -2
  130. package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
  131. package/es/icons/lucideExtra/CreateBotIcon.d.mts +2 -2
  132. package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
  133. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +2 -2
  134. package/es/icons/lucideExtra/GroupBotIcon.d.mts +2 -2
  135. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  136. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  137. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  138. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  139. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  140. package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
  141. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  142. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
  143. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  144. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  145. package/es/index.d.mts +5 -1
  146. package/es/index.mjs +2 -1
  147. package/es/mdx/Mdx/index.d.mts +2 -2
  148. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  149. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  150. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  151. package/es/storybook/StoryBook/index.d.mts +2 -2
  152. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import { AccordionProps } from "./type.mjs";
2
- import * as react61 from "react";
2
+ import * as react72 from "react";
3
3
 
4
4
  //#region src/Accordion/Accordion.d.ts
5
- declare const Accordion: react61.NamedExoticComponent<AccordionProps>;
5
+ declare const Accordion: react72.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 react62 from "react";
2
+ import * as react73 from "react";
3
3
 
4
4
  //#region src/Accordion/AccordionItem.d.ts
5
- declare const AccordionItem: react62.NamedExoticComponent<AccordionItemProps>;
5
+ declare const AccordionItem: react73.NamedExoticComponent<AccordionItemProps>;
6
6
  //#endregion
7
7
  export { AccordionItem };
8
8
  //# sourceMappingURL=AccordionItem.d.mts.map
@@ -4,11 +4,7 @@ import { createStaticStyles } from "antd-style";
4
4
  const styles = createStaticStyles(({ css: css$1, cssVar: cssVar$1 }) => {
5
5
  return {
6
6
  action: css$1`
7
- width: 0;
8
7
  opacity: 0;
9
- transition:
10
- opacity,
11
- width 0.2s ${cssVar$1.motionEaseOut};
12
8
  `,
13
9
  base: css$1`
14
10
  display: flex;
@@ -26,7 +22,6 @@ const styles = createStaticStyles(({ css: css$1, cssVar: cssVar$1 }) => {
26
22
  `,
27
23
  header: css$1`
28
24
  &:hover .accordion-action {
29
- width: auto;
30
25
  opacity: 1;
31
26
  }
32
27
 
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":["cssVar"],"sources":["../../src/Accordion/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => {\n return {\n action: css`\n width: 0;\n opacity: 0;\n transition:\n opacity,\n width 0.2s ${cssVar.motionEaseOut};\n `,\n base: css`\n display: flex;\n flex-direction: column;\n width: 100%;\n `,\n content: css`\n overflow: hidden;\n `,\n contentInner: css`\n /* Content wrapper for animation */\n `,\n divider: css`\n margin-block: 0;\n `,\n header: css`\n &:hover .accordion-action {\n width: auto;\n opacity: 1;\n }\n\n &:focus-visible {\n border-radius: ${cssVar.borderRadiusLG};\n outline: 2px solid ${cssVar.colorPrimary};\n outline-offset: 2px;\n }\n `,\n icon: css`\n transition: transform 200ms ${cssVar.motionEaseOut};\n `,\n iconRotate: css`\n transform: rotate(90deg);\n `,\n indicator: css`\n display: flex;\n flex-shrink: 0;\n align-items: center;\n\n font-size: 18px;\n color: ${cssVar.colorTextDescription};\n\n transition: transform 200ms ${cssVar.motionEaseOut};\n `,\n item: css`\n position: relative;\n display: flex;\n flex-direction: column;\n `,\n titleWrapper: css`\n user-select: none;\n `,\n };\n});\n"],"mappings":";;;AAEA,MAAa,SAAS,oBAAoB,EAAE,YAAK,uBAAa;AAC5D,QAAO;EACL,QAAQ,KAAG;;;;;qBAKMA,SAAO,cAAc;;EAEtC,MAAM,KAAG;;;;;EAKT,SAAS,KAAG;;;EAGZ,cAAc,KAAG;;;EAGjB,SAAS,KAAG;;;EAGZ,QAAQ,KAAG;;;;;;;yBAOUA,SAAO,eAAe;6BAClBA,SAAO,aAAa;;;;EAI7C,MAAM,KAAG;oCACuBA,SAAO,cAAc;;EAErD,YAAY,KAAG;;;EAGf,WAAW,KAAG;;;;;;eAMHA,SAAO,qBAAqB;;oCAEPA,SAAO,cAAc;;EAErD,MAAM,KAAG;;;;;EAKT,cAAc,KAAG;;;EAGlB;EACD"}
1
+ {"version":3,"file":"style.mjs","names":["cssVar"],"sources":["../../src/Accordion/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => {\n return {\n action: css`\n opacity: 0;\n `,\n base: css`\n display: flex;\n flex-direction: column;\n width: 100%;\n `,\n content: css`\n overflow: hidden;\n `,\n contentInner: css`\n /* Content wrapper for animation */\n `,\n divider: css`\n margin-block: 0;\n `,\n header: css`\n &:hover .accordion-action {\n opacity: 1;\n }\n\n &:focus-visible {\n border-radius: ${cssVar.borderRadiusLG};\n outline: 2px solid ${cssVar.colorPrimary};\n outline-offset: 2px;\n }\n `,\n icon: css`\n transition: transform 200ms ${cssVar.motionEaseOut};\n `,\n iconRotate: css`\n transform: rotate(90deg);\n `,\n indicator: css`\n display: flex;\n flex-shrink: 0;\n align-items: center;\n\n font-size: 18px;\n color: ${cssVar.colorTextDescription};\n\n transition: transform 200ms ${cssVar.motionEaseOut};\n `,\n item: css`\n position: relative;\n display: flex;\n flex-direction: column;\n `,\n titleWrapper: css`\n user-select: none;\n `,\n };\n});\n"],"mappings":";;;AAEA,MAAa,SAAS,oBAAoB,EAAE,YAAK,uBAAa;AAC5D,QAAO;EACL,QAAQ,KAAG;;;EAGX,MAAM,KAAG;;;;;EAKT,SAAS,KAAG;;;EAGZ,cAAc,KAAG;;;EAGjB,SAAS,KAAG;;;EAGZ,QAAQ,KAAG;;;;;;yBAMUA,SAAO,eAAe;6BAClBA,SAAO,aAAa;;;;EAI7C,MAAM,KAAG;oCACuBA,SAAO,cAAc;;EAErD,YAAY,KAAG;;;EAGf,WAAW,KAAG;;;;;;eAMHA,SAAO,qBAAqB;;oCAEPA,SAAO,cAAc;;EAErD,MAAM,KAAG;;;;;EAKT,cAAc,KAAG;;;EAGlB;EACD"}
@@ -1,8 +1,8 @@
1
1
  import { ActionIconProps } from "./type.mjs";
2
- import * as react59 from "react";
2
+ import * as react83 from "react";
3
3
 
4
4
  //#region src/ActionIcon/ActionIcon.d.ts
5
- declare const ActionIcon: react59.NamedExoticComponent<ActionIconProps>;
5
+ declare const ActionIcon: react83.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 react70 from "react";
2
+ import * as react51 from "react";
3
3
 
4
4
  //#region src/Alert/Alert.d.ts
5
- declare const Alert: react70.NamedExoticComponent<AlertProps>;
5
+ declare const Alert: react51.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 react69 from "react";
2
+ import * as react52 from "react";
3
3
 
4
4
  //#region src/AutoComplete/Select.d.ts
5
- declare const AutoComplete: react69.NamedExoticComponent<AutoCompleteProps>;
5
+ declare const AutoComplete: react52.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 react68 from "react";
2
+ import * as react50 from "react";
3
3
 
4
4
  //#region src/Avatar/AvatarGroup/index.d.ts
5
- declare const AvatarGroup: react68.NamedExoticComponent<AvatarGroupProps>;
5
+ declare const AvatarGroup: react50.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 react67 from "react";
2
+ import * as react81 from "react";
3
3
 
4
4
  //#region src/Burger/Burger.d.ts
5
- declare const Burger: react67.NamedExoticComponent<BurgerProps>;
5
+ declare const Burger: react81.NamedExoticComponent<BurgerProps>;
6
6
  //#endregion
7
7
  export { Burger };
8
8
  //# sourceMappingURL=Burger.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { CodeDiffProps } from "./type.mjs";
2
- import * as react64 from "react";
2
+ import * as react47 from "react";
3
3
 
4
4
  //#region src/CodeDiff/CodeDiff.d.ts
5
- declare const CodeDiff: react64.NamedExoticComponent<CodeDiffProps>;
5
+ declare const CodeDiff: react47.NamedExoticComponent<CodeDiffProps>;
6
6
  //#endregion
7
7
  export { CodeDiff };
8
8
  //# sourceMappingURL=CodeDiff.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { PatchDiffProps } from "./type.mjs";
2
- import * as react65 from "react";
2
+ import * as react48 from "react";
3
3
 
4
4
  //#region src/CodeDiff/PatchDiff.d.ts
5
- declare const PatchDiff: react65.NamedExoticComponent<PatchDiffProps>;
5
+ declare const PatchDiff: react48.NamedExoticComponent<PatchDiffProps>;
6
6
  //#endregion
7
7
  export { PatchDiff };
8
8
  //# sourceMappingURL=PatchDiff.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { CodeEditorProps } from "./type.mjs";
2
- import * as react66 from "react";
2
+ import * as react46 from "react";
3
3
 
4
4
  //#region src/CodeEditor/CodeEditor.d.ts
5
- declare const CodeEditor: react66.NamedExoticComponent<CodeEditorProps>;
5
+ declare const CodeEditor: react46.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 react60 from "react";
2
+ import * as react45 from "react";
3
3
 
4
4
  //#region src/Collapse/Collapse.d.ts
5
- declare const Collapse: react60.NamedExoticComponent<CollapseProps>;
5
+ declare const Collapse: react45.NamedExoticComponent<CollapseProps>;
6
6
  //#endregion
7
7
  export { Collapse };
8
8
  //# sourceMappingURL=Collapse.d.mts.map
@@ -1,7 +1,7 @@
1
1
  import { MotionComponentType } from "../MotionProvider/index.mjs";
2
2
  import { TranslationResourcesInput } from "../i18n/types.mjs";
3
3
  import { CDN, CdnApi } from "../utils/genCdnUrl.mjs";
4
- import * as react77 from "react";
4
+ import * as react65 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: react77.NamedExoticComponent<ConfigProviderProps>;
22
+ declare const ConfigProvider: react65.NamedExoticComponent<ConfigProviderProps>;
23
23
  type CdnFn = ({
24
24
  pkg,
25
25
  version,
@@ -1,8 +1,8 @@
1
1
  import * as react124 from "react";
2
- import * as react_jsx_runtime37 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime48 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/ContextMenu/ContextMenuHost.d.ts
5
- declare const ContextMenuHost: react124.MemoExoticComponent<() => react_jsx_runtime37.JSX.Element | null>;
5
+ declare const ContextMenuHost: react124.MemoExoticComponent<() => react_jsx_runtime48.JSX.Element | null>;
6
6
  //#endregion
7
7
  export { ContextMenuHost };
8
8
  //# sourceMappingURL=ContextMenuHost.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { CopyButtonProps } from "./type.mjs";
2
- import * as react56 from "react";
2
+ import * as react43 from "react";
3
3
 
4
4
  //#region src/CopyButton/CopyButton.d.ts
5
- declare const CopyButton: react56.NamedExoticComponent<CopyButtonProps>;
5
+ declare const CopyButton: react43.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 react57 from "react";
2
+ import * as react42 from "react";
3
3
 
4
4
  //#region src/DatePicker/DatePicker.d.ts
5
- declare const DatePicker: react57.NamedExoticComponent<DatePickerProps>;
5
+ declare const DatePicker: react42.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 react52 from "react";
2
+ import * as react64 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelBody.d.ts
5
5
  type DraggablePanelBodyProps = DivProps;
6
- declare const DraggablePanelBody: react52.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelBody: react64.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 react55 from "react";
2
+ import * as react62 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelContainer.d.ts
5
5
  type DraggablePanelContainerProps = DivProps;
6
- declare const DraggablePanelContainer: react55.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelContainer: react62.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 react53 from "react";
2
+ import * as react61 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelFooter.d.ts
5
5
  type DraggablePanelFooterProps = DivProps;
6
- declare const DraggablePanelFooter: react53.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelFooter: react61.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 react54 from "react";
2
+ import * as react63 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: react54.NamedExoticComponent<DraggablePanelHeaderProps>;
12
+ declare const DraggablePanelHeader: react63.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 react51 from "react";
2
+ import * as react59 from "react";
3
3
 
4
4
  //#region src/DraggableSideNav/DraggableSideNav.d.ts
5
- declare const DraggableSideNav: react51.NamedExoticComponent<DraggableSideNavProps>;
5
+ declare const DraggableSideNav: react59.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 react50 from "react";
2
+ import * as react58 from "react";
3
3
 
4
4
  //#region src/Drawer/Drawer.d.ts
5
- declare const Drawer: react50.NamedExoticComponent<DrawerProps>;
5
+ declare const Drawer: react58.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 react49 from "react";
2
+ import * as react56 from "react";
3
3
 
4
4
  //#region src/Dropdown/Dropdown.d.ts
5
5
 
@@ -9,7 +9,7 @@ import * as react49 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: react49.NamedExoticComponent<DropdownProps>;
12
+ declare const Dropdown: react56.NamedExoticComponent<DropdownProps>;
13
13
  //#endregion
14
14
  export { Dropdown };
15
15
  //# sourceMappingURL=Dropdown.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { DropdownMenuProps } from "./type.mjs";
2
- import * as react48 from "react";
2
+ import * as react57 from "react";
3
3
 
4
4
  //#region src/DropdownMenu/DropdownMenu.d.ts
5
- declare const DropdownMenu: react48.NamedExoticComponent<DropdownMenuProps<unknown>>;
5
+ declare const DropdownMenu: react57.NamedExoticComponent<DropdownMenuProps<unknown>>;
6
6
  //#endregion
7
7
  export { DropdownMenu };
8
8
  //# sourceMappingURL=DropdownMenu.d.mts.map
@@ -1,6 +1,6 @@
1
1
  import { DropdownMenuPlacement } from "./type.mjs";
2
2
  import React from "react";
3
- import * as react_jsx_runtime22 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime25 from "react/jsx-runtime";
4
4
  import * as _base_ui_react_menu0 from "@base-ui/react/menu";
5
5
  import { Menu } from "@base-ui/react/menu";
6
6
 
@@ -19,7 +19,7 @@ declare const DropdownMenuTrigger: {
19
19
  nativeButton,
20
20
  ref: refProp,
21
21
  ...rest
22
- }: DropdownMenuTriggerProps): react_jsx_runtime22.JSX.Element;
22
+ }: DropdownMenuTriggerProps): react_jsx_runtime25.JSX.Element;
23
23
  displayName: string;
24
24
  };
25
25
  type DropdownMenuPortalProps = React.ComponentProps<typeof Menu.Portal> & {
@@ -32,7 +32,7 @@ declare const DropdownMenuPortal: {
32
32
  ({
33
33
  container,
34
34
  ...rest
35
- }: DropdownMenuPortalProps): react_jsx_runtime22.JSX.Element;
35
+ }: DropdownMenuPortalProps): react_jsx_runtime25.JSX.Element;
36
36
  displayName: string;
37
37
  };
38
38
  type DropdownMenuPositionerProps = React.ComponentProps<typeof Menu.Positioner> & {
@@ -48,7 +48,7 @@ declare const DropdownMenuPositioner: {
48
48
  side,
49
49
  sideOffset,
50
50
  ...rest
51
- }: DropdownMenuPositionerProps): react_jsx_runtime22.JSX.Element;
51
+ }: DropdownMenuPositionerProps): react_jsx_runtime25.JSX.Element;
52
52
  displayName: string;
53
53
  };
54
54
  type DropdownMenuPopupProps = React.ComponentProps<typeof Menu.Popup>;
@@ -56,7 +56,7 @@ declare const DropdownMenuPopup: {
56
56
  ({
57
57
  className,
58
58
  ...rest
59
- }: DropdownMenuPopupProps): react_jsx_runtime22.JSX.Element;
59
+ }: DropdownMenuPopupProps): react_jsx_runtime25.JSX.Element;
60
60
  displayName: string;
61
61
  };
62
62
  type DropdownMenuItemProps = React.ComponentProps<typeof Menu.Item> & {
@@ -67,7 +67,7 @@ declare const DropdownMenuItem: {
67
67
  className,
68
68
  danger,
69
69
  ...rest
70
- }: DropdownMenuItemProps): react_jsx_runtime22.JSX.Element;
70
+ }: DropdownMenuItemProps): react_jsx_runtime25.JSX.Element;
71
71
  displayName: string;
72
72
  };
73
73
  type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof Menu.CheckboxItem> & {
@@ -78,7 +78,7 @@ declare const DropdownMenuCheckboxItemPrimitive: {
78
78
  className,
79
79
  danger,
80
80
  ...rest
81
- }: DropdownMenuCheckboxItemProps): react_jsx_runtime22.JSX.Element;
81
+ }: DropdownMenuCheckboxItemProps): react_jsx_runtime25.JSX.Element;
82
82
  displayName: string;
83
83
  };
84
84
  type DropdownMenuSeparatorProps = React.ComponentProps<typeof Menu.Separator>;
@@ -86,7 +86,7 @@ declare const DropdownMenuSeparator: {
86
86
  ({
87
87
  className,
88
88
  ...rest
89
- }: DropdownMenuSeparatorProps): react_jsx_runtime22.JSX.Element;
89
+ }: DropdownMenuSeparatorProps): react_jsx_runtime25.JSX.Element;
90
90
  displayName: string;
91
91
  };
92
92
  declare const DropdownMenuGroup: React.ForwardRefExoticComponent<_base_ui_react_menu0.MenuGroupProps & React.RefAttributes<Element>>;
@@ -95,7 +95,7 @@ declare const DropdownMenuGroupLabel: {
95
95
  ({
96
96
  className,
97
97
  ...rest
98
- }: DropdownMenuGroupLabelProps): react_jsx_runtime22.JSX.Element;
98
+ }: DropdownMenuGroupLabelProps): react_jsx_runtime25.JSX.Element;
99
99
  displayName: string;
100
100
  };
101
101
  type DropdownMenuSubmenuTriggerProps = React.ComponentProps<typeof Menu.SubmenuTrigger> & {
@@ -106,7 +106,7 @@ declare const DropdownMenuSubmenuTrigger: {
106
106
  className,
107
107
  danger,
108
108
  ...rest
109
- }: DropdownMenuSubmenuTriggerProps): react_jsx_runtime22.JSX.Element;
109
+ }: DropdownMenuSubmenuTriggerProps): react_jsx_runtime25.JSX.Element;
110
110
  displayName: string;
111
111
  };
112
112
  type DropdownMenuItemContentProps = React.HTMLAttributes<HTMLDivElement>;
@@ -114,7 +114,7 @@ declare const DropdownMenuItemContent: {
114
114
  ({
115
115
  className,
116
116
  ...rest
117
- }: DropdownMenuItemContentProps): react_jsx_runtime22.JSX.Element;
117
+ }: DropdownMenuItemContentProps): react_jsx_runtime25.JSX.Element;
118
118
  displayName: string;
119
119
  };
120
120
  type DropdownMenuItemIconProps = React.HTMLAttributes<HTMLSpanElement>;
@@ -122,7 +122,7 @@ declare const DropdownMenuItemIcon: {
122
122
  ({
123
123
  className,
124
124
  ...rest
125
- }: DropdownMenuItemIconProps): react_jsx_runtime22.JSX.Element;
125
+ }: DropdownMenuItemIconProps): react_jsx_runtime25.JSX.Element;
126
126
  displayName: string;
127
127
  };
128
128
  type DropdownMenuItemLabelProps = React.HTMLAttributes<HTMLSpanElement>;
@@ -130,7 +130,7 @@ declare const DropdownMenuItemLabel: {
130
130
  ({
131
131
  className,
132
132
  ...rest
133
- }: DropdownMenuItemLabelProps): react_jsx_runtime22.JSX.Element;
133
+ }: DropdownMenuItemLabelProps): react_jsx_runtime25.JSX.Element;
134
134
  displayName: string;
135
135
  };
136
136
  type DropdownMenuItemExtraProps = React.HTMLAttributes<HTMLSpanElement>;
@@ -138,7 +138,7 @@ declare const DropdownMenuItemExtra: {
138
138
  ({
139
139
  className,
140
140
  ...rest
141
- }: DropdownMenuItemExtraProps): react_jsx_runtime22.JSX.Element;
141
+ }: DropdownMenuItemExtraProps): react_jsx_runtime25.JSX.Element;
142
142
  displayName: string;
143
143
  };
144
144
  type DropdownMenuSubmenuArrowProps = React.HTMLAttributes<HTMLSpanElement>;
@@ -146,7 +146,7 @@ declare const DropdownMenuSubmenuArrow: {
146
146
  ({
147
147
  className,
148
148
  ...rest
149
- }: DropdownMenuSubmenuArrowProps): react_jsx_runtime22.JSX.Element;
149
+ }: DropdownMenuSubmenuArrowProps): react_jsx_runtime25.JSX.Element;
150
150
  displayName: string;
151
151
  };
152
152
  type DropdownMenuSwitchItemProps = Omit<React.ComponentProps<typeof Menu.Item>, 'onClick'> & {
@@ -167,7 +167,7 @@ declare const DropdownMenuSwitchItem: {
167
167
  onCheckedChange,
168
168
  children,
169
169
  ...rest
170
- }: DropdownMenuSwitchItemProps): react_jsx_runtime22.JSX.Element;
170
+ }: DropdownMenuSwitchItemProps): react_jsx_runtime25.JSX.Element;
171
171
  displayName: string;
172
172
  };
173
173
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { EditableTextProps } from "./type.mjs";
2
- import * as react34 from "react";
2
+ import * as react55 from "react";
3
3
 
4
4
  //#region src/EditableText/EditableText.d.ts
5
- declare const EditableText: react34.NamedExoticComponent<EditableTextProps>;
5
+ declare const EditableText: react55.NamedExoticComponent<EditableTextProps>;
6
6
  //#endregion
7
7
  export { EditableText };
8
8
  //# sourceMappingURL=EditableText.d.mts.map
@@ -0,0 +1,51 @@
1
+ import { EditorSlashMenuHiddenInput, EditorSlashMenuList, EditorSlashMenuPopup, EditorSlashMenuPortal, EditorSlashMenuPositioner } from "./atoms.mjs";
2
+ import { EditorSlashMenuItems, EditorSlashMenuOption } from "./type.mjs";
3
+ import React from "react";
4
+ import { AutocompleteRootChangeEventDetails, AutocompleteRootProps } from "@base-ui/react/autocomplete";
5
+
6
+ //#region src/EditorSlashMenu/EditorSlashMenu.d.ts
7
+ type Props = {
8
+ /** Anchor for positioning (caret virtual element, dom element, ref, etc.) */
9
+ anchor?: React.ComponentProps<typeof EditorSlashMenuPositioner>['anchor'];
10
+ defaultOpen?: boolean;
11
+ /** Initial query string (uncontrolled) */
12
+ defaultValue?: string;
13
+ /** Optional custom empty state */
14
+ empty?: React.ReactNode;
15
+ hiddenInputProps?: React.ComponentProps<typeof EditorSlashMenuHiddenInput>;
16
+ items: EditorSlashMenuItems;
17
+ listProps?: React.ComponentProps<typeof EditorSlashMenuList>;
18
+ onOpenChange?: (open: boolean, details: AutocompleteRootChangeEventDetails) => void;
19
+ onOpenChangeComplete?: (open: boolean) => void;
20
+ /** Called when a command is selected. */
21
+ onSelect?: (item: EditorSlashMenuOption, details: AutocompleteRootChangeEventDetails) => void;
22
+ /** Called when query changes. By default, changes caused by item selection are ignored. */
23
+ onValueChange?: (value: string, details: AutocompleteRootChangeEventDetails) => void;
24
+ open?: boolean;
25
+ popupProps?: React.ComponentProps<typeof EditorSlashMenuPopup>;
26
+ portalProps?: Omit<React.ComponentProps<typeof EditorSlashMenuPortal>, 'container'> & {
27
+ container?: HTMLElement | null;
28
+ };
29
+ positionerProps?: Omit<React.ComponentProps<typeof EditorSlashMenuPositioner>, 'anchor'>;
30
+ /** Optional custom group label renderer */
31
+ renderGroupLabel?: (label: string) => React.ReactNode;
32
+ /** Optional custom item renderer */
33
+ renderItem?: (item: EditorSlashMenuOption) => React.ReactNode;
34
+ /** Reserve icon space even when icon is missing */
35
+ reserveIconSpace?: boolean;
36
+ /** Pass-through props */
37
+ rootProps?: Omit<AutocompleteRootProps<EditorSlashMenuOption>, 'items' | 'value' | 'defaultValue' | 'onValueChange' | 'open' | 'defaultOpen' | 'onOpenChange' | 'onOpenChangeComplete' | 'itemToStringValue'>;
38
+ /** Whether selecting an item should propagate its filled value via `onValueChange`. */
39
+ updateValueOnSelect?: boolean;
40
+ /** Current query string (controlled) */
41
+ value?: string;
42
+ /**
43
+ * Render a visually-hidden input element for keyboard navigation / screen readers.
44
+ * Default is `false` because slash menus usually live inside an editor input.
45
+ */
46
+ withHiddenInput?: boolean;
47
+ };
48
+ declare const EditorSlashMenu: React.NamedExoticComponent<Props>;
49
+ //#endregion
50
+ export { EditorSlashMenu };
51
+ //# sourceMappingURL=EditorSlashMenu.d.mts.map
@@ -0,0 +1,99 @@
1
+ 'use client';
2
+
3
+ import { EditorSlashMenuEmpty, EditorSlashMenuGroup, EditorSlashMenuGroupLabel, EditorSlashMenuHiddenInput, EditorSlashMenuList, EditorSlashMenuPopup, EditorSlashMenuPortal, EditorSlashMenuPositioner, EditorSlashMenuRoot } from "./atoms.mjs";
4
+ import { MenuItemRenderer } from "./MenuItemRenderer.mjs";
5
+ import { isGroup } from "./utils.mjs";
6
+ import { useKeyboardNavigation } from "./useKeyboardNavigation.mjs";
7
+ import { useNormalizedItems } from "./useNormalizedItems.mjs";
8
+ import { createElement, memo, useCallback, useEffect, useMemo, useState } from "react";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+
11
+ //#region src/EditorSlashMenu/EditorSlashMenu.tsx
12
+ const EditorSlashMenu = memo(({ items, anchor, open, defaultOpen, onOpenChange, onOpenChangeComplete, value, defaultValue, onValueChange, updateValueOnSelect = false, onSelect, empty = "No results", renderGroupLabel, renderItem, reserveIconSpace = true, rootProps, portalProps, positionerProps, popupProps, listProps, withHiddenInput = false, hiddenInputProps }) => {
13
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen ?? false);
14
+ useEffect(() => {
15
+ if (open === void 0) return;
16
+ setUncontrolledOpen(open);
17
+ }, [open]);
18
+ const resolvedOpen = open ?? uncontrolledOpen;
19
+ const { resolvedItems, hasAnyIcon } = useNormalizedItems(items);
20
+ const { listRef } = useKeyboardNavigation({ isOpen: resolvedOpen });
21
+ const itemToStringValue = useCallback((item) => {
22
+ const kws = item.keywords?.length ? ` ${item.keywords.join(" ")}` : "";
23
+ return `${item.label}${kws}`;
24
+ }, []);
25
+ const handleValueChange = useCallback((nextValue, details) => {
26
+ if (!updateValueOnSelect && details.reason === "item-press") return;
27
+ onValueChange?.(nextValue, details);
28
+ }, [onValueChange, updateValueOnSelect]);
29
+ const handleSelect = useCallback((item, details) => {
30
+ onSelect?.(item, details);
31
+ }, [onSelect]);
32
+ const handleOpenChange = useCallback((nextOpen, details) => {
33
+ setUncontrolledOpen(nextOpen);
34
+ onOpenChange?.(nextOpen, details);
35
+ }, [onOpenChange]);
36
+ const setListRef = useCallback((node) => {
37
+ listRef.current = node;
38
+ const externalRef = listProps?.ref;
39
+ if (!externalRef) return;
40
+ if (typeof externalRef === "function") externalRef(node);
41
+ else externalRef.current = node;
42
+ }, [listRef, listProps]);
43
+ const menuItemProps = useMemo(() => ({
44
+ hasAnyIcon,
45
+ onSelect: handleSelect,
46
+ renderItem,
47
+ reserveIconSpace
48
+ }), [
49
+ hasAnyIcon,
50
+ handleSelect,
51
+ renderItem,
52
+ reserveIconSpace
53
+ ]);
54
+ return /* @__PURE__ */ jsxs(EditorSlashMenuRoot, {
55
+ ...rootProps,
56
+ defaultOpen,
57
+ defaultValue,
58
+ itemToStringValue,
59
+ items: resolvedItems,
60
+ onOpenChange: handleOpenChange,
61
+ onOpenChangeComplete,
62
+ onValueChange: handleValueChange,
63
+ open,
64
+ value,
65
+ children: [withHiddenInput ? /* @__PURE__ */ jsx(EditorSlashMenuHiddenInput, { ...hiddenInputProps }) : null, /* @__PURE__ */ jsx(EditorSlashMenuPortal, {
66
+ ...portalProps,
67
+ children: /* @__PURE__ */ jsx(EditorSlashMenuPositioner, {
68
+ ...positionerProps,
69
+ anchor,
70
+ children: /* @__PURE__ */ jsxs(EditorSlashMenuPopup, {
71
+ ...popupProps,
72
+ children: [/* @__PURE__ */ jsx(EditorSlashMenuList, {
73
+ ...listProps,
74
+ ref: setListRef,
75
+ children: (entry) => {
76
+ if (isGroup(entry)) return /* @__PURE__ */ jsxs(EditorSlashMenuGroup, { children: [entry.label ? renderGroupLabel?.(entry.label) ?? /* @__PURE__ */ jsx(EditorSlashMenuGroupLabel, { children: entry.label }) : null, entry.items.map((item$1) => /* @__PURE__ */ createElement(MenuItemRenderer, {
77
+ ...menuItemProps,
78
+ item: item$1,
79
+ key: item$1.value
80
+ }))] }, entry.label ?? entry.items.map((i) => i.value).join("|"));
81
+ const item = entry;
82
+ return /* @__PURE__ */ createElement(MenuItemRenderer, {
83
+ ...menuItemProps,
84
+ item,
85
+ key: item.value
86
+ });
87
+ }
88
+ }), /* @__PURE__ */ jsx(EditorSlashMenuEmpty, { children: empty })]
89
+ })
90
+ })
91
+ })]
92
+ });
93
+ });
94
+ EditorSlashMenu.displayName = "EditorSlashMenu";
95
+ var EditorSlashMenu_default = EditorSlashMenu;
96
+
97
+ //#endregion
98
+ export { EditorSlashMenu_default as default };
99
+ //# sourceMappingURL=EditorSlashMenu.mjs.map