@webitel/ui-chats 0.1.13 → 0.1.14

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": "@webitel/ui-chats",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Reusable Webitel Frontend Code for Chats UI",
5
5
  "workspaces": [
6
6
  "../../",
@@ -0,0 +1,4 @@
1
+ #app {
2
+ --chat-file-max-height: 280px;
3
+ --chat-file-max-width: 280px;
4
+ }
package/src/index.ts CHANGED
@@ -1 +1,2 @@
1
+ import './css/main.css';
1
2
  export { setConfig } from './config/config';
@@ -17,32 +17,31 @@
17
17
  setup
18
18
  lang="ts"
19
19
  >
20
- import { defineEmits, defineProps } from "vue";
20
+ import { defineEmits, defineProps } from 'vue';
21
21
 
22
- import type { ChatMessageFile } from "../../../../types/ChatMessage.types";
22
+ import type { ChatMessageFile } from '../../../../types/ChatMessage.types';
23
23
 
24
24
  const props = defineProps<{
25
- file: ChatMessageFile;
25
+ file: ChatMessageFile;
26
26
  }>();
27
27
  const emit = defineEmits<{
28
- open: [
29
- ChatMessageFile,
30
- ];
28
+ open: [
29
+ ChatMessageFile,
30
+ ];
31
31
  }>();
32
32
  </script>
33
33
 
34
34
 
35
35
  <style
36
- lang="scss"
37
36
  scoped
38
37
  >
39
38
  .chat-message-image {
40
39
  cursor: pointer;
40
+ }
41
41
 
42
- &__img {
43
- max-height: var(--chat-file-max-height);
44
- max-width: var(--chat-file-max-width);
45
- width: 100%;
46
- }
42
+ .chat-message-image__img {
43
+ max-height: var(--chat-file-max-height);
44
+ max-width: var(--chat-file-max-width);
45
+ width: 100%;
47
46
  }
48
47
  </style>
@@ -60,19 +60,8 @@ function handlePlayerInitialize(player) {
60
60
  </script>
61
61
 
62
62
  <style lang="scss" scoped>
63
- $chat-file-max-width: 280px;
64
- $chat-file-max-height: 280px;
65
- .chat-message-player {
66
- .wt-player :deep(.plyr) {
67
- .wt-player__close-icon,
68
- .plyr__volume {
69
- display: none;
70
- }
71
-
72
- &.plyr--video {
73
- max-height: $chat-file-max-height;
74
- max-width: $chat-file-max-width;
75
- }
76
- }
63
+ .chat-message-player :deep(.wt-vidstack-player) {
64
+ max-height: var(--chat-file-max-height);
65
+ max-width: var(--chat-file-max-width);
77
66
  }
78
67
  </style>
@@ -25,8 +25,8 @@ export function useChatMessageFile(
25
25
  });
26
26
  const media = computed(() => {
27
27
  return (
28
- fileRef.value &&
29
- (isMediaType(fileType.value) || isMediaType(fileSrc.value))
28
+ (isMediaType(fileType.value) || isMediaType(fileSrc.value)) &&
29
+ fileRef.value
30
30
  );
31
31
  });
32
32
 
package/types/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ import './css/main.css';
1
2
  export { setConfig } from './config/config';
@@ -1,4 +1,4 @@
1
- import type { ChatMessageFile } from "../../../../types/ChatMessage.types";
1
+ import type { ChatMessageFile } from '../../../../types/ChatMessage.types';
2
2
  type __VLS_Props = {
3
3
  file: ChatMessageFile;
4
4
  };
@@ -2,7 +2,14 @@ import { type Ref } from 'vue';
2
2
  import type { ChatMessageFile } from '../../../types/ChatMessage.types';
3
3
  export declare function useChatMessageFile(file: ChatMessageFile | Ref<ChatMessageFile>): {
4
4
  image: import("vue").ComputedRef<ChatMessageFile>;
5
- media: import("vue").ComputedRef<boolean>;
5
+ media: import("vue").ComputedRef<ChatMessageFile | {
6
+ id?: string;
7
+ name?: string;
8
+ size?: string;
9
+ mime?: string;
10
+ url?: string;
11
+ streamUrl?: string;
12
+ }>;
6
13
  document: import("vue").ComputedRef<ChatMessageFile | {
7
14
  id?: string;
8
15
  name?: string;