@mobilon-dev/chotto 0.3.24 → 0.3.26
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/README.md +111 -22
- package/dist/{CreateChat-DqPybXXn.js → CreateChat-B9CfoSZb.js} +1 -1
- package/dist/{CreateChat2-Bxs28ww_.js → CreateChat2-ks_IikUi.js} +1 -1
- package/dist/{CreateDialog-IJDv_iIh.js → CreateDialog-DqXOFpdc.js} +1 -1
- package/dist/{ModalVideoRecorder-OOD5jytP.js → ModalVideoRecorder-DnncYgrj.js} +1 -1
- package/dist/{SelectUser2-D9B0H77q.js → SelectUser2-twrrtDkw.js} +1 -1
- package/dist/chotto.css +1 -1
- package/dist/{index-as74SdsT.js → index-CECDc5wp.js} +4186 -3808
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/apps/data/messages.d.ts +74 -3
- package/dist/types/components/1_atoms/ContextMenu/styles/types.d.ts +4 -0
- package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +2 -2
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +56 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.d.ts +49 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.d.ts +42 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationDialogSync.d.ts +26 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts +32 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts +25 -0
- package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +2 -2
- package/dist/types/components/2_chatlist_elements/ChatItem/types.d.ts +1 -0
- package/dist/types/components/2_feed_elements/AudioMessage/styles/types.d.ts +116 -16
- package/dist/types/components/2_feed_elements/ImageMessage/styles/types.d.ts +12 -10
- package/dist/types/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.d.ts +65 -0
- package/dist/types/components/2_feed_elements/MessageStatusIndicator/stories/MessageStatusIndicator.stories.d.ts +12 -0
- package/dist/types/components/2_feed_elements/VideoMessage/styles/types.d.ts +2 -0
- package/dist/types/components/2_feed_elements/types/messages.d.ts +1 -0
- package/dist/types/components/3_compounds/ChatList/ChatList.vue.d.ts +1 -5
- package/dist/types/components/3_compounds/ChatList/ChatListHeader.vue.d.ts +16 -0
- package/dist/types/components/3_compounds/ChatList/composables/index.d.ts +4 -0
- package/dist/types/components/3_compounds/ChatList/composables/useChatListActions.d.ts +29 -0
- package/dist/types/components/3_compounds/ChatList/composables/useChatListFilter.d.ts +58 -0
- package/dist/types/components/3_compounds/ChatList/composables/useChatListScroll.d.ts +34 -0
- package/dist/types/components/3_compounds/ChatList/composables/useChatListSelection.d.ts +56 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/vuessages.es.js +97 -95
- package/dist/vuessages.umd.js +21 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
- 📚 **[Документация](https://mobilon-dev.github.io/chotto-docs/)** - Полное руководство по использованию
|
|
12
12
|
- 🎨 **[Storybook](https://mobilon-dev.github.io/chotto/)** - Интерактивные примеры 20+ компонентов
|
|
13
|
-
- 🎯 **[Демо-приложения](https://mobilon-dev.github.io/chotto-demo/)** -
|
|
13
|
+
- 🎯 **[Демо-приложения](https://mobilon-dev.github.io/chotto-demo/)** - 10 готовых примеров использования
|
|
14
14
|
- 💬 **[Telegram чат разработчиков](https://t.me/chottodev)** - Сообщество и поддержка
|
|
15
15
|
|
|
16
16
|
## 🖼️ Скриншоты
|
|
17
17
|
|
|
18
|
-

|
|
19
19
|
|
|
20
20
|
## 🎥 Видео-обзоры
|
|
21
21
|
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
- 🎬 Видео сообщения с встроенным плеером
|
|
37
37
|
- 📎 Файлы с превью и загрузкой
|
|
38
38
|
- 📞 Звонки с транскрипцией
|
|
39
|
+
- 🎭 Стикеры (включая анимированные)
|
|
39
40
|
- 💬 Ответы на сообщения
|
|
41
|
+
- 😊 Эмодзи-реакции на сообщения
|
|
40
42
|
- 📅 Разделители дат
|
|
41
43
|
- ⚙️ Системные уведомления
|
|
42
44
|
- ⌨️ Индикатор печати
|
|
@@ -54,6 +56,9 @@
|
|
|
54
56
|
- 📝 **Шаблоны сообщений** (WABA, групповые)
|
|
55
57
|
- 🎤 **Запись аудио и видео**
|
|
56
58
|
- 😊 **Поддержка эмодзи**
|
|
59
|
+
- ⚙️ **Контекстное меню сообщений** с настраиваемыми действиями
|
|
60
|
+
- ✅ **Статусы доставки сообщений** (отправка, доставлено, прочитано, ошибка)
|
|
61
|
+
- 💾 **Загрузка медиафайлов** (изображения, видео, аудио)
|
|
57
62
|
|
|
58
63
|
### 🏗️ **Гибкая архитектура**
|
|
59
64
|
- **Layouts** - определяют структуру интерфейса
|
|
@@ -116,7 +121,15 @@ import {
|
|
|
116
121
|
ChatInput,
|
|
117
122
|
ThemeMode
|
|
118
123
|
} from '@mobilon-dev/chotto'
|
|
119
|
-
|
|
124
|
+
|
|
125
|
+
// Импорт основных стилей библиотеки
|
|
126
|
+
import '@mobilon-dev/chotto/style.css'
|
|
127
|
+
|
|
128
|
+
// Если нужна конкретная тема, можно импортировать отдельно:
|
|
129
|
+
import '@mobilon-dev/chotto/themes/default.css'
|
|
130
|
+
import '@mobilon-dev/chotto/themes/dark.css'
|
|
131
|
+
import '@mobilon-dev/chotto/themes/green.css'
|
|
132
|
+
import '@mobilon-dev/chotto/themes/mobilon1.css'
|
|
120
133
|
|
|
121
134
|
// Ваша логика...
|
|
122
135
|
</script>
|
|
@@ -158,27 +171,42 @@ npm run lint-fix
|
|
|
158
171
|
|
|
159
172
|
```
|
|
160
173
|
src/
|
|
161
|
-
├──
|
|
162
|
-
│ ├──
|
|
163
|
-
│ ├──
|
|
164
|
-
│ ├──
|
|
165
|
-
│ ├──
|
|
166
|
-
│
|
|
167
|
-
├──
|
|
168
|
-
├──
|
|
169
|
-
├──
|
|
170
|
-
├──
|
|
171
|
-
|
|
174
|
+
├── components/ # UI компоненты (атомарный дизайн)
|
|
175
|
+
│ ├── 1_atoms/ # Атомарные компоненты (ButtonContextMenu, ContextMenu, etc.)
|
|
176
|
+
│ ├── 1_icons/ # Иконки (AvatarIcon, CheckIcon, etc.)
|
|
177
|
+
│ ├── 2_blocks/ # Блочные компоненты (FeedSearch, FeedFoundObjects, etc.)
|
|
178
|
+
│ ├── 2_chatinput_elements/ # Элементы ввода (FileUploader, ButtonEmojiPicker, etc.)
|
|
179
|
+
│ ├── 2_chatlist_elements/ # Элементы списка чатов (ChatItem, ChatFilter, etc.)
|
|
180
|
+
│ ├── 2_elements/ # Общие элементы (ChatInfo, ThemeMode, AudioRecorder, etc.)
|
|
181
|
+
│ ├── 2_feed_elements/ # Элементы ленты сообщений (TextMessage, ImageMessage, etc.)
|
|
182
|
+
│ ├── 2_modals/ # Модальные окна (Modal, CreateChat, SelectUser, etc.)
|
|
183
|
+
│ ├── 3_compounds/ # Составные компоненты (ChatInput, ChatList, Feed, SideBar)
|
|
184
|
+
│ ├── 4_layouts/ # Макеты (BaseLayout, ExtendedLayout, AdaptiveExtendedLayout, etc.)
|
|
185
|
+
│ └── 5_containers/ # Контейнеры (BaseContainer, FloatContainer)
|
|
186
|
+
├── apps/ # Демо-приложения и примеры использования
|
|
187
|
+
│ ├── data/ # Mock данные для демонстрации
|
|
188
|
+
│ ├── stores/ # Pinia stores
|
|
189
|
+
│ ├── stories/ # Storybook истории
|
|
190
|
+
│ └── transform/ # Утилиты трансформации данных
|
|
191
|
+
├── hooks/ # Composables (useMessageActions, useTheme, etc.)
|
|
192
|
+
│ ├── messages/ # Хуки для работы с сообщениями
|
|
193
|
+
│ ├── modals/ # Хуки для работы с модальными окнами
|
|
194
|
+
│ ├── uploadFile/ # Хуки для загрузки файлов
|
|
195
|
+
│ └── validators/ # Валидаторы
|
|
196
|
+
├── functions/ # Утилитарные функции
|
|
197
|
+
├── types/ # TypeScript типы и интерфейсы
|
|
198
|
+
├── themes/ # Система тем (default, dark, green, mobilon1)
|
|
199
|
+
├── locale/ # Локализация (EN, RU)
|
|
200
|
+
└── utils/ # Вспомогательные утилиты
|
|
172
201
|
```
|
|
173
202
|
|
|
174
203
|
Дополнительно в корне:
|
|
175
204
|
|
|
176
205
|
```
|
|
177
|
-
.storybook/ # Storybook конфигурация
|
|
178
|
-
docs/ #
|
|
179
|
-
scripts/ # Скрипты
|
|
180
|
-
|
|
181
|
-
THEME_ARCHITECTURE_PROMPT.md # Черновик архитектуры тем
|
|
206
|
+
.storybook/ # Storybook конфигурация (если используется)
|
|
207
|
+
docs/ # Документация (ARCHITECTURE.md, ARCHITECTURE_ANALYSIS.md, etc.)
|
|
208
|
+
scripts/ # Скрипты валидации тем и утилиты
|
|
209
|
+
dist/ # Собранная библиотека (результат сборки)
|
|
182
210
|
```
|
|
183
211
|
|
|
184
212
|
## 🎨 Темы и кастомизация
|
|
@@ -187,17 +215,78 @@ THEME_ARCHITECTURE_PROMPT.md # Черновик архитектуры тем
|
|
|
187
215
|
- **Default** - светлая тема
|
|
188
216
|
- **Dark** - темная тема
|
|
189
217
|
- **Green** - зеленая тема
|
|
218
|
+
- **Mobilon1** - брендовая тема Mobilon
|
|
219
|
+
|
|
220
|
+
### Импорт тем
|
|
221
|
+
|
|
222
|
+
Если нужна конкретная тема, можно импортировать отдельно:
|
|
223
|
+
|
|
224
|
+
```javascript
|
|
225
|
+
// Импорт конкретной темы
|
|
226
|
+
import '@mobilon-dev/chotto/themes/default.css'
|
|
227
|
+
import '@mobilon-dev/chotto/themes/dark.css'
|
|
228
|
+
import '@mobilon-dev/chotto/themes/green.css'
|
|
229
|
+
import '@mobilon-dev/chotto/themes/mobilon1.css'
|
|
230
|
+
```
|
|
190
231
|
|
|
191
232
|
### Кастомизация CSS переменных
|
|
233
|
+
|
|
234
|
+
Библиотека использует двухуровневую систему тем:
|
|
235
|
+
|
|
236
|
+
#### 1. Глобальные переменные темы (`--chotto-theme-*`)
|
|
237
|
+
|
|
238
|
+
Для кастомизации глобальных переменных используйте атрибут `data-theme`:
|
|
239
|
+
|
|
192
240
|
```css
|
|
193
|
-
[data-theme="
|
|
241
|
+
[data-theme="default"] {
|
|
242
|
+
/* Основные цвета */
|
|
194
243
|
--chotto-theme-primary-color: #10b981;
|
|
195
244
|
--chotto-theme-secondary-color: #6b7280;
|
|
196
|
-
--chotto-
|
|
197
|
-
|
|
245
|
+
--chotto-theme-tertiary-color: #f3f4f6;
|
|
246
|
+
|
|
247
|
+
/* Цвета текста */
|
|
248
|
+
--chotto-theme-primary-text-color: #1e1e1e;
|
|
249
|
+
--chotto-theme-secondary-text-color: #5f5f5f;
|
|
250
|
+
|
|
251
|
+
/* Типографика */
|
|
252
|
+
--chotto-theme-font-family: 'Inter', sans-serif;
|
|
253
|
+
--chotto-theme-header-font-size: 1.5rem;
|
|
254
|
+
--chotto-theme-text-font-size: 0.875rem;
|
|
255
|
+
|
|
256
|
+
/* Сообщения */
|
|
257
|
+
--chotto-theme-message-right-bg: #dcf8c6;
|
|
258
|
+
--chotto-theme-message-left-bg: #ffffff;
|
|
259
|
+
|
|
260
|
+
/* ... и другие переменные (всего 82 переменные) */
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
#### 2. Переменные компонентов (`--chotto-componentname-*`)
|
|
265
|
+
|
|
266
|
+
Каждый компонент имеет свои CSS переменные, которые можно переопределять в вашем проекте. Например, для компонента `CommunicationPanel`:
|
|
267
|
+
|
|
268
|
+
```css
|
|
269
|
+
[data-theme="default"] {
|
|
270
|
+
/* Переменные компонента CommunicationPanel */
|
|
271
|
+
--chotto-communicationpanel-background: #ffffff;
|
|
272
|
+
--chotto-communicationpanel-border-color: #e5e5e5;
|
|
273
|
+
--chotto-communicationpanel-btn-active-color: #007CFF;
|
|
274
|
+
--chotto-communicationpanel-btn-hover-background: #f5f5f5;
|
|
275
|
+
--chotto-communicationpanel-menu-background: #ffffff;
|
|
276
|
+
/* ... и другие переменные компонента */
|
|
198
277
|
}
|
|
199
278
|
```
|
|
200
279
|
|
|
280
|
+
**Преимущества:**
|
|
281
|
+
- ✅ Гибкая кастомизация отдельных компонентов
|
|
282
|
+
- ✅ Все переменные имеют fallback значения
|
|
283
|
+
- ✅ Можно использовать глобальные переменные темы: `var(--chotto-theme-primary-color)`
|
|
284
|
+
- ✅ Полная типизация через TypeScript интерфейсы
|
|
285
|
+
|
|
286
|
+
**Доступные значения `data-theme`:** `"default"`, `"dark"`, `"green"`, `"mobilon1"`
|
|
287
|
+
|
|
288
|
+
Полный список глобальных переменных доступен в типе `ChottoThemeVariables` из `@mobilon-dev/chotto`. Переменные компонентов типизированы в интерфейсах вида `ComponentNameThemeCSSVariables` в соответствующих компонентах.
|
|
289
|
+
|
|
201
290
|
## 📱 Адаптивность
|
|
202
291
|
|
|
203
292
|
Библиотека поддерживает адаптивные макеты:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as s, createElementBlock as c, openBlock as m, createElementVNode as n, withDirectives as p, toDisplayString as u, vModelText as d } from "vue";
|
|
2
|
-
import { _ } from "./index-
|
|
2
|
+
import { _ } from "./index-CECDc5wp.js";
|
|
3
3
|
const f = {
|
|
4
4
|
__name: "CreateChat",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as m, createElementBlock as p, openBlock as f, createElementVNode as l, toDisplayString as h, withDirectives as D, createCommentVNode as V, normalizeClass as x, vModelText as y } from "vue";
|
|
2
|
-
import { _ as z } from "./index-
|
|
2
|
+
import { _ as z } from "./index-CECDc5wp.js";
|
|
3
3
|
const N = { class: "create-chat-form" }, S = { class: "create-chat-title" }, T = { class: "form-field" }, U = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "form-error"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as v, computed as d, createElementBlock as r, openBlock as i, createElementVNode as t, toDisplayString as u, withDirectives as m, Fragment as f, renderList as p, vModelSelect as _ } from "vue";
|
|
2
|
-
import { _ as D } from "./index-
|
|
2
|
+
import { _ as D } from "./index-CECDc5wp.js";
|
|
3
3
|
const S = { class: "modal__contact-line" }, k = ["value"], q = { class: "modal__channel-line" }, w = ["disabled"], x = ["value"], V = ["disabled"], A = {
|
|
4
4
|
__name: "CreateDialog",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as N, ref as l, computed as z, onMounted as $, createElementBlock as m, openBlock as f, Fragment as q, createElementVNode as o, withDirectives as E, vShow as I, createCommentVNode as g, normalizeClass as y, toDisplayString as A, nextTick as G, unref as k } from "vue";
|
|
2
|
-
import { _ as H } from "./index-
|
|
2
|
+
import { _ as H } from "./index-CECDc5wp.js";
|
|
3
3
|
const J = { class: "video-recorder__header" }, K = { class: "video-recorder__controls" }, P = { class: "video-recorder__recording-container" }, Q = { class: "video-recorder__recording-time" }, W = /* @__PURE__ */ N({
|
|
4
4
|
__name: "ModalVideoRecorder",
|
|
5
5
|
emits: ["change", "submit", "close"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as p, createElementBlock as n, openBlock as s, createElementVNode as t, toDisplayString as c, Fragment as m, renderList as _, withDirectives as h, vModelCheckbox as v } from "vue";
|
|
2
|
-
import { _ as f } from "./index-
|
|
2
|
+
import { _ as f } from "./index-CECDc5wp.js";
|
|
3
3
|
const g = { class: "participant-list" }, k = ["id", "value"], y = ["for"], b = {
|
|
4
4
|
__name: "SelectUser2",
|
|
5
5
|
props: {
|