@ibiz-template-plugin/ai-chat 0.0.73 → 0.0.74

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 (25) hide show
  1. package/dist/index.es.js +2085 -2047
  2. package/dist/index.legacy.js +1 -1
  3. package/dist/style.css +1 -1
  4. package/dist/types/components/chat-step/chat-step.d.ts +2 -0
  5. package/dist/types/components/chat-step-item/chat-step-item.d.ts +2 -0
  6. package/dist/types/components/chat-think/chat-think.d.ts +5 -0
  7. package/dist/types/components/chat-tool-call/chat-tool-call.d.ts +5 -0
  8. package/dist/types/components/chat-tool-call-item/chat-tool-call-item.d.ts +8 -0
  9. package/dist/types/components/chat-tool-call-item/chunk-tool-call/chunk-tool-call.d.ts +2 -0
  10. package/dist/types/components/chat-tool-call-item/default-tool-call/default-tool-call.d.ts +2 -0
  11. package/dist/types/components/chat-tool-call-item/image-tool-call/image-tool-call.d.ts +2 -0
  12. package/dist/types/components/common/messsage-toolbar/messsage-toolbar.d.ts +5 -0
  13. package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +13 -4
  14. package/dist/types/interface/i-chat-options/i-chat-options.d.ts +9 -0
  15. package/dist/types/interface/i-file-uploader-options/i-file-uploader-options.d.ts +2 -0
  16. package/dist/types/interface/index.d.ts +1 -0
  17. package/dist/types/interface/util/i-confirm-util.d.ts +60 -0
  18. package/dist/types/interface/util/i-message-util.d.ts +76 -0
  19. package/dist/types/interface/util/i-notification-util.d.ts +85 -0
  20. package/dist/types/interface/util/index.d.ts +3 -0
  21. package/dist/types/locale/en/index.d.ts +1 -0
  22. package/dist/types/locale/zh-CN/index.d.ts +1 -0
  23. package/dist/types/utils/index.d.ts +1 -0
  24. package/dist/types/utils/util/util.d.ts +9 -12
  25. package/package.json +1 -1
@@ -0,0 +1,85 @@
1
+ /**
2
+ * @description 全局通知参数
3
+ * @export
4
+ * @interface INotificationParams
5
+ */
6
+ export interface INotificationParams {
7
+ /**
8
+ * @description 标题
9
+ * @type {string}
10
+ * @memberof INotificationParams
11
+ */
12
+ title?: string;
13
+ /**
14
+ * @description 描述
15
+ * @type {string}
16
+ * @memberof INotificationParams
17
+ */
18
+ desc?: string;
19
+ /**
20
+ * @description 描述是否是html字符串
21
+ * @type {boolean}
22
+ * @memberof INotificationParams
23
+ */
24
+ isHtmlDesc?: boolean;
25
+ /**
26
+ * @description 自动关闭的延时,单位秒,不关闭可以写 0
27
+ * @type {number}
28
+ * @memberof INotificationParams
29
+ */
30
+ duration?: number;
31
+ /**
32
+ * @description 位置
33
+ * @type {('top-right' | 'top-left' | 'bottom-right' | 'bottom-left')}
34
+ * @memberof INotificationParams
35
+ */
36
+ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
37
+ /**
38
+ * @description 自定义类名
39
+ * @type {string}
40
+ * @memberof INotificationParams
41
+ */
42
+ class?: string;
43
+ /**
44
+ * @description 点击事件回调
45
+ * @memberof INotificationParams
46
+ */
47
+ onClick?: () => void;
48
+ }
49
+ /**
50
+ * @description 悬浮出现在界面右上角,显示全局的通知
51
+ * @export
52
+ * @interface INotificationUtil
53
+ */
54
+ export interface INotificationUtil {
55
+ /**
56
+ * @description 显示默认样式通知
57
+ * @param {INotificationParams} params 通知参数
58
+ * @memberof INotificationUtil
59
+ */
60
+ default(params: INotificationParams): void;
61
+ /**
62
+ * @description 显示普通信息通知
63
+ * @param {INotificationParams} params 通知参数
64
+ * @memberof INotificationUtil
65
+ */
66
+ info(params: INotificationParams): void;
67
+ /**
68
+ * @description 显示成功通知
69
+ * @param {INotificationParams} params 通知参数
70
+ * @memberof INotificationUtil
71
+ */
72
+ success(params: INotificationParams): void;
73
+ /**
74
+ * @description 显示警告通知
75
+ * @param {INotificationParams} params 通知参数
76
+ * @memberof INotificationUtil
77
+ */
78
+ warning(params: INotificationParams): void;
79
+ /**
80
+ * @description 显示失败通知
81
+ * @param {INotificationParams} params 通知参数
82
+ * @memberof INotificationUtil
83
+ */
84
+ error(params: INotificationParams): void;
85
+ }
@@ -0,0 +1,3 @@
1
+ export type { IConfirmUtil, IConfirmParams } from './i-confirm-util';
2
+ export type { IMessageUtil, IMessageParams } from './i-message-util';
3
+ export type { INotificationUtil, INotificationParams, } from './i-notification-util';
@@ -44,6 +44,7 @@ export declare const EN: {
44
44
  stepFoldUp: string;
45
45
  expandAll: string;
46
46
  copy: string;
47
+ copyMarkdown: string;
47
48
  copied: string;
48
49
  used: string;
49
50
  second: string;
@@ -44,6 +44,7 @@ export declare const ZH_CN: {
44
44
  stepFoldUp: string;
45
45
  expandAll: string;
46
46
  copy: string;
47
+ copyMarkdown: string;
47
48
  copied: string;
48
49
  used: string;
49
50
  second: string;
@@ -10,3 +10,4 @@ export { generateHashWithText } from './util/text-hash-util';
10
10
  export { ChatToolCallParser } from './util/chat-tool-call-parser';
11
11
  export { ChatStepParser } from './util/chat-step-parser';
12
12
  export { ChatUIActionParser } from './util/chat-ui-action-parser';
13
+ export { TextUtil } from './util/util';
@@ -52,21 +52,18 @@ export declare function parsePredefProtocol(urlStr: string): {
52
52
  };
53
53
  export declare class TextUtil {
54
54
  /**
55
- * input元素,用于存储拷贝的文本
56
- *
57
- * @author zhanghengfeng
58
- * @date 2023-08-31 20:08:06
59
- * @private
60
- * @type {(HTMLInputElement | null)}
55
+ * @description textarea元素,用于存储拷贝的文本
56
+ * @static
57
+ * @type {(HTMLTextAreaElement | null)}
58
+ * @memberof TextUtil
61
59
  */
62
- static inputElement: HTMLInputElement | null;
60
+ static element: HTMLTextAreaElement | null;
63
61
  /**
64
- * 拷贝文本
65
- *
66
- * @author zhanghengfeng
67
- * @date 2023-08-31 11:08:51
62
+ * @description 拷贝文本
63
+ * @static
68
64
  * @param {string} value
69
- * @return {*} {boolean}
65
+ * @returns {*} {boolean}
66
+ * @memberof TextUtil
70
67
  */
71
68
  static copy(value: string): boolean;
72
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template-plugin/ai-chat",
3
- "version": "0.0.73",
3
+ "version": "0.0.74",
4
4
  "description": "iBiz AI交互框插件",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",