@htmlbricks/hb-messages-list 0.60.22 → 0.60.24
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/main.iife.js +102 -9
- package/main.iife.js.map +1 -1
- package/manifest.json +722 -18
- package/package.json +1 -1
- package/types/webcomponent.type.d.json +25 -1
- package/types/webcomponent.type.d.ts +15 -3
- package/types/webcomponent_events.type.d.json +56 -0
package/package.json
CHANGED
|
@@ -22,6 +22,23 @@
|
|
|
22
22
|
},
|
|
23
23
|
"options": {
|
|
24
24
|
"additionalProperties": false,
|
|
25
|
+
"properties": {
|
|
26
|
+
"bubbles": {
|
|
27
|
+
"type": "boolean"
|
|
28
|
+
},
|
|
29
|
+
"showActions": {
|
|
30
|
+
"type": "boolean"
|
|
31
|
+
},
|
|
32
|
+
"showAvatar": {
|
|
33
|
+
"type": "boolean"
|
|
34
|
+
},
|
|
35
|
+
"showName": {
|
|
36
|
+
"type": "boolean"
|
|
37
|
+
},
|
|
38
|
+
"showTimestamp": {
|
|
39
|
+
"type": "boolean"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
25
42
|
"type": "object"
|
|
26
43
|
},
|
|
27
44
|
"style": {
|
|
@@ -43,6 +60,9 @@
|
|
|
43
60
|
"id": {
|
|
44
61
|
"type": "string"
|
|
45
62
|
},
|
|
63
|
+
"isAI": {
|
|
64
|
+
"type": "boolean"
|
|
65
|
+
},
|
|
46
66
|
"me": {
|
|
47
67
|
"type": "boolean"
|
|
48
68
|
},
|
|
@@ -74,6 +94,9 @@
|
|
|
74
94
|
"id": {
|
|
75
95
|
"type": "string"
|
|
76
96
|
},
|
|
97
|
+
"language": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
77
100
|
"quotedMessageId": {
|
|
78
101
|
"type": "string"
|
|
79
102
|
},
|
|
@@ -105,7 +128,8 @@
|
|
|
105
128
|
"image",
|
|
106
129
|
"video",
|
|
107
130
|
"audio",
|
|
108
|
-
"file"
|
|
131
|
+
"file",
|
|
132
|
+
"code"
|
|
109
133
|
],
|
|
110
134
|
"type": "string"
|
|
111
135
|
},
|
|
@@ -3,13 +3,14 @@ export type TMessage = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
text: string;
|
|
5
5
|
timestamp: Date;
|
|
6
|
-
type: "text" | "image" | "video" | "audio" | "file";
|
|
6
|
+
type: "text" | "image" | "video" | "audio" | "file" | "code";
|
|
7
7
|
status?: "pending" | "sent" | "received" | "read";
|
|
8
8
|
system?: boolean;
|
|
9
9
|
reply?: boolean;
|
|
10
10
|
quotedMessageId?: string;
|
|
11
11
|
authorId?: string;
|
|
12
12
|
uri?: string;
|
|
13
|
+
language?: string; // For code messages
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
// type that is used to define a chat partecipant
|
|
@@ -19,6 +20,7 @@ export type TAuthor = {
|
|
|
19
20
|
avatar?: string;
|
|
20
21
|
status?: "online" | "offline" | "away" | "busy";
|
|
21
22
|
me?: boolean;
|
|
23
|
+
isAI?: boolean; // Special flag for AI author
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
export type Component = {
|
|
@@ -26,7 +28,17 @@ export type Component = {
|
|
|
26
28
|
style?: string;
|
|
27
29
|
messages: TMessage[];
|
|
28
30
|
authors: TAuthor[];
|
|
29
|
-
options?: {
|
|
31
|
+
options?: {
|
|
32
|
+
showTimestamp?: boolean;
|
|
33
|
+
showActions?: boolean;
|
|
34
|
+
showAvatar?: boolean;
|
|
35
|
+
showName?: boolean;
|
|
36
|
+
bubbles?: boolean;
|
|
37
|
+
};
|
|
30
38
|
};
|
|
31
39
|
|
|
32
|
-
export type Events = {
|
|
40
|
+
export type Events = {
|
|
41
|
+
onCopyMessage?: (messageId: string) => void;
|
|
42
|
+
onDeleteMessage?: (messageId: string) => void;
|
|
43
|
+
onEditMessage?: (messageId: string) => void;
|
|
44
|
+
};
|
|
@@ -4,6 +4,62 @@
|
|
|
4
4
|
"definitions": {
|
|
5
5
|
"Events": {
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"onCopyMessage": {
|
|
9
|
+
"$comment": "(messageId: string) => void",
|
|
10
|
+
"properties": {
|
|
11
|
+
"namedArgs": {
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"properties": {
|
|
14
|
+
"messageId": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"messageId"
|
|
20
|
+
],
|
|
21
|
+
"type": "object"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"type": "object"
|
|
25
|
+
},
|
|
26
|
+
"onDeleteMessage": {
|
|
27
|
+
"$comment": "(messageId: string) => void",
|
|
28
|
+
"properties": {
|
|
29
|
+
"namedArgs": {
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"properties": {
|
|
32
|
+
"messageId": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": [
|
|
37
|
+
"messageId"
|
|
38
|
+
],
|
|
39
|
+
"type": "object"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"type": "object"
|
|
43
|
+
},
|
|
44
|
+
"onEditMessage": {
|
|
45
|
+
"$comment": "(messageId: string) => void",
|
|
46
|
+
"properties": {
|
|
47
|
+
"namedArgs": {
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"properties": {
|
|
50
|
+
"messageId": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"messageId"
|
|
56
|
+
],
|
|
57
|
+
"type": "object"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"type": "object"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
7
63
|
"type": "object"
|
|
8
64
|
}
|
|
9
65
|
}
|