@lobehub/ui 4.11.2 → 4.11.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/Accordion.mjs +2 -2
- package/es/Accordion/Accordion.mjs.map +1 -1
- package/es/Accordion/AccordionItem.d.mts +2 -2
- package/es/Accordion/AccordionItem.mjs +2 -2
- package/es/Accordion/AccordionItem.mjs.map +1 -1
- 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/Checkbox/Checkbox.mjs +2 -2
- package/es/Checkbox/Checkbox.mjs.map +1 -1
- package/es/Checkbox/CheckboxGroup.mjs +2 -2
- package/es/Checkbox/CheckboxGroup.mjs.map +1 -1
- package/es/CodeEditor/CodeEditor.d.mts +2 -2
- package/es/CodeEditor/CodeEditor.mjs +2 -2
- package/es/CodeEditor/CodeEditor.mjs.map +1 -1
- package/es/Collapse/Collapse.d.mts +2 -2
- package/es/ColorSwatches/ColorSwatches.mjs +2 -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/ContextMenu/ContextMenuHost.mjs +7 -12
- package/es/ContextMenu/ContextMenuHost.mjs.map +1 -1
- package/es/CopyButton/CopyButton.d.mts +2 -2
- package/es/DatePicker/DatePicker.d.mts +2 -2
- package/es/DraggablePanel/DraggablePanel.mjs +2 -2
- package/es/DraggablePanel/DraggablePanel.mjs.map +1 -1
- 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/DraggablePanel/components/DraggablePanelHeader.mjs +2 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.mjs.map +1 -1
- package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
- package/es/DraggableSideNav/DraggableSideNav.mjs +2 -2
- package/es/DraggableSideNav/DraggableSideNav.mjs.map +1 -1
- 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 +3 -12
- package/es/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/es/EditableText/EditableText.d.mts +2 -2
- package/es/EditableText/EditableText.mjs +2 -2
- package/es/EditableText/EditableText.mjs.map +1 -1
- package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
- package/es/EmojiPicker/EmojiPicker.mjs +3 -3
- package/es/EmojiPicker/EmojiPicker.mjs.map +1 -1
- 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/HotkeyInput/HotkeyInput.mjs +2 -2
- package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
- 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/ImageSelect/ImageSelect.mjs +2 -2
- package/es/ImageSelect/ImageSelect.mjs.map +1 -1
- 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/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/Popover/PopoverStandalone.mjs +1 -1
- package/es/SearchBar/SearchBar.d.mts +2 -2
- package/es/SearchBar/SearchBar.mjs +2 -2
- package/es/SearchBar/SearchBar.mjs.map +1 -1
- 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/Toc/TocMobile.mjs +2 -2
- package/es/Toc/TocMobile.mjs.map +1 -1
- package/es/Tooltip/TooltipPortal.mjs +1 -1
- package/es/Tooltip/TooltipPortal.mjs.map +1 -1
- package/es/Video/index.d.mts +2 -2
- package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
- package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
- package/es/awesome/Features/Features.d.mts +2 -2
- package/es/awesome/Giscus/Giscus.d.mts +2 -2
- package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
- package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
- package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
- package/es/awesome/Hero/Hero.d.mts +2 -2
- package/es/awesome/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/EditableMessage/EditableMessage.mjs +3 -3
- package/es/chat/EditableMessage/EditableMessage.mjs.map +1 -1
- 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/chat/MessageModal/MessageModal.mjs +3 -3
- package/es/chat/MessageModal/MessageModal.mjs.map +1 -1
- package/es/color/ColorScales/index.d.mts +2 -2
- package/es/color/CssVar/index.d.mts +2 -2
- package/es/hooks/usePortalContainer.mjs +24 -0
- package/es/hooks/usePortalContainer.mjs.map +1 -0
- package/es/i18n/context.d.mts +2 -2
- package/es/icons/lucideExtra/BotPromptIcon.d.mts +3 -3
- package/es/icons/lucideExtra/CreateBotIcon.d.mts +3 -3
- package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +2 -2
- package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +2 -2
- package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
- package/es/icons/lucideExtra/ProviderIcon.d.mts +2 -2
- package/es/icons/lucideExtra/RightClickIcon.d.mts +2 -2
- package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +2 -2
- 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/mobile/TabBar/TabBar.mjs +2 -2
- package/es/mobile/TabBar/TabBar.mjs.map +1 -1
- package/es/storybook/StoryBook/index.d.mts +2 -2
- package/package.json +1 -1
package/es/Flex/FlexBasic.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FlexBasicProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react30 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Flex/FlexBasic.d.ts
|
|
5
|
-
declare const _default:
|
|
5
|
+
declare const _default: react30.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 react69 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: react69.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 react11 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Footer/Footer.d.ts
|
|
5
|
-
declare const Footer:
|
|
5
|
+
declare const Footer: react11.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 react3 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Form/components/FormGroup.d.ts
|
|
5
|
-
declare const FormGroup:
|
|
5
|
+
declare const FormGroup: react3.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 react4 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Form/components/FormItem.d.ts
|
|
5
|
-
declare const FormItem:
|
|
5
|
+
declare const FormItem: react4.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 react5 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Form/components/FormSubmitFooter.d.ts
|
|
5
|
-
declare const FormSubmitFooter:
|
|
5
|
+
declare const FormSubmitFooter: react5.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 react26 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/FormModal/FormModal.d.ts
|
|
5
|
-
declare const FormModal:
|
|
5
|
+
declare const FormModal: react26.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 react125 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/GuideCard/GuideCard.d.ts
|
|
5
|
-
declare const GuideCard:
|
|
5
|
+
declare const GuideCard: react125.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 react60 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Header/Header.d.ts
|
|
5
|
-
declare const Header:
|
|
5
|
+
declare const Header: react60.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 react58 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Highlighter/Highlighter.d.ts
|
|
5
|
-
declare const Highlighter:
|
|
5
|
+
declare const Highlighter: react58.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 react59 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Highlighter/SyntaxHighlighter/index.d.ts
|
|
5
|
-
declare const SyntaxHighlighter:
|
|
5
|
+
declare const SyntaxHighlighter: react59.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 react56 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Hotkey/Hotkey.d.ts
|
|
5
|
-
declare const Hotkey:
|
|
5
|
+
declare const Hotkey: react56.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 react57 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/HotkeyInput/HotkeyInput.d.ts
|
|
5
|
-
declare const HotkeyInput:
|
|
5
|
+
declare const HotkeyInput: react57.NamedExoticComponent<HotkeyInputProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { HotkeyInput };
|
|
8
8
|
//# sourceMappingURL=HotkeyInput.d.mts.map
|
|
@@ -10,7 +10,7 @@ import { styles, variants } from "./style.mjs";
|
|
|
10
10
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { cx, useThemeMode } from "antd-style";
|
|
13
|
-
import
|
|
13
|
+
import useControlledState from "use-merge-value";
|
|
14
14
|
import { isEqual } from "es-toolkit/compat";
|
|
15
15
|
import { Undo2Icon } from "lucide-react";
|
|
16
16
|
import { useHotkeys, useRecordHotkeys } from "react-hotkeys-hook";
|
|
@@ -24,7 +24,7 @@ const HotkeyInput = memo(({ value = "", defaultValue = "", resetValue = "", onCh
|
|
|
24
24
|
const { isDarkMode } = useThemeMode();
|
|
25
25
|
const { t } = useTranslation(hotkey_default);
|
|
26
26
|
const isAppleDevice = useMemo(() => checkIsAppleDevice(isApple), [isApple]);
|
|
27
|
-
const [hotkeyValue, setHotkeyValue] =
|
|
27
|
+
const [hotkeyValue, setHotkeyValue] = useControlledState(defaultValue, {
|
|
28
28
|
defaultValue,
|
|
29
29
|
onChange,
|
|
30
30
|
value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotkeyInput.mjs","names":["hotkeyMessages","useControlledState","modifiers: string[]","normalKeys: string[]","normalizedKey: any","Flexbox","Hotkey","ActionIcon"],"sources":["../../src/HotkeyInput/HotkeyInput.tsx"],"sourcesContent":["'use client';\n\nimport type { InputRef } from 'antd';\nimport { cx, useThemeMode } from 'antd-style';\nimport { isEqual } from 'es-toolkit/compat';\nimport { Undo2Icon } from 'lucide-react';\nimport {\n type FocusEvent,\n type MouseEvent,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useHotkeys, useRecordHotkeys } from 'react-hotkeys-hook';\nimport useControlledState from 'use-merge-value';\n\nimport ActionIcon from '@/ActionIcon';\nimport { Flexbox } from '@/Flex';\nimport Hotkey from '@/Hotkey';\nimport { NORMATIVE_MODIFIER, checkIsAppleDevice, splitKeysByPlus } from '@/Hotkey/utils';\nimport hotkeyMessages from '@/i18n/resources/en/hotkey';\nimport { useTranslation } from '@/i18n/useTranslation';\n\nimport { styles, variants } from './style';\nimport type { HotkeyInputProps } from './type';\n\nconst HotkeyInput = memo<HotkeyInputProps>(\n ({\n value = '',\n defaultValue = '',\n resetValue = '',\n onChange,\n onConflict,\n placeholder,\n disabled,\n shadow,\n allowReset = true,\n style,\n className,\n hotkeyConflicts = [],\n variant,\n texts,\n isApple,\n onBlur,\n onReset,\n onFocus,\n }) => {\n const [isFocused, setIsFocused] = useState(false);\n const [hasConflict, setHasConflict] = useState(false);\n const [hasInvalidCombination, setHasInvalidCombination] = useState(false);\n const inputRef = useRef<InputRef>(null);\n const { isDarkMode } = useThemeMode();\n const { t } = useTranslation(hotkeyMessages);\n const isAppleDevice = useMemo(() => checkIsAppleDevice(isApple), [isApple]);\n const [hotkeyValue, setHotkeyValue] = useControlledState(defaultValue, {\n defaultValue,\n onChange,\n value,\n });\n\n // 使用 useRecordHotkeys 处理快捷键录入\n const [recordedKeys, { start, stop, isRecording, resetKeys }] = useRecordHotkeys();\n\n useHotkeys(\n '*',\n () => {\n inputRef.current?.blur();\n },\n {\n enableOnContentEditable: true,\n enableOnFormTags: true,\n enabled: isRecording && !disabled,\n keydown: false,\n keyup: true,\n preventDefault: true,\n },\n );\n\n // 处理按键,保证格式正确:修饰键在前,最多一个非修饰键在后\n const formatKeys = useCallback((keysSet: Set<string>) => {\n const modifiers: string[] = [];\n const normalKeys: string[] = [];\n\n for (const key of keysSet) {\n // 处理不同表示的修饰键\n const normalizedKey: any = key.toLowerCase();\n if (NORMATIVE_MODIFIER.includes(normalizedKey)) {\n // 统一修饰键表示\n if (\n (!isAppleDevice && normalizedKey === 'ctrl') ||\n (isAppleDevice && normalizedKey === 'meta')\n ) {\n if (!modifiers.includes('mod')) modifiers.push('mod');\n } else if (!modifiers.includes(normalizedKey)) {\n modifiers.push(normalizedKey);\n }\n } else {\n normalKeys.push(key);\n }\n }\n\n // 至少需要一个修饰键\n if (modifiers.length === 0 && normalKeys.length > 0) {\n return { isValid: false, keys: [] };\n }\n\n // 只允许一个非修饰键,如果有多个,只保留最后一个\n const finalKey = normalKeys.length > 0 ? [normalKeys.at(-1)] : [];\n const shortcuts = [modifiers, finalKey];\n\n return {\n // 组合必须包含至少一个按键\n isValid: shortcuts.every((k) => k.length > 0),\n keys: shortcuts.flat(),\n };\n }, []);\n\n // 获取格式化后的按键字符串\n const { isValid, keys } = formatKeys(recordedKeys);\n const keysString = keys.join('+');\n\n // 检查快捷键冲突\n const checkHotkeyConflict = useCallback(\n (newHotkey: string): boolean => {\n return hotkeyConflicts\n .filter((conflictKey) => conflictKey !== resetValue)\n .some((conflictKey) => {\n const newKeys = splitKeysByPlus(newHotkey);\n const conflictKeys = splitKeysByPlus(conflictKey);\n return isEqual(newKeys, conflictKeys);\n });\n },\n [hotkeyConflicts],\n );\n\n // 当按键组合完成时处理结果\n useEffect(() => {\n if (recordedKeys.size > 0 && !isRecording) {\n if (!isValid) {\n setHasInvalidCombination(true);\n setHasConflict(false);\n return;\n }\n\n setHasInvalidCombination(false);\n const newKeysString = keysString;\n\n // 检查冲突\n const conflict = checkHotkeyConflict(newKeysString);\n if (conflict) {\n setHasConflict(true);\n onConflict?.(newKeysString);\n } else {\n setHasConflict(false);\n setHotkeyValue?.(newKeysString);\n }\n }\n }, [\n recordedKeys,\n isRecording,\n isValid,\n keysString,\n checkHotkeyConflict,\n setHotkeyValue,\n onConflict,\n ]);\n\n // 处理输入框焦点\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n if (disabled) return;\n setIsFocused(true);\n setHasConflict(false);\n setHasInvalidCombination(false);\n start(); // 开始记录\n onFocus?.(e);\n };\n\n const handleBlur = (e: FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n stop(); // 停止记录\n onBlur?.(e);\n };\n\n // 重置功能\n const handleReset = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setHotkeyValue?.(resetValue);\n resetKeys();\n setHasConflict(false);\n setHasInvalidCombination(false);\n setIsFocused(false);\n stop(); // 停止记录\n onReset?.(hotkeyValue, resetValue);\n };\n\n const handleClick = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (disabled || isFocused) return;\n inputRef.current?.focus();\n };\n\n const placeholderText = placeholder ?? t('hotkey.placeholder');\n const resetTitle = texts?.reset ?? t('hotkey.reset');\n const conflictText = texts?.conflicts ?? t('hotkey.conflict');\n const invalidText = texts?.invalidCombination ?? t('hotkey.invalidCombination');\n\n return (\n <Flexbox\n className={className}\n gap={8}\n style={{\n position: 'relative',\n ...style,\n }}\n >\n <Flexbox\n align={'center'}\n className={cx(\n variants({\n disabled,\n error: hasConflict || hasInvalidCombination,\n focused: isFocused,\n shadow,\n variant: variant || (isDarkMode ? 'filled' : 'outlined'),\n }),\n )}\n horizontal\n justify={'space-between'}\n onClick={handleClick}\n >\n <div style={{ pointerEvents: 'none' }}>\n {isRecording ? (\n <span className={styles.placeholder}>\n {keys.length > 0 ? <Hotkey keys={keysString} /> : placeholderText}\n </span>\n ) : hotkeyValue ? (\n <Hotkey keys={hotkeyValue} />\n ) : (\n <span className={styles.placeholder}>{placeholderText}</span>\n )}\n </div>\n\n {/* 隐藏的输入框,用于接收焦点 */}\n <input\n className={styles.hiddenInput}\n disabled={disabled}\n onBlur={handleBlur}\n onFocus={handleFocus}\n readOnly\n ref={inputRef as any}\n style={{ pointerEvents: 'none' }}\n />\n\n {!isFocused && allowReset && hotkeyValue && hotkeyValue !== resetValue && !disabled && (\n <ActionIcon\n icon={Undo2Icon}\n onClick={handleReset}\n size={'small'}\n title={resetTitle}\n variant={'filled'}\n />\n )}\n </Flexbox>\n {hasConflict && <div className={styles.errorText}>{conflictText}</div>}\n {hasInvalidCombination && <div className={styles.errorText}>{invalidText}</div>}\n </Flexbox>\n );\n },\n);\n\nHotkeyInput.displayName = 'HotkeyInput';\n\nexport default HotkeyInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,MAAM,cAAc,MACjB,EACC,QAAQ,IACR,eAAe,IACf,aAAa,IACb,UACA,YACA,aACA,UACA,QACA,aAAa,MACb,OACA,WACA,kBAAkB,EAAE,EACpB,SACA,OACA,SACA,QACA,SACA,cACI;CACJ,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CACjD,MAAM,CAAC,aAAa,kBAAkB,SAAS,MAAM;CACrD,MAAM,CAAC,uBAAuB,4BAA4B,SAAS,MAAM;CACzE,MAAM,WAAW,OAAiB,KAAK;CACvC,MAAM,EAAE,eAAe,cAAc;CACrC,MAAM,EAAE,MAAM,eAAeA,eAAe;CAC5C,MAAM,gBAAgB,cAAc,mBAAmB,QAAQ,EAAE,CAAC,QAAQ,CAAC;CAC3E,MAAM,CAAC,aAAa,kBAAkBC,cAAmB,cAAc;EACrE;EACA;EACA;EACD,CAAC;CAGF,MAAM,CAAC,cAAc,EAAE,OAAO,MAAM,aAAa,eAAe,kBAAkB;AAElF,YACE,WACM;AACJ,WAAS,SAAS,MAAM;IAE1B;EACE,yBAAyB;EACzB,kBAAkB;EAClB,SAAS,eAAe,CAAC;EACzB,SAAS;EACT,OAAO;EACP,gBAAgB;EACjB,CACF;CA0CD,MAAM,EAAE,SAAS,SAvCE,aAAa,YAAyB;EACvD,MAAMC,YAAsB,EAAE;EAC9B,MAAMC,aAAuB,EAAE;AAE/B,OAAK,MAAM,OAAO,SAAS;GAEzB,MAAMC,gBAAqB,IAAI,aAAa;AAC5C,OAAI,mBAAmB,SAAS,cAAc,EAE5C;QACG,CAAC,iBAAiB,kBAAkB,UACpC,iBAAiB,kBAAkB,QAEpC;SAAI,CAAC,UAAU,SAAS,MAAM,CAAE,WAAU,KAAK,MA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AY;KAAkB;;GACvE;EAGf;AAED,YAAY,cAAc;AAE1B,0BAAe"}
|
|
1
|
+
{"version":3,"file":"HotkeyInput.mjs","names":["hotkeyMessages","modifiers: string[]","normalKeys: string[]","normalizedKey: any","Flexbox","Hotkey","ActionIcon"],"sources":["../../src/HotkeyInput/HotkeyInput.tsx"],"sourcesContent":["'use client';\n\nimport type { InputRef } from 'antd';\nimport { cx, useThemeMode } from 'antd-style';\nimport { isEqual } from 'es-toolkit/compat';\nimport { Undo2Icon } from 'lucide-react';\nimport {\n type FocusEvent,\n type MouseEvent,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useHotkeys, useRecordHotkeys } from 'react-hotkeys-hook';\nimport useControlledState from 'use-merge-value';\n\nimport ActionIcon from '@/ActionIcon';\nimport { Flexbox } from '@/Flex';\nimport Hotkey from '@/Hotkey';\nimport { NORMATIVE_MODIFIER, checkIsAppleDevice, splitKeysByPlus } from '@/Hotkey/utils';\nimport hotkeyMessages from '@/i18n/resources/en/hotkey';\nimport { useTranslation } from '@/i18n/useTranslation';\n\nimport { styles, variants } from './style';\nimport type { HotkeyInputProps } from './type';\n\nconst HotkeyInput = memo<HotkeyInputProps>(\n ({\n value = '',\n defaultValue = '',\n resetValue = '',\n onChange,\n onConflict,\n placeholder,\n disabled,\n shadow,\n allowReset = true,\n style,\n className,\n hotkeyConflicts = [],\n variant,\n texts,\n isApple,\n onBlur,\n onReset,\n onFocus,\n }) => {\n const [isFocused, setIsFocused] = useState(false);\n const [hasConflict, setHasConflict] = useState(false);\n const [hasInvalidCombination, setHasInvalidCombination] = useState(false);\n const inputRef = useRef<InputRef>(null);\n const { isDarkMode } = useThemeMode();\n const { t } = useTranslation(hotkeyMessages);\n const isAppleDevice = useMemo(() => checkIsAppleDevice(isApple), [isApple]);\n const [hotkeyValue, setHotkeyValue] = useControlledState(defaultValue, {\n defaultValue,\n onChange,\n value,\n });\n\n // 使用 useRecordHotkeys 处理快捷键录入\n const [recordedKeys, { start, stop, isRecording, resetKeys }] = useRecordHotkeys();\n\n useHotkeys(\n '*',\n () => {\n inputRef.current?.blur();\n },\n {\n enableOnContentEditable: true,\n enableOnFormTags: true,\n enabled: isRecording && !disabled,\n keydown: false,\n keyup: true,\n preventDefault: true,\n },\n );\n\n // 处理按键,保证格式正确:修饰键在前,最多一个非修饰键在后\n const formatKeys = useCallback((keysSet: Set<string>) => {\n const modifiers: string[] = [];\n const normalKeys: string[] = [];\n\n for (const key of keysSet) {\n // 处理不同表示的修饰键\n const normalizedKey: any = key.toLowerCase();\n if (NORMATIVE_MODIFIER.includes(normalizedKey)) {\n // 统一修饰键表示\n if (\n (!isAppleDevice && normalizedKey === 'ctrl') ||\n (isAppleDevice && normalizedKey === 'meta')\n ) {\n if (!modifiers.includes('mod')) modifiers.push('mod');\n } else if (!modifiers.includes(normalizedKey)) {\n modifiers.push(normalizedKey);\n }\n } else {\n normalKeys.push(key);\n }\n }\n\n // 至少需要一个修饰键\n if (modifiers.length === 0 && normalKeys.length > 0) {\n return { isValid: false, keys: [] };\n }\n\n // 只允许一个非修饰键,如果有多个,只保留最后一个\n const finalKey = normalKeys.length > 0 ? [normalKeys.at(-1)] : [];\n const shortcuts = [modifiers, finalKey];\n\n return {\n // 组合必须包含至少一个按键\n isValid: shortcuts.every((k) => k.length > 0),\n keys: shortcuts.flat(),\n };\n }, []);\n\n // 获取格式化后的按键字符串\n const { isValid, keys } = formatKeys(recordedKeys);\n const keysString = keys.join('+');\n\n // 检查快捷键冲突\n const checkHotkeyConflict = useCallback(\n (newHotkey: string): boolean => {\n return hotkeyConflicts\n .filter((conflictKey) => conflictKey !== resetValue)\n .some((conflictKey) => {\n const newKeys = splitKeysByPlus(newHotkey);\n const conflictKeys = splitKeysByPlus(conflictKey);\n return isEqual(newKeys, conflictKeys);\n });\n },\n [hotkeyConflicts],\n );\n\n // 当按键组合完成时处理结果\n useEffect(() => {\n if (recordedKeys.size > 0 && !isRecording) {\n if (!isValid) {\n setHasInvalidCombination(true);\n setHasConflict(false);\n return;\n }\n\n setHasInvalidCombination(false);\n const newKeysString = keysString;\n\n // 检查冲突\n const conflict = checkHotkeyConflict(newKeysString);\n if (conflict) {\n setHasConflict(true);\n onConflict?.(newKeysString);\n } else {\n setHasConflict(false);\n setHotkeyValue?.(newKeysString);\n }\n }\n }, [\n recordedKeys,\n isRecording,\n isValid,\n keysString,\n checkHotkeyConflict,\n setHotkeyValue,\n onConflict,\n ]);\n\n // 处理输入框焦点\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n if (disabled) return;\n setIsFocused(true);\n setHasConflict(false);\n setHasInvalidCombination(false);\n start(); // 开始记录\n onFocus?.(e);\n };\n\n const handleBlur = (e: FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n stop(); // 停止记录\n onBlur?.(e);\n };\n\n // 重置功能\n const handleReset = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setHotkeyValue?.(resetValue);\n resetKeys();\n setHasConflict(false);\n setHasInvalidCombination(false);\n setIsFocused(false);\n stop(); // 停止记录\n onReset?.(hotkeyValue, resetValue);\n };\n\n const handleClick = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (disabled || isFocused) return;\n inputRef.current?.focus();\n };\n\n const placeholderText = placeholder ?? t('hotkey.placeholder');\n const resetTitle = texts?.reset ?? t('hotkey.reset');\n const conflictText = texts?.conflicts ?? t('hotkey.conflict');\n const invalidText = texts?.invalidCombination ?? t('hotkey.invalidCombination');\n\n return (\n <Flexbox\n className={className}\n gap={8}\n style={{\n position: 'relative',\n ...style,\n }}\n >\n <Flexbox\n align={'center'}\n className={cx(\n variants({\n disabled,\n error: hasConflict || hasInvalidCombination,\n focused: isFocused,\n shadow,\n variant: variant || (isDarkMode ? 'filled' : 'outlined'),\n }),\n )}\n horizontal\n justify={'space-between'}\n onClick={handleClick}\n >\n <div style={{ pointerEvents: 'none' }}>\n {isRecording ? (\n <span className={styles.placeholder}>\n {keys.length > 0 ? <Hotkey keys={keysString} /> : placeholderText}\n </span>\n ) : hotkeyValue ? (\n <Hotkey keys={hotkeyValue} />\n ) : (\n <span className={styles.placeholder}>{placeholderText}</span>\n )}\n </div>\n\n {/* 隐藏的输入框,用于接收焦点 */}\n <input\n className={styles.hiddenInput}\n disabled={disabled}\n onBlur={handleBlur}\n onFocus={handleFocus}\n readOnly\n ref={inputRef as any}\n style={{ pointerEvents: 'none' }}\n />\n\n {!isFocused && allowReset && hotkeyValue && hotkeyValue !== resetValue && !disabled && (\n <ActionIcon\n icon={Undo2Icon}\n onClick={handleReset}\n size={'small'}\n title={resetTitle}\n variant={'filled'}\n />\n )}\n </Flexbox>\n {hasConflict && <div className={styles.errorText}>{conflictText}</div>}\n {hasInvalidCombination && <div className={styles.errorText}>{invalidText}</div>}\n </Flexbox>\n );\n },\n);\n\nHotkeyInput.displayName = 'HotkeyInput';\n\nexport default HotkeyInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,MAAM,cAAc,MACjB,EACC,QAAQ,IACR,eAAe,IACf,aAAa,IACb,UACA,YACA,aACA,UACA,QACA,aAAa,MACb,OACA,WACA,kBAAkB,EAAE,EACpB,SACA,OACA,SACA,QACA,SACA,cACI;CACJ,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CACjD,MAAM,CAAC,aAAa,kBAAkB,SAAS,MAAM;CACrD,MAAM,CAAC,uBAAuB,4BAA4B,SAAS,MAAM;CACzE,MAAM,WAAW,OAAiB,KAAK;CACvC,MAAM,EAAE,eAAe,cAAc;CACrC,MAAM,EAAE,MAAM,eAAeA,eAAe;CAC5C,MAAM,gBAAgB,cAAc,mBAAmB,QAAQ,EAAE,CAAC,QAAQ,CAAC;CAC3E,MAAM,CAAC,aAAa,kBAAkB,mBAAmB,cAAc;EACrE;EACA;EACA;EACD,CAAC;CAGF,MAAM,CAAC,cAAc,EAAE,OAAO,MAAM,aAAa,eAAe,kBAAkB;AAElF,YACE,WACM;AACJ,WAAS,SAA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G;QAC7C,GACL,cACF,oBAACA,kBAAO,MAAM,cAAe,GAE7B,oBAAC;OAAK,WAAW,OAAO;iBAAc;QAAuB;OAE3D;KAGN,oBAAC;MACC,WAAW,OAAO;MACR;MACV,QAAQ;MACR,SAAS;MACT;MACA,KAAK;MACL,OAAO,EAAE,eAAe,QAAQ;OAChC;KAED,CAAC,aAAa,cAAc,eAAe,gBAAgB,cAAc,CAAC,YACzE,oBAACC;MACC,MAAM;MACN,SAAS;MACT,MAAM;MACN,OAAO;MACP,SAAS;OACT;;KAEI;GACT,eAAe,oBAAC;IAAI,WAAW,OAAO;cAAY;KAAmB;GACrE,yBAAyB,oBAAC;IAAI,WAAW,OAAO;cAAY;KAAkB;;GACvE;EAGf;AAED,YAAY,cAAc;AAE1B,0BAAe"}
|
package/es/Icon/Icon.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IconProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react55 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Icon/Icon.d.ts
|
|
5
|
-
declare const Icon:
|
|
5
|
+
declare const Icon: react55.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 react53 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: react53.Context<IconContentConfig>;
|
|
8
|
+
declare const IconProvider: react53.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 react52 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Image/PreviewGroup.d.ts
|
|
5
|
-
declare const PreviewGroup:
|
|
5
|
+
declare const PreviewGroup: react52.NamedExoticComponent<PreviewGroupProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { PreviewGroup };
|
|
8
8
|
//# sourceMappingURL=PreviewGroup.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ImageSelectProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react83 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/ImageSelect/ImageSelect.d.ts
|
|
5
|
-
declare const ImageSelect:
|
|
5
|
+
declare const ImageSelect: react83.NamedExoticComponent<ImageSelectProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ImageSelect };
|
|
8
8
|
//# sourceMappingURL=ImageSelect.d.mts.map
|
|
@@ -7,11 +7,11 @@ import { styles } from "./styles.mjs";
|
|
|
7
7
|
import { memo } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { cx } from "antd-style";
|
|
10
|
-
import
|
|
10
|
+
import useControlledState from "use-merge-value";
|
|
11
11
|
|
|
12
12
|
//#region src/ImageSelect/ImageSelect.tsx
|
|
13
13
|
const ImageSelect = memo(({ ref, className, style, value, defaultValue, onChange, options, width = 144, height = 86, styles: customStyles, classNames, unoptimized, ...rest }) => {
|
|
14
|
-
const [currentValue, setCurrentValue] =
|
|
14
|
+
const [currentValue, setCurrentValue] = useControlledState(defaultValue, {
|
|
15
15
|
defaultValue,
|
|
16
16
|
onChange,
|
|
17
17
|
value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageSelect.mjs","names":["
|
|
1
|
+
{"version":3,"file":"ImageSelect.mjs","names":["Flexbox","Img","Icon"],"sources":["../../src/ImageSelect/ImageSelect.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { memo } from 'react';\nimport useControlledState from 'use-merge-value';\n\nimport { Flexbox } from '@/Flex';\nimport Icon from '@/Icon';\nimport Img from '@/Img';\n\nimport { styles } from './styles';\nimport type { ImageSelectProps } from './type';\n\nconst ImageSelect = memo<ImageSelectProps>(\n ({\n ref,\n className,\n style,\n value,\n defaultValue,\n onChange,\n options,\n width = 144,\n height = 86,\n styles: customStyles,\n classNames,\n unoptimized,\n ...rest\n }) => {\n const [currentValue, setCurrentValue] = useControlledState<string>(defaultValue, {\n defaultValue,\n onChange,\n value,\n });\n\n return (\n <Flexbox className={className} gap={16} horizontal ref={ref} style={style} {...rest}>\n {options?.map((item) => {\n const isActive = item.value === currentValue;\n return (\n <Flexbox\n align={'center'}\n className={cx(styles.container, isActive && styles.active)}\n gap={4}\n key={item.value}\n onClick={() => setCurrentValue(item.value)}\n >\n <Img\n alt={item.alt || item.value}\n className={cx(styles.img, isActive && styles.imgActive, classNames?.img)}\n height={height}\n src={item.img}\n style={{\n ...customStyles?.img,\n height,\n width,\n }}\n unoptimized={unoptimized}\n width={width}\n />\n\n <Flexbox align={'center'} gap={4} horizontal>\n {item.icon && <Icon icon={item.icon} />}\n {item.label}\n </Flexbox>\n </Flexbox>\n );\n })}\n </Flexbox>\n );\n },\n);\n\nImageSelect.displayName = 'ImageSelect';\n\nexport default ImageSelect;\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,cAAc,MACjB,EACC,KACA,WACA,OACA,OACA,cACA,UACA,SACA,QAAQ,KACR,SAAS,IACT,QAAQ,cACR,YACA,aACA,GAAG,WACC;CACJ,MAAM,CAAC,cAAc,mBAAmB,mBAA2B,cAAc;EAC/E;EACA;EACA;EACD,CAAC;AAEF,QACE,oBAACA;EAAmB;EAAW,KAAK;EAAI;EAAgB;EAAY;EAAO,GAAI;YAC5E,SAAS,KAAK,SAAS;GACtB,MAAM,WAAW,KAAK,UAAU;AAChC,UACE,qBAACA;IACC,OAAO;IACP,WAAW,GAAG,OAAO,WAAW,YAAY,OAAO,OAAO;IAC1D,KAAK;IAEL,eAAe,gBAAgB,KAAK,MAAM;eAE1C,oBAACC;KACC,KAAK,KAAK,OAAO,KAAK;KACtB,WAAW,GAAG,OAAO,KAAK,YAAY,OAAO,WAAW,YAAY,IAAI;KAChE;KACR,KAAK,KAAK;KACV,OAAO;MACL,GAAG,cAAc;MACjB;MACA;MACD;KACY;KACN;MACP,EAEF,qBAACD;KAAQ,OAAO;KAAU,KAAK;KAAG;gBAC/B,KAAK,QAAQ,oBAACE,gBAAK,MAAM,KAAK,OAAQ,EACtC,KAAK;MACE;MApBL,KAAK,MAqBF;IAEZ;GACM;EAGf;AAED,YAAY,cAAc;AAE1B,0BAAe"}
|
package/es/Input/Input.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react126 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/Input.d.ts
|
|
5
|
-
declare const Input:
|
|
5
|
+
declare const Input: react126.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 react127 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/InputNumber.d.ts
|
|
5
|
-
declare const InputNumber:
|
|
5
|
+
declare const InputNumber: react127.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 react128 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/InputOPT.d.ts
|
|
5
|
-
declare const InputOPT:
|
|
5
|
+
declare const InputOPT: react128.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 react129 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/InputPassword.d.ts
|
|
5
|
-
declare const InputPassword:
|
|
5
|
+
declare const InputPassword: react129.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 react130 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/TextArea.d.ts
|
|
5
|
-
declare const TextArea:
|
|
5
|
+
declare const TextArea: react130.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 react44 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Layout/components/LayoutFooter.d.ts
|
|
6
|
-
declare const LayoutFooter:
|
|
6
|
+
declare const LayoutFooter: react44.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 react45 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Layout/components/LayoutHeader.d.ts
|
|
5
|
-
declare const LayoutHeader:
|
|
5
|
+
declare const LayoutHeader: react45.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 react46 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Layout/components/LayoutMain.d.ts
|
|
6
|
-
declare const LayoutMain:
|
|
6
|
+
declare const LayoutMain: react46.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 react47 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Layout/components/LayoutSidebar.d.ts
|
|
5
|
-
declare const LayoutSidebar:
|
|
5
|
+
declare const LayoutSidebar: react47.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 react48 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Layout/components/LayoutSidebarInner.d.ts
|
|
5
|
-
declare const LayoutSidebarInner:
|
|
5
|
+
declare const LayoutSidebarInner: react48.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 react49 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Layout/components/LayoutToc.d.ts
|
|
5
|
-
declare const LayoutToc:
|
|
5
|
+
declare const LayoutToc: react49.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 react50 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/List/ListItem/index.d.ts
|
|
5
|
-
declare const ListItem:
|
|
5
|
+
declare const ListItem: react50.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 react42 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Markdown/Markdown.d.ts
|
|
5
|
-
declare const Markdown:
|
|
5
|
+
declare const Markdown: react42.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 react43 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Markdown/Typography.d.ts
|
|
5
|
-
declare const Typography:
|
|
5
|
+
declare const Typography: react43.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 react73 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: react73.NamedExoticComponent<SearchResultCardsProps>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { SearchResultCards, SearchResultCardsProps };
|
|
20
20
|
//# sourceMappingURL=index.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 react41 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Menu/Menu.d.ts
|
|
5
|
-
declare const Menu:
|
|
5
|
+
declare const Menu: react41.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 react38 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Mermaid/Mermaid.d.ts
|
|
5
|
-
declare const Mermaid:
|
|
5
|
+
declare const Mermaid: react38.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 react39 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Mermaid/SyntaxMermaid/index.d.ts
|
|
5
|
-
declare const SyntaxMermaid:
|
|
5
|
+
declare const SyntaxMermaid: react39.NamedExoticComponent<SyntaxMermaidProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SyntaxMermaid };
|
|
8
8
|
//# sourceMappingURL=index.d.mts.map
|
package/es/Modal/Modal.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModalProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react33 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Modal/Modal.d.ts
|
|
5
|
-
declare const Modal:
|
|
5
|
+
declare const Modal: react33.NamedExoticComponent<ModalProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Modal };
|
|
8
8
|
//# sourceMappingURL=Modal.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ModalContextValue } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react34 from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Modal/ModalProvider.d.ts
|
|
6
|
-
declare const ModalProvider:
|
|
6
|
+
declare const ModalProvider: react34.NamedExoticComponent<{
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
value: ModalContextValue;
|
|
9
9
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react74 from "react";
|
|
2
2
|
import { Context, ReactNode } from "react";
|
|
3
3
|
import * as motion_react0 from "motion/react";
|
|
4
4
|
import * as m from "motion/react-m";
|
|
@@ -6,7 +6,7 @@ import * as m from "motion/react-m";
|
|
|
6
6
|
//#region src/MotionProvider/index.d.ts
|
|
7
7
|
type MotionComponentType = typeof motion_react0.motion | typeof m;
|
|
8
8
|
declare const MotionComponent: Context<MotionComponentType>;
|
|
9
|
-
declare const MotionProvider:
|
|
9
|
+
declare const MotionProvider: react74.NamedExoticComponent<{
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
motion: MotionComponentType;
|
|
12
12
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { placementMap } from "../utils/placement.mjs";
|
|
4
|
-
import { useIsClient } from "../hooks/useIsClient.mjs";
|
|
5
4
|
import { useNativeButton } from "../hooks/useNativeButton.mjs";
|
|
5
|
+
import { useIsClient } from "../hooks/useIsClient.mjs";
|
|
6
6
|
import { PopoverProvider } from "./context.mjs";
|
|
7
7
|
import { parseTrigger } from "./parseTrigger.mjs";
|
|
8
8
|
import { PopoverArrowIcon } from "./ArrowIcon.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SearchBarProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react32 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/SearchBar/SearchBar.d.ts
|
|
5
|
-
declare const SearchBar:
|
|
5
|
+
declare const SearchBar: react32.NamedExoticComponent<SearchBarProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SearchBar };
|
|
8
8
|
//# sourceMappingURL=SearchBar.d.mts.map
|