quikchat 1.1.16 → 1.2.4

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 (42) hide show
  1. package/README.md +160 -354
  2. package/dist/build-manifest.json +157 -0
  3. package/dist/quikchat-md-full.cjs.js +2742 -0
  4. package/dist/quikchat-md-full.cjs.js.map +1 -0
  5. package/dist/quikchat-md-full.cjs.min.js +10 -0
  6. package/dist/quikchat-md-full.cjs.min.js.map +1 -0
  7. package/dist/quikchat-md-full.esm.js +2740 -0
  8. package/dist/quikchat-md-full.esm.js.map +1 -0
  9. package/dist/quikchat-md-full.esm.min.js +10 -0
  10. package/dist/quikchat-md-full.esm.min.js.map +1 -0
  11. package/dist/quikchat-md-full.umd.js +2748 -0
  12. package/dist/quikchat-md-full.umd.js.map +1 -0
  13. package/dist/quikchat-md-full.umd.min.js +10 -0
  14. package/dist/quikchat-md-full.umd.min.js.map +1 -0
  15. package/dist/quikchat-md.cjs.js +1641 -0
  16. package/dist/quikchat-md.cjs.js.map +1 -0
  17. package/dist/quikchat-md.cjs.min.js +8 -0
  18. package/dist/quikchat-md.cjs.min.js.map +1 -0
  19. package/dist/quikchat-md.esm.js +1639 -0
  20. package/dist/quikchat-md.esm.js.map +1 -0
  21. package/dist/quikchat-md.esm.min.js +8 -0
  22. package/dist/quikchat-md.esm.min.js.map +1 -0
  23. package/dist/quikchat-md.umd.js +1647 -0
  24. package/dist/quikchat-md.umd.js.map +1 -0
  25. package/dist/quikchat-md.umd.min.js +8 -0
  26. package/dist/quikchat-md.umd.min.js.map +1 -0
  27. package/dist/quikchat.cjs.js +449 -1421
  28. package/dist/quikchat.cjs.js.map +1 -1
  29. package/dist/quikchat.cjs.min.js +1 -1
  30. package/dist/quikchat.cjs.min.js.map +1 -1
  31. package/dist/quikchat.css +753 -226
  32. package/dist/quikchat.esm.js +449 -1421
  33. package/dist/quikchat.esm.js.map +1 -1
  34. package/dist/quikchat.esm.min.js +1 -1
  35. package/dist/quikchat.esm.min.js.map +1 -1
  36. package/dist/quikchat.min.css +1 -1
  37. package/dist/quikchat.umd.js +449 -1421
  38. package/dist/quikchat.umd.js.map +1 -1
  39. package/dist/quikchat.umd.min.js +1 -1
  40. package/dist/quikchat.umd.min.js.map +1 -1
  41. package/package.json +59 -34
  42. package/dist/quikchat.d.ts +0 -194
package/README.md CHANGED
@@ -1,442 +1,248 @@
1
- [![License](https://img.shields.io/badge/License-BSD%202--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause) [![NPM version](https://img.shields.io/npm/v/quikchat.svg?style=flat-square)](https://www.npmjs.com/package/quikchat) ![CI](https://github.com/deftio/quikchat/actions/workflows/ci.yml/badge.svg)
1
+ [![License](https://img.shields.io/badge/License-BSD%202--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)
2
+ [![NPM version](https://img.shields.io/npm/v/quikchat.svg?style=flat-square)](https://www.npmjs.com/package/quikchat)
3
+ ![CI](https://github.com/deftio/quikchat/actions/workflows/ci.yml/badge.svg)
2
4
 
3
5
  # QuikChat
4
6
 
5
- > Zero-dependency JavaScript chat widget for modern web applications
7
+ A lightweight, zero-dependency vanilla JavaScript chat widget. Drop it into any page — no React, no Vue, no build step required — and connect it to any LLM, WebSocket, or message source with plain `fetch()`.
6
8
 
7
- QuikChat is a lightweight, highly customizable chat interface that integrates seamlessly with any web project. Built with vanilla JavaScript, it provides powerful features for LLM applications, real-time chat, and interactive messaging experiences.
8
-
9
- **🚀 [Live Demo](https://deftio.github.io/quikchat/examples/example_umd.html) | 📚 [API Reference](docs/API-REFERENCE.md) | 🛠 [Developer Guide](docs/DEVELOPER-GUIDE.md)**
9
+ ```html
10
+ <script src="https://unpkg.com/quikchat"></script>
11
+ <link rel="stylesheet" href="https://unpkg.com/quikchat/dist/quikchat.css" />
12
+ ```
10
13
 
14
+ ```javascript
15
+ const chat = new quikchat('#chat', async (chat, msg) => {
16
+ chat.messageAddNew(msg, 'me', 'right', 'user');
11
17
 
18
+ // Stream a response from any LLM
19
+ const id = chat.messageAddTypingIndicator('bot');
20
+ const response = await fetch('http://localhost:11434/api/chat', {
21
+ method: 'POST',
22
+ headers: { 'Content-Type': 'application/json' },
23
+ body: JSON.stringify({
24
+ model: 'llama3.1',
25
+ messages: chat.historyGet(), // full conversation context
26
+ stream: true
27
+ })
28
+ });
12
29
 
13
- ## Key Features
30
+ const reader = response.body.getReader();
31
+ let first = true;
32
+ while (true) {
33
+ const { value, done } = await reader.read();
34
+ if (done) break;
35
+ const token = JSON.parse(new TextDecoder().decode(value).trim()).message.content;
36
+ if (first) { chat.messageReplaceContent(id, token); first = false; }
37
+ else { chat.messageAppendContent(id, token); }
38
+ }
39
+ });
40
+ ```
14
41
 
15
- - **🚫 Zero Dependencies** - Pure vanilla JavaScript, no frameworks required
16
- - **🎨 Fully Customizable** - Complete CSS theming system with multi-instance support
17
- - **🤖 LLM Ready** - Built-in support for OpenAI, Anthropic, Ollama, and streaming responses
18
- - **📱 Responsive Design** - Adapts to any screen size and container dimensions
19
- - **⚡ High Performance** - Virtual scrolling for large message volumes
20
- - **👁 Advanced Visibility** - Individual and group-based message control (v1.1.13+)
21
- - **🏷 Tagged Messages** - Powerful tagging system for message organization (v1.1.14+)
22
- - **💾 Full History Control** - Save, load, and restore complete chat sessions
23
- - **🔧 Developer Friendly** - TypeScript-ready with comprehensive API
42
+ That's a working streaming LLM chat in one file — no bundler, no framework, no SDK.
24
43
 
44
+ ## Features
25
45
 
46
+ - **LLM-ready** — `historyGet()` returns `{ role, content }` objects compatible with OpenAI, Ollama, Mistral, and Claude APIs
47
+ - **Streaming built in** — `messageAddNew()` → `messageAppendContent()` for token-by-token display
48
+ - **Typing indicator** — animated "..." dots that auto-clear when streaming begins
49
+ - **Markdown support** — three tiers: base (no markdown), `-md` (basic markdown via [quikdown](https://github.com/deftio/quikdown)), `-md-full` (syntax highlighting, math, diagrams, maps — loaded on demand from CDN)
50
+ - **HTML sanitization** — built-in XSS protection or plug in your own sanitizer
51
+ - **Themeable** — 8 built-in CSS themes (light, dark, blue, warm, midnight, ocean, modern, debug) or write your own
52
+ - **Multi-user** — multiple users per chat, multiple independent chats per page
53
+ - **Message visibility & tagging** — hide system prompts and tool-call results from the UI while keeping them in history for LLM context
54
+ - **History export / import** — save and restore complete chat sessions (`historyExport()` / `historyImport()`)
55
+ - **RTL support** — `setDirection('rtl')` for Arabic, Hebrew, and other right-to-left languages
56
+ - **Event callbacks** — hooks for message add, append, replace, and delete events
57
+ - **Timestamps** — optional per-message timestamps (show/hide)
58
+ - **Zero runtime dependencies** — ~5 KB gzipped (base), ~9 KB with markdown, ~14 KB full
59
+ - **Any environment** — works with CDN, npm, or local files; UMD, ESM, and CJS builds included
60
+ - **Responsive** — fills its parent container and resizes automatically
61
+ - **Accessible** — ARIA roles and labels on all interactive elements
26
62
 
27
- ## 🚀 Quick Start
63
+ ## Quick Start
28
64
 
29
- Get a working chat interface in under 60 seconds:
65
+ ### CDN
30
66
 
31
- ### Via CDN
32
67
  ```html
33
- <!DOCTYPE html>
34
- <html>
35
- <head>
36
- <link rel="stylesheet" href="https://unpkg.com/quikchat/dist/quikchat.css">
37
- </head>
38
- <body>
39
- <div id="chat" style="width: 100%; height: 400px;"></div>
40
-
41
- <script src="https://unpkg.com/quikchat"></script>
42
- <script>
43
- const chat = new quikchat('#chat', (instance, message) => {
44
- // Echo user message
45
- instance.messageAddNew(message, 'You', 'right');
46
-
47
- // Add bot response
48
- setTimeout(() => {
49
- instance.messageAddNew('Thanks for your message!', 'Bot', 'left');
50
- }, 1000);
51
- });
52
-
53
- // Add welcome message
54
- chat.messageAddNew('Hello! How can I help you today?', 'Bot', 'left');
55
- </script>
56
- </body>
57
- </html>
68
+ <script src="https://unpkg.com/quikchat"></script>
69
+ <link rel="stylesheet" href="https://unpkg.com/quikchat/dist/quikchat.css" />
58
70
  ```
59
71
 
60
- ### Via NPM
72
+ ### npm
73
+
61
74
  ```bash
62
75
  npm install quikchat
63
76
  ```
64
77
 
65
78
  ```javascript
66
79
  import quikchat from 'quikchat';
67
- import 'quikchat/dist/quikchat.css';
68
-
69
- const chat = new quikchat('#chat-container', (instance, message) => {
70
- // Your message handling logic
71
- console.log('User said:', message);
72
- });
73
80
  ```
74
81
 
82
+ ### With Markdown
75
83
 
76
-
77
- ## 📦 Installation Options
78
-
79
- ### NPM Package
80
- ```bash
81
- npm install quikchat
82
- ```
83
-
84
- ### CDN (Latest Version)
85
84
  ```html
86
- <!-- CSS -->
87
- <link rel="stylesheet" href="https://unpkg.com/quikchat/dist/quikchat.css">
88
-
89
- <!-- JavaScript -->
90
- <script src="https://unpkg.com/quikchat"></script>
91
- ```
92
-
93
- ### Direct Download
94
- Download the latest release from [GitHub Releases](https://github.com/deftio/quikchat/releases)
95
-
96
-
97
-
98
- ## 🆕 What's New in v1.1.16
99
-
100
- ### ⚡ Virtual Scrolling for High Performance
101
- QuikChat now includes built-in virtual scrolling that handles 10,000+ messages efficiently. Only visible messages are rendered in the DOM, providing massive performance improvements:
85
+ <!-- Basic markdown (bold, italic, code, tables, lists) — ~9 KB gzip -->
86
+ <script src="https://unpkg.com/quikchat/dist/quikchat-md.umd.min.js"></script>
102
87
 
103
- - **10,000 messages**: Renders in 38ms (vs 146 seconds without)
104
- - **Memory efficient**: ~2MB for 10,000 messages (vs ~187MB without)
105
- - **Automatic activation**: Enables at 500+ messages by default
106
- - **Dynamic height support**: Handles variable-length LLM responses
88
+ <!-- Full markdown (+ syntax highlighting, math, diagrams, maps) ~14 KB gzip -->
89
+ <script src="https://unpkg.com/quikchat/dist/quikchat-md-full.umd.min.js"></script>
107
90
 
108
- ```javascript
109
- // Virtual scrolling is enabled by default
110
- const chat = new quikchat('#chat', handler);
111
-
112
- // Check if virtual scrolling is active
113
- if (chat.isVirtualScrollingEnabled()) {
114
- console.log('Virtual scrolling is active');
115
- }
116
-
117
- // Get virtual scrolling configuration
118
- const config = chat.getVirtualScrollingConfig();
119
- console.log(`Enabled: ${config.enabled}, Threshold: ${config.threshold}`);
120
-
121
- // Disable if needed for specific use cases
122
- const customChat = new quikchat('#custom-chat', handler, {
123
- virtualScrolling: false
124
- });
91
+ <link rel="stylesheet" href="https://unpkg.com/quikchat/dist/quikchat.css" />
125
92
  ```
126
93
 
127
- ### 🎯 Smart Scroll Behavior
128
- Improved user experience when reading chat history:
94
+ The `-md-full` build uses [quikdown](https://github.com/deftio/quikdown)'s editor as a rendering engine. When your LLM returns a fenced code block with a language tag, highlight.js loads from CDN automatically. Same for math (MathJax), diagrams (Mermaid), and maps (Leaflet) — each loads on demand the first time it's encountered.
129
95
 
130
- ```javascript
131
- // Never auto-scroll (user has full control)
132
- chat.messageAddNew('New message', 'Bot', 'left', 'assistant', false);
96
+ Same API across all three builds — just pick your script tag.
133
97
 
134
- // Smart scroll - only scrolls if user is near bottom
135
- chat.messageAddNew('New message', 'Bot', 'left', 'assistant', 'smart');
136
-
137
- // Always scroll to new messages (default)
138
- chat.messageAddNew('New message', 'Bot', 'left', 'assistant', true);
139
- ```
140
-
141
- ### 🔔 Enhanced Message Callbacks
142
- Track message modifications for streaming and real-time updates:
98
+ ## Usage
143
99
 
144
100
  ```javascript
145
- // Track streaming content as it arrives
146
- chat.setCallbackonMessageAppend((instance, msgId, content) => {
147
- console.log(`Streaming: ${content} added to message ${msgId}`);
148
- });
149
-
150
- // Monitor message edits
151
- chat.setCallbackonMessageReplace((instance, msgId, newContent) => {
152
- console.log(`Message ${msgId} updated`);
153
- });
101
+ const chat = new quikchat(
102
+ '#chat-container', // CSS selector or DOM element
103
+ (chat, msg) => { // onSend callback
104
+ chat.messageAddNew(msg, 'me', 'right');
105
+ },
106
+ {
107
+ theme: 'quikchat-theme-light',
108
+ titleArea: { title: 'My Chat', align: 'left', show: true },
109
+ }
110
+ );
154
111
 
155
- // Track deletions
156
- chat.setCallbackonMessageDelete((instance, msgId) => {
157
- console.log(`Message ${msgId} deleted`);
158
- });
159
- ```
112
+ // Add messages programmatically
113
+ chat.messageAddNew('Hello!', 'Alice', 'left', 'user');
114
+ chat.messageAddNew('Hi there!', 'Bot', 'left', 'assistant');
115
+ chat.messageAddNew('System notice', 'system', 'center', 'system');
160
116
 
161
- ### 📚 Powerful History Management
162
- Efficiently handle large chat histories with pagination and search:
117
+ // Streaming pattern
118
+ const id = chat.messageAddTypingIndicator('bot'); // show "..." dots
119
+ chat.messageReplaceContent(id, firstToken); // first token clears dots
120
+ chat.messageAppendContent(id, nextToken); // append subsequent tokens
163
121
 
164
- ```javascript
165
- // Paginated history retrieval
166
- const page = chat.historyGetPage(1, 20, 'desc'); // Get newest 20 messages
167
- console.log(page.messages);
168
- console.log(page.pagination.hasNext); // Check if more pages exist
169
-
170
- // Search through history
171
- const results = chat.historySearch({
172
- text: 'error',
173
- userString: 'Support',
174
- limit: 50
175
- });
122
+ // Disable input while bot is responding
123
+ chat.inputAreaSetEnabled(false);
124
+ chat.inputAreaSetButtonText('Thinking...');
125
+ // ... after response completes ...
126
+ chat.inputAreaSetEnabled(true);
127
+ chat.inputAreaSetButtonText('Send');
176
128
 
177
- // Get history metadata
178
- const info = chat.historyGetInfo();
179
- console.log(`Total messages: ${info.totalMessages}`);
180
- console.log(`Memory used: ${info.memoryUsage.estimatedSize} bytes`);
129
+ // History is LLM-API compatible
130
+ const history = chat.historyGet(); // [{ role: "user", content: "..." }, ...]
181
131
  ```
182
132
 
183
- ## 📦 Previous Release: v1.1.14
133
+ ## Message Formatter & Sanitization
184
134
 
185
- ### 🏷 Tagged Message System
186
- Group and control message visibility with powerful tagging:
135
+ Process message content before display — render markdown, sanitize HTML, or both:
187
136
 
188
137
  ```javascript
189
- // Add messages with tags
190
- chat.messageAddNew('System initialized', 'System', 'center', 'system', true, true, ['system', 'startup']);
191
-
192
- // Control visibility by tag
193
- chat.setTagVisibility('system', false); // Hide all system messages
194
- chat.setTagVisibility('system', true); // Show all system messages
138
+ const chat = new quikchat('#chat', onSend, {
139
+ // Sanitize user input (true = escape HTML entities, or pass a function)
140
+ sanitize: true,
195
141
 
196
- // Get active tags
197
- const tags = chat.getActiveTags(); // ['system', 'startup', 'user']
198
- ```
199
-
200
- ### 🎯 Instance Scoping
201
- Multiple chat instances with different styling and behavior:
202
-
203
- ```javascript
204
- const salesChat = new quikchat('#sales', handler, {
205
- theme: 'quikchat-theme-light',
206
- instanceClass: 'sales-chat'
142
+ // Format content (e.g., markdown → HTML)
143
+ messageFormatter: (content) => myMarkdownParser(content),
207
144
  });
208
145
 
209
- const supportChat = new quikchat('#support', handler, {
210
- theme: 'quikchat-theme-dark',
211
- instanceClass: 'support-chat'
212
- });
146
+ // Change at runtime
147
+ chat.setMessageFormatter((content) => marked.parse(content));
148
+ chat.setSanitize((content) => DOMPurify.sanitize(content));
213
149
  ```
214
150
 
215
- ### 👁 Enhanced Visibility Controls (v1.1.13+)
216
- Fine-grained control over message display:
217
-
218
- ```javascript
219
- // Hide individual messages
220
- chat.messageSetVisibility(messageId, false);
221
-
222
- // Check visibility status
223
- const isVisible = chat.messageGetVisibility(messageId);
224
- ```
225
-
226
- **[View Complete Changelog](https://github.com/deftio/quikchat/releases)**
227
-
151
+ The pipeline is: **sanitize format → display**. Sanitize cleans untrusted input; the formatter's output is trusted.
228
152
 
153
+ The `-md` and `-md-full` builds pre-wire [quikdown](https://github.com/deftio/quikdown) as the formatter — no configuration needed. The `-md-full` build additionally renders syntax-highlighted code, math equations, Mermaid diagrams, and maps via dynamic CDN loading.
229
154
 
230
- ## 🎨 Theming & Customization
155
+ ## Theming
231
156
 
232
- QuikChat includes beautiful built-in themes and supports complete customization:
157
+ Themes are pure CSS colors, borders, and shadows only. The base CSS handles all layout.
233
158
 
234
159
  ```javascript
235
- // Use built-in themes
236
- const chat = new quikchat('#chat', handler, {
237
- theme: 'quikchat-theme-dark' // or 'quikchat-theme-light'
238
- });
239
-
240
- // Switch themes dynamically
160
+ // Built-in themes
241
161
  chat.changeTheme('quikchat-theme-light');
242
- ```
243
-
244
- ### Custom Themes
245
- Create your own themes with CSS:
246
-
247
- ```css
248
- .my-custom-theme {
249
- border: 2px solid #3b82f6;
250
- border-radius: 12px;
251
- font-family: 'SF Pro Display', sans-serif;
252
- }
253
-
254
- .my-custom-theme .quikchat-message-content {
255
- border-radius: 18px;
256
- padding: 12px 16px;
257
- }
258
-
259
- /* Apply to chat */
260
- const chat = new quikchat('#chat', handler, {
261
- theme: 'my-custom-theme'
262
- });
263
- ```
264
-
265
- **📖 [Complete Theming Guide](docs/DEVELOPER-GUIDE.md#theming-guide)**
266
-
267
-
162
+ chat.changeTheme('quikchat-theme-dark');
163
+ chat.changeTheme('quikchat-theme-modern'); // chat-bubble style
268
164
 
269
- ## 🤖 LLM Integration Examples
270
-
271
- ### OpenAI Integration
272
- ```javascript
273
- async function handleMessage(chat, message) {
274
- chat.messageAddNew(message, 'You', 'right');
275
-
276
- const response = await fetch('https://api.openai.com/v1/chat/completions', {
277
- method: 'POST',
278
- headers: {
279
- 'Authorization': `Bearer ${API_KEY}`,
280
- 'Content-Type': 'application/json'
281
- },
282
- body: JSON.stringify({
283
- model: 'gpt-4',
284
- messages: formatChatHistory(chat.historyGetAllCopy(), message)
285
- })
286
- });
287
-
288
- const data = await response.json();
289
- chat.messageAddNew(data.choices[0].message.content, 'Assistant', 'left');
290
- }
165
+ // Or write your own — just color overrides
291
166
  ```
292
167
 
293
- ### Streaming Responses
294
- ```javascript
295
- // Create message for streaming
296
- const botMsgId = chat.messageAddNew('', 'Bot', 'left');
297
-
298
- // Append content as it arrives
299
- streamingAPI.onChunk(chunk => {
300
- chat.messageAppendContent(botMsgId, chunk);
301
- });
302
- ```
303
-
304
- **🛠 [Complete LLM Integration Guide](docs/DEVELOPER-GUIDE.md#llm-integration-best-practices)**
305
-
306
-
307
-
308
- ## 🏗 Framework Integration
309
-
310
- ### React
311
- ```jsx
312
- function ChatComponent() {
313
- const chatRef = useRef(null);
314
- const instanceRef = useRef(null);
315
-
316
- useEffect(() => {
317
- instanceRef.current = new quikchat(chatRef.current, handleMessage);
318
- }, []);
319
-
320
- return <div ref={chatRef} style={{ height: '400px' }} />;
321
- }
322
- ```
323
-
324
- ### Vue
325
- ```vue
326
- <template>
327
- <div ref="chatContainer" class="chat-container"></div>
328
- </template>
329
-
330
- <script>
331
- import quikchat from 'quikchat';
332
-
333
- export default {
334
- mounted() {
335
- this.chat = new quikchat(this.$refs.chatContainer, this.handleMessage);
336
- }
168
+ ```css
169
+ .my-theme {
170
+ background-color: #f9f9f9;
171
+ border: 1px solid #ccc;
172
+ border-radius: 10px;
337
173
  }
338
- </script>
174
+ .my-theme .quikchat-title-area { color: #333; }
175
+ .my-theme .quikchat-messages-area { background-color: #fff; color: #333; }
176
+ .my-theme .quikchat-input-send-btn { background-color: #4caf50; color: white; border: none; border-radius: 4px; }
339
177
  ```
340
178
 
341
- **⚛️ [Framework Integration Examples](docs/DEVELOPER-GUIDE.md#frontend-framework-integration)**
342
-
343
-
344
-
345
- ## 📖 Documentation
346
-
347
- | Document | Description |
348
- |-|-|
349
- | **[API Reference](docs/API-REFERENCE.md)** | Complete technical reference for all methods and options |
350
- | **[Developer Guide](docs/DEVELOPER-GUIDE.md)** | Practical recipes and advanced patterns |
351
- | **[Examples](examples/)** | Working code examples and demos |
352
- | **[Live Demo](https://deftio.github.io/quikchat/examples/)** | Interactive examples and showcase |
353
-
354
-
179
+ The **modern bubble theme** uses alignment classes (`quikchat-align-left`, `quikchat-align-right`) to position messages as chat bubbles with colored backgrounds — left-aligned messages appear as grey bubbles, right-aligned as blue.
355
180
 
356
- ## 🌟 Examples & Demos
181
+ Style messages by role with CSS hooks: `.quikchat-role-user`, `.quikchat-role-assistant`, `.quikchat-role-system`, `.quikchat-role-tool`.
357
182
 
358
- - **[Basic Chat](https://deftio.github.io/quikchat/examples/example_umd.html)** - Simple chat interface
359
- - **[LLM Integration](examples/openai.html)** - OpenAI GPT integration
360
- - **[Multi-Instance](examples/dual-chatrooms.html)** - Multiple chats on one page
361
- - **[Visibility Controls](examples/hidden_message.html)** - Message visibility features
362
- - **[Theme Showcase](https://deftio.github.io/quikchat/examples/)** - Light and dark themes
363
- - **[React Integration](examples/quikchat-react.html)** - React component example
364
- - **[Backend Examples](examples/)** - FastAPI and Node.js backends
183
+ ## Documentation
365
184
 
366
- **📂 [Browse All Examples](examples/index.html)**
185
+ | Guide | Description |
186
+ |---|---|
187
+ | [Getting Started](docs/getting-started.md) | Installation, minimal example, constructor options |
188
+ | [API Reference](docs/api-reference.md) | Every public method, property, and return value |
189
+ | [Streaming](docs/streaming.md) | Token-by-token LLM response display |
190
+ | [Multi-User Chat](docs/multi-user-chat.md) | Multiple users, dual instances, message routing |
191
+ | [LLM Integration](docs/llm-integration.md) | Ollama, OpenAI, LM Studio, tool calls, conversational memory |
192
+ | [Theming](docs/theming.md) | Custom themes, CSS architecture, built-in themes |
193
+ | [CSS Architecture](docs/css-architecture.md) | Base vs theme separation, ARIA accessibility |
367
194
 
195
+ ## Demo & Examples
368
196
 
197
+ [Live Demo](https://deftio.github.io/quikchat/site/) | [Examples](https://deftio.github.io/quikchat/examples/)
369
198
 
370
- ## 🚀 Performance
199
+ Examples include: basic UMD/ESM usage, theme switching, dual chatrooms, markdown rendering ([basic](./examples/example_markdown.html) and [full with syntax highlighting + math + diagrams](./examples/example_md_full.html)), streaming with Ollama/OpenAI/LM Studio, and React integration.
371
200
 
372
- QuikChat is built for production use:
201
+ ## Build Variants
373
202
 
374
- - **Lightweight**: ~25KB minified + gzipped
375
- - **Fast**: Sub-millisecond message rendering
376
- - **Scalable**: Tested with 10,000 messages rendering in 38ms with virtual scrolling
377
- - **Memory Efficient**: Only renders visible messages in viewport
203
+ | Build | What you get | Network |
204
+ |---|---|---|
205
+ | **Base** (`quikchat.umd.min.js`) | Chat widget, zero deps | None |
206
+ | **Markdown** (`quikchat-md.umd.min.js`) | + bold, italic, code, tables, lists | None |
207
+ | **Full** (`quikchat-md-full.umd.min.js`) | + syntax highlighting, math, diagrams, maps | CDN on demand |
208
+ | **CSS** (`quikchat.css`) | All 8 themes | None |
378
209
 
379
- **📊 [Virtual Scrolling Technical Details](docs/virtual_scrolling.md) | [Performance Guide](docs/DEVELOPER-GUIDE.md#performance-optimization)**
210
+ All builds are also available in ESM and CJS formats with sourcemaps. See the [downloads page](https://deftio.github.io/quikchat/site/downloads.html) for exact sizes, SRI hashes, and CDN links.
380
211
 
212
+ The `-md` builds bundle [quikdown](https://github.com/deftio/quikdown). The `-md-full` build post-processes fence blocks with dynamically loaded renderers (highlight.js, MathJax, Mermaid, Leaflet). The base builds have zero runtime dependencies.
381
213
 
382
-
383
- ## 🛠 Building from Source
214
+ ## Building from Source
384
215
 
385
216
  ```bash
386
- # Clone repository
387
- git clone https://github.com/deftio/quikchat.git
388
- cd quikchat
389
-
390
- # Install dependencies
391
217
  npm install
392
-
393
- # Build for production
394
- npm run build
395
-
396
- # Run tests
397
- npm test
398
-
399
- # Start development server
400
- npm run dev
218
+ npm run build # lint, build all formats, report bundle sizes
219
+ npm test # jest unit tests with coverage
401
220
  ```
402
221
 
403
- **Requirements**: Node.js 14+ and npm 6+
404
-
405
-
222
+ Build-time tooling (rollup, babel, eslint, jest) is all in devDependencies — zero runtime dependencies.
406
223
 
407
- ## 🤝 Contributing
224
+ ## Testing
408
225
 
409
- We welcome contributions! Here's how you can help:
410
-
411
- 1. **🐛 Report Issues** - Found a bug? [Open an issue](https://github.com/deftio/quikchat/issues)
412
- 2. **💡 Feature Requests** - Have an idea? We'd love to hear it
413
- 3. **🔧 Code Contributions** - Submit pull requests for bug fixes or new features
414
- 4. **📖 Documentation** - Help improve our guides and examples
415
- 5. **🌟 Share Examples** - Show us what you've built with QuikChat
416
-
417
- ### Development Setup
418
226
  ```bash
419
- git clone https://github.com/deftio/quikchat.git
420
- cd quikchat
421
- npm install
422
- npm run dev
227
+ npm test # unit tests (jest, 100% coverage)
228
+ npm run test:e2e # browser tests (playwright)
423
229
  ```
424
230
 
425
- **📋 [Contributing Guidelines](CONTRIBUTING.md)**
426
-
231
+ ## Development
427
232
 
233
+ ```bash
234
+ npm run feature my-feature-name # creates feature/my-feature-name, bumps patch
235
+ npm run feature my-feature-name minor # bumps minor
236
+ ```
428
237
 
429
- ## 📄 License
430
-
431
- QuikChat is licensed under the [BSD-2-Clause License](LICENSE.txt).
238
+ A pre-commit hook runs lint and tests automatically before each commit.
432
239
 
240
+ See [RELEASE-PROCEDURE.md](RELEASE-PROCEDURE.md) for the full release workflow.
433
241
 
242
+ ## License
434
243
 
435
- ## 🔗 Links
244
+ BSD-2-Clause
436
245
 
437
- - **📦 [NPM Package](https://www.npmjs.com/package/quikchat)**
438
- - **🐙 [GitHub Repository](https://github.com/deftio/quikchat)**
439
- - **🚀 [Live Examples](https://deftio.github.io/quikchat/examples/)**
440
- - **📖 [Medium Article](https://medium.com/gitconnected/quikchat-4be8d4a849e5)**
441
- - **💬 [Issues & Support](https://github.com/deftio/quikchat/issues)**
246
+ ## Home Page
442
247
 
248
+ [github.com/deftio/quikchat](https://github.com/deftio/quikchat)