@htmlbricks/hb-messages-box 0.71.36 → 0.71.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-messages-box",
3
- "version": "0.71.36",
3
+ "version": "0.71.37",
4
4
  "contributors": [],
5
5
  "description": "Chat shell combining `hb-messages-list` (thread from `messages`, `authors`, `options`) and `hb-messages-send` (composer). Optional `message` JSON can seed the draft text. Forwards the child `sendMessage` event (text, files, tags) to the host as `sendMessage` for your transport layer.",
6
6
  "licenses": [
@@ -25,6 +25,20 @@
25
25
  },
26
26
  "options": {
27
27
  "additionalProperties": false,
28
+ "properties": {
29
+ "bubbles": {
30
+ "type": "boolean"
31
+ },
32
+ "showAvatar": {
33
+ "type": "boolean"
34
+ },
35
+ "showName": {
36
+ "type": "boolean"
37
+ },
38
+ "showTimestamp": {
39
+ "type": "boolean"
40
+ }
41
+ },
28
42
  "type": "object"
29
43
  },
30
44
  "style": {
@@ -128,34 +142,6 @@
128
142
  "TMessageSend": {
129
143
  "additionalProperties": false,
130
144
  "properties": {
131
- "file": {
132
- "additionalProperties": false,
133
- "properties": {
134
- "lastModified": {
135
- "type": "number"
136
- },
137
- "name": {
138
- "type": "string"
139
- },
140
- "size": {
141
- "type": "number"
142
- },
143
- "type": {
144
- "type": "string"
145
- },
146
- "webkitRelativePath": {
147
- "type": "string"
148
- }
149
- },
150
- "required": [
151
- "lastModified",
152
- "name",
153
- "size",
154
- "type",
155
- "webkitRelativePath"
156
- ],
157
- "type": "object"
158
- },
159
145
  "text": {
160
146
  "type": "string"
161
147
  }
@@ -23,7 +23,6 @@ export type TAuthor = {
23
23
 
24
24
  export type TMessageSend = {
25
25
  text?: string;
26
- file?: File;
27
26
  };
28
27
 
29
28
  export type Component = {
@@ -31,10 +30,28 @@ export type Component = {
31
30
  style?: string;
32
31
  messages: TMessage[];
33
32
  authors: TAuthor[];
34
- options?: {};
33
+ options?: {
34
+ showTimestamp?: boolean;
35
+ showAvatar?: boolean;
36
+ showName?: boolean;
37
+ bubbles?: boolean;
38
+ };
35
39
  message?: TMessageSend;
36
40
  };
37
41
 
38
42
  export type Events = {
39
- sendMessage: { text?: string; id: string; file?: File };
43
+ sendMessage: {
44
+ text?: string;
45
+ id: string;
46
+ tags: string[];
47
+ files: {
48
+ id: string;
49
+ name: string;
50
+ mimetype: string;
51
+ fileSize: number;
52
+ /** Runtime value is a browser `File`; typed as `unknown` for JSON schema generation. */
53
+ content: unknown;
54
+ objectUrl?: string;
55
+ }[];
56
+ };
40
57
  };
@@ -8,43 +8,57 @@
8
8
  "sendMessage": {
9
9
  "additionalProperties": false,
10
10
  "properties": {
11
- "file": {
12
- "additionalProperties": false,
13
- "properties": {
14
- "lastModified": {
15
- "type": "number"
11
+ "files": {
12
+ "items": {
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "content": {
16
+ "description": "Runtime value is a browser `File`; typed as `unknown` for JSON schema generation."
17
+ },
18
+ "fileSize": {
19
+ "type": "number"
20
+ },
21
+ "id": {
22
+ "type": "string"
23
+ },
24
+ "mimetype": {
25
+ "type": "string"
26
+ },
27
+ "name": {
28
+ "type": "string"
29
+ },
30
+ "objectUrl": {
31
+ "type": "string"
32
+ }
16
33
  },
17
- "name": {
18
- "type": "string"
19
- },
20
- "size": {
21
- "type": "number"
22
- },
23
- "type": {
24
- "type": "string"
25
- },
26
- "webkitRelativePath": {
27
- "type": "string"
28
- }
34
+ "required": [
35
+ "id",
36
+ "name",
37
+ "mimetype",
38
+ "fileSize",
39
+ "content"
40
+ ],
41
+ "type": "object"
29
42
  },
30
- "required": [
31
- "lastModified",
32
- "name",
33
- "size",
34
- "type",
35
- "webkitRelativePath"
36
- ],
37
- "type": "object"
43
+ "type": "array"
38
44
  },
39
45
  "id": {
40
46
  "type": "string"
41
47
  },
48
+ "tags": {
49
+ "items": {
50
+ "type": "string"
51
+ },
52
+ "type": "array"
53
+ },
42
54
  "text": {
43
55
  "type": "string"
44
56
  }
45
57
  },
46
58
  "required": [
47
- "id"
59
+ "id",
60
+ "tags",
61
+ "files"
48
62
  ],
49
63
  "type": "object"
50
64
  }