ai-progress-controls 0.1.0
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/LICENSE +21 -0
- package/README.md +823 -0
- package/dist/ai-progress-controls.es.js +7191 -0
- package/dist/ai-progress-controls.es.js.map +1 -0
- package/dist/ai-progress-controls.umd.js +2 -0
- package/dist/ai-progress-controls.umd.js.map +1 -0
- package/dist/index.d.ts +2212 -0
- package/package.json +105 -0
- package/src/__tests__/setup.ts +93 -0
- package/src/core/base/AIControl.ts +230 -0
- package/src/core/base/index.ts +3 -0
- package/src/core/base/types.ts +77 -0
- package/src/core/base/utils.ts +168 -0
- package/src/core/batch-progress/BatchProgress.test.ts +458 -0
- package/src/core/batch-progress/BatchProgress.ts +760 -0
- package/src/core/batch-progress/index.ts +14 -0
- package/src/core/batch-progress/styles.ts +480 -0
- package/src/core/batch-progress/types.ts +169 -0
- package/src/core/model-loader/ModelLoader.test.ts +311 -0
- package/src/core/model-loader/ModelLoader.ts +673 -0
- package/src/core/model-loader/index.ts +2 -0
- package/src/core/model-loader/styles.ts +496 -0
- package/src/core/model-loader/types.ts +127 -0
- package/src/core/parameter-panel/ParameterPanel.test.ts +856 -0
- package/src/core/parameter-panel/ParameterPanel.ts +877 -0
- package/src/core/parameter-panel/index.ts +14 -0
- package/src/core/parameter-panel/styles.ts +323 -0
- package/src/core/parameter-panel/types.ts +278 -0
- package/src/core/parameter-slider/ParameterSlider.test.ts +299 -0
- package/src/core/parameter-slider/ParameterSlider.ts +653 -0
- package/src/core/parameter-slider/index.ts +8 -0
- package/src/core/parameter-slider/styles.ts +493 -0
- package/src/core/parameter-slider/types.ts +107 -0
- package/src/core/queue-progress/QueueProgress.test.ts +344 -0
- package/src/core/queue-progress/QueueProgress.ts +563 -0
- package/src/core/queue-progress/index.ts +5 -0
- package/src/core/queue-progress/styles.ts +469 -0
- package/src/core/queue-progress/types.ts +130 -0
- package/src/core/retry-progress/RetryProgress.test.ts +397 -0
- package/src/core/retry-progress/RetryProgress.ts +957 -0
- package/src/core/retry-progress/index.ts +6 -0
- package/src/core/retry-progress/styles.ts +530 -0
- package/src/core/retry-progress/types.ts +176 -0
- package/src/core/stream-progress/StreamProgress.test.ts +531 -0
- package/src/core/stream-progress/StreamProgress.ts +517 -0
- package/src/core/stream-progress/index.ts +2 -0
- package/src/core/stream-progress/styles.ts +349 -0
- package/src/core/stream-progress/types.ts +82 -0
- package/src/index.ts +19 -0
package/README.md
ADDED
|
@@ -0,0 +1,823 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# ๐ค AI Progress Controls
|
|
4
|
+
|
|
5
|
+
### **Production-ready UI components for AI/ML workflows**
|
|
6
|
+
|
|
7
|
+
### **React โข Next.js โข Web Components โข Drop in with one import**
|
|
8
|
+
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://www.webcomponents.org/)
|
|
12
|
+
[](https://bundlephobia.com)
|
|
13
|
+
|
|
14
|
+
[](https://vitest.dev/)
|
|
15
|
+
[](https://vitest.dev/)
|
|
16
|
+
[](https://www.sonarsource.com/)
|
|
17
|
+
[](https://developers.google.com/web/tools/lighthouse)
|
|
18
|
+
[](https://www.w3.org/WAI/WCAG21/quickref/)
|
|
19
|
+
|
|
20
|
+
<p align="center">
|
|
21
|
+
<strong>๐ฏ 7 Components โข ๐ฆ 10 Examples โข ๐ Complete Docs โข โ
WCAG AA Compliant</strong>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ๐ Why AI Progress Controls?
|
|
29
|
+
|
|
30
|
+
Stop rebuilding the same AI UI components for every project. Get production-ready components that work with **ANY** framework:
|
|
31
|
+
|
|
32
|
+
<table>
|
|
33
|
+
<tr>
|
|
34
|
+
<td width="50%">
|
|
35
|
+
|
|
36
|
+
### โจ **Developer Experience**
|
|
37
|
+
|
|
38
|
+
โ๏ธ **React & Next.js Ready** - Native adapters with hooks & SSR
|
|
39
|
+
๐ฏ **One Import Away** - Single import, drop in JSX, done
|
|
40
|
+
๐ **Web Components** - Works everywhere (Vue, Angular, Svelte, plain HTML)
|
|
41
|
+
๐ฆ **Zero Dependencies** - Lightweight and fast (~28KB gzipped)
|
|
42
|
+
๐จ **Fully Themeable** - CSS variables, dark mode ready
|
|
43
|
+
๐ **TypeScript First** - Complete type definitions included
|
|
44
|
+
|
|
45
|
+
</td>
|
|
46
|
+
<td width="50%">
|
|
47
|
+
|
|
48
|
+
### ๐ค **AI-Aware Features**
|
|
49
|
+
|
|
50
|
+
โก **Token Streaming** - Real-time visualization with rate tracking
|
|
51
|
+
๐ฐ **Cost Estimation** - Built-in pricing calculations
|
|
52
|
+
๐ **Retry Logic** - Exponential backoff strategies
|
|
53
|
+
๐ **Queue Management** - Position tracking with ETA
|
|
54
|
+
๐ฏ **Batch Processing** - Concurrency control & item tracking
|
|
55
|
+
๐๏ธ **Parameter Controls** - Unified LLM configuration panels
|
|
56
|
+
|
|
57
|
+
### ๐จ **Visual Customization**
|
|
58
|
+
|
|
59
|
+
โ
**4 Visual Variants** - default, minimal, gradient, glassmorphic
|
|
60
|
+
โ
**4 Animation Effects** - none, striped, pulse, glow
|
|
61
|
+
โ
**3 Size Variants** - compact, default, large
|
|
62
|
+
โ
**5 Brand Themes** - OpenAI, Anthropic, Google AI, Cohere, Dark
|
|
63
|
+
โ
**Cursor Feedback** - Automatic state indication
|
|
64
|
+
โ
**Smooth Animations** - Hardware-accelerated transitions
|
|
65
|
+
|
|
66
|
+
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
</table>
|
|
69
|
+
|
|
70
|
+
<div align="center">
|
|
71
|
+
|
|
72
|
+
### ๐ฏ **Production Stats**
|
|
73
|
+
|
|
74
|
+
| **7** Components | **10** Examples | **292** Tests | **91.34%** Coverage | **0** Errors |
|
|
75
|
+
| :--------------: | :--------------: | :-----------: | :-----------------: | :-------------: |
|
|
76
|
+
| Fully documented | Copy-paste ready | 100% passing | Exceeds 80% target | SonarQube clean |
|
|
77
|
+
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## โก Quick Start - Choose Your Framework
|
|
83
|
+
|
|
84
|
+
<table>
|
|
85
|
+
<tr>
|
|
86
|
+
<td width="50%">
|
|
87
|
+
|
|
88
|
+
### โ๏ธ **React / Next.js** (Recommended)
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm install ai-progress-controls @ai-progress-controls/react
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
import { StreamProgress } from '@ai-progress-controls/react';
|
|
96
|
+
|
|
97
|
+
function App() {
|
|
98
|
+
return <StreamProgress maxTokens={2000} />;
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**That's it!** Props sync automatically, no refs needed.
|
|
103
|
+
|
|
104
|
+
[๐ React Guide](./adapters/react/README.md) โข [๐ Next.js Guide](./adapters/next/README.md)
|
|
105
|
+
|
|
106
|
+
</td>
|
|
107
|
+
<td width="50%">
|
|
108
|
+
|
|
109
|
+
### ๐ **Web Components** (Universal)
|
|
110
|
+
|
|
111
|
+
Works in Vue, Angular, Svelte, or plain JavaScript:
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
import { StreamProgress } from 'ai-progress-controls';
|
|
115
|
+
|
|
116
|
+
const progress = new StreamProgress({ maxTokens: 2000 });
|
|
117
|
+
document.body.appendChild(progress);
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**That's it!** Import, create, append - works in any framework.
|
|
121
|
+
|
|
122
|
+
[๐ Getting Started](./docs/getting-started.md) โข [๐ฎ Examples](./examples/index.html)
|
|
123
|
+
|
|
124
|
+
</td>
|
|
125
|
+
</tr>
|
|
126
|
+
</table>
|
|
127
|
+
|
|
128
|
+
<div align="center">
|
|
129
|
+
|
|
130
|
+
### ๐ **Documentation**
|
|
131
|
+
|
|
132
|
+
[โ๏ธ React Adapter](./adapters/react/README.md) โข [โฒ Next.js Adapter](./adapters/next/README.md) โข [๐ Web Components](./docs/getting-started.md) โข [๐ API Docs](./docs/api/)
|
|
133
|
+
|
|
134
|
+
**Code Examples:**
|
|
135
|
+
[โ๏ธ React Examples](./docs/react-examples.md) โข [โฒ Next.js Examples](./docs/nextjs-examples.md) โข [๐ฎ Vanilla JS Examples](./examples/index.html)
|
|
136
|
+
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## ๐ฆ Framework Integration
|
|
142
|
+
|
|
143
|
+
<div align="center">
|
|
144
|
+
|
|
145
|
+
### Choose the best package for your stack
|
|
146
|
+
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<table>
|
|
150
|
+
<tr>
|
|
151
|
+
<td width="33%">
|
|
152
|
+
|
|
153
|
+
### โ๏ธ **React**
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npm install @ai-progress-controls/react
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Features:**
|
|
160
|
+
|
|
161
|
+
- โ
Hooks-based API
|
|
162
|
+
- โ
Props sync automatically
|
|
163
|
+
- โ
TypeScript support
|
|
164
|
+
- โ
React 18+ compatible
|
|
165
|
+
|
|
166
|
+
[๐ React Documentation](./adapters/react/README.md)
|
|
167
|
+
|
|
168
|
+
</td>
|
|
169
|
+
<td width="33%">
|
|
170
|
+
|
|
171
|
+
### โฒ **Next.js**
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
npm install @ai-progress-controls/next
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Features:**
|
|
178
|
+
|
|
179
|
+
- โ
Full SSR support
|
|
180
|
+
- โ
App Router ready
|
|
181
|
+
- โ
No hydration errors
|
|
182
|
+
- โ
Auto client components
|
|
183
|
+
|
|
184
|
+
[๐ Next.js Documentation](./adapters/next/README.md)
|
|
185
|
+
|
|
186
|
+
</td>
|
|
187
|
+
<td width="33%">
|
|
188
|
+
|
|
189
|
+
### ๐ **Web Components**
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
npm install ai-progress-controls
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Features:**
|
|
196
|
+
|
|
197
|
+
- โ
Framework-agnostic
|
|
198
|
+
- โ
Vue, Angular, Svelte
|
|
199
|
+
- โ
Plain JavaScript
|
|
200
|
+
- โ
Zero dependencies
|
|
201
|
+
|
|
202
|
+
[๐ Web Components Guide](./docs/getting-started.md)
|
|
203
|
+
|
|
204
|
+
</td>
|
|
205
|
+
</tr>
|
|
206
|
+
</table>
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## ๐ฎ Live Demo
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
git clone https://github.com/Maneesh-Relanto/ai-progress-controls.git
|
|
214
|
+
cd ai-progress-controls
|
|
215
|
+
npm install
|
|
216
|
+
npm run dev
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
<div align="center">
|
|
220
|
+
|
|
221
|
+
### ๐ **Open http://localhost:5173**
|
|
222
|
+
|
|
223
|
+
| ๐ Homepage | ๐ Examples Gallery |
|
|
224
|
+
| :---------------------------------------------------: | :---------------------------------------------: |
|
|
225
|
+
| [Interactive demos of all 7 components](./index.html) | [10 copy-paste examples](./examples/index.html) |
|
|
226
|
+
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
> **๐ก Pro Tip:** Open [index.html](./index.html) directly in your browser to see all components in action!
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## ๐ฆ What's Included
|
|
234
|
+
|
|
235
|
+
<div align="center">
|
|
236
|
+
|
|
237
|
+
### ๐ฏ **7 Production-Ready Components**
|
|
238
|
+
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<table>
|
|
242
|
+
<tr>
|
|
243
|
+
<td width="33%">
|
|
244
|
+
|
|
245
|
+
#### ๐ **StreamProgress**
|
|
246
|
+
|
|
247
|
+
Real-time token streaming visualization
|
|
248
|
+
|
|
249
|
+
โ Rate tracking (tokens/sec)
|
|
250
|
+
โ Cost estimation
|
|
251
|
+
โ Live progress updates
|
|
252
|
+
|
|
253
|
+
[๐ Docs](./docs/api/stream-progress.md) โข [๐ฎ Demo](./examples/vanilla/stream-progress.html)
|
|
254
|
+
|
|
255
|
+
</td>
|
|
256
|
+
<td width="33%">
|
|
257
|
+
|
|
258
|
+
#### ๐ฅ **ModelLoader**
|
|
259
|
+
|
|
260
|
+
Multi-stage model loading
|
|
261
|
+
|
|
262
|
+
โ Download progress
|
|
263
|
+
โ Memory usage tracking
|
|
264
|
+
โ Per-stage ETA
|
|
265
|
+
|
|
266
|
+
[๐ Docs](./docs/api/model-loader.md) โข [๐ฎ Demo](./examples/vanilla/model-loader.html)
|
|
267
|
+
|
|
268
|
+
</td>
|
|
269
|
+
<td width="33%">
|
|
270
|
+
|
|
271
|
+
#### ๐๏ธ **ParameterSlider**
|
|
272
|
+
|
|
273
|
+
Single LLM parameter control
|
|
274
|
+
|
|
275
|
+
โ Temperature, top-p, etc.
|
|
276
|
+
โ Preset configurations
|
|
277
|
+
โ Manual input support
|
|
278
|
+
|
|
279
|
+
[๐ Docs](./docs/api/parameter-slider.md) โข [๐ฎ Demo](./examples/vanilla/parameter-slider.html)
|
|
280
|
+
|
|
281
|
+
</td>
|
|
282
|
+
</tr>
|
|
283
|
+
<tr>
|
|
284
|
+
<td width="33%">
|
|
285
|
+
|
|
286
|
+
#### ๐๏ธ **ParameterPanel** ๐
|
|
287
|
+
|
|
288
|
+
Multi-parameter configuration
|
|
289
|
+
|
|
290
|
+
โ Grouped controls
|
|
291
|
+
โ Preset management
|
|
292
|
+
โ Export/import configs
|
|
293
|
+
โ Custom validation
|
|
294
|
+
|
|
295
|
+
[๐ Docs](./docs/api/parameter-panel.md) โข [๐ฎ Demo](./examples/vanilla/parameter-panel.html)
|
|
296
|
+
|
|
297
|
+
</td>
|
|
298
|
+
<td width="33%">
|
|
299
|
+
|
|
300
|
+
#### โณ **QueueProgress**
|
|
301
|
+
|
|
302
|
+
Queue position tracking
|
|
303
|
+
|
|
304
|
+
โ Live position updates
|
|
305
|
+
โ ETA calculation
|
|
306
|
+
โ Processing rate
|
|
307
|
+
|
|
308
|
+
[๐ Docs](./docs/api/queue-progress.md) โข [๐ฎ Demo](./examples/vanilla/queue-progress.html)
|
|
309
|
+
|
|
310
|
+
</td>
|
|
311
|
+
<td width="33%">
|
|
312
|
+
|
|
313
|
+
#### ๐ **RetryProgress**
|
|
314
|
+
|
|
315
|
+
Exponential backoff retry
|
|
316
|
+
|
|
317
|
+
โ 4 retry strategies
|
|
318
|
+
โ Automatic retry logic
|
|
319
|
+
โ Error handling
|
|
320
|
+
|
|
321
|
+
[๐ Docs](./docs/api/retry-progress.md) โข [๐ฎ Demo](./examples/vanilla/retry-progress.html)
|
|
322
|
+
|
|
323
|
+
</td>
|
|
324
|
+
</tr>
|
|
325
|
+
<tr>
|
|
326
|
+
<td width="33%">
|
|
327
|
+
|
|
328
|
+
#### ๐ **BatchProgress**
|
|
329
|
+
|
|
330
|
+
Batch processing progress
|
|
331
|
+
|
|
332
|
+
โ Multiple items
|
|
333
|
+
โ Concurrency control
|
|
334
|
+
โ Individual tracking
|
|
335
|
+
|
|
336
|
+
[๐ Docs](./docs/api/batch-progress.md) โข [๐ฎ Demo](./examples/vanilla/batch-progress.html)
|
|
337
|
+
|
|
338
|
+
</td>
|
|
339
|
+
<td colspan="2">
|
|
340
|
+
|
|
341
|
+
</td>
|
|
342
|
+
</tr>
|
|
343
|
+
</table>
|
|
344
|
+
|
|
345
|
+
<div align="center">
|
|
346
|
+
|
|
347
|
+
### ๐ **Complete Documentation**
|
|
348
|
+
|
|
349
|
+
| ๐ Getting Started | ๐ฎ 28+ Examples | ๐ API Reference | ๐จ Theming Guide |
|
|
350
|
+
| :--------------------------------------------: | :----------------------------------------: | :------------------------------: | :--------------: |
|
|
351
|
+
| [Quick setup guide](./docs/getting-started.md) | [4-6 per component](./examples/index.html) | [1,100+ lines each](./docs/api/) | CSS variables |
|
|
352
|
+
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## ๐ฏ Problem & Solution
|
|
358
|
+
|
|
359
|
+
<table>
|
|
360
|
+
<tr>
|
|
361
|
+
<td width="50%">
|
|
362
|
+
|
|
363
|
+
### โ **The Problem**
|
|
364
|
+
|
|
365
|
+
Developers building AI apps face repetitive UI challenges:
|
|
366
|
+
|
|
367
|
+
- ๐ด **Generic progress bars** don't show AI context (tokens, costs, queues)
|
|
368
|
+
- ๐ด **Manual implementation** of LLM controls = inconsistent UX
|
|
369
|
+
- ๐ด **No standard components** for AI operations
|
|
370
|
+
- ๐ด **Framework lock-in** forces rebuilding for React/Vue/Angular
|
|
371
|
+
- ๐ด **Poor DX** integrating with streaming AI APIs
|
|
372
|
+
|
|
373
|
+
</td>
|
|
374
|
+
<td width="50%">
|
|
375
|
+
|
|
376
|
+
### โ
**Our Solution**
|
|
377
|
+
|
|
378
|
+
Specialized UI components built FOR AI workflows:
|
|
379
|
+
|
|
380
|
+
- ๐ข **AI-aware components** with token tracking, cost estimation
|
|
381
|
+
- ๐ข **Production-ready** - just import and use
|
|
382
|
+
- ๐ข **Works everywhere** - framework-agnostic Web Components
|
|
383
|
+
- ๐ข **Zero dependencies** - lightweight and fast
|
|
384
|
+
- ๐ข **TypeScript first** - complete type safety
|
|
385
|
+
|
|
386
|
+
</td>
|
|
387
|
+
</tr>
|
|
388
|
+
</table>
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## ๐ฅ Target Audience
|
|
393
|
+
|
|
394
|
+
<div align="center">
|
|
395
|
+
|
|
396
|
+
**Frontend & Fullstack developers building AI-powered applications**
|
|
397
|
+
|
|
398
|
+
</div>
|
|
399
|
+
|
|
400
|
+
<table>
|
|
401
|
+
<tr>
|
|
402
|
+
<td width="50%">
|
|
403
|
+
|
|
404
|
+
### ๐ฏ **Primary Users**
|
|
405
|
+
|
|
406
|
+
- ๐ค Developers integrating OpenAI/Anthropic/other LLM APIs
|
|
407
|
+
- ๐ข Teams building internal AI tools and dashboards
|
|
408
|
+
- ๐ผ Indie hackers creating AI SaaS products
|
|
409
|
+
- ๐ฌ ML engineers adding UIs to inference pipelines
|
|
410
|
+
- ๐ ๏ธ Developer tool creators building AI-enhanced IDEs
|
|
411
|
+
|
|
412
|
+
</td>
|
|
413
|
+
<td width="50%">
|
|
414
|
+
|
|
415
|
+
### ๐ก **Use Cases**
|
|
416
|
+
|
|
417
|
+
- ๐ฌ Chatbot interfaces with streaming responses
|
|
418
|
+
- ๐ผ๏ธ Image generation tools (Stable Diffusion, DALL-E)
|
|
419
|
+
- ๐ Batch document processing systems
|
|
420
|
+
- โ๏ธ AI content creation platforms
|
|
421
|
+
- ๐๏ธ Model fine-tuning dashboards
|
|
422
|
+
- ๐ค Voice/audio transcription services
|
|
423
|
+
|
|
424
|
+
</td>
|
|
425
|
+
</tr>
|
|
426
|
+
</table>
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## ๐ Project Status
|
|
431
|
+
|
|
432
|
+
<div align="center">
|
|
433
|
+
|
|
434
|
+
### ๐ **v0.1.0 - Production Ready**
|
|
435
|
+
|
|
436
|
+
[](https://github.com)
|
|
437
|
+
[](./docs/api/)
|
|
438
|
+
[](./examples/)
|
|
439
|
+
[](./docs/)
|
|
440
|
+
|
|
441
|
+
</div>
|
|
442
|
+
|
|
443
|
+
### โ
**Completed**
|
|
444
|
+
|
|
445
|
+
<table>
|
|
446
|
+
<tr>
|
|
447
|
+
<td width="50%">
|
|
448
|
+
|
|
449
|
+
#### ๐ฏ **Components (7/7)**
|
|
450
|
+
|
|
451
|
+
- โ
StreamProgress - Token streaming
|
|
452
|
+
- โ
ModelLoader - Multi-stage loading
|
|
453
|
+
- โ
ParameterSlider - LLM controls
|
|
454
|
+
- โ
QueueProgress - Queue tracking
|
|
455
|
+
- โ
RetryProgress - Retry logic
|
|
456
|
+
- โ
BatchProgress - Batch processing
|
|
457
|
+
|
|
458
|
+
</td>
|
|
459
|
+
<td width="50%">
|
|
460
|
+
|
|
461
|
+
#### ๐ **Documentation**
|
|
462
|
+
|
|
463
|
+
- โ
10 interactive examples (visual variants, theming, cursor states)
|
|
464
|
+
- โ
Complete API docs (400+ lines each)
|
|
465
|
+
- โ
Getting started guide
|
|
466
|
+
- โ
TypeScript definitions
|
|
467
|
+
- โ
Visual variants guide
|
|
468
|
+
|
|
469
|
+
</td>
|
|
470
|
+
</tr>
|
|
471
|
+
</table>
|
|
472
|
+
|
|
473
|
+
### โ
**Testing & Quality Assurance**
|
|
474
|
+
|
|
475
|
+
<div align="center">
|
|
476
|
+
|
|
477
|
+
[](https://vitest.dev/)
|
|
478
|
+
[](./src/core/)
|
|
479
|
+
[](https://vitest.dev/)
|
|
480
|
+
|
|
481
|
+
**292 tests โข 100% pass rate โข ~7.2s execution time**
|
|
482
|
+
|
|
483
|
+
</div>
|
|
484
|
+
|
|
485
|
+
<table>
|
|
486
|
+
<tr>
|
|
487
|
+
<td width="50%">
|
|
488
|
+
|
|
489
|
+
#### ๐ **Test Coverage by Component**
|
|
490
|
+
|
|
491
|
+
| Component | Tests | Status |
|
|
492
|
+
| ------------------ | :-----: | :---------: |
|
|
493
|
+
| ๐๏ธ ParameterPanel | 55 | โ
|
|
|
494
|
+
| ๐ StreamProgress | 49 | โ
|
|
|
495
|
+
| ๐ BatchProgress | 46 | โ
|
|
|
496
|
+
| ๐ RetryProgress | 40 | โ
|
|
|
497
|
+
| โณ QueueProgress | 36 | โ
|
|
|
498
|
+
| ๐๏ธ ParameterSlider | 34 | โ
|
|
|
499
|
+
| ๐ฅ ModelLoader | 32 | โ
|
|
|
500
|
+
| **TOTAL** | **292** | **โ
100%** |
|
|
501
|
+
|
|
502
|
+
</td>
|
|
503
|
+
<td width="50%">
|
|
504
|
+
|
|
505
|
+
#### ๐งช **What's Tested**
|
|
506
|
+
|
|
507
|
+
โ
**Lifecycle Methods** - start, update, complete, cancel, reset
|
|
508
|
+
โ
**Event Emission** - All custom events verified
|
|
509
|
+
โ
**State Management** - State transitions & accuracy
|
|
510
|
+
โ
**Properties** - Getters, setters, disabled states
|
|
511
|
+
โ
**Rendering** - Shadow DOM & dynamic updates
|
|
512
|
+
โ
**Accessibility** - ARIA attributes & roles
|
|
513
|
+
โ
**Edge Cases** - Boundary values, rapid operations
|
|
514
|
+
โ
**Validation** - Custom validation functions
|
|
515
|
+
โ
**Persistence** - localStorage save/load
|
|
516
|
+
|
|
517
|
+
</td>
|
|
518
|
+
</tr>
|
|
519
|
+
</table>
|
|
520
|
+
|
|
521
|
+
<div align="center">
|
|
522
|
+
|
|
523
|
+
**๐ฌ Test Framework:** Vitest with jsdom โข **โก Fast:** ~7.2s for 292 tests โข **๐ฏ Comprehensive:** Every public API + visual variants tested
|
|
524
|
+
|
|
525
|
+
[Run Tests: `npm test`](./package.json)
|
|
526
|
+
|
|
527
|
+
</div>
|
|
528
|
+
|
|
529
|
+
### ๐ง **Next Steps**
|
|
530
|
+
|
|
531
|
+
| Priority | Task | Status |
|
|
532
|
+
| :-------: | ------------------------------------- | :-----: |
|
|
533
|
+
| ๐ด High | npm package publishing | Ready |
|
|
534
|
+
| ๐ก Medium | Documentation website (GitHub Pages) | Planned |
|
|
535
|
+
| ๐ก Medium | E2E tests | Planned |
|
|
536
|
+
| ๐ข Low | Additional components (6+ identified) | Roadmap |
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
## ๐ฅ Framework Support - Works Everywhere!
|
|
541
|
+
|
|
542
|
+
<div align="center">
|
|
543
|
+
|
|
544
|
+
### **One component. Any framework. Zero configuration.**
|
|
545
|
+
|
|
546
|
+
</div>
|
|
547
|
+
|
|
548
|
+
<table>
|
|
549
|
+
<tr>
|
|
550
|
+
<td width="33%">
|
|
551
|
+
|
|
552
|
+
#### โ๏ธ **React / Next.js**
|
|
553
|
+
|
|
554
|
+
```tsx
|
|
555
|
+
import { StreamProgress } from 'ai-progress-controls';
|
|
556
|
+
const progress = new StreamProgress();
|
|
557
|
+
containerRef.current.appendChild(progress);
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
</td>
|
|
561
|
+
<td width="33%">
|
|
562
|
+
|
|
563
|
+
#### ๐ **Vue / Nuxt**
|
|
564
|
+
|
|
565
|
+
```vue
|
|
566
|
+
import { StreamProgress } from 'ai-progress-controls'; const progress = new StreamProgress();
|
|
567
|
+
container.value.appendChild(progress);
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
</td>
|
|
571
|
+
<td width="33%">
|
|
572
|
+
|
|
573
|
+
#### ๐
ฐ๏ธ **Angular**
|
|
574
|
+
|
|
575
|
+
```typescript
|
|
576
|
+
import { StreamProgress } from 'ai-progress-controls';
|
|
577
|
+
const progress = new StreamProgress();
|
|
578
|
+
this.container.nativeElement.appendChild(progress);
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
</td>
|
|
582
|
+
</tr>
|
|
583
|
+
<tr>
|
|
584
|
+
<td width="33%">
|
|
585
|
+
|
|
586
|
+
#### ๐งก **Svelte / SvelteKit**
|
|
587
|
+
|
|
588
|
+
```svelte
|
|
589
|
+
import { StreamProgress } from 'ai-progress-controls';
|
|
590
|
+
const progress = new StreamProgress();
|
|
591
|
+
container.appendChild(progress);
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
</td>
|
|
595
|
+
<td width="33%">
|
|
596
|
+
|
|
597
|
+
#### ๐ฆ **SolidJS**
|
|
598
|
+
|
|
599
|
+
```tsx
|
|
600
|
+
import { StreamProgress } from 'ai-progress-controls';
|
|
601
|
+
const progress = new StreamProgress();
|
|
602
|
+
container?.appendChild(progress);
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
</td>
|
|
606
|
+
<td width="33%">
|
|
607
|
+
|
|
608
|
+
#### โก **Vanilla JS**
|
|
609
|
+
|
|
610
|
+
```javascript
|
|
611
|
+
import { StreamProgress } from 'ai-progress-controls';
|
|
612
|
+
const progress = new StreamProgress();
|
|
613
|
+
document.body.appendChild(progress);
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
</td>
|
|
617
|
+
</tr>
|
|
618
|
+
</table>
|
|
619
|
+
|
|
620
|
+
<div align="center">
|
|
621
|
+
|
|
622
|
+
**Also works with:** Preact โข Lit โข Astro โข Qwik โข Ember โข And any other JavaScript framework!
|
|
623
|
+
|
|
624
|
+
[๐ See full framework examples](./docs/getting-started.md#framework-integration)
|
|
625
|
+
|
|
626
|
+
</div>
|
|
627
|
+
|
|
628
|
+
---
|
|
629
|
+
|
|
630
|
+
## ๐จ Features
|
|
631
|
+
|
|
632
|
+
<table>
|
|
633
|
+
<tr>
|
|
634
|
+
<td width="50%">
|
|
635
|
+
|
|
636
|
+
### ๐๏ธ **Architecture**
|
|
637
|
+
|
|
638
|
+
โ
Web Components (native browser standard)
|
|
639
|
+
โ
Shadow DOM encapsulation
|
|
640
|
+
โ
Zero dependencies
|
|
641
|
+
โ
~28KB gzipped (all 7 components)
|
|
642
|
+
โ
TypeScript strict mode
|
|
643
|
+
|
|
644
|
+
### ๐ฏ **AI-Specific**
|
|
645
|
+
|
|
646
|
+
โ
Token counting & rate tracking
|
|
647
|
+
โ
Cost estimation ($/token)
|
|
648
|
+
โ
Queue position & ETA
|
|
649
|
+
โ
Retry strategies (4 types)
|
|
650
|
+
โ
Batch concurrency control
|
|
651
|
+
|
|
652
|
+
</td>
|
|
653
|
+
<td width="50%">
|
|
654
|
+
|
|
655
|
+
### โฟ **Accessibility**
|
|
656
|
+
|
|
657
|
+
โ
WCAG AA compliant (4.5:1 contrast)
|
|
658
|
+
โ
ARIA attributes & roles
|
|
659
|
+
โ
Keyboard navigation support
|
|
660
|
+
โ
Screen reader optimized
|
|
661
|
+
โ
Focus management
|
|
662
|
+
|
|
663
|
+
### ๐จ **Theming**
|
|
664
|
+
|
|
665
|
+
โ
CSS custom properties
|
|
666
|
+
โ
Dark mode ready
|
|
667
|
+
โ
Reduced motion support
|
|
668
|
+
โ
High contrast mode
|
|
669
|
+
โ
Fully customizable
|
|
670
|
+
|
|
671
|
+
</td>
|
|
672
|
+
</tr>
|
|
673
|
+
</table>
|
|
674
|
+
|
|
675
|
+
---
|
|
676
|
+
|
|
677
|
+
## ๐ฃ๏ธ Roadmap
|
|
678
|
+
|
|
679
|
+
<table>
|
|
680
|
+
<tr>
|
|
681
|
+
<td width="25%">
|
|
682
|
+
|
|
683
|
+
### โ
**Phase 1**
|
|
684
|
+
|
|
685
|
+
**Core Architecture**
|
|
686
|
+
|
|
687
|
+
โ
Web Components
|
|
688
|
+
โ
TypeScript setup
|
|
689
|
+
โ
Build pipeline
|
|
690
|
+
โ
Dev environment
|
|
691
|
+
|
|
692
|
+
</td>
|
|
693
|
+
<td width="25%">
|
|
694
|
+
|
|
695
|
+
### โ
**Phase 2**
|
|
696
|
+
|
|
697
|
+
**Components**
|
|
698
|
+
|
|
699
|
+
โ
StreamProgress
|
|
700
|
+
โ
ModelLoader
|
|
701
|
+
โ
ParameterSlider
|
|
702
|
+
โ
QueueProgress
|
|
703
|
+
โ
RetryProgress
|
|
704
|
+
โ
BatchProgress
|
|
705
|
+
โ
ParameterPanel ๐
|
|
706
|
+
|
|
707
|
+
</td>
|
|
708
|
+
<td width="25%">
|
|
709
|
+
|
|
710
|
+
### โ
**Phase 3**
|
|
711
|
+
|
|
712
|
+
**Visual Variants & Animations** ๐จ
|
|
713
|
+
|
|
714
|
+
โ
4 Visual Variants (default, minimal, gradient, glassmorphic)
|
|
715
|
+
โ
4 Animation Effects (none, striped, pulse, glow)
|
|
716
|
+
โ
3 Size Variants (compact, default, large)
|
|
717
|
+
โ
Cursor States (auto-updating based on component state)
|
|
718
|
+
โ
48 additional tests (292 total)
|
|
719
|
+
|
|
720
|
+
</td>
|
|
721
|
+
<td width="25%">
|
|
722
|
+
|
|
723
|
+
### โ
**Phase 4**
|
|
724
|
+
|
|
725
|
+
**Documentation & Examples** ๐
|
|
726
|
+
|
|
727
|
+
โ
**10 Examples** - Interactive demos
|
|
728
|
+
โ
**7 API Docs** - Complete references
|
|
729
|
+
โ
**Visual Variants Guide** - Customization
|
|
730
|
+
โ
**Theming Guide** - CSS variables
|
|
731
|
+
โ
**Getting Started** - Quick setup
|
|
732
|
+
|
|
733
|
+
</td>
|
|
734
|
+
</tr>
|
|
735
|
+
</table>
|
|
736
|
+
|
|
737
|
+
### ๐ฎ **Future Components**
|
|
738
|
+
|
|
739
|
+
- ๐ **WorkflowProgress** - Multi-step AI pipeline visualization
|
|
740
|
+
- ๐ **ConfidenceThreshold** - Adjustable confidence sliders with previews
|
|
741
|
+
- ๐ฏ **ModelComparison** - Side-by-side model performance comparison
|
|
742
|
+
- ๐ **MetricsDisplay** - Real-time metrics dashboard for AI operations
|
|
743
|
+
- ๐ค **FileUploadProgress** - Drag-drop file uploads for AI processing
|
|
744
|
+
- ๐ต **TranscriptionProgress** - Real-time audio transcription visualization
|
|
745
|
+
|
|
746
|
+
---
|
|
747
|
+
|
|
748
|
+
## ๏ฟฝ๏ธ Quality & Testing
|
|
749
|
+
|
|
750
|
+
We maintain enterprise-grade quality standards with multiple layers of automated validation:
|
|
751
|
+
|
|
752
|
+
<div align="center">
|
|
753
|
+
|
|
754
|
+
| Validation | Tool | Status | Metric |
|
|
755
|
+
| :------------------: | :--------------: | :----: | :-------------------: |
|
|
756
|
+
| ๐งช **Unit Tests** | Vitest | โ
| 292 tests passing |
|
|
757
|
+
| ๐ **Coverage** | Vitest | โ
| 91.34% (target: 80%) |
|
|
758
|
+
| ๐ **Type Safety** | TypeScript | โ
| Strict mode, 0 errors |
|
|
759
|
+
| โจ **Code Quality** | SonarQube | โ
| 0 critical issues |
|
|
760
|
+
| ๐จ **Formatting** | Prettier | โ
| Auto-formatted |
|
|
761
|
+
| โก **Performance** | Lighthouse | โ
| 95+ scores |
|
|
762
|
+
| โฟ **Accessibility** | Axe + Lighthouse | โ
| WCAG 2.1 AA |
|
|
763
|
+
| ๐ **Security** | npm audit | โ
| 0 vulnerabilities |
|
|
764
|
+
|
|
765
|
+
**[๐ View Full Quality Guide](./docs/quality.md)**
|
|
766
|
+
|
|
767
|
+
</div>
|
|
768
|
+
|
|
769
|
+
---
|
|
770
|
+
|
|
771
|
+
## ๐ Documentation
|
|
772
|
+
|
|
773
|
+
<div align="center">
|
|
774
|
+
|
|
775
|
+
| Resource | Description | Link |
|
|
776
|
+
| :--------------------: | -------------------------------- | :---------------------------------------------: |
|
|
777
|
+
| ๐ **Getting Started** | Setup guide for all frameworks | [View](./docs/getting-started.md) |
|
|
778
|
+
| ๐ **API Reference** | Complete API docs (7 components) | [View](./docs/api/) |
|
|
779
|
+
| ๐ฎ **Examples** | 10 interactive examples | [View](./examples/) |
|
|
780
|
+
| ๐จ **Visual Variants** | Customization & animations | [View](./docs/visual-variants.md) |
|
|
781
|
+
| ๐๏ธ **Theming Guide** | CSS variables & brand themes | [View](./docs/theming.md) |
|
|
782
|
+
| โฟ **Accessibility** | WCAG compliance details | [View](./docs/getting-started.md#accessibility) |
|
|
783
|
+
|
|
784
|
+
</div>
|
|
785
|
+
|
|
786
|
+
---
|
|
787
|
+
|
|
788
|
+
## ๐ค Contributing
|
|
789
|
+
|
|
790
|
+
Contributions welcome! This is an open-source project aimed at improving DX for AI application developers.
|
|
791
|
+
|
|
792
|
+
<div align="center">
|
|
793
|
+
|
|
794
|
+
**[Report Issues](https://github.com/Maneesh-Relanto/ai-progress-controls/issues)** โข
|
|
795
|
+
**[Suggest Features](https://github.com/Maneesh-Relanto/ai-progress-controls/discussions)** โข
|
|
796
|
+
**[Submit PRs](https://github.com/Maneesh-Relanto/ai-progress-controls/pulls)**
|
|
797
|
+
|
|
798
|
+
</div>
|
|
799
|
+
|
|
800
|
+
---
|
|
801
|
+
|
|
802
|
+
## ๐ License
|
|
803
|
+
|
|
804
|
+
<div align="center">
|
|
805
|
+
|
|
806
|
+
**MIT License** - See [LICENSE](LICENSE) file for details
|
|
807
|
+
|
|
808
|
+
Copyright ยฉ 2026 Maneesh Thakur
|
|
809
|
+
|
|
810
|
+
</div>
|
|
811
|
+
|
|
812
|
+
---
|
|
813
|
+
|
|
814
|
+
<div align="center">
|
|
815
|
+
|
|
816
|
+
### **Built with โค๏ธ for the AI developer community**
|
|
817
|
+
|
|
818
|
+
โญ **Star this repo** if you find it useful! โญ
|
|
819
|
+
|
|
820
|
+
[](https://github.com/Maneesh-Relanto/ai-progress-controls)
|
|
821
|
+
[](https://github.com/Maneesh-Relanto)
|
|
822
|
+
|
|
823
|
+
</div>
|