@mobilon-dev/chotto 0.0.131 → 0.0.132

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 CHANGED
@@ -1,84 +1,294 @@
1
- # chotto UI
2
-
3
- Vue3 UI components for chats, conversations & AI
4
-
5
- ### start development your chat now
6
-
7
- - [chotto UI docs](https://mobilon-dev.github.io/chotto-docs/)
8
-
9
- - [docs in storybook: 20+ components for chat UI](https://mobilon-dev.github.io/chotto/)
10
-
11
- - [cool 7 demos](https://mobilon-dev.github.io/chotto-demo/)
12
-
13
- - [telegram developer chat](https://t.me/chottodev)
14
-
15
-
16
- ## screnshots
17
-
18
- ![](images/screenshot7.png)
19
-
20
-
21
- ## video
22
-
23
- [chotto 01: welcome](https://youtu.be/LbtXeR_P9fs)
24
-
25
- [chotto 02: WABA templates](https://youtu.be/bwhcn6KAn28)
26
-
27
-
28
- # development
29
-
30
- ## scheme
31
-
32
- ![](images/scheme.png)
33
-
34
- ## install
35
-
36
- > npm i
37
-
38
- ## run storybook
39
-
40
- > npm run storybook
41
-
42
- ## run dev
43
-
44
- > npm run dev
45
-
46
- ## build
47
-
48
- > npm run build
49
-
50
-
51
-
52
- # Links
53
-
54
- imagine!
55
-
56
- ### screenshots
57
-
58
- [samples](/samples)
59
-
60
- ### same projects
61
-
62
- - https://github.com/sendbird/sendbird-uikit-react
63
-
64
- - https://github.com/detaysoft/react-chat-elements
65
-
66
- - https://github.com/pubnub/react-chat-components
67
-
68
- - https://github.com/jakobhoeg/shadcn-chat
69
-
70
- - https://github.com/advanced-chat/vue-advanced-chat
71
-
72
- - https://github.com/mattmezza/vue-beautiful-chat
73
-
74
- - https://github.com/MatheusrdSantos/vue-quick-chat
75
-
76
- - https://github.com/Yonom/assistant-ui
77
-
78
- - https://github.com/rustic-ai/ui-components
79
-
80
- - https://github.com/chatscope/chat-ui-kit-react
81
-
82
- - https://github.com/lobehub/lobe-chat
1
+ # Chotto UI
2
+
3
+ 🚀 **Vue 3 UI библиотека компонентов для создания современных чат-интерфейсов и AI-ассистентов**
4
+
5
+ [![Vue 3](https://img.shields.io/badge/Vue-3.5.15+-green.svg)](https://vuejs.org/)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.8.3+-blue.svg)](https://www.typescriptlang.org/)
7
+ [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
8
+
9
+ ## 📖 Документация и ресурсы
10
+
11
+ - 📚 **[Документация](https://mobilon-dev.github.io/chotto-docs/)** - Полное руководство по использованию
12
+ - 🎨 **[Storybook](https://mobilon-dev.github.io/chotto/)** - Интерактивные примеры 20+ компонентов
13
+ - 🎯 **[Демо-приложения](https://mobilon-dev.github.io/chotto-demo/)** - 7 готовых примеров использования
14
+ - 💬 **[Telegram чат разработчиков](https://t.me/chottodev)** - Сообщество и поддержка
15
+
16
+ ## 🖼️ Скриншоты
17
+
18
+ ![Chotto UI Screenshot](images/screenshot7.png)
19
+
20
+ ## 🎥 Видео-обзоры
21
+
22
+ - [Chotto 01: Welcome](https://youtu.be/LbtXeR_P9fs) - Введение в библиотеку
23
+ - [Chotto 02: WABA templates](https://youtu.be/bwhcn6KAn28) - Работа с шаблонами WABA
24
+
25
+ ## Возможности
26
+
27
+ ### 🎨 **Богатый набор компонентов**
28
+ - **20+ готовых компонентов** для создания чат-интерфейсов
29
+ - **Модульная архитектура** - используйте только нужные компоненты
30
+ - **TypeScript поддержка** - полная типизация всех компонентов
31
+
32
+ ### 💬 **Множественные типы сообщений**
33
+ - 📝 Текстовые сообщения с поддержкой Markdown
34
+ - 🖼️ Изображения с превью и галереей
35
+ - 🎵 Аудио сообщения с плеером
36
+ - 🎬 Видео сообщения с встроенным плеером
37
+ - 📎 Файлы с превью и загрузкой
38
+ - 📞 Звонки с транскрипцией
39
+ - 💬 Ответы на сообщения
40
+ - 📅 Разделители дат
41
+ - ⚙️ Системные уведомления
42
+ - ⌨️ Индикатор печати
43
+
44
+ ### 🎯 **Продвинутые функции**
45
+ - 🔍 **Поиск по сообщениям** с подсветкой результатов
46
+ - 📱 **Адаптивные макеты** для всех устройств
47
+ - 🎨 **3 готовые темы**: светлая, темная, зеленая
48
+ - 🌍 **Многоязычность**: русский и английский
49
+ - 🔔 **Система уведомлений** в реальном времени
50
+ - 📊 **Просмотры сообщений** с счетчиками
51
+ - 🔗 **Предпросмотр ссылок** с метаданными
52
+ - 🎵 **Встроенные медиаплееры** (YouTube, Яндекс.Музыка, Rutube, VK)
53
+ - ⌨️ **Клавиатуры быстрых ответов**
54
+ - 📝 **Шаблоны сообщений** (WABA, групповые)
55
+ - 🎤 **Запись аудио и видео**
56
+ - 😊 **Поддержка эмодзи**
57
+
58
+ ### 🏗️ **Гибкая архитектура**
59
+ - **Layouts** - определяют структуру интерфейса
60
+ - **Containers** - высокоуровневые обертки
61
+ - **Components** - переиспользуемые UI элементы
62
+ - **Messages** - типизированные компоненты сообщений
63
+ - **Modals** - диалоговые окна
64
+
65
+ ## 🚀 Быстрый старт
66
+
67
+ ### Установка
68
+
69
+ ```bash
70
+ npm install @mobilon-dev/chotto
71
+ ```
72
+
73
+ ### Базовое использование
74
+
75
+ ```vue
76
+ <template>
77
+ <div class="chat-app">
78
+ <BaseContainer height="90vh" width="90vw">
79
+ <ExtendedLayout>
80
+ <!-- Боковая панель -->
81
+ <template #first-col>
82
+ <SideBar :sidebar-items="sidebarItems" />
83
+ <ThemeMode :themes="themes" />
84
+ </template>
85
+
86
+ <!-- Список чатов -->
87
+ <template #second-col>
88
+ <ChatList
89
+ :chats="chats"
90
+ @select="selectChat"
91
+ />
92
+ </template>
93
+
94
+ <!-- Область чата -->
95
+ <template #third-col>
96
+ <ChatWrapper>
97
+ <ChatInfo :chat="selectedChat" />
98
+ <Feed :objects="messages" />
99
+ <ChatInput @send="sendMessage" />
100
+ </ChatWrapper>
101
+ </template>
102
+ </ExtendedLayout>
103
+ </BaseContainer>
104
+ </div>
105
+ </template>
106
+
107
+ <script setup>
108
+ import {
109
+ BaseContainer,
110
+ ExtendedLayout,
111
+ SideBar,
112
+ ChatList,
113
+ ChatWrapper,
114
+ ChatInfo,
115
+ Feed,
116
+ ChatInput,
117
+ ThemeMode
118
+ } from '@mobilon-dev/chotto'
119
+ import '@mobilon-dev/chotto/style.css'
120
+
121
+ // Ваша логика...
122
+ </script>
123
+ ```
124
+
125
+ ## 🛠️ Разработка
126
+
127
+ ### Требования
128
+ - Node.js 18+
129
+ - npm или yarn
130
+
131
+ ### Установка зависимостей
132
+ ```bash
133
+ npm install
134
+ ```
135
+
136
+ ### Запуск в режиме разработки
137
+ ```bash
138
+ npm run dev
139
+ ```
140
+
141
+ ### Запуск Storybook
142
+ ```bash
143
+ npm run storybook
144
+ ```
145
+
146
+ ### Сборка библиотеки
147
+ ```bash
148
+ npm run build
149
+ ```
150
+
151
+ ### Проверка кода
152
+ ```bash
153
+ npm run lint
154
+ npm run lint-fix
155
+ ```
156
+
157
+ ## 🏗️ Архитектура
158
+
159
+ ```
160
+ src/
161
+ ├── library/ # Основная библиотека компонентов
162
+ │ ├── layouts/ # Макеты (BaseLayout, ExtendedLayout, etc.)
163
+ │ ├── components/ # UI компоненты (ChatInput, ChatList, etc.)
164
+ │ ├── messages/ # Компоненты сообщений (TextMessage, ImageMessage, etc.)
165
+ │ ├── containers/ # Контейнеры (BaseContainer, FloatContainer)
166
+ │ └── modals/ # Модальные окна
167
+ ├── helpers/ # Утилиты и хелперы
168
+ ├── types/ # TypeScript типы
169
+ ├── data/ # Mock данные для демонстрации
170
+ ├── assets/ # Стили и темы
171
+ │ └── themes/ # CSS темы (default, dark, green)
172
+ └── locale/ # Локализация (EN, RU)
173
+ ```
174
+
175
+ ## 🎨 Темы и кастомизация
176
+
177
+ ### Доступные темы
178
+ - **Default** - светлая тема
179
+ - **Dark** - темная тема
180
+ - **Green** - зеленая тема
181
+
182
+ ### Кастомизация CSS переменных
183
+ ```css
184
+ [data-theme="light"] {
185
+ --chotto-primary-color: #10b981;
186
+ --chotto-secondary-color: #6b7280;
187
+ --chotto-background-color: #ffffff;
188
+ /* ... другие переменные */
189
+ }
190
+ ```
191
+
192
+ ## 📱 Адаптивность
193
+
194
+ Библиотека поддерживает адаптивные макеты:
195
+ - **Desktop** - 3-колоночный макет
196
+ - **Tablet** - 2-колоночный макет
197
+ - **Mobile** - 1-колоночный макет
198
+
199
+ ## 🌍 Локализация
200
+
201
+ Поддерживаемые языки:
202
+ - 🇷🇺 Русский
203
+ - 🇺🇸 Английский
204
+
205
+ ```javascript
206
+ import { useLocale } from '@mobilon-dev/chotto'
207
+
208
+ const { t } = useLocale()
209
+ console.log(t('component.ChatInput.InputPlaceholder'))
210
+ ```
211
+
212
+ ## 📦 Типы сообщений
213
+
214
+ ### Текстовые сообщения
215
+ ```javascript
216
+ {
217
+ type: "message.text",
218
+ text: "Привет!",
219
+ position: "left",
220
+ status: "read",
221
+ time: "14:30",
222
+ avatar: "https://example.com/avatar.jpg"
223
+ }
224
+ ```
225
+
226
+ ### Медиа сообщения
227
+ ```javascript
228
+ {
229
+ type: "message.image",
230
+ url: "https://example.com/image.jpg",
231
+ alt: "Описание изображения",
232
+ position: "right",
233
+ status: "sent"
234
+ }
235
+ ```
236
+
237
+ ## 🔌 Интеграция с бэкендом
238
+
239
+ ### Data Provider
240
+ ```javascript
241
+ const dataProvider = {
242
+ getFeed(chatId) {
243
+ // Загрузка сообщений
244
+ return fetch(`/api/chats/${chatId}/messages`)
245
+ },
246
+ addMessage(message) {
247
+ // Отправка сообщения
248
+ return fetch('/api/messages', {
249
+ method: 'POST',
250
+ body: JSON.stringify(message)
251
+ })
252
+ }
253
+ }
254
+ ```
255
+
256
+ ### Event Provider
257
+ ```javascript
258
+ const eventor = {
259
+ push(event) {
260
+ // Обработка событий в реальном времени
261
+ console.log('New event:', event)
262
+ },
263
+ subscribe(callback) {
264
+ // Подписка на события
265
+ }
266
+ }
267
+ ```
268
+
269
+ ## 🤝 Сообщество
270
+
271
+ ### Полезные ссылки
272
+ - [Telegram чат](https://t.me/chottodev) - Обсуждения и поддержка
273
+ - [Issues](https://github.com/mobilon-dev/chotto/issues) - Баги и предложения
274
+ - [Discussions](https://github.com/mobilon-dev/chotto/discussions) - Общие вопросы
275
+
276
+ ### Похожие проекты
277
+ - [Sendbird UIKit](https://github.com/sendbird/sendbird-uikit-react)
278
+ - [React Chat Elements](https://github.com/detaysoft/react-chat-elements)
279
+ - [Vue Advanced Chat](https://github.com/advanced-chat/vue-advanced-chat)
280
+ - [Lobe Chat](https://github.com/lobehub/lobe-chat)
281
+
282
+ ## 📄 Лицензия
283
+
284
+ MIT License - см. файл [LICENSE](LICENSE) для деталей.
285
+
286
+ ## 🙏 Благодарности
287
+
288
+ Спасибо всем участникам сообщества за вклад в развитие проекта!
289
+
290
+ ---
291
+
292
+ **Создавайте потрясающие чат-интерфейсы с Chotto UI! 🚀**
83
293
 
84
294
 
@@ -1,5 +1,5 @@
1
1
  import { ref as v, computed as d, createElementBlock as r, openBlock as o, 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-HbH2Dz5p.js";
2
+ import { _ as D } from "./index-DC1hOwVt.js";
3
3
  const S = { class: "modal__contact-line" }, q = ["value"], k = { 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-HbH2Dz5p.js";
2
+ import { _ as H } from "./index-DC1hOwVt.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 a, Fragment as m, renderList as _, withDirectives as h, vModelCheckbox as v } from "vue";
2
- import { _ as f } from "./index-HbH2Dz5p.js";
2
+ import { _ as f } from "./index-DC1hOwVt.js";
3
3
  const g = { class: "participant-list" }, k = ["id", "value"], y = ["for"], x = {
4
4
  __name: "SelectUser2",
5
5
  props: {