claude-code-cost 0.14.0 → 0.15.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/package.json +1 -1
- package/public/app.js +560 -40
- package/public/index.html +36 -9
- package/public/style.css +298 -34
- package/server.js +210 -66
package/public/index.html
CHANGED
|
@@ -42,15 +42,42 @@
|
|
|
42
42
|
</svg>
|
|
43
43
|
</button>
|
|
44
44
|
</span>
|
|
45
|
-
<
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
<span class="range-picker" id="rangePicker">
|
|
46
|
+
<button class="topbar-btn range-trigger" id="rangeTrigger" title="Date range" onclick="toggleRangePicker(event)">
|
|
47
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
48
|
+
<rect x="3" y="4.5" width="18" height="17" rx="2"/><line x1="3" y1="9.5" x2="21" y2="9.5"/>
|
|
49
|
+
<line x1="8" y1="2.5" x2="8" y2="6"/><line x1="16" y1="2.5" x2="16" y2="6"/>
|
|
50
|
+
</svg>
|
|
51
|
+
<span class="range-label" id="rangeTriggerLabel">3 DAYS</span>
|
|
52
|
+
<svg class="chev" width="10" height="6" viewBox="0 0 10 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
53
|
+
<path d="M1 1.5L5 5 9 1.5"/>
|
|
54
|
+
</svg>
|
|
55
|
+
</button>
|
|
56
|
+
<div class="range-pop" id="rangePop">
|
|
57
|
+
<div class="range-presets" id="rangePresets">
|
|
58
|
+
<div class="range-head-label">Shortcuts</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="range-cal-side">
|
|
61
|
+
<div class="range-fields">
|
|
62
|
+
<div class="range-field">
|
|
63
|
+
<span class="range-head-label">From</span>
|
|
64
|
+
<button class="range-field-box" id="rangeFromBox" onclick="aimRangePicker('from')">—</button>
|
|
65
|
+
</div>
|
|
66
|
+
<span class="range-field-dash">→</span>
|
|
67
|
+
<div class="range-field">
|
|
68
|
+
<span class="range-head-label">To</span>
|
|
69
|
+
<button class="range-field-box" id="rangeToBox" onclick="aimRangePicker('to')">—</button>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="range-months" id="rangeMonths"></div>
|
|
73
|
+
<div class="range-foot">
|
|
74
|
+
<span class="range-summary" id="rangeSummary"></span>
|
|
75
|
+
<button class="range-btn" id="rangeCancel" onclick="closeRangePicker()">Cancel</button>
|
|
76
|
+
<button class="range-btn primary" id="rangeApply" onclick="applyRangeDraft()">Apply</button>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</span>
|
|
54
81
|
<button class="topbar-btn" id="refreshBtn" title="Refresh data" onclick="refreshData()">
|
|
55
82
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 11-2.12-9.36L23 10"/></svg>
|
|
56
83
|
Refresh
|
package/public/style.css
CHANGED
|
@@ -155,40 +155,6 @@ body {
|
|
|
155
155
|
color: var(--accent-text);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
/* Native chevron is OS-styled and clashes with the mono topbar, so appearance is reset
|
|
159
|
-
and the chevron redrawn; its gray reads as tertiary text in both themes. */
|
|
160
|
-
.topbar-select {
|
|
161
|
-
appearance: none;
|
|
162
|
-
background-color: var(--bg-elevated);
|
|
163
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%238a8d95' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5L5 5 9 1.5'/%3E%3C/svg%3E");
|
|
164
|
-
background-repeat: no-repeat;
|
|
165
|
-
background-position: right 9px center;
|
|
166
|
-
background-size: 9px 6px;
|
|
167
|
-
border: 1px solid var(--border);
|
|
168
|
-
border-radius: 6px;
|
|
169
|
-
color: var(--text-tertiary);
|
|
170
|
-
font-family: var(--mono);
|
|
171
|
-
font-size: 11px;
|
|
172
|
-
font-weight: 500;
|
|
173
|
-
letter-spacing: 0.03em;
|
|
174
|
-
text-transform: uppercase;
|
|
175
|
-
padding: 6px 26px 6px 10px;
|
|
176
|
-
outline: none;
|
|
177
|
-
cursor: pointer;
|
|
178
|
-
transition: all 0.15s ease;
|
|
179
|
-
}
|
|
180
|
-
.topbar-select:hover {
|
|
181
|
-
border-color: var(--accent);
|
|
182
|
-
color: var(--text-secondary);
|
|
183
|
-
}
|
|
184
|
-
.topbar-select:focus-visible {
|
|
185
|
-
border-color: var(--accent);
|
|
186
|
-
}
|
|
187
|
-
.topbar-select option {
|
|
188
|
-
background: var(--bg-surface);
|
|
189
|
-
color: var(--text-primary);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
158
|
/* #region SCOPE_CHIP */
|
|
193
159
|
|
|
194
160
|
/* Reuses --accent-dim/--accent-text from .topbar-nav-btn.active so LIGHT_THEME needs nothing. */
|
|
@@ -355,6 +321,293 @@ body {
|
|
|
355
321
|
|
|
356
322
|
/* #endregion */
|
|
357
323
|
|
|
324
|
+
/* #region DATE_PICKER */
|
|
325
|
+
|
|
326
|
+
/* Replaces the native range <select>: a trigger button plus a popover with preset shortcuts and
|
|
327
|
+
two month grids. Reuses the topbar-btn shell and the same tokens as .theme-menu, so every color
|
|
328
|
+
theme and the light theme need nothing here. */
|
|
329
|
+
.range-picker {
|
|
330
|
+
position: relative;
|
|
331
|
+
display: inline-flex;
|
|
332
|
+
}
|
|
333
|
+
.range-trigger .range-label {
|
|
334
|
+
min-width: 84px;
|
|
335
|
+
text-align: left;
|
|
336
|
+
}
|
|
337
|
+
.range-trigger .chev {
|
|
338
|
+
transition: transform 0.15s ease;
|
|
339
|
+
}
|
|
340
|
+
.range-trigger.on {
|
|
341
|
+
border-color: var(--accent);
|
|
342
|
+
background: var(--accent-dim);
|
|
343
|
+
color: var(--accent-text);
|
|
344
|
+
}
|
|
345
|
+
.range-trigger.on svg {
|
|
346
|
+
color: var(--accent-text);
|
|
347
|
+
}
|
|
348
|
+
.range-trigger.on .chev {
|
|
349
|
+
transform: rotate(180deg);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.range-pop {
|
|
353
|
+
display: none;
|
|
354
|
+
position: absolute;
|
|
355
|
+
top: calc(100% + 6px);
|
|
356
|
+
right: 0;
|
|
357
|
+
z-index: 100;
|
|
358
|
+
max-width: calc(100vw - 24px);
|
|
359
|
+
background: var(--bg-elevated);
|
|
360
|
+
border: 1px solid var(--border);
|
|
361
|
+
border-radius: 8px;
|
|
362
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
|
|
363
|
+
overflow: hidden;
|
|
364
|
+
}
|
|
365
|
+
.range-pop.open {
|
|
366
|
+
display: flex;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.range-presets {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-direction: column;
|
|
372
|
+
gap: 2px;
|
|
373
|
+
padding: 8px;
|
|
374
|
+
border-right: 1px solid var(--border);
|
|
375
|
+
background: var(--bg-surface);
|
|
376
|
+
min-width: 116px;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* Shared by the Shortcuts header and the From/To field captions. */
|
|
380
|
+
.range-head-label {
|
|
381
|
+
display: block;
|
|
382
|
+
font-size: 9px;
|
|
383
|
+
letter-spacing: 0.12em;
|
|
384
|
+
text-transform: uppercase;
|
|
385
|
+
color: var(--text-muted);
|
|
386
|
+
padding: 2px 6px 6px;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.range-preset {
|
|
390
|
+
border: 0;
|
|
391
|
+
background: none;
|
|
392
|
+
color: var(--text-secondary);
|
|
393
|
+
font-family: var(--mono);
|
|
394
|
+
font-size: 11px;
|
|
395
|
+
text-transform: uppercase;
|
|
396
|
+
letter-spacing: 0.03em;
|
|
397
|
+
text-align: left;
|
|
398
|
+
padding: 5px 8px;
|
|
399
|
+
border-radius: 5px;
|
|
400
|
+
cursor: pointer;
|
|
401
|
+
}
|
|
402
|
+
.range-preset:hover {
|
|
403
|
+
background: var(--bg-hover);
|
|
404
|
+
color: var(--text-primary);
|
|
405
|
+
}
|
|
406
|
+
.range-preset.on {
|
|
407
|
+
background: var(--accent-dim);
|
|
408
|
+
color: var(--accent-text);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.range-cal-side {
|
|
412
|
+
padding: 8px 10px 10px;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.range-fields {
|
|
416
|
+
display: flex;
|
|
417
|
+
align-items: flex-end;
|
|
418
|
+
gap: 8px;
|
|
419
|
+
padding: 0 2px 8px;
|
|
420
|
+
}
|
|
421
|
+
.range-field {
|
|
422
|
+
flex: 1;
|
|
423
|
+
}
|
|
424
|
+
.range-field .range-head-label {
|
|
425
|
+
padding: 0 0 3px;
|
|
426
|
+
}
|
|
427
|
+
.range-field-box {
|
|
428
|
+
border: 1px solid var(--border);
|
|
429
|
+
border-radius: 5px;
|
|
430
|
+
background: var(--bg-surface);
|
|
431
|
+
color: var(--text-secondary);
|
|
432
|
+
font-family: var(--mono);
|
|
433
|
+
font-size: 11px;
|
|
434
|
+
letter-spacing: 0.03em;
|
|
435
|
+
padding: 5px 8px;
|
|
436
|
+
width: 100%;
|
|
437
|
+
text-align: left;
|
|
438
|
+
cursor: pointer;
|
|
439
|
+
}
|
|
440
|
+
.range-field-box.active {
|
|
441
|
+
border-color: var(--accent);
|
|
442
|
+
color: var(--accent-text);
|
|
443
|
+
}
|
|
444
|
+
.range-field-box.empty {
|
|
445
|
+
color: var(--text-muted);
|
|
446
|
+
}
|
|
447
|
+
.range-field-dash {
|
|
448
|
+
color: var(--text-muted);
|
|
449
|
+
padding-bottom: 6px;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.range-months {
|
|
453
|
+
display: flex;
|
|
454
|
+
gap: 14px;
|
|
455
|
+
}
|
|
456
|
+
.range-cal {
|
|
457
|
+
width: 196px;
|
|
458
|
+
}
|
|
459
|
+
.range-cal-head {
|
|
460
|
+
display: flex;
|
|
461
|
+
align-items: center;
|
|
462
|
+
justify-content: space-between;
|
|
463
|
+
padding: 0 2px 6px;
|
|
464
|
+
}
|
|
465
|
+
.range-cal-title {
|
|
466
|
+
font-size: 11px;
|
|
467
|
+
text-transform: uppercase;
|
|
468
|
+
letter-spacing: 0.06em;
|
|
469
|
+
color: var(--text-secondary);
|
|
470
|
+
}
|
|
471
|
+
.range-nav {
|
|
472
|
+
border: 1px solid var(--border);
|
|
473
|
+
background: var(--bg-surface);
|
|
474
|
+
color: var(--text-tertiary);
|
|
475
|
+
border-radius: 4px;
|
|
476
|
+
width: 20px;
|
|
477
|
+
height: 20px;
|
|
478
|
+
display: flex;
|
|
479
|
+
align-items: center;
|
|
480
|
+
justify-content: center;
|
|
481
|
+
cursor: pointer;
|
|
482
|
+
}
|
|
483
|
+
.range-nav:hover:not(:disabled) {
|
|
484
|
+
border-color: var(--accent);
|
|
485
|
+
color: var(--accent-text);
|
|
486
|
+
}
|
|
487
|
+
.range-nav:disabled {
|
|
488
|
+
opacity: 0.3;
|
|
489
|
+
cursor: default;
|
|
490
|
+
}
|
|
491
|
+
.range-nav svg {
|
|
492
|
+
width: 9px;
|
|
493
|
+
height: 9px;
|
|
494
|
+
}
|
|
495
|
+
.range-nav-gap {
|
|
496
|
+
width: 20px;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.range-dow,
|
|
500
|
+
.range-grid {
|
|
501
|
+
display: grid;
|
|
502
|
+
grid-template-columns: repeat(7, 1fr);
|
|
503
|
+
}
|
|
504
|
+
.range-dow span {
|
|
505
|
+
font-size: 9px;
|
|
506
|
+
text-align: center;
|
|
507
|
+
color: var(--text-muted);
|
|
508
|
+
letter-spacing: 0.06em;
|
|
509
|
+
padding-bottom: 3px;
|
|
510
|
+
}
|
|
511
|
+
.range-day {
|
|
512
|
+
height: 24px;
|
|
513
|
+
border: 0;
|
|
514
|
+
background: none;
|
|
515
|
+
font-family: var(--mono);
|
|
516
|
+
font-size: 11px;
|
|
517
|
+
color: var(--text-secondary);
|
|
518
|
+
cursor: pointer;
|
|
519
|
+
position: relative;
|
|
520
|
+
}
|
|
521
|
+
.range-day.pad {
|
|
522
|
+
visibility: hidden;
|
|
523
|
+
}
|
|
524
|
+
.range-day.off {
|
|
525
|
+
color: var(--text-muted);
|
|
526
|
+
opacity: 0.4;
|
|
527
|
+
cursor: default;
|
|
528
|
+
}
|
|
529
|
+
.range-day.today::after {
|
|
530
|
+
content: '';
|
|
531
|
+
position: absolute;
|
|
532
|
+
left: 50%;
|
|
533
|
+
bottom: 3px;
|
|
534
|
+
width: 3px;
|
|
535
|
+
height: 3px;
|
|
536
|
+
margin-left: -1.5px;
|
|
537
|
+
border-radius: 50%;
|
|
538
|
+
background: var(--accent);
|
|
539
|
+
}
|
|
540
|
+
.range-day:hover:not(.off) {
|
|
541
|
+
color: var(--text-primary);
|
|
542
|
+
}
|
|
543
|
+
.range-day.in {
|
|
544
|
+
background: var(--accent-dim);
|
|
545
|
+
color: var(--accent-text);
|
|
546
|
+
}
|
|
547
|
+
.range-day.edge {
|
|
548
|
+
background: var(--accent);
|
|
549
|
+
color: #fff;
|
|
550
|
+
border-radius: 4px;
|
|
551
|
+
font-weight: 500;
|
|
552
|
+
}
|
|
553
|
+
.range-day.edge.today::after {
|
|
554
|
+
background: #fff;
|
|
555
|
+
}
|
|
556
|
+
.range-day.in.start {
|
|
557
|
+
border-radius: 4px 0 0 4px;
|
|
558
|
+
}
|
|
559
|
+
.range-day.in.end {
|
|
560
|
+
border-radius: 0 4px 4px 0;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.range-foot {
|
|
564
|
+
display: flex;
|
|
565
|
+
align-items: center;
|
|
566
|
+
gap: 8px;
|
|
567
|
+
padding-top: 9px;
|
|
568
|
+
margin-top: 8px;
|
|
569
|
+
border-top: 1px solid var(--border);
|
|
570
|
+
}
|
|
571
|
+
.range-summary {
|
|
572
|
+
flex: 1;
|
|
573
|
+
font-size: 10px;
|
|
574
|
+
color: var(--text-muted);
|
|
575
|
+
letter-spacing: 0.04em;
|
|
576
|
+
text-transform: uppercase;
|
|
577
|
+
}
|
|
578
|
+
.range-btn {
|
|
579
|
+
font-family: var(--mono);
|
|
580
|
+
font-size: 11px;
|
|
581
|
+
text-transform: uppercase;
|
|
582
|
+
letter-spacing: 0.03em;
|
|
583
|
+
padding: 5px 12px;
|
|
584
|
+
border-radius: 5px;
|
|
585
|
+
cursor: pointer;
|
|
586
|
+
border: 1px solid var(--border);
|
|
587
|
+
background: var(--bg-surface);
|
|
588
|
+
color: var(--text-tertiary);
|
|
589
|
+
}
|
|
590
|
+
.range-btn:hover {
|
|
591
|
+
border-color: var(--accent);
|
|
592
|
+
color: var(--text-secondary);
|
|
593
|
+
}
|
|
594
|
+
.range-btn.primary {
|
|
595
|
+
background: var(--accent);
|
|
596
|
+
border-color: var(--accent);
|
|
597
|
+
color: #fff;
|
|
598
|
+
}
|
|
599
|
+
.range-btn.primary:hover {
|
|
600
|
+
filter: brightness(1.08);
|
|
601
|
+
color: #fff;
|
|
602
|
+
}
|
|
603
|
+
.range-btn.primary:disabled {
|
|
604
|
+
opacity: 0.4;
|
|
605
|
+
cursor: default;
|
|
606
|
+
filter: none;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/* #endregion */
|
|
610
|
+
|
|
358
611
|
/* #region LAYOUT */
|
|
359
612
|
|
|
360
613
|
.dashboard {
|
|
@@ -989,6 +1242,17 @@ body.light {
|
|
|
989
1242
|
}
|
|
990
1243
|
}
|
|
991
1244
|
|
|
1245
|
+
/* The two-month popover is wider than a narrow viewport: renderRangePicker() watches the same
|
|
1246
|
+
breakpoint and draws a single month with both nav arrows. */
|
|
1247
|
+
@media (max-width: 760px) {
|
|
1248
|
+
.range-presets {
|
|
1249
|
+
min-width: 100px;
|
|
1250
|
+
}
|
|
1251
|
+
.range-cal {
|
|
1252
|
+
width: 182px;
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
|
|
992
1256
|
@media (max-width: 600px) {
|
|
993
1257
|
.topbar {
|
|
994
1258
|
flex-wrap: wrap;
|