@lobehub/ui 3.3.1 → 3.3.2
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/AccordionItem.js +1 -1
- package/es/ActionIcon/ActionIcon.js +1 -1
- package/es/ActionIcon/type.d.ts +1 -1
- package/es/ActionIconGroup/ActionIconGroup.js +1 -1
- package/es/ActionIconGroup/type.d.ts +1 -1
- package/es/Alert/Alert.js +1 -1
- package/es/Avatar/Avatar.js +3 -4
- package/es/Avatar/AvatarGroup/index.js +1 -1
- package/es/Avatar/type.d.ts +1 -1
- package/es/Block/Block.js +1 -1
- package/es/Block/type.d.ts +1 -1
- package/es/Burger/Burger.js +1 -1
- package/es/CodeEditor/CodeEditor.js +1 -1
- package/es/CodeEditor/type.d.ts +1 -1
- package/es/Collapse/Collapse.js +1 -1
- package/es/ColorSwatches/ColorSwatches.js +1 -1
- package/es/ColorSwatches/type.d.ts +1 -1
- package/es/DraggablePanel/DraggablePanel.js +1 -1
- package/es/DraggablePanel/components/DraggablePanelBody.js +1 -1
- package/es/DraggablePanel/components/DraggablePanelContainer.js +1 -1
- package/es/DraggablePanel/components/DraggablePanelFooter.js +1 -1
- package/es/DraggablePanel/components/DraggablePanelHeader.js +1 -1
- package/es/DraggableSideNav/DraggableSideNav.js +1 -1
- package/es/Drawer/Drawer.js +1 -1
- package/es/EditableText/ControlInput.js +1 -1
- package/es/EditableText/EditableText.js +1 -1
- package/es/EditableText/type.d.ts +1 -1
- package/es/EmojiPicker/AvatarUploader.js +1 -1
- package/es/EmojiPicker/EmojiPicker.js +1 -1
- package/es/Empty/Empty.js +1 -1
- package/es/Empty/type.d.ts +1 -1
- package/es/FileTypeIcon/FileTypeIcon.js +1 -1
- package/es/Flex/style.css +29 -13
- package/es/FluentEmoji/FluentEmoji.js +1 -1
- package/es/Footer/Footer.js +1 -1
- package/es/Footer/type.d.ts +1 -1
- package/es/Form/components/FormFlatGroup.js +1 -1
- package/es/Form/components/FormFooter.js +1 -1
- package/es/Form/components/FormGroup.js +1 -1
- package/es/Form/components/FormSubmitFooter.js +1 -1
- package/es/Form/components/FormTitle.js +1 -1
- package/es/Form/type.d.ts +1 -1
- package/es/FormModal/FormModal.js +1 -1
- package/es/Grid/Grid.js +1 -1
- package/es/Grid/type.d.ts +1 -1
- package/es/GroupAvatar/GroupAvatar.js +2 -2
- package/es/GuideCard/GuideCard.js +1 -1
- package/es/GuideCard/type.d.ts +1 -1
- package/es/Header/Header.js +1 -1
- package/es/Header/type.d.ts +1 -1
- package/es/Highlighter/FullFeatured.js +37 -27
- package/es/Highlighter/Highlighter.js +5 -2
- package/es/Highlighter/LangSelect.js +9 -5
- package/es/Highlighter/style.d.ts +0 -1
- package/es/Highlighter/style.js +8 -9
- package/es/Highlighter/type.d.ts +1 -1
- package/es/Hotkey/Hotkey.js +1 -1
- package/es/Hotkey/type.d.ts +1 -1
- package/es/Hotkey/utils.d.ts +1 -1
- package/es/HotkeyInput/HotkeyInput.js +1 -1
- package/es/Image/Image.js +1 -1
- package/es/Image/components/Toolbar.js +1 -7
- package/es/Image/components/usePreview.js +1 -3
- package/es/Image/style.js +5 -4
- package/es/ImageSelect/ImageSelect.js +1 -1
- package/es/ImageSelect/type.d.ts +1 -1
- package/es/List/List.js +1 -1
- package/es/List/ListItem/index.js +1 -1
- package/es/List/type.d.ts +1 -1
- package/es/Markdown/components/Footnotes.js +1 -1
- package/es/Markdown/components/SearchResultCards/SearchResultCard.js +1 -1
- package/es/Markdown/components/SearchResultCards/index.d.ts +1 -1
- package/es/MaskShadow/MaskShadow.js +1 -1
- package/es/MaskShadow/type.d.ts +1 -1
- package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.js +1 -1
- package/es/Mermaid/FullFeatured.js +21 -9
- package/es/Mermaid/Mermaid.js +5 -2
- package/es/Mermaid/SyntaxMermaid/index.js +0 -4
- package/es/ScrollShadow/ScrollShadow.js +1 -1
- package/es/ScrollShadow/type.d.ts +1 -1
- package/es/SideNav/SideNav.js +1 -1
- package/es/SideNav/type.d.ts +1 -1
- package/es/Skeleton/Skeleton.js +1 -1
- package/es/Skeleton/SkeletonParagraph.js +1 -1
- package/es/Skeleton/SkeletonTags.js +1 -1
- package/es/SliderWithInput/SliderWithInput.js +1 -1
- package/es/SliderWithInput/type.d.ts +1 -1
- package/es/Snippet/Snippet.js +1 -1
- package/es/Snippet/type.d.ts +1 -1
- package/es/SortableList/SortableList.js +1 -1
- package/es/SortableList/components/SortableItem.d.ts +1 -1
- package/es/SortableList/components/SortableItem.js +1 -1
- package/es/SortableList/type.d.ts +1 -1
- package/es/ThemeSwitch/ThemeSwitch.js +1 -1
- package/es/Tooltip/TooltipFloating.js +1 -1
- package/es/Video/index.d.ts +1 -1
- package/es/Video/index.js +1 -1
- package/es/awesome/AuroraBackground/AuroraBackground.js +1 -1
- package/es/awesome/AuroraBackground/type.d.ts +1 -1
- package/es/awesome/Features/FeatureItem.js +1 -1
- package/es/awesome/GridBackground/GridShowcase.js +1 -1
- package/es/awesome/GridBackground/type.d.ts +1 -1
- package/es/awesome/Hero/Hero.js +1 -1
- package/es/awesome/SpotlightCard/SpotlightCardItem.js +1 -1
- package/es/brand/LobeChat/index.js +1 -1
- package/es/brand/LobeHub/index.js +1 -1
- package/es/brand/LogoThree/Loading.js +1 -1
- package/es/brand/LogoThree/index.js +1 -1
- package/es/chat/Bubble/Bubble.js +1 -1
- package/es/chat/Bubble/type.d.ts +1 -1
- package/es/chat/ChatHeader/ChatHeader.js +1 -1
- package/es/chat/ChatHeader/ChatHeaderTitle.js +1 -1
- package/es/chat/ChatHeader/type.d.ts +1 -1
- package/es/chat/ChatInputArea/components/ChatInputActionBar.js +1 -1
- package/es/chat/ChatInputArea/components/ChatSendButton.js +1 -1
- package/es/chat/ChatInputArea/type.d.ts +1 -1
- package/es/chat/ChatItem/ChatItem.js +1 -1
- package/es/chat/ChatItem/components/Actions.js +1 -1
- package/es/chat/ChatItem/components/Avatar.js +1 -1
- package/es/chat/ChatItem/components/ErrorContent.js +1 -1
- package/es/chat/ChatItem/components/Loading.js +1 -1
- package/es/chat/ChatItem/components/MessageContent.js +1 -1
- package/es/chat/ChatItem/components/Title.js +1 -1
- package/es/chat/ChatItem/type.d.ts +1 -1
- package/es/chat/EditableMessageList/EditableMessageList.js +1 -1
- package/es/chat/MessageInput/MessageInput.js +1 -1
- package/es/chat/MessageInput/type.d.ts +1 -1
- package/es/chat/MessageModal/MessageModal.js +1 -1
- package/es/color/ColorScales/ScaleRow.js +1 -1
- package/es/color/ColorScales/index.js +1 -1
- package/es/mdx/Callout/index.d.ts +1 -1
- package/es/mdx/Callout/index.js +1 -1
- package/es/mdx/Cards/Card.js +1 -1
- package/es/mdx/FileTree/File.d.ts +1 -1
- package/es/mdx/FileTree/File.js +1 -1
- package/es/mdx/FileTree/Folder.d.ts +1 -1
- package/es/mdx/FileTree/Folder.js +1 -1
- package/es/mdx/Tabs/index.d.ts +1 -1
- package/es/mdx/Tabs/index.js +1 -1
- package/es/mdx/mdxComponents/Citation/PopoverPanel.js +1 -1
- package/es/mobile/ChatHeader/ChatHeader.js +1 -1
- package/es/mobile/ChatHeader/ChatHeaderTitle.js +1 -1
- package/es/mobile/ChatHeader/type.d.ts +1 -1
- package/es/mobile/ChatInputArea/ChatInputArea.js +1 -1
- package/es/mobile/TabBar/TabBar.js +1 -1
- package/es/mobile/TabBar/type.d.ts +1 -1
- package/es/storybook/StoryBook/index.d.ts +1 -1
- package/es/storybook/StoryBook/index.js +1 -1
- package/package.json +1 -2
|
@@ -18,16 +18,15 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
18
18
|
import { cva } from 'class-variance-authority';
|
|
19
19
|
import { ChevronDown, ChevronRight } from 'lucide-react';
|
|
20
20
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
21
|
-
import { Flexbox } from 'react-layout-kit';
|
|
22
21
|
import ActionIcon from "../ActionIcon";
|
|
23
22
|
import CopyButton from "../CopyButton";
|
|
23
|
+
import { Flexbox } from "../Flex";
|
|
24
24
|
import { getCodeLanguageDisplayName, getCodeLanguageFilename } from "./const";
|
|
25
25
|
import MaterialFileTypeIcon from "../MaterialFileTypeIcon";
|
|
26
26
|
import Text from "../Text";
|
|
27
27
|
import LangSelect from "./LangSelect";
|
|
28
28
|
import { useStyles } from "./style";
|
|
29
29
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
30
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
31
30
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
31
|
var HeaderLanguage = /*#__PURE__*/memo(function (_ref) {
|
|
33
32
|
var allowChangeLanguage = _ref.allowChangeLanguage,
|
|
@@ -39,29 +38,29 @@ var HeaderLanguage = /*#__PURE__*/memo(function (_ref) {
|
|
|
39
38
|
setLanguage = _ref.setLanguage,
|
|
40
39
|
showLanguage = _ref.showLanguage;
|
|
41
40
|
if (!showLanguage) return null;
|
|
42
|
-
return /*#__PURE__*/_jsx(
|
|
41
|
+
if (allowChangeLanguage && !fileName) return /*#__PURE__*/_jsx(LangSelect, {
|
|
42
|
+
onSelect: setLanguage,
|
|
43
|
+
value: language.toLowerCase()
|
|
44
|
+
});
|
|
45
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
43
46
|
align: 'center',
|
|
44
47
|
className: 'languageTitle',
|
|
45
48
|
flex: 1,
|
|
46
49
|
gap: 4,
|
|
47
50
|
horizontal: true,
|
|
48
|
-
justify: '
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
fontSize: 13,
|
|
62
|
-
children: displayName
|
|
63
|
-
})]
|
|
64
|
-
})
|
|
51
|
+
justify: 'flex-start',
|
|
52
|
+
paddingInline: 8,
|
|
53
|
+
children: [icon || /*#__PURE__*/_jsx(MaterialFileTypeIcon, {
|
|
54
|
+
fallbackUnknownType: false,
|
|
55
|
+
filename: filetype,
|
|
56
|
+
size: 18,
|
|
57
|
+
type: 'file',
|
|
58
|
+
variant: 'raw'
|
|
59
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
60
|
+
ellipsis: true,
|
|
61
|
+
fontSize: 13,
|
|
62
|
+
children: displayName
|
|
63
|
+
})]
|
|
65
64
|
});
|
|
66
65
|
}, function (prev, next) {
|
|
67
66
|
return prev.allowChangeLanguage === next.allowChangeLanguage && prev.displayName === next.displayName && prev.fileName === next.fileName && prev.filetype === next.filetype && prev.icon === next.icon && prev.language === next.language && prev.setLanguage === next.setLanguage && prev.showLanguage === next.showLanguage;
|
|
@@ -203,12 +202,9 @@ export var HighlighterFullFeatured = /*#__PURE__*/memo(function (_ref2) {
|
|
|
203
202
|
}), classNames === null || classNames === void 0 ? void 0 : classNames.header),
|
|
204
203
|
horizontal: true,
|
|
205
204
|
justify: 'space-between',
|
|
205
|
+
onClick: handleToggleExpand,
|
|
206
206
|
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.header,
|
|
207
|
-
children: [/*#__PURE__*/_jsx(
|
|
208
|
-
icon: expand ? ChevronDown : ChevronRight,
|
|
209
|
-
onClick: handleToggleExpand,
|
|
210
|
-
size: 'small'
|
|
211
|
-
}), /*#__PURE__*/_jsx(HeaderLanguage, {
|
|
207
|
+
children: [/*#__PURE__*/_jsx(HeaderLanguage, {
|
|
212
208
|
allowChangeLanguage: allowChangeLanguage,
|
|
213
209
|
displayName: displayName,
|
|
214
210
|
fileName: fileName,
|
|
@@ -217,12 +213,26 @@ export var HighlighterFullFeatured = /*#__PURE__*/memo(function (_ref2) {
|
|
|
217
213
|
language: language,
|
|
218
214
|
setLanguage: setLanguage,
|
|
219
215
|
showLanguage: showLanguage
|
|
220
|
-
}), /*#__PURE__*/
|
|
216
|
+
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
221
217
|
align: 'center',
|
|
222
218
|
flex: 'none',
|
|
223
219
|
gap: 4,
|
|
224
220
|
horizontal: true,
|
|
225
|
-
|
|
221
|
+
onClick: function onClick(e) {
|
|
222
|
+
return e.stopPropagation();
|
|
223
|
+
},
|
|
224
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
225
|
+
align: 'center',
|
|
226
|
+
className: 'panel-actions',
|
|
227
|
+
flex: 'none',
|
|
228
|
+
gap: 4,
|
|
229
|
+
horizontal: true,
|
|
230
|
+
children: actions
|
|
231
|
+
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
232
|
+
icon: expand ? ChevronDown : ChevronRight,
|
|
233
|
+
onClick: handleToggleExpand,
|
|
234
|
+
size: 'small'
|
|
235
|
+
})]
|
|
226
236
|
})]
|
|
227
237
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
228
238
|
className: cx(bodyVariants({
|
|
@@ -17,8 +17,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
18
|
import { cva } from 'class-variance-authority';
|
|
19
19
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
|
-
import { Flexbox } from 'react-layout-kit';
|
|
21
20
|
import CopyButton from "../CopyButton";
|
|
21
|
+
import { Flexbox } from "../Flex";
|
|
22
22
|
import { getCodeLanguageDisplayName } from "./const";
|
|
23
23
|
import Tag from "../Tag";
|
|
24
24
|
import FullFeatured from "./FullFeatured";
|
|
@@ -109,7 +109,10 @@ export var Highlighter = /*#__PURE__*/memo(function (_ref) {
|
|
|
109
109
|
return /*#__PURE__*/_jsx(CopyButton, {
|
|
110
110
|
content: getCopyContent,
|
|
111
111
|
glass: true,
|
|
112
|
-
size: actionIconSize
|
|
112
|
+
size: actionIconSize || {
|
|
113
|
+
blockSize: 28,
|
|
114
|
+
size: 16
|
|
115
|
+
}
|
|
113
116
|
});
|
|
114
117
|
}, [actionIconSize, copyable, getCopyContent]);
|
|
115
118
|
var actions = useMemo(function () {
|
|
@@ -15,17 +15,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
15
15
|
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
16
16
|
import { Select } from 'antd';
|
|
17
17
|
import { memo, useMemo } from 'react';
|
|
18
|
-
import { Flexbox } from 'react-layout-kit';
|
|
19
18
|
import { bundledLanguagesInfo } from 'shiki';
|
|
19
|
+
import { Flexbox } from "../Flex";
|
|
20
20
|
import MaterialFileTypeIcon from "../MaterialFileTypeIcon";
|
|
21
21
|
import Text from "../Text";
|
|
22
|
-
import { useStyles } from "./style";
|
|
23
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
24
|
export var LangSelect = /*#__PURE__*/memo(function (_ref) {
|
|
26
25
|
var rest = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
27
|
-
var _useStyles = useStyles(),
|
|
28
|
-
styles = _useStyles.styles;
|
|
29
26
|
var options = useMemo(function () {
|
|
30
27
|
return [{
|
|
31
28
|
aliases: ['text', 'txt'],
|
|
@@ -74,10 +71,17 @@ export var LangSelect = /*#__PURE__*/memo(function (_ref) {
|
|
|
74
71
|
})));
|
|
75
72
|
}, []);
|
|
76
73
|
return /*#__PURE__*/_jsx(Select, _objectSpread({
|
|
77
|
-
className:
|
|
74
|
+
className: 'languageTitle',
|
|
75
|
+
onClick: function onClick(e) {
|
|
76
|
+
return e.stopPropagation();
|
|
77
|
+
},
|
|
78
78
|
options: options,
|
|
79
79
|
showSearch: true,
|
|
80
80
|
size: 'small',
|
|
81
|
+
style: {
|
|
82
|
+
maxWidth: 240,
|
|
83
|
+
width: '100%'
|
|
84
|
+
},
|
|
81
85
|
suffixIcon: false,
|
|
82
86
|
variant: 'borderless'
|
|
83
87
|
}, rest));
|
|
@@ -13,7 +13,6 @@ export declare const useStyles: (props?: unknown) => import("antd-style").Return
|
|
|
13
13
|
nowrap: import("antd-style").SerializedStyles;
|
|
14
14
|
outlined: string;
|
|
15
15
|
root: string;
|
|
16
|
-
select: import("antd-style").SerializedStyles;
|
|
17
16
|
shadow: string;
|
|
18
17
|
wrap: import("antd-style").SerializedStyles;
|
|
19
18
|
}>;
|
package/es/Highlighter/style.js
CHANGED
|
@@ -17,16 +17,15 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
17
17
|
bodyExpand: cx(expandCls),
|
|
18
18
|
bodyRoot: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n transition: opacity 0.25s ", ";\n "])), token.motionEaseOut),
|
|
19
19
|
borderless: stylish.variantBorderlessWithoutHover,
|
|
20
|
-
filled: stylish.variantFilledWithoutHover,
|
|
21
|
-
headerBorderless: css(
|
|
22
|
-
headerFilled: css(
|
|
23
|
-
headerOutlined: css(
|
|
24
|
-
headerRoot: css(
|
|
25
|
-
lang: cx(langHoverCls, stylish.blur, css(
|
|
26
|
-
nowrap: css(
|
|
20
|
+
filled: cx(stylish.variantFilledWithoutHover, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: ", ";\n "])), token.colorFillQuaternary)),
|
|
21
|
+
headerBorderless: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-inline: 0;\n "]))),
|
|
22
|
+
headerFilled: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background: transparent;\n "]))),
|
|
23
|
+
headerOutlined: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n & + .", " {\n border-block-start: 1px solid ", ";\n }\n "])), expandCls, token.colorFillQuaternary),
|
|
24
|
+
headerRoot: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n cursor: pointer;\n position: relative;\n padding: 4px;\n "]))),
|
|
25
|
+
lang: cx(langHoverCls, stylish.blur, css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 2;\n inset-block-end: 8px;\n inset-inline-end: 8px;\n\n font-family: ", ";\n color: ", ";\n\n opacity: 0;\n background: ", ";\n\n transition: opacity 0.1s;\n "])), token.fontFamilyCode, token.colorTextSecondary, token.colorFillQuaternary)),
|
|
26
|
+
nowrap: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n pre,\n code {\n text-wrap: nowrap;\n }\n "]))),
|
|
27
27
|
outlined: stylish.variantOutlinedWithoutHover,
|
|
28
|
-
root: cx(prefix, css(
|
|
29
|
-
select: css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n user-select: none;\n\n position: absolute;\n inset-inline-start: 50%;\n transform: translateX(-50%);\n\n min-width: 100px;\n\n font-size: 14px;\n color: ", ";\n text-align: center;\n "])), token.colorTextDescription),
|
|
28
|
+
root: cx(prefix, css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n\n overflow: hidden;\n\n width: 100%;\n border-radius: ", "px;\n\n transition: background-color 100ms ", ";\n\n .languageTitle {\n opacity: 0.5;\n filter: grayscale(100%);\n transition:\n opacity,\n grayscale 0.2s ", ";\n }\n\n .panel-actions {\n opacity: 0;\n transition: opacity 0.2s ", ";\n }\n\n &:hover {\n .languageTitle {\n opacity: 1;\n filter: grayscale(0%);\n }\n\n .panel-actions {\n opacity: 1;\n }\n\n .", " {\n opacity: 1;\n }\n\n .", " {\n opacity: 1;\n }\n }\n\n pre {\n height: 100%;\n font-size: 12px;\n }\n\n code {\n background: transparent !important;\n }\n "])), token.borderRadius, token.motionEaseOut, token.motionEaseInOut, token.motionEaseInOut, actionsHoverCls, langHoverCls)),
|
|
30
29
|
shadow: stylish.shadow,
|
|
31
30
|
wrap: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n pre,\n code {\n text-wrap: wrap;\n }\n "])))
|
|
32
31
|
};
|
package/es/Highlighter/type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode, type Ref } from 'react';
|
|
2
|
-
import { FlexboxProps } from 'react-layout-kit';
|
|
3
2
|
import type { BuiltinTheme } from 'shiki';
|
|
4
3
|
import type { ActionIconProps } from "../ActionIcon";
|
|
4
|
+
import { FlexboxProps } from "../Flex";
|
|
5
5
|
import { DivProps } from "../types";
|
|
6
6
|
export interface SyntaxHighlighterProps extends DivProps {
|
|
7
7
|
animated?: boolean;
|
package/es/Hotkey/Hotkey.js
CHANGED
|
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
18
18
|
import { cva } from 'class-variance-authority';
|
|
19
19
|
import { ArrowBigUpIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightToLineIcon, ArrowUpIcon, ChevronUpIcon, Command, CornerDownLeftIcon, Delete, Grid2X2Icon, MouseIcon, Option, SpaceIcon } from 'lucide-react';
|
|
20
20
|
import { memo, useEffect, useMemo, useState } from 'react';
|
|
21
|
-
import { Center, Flexbox } from
|
|
21
|
+
import { Center, Flexbox } from "../Flex";
|
|
22
22
|
import Icon from "../Icon";
|
|
23
23
|
import LeftClickIcon from "../icons/lucideExtra/LeftClickIcon";
|
|
24
24
|
import LeftDoubleClickIcon from "../icons/lucideExtra/LeftDoubleClickIcon";
|
package/es/Hotkey/type.d.ts
CHANGED
package/es/Hotkey/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const NORMATIVE_MODIFIER: ("
|
|
1
|
+
export declare const NORMATIVE_MODIFIER: ("meta" | "alt" | "shift" | "control" | "ctrl" | "mod")[];
|
|
2
2
|
export declare const splitKeysByPlus: (keys: string) => string[];
|
|
3
3
|
export declare const startCase: (str: string) => string;
|
|
4
4
|
export declare const checkIsAppleDevice: (isApple?: boolean) => boolean;
|
|
@@ -18,9 +18,9 @@ import { isEqual } from 'lodash-es';
|
|
|
18
18
|
import { Undo2Icon } from 'lucide-react';
|
|
19
19
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
20
|
import { useHotkeys, useRecordHotkeys } from 'react-hotkeys-hook';
|
|
21
|
-
import { Flexbox } from 'react-layout-kit';
|
|
22
21
|
import useControlledState from 'use-merge-value';
|
|
23
22
|
import ActionIcon from "../ActionIcon";
|
|
23
|
+
import { Flexbox } from "../Flex";
|
|
24
24
|
import Hotkey from "../Hotkey";
|
|
25
25
|
import { NORMATIVE_MODIFIER, checkIsAppleDevice, splitKeysByPlus } from "../Hotkey/utils";
|
|
26
26
|
import { useStyles } from "./style";
|
package/es/Image/Image.js
CHANGED
|
@@ -12,7 +12,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
12
12
|
import { Image as AntImage, Skeleton } from 'antd';
|
|
13
13
|
import { cva } from 'class-variance-authority';
|
|
14
14
|
import { memo, useMemo } from 'react';
|
|
15
|
-
import { Flexbox } from
|
|
15
|
+
import { Flexbox } from "../Flex";
|
|
16
16
|
import usePreview from "./components/usePreview";
|
|
17
17
|
import { FALLBACK_DARK, FALLBACK_LIGHT, useStyles } from "./style";
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FlipHorizontal, FlipVertical, RotateCcw, RotateCw, ZoomIn, ZoomOut } from 'lucide-react';
|
|
2
2
|
import { memo } from 'react';
|
|
3
|
-
import { Flexbox } from 'react-layout-kit';
|
|
4
3
|
import ActionIcon from "../../ActionIcon";
|
|
4
|
+
import { Flexbox } from "../../Flex";
|
|
5
5
|
import { useStyles } from "../style";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -25,28 +25,22 @@ var Toolbar = /*#__PURE__*/memo(function (_ref) {
|
|
|
25
25
|
gap: 4,
|
|
26
26
|
horizontal: true,
|
|
27
27
|
children: [/*#__PURE__*/_jsx(ActionIcon, {
|
|
28
|
-
color: '#fff',
|
|
29
28
|
icon: FlipHorizontal,
|
|
30
29
|
onClick: onFlipX
|
|
31
30
|
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
32
|
-
color: '#fff',
|
|
33
31
|
icon: FlipVertical,
|
|
34
32
|
onClick: onFlipY
|
|
35
33
|
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
36
|
-
color: '#fff',
|
|
37
34
|
icon: RotateCcw,
|
|
38
35
|
onClick: onRotateLeft
|
|
39
36
|
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
40
|
-
color: '#fff',
|
|
41
37
|
icon: RotateCw,
|
|
42
38
|
onClick: onRotateRight
|
|
43
39
|
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
44
|
-
color: '#fff',
|
|
45
40
|
disabled: scale === minScale,
|
|
46
41
|
icon: ZoomOut,
|
|
47
42
|
onClick: onZoomOut
|
|
48
43
|
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
49
|
-
color: '#fff',
|
|
50
44
|
disabled: scale === maxScale,
|
|
51
45
|
icon: ZoomIn,
|
|
52
46
|
onClick: onZoomIn
|
|
@@ -55,9 +55,6 @@ export var usePreview = function usePreview(props) {
|
|
|
55
55
|
if (toolbarRender) return toolbarRender(originalNode, info);
|
|
56
56
|
return originalNode;
|
|
57
57
|
},
|
|
58
|
-
classNames: {
|
|
59
|
-
root: cx(styles.preview, rootClassName)
|
|
60
|
-
},
|
|
61
58
|
closeIcon: /*#__PURE__*/_jsx(Icon, {
|
|
62
59
|
color: '#fff',
|
|
63
60
|
icon: X
|
|
@@ -79,6 +76,7 @@ export var usePreview = function usePreview(props) {
|
|
|
79
76
|
// 向后兼容旧的 onVisibleChange
|
|
80
77
|
onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(open, !open);
|
|
81
78
|
},
|
|
79
|
+
rootClassName: cx(styles.preview, rootClassName),
|
|
82
80
|
styles: {
|
|
83
81
|
mask: {
|
|
84
82
|
backdropFilter: 'blur(8px)'
|
package/es/Image/style.js
CHANGED
|
@@ -6,7 +6,8 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
6
6
|
var cx = _ref.cx,
|
|
7
7
|
css = _ref.css,
|
|
8
8
|
token = _ref.token,
|
|
9
|
-
stylish = _ref.stylish
|
|
9
|
+
stylish = _ref.stylish,
|
|
10
|
+
prefixCls = _ref.prefixCls;
|
|
10
11
|
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
11
12
|
alwaysShowActions = _ref2.alwaysShowActions;
|
|
12
13
|
var actions = cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n position: absolute;\n z-index: 1;\n inset-block-start: 0;\n inset-inline-end: 0;\n\n opacity: ", ";\n "])), alwaysShowActions ? 1 : 0));
|
|
@@ -17,9 +18,9 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
17
18
|
image: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: auto;\n height: auto;\n "]))),
|
|
18
19
|
mask: cx(stylish.blur, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n backdrop-filter: blur(8px);\n "])))),
|
|
19
20
|
outlined: stylish.variantOutlinedWithoutHover,
|
|
20
|
-
preview: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n img {\n width: 100%;\n }\n "]))),
|
|
21
|
-
root: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: pointer;\n user-select: none;\n\n position: relative;\n\n overflow: hidden;\n\n width: fit-content;\n border-radius: ", "px;\n\n line-height: 1;\n\n &:hover {\n .", " {\n opacity: 1;\n }\n }\n "])), token.borderRadius, actions),
|
|
22
|
-
toolbar: cx(stylish.blur, stylish.variantOutlinedWithoutHover, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 4px;\n border-color: ", ";\n border-radius: ", "px;\n background: ", ";\n "])), token.colorFillTertiary, token.borderRadiusLG, rgba(token.
|
|
21
|
+
preview: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .", "-image-preview-mask {\n background: ", ";\n }\n\n img {\n width: 100%;\n }\n "])), prefixCls, rgba(token.colorBgLayout, 0.9)),
|
|
22
|
+
root: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: pointer;\n user-select: none;\n\n position: relative;\n\n overflow: hidden;\n\n width: fit-content;\n border-radius: ", "px;\n\n line-height: 1;\n\n .", "-image-cover {\n display: none !important;\n }\n\n &:hover {\n .", " {\n opacity: 1;\n }\n }\n "])), token.borderRadius, prefixCls, actions),
|
|
23
|
+
toolbar: cx(stylish.blur, stylish.variantOutlinedWithoutHover, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 4px;\n border-color: ", ";\n border-radius: ", "px;\n background: ", ";\n "])), token.colorFillTertiary, token.borderRadiusLG, rgba(token.colorBgContainer, 0.5))),
|
|
23
24
|
wrapper: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n max-width: 100%;\n height: auto;\n "])))
|
|
24
25
|
};
|
|
25
26
|
});
|
|
@@ -16,8 +16,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
18
|
import { memo } from 'react';
|
|
19
|
-
import { Flexbox } from 'react-layout-kit';
|
|
20
19
|
import useControlledState from 'use-merge-value';
|
|
20
|
+
import { Flexbox } from "../Flex";
|
|
21
21
|
import Icon from "../Icon";
|
|
22
22
|
import Img from "../Img";
|
|
23
23
|
import { useStyles } from "./styles";
|
package/es/ImageSelect/type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SelectProps } from 'antd';
|
|
2
2
|
import type { CSSProperties, ReactNode, Ref } from 'react';
|
|
3
|
-
import type { FlexboxProps } from
|
|
3
|
+
import type { FlexboxProps } from "../Flex";
|
|
4
4
|
import type { IconProps } from "../Icon";
|
|
5
5
|
export interface ImageSelectItem {
|
|
6
6
|
alt?: string;
|
package/es/List/List.js
CHANGED
|
@@ -14,7 +14,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
14
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
15
|
import { cx } from 'antd-style';
|
|
16
16
|
import { memo } from 'react';
|
|
17
|
-
import { Flexbox } from
|
|
17
|
+
import { Flexbox } from "../Flex";
|
|
18
18
|
import ListItem from "./ListItem";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
var List = /*#__PURE__*/memo(function (_ref) {
|
|
@@ -11,7 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { Loader2, MessageSquare } from 'lucide-react';
|
|
13
13
|
import { memo } from 'react';
|
|
14
|
-
import { Flexbox } from
|
|
14
|
+
import { Flexbox } from "../../Flex";
|
|
15
15
|
import Icon from "../../Icon";
|
|
16
16
|
import Text from "../../Text";
|
|
17
17
|
import { useStyles } from "./style";
|
package/es/List/type.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode, Ref } from 'react';
|
|
2
|
-
import type { FlexboxProps } from
|
|
2
|
+
import type { FlexboxProps } from "../Flex";
|
|
3
3
|
export interface ListItemProps extends Omit<FlexboxProps, 'title'> {
|
|
4
4
|
actions?: ReactNode;
|
|
5
5
|
active?: boolean;
|
|
@@ -11,9 +11,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
13
|
import { memo, useMemo } from 'react';
|
|
14
|
-
import { Flexbox } from 'react-layout-kit';
|
|
15
14
|
import A from "../../A";
|
|
16
15
|
import Block from "../../Block";
|
|
16
|
+
import { Flexbox } from "../../Flex";
|
|
17
17
|
import Text from "../../Text";
|
|
18
18
|
import SearchResultCards from "./SearchResultCards";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -16,9 +16,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
18
|
import { memo, useMemo } from 'react';
|
|
19
|
-
import { Flexbox } from 'react-layout-kit';
|
|
20
19
|
import A from "../../../A";
|
|
21
20
|
import Block from "../../../Block";
|
|
21
|
+
import { Flexbox } from "../../../Flex";
|
|
22
22
|
import Img from "../../../Img";
|
|
23
23
|
import Text from "../../../Text";
|
|
24
24
|
import { useStyles } from "./style";
|
|
@@ -11,7 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { cva } from 'class-variance-authority';
|
|
13
13
|
import { memo, useMemo } from 'react';
|
|
14
|
-
import { Flexbox } from
|
|
14
|
+
import { Flexbox } from "../Flex";
|
|
15
15
|
import { useStyles } from "./style";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
var MaskShadow = /*#__PURE__*/memo(function (_ref) {
|
package/es/MaskShadow/type.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { memo, useMemo } from 'react';
|
|
13
|
-
import { Center } from 'react-layout-kit';
|
|
14
13
|
import { useCdnFn } from "../ConfigProvider";
|
|
15
14
|
import FileTypeIcon from "../FileTypeIcon";
|
|
15
|
+
import { Center } from "../Flex";
|
|
16
16
|
import Img from "../Img";
|
|
17
17
|
import { getIconUrlForDirectoryPath, getIconUrlForFilePath } from "./utils";
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -18,9 +18,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
18
18
|
import { cva } from 'class-variance-authority';
|
|
19
19
|
import { ChevronDown, ChevronRight } from 'lucide-react';
|
|
20
20
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
21
|
-
import { Flexbox } from 'react-layout-kit';
|
|
22
21
|
import ActionIcon from "../ActionIcon";
|
|
23
22
|
import CopyButton from "../CopyButton";
|
|
23
|
+
import { Flexbox } from "../Flex";
|
|
24
24
|
import { useStyles } from "../Highlighter/style";
|
|
25
25
|
import MaterialFileTypeIcon from "../MaterialFileTypeIcon";
|
|
26
26
|
import Text from "../Text";
|
|
@@ -37,7 +37,8 @@ var MermaidHeaderLanguage = /*#__PURE__*/memo(function (_ref) {
|
|
|
37
37
|
flex: 1,
|
|
38
38
|
gap: 4,
|
|
39
39
|
horizontal: true,
|
|
40
|
-
justify: '
|
|
40
|
+
justify: 'flex-start',
|
|
41
|
+
paddingInline: 8,
|
|
41
42
|
children: [/*#__PURE__*/_jsx(MaterialFileTypeIcon, {
|
|
42
43
|
fallbackUnknownType: false,
|
|
43
44
|
filename: fileName || language,
|
|
@@ -171,21 +172,32 @@ export var MermaidFullFeatured = /*#__PURE__*/memo(function (_ref2) {
|
|
|
171
172
|
}), classNames === null || classNames === void 0 ? void 0 : classNames.header),
|
|
172
173
|
horizontal: true,
|
|
173
174
|
justify: 'space-between',
|
|
175
|
+
onClick: handleToggleExpand,
|
|
174
176
|
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.header,
|
|
175
|
-
children: [/*#__PURE__*/_jsx(
|
|
176
|
-
icon: expand ? ChevronDown : ChevronRight,
|
|
177
|
-
onClick: handleToggleExpand,
|
|
178
|
-
size: 'small'
|
|
179
|
-
}), /*#__PURE__*/_jsx(MermaidHeaderLanguage, {
|
|
177
|
+
children: [/*#__PURE__*/_jsx(MermaidHeaderLanguage, {
|
|
180
178
|
fileName: fileName,
|
|
181
179
|
language: language,
|
|
182
180
|
showLanguage: showLanguage
|
|
183
|
-
}), /*#__PURE__*/
|
|
181
|
+
}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
184
182
|
align: 'center',
|
|
185
183
|
flex: 'none',
|
|
186
184
|
gap: 4,
|
|
187
185
|
horizontal: true,
|
|
188
|
-
|
|
186
|
+
onClick: function onClick(e) {
|
|
187
|
+
return e.stopPropagation();
|
|
188
|
+
},
|
|
189
|
+
children: [/*#__PURE__*/_jsx(Flexbox, {
|
|
190
|
+
align: 'center',
|
|
191
|
+
className: 'panel-actions',
|
|
192
|
+
flex: 'none',
|
|
193
|
+
gap: 4,
|
|
194
|
+
horizontal: true,
|
|
195
|
+
children: actions
|
|
196
|
+
}), /*#__PURE__*/_jsx(ActionIcon, {
|
|
197
|
+
icon: expand ? ChevronDown : ChevronRight,
|
|
198
|
+
onClick: handleToggleExpand,
|
|
199
|
+
size: 'small'
|
|
200
|
+
})]
|
|
189
201
|
})]
|
|
190
202
|
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
191
203
|
className: cx(bodyVariants({
|
package/es/Mermaid/Mermaid.js
CHANGED
|
@@ -11,8 +11,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { cva } from 'class-variance-authority';
|
|
13
13
|
import { memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
14
|
-
import { Flexbox } from 'react-layout-kit';
|
|
15
14
|
import CopyButton from "../CopyButton";
|
|
15
|
+
import { Flexbox } from "../Flex";
|
|
16
16
|
import { useStyles } from "../Highlighter/style";
|
|
17
17
|
import Tag from "../Tag";
|
|
18
18
|
import FullFeatured from "./FullFeatured";
|
|
@@ -86,7 +86,10 @@ var Mermaid = /*#__PURE__*/memo(function (_ref) {
|
|
|
86
86
|
if (!copyable) return null;
|
|
87
87
|
return /*#__PURE__*/_jsx(CopyButton, {
|
|
88
88
|
content: getCopyContent,
|
|
89
|
-
size: actionIconSize
|
|
89
|
+
size: actionIconSize || {
|
|
90
|
+
blockSize: 28,
|
|
91
|
+
size: 16
|
|
92
|
+
}
|
|
90
93
|
});
|
|
91
94
|
}, [actionIconSize, copyable, getCopyContent]);
|
|
92
95
|
var actions = useMemo(function () {
|
|
@@ -23,7 +23,6 @@ var SyntaxMermaid = /*#__PURE__*/memo(function (_ref) {
|
|
|
23
23
|
children = _ref.children,
|
|
24
24
|
customTheme = _ref.theme,
|
|
25
25
|
variant = _ref.variant,
|
|
26
|
-
enablePanZoom = _ref.enablePanZoom,
|
|
27
26
|
className = _ref.className,
|
|
28
27
|
style = _ref.style;
|
|
29
28
|
var isDefaultTheme = customTheme === 'lobe-theme' || !customTheme;
|
|
@@ -88,9 +87,6 @@ var SyntaxMermaid = /*#__PURE__*/memo(function (_ref) {
|
|
|
88
87
|
maxHeight: 480,
|
|
89
88
|
minWidth: 300,
|
|
90
89
|
objectFit: 'contain',
|
|
91
|
-
preview: enablePanZoom ? {
|
|
92
|
-
mask: false
|
|
93
|
-
} : false,
|
|
94
90
|
ref: ref,
|
|
95
91
|
src: blobUrl,
|
|
96
92
|
style: _objectSpread({
|
|
@@ -11,8 +11,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { cva } from 'class-variance-authority';
|
|
13
13
|
import { memo, useMemo, useRef } from 'react';
|
|
14
|
-
import { Flexbox } from 'react-layout-kit';
|
|
15
14
|
import { mergeRefs } from 'react-merge-refs';
|
|
15
|
+
import { Flexbox } from "../Flex";
|
|
16
16
|
import { useStyles } from "./style";
|
|
17
17
|
import { useScrollOverflow } from "./useScrollOverflow";
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/es/SideNav/SideNav.js
CHANGED
|
@@ -10,7 +10,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { memo } from 'react';
|
|
13
|
-
import { Flexbox } from
|
|
13
|
+
import { Flexbox } from "../Flex";
|
|
14
14
|
import { useStyles } from "./style";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
package/es/SideNav/type.d.ts
CHANGED
package/es/Skeleton/Skeleton.js
CHANGED
|
@@ -10,7 +10,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
12
|
import { memo } from 'react';
|
|
13
|
-
import { Flexbox } from
|
|
13
|
+
import { Flexbox } from "../Flex";
|
|
14
14
|
import SkeletonAvatar from "./SkeletonAvatar";
|
|
15
15
|
import SkeletonParagraph from "./SkeletonParagraph";
|
|
16
16
|
import SkeletonTitle from "./SkeletonTitle";
|