@lobehub/ui 4.9.1 → 4.9.3
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 -0
- package/es/ActionIconGroup/ActionIconGroup.mjs.map +1 -1
- package/es/Alert/Alert.d.mts +2 -2
- package/es/AutoComplete/Select.d.mts +2 -2
- package/es/Avatar/Avatar.mjs +41 -31
- package/es/Avatar/Avatar.mjs.map +1 -1
- package/es/Avatar/AvatarGroup/index.d.mts +2 -2
- package/es/Avatar/utils.mjs +50 -0
- package/es/Avatar/utils.mjs.map +1 -0
- package/es/Burger/Burger.d.mts +2 -2
- package/es/CodeEditor/CodeEditor.d.mts +2 -2
- package/es/Collapse/Collapse.d.mts +2 -2
- package/es/ColorSwatches/ColorSwatches.mjs +3 -2
- package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
- package/es/ConfigProvider/index.d.mts +2 -2
- package/es/ContextMenu/ContextMenuHost.d.mts +2 -2
- 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/DropdownMenu.d.mts +2 -2
- package/es/DropdownMenu/DropdownMenu.mjs +25 -4
- package/es/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/es/DropdownMenu/type.d.mts +1 -0
- package/es/EditableText/EditableText.d.mts +2 -2
- 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/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/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/Image/PreviewGroup.mjs +2 -2
- package/es/Image/PreviewGroup.mjs.map +1 -1
- package/es/Image/components/usePreviewGroup.mjs.map +1 -1
- 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/Typography.d.mts +2 -2
- package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
- 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/MotionProvider/index.d.mts +2 -2
- package/es/SearchBar/SearchBar.d.mts +2 -2
- package/es/Segmented/Segmented.d.mts +2 -2
- package/es/Select/Select.d.mts +2 -2
- 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/GlobalStyle/antdOverride.mjs +4 -3
- package/es/ThemeProvider/GlobalStyle/antdOverride.mjs.map +1 -1
- package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
- package/es/ThemeSwitch/ThemeSwitch.mjs +1 -0
- package/es/ThemeSwitch/ThemeSwitch.mjs.map +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/Giscus/style.mjs +4 -3
- package/es/awesome/Giscus/style.mjs.map +1 -1
- 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/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/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/i18n/context.d.mts +2 -2
- package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
- package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
- 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/ShapesUploadIcon.d.mts +3 -3
- package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
- package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
- 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/utils/safeReadableColor.mjs +15 -0
- package/es/utils/safeReadableColor.mjs.map +1 -0
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@ const placementMap = {
|
|
|
44
44
|
side: "top"
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
const DropdownMenu = memo(({ children, defaultOpen, items, onOpenChange, open, placement = "bottomLeft", popupProps, portalProps, positionerProps, triggerProps, ...rest }) => {
|
|
47
|
+
const DropdownMenu = memo(({ children, defaultOpen, items, nativeButton, onOpenChange, open, placement = "bottomLeft", popupProps, portalProps, positionerProps, triggerProps, ...rest }) => {
|
|
48
48
|
const isClient = useIsClient();
|
|
49
49
|
const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));
|
|
50
50
|
useEffect(() => {
|
|
@@ -69,13 +69,34 @@ const DropdownMenu = memo(({ children, defaultOpen, items, onOpenChange, open, p
|
|
|
69
69
|
return document.body;
|
|
70
70
|
}, [isClient]);
|
|
71
71
|
const placementConfig = placementMap[placement];
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
return
|
|
72
|
+
const isNativeButtonTriggerElement = useMemo(() => {
|
|
73
|
+
if (!isValidElement(children)) return false;
|
|
74
|
+
return typeof children.type === "string" && children.type === "button";
|
|
75
75
|
}, [children]);
|
|
76
|
+
const renderer = useCallback((props) => {
|
|
77
|
+
const resolvedProps = (() => {
|
|
78
|
+
if (isNativeButtonTriggerElement) return props;
|
|
79
|
+
const { type, ...restProps } = props;
|
|
80
|
+
return restProps;
|
|
81
|
+
})();
|
|
82
|
+
return cloneElement(children, mergeProps(children.props, resolvedProps));
|
|
83
|
+
}, [children, isNativeButtonTriggerElement]);
|
|
84
|
+
const resolvedNativeButton = useMemo(() => {
|
|
85
|
+
if (nativeButton !== void 0) return nativeButton;
|
|
86
|
+
if (triggerProps?.nativeButton !== void 0) return triggerProps.nativeButton;
|
|
87
|
+
if (isNativeButtonTriggerElement) return true;
|
|
88
|
+
if (!isValidElement(children)) return void 0;
|
|
89
|
+
if (typeof children.type === "string") return false;
|
|
90
|
+
}, [
|
|
91
|
+
children,
|
|
92
|
+
isNativeButtonTriggerElement,
|
|
93
|
+
nativeButton,
|
|
94
|
+
triggerProps?.nativeButton
|
|
95
|
+
]);
|
|
76
96
|
const trigger = isValidElement(children) ? /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
77
97
|
...triggerProps,
|
|
78
98
|
className: clsx(CLASSNAMES.DropdownMenuTrigger, triggerProps?.className),
|
|
99
|
+
nativeButton: resolvedNativeButton,
|
|
79
100
|
render: renderer
|
|
80
101
|
}) : /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
81
102
|
...triggerProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.mjs","names":["topCenter: PlacementConfig","bottomCenter: PlacementConfig","placementMap: Record<DropdownMenuPlacement, PlacementConfig>","renderer: ComponentRenderFn<HTMLProps<any>, MenuTriggerState>"],"sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport { Menu, type MenuTriggerState } from '@base-ui/react/menu';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport type { ComponentRenderFn, HTMLProps } from '@base-ui/react/utils/types';\nimport type { Align, Side } from '@base-ui/react/utils/useAnchorPositioning';\nimport { cx } from 'antd-style';\nimport clsx from 'clsx';\nimport {\n cloneElement,\n isValidElement,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { styles } from '@/Menu/sharedStyle';\nimport { LOBE_THEME_APP_ID } from '@/ThemeProvider';\nimport { TOOLTIP_CONTAINER_ATTR } from '@/Tooltip/TooltipPortal';\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { CLASSNAMES } from '@/styles/classNames';\n\nimport { renderDropdownMenuItems } from './renderItems';\nimport type { DropdownMenuPlacement, DropdownMenuProps } from './type';\n\ntype PlacementConfig = {\n align: Align;\n side: Side;\n};\nconst topCenter: PlacementConfig = { align: 'center', side: 'top' };\nconst bottomCenter: PlacementConfig = { align: 'center', side: 'bottom' };\nconst topLeft: PlacementConfig = { align: 'start', side: 'top' };\nconst bottomLeft: PlacementConfig = { align: 'start', side: 'bottom' };\nconst topRight: PlacementConfig = { align: 'end', side: 'top' };\nconst bottomRight: PlacementConfig = { align: 'end', side: 'bottom' };\nconst placementMap: Record<DropdownMenuPlacement, PlacementConfig> = {\n bottom: bottomCenter,\n bottomCenter,\n bottomLeft,\n bottomRight,\n top: topCenter,\n topCenter,\n topLeft,\n topRight,\n};\n\nconst DropdownMenu = memo<DropdownMenuProps>(\n ({\n children,\n defaultOpen,\n\n items,\n onOpenChange,\n open,\n placement = 'bottomLeft',\n popupProps,\n portalProps,\n positionerProps,\n triggerProps,\n ...rest\n }) => {\n const isClient = useIsClient();\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\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 shouldRenderItems = open ?? uncontrolledOpen;\n const menuItems = useMemo(() => {\n if (!shouldRenderItems) return null;\n const resolvedItems = typeof items === 'function' ? items() : items;\n return renderDropdownMenuItems(resolvedItems);\n }, [items, shouldRenderItems]);\n const portalContainer = useMemo(() => {\n if (!isClient) return null;\n\n const themeApp = document.querySelector<HTMLElement>(`#${LOBE_THEME_APP_ID}`);\n if (themeApp) return themeApp;\n\n const tooltipContainer = document.querySelector<HTMLElement>(\n `[${TOOLTIP_CONTAINER_ATTR}=\"true\"]`,\n );\n if (tooltipContainer) return tooltipContainer;\n\n return document.body;\n }, [isClient]);\n const placementConfig = placementMap[placement];\n\n const renderer: ComponentRenderFn<HTMLProps<any>, MenuTriggerState> = useCallback(\n (props) => {\n //
|
|
1
|
+
{"version":3,"file":"DropdownMenu.mjs","names":["topCenter: PlacementConfig","bottomCenter: PlacementConfig","placementMap: Record<DropdownMenuPlacement, PlacementConfig>","renderer: ComponentRenderFn<HTMLProps<any>, MenuTriggerState>"],"sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport { Menu, type MenuTriggerState } from '@base-ui/react/menu';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport type { ComponentRenderFn, HTMLProps } from '@base-ui/react/utils/types';\nimport type { Align, Side } from '@base-ui/react/utils/useAnchorPositioning';\nimport { cx } from 'antd-style';\nimport clsx from 'clsx';\nimport {\n cloneElement,\n isValidElement,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { styles } from '@/Menu/sharedStyle';\nimport { LOBE_THEME_APP_ID } from '@/ThemeProvider';\nimport { TOOLTIP_CONTAINER_ATTR } from '@/Tooltip/TooltipPortal';\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { CLASSNAMES } from '@/styles/classNames';\n\nimport { renderDropdownMenuItems } from './renderItems';\nimport type { DropdownMenuPlacement, DropdownMenuProps } from './type';\n\ntype PlacementConfig = {\n align: Align;\n side: Side;\n};\nconst topCenter: PlacementConfig = { align: 'center', side: 'top' };\nconst bottomCenter: PlacementConfig = { align: 'center', side: 'bottom' };\nconst topLeft: PlacementConfig = { align: 'start', side: 'top' };\nconst bottomLeft: PlacementConfig = { align: 'start', side: 'bottom' };\nconst topRight: PlacementConfig = { align: 'end', side: 'top' };\nconst bottomRight: PlacementConfig = { align: 'end', side: 'bottom' };\nconst placementMap: Record<DropdownMenuPlacement, PlacementConfig> = {\n bottom: bottomCenter,\n bottomCenter,\n bottomLeft,\n bottomRight,\n top: topCenter,\n topCenter,\n topLeft,\n topRight,\n};\n\nconst DropdownMenu = memo<DropdownMenuProps>(\n ({\n children,\n defaultOpen,\n\n items,\n nativeButton,\n onOpenChange,\n open,\n placement = 'bottomLeft',\n popupProps,\n portalProps,\n positionerProps,\n triggerProps,\n ...rest\n }) => {\n const isClient = useIsClient();\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\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 shouldRenderItems = open ?? uncontrolledOpen;\n const menuItems = useMemo(() => {\n if (!shouldRenderItems) return null;\n const resolvedItems = typeof items === 'function' ? items() : items;\n return renderDropdownMenuItems(resolvedItems);\n }, [items, shouldRenderItems]);\n const portalContainer = useMemo(() => {\n if (!isClient) return null;\n\n const themeApp = document.querySelector<HTMLElement>(`#${LOBE_THEME_APP_ID}`);\n if (themeApp) return themeApp;\n\n const tooltipContainer = document.querySelector<HTMLElement>(\n `[${TOOLTIP_CONTAINER_ATTR}=\"true\"]`,\n );\n if (tooltipContainer) return tooltipContainer;\n\n return document.body;\n }, [isClient]);\n const placementConfig = placementMap[placement];\n\n const isNativeButtonTriggerElement = useMemo(() => {\n if (!isValidElement(children)) return false;\n return typeof children.type === 'string' && children.type === 'button';\n }, [children]);\n\n const renderer: ComponentRenderFn<HTMLProps<any>, MenuTriggerState> = useCallback(\n (props) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars, @typescript-eslint/no-unused-vars\n const { type, ...restProps } = props as any;\n return restProps;\n })();\n\n return cloneElement(children as any, mergeProps((children as any).props, resolvedProps));\n },\n [children, isNativeButtonTriggerElement],\n );\n\n // When we use `render`, Base UI expects the rendered element to be a native <button> by default.\n // If we can infer it's not, opt out to avoid warnings (users can still override via `nativeButton`).\n const resolvedNativeButton = useMemo(() => {\n if (nativeButton !== undefined) return nativeButton;\n if (triggerProps?.nativeButton !== undefined) return triggerProps.nativeButton;\n if (isNativeButtonTriggerElement) return true;\n if (!isValidElement(children)) return undefined;\n if (typeof children.type === 'string') return false;\n return undefined;\n }, [children, isNativeButtonTriggerElement, nativeButton, triggerProps?.nativeButton]);\n\n const trigger = isValidElement(children) ? (\n <Menu.Trigger\n {...triggerProps}\n className={clsx(CLASSNAMES.DropdownMenuTrigger, triggerProps?.className)}\n nativeButton={resolvedNativeButton}\n render={renderer}\n />\n ) : (\n <Menu.Trigger\n {...triggerProps}\n className={clsx(CLASSNAMES.DropdownMenuTrigger, triggerProps?.className)}\n >\n {children}\n </Menu.Trigger>\n );\n\n const resolvedPositionerProps = {\n ...positionerProps,\n align: positionerProps?.align ?? placementConfig?.align ?? 'center',\n side: positionerProps?.side ?? placementConfig?.side ?? 'bottom',\n sideOffset: positionerProps?.sideOffset ?? 6,\n };\n return (\n <Menu.Root {...rest} defaultOpen={defaultOpen} onOpenChange={handleOpenChange} open={open}>\n {trigger}\n <Menu.Portal container={portalProps?.container ?? portalContainer} {...portalProps}>\n <Menu.Positioner\n {...resolvedPositionerProps}\n className={(state) =>\n cx(\n styles.positioner,\n typeof positionerProps?.className === 'function'\n ? positionerProps.className(state)\n : positionerProps?.className,\n )\n }\n >\n <Menu.Popup\n {...popupProps}\n className={(state) =>\n cx(\n styles.popup,\n typeof popupProps?.className === 'function'\n ? popupProps.className(state)\n : popupProps?.className,\n )\n }\n >\n {menuItems}\n </Menu.Popup>\n </Menu.Positioner>\n </Menu.Portal>\n </Menu.Root>\n );\n },\n);\n\nDropdownMenu.displayName = 'DropdownMenuV2';\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;;;;;;AA+BA,MAAMA,YAA6B;CAAE,OAAO;CAAU,MAAM;CAAO;AACnE,MAAMC,eAAgC;CAAE,OAAO;CAAU,MAAM;CAAU;AAKzE,MAAMC,eAA+D;CACnE,QAAQ;CACR;CACA,YANkC;EAAE,OAAO;EAAS,MAAM;EAAU;CAOpE,aALmC;EAAE,OAAO;EAAO,MAAM;EAAU;CAMnE,KAAK;CACL;CACA,SAX+B;EAAE,OAAO;EAAS,MAAM;EAAO;CAY9D,UAVgC;EAAE,OAAO;EAAO,MAAM;EAAO;CAW9D;AAED,MAAM,eAAe,MAClB,EACC,UACA,aAEA,OACA,cACA,cACA,MACA,YAAY,cACZ,YACA,aACA,iBACA,cACA,GAAG,WACC;CACJ,MAAM,WAAW,aAAa;CAC9B,MAAM,CAAC,kBAAkB,uBAAuB,SAAS,QAAQ,YAAY,CAAC;AAE9E,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,oBAAoB,QAAQ;CAClC,MAAM,YAAY,cAAc;AAC9B,MAAI,CAAC,kBAAmB,QAAO;AAE/B,SAAO,wBADe,OAAO,UAAU,aAAa,OAAO,GAAG,MACjB;IAC5C,CAAC,OAAO,kBAAkB,CAAC;CAC9B,MAAM,kBAAkB,cAAc;AACpC,MAAI,CAAC,SAAU,QAAO;EAEtB,MAAM,WAAW,SAAS,cAA2B,IAAI,oBAAoB;AAC7E,MAAI,SAAU,QAAO;EAErB,MAAM,mBAAmB,SAAS,cAChC,IAAI,uBAAuB,UAC5B;AACD,MAAI,iBAAkB,QAAO;AAE7B,SAAO,SAAS;IACf,CAAC,SAAS,CAAC;CACd,MAAM,kBAAkB,aAAa;CAErC,MAAM,+BAA+B,cAAc;AACjD,MAAI,CAAC,eAAe,SAAS,CAAE,QAAO;AACtC,SAAO,OAAO,SAAS,SAAS,YAAY,SAAS,SAAS;IAC7D,CAAC,SAAS,CAAC;CAEd,MAAMC,WAAgE,aACnE,UAAU;EAGT,MAAM,uBAAuB;AAC3B,OAAI,6BAA8B,QAAO;GAEzC,MAAM,EAAE,MAAM,GAAG,cAAc;AAC/B,UAAO;MACL;AAEJ,SAAO,aAAa,UAAiB,WAAY,SAAiB,OAAO,cAAc,CAAC;IAE1F,CAAC,UAAU,6BAA6B,CACzC;CAID,MAAM,uBAAuB,cAAc;AACzC,MAAI,iBAAiB,OAAW,QAAO;AACvC,MAAI,cAAc,iBAAiB,OAAW,QAAO,aAAa;AAClE,MAAI,6BAA8B,QAAO;AACzC,MAAI,CAAC,eAAe,SAAS,CAAE,QAAO;AACtC,MAAI,OAAO,SAAS,SAAS,SAAU,QAAO;IAE7C;EAAC;EAAU;EAA8B;EAAc,cAAc;EAAa,CAAC;CAEtF,MAAM,UAAU,eAAe,SAAS,GACtC,oBAAC,KAAK;EACJ,GAAI;EACJ,WAAW,KAAK,WAAW,qBAAqB,cAAc,UAAU;EACxE,cAAc;EACd,QAAQ;GACR,GAEF,oBAAC,KAAK;EACJ,GAAI;EACJ,WAAW,KAAK,WAAW,qBAAqB,cAAc,UAAU;EAEvE;GACY;CAGjB,MAAM,0BAA0B;EAC9B,GAAG;EACH,OAAO,iBAAiB,SAAS,iBAAiB,SAAS;EAC3D,MAAM,iBAAiB,QAAQ,iBAAiB,QAAQ;EACxD,YAAY,iBAAiB,cAAc;EAC5C;AACD,QACE,qBAAC,KAAK;EAAK,GAAI;EAAmB;EAAa,cAAc;EAAwB;aAClF,SACD,oBAAC,KAAK;GAAO,WAAW,aAAa,aAAa;GAAiB,GAAI;aACrE,oBAAC,KAAK;IACJ,GAAI;IACJ,YAAY,UACV,GACE,OAAO,YACP,OAAO,iBAAiB,cAAc,aAClC,gBAAgB,UAAU,MAAM,GAChC,iBAAiB,UACtB;cAGH,oBAAC,KAAK;KACJ,GAAI;KACJ,YAAY,UACV,GACE,OAAO,OACP,OAAO,YAAY,cAAc,aAC7B,WAAW,UAAU,MAAM,GAC3B,YAAY,UACjB;eAGF;MACU;KACG;IACN;GACJ;EAGjB;AAED,aAAa,cAAc;AAE3B,2BAAe"}
|
|
@@ -11,6 +11,7 @@ type DropdownItem = BaseMenuItemType;
|
|
|
11
11
|
interface DropdownMenuProps<Payload = unknown> extends Omit<MenuRootProps<Payload>, 'children'> {
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
items: DropdownItem[] | (() => DropdownItem[]);
|
|
14
|
+
nativeButton?: boolean;
|
|
14
15
|
placement?: DropdownMenuPlacement;
|
|
15
16
|
popupProps?: MenuPopupProps;
|
|
16
17
|
portalProps?: MenuPortalProps;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EditableTextProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react55 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/EditableText/EditableText.d.ts
|
|
5
|
-
declare const EditableText:
|
|
5
|
+
declare const EditableText: react55.NamedExoticComponent<EditableTextProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { EditableText };
|
|
8
8
|
//# sourceMappingURL=EditableText.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EmojiPickerProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react54 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/EmojiPicker/EmojiPicker.d.ts
|
|
5
|
-
declare const EmojiPicker:
|
|
5
|
+
declare const EmojiPicker: react54.NamedExoticComponent<EmojiPickerProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { EmojiPicker };
|
|
8
8
|
//# sourceMappingURL=EmojiPicker.d.mts.map
|
package/es/Flex/FlexBasic.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FlexBasicProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react45 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Flex/FlexBasic.d.ts
|
|
5
|
-
declare const _default:
|
|
5
|
+
declare const _default: react45.NamedExoticComponent<FlexBasicProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default };
|
|
8
8
|
//# sourceMappingURL=FlexBasic.d.mts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react3 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/FontLoader/index.d.ts
|
|
4
4
|
interface FontLoaderProps {
|
|
5
5
|
url: string;
|
|
6
6
|
}
|
|
7
|
-
declare const FontLoader:
|
|
7
|
+
declare const FontLoader: react3.NamedExoticComponent<FontLoaderProps>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { FontLoader, FontLoaderProps };
|
|
10
10
|
//# sourceMappingURL=index.d.mts.map
|
package/es/Footer/Footer.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FooterProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react52 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Footer/Footer.d.ts
|
|
5
|
-
declare const Footer:
|
|
5
|
+
declare const Footer: react52.NamedExoticComponent<FooterProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Footer };
|
|
8
8
|
//# sourceMappingURL=Footer.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormGroupProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react48 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Form/components/FormGroup.d.ts
|
|
5
|
-
declare const FormGroup:
|
|
5
|
+
declare const FormGroup: react48.NamedExoticComponent<FormGroupProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FormGroup };
|
|
8
8
|
//# sourceMappingURL=FormGroup.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormItemProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react49 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Form/components/FormItem.d.ts
|
|
5
|
-
declare const FormItem:
|
|
5
|
+
declare const FormItem: react49.NamedExoticComponent<FormItemProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FormItem };
|
|
8
8
|
//# sourceMappingURL=FormItem.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormSubmitFooterProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react50 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Form/components/FormSubmitFooter.d.ts
|
|
5
|
-
declare const FormSubmitFooter:
|
|
5
|
+
declare const FormSubmitFooter: react50.NamedExoticComponent<FormSubmitFooterProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FormSubmitFooter };
|
|
8
8
|
//# sourceMappingURL=FormSubmitFooter.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormModalProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react51 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/FormModal/FormModal.d.ts
|
|
5
|
-
declare const FormModal:
|
|
5
|
+
declare const FormModal: react51.NamedExoticComponent<FormModalProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FormModal };
|
|
8
8
|
//# sourceMappingURL=FormModal.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GuideCardProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react110 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/GuideCard/GuideCard.d.ts
|
|
5
|
-
declare const GuideCard:
|
|
5
|
+
declare const GuideCard: react110.NamedExoticComponent<GuideCardProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { GuideCard };
|
|
8
8
|
//# sourceMappingURL=GuideCard.d.mts.map
|
package/es/Header/Header.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HeaderProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react53 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Header/Header.d.ts
|
|
5
|
-
declare const Header:
|
|
5
|
+
declare const Header: react53.NamedExoticComponent<HeaderProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Header };
|
|
8
8
|
//# sourceMappingURL=Header.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HighlighterProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react46 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Highlighter/Highlighter.d.ts
|
|
5
|
-
declare const Highlighter:
|
|
5
|
+
declare const Highlighter: react46.NamedExoticComponent<HighlighterProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Highlighter };
|
|
8
8
|
//# sourceMappingURL=Highlighter.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SyntaxHighlighterProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react47 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Highlighter/SyntaxHighlighter/index.d.ts
|
|
5
|
-
declare const SyntaxHighlighter:
|
|
5
|
+
declare const SyntaxHighlighter: react47.NamedExoticComponent<SyntaxHighlighterProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SyntaxHighlighter };
|
|
8
8
|
//# sourceMappingURL=index.d.mts.map
|
package/es/Hotkey/Hotkey.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HotkeyProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react44 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Hotkey/Hotkey.d.ts
|
|
5
|
-
declare const Hotkey:
|
|
5
|
+
declare const Hotkey: react44.NamedExoticComponent<HotkeyProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Hotkey };
|
|
8
8
|
//# sourceMappingURL=Hotkey.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HotkeyInputProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react37 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/HotkeyInput/HotkeyInput.d.ts
|
|
5
|
-
declare const HotkeyInput:
|
|
5
|
+
declare const HotkeyInput: react37.NamedExoticComponent<HotkeyInputProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { HotkeyInput };
|
|
8
8
|
//# sourceMappingURL=HotkeyInput.d.mts.map
|
package/es/Icon/Icon.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IconProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react33 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Icon/Icon.d.ts
|
|
5
|
-
declare const Icon:
|
|
5
|
+
declare const Icon: react33.NamedExoticComponent<IconProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Icon };
|
|
8
8
|
//# sourceMappingURL=Icon.d.mts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IconProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react34 from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Icon/components/IconProvider.d.ts
|
|
6
6
|
type IconContentConfig = Omit<IconProps, 'icon' | 'ref'>;
|
|
7
|
-
declare const IconContext:
|
|
8
|
-
declare const IconProvider:
|
|
7
|
+
declare const IconContext: react34.Context<IconContentConfig>;
|
|
8
|
+
declare const IconProvider: react34.NamedExoticComponent<{
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
config?: IconContentConfig;
|
|
11
11
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PreviewGroupProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react36 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Image/PreviewGroup.d.ts
|
|
5
|
-
declare const PreviewGroup:
|
|
5
|
+
declare const PreviewGroup: react36.NamedExoticComponent<PreviewGroupProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { PreviewGroup };
|
|
8
8
|
//# sourceMappingURL=PreviewGroup.d.mts.map
|
|
@@ -8,11 +8,11 @@ import { Image } from "antd";
|
|
|
8
8
|
//#region src/Image/PreviewGroup.tsx
|
|
9
9
|
const { PreviewGroup: AntdPreviewGroup } = Image;
|
|
10
10
|
const PreviewGroup = memo(({ items, children, enable = true, preview }) => {
|
|
11
|
-
const
|
|
11
|
+
const mergePreview = usePreviewGroup_default(preview);
|
|
12
12
|
if (!enable) return children;
|
|
13
13
|
return /* @__PURE__ */ jsx(AntdPreviewGroup, {
|
|
14
14
|
items,
|
|
15
|
-
preview:
|
|
15
|
+
preview: mergePreview,
|
|
16
16
|
children
|
|
17
17
|
});
|
|
18
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewGroup.mjs","names":["usePreviewGroup"],"sources":["../../src/Image/PreviewGroup.tsx"],"sourcesContent":["'use client';\n\nimport { Image } from 'antd';\nimport { memo } from 'react';\n\nimport usePreviewGroup from './components/usePreviewGroup';\nimport { PreviewGroupProps } from './type';\n\nconst { PreviewGroup: AntdPreviewGroup } = Image;\n\nconst PreviewGroup = memo<PreviewGroupProps>(({ items, children, enable = true, preview }) => {\n const
|
|
1
|
+
{"version":3,"file":"PreviewGroup.mjs","names":["usePreviewGroup"],"sources":["../../src/Image/PreviewGroup.tsx"],"sourcesContent":["'use client';\n\nimport { Image } from 'antd';\nimport { memo } from 'react';\n\nimport usePreviewGroup from './components/usePreviewGroup';\nimport { PreviewGroupProps } from './type';\n\nconst { PreviewGroup: AntdPreviewGroup } = Image;\n\nconst PreviewGroup = memo<PreviewGroupProps>(({ items, children, enable = true, preview }) => {\n const mergePreview = usePreviewGroup(preview);\n\n if (!enable) return children;\n\n return (\n <AntdPreviewGroup items={items} preview={mergePreview}>\n {children}\n </AntdPreviewGroup>\n );\n});\n\nPreviewGroup.displayName = 'PreviewGroup';\n\nexport default PreviewGroup;\n"],"mappings":";;;;;;;;AAQA,MAAM,EAAE,cAAc,qBAAqB;AAE3C,MAAM,eAAe,MAAyB,EAAE,OAAO,UAAU,SAAS,MAAM,cAAc;CAC5F,MAAM,eAAeA,wBAAgB,QAAQ;AAE7C,KAAI,CAAC,OAAQ,QAAO;AAEpB,QACE,oBAAC;EAAwB;EAAO,SAAS;EACtC;GACgB;EAErB;AAEF,aAAa,cAAc;AAE3B,2BAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePreviewGroup.mjs","names":["Toolbar","Icon","Preview","componentStyles"],"sources":["../../../src/Image/components/usePreviewGroup.tsx"],"sourcesContent":["import { cx } from 'antd-style';\nimport type { GroupPreviewConfig } from 'antd/es/image/PreviewGroup';\nimport { X } from 'lucide-react';\nimport { useMemo, useState } from 'react';\n\nimport Icon from '@/Icon';\n\nimport { styles as componentStyles, styles } from '../style';\nimport type { PreviewGroupPreviewOptions } from '../type';\nimport Preview from './Preview';\nimport Toolbar from './Toolbar';\n\nexport const usePreview = (\n props: PreviewGroupPreviewOptions | boolean | undefined,\n): GroupPreviewConfig | boolean => {\n const [visible, setVisible] = useState(false);\n\n return useMemo(() => {\n if (props === false) return props;\n\n const {\n onVisibleChange,\n onOpenChange,\n minScale = 0.32,\n maxScale = 32,\n toolbarAddon,\n rootClassName,\n imageRender,\n toolbarRender,\n ...rest\n }: PreviewGroupPreviewOptions = (\n props === true ? {} : props || {}\n ) as PreviewGroupPreviewOptions;\n\n return {\n actionsRender: (_, info) => {\n const originalNode = (\n <Toolbar info={info} maxScale={maxScale} minScale={minScale}>\n {toolbarAddon}\n </Toolbar>\n );\n if (toolbarRender) return toolbarRender(originalNode, info);\n return originalNode;\n },\n closeIcon: <Icon color={'#fff'} icon={X} />,\n imageRender: (originalNode, info) => {\n const node = <Preview visible={visible}>{originalNode}</Preview>;\n if (imageRender) return imageRender(node, info);\n return node;\n },\n maxScale,\n minScale,\n onOpenChange: (open: boolean, info: { current: number }) => {\n setVisible(open);\n // 支持新的 onOpenChange\n onOpenChange?.(open, info);\n // 向后兼容旧的 onVisibleChange (注意参数差异)\n onVisibleChange?.(open, !open, info.current);\n },\n rootClassName: cx(styles.preview, rootClassName),\n ...rest,\n };\n }, [props, visible, componentStyles]);\n};\n\nexport default usePreview;\n"],"mappings":";;;;;;;;;;AAYA,MAAa,cACX,UACiC;CACjC,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;AAE7C,QAAO,cAAc;AACnB,MAAI,UAAU,MAAO,QAAO;EAE5B,MAAM,EACJ,iBACA,cACA,WAAW,KACX,WAAW,IACX,cACA,eACA,aACA,eACA,GAAG,SAEH,UAAU,OAAO,EAAE,GAAG,SAAS,EAAE;AAGnC,SAAO;GACL,gBAAgB,GAAG,SAAS;IAC1B,MAAM,eACJ,oBAACA;KAAc;KAAgB;KAAoB;eAChD;MACO;AAEZ,QAAI,cAAe,QAAO,cAAc,cAAc,KAAK;AAC3D,WAAO;;GAET,WAAW,oBAACC;IAAK,OAAO;IAAQ,MAAM;KAAK;
|
|
1
|
+
{"version":3,"file":"usePreviewGroup.mjs","names":["Toolbar","Icon","Preview","componentStyles"],"sources":["../../../src/Image/components/usePreviewGroup.tsx"],"sourcesContent":["import { cx } from 'antd-style';\nimport type { GroupPreviewConfig } from 'antd/es/image/PreviewGroup';\nimport { X } from 'lucide-react';\nimport { useMemo, useState } from 'react';\n\nimport Icon from '@/Icon';\n\nimport { styles as componentStyles, styles } from '../style';\nimport type { PreviewGroupPreviewOptions } from '../type';\nimport Preview from './Preview';\nimport Toolbar from './Toolbar';\n\nexport const usePreview = (\n props: PreviewGroupPreviewOptions | boolean | undefined,\n): GroupPreviewConfig | boolean => {\n const [visible, setVisible] = useState(false);\n\n return useMemo(() => {\n if (props === false) return props;\n\n const {\n onVisibleChange,\n onOpenChange,\n minScale = 0.32,\n maxScale = 32,\n toolbarAddon,\n rootClassName,\n imageRender,\n toolbarRender,\n ...rest\n }: PreviewGroupPreviewOptions = (\n props === true ? {} : props || {}\n ) as PreviewGroupPreviewOptions;\n\n return {\n actionsRender: (_, info) => {\n const originalNode = (\n <Toolbar info={info} maxScale={maxScale} minScale={minScale}>\n {toolbarAddon}\n </Toolbar>\n );\n if (toolbarRender) return toolbarRender(originalNode, info);\n return originalNode;\n },\n closeIcon: <Icon color={'#fff'} icon={X} />,\n\n imageRender: (originalNode, info) => {\n const node = <Preview visible={visible}>{originalNode}</Preview>;\n if (imageRender) return imageRender(node, info);\n return node;\n },\n maxScale,\n minScale,\n onOpenChange: (open: boolean, info: { current: number }) => {\n setVisible(open);\n // 支持新的 onOpenChange\n onOpenChange?.(open, info);\n // 向后兼容旧的 onVisibleChange (注意参数差异)\n onVisibleChange?.(open, !open, info.current);\n },\n rootClassName: cx(styles.preview, rootClassName),\n ...rest,\n } satisfies GroupPreviewConfig;\n }, [props, visible, componentStyles]);\n};\n\nexport default usePreview;\n"],"mappings":";;;;;;;;;;AAYA,MAAa,cACX,UACiC;CACjC,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;AAE7C,QAAO,cAAc;AACnB,MAAI,UAAU,MAAO,QAAO;EAE5B,MAAM,EACJ,iBACA,cACA,WAAW,KACX,WAAW,IACX,cACA,eACA,aACA,eACA,GAAG,SAEH,UAAU,OAAO,EAAE,GAAG,SAAS,EAAE;AAGnC,SAAO;GACL,gBAAgB,GAAG,SAAS;IAC1B,MAAM,eACJ,oBAACA;KAAc;KAAgB;KAAoB;eAChD;MACO;AAEZ,QAAI,cAAe,QAAO,cAAc,cAAc,KAAK;AAC3D,WAAO;;GAET,WAAW,oBAACC;IAAK,OAAO;IAAQ,MAAM;KAAK;GAE3C,cAAc,cAAc,SAAS;IACnC,MAAM,OAAO,oBAACC;KAAiB;eAAU;MAAuB;AAChE,QAAI,YAAa,QAAO,YAAY,MAAM,KAAK;AAC/C,WAAO;;GAET;GACA;GACA,eAAe,MAAe,SAA8B;AAC1D,eAAW,KAAK;AAEhB,mBAAe,MAAM,KAAK;AAE1B,sBAAkB,MAAM,CAAC,MAAM,KAAK,QAAQ;;GAE9C,eAAe,GAAG,OAAO,SAAS,cAAc;GAChD,GAAG;GACJ;IACA;EAAC;EAAO;EAASC;EAAgB,CAAC;;AAGvC,8BAAe"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ImageSelectProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react74 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/ImageSelect/ImageSelect.d.ts
|
|
5
|
-
declare const ImageSelect:
|
|
5
|
+
declare const ImageSelect: react74.NamedExoticComponent<ImageSelectProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ImageSelect };
|
|
8
8
|
//# sourceMappingURL=ImageSelect.d.mts.map
|
package/es/Input/Input.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react111 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/Input.d.ts
|
|
5
|
-
declare const Input:
|
|
5
|
+
declare const Input: react111.NamedExoticComponent<InputProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Input };
|
|
8
8
|
//# sourceMappingURL=Input.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputNumberProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react112 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/InputNumber.d.ts
|
|
5
|
-
declare const InputNumber:
|
|
5
|
+
declare const InputNumber: react112.NamedExoticComponent<InputNumberProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { InputNumber };
|
|
8
8
|
//# sourceMappingURL=InputNumber.d.mts.map
|
package/es/Input/InputOPT.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputOPTProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react113 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/InputOPT.d.ts
|
|
5
|
-
declare const InputOPT:
|
|
5
|
+
declare const InputOPT: react113.NamedExoticComponent<InputOPTProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { InputOPT };
|
|
8
8
|
//# sourceMappingURL=InputOPT.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputPasswordProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react114 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/InputPassword.d.ts
|
|
5
|
-
declare const InputPassword:
|
|
5
|
+
declare const InputPassword: react114.NamedExoticComponent<InputPasswordProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { InputPassword };
|
|
8
8
|
//# sourceMappingURL=InputPassword.d.mts.map
|
package/es/Input/TextArea.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TextAreaProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react115 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/TextArea.d.ts
|
|
5
|
-
declare const TextArea:
|
|
5
|
+
declare const TextArea: react115.NamedExoticComponent<TextAreaProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { TextArea };
|
|
8
8
|
//# sourceMappingURL=TextArea.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
2
|
import "../../index.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react39 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Layout/components/LayoutFooter.d.ts
|
|
6
|
-
declare const LayoutFooter:
|
|
6
|
+
declare const LayoutFooter: react39.NamedExoticComponent<DivProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { LayoutFooter };
|
|
9
9
|
//# sourceMappingURL=LayoutFooter.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LayoutHeaderProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react38 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Layout/components/LayoutHeader.d.ts
|
|
5
|
-
declare const LayoutHeader:
|
|
5
|
+
declare const LayoutHeader: react38.NamedExoticComponent<LayoutHeaderProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { LayoutHeader };
|
|
8
8
|
//# sourceMappingURL=LayoutHeader.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
2
|
import "../../index.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react41 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Layout/components/LayoutMain.d.ts
|
|
6
|
-
declare const LayoutMain:
|
|
6
|
+
declare const LayoutMain: react41.NamedExoticComponent<DivProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { LayoutMain };
|
|
9
9
|
//# sourceMappingURL=LayoutMain.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LayoutSidebarProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react40 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Layout/components/LayoutSidebar.d.ts
|
|
5
|
-
declare const LayoutSidebar:
|
|
5
|
+
declare const LayoutSidebar: react40.NamedExoticComponent<LayoutSidebarProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { LayoutSidebar };
|
|
8
8
|
//# sourceMappingURL=LayoutSidebar.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LayoutSidebarInnerProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react42 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Layout/components/LayoutSidebarInner.d.ts
|
|
5
|
-
declare const LayoutSidebarInner:
|
|
5
|
+
declare const LayoutSidebarInner: react42.NamedExoticComponent<LayoutSidebarInnerProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { LayoutSidebarInner };
|
|
8
8
|
//# sourceMappingURL=LayoutSidebarInner.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LayoutTocProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react43 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Layout/components/LayoutToc.d.ts
|
|
5
|
-
declare const LayoutToc:
|
|
5
|
+
declare const LayoutToc: react43.NamedExoticComponent<LayoutTocProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { LayoutToc };
|
|
8
8
|
//# sourceMappingURL=LayoutToc.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ListItemProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react30 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/List/ListItem/index.d.ts
|
|
5
|
-
declare const ListItem:
|
|
5
|
+
declare const ListItem: react30.NamedExoticComponent<ListItemProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ListItem };
|
|
8
8
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MarkdownProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react29 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Markdown/Markdown.d.ts
|
|
5
|
-
declare const Markdown:
|
|
5
|
+
declare const Markdown: react29.NamedExoticComponent<MarkdownProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Markdown };
|
|
8
8
|
//# sourceMappingURL=Markdown.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TypographyProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react28 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Markdown/Typography.d.ts
|
|
5
|
-
declare const Typography:
|
|
5
|
+
declare const Typography: react28.NamedExoticComponent<TypographyProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Typography };
|
|
8
8
|
//# sourceMappingURL=Typography.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 react4 from "react";
|
|
4
4
|
import { Ref } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/Markdown/components/SearchResultCards/index.d.ts
|
|
@@ -14,7 +14,7 @@ interface SearchResultCardsProps extends FlexboxProps {
|
|
|
14
14
|
dataSource: string[] | SearchResultItem[];
|
|
15
15
|
ref?: Ref<HTMLDivElement>;
|
|
16
16
|
}
|
|
17
|
-
declare const SearchResultCards:
|
|
17
|
+
declare const SearchResultCards: react4.NamedExoticComponent<SearchResultCardsProps>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { SearchResultCards, SearchResultCardsProps };
|
|
20
20
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MaskShadowProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react26 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/MaskShadow/MaskShadow.d.ts
|
|
5
|
-
declare const MaskShadow:
|
|
5
|
+
declare const MaskShadow: react26.NamedExoticComponent<MaskShadowProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { MaskShadow };
|
|
8
8
|
//# sourceMappingURL=MaskShadow.d.mts.map
|
package/es/Menu/Menu.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MenuProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react27 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Menu/Menu.d.ts
|
|
5
|
-
declare const Menu:
|
|
5
|
+
declare const Menu: react27.NamedExoticComponent<MenuProps<unknown>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Menu };
|
|
8
8
|
//# sourceMappingURL=Menu.d.mts.map
|
package/es/Mermaid/Mermaid.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MermaidProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react32 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Mermaid/Mermaid.d.ts
|
|
5
|
-
declare const Mermaid:
|
|
5
|
+
declare const Mermaid: react32.NamedExoticComponent<MermaidProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Mermaid };
|
|
8
8
|
//# sourceMappingURL=Mermaid.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SyntaxMermaidProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react31 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Mermaid/SyntaxMermaid/index.d.ts
|
|
5
|
-
declare const SyntaxMermaid:
|
|
5
|
+
declare const SyntaxMermaid: react31.NamedExoticComponent<SyntaxMermaidProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SyntaxMermaid };
|
|
8
8
|
//# sourceMappingURL=index.d.mts.map
|