@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.
- package/lib/Accordion/Accordion.js +1 -2
- package/lib/Accordion/style.d.ts +2 -1
- package/lib/Accordion/style.js +11 -11
- package/lib/Attachments/FileList/FileListCard.js +1 -2
- package/lib/Attachments/index.js +1 -2
- package/lib/Attachments/style/fileCard.d.ts +2 -1
- package/lib/Attachments/style/fileCard.js +12 -12
- package/lib/Attachments/style/index.d.ts +2 -1
- package/lib/Attachments/style/index.js +18 -18
- package/lib/Bubble/Bubble.js +1 -3
- package/lib/Bubble/BubbleList.js +1 -2
- package/lib/Bubble/style/avatar.d.ts +2 -1
- package/lib/Bubble/style/avatar.js +3 -3
- package/lib/Bubble/style/index.d.ts +2 -1
- package/lib/Bubble/style/index.js +5 -5
- package/lib/Bubble/style/list.d.ts +2 -1
- package/lib/Bubble/style/list.js +5 -5
- package/lib/ChatAnywhere/Chat/index.js +1 -2
- package/lib/ChatAnywhere/Chat/style.d.ts +2 -1
- package/lib/ChatAnywhere/Chat/style.js +6 -6
- package/lib/ChatAnywhere/Header/index.js +1 -2
- package/lib/ChatAnywhere/Header/style.d.ts +2 -1
- package/lib/ChatAnywhere/Header/style.js +5 -5
- package/lib/ChatAnywhere/Input/index.js +1 -2
- package/lib/ChatAnywhere/Input/style.d.ts +2 -1
- package/lib/ChatAnywhere/Input/style.js +2 -2
- package/lib/ChatAnywhere/Layout/index.js +1 -2
- package/lib/ChatAnywhere/Layout/style.d.ts +2 -1
- package/lib/ChatAnywhere/Layout/style.js +2 -2
- package/lib/ChatAnywhere/SessionList/index.js +1 -2
- package/lib/ChatAnywhere/SessionList/style.d.ts +2 -1
- package/lib/ChatAnywhere/SessionList/style.js +6 -6
- package/lib/Conversations/index.js +1 -2
- package/lib/Conversations/style.d.ts +2 -1
- package/lib/Conversations/style.js +9 -9
- package/lib/DefaultCards/Files/index.js +7 -7
- package/lib/DefaultCards/Footer/index.js +6 -6
- package/lib/DefaultCards/Images/index.js +7 -7
- package/lib/DefaultCards/Interrupted/index.js +6 -6
- package/lib/DeviceAction/index.js +4 -1
- package/lib/Disclaimer/index.js +1 -2
- package/lib/Disclaimer/style.d.ts +2 -1
- package/lib/Disclaimer/style.js +3 -3
- package/lib/ImageGenerator/index.js +1 -2
- package/lib/ImageGenerator/style.d.ts +2 -1
- package/lib/ImageGenerator/style.js +7 -7
- package/lib/Markdown/cursor/Dot.js +4 -4
- package/lib/Markdown/cursor/Underline.js +3 -4
- package/lib/Markdown/index.js +1 -2
- package/lib/Markdown/style.d.ts +2 -1
- package/lib/Markdown/style.js +11 -11
- package/lib/Mermaid/index.js +4 -4
- package/lib/OperateCard/OperateCard.js +1 -2
- package/lib/OperateCard/style.d.ts +2 -1
- package/lib/OperateCard/style.js +5 -5
- package/lib/Sender/ModeSelect/index.js +4 -4
- package/lib/Sender/index.js +1 -2
- package/lib/Sender/style/index.d.ts +2 -1
- package/lib/Sender/style/index.js +7 -7
- package/lib/StatusCard/index.js +1 -2
- package/lib/StatusCard/style.d.ts +2 -1
- package/lib/StatusCard/style.js +6 -6
- package/lib/Util/createStyle.d.ts +0 -5
- package/lib/Util/createStyle.js +0 -20
- package/lib/Welcome/index.js +4 -4
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ import React, { useMemo, useRef } from 'react';
|
|
|
14
14
|
import cls from 'classnames';
|
|
15
15
|
import BodyContent from "./BodyContent";
|
|
16
16
|
import SoftLightTitle from "./SoftLightTitle";
|
|
17
|
-
import
|
|
17
|
+
import Style from "./style";
|
|
18
18
|
import { useProviderContext } from "../Provider";
|
|
19
19
|
import { SparkCheckCircleFill, SparkErrorCircleFill, SparkDownLine, SparkUpLine, SparkLoadingLine, SparkStopCircleLine } from '@agentscope-ai/icons';
|
|
20
20
|
import { Transition } from 'react-transition-group';
|
|
@@ -142,7 +142,6 @@ function Accordion(props) {
|
|
|
142
142
|
isFirst = _props$isFirst === void 0 ? true : _props$isFirst,
|
|
143
143
|
_props$isLast = props.isLast,
|
|
144
144
|
isLast = _props$isLast === void 0 ? true : _props$isLast;
|
|
145
|
-
var Style = useStyle();
|
|
146
145
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
147
146
|
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Item, _objectSpread(_objectSpread({}, props), {}, {
|
|
148
147
|
level: level,
|
package/lib/Accordion/style.d.ts
CHANGED
package/lib/Accordion/style.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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.", "-accordion-group {\n width: 100%;\n\n svg {\n transform: scale(1.25);\n }\n \n .anticon-spin::before,\n .anticon-spin {\n animation-duration: 2s;\n }\n &-icon-success {\n color: ", ";\n }\n\n \n\n\n @keyframes ", "-loading {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n &-icon-error {\n color: ", ";\n }\n\n &-header {\n display: flex;\n align-items: center;\n gap: 4px;\n color: ", ";\n padding: 6px 12px;\n font-size: 12px;\n cursor: pointer;\n line-height: 20px;\n background-color: ", ";\n\n &-arrow {\n display: flex;\n align-items: center;\n }\n\n &-close {\n border-radius: ", "px;\n border: 1px solid ", ";\n display: inline-flex;\n }\n\n &-icon {\n position: relative;\n display: flex;\n width: 16px;\n height: 16px;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n\n &-line {\n &::before,\n &::after {\n content: '';\n position: absolute;\n width: 1px;\n height: 7px;\n background-color: ", ";\n left: 50%;\n transform: translateX(-50%);\n }\n\n &::before {\n top: -9px;\n }\n\n &::after {\n bottom: -9px;\n }\n }\n\n &-last::after {\n content: none;\n }\n\n &-first::before {\n content: none;\n }\n }\n }\n\n &-open {\n overflow: hidden;\n border-radius: 8px;\n border: 1px solid ", ";\n background-color: ", ";\n }\n\n &-body {\n margin: 8px;\n color: ", ";\n font-size: 12px;\n border-radius: 8px;\n overflow: hidden;\n\n .", "-accordion-group-header {\n background-color: transparent;\n }\n\n \n\n .", "-accordion-group-header-close,\n .", "-accordion-group-open {\n border: 0;\n }\n\n .", "-accordion-group-header-close {\n display: flex;\n }\n\n &-inline {\n padding: 8px 0;\n margin: 0;\n background-color: transparent;\n }\n\n > .", "-accordion-group {\n background-color: ", ";\n\n &-open {\n border-radius: 0;\n }\n }\n\n &-close {\n height: 0;\n padding: 0;\n margin: 0;\n }\n }\n}\n\n.", "-accordion-deep-thinking {\n font-size: 12px;\n color: ", ";\n text-align: left;\n white-space: pre-wrap;\n line-height: 20px;\n padding: 0 12px;\n border-left: 1px solid ", ";\n}\n\n.", "-accordion-soft-light-title {\n font-size: 12px;\n position: relative;\n display: inline-block;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n mask-image: linear-gradient(\n 270deg,\n rgba(231, 231, 237, 0.88) 20%,\n rgba(231, 231, 237, 0.5) 50%,\n rgba(255, 255, 255, 0.4) 52%,\n rgba(231, 231, 237, 0.5) 70%,\n rgba(231, 231, 237, 0.88) 80%\n );\n mask-size: 200% 100%;\n animation: softlight-text 3s linear infinite;\n}\n\n\n@keyframes softlight-text {\n 0% {\n mask-position: 100% 0;\n }\n\n 100% {\n mask-position: -100% 0;\n }\n}\n\n.", "-accordion-content-body {\n border: 1px solid ", ";\n border-radius: 8px;\n overflow: hidden;\n &-header {\n display: flex;\n height: 24px;\n align-items: center;\n justify-content: space-between;\n padding: 0 12px;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n color: ", ";\n }\n\n &-body {\n background-color: ", ";\n }\n}\n"])), function (p) {
|
|
5
|
-
return p.
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
7
|
return p.theme.colorSuccess;
|
|
8
8
|
}, function (p) {
|
|
9
|
-
return p.
|
|
9
|
+
return p.theme.prefixCls;
|
|
10
10
|
}, function (p) {
|
|
11
11
|
return p.theme.colorError;
|
|
12
12
|
}, function (p) {
|
|
@@ -26,27 +26,27 @@ export default createGlobalStyle(_templateObject || (_templateObject = _taggedTe
|
|
|
26
26
|
}, function (p) {
|
|
27
27
|
return p.theme.colorText;
|
|
28
28
|
}, function (p) {
|
|
29
|
-
return p.
|
|
29
|
+
return p.theme.prefixCls;
|
|
30
30
|
}, function (p) {
|
|
31
|
-
return p.
|
|
31
|
+
return p.theme.prefixCls;
|
|
32
32
|
}, function (p) {
|
|
33
|
-
return p.
|
|
33
|
+
return p.theme.prefixCls;
|
|
34
34
|
}, function (p) {
|
|
35
|
-
return p.
|
|
35
|
+
return p.theme.prefixCls;
|
|
36
36
|
}, function (p) {
|
|
37
|
-
return p.
|
|
37
|
+
return p.theme.prefixCls;
|
|
38
38
|
}, function (p) {
|
|
39
39
|
return p.theme.colorFillTertiary;
|
|
40
40
|
}, function (p) {
|
|
41
|
-
return p.
|
|
41
|
+
return p.theme.prefixCls;
|
|
42
42
|
}, function (p) {
|
|
43
43
|
return p.theme.colorTextSecondary;
|
|
44
44
|
}, function (p) {
|
|
45
45
|
return p.theme.colorBorderSecondary;
|
|
46
46
|
}, function (p) {
|
|
47
|
-
return p.
|
|
47
|
+
return p.theme.prefixCls;
|
|
48
48
|
}, function (p) {
|
|
49
|
-
return p.
|
|
49
|
+
return p.theme.prefixCls;
|
|
50
50
|
}, function (p) {
|
|
51
51
|
return p.theme.colorBorderSecondary;
|
|
52
52
|
}, function (p) {
|
|
@@ -14,7 +14,7 @@ import React from 'react';
|
|
|
14
14
|
import { AttachmentContext } from "../context";
|
|
15
15
|
import { previewImage } from "../util";
|
|
16
16
|
import Progress from "./Progress";
|
|
17
|
-
import
|
|
17
|
+
import Style from "../style/fileCard";
|
|
18
18
|
import { useProviderContext } from "../..";
|
|
19
19
|
import { SparkFalseLine } from '@agentscope-ai/icons';
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -117,7 +117,6 @@ function FileListCard(props, ref) {
|
|
|
117
117
|
_item$status = item.status,
|
|
118
118
|
status = _item$status === void 0 ? 'done' : _item$status,
|
|
119
119
|
description = item.description;
|
|
120
|
-
var Style = useStyle();
|
|
121
120
|
var prefixCls = getPrefixCls('attachment');
|
|
122
121
|
var cardCls = "".concat(prefixCls, "-list-card");
|
|
123
122
|
var _React$useMemo = React.useMemo(function () {
|
package/lib/Attachments/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import FileListCard from "./FileList/FileListCard";
|
|
|
23
23
|
import PlaceholderUploader from "./PlaceholderUploader";
|
|
24
24
|
import SilentUploader from "./SilentUploader";
|
|
25
25
|
import { AttachmentContext } from "./context";
|
|
26
|
-
import
|
|
26
|
+
import Style from "./style";
|
|
27
27
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
28
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
29
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -50,7 +50,6 @@ function Attachments(props, ref) {
|
|
|
50
50
|
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
51
51
|
var prefixCls = getPrefixCls('attachment');
|
|
52
52
|
var containerRef = React.useRef(null);
|
|
53
|
-
var Style = useStyle();
|
|
54
53
|
var uploadRef = React.useRef(null);
|
|
55
54
|
React.useImperativeHandle(ref, function () {
|
|
56
55
|
return {
|
|
@@ -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.", "-attachment-list-card {\n border-radius: ", "px;\n position: relative;\n background: ", ";\n border-width: ", "px;\n border-style: solid;\n border-color: ", ";\n flex: none;\n transition: all 0.3s;\n\n &-name,\n &-desc {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100%;\n }\n\n &-ellipsis-prefix {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &-ellipsis-suffix {\n flex: none;\n }\n\n &-type-overview {\n padding: 0 8px;\n display: flex;\n height: 56px;\n gap: ", "px;\n align-items: center;\n width: 140px;\n\n .", "-attachment-list-card-icon {\n display: flex;\n align-items: center;\n }\n\n .", "-attachment-list-card-content {\n flex: auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n font-size: ", "px;\n color: ", ";\n }\n\n .", "-attachment-list-card-desc {\n color: ", ";\n font-size: ", "px;\n }\n }\n\n &-type-preview {\n width: 56px;\n height: 56px;\n line-height: 1;\n\n img {\n width: 100%;\n height: 100%;\n vertical-align: top;\n object-fit: cover;\n border-radius: 5px;\n }\n\n .", "-attachment-list-card-img-mask {\n position: absolute;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, ", ");\n border-radius: inherit;\n }\n\n &.", "-attachment-list-card-status-error {\n\n img,\n .", "-attachment-list-card-img-mask {\n border-radius: calc(", "px - ", "px);\n }\n\n .", "-attachment-list-card-desc {\n padding-inline: ", "px;\n }\n }\n\n .", "-attachment-list-card-progress {\n }\n }\n\n &-remove {\n position: absolute;\n top: -6px;\n right: -6px;\n width: 16px;\n height: 16px;\n line-height: 1;\n font-size: 10px;\n cursor: pointer;\n display: none;\n color: ", ";\n background-color: ", ";\n border-width: ", "px;\n border-style: solid;\n border-color: ", ";\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n transition: all 0.3s;\n\n &:dir(rtl) {\n transform: translate(-50%, -50%);\n }\n }\n\n &:hover &-remove {\n display: flex;\n \n }\n\n &-status-error {\n border-color: ", ";\n\n .", "-attachment-list-card-desc {\n color: ", ";\n }\n }\n\n &-motion {\n\n &-appear-start {\n width: 0;\n transition: none;\n }\n\n &-leave-active {\n opacity: 0;\n width: 0;\n padding-inline: 0;\n border-inline-width: 0;\n margin-inline-end: calc(-1 * ", "px);\n }\n }\n}\n\n.", "-attachment-list-card-hoverable {\n &:hover {\n border-color: ", ";\n }\n}\n"])), function (p) {
|
|
5
|
-
return p.
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
7
|
return p.theme.borderRadius;
|
|
8
8
|
}, function (p) {
|
|
@@ -14,37 +14,37 @@ export default createGlobalStyle(_templateObject || (_templateObject = _taggedTe
|
|
|
14
14
|
}, function (p) {
|
|
15
15
|
return p.theme.paddingXS;
|
|
16
16
|
}, function (p) {
|
|
17
|
-
return p.
|
|
17
|
+
return p.theme.prefixCls;
|
|
18
18
|
}, function (p) {
|
|
19
|
-
return p.
|
|
19
|
+
return p.theme.prefixCls;
|
|
20
20
|
}, function (p) {
|
|
21
21
|
return p.theme.fontSize;
|
|
22
22
|
}, function (p) {
|
|
23
23
|
return p.theme.colorText;
|
|
24
24
|
}, function (p) {
|
|
25
|
-
return p.
|
|
25
|
+
return p.theme.prefixCls;
|
|
26
26
|
}, function (p) {
|
|
27
27
|
return p.theme.colorTextQuaternary;
|
|
28
28
|
}, function (p) {
|
|
29
29
|
return p.theme.fontSizeSM;
|
|
30
30
|
}, function (p) {
|
|
31
|
-
return p.
|
|
31
|
+
return p.theme.prefixCls;
|
|
32
32
|
}, function (p) {
|
|
33
33
|
return p.theme.opacityLoading;
|
|
34
34
|
}, function (p) {
|
|
35
|
-
return p.
|
|
35
|
+
return p.theme.prefixCls;
|
|
36
36
|
}, function (p) {
|
|
37
|
-
return p.
|
|
37
|
+
return p.theme.prefixCls;
|
|
38
38
|
}, function (p) {
|
|
39
39
|
return p.theme.borderRadius;
|
|
40
40
|
}, function (p) {
|
|
41
41
|
return p.theme.lineWidth;
|
|
42
42
|
}, function (p) {
|
|
43
|
-
return p.
|
|
43
|
+
return p.theme.prefixCls;
|
|
44
44
|
}, function (p) {
|
|
45
45
|
return p.theme.paddingXXS;
|
|
46
46
|
}, function (p) {
|
|
47
|
-
return p.
|
|
47
|
+
return p.theme.prefixCls;
|
|
48
48
|
}, function (p) {
|
|
49
49
|
return p.theme.colorText;
|
|
50
50
|
}, function (p) {
|
|
@@ -56,13 +56,13 @@ export default createGlobalStyle(_templateObject || (_templateObject = _taggedTe
|
|
|
56
56
|
}, function (p) {
|
|
57
57
|
return p.theme.colorError;
|
|
58
58
|
}, function (p) {
|
|
59
|
-
return p.
|
|
59
|
+
return p.theme.prefixCls;
|
|
60
60
|
}, function (p) {
|
|
61
61
|
return p.theme.colorError;
|
|
62
62
|
}, function (p) {
|
|
63
63
|
return p.theme.paddingSM;
|
|
64
64
|
}, function (p) {
|
|
65
|
-
return p.
|
|
65
|
+
return p.theme.prefixCls;
|
|
66
66
|
}, function (p) {
|
|
67
67
|
return p.theme.colorPrimary;
|
|
68
68
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
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.", "-attachment {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n\n &,\n * {\n box-sizing: border-box;\n }\n\n &-drop-area {\n position: absolute;\n inset: 0;\n z-index: ", "\n box-sizing: border-box;\n\n &,\n * {\n box-sizing: border-box;\n }\n\n &-on-body {\n position: fixed;\n inset: 0;\n }\n\n &-hide-placement {\n .", "-attachment-placeholder-inner {\n display: none;\n }\n }\n\n .", "-attachment-placeholder {\n padding: 0;\n }\n }\n\n &-placeholder {\n height: 100%;\n border-radius: ", "px;\n border-width: ", "px;\n border-style: dashed;\n border-color: transparent;\n padding: ", "px;\n position: relative;\n backdrop-filter: blur(10px);\n box-sizing: border-box;\n\n &,\n * {\n box-sizing: border-box;\n }\n\n .", "-upload-wrapper .", "-upload.", "-upload-btn {\n padding: 0;\n }\n\n &.", "-attachment-placeholder-drag-in {\n border-color: ", ";\n }\n\n &.", "-attachment-placeholder-disabled {\n opacity: 0.25;\n pointer-events: none;\n }\n\n &-inner {\n gap: calc(", "px / 2);\n }\n\n &-icon {\n font-size: ", "px;\n line-height: 1;\n }\n\n &-title.", "-attachment-placeholder-title {\n margin: 0;\n font-size: ", "px;\n line-height: ", ";\n }\n }\n\n &-list {\n display: flex;\n gap: ", "px;\n font-size: ", "px;\n line-height: ", ";\n color: ", ";\n width: 100%;\n overflow: auto;\n padding: ", "px;\n padding-bottom: 0;\n\n scrollbar-width: none;\n -ms-overflow-style: none;\n &::-webkit-scrollbar {\n display: none;\n }\n\n &-overflow-scrollX,\n &-overflow-scrollY {\n &:before,\n &:after {\n content: \"\";\n position: absolute;\n opacity: 0;\n z-index: 1;\n }\n }\n\n &-overflow-ping-start:before {\n opacity: 1;\n }\n\n &-overflow-ping-end:after {\n opacity: 1;\n }\n\n &-overflow-scrollX {\n overflow-x: auto;\n overflow-y: hidden;\n flex-wrap: nowrap;\n\n &:before,\n &:after {\n inset-block: 0;\n width: 8px;\n }\n\n &:before {\n inset-inline-start: 0;\n background: linear-gradient(to right, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0));\n }\n\n &:after {\n inset-inline-end: 0;\n background: linear-gradient(to left, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0));\n }\n\n &:dir(rtl) {\n &:before {\n background: linear-gradient(to left, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0));\n }\n\n &:after {\n background: linear-gradient(to right, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0));\n }\n }\n }\n\n &-overflow-scrollY {\n overflow-x: hidden;\n overflow-y: auto;\n max-height: calc(", "px * ", "px * 2 + ", "px + ", "px * 3);\n\n &:before,\n &:after {\n inset-inline: 0;\n height: 8px;\n }\n\n &:before {\n inset-block-start: 0;\n background: linear-gradient(to bottom, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0));\n }\n\n &:after {\n inset-block-end: 0;\n background: linear-gradient(to top, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0));\n }\n }\n\n &-upload-btn {\n width: calc(", "px * ", "px * 2 + ", "px + ", "px);\n height: calc(", "px * ", "px * 2 + ", "px + ", "px);\n font-size: ", "px;\n color: #999;\n }\n\n &-prev-btn,\n &-next-btn {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n box-shadow: ", ";\n opacity: 0;\n pointer-events: none;\n }\n\n &-prev-btn {\n left: ", "px;\n }\n\n &-next-btn {\n right: ", "px;\n }\n\n &:dir(ltr) {\n &.", "-attachment-list-overflow-ping-start .", "-attachment-list-prev-btn {\n opacity: 1;\n pointer-events: auto;\n }\n\n &.", "-attachment-list-overflow-ping-end .", "-attachment-list-next-btn {\n opacity: 1;\n pointer-events: auto;\n }\n }\n\n &:dir(rtl) {\n &.", "-attachment-list-overflow-ping-end .", "-attachment-list-prev-btn {\n opacity: 1;\n pointer-events: auto;\n }\n\n &.", "-attachment-list-overflow-ping-start .", "-attachment-list-next-btn {\n opacity: 1;\n pointer-events: auto;\n }\n }\n }\n}\n"])), function (p) {
|
|
5
|
-
return p.
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
7
|
return p.theme.zIndexPopupBase;
|
|
8
8
|
}, function (p) {
|
|
9
|
-
return p.
|
|
9
|
+
return p.theme.prefixCls;
|
|
10
10
|
}, function (p) {
|
|
11
|
-
return p.
|
|
11
|
+
return p.theme.prefixCls;
|
|
12
12
|
}, function (p) {
|
|
13
13
|
return p.theme.borderRadius;
|
|
14
14
|
}, function (p) {
|
|
@@ -16,23 +16,23 @@ export default createGlobalStyle(_templateObject || (_templateObject = _taggedTe
|
|
|
16
16
|
}, function (p) {
|
|
17
17
|
return p.theme.padding;
|
|
18
18
|
}, function (p) {
|
|
19
|
-
return p.
|
|
19
|
+
return p.theme.prefixCls;
|
|
20
20
|
}, function (p) {
|
|
21
|
-
return p.
|
|
21
|
+
return p.theme.prefixCls;
|
|
22
22
|
}, function (p) {
|
|
23
|
-
return p.
|
|
23
|
+
return p.theme.prefixCls;
|
|
24
24
|
}, function (p) {
|
|
25
|
-
return p.
|
|
25
|
+
return p.theme.prefixCls;
|
|
26
26
|
}, function (p) {
|
|
27
27
|
return p.theme.colorPrimaryHover;
|
|
28
28
|
}, function (p) {
|
|
29
|
-
return p.
|
|
29
|
+
return p.theme.prefixCls;
|
|
30
30
|
}, function (p) {
|
|
31
31
|
return p.theme.paddingXXS;
|
|
32
32
|
}, function (p) {
|
|
33
33
|
return p.theme.fontSizeHeading2;
|
|
34
34
|
}, function (p) {
|
|
35
|
-
return p.
|
|
35
|
+
return p.theme.prefixCls;
|
|
36
36
|
}, function (p) {
|
|
37
37
|
return p.theme.fontSize;
|
|
38
38
|
}, function (p) {
|
|
@@ -80,19 +80,19 @@ export default createGlobalStyle(_templateObject || (_templateObject = _taggedTe
|
|
|
80
80
|
}, function (p) {
|
|
81
81
|
return p.theme.padding;
|
|
82
82
|
}, function (p) {
|
|
83
|
-
return p.
|
|
83
|
+
return p.theme.prefixCls;
|
|
84
84
|
}, function (p) {
|
|
85
|
-
return p.
|
|
85
|
+
return p.theme.prefixCls;
|
|
86
86
|
}, function (p) {
|
|
87
|
-
return p.
|
|
87
|
+
return p.theme.prefixCls;
|
|
88
88
|
}, function (p) {
|
|
89
|
-
return p.
|
|
89
|
+
return p.theme.prefixCls;
|
|
90
90
|
}, function (p) {
|
|
91
|
-
return p.
|
|
91
|
+
return p.theme.prefixCls;
|
|
92
92
|
}, function (p) {
|
|
93
|
-
return p.
|
|
93
|
+
return p.theme.prefixCls;
|
|
94
94
|
}, function (p) {
|
|
95
|
-
return p.
|
|
95
|
+
return p.theme.prefixCls;
|
|
96
96
|
}, function (p) {
|
|
97
|
-
return p.
|
|
97
|
+
return p.theme.prefixCls;
|
|
98
98
|
});
|
package/lib/Bubble/Bubble.js
CHANGED
|
@@ -6,7 +6,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
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); }
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import
|
|
9
|
+
import Style from "./style/index";
|
|
10
10
|
import { Markdown, useProviderContext } from "./..";
|
|
11
11
|
import Cards from "./Cards";
|
|
12
12
|
import Spin from "./Spin";
|
|
@@ -38,7 +38,6 @@ var Bubble = function Bubble(props) {
|
|
|
38
38
|
var _useProviderContext = useProviderContext(),
|
|
39
39
|
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
40
40
|
var prefixCls = getPrefixCls('bubble');
|
|
41
|
-
var Style = useStyle();
|
|
42
41
|
var mergedCls = classnames(prefixCls, rootClassName, className, "".concat(prefixCls, "-").concat(placement));
|
|
43
42
|
var contentNode;
|
|
44
43
|
// @ts-ignore
|
|
@@ -47,7 +46,6 @@ var Bubble = function Bubble(props) {
|
|
|
47
46
|
contentNode = /*#__PURE__*/_jsx(Spin, {});
|
|
48
47
|
} else {
|
|
49
48
|
contentNode = content ? /*#__PURE__*/_jsx(Markdown, {
|
|
50
|
-
typing: true,
|
|
51
49
|
content: content,
|
|
52
50
|
cursor: props.msgStatus === 'generating'
|
|
53
51
|
}) : null;
|
package/lib/Bubble/BubbleList.js
CHANGED
|
@@ -10,7 +10,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
import Bubble from "./Bubble";
|
|
11
11
|
import ScrollToBottom from "./ScrollToBottom";
|
|
12
12
|
import { StickToBottom } from 'use-stick-to-bottom';
|
|
13
|
-
import
|
|
13
|
+
import Style from "./style/list";
|
|
14
14
|
import { useProviderContext } from "./..";
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import cls from 'classnames';
|
|
@@ -28,7 +28,6 @@ var BubbleList = function BubbleList(props, ref) {
|
|
|
28
28
|
var _useProviderContext = useProviderContext(),
|
|
29
29
|
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
30
30
|
var prefixCls = getPrefixCls('bubble-list');
|
|
31
|
-
var Style = useStyle();
|
|
32
31
|
React.useImperativeHandle(ref, function () {
|
|
33
32
|
return {
|
|
34
33
|
scrollToBottom: function scrollToBottom() {
|
|
@@ -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.", "-bubble-avatar {\n display: inline-flex;\n justify-content: center;\n align-self: flex-start;\n\n &-loading .", "-avatar::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n width: 100%;\n height: 200%;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGsAAABsCAYAAABtuky0AAAAAXNSR0IArs4c6QAACeJJREFUeF7tnUFu20gQRWWLpJwg8CJAbpCdl7lALuHzBDlPLpELZKkbZBfAiyCwJbEpDorh53yVukmaCLvZUhswRHlMi+qnX/Wrupi5WaWvaFbgJporTRe6SrAi+hAkWAl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HHiXJuMcZMY0AAAAASUVORK5CYII=');\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n transform: rotate(-45deg);\n filter: blur(2px);\n animation: light_sweeping 1.5s infinite linear;\n }\n}\n\n@keyframes light_sweeping {\n 0% {\n transform: translate(-40%, -80%);\n opacity: 0.2;\n }\n\n 45% {\n transform: translate(20%, 20%);\n opacity: 0.8;\n }\n\n 100% {\n transform: translate(40%, 80%);\n opacity: 0.2;\n }\n}\n\n"])), function (p) {
|
|
5
|
-
return p.
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
|
-
return p.
|
|
7
|
+
return p.theme.prefixCls;
|
|
8
8
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
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.", "-bubble {\n display: flex;\n\n &-end,\n &-user {\n justify-content: flex-end;\n\n .", "-bubble-content-wrapper {\n align-items: flex-end;\n }\n }\n\n &-content-wrapper {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n\n &-content-wrapper-card {\n }\n\n &-content {\n position: relative;\n box-sizing: border-box;\n min-width: 0;\n max-width: 100%;\n color: ", ";\n font-size: ", "px;\n line-height: ", ";\n word-break: break-word;\n }\n}\n\n.", "-bubble {\n &-content {\n &-filled {\n padding: 12px 16px;\n border-radius: ", "px;\n background-color: ", ";\n }\n }\n}\n\n\n\n.", "-bubble-loading {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n filter: invert(1) brightness(100%) saturate(0%);\n\n &-text {\n opacity: 0;\n }\n\n &-dot1 {\n width: 4px;\n height: 4px;\n border-radius: 999px;\n background: linear-gradient(\n ", ",\n ", "\n ),\n linear-gradient(\n ", ",\n ", "\n );\n background-blend-mode: multiply;\n animation: dot_01 2.5s infinite ease;\n }\n &-dot2 {\n width: 4px;\n height: 4px;\n border-radius: 999px;\n background: linear-gradient(\n ", ",\n ", "\n ),\n linear-gradient(\n ", ",\n ", "\n );\n background-blend-mode: multiply;\n animation: dot_02 2.5s infinite ease;\n }\n &-dot3 {\n width: 4px;\n height: 4px;\n border-radius: 999px;\n background: linear-gradient(\n ", ",\n ", "\n ),\n linear-gradient(\n ", ",\n ", "\n );\n background-blend-mode: multiply;\n animation: dot_03 2.5s infinite ease;\n }\n}\n\n@keyframes dot_01 {\n 0% {\n transform: translateX(0px) scale(1);\n z-index: 3;\n }\n\n 30.3% {\n transform: translateX(15px) scale(1);\n z-index: 3;\n }\n 33.3% {\n transform: translateX(15px) scale(1);\n z-index: 1;\n }\n 63.6% {\n transform: translateX(7.5px) scale(0.75);\n z-index: 1;\n }\n 66.6% {\n transform: translateX(7.5px) scale(0.75);\n z-index: 2;\n }\n 97% {\n transform: translateX(0px) scale(1);\n z-index: 2;\n }\n}\n\n@keyframes dot_02 {\n 0% {\n transform: translateX(0px) scale(1);\n z-index: 2;\n }\n 23.3% {\n transform: translateX(-7.5px) scale(1.33333);\n z-index: 2;\n }\n\n 30.3% {\n transform: translateX(-7.5px) scale(1.33333);\n z-index: 3;\n }\n 56.6% {\n transform: translateX(7.5px) scale(1.33333);\n z-index: 3;\n }\n 63.6% {\n transform: translateX(7.5px) scale(1.33333);\n z-index: 1;\n }\n 97% {\n transform: translateX(0px) scale(1);\n z-index: 1;\n }\n}\n\n@keyframes dot_03 {\n 0% {\n transform: translateX(0px) scale(1);\n z-index: 1;\n }\n 23.3% {\n transform: translateX(-7.5px) scale(0.75);\n z-index: 1;\n }\n\n 30.3% {\n transform: translateX(-7.5px) scale(0.75);\n z-index: 2;\n }\n 56.6% {\n transform: translateX(-15px) scale(1);\n z-index: 2;\n }\n 63.6% {\n transform: translateX(-15px) scale(1);\n z-index: 3;\n }\n 97% {\n transform: translateX(0px) scale(1);\n z-index: 3;\n }\n}\n"])), function (p) {
|
|
5
|
-
return p.
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
|
-
return p.
|
|
7
|
+
return p.theme.prefixCls;
|
|
8
8
|
}, function (p) {
|
|
9
9
|
return p.theme.colorText;
|
|
10
10
|
}, function (p) {
|
|
@@ -12,13 +12,13 @@ export default createGlobalStyle(_templateObject || (_templateObject = _taggedTe
|
|
|
12
12
|
}, function (p) {
|
|
13
13
|
return p.theme.lineHeight;
|
|
14
14
|
}, function (p) {
|
|
15
|
-
return p.
|
|
15
|
+
return p.theme.prefixCls;
|
|
16
16
|
}, function (p) {
|
|
17
17
|
return p.theme.borderRadiusLG;
|
|
18
18
|
}, function (p) {
|
|
19
19
|
return p.theme.colorPrimaryBg;
|
|
20
20
|
}, function (p) {
|
|
21
|
-
return p.
|
|
21
|
+
return p.theme.prefixCls;
|
|
22
22
|
}, function (p) {
|
|
23
23
|
return p.theme.colorText;
|
|
24
24
|
}, function (p) {
|
package/lib/Bubble/style/list.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
4
|
-
export default createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-bubble-list-wrapper {\n position: relative;\n overflow: hidden;\n
|
|
5
|
-
return p.
|
|
3
|
+
import { createGlobalStyle } from 'antd-style';
|
|
4
|
+
export default createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-bubble-list-wrapper {\n position: relative;\n overflow: hidden;\n}\n\n.", "-bubble-list {\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 16px 16px 0 16px;\n\n &::after {\n display: block;\n content: ' ';\n height: 16px;\n }\n}\n\n.", "-bubble-list-scroll-to-bottom {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 10px;\n display: flex;\n justify-content: center;\n transition: all 0.2s;\n z-index: 10;\n\n &-hide {\n opacity: 0;\n transform: translateY(100%);\n pointer-events: none;\n }\n\n &-show {\n opacity: 1;\n transform: translateY(0%);\n }\n\n button {\n &:hover {\n border-color: ", " !important;\n background-color: ", " !important;\n color: ", " !important;\n }\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
|
-
return p.
|
|
7
|
+
return p.theme.prefixCls;
|
|
8
8
|
}, function (p) {
|
|
9
|
-
return p.
|
|
9
|
+
return p.theme.prefixCls;
|
|
10
10
|
}, function (p) {
|
|
11
11
|
return p.theme.colorPrimaryBorder;
|
|
12
12
|
}, function (p) {
|
|
@@ -16,7 +16,7 @@ import cls from 'classnames';
|
|
|
16
16
|
import { useTimeout } from 'ahooks';
|
|
17
17
|
import { Disclaimer } from "../..";
|
|
18
18
|
import { useChatAnywhere } from "../hooks/ChatAnywhereProvider";
|
|
19
|
-
import
|
|
19
|
+
import Style from "./style";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -27,7 +27,6 @@ export default /*#__PURE__*/forwardRef(function (_, ref) {
|
|
|
27
27
|
var _useProviderContext = useProviderContext(),
|
|
28
28
|
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
29
29
|
var prefixCls = getPrefixCls('chat-anywhere');
|
|
30
|
-
var Style = useStyle();
|
|
31
30
|
var uiConfig = useChatAnywhere(function (v) {
|
|
32
31
|
return v.uiConfig;
|
|
33
32
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
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.", "-chat-anywhere-chat {\n position: relative;\n height: 100%;\n display: flex;\n flex-direction: column;\n transition: all 0.3s;\n opacity: 1;\n\n .", "-bubble-list {\n position: relative;\n margin: 0 auto;\n max-width: 850px;\n min-width: 300px;\n }\n\n .", "-chat-anywhere-sender-wrapper {\n max-width: 850px;\n min-width: 300px;\n padding: 0 16px 16px 16px;\n margin: 0 auto;\n }\n\n &-hide {\n opacity: 0;\n }\n\n &-welcome {\n max-width: 850px;\n min-width: 300px;\n width: -webkit-fill-available;\n padding: 16px;\n margin: 0 auto;\n height: 100%;\n display: flex;\n align-items: safe center;\n justify-content: safe center;\n overflow: auto;\n }\n}\n\n\n\n\n@media screen and (max-width: 768px) {\n button {\n cursor: default !important;\n }\n\n .", "-conversations .", "-conversations-item {\n cursor: default !important;\n\n }\n}\n\n\n"])), function (p) {
|
|
5
|
-
return p.
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
|
-
return p.
|
|
7
|
+
return p.theme.prefixCls;
|
|
8
8
|
}, function (p) {
|
|
9
|
-
return p.
|
|
9
|
+
return p.theme.prefixCls;
|
|
10
10
|
}, function (p) {
|
|
11
|
-
return p.
|
|
11
|
+
return p.theme.prefixCls;
|
|
12
12
|
}, function (p) {
|
|
13
|
-
return p.
|
|
13
|
+
return p.theme.prefixCls;
|
|
14
14
|
});
|
|
@@ -3,7 +3,7 @@ import { useProviderContext } from "../..";
|
|
|
3
3
|
import { isMobileHook } from "../Layout";
|
|
4
4
|
import { useChatAnywhere } from "../hooks/ChatAnywhereProvider";
|
|
5
5
|
import { useSessionList } from "../hooks/useSessionList";
|
|
6
|
-
import
|
|
6
|
+
import Style from "./style";
|
|
7
7
|
import { IconButton } from "@agentscope-ai/design";
|
|
8
8
|
import { SparkOperateLeftLine, SparkOperateRightLine } from "@agentscope-ai/icons";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +12,6 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
12
12
|
export default function () {
|
|
13
13
|
var _useProviderContext = useProviderContext(),
|
|
14
14
|
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
15
|
-
var Style = useStyle();
|
|
16
15
|
var prefixCls = getPrefixCls('chat-anywhere-header');
|
|
17
16
|
var uiConfig = useChatAnywhere(function (v) {
|
|
18
17
|
return v.uiConfig;
|
|
@@ -1,12 +1,12 @@
|
|
|
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.", "-chat-anywhere-header {\n height: 64px;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n backdrop-filter: blur(100px);\n z-index: 1;\n display: flex;\n align-items: center;\n}\n\n.", "-chat-anywhere-header\n ~ .", "-chat-anywhere-chat\n .", "-bubble-list {\n &::before {\n content: ' ';\n display: block;\n height: 24px;\n flex: 0 0 24px;\n }\n}\n\n"])), function (p) {
|
|
5
|
-
return p.
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
|
-
return p.
|
|
7
|
+
return p.theme.prefixCls;
|
|
8
8
|
}, function (p) {
|
|
9
|
-
return p.
|
|
9
|
+
return p.theme.prefixCls;
|
|
10
10
|
}, function (p) {
|
|
11
|
-
return p.
|
|
11
|
+
return p.theme.prefixCls;
|
|
12
12
|
});
|
|
@@ -19,14 +19,13 @@ import cls from 'classnames';
|
|
|
19
19
|
import { useChatAnywhere } from "../hooks/ChatAnywhereProvider";
|
|
20
20
|
import { useInput } from "../hooks/useInput";
|
|
21
21
|
import { Upload } from 'antd';
|
|
22
|
-
import
|
|
22
|
+
import Style from "./style";
|
|
23
23
|
import { IconButton } from "@agentscope-ai/design";
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import { createElement as _createElement } from "react";
|
|
26
26
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
27
27
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
28
|
export default /*#__PURE__*/forwardRef(function (_, ref) {
|
|
29
|
-
var Style = useStyle();
|
|
30
29
|
var _React$useState = React.useState(''),
|
|
31
30
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
32
31
|
content = _React$useState2[0],
|
|
@@ -1,6 +1,6 @@
|
|
|
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.", "-chat-anywhere-sender-wrapper {\n position: relative;\n\n &-header {\n display: flex;\n gap: 8px;\n margin-bottom: 12px;\n }\n}\n\n"])), function (p) {
|
|
5
|
-
return p.
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
});
|
|
@@ -10,7 +10,7 @@ import { useProviderContext } from "../..";
|
|
|
10
10
|
import { Drawer } from 'antd';
|
|
11
11
|
import { useResponsive } from 'ahooks';
|
|
12
12
|
import { useChatAnywhere } from "../hooks/ChatAnywhereProvider";
|
|
13
|
-
import
|
|
13
|
+
import Style from "./style";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -59,7 +59,6 @@ function Left(props) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
export default function (props) {
|
|
62
|
-
var Style = useStyle();
|
|
63
62
|
var _useProviderContext2 = useProviderContext(),
|
|
64
63
|
getPrefixCls = _useProviderContext2.getPrefixCls;
|
|
65
64
|
var prefixCls = getPrefixCls('chat-anywhere-layout');
|
|
@@ -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#root {\n display: flex;\n flex-direction: column;\n height: 100vh;\n}\n\n.", "-chat-anywhere-layout {\n *::-webkit-scrollbar {\n display: none;\n }\n font-family: ", ";\n overflow: hidden;\n position: relative;\n height: 100%;\n background: ", ";\n\n &-main {\n display: flex;\n height: 100%;\n background: ", ";\n }\n\n &-left {\n display: flex;\n flex-direction: column;\n height: 100vh;\n box-sizing: border-box;\n background-color: ", ";\n width: 240px;\n transition: all 0.2s;\n\n &-hide {\n margin-left: -168px;\n background-color: transparent;\n }\n }\n\n &-right {\n position: relative;\n width: 0;\n flex: 1;\n box-sizing: border-box;\n background: ", ";\n }\n}\n\n* {\n box-sizing: border-box;\n}\n\n\n\n*[data-tauri-drag-region] {\n -webkit-app-region: drag;\n}\n"])), function (p) {
|
|
5
|
-
return p.
|
|
5
|
+
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
7
|
return p.theme.fontFamily;
|
|
8
8
|
}, function (p) {
|
|
@@ -7,13 +7,12 @@ import { useChatAnywhere } from "../hooks/ChatAnywhereProvider";
|
|
|
7
7
|
import { useSessionList } from "../hooks/useSessionList";
|
|
8
8
|
import { useMessages } from "../hooks/useMessages";
|
|
9
9
|
import { isMobileHook } from "../Layout";
|
|
10
|
-
import
|
|
10
|
+
import Style from "./style";
|
|
11
11
|
import { SparkOperateLeftLine, SparkOperateRightLine, SparkPlusLine, SparkDeleteLine } from "@agentscope-ai/icons";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
15
|
export default function () {
|
|
16
|
-
var Style = useStyle();
|
|
17
16
|
var _useProviderContext = useProviderContext(),
|
|
18
17
|
getPrefixCls = _useProviderContext.getPrefixCls;
|
|
19
18
|
var prefixCls = getPrefixCls('chat-anywhere-session-list');
|