tekivex-ui 2.5.10 → 2.5.12
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/dist/TkxForm-1KDzoniV.cjs +12 -0
- package/dist/TkxForm-9-W3Nl6m.js +314 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +543 -507
- package/dist/chunk-Bmb41Sf3.cjs +1 -0
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +428 -447
- package/dist/hooks-6pRsPOyG.js +58 -0
- package/dist/hooks-mivgRljH.cjs +1 -0
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.js +728 -752
- package/dist/index.cjs +46 -23
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16103 -16237
- package/dist/quantum.cjs +14 -16
- package/dist/quantum.js +2473 -2279
- package/dist/realtime.cjs +4 -10
- package/dist/realtime.js +804 -958
- package/dist/src/components/TkxAIChatBubble.d.ts +24 -0
- package/dist/src/components/TkxAIChatBubble.d.ts.map +1 -0
- package/dist/src/components/TkxAIConfidenceBar.d.ts +17 -0
- package/dist/src/components/TkxAIConfidenceBar.d.ts.map +1 -0
- package/dist/src/components/TkxAIThinking.d.ts +17 -0
- package/dist/src/components/TkxAIThinking.d.ts.map +1 -0
- package/dist/src/components/TkxClock.d.ts.map +1 -1
- package/dist/src/components/TkxForm.d.ts.map +1 -1
- package/dist/src/components/TkxLiveFeed.d.ts +1 -1
- package/dist/src/components/TkxLiveLog.d.ts +1 -1
- package/dist/src/components/TkxRealTimeChart.d.ts +1 -1
- package/dist/src/components/TkxTooltip.d.ts.map +1 -1
- package/dist/src/components/TkxTypography.d.ts +5 -5
- package/dist/src/components/TkxTypography.d.ts.map +1 -1
- package/dist/src/components/index.d.ts +3 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/tekivex-ui.css +2 -0
- package/dist/themes-BbJanqiC.js +498 -0
- package/dist/themes-CMq2vWXj.cjs +2 -0
- package/dist/tkx-0oAwZqgL.cjs +4 -0
- package/dist/tkx-DQkvHdE5.js +1172 -0
- package/package.json +16 -16
- package/src/components/TkxAIChatBubble.tsx +209 -0
- package/src/components/TkxAIConfidenceBar.tsx +131 -0
- package/src/components/TkxAIThinking.tsx +191 -0
- package/src/components/TkxClock.tsx +2 -2
- package/src/components/TkxForm.tsx +4 -2
- package/src/components/TkxTooltip.tsx +7 -5
- package/src/components/TkxTypography.tsx +2 -2
- package/src/components/index.ts +5 -0
- package/dist/TkxForm-2tGLCPH6.js +0 -326
- package/dist/TkxForm-C2VqR2wC.cjs +0 -12
- package/dist/index-BgHMZe4Z.js +0 -66
- package/dist/index-Bt5y50Qa.cjs +0 -1
- package/dist/index-DnqXtpwV.cjs +0 -2
- package/dist/index-iUUHRxqJ.js +0 -515
- package/dist/security-C-ZPGoyG.js +0 -97
- package/dist/security-Uf0mjv8o.cjs +0 -1
- package/dist/style.css +0 -1
- package/dist/tkx-BtHzWKTl.js +0 -1112
- package/dist/tkx-C7GvVUE9.cjs +0 -4
package/dist/realtime.js
CHANGED
|
@@ -1,958 +1,804 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
.
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
})
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
}
|
|
678
|
-
function
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
"div",
|
|
806
|
-
{ style: r },
|
|
807
|
-
...Object.entries(e).map(
|
|
808
|
-
([a, s]) => n(
|
|
809
|
-
"span",
|
|
810
|
-
{
|
|
811
|
-
key: a,
|
|
812
|
-
style: {
|
|
813
|
-
fontSize: 11,
|
|
814
|
-
fontFamily: "monospace",
|
|
815
|
-
color: t.textMuted,
|
|
816
|
-
background: t.surface,
|
|
817
|
-
border: `1px solid ${t.border}`,
|
|
818
|
-
borderRadius: 4,
|
|
819
|
-
padding: "1px 6px"
|
|
820
|
-
}
|
|
821
|
-
},
|
|
822
|
-
n("span", { style: { color: t.info } }, `${L(a)}: `),
|
|
823
|
-
L(String(s))
|
|
824
|
-
)
|
|
825
|
-
)
|
|
826
|
-
);
|
|
827
|
-
}
|
|
828
|
-
function et({
|
|
829
|
-
entries: e,
|
|
830
|
-
maxEntries: t = 500,
|
|
831
|
-
height: o = 400,
|
|
832
|
-
autoScroll: r = !0,
|
|
833
|
-
showLevel: a = !0,
|
|
834
|
-
showTimestamp: s = !0,
|
|
835
|
-
showSource: f = !0,
|
|
836
|
-
filterLevel: u,
|
|
837
|
-
searchQuery: h = "",
|
|
838
|
-
monospace: l = !0,
|
|
839
|
-
onEntryClick: y
|
|
840
|
-
}) {
|
|
841
|
-
const v = ee();
|
|
842
|
-
je();
|
|
843
|
-
const k = D(null), [b, x] = W(0), [C, N] = W(/* @__PURE__ */ new Set()), [V, R] = W(!1), $ = D(e.length), w = Q(() => {
|
|
844
|
-
let d = e.slice(-t);
|
|
845
|
-
if (u !== void 0) {
|
|
846
|
-
const c = ye[u];
|
|
847
|
-
d = d.filter((p) => ye[p.level] >= c);
|
|
848
|
-
}
|
|
849
|
-
if (h) {
|
|
850
|
-
const c = h.toLowerCase();
|
|
851
|
-
d = d.filter(
|
|
852
|
-
(p) => p.message.toLowerCase().includes(c) || (p.source ?? "").toLowerCase().includes(c)
|
|
853
|
-
);
|
|
854
|
-
}
|
|
855
|
-
return d;
|
|
856
|
-
}, [e, t, u, h]), P = typeof o == "number" ? o : 400, Y = 40, H = Q(() => {
|
|
857
|
-
const d = [];
|
|
858
|
-
let c = 0;
|
|
859
|
-
for (const p of w)
|
|
860
|
-
d.push(c), c += Z + (C.has(p.id) ? Y : 0);
|
|
861
|
-
return d.push(c), d;
|
|
862
|
-
}, [w, C]), g = H[H.length - 1] ?? 0;
|
|
863
|
-
B(() => {
|
|
864
|
-
!r || V || w.length !== $.current && ($.current = w.length, k.current && (k.current.scrollTop = k.current.scrollHeight));
|
|
865
|
-
}, [w.length, r, V]);
|
|
866
|
-
const T = K(() => {
|
|
867
|
-
if (!k.current) return;
|
|
868
|
-
const d = k.current, c = d.scrollHeight - d.scrollTop - d.clientHeight < Z * 2;
|
|
869
|
-
R(!c), x(d.scrollTop);
|
|
870
|
-
}, []), G = K((d) => {
|
|
871
|
-
N((c) => {
|
|
872
|
-
const p = new Set(c);
|
|
873
|
-
return p.has(d) ? p.delete(d) : p.add(d), p;
|
|
874
|
-
});
|
|
875
|
-
}, []);
|
|
876
|
-
function z(d) {
|
|
877
|
-
let c = 0, p = w.length - 1;
|
|
878
|
-
for (; c < p; ) {
|
|
879
|
-
const M = c + p >> 1;
|
|
880
|
-
(H[M + 1] ?? 0) <= d ? c = M + 1 : p = M;
|
|
881
|
-
}
|
|
882
|
-
return Math.max(0, c - me);
|
|
883
|
-
}
|
|
884
|
-
function I(d) {
|
|
885
|
-
let c = 0, p = w.length - 1;
|
|
886
|
-
for (; c < p; ) {
|
|
887
|
-
const M = c + p + 1 >> 1;
|
|
888
|
-
(H[M] ?? 0) >= d + P ? p = M - 1 : c = M;
|
|
889
|
-
}
|
|
890
|
-
return Math.min(w.length - 1, c + me);
|
|
891
|
-
}
|
|
892
|
-
const S = w.length > 0 ? z(b) : 0, E = w.length > 0 ? I(b) : -1, j = {
|
|
893
|
-
position: "relative",
|
|
894
|
-
overflow: "auto",
|
|
895
|
-
height: typeof o == "number" ? `${o}px` : o,
|
|
896
|
-
background: v.bg,
|
|
897
|
-
border: `1px solid ${v.border}`,
|
|
898
|
-
borderRadius: 8,
|
|
899
|
-
boxSizing: "border-box"
|
|
900
|
-
}, F = {
|
|
901
|
-
position: "relative",
|
|
902
|
-
height: g,
|
|
903
|
-
minHeight: "100%"
|
|
904
|
-
};
|
|
905
|
-
if (w.length === 0)
|
|
906
|
-
return n(
|
|
907
|
-
"div",
|
|
908
|
-
{ style: { ...j, display: "flex", alignItems: "center", justifyContent: "center" } },
|
|
909
|
-
n("span", { style: { color: v.textMuted, fontSize: 13, fontFamily: "monospace" } }, "No log entries.")
|
|
910
|
-
);
|
|
911
|
-
const A = [];
|
|
912
|
-
for (let d = S; d <= E; d++) {
|
|
913
|
-
const c = w[d];
|
|
914
|
-
if (!c) continue;
|
|
915
|
-
const p = H[d] ?? 0, M = C.has(c.id);
|
|
916
|
-
A.push(
|
|
917
|
-
n(_e, {
|
|
918
|
-
key: c.id,
|
|
919
|
-
entry: c,
|
|
920
|
-
showLevel: a,
|
|
921
|
-
showTimestamp: s,
|
|
922
|
-
showSource: f,
|
|
923
|
-
searchQuery: h,
|
|
924
|
-
monospace: l,
|
|
925
|
-
isExpanded: M,
|
|
926
|
-
onToggle: () => G(c.id),
|
|
927
|
-
onEntryClick: y,
|
|
928
|
-
theme: v,
|
|
929
|
-
style: { position: "absolute", top: p, left: 0, right: 0 }
|
|
930
|
-
})
|
|
931
|
-
), M && c.metadata && Object.keys(c.metadata).length > 0 && A.push(
|
|
932
|
-
n(Ge, {
|
|
933
|
-
key: `${c.id}-meta`,
|
|
934
|
-
metadata: c.metadata,
|
|
935
|
-
theme: v,
|
|
936
|
-
style: { position: "absolute", top: p + Z, left: 0, right: 0, height: Y }
|
|
937
|
-
})
|
|
938
|
-
);
|
|
939
|
-
}
|
|
940
|
-
return n(
|
|
941
|
-
"div",
|
|
942
|
-
{
|
|
943
|
-
ref: k,
|
|
944
|
-
style: j,
|
|
945
|
-
onScroll: T,
|
|
946
|
-
role: "log",
|
|
947
|
-
"aria-live": "polite",
|
|
948
|
-
"aria-label": "Log viewer"
|
|
949
|
-
},
|
|
950
|
-
n("div", { style: F }, ...A)
|
|
951
|
-
);
|
|
952
|
-
}
|
|
953
|
-
export {
|
|
954
|
-
Je as TkxLiveFeed,
|
|
955
|
-
et as TkxLiveLog,
|
|
956
|
-
Ze as TkxLiveMetrics,
|
|
957
|
-
Qe as TkxRealTimeChart
|
|
958
|
-
};
|
|
1
|
+
import { f as e } from "./themes-BbJanqiC.js";
|
|
2
|
+
import { m as t } from "./tkx-DQkvHdE5.js";
|
|
3
|
+
import { createElement as n, useCallback as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
4
|
+
//#region src/components/TkxLiveFeed.tsx
|
|
5
|
+
var c = 64, l = 5, u = !1;
|
|
6
|
+
function d() {
|
|
7
|
+
if (u || typeof document > "u") return;
|
|
8
|
+
u = !0;
|
|
9
|
+
let e = document.createElement("style");
|
|
10
|
+
e.id = "tkx-live-feed-styles", e.textContent = "@keyframes tkx-feed-slide-in {\n from { transform: translateY(-20px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n.tkx-feed-item-new {\n animation: tkx-feed-slide-in 0.25s ease-out both;\n}", document.head.appendChild(e);
|
|
11
|
+
}
|
|
12
|
+
function f(e) {
|
|
13
|
+
let t = Date.now() - e;
|
|
14
|
+
return t < 1e4 ? "just now" : t < 6e4 ? `${Math.floor(t / 1e3)}s ago` : t < 36e5 ? `${Math.floor(t / 6e4)}m ago` : t < 864e5 ? `${Math.floor(t / 36e5)}h ago` : `${Math.floor(t / 864e5)}d ago`;
|
|
15
|
+
}
|
|
16
|
+
function p(e, t) {
|
|
17
|
+
switch (e) {
|
|
18
|
+
case "info": return t.info;
|
|
19
|
+
case "success": return t.success;
|
|
20
|
+
case "warning": return t.warning;
|
|
21
|
+
case "error": return t.danger;
|
|
22
|
+
default: return t.border;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function m(e) {
|
|
26
|
+
return e ? e.split(" ").map((e) => e[0] ?? "").slice(0, 2).join("").toUpperCase() : "?";
|
|
27
|
+
}
|
|
28
|
+
function h({ item: e, isNew: r, showTimestamps: i, onItemClick: a, renderItem: o, theme: s, style: l }) {
|
|
29
|
+
let u = p(e.type, s);
|
|
30
|
+
return o ? n("div", {
|
|
31
|
+
style: l,
|
|
32
|
+
className: r ? "tkx-feed-item-new" : void 0
|
|
33
|
+
}, o(e)) : n("div", {
|
|
34
|
+
style: {
|
|
35
|
+
...l,
|
|
36
|
+
display: "flex",
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
gap: 10,
|
|
39
|
+
padding: "0 12px",
|
|
40
|
+
borderLeft: `3px solid ${u}`,
|
|
41
|
+
cursor: a ? "pointer" : "default",
|
|
42
|
+
boxSizing: "border-box",
|
|
43
|
+
height: c,
|
|
44
|
+
background: s.surface,
|
|
45
|
+
transition: "background 0.15s"
|
|
46
|
+
},
|
|
47
|
+
className: r ? "tkx-feed-item-new" : void 0,
|
|
48
|
+
onClick: a ? () => a(e) : void 0,
|
|
49
|
+
role: a ? "button" : void 0,
|
|
50
|
+
tabIndex: a ? 0 : void 0,
|
|
51
|
+
onKeyDown: a ? (t) => {
|
|
52
|
+
(t.key === "Enter" || t.key === " ") && a(e);
|
|
53
|
+
} : void 0
|
|
54
|
+
}, n("div", { style: {
|
|
55
|
+
width: 36,
|
|
56
|
+
height: 36,
|
|
57
|
+
borderRadius: "50%",
|
|
58
|
+
background: u,
|
|
59
|
+
display: "flex",
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
justifyContent: "center",
|
|
62
|
+
fontSize: 13,
|
|
63
|
+
fontWeight: 700,
|
|
64
|
+
color: s.bg,
|
|
65
|
+
flexShrink: 0,
|
|
66
|
+
overflow: "hidden"
|
|
67
|
+
} }, e.avatar ? n("img", {
|
|
68
|
+
src: e.avatar,
|
|
69
|
+
alt: e.author ?? "",
|
|
70
|
+
style: {
|
|
71
|
+
width: "100%",
|
|
72
|
+
height: "100%",
|
|
73
|
+
objectFit: "cover"
|
|
74
|
+
}
|
|
75
|
+
}) : m(e.author)), n("div", { style: {
|
|
76
|
+
flex: 1,
|
|
77
|
+
minWidth: 0
|
|
78
|
+
} }, n("div", { style: {
|
|
79
|
+
display: "flex",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
gap: 6,
|
|
82
|
+
marginBottom: 2
|
|
83
|
+
} }, e.author && n("span", { style: {
|
|
84
|
+
fontWeight: 600,
|
|
85
|
+
fontSize: 13,
|
|
86
|
+
color: s.text
|
|
87
|
+
} }, t(e.author)), e.meta && n("span", { style: {
|
|
88
|
+
fontSize: 11,
|
|
89
|
+
color: s.textMuted,
|
|
90
|
+
background: s.surfaceAlt,
|
|
91
|
+
borderRadius: 4,
|
|
92
|
+
padding: "1px 5px"
|
|
93
|
+
} }, t(e.meta))), n("div", { style: {
|
|
94
|
+
fontSize: 13,
|
|
95
|
+
color: s.text,
|
|
96
|
+
overflow: "hidden",
|
|
97
|
+
textOverflow: "ellipsis",
|
|
98
|
+
whiteSpace: "nowrap"
|
|
99
|
+
} }, t(e.content))), i && n("div", { style: {
|
|
100
|
+
fontSize: 11,
|
|
101
|
+
color: s.textMuted,
|
|
102
|
+
flexShrink: 0
|
|
103
|
+
} }, f(e.timestamp)));
|
|
104
|
+
}
|
|
105
|
+
function g({ items: u, maxItems: f = 100, height: p = 400, autoScroll: m = !0, showTimestamps: g = !0, onItemClick: _, emptyMessage: v = "No activity yet.", pauseOnHover: y = !0, renderItem: b }) {
|
|
106
|
+
let x = e();
|
|
107
|
+
d();
|
|
108
|
+
let S = o(null), [C, w] = s(0), [T, E] = s(!1), [D, O] = s(/* @__PURE__ */ new Set()), k = o([]), A = a(() => u.slice(-f), [u, f]), j = typeof p == "number" ? p : 400, M = A.length * c;
|
|
109
|
+
i(() => {
|
|
110
|
+
let e = new Set(k.current.map((e) => e.id)), t = A.filter((t) => !e.has(t.id)).map((e) => e.id);
|
|
111
|
+
if (t.length > 0) {
|
|
112
|
+
O((e) => {
|
|
113
|
+
let n = new Set(e);
|
|
114
|
+
return t.forEach((e) => n.add(e)), n;
|
|
115
|
+
});
|
|
116
|
+
let e = window.setTimeout(() => {
|
|
117
|
+
O((e) => {
|
|
118
|
+
let n = new Set(e);
|
|
119
|
+
return t.forEach((e) => n.delete(e)), n;
|
|
120
|
+
});
|
|
121
|
+
}, 400);
|
|
122
|
+
return () => clearTimeout(e);
|
|
123
|
+
}
|
|
124
|
+
}, [A]), i(() => {
|
|
125
|
+
k.current = A;
|
|
126
|
+
}, [A]);
|
|
127
|
+
let N = m && !(y && T);
|
|
128
|
+
i(() => {
|
|
129
|
+
if (!N || !S.current) return;
|
|
130
|
+
let e = S.current;
|
|
131
|
+
(e.scrollHeight - e.scrollTop - e.clientHeight < c * 3 || A.length <= 5) && (e.scrollTop = e.scrollHeight);
|
|
132
|
+
}, [A.length, N]);
|
|
133
|
+
let P = r(() => {
|
|
134
|
+
S.current && w(S.current.scrollTop);
|
|
135
|
+
}, []), F = Math.max(0, Math.floor(C / c) - l), I = Math.min(A.length - 1, Math.ceil((C + j) / c) + l), L = {
|
|
136
|
+
position: "relative",
|
|
137
|
+
overflow: "auto",
|
|
138
|
+
height: typeof p == "number" ? `${p}px` : p,
|
|
139
|
+
background: x.bg,
|
|
140
|
+
border: `1px solid ${x.border}`,
|
|
141
|
+
borderRadius: 8,
|
|
142
|
+
boxSizing: "border-box"
|
|
143
|
+
}, R = {
|
|
144
|
+
position: "relative",
|
|
145
|
+
height: M,
|
|
146
|
+
minHeight: "100%"
|
|
147
|
+
};
|
|
148
|
+
if (A.length === 0) return n("div", { style: {
|
|
149
|
+
...L,
|
|
150
|
+
display: "flex",
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
justifyContent: "center"
|
|
153
|
+
} }, n("span", { style: {
|
|
154
|
+
color: x.textMuted,
|
|
155
|
+
fontSize: 14
|
|
156
|
+
} }, t(v)));
|
|
157
|
+
let z = [];
|
|
158
|
+
for (let e = F; e <= I; e++) {
|
|
159
|
+
let t = A[e];
|
|
160
|
+
t && z.push(n(h, {
|
|
161
|
+
key: t.id,
|
|
162
|
+
item: t,
|
|
163
|
+
isNew: D.has(t.id),
|
|
164
|
+
showTimestamps: g,
|
|
165
|
+
onItemClick: _,
|
|
166
|
+
renderItem: b,
|
|
167
|
+
theme: x,
|
|
168
|
+
style: {
|
|
169
|
+
position: "absolute",
|
|
170
|
+
top: e * c,
|
|
171
|
+
left: 0,
|
|
172
|
+
right: 0
|
|
173
|
+
}
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
return n("div", {
|
|
177
|
+
ref: S,
|
|
178
|
+
style: L,
|
|
179
|
+
onScroll: P,
|
|
180
|
+
onMouseEnter: y ? () => E(!0) : void 0,
|
|
181
|
+
onMouseLeave: y ? () => E(!1) : void 0,
|
|
182
|
+
"aria-label": "Live feed",
|
|
183
|
+
role: "feed"
|
|
184
|
+
}, n("div", { style: R }, ...z));
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/components/TkxLiveMetrics.tsx
|
|
188
|
+
var _ = !1;
|
|
189
|
+
function v() {
|
|
190
|
+
if (_ || typeof document > "u") return;
|
|
191
|
+
_ = !0;
|
|
192
|
+
let e = document.createElement("style");
|
|
193
|
+
e.id = "tkx-live-metrics-styles", e.textContent = "@keyframes tkx-metric-pulse {\n 0% { opacity: 1; }\n 40% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@keyframes tkx-metric-shimmer {\n 0% { background-position: -200% 0; }\n 100% { background-position: 200% 0; }\n}\n.tkx-metric-shimmer {\n animation: tkx-metric-shimmer 0.6s ease-in-out;\n}\n@media (prefers-reduced-motion: reduce) {\n .tkx-metric-shimmer { animation: none; }\n .tkx-metric-pulse { animation: none; }\n}", document.head.appendChild(e);
|
|
194
|
+
}
|
|
195
|
+
function y(e, t) {
|
|
196
|
+
if (typeof e == "string") return e;
|
|
197
|
+
let n = e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : String(Number.isInteger(e) ? e : e.toFixed(2));
|
|
198
|
+
return t ? `${n}${t}` : n;
|
|
199
|
+
}
|
|
200
|
+
function b(e, t) {
|
|
201
|
+
switch (e) {
|
|
202
|
+
case "warning": return t.warning;
|
|
203
|
+
case "critical": return t.danger;
|
|
204
|
+
default: return t.primary;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function x() {
|
|
208
|
+
let [e, t] = s(() => typeof window < "u" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1);
|
|
209
|
+
return i(() => {
|
|
210
|
+
if (typeof window > "u") return;
|
|
211
|
+
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), n = (e) => t(e.matches);
|
|
212
|
+
return e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
213
|
+
}, []), e;
|
|
214
|
+
}
|
|
215
|
+
function S(e, t, n) {
|
|
216
|
+
let [r, a] = s(e), c = o(e), l = o(null), u = o(null), d = x();
|
|
217
|
+
return i(() => {
|
|
218
|
+
if (!n || d) {
|
|
219
|
+
a(e), c.current = e;
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
let r = c.current;
|
|
223
|
+
if (r === e) return;
|
|
224
|
+
l.current = null;
|
|
225
|
+
let i = (n) => {
|
|
226
|
+
l.current === null && (l.current = n);
|
|
227
|
+
let o = n - l.current, s = Math.min(o / t, 1), d = 1 - (1 - s) ** 3;
|
|
228
|
+
a(r + (e - r) * d), s < 1 ? u.current = requestAnimationFrame(i) : c.current = e;
|
|
229
|
+
};
|
|
230
|
+
return u.current = requestAnimationFrame(i), () => {
|
|
231
|
+
u.current !== null && cancelAnimationFrame(u.current);
|
|
232
|
+
};
|
|
233
|
+
}, [
|
|
234
|
+
e,
|
|
235
|
+
t,
|
|
236
|
+
n,
|
|
237
|
+
d
|
|
238
|
+
]), r;
|
|
239
|
+
}
|
|
240
|
+
function C({ data: e, color: t }) {
|
|
241
|
+
if (e.length < 2) return null;
|
|
242
|
+
let r = Math.min(...e), i = Math.max(...e) - r || 1;
|
|
243
|
+
return n("svg", {
|
|
244
|
+
width: 80,
|
|
245
|
+
height: 24,
|
|
246
|
+
viewBox: "0 0 80 24",
|
|
247
|
+
"aria-hidden": "true"
|
|
248
|
+
}, n("polyline", {
|
|
249
|
+
points: e.map((t, n) => {
|
|
250
|
+
let a = n / (e.length - 1) * 80, o = 24 - (t - r) / i * 22 - 1;
|
|
251
|
+
return `${a.toFixed(1)},${o.toFixed(1)}`;
|
|
252
|
+
}).join(" "),
|
|
253
|
+
fill: "none",
|
|
254
|
+
stroke: t,
|
|
255
|
+
strokeWidth: 1.5,
|
|
256
|
+
strokeLinejoin: "round",
|
|
257
|
+
strokeLinecap: "round"
|
|
258
|
+
}));
|
|
259
|
+
}
|
|
260
|
+
function w({ trend: e, theme: t }) {
|
|
261
|
+
return e === "up" ? n("span", { style: {
|
|
262
|
+
color: t.success,
|
|
263
|
+
fontSize: 14,
|
|
264
|
+
fontWeight: 700
|
|
265
|
+
} }, "▲") : e === "down" ? n("span", { style: {
|
|
266
|
+
color: t.danger,
|
|
267
|
+
fontSize: 14,
|
|
268
|
+
fontWeight: 700
|
|
269
|
+
} }, "▼") : n("span", { style: {
|
|
270
|
+
color: t.textMuted,
|
|
271
|
+
fontSize: 14
|
|
272
|
+
} }, "→");
|
|
273
|
+
}
|
|
274
|
+
function T({ metric: e, animate: r, onMetricClick: a, theme: c }) {
|
|
275
|
+
let l = e.color ?? b(e.status, c), u = typeof e.value == "number" ? e.value : NaN, d = S(isNaN(u) ? 0 : u, 600, r && !isNaN(u)), [f, p] = s(!1), m = o(e.value);
|
|
276
|
+
i(() => {
|
|
277
|
+
if (m.current !== e.value) {
|
|
278
|
+
m.current = e.value, p(!0);
|
|
279
|
+
let t = window.setTimeout(() => p(!1), 700);
|
|
280
|
+
return () => clearTimeout(t);
|
|
281
|
+
}
|
|
282
|
+
}, [e.value]);
|
|
283
|
+
let h = e.previousValue !== void 0 && e.previousValue !== u, g = {
|
|
284
|
+
background: c.surface,
|
|
285
|
+
border: `1px solid ${c.border}`,
|
|
286
|
+
borderLeft: `4px solid ${l}`,
|
|
287
|
+
borderRadius: 8,
|
|
288
|
+
padding: "14px 16px",
|
|
289
|
+
cursor: a ? "pointer" : "default",
|
|
290
|
+
position: "relative",
|
|
291
|
+
overflow: "hidden",
|
|
292
|
+
boxSizing: "border-box"
|
|
293
|
+
}, _ = f ? {
|
|
294
|
+
position: "absolute",
|
|
295
|
+
inset: 0,
|
|
296
|
+
background: `linear-gradient(90deg, transparent 0%, ${l}22 50%, transparent 100%)`,
|
|
297
|
+
backgroundSize: "200% 100%",
|
|
298
|
+
animation: "tkx-metric-shimmer 0.6s ease-in-out",
|
|
299
|
+
pointerEvents: "none"
|
|
300
|
+
} : {}, v = isNaN(u) ? t(String(e.value)) : y(d, e.unit);
|
|
301
|
+
return n("div", {
|
|
302
|
+
style: g,
|
|
303
|
+
className: f ? "tkx-metric-shimmer" : void 0,
|
|
304
|
+
onClick: a ? () => a(e) : void 0,
|
|
305
|
+
role: a ? "button" : void 0,
|
|
306
|
+
tabIndex: a ? 0 : void 0
|
|
307
|
+
}, f && n("div", { style: _ }), n("div", { style: {
|
|
308
|
+
fontSize: 12,
|
|
309
|
+
color: c.textMuted,
|
|
310
|
+
marginBottom: 6,
|
|
311
|
+
fontWeight: 500,
|
|
312
|
+
letterSpacing: "0.03em"
|
|
313
|
+
} }, t(e.label)), n("div", { style: {
|
|
314
|
+
display: "flex",
|
|
315
|
+
alignItems: "flex-end",
|
|
316
|
+
gap: 6,
|
|
317
|
+
marginBottom: 6
|
|
318
|
+
} }, n("span", { style: {
|
|
319
|
+
fontSize: 28,
|
|
320
|
+
fontWeight: 700,
|
|
321
|
+
color: c.text,
|
|
322
|
+
lineHeight: 1
|
|
323
|
+
} }, v), e.unit && isNaN(u) && n("span", { style: {
|
|
324
|
+
fontSize: 14,
|
|
325
|
+
color: c.textMuted,
|
|
326
|
+
marginBottom: 2
|
|
327
|
+
} }, t(e.unit))), (e.trend || e.trendValue) && n("div", { style: {
|
|
328
|
+
display: "flex",
|
|
329
|
+
alignItems: "center",
|
|
330
|
+
gap: 4,
|
|
331
|
+
marginBottom: e.sparkline ? 8 : 0
|
|
332
|
+
} }, e.trend && n(w, {
|
|
333
|
+
trend: e.trend,
|
|
334
|
+
theme: c
|
|
335
|
+
}), e.trendValue && n("span", { style: {
|
|
336
|
+
fontSize: 12,
|
|
337
|
+
color: c.textMuted
|
|
338
|
+
} }, t(e.trendValue))), h && n("div", { style: {
|
|
339
|
+
fontSize: 11,
|
|
340
|
+
color: c.textMuted,
|
|
341
|
+
marginTop: 2
|
|
342
|
+
} }, `was ${y(e.previousValue)}`), e.sparkline && e.sparkline.length >= 2 && n("div", { style: { marginTop: 8 } }, n(C, {
|
|
343
|
+
data: e.sparkline,
|
|
344
|
+
color: l
|
|
345
|
+
})));
|
|
346
|
+
}
|
|
347
|
+
function E({ metrics: t, columns: r = 3, animate: i = !0, onMetricClick: a }) {
|
|
348
|
+
let o = e();
|
|
349
|
+
return v(), n("div", { style: {
|
|
350
|
+
display: "grid",
|
|
351
|
+
gridTemplateColumns: `repeat(${r}, minmax(0, 1fr))`,
|
|
352
|
+
gap: 16
|
|
353
|
+
} }, ...t.map((e) => n(T, {
|
|
354
|
+
key: e.id,
|
|
355
|
+
metric: e,
|
|
356
|
+
animate: i,
|
|
357
|
+
onMetricClick: a,
|
|
358
|
+
theme: o
|
|
359
|
+
})));
|
|
360
|
+
}
|
|
361
|
+
//#endregion
|
|
362
|
+
//#region src/components/TkxRealTimeChart.tsx
|
|
363
|
+
function D(e) {
|
|
364
|
+
let t = new Date(e);
|
|
365
|
+
return `${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}:${String(t.getSeconds()).padStart(2, "0")}`;
|
|
366
|
+
}
|
|
367
|
+
function O(e) {
|
|
368
|
+
return Math.abs(e) >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : Math.abs(e) >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : Number.isInteger(e) ? String(e) : e.toFixed(2);
|
|
369
|
+
}
|
|
370
|
+
function k({ data: c, maxPoints: l = 60, height: u = 200, width: d = "100%", color: f, fill: p = !0, showGrid: m = !0, showLabels: h = !0, showTooltip: g = !0, label: _, unit: v, animate: y = !0, yMin: b, yMax: x }) {
|
|
371
|
+
let S = e(), C = f ?? S.primary, w = o(null), [T, E] = s(600), [k, A] = s(null), [j, M] = s(0), N = o(c.length);
|
|
372
|
+
i(() => {
|
|
373
|
+
if (!w.current) return;
|
|
374
|
+
let e = new ResizeObserver((e) => {
|
|
375
|
+
let t = e[0];
|
|
376
|
+
t && E(t.contentRect.width);
|
|
377
|
+
});
|
|
378
|
+
return e.observe(w.current), E(w.current.offsetWidth), () => e.disconnect();
|
|
379
|
+
}, []);
|
|
380
|
+
let P = a(() => c.slice(-l), [c, l]);
|
|
381
|
+
i(() => {
|
|
382
|
+
P.length > N.current && M((e) => e + 1), N.current = P.length;
|
|
383
|
+
}, [P.length]);
|
|
384
|
+
let F = h ? 48 : 12, I = _ ? 28 : 12, L = Math.max(T - F - 12, 1), R = Math.max(u - I - 28, 1), z = P.length ? Math.min(...P.map((e) => e.value)) : 0, B = P.length ? Math.max(...P.map((e) => e.value)) : 1, V = B - z || 1, H = b === void 0 ? z - V * .1 : b, U = (x === void 0 ? B + V * .1 : x) - H || 1;
|
|
385
|
+
function W(e) {
|
|
386
|
+
return P.length < 2 ? L / 2 : e / (P.length - 1) * L;
|
|
387
|
+
}
|
|
388
|
+
function G(e) {
|
|
389
|
+
return R - (e - H) / U * R;
|
|
390
|
+
}
|
|
391
|
+
let K = P.length >= 2 ? P.map((e, t) => `${t === 0 ? "M" : "L"}${W(t).toFixed(2)},${G(e.value).toFixed(2)}`).join(" ") : "", q = K ? `${K} L${W(P.length - 1).toFixed(2)},${R} L${W(0).toFixed(2)},${R} Z` : "", J = [];
|
|
392
|
+
for (let e = 0; e <= 4; e++) J.push(e);
|
|
393
|
+
let Y = J.map((e) => {
|
|
394
|
+
let t = H + e / 4 * U;
|
|
395
|
+
return {
|
|
396
|
+
y: G(t),
|
|
397
|
+
text: O(t)
|
|
398
|
+
};
|
|
399
|
+
}), X = Math.min(4, P.length), ee = X > 0 ? Array.from({ length: X }, (e, t) => Math.round(t / Math.max(X - 1, 1) * (P.length - 1))) : [], te = r((e) => {
|
|
400
|
+
if (!g || P.length === 0) return;
|
|
401
|
+
let t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left - F, r = 0, i = Infinity;
|
|
402
|
+
P.forEach((e, t) => {
|
|
403
|
+
let a = Math.abs(W(t) - n);
|
|
404
|
+
a < i && (i = a, r = t);
|
|
405
|
+
});
|
|
406
|
+
let a = P[r];
|
|
407
|
+
a && A({
|
|
408
|
+
x: W(r) + F,
|
|
409
|
+
y: G(a.value) + I,
|
|
410
|
+
point: a
|
|
411
|
+
});
|
|
412
|
+
}, [
|
|
413
|
+
P,
|
|
414
|
+
g,
|
|
415
|
+
F,
|
|
416
|
+
I
|
|
417
|
+
]), ne = r(() => A(null), []), Z = T, Q = u, $ = `tkx-chart-clip-${j}`;
|
|
418
|
+
return n("div", {
|
|
419
|
+
ref: w,
|
|
420
|
+
style: {
|
|
421
|
+
position: "relative",
|
|
422
|
+
width: typeof d == "number" ? `${d}px` : d,
|
|
423
|
+
background: S.surface,
|
|
424
|
+
border: `1px solid ${S.border}`,
|
|
425
|
+
borderRadius: 8,
|
|
426
|
+
overflow: "hidden",
|
|
427
|
+
boxSizing: "border-box"
|
|
428
|
+
}
|
|
429
|
+
}, n("svg", {
|
|
430
|
+
width: Z,
|
|
431
|
+
height: Q,
|
|
432
|
+
viewBox: `0 0 ${Z} ${Q}`,
|
|
433
|
+
onMouseMove: te,
|
|
434
|
+
onMouseLeave: ne,
|
|
435
|
+
style: {
|
|
436
|
+
display: "block",
|
|
437
|
+
userSelect: "none"
|
|
438
|
+
},
|
|
439
|
+
"aria-label": _ ? t(_) : "Real-time chart"
|
|
440
|
+
}, y && P.length >= 2 && n("defs", null, n("clipPath", { id: $ }, n("rect", {
|
|
441
|
+
x: 0,
|
|
442
|
+
y: 0,
|
|
443
|
+
width: L,
|
|
444
|
+
height: Q
|
|
445
|
+
}, n("animate", {
|
|
446
|
+
attributeName: "width",
|
|
447
|
+
from: Math.max(0, L - L / Math.max(P.length - 1, 1)),
|
|
448
|
+
to: L,
|
|
449
|
+
dur: "0.3s",
|
|
450
|
+
fill: "freeze"
|
|
451
|
+
})))), _ && n("text", {
|
|
452
|
+
x: F,
|
|
453
|
+
y: 18,
|
|
454
|
+
fill: S.textMuted,
|
|
455
|
+
fontSize: 12,
|
|
456
|
+
fontWeight: 500
|
|
457
|
+
}, t(_)), m && J.map((e) => {
|
|
458
|
+
let t = G(H + e / 4 * U) + I;
|
|
459
|
+
return n("line", {
|
|
460
|
+
key: `grid-${e}`,
|
|
461
|
+
x1: F,
|
|
462
|
+
y1: t,
|
|
463
|
+
x2: F + L,
|
|
464
|
+
y2: t,
|
|
465
|
+
stroke: S.border,
|
|
466
|
+
strokeWidth: 1,
|
|
467
|
+
strokeDasharray: "4 4"
|
|
468
|
+
});
|
|
469
|
+
}), h && Y.map((e, t) => n("text", {
|
|
470
|
+
key: `yl-${t}`,
|
|
471
|
+
x: F - 4,
|
|
472
|
+
y: e.y + I + 4,
|
|
473
|
+
fill: S.textMuted,
|
|
474
|
+
fontSize: 10,
|
|
475
|
+
textAnchor: "end"
|
|
476
|
+
}, e.text)), v && n("text", {
|
|
477
|
+
x: 4,
|
|
478
|
+
y: I + 10,
|
|
479
|
+
fill: S.textMuted,
|
|
480
|
+
fontSize: 9
|
|
481
|
+
}, t(v)), p && q && n("path", {
|
|
482
|
+
d: q,
|
|
483
|
+
fill: `${C}22`,
|
|
484
|
+
clipPath: y ? `url(#${$})` : void 0,
|
|
485
|
+
transform: `translate(${F}, ${I})`
|
|
486
|
+
}), K && n("path", {
|
|
487
|
+
d: K,
|
|
488
|
+
fill: "none",
|
|
489
|
+
stroke: C,
|
|
490
|
+
strokeWidth: 2,
|
|
491
|
+
strokeLinejoin: "round",
|
|
492
|
+
strokeLinecap: "round",
|
|
493
|
+
clipPath: y ? `url(#${$})` : void 0,
|
|
494
|
+
transform: `translate(${F}, ${I})`
|
|
495
|
+
}), ee.map((e) => {
|
|
496
|
+
let t = P[e];
|
|
497
|
+
return t ? n("text", {
|
|
498
|
+
key: `xl-${e}`,
|
|
499
|
+
x: F + W(e),
|
|
500
|
+
y: Q - 8,
|
|
501
|
+
fill: S.textMuted,
|
|
502
|
+
fontSize: 9,
|
|
503
|
+
textAnchor: "middle"
|
|
504
|
+
}, D(t.timestamp)) : null;
|
|
505
|
+
}), k && n("line", {
|
|
506
|
+
x1: k.x,
|
|
507
|
+
y1: I,
|
|
508
|
+
x2: k.x,
|
|
509
|
+
y2: I + R,
|
|
510
|
+
stroke: C,
|
|
511
|
+
strokeWidth: 1,
|
|
512
|
+
strokeDasharray: "3 3",
|
|
513
|
+
opacity: .6
|
|
514
|
+
}), k && n("circle", {
|
|
515
|
+
cx: k.x,
|
|
516
|
+
cy: k.y,
|
|
517
|
+
r: 4,
|
|
518
|
+
fill: C,
|
|
519
|
+
stroke: S.surface,
|
|
520
|
+
strokeWidth: 2
|
|
521
|
+
}), k && (() => {
|
|
522
|
+
let e = Math.min(k.x + 8, Z - 100), t = Math.max(k.y - 36, 4), r = `${O(k.point.value)}${v || ""}`, i = D(k.point.timestamp);
|
|
523
|
+
return n("g", null, n("rect", {
|
|
524
|
+
x: e - 4,
|
|
525
|
+
y: t - 2,
|
|
526
|
+
width: 90,
|
|
527
|
+
height: 34,
|
|
528
|
+
rx: 4,
|
|
529
|
+
fill: S.surfaceAlt,
|
|
530
|
+
stroke: S.border,
|
|
531
|
+
strokeWidth: 1
|
|
532
|
+
}), n("text", {
|
|
533
|
+
x: e,
|
|
534
|
+
y: t + 11,
|
|
535
|
+
fill: S.text,
|
|
536
|
+
fontSize: 12,
|
|
537
|
+
fontWeight: 700
|
|
538
|
+
}, r), n("text", {
|
|
539
|
+
x: e,
|
|
540
|
+
y: t + 26,
|
|
541
|
+
fill: S.textMuted,
|
|
542
|
+
fontSize: 10
|
|
543
|
+
}, i));
|
|
544
|
+
})()));
|
|
545
|
+
}
|
|
546
|
+
//#endregion
|
|
547
|
+
//#region src/components/TkxLiveLog.tsx
|
|
548
|
+
var A = 28, j = 8, M = {
|
|
549
|
+
debug: 0,
|
|
550
|
+
info: 1,
|
|
551
|
+
warn: 2,
|
|
552
|
+
error: 3,
|
|
553
|
+
fatal: 4
|
|
554
|
+
}, N = !1;
|
|
555
|
+
function P() {
|
|
556
|
+
if (N || typeof document > "u") return;
|
|
557
|
+
N = !0;
|
|
558
|
+
let e = document.createElement("style");
|
|
559
|
+
e.id = "tkx-live-log-styles", e.textContent = ".tkx-log-row:hover { filter: brightness(1.12); }\n.tkx-log-highlight { background: #ffbe0b55; border-radius: 2px; padding: 0 1px; }", document.head.appendChild(e);
|
|
560
|
+
}
|
|
561
|
+
function F(e) {
|
|
562
|
+
let t = new Date(e);
|
|
563
|
+
return `${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}:${String(t.getSeconds()).padStart(2, "0")}.${String(t.getMilliseconds()).padStart(3, "0")}`;
|
|
564
|
+
}
|
|
565
|
+
function I(e, t) {
|
|
566
|
+
switch (e) {
|
|
567
|
+
case "debug": return t.textMuted;
|
|
568
|
+
case "info": return t.info;
|
|
569
|
+
case "warn": return t.warning;
|
|
570
|
+
case "error": return t.danger;
|
|
571
|
+
case "fatal": return t.danger;
|
|
572
|
+
default: return t.textMuted;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
function L(e, t) {
|
|
576
|
+
return e === "fatal" ? `${t.danger}22` : "transparent";
|
|
577
|
+
}
|
|
578
|
+
function R(e) {
|
|
579
|
+
return `[${e.toUpperCase().padEnd(5)}]`;
|
|
580
|
+
}
|
|
581
|
+
function z(e, r) {
|
|
582
|
+
if (!r) return [e];
|
|
583
|
+
let i = t(e), a = t(r);
|
|
584
|
+
if (!a) return [i];
|
|
585
|
+
try {
|
|
586
|
+
let e = RegExp(`(${a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
|
|
587
|
+
return i.split(e).map((t, r) => e.test(t) ? n("mark", {
|
|
588
|
+
key: r,
|
|
589
|
+
className: "tkx-log-highlight"
|
|
590
|
+
}, t) : t);
|
|
591
|
+
} catch {
|
|
592
|
+
return [i];
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
function B({ entry: e, showLevel: r, showTimestamp: i, showSource: a, searchQuery: o, monospace: s, isExpanded: c, onToggle: l, onEntryClick: u, theme: d, style: f }) {
|
|
596
|
+
let p = I(e.level, d), m = L(e.level, d), h = e.metadata && Object.keys(e.metadata).length > 0;
|
|
597
|
+
return n("div", {
|
|
598
|
+
style: {
|
|
599
|
+
...f,
|
|
600
|
+
display: "flex",
|
|
601
|
+
alignItems: "center",
|
|
602
|
+
gap: 6,
|
|
603
|
+
padding: "0 10px",
|
|
604
|
+
fontSize: 12,
|
|
605
|
+
fontFamily: s ? "\"JetBrains Mono\", \"Fira Mono\", Consolas, monospace" : "inherit",
|
|
606
|
+
cursor: h || u ? "pointer" : "default",
|
|
607
|
+
background: m,
|
|
608
|
+
boxSizing: "border-box",
|
|
609
|
+
height: A,
|
|
610
|
+
overflow: "hidden",
|
|
611
|
+
whiteSpace: "nowrap",
|
|
612
|
+
borderBottom: `1px solid ${d.border}22`
|
|
613
|
+
},
|
|
614
|
+
className: "tkx-log-row",
|
|
615
|
+
onClick: () => {
|
|
616
|
+
h && l(), u && u(e);
|
|
617
|
+
},
|
|
618
|
+
role: h ? "button" : void 0,
|
|
619
|
+
tabIndex: h ? 0 : void 0,
|
|
620
|
+
onKeyDown: h ? (e) => {
|
|
621
|
+
(e.key === "Enter" || e.key === " ") && l();
|
|
622
|
+
} : void 0,
|
|
623
|
+
"aria-expanded": h ? c : void 0
|
|
624
|
+
}, i && n("span", { style: {
|
|
625
|
+
color: d.textMuted,
|
|
626
|
+
flexShrink: 0,
|
|
627
|
+
minWidth: 84
|
|
628
|
+
} }, F(e.timestamp)), r && n("span", { style: {
|
|
629
|
+
color: p,
|
|
630
|
+
flexShrink: 0,
|
|
631
|
+
fontWeight: e.level === "fatal" ? 700 : 500,
|
|
632
|
+
minWidth: 56
|
|
633
|
+
} }, R(e.level)), a && e.source && n("span", { style: {
|
|
634
|
+
background: d.surfaceAlt,
|
|
635
|
+
border: `1px solid ${d.border}`,
|
|
636
|
+
borderRadius: 10,
|
|
637
|
+
padding: "0 5px",
|
|
638
|
+
fontSize: 10,
|
|
639
|
+
color: d.textMuted,
|
|
640
|
+
flexShrink: 0,
|
|
641
|
+
maxWidth: 80,
|
|
642
|
+
overflow: "hidden",
|
|
643
|
+
textOverflow: "ellipsis"
|
|
644
|
+
} }, t(e.source)), n("span", { style: {
|
|
645
|
+
flex: 1,
|
|
646
|
+
color: d.text,
|
|
647
|
+
overflow: "hidden",
|
|
648
|
+
textOverflow: "ellipsis"
|
|
649
|
+
} }, ...z(e.message, o)), h && n("span", { style: {
|
|
650
|
+
color: d.textMuted,
|
|
651
|
+
fontSize: 10,
|
|
652
|
+
flexShrink: 0
|
|
653
|
+
} }, c ? "▲" : "▼"));
|
|
654
|
+
}
|
|
655
|
+
function V({ metadata: e, theme: r, style: i }) {
|
|
656
|
+
return n("div", { style: {
|
|
657
|
+
...i,
|
|
658
|
+
background: r.surfaceAlt,
|
|
659
|
+
borderBottom: `1px solid ${r.border}`,
|
|
660
|
+
padding: "6px 10px 6px 56px",
|
|
661
|
+
display: "flex",
|
|
662
|
+
flexWrap: "wrap",
|
|
663
|
+
gap: 6,
|
|
664
|
+
boxSizing: "border-box"
|
|
665
|
+
} }, ...Object.entries(e).map(([e, i]) => n("span", {
|
|
666
|
+
key: e,
|
|
667
|
+
style: {
|
|
668
|
+
fontSize: 11,
|
|
669
|
+
fontFamily: "monospace",
|
|
670
|
+
color: r.textMuted,
|
|
671
|
+
background: r.surface,
|
|
672
|
+
border: `1px solid ${r.border}`,
|
|
673
|
+
borderRadius: 4,
|
|
674
|
+
padding: "1px 6px"
|
|
675
|
+
}
|
|
676
|
+
}, n("span", { style: { color: r.info } }, `${t(e)}: `), t(String(i)))));
|
|
677
|
+
}
|
|
678
|
+
function H({ entries: t, maxEntries: c = 500, height: l = 400, autoScroll: u = !0, showLevel: d = !0, showTimestamp: f = !0, showSource: p = !0, filterLevel: m, searchQuery: h = "", monospace: g = !0, onEntryClick: _ }) {
|
|
679
|
+
let v = e();
|
|
680
|
+
P();
|
|
681
|
+
let y = o(null), [b, x] = s(0), [S, C] = s(/* @__PURE__ */ new Set()), [w, T] = s(!1), E = o(t.length), D = a(() => {
|
|
682
|
+
let e = t.slice(-c);
|
|
683
|
+
if (m !== void 0) {
|
|
684
|
+
let t = M[m];
|
|
685
|
+
e = e.filter((e) => M[e.level] >= t);
|
|
686
|
+
}
|
|
687
|
+
if (h) {
|
|
688
|
+
let t = h.toLowerCase();
|
|
689
|
+
e = e.filter((e) => e.message.toLowerCase().includes(t) || (e.source ?? "").toLowerCase().includes(t));
|
|
690
|
+
}
|
|
691
|
+
return e;
|
|
692
|
+
}, [
|
|
693
|
+
t,
|
|
694
|
+
c,
|
|
695
|
+
m,
|
|
696
|
+
h
|
|
697
|
+
]), O = typeof l == "number" ? l : 400, k = a(() => {
|
|
698
|
+
let e = [], t = 0;
|
|
699
|
+
for (let n of D) e.push(t), t += A + (S.has(n.id) ? 40 : 0);
|
|
700
|
+
return e.push(t), e;
|
|
701
|
+
}, [D, S]), N = k[k.length - 1] ?? 0;
|
|
702
|
+
i(() => {
|
|
703
|
+
!u || w || D.length !== E.current && (E.current = D.length, y.current && (y.current.scrollTop = y.current.scrollHeight));
|
|
704
|
+
}, [
|
|
705
|
+
D.length,
|
|
706
|
+
u,
|
|
707
|
+
w
|
|
708
|
+
]);
|
|
709
|
+
let F = r(() => {
|
|
710
|
+
if (!y.current) return;
|
|
711
|
+
let e = y.current;
|
|
712
|
+
T(!(e.scrollHeight - e.scrollTop - e.clientHeight < A * 2)), x(e.scrollTop);
|
|
713
|
+
}, []), I = r((e) => {
|
|
714
|
+
C((t) => {
|
|
715
|
+
let n = new Set(t);
|
|
716
|
+
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
717
|
+
});
|
|
718
|
+
}, []);
|
|
719
|
+
function L(e) {
|
|
720
|
+
let t = 0, n = D.length - 1;
|
|
721
|
+
for (; t < n;) {
|
|
722
|
+
let r = t + n >> 1;
|
|
723
|
+
(k[r + 1] ?? 0) <= e ? t = r + 1 : n = r;
|
|
724
|
+
}
|
|
725
|
+
return Math.max(0, t - j);
|
|
726
|
+
}
|
|
727
|
+
function R(e) {
|
|
728
|
+
let t = 0, n = D.length - 1;
|
|
729
|
+
for (; t < n;) {
|
|
730
|
+
let r = t + n + 1 >> 1;
|
|
731
|
+
(k[r] ?? 0) >= e + O ? n = r - 1 : t = r;
|
|
732
|
+
}
|
|
733
|
+
return Math.min(D.length - 1, t + j);
|
|
734
|
+
}
|
|
735
|
+
let z = D.length > 0 ? L(b) : 0, H = D.length > 0 ? R(b) : -1, U = {
|
|
736
|
+
position: "relative",
|
|
737
|
+
overflow: "auto",
|
|
738
|
+
height: typeof l == "number" ? `${l}px` : l,
|
|
739
|
+
background: v.bg,
|
|
740
|
+
border: `1px solid ${v.border}`,
|
|
741
|
+
borderRadius: 8,
|
|
742
|
+
boxSizing: "border-box"
|
|
743
|
+
}, W = {
|
|
744
|
+
position: "relative",
|
|
745
|
+
height: N,
|
|
746
|
+
minHeight: "100%"
|
|
747
|
+
};
|
|
748
|
+
if (D.length === 0) return n("div", { style: {
|
|
749
|
+
...U,
|
|
750
|
+
display: "flex",
|
|
751
|
+
alignItems: "center",
|
|
752
|
+
justifyContent: "center"
|
|
753
|
+
} }, n("span", { style: {
|
|
754
|
+
color: v.textMuted,
|
|
755
|
+
fontSize: 13,
|
|
756
|
+
fontFamily: "monospace"
|
|
757
|
+
} }, "No log entries."));
|
|
758
|
+
let G = [];
|
|
759
|
+
for (let e = z; e <= H; e++) {
|
|
760
|
+
let t = D[e];
|
|
761
|
+
if (!t) continue;
|
|
762
|
+
let r = k[e] ?? 0, i = S.has(t.id);
|
|
763
|
+
G.push(n(B, {
|
|
764
|
+
key: t.id,
|
|
765
|
+
entry: t,
|
|
766
|
+
showLevel: d,
|
|
767
|
+
showTimestamp: f,
|
|
768
|
+
showSource: p,
|
|
769
|
+
searchQuery: h,
|
|
770
|
+
monospace: g,
|
|
771
|
+
isExpanded: i,
|
|
772
|
+
onToggle: () => I(t.id),
|
|
773
|
+
onEntryClick: _,
|
|
774
|
+
theme: v,
|
|
775
|
+
style: {
|
|
776
|
+
position: "absolute",
|
|
777
|
+
top: r,
|
|
778
|
+
left: 0,
|
|
779
|
+
right: 0
|
|
780
|
+
}
|
|
781
|
+
})), i && t.metadata && Object.keys(t.metadata).length > 0 && G.push(n(V, {
|
|
782
|
+
key: `${t.id}-meta`,
|
|
783
|
+
metadata: t.metadata,
|
|
784
|
+
theme: v,
|
|
785
|
+
style: {
|
|
786
|
+
position: "absolute",
|
|
787
|
+
top: r + A,
|
|
788
|
+
left: 0,
|
|
789
|
+
right: 0,
|
|
790
|
+
height: 40
|
|
791
|
+
}
|
|
792
|
+
}));
|
|
793
|
+
}
|
|
794
|
+
return n("div", {
|
|
795
|
+
ref: y,
|
|
796
|
+
style: U,
|
|
797
|
+
onScroll: F,
|
|
798
|
+
role: "log",
|
|
799
|
+
"aria-live": "polite",
|
|
800
|
+
"aria-label": "Log viewer"
|
|
801
|
+
}, n("div", { style: W }, ...G));
|
|
802
|
+
}
|
|
803
|
+
//#endregion
|
|
804
|
+
export { g as TkxLiveFeed, H as TkxLiveLog, E as TkxLiveMetrics, k as TkxRealTimeChart };
|