@agentscope-ai/design 1.0.19 → 1.0.20
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/lib/components/commonComponents/CodeBlock/index.js +21 -12
- package/llms/all.llms.txt +4976 -0
- package/llms/components/commonComponents/Alert/index.zh-CN.llms.txt +32 -0
- package/llms/components/commonComponents/AlertDialog/index.zh-CN.llms.txt +171 -0
- package/llms/components/commonComponents/Anchor/index.zh-CN.llms.txt +51 -0
- package/llms/components/commonComponents/Audio/index.zh-CN.llms.txt +7 -0
- package/llms/components/commonComponents/Avatar/index.zh-CN.llms.txt +37 -0
- package/llms/components/commonComponents/Breadcrumb/index.zh-CN.llms.txt +117 -0
- package/llms/components/commonComponents/Button/index.zh-CN.llms.txt +54 -0
- package/llms/components/commonComponents/Card/index.zh-CN.llms.txt +61 -0
- package/llms/components/commonComponents/Checkbox/index.zh-CN.llms.txt +69 -0
- package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +13 -0
- package/llms/components/commonComponents/Collapse/index.zh-CN.llms.txt +56 -0
- package/llms/components/commonComponents/CollapsePanel/index.zh-CN.llms.txt +69 -0
- package/llms/components/commonComponents/DatePicker/index.zh-CN.llms.txt +221 -0
- package/llms/components/commonComponents/Descriptions/index.zh-CN.llms.txt +37 -0
- package/llms/components/commonComponents/Drawer/index.zh-CN.llms.txt +62 -0
- package/llms/components/commonComponents/Dropdown/index.zh-CN.llms.txt +149 -0
- package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +41 -0
- package/llms/components/commonComponents/FloatButton/index.zh-CN.llms.txt +51 -0
- package/llms/components/commonComponents/Form/index.zh-CN.llms.txt +558 -0
- package/llms/components/commonComponents/IconButton/index.zh-CN.llms.txt +45 -0
- package/llms/components/commonComponents/Image/index.zh-CN.llms.txt +165 -0
- package/llms/components/commonComponents/Input/index.zh-CN.llms.txt +133 -0
- package/llms/components/commonComponents/InputNumber/index.zh-CN.llms.txt +51 -0
- package/llms/components/commonComponents/Message/index.zh-CN.llms.txt +98 -0
- package/llms/components/commonComponents/Modal/index.zh-CN.llms.txt +168 -0
- package/llms/components/commonComponents/Notification/index.zh-CN.llms.txt +94 -0
- package/llms/components/commonComponents/Pagination/index.zh-CN.llms.txt +45 -0
- package/llms/components/commonComponents/Popconfirm/index.zh-CN.llms.txt +55 -0
- package/llms/components/commonComponents/Popover/index.zh-CN.llms.txt +43 -0
- package/llms/components/commonComponents/Progress/index.zh-CN.llms.txt +50 -0
- package/llms/components/commonComponents/PromptsEditor/index.zh-CN.llms.txt +15 -0
- package/llms/components/commonComponents/Radio/index.zh-CN.llms.txt +66 -0
- package/llms/components/commonComponents/RadioButton/index.zh-CN.llms.txt +73 -0
- package/llms/components/commonComponents/Result/index.zh-CN.llms.txt +10 -0
- package/llms/components/commonComponents/Select/index.zh-CN.llms.txt +96 -0
- package/llms/components/commonComponents/Skeleton/index.zh-CN.llms.txt +59 -0
- package/llms/components/commonComponents/Slider/index.zh-CN.llms.txt +62 -0
- package/llms/components/commonComponents/Spinner/index.zh-CN.llms.txt +15 -0
- package/llms/components/commonComponents/Statistic/index.zh-CN.llms.txt +58 -0
- package/llms/components/commonComponents/Steps/index.zh-CN.llms.txt +57 -0
- package/llms/components/commonComponents/Switch/index.zh-CN.llms.txt +39 -0
- package/llms/components/commonComponents/Table/index.zh-CN.llms.txt +254 -0
- package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +68 -0
- package/llms/components/commonComponents/Tag/index.zh-CN.llms.txt +33 -0
- package/llms/components/commonComponents/TimePicker/index.zh-CN.llms.txt +111 -0
- package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +45 -0
- package/llms/components/commonComponents/Upload/index.zh-CN.llms.txt +95 -0
- package/llms/components/commonComponents/Video/index.zh-CN.llms.txt +11 -0
- package/llms/docs/guide/fromAntd.zh-CN.llms.txt +156 -0
- package/llms/docs/guide/fromScratch.zh-CN.llms.txt +83 -0
- package/llms/docs/guide/iconfont.zh-CN.llms.txt +69 -0
- package/llms/docs/guide/overview.zh-CN.llms.txt +51 -0
- package/llms/docs/guide/sparkIcons.zh-CN.llms.txt +25 -0
- package/llms/docs/guide/theme.zh-CN.llms.txt +61 -0
- package/llms/docs/guide/tokens&variables.zh-CN.llms.txt +433 -0
- package/llms/docs/guide/vibe-coding.zh-CN.llms.txt +29 -0
- package/llms/index.llms.txt +58 -0
- package/package.json +4 -2
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
11
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
-
import { getCommonConfig } from "../../..";
|
|
13
|
+
import { bailianDarkTheme, bailianTheme, getCommonConfig, ConfigProvider } from "../../..";
|
|
14
14
|
import { cpp } from '@codemirror/lang-cpp';
|
|
15
15
|
import { css } from '@codemirror/lang-css';
|
|
16
16
|
import { go } from '@codemirror/lang-go';
|
|
@@ -25,14 +25,14 @@ import { yaml } from '@codemirror/lang-yaml';
|
|
|
25
25
|
import { linter, lintGutter } from '@codemirror/lint';
|
|
26
26
|
import { vscodeDark, vscodeLight } from '@uiw/codemirror-theme-vscode';
|
|
27
27
|
import CodeMirror from '@uiw/react-codemirror';
|
|
28
|
-
import {
|
|
28
|
+
import { theme } from 'antd';
|
|
29
29
|
import cls from 'classnames';
|
|
30
30
|
import { omit } from 'lodash-es';
|
|
31
31
|
import React, { useMemo } from 'react';
|
|
32
32
|
import { useStyle } from "./index.style";
|
|
33
33
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
35
34
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
36
36
|
export var langExtensionsMap = {
|
|
37
37
|
javascript: [javascript()],
|
|
38
38
|
jsx: [javascript()],
|
|
@@ -77,19 +77,28 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(props) {
|
|
|
77
77
|
return vscodeLight;
|
|
78
78
|
}
|
|
79
79
|
return props.theme === 'dark' ? vscodeDark : vscodeLight;
|
|
80
|
-
}, [isDarkMode]);
|
|
80
|
+
}, [isDarkMode, props.theme]);
|
|
81
81
|
var extensions = typeof props.language === 'string' ? [].concat(_toConsumableArray(langExtensionsMap[props.language] || []), _toConsumableArray(props.value && props.language in lintExtensionsMap ? lintExtensionsMap[props.language] : [])) : props.language.reduce(function (ext, lang) {
|
|
82
82
|
return [].concat(_toConsumableArray(ext), [langExtensionsMap[lang]]);
|
|
83
83
|
}, []);
|
|
84
|
+
var codeMirrorElement = /*#__PURE__*/_jsx("div", {
|
|
85
|
+
className: cls("".concat(sparkPrefix, "-code-block"), props.className),
|
|
86
|
+
children: /*#__PURE__*/_jsx(CodeMirror, _objectSpread({
|
|
87
|
+
extensions: extensions,
|
|
88
|
+
value: props.language === 'json' ? beautifulJson(props.value) : props.value,
|
|
89
|
+
theme: getTheme
|
|
90
|
+
}, omit(props, ['language', 'theme', 'extensions', 'value'])))
|
|
91
|
+
});
|
|
92
|
+
if (props.theme !== undefined) {
|
|
93
|
+
var selectedTheme = props.theme === 'dark' ? bailianDarkTheme : bailianTheme;
|
|
94
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
95
|
+
children: /*#__PURE__*/_jsxs(ConfigProvider, _objectSpread(_objectSpread({}, selectedTheme), {}, {
|
|
96
|
+
children: [/*#__PURE__*/_jsx(Style, {}), codeMirrorElement]
|
|
97
|
+
}))
|
|
98
|
+
});
|
|
99
|
+
}
|
|
84
100
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
85
|
-
children: [/*#__PURE__*/_jsx(Style, {}),
|
|
86
|
-
className: cls("".concat(sparkPrefix, "-code-block"), props.className),
|
|
87
|
-
children: /*#__PURE__*/_jsx(CodeMirror, _objectSpread({
|
|
88
|
-
extensions: extensions,
|
|
89
|
-
value: props.language === 'json' ? beautifulJson(props.value) : props.value,
|
|
90
|
-
theme: getTheme
|
|
91
|
-
}, omit(props, ['language', 'theme', 'extensions', 'value'])))
|
|
92
|
-
})]
|
|
101
|
+
children: [/*#__PURE__*/_jsx(Style, {}), codeMirrorElement]
|
|
93
102
|
});
|
|
94
103
|
};
|
|
95
104
|
export default CodeMirrorWrapper;
|