@geekmidas/ui 9.0.2 → 10.0.0-alpha.1

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 (106) hide show
  1. package/dist/button-BB4n8b0z.mjs +46 -0
  2. package/dist/button-BB4n8b0z.mjs.map +1 -0
  3. package/dist/button-BSp9VyHi.cjs +58 -0
  4. package/dist/button-BSp9VyHi.cjs.map +1 -0
  5. package/dist/chunk-CUT6urMc.cjs +30 -0
  6. package/dist/components/data-display/index.cjs +27 -0
  7. package/dist/components/data-display/index.d.cts +2 -0
  8. package/dist/components/data-display/index.d.mts +2 -0
  9. package/dist/components/data-display/index.mjs +6 -0
  10. package/dist/components/feedback/index.cjs +26 -0
  11. package/dist/components/feedback/index.d.cts +2 -0
  12. package/dist/components/feedback/index.d.mts +2 -0
  13. package/dist/components/feedback/index.mjs +6 -0
  14. package/dist/components/layout/index.cjs +26 -0
  15. package/dist/components/layout/index.d.cts +2 -0
  16. package/dist/components/layout/index.d.mts +2 -0
  17. package/dist/components/layout/index.mjs +6 -0
  18. package/dist/components/ui/index.cjs +73 -0
  19. package/dist/components/ui/index.d.cts +2 -0
  20. package/dist/components/ui/index.d.mts +2 -0
  21. package/dist/components/ui/index.mjs +7 -0
  22. package/dist/data-display-BSUj4rIc.cjs +1318 -0
  23. package/dist/data-display-BSUj4rIc.cjs.map +1 -0
  24. package/dist/data-display-IcuThGEY.mjs +1186 -0
  25. package/dist/data-display-IcuThGEY.mjs.map +1 -0
  26. package/dist/feedback-B9rTsQdJ.cjs +505 -0
  27. package/dist/feedback-B9rTsQdJ.cjs.map +1 -0
  28. package/dist/feedback-DBLrs44v.mjs +379 -0
  29. package/dist/feedback-DBLrs44v.mjs.map +1 -0
  30. package/dist/hooks/index.cjs +1 -1
  31. package/dist/hooks/index.d.cts +1 -1
  32. package/dist/hooks/index.d.mts +1 -1
  33. package/dist/hooks/index.mjs +1 -1
  34. package/dist/{hooks-DuxmSO-h.cjs → hooks-C5O7RXTd.cjs} +3 -31
  35. package/dist/{hooks-DuxmSO-h.cjs.map → hooks-C5O7RXTd.cjs.map} +1 -1
  36. package/dist/{hooks-DBc-Cw9X.mjs → hooks-Dhkovxbo.mjs} +1 -1
  37. package/dist/{hooks-DBc-Cw9X.mjs.map → hooks-Dhkovxbo.mjs.map} +1 -1
  38. package/dist/index-BHdsb44U.d.mts +102 -0
  39. package/dist/index-BHdsb44U.d.mts.map +1 -0
  40. package/dist/index-CBBJ6vmK.d.cts +154 -0
  41. package/dist/index-CBBJ6vmK.d.cts.map +1 -0
  42. package/dist/index-CcP4i-Xr.d.cts +102 -0
  43. package/dist/index-CcP4i-Xr.d.cts.map +1 -0
  44. package/dist/index-D4moB7PV.d.mts +153 -0
  45. package/dist/index-D4moB7PV.d.mts.map +1 -0
  46. package/dist/index-DDztdxvr.d.mts +329 -0
  47. package/dist/index-DDztdxvr.d.mts.map +1 -0
  48. package/dist/{index-DmtSyJ1q.d.mts → index-DTIa7Ryw.d.cts} +1 -1
  49. package/dist/{index-DmtSyJ1q.d.mts.map → index-DTIa7Ryw.d.cts.map} +1 -1
  50. package/dist/index-DsQW2bkf.d.mts +154 -0
  51. package/dist/index-DsQW2bkf.d.mts.map +1 -0
  52. package/dist/{index-QNnnyGjB.d.cts → index-DvzSne29.d.mts} +1 -1
  53. package/dist/{index-QNnnyGjB.d.cts.map → index-DvzSne29.d.mts.map} +1 -1
  54. package/dist/index-FnnlSxxr.d.cts +153 -0
  55. package/dist/index-FnnlSxxr.d.cts.map +1 -0
  56. package/dist/index-uRu0ad4_.d.cts +329 -0
  57. package/dist/index-uRu0ad4_.d.cts.map +1 -0
  58. package/dist/index.cjs +144 -2560
  59. package/dist/index.d.cts +8 -727
  60. package/dist/index.d.mts +8 -727
  61. package/dist/index.mjs +12 -2428
  62. package/dist/layout-CIIQOb1x.mjs +387 -0
  63. package/dist/layout-CIIQOb1x.mjs.map +1 -0
  64. package/dist/layout-CcO0svmw.cjs +513 -0
  65. package/dist/layout-CcO0svmw.cjs.map +1 -0
  66. package/dist/lib/utils.cjs +3 -0
  67. package/dist/lib/utils.d.cts +2 -0
  68. package/dist/lib/utils.d.mts +2 -0
  69. package/dist/lib/utils.mjs +3 -0
  70. package/dist/styles/theme.cjs +1 -1
  71. package/dist/styles/theme.d.cts +1 -1
  72. package/dist/styles/theme.d.mts +1 -1
  73. package/dist/styles/theme.mjs +1 -1
  74. package/dist/table-CrFSBSDe.mjs +129 -0
  75. package/dist/table-CrFSBSDe.mjs.map +1 -0
  76. package/dist/table-DNX6iqH5.cjs +237 -0
  77. package/dist/table-DNX6iqH5.cjs.map +1 -0
  78. package/dist/{theme-BRGSS8qx.cjs → theme-BBoDSysS.cjs} +1 -1
  79. package/dist/{theme-BRGSS8qx.cjs.map → theme-BBoDSysS.cjs.map} +1 -1
  80. package/dist/{theme-vpDwDfcR.d.mts → theme-BsXPj5m4.d.cts} +1 -1
  81. package/dist/{theme-B5mGkTlU.d.cts.map → theme-BsXPj5m4.d.cts.map} +1 -1
  82. package/dist/{theme-DAiFBbyM.mjs → theme-DI0sgbjj.mjs} +1 -1
  83. package/dist/{theme-DAiFBbyM.mjs.map → theme-DI0sgbjj.mjs.map} +1 -1
  84. package/dist/{theme-B5mGkTlU.d.cts → theme-aIIK_kn9.d.mts} +1 -1
  85. package/dist/{theme-vpDwDfcR.d.mts.map → theme-aIIK_kn9.d.mts.map} +1 -1
  86. package/dist/tooltip-BuTZvLTX.cjs +82 -0
  87. package/dist/tooltip-BuTZvLTX.cjs.map +1 -0
  88. package/dist/tooltip-z8o59BXq.mjs +46 -0
  89. package/dist/tooltip-z8o59BXq.mjs.map +1 -0
  90. package/dist/ui-B6Pj_ZAW.mjs +296 -0
  91. package/dist/ui-B6Pj_ZAW.mjs.map +1 -0
  92. package/dist/ui-PFNfvwdv.cjs +542 -0
  93. package/dist/ui-PFNfvwdv.cjs.map +1 -0
  94. package/dist/utils-0J5jzmnT.mjs +11 -0
  95. package/dist/utils-0J5jzmnT.mjs.map +1 -0
  96. package/dist/utils-3XfDEz8-.d.cts +9 -0
  97. package/dist/utils-3XfDEz8-.d.cts.map +1 -0
  98. package/dist/utils-CgSGIxhd.d.mts +9 -0
  99. package/dist/utils-CgSGIxhd.d.mts.map +1 -0
  100. package/dist/utils-DTuzb7hO.cjs +17 -0
  101. package/dist/utils-DTuzb7hO.cjs.map +1 -0
  102. package/package.json +1 -1
  103. package/dist/index.cjs.map +0 -1
  104. package/dist/index.d.cts.map +0 -1
  105. package/dist/index.d.mts.map +0 -1
  106. package/dist/index.mjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,2566 +1,150 @@
1
- const require_hooks = require('./hooks-DuxmSO-h.cjs');
2
- const require_theme = require('./theme-BRGSS8qx.cjs');
3
- const date_fns = require_hooks.__toESM(require("date-fns"));
4
- const recharts = require_hooks.__toESM(require("recharts"));
5
- const clsx = require_hooks.__toESM(require("clsx"));
6
- const tailwind_merge = require_hooks.__toESM(require("tailwind-merge"));
7
- const react_jsx_runtime = require_hooks.__toESM(require("react/jsx-runtime"));
8
- const lucide_react = require_hooks.__toESM(require("lucide-react"));
9
- const react = require_hooks.__toESM(require("react"));
10
- const __radix_ui_react_slot = require_hooks.__toESM(require("@radix-ui/react-slot"));
11
- const class_variance_authority = require_hooks.__toESM(require("class-variance-authority"));
12
- const __radix_ui_react_select = require_hooks.__toESM(require("@radix-ui/react-select"));
13
- const __radix_ui_react_scroll_area = require_hooks.__toESM(require("@radix-ui/react-scroll-area"));
14
- const __radix_ui_react_tooltip = require_hooks.__toESM(require("@radix-ui/react-tooltip"));
15
- const prism_react_renderer = require_hooks.__toESM(require("prism-react-renderer"));
16
- const __radix_ui_react_dialog = require_hooks.__toESM(require("@radix-ui/react-dialog"));
17
- const __radix_ui_react_dropdown_menu = require_hooks.__toESM(require("@radix-ui/react-dropdown-menu"));
18
- const __radix_ui_react_label = require_hooks.__toESM(require("@radix-ui/react-label"));
19
- const __radix_ui_react_separator = require_hooks.__toESM(require("@radix-ui/react-separator"));
20
- const __radix_ui_react_tabs = require_hooks.__toESM(require("@radix-ui/react-tabs"));
21
-
22
- //#region src/lib/utils.ts
23
- function cn(...inputs) {
24
- return (0, tailwind_merge.twMerge)((0, clsx.clsx)(inputs));
25
- }
26
-
27
- //#endregion
28
- //#region src/components/data-display/charts/area-time-series-chart.tsx
29
- const COLOR_MAP = {
30
- blue: "hsl(217, 91%, 60%)",
31
- red: "hsl(0, 84%, 60%)",
32
- green: "hsl(142, 71%, 45%)",
33
- amber: "hsl(38, 92%, 50%)",
34
- purple: "hsl(263, 70%, 50%)"
35
- };
36
- function AreaTimeSeriesChart({ data, primaryLabel = "Value", secondaryLabel, primaryColor = "blue", secondaryColor = "red", timeFormat = "HH:mm", valueFormatter = (v) => v.toLocaleString(), className, showLegend }) {
37
- if (data.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
38
- className: "h-48 flex items-center justify-center text-sm text-muted-foreground",
39
- children: "No data available"
40
- });
41
- const hasSecondary = secondaryLabel && data.some((p) => p.secondaryValue !== void 0);
42
- const chartData = data.map((point) => ({
43
- time: (0, date_fns.format)(new Date(point.timestamp), timeFormat),
44
- timestamp: point.timestamp,
45
- [primaryLabel]: point.value,
46
- ...hasSecondary && secondaryLabel ? { [secondaryLabel]: point.secondaryValue ?? 0 } : {}
47
- }));
48
- const primaryColorValue = COLOR_MAP[primaryColor] ?? primaryColor;
49
- const secondaryColorValue = COLOR_MAP[secondaryColor] ?? secondaryColor;
50
- const shouldShowLegend = showLegend ?? hasSecondary;
51
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
52
- className: cn("h-48", className),
53
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.ResponsiveContainer, {
54
- width: "100%",
55
- height: "100%",
56
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(recharts.AreaChart, {
57
- data: chartData,
58
- children: [
59
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("defs", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("linearGradient", {
60
- id: "primaryGradient",
61
- x1: "0",
62
- y1: "0",
63
- x2: "0",
64
- y2: "1",
65
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("stop", {
66
- offset: "5%",
67
- stopColor: primaryColorValue,
68
- stopOpacity: .3
69
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("stop", {
70
- offset: "95%",
71
- stopColor: primaryColorValue,
72
- stopOpacity: 0
73
- })]
74
- }), hasSecondary && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("linearGradient", {
75
- id: "secondaryGradient",
76
- x1: "0",
77
- y1: "0",
78
- x2: "0",
79
- y2: "1",
80
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("stop", {
81
- offset: "5%",
82
- stopColor: secondaryColorValue,
83
- stopOpacity: .3
84
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("stop", {
85
- offset: "95%",
86
- stopColor: secondaryColorValue,
87
- stopOpacity: 0
88
- })]
89
- })] }),
90
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.XAxis, {
91
- dataKey: "time",
92
- tick: {
93
- fill: "hsl(var(--muted-foreground))",
94
- fontSize: 12
95
- },
96
- axisLine: false,
97
- tickLine: false
98
- }),
99
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.YAxis, {
100
- tick: {
101
- fill: "hsl(var(--muted-foreground))",
102
- fontSize: 12
103
- },
104
- axisLine: false,
105
- tickLine: false,
106
- tickFormatter: valueFormatter,
107
- width: 50
108
- }),
109
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Tooltip, { content: ({ active, payload, label }) => {
110
- if (!active || !payload?.length) return null;
111
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
112
- className: "rounded-lg border bg-popover px-3 py-2 text-sm shadow-md",
113
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
114
- className: "font-medium mb-1",
115
- children: label
116
- }), payload.map((entry, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
117
- className: "flex items-center gap-2 text-muted-foreground",
118
- children: [
119
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
120
- className: "w-2 h-2 rounded-full",
121
- style: { backgroundColor: entry.color }
122
- }),
123
- entry.name,
124
- ": ",
125
- valueFormatter(entry.value)
126
- ]
127
- }, index))]
128
- });
129
- } }),
130
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Area, {
131
- type: "monotone",
132
- dataKey: primaryLabel,
133
- stroke: primaryColorValue,
134
- fill: "url(#primaryGradient)",
135
- strokeWidth: 2
136
- }),
137
- hasSecondary && secondaryLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Area, {
138
- type: "monotone",
139
- dataKey: secondaryLabel,
140
- stroke: secondaryColorValue,
141
- fill: "url(#secondaryGradient)",
142
- strokeWidth: 2
143
- })
144
- ]
145
- })
146
- }), shouldShowLegend && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
147
- className: "flex justify-center gap-4 mt-2",
148
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
149
- className: "flex items-center gap-2 text-xs",
150
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
151
- className: "w-3 h-3 rounded-full",
152
- style: { backgroundColor: primaryColorValue }
153
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
154
- className: "text-muted-foreground",
155
- children: primaryLabel
156
- })]
157
- }), hasSecondary && secondaryLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
158
- className: "flex items-center gap-2 text-xs",
159
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
160
- className: "w-3 h-3 rounded-full",
161
- style: { backgroundColor: secondaryColorValue }
162
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
163
- className: "text-muted-foreground",
164
- children: secondaryLabel
165
- })]
166
- })]
167
- })]
168
- });
169
- }
170
-
171
- //#endregion
172
- //#region src/components/data-display/charts/bar-list-chart.tsx
173
- function BarListChart({ data, valueFormatter = (v) => v.toLocaleString(), onItemClick, className, emptyMessage = "No data available", color = "hsl(217, 91%, 60%)" }) {
174
- if (data.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
175
- className: "h-48 flex items-center justify-center text-sm text-muted-foreground",
176
- children: emptyMessage
177
- });
178
- const maxValue = Math.max(...data.map((d) => d.value));
179
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
180
- className: cn("space-y-3", className),
181
- children: data.map((item, index) => {
182
- const percentage = maxValue > 0 ? item.value / maxValue * 100 : 0;
183
- const isClickable = !!onItemClick;
184
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
185
- className: cn("group", isClickable && "cursor-pointer"),
186
- onClick: () => onItemClick?.(item),
187
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
188
- className: "flex items-center justify-between mb-1",
189
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
190
- className: cn("text-sm truncate flex-1 mr-4", isClickable && "group-hover:text-foreground"),
191
- children: item.name
192
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
193
- className: "text-sm font-medium tabular-nums",
194
- children: valueFormatter(item.value)
195
- })]
196
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
197
- className: "h-2 bg-muted rounded-full overflow-hidden",
198
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
199
- className: cn("h-full rounded-full transition-all duration-300", isClickable && "group-hover:opacity-80"),
200
- style: {
201
- width: `${percentage}%`,
202
- backgroundColor: color
203
- }
204
- })
205
- })]
206
- }, index);
207
- })
208
- });
209
- }
210
-
211
- //#endregion
212
- //#region src/components/data-display/charts/latency-percentiles-chart.tsx
213
- function defaultFormatDuration(ms) {
214
- if (ms < 1) return "<1ms";
215
- if (ms < 1e3) return `${Math.round(ms)}ms`;
216
- return `${(ms / 1e3).toFixed(2)}s`;
217
- }
218
- const PERCENTILE_COLORS = {
219
- p50: "hsl(217, 91%, 60%)",
220
- p95: "hsl(38, 92%, 50%)",
221
- p99: "hsl(0, 84%, 60%)"
222
- };
223
- function LatencyPercentilesChart({ p50, p95, p99, className, valueFormatter = defaultFormatDuration }) {
224
- const chartData = [
225
- {
226
- name: "p50",
227
- label: "p50 (Median)",
228
- value: p50,
229
- color: PERCENTILE_COLORS.p50
230
- },
231
- {
232
- name: "p95",
233
- label: "p95",
234
- value: p95,
235
- color: PERCENTILE_COLORS.p95
236
- },
237
- {
238
- name: "p99",
239
- label: "p99",
240
- value: p99,
241
- color: PERCENTILE_COLORS.p99
242
- }
243
- ];
244
- if (p99 === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
245
- className: "h-48 flex items-center justify-center text-sm text-muted-foreground",
246
- children: "No data available"
247
- });
248
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
249
- className: cn("h-48", className),
250
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.ResponsiveContainer, {
251
- width: "100%",
252
- height: "100%",
253
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(recharts.BarChart, {
254
- data: chartData,
255
- layout: "vertical",
256
- barSize: 20,
257
- children: [
258
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.XAxis, {
259
- type: "number",
260
- tickFormatter: valueFormatter,
261
- tick: {
262
- fill: "hsl(var(--muted-foreground))",
263
- fontSize: 12
264
- },
265
- axisLine: false,
266
- tickLine: false
267
- }),
268
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.YAxis, {
269
- type: "category",
270
- dataKey: "label",
271
- width: 90,
272
- tick: {
273
- fill: "hsl(var(--muted-foreground))",
274
- fontSize: 12
275
- },
276
- axisLine: false,
277
- tickLine: false
278
- }),
279
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Tooltip, { content: ({ active, payload }) => {
280
- if (!active || !payload?.length) return null;
281
- const item = payload[0]?.payload;
282
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
283
- className: "rounded-lg border bg-popover px-3 py-2 text-sm shadow-md",
284
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
285
- className: "font-medium",
286
- children: item.label
287
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
288
- className: "text-muted-foreground",
289
- children: valueFormatter(item.value)
290
- })]
291
- });
292
- } }),
293
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Bar, {
294
- dataKey: "value",
295
- radius: [
296
- 0,
297
- 4,
298
- 4,
299
- 0
300
- ],
301
- children: chartData.map((entry, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Cell, { fill: entry.color }, `cell-${index}`))
302
- })
303
- ]
304
- })
305
- })
306
- });
307
- }
308
-
309
- //#endregion
310
- //#region src/components/data-display/charts/status-distribution-chart.tsx
311
- const STATUS_CONFIG = {
312
- "2xx": {
313
- label: "2xx Success",
314
- color: "hsl(142, 71%, 45%)"
315
- },
316
- "3xx": {
317
- label: "3xx Redirect",
318
- color: "hsl(217, 91%, 60%)"
319
- },
320
- "4xx": {
321
- label: "4xx Client Error",
322
- color: "hsl(38, 92%, 50%)"
323
- },
324
- "5xx": {
325
- label: "5xx Server Error",
326
- color: "hsl(0, 84%, 60%)"
327
- }
328
- };
329
- function StatusDistributionChart({ data, className }) {
330
- const chartData = Object.entries(data).filter(([, value]) => value > 0).map(([key, value]) => ({
331
- name: STATUS_CONFIG[key].label,
332
- value,
333
- color: STATUS_CONFIG[key].color
334
- }));
335
- const total = chartData.reduce((sum, d) => sum + d.value, 0);
336
- if (total === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
337
- className: "h-48 flex items-center justify-center text-sm text-muted-foreground",
338
- children: "No data available"
339
- });
340
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
341
- className: cn("h-48", className),
342
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.ResponsiveContainer, {
343
- width: "100%",
344
- height: "100%",
345
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(recharts.PieChart, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Pie, {
346
- data: chartData,
347
- cx: "50%",
348
- cy: "50%",
349
- innerRadius: 50,
350
- outerRadius: 70,
351
- paddingAngle: 2,
352
- dataKey: "value",
353
- nameKey: "name",
354
- children: chartData.map((entry, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Cell, { fill: entry.color }, `cell-${index}`))
355
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Tooltip, { content: ({ active, payload }) => {
356
- if (!active || !payload?.length) return null;
357
- const item = payload[0];
358
- const percent = (item.value / total * 100).toFixed(1);
359
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
360
- className: "rounded-lg border bg-popover px-3 py-2 text-sm shadow-md",
361
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
362
- className: "font-medium",
363
- children: item.name
364
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
365
- className: "text-muted-foreground",
366
- children: [
367
- item.value.toLocaleString(),
368
- " (",
369
- percent,
370
- "%)"
371
- ]
372
- })]
373
- });
374
- } })] })
375
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
376
- className: "flex flex-wrap justify-center gap-4 mt-2",
377
- children: chartData.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
378
- className: "flex items-center gap-2 text-xs",
379
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
380
- className: "w-3 h-3 rounded-full",
381
- style: { backgroundColor: item.color }
382
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
383
- className: "text-muted-foreground",
384
- children: item.name
385
- })]
386
- }, item.name))
387
- })]
388
- });
389
- }
390
-
391
- //#endregion
392
- //#region src/components/data-display/charts/time-range-selector.tsx
393
- const defaultPresets = [
394
- {
395
- label: "1h",
396
- value: "1h"
397
- },
398
- {
399
- label: "6h",
400
- value: "6h"
401
- },
402
- {
403
- label: "24h",
404
- value: "24h"
405
- },
406
- {
407
- label: "7d",
408
- value: "7d"
409
- }
410
- ];
411
- function getPresetRange(preset) {
412
- const end = /* @__PURE__ */ new Date();
413
- switch (preset) {
414
- case "1h": return {
415
- start: (0, date_fns.subHours)(end, 1),
416
- end
417
- };
418
- case "6h": return {
419
- start: (0, date_fns.subHours)(end, 6),
420
- end
421
- };
422
- case "24h": return {
423
- start: (0, date_fns.subHours)(end, 24),
424
- end
425
- };
426
- case "7d": return {
427
- start: (0, date_fns.subDays)(end, 7),
428
- end
429
- };
430
- default: return {
431
- start: (0, date_fns.subHours)(end, 1),
432
- end
433
- };
434
- }
435
- }
436
- function TimeRangeSelector({ value, onChange, presets = defaultPresets, className }) {
437
- const handlePresetClick = (preset) => {
438
- const range = getPresetRange(preset);
439
- onChange({
440
- preset,
441
- ...range
442
- });
443
- };
444
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
445
- className: cn("flex items-center gap-2", className),
446
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
447
- className: "flex rounded-md border border-border overflow-hidden",
448
- children: presets.map(({ label, value: preset }, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
449
- type: "button",
450
- onClick: () => handlePresetClick(preset),
451
- className: cn("px-3 py-1.5 text-sm font-medium transition-colors", value.preset === preset ? "bg-primary text-primary-foreground" : "bg-card hover:bg-muted text-foreground", index > 0 && "border-l border-border"),
452
- children: label
453
- }, preset))
454
- })
455
- });
456
- }
457
- /**
458
- * Create a time range from a preset
459
- */
460
- function createTimeRange(preset = "1h") {
461
- const range = getPresetRange(preset);
462
- return {
463
- preset,
464
- ...range
465
- };
466
- }
467
-
468
- //#endregion
469
- //#region src/components/ui/button.tsx
470
- const buttonVariants = (0, class_variance_authority.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
471
- variants: {
472
- variant: {
473
- default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
474
- destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
475
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
476
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
477
- ghost: "hover:bg-accent hover:text-accent-foreground",
478
- link: "text-primary underline-offset-4 hover:underline"
479
- },
480
- size: {
481
- default: "h-9 px-4 py-2",
482
- sm: "h-8 rounded-md px-3 text-xs",
483
- lg: "h-10 rounded-md px-8",
484
- icon: "h-9 w-9"
485
- }
486
- },
487
- defaultVariants: {
488
- variant: "default",
489
- size: "default"
490
- }
491
- });
492
- const Button = react.forwardRef(({ className, variant, size, asChild = false,...props }, ref) => {
493
- const Comp = asChild ? __radix_ui_react_slot.Slot : "button";
494
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Comp, {
495
- className: cn(buttonVariants({
496
- variant,
497
- size,
498
- className
499
- })),
500
- ref,
501
- ...props
502
- });
503
- });
504
- Button.displayName = "Button";
505
-
506
- //#endregion
507
- //#region src/components/ui/select.tsx
508
- const Select = __radix_ui_react_select.Root;
509
- const SelectGroup = __radix_ui_react_select.Group;
510
- const SelectValue = __radix_ui_react_select.Value;
511
- const SelectTrigger = react.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_select.Trigger, {
512
- ref,
513
- className: cn("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className),
514
- ...props,
515
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Icon, {
516
- asChild: true,
517
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "h-4 w-4 opacity-50" })
518
- })]
519
- }));
520
- SelectTrigger.displayName = __radix_ui_react_select.Trigger.displayName;
521
- const SelectScrollUpButton = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.ScrollUpButton, {
522
- ref,
523
- className: cn("flex cursor-default items-center justify-center py-1", className),
524
- ...props,
525
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronUp, { className: "h-4 w-4" })
526
- }));
527
- SelectScrollUpButton.displayName = __radix_ui_react_select.ScrollUpButton.displayName;
528
- const SelectScrollDownButton = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.ScrollDownButton, {
529
- ref,
530
- className: cn("flex cursor-default items-center justify-center py-1", className),
531
- ...props,
532
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "h-4 w-4" })
533
- }));
534
- SelectScrollDownButton.displayName = __radix_ui_react_select.ScrollDownButton.displayName;
535
- const SelectContent = react.forwardRef(({ className, children, position = "popper",...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_select.Content, {
536
- ref,
537
- className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
538
- position,
539
- ...props,
540
- children: [
541
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectScrollUpButton, {}),
542
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Viewport, {
543
- className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
544
- children
545
- }),
546
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectScrollDownButton, {})
547
- ]
548
- }) }));
549
- SelectContent.displayName = __radix_ui_react_select.Content.displayName;
550
- const SelectLabel = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Label, {
551
- ref,
552
- className: cn("px-2 py-1.5 text-sm font-semibold", className),
553
- ...props
554
- }));
555
- SelectLabel.displayName = __radix_ui_react_select.Label.displayName;
556
- const SelectItem = react.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_select.Item, {
557
- ref,
558
- className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
559
- ...props,
560
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
561
- className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center",
562
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "h-4 w-4" }) })
563
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.ItemText, { children })]
564
- }));
565
- SelectItem.displayName = __radix_ui_react_select.Item.displayName;
566
- const SelectSeparator = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Separator, {
567
- ref,
568
- className: cn("-mx-1 my-1 h-px bg-muted", className),
569
- ...props
570
- }));
571
- SelectSeparator.displayName = __radix_ui_react_select.Separator.displayName;
572
-
573
- //#endregion
574
- //#region src/components/ui/table.tsx
575
- const Table = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
576
- className: "relative w-full overflow-auto",
577
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
578
- ref,
579
- className: cn("w-full caption-bottom text-sm", className),
580
- ...props
581
- })
582
- }));
583
- Table.displayName = "Table";
584
- const TableHeader = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
585
- ref,
586
- className: cn("[&_tr]:border-b", className),
587
- ...props
588
- }));
589
- TableHeader.displayName = "TableHeader";
590
- const TableBody = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
591
- ref,
592
- className: cn("[&_tr:last-child]:border-0", className),
593
- ...props
594
- }));
595
- TableBody.displayName = "TableBody";
596
- const TableFooter = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", {
597
- ref,
598
- className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
599
- ...props
600
- }));
601
- TableFooter.displayName = "TableFooter";
602
- const TableRow = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
603
- ref,
604
- className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
605
- ...props
606
- }));
607
- TableRow.displayName = "TableRow";
608
- const TableHead = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
609
- ref,
610
- className: cn("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
611
- ...props
612
- }));
613
- TableHead.displayName = "TableHead";
614
- const TableCell = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
615
- ref,
616
- className: cn("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
617
- ...props
618
- }));
619
- TableCell.displayName = "TableCell";
620
- const TableCaption = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("caption", {
621
- ref,
622
- className: cn("mt-4 text-sm text-muted-foreground", className),
623
- ...props
624
- }));
625
- TableCaption.displayName = "TableCaption";
626
-
627
- //#endregion
628
- //#region src/components/data-display/data-table.tsx
629
- function DataTableInner({ className, columns, data, getRowKey = (_, index) => index, sortColumn, sortDirection, onSortChange, pagination = false, page = 1, pageSize = 10, totalItems, onPageChange, onPageSizeChange, pageSizeOptions = [
630
- 10,
631
- 20,
632
- 50,
633
- 100
634
- ], loading = false, emptyState, onRowClick, selectedKeys, striped = false, hoverable = true, compact = false,...props }, ref) {
635
- const total = totalItems ?? data.length;
636
- const totalPages = Math.ceil(total / pageSize);
637
- const handleSort = (columnKey) => {
638
- if (!onSortChange) return;
639
- if (sortColumn === columnKey) onSortChange(columnKey, sortDirection === "asc" ? "desc" : "asc");
640
- else onSortChange(columnKey, "asc");
641
- };
642
- const getSortIcon = (columnKey) => {
643
- if (sortColumn !== columnKey) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowUpDown, { className: "ml-1 h-3.5 w-3.5 text-muted-foreground" });
644
- return sortDirection === "asc" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowUp, { className: "ml-1 h-3.5 w-3.5" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowDown, { className: "ml-1 h-3.5 w-3.5" });
645
- };
646
- const getAlignClass = (align) => {
647
- switch (align) {
648
- case "center": return "text-center";
649
- case "right": return "text-right";
650
- default: return "text-left";
651
- }
652
- };
653
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
654
- ref,
655
- className: cn("w-full", className),
656
- ...props,
657
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
658
- className: "rounded-md border border-border overflow-hidden",
659
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Table, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHeader, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, {
660
- className: "hover:bg-transparent",
661
- children: columns.map((column) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
662
- className: cn(getAlignClass(column.align), column.sortable && "cursor-pointer select-none", compact ? "py-2" : "py-3", column.headerClassName),
663
- style: { width: column.width },
664
- onClick: column.sortable ? () => handleSort(column.key) : void 0,
665
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
666
- className: cn("flex items-center", column.align === "center" && "justify-center", column.align === "right" && "justify-end"),
667
- children: [column.header, column.sortable && getSortIcon(column.key)]
668
- })
669
- }, column.key))
670
- }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
671
- colSpan: columns.length,
672
- className: "h-24 text-center text-muted-foreground",
673
- children: "Loading..."
674
- }) }) : data.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
675
- colSpan: columns.length,
676
- className: "h-24 text-center text-muted-foreground",
677
- children: emptyState ?? "No data available"
678
- }) }) : data.map((row, rowIndex) => {
679
- const rowKey = getRowKey(row, rowIndex);
680
- const isSelected = selectedKeys?.has(rowKey);
681
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, {
682
- className: cn(striped && rowIndex % 2 === 1 && "bg-surface/50", hoverable && "hover:bg-surface-hover cursor-pointer", isSelected && "bg-accent/10", onRowClick && "cursor-pointer"),
683
- onClick: onRowClick ? () => onRowClick(row, rowIndex) : void 0,
684
- children: columns.map((column) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
685
- className: cn(getAlignClass(column.align), compact ? "py-2" : "py-3", column.cellClassName),
686
- children: column.cell ? column.cell(row, rowIndex) : column.accessor ? column.accessor(row) : row[column.key]
687
- }, column.key))
688
- }, rowKey);
689
- }) })] })
690
- }), pagination && totalPages > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
691
- className: "flex items-center justify-between px-2 py-4",
692
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
693
- className: "flex items-center gap-2 text-sm text-muted-foreground",
694
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "Rows per page:" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Select, {
695
- value: String(pageSize),
696
- onValueChange: (value) => onPageSizeChange?.(Number(value)),
697
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectTrigger, {
698
- className: "h-8 w-[70px]",
699
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectValue, {})
700
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectContent, { children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectItem, {
701
- value: String(size),
702
- children: size
703
- }, size)) })]
704
- })]
705
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
706
- className: "flex items-center gap-2",
707
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
708
- className: "text-sm text-muted-foreground",
709
- children: [
710
- "Page ",
711
- page,
712
- " of ",
713
- totalPages
714
- ]
715
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
716
- className: "flex items-center gap-1",
717
- children: [
718
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
719
- variant: "outline",
720
- size: "icon",
721
- className: "h-8 w-8",
722
- onClick: () => onPageChange?.(1),
723
- disabled: page <= 1,
724
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronsLeft, { className: "h-4 w-4" })
725
- }),
726
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
727
- variant: "outline",
728
- size: "icon",
729
- className: "h-8 w-8",
730
- onClick: () => onPageChange?.(page - 1),
731
- disabled: page <= 1,
732
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronLeft, { className: "h-4 w-4" })
733
- }),
734
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
735
- variant: "outline",
736
- size: "icon",
737
- className: "h-8 w-8",
738
- onClick: () => onPageChange?.(page + 1),
739
- disabled: page >= totalPages,
740
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: "h-4 w-4" })
741
- }),
742
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
743
- variant: "outline",
744
- size: "icon",
745
- className: "h-8 w-8",
746
- onClick: () => onPageChange?.(totalPages),
747
- disabled: page >= totalPages,
748
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronsRight, { className: "h-4 w-4" })
749
- })
750
- ]
751
- })]
752
- })]
753
- })]
754
- });
755
- }
756
- const DataTable = react.forwardRef(DataTableInner);
757
-
758
- //#endregion
759
- //#region src/components/data-display/json-viewer.tsx
760
- const JsonViewer = react.forwardRef(({ className, data, defaultExpanded = true, expandDepth = 2, copyable = true, keyClassName, valueClassName,...props }, ref) => {
761
- const [copied, setCopied] = react.useState(false);
762
- const handleCopy = async () => {
763
- await navigator.clipboard.writeText(JSON.stringify(data, null, 2));
764
- setCopied(true);
765
- setTimeout(() => setCopied(false), 2e3);
766
- };
767
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
768
- ref,
769
- className: cn("relative rounded-md bg-surface border border-border font-mono text-sm", className),
770
- ...props,
771
- children: [copyable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
772
- type: "button",
773
- onClick: handleCopy,
774
- className: "absolute right-2 top-2 p-1.5 rounded-md hover:bg-surface-hover text-muted-foreground hover:text-foreground transition-colors",
775
- "aria-label": "Copy JSON",
776
- children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "h-4 w-4 text-green-500" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Copy, { className: "h-4 w-4" })
777
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
778
- className: "p-3 overflow-auto",
779
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(JsonNode, {
780
- data,
781
- depth: 0,
782
- defaultExpanded,
783
- expandDepth,
784
- keyClassName,
785
- valueClassName
786
- })
787
- })]
788
- });
789
- });
790
- JsonViewer.displayName = "JsonViewer";
791
- function JsonNode({ data, depth, defaultExpanded, expandDepth, keyClassName, valueClassName, propertyKey, isLast = true }) {
792
- const [expanded, setExpanded] = react.useState(defaultExpanded && depth < expandDepth);
793
- const indent = depth * 16;
794
- if (data === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
795
- className: "inline",
796
- children: [
797
- propertyKey && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
798
- className: cn("text-purple-400", keyClassName),
799
- children: [
800
- "\"",
801
- propertyKey,
802
- "\""
803
- ]
804
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
805
- className: "text-muted-foreground",
806
- children: ": "
807
- })] }),
808
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
809
- className: cn("text-orange-400", valueClassName),
810
- children: "null"
811
- }),
812
- !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
813
- className: "text-muted-foreground",
814
- children: ","
815
- })
816
- ]
817
- });
818
- if (data === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
819
- className: "inline",
820
- children: [
821
- propertyKey && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
822
- className: cn("text-purple-400", keyClassName),
823
- children: [
824
- "\"",
825
- propertyKey,
826
- "\""
827
- ]
828
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
829
- className: "text-muted-foreground",
830
- children: ": "
831
- })] }),
832
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
833
- className: cn("text-gray-500", valueClassName),
834
- children: "undefined"
835
- }),
836
- !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
837
- className: "text-muted-foreground",
838
- children: ","
839
- })
840
- ]
841
- });
842
- if (typeof data === "boolean") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
843
- className: "inline",
844
- children: [
845
- propertyKey && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
846
- className: cn("text-purple-400", keyClassName),
847
- children: [
848
- "\"",
849
- propertyKey,
850
- "\""
851
- ]
852
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
853
- className: "text-muted-foreground",
854
- children: ": "
855
- })] }),
856
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
857
- className: cn("text-blue-400", valueClassName),
858
- children: String(data)
859
- }),
860
- !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
861
- className: "text-muted-foreground",
862
- children: ","
863
- })
864
- ]
865
- });
866
- if (typeof data === "number") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
867
- className: "inline",
868
- children: [
869
- propertyKey && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
870
- className: cn("text-purple-400", keyClassName),
871
- children: [
872
- "\"",
873
- propertyKey,
874
- "\""
875
- ]
876
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
877
- className: "text-muted-foreground",
878
- children: ": "
879
- })] }),
880
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
881
- className: cn("text-amber-400", valueClassName),
882
- children: data
883
- }),
884
- !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
885
- className: "text-muted-foreground",
886
- children: ","
887
- })
888
- ]
889
- });
890
- if (typeof data === "string") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
891
- className: "inline",
892
- children: [
893
- propertyKey && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
894
- className: cn("text-purple-400", keyClassName),
895
- children: [
896
- "\"",
897
- propertyKey,
898
- "\""
899
- ]
900
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
901
- className: "text-muted-foreground",
902
- children: ": "
903
- })] }),
904
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
905
- className: cn("text-green-400", valueClassName),
906
- children: [
907
- "\"",
908
- data,
909
- "\""
910
- ]
911
- }),
912
- !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
913
- className: "text-muted-foreground",
914
- children: ","
915
- })
916
- ]
917
- });
918
- if (Array.isArray(data)) {
919
- if (data.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
920
- className: "inline",
921
- children: [
922
- propertyKey && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
923
- className: cn("text-purple-400", keyClassName),
924
- children: [
925
- "\"",
926
- propertyKey,
927
- "\""
928
- ]
929
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
930
- className: "text-muted-foreground",
931
- children: ": "
932
- })] }),
933
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
934
- className: "text-muted-foreground",
935
- children: "[]"
936
- }),
937
- !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
938
- className: "text-muted-foreground",
939
- children: ","
940
- })
941
- ]
942
- });
943
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
944
- className: "inline-block",
945
- children: [
946
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
947
- className: "inline-flex items-center cursor-pointer hover:text-foreground text-muted-foreground",
948
- onClick: () => setExpanded(!expanded),
949
- children: [
950
- expanded ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "h-3.5 w-3.5 mr-0.5" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: "h-3.5 w-3.5 mr-0.5" }),
951
- propertyKey && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
952
- className: cn("text-purple-400", keyClassName),
953
- children: [
954
- "\"",
955
- propertyKey,
956
- "\""
957
- ]
958
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
959
- className: "text-muted-foreground",
960
- children: ": "
961
- })] }),
962
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
963
- className: "text-muted-foreground",
964
- children: "["
965
- }),
966
- !expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
967
- className: "text-muted-foreground mx-1",
968
- children: [data.length, " items"]
969
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
970
- className: "text-muted-foreground",
971
- children: "]"
972
- })] })
973
- ]
974
- }),
975
- expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
976
- style: { paddingLeft: indent + 16 },
977
- children: data.map((item, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(JsonNode, {
978
- data: item,
979
- depth: depth + 1,
980
- defaultExpanded,
981
- expandDepth,
982
- keyClassName,
983
- valueClassName,
984
- isLast: index === data.length - 1
985
- }) }, index))
986
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
987
- className: "text-muted-foreground",
988
- children: "]"
989
- })] }),
990
- !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
991
- className: "text-muted-foreground",
992
- children: ","
993
- })
994
- ]
995
- });
996
- }
997
- if (typeof data === "object") {
998
- const entries = Object.entries(data);
999
- if (entries.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1000
- className: "inline",
1001
- children: [
1002
- propertyKey && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1003
- className: cn("text-purple-400", keyClassName),
1004
- children: [
1005
- "\"",
1006
- propertyKey,
1007
- "\""
1008
- ]
1009
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1010
- className: "text-muted-foreground",
1011
- children: ": "
1012
- })] }),
1013
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1014
- className: "text-muted-foreground",
1015
- children: "{}"
1016
- }),
1017
- !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1018
- className: "text-muted-foreground",
1019
- children: ","
1020
- })
1021
- ]
1022
- });
1023
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1024
- className: "inline-block",
1025
- children: [
1026
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1027
- className: "inline-flex items-center cursor-pointer hover:text-foreground text-muted-foreground",
1028
- onClick: () => setExpanded(!expanded),
1029
- children: [
1030
- expanded ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "h-3.5 w-3.5 mr-0.5" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: "h-3.5 w-3.5 mr-0.5" }),
1031
- propertyKey && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1032
- className: cn("text-purple-400", keyClassName),
1033
- children: [
1034
- "\"",
1035
- propertyKey,
1036
- "\""
1037
- ]
1038
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1039
- className: "text-muted-foreground",
1040
- children: ": "
1041
- })] }),
1042
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1043
- className: "text-muted-foreground",
1044
- children: "{"
1045
- }),
1046
- !expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1047
- className: "text-muted-foreground mx-1",
1048
- children: "..."
1049
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1050
- className: "text-muted-foreground",
1051
- children: "}"
1052
- })] })
1053
- ]
1054
- }),
1055
- expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1056
- style: { paddingLeft: indent + 16 },
1057
- children: entries.map(([key, value], index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(JsonNode, {
1058
- data: value,
1059
- depth: depth + 1,
1060
- defaultExpanded,
1061
- expandDepth,
1062
- keyClassName,
1063
- valueClassName,
1064
- propertyKey: key,
1065
- isLast: index === entries.length - 1
1066
- }) }, key))
1067
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1068
- className: "text-muted-foreground",
1069
- children: "}"
1070
- })] }),
1071
- !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1072
- className: "text-muted-foreground",
1073
- children: ","
1074
- })
1075
- ]
1076
- });
1077
- }
1078
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1079
- className: cn("text-muted-foreground", valueClassName),
1080
- children: String(data)
1081
- });
1082
- }
1083
-
1084
- //#endregion
1085
- //#region src/components/data-display/sparkline.tsx
1086
- const Sparkline = react.forwardRef(({ className, data, width = 100, height = 32, color = "currentColor", strokeWidth = 2, filled = false, fillOpacity = .2, showDots = false, curved = true, min: minProp, max: maxProp,...props }, ref) => {
1087
- if (data.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
1088
- ref,
1089
- className: cn("text-accent", className),
1090
- width,
1091
- height,
1092
- viewBox: `0 0 ${width} ${height}`,
1093
- ...props
1094
- });
1095
- const min = minProp ?? Math.min(...data);
1096
- const max = maxProp ?? Math.max(...data);
1097
- const range = max - min || 1;
1098
- const padding = strokeWidth;
1099
- const chartWidth = width - padding * 2;
1100
- const chartHeight = height - padding * 2;
1101
- const points = data.map((value, index) => {
1102
- const x = padding + index / (data.length - 1 || 1) * chartWidth;
1103
- const y = padding + chartHeight - (value - min) / range * chartHeight;
1104
- return {
1105
- x,
1106
- y
1107
- };
1108
- });
1109
- let pathD;
1110
- if (curved && points.length > 2) pathD = points.reduce((acc, point, index) => {
1111
- if (index === 0) return `M ${point.x},${point.y}`;
1112
- const prev = points[index - 1];
1113
- const cpX = (prev.x + point.x) / 2;
1114
- return `${acc} Q ${prev.x},${prev.y} ${cpX},${(prev.y + point.y) / 2} T ${point.x},${point.y}`;
1115
- }, "");
1116
- else pathD = points.map((point, index) => index === 0 ? `M ${point.x},${point.y}` : `L ${point.x},${point.y}`).join(" ");
1117
- const fillPathD = filled ? `${pathD} L ${points[points.length - 1]?.x},${height - padding} L ${points[0]?.x},${height - padding} Z` : "";
1118
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
1119
- ref,
1120
- className: cn("text-accent", className),
1121
- width,
1122
- height,
1123
- viewBox: `0 0 ${width} ${height}`,
1124
- ...props,
1125
- children: [
1126
- filled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
1127
- d: fillPathD,
1128
- fill: color,
1129
- opacity: fillOpacity,
1130
- strokeWidth: 0
1131
- }),
1132
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
1133
- d: pathD,
1134
- fill: "none",
1135
- stroke: color,
1136
- strokeWidth,
1137
- strokeLinecap: "round",
1138
- strokeLinejoin: "round"
1139
- }),
1140
- showDots && points.map((point, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
1141
- cx: point.x,
1142
- cy: point.y,
1143
- r: strokeWidth + 1,
1144
- fill: color
1145
- }, index))
1146
- ]
1147
- });
1148
- });
1149
- Sparkline.displayName = "Sparkline";
1150
- const SparkBar = react.forwardRef(({ className, data, width = 100, height = 32, color = "currentColor", gap = .2, min: minProp = 0, max: maxProp, radius = 2,...props }, ref) => {
1151
- if (data.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
1152
- ref,
1153
- className: cn("text-accent", className),
1154
- width,
1155
- height,
1156
- viewBox: `0 0 ${width} ${height}`,
1157
- ...props
1158
- });
1159
- const min = minProp;
1160
- const max = maxProp ?? Math.max(...data);
1161
- const range = max - min || 1;
1162
- const barWidth = width / data.length;
1163
- const gapWidth = barWidth * gap;
1164
- const actualBarWidth = barWidth - gapWidth;
1165
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
1166
- ref,
1167
- className: cn("text-accent", className),
1168
- width,
1169
- height,
1170
- viewBox: `0 0 ${width} ${height}`,
1171
- ...props,
1172
- children: data.map((value, index) => {
1173
- const barHeight = (value - min) / range * height;
1174
- const x = index * barWidth + gapWidth / 2;
1175
- const y = height - barHeight;
1176
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
1177
- x,
1178
- y,
1179
- width: actualBarWidth,
1180
- height: barHeight,
1181
- fill: color,
1182
- rx: radius,
1183
- ry: radius
1184
- }, index);
1185
- })
1186
- });
1187
- });
1188
- SparkBar.displayName = "SparkBar";
1189
- const MetricCard = react.forwardRef(({ className, title, value, description, sparklineData, trend, trendValue, icon,...props }, ref) => {
1190
- const trendColor = trend === "up" ? "text-green-500" : trend === "down" ? "text-red-500" : "text-muted-foreground";
1191
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1192
- ref,
1193
- className: cn("rounded-lg border border-border bg-surface p-4", className),
1194
- ...props,
1195
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1196
- className: "flex items-center justify-between",
1197
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1198
- className: "text-sm font-medium text-muted-foreground",
1199
- children: title
1200
- }), icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1201
- className: "text-muted-foreground",
1202
- children: icon
1203
- })]
1204
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1205
- className: "mt-2 flex items-end justify-between",
1206
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1207
- className: "text-2xl font-bold text-foreground",
1208
- children: value
1209
- }), (description || trendValue) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1210
- className: "mt-1 flex items-center gap-1",
1211
- children: [trendValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1212
- className: cn("text-xs font-medium", trendColor),
1213
- children: trendValue
1214
- }), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1215
- className: "text-xs text-muted-foreground",
1216
- children: description
1217
- })]
1218
- })] }), sparklineData && sparklineData.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Sparkline, {
1219
- data: sparklineData,
1220
- width: 80,
1221
- height: 32,
1222
- filled: true,
1223
- className: trend === "up" ? "text-green-500" : trend === "down" ? "text-red-500" : "text-accent"
1224
- })]
1225
- })]
1226
- });
1227
- });
1228
- MetricCard.displayName = "MetricCard";
1229
-
1230
- //#endregion
1231
- //#region src/components/data-display/timeline.tsx
1232
- const timelineVariants = (0, class_variance_authority.cva)("relative", {
1233
- variants: { orientation: {
1234
- vertical: "flex flex-col",
1235
- horizontal: "flex flex-row"
1236
- } },
1237
- defaultVariants: { orientation: "vertical" }
1238
- });
1239
- const Timeline = react.forwardRef(({ className, orientation = "vertical", children,...props }, ref) => {
1240
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1241
- ref,
1242
- className: cn(timelineVariants({
1243
- orientation,
1244
- className
1245
- })),
1246
- ...props,
1247
- children
1248
- });
1249
- });
1250
- Timeline.displayName = "Timeline";
1251
- const timelineItemVariants = (0, class_variance_authority.cva)("relative flex", {
1252
- variants: { orientation: {
1253
- vertical: "flex-row gap-4 pb-8 last:pb-0",
1254
- horizontal: "flex-col gap-2 pr-8 last:pr-0"
1255
- } },
1256
- defaultVariants: { orientation: "vertical" }
1257
- });
1258
- const TimelineItem = react.forwardRef(({ className, orientation = "vertical", active, children,...props }, ref) => {
1259
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1260
- ref,
1261
- className: cn(timelineItemVariants({
1262
- orientation,
1263
- className
1264
- })),
1265
- "data-active": active,
1266
- ...props,
1267
- children
1268
- });
1269
- });
1270
- TimelineItem.displayName = "TimelineItem";
1271
- const timelineIndicatorVariants = (0, class_variance_authority.cva)("flex items-center justify-center rounded-full border-2 shrink-0", {
1272
- variants: {
1273
- size: {
1274
- sm: "h-3 w-3",
1275
- md: "h-4 w-4",
1276
- lg: "h-6 w-6"
1277
- },
1278
- variant: {
1279
- default: "border-border bg-surface",
1280
- primary: "border-accent bg-accent",
1281
- success: "border-green-500 bg-green-500",
1282
- warning: "border-amber-500 bg-amber-500",
1283
- error: "border-red-500 bg-red-500",
1284
- info: "border-blue-500 bg-blue-500",
1285
- muted: "border-muted-foreground bg-muted"
1286
- }
1287
- },
1288
- defaultVariants: {
1289
- size: "md",
1290
- variant: "default"
1291
- }
1292
- });
1293
- const TimelineIndicator = react.forwardRef(({ className, size, variant, showLine = true, linePosition = "after", orientation = "vertical", children,...props }, ref) => {
1294
- const isVertical = orientation === "vertical";
1295
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1296
- ref,
1297
- className: cn("relative flex items-center", isVertical ? "flex-col" : "flex-row"),
1298
- children: [
1299
- showLine && (linePosition === "before" || linePosition === "both") && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: cn("bg-border", isVertical ? "w-0.5 flex-1" : "h-0.5 flex-1") }),
1300
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1301
- className: cn(timelineIndicatorVariants({
1302
- size,
1303
- variant,
1304
- className
1305
- })),
1306
- ...props,
1307
- children
1308
- }),
1309
- showLine && (linePosition === "after" || linePosition === "both") && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: cn("bg-border", isVertical ? "w-0.5 flex-1" : "h-0.5 flex-1") })
1310
- ]
1311
- });
1312
- });
1313
- TimelineIndicator.displayName = "TimelineIndicator";
1314
- const TimelineConnector = react.forwardRef(({ className, orientation = "vertical",...props }, ref) => {
1315
- const isVertical = orientation === "vertical";
1316
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1317
- ref,
1318
- className: cn("bg-border", isVertical ? "absolute left-[7px] top-4 bottom-0 w-0.5" : "absolute top-[7px] left-4 right-0 h-0.5", className),
1319
- ...props
1320
- });
1321
- });
1322
- TimelineConnector.displayName = "TimelineConnector";
1323
- const TimelineContent = react.forwardRef(({ className, children,...props }, ref) => {
1324
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1325
- ref,
1326
- className: cn("flex-1 pt-0.5", className),
1327
- ...props,
1328
- children
1329
- });
1330
- });
1331
- TimelineContent.displayName = "TimelineContent";
1332
- const TimelineTitle = react.forwardRef(({ className, children,...props }, ref) => {
1333
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
1334
- ref,
1335
- className: cn("text-sm font-medium text-foreground", className),
1336
- ...props,
1337
- children
1338
- });
1339
- });
1340
- TimelineTitle.displayName = "TimelineTitle";
1341
- const TimelineDescription = react.forwardRef(({ className, children,...props }, ref) => {
1342
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1343
- ref,
1344
- className: cn("text-sm text-muted-foreground", className),
1345
- ...props,
1346
- children
1347
- });
1348
- });
1349
- TimelineDescription.displayName = "TimelineDescription";
1350
- const TimelineTime = react.forwardRef(({ className, children,...props }, ref) => {
1351
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1352
- ref,
1353
- className: cn("text-xs text-muted-foreground", className),
1354
- ...props,
1355
- children
1356
- });
1357
- });
1358
- TimelineTime.displayName = "TimelineTime";
1359
-
1360
- //#endregion
1361
- //#region src/components/feedback/empty-state.tsx
1362
- const emptyStateVariants = (0, class_variance_authority.cva)("flex flex-col items-center justify-center text-center", {
1363
- variants: { size: {
1364
- sm: "gap-2 p-4",
1365
- md: "gap-3 p-6",
1366
- lg: "gap-4 p-8"
1367
- } },
1368
- defaultVariants: { size: "md" }
1369
- });
1370
- const EmptyState = react.forwardRef(({ className, size, icon, title, description, action, secondaryAction, children,...props }, ref) => {
1371
- const iconSize = size === "sm" ? "h-8 w-8" : size === "lg" ? "h-16 w-16" : "h-12 w-12";
1372
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1373
- ref,
1374
- className: cn(emptyStateVariants({
1375
- size,
1376
- className
1377
- })),
1378
- ...props,
1379
- children: [
1380
- icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1381
- className: cn("text-muted-foreground", iconSize),
1382
- children: icon
1383
- }),
1384
- title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
1385
- className: cn("font-semibold text-foreground", size === "sm" && "text-sm", size === "lg" && "text-xl"),
1386
- children: title
1387
- }),
1388
- description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1389
- className: cn("text-muted-foreground max-w-sm", size === "sm" && "text-xs", size === "lg" && "text-base", !size && "text-sm"),
1390
- children: description
1391
- }),
1392
- children,
1393
- (action || secondaryAction) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1394
- className: "flex items-center gap-2 mt-2",
1395
- children: [action && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
1396
- size: size === "sm" ? "sm" : size === "lg" ? "default" : "sm",
1397
- onClick: action.onClick,
1398
- children: action.label
1399
- }), secondaryAction && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
1400
- variant: "outline",
1401
- size: size === "sm" ? "sm" : size === "lg" ? "default" : "sm",
1402
- onClick: secondaryAction.onClick,
1403
- children: secondaryAction.label
1404
- })]
1405
- })
1406
- ]
1407
- });
1408
- });
1409
- EmptyState.displayName = "EmptyState";
1410
- const NoData = react.forwardRef(({ title = "No data",...props }, ref) => {
1411
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, {
1412
- ref,
1413
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Inbox, { className: "h-full w-full" }),
1414
- title,
1415
- ...props
1416
- });
1417
- });
1418
- NoData.displayName = "NoData";
1419
- const NoResults = react.forwardRef(({ title = "No results found", searchTerm, description,...props }, ref) => {
1420
- const desc = description ?? (searchTerm ? `No results found for "${searchTerm}". Try adjusting your search.` : "Try adjusting your search or filters.");
1421
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, {
1422
- ref,
1423
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Search, { className: "h-full w-full" }),
1424
- title,
1425
- description: desc,
1426
- ...props
1427
- });
1428
- });
1429
- NoResults.displayName = "NoResults";
1430
- const NotFound = react.forwardRef(({ title = "Page not found", description = "The page you're looking for doesn't exist or has been moved.",...props }, ref) => {
1431
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, {
1432
- ref,
1433
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.FileQuestion, { className: "h-full w-full" }),
1434
- title,
1435
- description,
1436
- ...props
1437
- });
1438
- });
1439
- NotFound.displayName = "NotFound";
1440
- const ServerError = react.forwardRef(({ title = "Something went wrong", description = "An unexpected error occurred. Please try again later.",...props }, ref) => {
1441
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, {
1442
- ref,
1443
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ServerOff, { className: "h-full w-full" }),
1444
- title,
1445
- description,
1446
- ...props
1447
- });
1448
- });
1449
- ServerError.displayName = "ServerError";
1450
-
1451
- //#endregion
1452
- //#region src/components/feedback/live-indicator.tsx
1453
- const liveIndicatorVariants = (0, class_variance_authority.cva)("inline-flex items-center gap-2 rounded-full text-sm font-medium", {
1454
- variants: {
1455
- size: {
1456
- sm: "h-6 px-2 text-xs",
1457
- md: "h-7 px-2.5",
1458
- lg: "h-8 px-3"
1459
- },
1460
- variant: {
1461
- default: "bg-surface border border-border",
1462
- solid: ""
1463
- }
1464
- },
1465
- defaultVariants: {
1466
- size: "md",
1467
- variant: "default"
1468
- }
1469
- });
1470
- const LiveIndicator = react.forwardRef(({ className, size, variant, live = true, liveLabel = "Live", pausedLabel = "Paused", toggleable = false, onLiveToggle, liveColor = "#22c55e",...props }, ref) => {
1471
- const handleToggle = () => {
1472
- onLiveToggle?.(!live);
1473
- };
1474
- const dotColor = live ? liveColor : "#6b7280";
1475
- const textColor = live ? liveColor : void 0;
1476
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1477
- ref,
1478
- className: cn(liveIndicatorVariants({
1479
- size,
1480
- variant,
1481
- className
1482
- }), variant === "solid" && live && "bg-green-500/10", variant === "solid" && !live && "bg-muted"),
1483
- ...props,
1484
- children: [
1485
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1486
- className: cn("rounded-full", live && "animate-pulse"),
1487
- style: {
1488
- backgroundColor: dotColor,
1489
- width: size === "sm" ? 6 : size === "lg" ? 10 : 8,
1490
- height: size === "sm" ? 6 : size === "lg" ? 10 : 8
1491
- }
1492
- }),
1493
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1494
- style: { color: textColor },
1495
- children: live ? liveLabel : pausedLabel
1496
- }),
1497
- toggleable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
1498
- variant: "ghost",
1499
- size: "icon",
1500
- className: cn("ml-1 rounded-full", size === "sm" && "h-4 w-4", size === "md" && "h-5 w-5", size === "lg" && "h-6 w-6"),
1501
- onClick: handleToggle,
1502
- children: live ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Pause, { className: cn(size === "sm" && "h-2.5 w-2.5", size === "md" && "h-3 w-3", size === "lg" && "h-3.5 w-3.5") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Play, { className: cn(size === "sm" && "h-2.5 w-2.5", size === "md" && "h-3 w-3", size === "lg" && "h-3.5 w-3.5") })
1503
- })
1504
- ]
1505
- });
1506
- });
1507
- LiveIndicator.displayName = "LiveIndicator";
1508
- const connectionStatusConfig = {
1509
- connected: {
1510
- color: "#22c55e",
1511
- label: "Connected",
1512
- pulse: false
1513
- },
1514
- connecting: {
1515
- color: "#f59e0b",
1516
- label: "Connecting...",
1517
- pulse: true
1518
- },
1519
- disconnected: {
1520
- color: "#6b7280",
1521
- label: "Disconnected",
1522
- pulse: false
1523
- },
1524
- error: {
1525
- color: "#ef4444",
1526
- label: "Error",
1527
- pulse: true
1528
- }
1529
- };
1530
- const ConnectionStatus = react.forwardRef(({ className, status, showLabel = true, size = "md",...props }, ref) => {
1531
- const config = connectionStatusConfig[status];
1532
- const dotSize = size === "sm" ? 6 : size === "lg" ? 10 : 8;
1533
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1534
- ref,
1535
- className: cn("inline-flex items-center gap-2", className),
1536
- ...props,
1537
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1538
- className: cn("rounded-full", config.pulse && "animate-pulse"),
1539
- style: {
1540
- backgroundColor: config.color,
1541
- width: dotSize,
1542
- height: dotSize
1543
- }
1544
- }), showLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1545
- className: cn("text-sm", size === "sm" && "text-xs", size === "lg" && "text-base"),
1546
- style: { color: config.color },
1547
- children: config.label
1548
- })]
1549
- });
1550
- });
1551
- ConnectionStatus.displayName = "ConnectionStatus";
1552
-
1553
- //#endregion
1554
- //#region src/components/feedback/loading.tsx
1555
- const spinnerVariants = (0, class_variance_authority.cva)("animate-spin text-muted-foreground", {
1556
- variants: { size: {
1557
- xs: "h-3 w-3",
1558
- sm: "h-4 w-4",
1559
- md: "h-6 w-6",
1560
- lg: "h-8 w-8",
1561
- xl: "h-12 w-12"
1562
- } },
1563
- defaultVariants: { size: "md" }
1564
- });
1565
- const Spinner = react.forwardRef(({ className, size,...props }, ref) => {
1566
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Loader2, {
1567
- ref,
1568
- className: cn(spinnerVariants({
1569
- size,
1570
- className
1571
- })),
1572
- ...props
1573
- });
1574
- });
1575
- Spinner.displayName = "Spinner";
1576
- const loadingOverlayVariants = (0, class_variance_authority.cva)("absolute inset-0 flex items-center justify-center bg-background/80 backdrop-blur-sm", {
1577
- variants: { variant: {
1578
- default: "bg-background/80",
1579
- dark: "bg-background/90",
1580
- light: "bg-background/50"
1581
- } },
1582
- defaultVariants: { variant: "default" }
1583
- });
1584
- const LoadingOverlay = react.forwardRef(({ className, variant, loading = true, text, spinnerSize = "lg", children,...props }, ref) => {
1585
- if (!loading) return null;
1586
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1587
- ref,
1588
- className: cn(loadingOverlayVariants({
1589
- variant,
1590
- className
1591
- })),
1592
- ...props,
1593
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1594
- className: "flex flex-col items-center gap-3",
1595
- children: [
1596
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, { size: spinnerSize }),
1597
- text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1598
- className: "text-sm text-muted-foreground",
1599
- children: text
1600
- }),
1601
- children
1602
- ]
1603
- })
1604
- });
1605
- });
1606
- LoadingOverlay.displayName = "LoadingOverlay";
1607
- const LoadingContainer = react.forwardRef(({ className, loading = false, loadingText, spinnerSize, overlayVariant, children,...props }, ref) => {
1608
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1609
- ref,
1610
- className: cn("relative", className),
1611
- ...props,
1612
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoadingOverlay, {
1613
- loading,
1614
- text: loadingText,
1615
- spinnerSize,
1616
- variant: overlayVariant
1617
- })]
1618
- });
1619
- });
1620
- LoadingContainer.displayName = "LoadingContainer";
1621
- const LoadingDots = react.forwardRef(({ className, size = "md",...props }, ref) => {
1622
- const dotSize = size === "sm" ? "h-1 w-1" : size === "lg" ? "h-2.5 w-2.5" : "h-1.5 w-1.5";
1623
- const gap = size === "sm" ? "gap-1" : size === "lg" ? "gap-2" : "gap-1.5";
1624
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1625
- ref,
1626
- className: cn("flex items-center", gap, className),
1627
- ...props,
1628
- children: [
1629
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1630
- className: cn(dotSize, "rounded-full bg-muted-foreground animate-bounce"),
1631
- style: { animationDelay: "0ms" }
1632
- }),
1633
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1634
- className: cn(dotSize, "rounded-full bg-muted-foreground animate-bounce"),
1635
- style: { animationDelay: "150ms" }
1636
- }),
1637
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1638
- className: cn(dotSize, "rounded-full bg-muted-foreground animate-bounce"),
1639
- style: { animationDelay: "300ms" }
1640
- })
1641
- ]
1642
- });
1643
- });
1644
- LoadingDots.displayName = "LoadingDots";
1645
- const Skeleton = react.forwardRef(({ className, width, height, rounded = "md", style,...props }, ref) => {
1646
- const roundedClass = rounded === true ? "rounded-md" : rounded === false ? "" : rounded === "sm" ? "rounded-sm" : rounded === "lg" ? "rounded-lg" : rounded === "full" ? "rounded-full" : "rounded-md";
1647
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1648
- ref,
1649
- className: cn("animate-pulse bg-muted", roundedClass, className),
1650
- style: {
1651
- width,
1652
- height,
1653
- ...style
1654
- },
1655
- ...props
1656
- });
1657
- });
1658
- Skeleton.displayName = "Skeleton";
1659
-
1660
- //#endregion
1661
- //#region src/components/feedback/status-badge.tsx
1662
- const statusBadgeVariants = (0, class_variance_authority.cva)("inline-flex items-center justify-center rounded-full text-xs font-medium", {
1663
- variants: { size: {
1664
- sm: "h-5 min-w-5 px-1.5",
1665
- md: "h-6 min-w-6 px-2",
1666
- lg: "h-7 min-w-7 px-2.5"
1667
- } },
1668
- defaultVariants: { size: "md" }
1669
- });
1670
- const StatusBadge = react.forwardRef(({ className, size, status, method, logLevel, color: customColor, pulse, children, style,...props }, ref) => {
1671
- let color = customColor;
1672
- let content = children;
1673
- if (status !== void 0) {
1674
- color = color ?? require_theme.getStatusColor(status);
1675
- content = content ?? String(status);
1676
- } else if (method) {
1677
- color = color ?? require_theme.getMethodColor(method);
1678
- content = content ?? method.toUpperCase();
1679
- } else if (logLevel) {
1680
- color = color ?? require_theme.getLogLevelColor(logLevel);
1681
- content = content ?? logLevel.toUpperCase();
1682
- }
1683
- const backgroundColor = color ? `${color}20` : void 0;
1684
- const textColor = color;
1685
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1686
- ref,
1687
- className: cn(statusBadgeVariants({
1688
- size,
1689
- className
1690
- })),
1691
- style: {
1692
- backgroundColor,
1693
- color: textColor,
1694
- ...style
1695
- },
1696
- ...props,
1697
- children: [pulse && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1698
- className: "mr-1.5 h-1.5 w-1.5 rounded-full animate-pulse",
1699
- style: { backgroundColor: color }
1700
- }), content]
1701
- });
1702
- });
1703
- StatusBadge.displayName = "StatusBadge";
1704
- const HttpStatusBadge = react.forwardRef(({ code,...props }, ref) => {
1705
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusBadge, {
1706
- ref,
1707
- status: code,
1708
- ...props
1709
- });
1710
- });
1711
- HttpStatusBadge.displayName = "HttpStatusBadge";
1712
- const HttpMethodBadge = react.forwardRef(({ method,...props }, ref) => {
1713
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusBadge, {
1714
- ref,
1715
- method,
1716
- ...props
1717
- });
1718
- });
1719
- HttpMethodBadge.displayName = "HttpMethodBadge";
1720
- const LogLevelBadge = react.forwardRef(({ level,...props }, ref) => {
1721
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusBadge, {
1722
- ref,
1723
- logLevel: level,
1724
- ...props
1725
- });
1726
- });
1727
- LogLevelBadge.displayName = "LogLevelBadge";
1728
-
1729
- //#endregion
1730
- //#region src/components/layout/header.tsx
1731
- const Header = react.forwardRef(({ className, sticky = false, children,...props }, ref) => {
1732
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
1733
- ref,
1734
- className: cn("flex h-14 items-center gap-4 border-b border-border bg-surface px-4", sticky && "sticky top-0 z-10", className),
1735
- ...props,
1736
- children
1737
- });
1738
- });
1739
- Header.displayName = "Header";
1740
- const HeaderTitle = react.forwardRef(({ className, children,...props }, ref) => {
1741
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
1742
- ref,
1743
- className: cn("text-lg font-semibold text-foreground", className),
1744
- ...props,
1745
- children
1746
- });
1747
- });
1748
- HeaderTitle.displayName = "HeaderTitle";
1749
- const HeaderDescription = react.forwardRef(({ className, children,...props }, ref) => {
1750
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1751
- ref,
1752
- className: cn("text-sm text-muted-foreground", className),
1753
- ...props,
1754
- children
1755
- });
1756
- });
1757
- HeaderDescription.displayName = "HeaderDescription";
1758
- const HeaderActions = react.forwardRef(({ className, children,...props }, ref) => {
1759
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1760
- ref,
1761
- className: cn("ml-auto flex items-center gap-2", className),
1762
- ...props,
1763
- children
1764
- });
1765
- });
1766
- HeaderActions.displayName = "HeaderActions";
1767
- const HeaderBreadcrumbs = react.forwardRef(({ className, items, separator,...props }, ref) => {
1768
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
1769
- ref,
1770
- "aria-label": "Breadcrumb",
1771
- className: cn("flex items-center gap-1 text-sm", className),
1772
- ...props,
1773
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", {
1774
- className: "flex items-center gap-1",
1775
- children: items.map((item, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
1776
- className: "flex items-center gap-1",
1777
- children: [index > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1778
- className: "text-muted-foreground",
1779
- children: separator ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: "h-3.5 w-3.5" })
1780
- }), item.href && !item.current ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
1781
- href: item.href,
1782
- className: "text-muted-foreground hover:text-foreground transition-colors",
1783
- children: item.label
1784
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1785
- className: cn(item.current ? "text-foreground font-medium" : "text-muted-foreground"),
1786
- "aria-current": item.current ? "page" : void 0,
1787
- children: item.label
1788
- })]
1789
- }, item.label))
1790
- })
1791
- });
1792
- });
1793
- HeaderBreadcrumbs.displayName = "HeaderBreadcrumbs";
1794
- const HeaderGroup = react.forwardRef(({ className, align = "start", children,...props }, ref) => {
1795
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1796
- ref,
1797
- className: cn("flex items-center gap-3", align === "center" && "justify-center", align === "end" && "justify-end ml-auto", className),
1798
- ...props,
1799
- children
1800
- });
1801
- });
1802
- HeaderGroup.displayName = "HeaderGroup";
1803
-
1804
- //#endregion
1805
- //#region src/components/layout/shell.tsx
1806
- const Shell = react.forwardRef(({ className, children,...props }, ref) => {
1807
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1808
- ref,
1809
- className: cn("flex h-screen w-full bg-background", className),
1810
- ...props,
1811
- children
1812
- });
1813
- });
1814
- Shell.displayName = "Shell";
1815
- const ShellSidebar = react.forwardRef(({ className, children,...props }, ref) => {
1816
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1817
- ref,
1818
- className: cn("shrink-0", className),
1819
- ...props,
1820
- children
1821
- });
1822
- });
1823
- ShellSidebar.displayName = "ShellSidebar";
1824
- const ShellMain = react.forwardRef(({ className, children,...props }, ref) => {
1825
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1826
- ref,
1827
- className: cn("flex flex-1 flex-col overflow-hidden", className),
1828
- ...props,
1829
- children
1830
- });
1831
- });
1832
- ShellMain.displayName = "ShellMain";
1833
- const ShellHeader = react.forwardRef(({ className, children,...props }, ref) => {
1834
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1835
- ref,
1836
- className: cn("shrink-0", className),
1837
- ...props,
1838
- children
1839
- });
1840
- });
1841
- ShellHeader.displayName = "ShellHeader";
1842
- const ShellContent = react.forwardRef(({ className, scrollable = true, children,...props }, ref) => {
1843
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1844
- ref,
1845
- className: cn("flex-1", scrollable && "overflow-auto", className),
1846
- ...props,
1847
- children
1848
- });
1849
- });
1850
- ShellContent.displayName = "ShellContent";
1851
- const ShellFooter = react.forwardRef(({ className, children,...props }, ref) => {
1852
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1853
- ref,
1854
- className: cn("shrink-0 border-t border-border bg-surface", className),
1855
- ...props,
1856
- children
1857
- });
1858
- });
1859
- ShellFooter.displayName = "ShellFooter";
1860
-
1861
- //#endregion
1862
- //#region src/components/ui/scroll-area.tsx
1863
- const ScrollArea = react.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_scroll_area.Root, {
1864
- ref,
1865
- className: cn("relative overflow-hidden", className),
1866
- ...props,
1867
- children: [
1868
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_scroll_area.Viewport, {
1869
- className: "h-full w-full rounded-[inherit]",
1870
- children
1871
- }),
1872
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollBar, {}),
1873
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_scroll_area.Corner, {})
1874
- ]
1875
- }));
1876
- ScrollArea.displayName = __radix_ui_react_scroll_area.Root.displayName;
1877
- const ScrollBar = react.forwardRef(({ className, orientation = "vertical",...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_scroll_area.ScrollAreaScrollbar, {
1878
- ref,
1879
- orientation,
1880
- className: cn("flex touch-none select-none transition-colors", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", className),
1881
- ...props,
1882
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_scroll_area.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
1883
- }));
1884
- ScrollBar.displayName = __radix_ui_react_scroll_area.ScrollAreaScrollbar.displayName;
1885
-
1886
- //#endregion
1887
- //#region src/components/ui/tooltip.tsx
1888
- const TooltipProvider = __radix_ui_react_tooltip.Provider;
1889
- const Tooltip = __radix_ui_react_tooltip.Root;
1890
- const TooltipTrigger = __radix_ui_react_tooltip.Trigger;
1891
- const TooltipContent = react.forwardRef(({ className, sideOffset = 4,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Content, {
1892
- ref,
1893
- sideOffset,
1894
- className: cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
1895
- ...props
1896
- }) }));
1897
- TooltipContent.displayName = __radix_ui_react_tooltip.Content.displayName;
1898
-
1899
- //#endregion
1900
- //#region src/components/layout/sidebar.tsx
1901
- const sidebarVariants = (0, class_variance_authority.cva)("flex flex-col border-r border-border bg-surface transition-all duration-200", {
1902
- variants: { collapsed: {
1903
- true: "w-16",
1904
- false: "w-64"
1905
- } },
1906
- defaultVariants: { collapsed: false }
1907
- });
1908
- const SidebarContext = react.createContext({
1909
- collapsed: false,
1910
- setCollapsed: () => {}
1911
- });
1912
- function useSidebar() {
1913
- const context = react.useContext(SidebarContext);
1914
- if (!context) throw new Error("useSidebar must be used within a Sidebar");
1915
- return context;
1916
- }
1917
- const Sidebar = react.forwardRef(({ className, collapsed: controlledCollapsed, onCollapsedChange, header, footer, children,...props }, ref) => {
1918
- const [internalCollapsed, setInternalCollapsed] = react.useState(false);
1919
- const collapsed = controlledCollapsed ?? internalCollapsed;
1920
- const setCollapsed = react.useCallback((value) => {
1921
- setInternalCollapsed(value);
1922
- onCollapsedChange?.(value);
1923
- }, [onCollapsedChange]);
1924
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarContext.Provider, {
1925
- value: {
1926
- collapsed,
1927
- setCollapsed
1928
- },
1929
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipProvider, {
1930
- delayDuration: 0,
1931
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1932
- ref,
1933
- className: cn(sidebarVariants({
1934
- collapsed,
1935
- className
1936
- })),
1937
- ...props,
1938
- children: [
1939
- header && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1940
- className: "flex h-14 items-center border-b border-border px-4",
1941
- children: header
1942
- }),
1943
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollArea, {
1944
- className: "flex-1",
1945
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1946
- className: "flex flex-col gap-1 p-2",
1947
- children
1948
- })
1949
- }),
1950
- footer && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1951
- className: "border-t border-border p-2",
1952
- children: footer
1953
- })
1954
- ]
1955
- })
1956
- })
1957
- });
1958
- });
1959
- Sidebar.displayName = "Sidebar";
1960
- const SidebarToggle = react.forwardRef(({ className,...props }, ref) => {
1961
- const { collapsed, setCollapsed } = useSidebar();
1962
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
1963
- ref,
1964
- variant: "ghost",
1965
- size: "icon",
1966
- className: cn("h-8 w-8", className),
1967
- onClick: () => setCollapsed(!collapsed),
1968
- ...props,
1969
- children: [collapsed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.PanelLeftOpen, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.PanelLeftClose, { className: "h-4 w-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1970
- className: "sr-only",
1971
- children: collapsed ? "Expand sidebar" : "Collapse sidebar"
1972
- })]
1973
- });
1974
- });
1975
- SidebarToggle.displayName = "SidebarToggle";
1976
- const SidebarSection = react.forwardRef(({ className, title, children,...props }, ref) => {
1977
- const { collapsed } = useSidebar();
1978
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1979
- ref,
1980
- className: cn("flex flex-col gap-1", className),
1981
- ...props,
1982
- children: [
1983
- title && !collapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1984
- className: "px-2 py-1.5 text-xs font-medium text-muted-foreground uppercase tracking-wider",
1985
- children: title
1986
- }),
1987
- title && collapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "mx-auto my-1 h-px w-6 bg-border" }),
1988
- children
1989
- ]
1990
- });
1991
- });
1992
- SidebarSection.displayName = "SidebarSection";
1993
- const SidebarItem = react.forwardRef(({ className, icon: Icon, active, badge, children,...props }, ref) => {
1994
- const { collapsed } = useSidebar();
1995
- const button = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1996
- ref,
1997
- className: cn("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors", "text-muted-foreground hover:bg-surface-hover hover:text-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", active && "bg-surface-hover text-foreground", collapsed && "justify-center px-0", className),
1998
- ...props,
1999
- children: [
2000
- Icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { className: "h-4 w-4 shrink-0" }),
2001
- !collapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2002
- className: "flex-1 truncate",
2003
- children
2004
- }),
2005
- !collapsed && badge && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: badge })
2006
- ]
2007
- });
2008
- if (collapsed) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipTrigger, {
2009
- asChild: true,
2010
- children: button
2011
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TooltipContent, {
2012
- side: "right",
2013
- className: "flex items-center gap-2",
2014
- children: [children, badge]
2015
- })] });
2016
- return button;
2017
- });
2018
- SidebarItem.displayName = "SidebarItem";
2019
- const SidebarLink = react.forwardRef(({ className, icon: Icon, active, badge, children,...props }, ref) => {
2020
- const { collapsed } = useSidebar();
2021
- const link = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
2022
- ref,
2023
- className: cn("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors", "text-muted-foreground hover:bg-surface-hover hover:text-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", active && "bg-surface-hover text-foreground", collapsed && "justify-center px-0", className),
2024
- ...props,
2025
- children: [
2026
- Icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { className: "h-4 w-4 shrink-0" }),
2027
- !collapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2028
- className: "flex-1 truncate",
2029
- children
2030
- }),
2031
- !collapsed && badge && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: badge })
2032
- ]
2033
- });
2034
- if (collapsed) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipTrigger, {
2035
- asChild: true,
2036
- children: link
2037
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TooltipContent, {
2038
- side: "right",
2039
- className: "flex items-center gap-2",
2040
- children: [children, badge]
2041
- })] });
2042
- return link;
2043
- });
2044
- SidebarLink.displayName = "SidebarLink";
2045
-
2046
- //#endregion
2047
- //#region src/components/layout/split-pane.tsx
2048
- const SplitPane = react.forwardRef(({ className, direction = "horizontal", defaultSize = "50%", minSize = 100, maxSize, onSizeChange, resizable = true, children,...props }, ref) => {
2049
- const containerRef = react.useRef(null);
2050
- const [size, setSize] = react.useState(null);
2051
- const [isDragging, setIsDragging] = react.useState(false);
2052
- const childArray = react.Children.toArray(children);
2053
- const firstPane = childArray[0];
2054
- const secondPane = childArray[1];
2055
- const isHorizontal = direction === "horizontal";
2056
- react.useEffect(() => {
2057
- if (size !== null || !containerRef.current) return;
2058
- const containerSize = isHorizontal ? containerRef.current.offsetWidth : containerRef.current.offsetHeight;
2059
- if (typeof defaultSize === "string" && defaultSize.endsWith("%")) {
2060
- const percent = parseFloat(defaultSize) / 100;
2061
- setSize(Math.round(containerSize * percent));
2062
- } else if (typeof defaultSize === "number") setSize(defaultSize);
2063
- else setSize(Math.round(containerSize / 2));
2064
- }, [
2065
- defaultSize,
2066
- isHorizontal,
2067
- size
2068
- ]);
2069
- const handleMouseDown = react.useCallback((e) => {
2070
- if (!resizable) return;
2071
- e.preventDefault();
2072
- setIsDragging(true);
2073
- }, [resizable]);
2074
- react.useEffect(() => {
2075
- if (!isDragging) return;
2076
- const handleMouseMove = (e) => {
2077
- if (!containerRef.current) return;
2078
- const containerRect = containerRef.current.getBoundingClientRect();
2079
- const containerSize = isHorizontal ? containerRect.width : containerRect.height;
2080
- let newSize = isHorizontal ? e.clientX - containerRect.left : e.clientY - containerRect.top;
2081
- newSize = Math.max(minSize, newSize);
2082
- if (maxSize) newSize = Math.min(maxSize, newSize);
2083
- newSize = Math.min(containerSize - minSize, newSize);
2084
- setSize(newSize);
2085
- onSizeChange?.(newSize);
2086
- };
2087
- const handleMouseUp = () => {
2088
- setIsDragging(false);
2089
- };
2090
- document.addEventListener("mousemove", handleMouseMove);
2091
- document.addEventListener("mouseup", handleMouseUp);
2092
- return () => {
2093
- document.removeEventListener("mousemove", handleMouseMove);
2094
- document.removeEventListener("mouseup", handleMouseUp);
2095
- };
2096
- }, [
2097
- isDragging,
2098
- isHorizontal,
2099
- minSize,
2100
- maxSize,
2101
- onSizeChange
2102
- ]);
2103
- const firstPaneStyle = {
2104
- [isHorizontal ? "width" : "height"]: size !== null ? `${size}px` : defaultSize,
2105
- flexShrink: 0
2106
- };
2107
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2108
- ref: (node) => {
2109
- containerRef.current = node;
2110
- if (typeof ref === "function") ref(node);
2111
- else if (ref) ref.current = node;
2112
- },
2113
- className: cn("flex overflow-hidden", isHorizontal ? "flex-row" : "flex-col", isDragging && "cursor-col-resize select-none", className),
2114
- ...props,
2115
- children: [
2116
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2117
- className: cn("overflow-auto", isHorizontal ? "min-w-0" : "min-h-0"),
2118
- style: firstPaneStyle,
2119
- children: firstPane
2120
- }),
2121
- resizable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2122
- className: cn("flex shrink-0 items-center justify-center bg-border transition-colors", isHorizontal ? "w-1 cursor-col-resize hover:bg-border-hover active:bg-accent" : "h-1 cursor-row-resize hover:bg-border-hover active:bg-accent", isDragging && "bg-accent"),
2123
- onMouseDown: handleMouseDown,
2124
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: cn("rounded-full bg-muted-foreground/50", isHorizontal ? "h-8 w-1" : "h-1 w-8") })
2125
- }),
2126
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2127
- className: cn("flex-1 overflow-auto", isHorizontal ? "min-w-0" : "min-h-0"),
2128
- children: secondPane
2129
- })
2130
- ]
2131
- });
2132
- });
2133
- SplitPane.displayName = "SplitPane";
2134
- const SplitPanePanel = react.forwardRef(({ className, children,...props }, ref) => {
2135
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2136
- ref,
2137
- className: cn("h-full w-full", className),
2138
- ...props,
2139
- children
2140
- });
2141
- });
2142
- SplitPanePanel.displayName = "SplitPanePanel";
2143
-
2144
- //#endregion
2145
- //#region src/components/ui/badge.tsx
2146
- const badgeVariants = (0, class_variance_authority.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
2147
- variants: { variant: {
2148
- default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
2149
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
2150
- destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
2151
- outline: "text-foreground",
2152
- success: "border-transparent bg-emerald-500/15 text-emerald-400",
2153
- warning: "border-transparent bg-amber-500/15 text-amber-400",
2154
- info: "border-transparent bg-blue-500/15 text-blue-400",
2155
- get: "border-transparent bg-blue-500/15 text-blue-400 font-mono",
2156
- post: "border-transparent bg-emerald-500/15 text-emerald-400 font-mono",
2157
- put: "border-transparent bg-amber-500/15 text-amber-400 font-mono",
2158
- patch: "border-transparent bg-violet-500/15 text-violet-400 font-mono",
2159
- delete: "border-transparent bg-red-500/15 text-red-400 font-mono"
2160
- } },
2161
- defaultVariants: { variant: "default" }
2162
- });
2163
- function Badge({ className, variant,...props }) {
2164
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2165
- className: cn(badgeVariants({ variant }), className),
2166
- ...props
2167
- });
2168
- }
2169
-
2170
- //#endregion
2171
- //#region src/components/ui/card.tsx
2172
- const Card = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2173
- ref,
2174
- className: cn("rounded-xl border bg-card text-card-foreground shadow", className),
2175
- ...props
2176
- }));
2177
- Card.displayName = "Card";
2178
- const CardHeader = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2179
- ref,
2180
- className: cn("flex flex-col space-y-1.5 p-6", className),
2181
- ...props
2182
- }));
2183
- CardHeader.displayName = "CardHeader";
2184
- const CardTitle = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2185
- ref,
2186
- className: cn("font-semibold leading-none tracking-tight", className),
2187
- ...props
2188
- }));
2189
- CardTitle.displayName = "CardTitle";
2190
- const CardDescription = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2191
- ref,
2192
- className: cn("text-sm text-muted-foreground", className),
2193
- ...props
2194
- }));
2195
- CardDescription.displayName = "CardDescription";
2196
- const CardContent = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2197
- ref,
2198
- className: cn("p-6 pt-0", className),
2199
- ...props
2200
- }));
2201
- CardContent.displayName = "CardContent";
2202
- const CardFooter = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2203
- ref,
2204
- className: cn("flex items-center p-6 pt-0", className),
2205
- ...props
2206
- }));
2207
- CardFooter.displayName = "CardFooter";
2208
-
2209
- //#endregion
2210
- //#region src/components/ui/code-block.tsx
2211
- const CodeBlock = react.forwardRef(({ code, language = "typescript", showLineNumbers = false, className }, ref) => {
2212
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(prism_react_renderer.Highlight, {
2213
- theme: prism_react_renderer.themes.vsDark,
2214
- code: code.trim(),
2215
- language,
2216
- children: ({ className: highlightClassName, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
2217
- ref,
2218
- className: cn("overflow-auto rounded-md border bg-[#1e1e1e] p-4 text-sm", className),
2219
- style,
2220
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
2221
- className: highlightClassName,
2222
- children: tokens.map((line, i) => {
2223
- const lineProps = getLineProps({
2224
- line,
2225
- key: i
2226
- });
2227
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2228
- ...lineProps,
2229
- className: "table-row",
2230
- children: [showLineNumbers && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2231
- className: "table-cell select-none pr-4 text-right text-muted-foreground opacity-50",
2232
- children: i + 1
2233
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2234
- className: "table-cell",
2235
- children: line.map((token, key) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { ...getTokenProps({
2236
- token,
2237
- key
2238
- }) }, key))
2239
- })]
2240
- }, i);
2241
- })
2242
- })
2243
- })
2244
- });
2245
- });
2246
- CodeBlock.displayName = "CodeBlock";
2247
-
2248
- //#endregion
2249
- //#region src/components/ui/dialog.tsx
2250
- const Dialog = __radix_ui_react_dialog.Root;
2251
- const DialogTrigger = __radix_ui_react_dialog.Trigger;
2252
- const DialogPortal = __radix_ui_react_dialog.Portal;
2253
- const DialogClose = __radix_ui_react_dialog.Close;
2254
- const DialogOverlay = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Overlay, {
2255
- ref,
2256
- className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className),
2257
- ...props
2258
- }));
2259
- DialogOverlay.displayName = __radix_ui_react_dialog.Overlay.displayName;
2260
- const DialogContent = react.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Content, {
2261
- ref,
2262
- className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className),
2263
- ...props,
2264
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Close, {
2265
- className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
2266
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "h-4 w-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2267
- className: "sr-only",
2268
- children: "Close"
2269
- })]
2270
- })]
2271
- })] }));
2272
- DialogContent.displayName = __radix_ui_react_dialog.Content.displayName;
2273
- const DialogHeader = ({ className,...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2274
- className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className),
2275
- ...props
2276
- });
2277
- DialogHeader.displayName = "DialogHeader";
2278
- const DialogFooter = ({ className,...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2279
- className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
2280
- ...props
2281
- });
2282
- DialogFooter.displayName = "DialogFooter";
2283
- const DialogTitle = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Title, {
2284
- ref,
2285
- className: cn("text-lg font-semibold leading-none tracking-tight", className),
2286
- ...props
2287
- }));
2288
- DialogTitle.displayName = __radix_ui_react_dialog.Title.displayName;
2289
- const DialogDescription = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Description, {
2290
- ref,
2291
- className: cn("text-sm text-muted-foreground", className),
2292
- ...props
2293
- }));
2294
- DialogDescription.displayName = __radix_ui_react_dialog.Description.displayName;
2295
-
2296
- //#endregion
2297
- //#region src/components/ui/dropdown-menu.tsx
2298
- const DropdownMenu = __radix_ui_react_dropdown_menu.Root;
2299
- const DropdownMenuTrigger = __radix_ui_react_dropdown_menu.Trigger;
2300
- const DropdownMenuGroup = __radix_ui_react_dropdown_menu.Group;
2301
- const DropdownMenuPortal = __radix_ui_react_dropdown_menu.Portal;
2302
- const DropdownMenuSub = __radix_ui_react_dropdown_menu.Sub;
2303
- const DropdownMenuRadioGroup = __radix_ui_react_dropdown_menu.RadioGroup;
2304
- const DropdownMenuSubTrigger = react.forwardRef(({ className, inset, children,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.SubTrigger, {
2305
- ref,
2306
- className: cn("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className),
2307
- ...props,
2308
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: "ml-auto" })]
2309
- }));
2310
- DropdownMenuSubTrigger.displayName = __radix_ui_react_dropdown_menu.SubTrigger.displayName;
2311
- const DropdownMenuSubContent = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.SubContent, {
2312
- ref,
2313
- className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
2314
- ...props
2315
- }));
2316
- DropdownMenuSubContent.displayName = __radix_ui_react_dropdown_menu.SubContent.displayName;
2317
- const DropdownMenuContent = react.forwardRef(({ className, sideOffset = 4,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Content, {
2318
- ref,
2319
- sideOffset,
2320
- className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
2321
- ...props
2322
- }) }));
2323
- DropdownMenuContent.displayName = __radix_ui_react_dropdown_menu.Content.displayName;
2324
- const DropdownMenuItem = react.forwardRef(({ className, inset,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Item, {
2325
- ref,
2326
- className: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className),
2327
- ...props
2328
- }));
2329
- DropdownMenuItem.displayName = __radix_ui_react_dropdown_menu.Item.displayName;
2330
- const DropdownMenuCheckboxItem = react.forwardRef(({ className, children, checked,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.CheckboxItem, {
2331
- ref,
2332
- className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
2333
- checked,
2334
- ...props,
2335
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2336
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
2337
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "h-4 w-4" }) })
2338
- }), children]
2339
- }));
2340
- DropdownMenuCheckboxItem.displayName = __radix_ui_react_dropdown_menu.CheckboxItem.displayName;
2341
- const DropdownMenuRadioItem = react.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.RadioItem, {
2342
- ref,
2343
- className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
2344
- ...props,
2345
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2346
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
2347
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Circle, { className: "h-2 w-2 fill-current" }) })
2348
- }), children]
2349
- }));
2350
- DropdownMenuRadioItem.displayName = __radix_ui_react_dropdown_menu.RadioItem.displayName;
2351
- const DropdownMenuLabel = react.forwardRef(({ className, inset,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Label, {
2352
- ref,
2353
- className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
2354
- ...props
2355
- }));
2356
- DropdownMenuLabel.displayName = __radix_ui_react_dropdown_menu.Label.displayName;
2357
- const DropdownMenuSeparator = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Separator, {
2358
- ref,
2359
- className: cn("-mx-1 my-1 h-px bg-muted", className),
2360
- ...props
2361
- }));
2362
- DropdownMenuSeparator.displayName = __radix_ui_react_dropdown_menu.Separator.displayName;
2363
- const DropdownMenuShortcut = ({ className,...props }) => {
2364
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2365
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
2366
- ...props
2367
- });
2368
- };
2369
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
2370
-
2371
- //#endregion
2372
- //#region src/components/ui/input.tsx
2373
- const Input = react.forwardRef(({ className, type,...props }, ref) => {
2374
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
2375
- type,
2376
- className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
2377
- ref,
2378
- ...props
2379
- });
2380
- });
2381
- Input.displayName = "Input";
2382
-
2383
- //#endregion
2384
- //#region src/components/ui/label.tsx
2385
- const labelVariants = (0, class_variance_authority.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
2386
- const Label = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_label.Root, {
2387
- ref,
2388
- className: cn(labelVariants(), className),
2389
- ...props
2390
- }));
2391
- Label.displayName = __radix_ui_react_label.Root.displayName;
2392
-
2393
- //#endregion
2394
- //#region src/components/ui/separator.tsx
2395
- const Separator = react.forwardRef(({ className, orientation = "horizontal", decorative = true,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_separator.Root, {
2396
- ref,
2397
- decorative,
2398
- orientation,
2399
- className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className),
2400
- ...props
2401
- }));
2402
- Separator.displayName = __radix_ui_react_separator.Root.displayName;
2403
-
2404
- //#endregion
2405
- //#region src/components/ui/tabs.tsx
2406
- const Tabs = __radix_ui_react_tabs.Root;
2407
- const TabsList = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.List, {
2408
- ref,
2409
- className: cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", className),
2410
- ...props
2411
- }));
2412
- TabsList.displayName = __radix_ui_react_tabs.List.displayName;
2413
- const TabsTrigger = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.Trigger, {
2414
- ref,
2415
- className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow", className),
2416
- ...props
2417
- }));
2418
- TabsTrigger.displayName = __radix_ui_react_tabs.Trigger.displayName;
2419
- const TabsContent = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.Content, {
2420
- ref,
2421
- className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className),
2422
- ...props
2423
- }));
2424
- TabsContent.displayName = __radix_ui_react_tabs.Content.displayName;
2425
-
2426
- //#endregion
2427
- exports.AreaTimeSeriesChart = AreaTimeSeriesChart;
2428
- exports.Badge = Badge;
2429
- exports.BarListChart = BarListChart;
2430
- exports.Button = Button;
2431
- exports.Card = Card;
2432
- exports.CardContent = CardContent;
2433
- exports.CardDescription = CardDescription;
2434
- exports.CardFooter = CardFooter;
2435
- exports.CardHeader = CardHeader;
2436
- exports.CardTitle = CardTitle;
2437
- exports.CodeBlock = CodeBlock;
2438
- exports.ConnectionStatus = ConnectionStatus;
2439
- exports.DataTable = DataTable;
2440
- exports.Dialog = Dialog;
2441
- exports.DialogClose = DialogClose;
2442
- exports.DialogContent = DialogContent;
2443
- exports.DialogDescription = DialogDescription;
2444
- exports.DialogFooter = DialogFooter;
2445
- exports.DialogHeader = DialogHeader;
2446
- exports.DialogOverlay = DialogOverlay;
2447
- exports.DialogPortal = DialogPortal;
2448
- exports.DialogTitle = DialogTitle;
2449
- exports.DialogTrigger = DialogTrigger;
2450
- exports.DropdownMenu = DropdownMenu;
2451
- exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
2452
- exports.DropdownMenuContent = DropdownMenuContent;
2453
- exports.DropdownMenuGroup = DropdownMenuGroup;
2454
- exports.DropdownMenuItem = DropdownMenuItem;
2455
- exports.DropdownMenuLabel = DropdownMenuLabel;
2456
- exports.DropdownMenuPortal = DropdownMenuPortal;
2457
- exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
2458
- exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
2459
- exports.DropdownMenuSeparator = DropdownMenuSeparator;
2460
- exports.DropdownMenuShortcut = DropdownMenuShortcut;
2461
- exports.DropdownMenuSub = DropdownMenuSub;
2462
- exports.DropdownMenuSubContent = DropdownMenuSubContent;
2463
- exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
2464
- exports.DropdownMenuTrigger = DropdownMenuTrigger;
2465
- exports.EmptyState = EmptyState;
2466
- exports.Header = Header;
2467
- exports.HeaderActions = HeaderActions;
2468
- exports.HeaderBreadcrumbs = HeaderBreadcrumbs;
2469
- exports.HeaderDescription = HeaderDescription;
2470
- exports.HeaderGroup = HeaderGroup;
2471
- exports.HeaderTitle = HeaderTitle;
2472
- exports.HttpMethodBadge = HttpMethodBadge;
2473
- exports.HttpStatusBadge = HttpStatusBadge;
2474
- exports.Input = Input;
2475
- exports.JsonViewer = JsonViewer;
2476
- exports.Label = Label;
2477
- exports.LatencyPercentilesChart = LatencyPercentilesChart;
2478
- exports.LiveIndicator = LiveIndicator;
2479
- exports.LoadingContainer = LoadingContainer;
2480
- exports.LoadingDots = LoadingDots;
2481
- exports.LoadingOverlay = LoadingOverlay;
2482
- exports.LogLevelBadge = LogLevelBadge;
2483
- exports.MetricCard = MetricCard;
2484
- exports.NoData = NoData;
2485
- exports.NoResults = NoResults;
2486
- exports.NotFound = NotFound;
2487
- exports.ScrollArea = ScrollArea;
2488
- exports.ScrollBar = ScrollBar;
2489
- exports.Select = Select;
2490
- exports.SelectContent = SelectContent;
2491
- exports.SelectGroup = SelectGroup;
2492
- exports.SelectItem = SelectItem;
2493
- exports.SelectLabel = SelectLabel;
2494
- exports.SelectScrollDownButton = SelectScrollDownButton;
2495
- exports.SelectScrollUpButton = SelectScrollUpButton;
2496
- exports.SelectSeparator = SelectSeparator;
2497
- exports.SelectTrigger = SelectTrigger;
2498
- exports.SelectValue = SelectValue;
2499
- exports.Separator = Separator;
2500
- exports.ServerError = ServerError;
2501
- exports.Shell = Shell;
2502
- exports.ShellContent = ShellContent;
2503
- exports.ShellFooter = ShellFooter;
2504
- exports.ShellHeader = ShellHeader;
2505
- exports.ShellMain = ShellMain;
2506
- exports.ShellSidebar = ShellSidebar;
2507
- exports.Sidebar = Sidebar;
2508
- exports.SidebarItem = SidebarItem;
2509
- exports.SidebarLink = SidebarLink;
2510
- exports.SidebarSection = SidebarSection;
2511
- exports.SidebarToggle = SidebarToggle;
2512
- exports.Skeleton = Skeleton;
2513
- exports.SparkBar = SparkBar;
2514
- exports.Sparkline = Sparkline;
2515
- exports.Spinner = Spinner;
2516
- exports.SplitPane = SplitPane;
2517
- exports.SplitPanePanel = SplitPanePanel;
2518
- exports.StatusBadge = StatusBadge;
2519
- exports.StatusDistributionChart = StatusDistributionChart;
2520
- exports.Table = Table;
2521
- exports.TableBody = TableBody;
2522
- exports.TableCaption = TableCaption;
2523
- exports.TableCell = TableCell;
2524
- exports.TableFooter = TableFooter;
2525
- exports.TableHead = TableHead;
2526
- exports.TableHeader = TableHeader;
2527
- exports.TableRow = TableRow;
2528
- exports.Tabs = Tabs;
2529
- exports.TabsContent = TabsContent;
2530
- exports.TabsList = TabsList;
2531
- exports.TabsTrigger = TabsTrigger;
2532
- exports.TimeRangeSelector = TimeRangeSelector;
2533
- exports.Timeline = Timeline;
2534
- exports.TimelineConnector = TimelineConnector;
2535
- exports.TimelineContent = TimelineContent;
2536
- exports.TimelineDescription = TimelineDescription;
2537
- exports.TimelineIndicator = TimelineIndicator;
2538
- exports.TimelineItem = TimelineItem;
2539
- exports.TimelineTime = TimelineTime;
2540
- exports.TimelineTitle = TimelineTitle;
2541
- exports.Tooltip = Tooltip;
2542
- exports.TooltipContent = TooltipContent;
2543
- exports.TooltipProvider = TooltipProvider;
2544
- exports.TooltipTrigger = TooltipTrigger;
2545
- exports.badgeVariants = badgeVariants;
2546
- exports.buttonVariants = buttonVariants;
2547
- exports.cn = cn;
2548
- exports.createTimeRange = createTimeRange;
2549
- exports.emptyStateVariants = emptyStateVariants;
1
+ const require_utils = require('./utils-DTuzb7hO.cjs');
2
+ const require_data_display = require('./data-display-BSUj4rIc.cjs');
3
+ const require_button = require('./button-BSp9VyHi.cjs');
4
+ const require_table = require('./table-DNX6iqH5.cjs');
5
+ const require_feedback = require('./feedback-B9rTsQdJ.cjs');
6
+ const require_theme = require('./theme-BBoDSysS.cjs');
7
+ const require_layout = require('./layout-CcO0svmw.cjs');
8
+ const require_tooltip = require('./tooltip-BuTZvLTX.cjs');
9
+ const require_ui = require('./ui-PFNfvwdv.cjs');
10
+ const require_hooks = require('./hooks-C5O7RXTd.cjs');
11
+
12
+ exports.AreaTimeSeriesChart = require_data_display.AreaTimeSeriesChart;
13
+ exports.Badge = require_ui.Badge;
14
+ exports.BarListChart = require_data_display.BarListChart;
15
+ exports.Button = require_button.Button;
16
+ exports.Card = require_ui.Card;
17
+ exports.CardContent = require_ui.CardContent;
18
+ exports.CardDescription = require_ui.CardDescription;
19
+ exports.CardFooter = require_ui.CardFooter;
20
+ exports.CardHeader = require_ui.CardHeader;
21
+ exports.CardTitle = require_ui.CardTitle;
22
+ exports.CodeBlock = require_ui.CodeBlock;
23
+ exports.ConnectionStatus = require_feedback.ConnectionStatus;
24
+ exports.DataTable = require_data_display.DataTable;
25
+ exports.Dialog = require_ui.Dialog;
26
+ exports.DialogClose = require_ui.DialogClose;
27
+ exports.DialogContent = require_ui.DialogContent;
28
+ exports.DialogDescription = require_ui.DialogDescription;
29
+ exports.DialogFooter = require_ui.DialogFooter;
30
+ exports.DialogHeader = require_ui.DialogHeader;
31
+ exports.DialogOverlay = require_ui.DialogOverlay;
32
+ exports.DialogPortal = require_ui.DialogPortal;
33
+ exports.DialogTitle = require_ui.DialogTitle;
34
+ exports.DialogTrigger = require_ui.DialogTrigger;
35
+ exports.DropdownMenu = require_ui.DropdownMenu;
36
+ exports.DropdownMenuCheckboxItem = require_ui.DropdownMenuCheckboxItem;
37
+ exports.DropdownMenuContent = require_ui.DropdownMenuContent;
38
+ exports.DropdownMenuGroup = require_ui.DropdownMenuGroup;
39
+ exports.DropdownMenuItem = require_ui.DropdownMenuItem;
40
+ exports.DropdownMenuLabel = require_ui.DropdownMenuLabel;
41
+ exports.DropdownMenuPortal = require_ui.DropdownMenuPortal;
42
+ exports.DropdownMenuRadioGroup = require_ui.DropdownMenuRadioGroup;
43
+ exports.DropdownMenuRadioItem = require_ui.DropdownMenuRadioItem;
44
+ exports.DropdownMenuSeparator = require_ui.DropdownMenuSeparator;
45
+ exports.DropdownMenuShortcut = require_ui.DropdownMenuShortcut;
46
+ exports.DropdownMenuSub = require_ui.DropdownMenuSub;
47
+ exports.DropdownMenuSubContent = require_ui.DropdownMenuSubContent;
48
+ exports.DropdownMenuSubTrigger = require_ui.DropdownMenuSubTrigger;
49
+ exports.DropdownMenuTrigger = require_ui.DropdownMenuTrigger;
50
+ exports.EmptyState = require_feedback.EmptyState;
51
+ exports.Header = require_layout.Header;
52
+ exports.HeaderActions = require_layout.HeaderActions;
53
+ exports.HeaderBreadcrumbs = require_layout.HeaderBreadcrumbs;
54
+ exports.HeaderDescription = require_layout.HeaderDescription;
55
+ exports.HeaderGroup = require_layout.HeaderGroup;
56
+ exports.HeaderTitle = require_layout.HeaderTitle;
57
+ exports.HttpMethodBadge = require_feedback.HttpMethodBadge;
58
+ exports.HttpStatusBadge = require_feedback.HttpStatusBadge;
59
+ exports.Input = require_ui.Input;
60
+ exports.JsonViewer = require_data_display.JsonViewer;
61
+ exports.Label = require_ui.Label;
62
+ exports.LatencyPercentilesChart = require_data_display.LatencyPercentilesChart;
63
+ exports.LiveIndicator = require_feedback.LiveIndicator;
64
+ exports.LoadingContainer = require_feedback.LoadingContainer;
65
+ exports.LoadingDots = require_feedback.LoadingDots;
66
+ exports.LoadingOverlay = require_feedback.LoadingOverlay;
67
+ exports.LogLevelBadge = require_feedback.LogLevelBadge;
68
+ exports.MetricCard = require_data_display.MetricCard;
69
+ exports.NoData = require_feedback.NoData;
70
+ exports.NoResults = require_feedback.NoResults;
71
+ exports.NotFound = require_feedback.NotFound;
72
+ exports.ScrollArea = require_tooltip.ScrollArea;
73
+ exports.ScrollBar = require_tooltip.ScrollBar;
74
+ exports.Select = require_table.Select;
75
+ exports.SelectContent = require_table.SelectContent;
76
+ exports.SelectGroup = require_table.SelectGroup;
77
+ exports.SelectItem = require_table.SelectItem;
78
+ exports.SelectLabel = require_table.SelectLabel;
79
+ exports.SelectScrollDownButton = require_table.SelectScrollDownButton;
80
+ exports.SelectScrollUpButton = require_table.SelectScrollUpButton;
81
+ exports.SelectSeparator = require_table.SelectSeparator;
82
+ exports.SelectTrigger = require_table.SelectTrigger;
83
+ exports.SelectValue = require_table.SelectValue;
84
+ exports.Separator = require_ui.Separator;
85
+ exports.ServerError = require_feedback.ServerError;
86
+ exports.Shell = require_layout.Shell;
87
+ exports.ShellContent = require_layout.ShellContent;
88
+ exports.ShellFooter = require_layout.ShellFooter;
89
+ exports.ShellHeader = require_layout.ShellHeader;
90
+ exports.ShellMain = require_layout.ShellMain;
91
+ exports.ShellSidebar = require_layout.ShellSidebar;
92
+ exports.Sidebar = require_layout.Sidebar;
93
+ exports.SidebarItem = require_layout.SidebarItem;
94
+ exports.SidebarLink = require_layout.SidebarLink;
95
+ exports.SidebarSection = require_layout.SidebarSection;
96
+ exports.SidebarToggle = require_layout.SidebarToggle;
97
+ exports.Skeleton = require_feedback.Skeleton;
98
+ exports.SparkBar = require_data_display.SparkBar;
99
+ exports.Sparkline = require_data_display.Sparkline;
100
+ exports.Spinner = require_feedback.Spinner;
101
+ exports.SplitPane = require_layout.SplitPane;
102
+ exports.SplitPanePanel = require_layout.SplitPanePanel;
103
+ exports.StatusBadge = require_feedback.StatusBadge;
104
+ exports.StatusDistributionChart = require_data_display.StatusDistributionChart;
105
+ exports.Table = require_table.Table;
106
+ exports.TableBody = require_table.TableBody;
107
+ exports.TableCaption = require_table.TableCaption;
108
+ exports.TableCell = require_table.TableCell;
109
+ exports.TableFooter = require_table.TableFooter;
110
+ exports.TableHead = require_table.TableHead;
111
+ exports.TableHeader = require_table.TableHeader;
112
+ exports.TableRow = require_table.TableRow;
113
+ exports.Tabs = require_ui.Tabs;
114
+ exports.TabsContent = require_ui.TabsContent;
115
+ exports.TabsList = require_ui.TabsList;
116
+ exports.TabsTrigger = require_ui.TabsTrigger;
117
+ exports.TimeRangeSelector = require_data_display.TimeRangeSelector;
118
+ exports.Timeline = require_data_display.Timeline;
119
+ exports.TimelineConnector = require_data_display.TimelineConnector;
120
+ exports.TimelineContent = require_data_display.TimelineContent;
121
+ exports.TimelineDescription = require_data_display.TimelineDescription;
122
+ exports.TimelineIndicator = require_data_display.TimelineIndicator;
123
+ exports.TimelineItem = require_data_display.TimelineItem;
124
+ exports.TimelineTime = require_data_display.TimelineTime;
125
+ exports.TimelineTitle = require_data_display.TimelineTitle;
126
+ exports.Tooltip = require_tooltip.Tooltip;
127
+ exports.TooltipContent = require_tooltip.TooltipContent;
128
+ exports.TooltipProvider = require_tooltip.TooltipProvider;
129
+ exports.TooltipTrigger = require_tooltip.TooltipTrigger;
130
+ exports.badgeVariants = require_ui.badgeVariants;
131
+ exports.buttonVariants = require_button.buttonVariants;
132
+ exports.cn = require_utils.cn;
133
+ exports.createTimeRange = require_data_display.createTimeRange;
134
+ exports.emptyStateVariants = require_feedback.emptyStateVariants;
2550
135
  exports.getLogLevelColor = require_theme.getLogLevelColor;
2551
136
  exports.getMethodColor = require_theme.getMethodColor;
2552
137
  exports.getStatusColor = require_theme.getStatusColor;
2553
- exports.liveIndicatorVariants = liveIndicatorVariants;
2554
- exports.loadingOverlayVariants = loadingOverlayVariants;
2555
- exports.sidebarVariants = sidebarVariants;
2556
- exports.spinnerVariants = spinnerVariants;
2557
- exports.statusBadgeVariants = statusBadgeVariants;
138
+ exports.liveIndicatorVariants = require_feedback.liveIndicatorVariants;
139
+ exports.loadingOverlayVariants = require_feedback.loadingOverlayVariants;
140
+ exports.sidebarVariants = require_layout.sidebarVariants;
141
+ exports.spinnerVariants = require_feedback.spinnerVariants;
142
+ exports.statusBadgeVariants = require_feedback.statusBadgeVariants;
2558
143
  exports.theme = require_theme.theme;
2559
- exports.timelineIndicatorVariants = timelineIndicatorVariants;
2560
- exports.timelineItemVariants = timelineItemVariants;
2561
- exports.timelineVariants = timelineVariants;
144
+ exports.timelineIndicatorVariants = require_data_display.timelineIndicatorVariants;
145
+ exports.timelineItemVariants = require_data_display.timelineItemVariants;
146
+ exports.timelineVariants = require_data_display.timelineVariants;
2562
147
  exports.useDebounce = require_hooks.useDebounce;
2563
148
  exports.useLocalStorage = require_hooks.useLocalStorage;
2564
- exports.useSidebar = useSidebar;
2565
- exports.useWebSocket = require_hooks.useWebSocket;
2566
- //# sourceMappingURL=index.cjs.map
149
+ exports.useSidebar = require_layout.useSidebar;
150
+ exports.useWebSocket = require_hooks.useWebSocket;