@lobehub/ui 1.82.1 → 1.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Form/components/FormTitle.d.ts +1 -1
- package/es/Form/index.d.ts +9 -4
- package/es/Form/index.js +4 -1
- package/es/Highlighter/SyntaxHighlighter/index.d.ts +2 -2
- package/es/Markdown/index.js +2 -1
- package/es/hooks/useHighlight.d.ts +2 -2
- package/es/hooks/useHighlight.js +1 -1
- package/package.json +2 -2
package/es/Form/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormProps as AntFormProps, type FormInstance } from 'antd';
|
|
2
|
-
import { type ReactNode } from 'react';
|
|
3
|
-
import { type FormGroupProps } from './components/FormGroup';
|
|
4
|
-
import { type FormItemProps } from './components/FormItem';
|
|
2
|
+
import { type ReactNode, RefAttributes } from 'react';
|
|
3
|
+
import FormGroup, { type FormGroupProps } from './components/FormGroup';
|
|
4
|
+
import FormItem, { type FormItemProps } from './components/FormItem';
|
|
5
5
|
export interface ItemGroup {
|
|
6
6
|
children: FormItemProps[];
|
|
7
7
|
extra?: FormGroupProps['extra'];
|
|
@@ -14,5 +14,10 @@ export interface FormProps extends AntFormProps {
|
|
|
14
14
|
itemMinWidth?: FormItemProps['minWidth'];
|
|
15
15
|
items?: ItemGroup[];
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
export interface IForm {
|
|
18
|
+
(props: FormProps & RefAttributes<FormInstance>): ReactNode;
|
|
19
|
+
Group: typeof FormGroup;
|
|
20
|
+
Item: typeof FormItem;
|
|
21
|
+
}
|
|
22
|
+
declare const Form: IForm;
|
|
18
23
|
export default Form;
|
package/es/Form/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import FormItem from "./components/FormItem";
|
|
|
11
11
|
import { useStyles } from "./style";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
var
|
|
14
|
+
var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
15
15
|
var className = _ref.className,
|
|
16
16
|
itemMinWidth = _ref.itemMinWidth,
|
|
17
17
|
footer = _ref.footer,
|
|
@@ -46,4 +46,7 @@ var Form = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
46
46
|
})]
|
|
47
47
|
}));
|
|
48
48
|
});
|
|
49
|
+
var Form = FormParent;
|
|
50
|
+
Form.Item = FormItem;
|
|
51
|
+
Form.Group = FormGroup;
|
|
49
52
|
export default Form;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { type HighlighterCoreOptions } from 'shikiji';
|
|
3
3
|
export interface SyntaxHighlighterProps {
|
|
4
4
|
children: string;
|
|
5
5
|
language: string;
|
|
6
|
-
options?:
|
|
6
|
+
options?: HighlighterCoreOptions;
|
|
7
7
|
}
|
|
8
8
|
declare const SyntaxHighlighter: import("react").NamedExoticComponent<SyntaxHighlighterProps>;
|
|
9
9
|
export default SyntaxHighlighter;
|
package/es/Markdown/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
3
3
|
var _excluded = ["children", "className", "style"];
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
import { Collapse, Divider, Typography } from 'antd';
|
|
6
|
+
import { Collapse, Divider, Image, Typography } from 'antd';
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
9
9
|
import ReactMarkdown from 'react-markdown';
|
|
@@ -32,6 +32,7 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
},
|
|
35
|
+
img: Image,
|
|
35
36
|
pre: CodeBlock
|
|
36
37
|
};
|
|
37
38
|
return /*#__PURE__*/_jsx(Typography, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Highlighter, type
|
|
1
|
+
import { type Highlighter, type HighlighterCoreOptions } from 'shikiji';
|
|
2
2
|
export declare const languageMap: readonly ["javascript", "js", "jsx", "json", "markdown", "md", "less", "css", "typescript", "ts", "tsx", "diff", "bash"];
|
|
3
3
|
/**
|
|
4
4
|
* @title 代码高亮的存储对象
|
|
@@ -20,7 +20,7 @@ interface Store {
|
|
|
20
20
|
* @title Initialize the highlighter object
|
|
21
21
|
* @returns Initialization promise object
|
|
22
22
|
*/
|
|
23
|
-
initHighlighter: (options?:
|
|
23
|
+
initHighlighter: (options?: HighlighterCoreOptions) => Promise<void>;
|
|
24
24
|
}
|
|
25
25
|
export declare const useHighlight: import("zustand/traditional").UseBoundStoreWithEqualityFn<import("zustand/vanilla").StoreApi<Store>>;
|
|
26
26
|
export {};
|
package/es/hooks/useHighlight.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import { getHighlighter } from '
|
|
3
|
+
import { getHighlighter } from 'shikiji';
|
|
4
4
|
import { shallow } from 'zustand/shallow';
|
|
5
5
|
import { createWithEqualityFn } from 'zustand/traditional';
|
|
6
6
|
import { themeConfig } from "../Highlighter/theme";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.84.0",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"react-simple-code-editor": "^0",
|
|
103
103
|
"rehype-raw": "^6",
|
|
104
104
|
"remark-gfm": "^3",
|
|
105
|
-
"
|
|
105
|
+
"shikiji": "^0",
|
|
106
106
|
"styled-components": "^6",
|
|
107
107
|
"three": "^0.150",
|
|
108
108
|
"ts-md5": "^1",
|