@lobehub/ui 4.17.1 → 4.18.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/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 +8 -0
- package/es/CodeDiff/CodeDiff.mjs +122 -0
- package/es/CodeDiff/CodeDiff.mjs.map +1 -0
- package/es/CodeDiff/PatchDiff.d.mts +8 -0
- package/es/CodeDiff/PatchDiff.mjs +101 -0
- package/es/CodeDiff/PatchDiff.mjs.map +1 -0
- package/es/CodeDiff/index.d.mts +4 -0
- package/es/CodeDiff/index.d.ts +1 -0
- package/es/CodeDiff/index.js +1 -0
- package/es/CodeDiff/index.mjs +4 -0
- package/es/CodeDiff/style.mjs +122 -0
- package/es/CodeDiff/style.mjs.map +1 -0
- package/es/CodeDiff/type.d.mts +123 -0
- 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/ContextMenuHost.d.mts +3 -3
- 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 +13 -42
- package/es/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/es/DropdownMenu/atoms.d.mts +145 -0
- package/es/DropdownMenu/atoms.mjs +163 -0
- package/es/DropdownMenu/atoms.mjs.map +1 -0
- package/es/DropdownMenu/index.d.mts +3 -1
- package/es/DropdownMenu/index.mjs +3 -1
- package/es/DropdownMenu/renderItems.d.mts +10 -0
- package/es/DropdownMenu/renderItems.mjs +22 -47
- package/es/DropdownMenu/renderItems.mjs.map +1 -1
- 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/FullFeatured.mjs +1 -1
- 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/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/Markdown/type.d.mts +1 -2
- package/es/MaskShadow/MaskShadow.d.mts +2 -2
- package/es/Menu/Menu.d.mts +2 -2
- package/es/Menu/sharedStyle.mjs +1 -1
- package/es/Menu/sharedStyle.mjs.map +1 -1
- package/es/Mermaid/FullFeatured.mjs +1 -1
- package/es/Mermaid/Mermaid.d.mts +2 -2
- package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
- package/es/Mermaid/type.d.mts +1 -1
- 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 +7 -0
- package/es/Popover/PopoverGroup.mjs +14 -15
- package/es/Popover/PopoverGroup.mjs.map +1 -1
- package/es/Popover/PopoverPortal.d.mts +6 -0
- package/es/Popover/PopoverPortal.mjs +1 -1
- package/es/Popover/PopoverStandalone.mjs +20 -49
- package/es/Popover/PopoverStandalone.mjs.map +1 -1
- package/es/Popover/atoms.d.mts +77 -0
- package/es/Popover/atoms.mjs +104 -0
- package/es/Popover/atoms.mjs.map +1 -0
- package/es/Popover/context.d.mts +2 -2
- package/es/Popover/groupContext.d.mts +1 -0
- package/es/Popover/groupContext.mjs.map +1 -1
- package/es/Popover/index.d.mts +5 -2
- package/es/Popover/index.mjs +4 -1
- 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/ThemeProvider.d.mts +2 -2
- package/es/Toc/Toc.d.mts +2 -2
- package/es/Tooltip/groupContext.mjs.map +1 -1
- package/es/Video/index.d.mts +2 -2
- package/es/awesome/AuroraBackground/AuroraBackground.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/type.d.mts +4 -4
- 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/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/hooks/useMermaid.mjs.map +1 -1
- package/es/hooks/useStreamMermaid.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 +2 -2
- package/es/icons/lucideExtra/DiscordIcon.d.mts +2 -2
- package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GroupBotIcon.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/RightDoubleClickIcon.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/index.d.mts +11 -2
- package/es/index.mjs +10 -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/placement.d.mts +7 -1
- package/es/utils/placement.mjs.map +1 -1
- package/package.json +2 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MessageModalProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react130 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/chat/MessageModal/MessageModal.d.ts
|
|
5
|
-
declare const MessageModal:
|
|
5
|
+
declare const MessageModal: react130.NamedExoticComponent<MessageModalProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { MessageModal };
|
|
8
8
|
//# sourceMappingURL=MessageModal.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColorScaleItem } from "../types.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react61 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/color/ColorScales/index.d.ts
|
|
5
5
|
interface ColorScalesProps {
|
|
@@ -16,7 +16,7 @@ interface ColorScalesProps {
|
|
|
16
16
|
*/
|
|
17
17
|
scale: ColorScaleItem;
|
|
18
18
|
}
|
|
19
|
-
declare const ColorScales:
|
|
19
|
+
declare const ColorScales: react61.NamedExoticComponent<ColorScalesProps>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { ColorScales, ColorScalesProps };
|
|
22
22
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColorScaleItem } from "../types.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react62 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/color/CssVar/index.d.ts
|
|
5
5
|
interface ColorScalesProps {
|
|
@@ -16,7 +16,7 @@ interface ColorScalesProps {
|
|
|
16
16
|
*/
|
|
17
17
|
scale: ColorScaleItem;
|
|
18
18
|
}
|
|
19
|
-
declare const ColorScales:
|
|
19
|
+
declare const ColorScales: react62.NamedExoticComponent<ColorScalesProps>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { ColorScales };
|
|
22
22
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMermaid.mjs","names":["mermaidPromise: Promise<typeof import('mermaid').default | null> | null"],"sources":["../../src/hooks/useMermaid.ts"],"sourcesContent":["'use client';\n\nimport { useTheme } from 'antd-style';\nimport type { MermaidConfig } from 'mermaid
|
|
1
|
+
{"version":3,"file":"useMermaid.mjs","names":["mermaidPromise: Promise<typeof import('mermaid').default | null> | null"],"sources":["../../src/hooks/useMermaid.ts"],"sourcesContent":["'use client';\n\nimport { useTheme } from 'antd-style';\nimport type { MermaidConfig } from 'mermaid';\nimport { useEffect, useMemo, useState } from 'react';\nimport { Md5 } from 'ts-md5';\n\n// 缓存已验证的图表内容\nexport const MD5_LENGTH_THRESHOLD = 10_000;\n\n// Application-level cache for rendered Mermaid SVG\n// Key: cacheKey string, Value: Promise<string>\nconst mermaidCache = new Map<string, Promise<string>>();\n\n// Maximum cache size to prevent memory leaks\nconst MAX_CACHE_SIZE = 500;\n\n// Clean up old cache entries when limit is reached\nconst cleanupCache = () => {\n if (mermaidCache.size > MAX_CACHE_SIZE) {\n // Remove oldest 20% of entries\n const entriesToRemove = Math.floor(MAX_CACHE_SIZE * 0.2);\n const keysToRemove = Array.from(mermaidCache.keys()).slice(0, entriesToRemove);\n for (const key of keysToRemove) {\n mermaidCache.delete(key);\n }\n }\n};\n\n// 懒加载 mermaid 实例\nlet mermaidPromise: Promise<typeof import('mermaid').default | null> | null = null;\n\nexport const loadMermaid = (): Promise<typeof import('mermaid').default | null> => {\n if (typeof window === 'undefined') return Promise.resolve(null);\n\n if (!mermaidPromise) {\n mermaidPromise = import('mermaid').then((mod) => mod.default);\n }\n\n return mermaidPromise;\n};\n\n// Helper to create mermaid config\nexport const createMermaidConfig = (\n theme: ReturnType<typeof useTheme>,\n customTheme?: MermaidConfig['theme'],\n): MermaidConfig => ({\n fontFamily: theme.fontFamilyCode,\n gantt: {\n useWidth: 1920,\n },\n securityLevel: 'loose',\n startOnLoad: false,\n theme: customTheme || (theme.isDarkMode ? 'dark' : 'neutral'),\n themeVariables: customTheme\n ? undefined\n : {\n errorBkgColor: theme.colorTextDescription,\n errorTextColor: theme.colorTextDescription,\n fontFamily: theme.fontFamily,\n lineColor: theme.colorTextSecondary,\n mainBkg: theme.colorBgContainer,\n noteBkgColor: theme.colorInfoBg,\n noteTextColor: theme.colorInfoText,\n pie1: theme.geekblue,\n pie2: theme.colorWarning,\n pie3: theme.colorSuccess,\n pie4: theme.colorError,\n primaryBorderColor: theme.colorBorder,\n primaryColor: theme.colorBgContainer,\n primaryTextColor: theme.colorText,\n secondaryBorderColor: theme.colorInfoBorder,\n secondaryColor: theme.colorInfoBg,\n secondaryTextColor: theme.colorInfoText,\n tertiaryBorderColor: theme.colorSuccessBorder,\n tertiaryColor: theme.colorSuccessBg,\n tertiaryTextColor: theme.colorSuccessText,\n textColor: theme.colorText,\n },\n});\n\n/**\n * 验证并处理 Mermaid 图表内容 - 优化版本(移除 SWR)\n */\nexport const useMermaid = (\n content: string,\n {\n id,\n theme: customTheme,\n }: {\n id: string;\n theme?: MermaidConfig['theme'];\n },\n): string => {\n const theme = useTheme();\n const [data, setData] = useState<string>('');\n\n // 提取主题相关配置到 useMemo 中 - 只依赖实际使用的 theme 属性\n const mermaidConfig = useMemo(\n () => createMermaidConfig(theme, customTheme),\n [\n theme.fontFamilyCode,\n theme.isDarkMode,\n theme.colorTextDescription,\n theme.fontFamily,\n theme.colorTextSecondary,\n theme.colorBgContainer,\n theme.colorInfoBg,\n theme.colorInfoText,\n theme.geekblue,\n theme.colorWarning,\n theme.colorSuccess,\n theme.colorError,\n theme.colorBorder,\n theme.colorInfoBorder,\n theme.colorSuccessBorder,\n theme.colorSuccessBg,\n theme.colorSuccessText,\n theme.colorText,\n customTheme,\n ],\n );\n\n // 为长内容生成哈希键\n const cacheKey = useMemo((): string => {\n const hash = content.length < MD5_LENGTH_THRESHOLD ? content : Md5.hashStr(content);\n return [id, customTheme || (theme.isDarkMode ? 'd' : 'l'), hash].filter(Boolean).join('-');\n }, [content, id, theme.isDarkMode, customTheme]);\n\n useEffect(() => {\n // Check cache first\n const cachedPromise = mermaidCache.get(cacheKey);\n if (cachedPromise) {\n cachedPromise\n .then((svg) => {\n setData(svg);\n })\n .catch(() => {\n // Silently handle errors, fallback will be handled in the promise\n });\n return;\n }\n\n // Create new promise for rendering\n const renderPromise = (async (): Promise<string> => {\n try {\n const mermaidInstance = await loadMermaid();\n if (!mermaidInstance) return '';\n\n // 验证语法\n const isValid = await mermaidInstance.parse(content);\n\n if (isValid) {\n // 初始化并渲染\n mermaidInstance.initialize(mermaidConfig);\n const { svg } = await mermaidInstance.render(id, content);\n return svg;\n } else {\n throw new Error('Mermaid 语法无效');\n }\n } catch (error_) {\n console.error('Mermaid 解析错误:', error_);\n return '';\n }\n })();\n\n // Cache the promise\n mermaidCache.set(cacheKey, renderPromise);\n cleanupCache();\n\n // Handle promise result\n renderPromise\n .then((svg) => {\n // Only update if this is still the current cache key\n if (mermaidCache.get(cacheKey) === renderPromise) {\n setData(svg);\n }\n })\n .catch(() => {\n // Remove failed promise from cache\n if (mermaidCache.get(cacheKey) === renderPromise) {\n mermaidCache.delete(cacheKey);\n }\n });\n }, [cacheKey, content, id, mermaidConfig]);\n\n return data;\n};\n"],"mappings":";;;;;;;AAQA,MAAa,uBAAuB;AAIpC,MAAM,+BAAe,IAAI,KAA8B;AAGvD,MAAM,iBAAiB;AAGvB,MAAM,qBAAqB;AACzB,KAAI,aAAa,OAAO,gBAAgB;EAEtC,MAAM,kBAAkB,KAAK,MAAM,iBAAiB,GAAI;EACxD,MAAM,eAAe,MAAM,KAAK,aAAa,MAAM,CAAC,CAAC,MAAM,GAAG,gBAAgB;AAC9E,OAAK,MAAM,OAAO,aAChB,cAAa,OAAO,IAAI;;;AAM9B,IAAIA,iBAA0E;AAE9E,MAAa,oBAAsE;AACjF,KAAI,OAAO,WAAW,YAAa,QAAO,QAAQ,QAAQ,KAAK;AAE/D,KAAI,CAAC,eACH,kBAAiB,OAAO,WAAW,MAAM,QAAQ,IAAI,QAAQ;AAG/D,QAAO;;AAIT,MAAa,uBACX,OACA,iBACmB;CACnB,YAAY,MAAM;CAClB,OAAO,EACL,UAAU,MACX;CACD,eAAe;CACf,aAAa;CACb,OAAO,gBAAgB,MAAM,aAAa,SAAS;CACnD,gBAAgB,cACZ,SACA;EACE,eAAe,MAAM;EACrB,gBAAgB,MAAM;EACtB,YAAY,MAAM;EAClB,WAAW,MAAM;EACjB,SAAS,MAAM;EACf,cAAc,MAAM;EACpB,eAAe,MAAM;EACrB,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,oBAAoB,MAAM;EAC1B,cAAc,MAAM;EACpB,kBAAkB,MAAM;EACxB,sBAAsB,MAAM;EAC5B,gBAAgB,MAAM;EACtB,oBAAoB,MAAM;EAC1B,qBAAqB,MAAM;EAC3B,eAAe,MAAM;EACrB,mBAAmB,MAAM;EACzB,WAAW,MAAM;EAClB;CACN;;;;AAKD,MAAa,cACX,SACA,EACE,IACA,OAAO,kBAKE;CACX,MAAM,QAAQ,UAAU;CACxB,MAAM,CAAC,MAAM,WAAW,SAAiB,GAAG;CAG5C,MAAM,gBAAgB,cACd,oBAAoB,OAAO,YAAY,EAC7C;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN;EACD,CACF;CAGD,MAAM,WAAW,cAAsB;EACrC,MAAM,OAAO,QAAQ,SAAS,uBAAuB,UAAU,IAAI,QAAQ,QAAQ;AACnF,SAAO;GAAC;GAAI,gBAAgB,MAAM,aAAa,MAAM;GAAM;GAAK,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;IACzF;EAAC;EAAS;EAAI,MAAM;EAAY;EAAY,CAAC;AAEhD,iBAAgB;EAEd,MAAM,gBAAgB,aAAa,IAAI,SAAS;AAChD,MAAI,eAAe;AACjB,iBACG,MAAM,QAAQ;AACb,YAAQ,IAAI;KACZ,CACD,YAAY,GAEX;AACJ;;EAIF,MAAM,iBAAiB,YAA6B;AAClD,OAAI;IACF,MAAM,kBAAkB,MAAM,aAAa;AAC3C,QAAI,CAAC,gBAAiB,QAAO;AAK7B,QAFgB,MAAM,gBAAgB,MAAM,QAAQ,EAEvC;AAEX,qBAAgB,WAAW,cAAc;KACzC,MAAM,EAAE,QAAQ,MAAM,gBAAgB,OAAO,IAAI,QAAQ;AACzD,YAAO;UAEP,OAAM,IAAI,MAAM,eAAe;YAE1B,QAAQ;AACf,YAAQ,MAAM,iBAAiB,OAAO;AACtC,WAAO;;MAEP;AAGJ,eAAa,IAAI,UAAU,cAAc;AACzC,gBAAc;AAGd,gBACG,MAAM,QAAQ;AAEb,OAAI,aAAa,IAAI,SAAS,KAAK,cACjC,SAAQ,IAAI;IAEd,CACD,YAAY;AAEX,OAAI,aAAa,IAAI,SAAS,KAAK,cACjC,cAAa,OAAO,SAAS;IAE/B;IACH;EAAC;EAAU;EAAS;EAAI;EAAc,CAAC;AAE1C,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStreamMermaid.mjs","names":["timeoutId"],"sources":["../../src/hooks/useStreamMermaid.ts"],"sourcesContent":["'use client';\n\nimport { useTheme } from 'antd-style';\nimport type { MermaidConfig } from 'mermaid
|
|
1
|
+
{"version":3,"file":"useStreamMermaid.mjs","names":["timeoutId"],"sources":["../../src/hooks/useStreamMermaid.ts"],"sourcesContent":["'use client';\n\nimport { useTheme } from 'antd-style';\nimport type { MermaidConfig } from 'mermaid';\nimport { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { createMermaidConfig, loadMermaid } from './useMermaid';\n\n/**\n * 流式 Mermaid 渲染 - 支持内容逐步更新\n */\nexport const useStreamMermaid = (\n content: string,\n {\n enabled = true,\n id,\n theme: customTheme,\n }: {\n enabled?: boolean;\n id: string;\n theme?: MermaidConfig['theme'];\n },\n): string => {\n const theme = useTheme();\n const [data, setData] = useState<string>('');\n const previousContentRef = useRef<string>('');\n const latestContentRef = useRef(content);\n const renderTimeoutRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n // 提取主题相关配置到 useMemo 中\n const mermaidConfig = useMemo(\n () => createMermaidConfig(theme, customTheme),\n [\n theme.fontFamilyCode,\n theme.isDarkMode,\n theme.colorTextDescription,\n theme.fontFamily,\n theme.colorTextSecondary,\n theme.colorBgContainer,\n theme.colorInfoBg,\n theme.colorInfoText,\n theme.geekblue,\n theme.colorWarning,\n theme.colorSuccess,\n theme.colorError,\n theme.colorBorder,\n theme.colorInfoBorder,\n theme.colorSuccessBorder,\n theme.colorSuccessBg,\n theme.colorSuccessText,\n theme.colorText,\n customTheme,\n ],\n );\n\n // Update latest content ref\n useEffect(() => {\n latestContentRef.current = content;\n }, [content]);\n\n // Debounced rendering for streaming content\n useEffect(() => {\n if (!enabled) {\n setData('');\n previousContentRef.current = '';\n const timeoutId = renderTimeoutRef.current;\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n return;\n }\n\n const currentContent = latestContentRef.current;\n\n // Skip if content hasn't changed\n if (currentContent === previousContentRef.current && data) {\n return;\n }\n\n // Clear previous timeout\n const timeoutId = renderTimeoutRef.current;\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n\n // Debounce rendering for streaming content (wait 300ms after last change)\n renderTimeoutRef.current = setTimeout(async () => {\n const contentToRender = latestContentRef.current;\n\n // Skip if content changed during debounce\n if (contentToRender !== currentContent) {\n return;\n }\n\n try {\n const mermaidInstance = await loadMermaid();\n if (!mermaidInstance) return;\n\n // 验证语法\n const isValid = await mermaidInstance.parse(contentToRender);\n\n if (isValid) {\n // 初始化并渲染\n mermaidInstance.initialize(mermaidConfig);\n const { svg } = await mermaidInstance.render(id, contentToRender);\n\n // Only update if content hasn't changed during rendering\n if (latestContentRef.current === contentToRender) {\n setData(svg);\n previousContentRef.current = contentToRender;\n }\n }\n } catch (error_) {\n // Silently handle errors during streaming\n // Only log if this is the final content\n if (contentToRender === latestContentRef.current) {\n console.error('Mermaid 解析错误:', error_);\n }\n }\n }, 300);\n\n return () => {\n const timeoutId = renderTimeoutRef.current;\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [enabled, content, id, mermaidConfig, data]);\n\n return data;\n};\n"],"mappings":";;;;;;;;;;AAWA,MAAa,oBACX,SACA,EACE,UAAU,MACV,IACA,OAAO,kBAME;CACX,MAAM,QAAQ,UAAU;CACxB,MAAM,CAAC,MAAM,WAAW,SAAiB,GAAG;CAC5C,MAAM,qBAAqB,OAAe,GAAG;CAC7C,MAAM,mBAAmB,OAAO,QAAQ;CACxC,MAAM,mBAAmB,OAAkD,OAAU;CAGrF,MAAM,gBAAgB,cACd,oBAAoB,OAAO,YAAY,EAC7C;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN;EACD,CACF;AAGD,iBAAgB;AACd,mBAAiB,UAAU;IAC1B,CAAC,QAAQ,CAAC;AAGb,iBAAgB;AACd,MAAI,CAAC,SAAS;AACZ,WAAQ,GAAG;AACX,sBAAmB,UAAU;GAC7B,MAAMA,cAAY,iBAAiB;AACnC,OAAIA,YACF,cAAaA,YAAU;AAEzB;;EAGF,MAAM,iBAAiB,iBAAiB;AAGxC,MAAI,mBAAmB,mBAAmB,WAAW,KACnD;EAIF,MAAM,YAAY,iBAAiB;AACnC,MAAI,UACF,cAAa,UAAU;AAIzB,mBAAiB,UAAU,WAAW,YAAY;GAChD,MAAM,kBAAkB,iBAAiB;AAGzC,OAAI,oBAAoB,eACtB;AAGF,OAAI;IACF,MAAM,kBAAkB,MAAM,aAAa;AAC3C,QAAI,CAAC,gBAAiB;AAKtB,QAFgB,MAAM,gBAAgB,MAAM,gBAAgB,EAE/C;AAEX,qBAAgB,WAAW,cAAc;KACzC,MAAM,EAAE,QAAQ,MAAM,gBAAgB,OAAO,IAAI,gBAAgB;AAGjE,SAAI,iBAAiB,YAAY,iBAAiB;AAChD,cAAQ,IAAI;AACZ,yBAAmB,UAAU;;;YAG1B,QAAQ;AAGf,QAAI,oBAAoB,iBAAiB,QACvC,SAAQ,MAAM,iBAAiB,OAAO;;KAGzC,IAAI;AAEP,eAAa;GACX,MAAMA,cAAY,iBAAiB;AACnC,OAAIA,YACF,cAAaA,YAAU;;IAG1B;EAAC;EAAS;EAAS;EAAI;EAAe;EAAK,CAAC;AAE/C,QAAO"}
|
package/es/i18n/context.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MotionComponentType } from "../MotionProvider/index.mjs";
|
|
2
2
|
import { I18nContextValue, TranslationKey, TranslationResources, TranslationResourcesInput } from "./types.mjs";
|
|
3
3
|
import "../ConfigProvider/index.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react71 from "react";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/i18n/context.d.ts
|
|
@@ -11,7 +11,7 @@ interface I18nProviderProps {
|
|
|
11
11
|
motion: MotionComponentType;
|
|
12
12
|
resources?: TranslationResourcesInput;
|
|
13
13
|
}
|
|
14
|
-
declare const I18nProvider:
|
|
14
|
+
declare const I18nProvider: react71.NamedExoticComponent<I18nProviderProps>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { I18nProvider, I18nProviderProps };
|
|
17
17
|
//# sourceMappingURL=context.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react90 from "react";
|
|
2
2
|
import * as lucide_react0 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/BotPromptIcon.d.ts
|
|
5
|
-
declare const BotPromptIcon:
|
|
5
|
+
declare const BotPromptIcon: react90.ForwardRefExoticComponent<Omit<lucide_react0.LucideProps, "ref"> & react90.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { BotPromptIcon };
|
|
8
8
|
//# sourceMappingURL=BotPromptIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react92 from "react";
|
|
2
2
|
import * as lucide_react1 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/CreateBotIcon.d.ts
|
|
5
|
-
declare const CreateBotIcon:
|
|
5
|
+
declare const CreateBotIcon: react92.ForwardRefExoticComponent<Omit<lucide_react1.LucideProps, "ref"> & react92.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { CreateBotIcon };
|
|
8
8
|
//# sourceMappingURL=CreateBotIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react94 from "react";
|
|
2
2
|
import * as lucide_react2 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/DiscordIcon.d.ts
|
|
5
|
-
declare const DiscordIcon:
|
|
5
|
+
declare const DiscordIcon: react94.ForwardRefExoticComponent<Omit<lucide_react2.LucideProps, "ref"> & react94.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DiscordIcon };
|
|
8
8
|
//# sourceMappingURL=DiscordIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react96 from "react";
|
|
2
|
+
import * as lucide_react3 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/GlobeOffIcon.d.ts
|
|
5
|
-
declare const GlobeOffIcon:
|
|
5
|
+
declare const GlobeOffIcon: react96.ForwardRefExoticComponent<Omit<lucide_react3.LucideProps, "ref"> & react96.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { GlobeOffIcon };
|
|
8
8
|
//# sourceMappingURL=GlobeOffIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react98 from "react";
|
|
2
|
+
import * as lucide_react4 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/GroupBotIcon.d.ts
|
|
5
|
-
declare const GroupBotIcon:
|
|
5
|
+
declare const GroupBotIcon: react98.ForwardRefExoticComponent<Omit<lucide_react4.LucideProps, "ref"> & react98.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { GroupBotIcon };
|
|
8
8
|
//# sourceMappingURL=GroupBotIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react100 from "react";
|
|
2
|
+
import * as lucide_react5 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/GroupBotSquareIcon.d.ts
|
|
5
|
-
declare const GroupBotSquareIcon:
|
|
5
|
+
declare const GroupBotSquareIcon: react100.ForwardRefExoticComponent<Omit<lucide_react5.LucideProps, "ref"> & react100.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { GroupBotSquareIcon };
|
|
8
8
|
//# sourceMappingURL=GroupBotSquareIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react102 from "react";
|
|
2
|
+
import * as lucide_react6 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/LeftClickIcon.d.ts
|
|
5
|
-
declare const LeftClickIcon:
|
|
5
|
+
declare const LeftClickIcon: react102.ForwardRefExoticComponent<Omit<lucide_react6.LucideProps, "ref"> & react102.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { LeftClickIcon };
|
|
8
8
|
//# sourceMappingURL=LeftClickIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react104 from "react";
|
|
2
|
+
import * as lucide_react7 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/LeftDoubleClickIcon.d.ts
|
|
5
|
-
declare const LeftDoubleClickIcon:
|
|
5
|
+
declare const LeftDoubleClickIcon: react104.ForwardRefExoticComponent<Omit<lucide_react7.LucideProps, "ref"> & react104.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { LeftDoubleClickIcon };
|
|
8
8
|
//# sourceMappingURL=LeftDoubleClickIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react106 from "react";
|
|
2
|
+
import * as lucide_react8 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/McpIcon.d.ts
|
|
5
|
-
declare const McpIcon:
|
|
5
|
+
declare const McpIcon: react106.ForwardRefExoticComponent<Omit<lucide_react8.LucideProps, "ref"> & react106.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { McpIcon };
|
|
8
8
|
//# sourceMappingURL=McpIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react108 from "react";
|
|
2
|
+
import * as lucide_react9 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/ProviderIcon.d.ts
|
|
5
|
-
declare const ProviderIcon:
|
|
5
|
+
declare const ProviderIcon: react108.ForwardRefExoticComponent<Omit<lucide_react9.LucideProps, "ref"> & react108.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ProviderIcon };
|
|
8
8
|
//# sourceMappingURL=ProviderIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react110 from "react";
|
|
2
|
+
import * as lucide_react10 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/RightClickIcon.d.ts
|
|
5
|
-
declare const RightClickIcon:
|
|
5
|
+
declare const RightClickIcon: react110.ForwardRefExoticComponent<Omit<lucide_react10.LucideProps, "ref"> & react110.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { RightClickIcon };
|
|
8
8
|
//# sourceMappingURL=RightClickIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react112 from "react";
|
|
2
|
+
import * as lucide_react11 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/RightDoubleClickIcon.d.ts
|
|
5
|
-
declare const RightDoubleClickIcon:
|
|
5
|
+
declare const RightDoubleClickIcon: react112.ForwardRefExoticComponent<Omit<lucide_react11.LucideProps, "ref"> & react112.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { RightDoubleClickIcon };
|
|
8
8
|
//# sourceMappingURL=RightDoubleClickIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react114 from "react";
|
|
2
|
+
import * as lucide_react12 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/ShapesUploadIcon.d.ts
|
|
5
|
-
declare const ShapesUploadIcon:
|
|
5
|
+
declare const ShapesUploadIcon: react114.ForwardRefExoticComponent<Omit<lucide_react12.LucideProps, "ref"> & react114.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ShapesUploadIcon };
|
|
8
8
|
//# sourceMappingURL=ShapesUploadIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react116 from "react";
|
|
2
|
+
import * as lucide_react13 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/TreeDownRightIcon.d.ts
|
|
5
|
-
declare const TreeDownRightIcon:
|
|
5
|
+
declare const TreeDownRightIcon: react116.ForwardRefExoticComponent<Omit<lucide_react13.LucideProps, "ref"> & react116.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { TreeDownRightIcon };
|
|
8
8
|
//# sourceMappingURL=TreeDownRightIcon.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react88 from "react";
|
|
2
|
+
import * as lucide_react0 from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/icons/lucideExtra/TreeUpDownRightIcon.d.ts
|
|
5
|
-
declare const TreeUpDownRightIcon:
|
|
5
|
+
declare const TreeUpDownRightIcon: react88.ForwardRefExoticComponent<Omit<lucide_react0.LucideProps, "ref"> & react88.RefAttributes<SVGSVGElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { TreeUpDownRightIcon };
|
|
8
8
|
//# sourceMappingURL=TreeUpDownRightIcon.d.mts.map
|
package/es/index.d.mts
CHANGED
|
@@ -35,7 +35,9 @@ import { BaseMenuItemType } from "./Menu/baseItem.mjs";
|
|
|
35
35
|
import { Menu } from "./Menu/Menu.mjs";
|
|
36
36
|
import "./Menu/index.mjs";
|
|
37
37
|
import { DropdownItem, DropdownMenuCheckboxItem, DropdownMenuPlacement, DropdownMenuProps } from "./DropdownMenu/type.mjs";
|
|
38
|
+
import { DROPDOWN_MENU_CONTAINER_ATTR, 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";
|
|
38
39
|
import { DropdownMenu } from "./DropdownMenu/DropdownMenu.mjs";
|
|
40
|
+
import { renderDropdownMenuItems } from "./DropdownMenu/renderItems.mjs";
|
|
39
41
|
import "./DropdownMenu/index.mjs";
|
|
40
42
|
import { ActionIconGroupEvent, ActionIconGroupProps } from "./ActionIconGroup/type.mjs";
|
|
41
43
|
import { ActionIconGroup } from "./ActionIconGroup/ActionIconGroup.mjs";
|
|
@@ -61,6 +63,10 @@ import "./Text/index.mjs";
|
|
|
61
63
|
import { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from "./Checkbox/type.mjs";
|
|
62
64
|
import { CheckboxGroup } from "./Checkbox/CheckboxGroup.mjs";
|
|
63
65
|
import Checkbox from "./Checkbox/index.mjs";
|
|
66
|
+
import { CodeDiffProps, DiffViewMode, PatchDiffProps } from "./CodeDiff/type.mjs";
|
|
67
|
+
import { CodeDiff } from "./CodeDiff/CodeDiff.mjs";
|
|
68
|
+
import { PatchDiff } from "./CodeDiff/PatchDiff.mjs";
|
|
69
|
+
import "./CodeDiff/index.mjs";
|
|
64
70
|
import { CodeEditorProps } from "./CodeEditor/type.mjs";
|
|
65
71
|
import { CodeEditor } from "./CodeEditor/CodeEditor.mjs";
|
|
66
72
|
import "./CodeEditor/index.mjs";
|
|
@@ -109,10 +115,13 @@ import "./Input/index.mjs";
|
|
|
109
115
|
import { EditableTextProps } from "./EditableText/type.mjs";
|
|
110
116
|
import { EditableText } from "./EditableText/EditableText.mjs";
|
|
111
117
|
import "./EditableText/index.mjs";
|
|
112
|
-
import {
|
|
118
|
+
import { PopoverArrowIcon } from "./Popover/ArrowIcon.mjs";
|
|
113
119
|
import { PopoverPlacement, PopoverProps, PopoverTrigger } from "./Popover/type.mjs";
|
|
120
|
+
import { PopoverArrow, PopoverArrowAtomProps, PopoverBackdrop, PopoverPopup, PopoverPopupAtomProps, PopoverPortal, PopoverPortalAtomProps, PopoverPositioner, PopoverPositionerAtomProps, PopoverRoot, PopoverTriggerElement, PopoverTriggerElementProps, PopoverViewport, PopoverViewportAtomProps } from "./Popover/atoms.mjs";
|
|
121
|
+
import { PopoverContextValue, PopoverProvider, usePopoverContext } from "./Popover/context.mjs";
|
|
114
122
|
import { Popover } from "./Popover/Popover.mjs";
|
|
115
123
|
import { PopoverGroup } from "./Popover/PopoverGroup.mjs";
|
|
124
|
+
import { POPOVER_CONTAINER_ATTR, usePopoverPortalContainer } from "./Popover/PopoverPortal.mjs";
|
|
116
125
|
import "./Popover/index.mjs";
|
|
117
126
|
import { EmojiPickerProps } from "./EmojiPicker/type.mjs";
|
|
118
127
|
import { EmojiPicker } from "./EmojiPicker/EmojiPicker.mjs";
|
|
@@ -274,4 +283,4 @@ import { LayoutSidebarInner } from "./Layout/components/LayoutSidebarInner.mjs";
|
|
|
274
283
|
import { LayoutToc } from "./Layout/components/LayoutToc.mjs";
|
|
275
284
|
import Layout from "./Layout/index.mjs";
|
|
276
285
|
import { ErrorBoundary, ErrorBoundaryProps } from "react-error-boundary";
|
|
277
|
-
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, 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, 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, type MenuItemType as DropdownMenuItemType, type DropdownMenuPlacement, type DropdownMenuProps, type DropdownProps, EditableText, type EditableTextProps, 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, 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, type Placement, type PlacementConfig, Popover, type PopoverContextValue, PopoverGroup, type PopoverPlacement, type PopoverProps, PopoverProvider, type PopoverTrigger, PresetColorKey, PresetColorType, PresetSystemColorKey, PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, type RawModalComponent, type RawModalComponentProps, type RawModalInstance, type RawModalKeyOptions, type RawModalOptions, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedProps, Input$1 as 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, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, Typography, type TypographyProps, Video, type VideoProps, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, showContextMenu, stopPropagation, toFloatingUIPlacement, updateContextMenuItems, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, useTranslation };
|
|
286
|
+
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, DROPDOWN_MENU_CONTAINER_ATTR, 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, 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, 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, POPOVER_CONTAINER_ATTR, 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, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedProps, Input$1 as 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, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, Typography, type TypographyProps, Video, type VideoProps, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, showContextMenu, stopPropagation, toFloatingUIPlacement, updateContextMenuItems, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverPortalContainer, useTranslation };
|
package/es/index.mjs
CHANGED
|
@@ -28,6 +28,8 @@ import Text_default from "./Text/Text.mjs";
|
|
|
28
28
|
import { preventDefault, preventDefaultAndStopPropagation, stopPropagation } from "./utils/dom.mjs";
|
|
29
29
|
import AccordionItem_default from "./Accordion/AccordionItem.mjs";
|
|
30
30
|
import ActionIcon_default from "./ActionIcon/ActionIcon.mjs";
|
|
31
|
+
import { DROPDOWN_MENU_CONTAINER_ATTR, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger } from "./DropdownMenu/atoms.mjs";
|
|
32
|
+
import { renderDropdownMenuItems } from "./DropdownMenu/renderItems.mjs";
|
|
31
33
|
import DropdownMenu_default from "./DropdownMenu/DropdownMenu.mjs";
|
|
32
34
|
import ActionIconGroup_default from "./ActionIconGroup/ActionIconGroup.mjs";
|
|
33
35
|
import Alert_default from "./Alert/Alert.mjs";
|
|
@@ -39,6 +41,10 @@ import Burger_default from "./Burger/Burger.mjs";
|
|
|
39
41
|
import Button_default from "./Button/Button.mjs";
|
|
40
42
|
import CheckboxGroup_default from "./Checkbox/CheckboxGroup.mjs";
|
|
41
43
|
import Checkbox_default from "./Checkbox/index.mjs";
|
|
44
|
+
import FileTypeIcon_default from "./FileTypeIcon/FileTypeIcon.mjs";
|
|
45
|
+
import MaterialFileTypeIcon_default from "./MaterialFileTypeIcon/MaterialFileTypeIcon.mjs";
|
|
46
|
+
import CodeDiff_default from "./CodeDiff/CodeDiff.mjs";
|
|
47
|
+
import PatchDiff_default from "./CodeDiff/PatchDiff.mjs";
|
|
42
48
|
import { highlighterThemes } from "./Highlighter/const.mjs";
|
|
43
49
|
import lobe_theme_default from "./Highlighter/theme/lobe-theme.mjs";
|
|
44
50
|
import SyntaxHighlighter_default from "./Highlighter/SyntaxHighlighter/index.mjs";
|
|
@@ -69,6 +75,9 @@ import InputOPT_default from "./Input/InputOPT.mjs";
|
|
|
69
75
|
import InputPassword_default from "./Input/InputPassword.mjs";
|
|
70
76
|
import TextArea_default from "./Input/TextArea.mjs";
|
|
71
77
|
import EditableText_default from "./EditableText/EditableText.mjs";
|
|
78
|
+
import { PopoverArrowIcon } from "./Popover/ArrowIcon.mjs";
|
|
79
|
+
import { POPOVER_CONTAINER_ATTR, usePopoverPortalContainer } from "./Popover/PopoverPortal.mjs";
|
|
80
|
+
import { PopoverArrow, PopoverBackdrop, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverRoot, PopoverTriggerElement, PopoverViewport } from "./Popover/atoms.mjs";
|
|
72
81
|
import { PopoverProvider, usePopoverContext } from "./Popover/context.mjs";
|
|
73
82
|
import Popover_default from "./Popover/Popover.mjs";
|
|
74
83
|
import PopoverGroup_default from "./Popover/PopoverGroup.mjs";
|
|
@@ -76,7 +85,6 @@ import Tabs_default from "./Tabs/Tabs.mjs";
|
|
|
76
85
|
import Tag_default from "./Tag/Tag.mjs";
|
|
77
86
|
import EmojiPicker_default from "./EmojiPicker/EmojiPicker.mjs";
|
|
78
87
|
import Empty_default from "./Empty/Empty.mjs";
|
|
79
|
-
import FileTypeIcon_default from "./FileTypeIcon/FileTypeIcon.mjs";
|
|
80
88
|
import Footer_default from "./Footer/Footer.mjs";
|
|
81
89
|
import FormGroup_default from "./Form/components/FormGroup.mjs";
|
|
82
90
|
import FormTitle_default from "./Form/components/FormTitle.mjs";
|
|
@@ -91,7 +99,6 @@ import Grid_default from "./Grid/Grid.mjs";
|
|
|
91
99
|
import GroupAvatar_default from "./GroupAvatar/GroupAvatar.mjs";
|
|
92
100
|
import GuideCard_default from "./GuideCard/GuideCard.mjs";
|
|
93
101
|
import Header_default from "./Header/Header.mjs";
|
|
94
|
-
import MaterialFileTypeIcon_default from "./MaterialFileTypeIcon/MaterialFileTypeIcon.mjs";
|
|
95
102
|
import Highlighter_default from "./Highlighter/Highlighter.mjs";
|
|
96
103
|
import { preprocessMarkdownContent } from "./hooks/useMarkdown/utils.mjs";
|
|
97
104
|
import HotkeyInput_default from "./HotkeyInput/HotkeyInput.mjs";
|
|
@@ -142,4 +149,4 @@ import ThemeSwitch_default from "./ThemeSwitch/ThemeSwitch.mjs";
|
|
|
142
149
|
import Toc_default from "./Toc/Toc.mjs";
|
|
143
150
|
import { ErrorBoundary } from "react-error-boundary";
|
|
144
151
|
|
|
145
|
-
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, 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, EditableText_default as EditableText, 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, 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, Popover_default as Popover, PopoverGroup_default as PopoverGroup, PopoverProvider, PreviewGroup_default as PreviewGroup, 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, Toc_default as Toc, Tooltip_default as Tooltip, TooltipGroup_default as TooltipGroup, Typography_default as Typography, Video_default as Video, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, showContextMenu, stopPropagation, toFloatingUIPlacement, updateContextMenuItems, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, useTranslation };
|
|
152
|
+
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, DROPDOWN_MENU_CONTAINER_ATTR, 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, 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, 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, POPOVER_CONTAINER_ATTR, 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, 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, Toc_default as Toc, Tooltip_default as Tooltip, TooltipGroup_default as TooltipGroup, Typography_default as Typography, Video_default as Video, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, showContextMenu, stopPropagation, toFloatingUIPlacement, updateContextMenuItems, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverPortalContainer, 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 react55 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: react55.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 react121 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/mobile/ChatHeader/ChatHeaderTitle.d.ts
|
|
5
|
-
declare const ChatHeaderTitle:
|
|
5
|
+
declare const ChatHeaderTitle: react121.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 react122 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/mobile/ChatInputArea/components/ChatSendButton.d.ts
|
|
5
|
-
declare const ChatSendButton:
|
|
5
|
+
declare const ChatSendButton: react122.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 react120 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/mobile/TabBar/TabBar.d.ts
|
|
5
|
-
declare const TabBar:
|
|
5
|
+
declare const TabBar: react120.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 react51 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: react51.NamedExoticComponent<StoryBookProps>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { StoryBook, StoryBookProps, useControls, useCreateStore };
|
|
16
16
|
//# sourceMappingURL=index.d.mts.map
|
package/es/utils/placement.d.mts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { Align, Side } from "@base-ui/react/utils/useAnchorPositioning";
|
|
2
1
|
import { Placement } from "@floating-ui/react";
|
|
3
2
|
|
|
4
3
|
//#region src/utils/placement.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Base UI uses a small set of string literal unions for alignment and side.
|
|
7
|
+
* We re-declare them here to avoid importing internal/non-exported Base UI paths.
|
|
8
|
+
*/
|
|
9
|
+
type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
|
|
10
|
+
type Align = 'start' | 'center' | 'end';
|
|
5
11
|
type PlacementConfig = {
|
|
6
12
|
align: Align;
|
|
7
13
|
side: Side;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placement.mjs","names":["top: PlacementConfig","topLeft: PlacementConfig","topRight: PlacementConfig","bottom: PlacementConfig","bottomLeft: PlacementConfig","bottomRight: PlacementConfig","left: PlacementConfig","leftTop: PlacementConfig","leftBottom: PlacementConfig","right: PlacementConfig","rightTop: PlacementConfig","rightBottom: PlacementConfig","placementMap: Record<Placement, PlacementConfig>"],"sources":["../../src/utils/placement.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"placement.mjs","names":["top: PlacementConfig","topLeft: PlacementConfig","topRight: PlacementConfig","bottom: PlacementConfig","bottomLeft: PlacementConfig","bottomRight: PlacementConfig","left: PlacementConfig","leftTop: PlacementConfig","leftBottom: PlacementConfig","right: PlacementConfig","rightTop: PlacementConfig","rightBottom: PlacementConfig","placementMap: Record<Placement, PlacementConfig>"],"sources":["../../src/utils/placement.ts"],"sourcesContent":["import type { Placement as FloatingUIPlacement } from '@floating-ui/react';\n\n/**\n * Base UI uses a small set of string literal unions for alignment and side.\n * We re-declare them here to avoid importing internal/non-exported Base UI paths.\n */\nexport type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';\nexport type Align = 'start' | 'center' | 'end';\n\nexport type PlacementConfig = {\n align: Align;\n side: Side;\n};\n\n/**\n * All supported placement values\n * - Unified placement names for Tooltip, Popover, and DropdownMenu\n * - Ant Design style: topLeft, topCenter, topRight, etc.\n * - Additional aliases: top (same as topCenter), bottom (same as bottomCenter)\n */\nexport type Placement =\n | 'top'\n | 'topLeft'\n | 'topCenter'\n | 'topRight'\n | 'bottom'\n | 'bottomLeft'\n | 'bottomCenter'\n | 'bottomRight'\n | 'left'\n | 'leftTop'\n | 'leftBottom'\n | 'right'\n | 'rightTop'\n | 'rightBottom';\n\nconst top: PlacementConfig = { align: 'center', side: 'top' };\nconst topLeft: PlacementConfig = { align: 'start', side: 'top' };\nconst topRight: PlacementConfig = { align: 'end', side: 'top' };\nconst bottom: PlacementConfig = { align: 'center', side: 'bottom' };\nconst bottomLeft: PlacementConfig = { align: 'start', side: 'bottom' };\nconst bottomRight: PlacementConfig = { align: 'end', side: 'bottom' };\nconst left: PlacementConfig = { align: 'center', side: 'left' };\nconst leftTop: PlacementConfig = { align: 'start', side: 'left' };\nconst leftBottom: PlacementConfig = { align: 'end', side: 'left' };\nconst right: PlacementConfig = { align: 'center', side: 'right' };\nconst rightTop: PlacementConfig = { align: 'start', side: 'right' };\nconst rightBottom: PlacementConfig = { align: 'end', side: 'right' };\n\n/**\n * Map of placement values to Base UI placement config\n * Used by Popover and DropdownMenu components\n */\nexport const placementMap: Record<Placement, PlacementConfig> = {\n bottom,\n bottomCenter: bottom,\n bottomLeft,\n bottomRight,\n left,\n leftBottom,\n leftTop,\n right,\n rightBottom,\n rightTop,\n top,\n topCenter: top,\n topLeft,\n topRight,\n};\n\n/**\n * Convert unified Placement to Floating UI placement format\n * Used by Tooltip component which uses @floating-ui/react\n *\n * @param placement - Unified placement value\n * @returns Floating UI placement (e.g., 'top-start', 'bottom-end')\n */\nexport const toFloatingUIPlacement = (placement?: Placement): FloatingUIPlacement => {\n if (!placement) return 'top';\n\n switch (placement) {\n case 'topLeft': {\n return 'top-start';\n }\n case 'top':\n case 'topCenter': {\n return 'top';\n }\n case 'topRight': {\n return 'top-end';\n }\n case 'bottomLeft': {\n return 'bottom-start';\n }\n case 'bottom':\n case 'bottomCenter': {\n return 'bottom';\n }\n case 'bottomRight': {\n return 'bottom-end';\n }\n case 'leftTop': {\n return 'left-start';\n }\n case 'left': {\n return 'left';\n }\n case 'leftBottom': {\n return 'left-end';\n }\n case 'rightTop': {\n return 'right-start';\n }\n case 'right': {\n return 'right';\n }\n case 'rightBottom': {\n return 'right-end';\n }\n default: {\n return 'top';\n }\n }\n};\n"],"mappings":";AAoCA,MAAMA,MAAuB;CAAE,OAAO;CAAU,MAAM;CAAO;AAC7D,MAAMC,UAA2B;CAAE,OAAO;CAAS,MAAM;CAAO;AAChE,MAAMC,WAA4B;CAAE,OAAO;CAAO,MAAM;CAAO;AAC/D,MAAMC,SAA0B;CAAE,OAAO;CAAU,MAAM;CAAU;AACnE,MAAMC,aAA8B;CAAE,OAAO;CAAS,MAAM;CAAU;AACtE,MAAMC,cAA+B;CAAE,OAAO;CAAO,MAAM;CAAU;AACrE,MAAMC,OAAwB;CAAE,OAAO;CAAU,MAAM;CAAQ;AAC/D,MAAMC,UAA2B;CAAE,OAAO;CAAS,MAAM;CAAQ;AACjE,MAAMC,aAA8B;CAAE,OAAO;CAAO,MAAM;CAAQ;AAClE,MAAMC,QAAyB;CAAE,OAAO;CAAU,MAAM;CAAS;AACjE,MAAMC,WAA4B;CAAE,OAAO;CAAS,MAAM;CAAS;AACnE,MAAMC,cAA+B;CAAE,OAAO;CAAO,MAAM;CAAS;;;;;AAMpE,MAAaC,eAAmD;CAC9D;CACA,cAAc;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,WAAW;CACX;CACA;CACD;;;;;;;;AASD,MAAa,yBAAyB,cAA+C;AACnF,KAAI,CAAC,UAAW,QAAO;AAEvB,SAAQ,WAAR;EACE,KAAK,UACH,QAAO;EAET,KAAK;EACL,KAAK,YACH,QAAO;EAET,KAAK,WACH,QAAO;EAET,KAAK,aACH,QAAO;EAET,KAAK;EACL,KAAK,eACH,QAAO;EAET,KAAK,cACH,QAAO;EAET,KAAK,UACH,QAAO;EAET,KAAK,OACH,QAAO;EAET,KAAK,aACH,QAAO;EAET,KAAK,WACH,QAAO;EAET,KAAK,QACH,QAAO;EAET,KAAK,cACH,QAAO;EAET,QACE,QAAO"}
|