@ant-design/agentic-ui 2.0.16 → 2.0.18
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/dist/Components/Loading/index.d.ts +2 -1
- package/dist/Components/Loading/index.js +3 -161
- package/dist/Components/lotties/LoadingLottie/index.d.ts +65 -0
- package/dist/Components/lotties/LoadingLottie/index.js +53 -0
- package/dist/Components/lotties/LoadingLottie/loading.json +1 -0
- package/dist/Components/lotties/ShinyText/index.d.ts +69 -0
- package/dist/Components/lotties/ShinyText/index.js +60 -0
- package/dist/Components/{Loading → lotties/ShinyText}/style.d.ts +1 -1
- package/dist/Components/lotties/ShinyText/style.js +84 -0
- package/dist/Components/lotties/index.d.ts +1 -2
- package/dist/Components/lotties/index.js +1 -2
- package/dist/MarkdownInputField/MarkdownInputField.js +156 -142
- package/dist/MarkdownInputField/style.js +17 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/dist/Components/Loading/style.js +0 -46
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { LoadingLottieProps } from '../lotties/LoadingLottie';
|
|
2
3
|
/**
|
|
3
4
|
* Loading 组件 - 加载动画组件
|
|
4
5
|
*
|
|
@@ -22,4 +23,4 @@ import React from 'react';
|
|
|
22
23
|
*
|
|
23
24
|
* @returns {React.ReactElement} 渲染的加载动画组件
|
|
24
25
|
*/
|
|
25
|
-
export declare const Loading: (props:
|
|
26
|
+
export declare const Loading: (props: LoadingLottieProps) => React.JSX.Element;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
2
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
3
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
4
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -16,168 +14,12 @@ var __spreadValues = (a, b) => {
|
|
|
16
14
|
}
|
|
17
15
|
return a;
|
|
18
16
|
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
17
|
|
|
21
18
|
// src/Components/Loading/index.tsx
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { motion } from "framer-motion";
|
|
25
|
-
import React, { useContext } from "react";
|
|
26
|
-
import { useStyle } from "./style";
|
|
19
|
+
import React from "react";
|
|
20
|
+
import { LoadingLottie } from "../lotties/LoadingLottie";
|
|
27
21
|
var Loading = (props) => {
|
|
28
|
-
|
|
29
|
-
const prefixCls = getPrefixCls("loading-container");
|
|
30
|
-
const { wrapSSR, hashId } = useStyle(prefixCls);
|
|
31
|
-
return wrapSSR(
|
|
32
|
-
/* @__PURE__ */ React.createElement(
|
|
33
|
-
"div",
|
|
34
|
-
__spreadValues({
|
|
35
|
-
className: classNames(prefixCls, hashId),
|
|
36
|
-
"data-testid": "loading-container"
|
|
37
|
-
}, props),
|
|
38
|
-
/* @__PURE__ */ React.createElement("svg", { width: "0", height: "0", style: { position: "absolute" } }, /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", { id: "gradient", x1: "60%", y1: "0%", x2: "0%", y2: "100%" }, /* @__PURE__ */ React.createElement("stop", { offset: "0%", stopColor: "#5EF050", stopOpacity: "1" }), /* @__PURE__ */ React.createElement("stop", { offset: "20%", stopColor: "#37ABFF", stopOpacity: "1" }), /* @__PURE__ */ React.createElement("stop", { offset: "55%", stopColor: "#D7B9FF", stopOpacity: "0.95" }), /* @__PURE__ */ React.createElement("stop", { offset: "75%", stopColor: "#D7B9FF", stopOpacity: "1" })), /* @__PURE__ */ React.createElement("linearGradient", { id: "gradient1", x1: "60%", y1: "0%", x2: "0%", y2: "100%" }, /* @__PURE__ */ React.createElement("stop", { offset: "0%", stopColor: "#5EF050", stopOpacity: "1" }), /* @__PURE__ */ React.createElement("stop", { offset: "20%", stopColor: "#37ABFF", stopOpacity: "1" }), /* @__PURE__ */ React.createElement("stop", { offset: "55%", stopColor: "#D7B9FF", stopOpacity: "0.95" }), /* @__PURE__ */ React.createElement("stop", { offset: "75%", stopColor: "#D7B9FF", stopOpacity: "0.05" })))),
|
|
39
|
-
/* @__PURE__ */ React.createElement(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
style: __spreadProps(__spreadValues({}, props.style), {
|
|
43
|
-
width: "1em",
|
|
44
|
-
height: "1em"
|
|
45
|
-
})
|
|
46
|
-
},
|
|
47
|
-
/* @__PURE__ */ React.createElement(
|
|
48
|
-
motion.svg,
|
|
49
|
-
{
|
|
50
|
-
width: "1em",
|
|
51
|
-
height: "1em",
|
|
52
|
-
viewBox: "0 0 100 100",
|
|
53
|
-
style: { position: "absolute" },
|
|
54
|
-
animate: {
|
|
55
|
-
rotate: [-360, 0]
|
|
56
|
-
// wrapper2 逆时针旋转渐变
|
|
57
|
-
},
|
|
58
|
-
transition: {
|
|
59
|
-
duration: 3,
|
|
60
|
-
ease: "linear",
|
|
61
|
-
repeat: Infinity,
|
|
62
|
-
repeatType: "loop"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
/* @__PURE__ */ React.createElement(
|
|
66
|
-
motion.ellipse,
|
|
67
|
-
{
|
|
68
|
-
cx: "50",
|
|
69
|
-
cy: "50",
|
|
70
|
-
fill: "none",
|
|
71
|
-
stroke: "url(#gradient1)",
|
|
72
|
-
strokeWidth: "10",
|
|
73
|
-
style: { transformOrigin: "center center" },
|
|
74
|
-
animate: {
|
|
75
|
-
// 旋转动画:rotation: 300 → (300-25-90=185) → (185+180=365) → (365-25-40=300)
|
|
76
|
-
rotate: [300, 185, 365, 300],
|
|
77
|
-
// rx 动画:12 → 0 → 16 → 0 → 8 → 0 → 28 → 0 → 12
|
|
78
|
-
rx: [12, 0, 16, 0, 8, 0, 28, 0, 12],
|
|
79
|
-
ry: 32
|
|
80
|
-
// 保持固定
|
|
81
|
-
},
|
|
82
|
-
transition: {
|
|
83
|
-
rotate: {
|
|
84
|
-
duration: 3,
|
|
85
|
-
ease: "linear",
|
|
86
|
-
times: [0, 0.4167, 0.7667, 1],
|
|
87
|
-
// 1.25/3, 2.3/3, 1
|
|
88
|
-
repeat: Infinity,
|
|
89
|
-
repeatType: "loop"
|
|
90
|
-
},
|
|
91
|
-
rx: {
|
|
92
|
-
duration: 3,
|
|
93
|
-
ease: "linear",
|
|
94
|
-
times: [
|
|
95
|
-
0,
|
|
96
|
-
0.15,
|
|
97
|
-
0.2567,
|
|
98
|
-
0.4167,
|
|
99
|
-
0.5,
|
|
100
|
-
0.5333,
|
|
101
|
-
0.6667,
|
|
102
|
-
0.7667,
|
|
103
|
-
1
|
|
104
|
-
],
|
|
105
|
-
repeat: Infinity,
|
|
106
|
-
repeatType: "loop"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
),
|
|
112
|
-
/* @__PURE__ */ React.createElement(
|
|
113
|
-
motion.svg,
|
|
114
|
-
{
|
|
115
|
-
width: "1em",
|
|
116
|
-
height: "1em",
|
|
117
|
-
viewBox: "0 0 100 100",
|
|
118
|
-
style: { position: "absolute" },
|
|
119
|
-
animate: {
|
|
120
|
-
rotate: [0, -360]
|
|
121
|
-
// wrapper1 顺时针旋转渐变
|
|
122
|
-
},
|
|
123
|
-
transition: {
|
|
124
|
-
duration: 3,
|
|
125
|
-
ease: "linear",
|
|
126
|
-
repeat: Infinity,
|
|
127
|
-
repeatType: "loop"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
/* @__PURE__ */ React.createElement(
|
|
131
|
-
motion.ellipse,
|
|
132
|
-
{
|
|
133
|
-
cx: "50",
|
|
134
|
-
cy: "50",
|
|
135
|
-
fill: "none",
|
|
136
|
-
stroke: "url(#gradient)",
|
|
137
|
-
strokeWidth: "10",
|
|
138
|
-
style: { transformOrigin: "center center" },
|
|
139
|
-
animate: {
|
|
140
|
-
// 旋转动画:rotation: 30 → (30-30-30-15-90-45=-180) → (-180+30+30+30+120=30)
|
|
141
|
-
rotate: [30, -280, 30],
|
|
142
|
-
// rx 动画:32 → 0 → 8 → 0 → 24 → 0 → 16 → 0 → 30 → 32
|
|
143
|
-
rx: [32, 0, 8, 0, 24, 0, 16, 0, 30, 32],
|
|
144
|
-
ry: 32
|
|
145
|
-
// 保持固定
|
|
146
|
-
},
|
|
147
|
-
transition: {
|
|
148
|
-
rotate: {
|
|
149
|
-
duration: 3,
|
|
150
|
-
ease: "linear",
|
|
151
|
-
times: [0, 0.5267, 1],
|
|
152
|
-
// 1.58/3, 1
|
|
153
|
-
repeat: Infinity,
|
|
154
|
-
repeatType: "loop"
|
|
155
|
-
},
|
|
156
|
-
rx: {
|
|
157
|
-
duration: 3,
|
|
158
|
-
ease: "linear",
|
|
159
|
-
times: [
|
|
160
|
-
0,
|
|
161
|
-
0.2567,
|
|
162
|
-
0.3467,
|
|
163
|
-
0.38,
|
|
164
|
-
0.4867,
|
|
165
|
-
0.5967,
|
|
166
|
-
0.7067,
|
|
167
|
-
0.8167,
|
|
168
|
-
0.9433,
|
|
169
|
-
1
|
|
170
|
-
],
|
|
171
|
-
repeat: Infinity,
|
|
172
|
-
repeatType: "loop"
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
)
|
|
177
|
-
)
|
|
178
|
-
)
|
|
179
|
-
)
|
|
180
|
-
);
|
|
22
|
+
return /* @__PURE__ */ React.createElement(LoadingLottie, __spreadValues({ size: "1em" }, props));
|
|
181
23
|
};
|
|
182
24
|
export {
|
|
183
25
|
Loading
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LoadingLottieProps {
|
|
3
|
+
/**
|
|
4
|
+
* 是否自动播放动画
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
autoplay?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* 是否循环播放动画
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
loop?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 动画容器类名
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 动画容器样式
|
|
19
|
+
*/
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
/**
|
|
22
|
+
* 动画尺寸(宽度和高度)
|
|
23
|
+
* @example size={64}
|
|
24
|
+
*/
|
|
25
|
+
size?: number | string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 加载动画组件
|
|
29
|
+
*
|
|
30
|
+
* 使用 Lottie 动画展示加载状态的组件,支持自定义尺寸、样式和播放行为。
|
|
31
|
+
*
|
|
32
|
+
* @component
|
|
33
|
+
* @example
|
|
34
|
+
* // 基础用法
|
|
35
|
+
* <LoadingLottie />
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* // 自定义尺寸
|
|
39
|
+
* <LoadingLottie size={64} />
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* // 自定义样式
|
|
43
|
+
* <LoadingLottie
|
|
44
|
+
* size={80}
|
|
45
|
+
* style={{ margin: '20px' }}
|
|
46
|
+
* className="custom-loading"
|
|
47
|
+
* />
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // 控制播放行为
|
|
51
|
+
* <LoadingLottie
|
|
52
|
+
* autoplay={false}
|
|
53
|
+
* loop={false}
|
|
54
|
+
* />
|
|
55
|
+
*
|
|
56
|
+
* @param props - 组件属性
|
|
57
|
+
* @param props.autoplay - 是否自动播放动画,默认为 true
|
|
58
|
+
* @param props.loop - 是否循环播放动画,默认为 true
|
|
59
|
+
* @param props.className - 动画容器类名
|
|
60
|
+
* @param props.style - 动画容器自定义样式
|
|
61
|
+
* @param props.size - 动画尺寸(宽度和高度)
|
|
62
|
+
* @returns 渲染的加载动画组件
|
|
63
|
+
*/
|
|
64
|
+
export declare const LoadingLottie: React.FC<LoadingLottieProps>;
|
|
65
|
+
export default LoadingLottie;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/Components/lotties/LoadingLottie/index.tsx
|
|
19
|
+
import Lottie from "lottie-react";
|
|
20
|
+
import React from "react";
|
|
21
|
+
import loadingLottie from "./loading.json";
|
|
22
|
+
var LoadingLottie = ({
|
|
23
|
+
autoplay = true,
|
|
24
|
+
loop = true,
|
|
25
|
+
className,
|
|
26
|
+
style,
|
|
27
|
+
size
|
|
28
|
+
}) => {
|
|
29
|
+
const containerStyle = __spreadValues({
|
|
30
|
+
width: size,
|
|
31
|
+
height: size,
|
|
32
|
+
display: "flex",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
alignItems: "center"
|
|
35
|
+
}, style);
|
|
36
|
+
return /* @__PURE__ */ React.createElement(
|
|
37
|
+
Lottie,
|
|
38
|
+
{
|
|
39
|
+
style: containerStyle,
|
|
40
|
+
className,
|
|
41
|
+
"data-testid": "lottie-animation",
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
animationData: loadingLottie,
|
|
44
|
+
loop,
|
|
45
|
+
autoplay
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
var LoadingLottie_default = LoadingLottie;
|
|
50
|
+
export {
|
|
51
|
+
LoadingLottie,
|
|
52
|
+
LoadingLottie_default as default
|
|
53
|
+
};
|