@matechat/core 1.10.0 → 1.11.0-alpha.1

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 (115) hide show
  1. package/Attachment/Attachment.vue.d.ts +121 -0
  2. package/Attachment/attachment-types.d.ts +103 -0
  3. package/Attachment/drop-area.vue.d.ts +13 -0
  4. package/Attachment/index.css +1 -1
  5. package/Attachment/index.d.ts +2 -0
  6. package/Attachment/index.js +211 -311
  7. package/Attachment/uploader.d.ts +11 -0
  8. package/Attachment/use-upload.d.ts +8 -0
  9. package/Bubble/Bubble.vue.d.ts +75 -0
  10. package/Bubble/BubbleLoading.vue.d.ts +3 -0
  11. package/Bubble/bubble-constants.d.ts +4 -0
  12. package/Bubble/bubble-types.d.ts +38 -0
  13. package/Bubble/components/Avatar.vue.d.ts +57 -0
  14. package/Bubble/components/AvatarBodyIcon.vue.d.ts +24 -0
  15. package/Bubble/components/AvatarNoBodyIcon.vue.d.ts +24 -0
  16. package/Bubble/components/avatar-types.d.ts +25 -0
  17. package/Bubble/index.css +1 -1
  18. package/Bubble/index.d.ts +2 -0
  19. package/Bubble/index.js +11 -11
  20. package/FileList/FileIcon/CodeFile.vue.d.ts +10 -0
  21. package/FileList/FileIcon/CompressedFile.vue.d.ts +10 -0
  22. package/FileList/FileIcon/DefaultFileIcon.vue.d.ts +10 -0
  23. package/FileList/FileIcon/Document.vue.d.ts +10 -0
  24. package/FileList/FileIcon/DrawingBoard.vue.d.ts +10 -0
  25. package/FileList/FileIcon/EmailFile.vue.d.ts +10 -0
  26. package/FileList/FileIcon/Excel.vue.d.ts +10 -0
  27. package/FileList/FileIcon/FlowChart.vue.d.ts +10 -0
  28. package/FileList/FileIcon/FolderClosed.vue.d.ts +10 -0
  29. package/FileList/FileIcon/FolderOpen.vue.d.ts +10 -0
  30. package/FileList/FileIcon/Image.vue.d.ts +10 -0
  31. package/FileList/FileIcon/Markdown.vue.d.ts +10 -0
  32. package/FileList/FileIcon/Mind.vue.d.ts +10 -0
  33. package/FileList/FileIcon/Mp4.vue.d.ts +10 -0
  34. package/FileList/FileIcon/MultidimentionalTable.vue.d.ts +10 -0
  35. package/FileList/FileIcon/Page.vue.d.ts +10 -0
  36. package/FileList/FileIcon/Pdf.vue.d.ts +10 -0
  37. package/FileList/FileIcon/Ppt.vue.d.ts +10 -0
  38. package/FileList/FileIcon/Unknown.vue.d.ts +10 -0
  39. package/FileList/FileIcon/Wrong.vue.d.ts +10 -0
  40. package/FileList/FileList.vue.d.ts +36 -0
  41. package/FileList/fileList-types.d.ts +21 -0
  42. package/FileList/index.d.ts +2 -0
  43. package/FileList/index.js +220 -228
  44. package/Header/Header.vue.d.ts +47 -0
  45. package/Header/header-types.d.ts +14 -0
  46. package/Header/index.d.ts +2 -0
  47. package/Input/Input.vue.d.ts +165 -0
  48. package/Input/components/EditableBlock.vue.d.ts +101 -0
  49. package/Input/components/InputTag.vue.d.ts +30 -0
  50. package/Input/components/LoadingIcon.vue.d.ts +3 -0
  51. package/Input/components/SendIcon.vue.d.ts +3 -0
  52. package/Input/components/button.vue.d.ts +3 -0
  53. package/Input/components/textarea-utils.d.ts +17 -0
  54. package/Input/components/textarea.vue.d.ts +3 -0
  55. package/Input/components/use-textarea-autosize.d.ts +12 -0
  56. package/Input/components/util.d.ts +3 -0
  57. package/Input/index.css +1 -1
  58. package/Input/index.d.ts +2 -0
  59. package/Input/index.js +593 -165
  60. package/Input/input-types.d.ts +118 -0
  61. package/Introduction/Introduction.vue.d.ts +88 -0
  62. package/Introduction/index.css +1 -1
  63. package/Introduction/index.d.ts +2 -0
  64. package/Introduction/index.js +41 -32
  65. package/Introduction/introduction-types.d.ts +37 -0
  66. package/Layout/Aside.vue.d.ts +13 -0
  67. package/Layout/Content.vue.d.ts +13 -0
  68. package/Layout/Header.vue.d.ts +13 -0
  69. package/Layout/Layout.vue.d.ts +13 -0
  70. package/Layout/Sender.vue.d.ts +13 -0
  71. package/Layout/index.d.ts +6 -0
  72. package/List/List.vue.d.ts +98 -0
  73. package/List/const.d.ts +5 -0
  74. package/List/index.d.ts +3 -0
  75. package/List/list-types.d.ts +52 -0
  76. package/List/use-list.d.ts +13 -0
  77. package/Locale/i18n.d.ts +21 -0
  78. package/Locale/index.d.ts +7 -0
  79. package/Locale/index.js +33 -51
  80. package/Locale/lang/en-us.d.ts +34 -0
  81. package/Locale/lang/zh-cn.d.ts +34 -0
  82. package/MarkdownCard/CodeBlock.vue.d.ts +76 -0
  83. package/MarkdownCard/MDCardParser.d.ts +12 -0
  84. package/MarkdownCard/MDCardService.d.ts +14 -0
  85. package/MarkdownCard/MermaidService.d.ts +22 -0
  86. package/MarkdownCard/index.css +1 -1
  87. package/MarkdownCard/index.d.ts +2 -0
  88. package/MarkdownCard/index.js +159 -159
  89. package/MarkdownCard/mdCard.types.d.ts +88 -0
  90. package/MarkdownCard/mdCard.vue.d.ts +29 -0
  91. package/Mention/Mention.vue.d.ts +51 -0
  92. package/Mention/const.d.ts +4 -0
  93. package/Mention/index.d.ts +2 -0
  94. package/Mention/mention-types.d.ts +24 -0
  95. package/Mention/use-mention.d.ts +10 -0
  96. package/Prompt/Prompt.vue.d.ts +38 -0
  97. package/Prompt/PromptItem.vue.d.ts +11 -0
  98. package/Prompt/components/Icon.vue.d.ts +42 -0
  99. package/Prompt/components/icon-types.d.ts +18 -0
  100. package/Prompt/index.d.ts +2 -0
  101. package/Prompt/prompt-types.d.ts +33 -0
  102. package/Toolbar/Toolbar.vue.d.ts +68 -0
  103. package/Toolbar/icon/CopyIcon.vue.d.ts +42 -0
  104. package/Toolbar/icon/DeleteIcon.vue.d.ts +42 -0
  105. package/Toolbar/icon/DislikeIcon.vue.d.ts +46 -0
  106. package/Toolbar/icon/LikeIcon.vue.d.ts +46 -0
  107. package/Toolbar/icon/RefreshIcon.vue.d.ts +42 -0
  108. package/Toolbar/icon/ShareIcon.vue.d.ts +42 -0
  109. package/Toolbar/index.css +1 -0
  110. package/Toolbar/index.d.ts +9 -0
  111. package/Toolbar/index.js +520 -0
  112. package/Toolbar/toolbar.types.d.ts +60 -0
  113. package/index.d.ts +18 -6
  114. package/mate-chat.js +11 -2
  115. package/package.json +1 -1
@@ -0,0 +1,121 @@
1
+ import { AttachmentSlots } from "./attachment-types";
2
+ import type { FileItem } from "./attachment-types";
3
+ type __VLS_Slots = AttachmentSlots;
4
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ uploadOptions: {
6
+ readonly type: import("vue").PropType<import("./attachment-types").UploadOptions>;
7
+ readonly default: () => {};
8
+ };
9
+ disabled: {
10
+ readonly type: BooleanConstructor;
11
+ readonly default: false;
12
+ };
13
+ accept: {
14
+ readonly type: StringConstructor;
15
+ readonly default: "";
16
+ };
17
+ dropPlaceholder: {
18
+ readonly type: StringConstructor;
19
+ };
20
+ maxCount: {
21
+ readonly type: NumberConstructor;
22
+ readonly default: number;
23
+ };
24
+ maxSize: {
25
+ readonly type: NumberConstructor;
26
+ readonly default: number;
27
+ };
28
+ multiple: {
29
+ readonly type: BooleanConstructor;
30
+ readonly default: true;
31
+ };
32
+ draggable: {
33
+ readonly type: BooleanConstructor;
34
+ readonly default: true;
35
+ };
36
+ beforeUpload: {
37
+ readonly type: import("vue").PropType<(file: File) => boolean | Promise<boolean>>;
38
+ readonly default: null;
39
+ };
40
+ getDropContainer: {
41
+ readonly type: import("vue").PropType<() => HTMLElement>;
42
+ };
43
+ modelValue: {
44
+ type: import("vue").PropType<FileItem<unknown, unknown>[]>;
45
+ };
46
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
47
+ progress: (file: File, fileList: FileItem<unknown, unknown>[]) => void;
48
+ error: (file: File, error: unknown, fileList: FileItem<unknown, unknown>[]) => void;
49
+ change: (file: File, fileList: FileItem<unknown, unknown>[]) => void;
50
+ drop: (files: File[]) => void;
51
+ success: (file: File, response: unknown, fileList: FileItem<unknown, unknown>[]) => void;
52
+ validChange: (e: import("./attachment-types").IValidResult[]) => void;
53
+ "update:modelValue": (value: FileItem<unknown, unknown>[]) => void;
54
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
55
+ uploadOptions: {
56
+ readonly type: import("vue").PropType<import("./attachment-types").UploadOptions>;
57
+ readonly default: () => {};
58
+ };
59
+ disabled: {
60
+ readonly type: BooleanConstructor;
61
+ readonly default: false;
62
+ };
63
+ accept: {
64
+ readonly type: StringConstructor;
65
+ readonly default: "";
66
+ };
67
+ dropPlaceholder: {
68
+ readonly type: StringConstructor;
69
+ };
70
+ maxCount: {
71
+ readonly type: NumberConstructor;
72
+ readonly default: number;
73
+ };
74
+ maxSize: {
75
+ readonly type: NumberConstructor;
76
+ readonly default: number;
77
+ };
78
+ multiple: {
79
+ readonly type: BooleanConstructor;
80
+ readonly default: true;
81
+ };
82
+ draggable: {
83
+ readonly type: BooleanConstructor;
84
+ readonly default: true;
85
+ };
86
+ beforeUpload: {
87
+ readonly type: import("vue").PropType<(file: File) => boolean | Promise<boolean>>;
88
+ readonly default: null;
89
+ };
90
+ getDropContainer: {
91
+ readonly type: import("vue").PropType<() => HTMLElement>;
92
+ };
93
+ modelValue: {
94
+ type: import("vue").PropType<FileItem<unknown, unknown>[]>;
95
+ };
96
+ }>> & Readonly<{
97
+ onProgress?: ((file: File, fileList: FileItem<unknown, unknown>[]) => any) | undefined;
98
+ onError?: ((file: File, error: unknown, fileList: FileItem<unknown, unknown>[]) => any) | undefined;
99
+ onChange?: ((file: File, fileList: FileItem<unknown, unknown>[]) => any) | undefined;
100
+ onDrop?: ((files: File[]) => any) | undefined;
101
+ onSuccess?: ((file: File, response: unknown, fileList: FileItem<unknown, unknown>[]) => any) | undefined;
102
+ onValidChange?: ((e: import("./attachment-types").IValidResult[]) => any) | undefined;
103
+ "onUpdate:modelValue"?: ((value: FileItem<unknown, unknown>[]) => any) | undefined;
104
+ }>, {
105
+ draggable: boolean;
106
+ disabled: boolean;
107
+ multiple: boolean;
108
+ accept: string;
109
+ uploadOptions: import("./attachment-types").UploadOptions;
110
+ maxCount: number;
111
+ maxSize: number;
112
+ beforeUpload: (file: File) => boolean | Promise<boolean>;
113
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
114
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
115
+ declare const _default: typeof __VLS_export;
116
+ export default _default;
117
+ type __VLS_WithSlots<T, S> = T & {
118
+ new (): {
119
+ $slots: S;
120
+ };
121
+ };
@@ -0,0 +1,103 @@
1
+ import type { ExtractPropTypes, InjectionKey, PropType, Ref, VNode } from "vue";
2
+ export type FileStatus = "uploading" | "downloading" | "success" | "uploadError" | "downloadError";
3
+ export interface FileItem<T = unknown, E = unknown> {
4
+ uid: number;
5
+ name: string;
6
+ size: number;
7
+ type?: string;
8
+ status?: FileStatus;
9
+ percentage?: number;
10
+ id?: string | number;
11
+ response?: T;
12
+ error?: E;
13
+ thumbUrl?: string;
14
+ url?: string;
15
+ }
16
+ export interface UploadOptions {
17
+ uri: string | URL;
18
+ method?: "POST" | "PUT" | "PATCH";
19
+ headers?: {
20
+ [key: string]: string;
21
+ };
22
+ authToken?: string;
23
+ authTokenHeader?: string;
24
+ additionalParameter?: {
25
+ [key: string]: string | Blob;
26
+ };
27
+ fileFieldName?: string;
28
+ withCredentials?: boolean;
29
+ responseType?: "arraybuffer" | "blob" | "json" | "text";
30
+ }
31
+ export declare const AttachmentProps: {
32
+ readonly uploadOptions: {
33
+ readonly type: PropType<UploadOptions>;
34
+ readonly default: () => {};
35
+ };
36
+ readonly disabled: {
37
+ readonly type: BooleanConstructor;
38
+ readonly default: false;
39
+ };
40
+ readonly accept: {
41
+ readonly type: StringConstructor;
42
+ readonly default: "";
43
+ };
44
+ readonly dropPlaceholder: {
45
+ readonly type: StringConstructor;
46
+ };
47
+ readonly maxCount: {
48
+ readonly type: NumberConstructor;
49
+ readonly default: number;
50
+ };
51
+ readonly maxSize: {
52
+ readonly type: NumberConstructor;
53
+ readonly default: number;
54
+ };
55
+ readonly multiple: {
56
+ readonly type: BooleanConstructor;
57
+ readonly default: true;
58
+ };
59
+ readonly draggable: {
60
+ readonly type: BooleanConstructor;
61
+ readonly default: true;
62
+ };
63
+ readonly beforeUpload: {
64
+ readonly type: PropType<(file: File) => boolean | Promise<boolean>>;
65
+ readonly default: null;
66
+ };
67
+ readonly getDropContainer: {
68
+ readonly type: PropType<() => HTMLElement>;
69
+ };
70
+ };
71
+ export type AttachmentProps = ExtractPropTypes<typeof AttachmentProps>;
72
+ export type ValidResultType = "exceedCount" | "unsupportedFileType" | "exceedSizeLimit" | "beforeUploadRejected";
73
+ export interface IValidResult {
74
+ type: ValidResultType;
75
+ file?: File;
76
+ }
77
+ export declare const AttachmentEmits: {
78
+ change: (file: File, fileList: FileItem[]) => boolean;
79
+ success: (file: File, response: FileItem["response"], fileList: FileItem[]) => boolean;
80
+ error: (file: File, error: FileItem["error"], fileList: FileItem[]) => boolean;
81
+ progress: (file: File, fileList: FileItem[]) => boolean;
82
+ drop: (files: File[]) => boolean;
83
+ validChange: (e: IValidResult[]) => boolean;
84
+ };
85
+ export type AttachmentEmits = {
86
+ (e: "change", file: File, fileList: FileItem[]): void;
87
+ (e: "success", file: File, response: FileItem["response"], fileList: FileItem[]): void;
88
+ (e: "error", file: File, error: FileItem["error"], fileList: FileItem[]): void;
89
+ (e: "progress", file: File, fileList: FileItem[]): void;
90
+ (e: "drop", files: File[]): void;
91
+ (e: "validChange", validResult: IValidResult[]): void;
92
+ };
93
+ export interface AttachmentSlots {
94
+ default(): VNode;
95
+ dropPlaceholder(): VNode;
96
+ }
97
+ export interface IAttachmentCtx {
98
+ rootProps: AttachmentProps;
99
+ rootEmits: AttachmentEmits;
100
+ isDisabled: Ref<boolean>;
101
+ uploadFiles: (files: File[]) => Promise<void>;
102
+ }
103
+ export declare const AttachmentInjectKey: InjectionKey<IAttachmentCtx>;
@@ -0,0 +1,13 @@
1
+ declare var __VLS_6: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_6) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -1 +1 @@
1
- .mc-alert{position:fixed;top:50px;left:50%;transform:translate(-50%);padding:10px;border-radius:var(--devui-border-radius, 2px);transition:all .3s ease-in-out;z-index:10000}.mc-alert--error{background-color:var(--devui-info-bg, #e9edfa)}.mc-alert__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.mc-alert__title{font-weight:700;font-size:var(--devui-font-size, 12px);color:var(--devui-text, #252b3a)}.mc-alert__close-btn{background:none;border:none;cursor:pointer;font-size:16px;color:var(--devui-aide-text, #71757f)}.mc-alert__close-btn:hover{color:var(--devui-text, #252b3a)}.mc-alert__content{font-size:var(--devui-font-size-sm, 12px);color:var(--devui-aide-text, #71757f)}.mc-alert__message{white-space:pre-wrap;word-wrap:break-word;margin:0;font-family:inherit}.mc-alert-fade-enter-from,.mc-alert-fade-leave-to{opacity:0;transform:translate(-50%) translateY(-100%)}.mc-attachment{display:inline-block;cursor:pointer;position:relative}.mc-attachment .mc-attachment-file{display:none}.mc-attachment .mc-attachment-default-trigger{padding:4px 8px;color:var(--devui-text, #252b3a);font-size:var(--devui-font-size-sm, 12px);cursor:pointer;outline:none;transition:all .3s ease;box-sizing:border-box;border:1px solid transparent}.mc-attachment .mc-attachment-default-trigger:disabled{cursor:not-allowed;color:var(--devui-disabled-text, #cfd0d3)}.mc-attachment-drag-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:20px 40px;background-color:var(--devui-base-bg, #ffffff);border:2px dashed var(--devui-brand, #5e7ce0);border-radius:var(--devui-border-radius, 2px);color:var(--devui-text, #252b3a);font-size:var(--devui-font-size, 12px);font-weight:700;z-index:9999;pointer-events:none}.mc-attachment-drag-modal.is-disabled{border-color:var(--devui-danger, #f66f6a);color:var(--devui-danger, #f66f6a)}
1
+ .mc-attachment{display:inline-block;cursor:pointer;position:relative}.mc-attachment .mc-attachment-file{display:none}.mc-attachment-drop-area{position:fixed;padding:20px 40px;display:flex;justify-content:center;align-items:center;border:2px dashed var(--devui-brand, #5e7ce0);border-radius:var(--devui-border-radius, 2px);color:var(--devui-text, #252b3a);font-size:var(--devui-font-size, 12px);font-weight:700;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);z-index:9999}
@@ -0,0 +1,2 @@
1
+ import McAttachment from './Attachment.vue.ts';
2
+ export { McAttachment };