@agentscope-ai/chat 1.1.46-beta.1767868158421 → 1.1.46-beta.1767871771878
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/components/AssetsPreview/Audio.tsx +5 -1
- package/components/AssetsPreview/Video.tsx +9 -1
- package/components/AssetsPreview/demo/index.tsx +44 -10
- package/components/AssetsPreview/index.tsx +58 -10
- package/components/AssetsPreview/style.ts +22 -2
- package/lib/AssetsPreview/Audio.js +6 -2
- package/lib/AssetsPreview/Video.js +21 -1
- package/lib/AssetsPreview/index.js +68 -26
- package/lib/AssetsPreview/style.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { IAudio } from "./types";
|
|
2
|
+
import { useProviderContext } from "..";
|
|
3
|
+
|
|
2
4
|
|
|
3
5
|
export default function Audio(props: IAudio) {
|
|
4
|
-
|
|
6
|
+
const prefixCls = useProviderContext().getPrefixCls('assets-preview-audio');
|
|
7
|
+
|
|
8
|
+
return <audio src={props.src} controls className={prefixCls} />;
|
|
5
9
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { IVideo } from "./types";
|
|
2
|
+
import { useProviderContext } from "..";
|
|
2
3
|
|
|
3
4
|
export default function Video(props: IVideo) {
|
|
4
|
-
|
|
5
|
+
const prefixCls = useProviderContext().getPrefixCls('assets-preview-video');
|
|
6
|
+
const { width, height, ...rest } = props;
|
|
7
|
+
|
|
8
|
+
return <div className={prefixCls} style={{
|
|
9
|
+
aspectRatio: `${width}/${height}`,
|
|
10
|
+
}}>
|
|
11
|
+
<video {...rest} controls />
|
|
12
|
+
</div>
|
|
5
13
|
}
|
|
@@ -1,15 +1,49 @@
|
|
|
1
1
|
import { AssetsPreview } from '@agentscope-ai/chat';
|
|
2
|
+
import { Flex, Space } from 'antd';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
|
|
4
5
|
export default function () {
|
|
5
|
-
return <
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
return <Flex vertical gap={32}>
|
|
7
|
+
<AssetsPreview type="image" data={[
|
|
8
|
+
{ src: 'https://img.alicdn.com/imgextra/i3/O1CN01dKprif1ar0awCMDwK_!!6000000003382-0-tps-2640-1100.jpg', width: 16, height: 9 },
|
|
9
|
+
]} />
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<AssetsPreview type="image" data={[
|
|
13
|
+
{ src: 'https://img.alicdn.com/imgextra/i3/O1CN01dKprif1ar0awCMDwK_!!6000000003382-0-tps-2640-1100.jpg', width: 16, height: 9 },
|
|
14
|
+
{ src: 'https://img.alicdn.com/imgextra/i3/O1CN01dKprif1ar0awCMDwK_!!6000000003382-0-tps-2640-1100.jpg', width: 16, height: 9 },
|
|
15
|
+
{ src: 'https://img.alicdn.com/imgextra/i3/O1CN01dKprif1ar0awCMDwK_!!6000000003382-0-tps-2640-1100.jpg', width: 16, height: 9 },
|
|
16
|
+
{ src: 'https://img.alicdn.com/imgextra/i3/O1CN01dKprif1ar0awCMDwK_!!6000000003382-0-tps-2640-1100.jpg', width: 16, height: 9 },
|
|
17
|
+
{ src: 'https://img.alicdn.com/imgextra/i3/O1CN01dKprif1ar0awCMDwK_!!6000000003382-0-tps-2640-1100.jpg', width: 16, height: 9 },
|
|
18
|
+
{ src: 'https://img.alicdn.com/imgextra/i3/O1CN01dKprif1ar0awCMDwK_!!6000000003382-0-tps-2640-1100.jpg', width: 16, height: 9 },
|
|
19
|
+
{ src: 'https://img.alicdn.com/imgextra/i3/O1CN01dKprif1ar0awCMDwK_!!6000000003382-0-tps-2640-1100.jpg', width: 16, height: 9 },
|
|
20
|
+
{ src: 'https://img.alicdn.com/imgextra/i3/O1CN01dKprif1ar0awCMDwK_!!6000000003382-0-tps-2640-1100.jpg', width: 16, height: 9 },
|
|
21
|
+
]} />
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<AssetsPreview type="video" data={[
|
|
25
|
+
{ src: 'https://cloud.video.taobao.com/vod/m9amjbqLTGUvaGo3o61u-Ch2hycUCa3RA3pAw1-Zv_0.mp4', width: 16, height: 9 },
|
|
26
|
+
|
|
27
|
+
]} />
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<AssetsPreview type="video" data={[
|
|
31
|
+
{ src: 'https://cloud.video.taobao.com/vod/m9amjbqLTGUvaGo3o61u-Ch2hycUCa3RA3pAw1-Zv_0.mp4', width: 16, height: 9 },
|
|
32
|
+
{ src: 'https://cloud.video.taobao.com/vod/m9amjbqLTGUvaGo3o61u-Ch2hycUCa3RA3pAw1-Zv_0.mp4', width: 16, height: 9 },
|
|
33
|
+
{ src: 'https://cloud.video.taobao.com/vod/m9amjbqLTGUvaGo3o61u-Ch2hycUCa3RA3pAw1-Zv_0.mp4', width: 16, height: 9 },
|
|
34
|
+
|
|
35
|
+
]} />
|
|
36
|
+
|
|
37
|
+
<AssetsPreview type="audio" data={[
|
|
38
|
+
{ src: 'https://cloud.video.taobao.com/vod/m9amjbqLTGUvaGo3o61u-Ch2hycUCa3RA3pAw1-Zv_0.mp4', },
|
|
39
|
+
|
|
40
|
+
]} />
|
|
41
|
+
|
|
42
|
+
<AssetsPreview type="audio" data={[
|
|
43
|
+
{ src: 'https://cloud.video.taobao.com/vod/m9amjbqLTGUvaGo3o61u-Ch2hycUCa3RA3pAw1-Zv_0.mp4', },
|
|
44
|
+
{ src: 'https://cloud.video.taobao.com/vod/m9amjbqLTGUvaGo3o61u-Ch2hycUCa3RA3pAw1-Zv_0.mp4', },
|
|
45
|
+
{ src: 'https://cloud.video.taobao.com/vod/m9amjbqLTGUvaGo3o61u-Ch2hycUCa3RA3pAw1-Zv_0.mp4', },
|
|
46
|
+
|
|
47
|
+
]} />
|
|
48
|
+
</Flex>
|
|
15
49
|
}
|
|
@@ -8,7 +8,6 @@ import Audio from './Audio';
|
|
|
8
8
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
9
9
|
import { SparkLeftLine, SparkRightLine } from '@agentscope-ai/icons';
|
|
10
10
|
import { IconButton } from '@agentscope-ai/design';
|
|
11
|
-
import { useDebounce } from 'ahooks';
|
|
12
11
|
|
|
13
12
|
export interface IAssetsPreviewProps {
|
|
14
13
|
className?: string;
|
|
@@ -27,33 +26,82 @@ function AssetsPreview(props: IAssetsPreviewProps) {
|
|
|
27
26
|
video: Video,
|
|
28
27
|
audio: Audio,
|
|
29
28
|
}[props.type];
|
|
30
|
-
const ref = useRef();
|
|
29
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
31
30
|
|
|
32
31
|
useEffect(() => { }, [props.data.length])
|
|
33
32
|
const { height = 144 } = props;
|
|
34
|
-
const [
|
|
35
|
-
const
|
|
33
|
+
const [arrowTop, setArrowTop] = useState<number>(0);
|
|
34
|
+
const [arrowShow, setArrowShow] = useState<'left' | 'right' | ''>('');
|
|
35
|
+
const maxWidth = useRef<number>(0);
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
const onScroll = useCallback((e) => {
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
if (e.target.scrollLeft > 0) {
|
|
41
|
+
setArrowShow('right');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (e.target.scrollLeft >= maxWidth.current) {
|
|
45
|
+
setArrowShow('left')
|
|
46
|
+
}
|
|
47
|
+
}, [])
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
setArrowTop(height / 2 - 12 - 6);
|
|
52
|
+
}, [height])
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (ref.current && props.type !== 'audio') {
|
|
57
|
+
maxWidth.current = ref.current.scrollWidth - ref.current.clientWidth;
|
|
58
|
+
if (maxWidth.current > 0) {
|
|
59
|
+
setArrowShow('right');
|
|
60
|
+
} else {
|
|
61
|
+
}
|
|
62
|
+
}
|
|
40
63
|
}, [])
|
|
41
64
|
|
|
42
65
|
|
|
66
|
+
const toArrow = useCallback((direct: 'left' | 'right') => {
|
|
67
|
+
const width = ref.current.scrollWidth / props.data.length;
|
|
68
|
+
ref.current.scrollLeft = ref.current.scrollLeft + width * (direct === 'left' ? -1 : 1)
|
|
69
|
+
}, [props.data])
|
|
70
|
+
|
|
71
|
+
|
|
43
72
|
return <>
|
|
44
73
|
<Style />
|
|
45
74
|
<div className={cls(`${prefixCls}`, props.className)}>
|
|
46
|
-
<div className={cls(`${prefixCls}-container`, props.className)} style={{ height }
|
|
75
|
+
<div className={cls(`${prefixCls}-container`, props.className)} style={props.type !== 'audio' ? { height } : {
|
|
76
|
+
flexDirection: 'column'
|
|
77
|
+
}} onScroll={onScroll} ref={ref}>
|
|
47
78
|
{
|
|
48
79
|
props.data.map((item, index) => {
|
|
49
80
|
return <Component key={index} {...item as any} />;
|
|
50
81
|
})
|
|
51
82
|
}
|
|
52
83
|
</div>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
{
|
|
87
|
+
arrowTop && props.type !== 'audio' ? <>
|
|
88
|
+
{
|
|
89
|
+
arrowShow === 'left' && <>
|
|
90
|
+
<div className={cls(`${prefixCls}-left-edge`)} />
|
|
91
|
+
<IconButton onClick={() => toArrow('left')} style={{ top: arrowTop }} className={cls(`${prefixCls}-left-arrow`, `${prefixCls}-arrow`)} size="small" shape='circle' icon={<SparkLeftLine />}></IconButton>
|
|
92
|
+
</>
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
{
|
|
96
|
+
arrowShow === 'right' && <>
|
|
97
|
+
<div className={cls(`${prefixCls}-right-edge`)} />
|
|
98
|
+
<IconButton onClick={() => toArrow('right')} style={{ top: arrowTop }} className={cls(`${prefixCls}-right-arrow`, `${prefixCls}-arrow`)} size="small" shape='circle' icon={<SparkRightLine />}></IconButton>
|
|
99
|
+
</>
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
</> : null
|
|
103
|
+
}
|
|
104
|
+
|
|
57
105
|
</div>
|
|
58
106
|
</>
|
|
59
107
|
}
|
|
@@ -23,8 +23,6 @@ export default createGlobalStyle`
|
|
|
23
23
|
|
|
24
24
|
&-arrow {
|
|
25
25
|
position: absolute;
|
|
26
|
-
top: 50%;
|
|
27
|
-
transform: translateY(-65%);
|
|
28
26
|
bottom: 0;
|
|
29
27
|
}
|
|
30
28
|
|
|
@@ -56,5 +54,27 @@ export default createGlobalStyle`
|
|
|
56
54
|
background-position: center;
|
|
57
55
|
background-repeat: no-repeat;
|
|
58
56
|
}
|
|
57
|
+
|
|
58
|
+
&-video {
|
|
59
|
+
height: 100%;
|
|
60
|
+
flex-basis: auto;
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
border-radius: 8px;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
|
|
65
|
+
video {
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
object-fit: cover;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
&-audio {
|
|
76
|
+
display: block;
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
59
79
|
}
|
|
60
80
|
`;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { useProviderContext } from "..";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
export default function Audio(props) {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
var prefixCls = useProviderContext().getPrefixCls('assets-preview-audio');
|
|
5
|
+
return /*#__PURE__*/_jsx("audio", {
|
|
6
|
+
src: props.src,
|
|
7
|
+
controls: true,
|
|
8
|
+
className: prefixCls
|
|
5
9
|
});
|
|
6
10
|
}
|
|
@@ -1,6 +1,26 @@
|
|
|
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 = ["width", "height"];
|
|
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 { useProviderContext } from "..";
|
|
1
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
12
|
export default function Video(props) {
|
|
13
|
+
var prefixCls = useProviderContext().getPrefixCls('assets-preview-video');
|
|
14
|
+
var width = props.width,
|
|
15
|
+
height = props.height,
|
|
16
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
3
17
|
return /*#__PURE__*/_jsx("div", {
|
|
4
|
-
|
|
18
|
+
className: prefixCls,
|
|
19
|
+
style: {
|
|
20
|
+
aspectRatio: "".concat(width, "/").concat(height)
|
|
21
|
+
},
|
|
22
|
+
children: /*#__PURE__*/_jsx("video", _objectSpread(_objectSpread({}, rest), {}, {
|
|
23
|
+
controls: true
|
|
24
|
+
}))
|
|
5
25
|
});
|
|
6
26
|
}
|
|
@@ -19,10 +19,9 @@ import Audio from "./Audio";
|
|
|
19
19
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
20
20
|
import { SparkLeftLine, SparkRightLine } from '@agentscope-ai/icons';
|
|
21
21
|
import { IconButton } from '@agentscope-ai/design';
|
|
22
|
-
import { useDebounce } from 'ahooks';
|
|
23
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
23
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
25
|
function AssetsPreview(props) {
|
|
27
26
|
var prefixCls = useProviderContext().getPrefixCls('assets-preview');
|
|
28
27
|
var Component = {
|
|
@@ -30,47 +29,90 @@ function AssetsPreview(props) {
|
|
|
30
29
|
video: Video,
|
|
31
30
|
audio: Audio
|
|
32
31
|
}[props.type];
|
|
33
|
-
var ref = useRef();
|
|
32
|
+
var ref = useRef(null);
|
|
34
33
|
useEffect(function () {}, [props.data.length]);
|
|
35
34
|
var _props$height = props.height,
|
|
36
35
|
height = _props$height === void 0 ? 144 : _props$height;
|
|
37
|
-
var _useState = useState(),
|
|
36
|
+
var _useState = useState(0),
|
|
38
37
|
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
arrowTop = _useState2[0],
|
|
39
|
+
setArrowTop = _useState2[1];
|
|
40
|
+
var _useState3 = useState(''),
|
|
41
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
42
|
+
arrowShow = _useState4[0],
|
|
43
|
+
setArrowShow = _useState4[1];
|
|
44
|
+
var maxWidth = useRef(0);
|
|
44
45
|
var onScroll = useCallback(function (e) {
|
|
45
|
-
|
|
46
|
+
if (e.target.scrollLeft > 0) {
|
|
47
|
+
setArrowShow('right');
|
|
48
|
+
}
|
|
49
|
+
if (e.target.scrollLeft >= maxWidth.current) {
|
|
50
|
+
setArrowShow('left');
|
|
51
|
+
}
|
|
52
|
+
}, []);
|
|
53
|
+
useEffect(function () {
|
|
54
|
+
setArrowTop(height / 2 - 12 - 6);
|
|
55
|
+
}, [height]);
|
|
56
|
+
useEffect(function () {
|
|
57
|
+
if (ref.current && props.type !== 'audio') {
|
|
58
|
+
maxWidth.current = ref.current.scrollWidth - ref.current.clientWidth;
|
|
59
|
+
if (maxWidth.current > 0) {
|
|
60
|
+
setArrowShow('right');
|
|
61
|
+
} else {}
|
|
62
|
+
}
|
|
46
63
|
}, []);
|
|
64
|
+
var toArrow = useCallback(function (direct) {
|
|
65
|
+
var width = ref.current.scrollWidth / props.data.length;
|
|
66
|
+
ref.current.scrollLeft = ref.current.scrollLeft + width * (direct === 'left' ? -1 : 1);
|
|
67
|
+
}, [props.data]);
|
|
47
68
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
48
69
|
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
|
|
49
70
|
className: cls("".concat(prefixCls), props.className),
|
|
50
71
|
children: [/*#__PURE__*/_jsx("div", {
|
|
51
72
|
className: cls("".concat(prefixCls, "-container"), props.className),
|
|
52
|
-
style: {
|
|
73
|
+
style: props.type !== 'audio' ? {
|
|
53
74
|
height: height
|
|
75
|
+
} : {
|
|
76
|
+
flexDirection: 'column'
|
|
54
77
|
},
|
|
55
78
|
onScroll: onScroll,
|
|
79
|
+
ref: ref,
|
|
56
80
|
children: props.data.map(function (item, index) {
|
|
57
81
|
return /*#__PURE__*/_jsx(Component, _objectSpread({}, item), index);
|
|
58
82
|
})
|
|
59
|
-
}), /*#__PURE__*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
83
|
+
}), arrowTop && props.type !== 'audio' ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
84
|
+
children: [arrowShow === 'left' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
85
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
86
|
+
className: cls("".concat(prefixCls, "-left-edge"))
|
|
87
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
88
|
+
onClick: function onClick() {
|
|
89
|
+
return toArrow('left');
|
|
90
|
+
},
|
|
91
|
+
style: {
|
|
92
|
+
top: arrowTop
|
|
93
|
+
},
|
|
94
|
+
className: cls("".concat(prefixCls, "-left-arrow"), "".concat(prefixCls, "-arrow")),
|
|
95
|
+
size: "small",
|
|
96
|
+
shape: "circle",
|
|
97
|
+
icon: /*#__PURE__*/_jsx(SparkLeftLine, {})
|
|
98
|
+
})]
|
|
99
|
+
}), arrowShow === 'right' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
100
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
101
|
+
className: cls("".concat(prefixCls, "-right-edge"))
|
|
102
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
103
|
+
onClick: function onClick() {
|
|
104
|
+
return toArrow('right');
|
|
105
|
+
},
|
|
106
|
+
style: {
|
|
107
|
+
top: arrowTop
|
|
108
|
+
},
|
|
109
|
+
className: cls("".concat(prefixCls, "-right-arrow"), "".concat(prefixCls, "-arrow")),
|
|
110
|
+
size: "small",
|
|
111
|
+
shape: "circle",
|
|
112
|
+
icon: /*#__PURE__*/_jsx(SparkRightLine, {})
|
|
113
|
+
})]
|
|
114
|
+
})]
|
|
115
|
+
}) : null]
|
|
74
116
|
})]
|
|
75
117
|
});
|
|
76
118
|
}
|
|
@@ -1,7 +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 'antd-style';
|
|
4
|
-
export default createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-assets-preview {\n position: relative;\n\n &-left-edge,\n &-right-edge {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 128px;\n pointer-events: none;\n }\n\n &-left-edge {\n left: 0;\n }\n\n &-right-edge {\n right: 0;\n }\n\n &-arrow {\n position: absolute;\n
|
|
4
|
+
export default createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-assets-preview {\n position: relative;\n\n &-left-edge,\n &-right-edge {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 128px;\n pointer-events: none;\n }\n\n &-left-edge {\n left: 0;\n }\n\n &-right-edge {\n right: 0;\n }\n\n &-arrow {\n position: absolute;\n bottom: 0;\n }\n\n &-left-arrow {\n left: 10px;\n }\n\n &-right-arrow {\n right: 10px;\n }\n\n &-container {\n display: flex;\n padding: 8px;\n gap: 8px;\n overflow-x: auto;\n justify-content: safe center;\n background-color: ", ";\n }\n\n\n &-image {\n height: 100%;\n flex-basis: auto;\n flex-shrink: 0;\n border-radius: 8px;\n overflow: hidden;\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n }\n\n &-video {\n height: 100%;\n flex-basis: auto;\n flex-shrink: 0;\n border-radius: 8px;\n overflow: hidden;\n\n video {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n\n }\n\n \n &-audio {\n display: block;\n width: 100%;\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.theme.prefixCls;
|
|
6
6
|
}, function (p) {
|
|
7
7
|
return p.theme.colorFillTertiary;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentscope-ai/chat",
|
|
3
|
-
"version": "1.1.46-beta.
|
|
3
|
+
"version": "1.1.46-beta.1767871771878",
|
|
4
4
|
"description": "a free and open-source chat framework for building excellent LLM-powered chat experiences",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": [
|