@dudousxd/nestjs-telescope-ui 1.0.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.
Files changed (179) hide show
  1. package/CHANGELOG.md +349 -0
  2. package/LICENSE +21 -0
  3. package/README.md +51 -0
  4. package/dist/client/index.d.ts +4 -0
  5. package/dist/client/index.d.ts.map +1 -0
  6. package/dist/client/index.js +2 -0
  7. package/dist/client/index.js.map +1 -0
  8. package/dist/client/telescope-client.d.ts +63 -0
  9. package/dist/client/telescope-client.d.ts.map +1 -0
  10. package/dist/client/telescope-client.js +87 -0
  11. package/dist/client/telescope-client.js.map +1 -0
  12. package/dist/client/types.d.ts +267 -0
  13. package/dist/client/types.d.ts.map +1 -0
  14. package/dist/client/types.js +2 -0
  15. package/dist/client/types.js.map +1 -0
  16. package/dist/react/components/batch-timeline.d.ts +7 -0
  17. package/dist/react/components/batch-timeline.d.ts.map +1 -0
  18. package/dist/react/components/batch-timeline.js +10 -0
  19. package/dist/react/components/batch-timeline.js.map +1 -0
  20. package/dist/react/components/cache-badge.d.ts +20 -0
  21. package/dist/react/components/cache-badge.d.ts.map +1 -0
  22. package/dist/react/components/cache-badge.js +42 -0
  23. package/dist/react/components/cache-badge.js.map +1 -0
  24. package/dist/react/components/charts/area-chart-card.d.ts +16 -0
  25. package/dist/react/components/charts/area-chart-card.d.ts.map +1 -0
  26. package/dist/react/components/charts/area-chart-card.js +12 -0
  27. package/dist/react/components/charts/area-chart-card.js.map +1 -0
  28. package/dist/react/components/charts/bar-chart-card.d.ts +26 -0
  29. package/dist/react/components/charts/bar-chart-card.d.ts.map +1 -0
  30. package/dist/react/components/charts/bar-chart-card.js +27 -0
  31. package/dist/react/components/charts/bar-chart-card.js.map +1 -0
  32. package/dist/react/components/charts/chart-card.d.ts +11 -0
  33. package/dist/react/components/charts/chart-card.d.ts.map +1 -0
  34. package/dist/react/components/charts/chart-card.js +9 -0
  35. package/dist/react/components/charts/chart-card.js.map +1 -0
  36. package/dist/react/components/charts/chart-theme.d.ts +41 -0
  37. package/dist/react/components/charts/chart-theme.d.ts.map +1 -0
  38. package/dist/react/components/charts/chart-theme.js +53 -0
  39. package/dist/react/components/charts/chart-theme.js.map +1 -0
  40. package/dist/react/components/charts/index.d.ts +6 -0
  41. package/dist/react/components/charts/index.d.ts.map +1 -0
  42. package/dist/react/components/charts/index.js +6 -0
  43. package/dist/react/components/charts/index.js.map +1 -0
  44. package/dist/react/components/charts/stacked-area-chart-card.d.ts +14 -0
  45. package/dist/react/components/charts/stacked-area-chart-card.d.ts.map +1 -0
  46. package/dist/react/components/charts/stacked-area-chart-card.js +13 -0
  47. package/dist/react/components/charts/stacked-area-chart-card.js.map +1 -0
  48. package/dist/react/components/entries-table.d.ts +11 -0
  49. package/dist/react/components/entries-table.d.ts.map +1 -0
  50. package/dist/react/components/entries-table.js +68 -0
  51. package/dist/react/components/entries-table.js.map +1 -0
  52. package/dist/react/components/entry-detail.d.ts +6 -0
  53. package/dist/react/components/entry-detail.d.ts.map +1 -0
  54. package/dist/react/components/entry-detail.js +110 -0
  55. package/dist/react/components/entry-detail.js.map +1 -0
  56. package/dist/react/components/entry-insights.d.ts +5 -0
  57. package/dist/react/components/entry-insights.d.ts.map +1 -0
  58. package/dist/react/components/entry-insights.js +107 -0
  59. package/dist/react/components/entry-insights.js.map +1 -0
  60. package/dist/react/components/entry-types.d.ts +40 -0
  61. package/dist/react/components/entry-types.d.ts.map +1 -0
  62. package/dist/react/components/entry-types.js +44 -0
  63. package/dist/react/components/entry-types.js.map +1 -0
  64. package/dist/react/components/export-json-toolbar.d.ts +9 -0
  65. package/dist/react/components/export-json-toolbar.d.ts.map +1 -0
  66. package/dist/react/components/export-json-toolbar.js +21 -0
  67. package/dist/react/components/export-json-toolbar.js.map +1 -0
  68. package/dist/react/components/export-json.d.ts +14 -0
  69. package/dist/react/components/export-json.d.ts.map +1 -0
  70. package/dist/react/components/export-json.js +44 -0
  71. package/dist/react/components/export-json.js.map +1 -0
  72. package/dist/react/components/pulse-panel.d.ts +9 -0
  73. package/dist/react/components/pulse-panel.d.ts.map +1 -0
  74. package/dist/react/components/pulse-panel.js +20 -0
  75. package/dist/react/components/pulse-panel.js.map +1 -0
  76. package/dist/react/components/queue-sparkline.d.ts +5 -0
  77. package/dist/react/components/queue-sparkline.d.ts.map +1 -0
  78. package/dist/react/components/queue-sparkline.js +8 -0
  79. package/dist/react/components/queue-sparkline.js.map +1 -0
  80. package/dist/react/components/queues/EnqueueJobForm.d.ts +14 -0
  81. package/dist/react/components/queues/EnqueueJobForm.d.ts.map +1 -0
  82. package/dist/react/components/queues/EnqueueJobForm.js +61 -0
  83. package/dist/react/components/queues/EnqueueJobForm.js.map +1 -0
  84. package/dist/react/components/queues/JobActions.d.ts +38 -0
  85. package/dist/react/components/queues/JobActions.d.ts.map +1 -0
  86. package/dist/react/components/queues/JobActions.js +106 -0
  87. package/dist/react/components/queues/JobActions.js.map +1 -0
  88. package/dist/react/components/queues/JobDetailDrawer.d.ts +11 -0
  89. package/dist/react/components/queues/JobDetailDrawer.d.ts.map +1 -0
  90. package/dist/react/components/queues/JobDetailDrawer.js +45 -0
  91. package/dist/react/components/queues/JobDetailDrawer.js.map +1 -0
  92. package/dist/react/components/queues/JobTable.d.ts +13 -0
  93. package/dist/react/components/queues/JobTable.d.ts.map +1 -0
  94. package/dist/react/components/queues/JobTable.js +0 -0
  95. package/dist/react/components/queues/JobTable.js.map +1 -0
  96. package/dist/react/components/queues/QueueList.d.ts +8 -0
  97. package/dist/react/components/queues/QueueList.d.ts.map +1 -0
  98. package/dist/react/components/queues/QueueList.js +27 -0
  99. package/dist/react/components/queues/QueueList.js.map +1 -0
  100. package/dist/react/components/queues/QueueStateTabs.d.ts +7 -0
  101. package/dist/react/components/queues/QueueStateTabs.d.ts.map +1 -0
  102. package/dist/react/components/queues/QueueStateTabs.js +12 -0
  103. package/dist/react/components/queues/QueueStateTabs.js.map +1 -0
  104. package/dist/react/components/queues/index.d.ts +8 -0
  105. package/dist/react/components/queues/index.d.ts.map +1 -0
  106. package/dist/react/components/queues/index.js +8 -0
  107. package/dist/react/components/queues/index.js.map +1 -0
  108. package/dist/react/components/queues/queue-format.d.ts +8 -0
  109. package/dist/react/components/queues/queue-format.d.ts.map +1 -0
  110. package/dist/react/components/queues/queue-format.js +51 -0
  111. package/dist/react/components/queues/queue-format.js.map +1 -0
  112. package/dist/react/components/queues-panel.d.ts +6 -0
  113. package/dist/react/components/queues-panel.d.ts.map +1 -0
  114. package/dist/react/components/queues-panel.js +8 -0
  115. package/dist/react/components/queues-panel.js.map +1 -0
  116. package/dist/react/components/request-timeline.d.ts +14 -0
  117. package/dist/react/components/request-timeline.d.ts.map +1 -0
  118. package/dist/react/components/request-timeline.js +30 -0
  119. package/dist/react/components/request-timeline.js.map +1 -0
  120. package/dist/react/components/retention-indicator.d.ts +10 -0
  121. package/dist/react/components/retention-indicator.d.ts.map +1 -0
  122. package/dist/react/components/retention-indicator.js +38 -0
  123. package/dist/react/components/retention-indicator.js.map +1 -0
  124. package/dist/react/components/sparkline.d.ts +7 -0
  125. package/dist/react/components/sparkline.d.ts.map +1 -0
  126. package/dist/react/components/sparkline.js +20 -0
  127. package/dist/react/components/sparkline.js.map +1 -0
  128. package/dist/react/components/stacked-bars.d.ts +21 -0
  129. package/dist/react/components/stacked-bars.d.ts.map +1 -0
  130. package/dist/react/components/stacked-bars.js +51 -0
  131. package/dist/react/components/stacked-bars.js.map +1 -0
  132. package/dist/react/components/tag-autocomplete.d.ts +12 -0
  133. package/dist/react/components/tag-autocomplete.d.ts.map +1 -0
  134. package/dist/react/components/tag-autocomplete.js +90 -0
  135. package/dist/react/components/tag-autocomplete.js.map +1 -0
  136. package/dist/react/components/trace-link.d.ts +6 -0
  137. package/dist/react/components/trace-link.d.ts.map +1 -0
  138. package/dist/react/components/trace-link.js +10 -0
  139. package/dist/react/components/trace-link.js.map +1 -0
  140. package/dist/react/components/type-tabs.d.ts +5 -0
  141. package/dist/react/components/type-tabs.d.ts.map +1 -0
  142. package/dist/react/components/type-tabs.js +8 -0
  143. package/dist/react/components/type-tabs.js.map +1 -0
  144. package/dist/react/components/window-select.d.ts +5 -0
  145. package/dist/react/components/window-select.d.ts.map +1 -0
  146. package/dist/react/components/window-select.js +6 -0
  147. package/dist/react/components/window-select.js.map +1 -0
  148. package/dist/react/index.d.ts +23 -0
  149. package/dist/react/index.d.ts.map +1 -0
  150. package/dist/react/index.js +23 -0
  151. package/dist/react/index.js.map +1 -0
  152. package/dist/react/telescope-context.d.ts +14 -0
  153. package/dist/react/telescope-context.d.ts.map +1 -0
  154. package/dist/react/telescope-context.js +27 -0
  155. package/dist/react/telescope-context.js.map +1 -0
  156. package/dist/react/use-telescope-queries.d.ts +244 -0
  157. package/dist/react/use-telescope-queries.d.ts.map +1 -0
  158. package/dist/react/use-telescope-queries.js +216 -0
  159. package/dist/react/use-telescope-queries.js.map +1 -0
  160. package/dist/server/index.d.ts +3 -0
  161. package/dist/server/index.d.ts.map +1 -0
  162. package/dist/server/index.js +2 -0
  163. package/dist/server/index.js.map +1 -0
  164. package/dist/server/telescope-ui.controller.d.ts +10 -0
  165. package/dist/server/telescope-ui.controller.d.ts.map +1 -0
  166. package/dist/server/telescope-ui.controller.js +105 -0
  167. package/dist/server/telescope-ui.controller.js.map +1 -0
  168. package/dist/server/telescope-ui.module.d.ts +6 -0
  169. package/dist/server/telescope-ui.module.d.ts.map +1 -0
  170. package/dist/server/telescope-ui.module.js +26 -0
  171. package/dist/server/telescope-ui.module.js.map +1 -0
  172. package/dist/server/telescope-ui.options.d.ts +12 -0
  173. package/dist/server/telescope-ui.options.d.ts.map +1 -0
  174. package/dist/server/telescope-ui.options.js +2 -0
  175. package/dist/server/telescope-ui.options.js.map +1 -0
  176. package/dist/spa/assets/index-BHS361H_.js +135 -0
  177. package/dist/spa/assets/index-DsBEgxHC.css +1 -0
  178. package/dist/spa/index.html +13 -0
  179. package/package.json +97 -0
@@ -0,0 +1,267 @@
1
+ export type { JobPage, QueueActionName, QueueCounts, QueueJob, QueueJobDetail, QueueState, QueueSummary, ScheduledTask, ScheduleKind, ScheduleRunStatus, } from '@dudousxd/nestjs-telescope';
2
+ import type { QueueActionName } from '@dudousxd/nestjs-telescope';
3
+ /** Capability hints returned alongside the live queue list. */
4
+ export interface QueueCapabilities {
5
+ mutationsEnabled: boolean;
6
+ actionsByDriver: Record<string, QueueActionName[]>;
7
+ }
8
+ export interface Entry {
9
+ id: string;
10
+ batchId: string;
11
+ type: string;
12
+ familyHash: string | null;
13
+ content: unknown;
14
+ tags: string[];
15
+ sequence: number;
16
+ durationMs: number | null;
17
+ origin: string;
18
+ instanceId: string;
19
+ traceId: string | null;
20
+ spanId: string | null;
21
+ createdAt: string;
22
+ }
23
+ export interface Page<T> {
24
+ data: T[];
25
+ nextCursor: string | null;
26
+ }
27
+ export interface EntryWithBatch extends Entry {
28
+ batch: Entry[];
29
+ }
30
+ export interface EntriesQuery {
31
+ type?: string;
32
+ tag?: string;
33
+ traceId?: string;
34
+ batchId?: string;
35
+ familyHash?: string;
36
+ /** Case-insensitive substring matched against the entry's content. */
37
+ search?: string;
38
+ cursor?: string;
39
+ limit?: number;
40
+ }
41
+ /** A distinct tag and how many entries carry it. Returned by `GET /tags`. */
42
+ export interface TagCount {
43
+ tag: string;
44
+ count: number;
45
+ }
46
+ export interface TelescopeMeta {
47
+ enabled: boolean;
48
+ droppedCount: number;
49
+ watchers: string[];
50
+ traceLink: string | null;
51
+ /** Resolved retention window from `prune`, or `null` when unbounded. */
52
+ retention: {
53
+ afterMs: number;
54
+ keepLast: number | null;
55
+ } | null;
56
+ /** Resolved per-type sample rates (0..1). Empty when no sampling configured. */
57
+ sampling: Record<string, number>;
58
+ }
59
+ export interface DurationStats {
60
+ avg: number;
61
+ p50: number;
62
+ p95: number;
63
+ max: number;
64
+ }
65
+ export interface SlowEntry {
66
+ id: string;
67
+ type: string;
68
+ durationMs: number;
69
+ label: string;
70
+ batchId: string;
71
+ }
72
+ export interface ExceptionGroup {
73
+ familyHash: string;
74
+ class: string;
75
+ message: string;
76
+ count: number;
77
+ lastSeen: string;
78
+ }
79
+ export interface NPlusOneHotspot {
80
+ familyHash: string;
81
+ sql: string;
82
+ perRequest: number;
83
+ requests: number;
84
+ total: number;
85
+ sampleBatchId: string;
86
+ }
87
+ export interface SlowRouteHotspot {
88
+ /** The normalized route family (e.g. "GET /api/base/:id/mel") — also the label. */
89
+ route: string;
90
+ count: number;
91
+ p99: number;
92
+ p50: number;
93
+ }
94
+ export interface PulseReport {
95
+ windowStart: string;
96
+ windowEnd: string;
97
+ windowMs: number;
98
+ counts: Record<string, number>;
99
+ slowest: SlowEntry[];
100
+ topExceptions: ExceptionGroup[];
101
+ nPlusOne: NPlusOneHotspot[];
102
+ slowRoutes: SlowRouteHotspot[];
103
+ /** Slowest outgoing http_client targets (method + host + normalized path). */
104
+ slowOutgoing: SlowRouteHotspot[];
105
+ scanned: number;
106
+ truncated: boolean;
107
+ }
108
+ /**
109
+ * Telescope's own runtime overhead. Returned by `GET /health`. Lets a user see
110
+ * that capture is cheap (off the response path) and the buffer keeps up.
111
+ */
112
+ export interface TelescopeHealth {
113
+ /** Whether capture is currently enabled (from config). */
114
+ enabled: boolean;
115
+ /** Total entries that passed sampling+filter and were buffered since boot. */
116
+ recorded: number;
117
+ /** Ring-buffer capacity. */
118
+ bufferSize: number;
119
+ /** Entries currently held in the ring. */
120
+ bufferUsed: number;
121
+ /** Maximum `bufferUsed` ever observed. */
122
+ bufferHighWater: number;
123
+ /** Number of flushes that drained at least one entry. */
124
+ flushes: number;
125
+ /** Cumulative entries drained across all flushes. */
126
+ flushedEntries: number;
127
+ /** Wall-clock duration of the most recent draining flush, or null. */
128
+ lastFlushMs: number | null;
129
+ /** Largest flush duration ever observed, or null. */
130
+ maxFlushMs: number | null;
131
+ /** Cumulative flush duration across all draining flushes. */
132
+ totalFlushMs: number;
133
+ /** Entries evicted because the ring was full. */
134
+ overflowDropped: number;
135
+ /** Entries lost because the store rejected the flush. */
136
+ storeFailedDropped: number;
137
+ /** Total entries dropped (overflow + store failures). */
138
+ droppedCount: number;
139
+ /** Mean nanoseconds per capture, from an on-demand micro-benchmark. */
140
+ captureCostNanos: number;
141
+ }
142
+ /** Point-in-time Node process-health snapshot. Returned by `GET /server-stats`. */
143
+ export interface ServerStats {
144
+ uptimeSec: number;
145
+ memory: {
146
+ rssMb: number;
147
+ heapUsedMb: number;
148
+ heapTotalMb: number;
149
+ };
150
+ cpu: {
151
+ userMs: number;
152
+ systemMs: number;
153
+ };
154
+ /** Mean event-loop delay in ms, or `null` when perf_hooks can't measure it. */
155
+ eventLoopDelayMs: number | null;
156
+ instanceId: string;
157
+ }
158
+ export interface QueueMetrics {
159
+ queue: string;
160
+ total: number;
161
+ completed: number;
162
+ failed: number;
163
+ failureRate: number;
164
+ throughputPerMinute: number;
165
+ runtimeMs: DurationStats | null;
166
+ waitMs: DurationStats | null;
167
+ }
168
+ export interface QueueMetricsReport {
169
+ windowStart: string;
170
+ windowEnd: string;
171
+ windowMs: number;
172
+ queues: QueueMetrics[];
173
+ scanned: number;
174
+ truncated: boolean;
175
+ }
176
+ export interface TimeseriesBucket {
177
+ t: string;
178
+ total: number;
179
+ byType: Record<string, number>;
180
+ }
181
+ export interface TimeseriesReport {
182
+ windowStart: string;
183
+ windowEnd: string;
184
+ bucketMs: number;
185
+ buckets: TimeseriesBucket[];
186
+ scanned: number;
187
+ truncated: boolean;
188
+ }
189
+ export interface TimeseriesQuery {
190
+ window?: string;
191
+ buckets?: number;
192
+ type?: string;
193
+ tag?: string;
194
+ }
195
+ export interface TraceSummary {
196
+ traceId: string;
197
+ entryCount: number;
198
+ types: string[];
199
+ /** ISO timestamp of the trace's earliest entry. */
200
+ firstAt: string;
201
+ /** ISO timestamp of the trace's latest entry. */
202
+ lastAt: string;
203
+ totalDurationMs: number;
204
+ rootLabel?: string;
205
+ }
206
+ export interface TracesResult {
207
+ traces: TraceSummary[];
208
+ scanned: number;
209
+ truncated: boolean;
210
+ }
211
+ export interface LatencyStats {
212
+ count: number;
213
+ p50: number;
214
+ p95: number;
215
+ p99: number;
216
+ max: number;
217
+ slow: number;
218
+ }
219
+ export interface FamilyLatency {
220
+ familyHash: string;
221
+ label: string;
222
+ count: number;
223
+ p50: number;
224
+ p99: number;
225
+ }
226
+ export interface CacheStats {
227
+ hits: number;
228
+ misses: number;
229
+ sets: number;
230
+ hitRatio: number;
231
+ topKeys: {
232
+ key: string;
233
+ count: number;
234
+ }[];
235
+ }
236
+ export interface StatusBreakdown {
237
+ '2xx': number;
238
+ '3xx': number;
239
+ '4xx': number;
240
+ '5xx': number;
241
+ other: number;
242
+ }
243
+ /** An exception group in the stats payload — keyed by familyHash (or `class: message`),
244
+ * with occurrence count, last-seen, and a per-bucket over-time series. `lastAt`
245
+ * is JSON-serialized to an ISO string over the wire. */
246
+ export interface StatsExceptionGroup {
247
+ key: string;
248
+ class: string;
249
+ message: string;
250
+ count: number;
251
+ lastAt: string;
252
+ overTime: number[];
253
+ }
254
+ export interface StatsResult {
255
+ type: string;
256
+ windowMs: number;
257
+ total: number;
258
+ /** Throughput over the window — same shape the overview area chart consumes. */
259
+ overTime: TimeseriesReport;
260
+ latency?: LatencyStats;
261
+ families?: FamilyLatency[];
262
+ cache?: CacheStats;
263
+ status?: StatusBreakdown;
264
+ exceptions?: StatsExceptionGroup[];
265
+ truncated: boolean;
266
+ }
267
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,OAAO,EACP,eAAe,EACf,WAAW,EACX,QAAQ,EACR,cAAc,EACd,UAAU,EACV,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;I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K,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AACD;;yDAEyD;AACzD,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AACD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC,SAAS,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import type { Entry } from '../../client/index.js';
2
+ export declare function BatchTimeline({ batch, currentId, onSelect, }: {
3
+ batch: Entry[];
4
+ currentId: string;
5
+ onSelect?: ((id: string) => void) | undefined;
6
+ }): JSX.Element;
7
+ //# sourceMappingURL=batch-timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-timeline.d.ts","sourceRoot":"","sources":["../../../src/react/components/batch-timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC/C,GAAG,GAAG,CAAC,OAAO,CA2Bd"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { entryLabel } from './entries-table.js';
3
+ export function BatchTimeline({ batch, currentId, onSelect, }) {
4
+ return (_jsx("ol", { className: "space-y-1", children: [...batch]
5
+ .sort((a, b) => a.sequence - b.sequence)
6
+ .map((entry) => (_jsx("li", { children: _jsxs("button", { type: "button", onClick: () => onSelect?.(entry.id), className: `flex w-full justify-between gap-4 px-2 py-1 text-left text-xs ${entry.id === currentId
7
+ ? 'bg-zinc-800 text-emerald-300'
8
+ : 'text-zinc-400 hover:bg-zinc-900'}`, children: [_jsxs("span", { children: [_jsx("span", { className: "text-emerald-500", children: entry.type }), " ", entryLabel(entry)] }), _jsx("span", { className: "text-zinc-600", children: entry.durationMs != null ? `${entry.durationMs}ms` : '' })] }) }, entry.id))) }));
9
+ }
10
+ //# sourceMappingURL=batch-timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-timeline.js","sourceRoot":"","sources":["../../../src/react/components/batch-timeline.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,UAAU,aAAa,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,QAAQ,GAKT;IACC,OAAO,CACL,aAAI,SAAS,EAAC,WAAW,YACtB,CAAC,GAAG,KAAK,CAAC;aACR,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;aACvC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACd,uBACE,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EACnC,SAAS,EAAE,iEACT,KAAK,CAAC,EAAE,KAAK,SAAS;oBACpB,CAAC,CAAC,8BAA8B;oBAChC,CAAC,CAAC,iCACN,EAAE,aAEF,2BACE,eAAM,SAAS,EAAC,kBAAkB,YAAE,KAAK,CAAC,IAAI,GAAQ,OAAE,UAAU,CAAC,KAAK,CAAC,IACpE,EACP,eAAM,SAAS,EAAC,eAAe,YAC5B,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE,GACnD,IACA,IAhBF,KAAK,CAAC,EAAE,CAiBZ,CACN,CAAC,GACD,CACN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Cache entries carry `content: { operation: 'get' | 'set', hit: boolean | null,
3
+ * key: string }`. This module derives a small status pill from that content:
4
+ * a green `HIT` / amber `MISS` for reads, and a neutral `SET` for writes.
5
+ */
6
+ export interface CacheBadgeInfo {
7
+ label: 'HIT' | 'MISS' | 'SET';
8
+ className: string;
9
+ }
10
+ /**
11
+ * Pure mapping from entry content to a cache pill descriptor; `null` for any
12
+ * non-cache or unrecognized content. Mirrors the bordered-pill token style used
13
+ * by the queue action buttons.
14
+ */
15
+ export declare function cacheBadge(content: unknown): CacheBadgeInfo | null;
16
+ /** Small cache hit/miss/set status pill; renders nothing for non-cache content. */
17
+ export declare function CacheBadge({ content }: {
18
+ content: unknown;
19
+ }): JSX.Element | null;
20
+ //# sourceMappingURL=cache-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-badge.d.ts","sourceRoot":"","sources":["../../../src/react/components/cache-badge.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CACnB;AAID;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAYlE;AAED,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAIhF"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /** Narrow unknown entry content to the cache shape without casts. */
3
+ function isCacheContent(content) {
4
+ if (typeof content !== 'object' || content === null)
5
+ return false;
6
+ if (!('operation' in content) || !('hit' in content) || !('key' in content))
7
+ return false;
8
+ const { operation, hit, key } = content;
9
+ if (operation !== 'get' && operation !== 'set')
10
+ return false;
11
+ if (hit !== null && typeof hit !== 'boolean')
12
+ return false;
13
+ return typeof key === 'string';
14
+ }
15
+ const PILL_BASE = 'rounded border px-1.5 py-0.5 text-[10px] font-medium';
16
+ /**
17
+ * Pure mapping from entry content to a cache pill descriptor; `null` for any
18
+ * non-cache or unrecognized content. Mirrors the bordered-pill token style used
19
+ * by the queue action buttons.
20
+ */
21
+ export function cacheBadge(content) {
22
+ if (!isCacheContent(content))
23
+ return null;
24
+ if (content.operation === 'set') {
25
+ return { label: 'SET', className: `${PILL_BASE} border-zinc-700 text-zinc-300` };
26
+ }
27
+ if (content.hit === true) {
28
+ return { label: 'HIT', className: `${PILL_BASE} border-emerald-500/40 text-emerald-300` };
29
+ }
30
+ if (content.hit === false) {
31
+ return { label: 'MISS', className: `${PILL_BASE} border-amber-500/40 text-amber-300` };
32
+ }
33
+ return null;
34
+ }
35
+ /** Small cache hit/miss/set status pill; renders nothing for non-cache content. */
36
+ export function CacheBadge({ content }) {
37
+ const badge = cacheBadge(content);
38
+ if (badge === null)
39
+ return null;
40
+ return _jsx("span", { className: badge.className, children: badge.label });
41
+ }
42
+ //# sourceMappingURL=cache-badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-badge.js","sourceRoot":"","sources":["../../../src/react/components/cache-badge.tsx"],"names":[],"mappings":";AAYA,qEAAqE;AACrE,SAAS,cAAc,CAAC,OAAgB;IACtC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAClE,IAAI,CAAC,CAAC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1F,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IACxC,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAC7D,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC3D,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC;AACjC,CAAC;AAOD,MAAM,SAAS,GAAG,sDAAsD,CAAC;AAEzE;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,OAAO,CAAC,SAAS,KAAK,KAAK,EAAE,CAAC;QAChC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,gCAAgC,EAAE,CAAC;IACnF,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,KAAK,IAAI,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,yCAAyC,EAAE,CAAC;IAC5F,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,KAAK,KAAK,EAAE,CAAC;QAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,qCAAqC,EAAE,CAAC;IACzF,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,UAAU,CAAC,EAAE,OAAO,EAAwB;IAC1D,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAClC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO,eAAM,SAAS,EAAE,KAAK,CAAC,SAAS,YAAG,KAAK,CAAC,KAAK,GAAQ,CAAC;AAChE,CAAC"}
@@ -0,0 +1,16 @@
1
+ export interface AreaChartPoint {
2
+ /** X-axis label (e.g. formatted time). */
3
+ label: string;
4
+ /** Series value. */
5
+ value: number;
6
+ }
7
+ /** Single-series time area chart with a subtle gradient fill and hover tooltip. */
8
+ export declare function AreaChartCard({ title, data, right, color, valueLabel, height, }: {
9
+ title: string;
10
+ data: AreaChartPoint[];
11
+ right?: React.ReactNode;
12
+ color?: string;
13
+ valueLabel?: string;
14
+ height?: number;
15
+ }): JSX.Element;
16
+ //# sourceMappingURL=area-chart-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-chart-card.d.ts","sourceRoot":"","sources":["../../../../src/react/components/charts/area-chart-card.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAkB,EAClB,UAAoB,EACpB,MAAY,GACb,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,GAAG,CAAC,OAAO,CAqDd"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId } from 'react';
3
+ import { Area, AreaChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis, } from 'recharts';
4
+ import { ChartCard, ChartEmptyState } from './chart-card.js';
5
+ import { ACCENT_HEX, axisTickStyle, chartTheme, tooltipContentStyle, tooltipItemStyle, tooltipLabelStyle, } from './chart-theme.js';
6
+ /** Single-series time area chart with a subtle gradient fill and hover tooltip. */
7
+ export function AreaChartCard({ title, data, right, color = ACCENT_HEX, valueLabel = 'value', height = 220, }) {
8
+ const gradientId = useId();
9
+ const bodyHeight = height - 64;
10
+ return (_jsx(ChartCard, { title: title, right: right, height: bodyHeight, children: data.length === 0 ? (_jsx(ChartEmptyState, { height: bodyHeight })) : (_jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(AreaChart, { data: data, margin: { top: 4, right: 8, bottom: 0, left: -16 }, children: [_jsx("defs", { children: _jsxs("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [_jsx("stop", { offset: "0%", stopColor: color, stopOpacity: 0.35 }), _jsx("stop", { offset: "100%", stopColor: color, stopOpacity: 0 })] }) }), _jsx(CartesianGrid, { stroke: chartTheme.gridStroke, vertical: false }), _jsx(XAxis, { dataKey: "label", tick: axisTickStyle, stroke: chartTheme.axisStroke, tickLine: false, minTickGap: 24 }), _jsx(YAxis, { tick: axisTickStyle, stroke: chartTheme.axisStroke, tickLine: false, width: 40, allowDecimals: false }), _jsx(Tooltip, { contentStyle: tooltipContentStyle, labelStyle: tooltipLabelStyle, itemStyle: tooltipItemStyle, cursor: { stroke: chartTheme.axisStroke } }), _jsx(Area, { type: "monotone", dataKey: "value", name: valueLabel, stroke: color, strokeWidth: 2, fill: `url(#${gradientId})`, isAnimationActive: false, dot: false, activeDot: { r: 3 } })] }) })) }));
11
+ }
12
+ //# sourceMappingURL=area-chart-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area-chart-card.js","sourceRoot":"","sources":["../../../../src/react/components/charts/area-chart-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EACL,IAAI,EACJ,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,OAAO,EACP,KAAK,EACL,KAAK,GACN,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EACL,UAAU,EACV,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAS1B,mFAAmF;AACnF,MAAM,UAAU,aAAa,CAAC,EAC5B,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,GAAG,UAAU,EAClB,UAAU,GAAG,OAAO,EACpB,MAAM,GAAG,GAAG,GAQb;IACC,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC;IAC3B,MAAM,UAAU,GAAG,MAAM,GAAG,EAAE,CAAC;IAC/B,OAAO,CACL,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,YACtD,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACnB,KAAC,eAAe,IAAC,MAAM,EAAE,UAAU,GAAI,CACxC,CAAC,CAAC,CAAC,CACF,KAAC,mBAAmB,IAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,YAC7C,MAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,G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AC,EAAE,GACnB,IACQ,GACQ,CACvB,GACS,CACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ export interface BarChartDatum {
2
+ /** Category label on the x-axis (or y-axis when horizontal). */
3
+ label: string;
4
+ /** Bar value. */
5
+ value: number;
6
+ /** Optional per-bar color override. */
7
+ color?: string;
8
+ /** Optional stable identifier carried through to {@link onBarClick}. */
9
+ id?: string;
10
+ }
11
+ /** Categorical bar chart (e.g. per-queue failure rate) with a hover tooltip. */
12
+ export declare function BarChartCard({ title, data, right, color, valueLabel, height, horizontal, truncateLabel, onBarClick, }: {
13
+ title: string;
14
+ data: BarChartDatum[];
15
+ right?: React.ReactNode;
16
+ color?: string;
17
+ valueLabel?: string;
18
+ height?: number;
19
+ /** Render category labels down the Y axis so long labels read left-to-right. */
20
+ horizontal?: boolean;
21
+ /** Truncate tick labels to this many chars (full label stays in the tooltip). */
22
+ truncateLabel?: number;
23
+ /** Called with the datum behind a clicked bar. */
24
+ onBarClick?: (datum: BarChartDatum) => void;
25
+ }): JSX.Element;
26
+ //# sourceMappingURL=bar-chart-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar-chart-card.d.ts","sourceRoot":"","sources":["../../../../src/react/components/charts/bar-chart-card.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAQD,gFAAgF;AAChF,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAkB,EAClB,UAAoB,EACpB,MAAY,EACZ,UAAkB,EAClB,aAAa,EACb,UAAU,GACX,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC7C,GAAG,GAAG,CAAC,OAAO,CA0Gd"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Bar, BarChart, CartesianGrid, Cell, ResponsiveContainer, Tooltip, XAxis, YAxis, } from 'recharts';
3
+ import { ChartCard, ChartEmptyState } from './chart-card.js';
4
+ import { ACCENT_HEX, axisTickStyle, chartTheme, tooltipContentStyle, tooltipItemStyle, tooltipLabelStyle, } from './chart-theme.js';
5
+ /** Truncate a long category label to `max` chars with a trailing ellipsis. */
6
+ function truncate(label, max) {
7
+ if (label.length <= max)
8
+ return label;
9
+ return `${label.slice(0, Math.max(0, max - 1))}…`;
10
+ }
11
+ /** Categorical bar chart (e.g. per-queue failure rate) with a hover tooltip. */
12
+ export function BarChartCard({ title, data, right, color = ACCENT_HEX, valueLabel = 'value', height = 220, horizontal = false, truncateLabel, onBarClick, }) {
13
+ const bodyHeight = height - 64;
14
+ function handleBarClick(_value, index) {
15
+ const datum = data[index];
16
+ if (datum && onBarClick)
17
+ onBarClick(datum);
18
+ }
19
+ // Build optional props conditionally: under `exactOptionalPropertyTypes` an
20
+ // explicit `undefined` is not assignable to Recharts' optional handlers.
21
+ const tickFormatterProps = truncateLabel !== undefined
22
+ ? { tickFormatter: (value) => truncate(value, truncateLabel) }
23
+ : {};
24
+ const barInteractionProps = onBarClick !== undefined ? { onClick: handleBarClick, cursor: 'pointer' } : {};
25
+ return (_jsx(ChartCard, { title: title, right: right, height: bodyHeight, children: data.length === 0 ? (_jsx(ChartEmptyState, { height: bodyHeight })) : (_jsx(ResponsiveContainer, { width: "100%", height: "100%", children: horizontal ? (_jsxs(BarChart, { data: data, layout: "vertical", margin: { top: 4, right: 8, bottom: 0, left: 8 }, children: [_jsx(CartesianGrid, { stroke: chartTheme.gridStroke, horizontal: false }), _jsx(XAxis, { type: "number", tick: axisTickStyle, stroke: chartTheme.axisStroke, tickLine: false, allowDecimals: false }), _jsx(YAxis, { type: "category", dataKey: "label", tick: axisTickStyle, ...tickFormatterProps, stroke: chartTheme.axisStroke, tickLine: false, width: 160, interval: 0 }), _jsx(Tooltip, { contentStyle: tooltipContentStyle, labelStyle: tooltipLabelStyle, itemStyle: tooltipItemStyle, cursor: { fill: '#ffffff08' } }), _jsx(Bar, { dataKey: "value", name: valueLabel, radius: [0, 3, 3, 0], isAnimationActive: false, ...barInteractionProps, children: data.map((datum) => (_jsx(Cell, { fill: datum.color ?? color }, datum.id ?? datum.label))) })] })) : (_jsxs(BarChart, { data: data, margin: { top: 4, right: 8, bottom: 0, left: -16 }, children: [_jsx(CartesianGrid, { stroke: chartTheme.gridStroke, vertical: false }), _jsx(XAxis, { dataKey: "label", tick: axisTickStyle, ...tickFormatterProps, stroke: chartTheme.axisStroke, tickLine: false, interval: 0 }), _jsx(YAxis, { tick: axisTickStyle, stroke: chartTheme.axisStroke, tickLine: false, width: 40, allowDecimals: false }), _jsx(Tooltip, { contentStyle: tooltipContentStyle, labelStyle: tooltipLabelStyle, itemStyle: tooltipItemStyle, cursor: { fill: '#ffffff08' } }), _jsx(Bar, { dataKey: "value", name: valueLabel, radius: [3, 3, 0, 0], isAnimationActive: false, ...barInteractionProps, children: data.map((datum) => (_jsx(Cell, { fill: datum.color ?? color }, datum.id ?? datum.label))) })] })) })) }));
26
+ }
27
+ //# sourceMappingURL=bar-chart-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar-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,KAAC,GAAG,IACF,OAAO,EAAC,OAAO,EACf,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACpB,iBAAiB,EAAE,KAAK,KACpB,mBAAmB,YAEtB,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACnB,KAAC,IAAI,IAA+B,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,IAAnD,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,KAAK,CAAgC,CACnE,CAAC,GACE,IACG,CACZ,GACmB,CACvB,GACS,CACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /** Shared card chrome (title, optional right slot, framed body) for every chart card. */
2
+ export declare function ChartCard({ title, right, height, children, }: {
3
+ title: string;
4
+ right?: React.ReactNode;
5
+ height?: number;
6
+ children: React.ReactNode;
7
+ }): JSX.Element;
8
+ export declare function ChartEmptyState({ height }: {
9
+ height?: number;
10
+ }): JSX.Element;
11
+ //# sourceMappingURL=chart-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-card.d.ts","sourceRoot":"","sources":["../../../../src/react/components/charts/chart-card.tsx"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,MAAY,EACZ,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,GAAG,CAAC,OAAO,CAUd;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAY,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,CAMlF"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /** Shared card chrome (title, optional right slot, framed body) for every chart card. */
3
+ export function ChartCard({ title, right, height = 220, children, }) {
4
+ return (_jsxs("section", { className: "rounded-lg border border-zinc-800 bg-zinc-900/40 p-4", children: [_jsxs("header", { className: "mb-3 flex items-center justify-between", children: [_jsx("h3", { className: "text-xs font-medium uppercase tracking-wide text-zinc-400", children: title }), right] }), _jsx("div", { style: { height }, children: children })] }));
5
+ }
6
+ export function ChartEmptyState({ height = 220 }) {
7
+ return (_jsx("div", { className: "flex items-center justify-center text-xs text-zinc-600", style: { height }, children: "No data in window." }));
8
+ }
9
+ //# sourceMappingURL=chart-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-card.js","sourceRoot":"","sources":["../../../../src/react/components/charts/chart-card.tsx"],"names":[],"mappings":";AAAA,yFAAyF;AACzF,MAAM,UAAU,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,MAAM,GAAG,GAAG,EACZ,QAAQ,GAMT;IACC,OAAO,CACL,mBAAS,SAAS,EAAC,sDAAsD,aACvE,kBAAQ,SAAS,EAAC,wCAAwC,aACxD,aAAI,SAAS,EAAC,2DAA2D,YAAE,KAAK,GAAM,EACrF,KAAK,IACC,EACT,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,YAAG,QAAQ,GAAO,IAChC,CACX,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAE,MAAM,GAAG,GAAG,EAAuB;IACnE,OAAO,CACL,cAAK,SAAS,EAAC,wDAAwD,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,mCAEnF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Shared dark theme tokens for the Recharts chart cards. Centralizing these keeps
3
+ * the chart layer consistent with the dashboard's zinc/emerald palette and makes
4
+ * the rest of the app chart-library-agnostic (only this folder imports Recharts).
5
+ */
6
+ /** Resolved hex colors for known entry types (matches the `fill-*` tokens used elsewhere). */
7
+ export declare const TYPE_HEX: Record<string, string>;
8
+ export declare const ACCENT_HEX = "#34d399";
9
+ export declare function hexForType(type: string, fallbackIndex?: number): string;
10
+ export declare const chartTheme: {
11
+ readonly gridStroke: "#ffffff10";
12
+ readonly axisStroke: "#3f3f46";
13
+ readonly axisTick: "#71717a";
14
+ readonly tooltipBg: "#18181b";
15
+ readonly tooltipBorder: "#27272a";
16
+ readonly tooltipText: "#e4e4e7";
17
+ readonly tooltipLabel: "#a1a1aa";
18
+ readonly legendText: "#a1a1aa";
19
+ };
20
+ /** Shared `contentStyle` for Recharts `<Tooltip>` so every chart looks identical. */
21
+ export declare const tooltipContentStyle: {
22
+ readonly background: "#18181b";
23
+ readonly border: "1px solid #27272a";
24
+ readonly borderRadius: 6;
25
+ readonly fontSize: 11;
26
+ readonly color: "#e4e4e7";
27
+ };
28
+ export declare const tooltipLabelStyle: {
29
+ readonly color: "#a1a1aa";
30
+ readonly fontSize: 10;
31
+ readonly textTransform: "uppercase";
32
+ readonly letterSpacing: "0.05em";
33
+ };
34
+ export declare const tooltipItemStyle: {
35
+ readonly color: "#e4e4e7";
36
+ };
37
+ export declare const axisTickStyle: {
38
+ readonly fill: "#71717a";
39
+ readonly fontSize: 10;
40
+ };
41
+ //# sourceMappingURL=chart-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-theme.d.ts","sourceRoot":"","sources":["../../../../src/react/components/charts/chart-theme.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,8FAA8F;AAC9F,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAO3C,CAAC;AAKF,eAAO,MAAM,UAAU,YAAY,CAAC;AAEpC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,SAAI,GAAG,MAAM,CAGlE;AAED,eAAO,MAAM,UAAU;;;;;;;;;CASb,CAAC;AAEX,qFAAqF;AACrF,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;CAEnB,CAAC;AAEX,eAAO,MAAM,aAAa;;;CAGhB,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Shared dark theme tokens for the Recharts chart cards. Centralizing these keeps
3
+ * the chart layer consistent with the dashboard's zinc/emerald palette and makes
4
+ * the rest of the app chart-library-agnostic (only this folder imports Recharts).
5
+ */
6
+ /** Resolved hex colors for known entry types (matches the `fill-*` tokens used elsewhere). */
7
+ export const TYPE_HEX = {
8
+ request: '#34d399', // emerald-400
9
+ query: '#38bdf8', // sky-400
10
+ job: '#a78bfa', // violet-400
11
+ exception: '#f87171', // red-400
12
+ http_client: '#fbbf24', // amber-400
13
+ mail: '#f472b6', // pink-400
14
+ };
15
+ /** Ordered palette for series whose type is not in {@link TYPE_HEX}. */
16
+ const FALLBACK_PALETTE = ['#71717a', '#a1a1aa', '#22d3ee', '#c084fc', '#fb923c', '#4ade80'];
17
+ export const ACCENT_HEX = '#34d399'; // emerald-400 — primary throughput accent
18
+ export function hexForType(type, fallbackIndex = 0) {
19
+ const fallback = FALLBACK_PALETTE[fallbackIndex % FALLBACK_PALETTE.length];
20
+ return TYPE_HEX[type] ?? fallback ?? '#71717a';
21
+ }
22
+ export const chartTheme = {
23
+ gridStroke: '#ffffff10',
24
+ axisStroke: '#3f3f46', // zinc-700
25
+ axisTick: '#71717a', // zinc-500
26
+ tooltipBg: '#18181b', // zinc-900
27
+ tooltipBorder: '#27272a', // zinc-800
28
+ tooltipText: '#e4e4e7', // zinc-200
29
+ tooltipLabel: '#a1a1aa', // zinc-400
30
+ legendText: '#a1a1aa', // zinc-400
31
+ };
32
+ /** Shared `contentStyle` for Recharts `<Tooltip>` so every chart looks identical. */
33
+ export const tooltipContentStyle = {
34
+ background: chartTheme.tooltipBg,
35
+ border: `1px solid ${chartTheme.tooltipBorder}`,
36
+ borderRadius: 6,
37
+ fontSize: 11,
38
+ color: chartTheme.tooltipText,
39
+ };
40
+ export const tooltipLabelStyle = {
41
+ color: chartTheme.tooltipLabel,
42
+ fontSize: 10,
43
+ textTransform: 'uppercase',
44
+ letterSpacing: '0.05em',
45
+ };
46
+ export const tooltipItemStyle = {
47
+ color: chartTheme.tooltipText,
48
+ };
49
+ export const axisTickStyle = {
50
+ fill: chartTheme.axisTick,
51
+ fontSize: 10,
52
+ };
53
+ //# sourceMappingURL=chart-theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart-theme.js","sourceRoot":"","sources":["../../../../src/react/components/charts/chart-theme.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,8FAA8F;AAC9F,MAAM,CAAC,MAAM,QAAQ,GAA2B;IAC9C,OAAO,EAAE,SAAS,EAAE,cAAc;IAClC,KAAK,EAAE,SAAS,EAAE,UAAU;IAC5B,GAAG,EAAE,SAAS,EAAE,aAAa;IAC7B,SAAS,EAAE,SAAS,EAAE,UAAU;IAChC,WAAW,EAAE,SAAS,EAAE,YAAY;IACpC,IAAI,EAAE,SAAS,EAAE,WAAW;CAC7B,CAAC;AAEF,wEAAwE;AACxE,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAE5F,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,0CAA0C;AAE/E,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,aAAa,GAAG,CAAC;IACxD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC3E,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,IAAI,SAAS,CAAC;AACjD,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU,EAAE,WAAW;IACvB,UAAU,EAAE,SAAS,EAAE,WAAW;IAClC,QAA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