@agentscope-ai/design 1.0.11 → 1.0.12

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.
Files changed (62) hide show
  1. package/README.md +241 -71
  2. package/lib/antd/styles/select.style.js +7 -1
  3. package/lib/antd/themes/bailianDarkTheme.json +7 -0
  4. package/lib/antd/themes/bailianTheme.json +7 -0
  5. package/lib/antd/themes/carbonDarkTheme.json +7 -0
  6. package/lib/antd/themes/carbonTheme.json +3 -0
  7. package/lib/antd/themes/generateTheme.d.ts +132 -0
  8. package/lib/antd/themes/generateTheme.js +328 -0
  9. package/lib/components/commonComponents/AlertDialog/index.d.ts +325 -37
  10. package/lib/components/commonComponents/AlertDialog/index.js +3 -153
  11. package/lib/components/commonComponents/AlertDialog/index.style.js +14 -2
  12. package/lib/components/commonComponents/AlertDialog/mobile.d.ts +38 -0
  13. package/lib/components/commonComponents/AlertDialog/mobile.js +188 -0
  14. package/lib/components/commonComponents/AlertDialog/pc.d.ts +38 -0
  15. package/lib/components/commonComponents/AlertDialog/pc.js +152 -0
  16. package/lib/components/commonComponents/Anchor/index.js +1 -1
  17. package/lib/components/commonComponents/Button/index.js +5 -3
  18. package/lib/components/commonComponents/CodeBlock/index.js +1 -2
  19. package/lib/components/commonComponents/CollapsePanel/index.js +1 -2
  20. package/lib/components/commonComponents/Drawer/index.style.js +42 -2
  21. package/lib/components/commonComponents/EllipsisTip/demo/demo2-1.d.ts +3 -0
  22. package/lib/components/commonComponents/EllipsisTip/demo/demo2-1.js +21 -0
  23. package/lib/components/commonComponents/InputNumber/demo/demo1.js +0 -3
  24. package/lib/components/commonComponents/Modal/index.d.ts +2 -16
  25. package/lib/components/commonComponents/Modal/index.js +3 -71
  26. package/lib/components/commonComponents/Modal/index.style.js +62 -2
  27. package/lib/components/commonComponents/Modal/mobile.d.ts +28 -0
  28. package/lib/components/commonComponents/Modal/mobile.js +97 -0
  29. package/lib/components/commonComponents/Modal/pc.d.ts +28 -0
  30. package/lib/components/commonComponents/Modal/pc.js +72 -0
  31. package/lib/components/commonComponents/Pagination/index.js +4 -2
  32. package/lib/components/commonComponents/Pagination/index.style.js +11 -3
  33. package/lib/components/commonComponents/PromptsEditor/VarRender.js +6 -1
  34. package/lib/components/commonComponents/PromptsEditor/VarSelectInput.js +3 -2
  35. package/lib/components/commonComponents/PromptsEditor/demo/basic.js +2 -0
  36. package/lib/components/commonComponents/PromptsEditor/index.js +1 -1
  37. package/lib/components/commonComponents/RadioButton/index.js +1 -5
  38. package/lib/components/commonComponents/Table/demo/demo1.js +13 -23
  39. package/lib/components/commonComponents/Table/index.js +3 -1
  40. package/lib/components/commonComponents/Table/index.style.js +1 -3
  41. package/lib/components/commonComponents/Tag/index.d.ts +10 -1
  42. package/lib/components/commonComponents/Tag/index.js +13 -1
  43. package/lib/components/commonComponents/Tooltip/index.js +1 -2
  44. package/lib/config.d.ts +2 -0
  45. package/lib/i18n/index.js +3 -0
  46. package/lib/i18n/strings/index.d.ts +2 -0
  47. package/lib/index.d.ts +2 -4
  48. package/lib/index.js +2 -4
  49. package/lib/libs/env/index.d.ts +1 -1
  50. package/lib/libs/staticRenderer/index.js +12 -3
  51. package/lib/libs/utils/index.d.ts +1 -0
  52. package/lib/libs/utils/index.js +4 -0
  53. package/lib/typings.d.ts +2 -0
  54. package/package.json +19 -60
  55. package/lib/antd/styles/_readme.txt +0 -1
  56. package/lib/antd/themes/_readme.txt +0 -1
  57. package/lib/libs/generateCssVars/index.d.ts +0 -19
  58. package/lib/libs/generateCssVars/index.js +0 -39
  59. package/lib/libs/region/constant.d.ts +0 -6
  60. package/lib/libs/region/constant.js +0 -154
  61. package/lib/libs/region/index.d.ts +0 -2
  62. package/lib/libs/region/index.js +0 -18
@@ -1,7 +1,67 @@
1
- var _templateObject;
1
+ var _templateObject, _templateObject2;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import createGlobalStyle from "../../../libs/createStyle";
4
- export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-modal {\n .", "-modal-title {\n min-height: 24px;\n }\n \n .", "-modal-content {\n padding: 0;\n border: 1px solid var(--", "-color-border-secondary);\n \n .", "-modal-header {\n padding: 18px 20px;\n margin-bottom: 0;\n \n .", "-modal-title {\n line-height: 28px;\n \n .", "-modal-title-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n \n .", "-modal-title {\n flex: 1;\n }\n \n .", "-modal-title-close {\n cursor: pointer;\n }\n }\n }\n }\n \n .", "-modal-body {\n padding: 20px;\n color: var(--", "-color-text-secondary);\n }\n \n .", "-modal-footer {\n padding: 16px 20px;\n margin-top: 0;\n \n .", "-modal-footer-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n \n .", "-modal-footer-info {\n font-size: 14px;\n font-weight: normal;\n line-height: 24px;\n color: var(--", "-color-text-tertiary);\n }\n \n .", "-modal-footer-origin-node {\n display: flex;\n gap: 12px;\n }\n }\n }\n \n .", "-modal-close {\n width: 32px;\n height: 32px;\n top: 16px;\n right: 16px;\n \n .", "-modal-close-icon {\n color: var(--", "-color-text);\n }\n \n &:hover {\n background: none;\n }\n }\n }\n}\n\n.", "-show-divider {\n .", "-modal-content {\n .", "-modal-header {\n border-bottom: 1px solid var(--", "-color-border-secondary);\n }\n \n .", "-modal-footer {\n border-top: 1px solid var(--", "-color-border-secondary);\n }\n }\n}\n"])), function (p) {
4
+ export var useStyle = MOBILE ? createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-modal {\n .", "-modal {\n min-width: 300px;\n max-width: 80vw;\n position: fixed;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n padding: 0 !important;\n }\n .", "-modal-title {\n min-height: 24px;\n }\n \n .", "-modal-content {\n padding: 0;\n border: 1px solid var(--", "-color-border-secondary);\n \n .", "-modal-header {\n padding: 20px 20px 16px;\n margin-bottom: 0;\n \n .", "-modal-title {\n font-size: 18px;\n font-weight: 500;\n line-height: 32px;\n color: var(--", "-color-text);\n \n .", "-modal-title-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n \n .", "-modal-title {\n flex: 1;\n display: flex;\n justify-content: center;\n text-align: center;\n }\n\n .", "-modal-title-padding {\n padding-left: 32px;\n }\n \n .", "-modal-title-close {\n font-size: 20px;\n cursor: pointer;\n }\n }\n }\n }\n \n .", "-modal-body {\n max-height: 60vh;\n padding: 0 20px;\n font-size: 14px;\n color: var(--", "-color-text);\n }\n \n .", "-modal-footer {\n padding: 16px 20px 20px;\n margin-top: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n .", "-btn {\n flex: 1;\n }\n \n .", "-modal-footer-wrapper {\n flex: 1;\n display: flex;\n justify-content: space-between;\n align-items: center;\n \n .", "-modal-footer-info {\n font-size: 14px;\n font-weight: normal;\n line-height: 24px;\n color: var(--", "-color-text-tertiary);\n }\n \n .", "-modal-footer-origin-node {\n display: flex;\n gap: 12px;\n }\n }\n }\n \n .", "-modal-close {\n width: 32px;\n height: 32px;\n top: 16px;\n right: 16px;\n \n .", "-modal-close-icon {\n color: var(--", "-color-text);\n }\n \n &:hover {\n background: none;\n }\n }\n }\n}\n\n.", "-show-divider {\n .", "-modal-content {\n .", "-modal-header {\n border-bottom: 1px solid var(--", "-color-border-secondary);\n }\n .", "-modal-body {\n padding: 16px 20px;\n }\n .", "-modal-footer {\n border-top: 1px solid var(--", "-color-border-secondary);\n }\n }\n}\n"])), function (p) {
5
+ return p.sparkPrefix;
6
+ }, function (p) {
7
+ return p.antPrefix;
8
+ }, function (p) {
9
+ return p.antPrefix;
10
+ }, function (p) {
11
+ return p.antPrefix;
12
+ }, function (p) {
13
+ return p.antPrefix;
14
+ }, function (p) {
15
+ return p.antPrefix;
16
+ }, function (p) {
17
+ return p.antPrefix;
18
+ }, function (p) {
19
+ return p.antPrefix;
20
+ }, function (p) {
21
+ return p.sparkPrefix;
22
+ }, function (p) {
23
+ return p.sparkPrefix;
24
+ }, function (p) {
25
+ return p.sparkPrefix;
26
+ }, function (p) {
27
+ return p.sparkPrefix;
28
+ }, function (p) {
29
+ return p.antPrefix;
30
+ }, function (p) {
31
+ return p.antPrefix;
32
+ }, function (p) {
33
+ return p.antPrefix;
34
+ }, function (p) {
35
+ return p.antPrefix;
36
+ }, function (p) {
37
+ return p.sparkPrefix;
38
+ }, function (p) {
39
+ return p.sparkPrefix;
40
+ }, function (p) {
41
+ return p.antPrefix;
42
+ }, function (p) {
43
+ return p.sparkPrefix;
44
+ }, function (p) {
45
+ return p.antPrefix;
46
+ }, function (p) {
47
+ return p.antPrefix;
48
+ }, function (p) {
49
+ return p.antPrefix;
50
+ }, function (p) {
51
+ return p.sparkPrefix;
52
+ }, function (p) {
53
+ return p.antPrefix;
54
+ }, function (p) {
55
+ return p.antPrefix;
56
+ }, function (p) {
57
+ return p.antPrefix;
58
+ }, function (p) {
59
+ return p.antPrefix;
60
+ }, function (p) {
61
+ return p.antPrefix;
62
+ }, function (p) {
63
+ return p.antPrefix;
64
+ }) : createGlobalStyle(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n.", "-modal {\n .", "-modal-title {\n min-height: 24px;\n }\n \n .", "-modal-content {\n padding: 0;\n border: 1px solid var(--", "-color-border-secondary);\n \n .", "-modal-header {\n padding: 18px 20px;\n margin-bottom: 0;\n \n .", "-modal-title {\n line-height: 28px;\n \n .", "-modal-title-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n \n .", "-modal-title {\n flex: 1;\n }\n \n .", "-modal-title-close {\n cursor: pointer;\n }\n }\n }\n }\n \n .", "-modal-body {\n padding: 20px;\n color: var(--", "-color-text-secondary);\n }\n \n .", "-modal-footer {\n padding: 16px 20px;\n margin-top: 0;\n \n .", "-modal-footer-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n \n .", "-modal-footer-info {\n font-size: 14px;\n font-weight: normal;\n line-height: 24px;\n color: var(--", "-color-text-tertiary);\n }\n \n .", "-modal-footer-origin-node {\n display: flex;\n gap: 12px;\n }\n }\n }\n \n .", "-modal-close {\n width: 32px;\n height: 32px;\n top: 16px;\n right: 16px;\n \n .", "-modal-close-icon {\n color: var(--", "-color-text);\n }\n \n &:hover {\n background: none;\n }\n }\n }\n}\n\n.", "-show-divider {\n .", "-modal-content {\n .", "-modal-header {\n border-bottom: 1px solid var(--", "-color-border-secondary);\n }\n \n .", "-modal-footer {\n border-top: 1px solid var(--", "-color-border-secondary);\n }\n }\n}\n"])), function (p) {
5
65
  return p.sparkPrefix;
6
66
  }, function (p) {
7
67
  return p.antPrefix;
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import { ModalProps } from 'antd';
3
+ export interface SparkModalProps extends ModalProps {
4
+ /**
5
+ * @description 底部额外内容
6
+ * @descriptionEn footer extra content
7
+ */
8
+ info?: string | React.ReactNode;
9
+ /**
10
+ * @description 是否显示分割线
11
+ * @descriptionEn whether to show divider
12
+ * @default true
13
+ */
14
+ showDivider?: boolean;
15
+ }
16
+ declare const SparkModal: {
17
+ (props: SparkModalProps): import("react/jsx-runtime").JSX.Element;
18
+ useModal: typeof import("antd/es/modal/useModal").default;
19
+ success: import("antd/es/modal/confirm").ModalFunc;
20
+ error: import("antd/es/modal/confirm").ModalFunc;
21
+ warning: import("antd/es/modal/confirm").ModalFunc;
22
+ info: import("antd/es/modal/confirm").ModalFunc;
23
+ confirm: import("antd/es/modal/confirm").ModalFunc;
24
+ SMALL_WIDTH: number;
25
+ MEDIUM_WIDTH: number;
26
+ LARGE_WIDTH: number;
27
+ };
28
+ export default SparkModal;
@@ -0,0 +1,97 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["showDivider", "closable"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ 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; }
9
+ 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; }
10
+ import { getCommonConfig } from "../../../config";
11
+ import { CloseOutlined } from '@agentscope-ai/icons-override-antd';
12
+ import { Modal } from 'antd';
13
+ import classNames from 'classnames';
14
+ import { useEffect } from 'react';
15
+ import { useStyle } from "./index.style";
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ import { Fragment as _Fragment } from "react/jsx-runtime";
19
+ var lockBodyScroll = function lockBodyScroll() {
20
+ var originalStyle = window.getComputedStyle(document.body).overflow;
21
+ var originalPosition = window.getComputedStyle(document.body).position;
22
+ var scrollY = window.scrollY;
23
+ document.body.style.overflow = 'hidden';
24
+ document.body.style.position = 'fixed';
25
+ document.body.style.width = '100%';
26
+ document.body.style.top = "-".concat(scrollY, "px");
27
+ return function () {
28
+ document.body.style.overflow = originalStyle;
29
+ document.body.style.position = originalPosition;
30
+ document.body.style.width = '';
31
+ document.body.style.top = '';
32
+ window.scrollTo(0, scrollY);
33
+ };
34
+ };
35
+ var SparkModal = function SparkModal(props) {
36
+ var Style = useStyle();
37
+ var _getCommonConfig = getCommonConfig(),
38
+ sparkPrefix = _getCommonConfig.sparkPrefix;
39
+ var _props$showDivider = props.showDivider,
40
+ showDivider = _props$showDivider === void 0 ? true : _props$showDivider,
41
+ _props$closable = props.closable,
42
+ closable = _props$closable === void 0 ? true : _props$closable,
43
+ restProps = _objectWithoutProperties(props, _excluded);
44
+ useEffect(function () {
45
+ if (props.open) {
46
+ var unlock = lockBodyScroll();
47
+ return unlock;
48
+ }
49
+ }, [props.open]);
50
+ var renderFooter = function renderFooter(originNode) {
51
+ return props.info ? /*#__PURE__*/_jsxs("div", {
52
+ className: "".concat(sparkPrefix, "-modal-footer-wrapper"),
53
+ children: [/*#__PURE__*/_jsx("span", {
54
+ className: "".concat(sparkPrefix, "-modal-footer-info"),
55
+ children: props.info
56
+ }), /*#__PURE__*/_jsx("div", {
57
+ className: "".concat(sparkPrefix, "-modal-footer-origin-node"),
58
+ children: originNode
59
+ })]
60
+ }) : originNode;
61
+ };
62
+ var mergedCloseIcon = closable ? props.closeIcon || /*#__PURE__*/_jsx(CloseOutlined, {
63
+ className: "".concat(sparkPrefix, "-modal-title-close"),
64
+ onClick: function onClick(e) {
65
+ var _props$onCancel;
66
+ (_props$onCancel = props.onCancel) === null || _props$onCancel === void 0 || _props$onCancel.call(props, e);
67
+ }
68
+ }) : null;
69
+ var mergedFooter = props.footer === undefined ? renderFooter : props.footer;
70
+ return /*#__PURE__*/_jsxs(_Fragment, {
71
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({}, restProps), {}, {
72
+ centered: false,
73
+ closeIcon: null,
74
+ width: props.width || 'auto',
75
+ title: /*#__PURE__*/_jsxs("div", {
76
+ className: "".concat(sparkPrefix, "-modal-title-wrapper"),
77
+ children: [/*#__PURE__*/_jsx("div", {
78
+ className: classNames("".concat(sparkPrefix, "-modal-title"), _defineProperty({}, "".concat(sparkPrefix, "-modal-title-padding"), closable)),
79
+ children: props.title
80
+ }), mergedCloseIcon]
81
+ }),
82
+ wrapClassName: classNames("".concat(sparkPrefix, "-modal"), _defineProperty({}, "".concat(sparkPrefix, "-show-divider"), showDivider), props.wrapClassName, 'animate-in'),
83
+ footer: mergedFooter,
84
+ transitionName: ""
85
+ }))]
86
+ });
87
+ };
88
+ SparkModal.useModal = Modal.useModal;
89
+ SparkModal.success = Modal.success;
90
+ SparkModal.error = Modal.error;
91
+ SparkModal.warning = Modal.warning;
92
+ SparkModal.info = Modal.info;
93
+ SparkModal.confirm = Modal.confirm;
94
+ SparkModal.SMALL_WIDTH = 640;
95
+ SparkModal.MEDIUM_WIDTH = 800;
96
+ SparkModal.LARGE_WIDTH = 960;
97
+ export default SparkModal;
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import { ModalProps } from 'antd';
3
+ export interface SparkModalProps extends ModalProps {
4
+ /**
5
+ * @description 底部额外内容
6
+ * @descriptionEn footer extra content
7
+ */
8
+ info?: string | React.ReactNode;
9
+ /**
10
+ * @description 是否显示分割线
11
+ * @descriptionEn whether to show divider
12
+ * @default true
13
+ */
14
+ showDivider?: boolean;
15
+ }
16
+ declare const SparkModal: {
17
+ (props: SparkModalProps): import("react/jsx-runtime").JSX.Element;
18
+ useModal: typeof import("antd/es/modal/useModal").default;
19
+ success: import("antd/es/modal/confirm").ModalFunc;
20
+ error: import("antd/es/modal/confirm").ModalFunc;
21
+ warning: import("antd/es/modal/confirm").ModalFunc;
22
+ info: import("antd/es/modal/confirm").ModalFunc;
23
+ confirm: import("antd/es/modal/confirm").ModalFunc;
24
+ SMALL_WIDTH: number;
25
+ MEDIUM_WIDTH: number;
26
+ LARGE_WIDTH: number;
27
+ };
28
+ export default SparkModal;
@@ -0,0 +1,72 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["showDivider", "closable"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ 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; }
9
+ 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; }
10
+ import { getCommonConfig } from "../../../config";
11
+ import { CloseOutlined } from '@agentscope-ai/icons-override-antd';
12
+ import { Modal } from 'antd';
13
+ import classNames from 'classnames';
14
+ import { useStyle } from "./index.style";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { Fragment as _Fragment } from "react/jsx-runtime";
18
+ var SparkModal = function SparkModal(props) {
19
+ var Style = useStyle();
20
+ var _getCommonConfig = getCommonConfig(),
21
+ sparkPrefix = _getCommonConfig.sparkPrefix;
22
+ var _props$showDivider = props.showDivider,
23
+ showDivider = _props$showDivider === void 0 ? true : _props$showDivider,
24
+ _props$closable = props.closable,
25
+ closable = _props$closable === void 0 ? true : _props$closable,
26
+ restProps = _objectWithoutProperties(props, _excluded);
27
+ var renderFooter = function renderFooter(originNode) {
28
+ return props.info ? /*#__PURE__*/_jsxs("div", {
29
+ className: "".concat(sparkPrefix, "-modal-footer-wrapper"),
30
+ children: [/*#__PURE__*/_jsx("span", {
31
+ className: "".concat(sparkPrefix, "-modal-footer-info"),
32
+ children: props.info
33
+ }), /*#__PURE__*/_jsx("div", {
34
+ className: "".concat(sparkPrefix, "-modal-footer-origin-node"),
35
+ children: originNode
36
+ })]
37
+ }) : originNode;
38
+ };
39
+ var mergedCloseIcon = closable ? props.closeIcon || /*#__PURE__*/_jsx(CloseOutlined, {
40
+ className: "".concat(sparkPrefix, "-modal-title-close"),
41
+ onClick: function onClick(e) {
42
+ var _props$onCancel;
43
+ (_props$onCancel = props.onCancel) === null || _props$onCancel === void 0 || _props$onCancel.call(props, e);
44
+ }
45
+ }) : null;
46
+ var mergedFooter = props.footer === undefined ? renderFooter : props.footer;
47
+ return /*#__PURE__*/_jsxs(_Fragment, {
48
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({}, restProps), {}, {
49
+ closeIcon: null,
50
+ title: /*#__PURE__*/_jsxs("div", {
51
+ className: "".concat(sparkPrefix, "-modal-title-wrapper"),
52
+ children: [/*#__PURE__*/_jsx("div", {
53
+ className: "".concat(sparkPrefix, "-modal-title"),
54
+ children: props.title
55
+ }), mergedCloseIcon]
56
+ }),
57
+ wrapClassName: classNames("".concat(sparkPrefix, "-modal"), _defineProperty({}, "".concat(sparkPrefix, "-show-divider"), showDivider), props.wrapClassName, 'animate-in'),
58
+ footer: mergedFooter,
59
+ transitionName: ""
60
+ }))]
61
+ });
62
+ };
63
+ SparkModal.useModal = Modal.useModal;
64
+ SparkModal.success = Modal.success;
65
+ SparkModal.error = Modal.error;
66
+ SparkModal.warning = Modal.warning;
67
+ SparkModal.info = Modal.info;
68
+ SparkModal.confirm = Modal.confirm;
69
+ SparkModal.SMALL_WIDTH = 640;
70
+ SparkModal.MEDIUM_WIDTH = 800;
71
+ SparkModal.LARGE_WIDTH = 960;
72
+ export default SparkModal;
@@ -1,4 +1,4 @@
1
- var _excluded = ["hideSwitchButton"];
1
+ var _excluded = ["hideSwitchButton", "className"];
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -12,6 +12,7 @@ import $i18n from "../../../i18n";
12
12
  import { SparkMoreLine } from '@agentscope-ai/icons';
13
13
  import { LeftOutlined, RightOutlined } from "@agentscope-ai/icons-override-antd";
14
14
  import { Flex, Pagination } from 'antd';
15
+ import classNames from 'classnames';
15
16
  import { useStyle } from "./index.style";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -58,6 +59,7 @@ var DEFAULT_SHOW_SIZE_CHANGE = {
58
59
  export default (function (props) {
59
60
  var _props$hideSwitchButt = props.hideSwitchButton,
60
61
  hideSwitchButton = _props$hideSwitchButt === void 0 ? false : _props$hideSwitchButt,
62
+ className = props.className,
61
63
  restProps = _objectWithoutProperties(props, _excluded);
62
64
  var _getCommonConfig = getCommonConfig(),
63
65
  sparkPrefix = _getCommonConfig.sparkPrefix;
@@ -135,7 +137,7 @@ export default (function (props) {
135
137
  itemRender: mergedItemRender()
136
138
  }, restProps), {}, {
137
139
  showSizeChanger: getMergedShowSizeChange(),
138
- className: "".concat(sparkPrefix, "-pagination")
140
+ className: classNames("".concat(sparkPrefix, "-pagination"), className)
139
141
  }))]
140
142
  });
141
143
  });
@@ -1,10 +1,18 @@
1
1
  var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import createGlobalStyle from "../../../libs/createStyle";
4
- export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-pagination {\n color: var(--", "-color-text) !important;\n \n .", "-pagination-total-text {\n font-weight: 500;\n }\n \n .", "-select-selection-item {\n font-weight: 500;\n }\n \n .", "-pagination-item-active.", "-pagination-item {\n border-color: var(--", "-color-border-secondary);\n border-radius: 8px;\n \n a {\n color: var(--", "-color-text) !important;\n }\n }\n \n a {\n color: var(--", "-color-text) !important;\n }\n \n .", "-pagination-jump-next {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .", "-pagination-jump-prev {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n"])), function (p) {
5
- return p.sparkPrefix;
4
+ export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-pagination {\n color: var(--", "-color-text) !important;\n font-weight: 500 !important;\n \n .", "-pagination-total-text {\n font-weight: 500;\n }\n \n .", "-select-selection-item {\n font-weight: 500;\n }\n \n .", "-pagination-item-active {\n border-color: var(--", "-color-border-secondary);\n border-radius: 8px;\n font-weight: \n \n a {\n color: var(--", "-color-text) !important;\n }\n }\n \n a {\n color: var(--", "-color-text) !important;\n font-weight: 500 !important;\n }\n \n .", "-pagination-jump-next {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .", "-pagination-jump-prev {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n.", "-pagination {\n .", "-pagination-prev,\n .", "-pagination-next,\n .", "-pagination-jump-prev,\n .", "-pagination-jump-next {\n font-family: serif;\n display: inline-block !important;\n }\n}\n"])), function (p) {
5
+ return p.antPrefix;
6
+ }, function (p) {
7
+ return p.antPrefix;
8
+ }, function (p) {
9
+ return p.antPrefix;
6
10
  }, function (p) {
7
- return p.sparkPrefix;
11
+ return p.antPrefix;
12
+ }, function (p) {
13
+ return p.antPrefix;
14
+ }, function (p) {
15
+ return p.antPrefix;
8
16
  }, function (p) {
9
17
  return p.antPrefix;
10
18
  }, function (p) {
@@ -48,7 +48,12 @@ var PlaceholderWidget = /*#__PURE__*/function (_WidgetType) {
48
48
  return PlaceholderWidget;
49
49
  }(WidgetType); // Placeholder 匹配器
50
50
  var placeholderMatcher = new MatchDecorator({
51
- regexp: /\$\{(\w+)\}/g,
51
+ // 该正则用于匹配形如 ${变量名} 的占位符,变量名允许为中文、字母、数字、下划线
52
+ // \${ 匹配字符 "${"
53
+ // ([\w\u4e00-\u9fa5]+) 匹配一个或多个字母、数字、下划线或中文字符,捕获为分组1
54
+ // \} 匹配字符 "}"
55
+ // g 全局匹配
56
+ regexp: /\$\{([\w\u4e00-\u9fa5]+)\}/g,
52
57
  decoration: function decoration(match) {
53
58
  return Decoration.replace({
54
59
  widget: new PlaceholderWidget(match[1])
@@ -18,13 +18,14 @@ export default function () {
18
18
  createBtnText = config.createBtnText;
19
19
  return autocompletion({
20
20
  override: [function (context) {
21
+ var _word$from;
21
22
  var word = context.matchBefore(/\/(\w+)?/);
22
23
  if (!word) return null;
23
- if (word && word.from == word.to && !context.explicit) {
24
+ if (word && word.from === word.to && !context.explicit) {
24
25
  return null;
25
26
  }
26
27
  return {
27
- from: word === null || word === void 0 ? void 0 : word.from,
28
+ from: (_word$from = word === null || word === void 0 ? void 0 : word.from) !== null && _word$from !== void 0 ? _word$from : 0,
28
29
  options: (onCreate ? [].concat(_toConsumableArray(data), [{
29
30
  label: '/NEW_VAR',
30
31
  boost: -99
@@ -26,6 +26,8 @@ export default function Basic() {
26
26
  code: 'foo'
27
27
  }, {
28
28
  code: 'user'
29
+ }, {
30
+ code: '模型输入'
29
31
  }]
30
32
  });
31
33
  }
@@ -109,7 +109,7 @@ var Editor = function Editor(props) {
109
109
  });
110
110
  return props.tipsText ? props.tipsText : /*#__PURE__*/_jsxs("div", {
111
111
  className: styles.tips,
112
- children: ["\u8F93\u5165\"/\"\u5F15\u7528\u53D8\u91CF\uFF0C\u652F\u6301 ", /*#__PURE__*/_jsx(SparkEnterLine, {
112
+ children: ["\u8F93\u5165/\"/\"\u5F15\u7528\u53D8\u91CF\uFF0C\u652F\u6301 ", /*#__PURE__*/_jsx(SparkEnterLine, {
113
113
  size: 16
114
114
  }), " \u56DE\u8F66\u65B0\u589E"]
115
115
  });
@@ -15,11 +15,7 @@ export default (function (props) {
15
15
  var commonConfig = getCommonConfig();
16
16
  var sparkPrefix = commonConfig.sparkPrefix,
17
17
  antPrefix = commonConfig.antPrefix;
18
- var _props$gap = props.gap,
19
- gap = _props$gap === void 0 ? 12 : _props$gap,
20
- _props$bordered = props.bordered,
21
- bordered = _props$bordered === void 0 ? false : _props$bordered,
22
- _props$ghost = props.ghost,
18
+ var _props$ghost = props.ghost,
23
19
  ghost = _props$ghost === void 0 ? true : _props$ghost;
24
20
  var Style = useStyle();
25
21
  return /*#__PURE__*/_jsxs(_Fragment, {
@@ -94,32 +94,22 @@ var App = function App() {
94
94
  });
95
95
  }
96
96
  }];
97
- var data = [{
98
- key: '1',
99
- title: 'First Column Row 1',
100
- content: 'Content Row 1',
101
- switch: 'Switch Row 1',
102
- status: 'Status Row 1',
103
- tags: ['Tag1']
104
- }, {
105
- key: '2',
106
- title: 'First Column Row 2',
107
- content: 'Content Row 2',
108
- switch: 'Switch Row 2',
109
- status: 'Status Row 2',
110
- tags: ['Tag2']
111
- }, {
112
- key: '3',
113
- title: 'First Column Row 3',
114
- content: 'Content Row 3',
115
- switch: 'Switch Row 3',
116
- status: 'Status Row 3',
117
- tags: ['Tag3']
118
- }];
97
+ var data = new Array(3).fill(0).map(function (_, index) {
98
+ return {
99
+ key: index.toString(),
100
+ title: "First Column Row ".concat(index + 1),
101
+ content: "Content Row ".concat(index + 1),
102
+ switch: "Switch Row ".concat(index + 1),
103
+ status: "Status Row ".concat(index + 1),
104
+ tags: ["Tag".concat(index + 1)]
105
+ };
106
+ });
119
107
  return /*#__PURE__*/_jsx(Table, {
120
108
  columns: columns,
121
109
  dataSource: data,
122
- pagination: false
110
+ pagination: {
111
+ pageSize: 10
112
+ }
123
113
  });
124
114
  };
125
115
  export default App;
@@ -11,6 +11,7 @@ import { getCommonConfig } from "../../../config";
11
11
  import { SparkSortLine } from '@agentscope-ai/icons';
12
12
  import { Table as AntdTable } from 'antd';
13
13
  import classNames from 'classnames';
14
+ import { useStyle as usePaginationStyle } from "../Pagination/index.style";
14
15
  import { useStyle } from "./index.style";
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
16
17
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -34,8 +35,9 @@ export default function Table(props) {
34
35
  });
35
36
  });
36
37
  var Style = useStyle();
38
+ var PaginationStyle = usePaginationStyle();
37
39
  return /*#__PURE__*/_jsxs(_Fragment, {
38
- children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(AntdTable, _objectSpread({
40
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(PaginationStyle, {}), /*#__PURE__*/_jsx(AntdTable, _objectSpread({
39
41
  className: classNames("".concat(sparkPrefix, "-table")),
40
42
  columns: columns
41
43
  }, restProps))]
@@ -1,9 +1,7 @@
1
1
  var _templateObject;
2
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import createGlobalStyle from "../../../libs/createStyle";
4
- export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-table {\n &.", "-table-wrapper {\n .", "-table-container {\n .", "-table-thead > tr > th {\n padding: 8px 20px;\n font-weight: 400;\n color: var(--", "-color-text-secondary);\n }\n \n table > thead > tr:first-child > *:first-child {\n border-start-start-radius: 0;\n }\n \n table > thead > tr:first-child > *:last-child {\n border-start-end-radius: 0;\n }\n \n .", "-table-thead > tr > th:not(:last-child):not(.", "-table-selection-column):not(.", "-table-row-expand-icon-cell):not([colspan])::before {\n display: none;\n }\n \n .", "-table-tbody > tr > td {\n padding: 16px 20px;\n }\n \n .", "-table-tbody > tr {\n & > td:not(.", "-table-selection-column):first-child,\n & > td.", "-table-selection-column + td:not(\n .", "-table-selection-column) {\n font-weight: 500;\n }\n }\n }\n \n .", "-table-small {\n .", "-table-tbody > tr > td {\n padding: 8px 20px;\n }\n }\n }\n}\n"])), function (p) {
5
- return p.sparkPrefix;
6
- }, function (p) {
4
+ export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-table-wrapper {\n .", "-table-container {\n .", "-table-thead > tr > th {\n padding: 8px 20px;\n font-weight: 400;\n color: var(--", "-color-text-secondary);\n }\n \n table > thead > tr:first-child > *:first-child {\n border-start-start-radius: 0;\n }\n \n table > thead > tr:first-child > *:last-child {\n border-start-end-radius: 0;\n }\n \n .", "-table-thead > tr > th:not(:last-child):not(.", "-table-selection-column):not(.", "-table-row-expand-icon-cell):not([colspan])::before {\n display: none !important;\n }\n \n .", "-table-tbody > tr > td {\n padding: 16px 20px;\n }\n \n .", "-table-tbody > tr {\n & > td:not(.", "-table-selection-column):first-child,\n & > td.", "-table-selection-column + td:not(\n .", "-table-selection-column) {\n font-weight: 500;\n }\n }\n }\n \n .", "-table-small {\n .", "-table-tbody > tr > td {\n padding: 8px 20px;\n }\n }\n }\n}\n"])), function (p) {
7
5
  return p.antPrefix;
8
6
  }, function (p) {
9
7
  return p.antPrefix;
@@ -1,5 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import { TagProps } from 'antd';
3
+ declare enum SparkTagColors {
4
+ Purple = "purple",
5
+ Pink = "pink",
6
+ Yellow = "yellow",
7
+ Teal = "teal",
8
+ Blue = "blue",
9
+ Mauve = "mauve",
10
+ Transparent = "transparent"
11
+ }
3
12
  export interface SparkTagProps extends TagProps {
4
13
  /**
5
14
  * @description 尺寸
@@ -12,7 +21,7 @@ export interface SparkTagProps extends TagProps {
12
21
  * @descriptionEn color of the tag
13
22
  * @default 'purple'
14
23
  */
15
- color?: 'purple' | 'pink' | 'yellow' | 'teal' | 'blue' | 'mauve' | 'transparent';
24
+ color?: SparkTagColors | string;
16
25
  }
17
26
  declare const SparkTag: import("react").ForwardRefExoticComponent<SparkTagProps & import("react").RefAttributes<any>>;
18
27
  export default SparkTag;
@@ -15,6 +15,16 @@ import { useStyle } from "./index.style";
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
16
  import { Fragment as _Fragment } from "react/jsx-runtime";
17
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ var SparkTagColors = /*#__PURE__*/function (SparkTagColors) {
19
+ SparkTagColors["Purple"] = "purple";
20
+ SparkTagColors["Pink"] = "pink";
21
+ SparkTagColors["Yellow"] = "yellow";
22
+ SparkTagColors["Teal"] = "teal";
23
+ SparkTagColors["Blue"] = "blue";
24
+ SparkTagColors["Mauve"] = "mauve";
25
+ SparkTagColors["Transparent"] = "transparent";
26
+ return SparkTagColors;
27
+ }(SparkTagColors || {});
18
28
  var SparkTag = /*#__PURE__*/forwardRef(function (props, ref) {
19
29
  var children = props.children,
20
30
  className = props.className,
@@ -28,10 +38,12 @@ var SparkTag = /*#__PURE__*/forwardRef(function (props, ref) {
28
38
  var Style = useStyle();
29
39
  var commonConfig = getCommonConfig();
30
40
  var sparkPrefix = commonConfig.sparkPrefix;
41
+ var isSparkTagColor = Object.values(SparkTagColors).includes(color);
31
42
  return /*#__PURE__*/_jsxs(_Fragment, {
32
43
  children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Tag, _objectSpread(_objectSpread({
33
44
  className: classNames("".concat(sparkPrefix, "-tag ").concat(sparkPrefix, "-tag-").concat(color, " ").concat(sparkPrefix, "-tag-").concat(size), className),
34
- bordered: bordered
45
+ bordered: bordered,
46
+ color: isSparkTagColor ? undefined : color
35
47
  }, restProps), {}, {
36
48
  ref: ref,
37
49
  children: children
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["mode", "arrow", "overlayClassName", "getPopupContainer", "align"];
2
+ var _excluded = ["mode", "arrow", "overlayClassName", "getPopupContainer"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -23,7 +23,6 @@ var SparkTooltip = /*#__PURE__*/forwardRef(function (props, ref) {
23
23
  arrow = props.arrow,
24
24
  overlayClassName = props.overlayClassName,
25
25
  getPopupContainer = props.getPopupContainer,
26
- align = props.align,
27
26
  restProps = _objectWithoutProperties(props, _excluded);
28
27
  var _getCommonConfig = getCommonConfig(),
29
28
  sparkPrefix = _getCommonConfig.sparkPrefix,
package/lib/config.d.ts CHANGED
@@ -18,6 +18,8 @@ export interface CommonConfig {
18
18
  /** iconfont 地址 */
19
19
  iconfont?: string;
20
20
  isDarkMode?: boolean;
21
+ /** 主题配置,供 staticRenderer 等静态方法使用 */
22
+ theme?: ConfigProviderProps['theme'];
21
23
  }
22
24
  export declare function setCommonConfig(newConf: CommonConfig): void;
23
25
  export declare function getCommonConfig(): CommonConfig;
package/lib/i18n/index.js CHANGED
@@ -3,8 +3,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3
3
  * This file is generated by parrot must
4
4
  * DOCUMENT LIST:
5
5
  * parrot must: http://gitlab.alibaba-inc.com/parrot/parrot-tool-must
6
+ * @halofe/global-locale: http://gitlab.alibaba-inc.com/parrot/global-locale
7
+ * @halofe/global-string-format: http://gitlab.alibaba-inc.com/parrot/global-string-format
6
8
  */
7
9
 
10
+ // import stringFormat from '@halofe/global-string-format';
8
11
  import dayjs from 'dayjs';
9
12
  import strings from "./strings";
10
13
  var language = 'zh-cn'; // Current language,默认中文
@@ -0,0 +1,2 @@
1
+ declare const locale: any;
2
+ export default locale;