@lobehub/ui 4.35.3 → 4.36.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 (161) 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/Avatar.mjs +1 -1
  7. package/es/Avatar/AvatarGroup/index.d.mts +2 -2
  8. package/es/Burger/Burger.d.mts +2 -2
  9. package/es/CodeDiff/CodeDiff.d.mts +2 -2
  10. package/es/CodeDiff/PatchDiff.d.mts +2 -2
  11. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  12. package/es/Collapse/Collapse.d.mts +2 -2
  13. package/es/ColorSwatches/ColorSwatches.mjs +1 -1
  14. package/es/ConfigProvider/index.d.mts +2 -2
  15. package/es/ContextMenu/ContextMenuHost.d.mts +3 -3
  16. package/es/ContextMenu/ContextMenuHost.mjs +14 -9
  17. package/es/ContextMenu/ContextMenuHost.mjs.map +1 -1
  18. package/es/CopyButton/CopyButton.d.mts +2 -2
  19. package/es/DatePicker/DatePicker.d.mts +2 -2
  20. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  21. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  22. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  23. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  24. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  25. package/es/Drawer/Drawer.d.mts +2 -2
  26. package/es/Dropdown/Dropdown.d.mts +2 -2
  27. package/es/DropdownMenu/DropdownMenu.d.mts +2 -2
  28. package/es/DropdownMenu/atoms.d.mts +18 -18
  29. package/es/DropdownMenu/atoms.mjs +4 -2
  30. package/es/DropdownMenu/atoms.mjs.map +1 -1
  31. package/es/EditableText/EditableText.d.mts +2 -2
  32. package/es/EditorSlashMenu/atoms.d.mts +20 -14
  33. package/es/EditorSlashMenu/atoms.mjs +8 -1
  34. package/es/EditorSlashMenu/atoms.mjs.map +1 -1
  35. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  36. package/es/Flex/FlexBasic.d.mts +2 -2
  37. package/es/FontLoader/index.d.mts +2 -2
  38. package/es/Footer/Footer.d.mts +2 -2
  39. package/es/Form/components/FormGroup.d.mts +2 -2
  40. package/es/Form/components/FormItem.d.mts +2 -2
  41. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  42. package/es/FormModal/FormModal.d.mts +2 -2
  43. package/es/Freeze/Freeze.d.mts +2 -2
  44. package/es/GuideCard/GuideCard.d.mts +2 -2
  45. package/es/Header/Header.d.mts +2 -2
  46. package/es/Highlighter/Highlighter.d.mts +2 -2
  47. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  48. package/es/Hotkey/Hotkey.d.mts +2 -2
  49. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  50. package/es/Icon/Icon.d.mts +2 -2
  51. package/es/Icon/components/IconProvider.d.mts +3 -3
  52. package/es/Image/PreviewGroup.d.mts +2 -2
  53. package/es/ImageSelect/ImageSelect.d.mts +2 -2
  54. package/es/Input/Input.d.mts +2 -2
  55. package/es/Input/InputNumber.d.mts +2 -2
  56. package/es/Input/InputOPT.d.mts +2 -2
  57. package/es/Input/InputPassword.d.mts +2 -2
  58. package/es/Input/TextArea.d.mts +2 -2
  59. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  60. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  61. package/es/Layout/components/LayoutMain.d.mts +2 -2
  62. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  63. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  64. package/es/Layout/components/LayoutToc.d.mts +2 -2
  65. package/es/List/ListItem/index.d.mts +2 -2
  66. package/es/LobeSelect/LobeSelect.d.mts +2 -2
  67. package/es/LobeSelect/atoms.d.mts +19 -19
  68. package/es/LobeSelect/atoms.mjs +3 -1
  69. package/es/LobeSelect/atoms.mjs.map +1 -1
  70. package/es/LobeSwitch/LobeSwitch.d.mts +2 -2
  71. package/es/LobeSwitch/atoms.d.mts +4 -4
  72. package/es/Markdown/Markdown.d.mts +2 -2
  73. package/es/Markdown/Typography.d.mts +2 -2
  74. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  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/imperative.d.mts +2 -2
  82. package/es/MotionProvider/index.d.mts +2 -2
  83. package/es/Popover/ArrowIcon.d.mts +2 -2
  84. package/es/Popover/PopoverPortal.mjs +8 -6
  85. package/es/Popover/PopoverPortal.mjs.map +1 -1
  86. package/es/Popover/atoms.d.mts +9 -9
  87. package/es/Popover/context.d.mts +2 -2
  88. package/es/ScrollArea/atoms.d.mts +7 -7
  89. package/es/SearchBar/SearchBar.d.mts +2 -2
  90. package/es/Segmented/Segmented.d.mts +2 -2
  91. package/es/Select/Select.d.mts +2 -2
  92. package/es/SideNav/SideNav.d.mts +2 -2
  93. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  94. package/es/SortableList/components/DragHandle.d.mts +2 -2
  95. package/es/SortableList/components/SortableItem.d.mts +2 -2
  96. package/es/ThemeProvider/AppElementContext.d.mts +7 -0
  97. package/es/ThemeProvider/AppElementContext.mjs +14 -0
  98. package/es/ThemeProvider/AppElementContext.mjs.map +1 -0
  99. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  100. package/es/ThemeProvider/ThemeProvider.mjs +9 -34
  101. package/es/ThemeProvider/ThemeProvider.mjs.map +1 -1
  102. package/es/ThemeProvider/index.d.mts +2 -1
  103. package/es/ThemeProvider/index.mjs +2 -1
  104. package/es/Toast/imperative.d.mts +3 -3
  105. package/es/Toc/Toc.d.mts +2 -2
  106. package/es/Tooltip/TooltipGroup.mjs +3 -3
  107. package/es/Tooltip/TooltipGroup.mjs.map +1 -1
  108. package/es/Tooltip/TooltipStandalone.mjs +3 -3
  109. package/es/Tooltip/TooltipStandalone.mjs.map +1 -1
  110. package/es/Video/index.d.mts +2 -2
  111. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  112. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  113. package/es/awesome/Features/Features.d.mts +2 -2
  114. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  115. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  116. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  117. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  118. package/es/awesome/Hero/Hero.d.mts +2 -2
  119. package/es/awesome/Spline/Spine.d.mts +2 -2
  120. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  121. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  122. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  123. package/es/brand/LobeChat/index.d.mts +2 -2
  124. package/es/brand/LobeHub/index.d.mts +2 -2
  125. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  126. package/es/brand/LogoThree/index.d.mts +2 -2
  127. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  128. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  129. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  130. package/es/chat/ChatList/ChatList.d.mts +2 -2
  131. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  132. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  133. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  134. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  135. package/es/color/CssVar/index.d.mts +2 -2
  136. package/es/i18n/context.d.mts +2 -2
  137. package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
  138. package/es/icons/lucideExtra/CreateBotIcon.d.mts +3 -3
  139. package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
  140. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +2 -2
  141. package/es/icons/lucideExtra/GroupBotIcon.d.mts +2 -2
  142. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  143. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  144. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  145. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  146. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  147. package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
  148. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  149. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
  150. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  151. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  152. package/es/index.d.mts +2 -1
  153. package/es/index.mjs +7 -6
  154. package/es/mdx/Mdx/index.d.mts +2 -2
  155. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  156. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  157. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  158. package/es/storybook/StoryBook/index.d.mts +2 -2
  159. package/package.json +1 -1
  160. package/es/Tooltip/TooltipPortal.mjs +0 -38
  161. package/es/Tooltip/TooltipPortal.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { FlexboxProps } from "../../Flex/type.mjs";
2
2
  import "../../Flex/index.mjs";
3
- import * as react19 from "react";
3
+ import * as react15 from "react";
4
4
  import { Ref } from "react";
5
5
  import { useControls, useCreateStore } from "leva";
6
6
 
@@ -10,7 +10,7 @@ interface StoryBookProps extends FlexboxProps {
10
10
  noPadding?: boolean;
11
11
  ref?: Ref<HTMLDivElement>;
12
12
  }
13
- declare const StoryBook: react19.NamedExoticComponent<StoryBookProps>;
13
+ declare const StoryBook: react15.NamedExoticComponent<StoryBookProps>;
14
14
  //#endregion
15
15
  export { StoryBook, StoryBookProps, useControls, useCreateStore };
16
16
  //# sourceMappingURL=index.d.mts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "4.35.3",
3
+ "version": "4.36.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -1,38 +0,0 @@
1
- 'use client';
2
-
3
- import { useEffect, useState } from "react";
4
-
5
- //#region src/Tooltip/TooltipPortal.tsx
6
- const PORTAL_ATTR = "data-lobe-ui-tooltip-portal";
7
- const containerMap = /* @__PURE__ */ new WeakMap();
8
- const getOrCreateContainer = (root) => {
9
- const resolvedRoot = (() => {
10
- if (typeof document === "undefined") return root;
11
- if (typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot) return root;
12
- return root;
13
- })();
14
- const cached = containerMap.get(resolvedRoot);
15
- if (cached && cached.isConnected) return cached;
16
- const el = document.createElement("div");
17
- el.setAttribute(PORTAL_ATTR, "true");
18
- resolvedRoot.append(el);
19
- containerMap.set(resolvedRoot, el);
20
- return el;
21
- };
22
- const resolveRoot = (root) => {
23
- if (root) return root;
24
- return document.body;
25
- };
26
- const useTooltipPortalContainer = (root) => {
27
- const [container, setContainer] = useState(null);
28
- useEffect(() => {
29
- const resolved = resolveRoot(root);
30
- if (!resolved) return;
31
- setContainer(getOrCreateContainer(resolved));
32
- }, [root, container?.isConnected]);
33
- return container;
34
- };
35
-
36
- //#endregion
37
- export { useTooltipPortalContainer };
38
- //# sourceMappingURL=TooltipPortal.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TooltipPortal.mjs","names":[],"sources":["../../src/Tooltip/TooltipPortal.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nconst PORTAL_ATTR = 'data-lobe-ui-tooltip-portal';\nexport const TOOLTIP_CONTAINER_ATTR = 'data-lobe-ui-tooltip-container';\n\n// Reuse one portal container per root (document.body by default).\nconst containerMap = new WeakMap<object, HTMLElement>();\n\nconst getOrCreateContainer = (root: HTMLElement | ShadowRoot): HTMLElement => {\n const resolvedRoot = (() => {\n if (typeof document === 'undefined') return root;\n if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) return root;\n\n return root;\n })();\n\n const cached = containerMap.get(resolvedRoot);\n if (cached && cached.isConnected) return cached;\n\n const el = document.createElement('div');\n el.setAttribute(PORTAL_ATTR, 'true');\n resolvedRoot.append(el);\n containerMap.set(resolvedRoot, el);\n return el;\n};\n\nconst resolveRoot = (root?: HTMLElement | ShadowRoot | null): HTMLElement | ShadowRoot | null => {\n if (root) return root;\n return document.body;\n};\n\nexport const useTooltipPortalContainer = (\n root?: HTMLElement | ShadowRoot | null,\n): HTMLElement | null => {\n const [container, setContainer] = useState<HTMLElement | null>(null);\n\n // Never mutate DOM / create portal container during render.\n // Create it after mount to avoid SSR/hydration side effects.\n useEffect(() => {\n const resolved = resolveRoot(root);\n if (!resolved) return;\n setContainer(getOrCreateContainer(resolved));\n }, [root, container?.isConnected]);\n\n return container;\n};\n"],"mappings":";;;;;AAIA,MAAM,cAAc;AAIpB,MAAM,+BAAe,IAAI,SAA8B;AAEvD,MAAM,wBAAwB,SAAgD;CAC5E,MAAM,sBAAsB;AAC1B,MAAI,OAAO,aAAa,YAAa,QAAO;AAC5C,MAAI,OAAO,eAAe,eAAe,gBAAgB,WAAY,QAAO;AAE5E,SAAO;KACL;CAEJ,MAAM,SAAS,aAAa,IAAI,aAAa;AAC7C,KAAI,UAAU,OAAO,YAAa,QAAO;CAEzC,MAAM,KAAK,SAAS,cAAc,MAAM;AACxC,IAAG,aAAa,aAAa,OAAO;AACpC,cAAa,OAAO,GAAG;AACvB,cAAa,IAAI,cAAc,GAAG;AAClC,QAAO;;AAGT,MAAM,eAAe,SAA4E;AAC/F,KAAI,KAAM,QAAO;AACjB,QAAO,SAAS;;AAGlB,MAAa,6BACX,SACuB;CACvB,MAAM,CAAC,WAAW,gBAAgB,SAA6B,KAAK;AAIpE,iBAAgB;EACd,MAAM,WAAW,YAAY,KAAK;AAClC,MAAI,CAAC,SAAU;AACf,eAAa,qBAAqB,SAAS,CAAC;IAC3C,CAAC,MAAM,WAAW,YAAY,CAAC;AAElC,QAAO"}