Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

fix(import): fix lobehub ui es import path (#10893)

Innei95c684016255
diff --git a/.cursor/rules/react.mdc b/.cursor/rules/react.mdc
index 48b91d3c797..9811ceb03da 100644
--- a/.cursor/rules/react.mdc
+++ b/.cursor/rules/react.mdc
@@ -15,7 +15,7 @@ alwaysApply: false
- If unsure how to use `@lobehub/ui` components or what props they accept, search for existing usage in this project instead of guessing. Most components extend antd components with additional props
- For specific usage, search online. For example, for ActionIcon visit <https://ui.lobehub.com/components/action-icon>
-- Read `node_modules/@lobehub/ui/es/index.js` to see all available components and their props
+- Read `node_modules/@lobehub/ui/es/index.mjs` to see all available components and their props
- General
- ActionIcon
diff --git a/package.json b/package.json
index c286fda8183..78c8659c41d 100644
--- a/package.json
+++ b/package.json
@@ -196,7 +196,7 @@
"@lobehub/icons": "^3.0.0",
"@lobehub/market-sdk": "^0.23.8",
"@lobehub/tts": "^3.0.0",
- "@lobehub/ui": "^3.4.2",
+ "@lobehub/ui": "^3.4.4",
"@modelcontextprotocol/sdk": "^1.25.1",
"@neondatabase/serverless": "^1.0.2",
"@next/third-parties": "^16.1.0",
@@ -392,7 +392,7 @@
"@typescript/native-preview": "7.0.0-dev.20251210.1",
"@vitest/coverage-v8": "^3.2.4",
"ajv-keywords": "^5.1.0",
- "code-inspector-plugin": "1.3.0",
+ "code-inspector-plugin": "1.3.3",
"commitlint": "^19.8.1",
"consola": "^3.4.2",
"cross-env": "^10.1.0",
diff --git a/src/components/Error/Description.tsx b/src/components/Error/Description.tsx
index 07ab80e4db8..245ddf376fa 100644
--- a/src/components/Error/Description.tsx
+++ b/src/components/Error/Description.tsx
@@ -13,7 +13,7 @@ const container = css`
}
`;
-const Highlighter = dynamic(() => import('@lobehub/ui/es/Highlighter'), {
+const Highlighter = dynamic(() => import('@lobehub/ui/es/Highlighter/index.mjs'), {
loading: () => <Skeleton avatar={false} title={false} />,
ssr: false,
});
diff --git a/src/components/InfoTooltip/index.tsx b/src/components/InfoTooltip/index.tsx
index 559373f2f40..28544a45529 100644
--- a/src/components/InfoTooltip/index.tsx
+++ b/src/components/InfoTooltip/index.tsx
@@ -1,5 +1,5 @@
import { Icon, Tooltip, TooltipProps } from '@lobehub/ui';
-import { IconSizeType } from '@lobehub/ui/es/Icon';
+import { IconSizeType } from '@lobehub/ui/es/Icon/index.mjs';
import { useTheme } from 'antd-style';
import { CircleHelp } from 'lucide-react';
import { CSSProperties, memo } from 'react';
diff --git a/src/components/Loading/UpdateLoading/index.tsx b/src/components/Loading/UpdateLoading/index.tsx
index 9f5e75e6962..7b386c3ec0f 100644
--- a/src/components/Loading/UpdateLoading/index.tsx
+++ b/src/components/Loading/UpdateLoading/index.tsx
@@ -1,5 +1,5 @@
import { Icon } from '@lobehub/ui';
-import { IconSizeType } from '@lobehub/ui/es/Icon';
+import { IconSizeType } from '@lobehub/ui/es/Icon/index.mjs';
import { Loader2 } from 'lucide-react';
import { CSSProperties, memo } from 'react';
diff --git a/src/features/ChatInput/store/initialState.ts b/src/features/ChatInput/store/initialState.ts
index f584f1b607f..ea66583314e 100644
--- a/src/features/ChatInput/store/initialState.ts
+++ b/src/features/ChatInput/store/initialState.ts
@@ -1,6 +1,6 @@
import { IEditor, SlashOptions } from '@lobehub/editor';
import type { ChatInputProps } from '@lobehub/editor/react';
-import type { MenuProps } from '@lobehub/ui/es/Menu';
+import type { MenuProps } from '@lobehub/ui/es/Menu/index.mjs';
import { ActionKeys } from '@/features/ChatInput';
diff --git a/src/features/Conversation/ChatInput/index.tsx b/src/features/Conversation/ChatInput/index.tsx
index 70479153f52..8801cb8b0f6 100644
--- a/src/features/Conversation/ChatInput/index.tsx
+++ b/src/features/Conversation/ChatInput/index.tsx
@@ -2,7 +2,7 @@
import type { SlashOptions } from '@lobehub/editor';
import { Alert, Flexbox } from '@lobehub/ui';
-import type { MenuProps } from '@lobehub/ui/es/Menu';
+import type { MenuProps } from '@lobehub/ui/es/Menu/index.mjs';
import { type ReactNode, memo, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/features/DesktopOnboarding/Navigation.tsx b/src/features/DesktopOnboarding/Navigation.tsx
index 75452f9ba7e..18788e6c97e 100644
--- a/src/features/DesktopOnboarding/Navigation.tsx
+++ b/src/features/DesktopOnboarding/Navigation.tsx
@@ -1,7 +1,7 @@
import { Button } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import { ChevronLeft, ChevronRight } from 'lucide-react';
-import { m as motion } from 'motion/react';
+import * as motion from 'motion/react-m';
import React from 'react';
import { getThemeToken } from './styles/theme';
diff --git a/src/features/MCP/MCPInstallProgress/InstallError/ErrorDetails.tsx b/src/features/MCP/MCPInstallProgress/InstallError/ErrorDetails.tsx
index dfdaf473372..a61dd5ccf8c 100644
--- a/src/features/MCP/MCPInstallProgress/InstallError/ErrorDetails.tsx
+++ b/src/features/MCP/MCPInstallProgress/InstallError/ErrorDetails.tsx
@@ -1,7 +1,7 @@
-import { Flexbox, Highlighter, Icon , Tag , Button } from '@lobehub/ui';
+import { Button, Flexbox, Highlighter, Icon, Tag } from '@lobehub/ui';
import { useTheme } from 'antd-style';
import { ChevronDown, ChevronRight } from 'lucide-react';
-import { m as motion } from 'motion/react';
+import * as motion from 'motion/react-m';
import { memo, useState } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/features/MCP/MCPInstallProgress/MCPConfigForm.tsx b/src/features/MCP/MCPInstallProgress/MCPConfigForm.tsx
index d46392dcea2..46c09b5dde1 100644
--- a/src/features/MCP/MCPInstallProgress/MCPConfigForm.tsx
+++ b/src/features/MCP/MCPInstallProgress/MCPConfigForm.tsx
@@ -1,7 +1,7 @@
-import { Flexbox, Form, Markdown , Button } from '@lobehub/ui';
+import { Button, Flexbox, Form, Markdown } from '@lobehub/ui';
import { Form as AForm } from 'antd';
import { createStyles } from 'antd-style';
-import { m as motion } from 'motion/react';
+import * as motion from 'motion/react-m';
import { memo, useState } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/features/MCP/MCPInstallProgress/MCPDependenciesGuide.tsx b/src/features/MCP/MCPInstallProgress/MCPDependenciesGuide.tsx
index 22025759422..88157d456eb 100644
--- a/src/features/MCP/MCPInstallProgress/MCPDependenciesGuide.tsx
+++ b/src/features/MCP/MCPInstallProgress/MCPDependenciesGuide.tsx
@@ -2,7 +2,7 @@ import { Button, Flexbox, Markdown, Snippet, Text } from '@lobehub/ui';
import { Card, Space } from 'antd';
import { createStyles } from 'antd-style';
import { AlertTriangle, CheckCircle, ExternalLink, Terminal } from 'lucide-react';
-import { m as motion } from 'motion/react';
+import * as motion from 'motion/react-m';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/features/MCP/MCPInstallProgress/index.tsx b/src/features/MCP/MCPInstallProgress/index.tsx
index c13b68be7d6..e6ad68b5a9c 100644
--- a/src/features/MCP/MCPInstallProgress/index.tsx
+++ b/src/features/MCP/MCPInstallProgress/index.tsx
@@ -2,7 +2,7 @@ import { Flexbox, Text } from '@lobehub/ui';
import { Progress } from 'antd';
import { useTheme } from 'antd-style';
import isEqual from 'fast-deep-equal';
-import { m as motion } from 'motion/react';
+import * as motion from 'motion/react-m';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
diff --git a/src/features/ResourceManager/components/FolderTree/index.tsx b/src/features/ResourceManager/components/FolderTree/index.tsx
index 811a5f6cb54..ef88a08aa8b 100644
--- a/src/features/ResourceManager/components/FolderTree/index.tsx
+++ b/src/features/ResourceManager/components/FolderTree/index.tsx
@@ -4,7 +4,7 @@ import { CaretDownFilled } from '@ant-design/icons';
import { ActionIcon, Flexbox, Icon } from '@lobehub/ui';
import { createStyles } from 'antd-style';
import { FolderIcon, FolderOpenIcon } from 'lucide-react';
-import { m as motion } from 'motion/react';
+import * as motion from 'motion/react-m';
import { memo, useCallback } from 'react';
const useStyles = createStyles(({ css, token }) => ({
diff --git a/src/features/ResourceManager/components/Tree/index.tsx b/src/features/ResourceManager/components/Tree/index.tsx
index 1cb7b83f4f3..0a5fa6f3624 100644
--- a/src/features/ResourceManager/components/Tree/index.tsx
+++ b/src/features/ResourceManager/components/Tree/index.tsx
@@ -5,7 +5,7 @@ import { ActionIcon, Block, Dropdown, Flexbox, Icon } from '@lobehub/ui';
import { App, Input } from 'antd';
import { createStyles } from 'antd-style';
import { FileText, FolderIcon, FolderOpenIcon } from 'lucide-react';
-import { m as motion } from 'motion/react';
+import * as motion from 'motion/react-m';
import React, { memo, useCallback, useMemo, useReducer, useRef, useState } from 'react';
import { useNavigate } from 'react-router-dom';