@ant-design/agentic-ui 2.0.17 → 2.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/Bubble/FileView.js +1 -1
  2. package/dist/Bubble/type.d.ts +2 -2
  3. package/dist/ChatBootPage/ButtonTabStyle.js +2 -2
  4. package/dist/ChatBootPage/CaseReply.d.ts +10 -2
  5. package/dist/ChatBootPage/CaseReply.js +20 -2
  6. package/dist/ChatBootPage/CaseReplyStyle.js +51 -9
  7. package/dist/Components/ActionIconBox/index.js +102 -46
  8. package/dist/Components/Button/ToggleButton/index.js +3 -3
  9. package/dist/Components/Button/ToggleButton/style.js +1 -1
  10. package/dist/Components/GradientText/index.d.ts +8 -0
  11. package/dist/Components/GradientText/index.js +32 -0
  12. package/dist/Components/GradientText/style.d.ts +5 -0
  13. package/dist/Components/GradientText/style.js +76 -0
  14. package/dist/Components/TextAnimate/index.d.ts +56 -0
  15. package/dist/Components/TextAnimate/index.js +388 -0
  16. package/dist/Components/TextAnimate/style.d.ts +5 -0
  17. package/dist/Components/TextAnimate/style.js +53 -0
  18. package/dist/Components/TypingAnimation/index.d.ts +19 -0
  19. package/dist/Components/TypingAnimation/index.js +182 -0
  20. package/dist/Components/TypingAnimation/style.d.ts +5 -0
  21. package/dist/Components/TypingAnimation/style.js +59 -0
  22. package/dist/Components/lotties/ShinyText/index.d.ts +69 -0
  23. package/dist/Components/lotties/ShinyText/index.js +60 -0
  24. package/dist/Components/lotties/ShinyText/style.d.ts +5 -0
  25. package/dist/Components/lotties/ShinyText/style.js +84 -0
  26. package/dist/Components/lotties/index.d.ts +1 -2
  27. package/dist/Components/lotties/index.js +1 -2
  28. package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.js +6 -32
  29. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +1 -1
  30. package/dist/MarkdownInputField/AttachmentButton/index.js +5 -3
  31. package/dist/MarkdownInputField/FileMapView/FileMapViewItem.d.ts +2 -2
  32. package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +166 -152
  33. package/dist/MarkdownInputField/FileMapView/index.d.ts +3 -3
  34. package/dist/MarkdownInputField/FileMapView/index.js +12 -26
  35. package/dist/MarkdownInputField/FileMapView/style.js +8 -3
  36. package/dist/MarkdownInputField/MarkdownInputField.js +156 -174
  37. package/dist/MarkdownInputField/QuickActions/index.js +6 -0
  38. package/dist/MarkdownInputField/VoiceInput/index.js +2 -1
  39. package/dist/MarkdownInputField/style.js +5 -9
  40. package/dist/WelcomeMessage/index.d.ts +12 -2
  41. package/dist/WelcomeMessage/index.js +40 -4
  42. package/dist/WelcomeMessage/style.js +1 -0
  43. package/dist/Workspace/File/FileComponent.js +23 -1
  44. package/dist/index.d.ts +4 -0
  45. package/dist/index.js +4 -0
  46. package/package.json +4 -4
@@ -0,0 +1,69 @@
1
+ import React from 'react';
2
+ export interface ShinyTextProps {
3
+ /**
4
+ * 要显示的文本内容
5
+ * @default "Loading..."
6
+ */
7
+ text?: string;
8
+ /**
9
+ * 是否禁用闪光动画
10
+ * @default false
11
+ */
12
+ disabled?: boolean;
13
+ /**
14
+ * 主题模式
15
+ * - light: 亮色主题(深色文字 + 亮色光泽)
16
+ * - dark: 暗色主题(浅色文字 + 暗色光泽)
17
+ * @default "light"
18
+ */
19
+ theme?: 'light' | 'dark';
20
+ /**
21
+ * 容器类名
22
+ */
23
+ className?: string;
24
+ /**
25
+ * 容器样式
26
+ */
27
+ style?: React.CSSProperties;
28
+ /**
29
+ * 字体大小
30
+ * @example fontSize="16px"
31
+ */
32
+ fontSize?: number | string;
33
+ }
34
+ /**
35
+ * 闪光文字加载组件
36
+ *
37
+ * 使用CSS动画展示闪光文字效果的加载状态组件,支持自定义文本、样式和动画开关。
38
+ *
39
+ * @component
40
+ * @example
41
+ * // 基础用法
42
+ * <ShinyText />
43
+ *
44
+ * @example
45
+ * // 自定义文本
46
+ * <ShinyText text="加载中..." />
47
+ *
48
+ * @example
49
+ * // 自定义样式
50
+ * <ShinyText
51
+ * text="正在处理"
52
+ * fontSize="20px"
53
+ * style={{ margin: '20px' }}
54
+ * />
55
+ *
56
+ * @example
57
+ * // 禁用动画
58
+ * <ShinyText disabled={true} />
59
+ *
60
+ * @param props - 组件属性
61
+ * @param props.text - 要显示的文本内容,默认为 "Loading..."
62
+ * @param props.disabled - 是否禁用闪光动画,默认为 false
63
+ * @param props.className - 容器类名
64
+ * @param props.style - 容器自定义样式
65
+ * @param props.fontSize - 字体大小
66
+ * @returns 渲染的闪光文字组件
67
+ */
68
+ export declare const ShinyText: React.FC<ShinyTextProps>;
69
+ export default ShinyText;
@@ -0,0 +1,60 @@
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/ShinyText/index.tsx
19
+ import { ConfigProvider } from "antd";
20
+ import cx from "classnames";
21
+ import React, { useContext } from "react";
22
+ import { useStyle } from "./style";
23
+ var ShinyText = ({
24
+ text = "Loading...",
25
+ disabled = false,
26
+ theme = "light",
27
+ className,
28
+ style,
29
+ fontSize
30
+ }) => {
31
+ const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
32
+ const prefixCls = getPrefixCls("agentic-shiny-text");
33
+ const { wrapSSR, hashId } = useStyle(prefixCls);
34
+ const containerStyle = __spreadValues({
35
+ fontSize
36
+ }, style);
37
+ return wrapSSR(
38
+ /* @__PURE__ */ React.createElement(
39
+ "span",
40
+ {
41
+ className: cx(prefixCls, hashId, className, {
42
+ [`${prefixCls}-disabled`]: disabled,
43
+ [`${prefixCls}-dark`]: theme === "dark",
44
+ [`${prefixCls}-light`]: theme === "light"
45
+ }),
46
+ style: containerStyle,
47
+ "data-testid": "shiny-text",
48
+ "aria-label": text,
49
+ role: "status",
50
+ "aria-live": "polite"
51
+ },
52
+ text
53
+ )
54
+ );
55
+ };
56
+ var ShinyText_default = ShinyText;
57
+ export {
58
+ ShinyText,
59
+ ShinyText_default as default
60
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare function useStyle(prefixCls: string): {
3
+ wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
4
+ hashId: string;
5
+ };
@@ -0,0 +1,84 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+
21
+ // src/Components/lotties/ShinyText/style.ts
22
+ import { Keyframes } from "@ant-design/cssinjs";
23
+ import {
24
+ useEditorStyleRegister
25
+ } from "../../../Hooks/useStyle";
26
+ var shine = new Keyframes("shine", {
27
+ "0%": {
28
+ backgroundPosition: "100%"
29
+ },
30
+ "100%": {
31
+ backgroundPosition: "-100%"
32
+ }
33
+ });
34
+ var genStyle = (token) => {
35
+ return {
36
+ [token.componentCls]: {
37
+ display: "inline-block",
38
+ animationName: shine,
39
+ animationDuration: "1.2s",
40
+ animationTimingFunction: "linear",
41
+ animationIterationCount: "infinite",
42
+ // 亮色主题:深色文字 + 亮色光泽(适用于白色背景)
43
+ "&-light": {
44
+ color: "#00000066",
45
+ backgroundImage: `linear-gradient(
46
+ 120deg,
47
+ rgba(255, 255, 255, 0.8) 40%,
48
+ rgba(15, 14, 14, 0.8) 50%,
49
+ rgba(255, 255, 255, 0.8) 60%
50
+ )`,
51
+ backgroundSize: "200% 100%",
52
+ WebkitBackgroundClip: "text",
53
+ backgroundClip: "text"
54
+ },
55
+ // 暗色主题:浅色文字 + 深色光泽(适用于黑色背景)
56
+ "&-dark": {
57
+ color: "#ffffff40",
58
+ backgroundImage: `linear-gradient(
59
+ 120deg,
60
+ rgba(255, 255, 255, 0) 40%,
61
+ rgba(255, 255, 255, 0.8) 50%,
62
+ rgba(255, 255, 255, 0) 60%
63
+ )`,
64
+ backgroundSize: "200% 100%",
65
+ WebkitBackgroundClip: "text",
66
+ backgroundClip: "text"
67
+ },
68
+ "&-disabled": {
69
+ animationName: "none"
70
+ }
71
+ }
72
+ };
73
+ };
74
+ function useStyle(prefixCls) {
75
+ return useEditorStyleRegister("ShinyText", (token) => {
76
+ const shinyTextToken = __spreadProps(__spreadValues({}, token), {
77
+ componentCls: `.${prefixCls}`
78
+ });
79
+ return [genStyle(shinyTextToken)];
80
+ });
81
+ }
82
+ export {
83
+ useStyle
84
+ };
@@ -1,2 +1 @@
1
- export * from './DazingLottie';
2
- export * from './ThinkingLottie';
1
+ export * from './ShinyText';
@@ -1,3 +1,2 @@
1
1
  // src/Components/lotties/index.ts
2
- export * from "./DazingLottie";
3
- export * from "./ThinkingLottie";
2
+ export * from "./ShinyText";
@@ -1,23 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
-
21
1
  // src/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.tsx
22
2
  import {
23
3
  AudioOutlined,
@@ -38,13 +18,6 @@ var CONTENT_STYLE = {
38
18
  lineHeight: "1.5em",
39
19
  maxWidth: 275
40
20
  };
41
- var TOOLTIP_CONFIG = {
42
- arrow: false,
43
- mouseEnterDelay: 0.3,
44
- mouseLeaveDelay: 0.1,
45
- trigger: "hover",
46
- placement: "topRight"
47
- };
48
21
  var SupportedFileFormats = {
49
22
  image: {
50
23
  icon: /* @__PURE__ */ React.createElement(FileImageOutlined, null),
@@ -98,14 +71,15 @@ var AttachmentSupportedFormatsContent = ({ supportedFormat }) => {
98
71
  return /* @__PURE__ */ React.createElement(FormatContent, { format });
99
72
  };
100
73
  var AttachmentButtonPopover = ({ children, supportedFormat }) => {
101
- if (!supportedFormat)
102
- return null;
103
74
  return /* @__PURE__ */ React.createElement(
104
75
  Tooltip,
105
- __spreadProps(__spreadValues({}, TOOLTIP_CONFIG), {
76
+ {
77
+ arrow: false,
78
+ mouseEnterDelay: 2,
79
+ trigger: ["hover", "click"],
106
80
  title: /* @__PURE__ */ React.createElement(AttachmentSupportedFormatsContent, { supportedFormat })
107
- }),
108
- children
81
+ },
82
+ /* @__PURE__ */ React.createElement("span", null, children)
109
83
  );
110
84
  };
111
85
  var AttachmentButtonPopover_default = AttachmentButtonPopover;
@@ -90,7 +90,7 @@ var genStyle = (token) => {
90
90
  background: "var(--color-gray-bg-card-white)",
91
91
  boxSizing: "border-box",
92
92
  boxShadow: "var(--shadow-control-base)",
93
- borderRadius: "var(--radius-card-base)",
93
+ borderRadius: "var(--radius-base)",
94
94
  border: "none",
95
95
  overflow: "hidden",
96
96
  img: {
@@ -200,7 +200,7 @@ var BUTTON_TITLE_STYLE = {
200
200
  };
201
201
  var ButtonContent = ({ title }) => {
202
202
  if (!title)
203
- return /* @__PURE__ */ React.createElement(Paperclip, null);
203
+ return /* @__PURE__ */ React.createElement("div", { style: BUTTON_WITH_TITLE_STYLE }, /* @__PURE__ */ React.createElement(Paperclip, null));
204
204
  return /* @__PURE__ */ React.createElement("div", { style: BUTTON_WITH_TITLE_STYLE }, /* @__PURE__ */ React.createElement(Paperclip, null), /* @__PURE__ */ React.createElement("div", { style: BUTTON_TITLE_STYLE }, title));
205
205
  };
206
206
  var AttachmentButton = ({ disabled, uploadImage, title, supportedFormat, render }) => {
@@ -208,13 +208,15 @@ var AttachmentButton = ({ disabled, uploadImage, title, supportedFormat, render
208
208
  const prefix = context == null ? void 0 : context.getPrefixCls("agentic-md-editor-attachment-button");
209
209
  const { wrapSSR, hashId } = useStyle(prefix);
210
210
  const format = supportedFormat || SupportedFileFormats.image;
211
- const content = /* @__PURE__ */ React.createElement(ButtonContent, { title });
212
211
  const handleClick = () => {
213
212
  if (disabled)
214
213
  return;
215
214
  uploadImage == null ? void 0 : uploadImage();
216
215
  };
217
- const wrapper = render ? render({ children: content, supportedFormat: format }) : /* @__PURE__ */ React.createElement(AttachmentButtonPopover, { supportedFormat: format }, content);
216
+ const wrapper = render ? render({
217
+ children: /* @__PURE__ */ React.createElement(ButtonContent, { title }),
218
+ supportedFormat: format
219
+ }) : /* @__PURE__ */ React.createElement(AttachmentButtonPopover, { supportedFormat: format }, /* @__PURE__ */ React.createElement(ButtonContent, { title }));
218
220
  return wrapSSR(
219
221
  /* @__PURE__ */ React.createElement(
220
222
  "div",
@@ -38,8 +38,8 @@ import { AttachmentFile } from '../AttachmentButton/types';
38
38
  */
39
39
  export declare const FileMapViewItem: React.FC<{
40
40
  file: AttachmentFile;
41
- onPreview: () => void;
42
- onDownload: () => void;
41
+ onPreview?: () => void;
42
+ onDownload?: () => void;
43
43
  renderMoreAction?: (file: AttachmentFile) => React.ReactNode;
44
44
  customSlot?: React.ReactNode | ((file: AttachmentFile) => React.ReactNode);
45
45
  className?: string;