@agentscope-ai/chat 1.1.14 → 1.1.16

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 (68) hide show
  1. package/lib/Accordion/Accordion.js +1 -2
  2. package/lib/Accordion/style.d.ts +2 -1
  3. package/lib/Accordion/style.js +11 -11
  4. package/lib/Attachments/FileList/FileListCard.js +1 -2
  5. package/lib/Attachments/index.js +1 -2
  6. package/lib/Attachments/style/fileCard.d.ts +2 -1
  7. package/lib/Attachments/style/fileCard.js +12 -12
  8. package/lib/Attachments/style/index.d.ts +2 -1
  9. package/lib/Attachments/style/index.js +18 -18
  10. package/lib/Bubble/Bubble.js +1 -3
  11. package/lib/Bubble/BubbleList.js +1 -2
  12. package/lib/Bubble/style/avatar.d.ts +2 -1
  13. package/lib/Bubble/style/avatar.js +3 -3
  14. package/lib/Bubble/style/index.d.ts +2 -1
  15. package/lib/Bubble/style/index.js +5 -5
  16. package/lib/Bubble/style/list.d.ts +2 -1
  17. package/lib/Bubble/style/list.js +5 -5
  18. package/lib/ChatAnywhere/Chat/index.js +1 -2
  19. package/lib/ChatAnywhere/Chat/style.d.ts +2 -1
  20. package/lib/ChatAnywhere/Chat/style.js +6 -6
  21. package/lib/ChatAnywhere/Header/index.js +1 -2
  22. package/lib/ChatAnywhere/Header/style.d.ts +2 -1
  23. package/lib/ChatAnywhere/Header/style.js +5 -5
  24. package/lib/ChatAnywhere/Input/index.js +1 -2
  25. package/lib/ChatAnywhere/Input/style.d.ts +2 -1
  26. package/lib/ChatAnywhere/Input/style.js +2 -2
  27. package/lib/ChatAnywhere/Layout/index.js +1 -2
  28. package/lib/ChatAnywhere/Layout/style.d.ts +2 -1
  29. package/lib/ChatAnywhere/Layout/style.js +2 -2
  30. package/lib/ChatAnywhere/SessionList/index.js +1 -2
  31. package/lib/ChatAnywhere/SessionList/style.d.ts +2 -1
  32. package/lib/ChatAnywhere/SessionList/style.js +6 -6
  33. package/lib/Conversations/index.js +1 -2
  34. package/lib/Conversations/style.d.ts +2 -1
  35. package/lib/Conversations/style.js +9 -9
  36. package/lib/DefaultCards/Files/index.js +7 -7
  37. package/lib/DefaultCards/Footer/index.js +6 -6
  38. package/lib/DefaultCards/Images/index.js +7 -7
  39. package/lib/DefaultCards/Interrupted/index.js +6 -6
  40. package/lib/DeviceAction/index.js +4 -1
  41. package/lib/Disclaimer/index.js +1 -2
  42. package/lib/Disclaimer/style.d.ts +2 -1
  43. package/lib/Disclaimer/style.js +3 -3
  44. package/lib/ImageGenerator/index.js +1 -2
  45. package/lib/ImageGenerator/style.d.ts +2 -1
  46. package/lib/ImageGenerator/style.js +7 -7
  47. package/lib/Markdown/cursor/Dot.js +4 -4
  48. package/lib/Markdown/cursor/Underline.js +3 -4
  49. package/lib/Markdown/index.js +1 -2
  50. package/lib/Markdown/style.d.ts +2 -1
  51. package/lib/Markdown/style.js +11 -11
  52. package/lib/Mermaid/index.js +4 -4
  53. package/lib/OperateCard/OperateCard.js +1 -2
  54. package/lib/OperateCard/style.d.ts +2 -1
  55. package/lib/OperateCard/style.js +5 -5
  56. package/lib/Sender/ModeSelect/index.js +4 -4
  57. package/lib/Sender/index.js +1 -2
  58. package/lib/Sender/style/index.d.ts +2 -1
  59. package/lib/Sender/style/index.js +7 -7
  60. package/lib/StatusCard/index.js +1 -2
  61. package/lib/StatusCard/style.d.ts +2 -1
  62. package/lib/StatusCard/style.js +6 -6
  63. package/lib/Util/createStyle.d.ts +0 -5
  64. package/lib/Util/createStyle.js +0 -20
  65. package/lib/Welcome/index.js +4 -4
  66. package/lib/index.d.ts +0 -1
  67. package/lib/index.js +0 -1
  68. package/package.json +1 -1
@@ -31,7 +31,7 @@ import ClearButton from "./components/ClearButton";
31
31
  import LoadingButton from "./components/LoadingButton";
32
32
  import SendButton from "./components/SendButton";
33
33
  import SpeechButton from "./components/SpeechButton";
34
- import useStyle from "./style";
34
+ import Style from "./style";
35
35
  import useSpeech from "./useSpeech";
36
36
  import ModeSelect from "./ModeSelect";
37
37
  import { SparkEnlargeLine, SparkShrinkLine } from '@agentscope-ai/icons';
@@ -88,7 +88,6 @@ var ForwardSender = /*#__PURE__*/React.forwardRef(function (props, ref) {
88
88
  direction = _useProviderContext.direction,
89
89
  getPrefixCls = _useProviderContext.getPrefixCls;
90
90
  var prefixCls = getPrefixCls('sender');
91
- var Style = useStyle();
92
91
  var containerRef = React.useRef(null);
93
92
  var inputRef = React.useRef(null);
94
93
  useProxyImperativeHandle(ref, function () {
@@ -1,2 +1,3 @@
1
- declare const IndexStyle: () => () => import("react/jsx-runtime").JSX.Element;
1
+ /// <reference types="react" />
2
+ declare const IndexStyle: import("react").NamedExoticComponent<object>;
2
3
  export default IndexStyle;
@@ -1,8 +1,8 @@
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
- import { createGlobalStyle } from "../..";
3
+ import { createGlobalStyle } from 'antd-style';
4
4
  var IndexStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-sender {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n box-shadow: 0px 12px 24px -16px rgba(54, 54, 73, 0.04),\n 0px 12px 40px 0px rgba(51, 51, 71, 0.08),\n 0px 0px 1px 0px rgba(44, 44, 54, 0.02);\n background-color: ", ";\n border-radius: ", "px;\n border-color: ", ";\n border-width: 0;\n border-style: solid;\n overflow: hidden;\n\n &:after {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n transition: border-color ", ";\n border-radius: inherit;\n border-style: inherit;\n border-color: inherit;\n border-width: ", "px;\n }\n\n &:focus-within {\n box-shadow: 0px 12px 24px -16px rgba(54, 54, 73, 0.04),\n 0px 12px 40px 0px rgba(51, 51, 71, 0.08),\n 0px 0px 1px 0px rgba(44, 44, 54, 0.02);\n border-color: ", ";\n\n &:after {\n border-width: ", "px;\n }\n }\n\n &-disabled {\n .", "-sender-content,\n .", "-sender-header {\n background-color: ", ";\n }\n }\n\n &.", "-sender-rtl {\n direction: rtl;\n }\n\n &-content {\n width: 100%;\n padding: 8px;\n box-sizing: border-box;\n overflow: hidden;\n }\n\n &-content-bottom {\n margin-top: 4px;\n display: flex;\n }\n\n &-prefix {\n flex: 1;\n }\n\n &-input {\n margin: 4px 0;\n padding: 0 8px;\n border-radius: 0;\n align-self: center;\n font-size: 14px;\n line-height: 22px;\n }\n\n &-actions-list {\n flex: none;\n display: flex;\n margin: 0 0 0 auto;\n\n &-presets {\n gap: ", "px;\n }\n\n &-length {\n font-size: 12px;\n line-height: 1;\n display: flex;\n align-items: center;\n padding: 0 12px;\n color: ", ";\n }\n }\n\n &-recording {\n height: 30px;\n padding: 0 8px;\n &-icon {\n display: block;\n width: 100%;\n height: 30px;\n }\n }\n\n &-actions-btn {\n &-disabled {\n background: ", ";\n }\n\n &-loading-button {\n padding: 0;\n border: 0;\n }\n\n &-loading-icon {\n height: ", "px;\n width: ", "px;\n vertical-align: top;\n }\n\n &-recording-icon {\n height: 1.2em;\n width: 1.2em;\n vertical-align: top;\n }\n\n \n }\n}\n\n.", "-sender {\n &-header {\n &-motion {\n transition: height .3s, border .3s;\n overflow: hidden;\n &-enter-start,\n &-leave-active {\n border-bottom-color: transparent;\n }\n\n &-hidden {\n display: none;\n }\n }\n }\n}\n"])), function (p) {
5
- return p.prefix;
5
+ return p.theme.prefixCls;
6
6
  }, function (p) {
7
7
  return p.theme.colorBgBase;
8
8
  }, function (p) {
@@ -18,24 +18,24 @@ var IndexStyle = createGlobalStyle(_templateObject || (_templateObject = _tagged
18
18
  }, function (p) {
19
19
  return p.theme.lineWidth;
20
20
  }, function (p) {
21
- return p.prefix;
21
+ return p.theme.prefixCls;
22
22
  }, function (p) {
23
- return p.prefix;
23
+ return p.theme.prefixCls;
24
24
  }, function (p) {
25
25
  return p.theme.colorBgContainerDisabled;
26
26
  }, function (p) {
27
- return p.prefix;
27
+ return p.theme.prefixCls;
28
28
  }, function (p) {
29
29
  return p.theme.paddingXS;
30
30
  }, function (p) {
31
31
  return p.theme.colorTextTertiary;
32
32
  }, function (p) {
33
- return "var(--".concat(p.prefix, "-color-fill-disable)");
33
+ return "var(--".concat(p.theme.prefixCls, "-color-fill-disable)");
34
34
  }, function (p) {
35
35
  return p.theme.controlHeight;
36
36
  }, function (p) {
37
37
  return p.theme.controlHeight;
38
38
  }, function (p) {
39
- return p.prefix;
39
+ return p.theme.prefixCls;
40
40
  });
41
41
  export default IndexStyle;
@@ -1,6 +1,6 @@
1
1
  import { SparkCheckCircleFill, SparkErrorCircleFill, SparkStopCircleLine, SparkTrueLine, SparkWarningCircleFill } from '@agentscope-ai/icons';
2
2
  import { useProviderContext } from "../Provider";
3
- import useStyle from "./style";
3
+ import Style from "./style";
4
4
  import classNames from 'classnames';
5
5
  import { Button } from "@agentscope-ai/design";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -10,7 +10,6 @@ function StatusCard(props) {
10
10
  var _useProviderContext = useProviderContext(),
11
11
  getPrefixCls = _useProviderContext.getPrefixCls;
12
12
  var prefixCls = getPrefixCls('status-card');
13
- var Style = useStyle();
14
13
  var icon = props.icon || {
15
14
  'success': /*#__PURE__*/_jsx(SparkCheckCircleFill, {}),
16
15
  'error': /*#__PURE__*/_jsx(SparkErrorCircleFill, {}),
@@ -1,2 +1,3 @@
1
- declare const _default: () => () => import("react/jsx-runtime").JSX.Element;
1
+ /// <reference types="react" />
2
+ declare const _default: import("react").NamedExoticComponent<object>;
2
3
  export default _default;
@@ -1,8 +1,8 @@
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
- import { createGlobalStyle } from "./..";
3
+ import { createGlobalStyle } from 'antd-style';
4
4
  export default createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-status-card {\n width: 100%;\n border-radius: ", "px;\n border: 1px solid ", ";\n overflow: hidden;\n &-success {\n background-color: ", ";\n\n .", "-status-card-header-icon {\n color: ", ";\n }\n }\n &-error {\n background-color: ", ";\n\n .", "-status-card-header-icon {\n color: ", ";\n }\n }\n &-warning {\n background-color: ", ";\n\n .", "-status-card-header-icon {\n color: ", ";\n }\n }\n &-info {\n background-color: ", ";\n\n .", "-status-card-header-icon {\n color: ", ";\n }\n }\n\n &-header-icon {\n font-size: 20px;\n }\n\n\n &-header-title {\n font-size: 16px;\n color: ", ";\n }\n\n &-header {\n padding: 0 12px;\n }\n\n &-header-top {\n display: flex;\n align-items: center;\n margin: 8px 0;\n gap: 8px;\n }\n\n\n &-header-description {\n margin-top: -6px;\n margin-bottom: 8px;\n margin-left: 30px;\n font-size: 12px;\n color: ", ";\n }\n\n\n\n\n\n &-HITL {\n padding: 16px;\n border-top: 1px solid ", ";\n background-color: ", ";\n border-radius: ", "px ", "px 0 0;\n\n &-desc {\n color: ", ";\n margin-bottom: 12px;\n }\n\n &-button {\n display: flex;\n justify-content: flex-end;\n }\n \n }\n\n &-statistic {\n display: flex;\n padding: 16px 26px;\n border-top: 1px solid ", ";\n background-color: ", ";\n border-radius: ", "px ", "px 0 0;\n\n &-item {\n display: flex;\n flex-direction: column;\n flex: 1;\n gap: 8px;\n\n &-title {\n font-size: 12px;\n color: ", ";\n }\n\n &-value {\n font-size: 18px;\n line-height: 32px;\n color: ", ";\n }\n }\n }\n\n}\n"])), function (p) {
5
- return p.prefix;
5
+ return p.theme.prefixCls;
6
6
  }, function (p) {
7
7
  return p.theme.borderRadiusLG;
8
8
  }, function (p) {
@@ -10,25 +10,25 @@ export default createGlobalStyle(_templateObject || (_templateObject = _taggedTe
10
10
  }, function (p) {
11
11
  return p.theme.colorSuccessBg;
12
12
  }, function (p) {
13
- return p.prefix;
13
+ return p.theme.prefixCls;
14
14
  }, function (p) {
15
15
  return p.theme.colorSuccess;
16
16
  }, function (p) {
17
17
  return p.theme.colorErrorBg;
18
18
  }, function (p) {
19
- return p.prefix;
19
+ return p.theme.prefixCls;
20
20
  }, function (p) {
21
21
  return p.theme.colorError;
22
22
  }, function (p) {
23
23
  return p.theme.colorWarningBg;
24
24
  }, function (p) {
25
- return p.prefix;
25
+ return p.theme.prefixCls;
26
26
  }, function (p) {
27
27
  return p.theme.colorWarning;
28
28
  }, function (p) {
29
29
  return p.theme.colorFillTertiary;
30
30
  }, function (p) {
31
- return p.prefix;
31
+ return p.theme.prefixCls;
32
32
  }, function (p) {
33
33
  return p.theme.colorInfo;
34
34
  }, function (p) {
@@ -1,5 +0,0 @@
1
- import { CSSStyle } from 'antd-style';
2
- import { GlobalTheme } from 'antd-style/lib/factories/createGlobalStyle';
3
- export default function createGlobalStyle(...styles: CSSStyle<GlobalTheme & {
4
- prefix: string;
5
- }>): () => () => import("react/jsx-runtime").JSX.Element;
@@ -1,20 +0,0 @@
1
- import { createGlobalStyle as originCreateGlobalStyle } from 'antd-style';
2
- import { useProviderContext } from "../Provider";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- export default function createGlobalStyle() {
5
- for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {
6
- styles[_key] = arguments[_key];
7
- }
8
- return function () {
9
- var _useProviderContext = useProviderContext(),
10
- getPrefixCls = _useProviderContext.getPrefixCls;
11
- var prefix = getPrefixCls();
12
- var Style = originCreateGlobalStyle.apply(void 0, styles);
13
- return function () {
14
- // @ts-ignore
15
- return /*#__PURE__*/_jsx(Style, {
16
- prefix: prefix
17
- });
18
- };
19
- };
20
- }
@@ -1,12 +1,13 @@
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 React from 'react';
4
- import { createGlobalStyle, useProviderContext } from "./..";
4
+ import { createGlobalStyle } from 'antd-style';
5
+ import { useProviderContext } from "./..";
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
8
- var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-welcome {\n display: flex;\n align-items: center;\n\n &-logo {\n display: block;\n margin-right: 20px;\n }\n\n &-title {\n font-size: 24px;\n line-height: 36px;\n font-weight: bold;\n color: ", ";\n }\n\n &-desc {\n margin-top: 4px;\n font-size: 24px;\n line-height: 36px;\n color: ", ";\n }\n}\n"])), function (p) {
9
- return p.prefix;
9
+ var Style = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-welcome {\n display: flex;\n align-items: center;\n\n &-logo {\n display: block;\n margin-right: 20px;\n }\n\n &-title {\n font-size: 24px;\n line-height: 36px;\n font-weight: bold;\n color: ", ";\n }\n\n &-desc {\n margin-top: 4px;\n font-size: 24px;\n line-height: 36px;\n color: ", ";\n }\n}\n"])), function (p) {
10
+ return p.theme.prefixCls;
10
11
  }, function (p) {
11
12
  return p.theme.colorText;
12
13
  }, function (p) {
@@ -20,7 +21,6 @@ export default function (props) {
20
21
  className: prefix + '-logo',
21
22
  src: props.logo
22
23
  }) : props.logo;
23
- var Style = useStyle();
24
24
  return /*#__PURE__*/_jsxs(_Fragment, {
25
25
  children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
26
26
  className: prefix,
package/lib/index.d.ts CHANGED
@@ -23,6 +23,5 @@ export { default as OperateCard, type IOperateCardProps } from './OperateCard';
23
23
  export * from './OperateCard/preset';
24
24
  export { default as ChatInput, default as Sender, type SenderProps as IChatInputProps, type SenderProps, } from './Sender';
25
25
  export { default as StatusCard, type IStatusCardProps } from './StatusCard';
26
- export { default as createGlobalStyle } from './Util/createStyle';
27
26
  export { default as sleep } from './Util/sleep';
28
27
  export { default as Welcome, type IWelcomeProps } from './Welcome';
package/lib/index.js CHANGED
@@ -22,6 +22,5 @@ export { default as OperateCard } from "./OperateCard";
22
22
  export * from "./OperateCard/preset";
23
23
  export { default as ChatInput, default as Sender } from "./Sender";
24
24
  export { default as StatusCard } from "./StatusCard";
25
- export { default as createGlobalStyle } from "./Util/createStyle";
26
25
  export { default as sleep } from "./Util/sleep";
27
26
  export { default as Welcome } from "./Welcome";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentscope-ai/chat",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "a free and open-source chat framework for building excellent LLM-powered chat experiences",
5
5
  "sideEffects": [
6
6
  "*.less",