@lobehub/ui 4.38.3 → 5.0.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.
- package/es/Accordion/Accordion.d.mts +2 -2
- package/es/Accordion/AccordionItem.d.mts +2 -2
- package/es/ActionIcon/ActionIcon.d.mts +2 -2
- package/es/ActionIconGroup/ActionIconGroup.mjs +1 -1
- package/es/ActionIconGroup/type.d.mts +1 -1
- package/es/Alert/Alert.d.mts +2 -2
- package/es/AutoComplete/Select.d.mts +2 -2
- package/es/Avatar/AvatarGroup/index.d.mts +2 -2
- package/es/Burger/Burger.d.mts +2 -2
- package/es/CodeDiff/CodeDiff.d.mts +2 -2
- package/es/CodeDiff/PatchDiff.d.mts +2 -2
- package/es/CodeEditor/CodeEditor.d.mts +2 -2
- package/es/Collapse/Collapse.d.mts +2 -2
- package/es/ConfigProvider/index.d.mts +2 -2
- package/es/ContextMenu/index.d.mts +6 -7
- package/es/ContextMenu/index.mjs +3 -3
- package/es/CopyButton/CopyButton.d.mts +2 -2
- package/es/DatePicker/DatePicker.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
- package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
- package/es/Drawer/Drawer.d.mts +2 -2
- package/es/Dropdown/Dropdown.d.mts +2 -2
- package/es/DropdownMenu/index.d.mts +6 -5
- package/es/DropdownMenu/index.mjs +4 -4
- package/es/EditableText/EditableText.d.mts +2 -2
- package/es/EditorSlashMenu/atoms.d.mts +13 -13
- package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
- package/es/Flex/FlexBasic.d.mts +2 -2
- package/es/FontLoader/index.d.mts +2 -2
- package/es/Footer/Footer.d.mts +2 -2
- package/es/Form/components/FormGroup.d.mts +2 -2
- package/es/Form/components/FormItem.d.mts +2 -2
- package/es/Form/components/FormSubmitFooter.d.mts +2 -2
- package/es/FormModal/FormModal.d.mts +2 -2
- package/es/Freeze/Freeze.d.mts +2 -2
- package/es/GuideCard/GuideCard.d.mts +2 -2
- package/es/Header/Header.d.mts +2 -2
- package/es/Highlighter/Highlighter.d.mts +2 -2
- package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
- package/es/Highlighter/SyntaxHighlighter/style.mjs +4 -5
- package/es/Highlighter/SyntaxHighlighter/style.mjs.map +1 -1
- package/es/Hotkey/Hotkey.d.mts +2 -2
- package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
- package/es/Icon/Icon.d.mts +2 -2
- package/es/Icon/components/IconProvider.d.mts +3 -3
- package/es/Image/PreviewGroup.d.mts +2 -2
- package/es/ImageSelect/ImageSelect.d.mts +2 -2
- package/es/Input/Input.d.mts +2 -2
- package/es/Input/InputNumber.d.mts +2 -2
- package/es/Input/InputOPT.d.mts +2 -2
- package/es/Input/InputPassword.d.mts +2 -2
- package/es/Input/TextArea.d.mts +2 -2
- package/es/Layout/components/LayoutFooter.d.mts +2 -2
- package/es/Layout/components/LayoutHeader.d.mts +2 -2
- package/es/Layout/components/LayoutMain.d.mts +2 -2
- package/es/Layout/components/LayoutSidebar.d.mts +2 -2
- package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
- package/es/Layout/components/LayoutToc.d.mts +2 -2
- package/es/List/ListItem/index.d.mts +2 -2
- package/es/Markdown/Markdown.d.mts +2 -2
- package/es/Markdown/SyntaxMarkdown/style.mjs +4 -5
- package/es/Markdown/SyntaxMarkdown/style.mjs.map +1 -1
- package/es/Markdown/Typography.d.mts +2 -2
- package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
- package/es/Markdown/plugins/rehypeStreamAnimated.mjs +1 -1
- package/es/Markdown/plugins/rehypeStreamAnimated.mjs.map +1 -1
- package/es/MaskShadow/MaskShadow.d.mts +2 -2
- package/es/Menu/Menu.d.mts +2 -2
- package/es/Mermaid/Mermaid.d.mts +2 -2
- package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
- package/es/Modal/Modal.d.mts +2 -2
- package/es/Modal/ModalProvider.d.mts +2 -2
- package/es/Modal/imperative.d.mts +2 -2
- package/es/MotionProvider/index.d.mts +2 -2
- package/es/Popover/ArrowIcon.d.mts +2 -2
- package/es/Popover/atoms.d.mts +9 -9
- package/es/Popover/context.d.mts +2 -2
- package/es/ScrollArea/index.d.mts +5 -4
- package/es/ScrollArea/index.mjs +2 -2
- package/es/SearchBar/SearchBar.d.mts +2 -2
- package/es/Segmented/Segmented.d.mts +2 -2
- package/es/Select/Select.d.mts +3 -3
- package/es/Select/Select.mjs +1 -1
- package/es/Select/Select.mjs.map +1 -1
- package/es/SideNav/SideNav.d.mts +2 -2
- package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
- package/es/SortableList/components/DragHandle.d.mts +2 -2
- package/es/SortableList/components/SortableItem.d.mts +2 -2
- package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
- package/es/ThemeSwitch/ThemeSwitch.mjs +1 -1
- package/es/Toast/index.d.mts +4 -3
- package/es/Toast/index.mjs +1 -1
- package/es/Toc/Toc.d.mts +2 -2
- package/es/Video/index.d.mts +2 -2
- package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
- package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
- package/es/awesome/Features/Features.d.mts +2 -2
- package/es/awesome/Giscus/Giscus.d.mts +2 -2
- package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
- package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
- package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
- package/es/awesome/Hero/Hero.d.mts +2 -2
- package/es/awesome/Spline/Spine.d.mts +2 -2
- package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
- package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
- package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
- package/es/base-ui/ContextMenu/ContextMenuHost.d.mts +8 -0
- package/es/{ContextMenu → base-ui/ContextMenu}/ContextMenuHost.mjs +6 -6
- package/es/base-ui/ContextMenu/ContextMenuHost.mjs.map +1 -0
- package/es/{ContextMenu → base-ui/ContextMenu}/ContextMenuTrigger.d.mts +1 -1
- package/es/{ContextMenu → base-ui/ContextMenu}/ContextMenuTrigger.mjs +2 -2
- package/es/base-ui/ContextMenu/ContextMenuTrigger.mjs.map +1 -0
- package/es/base-ui/ContextMenu/index.d.mts +7 -0
- package/es/base-ui/ContextMenu/renderItems.d.mts +4 -0
- package/es/{ContextMenu → base-ui/ContextMenu}/renderItems.mjs +7 -7
- package/es/base-ui/ContextMenu/renderItems.mjs.map +1 -0
- package/es/{ContextMenu → base-ui/ContextMenu}/store.d.mts +3 -3
- package/es/{ContextMenu → base-ui/ContextMenu}/store.mjs +1 -1
- package/es/base-ui/ContextMenu/store.mjs.map +1 -0
- package/es/base-ui/ContextMenu/type.d.mts +12 -0
- package/es/base-ui/DropdownMenu/DropdownMenu.d.mts +8 -0
- package/es/{DropdownMenu → base-ui/DropdownMenu}/DropdownMenu.mjs +3 -3
- package/es/base-ui/DropdownMenu/DropdownMenu.mjs.map +1 -0
- package/es/{DropdownMenu → base-ui/DropdownMenu}/atoms.d.mts +19 -19
- package/es/{DropdownMenu → base-ui/DropdownMenu}/atoms.mjs +7 -7
- package/es/base-ui/DropdownMenu/atoms.mjs.map +1 -0
- package/es/base-ui/DropdownMenu/index.d.mts +5 -0
- package/es/{DropdownMenu → base-ui/DropdownMenu}/renderItems.d.mts +3 -3
- package/es/{DropdownMenu → base-ui/DropdownMenu}/renderItems.mjs +3 -3
- package/es/base-ui/DropdownMenu/renderItems.mjs.map +1 -0
- package/es/{DropdownMenu → base-ui/DropdownMenu}/type.d.mts +9 -9
- package/es/{ScrollArea → base-ui/ScrollArea}/ScrollArea.d.mts +1 -1
- package/es/{ScrollArea → base-ui/ScrollArea}/ScrollArea.mjs +1 -1
- package/es/base-ui/ScrollArea/ScrollArea.mjs.map +1 -0
- package/es/{ScrollArea → base-ui/ScrollArea}/atoms.d.mts +8 -8
- package/es/{ScrollArea → base-ui/ScrollArea}/atoms.mjs +1 -1
- package/es/base-ui/ScrollArea/atoms.mjs.map +1 -0
- package/es/{ScrollArea → base-ui/ScrollArea}/globalStyle.mjs +1 -1
- package/es/base-ui/ScrollArea/globalStyle.mjs.map +1 -0
- package/es/base-ui/ScrollArea/index.d.mts +3 -0
- package/es/{ScrollArea → base-ui/ScrollArea}/style.mjs +1 -1
- package/es/base-ui/ScrollArea/style.mjs.map +1 -0
- package/es/{ScrollArea → base-ui/ScrollArea}/type.d.mts +1 -1
- package/es/base-ui/Select/Select.d.mts +8 -0
- package/es/{LobeSelect/LobeSelect.mjs → base-ui/Select/Select.mjs} +9 -9
- package/es/base-ui/Select/Select.mjs.map +1 -0
- package/es/base-ui/Select/atoms.d.mts +155 -0
- package/es/{LobeSelect → base-ui/Select}/atoms.mjs +38 -38
- package/es/base-ui/Select/atoms.mjs.map +1 -0
- package/es/base-ui/Select/index.d.mts +3 -0
- package/es/{LobeSelect → base-ui/Select}/style.mjs +2 -2
- package/es/base-ui/Select/style.mjs.map +1 -0
- package/es/{LobeSelect → base-ui/Select}/type.d.mts +24 -24
- package/es/base-ui/Switch/Switch.d.mts +8 -0
- package/es/{LobeSwitch/LobeSwitch.mjs → base-ui/Switch/Switch.mjs} +12 -12
- package/es/base-ui/Switch/Switch.mjs.map +1 -0
- package/es/base-ui/Switch/atoms.d.mts +56 -0
- package/es/{LobeSwitch → base-ui/Switch}/atoms.mjs +16 -16
- package/es/base-ui/Switch/atoms.mjs.map +1 -0
- package/es/base-ui/Switch/index.d.mts +4 -0
- package/es/{LobeSwitch → base-ui/Switch}/style.d.mts +1 -1
- package/es/{LobeSwitch → base-ui/Switch}/style.mjs +4 -4
- package/es/base-ui/Switch/style.mjs.map +1 -0
- package/es/{LobeSwitch → base-ui/Switch}/type.d.mts +21 -21
- package/es/{Toast → base-ui/Toast}/Toast.mjs +2 -2
- package/es/base-ui/Toast/Toast.mjs.map +1 -0
- package/es/{Toast → base-ui/Toast}/context.mjs +1 -1
- package/es/base-ui/Toast/context.mjs.map +1 -0
- package/es/{Toast → base-ui/Toast}/imperative.d.mts +3 -3
- package/es/{Toast → base-ui/Toast}/imperative.mjs +3 -3
- package/es/base-ui/Toast/imperative.mjs.map +1 -0
- package/es/base-ui/Toast/index.d.mts +2 -0
- package/es/{Toast → base-ui/Toast}/style.mjs +1 -1
- package/es/base-ui/Toast/style.mjs.map +1 -0
- package/es/{Toast → base-ui/Toast}/type.d.mts +3 -3
- package/es/base-ui/index.d.mts +28 -0
- package/es/base-ui/index.mjs +16 -0
- package/es/brand/LobeChat/index.d.mts +2 -2
- package/es/brand/LobeHub/index.d.mts +2 -2
- package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
- package/es/brand/LogoThree/index.d.mts +2 -2
- package/es/chat/BackBottom/BackBottom.d.mts +2 -2
- package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
- package/es/chat/ChatItem/ChatItem.d.mts +2 -2
- package/es/chat/ChatList/ChatList.d.mts +2 -2
- package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
- package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
- package/es/chat/MessageInput/MessageInput.d.mts +2 -2
- package/es/chat/MessageModal/MessageModal.d.mts +2 -2
- package/es/color/ColorScales/index.d.mts +2 -2
- package/es/color/CssVar/index.d.mts +2 -2
- package/es/hooks/useNativeButton.mjs +2 -2
- package/es/hooks/useNativeButton.mjs.map +1 -1
- package/es/i18n/context.d.mts +2 -2
- package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
- package/es/icons/lucideExtra/CreateBotIcon.d.mts +3 -3
- package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GlobeOffIcon.d.mts +2 -2
- package/es/icons/lucideExtra/GroupBotIcon.d.mts +2 -2
- package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
- package/es/icons/lucideExtra/LeftClickIcon.d.mts +2 -2
- package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
- package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
- package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
- package/es/icons/lucideExtra/SkillsIcon.d.mts +3 -3
- package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
- package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
- package/es/index.d.mts +15 -24
- package/es/index.mjs +11 -16
- package/es/mdx/Mdx/index.d.mts +2 -2
- package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
- package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
- package/es/mobile/TabBar/TabBar.d.mts +2 -2
- package/es/storybook/StoryBook/index.d.mts +2 -2
- package/es/styles/animations.mjs +8 -10
- package/es/styles/animations.mjs.map +1 -1
- package/package.json +46 -31
- package/awesome.d.ts +0 -1
- package/awesome.js +0 -1
- package/brand.d.ts +0 -1
- package/brand.js +0 -1
- package/chat.d.ts +0 -1
- package/chat.js +0 -1
- package/color.d.ts +0 -1
- package/color.js +0 -1
- package/es/ContextMenu/ContextMenuHost.d.mts +0 -8
- package/es/ContextMenu/ContextMenuHost.mjs.map +0 -1
- package/es/ContextMenu/ContextMenuTrigger.mjs.map +0 -1
- package/es/ContextMenu/renderItems.d.mts +0 -4
- package/es/ContextMenu/renderItems.mjs.map +0 -1
- package/es/ContextMenu/store.mjs.map +0 -1
- package/es/ContextMenu/type.d.mts +0 -12
- package/es/DropdownMenu/DropdownMenu.d.mts +0 -8
- package/es/DropdownMenu/DropdownMenu.mjs.map +0 -1
- package/es/DropdownMenu/atoms.mjs.map +0 -1
- package/es/DropdownMenu/renderItems.mjs.map +0 -1
- package/es/LobeSelect/LobeSelect.d.mts +0 -8
- package/es/LobeSelect/LobeSelect.mjs.map +0 -1
- package/es/LobeSelect/atoms.d.mts +0 -155
- package/es/LobeSelect/atoms.mjs.map +0 -1
- package/es/LobeSelect/index.d.mts +0 -4
- package/es/LobeSelect/index.mjs +0 -4
- package/es/LobeSelect/style.mjs.map +0 -1
- package/es/LobeSwitch/LobeSwitch.d.mts +0 -8
- package/es/LobeSwitch/LobeSwitch.mjs.map +0 -1
- package/es/LobeSwitch/atoms.d.mts +0 -56
- package/es/LobeSwitch/atoms.mjs.map +0 -1
- package/es/LobeSwitch/index.d.mts +0 -5
- package/es/LobeSwitch/index.d.ts +0 -1
- package/es/LobeSwitch/index.js +0 -1
- package/es/LobeSwitch/index.mjs +0 -5
- package/es/LobeSwitch/style.mjs.map +0 -1
- package/es/ScrollArea/ScrollArea.mjs.map +0 -1
- package/es/ScrollArea/atoms.mjs.map +0 -1
- package/es/ScrollArea/globalStyle.mjs.map +0 -1
- package/es/ScrollArea/style.mjs.map +0 -1
- package/es/Toast/Toast.mjs.map +0 -1
- package/es/Toast/context.mjs.map +0 -1
- package/es/Toast/imperative.mjs.map +0 -1
- package/es/Toast/style.mjs.map +0 -1
- package/icons.d.ts +0 -1
- package/icons.js +0 -1
- package/mdx.d.ts +0 -1
- package/mdx.js +0 -1
- package/mobile.d.ts +0 -1
- package/mobile.js +0 -1
- package/storybook.d.ts +0 -1
- package/storybook.js +0 -1
- /package/es/{ContextMenu → base-ui/ContextMenu}/imperative.d.mts +0 -0
- /package/es/{LobeSelect → base-ui}/index.d.ts +0 -0
- /package/es/{LobeSelect → base-ui}/index.js +0 -0
package/es/index.d.mts
CHANGED
|
@@ -35,10 +35,10 @@ import { GenericItemType, ItemType, MenuInfo, MenuItemType, MenuProps } from "./
|
|
|
35
35
|
import { BaseMenuItemType } from "./Menu/baseItem.mjs";
|
|
36
36
|
import { Menu } from "./Menu/Menu.mjs";
|
|
37
37
|
import "./Menu/index.mjs";
|
|
38
|
-
import { renderDropdownMenuItems } from "./DropdownMenu/renderItems.mjs";
|
|
39
|
-
import { DropdownItem, DropdownMenuCheckboxItem, DropdownMenuPlacement, DropdownMenuProps } from "./DropdownMenu/type.mjs";
|
|
40
|
-
import { DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuGroupLabelProps, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemContentProps, DropdownMenuItemExtra, DropdownMenuItemExtraProps, DropdownMenuItemIcon, DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelProps, DropdownMenuItemProps, DropdownMenuPopup, DropdownMenuPopupProps, DropdownMenuPortal, DropdownMenuPortalProps, DropdownMenuPositioner, DropdownMenuPositionerProps, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, DropdownMenuTriggerProps } from "./DropdownMenu/atoms.mjs";
|
|
41
|
-
import { DropdownMenu } from "./DropdownMenu/DropdownMenu.mjs";
|
|
38
|
+
import { renderDropdownMenuItems } from "./base-ui/DropdownMenu/renderItems.mjs";
|
|
39
|
+
import { DropdownItem, DropdownMenuCheckboxItem, DropdownMenuPlacement, DropdownMenuProps } from "./base-ui/DropdownMenu/type.mjs";
|
|
40
|
+
import { DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuGroupLabelProps, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemContentProps, DropdownMenuItemExtra, DropdownMenuItemExtraProps, DropdownMenuItemIcon, DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelProps, DropdownMenuItemProps, DropdownMenuPopup, DropdownMenuPopupProps, DropdownMenuPortal, DropdownMenuPortalProps, DropdownMenuPositioner, DropdownMenuPositionerProps, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, DropdownMenuTriggerProps } from "./base-ui/DropdownMenu/atoms.mjs";
|
|
41
|
+
import { DropdownMenu } from "./base-ui/DropdownMenu/DropdownMenu.mjs";
|
|
42
42
|
import "./DropdownMenu/index.mjs";
|
|
43
43
|
import { ActionIconGroupEvent, ActionIconGroupProps } from "./ActionIconGroup/type.mjs";
|
|
44
44
|
import { ActionIconGroup } from "./ActionIconGroup/ActionIconGroup.mjs";
|
|
@@ -77,10 +77,10 @@ import "./Collapse/index.mjs";
|
|
|
77
77
|
import { ColorSwatchesProps } from "./ColorSwatches/type.mjs";
|
|
78
78
|
import { ColorSwatches } from "./ColorSwatches/ColorSwatches.mjs";
|
|
79
79
|
import "./ColorSwatches/index.mjs";
|
|
80
|
-
import { ContextMenuCheckboxItem, ContextMenuItem } from "./ContextMenu/type.mjs";
|
|
81
|
-
import { ContextMenuTrigger } from "./ContextMenu/ContextMenuTrigger.mjs";
|
|
82
|
-
import { ContextMenuHost } from "./ContextMenu/ContextMenuHost.mjs";
|
|
83
|
-
import { closeContextMenu, showContextMenu, updateContextMenuItems } from "./ContextMenu/store.mjs";
|
|
80
|
+
import { ContextMenuCheckboxItem, ContextMenuItem } from "./base-ui/ContextMenu/type.mjs";
|
|
81
|
+
import { ContextMenuTrigger } from "./base-ui/ContextMenu/ContextMenuTrigger.mjs";
|
|
82
|
+
import { ContextMenuHost } from "./base-ui/ContextMenu/ContextMenuHost.mjs";
|
|
83
|
+
import { closeContextMenu, showContextMenu, updateContextMenuItems } from "./base-ui/ContextMenu/store.mjs";
|
|
84
84
|
import "./ContextMenu/index.mjs";
|
|
85
85
|
import { CopyButtonProps } from "./CopyButton/type.mjs";
|
|
86
86
|
import { CopyButton } from "./CopyButton/CopyButton.mjs";
|
|
@@ -198,15 +198,6 @@ import "./ImageSelect/index.mjs";
|
|
|
198
198
|
import { ListItemProps, ListProps } from "./List/type.mjs";
|
|
199
199
|
import { ListItem } from "./List/ListItem/index.mjs";
|
|
200
200
|
import List from "./List/index.mjs";
|
|
201
|
-
import { LobeSelectProps } from "./LobeSelect/type.mjs";
|
|
202
|
-
import { LobeSelectArrow, LobeSelectArrowProps, LobeSelectBackdrop, LobeSelectGroup, LobeSelectGroupLabel, LobeSelectGroupLabelProps, LobeSelectGroupProps, LobeSelectIcon, LobeSelectIconProps, LobeSelectItem, LobeSelectItemIndicator, LobeSelectItemIndicatorProps, LobeSelectItemProps, LobeSelectItemText, LobeSelectItemTextProps, LobeSelectList, LobeSelectListProps, LobeSelectPopup, LobeSelectPopupProps, LobeSelectPortal, LobeSelectPortalProps, LobeSelectPositioner, LobeSelectPositionerProps, LobeSelectRoot, LobeSelectScrollDownArrow, LobeSelectScrollDownArrowProps, LobeSelectScrollUpArrow, LobeSelectScrollUpArrowProps, LobeSelectSeparator, LobeSelectTrigger, LobeSelectTriggerProps, LobeSelectValue, LobeSelectValueProps } from "./LobeSelect/atoms.mjs";
|
|
203
|
-
import { LobeSelect } from "./LobeSelect/LobeSelect.mjs";
|
|
204
|
-
import "./LobeSelect/index.mjs";
|
|
205
|
-
import { LobeSwitchChangeEventHandler, LobeSwitchClassNames, LobeSwitchClickEventHandler, LobeSwitchContextType, LobeSwitchIconPosition, LobeSwitchIconProps, LobeSwitchProps, LobeSwitchRootProps, LobeSwitchSize, LobeSwitchStyles, LobeSwitchThumbProps } from "./LobeSwitch/type.mjs";
|
|
206
|
-
import { styles } from "./LobeSwitch/style.mjs";
|
|
207
|
-
import { LobeSwitchIcon, LobeSwitchRoot, LobeSwitchThumb, useLobeSwitchContext } from "./LobeSwitch/atoms.mjs";
|
|
208
|
-
import { LobeSwitch } from "./LobeSwitch/LobeSwitch.mjs";
|
|
209
|
-
import "./LobeSwitch/index.mjs";
|
|
210
201
|
import { mermaidThemes } from "./Mermaid/const.mjs";
|
|
211
202
|
import { MermaidProps, SyntaxMermaidProps } from "./Mermaid/type.mjs";
|
|
212
203
|
import { Mermaid } from "./Mermaid/Mermaid.mjs";
|
|
@@ -238,13 +229,13 @@ import "./MaskShadow/index.mjs";
|
|
|
238
229
|
import { MaterialFileTypeIconProps } from "./MaterialFileTypeIcon/type.mjs";
|
|
239
230
|
import { MaterialFileTypeIcon } from "./MaterialFileTypeIcon/MaterialFileTypeIcon.mjs";
|
|
240
231
|
import "./MaterialFileTypeIcon/index.mjs";
|
|
241
|
-
import { styles
|
|
232
|
+
import { styles } from "./Menu/sharedStyle.mjs";
|
|
242
233
|
import { I18nProvider, I18nProviderProps } from "./i18n/context.mjs";
|
|
243
234
|
import { useTranslation } from "./i18n/useTranslation.mjs";
|
|
244
235
|
import "./Provider.mjs";
|
|
245
|
-
import { ScrollAreaContent, ScrollAreaContentProps, ScrollAreaCorner, ScrollAreaCornerProps, ScrollAreaRoot, ScrollAreaRootProps, ScrollAreaScrollbar, ScrollAreaScrollbarProps, ScrollAreaThumb, ScrollAreaThumbProps, ScrollAreaViewport, ScrollAreaViewportProps } from "./ScrollArea/atoms.mjs";
|
|
246
|
-
import { ScrollAreaProps } from "./ScrollArea/type.mjs";
|
|
247
|
-
import { ScrollArea } from "./ScrollArea/ScrollArea.mjs";
|
|
236
|
+
import { ScrollAreaContent, ScrollAreaContentProps, ScrollAreaCorner, ScrollAreaCornerProps, ScrollAreaRoot, ScrollAreaRootProps, ScrollAreaScrollbar, ScrollAreaScrollbarProps, ScrollAreaThumb, ScrollAreaThumbProps, ScrollAreaViewport, ScrollAreaViewportProps } from "./base-ui/ScrollArea/atoms.mjs";
|
|
237
|
+
import { ScrollAreaProps } from "./base-ui/ScrollArea/type.mjs";
|
|
238
|
+
import { ScrollArea } from "./base-ui/ScrollArea/ScrollArea.mjs";
|
|
248
239
|
import "./ScrollArea/index.mjs";
|
|
249
240
|
import { ScrollShadowProps } from "./ScrollShadow/type.mjs";
|
|
250
241
|
import { ScrollShadow } from "./ScrollShadow/ScrollShadow.mjs";
|
|
@@ -291,8 +282,8 @@ import "./ThemeProvider/index.mjs";
|
|
|
291
282
|
import { ThemeSwitchProps } from "./ThemeSwitch/type.mjs";
|
|
292
283
|
import { ThemeSwitch } from "./ThemeSwitch/ThemeSwitch.mjs";
|
|
293
284
|
import "./ThemeSwitch/index.mjs";
|
|
294
|
-
import { ToastAPI, ToastInstance, ToastOptions, ToastPosition, ToastPromiseOptions, ToastProps, ToastType } from "./Toast/type.mjs";
|
|
295
|
-
import { ToastHost, ToastHostProps, toast, useToast } from "./Toast/imperative.mjs";
|
|
285
|
+
import { ToastAPI, ToastInstance, ToastOptions, ToastPosition, ToastPromiseOptions, ToastProps, ToastType } from "./base-ui/Toast/type.mjs";
|
|
286
|
+
import { ToastHost, ToastHostProps, toast, useToast } from "./base-ui/Toast/imperative.mjs";
|
|
296
287
|
import "./Toast/index.mjs";
|
|
297
288
|
import { TocProps } from "./Toc/type.mjs";
|
|
298
289
|
import { Toc } from "./Toc/Toc.mjs";
|
|
@@ -309,4 +300,4 @@ import { LayoutSidebarInner } from "./Layout/components/LayoutSidebarInner.mjs";
|
|
|
309
300
|
import { LayoutToc } from "./Layout/components/LayoutToc.mjs";
|
|
310
301
|
import Layout from "./Layout/index.mjs";
|
|
311
302
|
import { ErrorBoundary, ErrorBoundaryProps } from "react-error-boundary";
|
|
312
|
-
export { A, AProps, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionIcon, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconProps, type ActionIconSize, Alert, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BaseMenuItemType, Block, type BlockProps, Burger, type BurgerProps, Button, type ButtonProps, type CDN, CLASSNAMES, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapse, type CollapseItemType, type CollapseProps, ColorPalettes, ColorPalettesAlpha, ColorSwatches, type ColorSwatchesProps, ColorToken, type Config, ConfigProvider, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuItem, ContextMenuTrigger, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, type DiffViewMode, DivProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelProps, DraggableSideNav, type DraggableSideNavProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type MenuItemType as DropdownMenuItemType, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, _default as FlexBasic, type FlexBasicProps, _default as Flexbox, type FlexboxProps, FluentEmoji, type FluentEmojiProps, FontLoader, type FontLoaderProps, Footer, type FooterProps, Form, FormGroup, type FormGroupItemType, type FormGroupProps, type FormInstance, FormItem, type FormItemProps, FormModal, type FormModalProps, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, Freeze, type FreezeProps, type GenericItemType, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, I18nProvider, type I18nProviderProps, Icon, type IconProps, IconProvider, type IconSize, Image, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, ImgProps, type ImperativeModalProps, Input, InputNumber, type InputNumberProps, InputOPT, type InputOPTProps, InputPassword, type InputPasswordProps, type InputProps, type ItemType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, List, ListItem, type ListItemProps, type ListProps, LobeCustomStylish, LobeCustomToken,
|
|
303
|
+
export { A, AProps, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionIcon, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconProps, type ActionIconSize, Alert, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BaseMenuItemType, Block, type BlockProps, Burger, type BurgerProps, Button, type ButtonProps, type CDN, CLASSNAMES, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapse, type CollapseItemType, type CollapseProps, ColorPalettes, ColorPalettesAlpha, ColorSwatches, type ColorSwatchesProps, ColorToken, type Config, ConfigProvider, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuItem, ContextMenuTrigger, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, type DiffViewMode, DivProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelProps, DraggableSideNav, type DraggableSideNavProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type MenuItemType as DropdownMenuItemType, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, _default as FlexBasic, type FlexBasicProps, _default as Flexbox, type FlexboxProps, FluentEmoji, type FluentEmojiProps, FontLoader, type FontLoaderProps, Footer, type FooterProps, Form, FormGroup, type FormGroupItemType, type FormGroupProps, type FormInstance, FormItem, type FormItemProps, FormModal, type FormModalProps, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, Freeze, type FreezeProps, type GenericItemType, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, I18nProvider, type I18nProviderProps, Icon, type IconProps, IconProvider, type IconSize, Image, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, ImgProps, type ImperativeModalProps, Input, InputNumber, type InputNumberProps, InputOPT, type InputOPTProps, InputPassword, type InputPasswordProps, type InputProps, type ItemType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, List, ListItem, type ListItemProps, type ListProps, LobeCustomStylish, LobeCustomToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, Menu, type MenuCheckboxItemType, type MenuInfo, type MenuItemType, type MenuProps, Mermaid, type MermaidProps, Meta, type MetaProps, Modal, ModalHost, type ModalHostProps, type ModalInstance, type ModalProps, ModalProvider, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, PatchDiff, type PatchDiffProps, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverContextValue, PopoverGroup, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, PopoverPortal, type PopoverPortalAtomProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, PresetColorKey, PresetColorType, PresetSystemColorKey, PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, type RawModalComponent, type RawModalComponentProps, type RawModalInstance, type RawModalKeyOptions, type RawModalOptions, ScrollArea, ScrollAreaContent, ScrollAreaContentProps, ScrollAreaCorner, ScrollAreaCornerProps, ScrollAreaProps, ScrollAreaRoot, ScrollAreaRootProps, ScrollAreaScrollbar, ScrollAreaScrollbarProps, ScrollAreaThumb, ScrollAreaThumbProps, ScrollAreaViewport, ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedProps, Select, type SelectProps, _default$1 as ShikiLobeTheme, SideNav, type SideNavProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBlock, type SkeletonBlockProps, SkeletonButton, type SkeletonButtonProps, SkeletonParagraph, type SkeletonParagraphProps, type SkeletonProps, SkeletonTags, type SkeletonTagsProps, SkeletonTitle, type SkeletonTitleProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, SortableList, type SortableListProps, SpanProps, SvgProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, SystemColorToken, Tabs, type TabsProps, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextProps, ThemeProvider, type ThemeProviderProps, ThemeSwitch, type ThemeSwitchProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, Trigger, Typography, type TypographyProps, Video, type VideoProps, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverPortalContainer, useToast, useTranslation };
|
package/es/index.mjs
CHANGED
|
@@ -29,11 +29,11 @@ import Text_default from "./Text/Text.mjs";
|
|
|
29
29
|
import { preventDefault, preventDefaultAndStopPropagation, stopPropagation } from "./utils/dom.mjs";
|
|
30
30
|
import AccordionItem_default from "./Accordion/AccordionItem.mjs";
|
|
31
31
|
import ActionIcon_default from "./ActionIcon/ActionIcon.mjs";
|
|
32
|
-
import { styles
|
|
33
|
-
import { DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger } from "./DropdownMenu/atoms.mjs";
|
|
32
|
+
import { styles } from "./Menu/sharedStyle.mjs";
|
|
33
|
+
import { DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger } from "./base-ui/DropdownMenu/atoms.mjs";
|
|
34
34
|
import Menu_default from "./Menu/Menu.mjs";
|
|
35
|
-
import { renderDropdownMenuItems } from "./DropdownMenu/renderItems.mjs";
|
|
36
|
-
import DropdownMenu_default from "./DropdownMenu/DropdownMenu.mjs";
|
|
35
|
+
import { renderDropdownMenuItems } from "./base-ui/DropdownMenu/renderItems.mjs";
|
|
36
|
+
import DropdownMenu_default from "./base-ui/DropdownMenu/DropdownMenu.mjs";
|
|
37
37
|
import ActionIconGroup_default from "./ActionIconGroup/ActionIconGroup.mjs";
|
|
38
38
|
import Alert_default from "./Alert/Alert.mjs";
|
|
39
39
|
import Select_default from "./AutoComplete/Select.mjs";
|
|
@@ -56,9 +56,9 @@ import Collapse_default from "./Collapse/Collapse.mjs";
|
|
|
56
56
|
import ColorSwatches_default from "./ColorSwatches/ColorSwatches.mjs";
|
|
57
57
|
import { I18nProvider } from "./i18n/context.mjs";
|
|
58
58
|
import { useTranslation } from "./i18n/useTranslation.mjs";
|
|
59
|
-
import { closeContextMenu, showContextMenu, updateContextMenuItems } from "./ContextMenu/store.mjs";
|
|
60
|
-
import { ContextMenuHost } from "./ContextMenu/ContextMenuHost.mjs";
|
|
61
|
-
import { ContextMenuTrigger } from "./ContextMenu/ContextMenuTrigger.mjs";
|
|
59
|
+
import { closeContextMenu, showContextMenu, updateContextMenuItems } from "./base-ui/ContextMenu/store.mjs";
|
|
60
|
+
import { ContextMenuHost } from "./base-ui/ContextMenu/ContextMenuHost.mjs";
|
|
61
|
+
import { ContextMenuTrigger } from "./base-ui/ContextMenu/ContextMenuTrigger.mjs";
|
|
62
62
|
import { copyToClipboard } from "./utils/copyToClipboard.mjs";
|
|
63
63
|
import CopyButton_default from "./CopyButton/CopyButton.mjs";
|
|
64
64
|
import DatePicker_default from "./DatePicker/DatePicker.mjs";
|
|
@@ -118,11 +118,6 @@ import LayoutToc_default from "./Layout/components/LayoutToc.mjs";
|
|
|
118
118
|
import Layout_default from "./Layout/index.mjs";
|
|
119
119
|
import ListItem_default from "./List/ListItem/index.mjs";
|
|
120
120
|
import List_default from "./List/index.mjs";
|
|
121
|
-
import { LobeSelectArrow, LobeSelectBackdrop, LobeSelectGroup, LobeSelectGroupLabel, LobeSelectIcon, LobeSelectItem, LobeSelectItemIndicator, LobeSelectItemText, LobeSelectList, LobeSelectPopup, LobeSelectPortal, LobeSelectPositioner, LobeSelectRoot, LobeSelectScrollDownArrow, LobeSelectScrollUpArrow, LobeSelectSeparator, LobeSelectTrigger, LobeSelectValue } from "./LobeSelect/atoms.mjs";
|
|
122
|
-
import LobeSelect_default from "./LobeSelect/LobeSelect.mjs";
|
|
123
|
-
import { styles } from "./LobeSwitch/style.mjs";
|
|
124
|
-
import { LobeSwitchIcon, LobeSwitchRoot, LobeSwitchThumb, useLobeSwitchContext } from "./LobeSwitch/atoms.mjs";
|
|
125
|
-
import LobeSwitch_default from "./LobeSwitch/LobeSwitch.mjs";
|
|
126
121
|
import { mermaidThemes } from "./Mermaid/const.mjs";
|
|
127
122
|
import SyntaxMermaid_default from "./Mermaid/SyntaxMermaid/index.mjs";
|
|
128
123
|
import Mermaid_default from "./Mermaid/Mermaid.mjs";
|
|
@@ -141,8 +136,8 @@ import Typography_default from "./Markdown/Typography.mjs";
|
|
|
141
136
|
import Markdown_default from "./Markdown/Markdown.mjs";
|
|
142
137
|
import { remarkColor } from "./Markdown/plugins/remarkColor.mjs";
|
|
143
138
|
import MaskShadow_default from "./MaskShadow/MaskShadow.mjs";
|
|
144
|
-
import { ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport } from "./ScrollArea/atoms.mjs";
|
|
145
|
-
import { ScrollArea } from "./ScrollArea/ScrollArea.mjs";
|
|
139
|
+
import { ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport } from "./base-ui/ScrollArea/atoms.mjs";
|
|
140
|
+
import { ScrollArea } from "./base-ui/ScrollArea/ScrollArea.mjs";
|
|
146
141
|
import SearchBar_default from "./SearchBar/SearchBar.mjs";
|
|
147
142
|
import Segmented_default from "./Segmented/Segmented.mjs";
|
|
148
143
|
import Select_default$1 from "./Select/Select.mjs";
|
|
@@ -157,8 +152,8 @@ import Skeleton_default from "./Skeleton/index.mjs";
|
|
|
157
152
|
import SliderWithInput_default from "./SliderWithInput/SliderWithInput.mjs";
|
|
158
153
|
import SortableList_default from "./SortableList/SortableList.mjs";
|
|
159
154
|
import ThemeSwitch_default from "./ThemeSwitch/ThemeSwitch.mjs";
|
|
160
|
-
import { ToastHost, toast, useToast } from "./Toast/imperative.mjs";
|
|
155
|
+
import { ToastHost, toast, useToast } from "./base-ui/Toast/imperative.mjs";
|
|
161
156
|
import Toc_default from "./Toc/Toc.mjs";
|
|
162
157
|
import { ErrorBoundary } from "react-error-boundary";
|
|
163
158
|
|
|
164
|
-
export { A_default as A, Accordion_default as Accordion, AccordionItem_default as AccordionItem, ActionIcon_default as ActionIcon, ActionIconGroup_default as ActionIconGroup, Alert_default as Alert, Select_default as AutoComplete, Avatar_default as Avatar, AvatarGroup_default as AvatarGroup, Block_default as Block, Burger_default as Burger, Button_default as Button, CLASSNAMES, Center_default as Center, Checkbox_default as Checkbox, CheckboxGroup_default as CheckboxGroup, CodeDiff_default as CodeDiff, CodeEditor_default as CodeEditor, Collapse_default as Collapse, ColorSwatches_default as ColorSwatches, ConfigProvider_default as ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton_default as CopyButton, DatePicker_default as DatePicker, DownloadButton_default as DownloadButton, DraggablePanel_default as DraggablePanel, DraggablePanelBody_default as DraggablePanelBody, DraggablePanelContainer_default as DraggablePanelContainer, DraggablePanelFooter_default as DraggablePanelFooter, DraggablePanelHeader_default as DraggablePanelHeader, DraggableSideNav_default as DraggableSideNav, Drawer_default as Drawer, Dropdown_default as Dropdown, DropdownMenu_default as DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EditableText_default as EditableText, EditorSlashMenu_default as EditorSlashMenu, EmojiPicker_default as EmojiPicker, Empty_default as Empty, ErrorBoundary, FileTypeIcon_default as FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FluentEmoji_default as FluentEmoji, FontLoader_default as FontLoader, Footer_default as Footer, Form_default as Form, FormGroup_default as FormGroup, FormItem_default as FormItem, FormModal_default as FormModal, FormSubmitFooter_default as FormSubmitFooter, FormTitle_default as FormTitle, Freeze_default as Freeze, Grid_default as Grid, GroupAvatar_default as GroupAvatar, GuideCard_default as GuideCard, Header_default as Header, Highlighter_default as Highlighter, Hotkey_default as Hotkey, HotkeyInput_default as HotkeyInput, I18nProvider, Icon_default as Icon, IconProvider, Image_default as Image, ImageSelect_default as ImageSelect, Input_default as Input, InputNumber_default as InputNumber, InputOPT_default as InputOPT, InputPassword_default as InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout_default as Layout, LayoutFooter_default as LayoutFooter, LayoutHeader_default as LayoutHeader, LayoutMain_default as LayoutMain, LayoutSidebar_default as LayoutSidebar, LayoutSidebarInner_default as LayoutSidebarInner, LayoutToc_default as LayoutToc, List_default as List, ListItem_default as ListItem,
|
|
159
|
+
export { A_default as A, Accordion_default as Accordion, AccordionItem_default as AccordionItem, ActionIcon_default as ActionIcon, ActionIconGroup_default as ActionIconGroup, Alert_default as Alert, Select_default as AutoComplete, Avatar_default as Avatar, AvatarGroup_default as AvatarGroup, Block_default as Block, Burger_default as Burger, Button_default as Button, CLASSNAMES, Center_default as Center, Checkbox_default as Checkbox, CheckboxGroup_default as CheckboxGroup, CodeDiff_default as CodeDiff, CodeEditor_default as CodeEditor, Collapse_default as Collapse, ColorSwatches_default as ColorSwatches, ConfigProvider_default as ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton_default as CopyButton, DatePicker_default as DatePicker, DownloadButton_default as DownloadButton, DraggablePanel_default as DraggablePanel, DraggablePanelBody_default as DraggablePanelBody, DraggablePanelContainer_default as DraggablePanelContainer, DraggablePanelFooter_default as DraggablePanelFooter, DraggablePanelHeader_default as DraggablePanelHeader, DraggableSideNav_default as DraggableSideNav, Drawer_default as Drawer, Dropdown_default as Dropdown, DropdownMenu_default as DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EditableText_default as EditableText, EditorSlashMenu_default as EditorSlashMenu, EmojiPicker_default as EmojiPicker, Empty_default as Empty, ErrorBoundary, FileTypeIcon_default as FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FluentEmoji_default as FluentEmoji, FontLoader_default as FontLoader, Footer_default as Footer, Form_default as Form, FormGroup_default as FormGroup, FormItem_default as FormItem, FormModal_default as FormModal, FormSubmitFooter_default as FormSubmitFooter, FormTitle_default as FormTitle, Freeze_default as Freeze, Grid_default as Grid, GroupAvatar_default as GroupAvatar, GuideCard_default as GuideCard, Header_default as Header, Highlighter_default as Highlighter, Hotkey_default as Hotkey, HotkeyInput_default as HotkeyInput, I18nProvider, Icon_default as Icon, IconProvider, Image_default as Image, ImageSelect_default as ImageSelect, Input_default as Input, InputNumber_default as InputNumber, InputOPT_default as InputOPT, InputPassword_default as InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout_default as Layout, LayoutFooter_default as LayoutFooter, LayoutHeader_default as LayoutHeader, LayoutMain_default as LayoutMain, LayoutSidebar_default as LayoutSidebar, LayoutSidebarInner_default as LayoutSidebarInner, LayoutToc_default as LayoutToc, List_default as List, ListItem_default as ListItem, I18nProvider as LobeUIProvider, Markdown_default as Markdown, MaskShadow_default as MaskShadow, MaterialFileTypeIcon_default as MaterialFileTypeIcon, Menu_default as Menu, Mermaid_default as Mermaid, Meta_default as Meta, Modal_default as Modal, ModalHost, ModalProvider, MotionComponent, MotionProvider, PatchDiff_default as PatchDiff, Popover_default as Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup_default as PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup_default as PreviewGroup, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow_default as ScrollShadow, SearchBar_default as SearchBar, SearchResultCards_default as SearchResultCards, Segmented_default as Segmented, Select_default$1 as Select, lobe_theme_default as ShikiLobeTheme, SideNav_default as SideNav, Skeleton_default as Skeleton, SkeletonAvatar_default as SkeletonAvatar, SkeletonBlock_default as SkeletonBlock, SkeletonButton_default as SkeletonButton, SkeletonParagraph_default as SkeletonParagraph, SkeletonTags_default as SkeletonTags, SkeletonTitle_default as SkeletonTitle, SliderWithInput_default as SliderWithInput, Snippet_default as Snippet, SortableList_default as SortableList, SyntaxHighlighter_default as SyntaxHighlighter, SyntaxMermaid_default as SyntaxMermaid, Tabs_default as Tabs, Tag_default as Tag, Text_default as Text, TextArea_default as TextArea, ThemeProvider_default as ThemeProvider, ThemeSwitch_default as ThemeSwitch, ToastHost, Toc_default as Toc, Tooltip_default as Tooltip, TooltipGroup_default as TooltipGroup, Typography_default as Typography, Video_default as Video, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverPortalContainer, useToast, useTranslation };
|
package/es/mdx/Mdx/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TypographyProps } from "../../Markdown/type.mjs";
|
|
2
2
|
import "../../Markdown/index.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react23 from "react";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
import { Pluggable } from "unified";
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ interface MdxProps extends Omit<TypographyProps, 'children'> {
|
|
|
18
18
|
remarkPlugins?: Pluggable[];
|
|
19
19
|
variant?: 'normal' | 'chat';
|
|
20
20
|
}
|
|
21
|
-
declare const Mdx:
|
|
21
|
+
declare const Mdx: react23.NamedExoticComponent<MdxProps>;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Mdx, MdxProps };
|
|
24
24
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChatHeaderTitleProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react139 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/mobile/ChatHeader/ChatHeaderTitle.d.ts
|
|
5
|
-
declare const ChatHeaderTitle:
|
|
5
|
+
declare const ChatHeaderTitle: react139.NamedExoticComponent<ChatHeaderTitleProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ChatHeaderTitle };
|
|
8
8
|
//# sourceMappingURL=ChatHeaderTitle.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChatSendButtonProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react140 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/mobile/ChatInputArea/components/ChatSendButton.d.ts
|
|
5
|
-
declare const ChatSendButton:
|
|
5
|
+
declare const ChatSendButton: react140.NamedExoticComponent<ChatSendButtonProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ChatSendButton };
|
|
8
8
|
//# sourceMappingURL=ChatSendButton.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TabBarProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react138 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/mobile/TabBar/TabBar.d.ts
|
|
5
|
-
declare const TabBar:
|
|
5
|
+
declare const TabBar: react138.NamedExoticComponent<TabBarProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { TabBar };
|
|
8
8
|
//# sourceMappingURL=TabBar.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlexboxProps } from "../../Flex/type.mjs";
|
|
2
2
|
import "../../Flex/index.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react24 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:
|
|
13
|
+
declare const StoryBook: react24.NamedExoticComponent<StoryBookProps>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { StoryBook, StoryBookProps, useControls, useCreateStore };
|
|
16
16
|
//# sourceMappingURL=index.d.mts.map
|
package/es/styles/animations.mjs
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { keyframes } from "antd-style";
|
|
2
2
|
|
|
3
3
|
//#region src/styles/animations.ts
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
opacity: 1;
|
|
12
|
-
}
|
|
4
|
+
const fadeIn = keyframes`
|
|
5
|
+
0% {
|
|
6
|
+
opacity: 0;
|
|
7
|
+
}
|
|
8
|
+
100% {
|
|
9
|
+
opacity: 1;
|
|
10
|
+
}
|
|
13
11
|
`;
|
|
14
12
|
|
|
15
13
|
//#endregion
|
|
16
|
-
export {
|
|
14
|
+
export { fadeIn };
|
|
17
15
|
//# sourceMappingURL=animations.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animations.mjs","names":[],"sources":["../../src/styles/animations.ts"],"sourcesContent":["import { keyframes } from 'antd-style';\n\nexport const
|
|
1
|
+
{"version":3,"file":"animations.mjs","names":[],"sources":["../../src/styles/animations.ts"],"sourcesContent":["import { keyframes } from 'antd-style';\n\nexport const fadeIn = keyframes`\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n`;\n"],"mappings":";;;AAEA,MAAa,SAAS,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"sideEffects": [
|
|
23
23
|
"**/*.css"
|
|
24
24
|
],
|
|
25
|
+
"type": "module",
|
|
25
26
|
"exports": {
|
|
26
27
|
".": {
|
|
27
28
|
"types": "./es/index.d.mts",
|
|
@@ -30,51 +31,62 @@
|
|
|
30
31
|
},
|
|
31
32
|
"./i18n": {
|
|
32
33
|
"types": "./es/i18n/index.d.mts",
|
|
33
|
-
"import": "./es/i18n/index.mjs"
|
|
34
|
-
"default": "./es/i18n/index.mjs"
|
|
34
|
+
"import": "./es/i18n/index.mjs"
|
|
35
35
|
},
|
|
36
36
|
"./i18n/resources/*": {
|
|
37
37
|
"types": "./es/i18n/resources/*.d.mts",
|
|
38
|
-
"import": "./es/i18n/resources/*.mjs"
|
|
39
|
-
"default": "./es/i18n/resources/*.mjs"
|
|
38
|
+
"import": "./es/i18n/resources/*.mjs"
|
|
40
39
|
},
|
|
41
40
|
"./i18n/*": {
|
|
42
41
|
"types": "./es/i18n/*.d.mts",
|
|
43
|
-
"import": "./es/i18n/*.mjs"
|
|
44
|
-
|
|
42
|
+
"import": "./es/i18n/*.mjs"
|
|
43
|
+
},
|
|
44
|
+
"./awesome": {
|
|
45
|
+
"types": "./es/awesome/index.d.mts",
|
|
46
|
+
"import": "./es/awesome/index.mjs"
|
|
47
|
+
},
|
|
48
|
+
"./brand": {
|
|
49
|
+
"types": "./es/brand/index.d.mts",
|
|
50
|
+
"import": "./es/brand/index.mjs"
|
|
51
|
+
},
|
|
52
|
+
"./chat": {
|
|
53
|
+
"types": "./es/chat/index.d.mts",
|
|
54
|
+
"import": "./es/chat/index.mjs"
|
|
55
|
+
},
|
|
56
|
+
"./color": {
|
|
57
|
+
"types": "./es/color/index.d.mts",
|
|
58
|
+
"import": "./es/color/index.mjs"
|
|
59
|
+
},
|
|
60
|
+
"./icons": {
|
|
61
|
+
"types": "./es/icons/index.d.mts",
|
|
62
|
+
"import": "./es/icons/index.mjs"
|
|
63
|
+
},
|
|
64
|
+
"./mdx": {
|
|
65
|
+
"types": "./es/mdx/index.d.mts",
|
|
66
|
+
"import": "./es/mdx/index.mjs"
|
|
67
|
+
},
|
|
68
|
+
"./mobile": {
|
|
69
|
+
"types": "./es/mobile/index.d.mts",
|
|
70
|
+
"import": "./es/mobile/index.mjs"
|
|
71
|
+
},
|
|
72
|
+
"./storybook": {
|
|
73
|
+
"types": "./es/storybook/index.d.mts",
|
|
74
|
+
"import": "./es/storybook/index.mjs"
|
|
75
|
+
},
|
|
76
|
+
"./base-ui": {
|
|
77
|
+
"types": "./es/base-ui/index.d.mts",
|
|
78
|
+
"import": "./es/base-ui/index.mjs"
|
|
45
79
|
},
|
|
46
80
|
"./es/*": {
|
|
47
81
|
"types": "./es/*.d.mts",
|
|
48
|
-
"import": "./es/*.mjs"
|
|
49
|
-
"default": "./es/*.mjs"
|
|
50
|
-
},
|
|
51
|
-
"./*": {
|
|
52
|
-
"types": "./*.d.ts",
|
|
53
|
-
"import": "./*.js",
|
|
54
|
-
"default": "./*.js"
|
|
82
|
+
"import": "./es/*.mjs"
|
|
55
83
|
}
|
|
56
84
|
},
|
|
57
85
|
"main": "es/index.mjs",
|
|
58
86
|
"module": "es/index.mjs",
|
|
59
87
|
"types": "es/index.d.mts",
|
|
60
88
|
"files": [
|
|
61
|
-
"es"
|
|
62
|
-
"awesome.d.ts",
|
|
63
|
-
"awesome.js",
|
|
64
|
-
"brand.d.ts",
|
|
65
|
-
"brand.js",
|
|
66
|
-
"chat.d.ts",
|
|
67
|
-
"chat.js",
|
|
68
|
-
"mdx.d.ts",
|
|
69
|
-
"mdx.js",
|
|
70
|
-
"mobile.d.ts",
|
|
71
|
-
"mobile.js",
|
|
72
|
-
"storybook.d.ts",
|
|
73
|
-
"storybook.js",
|
|
74
|
-
"color.d.ts",
|
|
75
|
-
"color.js",
|
|
76
|
-
"icons.d.ts",
|
|
77
|
-
"icons.js"
|
|
89
|
+
"es"
|
|
78
90
|
],
|
|
79
91
|
"scripts": {
|
|
80
92
|
"build": "tsdown && npm run build:packages",
|
|
@@ -259,5 +271,8 @@
|
|
|
259
271
|
"access": "public",
|
|
260
272
|
"provenance": true,
|
|
261
273
|
"registry": "https://registry.npmjs.org"
|
|
274
|
+
},
|
|
275
|
+
"patchedDependencies": {
|
|
276
|
+
"conventional-changelog-gitmoji-config@1.5.2": "patches/conventional-changelog-gitmoji-config@1.5.2.patch"
|
|
262
277
|
}
|
|
263
278
|
}
|
package/awesome.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './es/awesome/index.mjs';
|
package/awesome.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './es/awesome/index.mjs';
|
package/brand.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './es/brand/index.mjs';
|
package/brand.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './es/brand/index.mjs';
|
package/chat.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './es/chat/index.mjs';
|
package/chat.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './es/chat/index.mjs';
|
package/color.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './es/color/index.mjs';
|
package/color.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './es/color/index.mjs';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as react127 from "react";
|
|
2
|
-
import * as react_jsx_runtime61 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/ContextMenu/ContextMenuHost.d.ts
|
|
5
|
-
declare const ContextMenuHost: react127.MemoExoticComponent<() => react_jsx_runtime61.JSX.Element | null>;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { ContextMenuHost };
|
|
8
|
-
//# sourceMappingURL=ContextMenuHost.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuHost.mjs","names":[],"sources":["../../src/ContextMenu/ContextMenuHost.tsx"],"sourcesContent":["'use client';\n\nimport { ContextMenu } from '@base-ui/react/context-menu';\nimport { memo, useEffect, useMemo, useSyncExternalStore } from 'react';\n\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { useAppElement } from '@/ThemeProvider';\nimport { registerDevSingleton } from '@/utils/devSingleton';\nimport { preventDefaultAndStopPropagation } from '@/utils/dom';\n\nimport { renderContextMenuItems } from './renderItems';\nimport {\n closeContextMenu,\n getServerSnapshot,\n getSnapshot,\n setContextMenuState,\n subscribe,\n updateLastPointer,\n} from './store';\nimport { styles } from './style';\n\nexport const ContextMenuHost = memo(() => {\n const isClient = useIsClient();\n const appElement = useAppElement();\n const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n\n useEffect(() => {\n const DEV = process.env.NODE_ENV === 'development';\n if (!isClient || !DEV) return;\n return registerDevSingleton('ContextMenuHost', document.body);\n }, [isClient]);\n\n useEffect(() => {\n const handler = (event: MouseEvent | PointerEvent) => updateLastPointer(event);\n window.addEventListener('pointerdown', handler, true);\n window.addEventListener('contextmenu', handler, true);\n return () => {\n window.removeEventListener('pointerdown', handler, true);\n window.removeEventListener('contextmenu', handler, true);\n };\n }, []);\n\n const menuItems = useMemo(\n () =>\n renderContextMenuItems(state.items, [], {\n iconAlign: state.iconAlign,\n iconSpaceMode: state.iconSpaceMode,\n }),\n [state.items, state.iconAlign, state.iconSpaceMode],\n );\n if (!isClient) return null;\n if (!state.open && state.items.length === 0) return null;\n\n return (\n <ContextMenu.Root\n open={state.open}\n onOpenChange={(open) => {\n if (open) {\n setContextMenuState({ open });\n return;\n }\n closeContextMenu();\n }}\n >\n <ContextMenu.Portal container={appElement}>\n <ContextMenu.Positioner\n anchor={state.anchor ?? undefined}\n className={styles.positioner}\n sideOffset={6}\n >\n <ContextMenu.Popup\n className={styles.popup}\n onContextMenu={preventDefaultAndStopPropagation}\n >\n {menuItems}\n </ContextMenu.Popup>\n </ContextMenu.Positioner>\n </ContextMenu.Portal>\n </ContextMenu.Root>\n );\n});\n\nContextMenuHost.displayName = 'ContextMenuHost';\n"],"mappings":";;;;;;;;;;;;;;AAqBA,MAAa,kBAAkB,WAAW;CACxC,MAAM,WAAW,aAAa;CAC9B,MAAM,aAAa,eAAe;CAClC,MAAM,QAAQ,qBAAqB,WAAW,aAAa,kBAAkB;AAE7E,iBAAgB;EACd,MAAM,MAAM,QAAQ,IAAI,aAAa;AACrC,MAAI,CAAC,YAAY,CAAC,IAAK;AACvB,SAAO,qBAAqB,mBAAmB,SAAS,KAAK;IAC5D,CAAC,SAAS,CAAC;AAEd,iBAAgB;EACd,MAAM,WAAW,UAAqC,kBAAkB,MAAM;AAC9E,SAAO,iBAAiB,eAAe,SAAS,KAAK;AACrD,SAAO,iBAAiB,eAAe,SAAS,KAAK;AACrD,eAAa;AACX,UAAO,oBAAoB,eAAe,SAAS,KAAK;AACxD,UAAO,oBAAoB,eAAe,SAAS,KAAK;;IAEzD,EAAE,CAAC;CAEN,MAAM,YAAY,cAEd,uBAAuB,MAAM,OAAO,EAAE,EAAE;EACtC,WAAW,MAAM;EACjB,eAAe,MAAM;EACtB,CAAC,EACJ;EAAC,MAAM;EAAO,MAAM;EAAW,MAAM;EAAc,CACpD;AACD,KAAI,CAAC,SAAU,QAAO;AACtB,KAAI,CAAC,MAAM,QAAQ,MAAM,MAAM,WAAW,EAAG,QAAO;AAEpD,QACE,oBAAC,YAAY;EACX,MAAM,MAAM;EACZ,eAAe,SAAS;AACtB,OAAI,MAAM;AACR,wBAAoB,EAAE,MAAM,CAAC;AAC7B;;AAEF,qBAAkB;;YAGpB,oBAAC,YAAY;GAAO,WAAW;aAC7B,oBAAC,YAAY;IACX,QAAQ,MAAM,UAAU;IACxB,WAAW,OAAO;IAClB,YAAY;cAEZ,oBAAC,YAAY;KACX,WAAW,OAAO;KAClB,eAAe;eAEd;MACiB;KACG;IACN;GACJ;EAErB;AAEF,gBAAgB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuTrigger.mjs","names":[],"sources":["../../src/ContextMenu/ContextMenuTrigger.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport clsx from 'clsx';\nimport React, {\n cloneElement,\n type HTMLAttributes,\n isValidElement,\n memo,\n type MouseEvent,\n type ReactNode,\n useCallback,\n useId,\n useSyncExternalStore,\n} from 'react';\n\nimport { CLASSNAMES } from '@/styles/classNames';\n\nimport { getServerSnapshot, getSnapshot, showContextMenu, subscribe } from './store';\nimport { type ContextMenuItem } from './type';\n\nexport type ContextMenuTriggerProps = {\n children: ReactNode;\n /**\n * Menu items to display. Supports lazy rendering via function.\n * When provided, context menu will be automatically shown on right-click.\n */\n items?: ContextMenuItem[] | (() => ContextMenuItem[]);\n /**\n * Custom context menu handler. If `items` is provided, this is optional.\n */\n onContextMenu?: (event: MouseEvent<HTMLElement>) => void;\n} & Omit<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'children'>;\n\nconst styles = {\n trigger: {\n display: 'contents',\n },\n};\n\nexport const ContextMenuTrigger = memo<ContextMenuTriggerProps>(\n ({ children, items, onContextMenu, ...rest }) => {\n const triggerId = useId();\n const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n const open = state.open && state.triggerId === triggerId;\n\n const handleContextMenu = useCallback(\n (event: MouseEvent<HTMLElement>) => {\n if (items) {\n event.preventDefault();\n const resolvedItems = typeof items === 'function' ? items() : items;\n showContextMenu(resolvedItems);\n }\n onContextMenu?.(event);\n },\n [items, onContextMenu],\n );\n\n const triggerProps = {\n ...rest,\n 'aria-expanded': open || undefined,\n 'className': clsx(CLASSNAMES.ContextTrigger, rest.className),\n 'data-contextmenu-trigger': triggerId,\n 'data-popup-open': open ? '' : undefined,\n 'data-state': open ? 'open' : undefined,\n 'onContextMenu': handleContextMenu,\n };\n\n if (isValidElement(children) && React.Children.only(children)) {\n return cloneElement(children, mergeProps(children.props as any, triggerProps));\n }\n\n return (\n <span style={styles.trigger} {...triggerProps}>\n {children}\n </span>\n );\n },\n);\n\nContextMenuTrigger.displayName = 'ContextMenuTrigger';\n"],"mappings":";;;;;;;;;;AAkCA,MAAM,SAAS,EACb,SAAS,EACP,SAAS,YACV,EACF;AAED,MAAa,qBAAqB,MAC/B,EAAE,UAAU,OAAO,eAAe,GAAG,WAAW;CAC/C,MAAM,YAAY,OAAO;CACzB,MAAM,QAAQ,qBAAqB,WAAW,aAAa,kBAAkB;CAC7E,MAAM,OAAO,MAAM,QAAQ,MAAM,cAAc;CAE/C,MAAM,oBAAoB,aACvB,UAAmC;AAClC,MAAI,OAAO;AACT,SAAM,gBAAgB;AAEtB,mBADsB,OAAO,UAAU,aAAa,OAAO,GAAG,MAChC;;AAEhC,kBAAgB,MAAM;IAExB,CAAC,OAAO,cAAc,CACvB;CAED,MAAM,eAAe;EACnB,GAAG;EACH,iBAAiB,QAAQ;EACzB,aAAa,KAAK,WAAW,gBAAgB,KAAK,UAAU;EAC5D,4BAA4B;EAC5B,mBAAmB,OAAO,KAAK;EAC/B,cAAc,OAAO,SAAS;EAC9B,iBAAiB;EAClB;AAED,KAAI,eAAe,SAAS,IAAI,MAAM,SAAS,KAAK,SAAS,CAC3D,QAAO,aAAa,UAAU,WAAW,SAAS,OAAc,aAAa,CAAC;AAGhF,QACE,oBAAC;EAAK,OAAO,OAAO;EAAS,GAAI;EAC9B;GACI;EAGZ;AAED,mBAAmB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderItems.mjs","names":["common","info: MenuInfo","label","labelText","isDanger","Icon"],"sources":["../../src/ContextMenu/renderItems.tsx"],"sourcesContent":["import { ContextMenu } from '@base-ui/react/context-menu';\nimport { Switch } from 'antd';\nimport { cx } from 'antd-style';\nimport { Check, ChevronRight } from 'lucide-react';\nimport { type MenuInfo } from 'rc-menu/es/interface';\nimport {\n type KeyboardEvent as ReactKeyboardEvent,\n type MouseEvent as ReactMouseEvent,\n type ReactNode,\n} from 'react';\nimport { memo, useCallback, useState } from 'react';\n\nimport common from '@/i18n/resources/en/common';\nimport { useTranslation } from '@/i18n/useTranslation';\nimport Icon from '@/Icon';\nimport {\n getItemKey,\n getItemLabel,\n hasAnyIcon,\n hasCheckboxAndIcon,\n type MenuDividerType,\n type MenuItemGroupType,\n type MenuItemType,\n renderIcon,\n type RenderItemContentOptions,\n type RenderOptions,\n type SubMenuType,\n} from '@/Menu';\nimport { preventDefaultAndStopPropagation } from '@/utils/dom';\n\nimport { styles } from './style';\nimport {\n type ContextMenuCheckboxItem,\n type ContextMenuItem,\n type ContextMenuSwitchItem,\n} from './type';\n\nexport type { IconAlign, IconSpaceMode } from '@/Menu';\n\nconst EmptyMenuItem = memo(() => {\n const { t } = useTranslation(common);\n return (\n <ContextMenu.Item disabled className={cx(styles.item, styles.empty)}>\n <div className={styles.itemContent}>\n <span className={styles.label}>{t('common.empty')}</span>\n </div>\n </ContextMenu.Item>\n );\n});\n\nEmptyMenuItem.displayName = 'EmptyMenuItem';\n\ninterface ContextMenuSwitchItemInternalProps {\n checked?: boolean;\n children: ReactNode;\n closeOnClick?: boolean;\n danger?: boolean;\n defaultChecked?: boolean;\n disabled?: boolean;\n label?: string;\n onCheckedChange?: (checked: boolean) => void;\n}\n\nconst ContextMenuSwitchItemInternal = ({\n checked: checkedProp,\n children,\n closeOnClick = false,\n danger,\n defaultChecked,\n disabled,\n label,\n onCheckedChange,\n}: ContextMenuSwitchItemInternalProps) => {\n const [internalChecked, setInternalChecked] = useState(defaultChecked ?? false);\n const isControlled = checkedProp !== undefined;\n const checked = isControlled ? checkedProp : internalChecked;\n\n const handleCheckedChange = useCallback(\n (newChecked: boolean) => {\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n onCheckedChange?.(newChecked);\n },\n [isControlled, onCheckedChange],\n );\n\n return (\n <ContextMenu.Item\n className={cx(styles.item, danger && styles.danger)}\n closeOnClick={closeOnClick}\n disabled={disabled}\n label={label}\n onClick={(e) => {\n e.preventDefault();\n if (!disabled) {\n handleCheckedChange(!checked);\n }\n }}\n >\n {children}\n <Switch\n checked={checked}\n disabled={disabled}\n size=\"small\"\n style={{ marginInlineStart: 16 }}\n onChange={handleCheckedChange}\n onClick={(_, e) => e.stopPropagation()}\n />\n </ContextMenu.Item>\n );\n};\n\nconst renderItemContent = (\n item: MenuItemType | SubMenuType | ContextMenuCheckboxItem | ContextMenuSwitchItem,\n options?: RenderItemContentOptions,\n iconNode?: ReactNode,\n) => {\n const label = getItemLabel(item);\n const desc = 'desc' in item ? item.desc : undefined;\n const extra = 'extra' in item ? item.extra : undefined;\n const indicatorOnRight = options?.indicatorOnRight;\n const alignStart = Boolean(desc) && options?.iconAlign === 'start';\n const hasCustomIcon = iconNode !== undefined && !indicatorOnRight;\n const hasIcon = hasCustomIcon ? Boolean(iconNode) : Boolean(item.icon);\n const shouldRenderIcon = hasCustomIcon\n ? Boolean(options?.reserveIconSpace || iconNode)\n : Boolean(hasIcon || options?.reserveIconSpace);\n\n const labelNode = desc ? (\n <div className={styles.labelGroup}>\n <span className={styles.label}>{label}</span>\n <span className={styles.desc}>{desc}</span>\n </div>\n ) : (\n <span className={styles.label}>{label}</span>\n );\n\n return (\n <div className={cx(styles.itemContent, alignStart && styles.itemContentAlignStart)}>\n {shouldRenderIcon ? (\n <span\n aria-hidden={!hasIcon}\n className={cx(styles.icon, alignStart && styles.iconAlignStart)}\n >\n {hasCustomIcon ? iconNode : hasIcon ? renderIcon(item.icon, 'small') : null}\n </span>\n ) : null}\n {labelNode}\n {extra ? <span className={styles.extra}>{extra}</span> : null}\n {indicatorOnRight && iconNode ? iconNode : null}\n {options?.submenu ? (\n <span className={styles.submenuArrow}>\n <ChevronRight size={16} />\n </span>\n ) : null}\n </div>\n );\n};\n\nconst invokeItemClick = (\n item: MenuItemType,\n keyPath: string[],\n event: ReactMouseEvent<HTMLElement> | ReactKeyboardEvent<HTMLElement>,\n) => {\n if (!item.onClick) return;\n const key = item.key ?? keyPath.at(-1) ?? '';\n const info: MenuInfo = {\n domEvent: event,\n item: event.currentTarget as MenuInfo['item'],\n key: String(key),\n keyPath,\n };\n item.onClick(info);\n};\n\nexport const renderContextMenuItems = (\n items: ContextMenuItem[],\n keyPath: string[] = [],\n options?: RenderOptions,\n): ReactNode[] => {\n const iconAlign = options?.iconAlign;\n const iconSpaceMode = options?.iconSpaceMode ?? 'global';\n const reserveIconSpace =\n options?.reserveIconSpace ?? hasAnyIcon(items, iconSpaceMode === 'global');\n const indicatorOnRight = options?.indicatorOnRight ?? hasCheckboxAndIcon(items);\n\n return items.map((item, index) => {\n if (!item) return null;\n\n const fallbackKey = `${keyPath.join('-') || 'root'}-${index}`;\n const itemKey = getItemKey(item, fallbackKey);\n const nextKeyPath = [...keyPath, String(itemKey)];\n\n if ((item as ContextMenuCheckboxItem).type === 'checkbox') {\n const checkboxItem = item as ContextMenuCheckboxItem;\n const label = getItemLabel(checkboxItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(checkboxItem.danger);\n const indicator = (\n <ContextMenu.CheckboxItemIndicator>\n <Icon icon={Check} size={'small'} />\n </ContextMenu.CheckboxItemIndicator>\n );\n\n return (\n <ContextMenu.CheckboxItem\n checked={checkboxItem.checked}\n className={cx(styles.item, isDanger && styles.danger)}\n closeOnClick={checkboxItem.closeOnClick}\n defaultChecked={checkboxItem.defaultChecked}\n disabled={checkboxItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={(checked) => checkboxItem.onCheckedChange?.(checked)}\n >\n {renderItemContent(\n checkboxItem,\n { iconAlign, indicatorOnRight, reserveIconSpace },\n indicator,\n )}\n </ContextMenu.CheckboxItem>\n );\n }\n\n if ((item as ContextMenuSwitchItem).type === 'switch') {\n const switchItem = item as ContextMenuSwitchItem;\n const label = getItemLabel(switchItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(switchItem.danger);\n\n return (\n <ContextMenuSwitchItemInternal\n checked={switchItem.checked}\n closeOnClick={switchItem.closeOnClick}\n danger={isDanger}\n defaultChecked={switchItem.defaultChecked}\n disabled={switchItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={switchItem.onCheckedChange}\n >\n {renderItemContent(switchItem, { iconAlign, reserveIconSpace })}\n </ContextMenuSwitchItemInternal>\n );\n }\n\n if ((item as MenuDividerType).type === 'divider') {\n return <ContextMenu.Separator className={styles.separator} key={itemKey} />;\n }\n\n if ((item as MenuItemGroupType).type === 'group') {\n const group = item as MenuItemGroupType;\n const groupReserveIconSpace =\n iconSpaceMode === 'group'\n ? group.children\n ? hasAnyIcon(group.children)\n : false\n : reserveIconSpace;\n const groupIndicatorOnRight = group.children ? hasCheckboxAndIcon(group.children) : false;\n return (\n <ContextMenu.Group key={itemKey}>\n {group.label ? (\n <ContextMenu.GroupLabel className={styles.groupLabel}>\n {group.label}\n </ContextMenu.GroupLabel>\n ) : null}\n {group.children\n ? renderContextMenuItems(group.children, nextKeyPath, {\n iconAlign,\n iconSpaceMode,\n indicatorOnRight: groupIndicatorOnRight,\n reserveIconSpace: groupReserveIconSpace,\n })\n : null}\n </ContextMenu.Group>\n );\n }\n\n if (\n (item as SubMenuType).type === 'submenu' ||\n ('children' in item && (item as SubMenuType).children)\n ) {\n const submenu = item as SubMenuType;\n const label = getItemLabel(submenu);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in submenu && Boolean(submenu.danger);\n\n return (\n <ContextMenu.SubmenuRoot key={itemKey}>\n <ContextMenu.SubmenuTrigger\n className={cx(styles.item, isDanger && styles.danger)}\n disabled={submenu.disabled}\n label={labelText}\n >\n {renderItemContent(submenu, {\n iconAlign,\n reserveIconSpace,\n submenu: true,\n })}\n </ContextMenu.SubmenuTrigger>\n <ContextMenu.Portal>\n <ContextMenu.Positioner\n alignOffset={-4}\n className={styles.positioner}\n data-submenu=\"\"\n sideOffset={-1}\n onContextMenu={preventDefaultAndStopPropagation}\n >\n <ContextMenu.Popup className={styles.popup}>\n {submenu.children && submenu.children.length > 0 ? (\n renderContextMenuItems(submenu.children, nextKeyPath, {\n iconAlign,\n iconSpaceMode,\n })\n ) : (\n <EmptyMenuItem />\n )}\n </ContextMenu.Popup>\n </ContextMenu.Positioner>\n </ContextMenu.Portal>\n </ContextMenu.SubmenuRoot>\n );\n }\n\n const menuItem = item as MenuItemType;\n const label = getItemLabel(menuItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in menuItem && Boolean(menuItem.danger);\n\n return (\n <ContextMenu.Item\n className={cx(styles.item, isDanger && styles.danger)}\n closeOnClick={menuItem.closeOnClick}\n disabled={menuItem.disabled}\n key={itemKey}\n label={labelText}\n onClick={(event) => invokeItemClick(menuItem, nextKeyPath, event)}\n >\n {renderItemContent(menuItem, { iconAlign, reserveIconSpace })}\n </ContextMenu.Item>\n );\n });\n};\n"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.mjs","names":["emptyState: ContextMenuState","contextMenuState: ContextMenuState"],"sources":["../../src/ContextMenu/store.ts"],"sourcesContent":["import type { VirtualElement } from '@floating-ui/react';\n\nimport type { IconAlign } from '@/Menu';\n\nimport type { IconSpaceMode } from './renderItems';\nimport type { ContextMenuItem } from './type';\n\nexport type ContextMenuState = {\n anchor: VirtualElement | null;\n iconAlign?: IconAlign;\n iconSpaceMode: IconSpaceMode;\n items: ContextMenuItem[];\n open: boolean;\n triggerId: string | null;\n};\n\nconst emptyState: ContextMenuState = {\n anchor: null,\n iconSpaceMode: 'global',\n items: [],\n open: false,\n triggerId: null,\n};\n\nlet contextMenuState: ContextMenuState = emptyState;\nconst listeners = new Set<() => void>();\nconst lastPointer = { ready: false, triggerId: null as string | null, x: 0, y: 0 };\n\nconst notify = () => {\n listeners.forEach((listener) => listener());\n};\n\nexport const subscribe = (listener: () => void) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n};\n\nexport const getSnapshot = () => contextMenuState;\nexport const getServerSnapshot = () => emptyState;\n\nexport const updateLastPointer = (event: MouseEvent | PointerEvent) => {\n lastPointer.x = event.clientX;\n lastPointer.y = event.clientY;\n lastPointer.ready = true;\n if (event.target instanceof Element) {\n const trigger = event.target.closest<HTMLElement>('[data-contextmenu-trigger]');\n lastPointer.triggerId = trigger?.dataset.contextmenuTrigger ?? null;\n } else {\n lastPointer.triggerId = null;\n }\n};\n\nconst createVirtualElement = (point: { x: number; y: number }): VirtualElement => ({\n contextElement: typeof document === 'undefined' ? undefined : document.body,\n getBoundingClientRect: () =>\n ({\n bottom: point.y,\n height: 0,\n left: point.x,\n right: point.x,\n toJSON: () => undefined,\n top: point.y,\n width: 0,\n x: point.x,\n y: point.y,\n }) as DOMRect,\n});\n\nexport const setContextMenuState = (next: Partial<ContextMenuState>) => {\n contextMenuState = { ...contextMenuState, ...next };\n notify();\n};\n\nexport interface ShowContextMenuOptions {\n iconAlign?: IconAlign;\n iconSpaceMode?: IconSpaceMode;\n}\n\nexport const showContextMenu = (items: ContextMenuItem[], options?: ShowContextMenuOptions) => {\n if (typeof window === 'undefined') return;\n\n const fallbackPoint = { x: window.innerWidth / 2, y: window.innerHeight / 2 };\n const point = lastPointer.ready ? { x: lastPointer.x, y: lastPointer.y } : fallbackPoint;\n\n setContextMenuState({\n anchor: createVirtualElement(point),\n iconAlign: options?.iconAlign,\n iconSpaceMode: options?.iconSpaceMode ?? 'global',\n items,\n open: true,\n triggerId: lastPointer.triggerId ?? null,\n });\n};\n\n/**\n * Update menu items while keeping current anchor/position.\n * Useful for interactive menu items (e.g. checkbox) to avoid re-positioning.\n */\nexport const updateContextMenuItems = (items: ContextMenuItem[]) => {\n if (typeof window === 'undefined') return;\n setContextMenuState({ items });\n};\n\nexport const closeContextMenu = () => {\n setContextMenuState({\n anchor: null,\n iconSpaceMode: 'global',\n items: [],\n open: false,\n triggerId: null,\n });\n};\n"],"mappings":";AAgBA,MAAMA,aAA+B;CACnC,QAAQ;CACR,eAAe;CACf,OAAO,EAAE;CACT,MAAM;CACN,WAAW;CACZ;AAED,IAAIC,mBAAqC;AACzC,MAAM,4BAAY,IAAI,KAAiB;AACvC,MAAM,cAAc;CAAE,OAAO;CAAO,WAAW;CAAuB,GAAG;CAAG,GAAG;CAAG;AAElF,MAAM,eAAe;AACnB,WAAU,SAAS,aAAa,UAAU,CAAC;;AAG7C,MAAa,aAAa,aAAyB;AACjD,WAAU,IAAI,SAAS;AACvB,cAAa,UAAU,OAAO,SAAS;;AAGzC,MAAa,oBAAoB;AACjC,MAAa,0BAA0B;AAEvC,MAAa,qBAAqB,UAAqC;AACrE,aAAY,IAAI,MAAM;AACtB,aAAY,IAAI,MAAM;AACtB,aAAY,QAAQ;AACpB,KAAI,MAAM,kBAAkB,QAE1B,aAAY,YADI,MAAM,OAAO,QAAqB,6BAA6B,EAC9C,QAAQ,sBAAsB;KAE/D,aAAY,YAAY;;AAI5B,MAAM,wBAAwB,WAAqD;CACjF,gBAAgB,OAAO,aAAa,cAAc,SAAY,SAAS;CACvE,8BACG;EACC,QAAQ,MAAM;EACd,QAAQ;EACR,MAAM,MAAM;EACZ,OAAO,MAAM;EACb,cAAc;EACd,KAAK,MAAM;EACX,OAAO;EACP,GAAG,MAAM;EACT,GAAG,MAAM;EACV;CACJ;AAED,MAAa,uBAAuB,SAAoC;AACtE,oBAAmB;EAAE,GAAG;EAAkB,GAAG;EAAM;AACnD,SAAQ;;AAQV,MAAa,mBAAmB,OAA0B,YAAqC;AAC7F,KAAI,OAAO,WAAW,YAAa;CAEnC,MAAM,gBAAgB;EAAE,GAAG,OAAO,aAAa;EAAG,GAAG,OAAO,cAAc;EAAG;AAG7E,qBAAoB;EAClB,QAAQ,qBAHI,YAAY,QAAQ;GAAE,GAAG,YAAY;GAAG,GAAG,YAAY;GAAG,GAAG,cAGtC;EACnC,WAAW,SAAS;EACpB,eAAe,SAAS,iBAAiB;EACzC;EACA,MAAM;EACN,WAAW,YAAY,aAAa;EACrC,CAAC;;;;;;AAOJ,MAAa,0BAA0B,UAA6B;AAClE,KAAI,OAAO,WAAW,YAAa;AACnC,qBAAoB,EAAE,OAAO,CAAC;;AAGhC,MAAa,yBAAyB;AACpC,qBAAoB;EAClB,QAAQ;EACR,eAAe;EACf,OAAO,EAAE;EACT,MAAM;EACN,WAAW;EACZ,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MenuCheckboxItemType } from "../Menu/checkboxItem.mjs";
|
|
2
|
-
import { MenuSwitchItemType } from "../Menu/switchItem.mjs";
|
|
3
|
-
import { BaseMenuItemType } from "../Menu/baseItem.mjs";
|
|
4
|
-
import "../Menu/index.mjs";
|
|
5
|
-
|
|
6
|
-
//#region src/ContextMenu/type.d.ts
|
|
7
|
-
type ContextMenuCheckboxItem = MenuCheckboxItemType;
|
|
8
|
-
type ContextMenuSwitchItem = MenuSwitchItemType;
|
|
9
|
-
type ContextMenuItem = BaseMenuItemType;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { ContextMenuCheckboxItem, ContextMenuItem, ContextMenuSwitchItem };
|
|
12
|
-
//# sourceMappingURL=type.d.mts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DropdownMenuProps } from "./type.mjs";
|
|
2
|
-
import * as react83 from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/DropdownMenu/DropdownMenu.d.ts
|
|
5
|
-
declare const DropdownMenu: react83.NamedExoticComponent<DropdownMenuProps<unknown>>;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { DropdownMenu };
|
|
8
|
-
//# sourceMappingURL=DropdownMenu.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.mjs","names":[],"sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport { Menu } from '@base-ui/react/menu';\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { parseTrigger } from '@/utils/parseTrigger';\n\nimport {\n DropdownMenuPopup,\n DropdownMenuPortal,\n DropdownMenuPositioner,\n DropdownMenuTrigger,\n} from './atoms';\nimport { renderDropdownMenuItems } from './renderItems';\nimport type { DropdownMenuProps } from './type';\n\nconst DropdownMenu = memo<DropdownMenuProps>(\n ({\n children,\n defaultOpen,\n iconAlign,\n iconSpaceMode,\n items,\n nativeButton,\n onOpenChange,\n onOpenChangeComplete,\n open,\n placement = 'bottomLeft',\n popupProps,\n portalProps,\n positionerProps,\n trigger = 'click',\n triggerProps,\n ...rest\n }) => {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\n\n const { openOnHover } = useMemo(() => parseTrigger(trigger), [trigger]);\n\n useEffect(() => {\n if (open === undefined) return;\n setUncontrolledOpen(open);\n }, [open]);\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean, details: Parameters<NonNullable<typeof onOpenChange>>[1]) => {\n onOpenChange?.(nextOpen, details);\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n },\n [onOpenChange, open],\n );\n\n const menuItemsRef = useRef<ReturnType<typeof renderDropdownMenuItems> | null>(null);\n const isOpen = open ?? uncontrolledOpen;\n const menuItems = useMemo(() => {\n if (isOpen) {\n const resolvedItems = typeof items === 'function' ? items() : items;\n const renderedItems = renderDropdownMenuItems(resolvedItems, [], {\n iconAlign,\n iconSpaceMode,\n });\n menuItemsRef.current = renderedItems;\n return renderedItems;\n }\n return menuItemsRef.current;\n }, [isOpen, items, iconAlign, iconSpaceMode]);\n const handleOpenChangeComplete = useCallback(\n (nextOpen: boolean) => {\n onOpenChangeComplete?.(nextOpen);\n if (!nextOpen) {\n menuItemsRef.current = null;\n }\n },\n [onOpenChangeComplete],\n );\n const { container: portalContainer, ...restPortalProps } = (portalProps ?? {}) as any;\n\n const { resolvedNativeButton } = useNativeButton({\n children,\n nativeButton,\n triggerNativeButton: triggerProps?.nativeButton,\n });\n\n const triggerElement = (\n <DropdownMenuTrigger\n {...triggerProps}\n nativeButton={resolvedNativeButton}\n openOnHover={openOnHover}\n >\n {children}\n </DropdownMenuTrigger>\n );\n\n return (\n <Menu.Root\n {...rest}\n defaultOpen={defaultOpen}\n modal={false}\n open={open}\n onOpenChange={handleOpenChange}\n onOpenChangeComplete={handleOpenChangeComplete}\n >\n {triggerElement}\n <DropdownMenuPortal container={portalContainer} {...restPortalProps}>\n <DropdownMenuPositioner\n {...positionerProps}\n hoverTrigger={openOnHover}\n placement={placement}\n >\n <DropdownMenuPopup {...popupProps}>{menuItems}</DropdownMenuPopup>\n </DropdownMenuPositioner>\n </DropdownMenuPortal>\n </Menu.Root>\n );\n },\n);\n\nDropdownMenu.displayName = 'DropdownMenuV2';\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;AAiBA,MAAM,eAAe,MAClB,EACC,UACA,aACA,WACA,eACA,OACA,cACA,cACA,sBACA,MACA,YAAY,cACZ,YACA,aACA,iBACA,UAAU,SACV,cACA,GAAG,WACC;CACJ,MAAM,CAAC,kBAAkB,uBAAuB,SAAS,QAAQ,YAAY,CAAC;CAE9E,MAAM,EAAE,gBAAgB,cAAc,aAAa,QAAQ,EAAE,CAAC,QAAQ,CAAC;AAEvE,iBAAgB;AACd,MAAI,SAAS,OAAW;AACxB,sBAAoB,KAAK;IACxB,CAAC,KAAK,CAAC;CAEV,MAAM,mBAAmB,aACtB,UAAmB,YAA6D;AAC/E,iBAAe,UAAU,QAAQ;AACjC,MAAI,SAAS,OACX,qBAAoB,SAAS;IAGjC,CAAC,cAAc,KAAK,CACrB;CAED,MAAM,eAAe,OAA0D,KAAK;CACpF,MAAM,SAAS,QAAQ;CACvB,MAAM,YAAY,cAAc;AAC9B,MAAI,QAAQ;GAEV,MAAM,gBAAgB,wBADA,OAAO,UAAU,aAAa,OAAO,GAAG,OACD,EAAE,EAAE;IAC/D;IACA;IACD,CAAC;AACF,gBAAa,UAAU;AACvB,UAAO;;AAET,SAAO,aAAa;IACnB;EAAC;EAAQ;EAAO;EAAW;EAAc,CAAC;CAC7C,MAAM,2BAA2B,aAC9B,aAAsB;AACrB,yBAAuB,SAAS;AAChC,MAAI,CAAC,SACH,cAAa,UAAU;IAG3B,CAAC,qBAAqB,CACvB;CACD,MAAM,EAAE,WAAW,iBAAiB,GAAG,oBAAqB,eAAe,EAAE;CAE7E,MAAM,EAAE,yBAAyB,gBAAgB;EAC/C;EACA;EACA,qBAAqB,cAAc;EACpC,CAAC;CAEF,MAAM,iBACJ,oBAAC;EACC,GAAI;EACJ,cAAc;EACD;EAEZ;GACmB;AAGxB,QACE,qBAAC,KAAK;EACJ,GAAI;EACS;EACb,OAAO;EACD;EACN,cAAc;EACd,sBAAsB;aAErB,gBACD,oBAAC;GAAmB,WAAW;GAAiB,GAAI;aAClD,oBAAC;IACC,GAAI;IACJ,cAAc;IACH;cAEX,oBAAC;KAAkB,GAAI;eAAa;MAA8B;KAC3C;IACN;GACX;EAGjB;AAED,aAAa,cAAc;AAE3B,2BAAe"}
|