@matechat/core 1.10.0 → 1.11.0-alpha.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/Attachment/Attachment.vue.d.ts +121 -0
- package/Attachment/attachment-types.d.ts +103 -0
- package/Attachment/drop-area.vue.d.ts +13 -0
- package/Attachment/index.css +1 -1
- package/Attachment/index.d.ts +2 -0
- package/Attachment/index.js +211 -311
- package/Attachment/uploader.d.ts +11 -0
- package/Attachment/use-upload.d.ts +8 -0
- package/Bubble/Bubble.vue.d.ts +75 -0
- package/Bubble/BubbleLoading.vue.d.ts +3 -0
- package/Bubble/bubble-constants.d.ts +4 -0
- package/Bubble/bubble-types.d.ts +38 -0
- package/Bubble/components/Avatar.vue.d.ts +57 -0
- package/Bubble/components/AvatarBodyIcon.vue.d.ts +24 -0
- package/Bubble/components/AvatarNoBodyIcon.vue.d.ts +24 -0
- package/Bubble/components/avatar-types.d.ts +25 -0
- package/Bubble/index.css +1 -1
- package/Bubble/index.d.ts +2 -0
- package/Bubble/index.js +142 -148
- package/FileList/FileIcon/CodeFile.vue.d.ts +10 -0
- package/FileList/FileIcon/CompressedFile.vue.d.ts +10 -0
- package/FileList/FileIcon/DefaultFileIcon.vue.d.ts +10 -0
- package/FileList/FileIcon/Document.vue.d.ts +10 -0
- package/FileList/FileIcon/DrawingBoard.vue.d.ts +10 -0
- package/FileList/FileIcon/EmailFile.vue.d.ts +10 -0
- package/FileList/FileIcon/Excel.vue.d.ts +10 -0
- package/FileList/FileIcon/FlowChart.vue.d.ts +10 -0
- package/FileList/FileIcon/FolderClosed.vue.d.ts +10 -0
- package/FileList/FileIcon/FolderOpen.vue.d.ts +10 -0
- package/FileList/FileIcon/Image.vue.d.ts +10 -0
- package/FileList/FileIcon/Markdown.vue.d.ts +10 -0
- package/FileList/FileIcon/Mind.vue.d.ts +10 -0
- package/FileList/FileIcon/Mp4.vue.d.ts +10 -0
- package/FileList/FileIcon/MultidimentionalTable.vue.d.ts +10 -0
- package/FileList/FileIcon/Page.vue.d.ts +10 -0
- package/FileList/FileIcon/Pdf.vue.d.ts +10 -0
- package/FileList/FileIcon/Ppt.vue.d.ts +10 -0
- package/FileList/FileIcon/Unknown.vue.d.ts +10 -0
- package/FileList/FileIcon/Wrong.vue.d.ts +10 -0
- package/FileList/FileList.vue.d.ts +36 -0
- package/FileList/fileList-types.d.ts +21 -0
- package/FileList/index.d.ts +2 -0
- package/FileList/index.js +220 -228
- package/Header/Header.vue.d.ts +47 -0
- package/Header/header-types.d.ts +14 -0
- package/Header/index.d.ts +2 -0
- package/Header/index.js +0 -1
- package/Input/Input.vue.d.ts +165 -0
- package/Input/components/EditableBlock.vue.d.ts +101 -0
- package/Input/components/InputTag.vue.d.ts +30 -0
- package/Input/components/LoadingIcon.vue.d.ts +3 -0
- package/Input/components/SendIcon.vue.d.ts +3 -0
- package/Input/components/button.vue.d.ts +3 -0
- package/Input/components/textarea-utils.d.ts +17 -0
- package/Input/components/textarea.vue.d.ts +3 -0
- package/Input/components/use-textarea-autosize.d.ts +12 -0
- package/Input/components/util.d.ts +3 -0
- package/Input/index.css +1 -1
- package/Input/index.d.ts +2 -0
- package/Input/index.js +114 -252
- package/Input/input-types.d.ts +118 -0
- package/Introduction/Introduction.vue.d.ts +88 -0
- package/Introduction/index.css +1 -1
- package/Introduction/index.d.ts +2 -0
- package/Introduction/index.js +8 -9
- package/Introduction/introduction-types.d.ts +37 -0
- package/Layout/Aside.vue.d.ts +13 -0
- package/Layout/Content.vue.d.ts +13 -0
- package/Layout/Header.vue.d.ts +13 -0
- package/Layout/Layout.vue.d.ts +13 -0
- package/Layout/Sender.vue.d.ts +13 -0
- package/Layout/index.d.ts +6 -0
- package/Layout/index.js +0 -1
- package/List/List.vue.d.ts +98 -0
- package/List/const.d.ts +5 -0
- package/List/index.css +1 -1
- package/List/index.d.ts +3 -0
- package/List/index.js +51 -54
- package/List/list-types.d.ts +52 -0
- package/List/use-list.d.ts +13 -0
- package/Locale/i18n.d.ts +21 -0
- package/Locale/index.d.ts +7 -0
- package/Locale/index.js +35 -103
- package/Locale/lang/en-us.d.ts +34 -0
- package/Locale/lang/zh-cn.d.ts +34 -0
- package/MarkdownCard/CodeBlock.vue.d.ts +76 -0
- package/MarkdownCard/MDCardParser.d.ts +12 -0
- package/MarkdownCard/MDCardService.d.ts +14 -0
- package/MarkdownCard/MermaidService.d.ts +22 -0
- package/MarkdownCard/index.css +1 -1
- package/MarkdownCard/index.d.ts +2 -0
- package/MarkdownCard/index.js +205 -559
- package/MarkdownCard/mdCard.types.d.ts +88 -0
- package/MarkdownCard/mdCard.vue.d.ts +29 -0
- package/Mention/Mention.vue.d.ts +51 -0
- package/Mention/const.d.ts +4 -0
- package/Mention/index.d.ts +2 -0
- package/Mention/index.js +0 -1
- package/Mention/mention-types.d.ts +24 -0
- package/Mention/use-mention.d.ts +10 -0
- package/Prompt/Prompt.vue.d.ts +38 -0
- package/Prompt/PromptItem.vue.d.ts +11 -0
- package/Prompt/components/Icon.vue.d.ts +42 -0
- package/Prompt/components/icon-types.d.ts +18 -0
- package/Prompt/index.d.ts +2 -0
- package/Prompt/prompt-types.d.ts +33 -0
- package/README.md +12 -8
- package/Toolbar/Toolbar.vue.d.ts +68 -0
- package/Toolbar/icon/CopyIcon.vue.d.ts +42 -0
- package/Toolbar/icon/DeleteIcon.vue.d.ts +42 -0
- package/Toolbar/icon/DislikeIcon.vue.d.ts +46 -0
- package/Toolbar/icon/LikeIcon.vue.d.ts +46 -0
- package/Toolbar/icon/RefreshIcon.vue.d.ts +42 -0
- package/Toolbar/icon/ShareIcon.vue.d.ts +42 -0
- package/Toolbar/index.css +1 -0
- package/Toolbar/index.d.ts +8 -0
- package/Toolbar/index.js +519 -0
- package/Toolbar/toolbar.types.d.ts +60 -0
- package/mate-chat.js +0 -6
- package/package.json +4 -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
|
+
};
|
package/Attachment/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.mc-
|
|
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}
|