@ant-design/agentic-ui 2.30.33 → 2.31.0
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/Robot/lotties/BlowingWindLottie/index.js +16 -3
- package/dist/Components/Robot/lotties/BouncingLottie/index.js +16 -3
- package/dist/Components/Robot/lotties/DazingLottie/index.js +16 -3
- package/dist/Components/Robot/lotties/PeekLottie/index.js +16 -3
- package/dist/Components/Robot/lotties/ThinkingLottie/index.js +16 -3
- package/dist/Components/lotties/CreativeSparkLottie/index.js +16 -3
- package/dist/Components/lotties/DazingLottie/index.js +16 -3
- package/dist/Components/lotties/LoadingLottie/index.js +16 -3
- package/dist/Components/lotties/ThinkingLottie/index.js +16 -3
- package/dist/Components/lotties/ThreeThinkingLottie/index.js +7 -55
- package/dist/Components/lotties/bubble-actions/Copy/index.js +12 -3
- package/dist/Components/lotties/bubble-actions/Dislike/index.js +12 -3
- package/dist/Components/lotties/bubble-actions/Like/index.js +12 -3
- package/dist/Components/lotties/bubble-actions/More/index.js +12 -3
- package/dist/Components/lotties/bubble-actions/Play/index.js +12 -3
- package/dist/Components/lotties/bubble-actions/Quote/index.js +12 -3
- package/dist/Components/lotties/bubble-actions/Refresh/index.js +12 -3
- package/dist/Components/lotties/bubble-actions/Share/index.js +12 -3
- package/dist/Components/lotties/index.d.ts +1 -0
- package/dist/Components/lotties/index.js +1 -0
- package/dist/Components/lotties/useAsyncLottieData.d.ts +9 -0
- package/dist/Components/lotties/useAsyncLottieData.js +83 -0
- package/dist/Hooks/useLanguage.d.ts +1 -0
- package/dist/I18n/locales.d.ts +1 -0
- package/dist/I18n/locales.js +2 -0
- package/dist/Icons/animated/VoicePlayLottie/index.js +16 -3
- package/dist/Icons/animated/VoicingLottie/index.js +16 -3
- package/dist/MarkdownEditor/editor/elements/Paragraph/index.js +10 -10
- package/dist/MarkdownInputField/BorderBeamAnimation.d.ts +1 -1
- package/dist/MarkdownInputField/BorderBeamAnimation.js +6 -3
- package/dist/Plugins/chart/AreaChart/index.js +10 -8
- package/dist/Plugins/chart/BarChart/index.js +10 -8
- package/dist/Plugins/chart/BoxPlotChart/index.d.ts +1 -1
- package/dist/Plugins/chart/BoxPlotChart/index.js +11 -8
- package/dist/Plugins/chart/DonutChart/index.js +14 -12
- package/dist/Plugins/chart/FunnelChart/index.js +10 -8
- package/dist/Plugins/chart/HistogramChart/index.d.ts +1 -1
- package/dist/Plugins/chart/HistogramChart/index.js +11 -8
- package/dist/Plugins/chart/LineChart/index.js +10 -8
- package/dist/Plugins/chart/RadarChart/index.js +14 -12
- package/dist/Plugins/chart/ScatterChart/index.js +14 -12
- package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +4 -2
- package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +2 -0
- package/dist/Plugins/chart/hooks/useChartTheme.d.ts +1 -1
- package/dist/Plugins/chart/hooks/useChartTheme.js +1 -1
- package/dist/Plugins/chart/hooks/useDetectTheme.d.ts +7 -8
- package/dist/Plugins/chart/hooks/useDetectTheme.js +81 -54
- package/dist/ThoughtChainList/style.js +14 -3
- package/dist/Workspace/File/FileComponent.js +15 -9
- package/dist/Workspace/File/FileTree/FileTreeComponent.js +6 -1
- package/dist/Workspace/File/PreviewComponent.js +23 -6
- package/package.json +4 -4
|
@@ -27,8 +27,8 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import Lottie from "lottie-react";
|
|
30
|
-
import React from "react";
|
|
31
|
-
import
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../../../lotties/useAsyncLottieData";
|
|
32
32
|
/**
|
|
33
33
|
* BlowingWindLottie 组件 - Lottie清风拂面动画组件
|
|
34
34
|
*
|
|
@@ -63,6 +63,12 @@ import lottieData from "./lottie.json";
|
|
|
63
63
|
* - 支持自定义样式
|
|
64
64
|
*/ export var BlowingWindLottie = function BlowingWindLottie(param) {
|
|
65
65
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, _param_size = param.size, size = _param_size === void 0 ? 32 : _param_size;
|
|
66
|
+
var loadJson = useMemo(function() {
|
|
67
|
+
return function() {
|
|
68
|
+
return import("./lottie.json");
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
66
72
|
var containerStyle = _object_spread({
|
|
67
73
|
width: size,
|
|
68
74
|
height: size,
|
|
@@ -70,11 +76,18 @@ import lottieData from "./lottie.json";
|
|
|
70
76
|
justifyContent: 'center',
|
|
71
77
|
alignItems: 'center'
|
|
72
78
|
}, style);
|
|
79
|
+
if (animationData === null) {
|
|
80
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
81
|
+
style: containerStyle,
|
|
82
|
+
className: className,
|
|
83
|
+
"aria-hidden": true
|
|
84
|
+
});
|
|
85
|
+
}
|
|
73
86
|
return /*#__PURE__*/ React.createElement(Lottie, {
|
|
74
87
|
style: containerStyle,
|
|
75
88
|
className: className,
|
|
76
89
|
"aria-hidden": "true",
|
|
77
|
-
animationData:
|
|
90
|
+
animationData: animationData,
|
|
78
91
|
loop: loop,
|
|
79
92
|
autoplay: autoplay
|
|
80
93
|
});
|
|
@@ -27,8 +27,8 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import Lottie from "lottie-react";
|
|
30
|
-
import React from "react";
|
|
31
|
-
import
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../../../lotties/useAsyncLottieData";
|
|
32
32
|
/**
|
|
33
33
|
* BouncingLottie 组件 - Lottie弹跳动画组件
|
|
34
34
|
*
|
|
@@ -63,6 +63,12 @@ import lottieData from "./lottie.json";
|
|
|
63
63
|
* - 支持自定义样式
|
|
64
64
|
*/ export var BouncingLottie = function BouncingLottie(param) {
|
|
65
65
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, _param_size = param.size, size = _param_size === void 0 ? 32 : _param_size;
|
|
66
|
+
var loadJson = useMemo(function() {
|
|
67
|
+
return function() {
|
|
68
|
+
return import("./lottie.json");
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
66
72
|
var containerStyle = _object_spread({
|
|
67
73
|
width: size,
|
|
68
74
|
height: size,
|
|
@@ -70,11 +76,18 @@ import lottieData from "./lottie.json";
|
|
|
70
76
|
justifyContent: 'center',
|
|
71
77
|
alignItems: 'center'
|
|
72
78
|
}, style);
|
|
79
|
+
if (animationData === null) {
|
|
80
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
81
|
+
style: containerStyle,
|
|
82
|
+
className: className,
|
|
83
|
+
"aria-hidden": true
|
|
84
|
+
});
|
|
85
|
+
}
|
|
73
86
|
return /*#__PURE__*/ React.createElement(Lottie, {
|
|
74
87
|
style: containerStyle,
|
|
75
88
|
className: className,
|
|
76
89
|
"aria-hidden": "true",
|
|
77
|
-
animationData:
|
|
90
|
+
animationData: animationData,
|
|
78
91
|
loop: loop,
|
|
79
92
|
autoplay: autoplay
|
|
80
93
|
});
|
|
@@ -27,8 +27,8 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import Lottie from "lottie-react";
|
|
30
|
-
import React from "react";
|
|
31
|
-
import
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../../../lotties/useAsyncLottieData";
|
|
32
32
|
/**
|
|
33
33
|
* DazingLottie 组件 - Lottie呼吸+眨眼睛动画组件
|
|
34
34
|
*
|
|
@@ -63,6 +63,12 @@ import dazingLottie from "./dazing.json";
|
|
|
63
63
|
* - 支持自定义样式
|
|
64
64
|
*/ export var DazingLottie = function DazingLottie(param) {
|
|
65
65
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, _param_size = param.size, size = _param_size === void 0 ? 32 : _param_size;
|
|
66
|
+
var loadJson = useMemo(function() {
|
|
67
|
+
return function() {
|
|
68
|
+
return import("./dazing.json");
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
66
72
|
var containerStyle = _object_spread({
|
|
67
73
|
width: size,
|
|
68
74
|
height: size,
|
|
@@ -70,11 +76,18 @@ import dazingLottie from "./dazing.json";
|
|
|
70
76
|
justifyContent: 'center',
|
|
71
77
|
alignItems: 'center'
|
|
72
78
|
}, style);
|
|
79
|
+
if (animationData === null) {
|
|
80
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
81
|
+
style: containerStyle,
|
|
82
|
+
className: className,
|
|
83
|
+
"aria-hidden": true
|
|
84
|
+
});
|
|
85
|
+
}
|
|
73
86
|
return /*#__PURE__*/ React.createElement(Lottie, {
|
|
74
87
|
style: containerStyle,
|
|
75
88
|
className: className,
|
|
76
89
|
"aria-hidden": "true",
|
|
77
|
-
animationData:
|
|
90
|
+
animationData: animationData,
|
|
78
91
|
loop: loop,
|
|
79
92
|
autoplay: autoplay
|
|
80
93
|
});
|
|
@@ -27,8 +27,8 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import Lottie from "lottie-react";
|
|
30
|
-
import React from "react";
|
|
31
|
-
import
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../../../lotties/useAsyncLottieData";
|
|
32
32
|
/**
|
|
33
33
|
* PeekLottie 组件 - Lottie探头动画组件
|
|
34
34
|
*
|
|
@@ -63,6 +63,12 @@ import lottieData from "./lottie.json";
|
|
|
63
63
|
* - 支持自定义样式
|
|
64
64
|
*/ export var PeekLottie = function PeekLottie(param) {
|
|
65
65
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, _param_size = param.size, size = _param_size === void 0 ? 32 : _param_size;
|
|
66
|
+
var loadJson = useMemo(function() {
|
|
67
|
+
return function() {
|
|
68
|
+
return import("./lottie.json");
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
66
72
|
var containerStyle = _object_spread({
|
|
67
73
|
width: size,
|
|
68
74
|
height: size,
|
|
@@ -70,11 +76,18 @@ import lottieData from "./lottie.json";
|
|
|
70
76
|
justifyContent: 'center',
|
|
71
77
|
alignItems: 'center'
|
|
72
78
|
}, style);
|
|
79
|
+
if (animationData === null) {
|
|
80
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
81
|
+
style: containerStyle,
|
|
82
|
+
className: className,
|
|
83
|
+
"aria-hidden": true
|
|
84
|
+
});
|
|
85
|
+
}
|
|
73
86
|
return /*#__PURE__*/ React.createElement(Lottie, {
|
|
74
87
|
style: containerStyle,
|
|
75
88
|
className: className,
|
|
76
89
|
"aria-hidden": "true",
|
|
77
|
-
animationData:
|
|
90
|
+
animationData: animationData,
|
|
78
91
|
loop: loop,
|
|
79
92
|
autoplay: autoplay
|
|
80
93
|
});
|
|
@@ -27,8 +27,8 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import Lottie from "lottie-react";
|
|
30
|
-
import React from "react";
|
|
31
|
-
import
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../../../lotties/useAsyncLottieData";
|
|
32
32
|
/**
|
|
33
33
|
* ThinkingLottie 组件 - Lottie眨眼跑+追星星动画组件
|
|
34
34
|
*
|
|
@@ -63,6 +63,12 @@ import thinkingLottie from "./thinking.json";
|
|
|
63
63
|
* - 支持自定义样式
|
|
64
64
|
*/ export var ThinkingLottie = function ThinkingLottie(param) {
|
|
65
65
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, _param_size = param.size, size = _param_size === void 0 ? 32 : _param_size;
|
|
66
|
+
var loadJson = useMemo(function() {
|
|
67
|
+
return function() {
|
|
68
|
+
return import("./thinking.json");
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
66
72
|
var containerStyle = _object_spread({
|
|
67
73
|
width: size,
|
|
68
74
|
height: size,
|
|
@@ -70,11 +76,18 @@ import thinkingLottie from "./thinking.json";
|
|
|
70
76
|
justifyContent: 'center',
|
|
71
77
|
alignItems: 'center'
|
|
72
78
|
}, style);
|
|
79
|
+
if (animationData === null) {
|
|
80
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
81
|
+
style: containerStyle,
|
|
82
|
+
className: className,
|
|
83
|
+
"aria-hidden": true
|
|
84
|
+
});
|
|
85
|
+
}
|
|
73
86
|
return /*#__PURE__*/ React.createElement(Lottie, {
|
|
74
87
|
style: containerStyle,
|
|
75
88
|
className: className,
|
|
76
89
|
"aria-hidden": "true",
|
|
77
|
-
animationData:
|
|
90
|
+
animationData: animationData,
|
|
78
91
|
loop: loop,
|
|
79
92
|
autoplay: autoplay
|
|
80
93
|
});
|
|
@@ -27,8 +27,8 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import Lottie from "lottie-react";
|
|
30
|
-
import React from "react";
|
|
31
|
-
import
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../useAsyncLottieData";
|
|
32
32
|
/**
|
|
33
33
|
* 创意生成中火花组件
|
|
34
34
|
*
|
|
@@ -67,6 +67,12 @@ import creativeSpark from "./creativeSpark.json";
|
|
|
67
67
|
* @returns 渲染的创意生成中火花组件
|
|
68
68
|
*/ export var CreativeSparkLottie = function CreativeSparkLottie(param) {
|
|
69
69
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, size = param.size;
|
|
70
|
+
var loadJson = useMemo(function() {
|
|
71
|
+
return function() {
|
|
72
|
+
return import("./creativeSpark.json");
|
|
73
|
+
};
|
|
74
|
+
}, []);
|
|
75
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
70
76
|
var containerStyle = _object_spread({
|
|
71
77
|
width: size,
|
|
72
78
|
height: size,
|
|
@@ -74,12 +80,19 @@ import creativeSpark from "./creativeSpark.json";
|
|
|
74
80
|
justifyContent: 'center',
|
|
75
81
|
alignItems: 'center'
|
|
76
82
|
}, style);
|
|
83
|
+
if (animationData === null) {
|
|
84
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
85
|
+
style: containerStyle,
|
|
86
|
+
className: className,
|
|
87
|
+
"aria-hidden": true
|
|
88
|
+
});
|
|
89
|
+
}
|
|
77
90
|
return /*#__PURE__*/ React.createElement(Lottie, {
|
|
78
91
|
style: containerStyle,
|
|
79
92
|
className: className,
|
|
80
93
|
"data-testid": "lottie-animation",
|
|
81
94
|
"aria-hidden": "true",
|
|
82
|
-
animationData:
|
|
95
|
+
animationData: animationData,
|
|
83
96
|
loop: loop,
|
|
84
97
|
autoplay: autoplay
|
|
85
98
|
});
|
|
@@ -27,8 +27,8 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import Lottie from "lottie-react";
|
|
30
|
-
import React from "react";
|
|
31
|
-
import
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../useAsyncLottieData";
|
|
32
32
|
/**
|
|
33
33
|
* DazingLottie 组件 - Lottie呼吸+眨眼睛动画组件
|
|
34
34
|
*
|
|
@@ -64,6 +64,12 @@ import dazingLottie from "./dazing.json";
|
|
|
64
64
|
* - 提供默认的加载动画
|
|
65
65
|
*/ export var DazingLottie = function DazingLottie(param) {
|
|
66
66
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, size = param.size;
|
|
67
|
+
var loadJson = useMemo(function() {
|
|
68
|
+
return function() {
|
|
69
|
+
return import("./dazing.json");
|
|
70
|
+
};
|
|
71
|
+
}, []);
|
|
72
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
67
73
|
var containerStyle = _object_spread({
|
|
68
74
|
width: size,
|
|
69
75
|
height: size,
|
|
@@ -71,11 +77,18 @@ import dazingLottie from "./dazing.json";
|
|
|
71
77
|
justifyContent: 'center',
|
|
72
78
|
alignItems: 'center'
|
|
73
79
|
}, style);
|
|
80
|
+
if (animationData === null) {
|
|
81
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
82
|
+
style: containerStyle,
|
|
83
|
+
className: className,
|
|
84
|
+
"aria-hidden": true
|
|
85
|
+
});
|
|
86
|
+
}
|
|
74
87
|
return /*#__PURE__*/ React.createElement(Lottie, {
|
|
75
88
|
style: containerStyle,
|
|
76
89
|
className: className,
|
|
77
90
|
"aria-hidden": "true",
|
|
78
|
-
animationData:
|
|
91
|
+
animationData: animationData,
|
|
79
92
|
loop: loop,
|
|
80
93
|
autoplay: autoplay
|
|
81
94
|
});
|
|
@@ -27,8 +27,8 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import Lottie from "lottie-react";
|
|
30
|
-
import React from "react";
|
|
31
|
-
import
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../useAsyncLottieData";
|
|
32
32
|
/**
|
|
33
33
|
* 加载动画组件
|
|
34
34
|
*
|
|
@@ -67,6 +67,12 @@ import loadingLottie from "./loading.json";
|
|
|
67
67
|
* @returns 渲染的加载动画组件
|
|
68
68
|
*/ export var LoadingLottie = function LoadingLottie(param) {
|
|
69
69
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, size = param.size;
|
|
70
|
+
var loadJson = useMemo(function() {
|
|
71
|
+
return function() {
|
|
72
|
+
return import("./loading.json");
|
|
73
|
+
};
|
|
74
|
+
}, []);
|
|
75
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
70
76
|
var containerStyle = _object_spread({
|
|
71
77
|
width: size,
|
|
72
78
|
height: size,
|
|
@@ -74,12 +80,19 @@ import loadingLottie from "./loading.json";
|
|
|
74
80
|
justifyContent: 'center',
|
|
75
81
|
alignItems: 'center'
|
|
76
82
|
}, style);
|
|
83
|
+
if (animationData === null) {
|
|
84
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
85
|
+
style: containerStyle,
|
|
86
|
+
className: className,
|
|
87
|
+
"aria-hidden": true
|
|
88
|
+
});
|
|
89
|
+
}
|
|
77
90
|
return /*#__PURE__*/ React.createElement(Lottie, {
|
|
78
91
|
style: containerStyle,
|
|
79
92
|
className: className,
|
|
80
93
|
"data-testid": "lottie-animation",
|
|
81
94
|
"aria-hidden": "true",
|
|
82
|
-
animationData:
|
|
95
|
+
animationData: animationData,
|
|
83
96
|
loop: loop,
|
|
84
97
|
autoplay: autoplay
|
|
85
98
|
});
|
|
@@ -27,8 +27,8 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import Lottie from "lottie-react";
|
|
30
|
-
import React from "react";
|
|
31
|
-
import
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../useAsyncLottieData";
|
|
32
32
|
/**
|
|
33
33
|
* ThinkingLottie 组件 - Lottie眨眼跑+追星星动画组件
|
|
34
34
|
*
|
|
@@ -64,6 +64,12 @@ import thinkingLottie from "./thinking.json";
|
|
|
64
64
|
* - 提供默认的加载动画
|
|
65
65
|
*/ export var ThinkingLottie = function ThinkingLottie(param) {
|
|
66
66
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, size = param.size;
|
|
67
|
+
var loadJson = useMemo(function() {
|
|
68
|
+
return function() {
|
|
69
|
+
return import("./thinking.json");
|
|
70
|
+
};
|
|
71
|
+
}, []);
|
|
72
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
67
73
|
var containerStyle = _object_spread({
|
|
68
74
|
width: size,
|
|
69
75
|
height: size,
|
|
@@ -71,11 +77,18 @@ import thinkingLottie from "./thinking.json";
|
|
|
71
77
|
justifyContent: 'center',
|
|
72
78
|
alignItems: 'center'
|
|
73
79
|
}, style);
|
|
80
|
+
if (animationData === null) {
|
|
81
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
82
|
+
style: containerStyle,
|
|
83
|
+
className: className,
|
|
84
|
+
"aria-hidden": true
|
|
85
|
+
});
|
|
86
|
+
}
|
|
74
87
|
return /*#__PURE__*/ React.createElement(Lottie, {
|
|
75
88
|
style: containerStyle,
|
|
76
89
|
className: className,
|
|
77
90
|
"aria-hidden": "true",
|
|
78
|
-
animationData:
|
|
91
|
+
animationData: animationData,
|
|
79
92
|
loop: loop,
|
|
80
93
|
autoplay: autoplay
|
|
81
94
|
});
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
function _array_like_to_array(arr, len) {
|
|
2
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
-
return arr2;
|
|
5
|
-
}
|
|
6
|
-
function _array_with_holes(arr) {
|
|
7
|
-
if (Array.isArray(arr)) return arr;
|
|
8
|
-
}
|
|
9
1
|
function _define_property(obj, key, value) {
|
|
10
2
|
if (key in obj) {
|
|
11
3
|
Object.defineProperty(obj, key, {
|
|
@@ -19,33 +11,6 @@ function _define_property(obj, key, value) {
|
|
|
19
11
|
}
|
|
20
12
|
return obj;
|
|
21
13
|
}
|
|
22
|
-
function _iterable_to_array_limit(arr, i) {
|
|
23
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24
|
-
if (_i == null) return;
|
|
25
|
-
var _arr = [];
|
|
26
|
-
var _n = true;
|
|
27
|
-
var _d = false;
|
|
28
|
-
var _s, _e;
|
|
29
|
-
try {
|
|
30
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
31
|
-
_arr.push(_s.value);
|
|
32
|
-
if (i && _arr.length === i) break;
|
|
33
|
-
}
|
|
34
|
-
} catch (err) {
|
|
35
|
-
_d = true;
|
|
36
|
-
_e = err;
|
|
37
|
-
} finally{
|
|
38
|
-
try {
|
|
39
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
40
|
-
} finally{
|
|
41
|
-
if (_d) throw _e;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return _arr;
|
|
45
|
-
}
|
|
46
|
-
function _non_iterable_rest() {
|
|
47
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
48
|
-
}
|
|
49
14
|
function _object_spread(target) {
|
|
50
15
|
for(var i = 1; i < arguments.length; i++){
|
|
51
16
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -61,19 +26,9 @@ function _object_spread(target) {
|
|
|
61
26
|
}
|
|
62
27
|
return target;
|
|
63
28
|
}
|
|
64
|
-
function _sliced_to_array(arr, i) {
|
|
65
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
66
|
-
}
|
|
67
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
68
|
-
if (!o) return;
|
|
69
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
70
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
71
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
72
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
73
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
74
|
-
}
|
|
75
29
|
import Lottie from "lottie-react";
|
|
76
|
-
import React, {
|
|
30
|
+
import React, { useMemo } from "react";
|
|
31
|
+
import { useAsyncLottieData } from "../useAsyncLottieData";
|
|
77
32
|
/**
|
|
78
33
|
* ThreeThinkingLottie 组件 - 支持按需加载的思考动画组件
|
|
79
34
|
*
|
|
@@ -111,15 +66,12 @@ import React, { useEffect, useState } from "react";
|
|
|
111
66
|
* - 支持自定义尺寸和样式
|
|
112
67
|
*/ export var ThreeThinkingLottie = function ThreeThinkingLottie(param) {
|
|
113
68
|
var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, _param_size = param.size, size = _param_size === void 0 ? 32 : _param_size, fallback = param.fallback;
|
|
114
|
-
var
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
setAnimationData(data.default || data);
|
|
119
|
-
}).catch(function(error) {
|
|
120
|
-
console.error('Failed to load ThreeThinkingLottie animation:', error);
|
|
121
|
-
});
|
|
69
|
+
var loadJson = useMemo(function() {
|
|
70
|
+
return function() {
|
|
71
|
+
return import("./three-thinking.json");
|
|
72
|
+
};
|
|
122
73
|
}, []);
|
|
74
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
123
75
|
var containerStyle = _object_spread({
|
|
124
76
|
width: size,
|
|
125
77
|
height: size,
|
|
@@ -50,9 +50,9 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import React from "react";
|
|
53
|
+
import React, { useMemo } from "react";
|
|
54
54
|
import AbstractLottie from "../Abstract";
|
|
55
|
-
import
|
|
55
|
+
import { useAsyncLottieData } from "../../useAsyncLottieData";
|
|
56
56
|
/**
|
|
57
57
|
* 复制操作动画组件
|
|
58
58
|
*
|
|
@@ -92,8 +92,17 @@ import copyAnimation from "./lottie.json";
|
|
|
92
92
|
* @param props.size - 动画尺寸(宽度和高度),默认为 '1em'
|
|
93
93
|
* @returns 渲染的复制操作动画组件
|
|
94
94
|
*/ export var CopyLottie = function CopyLottie(props) {
|
|
95
|
+
var loadJson = useMemo(function() {
|
|
96
|
+
return function() {
|
|
97
|
+
return import("./lottie.json");
|
|
98
|
+
};
|
|
99
|
+
}, []);
|
|
100
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
101
|
+
if (animationData === null) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
95
104
|
return /*#__PURE__*/ React.createElement(AbstractLottie, _object_spread_props(_object_spread({}, props), {
|
|
96
|
-
animationData:
|
|
105
|
+
animationData: animationData
|
|
97
106
|
}));
|
|
98
107
|
};
|
|
99
108
|
export default CopyLottie;
|
|
@@ -50,9 +50,9 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import React from "react";
|
|
53
|
+
import React, { useMemo } from "react";
|
|
54
54
|
import AbstractLottie from "../Abstract";
|
|
55
|
-
import
|
|
55
|
+
import { useAsyncLottieData } from "../../useAsyncLottieData";
|
|
56
56
|
/**
|
|
57
57
|
* 取消点赞操作动画组件
|
|
58
58
|
*
|
|
@@ -92,8 +92,17 @@ import unlikeAnimation from "./lottie.json";
|
|
|
92
92
|
* @param props.size - 动画尺寸(宽度和高度),默认为 '1em'
|
|
93
93
|
* @returns 渲染的取消点赞操作动画组件
|
|
94
94
|
*/ export var DislikeLottie = function DislikeLottie(props) {
|
|
95
|
+
var loadJson = useMemo(function() {
|
|
96
|
+
return function() {
|
|
97
|
+
return import("./lottie.json");
|
|
98
|
+
};
|
|
99
|
+
}, []);
|
|
100
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
101
|
+
if (animationData === null) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
95
104
|
return /*#__PURE__*/ React.createElement(AbstractLottie, _object_spread_props(_object_spread({}, props), {
|
|
96
|
-
animationData:
|
|
105
|
+
animationData: animationData
|
|
97
106
|
}));
|
|
98
107
|
};
|
|
99
108
|
export default DislikeLottie;
|
|
@@ -50,9 +50,9 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import React from "react";
|
|
53
|
+
import React, { useMemo } from "react";
|
|
54
54
|
import AbstractLottie from "../Abstract";
|
|
55
|
-
import
|
|
55
|
+
import { useAsyncLottieData } from "../../useAsyncLottieData";
|
|
56
56
|
/**
|
|
57
57
|
* 点赞操作动画组件
|
|
58
58
|
*
|
|
@@ -92,8 +92,17 @@ import likeAnimation from "./lottie.json";
|
|
|
92
92
|
* @param props.size - 动画尺寸(宽度和高度),默认为 '1em'
|
|
93
93
|
* @returns 渲染的点赞操作动画组件
|
|
94
94
|
*/ export var LikeLottie = function LikeLottie(props) {
|
|
95
|
+
var loadJson = useMemo(function() {
|
|
96
|
+
return function() {
|
|
97
|
+
return import("./lottie.json");
|
|
98
|
+
};
|
|
99
|
+
}, []);
|
|
100
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
101
|
+
if (animationData === null) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
95
104
|
return /*#__PURE__*/ React.createElement(AbstractLottie, _object_spread_props(_object_spread({}, props), {
|
|
96
|
-
animationData:
|
|
105
|
+
animationData: animationData
|
|
97
106
|
}));
|
|
98
107
|
};
|
|
99
108
|
export default LikeLottie;
|
|
@@ -50,9 +50,9 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import React from "react";
|
|
53
|
+
import React, { useMemo } from "react";
|
|
54
54
|
import AbstractLottie from "../Abstract";
|
|
55
|
-
import
|
|
55
|
+
import { useAsyncLottieData } from "../../useAsyncLottieData";
|
|
56
56
|
/**
|
|
57
57
|
* 更多操作动画组件
|
|
58
58
|
*
|
|
@@ -92,8 +92,17 @@ import moreAnimation from "./lottie.json";
|
|
|
92
92
|
* @param props.size - 动画尺寸(宽度和高度),默认为 '1em'
|
|
93
93
|
* @returns 渲染的更多操作动画组件
|
|
94
94
|
*/ export var MoreLottie = function MoreLottie(props) {
|
|
95
|
+
var loadJson = useMemo(function() {
|
|
96
|
+
return function() {
|
|
97
|
+
return import("./lottie.json");
|
|
98
|
+
};
|
|
99
|
+
}, []);
|
|
100
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
101
|
+
if (animationData === null) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
95
104
|
return /*#__PURE__*/ React.createElement(AbstractLottie, _object_spread_props(_object_spread({}, props), {
|
|
96
|
-
animationData:
|
|
105
|
+
animationData: animationData
|
|
97
106
|
}));
|
|
98
107
|
};
|
|
99
108
|
export default MoreLottie;
|
|
@@ -50,9 +50,9 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import React from "react";
|
|
53
|
+
import React, { useMemo } from "react";
|
|
54
54
|
import AbstractLottie from "../Abstract";
|
|
55
|
-
import
|
|
55
|
+
import { useAsyncLottieData } from "../../useAsyncLottieData";
|
|
56
56
|
/**
|
|
57
57
|
* 播放操作动画组件
|
|
58
58
|
*
|
|
@@ -92,8 +92,17 @@ import playAnimation from "./lottie.json";
|
|
|
92
92
|
* @param props.size - 动画尺寸(宽度和高度),默认为 '1em'
|
|
93
93
|
* @returns 渲染的播放操作动画组件
|
|
94
94
|
*/ export var PlayLottie = function PlayLottie(props) {
|
|
95
|
+
var loadJson = useMemo(function() {
|
|
96
|
+
return function() {
|
|
97
|
+
return import("./lottie.json");
|
|
98
|
+
};
|
|
99
|
+
}, []);
|
|
100
|
+
var animationData = useAsyncLottieData(loadJson);
|
|
101
|
+
if (animationData === null) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
95
104
|
return /*#__PURE__*/ React.createElement(AbstractLottie, _object_spread_props(_object_spread({}, props), {
|
|
96
|
-
animationData:
|
|
105
|
+
animationData: animationData
|
|
97
106
|
}));
|
|
98
107
|
};
|
|
99
108
|
export default PlayLottie;
|