@lobehub/ui 1.138.8 → 1.138.9

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.
@@ -1,3 +1,4 @@
1
1
  import { FC } from 'react';
2
- export declare const CodeLite: FC<any>;
3
- export declare const CodeFullFeatured: FC<any>;
2
+ import { type PreProps } from '../mdx/Pre';
3
+ export declare const CodeLite: FC<Partial<PreProps>>;
4
+ export declare const CodeFullFeatured: FC<Partial<PreProps>>;
@@ -17,7 +17,7 @@ var useCode = function useCode(raw) {
17
17
  if (!children) return;
18
18
  var content = (Array.isArray(children) ? children[0] : children).trim();
19
19
  var lang = (className === null || className === void 0 ? void 0 : className.replace('language-', '')) || FALLBACK_LANG;
20
- var isSingleLine = countLines(content) <= 1 && content.length <= 48;
20
+ var isSingleLine = countLines(content) <= 1 && content.length <= 32;
21
21
  return {
22
22
  content: content,
23
23
  isSingleLine: isSingleLine,
@@ -31,14 +31,15 @@ var CodeBlock = function CodeBlock(_ref) {
31
31
  var code = useCode(rest === null || rest === void 0 || (_rest$children = rest.children) === null || _rest$children === void 0 ? void 0 : _rest$children[0]);
32
32
  if (!code) return;
33
33
  if (code.isSingleLine) return /*#__PURE__*/_jsx(PreSingleLine, {
34
- lang: code.lang,
34
+ language: code.lang,
35
35
  children: code.content
36
36
  });
37
- return /*#__PURE__*/_jsx(Pre, {
37
+ return /*#__PURE__*/_jsx(Pre, _objectSpread(_objectSpread({
38
38
  fullFeatured: fullFeatured,
39
- lang: code.lang,
39
+ language: code.lang
40
+ }, rest), {}, {
40
41
  children: code.content
41
- });
42
+ }));
42
43
  };
43
44
  export var CodeLite = function CodeLite(props) {
44
45
  return /*#__PURE__*/_jsx(CodeBlock, _objectSpread({}, props));
@@ -1,15 +1,19 @@
1
+ import type { AnchorProps } from 'antd';
1
2
  import { CSSProperties } from 'react';
2
3
  import { type ImageProps } from "../mdx/Image";
4
+ import type { PreProps } from "../mdx/Pre";
3
5
  import { type VideoProps } from "../mdx/Video";
6
+ import type { AProps } from "../types";
4
7
  import type { TypographyProps } from './Typography';
5
8
  export interface MarkdownProps extends TypographyProps {
6
9
  allowHtml?: boolean;
7
10
  children: string;
8
11
  className?: string;
9
12
  componentProps?: {
10
- img?: ImageProps;
11
- pre?: any;
12
- video?: VideoProps;
13
+ a?: Partial<AProps & AnchorProps>;
14
+ img?: Partial<ImageProps>;
15
+ pre?: Partial<PreProps>;
16
+ video?: Partial<VideoProps>;
13
17
  };
14
18
  enableImageGallery?: boolean;
15
19
  fullFeaturedCodeBlock?: boolean;
@@ -12,6 +12,7 @@ import remarkGfm from 'remark-gfm';
12
12
  import remarkMath from 'remark-math';
13
13
  import ImageGallery from "../Image/ImageGallery";
14
14
  import Image from "../mdx/Image";
15
+ import Link from "../mdx/Link";
15
16
  import Video from "../mdx/Video";
16
17
  import { CodeFullFeatured, CodeLite } from "./CodeBlock";
17
18
  import { useStyles as useMarkdownStyles } from "./markdown.style";
@@ -50,6 +51,9 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
50
51
  mdStyles = _useMarkdownStyles.styles;
51
52
  var components = useMemo(function () {
52
53
  return {
54
+ a: function a(props) {
55
+ return /*#__PURE__*/_jsx(Link, _objectSpread(_objectSpread({}, props), componentProps === null || componentProps === void 0 ? void 0 : componentProps.a));
56
+ },
53
57
  img: enableImageGallery ? function (props) {
54
58
  return /*#__PURE__*/_jsx(Image, _objectSpread(_objectSpread({}, props), componentProps === null || componentProps === void 0 ? void 0 : componentProps.img));
55
59
  } : undefined,
@@ -1,7 +1,6 @@
1
- import type { ReactNode } from 'react';
2
1
  import { FC } from 'react';
3
- export interface CalloutProps {
4
- children: ReactNode;
2
+ import { FlexboxProps } from 'react-layout-kit';
3
+ export interface CalloutProps extends FlexboxProps {
5
4
  type?: 'tip' | 'error' | 'important' | 'info' | 'warning';
6
5
  }
7
6
  declare const Callout: FC<CalloutProps>;
package/es/mdx/Callout.js CHANGED
@@ -1,6 +1,9 @@
1
1
  'use client';
2
2
 
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
+ var _excluded = ["children", "type", "className", "style"];
4
7
  var _templateObject, _templateObject2, _templateObject3;
5
8
  import { createStyles } from 'antd-style';
6
9
  import { AlertOctagon, AlertTriangle, Info, Lightbulb, MessageSquareWarning } from 'lucide-react';
@@ -20,7 +23,10 @@ var useStyles = createStyles(function (_ref) {
20
23
  var Callout = function Callout(_ref2) {
21
24
  var children = _ref2.children,
22
25
  _ref2$type = _ref2.type,
23
- type = _ref2$type === void 0 ? 'info' : _ref2$type;
26
+ type = _ref2$type === void 0 ? 'info' : _ref2$type,
27
+ className = _ref2.className,
28
+ style = _ref2.style,
29
+ rest = _objectWithoutProperties(_ref2, _excluded);
24
30
  var _useStyles = useStyles(),
25
31
  cx = _useStyles.cx,
26
32
  styles = _useStyles.styles,
@@ -50,15 +56,16 @@ var Callout = function Callout(_ref2) {
50
56
  var selectedType = (typeConfig === null || typeConfig === void 0 ? void 0 : typeConfig[type]) || typeConfig.info;
51
57
  var icon = selectedType.icon,
52
58
  color = selectedType.color;
53
- return /*#__PURE__*/_jsxs(Flexbox, {
59
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
54
60
  align: 'flex-start',
55
- className: styles.container,
61
+ className: cx(styles.container, className),
56
62
  horizontal: true,
57
- style: {
63
+ style: _objectSpread({
58
64
  background: rgba(color, 0.1),
59
65
  borderColor: rgba(color, 0.5),
60
66
  color: color
61
- },
67
+ }, style)
68
+ }, rest), {}, {
62
69
  children: [/*#__PURE__*/_jsx(Icon, {
63
70
  icon: icon,
64
71
  size: {
@@ -73,6 +80,6 @@ var Callout = function Callout(_ref2) {
73
80
  children: children
74
81
  })
75
82
  })]
76
- });
83
+ }));
77
84
  };
78
85
  export default Callout;
package/es/mdx/Card.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
- var _excluded = ["icon", "title", "desc", "href", "iconProps", "image"];
6
+ var _excluded = ["icon", "title", "desc", "href", "iconProps", "className", "image"];
7
7
  var _templateObject, _templateObject2, _templateObject3;
8
8
  import { createStyles } from 'antd-style';
9
9
  import { Flexbox } from 'react-layout-kit';
@@ -29,15 +29,17 @@ var Card = function Card(_ref2) {
29
29
  desc = _ref2.desc,
30
30
  href = _ref2.href,
31
31
  iconProps = _ref2.iconProps,
32
+ className = _ref2.className,
32
33
  image = _ref2.image,
33
34
  rest = _objectWithoutProperties(_ref2, _excluded);
34
35
  var _useStyles = useStyles(),
36
+ cx = _useStyles.cx,
35
37
  styles = _useStyles.styles;
36
38
  return /*#__PURE__*/_jsx(A, {
37
39
  href: href,
38
40
  children: /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
39
41
  align: 'flex-start',
40
- className: styles.card
42
+ className: cx(styles.card, className)
41
43
  }, rest), {}, {
42
44
  children: [image && /*#__PURE__*/_jsx(Img, {
43
45
  alt: title,
package/es/mdx/Cards.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- export interface CardsProps extends PropsWithChildren {
3
- maxItemWidth?: string | number;
4
- rows?: number;
5
- }
1
+ import { FC } from 'react';
2
+ import { type GridProps } from "../Grid";
3
+ export type CardsProps = GridProps;
6
4
  declare const Cards: FC<CardsProps>;
7
5
  export default Cards;
package/es/mdx/Cards.js CHANGED
@@ -1,6 +1,9 @@
1
1
  'use client';
2
2
 
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
+ var _excluded = ["children", "className", "maxItemWidth", "rows"];
4
7
  var _templateObject;
5
8
  import { createStyles } from 'antd-style';
6
9
  import Grid from "../Grid";
@@ -13,17 +16,21 @@ var useStyles = createStyles(function (_ref) {
13
16
  });
14
17
  var Cards = function Cards(_ref2) {
15
18
  var children = _ref2.children,
19
+ className = _ref2.className,
16
20
  _ref2$maxItemWidth = _ref2.maxItemWidth,
17
21
  maxItemWidth = _ref2$maxItemWidth === void 0 ? 250 : _ref2$maxItemWidth,
18
22
  _ref2$rows = _ref2.rows,
19
- rows = _ref2$rows === void 0 ? 3 : _ref2$rows;
23
+ rows = _ref2$rows === void 0 ? 3 : _ref2$rows,
24
+ rest = _objectWithoutProperties(_ref2, _excluded);
20
25
  var _useStyles = useStyles(),
26
+ cx = _useStyles.cx,
21
27
  styles = _useStyles.styles;
22
- return /*#__PURE__*/_jsx(Grid, {
23
- className: styles.container,
28
+ return /*#__PURE__*/_jsx(Grid, _objectSpread(_objectSpread({
29
+ className: cx(styles.container, className),
24
30
  maxItemWidth: maxItemWidth,
25
- rows: rows,
31
+ rows: rows
32
+ }, rest), {}, {
26
33
  children: children
27
- });
34
+ }));
28
35
  };
29
36
  export default Cards;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { FlexboxProps } from 'react-layout-kit';
3
+ import { type IconProps } from "../Icon";
4
+ export interface FileProps extends Omit<FlexboxProps, 'children'> {
5
+ icon?: IconProps['icon'];
6
+ name: string;
7
+ }
8
+ declare const File: FC<FileProps>;
9
+ export default File;
package/es/mdx/File.js ADDED
@@ -0,0 +1,28 @@
1
+ 'use client';
2
+
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
+ var _excluded = ["name", "icon"];
6
+ import { FileIcon } from 'lucide-react';
7
+ import { Flexbox } from 'react-layout-kit';
8
+ import Icon from "../Icon";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ var File = function File(_ref) {
12
+ var name = _ref.name,
13
+ _ref$icon = _ref.icon,
14
+ icon = _ref$icon === void 0 ? FileIcon : _ref$icon,
15
+ rest = _objectWithoutProperties(_ref, _excluded);
16
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
17
+ align: 'center',
18
+ gap: 4,
19
+ horizontal: true
20
+ }, rest), {}, {
21
+ children: [/*#__PURE__*/_jsx(Icon, {
22
+ icon: icon
23
+ }), /*#__PURE__*/_jsx("span", {
24
+ children: name
25
+ })]
26
+ }));
27
+ };
28
+ export default File;
@@ -1,24 +1,5 @@
1
- import { FC, ReactNode } from 'react';
2
- import { type IconProps } from "../Icon";
3
- export interface _FileTreeProps {
4
- children: ReactNode;
5
- }
6
- declare const _FileTree: FC<_FileTreeProps>;
7
- export interface FolderProps {
8
- children: ReactNode;
9
- defaultOpen?: boolean;
10
- icon?: IconProps['icon'];
11
- name: string;
12
- }
13
- declare const Folder: FC<FolderProps>;
14
- export interface FileProps {
15
- icon?: IconProps['icon'];
16
- name: string;
17
- }
18
- declare const File: FC<FileProps>;
19
- export type FileTreeProps = typeof _FileTree & {
20
- File: typeof File;
21
- Folder: typeof Folder;
22
- };
23
- declare const FileTree: FileTreeProps;
1
+ import { FC } from 'react';
2
+ import { DivProps } from "../types";
3
+ export type FileTreeProps = DivProps;
4
+ declare const FileTree: FC<FileTreeProps>;
24
5
  export default FileTree;
@@ -1,81 +1,30 @@
1
1
  'use client';
2
2
 
3
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
5
- var _templateObject, _templateObject2, _templateObject3;
6
+ var _excluded = ["children", "className"];
7
+ var _templateObject;
6
8
  import { createStyles } from 'antd-style';
7
- import { FileIcon, FolderIcon, FolderOpen } from 'lucide-react';
8
- import { useState } from 'react';
9
- import { Flexbox } from 'react-layout-kit';
10
- import Icon from "../Icon";
11
9
  import { jsx as _jsx } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
10
  var useStyles = createStyles(function (_ref) {
14
11
  var css = _ref.css,
15
12
  token = _ref.token;
16
13
  return {
17
- container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n padding-block: 0.75em;\n padding-inline: 1em;\n\n color: ", ";\n\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color);\n "])), token.colorTextSecondary),
18
- folder: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n &:hover {\n color: ", ";\n }\n "])), token.colorText),
19
- folderChildren: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-inline-start: 1em;\n "])))
14
+ container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-block: calc(var(--lobe-markdown-margin-multiple) * 1em);\n padding-block: 0.75em;\n padding-inline: 1em;\n\n color: ", ";\n\n border-radius: calc(var(--lobe-markdown-border-radius) * 1px);\n box-shadow: 0 0 0 1px var(--lobe-markdown-border-color);\n "])), token.colorTextSecondary)
20
15
  };
21
16
  });
22
- var _FileTree = function _FileTree(_ref2) {
23
- var children = _ref2.children;
17
+ var FileTree = function FileTree(_ref2) {
18
+ var children = _ref2.children,
19
+ className = _ref2.className,
20
+ rest = _objectWithoutProperties(_ref2, _excluded);
24
21
  var _useStyles = useStyles(),
22
+ cx = _useStyles.cx,
25
23
  styles = _useStyles.styles;
26
- return /*#__PURE__*/_jsx("div", {
27
- className: styles.container,
24
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
25
+ className: cx(styles.container, className)
26
+ }, rest), {}, {
28
27
  children: children
29
- });
28
+ }));
30
29
  };
31
- var Folder = function Folder(_ref3) {
32
- var name = _ref3.name,
33
- defaultOpen = _ref3.defaultOpen,
34
- _ref3$icon = _ref3.icon,
35
- icon = _ref3$icon === void 0 ? FolderIcon : _ref3$icon,
36
- children = _ref3.children;
37
- var _useState = useState(defaultOpen),
38
- _useState2 = _slicedToArray(_useState, 2),
39
- open = _useState2[0],
40
- setOpen = _useState2[1];
41
- var _useStyles2 = useStyles(),
42
- styles = _useStyles2.styles;
43
- return /*#__PURE__*/_jsxs(Flexbox, {
44
- children: [/*#__PURE__*/_jsxs(Flexbox, {
45
- align: 'center',
46
- className: styles.folder,
47
- gap: 4,
48
- horizontal: true,
49
- onClick: function onClick() {
50
- return setOpen(!open);
51
- },
52
- children: [/*#__PURE__*/_jsx(Icon, {
53
- icon: open ? FolderOpen : icon
54
- }), /*#__PURE__*/_jsx("span", {
55
- children: name
56
- })]
57
- }), open && /*#__PURE__*/_jsx(Flexbox, {
58
- className: styles.folderChildren,
59
- children: children
60
- })]
61
- });
62
- };
63
- var File = function File(_ref4) {
64
- var name = _ref4.name,
65
- _ref4$icon = _ref4.icon,
66
- icon = _ref4$icon === void 0 ? FileIcon : _ref4$icon;
67
- return /*#__PURE__*/_jsxs(Flexbox, {
68
- align: 'center',
69
- gap: 4,
70
- horizontal: true,
71
- children: [/*#__PURE__*/_jsx(Icon, {
72
- icon: icon
73
- }), /*#__PURE__*/_jsx("span", {
74
- children: name
75
- })]
76
- });
77
- };
78
- var FileTree = _FileTree;
79
- FileTree.Folder = Folder;
80
- FileTree.File = File;
81
30
  export default FileTree;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { FlexboxProps } from 'react-layout-kit';
3
+ import { type IconProps } from "../Icon";
4
+ export interface FolderProps extends FlexboxProps {
5
+ defaultOpen?: boolean;
6
+ icon?: IconProps['icon'];
7
+ name: string;
8
+ }
9
+ declare const Folder: FC<FolderProps>;
10
+ export default Folder;
@@ -0,0 +1,57 @@
1
+ 'use client';
2
+
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
7
+ var _excluded = ["name", "defaultOpen", "icon", "children"];
8
+ var _templateObject, _templateObject2;
9
+ import { createStyles } from 'antd-style';
10
+ import { FolderIcon, FolderOpen } from 'lucide-react';
11
+ import { useState } from 'react';
12
+ import { Flexbox } from 'react-layout-kit';
13
+ import Icon from "../Icon";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ var useStyles = createStyles(function (_ref) {
17
+ var css = _ref.css,
18
+ token = _ref.token;
19
+ return {
20
+ folder: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n &:hover {\n color: ", ";\n }\n "])), token.colorText),
21
+ folderChildren: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-inline-start: 1em;\n "])))
22
+ };
23
+ });
24
+ var Folder = function Folder(_ref2) {
25
+ var name = _ref2.name,
26
+ defaultOpen = _ref2.defaultOpen,
27
+ _ref2$icon = _ref2.icon,
28
+ icon = _ref2$icon === void 0 ? FolderIcon : _ref2$icon,
29
+ children = _ref2.children,
30
+ rest = _objectWithoutProperties(_ref2, _excluded);
31
+ var _useState = useState(defaultOpen),
32
+ _useState2 = _slicedToArray(_useState, 2),
33
+ open = _useState2[0],
34
+ setOpen = _useState2[1];
35
+ var _useStyles = useStyles(),
36
+ styles = _useStyles.styles;
37
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({}, rest), {}, {
38
+ children: [/*#__PURE__*/_jsxs(Flexbox, {
39
+ align: 'center',
40
+ className: styles.folder,
41
+ gap: 4,
42
+ horizontal: true,
43
+ onClick: function onClick() {
44
+ return setOpen(!open);
45
+ },
46
+ children: [/*#__PURE__*/_jsx(Icon, {
47
+ icon: open ? FolderOpen : icon
48
+ }), /*#__PURE__*/_jsx("span", {
49
+ children: name
50
+ })]
51
+ }), open && /*#__PURE__*/_jsx(Flexbox, {
52
+ className: styles.folderChildren,
53
+ children: children
54
+ })]
55
+ }));
56
+ };
57
+ export default Folder;
package/es/mdx/Image.d.ts CHANGED
@@ -1,14 +1,8 @@
1
- import { CSSProperties, FC } from 'react';
2
- export interface ImageProps {
3
- alt: string;
4
- borderless?: boolean;
5
- className?: string;
1
+ import { FC } from 'react';
2
+ import { type ImageProps as LobeImageProps } from "../Image";
3
+ export interface ImageProps extends LobeImageProps {
6
4
  cover?: boolean;
7
- height?: number;
8
5
  inStep?: boolean;
9
- src: string;
10
- style?: CSSProperties;
11
- width?: number;
12
6
  }
13
7
  declare const Image: FC<ImageProps>;
14
8
  export default Image;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { AnchorProps } from 'antd';
3
+ import { AProps } from "../types";
4
+ declare const Link: import("react").ForwardRefExoticComponent<AProps & AnchorProps & import("react").RefAttributes<any>>;
5
+ export default Link;
package/es/mdx/Link.js ADDED
@@ -0,0 +1,18 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["href", "target"];
4
+ import { forwardRef } from 'react';
5
+ import A from "../A";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ var Link = /*#__PURE__*/forwardRef(function (_ref, ref) {
8
+ var href = _ref.href,
9
+ target = _ref.target,
10
+ rest = _objectWithoutProperties(_ref, _excluded);
11
+ var isNewWindoes = href === null || href === void 0 ? void 0 : href.startsWith('http');
12
+ return /*#__PURE__*/_jsx(A, _objectSpread({
13
+ href: href,
14
+ ref: ref,
15
+ target: target || isNewWindoes ? '_blank' : undefined
16
+ }, rest));
17
+ });
18
+ export default Link;
package/es/mdx/Pre.d.ts CHANGED
@@ -1,14 +1,7 @@
1
- import { CSSProperties, FC, ReactNode } from 'react';
2
- export interface PreProps {
3
- allowChangeLanguage?: boolean;
4
- children: string;
5
- className?: string;
6
- fileName?: string;
7
- fullFeatured?: boolean;
8
- icon?: ReactNode;
9
- lang: string;
10
- style?: CSSProperties;
11
- }
1
+ import { FC } from 'react';
2
+ import { type HighlighterProps } from "../Highlighter";
3
+ import { type SnippetProps } from "../Snippet";
4
+ export type PreProps = HighlighterProps;
12
5
  export declare const Pre: FC<PreProps>;
13
- export declare const PreSingleLine: FC<Omit<PreProps, 'fullFeatured'>>;
6
+ export declare const PreSingleLine: FC<SnippetProps>;
14
7
  export default Pre;
package/es/mdx/Pre.js CHANGED
@@ -1,6 +1,10 @@
1
1
  'use client';
2
2
 
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
+ var _excluded = ["fullFeatured", "fileName", "allowChangeLanguage", "language", "children", "className", "style", "icon"],
7
+ _excluded2 = ["language", "children", "className", "style"];
4
8
  var _templateObject, _templateObject2;
5
9
  import { createStyles } from 'antd-style';
6
10
  import Highlighter from "../Highlighter";
@@ -18,16 +22,17 @@ export var Pre = function Pre(_ref2) {
18
22
  var fullFeatured = _ref2.fullFeatured,
19
23
  fileName = _ref2.fileName,
20
24
  allowChangeLanguage = _ref2.allowChangeLanguage,
21
- _ref2$lang = _ref2.lang,
22
- lang = _ref2$lang === void 0 ? FALLBACK_LANG : _ref2$lang,
25
+ _ref2$language = _ref2.language,
26
+ language = _ref2$language === void 0 ? FALLBACK_LANG : _ref2$language,
23
27
  children = _ref2.children,
24
28
  className = _ref2.className,
25
29
  style = _ref2.style,
26
- icon = _ref2.icon;
30
+ icon = _ref2.icon,
31
+ rest = _objectWithoutProperties(_ref2, _excluded);
27
32
  var _useStyles = useStyles(),
28
33
  styles = _useStyles.styles,
29
34
  cx = _useStyles.cx;
30
- return /*#__PURE__*/_jsx(Highlighter, {
35
+ return /*#__PURE__*/_jsx(Highlighter, _objectSpread(_objectSpread({
31
36
  allowChangeLanguage: allowChangeLanguage,
32
37
  className: cx(styles.container, styles.highlight, className),
33
38
  copyButtonSize: {
@@ -37,28 +42,31 @@ export var Pre = function Pre(_ref2) {
37
42
  fileName: fileName,
38
43
  fullFeatured: fullFeatured,
39
44
  icon: icon,
40
- language: lang,
45
+ language: language,
41
46
  style: style,
42
- type: "block",
47
+ type: "block"
48
+ }, rest), {}, {
43
49
  children: children
44
- });
50
+ }));
45
51
  };
46
52
  export var PreSingleLine = function PreSingleLine(_ref3) {
47
- var _ref3$lang = _ref3.lang,
48
- lang = _ref3$lang === void 0 ? FALLBACK_LANG : _ref3$lang,
53
+ var _ref3$language = _ref3.language,
54
+ language = _ref3$language === void 0 ? FALLBACK_LANG : _ref3$language,
49
55
  children = _ref3.children,
50
56
  className = _ref3.className,
51
- style = _ref3.style;
57
+ style = _ref3.style,
58
+ rest = _objectWithoutProperties(_ref3, _excluded2);
52
59
  var _useStyles2 = useStyles(),
53
60
  cx = _useStyles2.cx,
54
61
  styles = _useStyles2.styles;
55
- return /*#__PURE__*/_jsx(Snippet, {
62
+ return /*#__PURE__*/_jsx(Snippet, _objectSpread(_objectSpread({
56
63
  className: cx(styles.container, className),
57
64
  "data-code-type": "highlighter",
58
- language: lang,
65
+ language: language,
59
66
  style: style,
60
- type: 'block',
67
+ type: 'block'
68
+ }, rest), {}, {
61
69
  children: children
62
- });
70
+ }));
63
71
  };
64
72
  export default Pre;
package/es/mdx/Steps.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- declare const Steps: FC<PropsWithChildren>;
1
+ import { FC } from 'react';
2
+ import { DivProps } from "../types";
3
+ declare const Steps: FC<DivProps>;
3
4
  export default Steps;
package/es/mdx/Steps.js CHANGED
@@ -1,6 +1,9 @@
1
1
  'use client';
2
2
 
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
+ var _excluded = ["children", "className"];
4
7
  var _templateObject;
5
8
  import { createStyles } from 'antd-style';
6
9
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -12,12 +15,16 @@ var useStyles = createStyles(function (_ref) {
12
15
  };
13
16
  });
14
17
  var Steps = function Steps(_ref2) {
15
- var children = _ref2.children;
18
+ var children = _ref2.children,
19
+ className = _ref2.className,
20
+ rest = _objectWithoutProperties(_ref2, _excluded);
16
21
  var _useStyles = useStyles(),
22
+ cx = _useStyles.cx,
17
23
  styles = _useStyles.styles;
18
- return /*#__PURE__*/_jsx("div", {
19
- className: styles.container,
24
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
25
+ className: cx(styles.container, className)
26
+ }, rest), {}, {
20
27
  children: children
21
- });
28
+ }));
22
29
  };
23
30
  export default Steps;
package/es/mdx/Tab.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { FC, ReactNode } from 'react';
2
- export interface TabProps {
3
- children: ReactNode;
4
- }
1
+ import { FC } from 'react';
2
+ import { DivProps } from "../types";
3
+ export type TabProps = DivProps;
5
4
  declare const Tab: FC<TabProps>;
6
5
  export default Tab;
package/es/mdx/Tab.js CHANGED
@@ -1,6 +1,9 @@
1
1
  'use client';
2
2
 
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
5
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
6
+ var _excluded = ["children", "className"];
4
7
  var _templateObject;
5
8
  import { createStyles } from 'antd-style';
6
9
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -11,14 +14,18 @@ var useStyles = createStyles(function (_ref) {
11
14
  };
12
15
  });
13
16
  var Tab = function Tab(_ref2) {
14
- var children = _ref2.children;
17
+ var children = _ref2.children,
18
+ className = _ref2.className,
19
+ rest = _objectWithoutProperties(_ref2, _excluded);
15
20
  var _useStyles = useStyles(),
21
+ cx = _useStyles.cx,
16
22
  styles = _useStyles.styles;
17
- return /*#__PURE__*/_jsx("div", {
18
- className: styles.body,
23
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
24
+ className: cx(styles.body, className)
25
+ }, rest), {}, {
19
26
  children: /*#__PURE__*/_jsx("div", {
20
27
  children: children
21
28
  })
22
- });
29
+ }));
23
30
  };
24
31
  export default Tab;
package/es/mdx/Tabs.d.ts CHANGED
@@ -1,8 +1,11 @@
1
1
  import { FC, ReactNode } from 'react';
2
- export interface TabsProps {
2
+ import { FlexboxProps } from 'react-layout-kit';
3
+ import { type TabsNavProps } from "../TabsNav";
4
+ export interface TabsProps extends Omit<FlexboxProps, 'children'> {
3
5
  children: ReactNode[];
4
6
  defaultIndex?: number | string;
5
7
  items: string[];
8
+ tabNavProps?: Partial<TabsNavProps>;
6
9
  }
7
10
  declare const Tabs: FC<TabsProps>;
8
11
  export default Tabs;
package/es/mdx/Tabs.js CHANGED
@@ -1,7 +1,11 @@
1
1
  'use client';
2
2
 
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
6
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
7
+ var _excluded = ["defaultIndex", "items", "children", "className", "tabNavProps"],
8
+ _excluded2 = ["className", "onChange"];
5
9
  var _templateObject, _templateObject2;
6
10
  import { createStyles } from 'antd-style';
7
11
  import { useState } from 'react';
@@ -22,28 +26,40 @@ var Tabs = function Tabs(_ref2) {
22
26
  var _ref2$defaultIndex = _ref2.defaultIndex,
23
27
  defaultIndex = _ref2$defaultIndex === void 0 ? '0' : _ref2$defaultIndex,
24
28
  items = _ref2.items,
25
- children = _ref2.children;
29
+ children = _ref2.children,
30
+ className = _ref2.className,
31
+ _ref2$tabNavProps = _ref2.tabNavProps,
32
+ tabNavProps = _ref2$tabNavProps === void 0 ? {} : _ref2$tabNavProps,
33
+ rest = _objectWithoutProperties(_ref2, _excluded);
34
+ var tabNavClassName = tabNavProps.className,
35
+ _onChange = tabNavProps.onChange,
36
+ tabNavRest = _objectWithoutProperties(tabNavProps, _excluded2);
26
37
  var _useState = useState(String(defaultIndex)),
27
38
  _useState2 = _slicedToArray(_useState, 2),
28
39
  activeIndex = _useState2[0],
29
40
  setActiveIndex = _useState2[1];
30
41
  var _useStyles = useStyles(),
42
+ cx = _useStyles.cx,
31
43
  styles = _useStyles.styles;
32
44
  var index = Number(activeIndex);
33
- return /*#__PURE__*/_jsxs(Flexbox, {
34
- className: styles.container,
35
- children: [/*#__PURE__*/_jsx(TabsNav, {
45
+ return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
46
+ className: cx(styles.container, className)
47
+ }, rest), {}, {
48
+ children: [/*#__PURE__*/_jsx(TabsNav, _objectSpread({
36
49
  activeKey: activeIndex,
37
- className: styles.header,
50
+ className: cx(styles.header, tabNavClassName),
38
51
  items: items.map(function (item, i) {
39
52
  return {
40
53
  key: String(i),
41
54
  label: item
42
55
  };
43
56
  }),
44
- onChange: setActiveIndex,
57
+ onChange: function onChange(v) {
58
+ setActiveIndex(v);
59
+ _onChange === null || _onChange === void 0 || _onChange(v);
60
+ },
45
61
  variant: 'compact'
46
- }), (children === null || children === void 0 ? void 0 : children[index]) || '']
47
- });
62
+ }, tabNavRest)), (children === null || children === void 0 ? void 0 : children[index]) || '']
63
+ }));
48
64
  };
49
65
  export default Tabs;
package/es/mdx/Video.d.ts CHANGED
@@ -1,14 +1,8 @@
1
- import { CSSProperties, FC } from 'react';
2
- export interface VideoProps {
3
- borderless?: boolean;
4
- className?: string;
1
+ import { FC } from 'react';
2
+ import { type VideoProps as LobeVideoProps } from "../Video";
3
+ export interface VideoProps extends LobeVideoProps {
5
4
  cover?: boolean;
6
- height?: number;
7
5
  inStep?: boolean;
8
- poster?: string;
9
- src: string;
10
- style?: CSSProperties;
11
- width?: number;
12
6
  }
13
7
  declare const Video: FC<VideoProps>;
14
8
  export default Video;
package/es/mdx/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export { default as Callout, type CalloutProps } from './Callout';
2
2
  export { default as Card, type CardProps } from './Card';
3
3
  export { default as Cards, type CardsProps } from './Cards';
4
+ export { default as File, type FileProps } from './File';
4
5
  export { default as FileTree, type FileTreeProps } from './FileTree';
6
+ export { default as Folder, type FolderProps } from './Folder';
5
7
  export { default as Image, type ImageProps } from './Image';
6
8
  export { default as mdxComponents } from './mdxComponents';
7
9
  export { default as Pre, type PreProps, PreSingleLine } from './Pre';
package/es/mdx/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  export { default as Callout } from "./Callout";
2
2
  export { default as Card } from "./Card";
3
3
  export { default as Cards } from "./Cards";
4
+ export { default as File } from "./File";
4
5
  export { default as FileTree } from "./FileTree";
6
+ export { default as Folder } from "./Folder";
5
7
  export { default as Image } from "./Image";
6
8
  export { default as mdxComponents } from "./mdxComponents";
7
9
  export { default as Pre, PreSingleLine } from "./Pre";
@@ -2,14 +2,13 @@
2
2
  declare const mdxComponents: {
3
3
  Callout: import("react").FC<import("./Callout").CalloutProps>;
4
4
  Card: import("react").FC<import("./Card").CardProps>;
5
- Cards: import("react").FC<import("./Cards").CardsProps>;
6
- FileTree: import("./FileTree").FileTreeProps;
5
+ Cards: import("react").FC<import("..").GridProps>;
6
+ FileTree: import("react").FC<import("..").DivProps>;
7
7
  Image: import("react").FC<import("./Image").ImageProps>;
8
- Steps: import("react").FC<{
9
- children?: import("react").ReactNode;
10
- }>;
11
- Tab: import("react").FC<import("./Tab").TabProps>;
8
+ Steps: import("react").FC<import("..").DivProps>;
9
+ Tab: import("react").FC<import("..").DivProps>;
12
10
  Tabs: import("react").FC<import("./Tabs").TabsProps>;
13
11
  Video: import("react").FC<import("./Video").VideoProps>;
12
+ a: import("react").ForwardRefExoticComponent<import("..").AProps & import("antd").AnchorProps & import("react").RefAttributes<any>>;
14
13
  };
15
14
  export default mdxComponents;
@@ -3,6 +3,7 @@ import Card from "./Card";
3
3
  import Cards from "./Cards";
4
4
  import FileTree from "./FileTree";
5
5
  import Image from "./Image";
6
+ import Link from "./Link";
6
7
  import Steps from "./Steps";
7
8
  import Tab from "./Tab";
8
9
  import Tabs from "./Tabs";
@@ -16,6 +17,7 @@ var mdxComponents = {
16
17
  Steps: Steps,
17
18
  Tab: Tab,
18
19
  Tabs: Tabs,
19
- Video: Video
20
+ Video: Video,
21
+ a: Link
20
22
  };
21
23
  export default mdxComponents;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.138.8",
3
+ "version": "1.138.9",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",