@mobilon-dev/chotto 0.3.22 → 0.3.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.
Files changed (38) hide show
  1. package/dist/{CreateChat-BS86RCwj.js → CreateChat-DqPybXXn.js} +1 -1
  2. package/dist/{CreateChat2-UAK1W75x.js → CreateChat2-Bxs28ww_.js} +1 -1
  3. package/dist/{CreateDialog-CoSOBGf3.js → CreateDialog-IJDv_iIh.js} +1 -1
  4. package/dist/{ModalVideoRecorder-Cs7ZiWJ1.js → ModalVideoRecorder-OOD5jytP.js} +1 -1
  5. package/dist/{SelectUser2-CYADx7Gc.js → SelectUser2-D9B0H77q.js} +1 -1
  6. package/dist/chotto.css +1 -1
  7. package/dist/{index-0LXvcjYD.js → index-as74SdsT.js} +3565 -3067
  8. package/dist/themes/dark.css +1 -1
  9. package/dist/themes/default.css +1 -1
  10. package/dist/themes/green.css +1 -1
  11. package/dist/themes/mobilon1.css +1 -1
  12. package/dist/types/apps/data/messages.d.ts +205 -0
  13. package/dist/types/apps/stories/BasicChatExample.stories.d.ts +5 -0
  14. package/dist/types/components/2_feed_elements/AudioMessage/AudioMessage.vue.d.ts +9 -0
  15. package/dist/types/components/2_feed_elements/FileMessage/FileMessage.vue.d.ts +9 -0
  16. package/dist/types/components/2_feed_elements/ImageMessage/ImageMessage.vue.d.ts +9 -0
  17. package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +70 -0
  18. package/dist/types/components/2_feed_elements/MessageReactions/composables/index.d.ts +4 -0
  19. package/dist/types/components/2_feed_elements/MessageReactions/composables/usePositioning.d.ts +16 -0
  20. package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactions.d.ts +19 -0
  21. package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactionsPanel.d.ts +23 -0
  22. package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactionsState.d.ts +99 -0
  23. package/dist/types/components/2_feed_elements/MessageReactions/stories/MessageReactions.stories.d.ts +31 -0
  24. package/dist/types/components/2_feed_elements/MessageReactions/styles/types.d.ts +221 -0
  25. package/dist/types/components/2_feed_elements/MessageReactions/utils/quickReactions.d.ts +6 -0
  26. package/dist/types/components/2_feed_elements/StickerMessage/StickerMessage.vue.d.ts +9 -0
  27. package/dist/types/components/2_feed_elements/TextMessage/TextMessage.vue.d.ts +9 -0
  28. package/dist/types/components/2_feed_elements/TextMessage/stories/TextMessage.stories.d.ts +5 -39
  29. package/dist/types/components/2_feed_elements/VideoMessage/VideoMessage.vue.d.ts +9 -0
  30. package/dist/types/components/2_feed_elements/types/messages.d.ts +52 -0
  31. package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +9 -0
  32. package/dist/types/components/3_compounds/Feed/stories/Feed.stories.d.ts +0 -1
  33. package/dist/types/components/index.d.ts +1 -0
  34. package/dist/types/functions/createReactionHandlers.d.ts +23 -0
  35. package/dist/types/functions/index.d.ts +1 -0
  36. package/dist/vuessages.es.js +75 -73
  37. package/dist/vuessages.umd.js +21 -21
  38. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import type { MessageReactions } from '@/types';
2
+ /**
3
+ * Добавляет или увеличивает реакцию в локальном состоянии
4
+ */
5
+ export declare function updateLocalReactionsAdd(localReactions: {
6
+ value: MessageReactions | undefined;
7
+ }, key: string): void;
8
+ /**
9
+ * Удаляет или уменьшает реакцию в локальном состоянии
10
+ */
11
+ export declare function updateLocalReactionsRemove(localReactions: {
12
+ value: MessageReactions | undefined;
13
+ }, key: string): void;
14
+ /**
15
+ * Переключает реакцию (добавляет, если нет, или удаляет, если есть)
16
+ */
17
+ export declare function updateLocalReactionsToggle(localReactions: {
18
+ value: MessageReactions | undefined;
19
+ }, key: string): void;
@@ -0,0 +1,23 @@
1
+ import { type Ref } from 'vue';
2
+ /**
3
+ * Композабл для управления панелями реакций (быстрые реакции и полный picker)
4
+ */
5
+ export declare function useReactionsPanel(quickEmojis: Ref<readonly string[]>, addButtonRef: Ref<HTMLButtonElement | null>): {
6
+ isQuickReactionsOpen: Ref<boolean, boolean>;
7
+ isFullPickerOpen: Ref<boolean, boolean>;
8
+ pickerRef: Ref<HTMLElement | null, HTMLElement | null>;
9
+ quickReactionsRef: Ref<HTMLElement | null, HTMLElement | null>;
10
+ quickPanelStyle: Ref<Record<string, string>, Record<string, string>>;
11
+ pickerStyle: Ref<Record<string, string>, Record<string, string>>;
12
+ openQuickPanel: () => void;
13
+ closeQuickPanel: () => void;
14
+ openFullPicker: () => Promise<void>;
15
+ closeFullPicker: () => void;
16
+ handleQuickPanelMouseEnter: () => void;
17
+ handleQuickPanelMouseLeave: () => void;
18
+ handlePickerMouseEnter: () => void;
19
+ handlePickerMouseLeave: () => void;
20
+ handleButtonMouseEnter: () => void;
21
+ handleButtonMouseLeave: () => void;
22
+ handleClickOutside: (event: MouseEvent) => void;
23
+ };
@@ -0,0 +1,99 @@
1
+ import { type Ref } from 'vue';
2
+ import type { MessageReactions } from '@/types';
3
+ /**
4
+ * Композабл для управления локальным состоянием реакций
5
+ */
6
+ export declare function useReactionsState(initialReactions: Ref<MessageReactions | undefined>): {
7
+ localReactions: Ref<{
8
+ items: {
9
+ key: import("@/types").ReactionKey;
10
+ count: number;
11
+ reactedByMe?: boolean | undefined;
12
+ }[];
13
+ meta?: {
14
+ mode?: "single" | "multi" | undefined;
15
+ } | undefined;
16
+ recent?: {
17
+ userId: string | number;
18
+ key: import("@/types").ReactionKey;
19
+ date?: number | undefined;
20
+ }[] | undefined;
21
+ vendor?: {
22
+ telegram?: {
23
+ total_count?: number | undefined;
24
+ recent_reactions?: {
25
+ type: {
26
+ type: string;
27
+ emoji?: string | undefined;
28
+ };
29
+ actor?: {
30
+ id?: number | undefined;
31
+ is_bot?: boolean | undefined;
32
+ first_name?: string | undefined;
33
+ } | undefined;
34
+ date?: number | undefined;
35
+ }[] | undefined;
36
+ counts?: {
37
+ type: {
38
+ type: string;
39
+ emoji: string;
40
+ };
41
+ count: number;
42
+ }[] | undefined;
43
+ } | undefined;
44
+ whatsapp?: {
45
+ lastEventAt?: number | undefined;
46
+ } | undefined;
47
+ } | undefined;
48
+ } | undefined, MessageReactions | {
49
+ items: {
50
+ key: import("@/types").ReactionKey;
51
+ count: number;
52
+ reactedByMe?: boolean | undefined;
53
+ }[];
54
+ meta?: {
55
+ mode?: "single" | "multi" | undefined;
56
+ } | undefined;
57
+ recent?: {
58
+ userId: string | number;
59
+ key: import("@/types").ReactionKey;
60
+ date?: number | undefined;
61
+ }[] | undefined;
62
+ vendor?: {
63
+ telegram?: {
64
+ total_count?: number | undefined;
65
+ recent_reactions?: {
66
+ type: {
67
+ type: string;
68
+ emoji?: string | undefined;
69
+ };
70
+ actor?: {
71
+ id?: number | undefined;
72
+ is_bot?: boolean | undefined;
73
+ first_name?: string | undefined;
74
+ } | undefined;
75
+ date?: number | undefined;
76
+ }[] | undefined;
77
+ counts?: {
78
+ type: {
79
+ type: string;
80
+ emoji: string;
81
+ };
82
+ count: number;
83
+ }[] | undefined;
84
+ } | undefined;
85
+ whatsapp?: {
86
+ lastEventAt?: number | undefined;
87
+ } | undefined;
88
+ } | undefined;
89
+ } | undefined>;
90
+ displayedReactions: import("vue").ComputedRef<{
91
+ key: import("@/types").ReactionKey;
92
+ count: number;
93
+ reactedByMe?: boolean | undefined;
94
+ }[]>;
95
+ hasReactions: import("vue").ComputedRef<boolean>;
96
+ addReaction: (key: string) => void;
97
+ removeReaction: (key: string) => void;
98
+ toggleReaction: (key: string) => void;
99
+ };
@@ -0,0 +1,31 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import TextMessage from '../../TextMessage/TextMessage.vue';
3
+ import ImageMessage from '../../ImageMessage/ImageMessage.vue';
4
+ import AudioMessage from '../../AudioMessage/AudioMessage.vue';
5
+ import VideoMessage from '../../VideoMessage/VideoMessage.vue';
6
+ import FileMessage from '../../FileMessage/FileMessage.vue';
7
+ import StickerMessage from '../../StickerMessage/StickerMessage.vue';
8
+ declare const meta: Meta<typeof TextMessage>;
9
+ export default meta;
10
+ type Story = StoryObj<typeof TextMessage>;
11
+ export declare const Default: Story;
12
+ export declare const LeftMessageReactions: Story;
13
+ export declare const LeftMessageSingleReaction: Story;
14
+ export declare const LeftMessageMultipleReactions: Story;
15
+ export declare const LeftMessageNoReactions: Story;
16
+ export declare const RightMessageReactions: Story;
17
+ export declare const RightMessageSingleReaction: Story;
18
+ export declare const RightMessageMultipleReactions: Story;
19
+ export declare const RightMessageNoReactions: Story;
20
+ export declare const AllReactionsActive: Story;
21
+ export declare const LargeCountReactions: Story;
22
+ export declare const ImageMessageWithReactions: StoryObj<typeof ImageMessage>;
23
+ export declare const ImageMessageRightWithReactions: StoryObj<typeof ImageMessage>;
24
+ export declare const AudioMessageWithReactions: StoryObj<typeof AudioMessage>;
25
+ export declare const AudioMessageRightWithReactions: StoryObj<typeof AudioMessage>;
26
+ export declare const VideoMessageWithReactions: StoryObj<typeof VideoMessage>;
27
+ export declare const VideoMessageRightWithReactions: StoryObj<typeof VideoMessage>;
28
+ export declare const FileMessageWithReactions: StoryObj<typeof FileMessage>;
29
+ export declare const FileMessageRightWithReactions: StoryObj<typeof FileMessage>;
30
+ export declare const StickerMessageWithReactions: StoryObj<typeof StickerMessage>;
31
+ export declare const StickerMessageRightWithReactions: StoryObj<typeof StickerMessage>;
@@ -0,0 +1,221 @@
1
+ /**
2
+ * CSS variables for MessageReactions component
3
+ */
4
+ export interface MessageReactionsThemeCSSVariables {
5
+ /** Отображение контейнера реакций */
6
+ '--chotto-messagereactions-display': string;
7
+ /** Выравнивание элементов контейнера реакций */
8
+ '--chotto-messagereactions-align-items': string;
9
+ /** Промежуток между элементами реакций */
10
+ '--chotto-messagereactions-gap': string;
11
+ /** Позиционирование контейнера реакций */
12
+ '--chotto-messagereactions-position': string;
13
+ /** Минимальная высота контейнера реакций */
14
+ '--chotto-messagereactions-min-height': string;
15
+ /** Z-index контейнера реакций */
16
+ '--chotto-messagereactions-z-index': string;
17
+ /** Позиционирование контейнера реакций без реакций */
18
+ '--chotto-messagereactions-no-reactions-position': string;
19
+ /** Отступ снизу контейнера реакций без реакций */
20
+ '--chotto-messagereactions-no-reactions-bottom': string;
21
+ /** Высота контейнера реакций без реакций */
22
+ '--chotto-messagereactions-no-reactions-height': string;
23
+ /** Ширина контейнера реакций без реакций */
24
+ '--chotto-messagereactions-no-reactions-width': string;
25
+ /** Переполнение контейнера реакций без реакций */
26
+ '--chotto-messagereactions-no-reactions-overflow': string;
27
+ /** Минимальная высота контейнера реакций без реакций */
28
+ '--chotto-messagereactions-no-reactions-min-height': string;
29
+ /** Внешние отступы контейнера реакций без реакций */
30
+ '--chotto-messagereactions-no-reactions-margin': string;
31
+ /** Внутренние отступы контейнера реакций без реакций */
32
+ '--chotto-messagereactions-no-reactions-padding': string;
33
+ /** Z-index контейнера реакций без реакций */
34
+ '--chotto-messagereactions-no-reactions-z-index': string;
35
+ /** Отступ справа для левых сообщений без реакций */
36
+ '--chotto-messagereactions-left-no-reactions-right': string;
37
+ /** Отступ слева для левых сообщений без реакций */
38
+ '--chotto-messagereactions-left-no-reactions-left': string;
39
+ /** Отступ слева для правых сообщений без реакций */
40
+ '--chotto-messagereactions-right-no-reactions-left': string;
41
+ /** Отступ справа для правых сообщений без реакций */
42
+ '--chotto-messagereactions-right-no-reactions-right': string;
43
+ /** Отображение чипа реакции */
44
+ '--chotto-messagereactions-chip-display': string;
45
+ /** Выравнивание элементов чипа реакции */
46
+ '--chotto-messagereactions-chip-align-items': string;
47
+ /** Промежуток между элементами чипа реакции */
48
+ '--chotto-messagereactions-chip-gap': string;
49
+ /** Граница чипа реакции */
50
+ '--chotto-messagereactions-chip-border': string;
51
+ /** Фон чипа реакции */
52
+ '--chotto-messagereactions-chip-bg': string;
53
+ /** Цвет текста чипа реакции */
54
+ '--chotto-messagereactions-chip-fg': string;
55
+ /** Скругление чипа реакции */
56
+ '--chotto-messagereactions-chip-border-radius': string;
57
+ /** Внутренние отступы чипа реакции */
58
+ '--chotto-messagereactions-chip-padding': string;
59
+ /** Размер шрифта чипа реакции */
60
+ '--chotto-messagereactions-chip-font-size': string;
61
+ /** Курсор чипа реакции */
62
+ '--chotto-messagereactions-chip-cursor': string;
63
+ /** Граница активного чипа реакции */
64
+ '--chotto-messagereactions-chip-active-border': string;
65
+ /** Фон активного чипа реакции */
66
+ '--chotto-messagereactions-chip-active-bg': string;
67
+ /** Толщина шрифта активного чипа реакции */
68
+ '--chotto-messagereactions-chip-active-font-weight': string;
69
+ /** Высота строки эмодзи реакции */
70
+ '--chotto-messagereactions-emoji-line-height': string;
71
+ /** Высота строки счётчика реакции */
72
+ '--chotto-messagereactions-count-line-height': string;
73
+ /** Отображение кнопки добавления реакции */
74
+ '--chotto-messagereactions-add-display': string;
75
+ /** Выравнивание элементов кнопки добавления реакции */
76
+ '--chotto-messagereactions-add-align-items': string;
77
+ /** Выравнивание содержимого кнопки добавления реакции */
78
+ '--chotto-messagereactions-add-justify-content': string;
79
+ /** Ширина кнопки добавления реакции */
80
+ '--chotto-messagereactions-add-width': string;
81
+ /** Высота кнопки добавления реакции */
82
+ '--chotto-messagereactions-add-height': string;
83
+ /** Скругление кнопки добавления реакции */
84
+ '--chotto-messagereactions-add-border-radius': string;
85
+ /** Граница кнопки добавления реакции */
86
+ '--chotto-messagereactions-add-border': string;
87
+ /** Фон кнопки добавления реакции */
88
+ '--chotto-messagereactions-add-bg': string;
89
+ /** Цвет кнопки добавления реакции */
90
+ '--chotto-messagereactions-add-color': string;
91
+ /** Курсор кнопки добавления реакции */
92
+ '--chotto-messagereactions-add-cursor': string;
93
+ /** Размер шрифта кнопки добавления реакции */
94
+ '--chotto-messagereactions-add-font-size': string;
95
+ /** Прозрачность кнопки добавления реакции */
96
+ '--chotto-messagereactions-add-opacity': string;
97
+ /** Переход кнопки добавления реакции */
98
+ '--chotto-messagereactions-add-transition': string;
99
+ /** События указателя кнопки добавления реакции */
100
+ '--chotto-messagereactions-add-pointer-events': string;
101
+ /** Позиционирование кнопки добавления реакции */
102
+ '--chotto-messagereactions-add-position': string;
103
+ /** Отступ снизу кнопки добавления реакции */
104
+ '--chotto-messagereactions-add-bottom': string;
105
+ /** Z-index кнопки добавления реакции */
106
+ '--chotto-messagereactions-add-z-index': string;
107
+ /** Отступ справа кнопки добавления реакции для левых сообщений */
108
+ '--chotto-messagereactions-add-left-right': string;
109
+ /** Отступ слева кнопки добавления реакции для левых сообщений */
110
+ '--chotto-messagereactions-add-left-left': string;
111
+ /** Отступ слева кнопки добавления реакции для правых сообщений */
112
+ '--chotto-messagereactions-add-right-left': string;
113
+ /** Отступ справа кнопки добавления реакции для правых сообщений */
114
+ '--chotto-messagereactions-add-right-right': string;
115
+ /** Позиционирование кнопки добавления реакции когда есть реакции */
116
+ '--chotto-messagereactions-add-has-reactions-position': string;
117
+ /** Отступ снизу кнопки добавления реакции когда есть реакции */
118
+ '--chotto-messagereactions-add-has-reactions-bottom': string;
119
+ /** Трансформация кнопки добавления реакции когда есть реакции */
120
+ '--chotto-messagereactions-add-has-reactions-transform': string;
121
+ /** Прозрачность кнопки добавления реакции когда есть чипы */
122
+ '--chotto-messagereactions-add-has-chip-opacity': string;
123
+ /** События указателя кнопки добавления реакции когда есть чипы */
124
+ '--chotto-messagereactions-add-has-chip-pointer-events': string;
125
+ /** Позиционирование панели быстрых реакций */
126
+ '--chotto-messagereactions-quick-panel-position': string;
127
+ /** Отступ сверху панели быстрых реакций */
128
+ '--chotto-messagereactions-quick-panel-top': string;
129
+ /** Отступ слева панели быстрых реакций */
130
+ '--chotto-messagereactions-quick-panel-left': string;
131
+ /** Внешний отступ сверху панели быстрых реакций */
132
+ '--chotto-messagereactions-quick-panel-margin-top': string;
133
+ /** Фон панели быстрых реакций */
134
+ '--chotto-messagereactions-quick-panel-bg': string;
135
+ /** Граница панели быстрых реакций */
136
+ '--chotto-messagereactions-quick-panel-border': string;
137
+ /** Скругление панели быстрых реакций */
138
+ '--chotto-messagereactions-quick-panel-border-radius': string;
139
+ /** Тень панели быстрых реакций */
140
+ '--chotto-messagereactions-quick-panel-box-shadow': string;
141
+ /** Внутренние отступы панели быстрых реакций */
142
+ '--chotto-messagereactions-quick-panel-padding': string;
143
+ /** Отображение панели быстрых реакций */
144
+ '--chotto-messagereactions-quick-panel-display': string;
145
+ /** Выравнивание элементов панели быстрых реакций */
146
+ '--chotto-messagereactions-quick-panel-align-items': string;
147
+ /** Промежуток между элементами панели быстрых реакций */
148
+ '--chotto-messagereactions-quick-panel-gap': string;
149
+ /** Z-index панели быстрых реакций */
150
+ '--chotto-messagereactions-quick-panel-z-index': string;
151
+ /** Отступ слева панели быстрых реакций для правых сообщений */
152
+ '--chotto-messagereactions-quick-panel-right-left': string;
153
+ /** Отступ справа панели быстрых реакций для правых сообщений */
154
+ '--chotto-messagereactions-quick-panel-right-right': string;
155
+ /** Отображение элемента быстрой реакции */
156
+ '--chotto-messagereactions-quick-item-display': string;
157
+ /** Выравнивание элементов элемента быстрой реакции */
158
+ '--chotto-messagereactions-quick-item-align-items': string;
159
+ /** Выравнивание содержимого элемента быстрой реакции */
160
+ '--chotto-messagereactions-quick-item-justify-content': string;
161
+ /** Ширина элемента быстрой реакции */
162
+ '--chotto-messagereactions-quick-item-width': string;
163
+ /** Высота элемента быстрой реакции */
164
+ '--chotto-messagereactions-quick-item-height': string;
165
+ /** Скругление элемента быстрой реакции */
166
+ '--chotto-messagereactions-quick-item-border-radius': string;
167
+ /** Граница элемента быстрой реакции */
168
+ '--chotto-messagereactions-quick-item-border': string;
169
+ /** Фон элемента быстрой реакции */
170
+ '--chotto-messagereactions-quick-item-bg': string;
171
+ /** Курсор элемента быстрой реакции */
172
+ '--chotto-messagereactions-quick-item-cursor': string;
173
+ /** Размер шрифта элемента быстрой реакции */
174
+ '--chotto-messagereactions-quick-item-font-size': string;
175
+ /** Переход элемента быстрой реакции */
176
+ '--chotto-messagereactions-quick-item-transition': string;
177
+ /** Фон элемента быстрой реакции при наведении */
178
+ '--chotto-messagereactions-quick-item-hover-bg': string;
179
+ /** Отображение кнопки развернуть */
180
+ '--chotto-messagereactions-expand-display': string;
181
+ /** Выравнивание элементов кнопки развернуть */
182
+ '--chotto-messagereactions-expand-align-items': string;
183
+ /** Выравнивание содержимого кнопки развернуть */
184
+ '--chotto-messagereactions-expand-justify-content': string;
185
+ /** Ширина кнопки развернуть */
186
+ '--chotto-messagereactions-expand-width': string;
187
+ /** Высота кнопки развернуть */
188
+ '--chotto-messagereactions-expand-height': string;
189
+ /** Скругление кнопки развернуть */
190
+ '--chotto-messagereactions-expand-border-radius': string;
191
+ /** Граница кнопки развернуть */
192
+ '--chotto-messagereactions-expand-border': string;
193
+ /** Фон кнопки развернуть */
194
+ '--chotto-messagereactions-expand-bg': string;
195
+ /** Курсор кнопки развернуть */
196
+ '--chotto-messagereactions-expand-cursor': string;
197
+ /** Размер шрифта кнопки развернуть */
198
+ '--chotto-messagereactions-expand-font-size': string;
199
+ /** Цвет кнопки развернуть */
200
+ '--chotto-messagereactions-expand-color': string;
201
+ /** Переход кнопки развернуть */
202
+ '--chotto-messagereactions-expand-transition': string;
203
+ /** Фон кнопки развернуть при наведении */
204
+ '--chotto-messagereactions-expand-hover-bg': string;
205
+ /** Высота строки span внутри кнопки развернуть */
206
+ '--chotto-messagereactions-expand-span-line-height': string;
207
+ /** Толщина шрифта span внутри кнопки развернуть */
208
+ '--chotto-messagereactions-expand-span-font-weight': string;
209
+ /** Z-index пикера реакций */
210
+ '--chotto-messagereactions-picker-z-index': string;
211
+ /** Позиционирование emoji picker внутри пикера */
212
+ '--chotto-messagereactions-picker-emoji-picker-position': string;
213
+ /** Z-index emoji picker внутри пикера */
214
+ '--chotto-messagereactions-picker-emoji-picker-z-index': string;
215
+ /** Переход появления/исчезновения попапа реакций */
216
+ '--chotto-messagereactions-popover-transition': string;
217
+ /** Прозрачность попапа реакций в начале */
218
+ '--chotto-messagereactions-popover-enter-from-opacity': string;
219
+ /** Трансформация попапа реакций в начале */
220
+ '--chotto-messagereactions-popover-enter-from-transform': string;
221
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Список популярных эмоджи для быстрых реакций
3
+ * Используется в MessageReactions
4
+ */
5
+ export declare const QUICK_REACTION_EMOJIS: readonly ["👍", "❤️", "🔥", "😂", "😮", "😢"];
6
+ export type QuickReactionEmoji = typeof QUICK_REACTION_EMOJIS[number];
@@ -15,6 +15,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
15
15
  type: BooleanConstructor;
16
16
  default: boolean;
17
17
  };
18
+ reactionsEnabled: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
18
22
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
23
  reply: (...args: any[]) => void;
20
24
  action: (...args: any[]) => void;
@@ -31,11 +35,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
31
35
  type: BooleanConstructor;
32
36
  default: boolean;
33
37
  };
38
+ reactionsEnabled: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
34
42
  }>> & Readonly<{
35
43
  onReply?: ((...args: any[]) => any) | undefined;
36
44
  onAction?: ((...args: any[]) => any) | undefined;
37
45
  }>, {
38
46
  applyStyle: Function;
39
47
  isFirstInSeries: boolean;
48
+ reactionsEnabled: boolean;
40
49
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
41
50
  export default _default;
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
12
12
  type: BooleanConstructor;
13
13
  default: boolean;
14
14
  };
15
+ reactionsEnabled: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
15
19
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
20
  reply: (...args: any[]) => void;
17
21
  action: (...args: any[]) => void;
@@ -28,11 +32,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
28
32
  type: BooleanConstructor;
29
33
  default: boolean;
30
34
  };
35
+ reactionsEnabled: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
31
39
  }>> & Readonly<{
32
40
  onReply?: ((...args: any[]) => any) | undefined;
33
41
  onAction?: ((...args: any[]) => any) | undefined;
34
42
  }>, {
35
43
  applyStyle: Function;
36
44
  isFirstInSeries: boolean;
45
+ reactionsEnabled: boolean;
37
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
38
47
  export default _default;
@@ -4,44 +4,10 @@ declare const meta: Meta<typeof TextMessage>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof TextMessage>;
6
6
  export declare const Default: Story;
7
- export declare const LeftMessage: Story;
8
- export declare const LeftMessageWithViews: Story;
9
- export declare const LeftMessageLongText: Story;
10
- export declare const LeftMessageWithSubtext: Story;
11
- export declare const LeftMessageWithoutTime: Story;
12
- export declare const LeftMessageWithActions: Story;
13
- export declare const LeftMessageWithAvatar: Story;
14
- export declare const LeftMessageWithLongTime: Story;
15
- export declare const RightMessage: Story;
16
- export declare const RightMessageWithViews: Story;
17
- export declare const RightMessageLongText: Story;
18
- export declare const RightMessageWithSubtext: Story;
19
- export declare const RightMessageWithoutTime: Story;
20
- export declare const RightMessageStatusSent: Story;
21
- export declare const RightMessageStatusReceived: Story;
22
- export declare const RightMessageStatusRead: Story;
23
- export declare const RightMessageStatusPending: Story;
24
- export declare const RightMessageStatusError: Story;
25
- export declare const RightMessageWithActions: Story;
26
- export declare const RightMessageWithAvatar: Story;
27
- export declare const RightMessageWithLongTime: Story;
7
+ export declare const LeftMessages: Story;
8
+ export declare const RightMessages: Story;
28
9
  export declare const LeftMessageMax: Story;
29
10
  export declare const RightMessageMax: Story;
30
- export declare const LeftMessageWithLink: Story;
31
- export declare const RightMessageWithLink: Story;
32
- export declare const LeftMessageWithReplyText: Story;
33
- export declare const RightMessageWithReplyText: Story;
34
- export declare const LeftMessageWithReplyImage: Story;
35
- export declare const RightMessageWithReplyImage: Story;
36
- export declare const LeftMessageWithReplyVideo: Story;
37
- export declare const RightMessageWithReplyVideo: Story;
38
- export declare const LeftMessageWithReplyFile: Story;
39
- export declare const RightMessageWithReplyFile: Story;
40
- export declare const LeftMessageWithReplyAudio: Story;
41
- export declare const RightMessageWithReplyAudio: Story;
42
- export declare const LeftMessageWithReplyCall: Story;
43
- export declare const RightMessageWithReplyCall: Story;
44
- export declare const LeftMessageWithPreviewLink: Story;
45
- export declare const RightMessageWithPreviewLink: Story;
46
- export declare const LeftMessageWithEmbed: Story;
47
- export declare const RightMessageWithEmbed: Story;
11
+ export declare const MessagesWithLinks: Story;
12
+ export declare const MessagesWithReply: Story;
13
+ export declare const MessagesWithPreviewAndEmbed: Story;
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
12
12
  type: BooleanConstructor;
13
13
  default: boolean;
14
14
  };
15
+ reactionsEnabled: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
15
19
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
20
  reply: (...args: any[]) => void;
17
21
  action: (...args: any[]) => void;
@@ -28,11 +32,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
28
32
  type: BooleanConstructor;
29
33
  default: boolean;
30
34
  };
35
+ reactionsEnabled: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
31
39
  }>> & Readonly<{
32
40
  onReply?: ((...args: any[]) => any) | undefined;
33
41
  onAction?: ((...args: any[]) => any) | undefined;
34
42
  }>, {
35
43
  applyStyle: Function;
36
44
  isFirstInSeries: boolean;
45
+ reactionsEnabled: boolean;
37
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
38
47
  export default _default;
@@ -15,6 +15,51 @@ export interface ILinkPreview {
15
15
  url: string;
16
16
  description: string;
17
17
  }
18
+ export type ReactionKey = string;
19
+ export interface MessageReactionItem {
20
+ key: ReactionKey;
21
+ count: number;
22
+ reactedByMe?: boolean;
23
+ }
24
+ export interface MessageRecentReaction {
25
+ userId: string | number;
26
+ key: ReactionKey;
27
+ date?: number;
28
+ }
29
+ export interface MessageReactions {
30
+ items: MessageReactionItem[];
31
+ meta?: {
32
+ mode?: 'single' | 'multi';
33
+ };
34
+ recent?: MessageRecentReaction[];
35
+ vendor?: {
36
+ telegram?: {
37
+ total_count?: number;
38
+ recent_reactions?: Array<{
39
+ type: {
40
+ type: string;
41
+ emoji?: string;
42
+ };
43
+ actor?: {
44
+ id?: number;
45
+ is_bot?: boolean;
46
+ first_name?: string;
47
+ };
48
+ date?: number;
49
+ }>;
50
+ counts?: Array<{
51
+ type: {
52
+ type: string;
53
+ emoji: string;
54
+ };
55
+ count: number;
56
+ }>;
57
+ };
58
+ whatsapp?: {
59
+ lastEventAt?: number;
60
+ };
61
+ };
62
+ }
18
63
  export interface IKeyBoard {
19
64
  key: string;
20
65
  text: string;
@@ -42,6 +87,7 @@ export interface IAudioMessage {
42
87
  linkPreview?: ILinkPreview;
43
88
  embed?: object;
44
89
  keyboard?: IKeyBoard[];
90
+ reactions?: MessageReactions;
45
91
  }
46
92
  export interface ICallMessage {
47
93
  messageId: string;
@@ -58,6 +104,7 @@ export interface ICallMessage {
58
104
  transcript?: {
59
105
  dialog: IDialog[];
60
106
  };
107
+ reactions?: MessageReactions;
61
108
  }
62
109
  export interface IDateMessage {
63
110
  messageId?: string;
@@ -81,6 +128,7 @@ export interface IFileMessage {
81
128
  linkPreview?: ILinkPreview;
82
129
  embed?: object;
83
130
  keyboard?: IKeyBoard[];
131
+ reactions?: MessageReactions;
84
132
  }
85
133
  export interface IImageMessage {
86
134
  messageId: string;
@@ -100,6 +148,7 @@ export interface IImageMessage {
100
148
  linkPreview?: ILinkPreview;
101
149
  embed?: object;
102
150
  keyboard?: IKeyBoard[];
151
+ reactions?: MessageReactions;
103
152
  }
104
153
  export interface ISystemMessage {
105
154
  messageId: string;
@@ -121,6 +170,7 @@ export interface ITextMessage {
121
170
  linkPreview?: ILinkPreview;
122
171
  embed?: object;
123
172
  keyboard?: IKeyBoard[];
173
+ reactions?: MessageReactions;
124
174
  }
125
175
  export interface ITypingMessage {
126
176
  avatar?: string;
@@ -144,6 +194,7 @@ export interface IVideoMessage {
144
194
  linkPreview?: ILinkPreview;
145
195
  embed?: object;
146
196
  keyboard?: IKeyBoard[];
197
+ reactions?: MessageReactions;
147
198
  }
148
199
  export interface IStickerMessage {
149
200
  messageId: string;
@@ -164,4 +215,5 @@ export interface IStickerMessage {
164
215
  linkPreview?: ILinkPreview;
165
216
  embed?: object;
166
217
  keyboard?: IKeyBoard[];
218
+ reactions?: MessageReactions;
167
219
  }