@overdoser/react-toolkit 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +14 -0
- package/components/Accordion/Accordion.js +160 -177
- package/components/Accordion/Accordion.module.js +20 -0
- package/components/ActionButton/ActionButton.js +155 -209
- package/components/ActionButton/ActionButton.module.js +25 -0
- package/components/ActionButton/CopyButton.js +52 -64
- package/components/Alert/Alert.js +92 -95
- package/components/Alert/Alert.module.js +18 -0
- package/components/Avatar/Avatar.js +44 -55
- package/components/Avatar/Avatar.module.js +23 -0
- package/components/Badge/Badge.js +16 -38
- package/components/Badge/Badge.module.js +17 -0
- package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/components/Breadcrumbs/Breadcrumbs.js +52 -48
- package/components/Breadcrumbs/Breadcrumbs.module.js +10 -0
- package/components/Button/Button.js +35 -57
- package/components/Button/Button.module.js +25 -0
- package/components/Card/Card.js +94 -131
- package/components/Card/Card.module.js +35 -0
- package/components/Chart/AreaChart.d.ts +1 -1
- package/components/Chart/AreaChart.js +248 -249
- package/components/Chart/Axis.d.ts +2 -2
- package/components/Chart/Axis.js +34 -43
- package/components/Chart/BarChart.d.ts +1 -1
- package/components/Chart/BarChart.js +307 -348
- package/components/Chart/Chart.module.js +32 -0
- package/components/Chart/ChartContainer.js +33 -41
- package/components/Chart/ChartLegend.d.ts +1 -1
- package/components/Chart/ChartLegend.js +31 -30
- package/components/Chart/ChartTooltip.d.ts +1 -1
- package/components/Chart/ChartTooltip.js +46 -41
- package/components/Chart/LineChart.d.ts +1 -1
- package/components/Chart/LineChart.js +220 -232
- package/components/Chart/PieChart.d.ts +1 -1
- package/components/Chart/PieChart.js +224 -240
- package/components/Chart/RadarChart.d.ts +1 -1
- package/components/Chart/RadarChart.js +166 -215
- package/components/Chart/Sparkline.js +73 -68
- package/components/Chart/TradingChart.d.ts +1 -1
- package/components/Chart/TradingChart.js +804 -701
- package/components/Chart/scales.js +28 -35
- package/components/Chart/trading/indicators.js +61 -62
- package/components/Chart/trading/period.js +46 -68
- package/components/Chart/useChartDimensions.js +30 -22
- package/components/Chip/Chip.js +98 -141
- package/components/Chip/Chip.module.js +32 -0
- package/components/CodeBlock/CodeBlock.js +111 -119
- package/components/CodeBlock/CodeBlock.module.js +23 -0
- package/components/CommandPalette/CommandPalette.js +387 -392
- package/components/CommandPalette/CommandPalette.module.js +28 -0
- package/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/components/ConfirmDialog/ConfirmDialog.js +184 -199
- package/components/ConfirmDialog/ConfirmDialog.module.js +12 -0
- package/components/Divider/Divider.js +25 -36
- package/components/Divider/Divider.module.js +17 -0
- package/components/Draggable/Draggable.d.ts +1 -1
- package/components/Draggable/Draggable.js +157 -164
- package/components/Draggable/Draggable.module.js +10 -0
- package/components/Drawer/Drawer.js +104 -126
- package/components/Drawer/Drawer.module.js +66 -0
- package/components/Dropdown/Dropdown.js +175 -234
- package/components/Dropdown/Dropdown.module.js +29 -0
- package/components/Dropdown/DropdownItem.js +55 -58
- package/components/Dropdown/DropdownLabel.js +14 -11
- package/components/Dropdown/DropdownSeparator.js +12 -10
- package/components/Dropdown/dropdownContext.js +4 -5
- package/components/Dropdown/useContextMenu.js +27 -17
- package/components/Dropzone/Dropzone.js +99 -105
- package/components/Dropzone/Dropzone.module.js +12 -0
- package/components/EmptyState/EmptyState.js +58 -55
- package/components/EmptyState/EmptyState.module.js +14 -0
- package/components/Form/Form.d.ts +1 -1
- package/components/Form/Form.js +32 -35
- package/components/Form/Form.module.js +16 -0
- package/components/Form/FormField.d.ts +1 -1
- package/components/Form/FormField.js +71 -75
- package/components/Form/FormRow.d.ts +1 -1
- package/components/Form/FormRow.js +11 -8
- package/components/Form/formFieldDefaults.js +4 -5
- package/components/ImageViewer/ImageViewer.js +312 -201
- package/components/ImageViewer/ImageViewer.module.js +26 -0
- package/components/ImageViewer/useZoomPan.js +206 -137
- package/components/Kbd/Kbd.js +25 -22
- package/components/Kbd/Kbd.module.js +10 -0
- package/components/KeyValueList/KeyValueList.js +119 -123
- package/components/KeyValueList/KeyValueList.module.js +23 -0
- package/components/Link/Link.js +45 -59
- package/components/Link/Link.module.js +10 -0
- package/components/List/List.js +22 -46
- package/components/List/List.module.js +12 -0
- package/components/Loader/Loader.js +152 -182
- package/components/Loader/Loader.module.js +40 -0
- package/components/Modal/Modal.js +93 -105
- package/components/Modal/Modal.module.js +18 -0
- package/components/PageHeader/PageHeader.js +78 -72
- package/components/PageHeader/PageHeader.module.js +23 -0
- package/components/Pagination/Pagination.js +63 -84
- package/components/Pagination/Pagination.module.js +13 -0
- package/components/Pagination/paginationRange.js +15 -22
- package/components/Popover/Popover.js +110 -134
- package/components/Popover/Popover.module.js +12 -0
- package/components/ProgressBar/ProgressBar.d.ts +15 -1
- package/components/ProgressBar/ProgressBar.js +57 -90
- package/components/ProgressBar/ProgressBar.module.js +29 -0
- package/components/RelativeTime/RelativeTime.js +36 -43
- package/components/RelativeTime/RelativeTime.module.js +3 -0
- package/components/SegmentedControl/SegmentedControl.js +94 -130
- package/components/SegmentedControl/SegmentedControl.module.js +21 -0
- package/components/Skeleton/Skeleton.js +36 -50
- package/components/Skeleton/Skeleton.module.js +15 -0
- package/components/Spinner/Spinner.js +25 -25
- package/components/Spinner/Spinner.module.js +12 -0
- package/components/SplitButton/SplitButton.js +149 -196
- package/components/SplitButton/SplitButton.module.js +31 -0
- package/components/SplitPane/SplitPane.js +134 -170
- package/components/SplitPane/SplitPane.module.js +14 -0
- package/components/StatCard/StatCard.js +132 -125
- package/components/StatCard/StatCard.module.js +42 -0
- package/components/StatusDot/StatusDot.js +28 -39
- package/components/StatusDot/StatusDot.module.js +18 -0
- package/components/Table/Table.d.ts +1 -1
- package/components/Table/Table.js +381 -451
- package/components/Table/Table.module.js +42 -0
- package/components/Table/useTableSort.js +51 -42
- package/components/Tabs/Tabs.js +109 -161
- package/components/Tabs/Tabs.module.js +28 -0
- package/components/ThemeToggle/ThemeToggle.js +122 -98
- package/components/ThemeToggle/ThemeToggle.module.js +13 -0
- package/components/Timeline/GanttTimeline.js +357 -318
- package/components/Timeline/GanttTimeline.module.js +29 -0
- package/components/Timeline/HistoryTimeline.js +486 -450
- package/components/Timeline/HistoryTimeline.module.js +31 -0
- package/components/Timeline/Timeline.module.js +76 -0
- package/components/Timeline/TimelineShared.d.ts +7 -7
- package/components/Timeline/TimelineShared.js +288 -279
- package/components/Timeline/TraceEventDetails.d.ts +3 -3
- package/components/Timeline/TraceEventDetails.js +245 -178
- package/components/Timeline/TraceTimeline.js +823 -783
- package/components/Timeline/TraceTimeline.module.js +98 -0
- package/components/Timeline/historyLayout.js +336 -263
- package/components/Timeline/timelineCore.js +208 -183
- package/components/Timeline/traceEvent.js +59 -61
- package/components/Timeline/traceLayout.js +101 -90
- package/components/Timeline/useTimeline.js +76 -79
- package/components/Timer/Timer.js +190 -156
- package/components/Timer/Timer.module.js +29 -0
- package/components/Toast/Toast.d.ts +1 -1
- package/components/Toast/Toast.js +128 -128
- package/components/Toast/Toast.module.js +37 -0
- package/components/Toast/toastStore.js +58 -62
- package/components/ToggleIconButton/ToggleIconButton.js +35 -57
- package/components/ToggleIconButton/ToggleIconButton.module.js +15 -0
- package/components/Tooltip/Tooltip.d.ts +1 -1
- package/components/Tooltip/Tooltip.js +76 -85
- package/components/Tooltip/Tooltip.module.js +17 -0
- package/components/Typography/Typography.js +11 -36
- package/components/Typography/Typography.module.js +30 -0
- package/components/inputs/Checkbox/Checkbox.js +27 -51
- package/components/inputs/Checkbox/Checkbox.module.js +10 -0
- package/components/inputs/Checkbox/CheckboxGroup.js +53 -111
- package/components/inputs/Checkbox/CheckboxGroup.module.js +17 -0
- package/components/inputs/DatePicker/CalendarPanel.d.ts +1 -1
- package/components/inputs/DatePicker/CalendarPanel.js +263 -286
- package/components/inputs/DatePicker/CalendarPanel.module.js +23 -0
- package/components/inputs/DatePicker/DatePicker.js +115 -142
- package/components/inputs/DatePicker/DatePicker.module.js +14 -0
- package/components/inputs/DatePicker/dateUtils.js +32 -41
- package/components/inputs/DateTimePicker/DateTimePicker.js +226 -232
- package/components/inputs/DateTimePicker/DateTimePicker.module.js +20 -0
- package/components/inputs/DateTimePicker/DateTimeSegments.js +273 -252
- package/components/inputs/DateTimePicker/TimeField.d.ts +1 -1
- package/components/inputs/DateTimePicker/TimeField.js +131 -132
- package/components/inputs/DateTimePicker/timeZoneUtils.js +95 -92
- package/components/inputs/Input/Input.js +98 -109
- package/components/inputs/Input/Input.module.js +15 -0
- package/components/inputs/NumberInput/NumberInput.js +112 -132
- package/components/inputs/NumberInput/NumberInput.module.js +14 -0
- package/components/inputs/Radio/Radio.js +50 -73
- package/components/inputs/Radio/Radio.module.js +9 -0
- package/components/inputs/SearchInput/SearchInput.js +98 -115
- package/components/inputs/SearchInput/SearchInput.module.js +8 -0
- package/components/inputs/Select/Select.js +555 -682
- package/components/inputs/Select/Select.module.js +38 -0
- package/components/inputs/Slider/Slider.js +97 -128
- package/components/inputs/Slider/Slider.module.js +9 -0
- package/components/inputs/Switch/Switch.js +11 -8
- package/components/inputs/Textarea/Textarea.js +42 -58
- package/components/inputs/Textarea/Textarea.module.js +14 -0
- package/hooks/useClickOutside.js +17 -14
- package/hooks/useDebouncedValue.js +13 -14
- package/hooks/useElementSize.js +27 -22
- package/hooks/useEscapeLayer.js +28 -29
- package/hooks/useFocusTrap.js +27 -38
- package/hooks/useKeyboard.js +76 -64
- package/hooks/useMediaQuery.js +10 -15
- package/hooks/useNow.js +28 -33
- package/hooks/usePersistedState.js +98 -94
- package/hooks/usePortalPosition.js +25 -19
- package/hooks/useResizable.js +106 -104
- package/hooks/useTheme.js +28 -23
- package/index.css +2 -1
- package/index.js +97 -215
- package/index.layered.css +2 -3
- package/llms.txt +3 -0
- package/manifest.json +8 -0
- package/package.json +1 -1
- package/utils/formatBytes.js +29 -13
- package/utils/themeScript.js +6 -8
- package/utils/timeAgo.js +59 -32
- package/components/Accordion/Accordion.module.scss.js +0 -36
- package/components/ActionButton/ActionButton.module.scss.js +0 -47
- package/components/Alert/Alert.module.scss.js +0 -33
- package/components/Avatar/Avatar.module.scss.js +0 -43
- package/components/Badge/Badge.module.scss.js +0 -31
- package/components/Breadcrumbs/Breadcrumbs.module.scss.js +0 -17
- package/components/Button/Button.module.scss.js +0 -47
- package/components/Card/Card.module.scss.js +0 -60
- package/components/Chart/Chart.module.scss.js +0 -61
- package/components/Chip/Chip.module.scss.js +0 -59
- package/components/CodeBlock/CodeBlock.module.scss.js +0 -43
- package/components/CommandPalette/CommandPalette.module.scss.js +0 -49
- package/components/ConfirmDialog/ConfirmDialog.module.scss.js +0 -21
- package/components/Divider/Divider.module.scss.js +0 -31
- package/components/Draggable/Draggable.module.scss.js +0 -17
- package/components/Drawer/Drawer.module.scss.js +0 -119
- package/components/Dropdown/Dropdown.module.scss.js +0 -53
- package/components/Dropzone/Dropzone.module.scss.js +0 -21
- package/components/EmptyState/EmptyState.module.scss.js +0 -25
- package/components/Form/Form.module.scss.js +0 -29
- package/components/ImageViewer/ImageViewer.module.scss.js +0 -47
- package/components/Kbd/Kbd.module.scss.js +0 -17
- package/components/KeyValueList/KeyValueList.module.scss.js +0 -43
- package/components/Link/Link.module.scss.js +0 -16
- package/components/List/List.module.scss.js +0 -21
- package/components/Loader/Loader.module.scss.js +0 -70
- package/components/Modal/Modal.module.scss.js +0 -33
- package/components/PageHeader/PageHeader.module.scss.js +0 -43
- package/components/Pagination/Pagination.module.scss.js +0 -23
- package/components/Popover/Popover.module.scss.js +0 -21
- package/components/ProgressBar/ProgressBar.module.scss.js +0 -51
- package/components/RelativeTime/RelativeTime.module.scss.js +0 -7
- package/components/SegmentedControl/SegmentedControl.module.scss.js +0 -39
- package/components/Skeleton/Skeleton.module.scss.js +0 -25
- package/components/Spinner/Spinner.module.scss.js +0 -20
- package/components/SplitButton/SplitButton.module.scss.js +0 -57
- package/components/SplitPane/SplitPane.module.scss.js +0 -25
- package/components/StatCard/StatCard.module.scss.js +0 -72
- package/components/StatusDot/StatusDot.module.scss.js +0 -32
- package/components/Table/Table.module.scss.js +0 -81
- package/components/Tabs/Tabs.module.scss.js +0 -53
- package/components/ThemeToggle/ThemeToggle.module.scss.js +0 -23
- package/components/Timeline/GanttTimeline.module.scss.js +0 -55
- package/components/Timeline/HistoryTimeline.module.scss.js +0 -59
- package/components/Timeline/Timeline.module.scss.js +0 -141
- package/components/Timeline/TraceTimeline.module.scss.js +0 -189
- package/components/Timer/Timer.module.scss.js +0 -55
- package/components/Toast/Toast.module.scss.js +0 -62
- package/components/ToggleIconButton/ToggleIconButton.module.scss.js +0 -27
- package/components/Tooltip/Tooltip.module.scss.js +0 -30
- package/components/Typography/Typography.module.scss.js +0 -53
- package/components/inputs/Checkbox/Checkbox.module.scss.js +0 -17
- package/components/inputs/Checkbox/CheckboxGroup.module.scss.js +0 -31
- package/components/inputs/DatePicker/CalendarPanel.module.scss.js +0 -41
- package/components/inputs/DatePicker/DatePicker.module.scss.js +0 -25
- package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +0 -37
- package/components/inputs/Input/Input.module.scss.js +0 -27
- package/components/inputs/NumberInput/NumberInput.module.scss.js +0 -25
- package/components/inputs/Radio/Radio.module.scss.js +0 -15
- package/components/inputs/SearchInput/SearchInput.module.scss.js +0 -13
- package/components/inputs/Select/Select.module.scss.js +0 -73
- package/components/inputs/Slider/Slider.module.scss.js +0 -15
- package/components/inputs/Textarea/Textarea.module.scss.js +0 -25
|
@@ -1,783 +1,823 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import o from "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
1
|
+
import e from "./Timeline.module.js";
|
|
2
|
+
import t from "./TraceTimeline.module.js";
|
|
3
|
+
import { TIMELINE_PALETTE_VARS as n, TL_COLORS as r, eventMatches as i, fmtClockUTC as a, fmtDateISO as o, fmtDur as s, fmtISO as ee, tickSubdiv as c, ticks as l, tint as u } from "./timelineCore.js";
|
|
4
|
+
import { layoutTraceBand as d, traceChipWidth as f } from "./traceLayout.js";
|
|
5
|
+
import { HighlightText as te, TimelineLegend as ne, TimelineResizer as p, TimelineSummary as m, TimelineTooltip as h, TimelineZoomControls as re } from "./TimelineShared.js";
|
|
6
|
+
import { CopyButton as g } from "../ActionButton/CopyButton.js";
|
|
7
|
+
import { EventBadge as ie, FieldRow as ae, TraceEventDetails as oe } from "./TraceEventDetails.js";
|
|
8
|
+
import { isRequestEvent as se, ridOf as _, routeOf as ce, srcOf as le, toText as v } from "./traceEvent.js";
|
|
9
|
+
import { animateScrollTo as ue, useContainerWidth as de, useNowTicker as fe, useTimelinePan as pe, useWheelZoom as me, wheelZoomAllowed as he } from "./useTimeline.js";
|
|
10
|
+
import { forwardRef as ge, useCallback as y, useEffect as _e, useLayoutEffect as ve, useMemo as ye, useRef as b, useState as x } from "react";
|
|
11
|
+
import S from "clsx";
|
|
12
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
13
|
+
// src/components/Timeline/TraceTimeline.tsx
|
|
14
|
+
var E = 84, be = 24, D = 400, xe = 51, Se = 300, Ce = ge(function(ge, Ce) {
|
|
15
|
+
let { events: O, title: we, meta: Te, highlight: Ee, defaultHighlight: De, onHighlightChange: Oe, showSearch: ke = !0, renderSearch: Ae, services: je, serviceColors: Me, compactRows: Ne = !1, showGridlines: Pe = !0, showControls: Fe = !0, wheelZoom: Ie = "ctrl", showLegend: Le = !0, showSummary: Re = !0, summaryPlacement: k = "bubble", summaryDefaultPosition: ze, showDock: A = !0, defaultDock: Be = null, showExtraFields: Ve = !0, hiddenFields: He, maxHeight: Ue = "80vh", minHeight: We = 420, selectedEventId: Ge, defaultSelectedEventId: Ke = null, onEventSelect: qe, renderChip: Je, renderTooltip: Ye, renderDetails: Xe, classes: j, className: Ze, style: Qe } = ge, M = b(null), [$e, et] = x(null), [tt, nt] = x(!0), [N, rt] = x(null), [it, at] = x(null), [P, ot] = x(null), [F, st] = x(null), [ct, lt] = x(null), [ut, dt] = x(null), ft = b(!1), [pt, mt] = x(Ke), I = Ge === void 0 ? pt : Ge, [L, ht] = x(() => A ? Be ?? ((Ge === void 0 ? Ke : Ge) == null ? null : "details") : null), [gt, _t] = x(360), [vt, yt] = x(420), bt = b(I);
|
|
16
|
+
_e(() => {
|
|
17
|
+
I != null && I !== bt.current && A && L == null && ht("details"), bt.current = I;
|
|
18
|
+
}, [
|
|
19
|
+
I,
|
|
20
|
+
A,
|
|
21
|
+
L
|
|
22
|
+
]);
|
|
23
|
+
let [xt, St] = x({
|
|
24
|
+
l: 0,
|
|
25
|
+
w: 0
|
|
26
|
+
}), Ct = b(Re);
|
|
27
|
+
Ct.current = Re;
|
|
28
|
+
let wt = y(() => {
|
|
29
|
+
let e = M.current;
|
|
30
|
+
e && St((t) => t.l === e.scrollLeft && t.w === e.clientWidth ? t : {
|
|
31
|
+
l: e.scrollLeft,
|
|
32
|
+
w: e.clientWidth
|
|
33
|
+
});
|
|
34
|
+
}, []);
|
|
35
|
+
_e(() => {
|
|
36
|
+
Re && wt();
|
|
37
|
+
});
|
|
38
|
+
let [R, Tt] = x({
|
|
39
|
+
l: 0,
|
|
40
|
+
w: 2e3
|
|
41
|
+
}), Et = b(R);
|
|
42
|
+
Et.current = R;
|
|
43
|
+
let Dt = y(() => {
|
|
44
|
+
let e = M.current;
|
|
45
|
+
if (!e) return;
|
|
46
|
+
let t = Math.floor(e.scrollLeft / D) * D, n = (Math.ceil((e.clientWidth || 1600) / D) + 1) * D;
|
|
47
|
+
(t !== Et.current.l || n !== Et.current.w) && Tt({
|
|
48
|
+
l: t,
|
|
49
|
+
w: n
|
|
50
|
+
});
|
|
51
|
+
}, []), Ot = O.some((e) => e.end == null), z = fe(Ot, 400), kt = de(M), B = pe(M), V = b(null), H = b(null), At = b(null), [jt, Mt] = x(null), U = b(null);
|
|
52
|
+
_e(() => () => {
|
|
53
|
+
U.current && clearTimeout(U.current);
|
|
54
|
+
}, []);
|
|
55
|
+
let [Nt, Pt] = x(De ?? ""), Ft = Ee === void 0 ? Nt : Ee, W = Ft.trim(), It = (e) => {
|
|
56
|
+
Ee === void 0 && Pt(e), Oe?.(e);
|
|
57
|
+
}, Lt = Ae ? Ae({
|
|
58
|
+
value: Ft,
|
|
59
|
+
setValue: It
|
|
60
|
+
}) : ke ? /* @__PURE__ */ w("input", {
|
|
61
|
+
className: S(e.searchInput, j?.search),
|
|
62
|
+
placeholder: "Highlight keyword in events…",
|
|
63
|
+
"aria-label": "Highlight keyword",
|
|
64
|
+
value: Ft,
|
|
65
|
+
onChange: (e) => It(e.target.value)
|
|
66
|
+
}) : null, G, K;
|
|
67
|
+
O.length ? (G = Math.min(...O.map((e) => e.start)), K = Math.max(G + 1e3, ...O.map((e) => e.end ?? z))) : (G = z - 3e4, K = z + 5e3);
|
|
68
|
+
let Rt = (K - G) * .03;
|
|
69
|
+
G -= Rt, K += Rt;
|
|
70
|
+
let zt = K - G, Bt = Math.max(240, kt - E - be), Vt = Math.max(Bt * .45, Bt - 210) / zt, q = tt || !$e ? Vt : $e, Ht = b(Vt), J = b(q), Ut = b(G), Wt = b(1e9);
|
|
71
|
+
Ht.current = Vt, J.current = q, Ut.current = G;
|
|
72
|
+
let Gt = b(null);
|
|
73
|
+
ve(() => {
|
|
74
|
+
Gt.current != null && M.current && (M.current.scrollLeft = Gt.current, Gt.current = null), Dt();
|
|
75
|
+
});
|
|
76
|
+
let Kt = y((e, t) => {
|
|
77
|
+
let n = M.current;
|
|
78
|
+
if (!n) return;
|
|
79
|
+
let r = J.current || .001, i = Math.max(Ht.current ? Ht.current * .2 : 1e-7, Math.min(10, r * e)), a = (n.scrollLeft + t - E) / r;
|
|
80
|
+
Gt.current = a * i + E - t, nt(!1), et(i);
|
|
81
|
+
}, []);
|
|
82
|
+
me(M, (e) => {
|
|
83
|
+
if (!he(Ie, e)) return;
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
let t = M.current;
|
|
86
|
+
t && Kt(Math.exp(-(e.deltaY || e.deltaX) * .0022), e.clientX - t.getBoundingClientRect().left);
|
|
87
|
+
});
|
|
88
|
+
let qt = b(null), Jt = y(() => {
|
|
89
|
+
qt.current ??= requestAnimationFrame(() => {
|
|
90
|
+
qt.current = null;
|
|
91
|
+
let e = M.current;
|
|
92
|
+
if (!e || !J.current) return;
|
|
93
|
+
let t = Ut.current + Math.max(0, e.scrollLeft + 117 - E) / J.current;
|
|
94
|
+
lt(o(t)), dt(ft.current ? a(t) : null), Dt(), Ct.current && wt();
|
|
95
|
+
});
|
|
96
|
+
}, [wt, Dt]), Yt = b(null), Xt = y((e) => {
|
|
97
|
+
let t = e.clientX;
|
|
98
|
+
Yt.current ??= requestAnimationFrame(() => {
|
|
99
|
+
Yt.current = null;
|
|
100
|
+
let e = M.current;
|
|
101
|
+
if (!e) return;
|
|
102
|
+
let n = e.getBoundingClientRect(), r = t - n.left + e.scrollLeft;
|
|
103
|
+
if (r < 89 || !J.current) {
|
|
104
|
+
ot(null);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
let i = Ut.current + (r - E) / J.current, a = Math.max(88, Math.min(Math.round(r), Wt.current - 88));
|
|
108
|
+
ot({
|
|
109
|
+
left: Math.round(r),
|
|
110
|
+
chipLeft: a,
|
|
111
|
+
label: ee(i, !0),
|
|
112
|
+
t: i
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
}, []), Zt = (e) => {
|
|
116
|
+
Ge === void 0 && mt(e ? e.id : null), qe?.(e);
|
|
117
|
+
}, Qt = ye(() => {
|
|
118
|
+
let e = [];
|
|
119
|
+
return (je || []).forEach((t) => {
|
|
120
|
+
O.some((e) => e.service === t) && e.push(t);
|
|
121
|
+
}), O.forEach((t) => {
|
|
122
|
+
e.includes(t.service) || e.push(t.service);
|
|
123
|
+
}), e;
|
|
124
|
+
}, [O, je]), Y = {};
|
|
125
|
+
Qt.forEach((e, t) => {
|
|
126
|
+
Y[e] = n[t % n.length];
|
|
127
|
+
}), Object.assign(Y, Me);
|
|
128
|
+
let $t = Ne, en = $t ? 20 : 26, tn = $t ? 60 : 66, nn = O.map((e) => ({
|
|
129
|
+
id: e.id,
|
|
130
|
+
left: Math.round(E + (e.start - G) * q),
|
|
131
|
+
width: Math.round(Math.max(12, ((e.end ?? z) - e.start) * q)),
|
|
132
|
+
labelW: f(le(e), e.service, String(_(e)))
|
|
133
|
+
})), rn = d(nn, {
|
|
134
|
+
barH: en,
|
|
135
|
+
rowH: tn,
|
|
136
|
+
chipH: xe,
|
|
137
|
+
minH: We
|
|
138
|
+
}), an = new Map(rn.items.map((e) => [e.id, e])), on = Math.ceil(Math.max(E + zt * q + be + 60, rn.maxExt + 26));
|
|
139
|
+
Wt.current = on;
|
|
140
|
+
let sn = G + (on - E) / q, X = Math.max(G, G + (R.l - D - E) / q), cn = Math.min(sn, G + (R.l + R.w + D - E) / q), Z = l(X, cn, Math.max(1, (cn - X) * q), 64), ln = Z.step < 1e3;
|
|
141
|
+
ft.current = ln;
|
|
142
|
+
let un = [], dn = Math.max(G, (Z.list.length ? Z.list[0].t : X) - Z.step), fn = o(dn), pn = a(dn);
|
|
143
|
+
Z.list.forEach((e) => {
|
|
144
|
+
let t = o(e.t), n = a(e.t);
|
|
145
|
+
un.push({
|
|
146
|
+
left: Math.round(E + (e.t - G) * q),
|
|
147
|
+
date: t === fn ? null : t,
|
|
148
|
+
time: !ln || n !== pn ? n : null,
|
|
149
|
+
sub: ln ? "." + String(new Date(e.t).getUTCMilliseconds()).padStart(3, "0") : null
|
|
150
|
+
}), fn = t, pn = n;
|
|
151
|
+
});
|
|
152
|
+
let mn = [], Q = c(Z.step);
|
|
153
|
+
if (Q.parts > 1) {
|
|
154
|
+
let e = Z.step / Q.parts;
|
|
155
|
+
if ((cn - X) / e < 2e3) for (let t = Math.ceil(X / e); t * e <= cn; t++) t % Q.parts !== 0 && mn.push({
|
|
156
|
+
left: Math.round(E + (t * e - G) * q),
|
|
157
|
+
medium: Q.medium > 0 && t % Q.parts === Q.medium
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
let hn = P ? P.t : null, $ = I == null ? null : O.find((e) => e.id === I) || null;
|
|
161
|
+
_e(() => {
|
|
162
|
+
let e = V.current;
|
|
163
|
+
if (e == null) return;
|
|
164
|
+
let t = M.current;
|
|
165
|
+
if (!t) {
|
|
166
|
+
V.current = null;
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (t.clientWidth && t.clientWidth !== kt) return;
|
|
170
|
+
V.current = null;
|
|
171
|
+
let n = an.get(e);
|
|
172
|
+
n && ue(t, { left: Math.max(0, n.left + n.width / 2 - t.clientWidth / 2) });
|
|
173
|
+
}), _e(() => {
|
|
174
|
+
let e = H.current;
|
|
175
|
+
if (e == null) return;
|
|
176
|
+
let t = At.current;
|
|
177
|
+
if (!t) return;
|
|
178
|
+
H.current = null;
|
|
179
|
+
let n = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/"/g, "\\\""), r = t.querySelector(`[data-crk-log-id="${n}"]`);
|
|
180
|
+
if (!r) return;
|
|
181
|
+
let i = Math.max(0, t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - 8);
|
|
182
|
+
ue(t, { top: i }, 600), Mt(e), U.current && clearTimeout(U.current), U.current = setTimeout(() => Mt(null), 1200);
|
|
183
|
+
});
|
|
184
|
+
let gn = (e, t) => {
|
|
185
|
+
let n = an.get(e.id);
|
|
186
|
+
if (!n) return;
|
|
187
|
+
let r = e.end == null, i = (e.end ?? z) - e.start;
|
|
188
|
+
if (st({
|
|
189
|
+
left: n.left,
|
|
190
|
+
chipLeft: Math.max(88, Math.min(n.left, Wt.current - 88)),
|
|
191
|
+
label: ee(e.start, !0)
|
|
192
|
+
}), at(e.id), I === e.id) return;
|
|
193
|
+
let a = M.current, o = a ? a.getBoundingClientRect() : { left: 0 }, c = a ? a.scrollLeft : 0, l = window.innerWidth || 1200, u = window.innerHeight || 800, d = n.showLabel ? n.labelW : 0, f = n.showLabel ? n.labelX : n.left, te = o.left - c + Math.min(n.left, f), ne = o.left - c + Math.max(n.left + n.width, f + d), p = t.currentTarget.getBoundingClientRect(), m = ne + 28, h = Math.max(95, Math.min(t.clientY, u - 120));
|
|
194
|
+
m + Se > l - 12 && (m = te - Se - 28), m < 12 && (m = Math.max(12, Math.min(l - Se - 12, t.clientX - Se / 2)), h = p.bottom + 108, h > u - 95 && (h = Math.max(95, p.top - 108)));
|
|
195
|
+
let re = se(e);
|
|
196
|
+
rt({
|
|
197
|
+
id: e.id,
|
|
198
|
+
x: m,
|
|
199
|
+
y: h,
|
|
200
|
+
rid: String(_(e)),
|
|
201
|
+
route: ce(e),
|
|
202
|
+
label: e.label || (re ? (e.method || "GET") + " " + (e.url ? e.url.replace(/^https?:\/\/[^/]+/, "") : e.id) : e.message || ""),
|
|
203
|
+
time: ee(e.start, !0),
|
|
204
|
+
durLine: r ? (re ? "in flight · " : "ongoing · ") + s(i) + " so far" : s(i) + (typeof e.status == "number" ? " · status " + e.status : e.level ? " · " + e.level : ""),
|
|
205
|
+
url: e.url || ""
|
|
206
|
+
});
|
|
207
|
+
}, _n = () => {
|
|
208
|
+
rt(null), st(null), at(null);
|
|
209
|
+
}, vn = $ ? $.end == null : !1, yn = A ? L === "details" : $ != null, bn = A && L === "log", xn = () => {
|
|
210
|
+
Zt(null), A && ht(null);
|
|
211
|
+
}, Sn = ye(() => O.slice().sort((e, t) => e.start - t.start), [O]), Cn = Re ? /* @__PURE__ */ w(m, {
|
|
212
|
+
className: j?.summary,
|
|
213
|
+
placement: k,
|
|
214
|
+
floatingDefaultPosition: ze,
|
|
215
|
+
bubbleGlyphColors: Qt.slice(0, 3).map((e) => Y[e]),
|
|
216
|
+
items: Sn.map((e, t) => {
|
|
217
|
+
let n = an.get(e.id);
|
|
218
|
+
return {
|
|
219
|
+
id: e.id,
|
|
220
|
+
number: String(t + 1).padStart(2, "0"),
|
|
221
|
+
label: String(_(e)),
|
|
222
|
+
color: Y[e.service] || r.body,
|
|
223
|
+
time: a(e.start),
|
|
224
|
+
inView: !n || !xt.w || n.left < xt.l + xt.w && n.left + n.width > xt.l,
|
|
225
|
+
selected: I === e.id
|
|
226
|
+
};
|
|
227
|
+
}),
|
|
228
|
+
onPick: (e) => {
|
|
229
|
+
let t = O.find((t) => t.id === e);
|
|
230
|
+
t && (Zt(t), L === "log" && (H.current = e)), V.current = e;
|
|
231
|
+
}
|
|
232
|
+
}) : null;
|
|
233
|
+
return /* @__PURE__ */ T("div", {
|
|
234
|
+
ref: Ce,
|
|
235
|
+
className: S(e.root, j?.root, Ze),
|
|
236
|
+
style: Qe,
|
|
237
|
+
children: [
|
|
238
|
+
(Fe || Lt || we != null || Te != null) && /* @__PURE__ */ T("div", {
|
|
239
|
+
className: S(e.toolbar, j?.toolbar),
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ T("div", {
|
|
242
|
+
className: e.toolbarText,
|
|
243
|
+
children: [we != null && /* @__PURE__ */ w("span", {
|
|
244
|
+
className: e.toolbarTitle,
|
|
245
|
+
children: we
|
|
246
|
+
}), /* @__PURE__ */ w("span", {
|
|
247
|
+
className: e.toolbarMeta,
|
|
248
|
+
children: Te ?? (O.length ? `${O.length} events · span ${s(zt - 2 * Rt)} · times in UTC` : "No events")
|
|
249
|
+
})]
|
|
250
|
+
}),
|
|
251
|
+
Lt,
|
|
252
|
+
Fe && /* @__PURE__ */ w(re, {
|
|
253
|
+
zoomPct: `${Math.round(q / Vt * 100)}%`,
|
|
254
|
+
fitActive: tt,
|
|
255
|
+
onZoomIn: () => Kt(1.5, kt / 2),
|
|
256
|
+
onZoomOut: () => Kt(1 / 1.5, kt / 2),
|
|
257
|
+
onFit: () => {
|
|
258
|
+
nt(!0), et(null);
|
|
259
|
+
},
|
|
260
|
+
hint: Ie === "none" ? "drag pans" : (Ie === "ctrl" ? "Ctrl+scroll zooms" : "scroll zooms") + " · drag pans"
|
|
261
|
+
})
|
|
262
|
+
]
|
|
263
|
+
}),
|
|
264
|
+
Le && /* @__PURE__ */ w(ne, {
|
|
265
|
+
className: j?.legend,
|
|
266
|
+
items: Qt.map((e) => ({
|
|
267
|
+
name: e,
|
|
268
|
+
color: Y[e]
|
|
269
|
+
}))
|
|
270
|
+
}),
|
|
271
|
+
k === "top" && Cn,
|
|
272
|
+
/* @__PURE__ */ T("div", {
|
|
273
|
+
className: e.layout,
|
|
274
|
+
children: [
|
|
275
|
+
k === "left" && Cn,
|
|
276
|
+
/* @__PURE__ */ T("div", {
|
|
277
|
+
className: e.main,
|
|
278
|
+
children: [/* @__PURE__ */ T("div", {
|
|
279
|
+
className: e.cardWrap,
|
|
280
|
+
children: [
|
|
281
|
+
/* @__PURE__ */ w("div", {
|
|
282
|
+
className: S(e.card, (yn || bn) && t.cardFlushRight, j?.card),
|
|
283
|
+
children: /* @__PURE__ */ w("div", {
|
|
284
|
+
ref: M,
|
|
285
|
+
className: S(e.scroller, t.scroller, j?.scroller),
|
|
286
|
+
style: { maxHeight: Ue },
|
|
287
|
+
onPointerDown: B.onPointerDown,
|
|
288
|
+
onPointerMove: B.onPointerMove,
|
|
289
|
+
onPointerUp: B.onPointerUp,
|
|
290
|
+
onPointerLeave: () => {
|
|
291
|
+
B.onPointerUp(), ot(null);
|
|
292
|
+
},
|
|
293
|
+
onMouseMove: Xt,
|
|
294
|
+
onScroll: Jt,
|
|
295
|
+
children: /* @__PURE__ */ T("div", {
|
|
296
|
+
className: t.inner,
|
|
297
|
+
style: { width: on },
|
|
298
|
+
children: [
|
|
299
|
+
Pe && un.map((e, n) => /* @__PURE__ */ w("div", {
|
|
300
|
+
className: t.gridline,
|
|
301
|
+
style: { left: e.left }
|
|
302
|
+
}, n)),
|
|
303
|
+
Ot && /* @__PURE__ */ w("div", {
|
|
304
|
+
className: t.nowLine,
|
|
305
|
+
style: { left: Math.round(E + (z - G) * q) }
|
|
306
|
+
}),
|
|
307
|
+
P && !N && /* @__PURE__ */ w("div", {
|
|
308
|
+
className: t.cursorLine,
|
|
309
|
+
style: { left: P.left }
|
|
310
|
+
}),
|
|
311
|
+
F && /* @__PURE__ */ w("div", {
|
|
312
|
+
className: t.eventLine,
|
|
313
|
+
style: { left: F.left }
|
|
314
|
+
}),
|
|
315
|
+
/* @__PURE__ */ T("div", {
|
|
316
|
+
className: S(t.axis, j?.axis),
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ w("div", { className: t.axisDivider }),
|
|
319
|
+
/* @__PURE__ */ T("div", {
|
|
320
|
+
className: t.axisSticky,
|
|
321
|
+
children: [
|
|
322
|
+
/* @__PURE__ */ w("span", {
|
|
323
|
+
className: t.axisUtc,
|
|
324
|
+
children: "UTC"
|
|
325
|
+
}),
|
|
326
|
+
/* @__PURE__ */ w("span", {
|
|
327
|
+
className: t.axisViewDate,
|
|
328
|
+
children: ct || (O.length ? o(G) : "")
|
|
329
|
+
}),
|
|
330
|
+
ln && /* @__PURE__ */ w("span", {
|
|
331
|
+
className: t.axisViewTime,
|
|
332
|
+
children: ut || a(G)
|
|
333
|
+
})
|
|
334
|
+
]
|
|
335
|
+
}),
|
|
336
|
+
un.map((e, n) => /* @__PURE__ */ T("span", { children: [
|
|
337
|
+
e.date && /* @__PURE__ */ w("span", {
|
|
338
|
+
className: t.axisDateLabel,
|
|
339
|
+
style: { left: e.left },
|
|
340
|
+
children: e.date
|
|
341
|
+
}),
|
|
342
|
+
e.time && /* @__PURE__ */ w("span", {
|
|
343
|
+
className: t.axisTickLabel,
|
|
344
|
+
style: { left: e.left },
|
|
345
|
+
children: e.time
|
|
346
|
+
}),
|
|
347
|
+
e.sub && /* @__PURE__ */ w("span", {
|
|
348
|
+
className: t.axisSubLabel,
|
|
349
|
+
style: { left: e.left },
|
|
350
|
+
children: e.sub
|
|
351
|
+
}),
|
|
352
|
+
/* @__PURE__ */ w("span", {
|
|
353
|
+
className: t.axisTickMark,
|
|
354
|
+
style: { left: e.left }
|
|
355
|
+
})
|
|
356
|
+
] }, n)),
|
|
357
|
+
mn.map((e, n) => /* @__PURE__ */ w("span", {
|
|
358
|
+
className: S(t.axisMinorMark, e.medium && t.axisMinorMedium),
|
|
359
|
+
style: { left: e.left }
|
|
360
|
+
}, n)),
|
|
361
|
+
P && !N && /* @__PURE__ */ w("div", {
|
|
362
|
+
className: t.axisChip,
|
|
363
|
+
style: { left: P.chipLeft },
|
|
364
|
+
children: P.label
|
|
365
|
+
}),
|
|
366
|
+
F && /* @__PURE__ */ T("div", {
|
|
367
|
+
className: S(t.axisChip, t.axisChipEvent),
|
|
368
|
+
style: { left: F.chipLeft },
|
|
369
|
+
children: ["▸ ", F.label]
|
|
370
|
+
})
|
|
371
|
+
]
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ T("div", {
|
|
374
|
+
className: t.lane,
|
|
375
|
+
style: { height: rn.h },
|
|
376
|
+
children: [/* @__PURE__ */ w("div", {
|
|
377
|
+
className: t.axisLine,
|
|
378
|
+
style: { top: rn.axisY }
|
|
379
|
+
}), O.map((n) => {
|
|
380
|
+
let a = an.get(n.id);
|
|
381
|
+
if (!a) return null;
|
|
382
|
+
let o = Y[n.service] || r.body, s = n.end == null, c = i(n, W, He), l = hn != null && hn >= n.start && hn <= (n.end ?? z), d = it === n.id, f = W && !c ? .25 : 1, ne = String(_(n)), p = le(n), m = Y[p] || r.body, h = Y[n.service] || r.body, re = d ? `0 0 0 3px ${u(o, 55)}, 0 4px 14px rgba(35,32,28,.22)` : W && c ? `0 0 0 3px ${r.hlRing}` : I === n.id ? `0 0 0 3px ${r.selectedRing}` : l ? `0 0 0 3px ${u(o, 30)}` : "none", g = d ? o : l ? r.stemHot : r.stem, ie = {
|
|
383
|
+
onClick: () => {
|
|
384
|
+
if (B.wasDragSuppressed()) return;
|
|
385
|
+
rt(null);
|
|
386
|
+
let e = I === n.id ? null : n;
|
|
387
|
+
Zt(e), e && L === "log" && (H.current = e.id);
|
|
388
|
+
},
|
|
389
|
+
onMouseEnter: (e) => gn(n, e),
|
|
390
|
+
onMouseLeave: _n
|
|
391
|
+
};
|
|
392
|
+
return /* @__PURE__ */ T("span", { children: [a.showLabel && /* @__PURE__ */ T(C, { children: [
|
|
393
|
+
a.conn && !a.hconn && /* @__PURE__ */ w("div", {
|
|
394
|
+
className: t.stem,
|
|
395
|
+
style: {
|
|
396
|
+
left: a.left,
|
|
397
|
+
top: a.connTop,
|
|
398
|
+
height: a.connH,
|
|
399
|
+
background: g
|
|
400
|
+
}
|
|
401
|
+
}),
|
|
402
|
+
a.conn && a.hconn && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
|
|
403
|
+
className: t.stem,
|
|
404
|
+
style: {
|
|
405
|
+
left: a.left,
|
|
406
|
+
top: a.connTop,
|
|
407
|
+
height: a.connH,
|
|
408
|
+
background: g
|
|
409
|
+
}
|
|
410
|
+
}), /* @__PURE__ */ w("div", {
|
|
411
|
+
className: t.elbow,
|
|
412
|
+
style: {
|
|
413
|
+
left: a.hconnLeft,
|
|
414
|
+
top: a.hconnTop,
|
|
415
|
+
width: a.hconnW,
|
|
416
|
+
background: g
|
|
417
|
+
}
|
|
418
|
+
})] }),
|
|
419
|
+
/* @__PURE__ */ w("div", {
|
|
420
|
+
...ie,
|
|
421
|
+
className: S(t.chip, j?.chip),
|
|
422
|
+
style: {
|
|
423
|
+
left: a.labelX,
|
|
424
|
+
top: a.labelTop,
|
|
425
|
+
opacity: f,
|
|
426
|
+
background: d ? u(o, 7) : W && c ? r.hlWashSoft : void 0,
|
|
427
|
+
borderColor: d ? o : W && c ? r.hlBorder : l ? o : void 0,
|
|
428
|
+
boxShadow: d ? `0 0 0 2px ${u(o, 40)}, 0 4px 12px rgba(35,32,28,.16)` : "0 1px 2px rgba(35,32,28,.06)"
|
|
429
|
+
},
|
|
430
|
+
children: Je ? Je(n, {
|
|
431
|
+
color: o,
|
|
432
|
+
pending: s,
|
|
433
|
+
durationMs: (n.end ?? z) - n.start
|
|
434
|
+
}) : /* @__PURE__ */ T(C, { children: [
|
|
435
|
+
/* @__PURE__ */ T("div", { children: [p && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", {
|
|
436
|
+
className: t.chipBadge,
|
|
437
|
+
style: {
|
|
438
|
+
background: u(m, 14),
|
|
439
|
+
color: m
|
|
440
|
+
},
|
|
441
|
+
children: p
|
|
442
|
+
}), /* @__PURE__ */ w("span", {
|
|
443
|
+
className: t.chipArrow,
|
|
444
|
+
children: " → "
|
|
445
|
+
})] }), /* @__PURE__ */ w("span", {
|
|
446
|
+
className: t.chipBadge,
|
|
447
|
+
style: {
|
|
448
|
+
background: u(h, 14),
|
|
449
|
+
color: h
|
|
450
|
+
},
|
|
451
|
+
children: n.service
|
|
452
|
+
})] }),
|
|
453
|
+
/* @__PURE__ */ w("div", {
|
|
454
|
+
className: t.chipOp,
|
|
455
|
+
children: /* @__PURE__ */ w(te, {
|
|
456
|
+
text: ne,
|
|
457
|
+
query: W
|
|
458
|
+
})
|
|
459
|
+
}),
|
|
460
|
+
/* @__PURE__ */ w("div", {
|
|
461
|
+
className: t.chipTime,
|
|
462
|
+
children: ee(n.start, !0)
|
|
463
|
+
})
|
|
464
|
+
] })
|
|
465
|
+
})
|
|
466
|
+
] }), /* @__PURE__ */ w("div", {
|
|
467
|
+
...ie,
|
|
468
|
+
className: S(t.bar, s && t.barPending, j?.bar),
|
|
469
|
+
style: {
|
|
470
|
+
left: a.left,
|
|
471
|
+
top: a.barTop,
|
|
472
|
+
width: a.width,
|
|
473
|
+
height: en,
|
|
474
|
+
background: W && c ? r.hlBarBg : u(o, 22),
|
|
475
|
+
borderColor: o,
|
|
476
|
+
opacity: f,
|
|
477
|
+
boxShadow: re
|
|
478
|
+
},
|
|
479
|
+
children: s && /* @__PURE__ */ w("span", {
|
|
480
|
+
className: S(e.pulseDot, t.barDot),
|
|
481
|
+
style: { background: o }
|
|
482
|
+
})
|
|
483
|
+
})] }, n.id);
|
|
484
|
+
})]
|
|
485
|
+
})
|
|
486
|
+
]
|
|
487
|
+
})
|
|
488
|
+
})
|
|
489
|
+
}),
|
|
490
|
+
yn && $ && Xe && /* @__PURE__ */ T("div", {
|
|
491
|
+
className: t.dockCol,
|
|
492
|
+
style: { flexBasis: gt },
|
|
493
|
+
children: [/* @__PURE__ */ w(p, {
|
|
494
|
+
panel: "right",
|
|
495
|
+
width: gt,
|
|
496
|
+
min: 280,
|
|
497
|
+
max: 640,
|
|
498
|
+
onResize: _t,
|
|
499
|
+
label: "Resize details drawer",
|
|
500
|
+
className: t.dockColResizer
|
|
501
|
+
}), /* @__PURE__ */ w("aside", {
|
|
502
|
+
className: S(e.aside, t.drawerCustom, j?.drawer),
|
|
503
|
+
children: Xe($, {
|
|
504
|
+
close: xn,
|
|
505
|
+
pending: vn
|
|
506
|
+
})
|
|
507
|
+
})]
|
|
508
|
+
}),
|
|
509
|
+
yn && !($ && Xe) && /* @__PURE__ */ T("div", {
|
|
510
|
+
className: t.dockCol,
|
|
511
|
+
style: { flexBasis: gt },
|
|
512
|
+
children: [/* @__PURE__ */ w(p, {
|
|
513
|
+
panel: "right",
|
|
514
|
+
width: gt,
|
|
515
|
+
min: 280,
|
|
516
|
+
max: 640,
|
|
517
|
+
onResize: _t,
|
|
518
|
+
label: "Resize details drawer",
|
|
519
|
+
className: t.dockColResizer
|
|
520
|
+
}), /* @__PURE__ */ T("aside", {
|
|
521
|
+
className: S(e.aside, A && t.dockAside, j?.drawer),
|
|
522
|
+
children: [A && /* @__PURE__ */ T("div", {
|
|
523
|
+
className: t.dockHead,
|
|
524
|
+
children: [
|
|
525
|
+
/* @__PURE__ */ w("span", {
|
|
526
|
+
className: t.dockTitle,
|
|
527
|
+
children: "Event details"
|
|
528
|
+
}),
|
|
529
|
+
/* @__PURE__ */ w("div", { className: t.drawerSpacer }),
|
|
530
|
+
/* @__PURE__ */ w("button", {
|
|
531
|
+
type: "button",
|
|
532
|
+
className: e.asideClose,
|
|
533
|
+
"aria-label": "Close details",
|
|
534
|
+
onClick: xn,
|
|
535
|
+
children: "✕"
|
|
536
|
+
})
|
|
537
|
+
]
|
|
538
|
+
}), $ ? /* @__PURE__ */ w(oe, {
|
|
539
|
+
event: $,
|
|
540
|
+
now: z,
|
|
541
|
+
highlight: W,
|
|
542
|
+
showExtraFields: Ve,
|
|
543
|
+
hiddenFields: He,
|
|
544
|
+
onClose: A ? void 0 : xn,
|
|
545
|
+
className: A ? t.dockScroll : void 0
|
|
546
|
+
}) : /* @__PURE__ */ w("div", {
|
|
547
|
+
className: t.dockEmpty,
|
|
548
|
+
children: "Click an event on the timeline to inspect it."
|
|
549
|
+
})]
|
|
550
|
+
})]
|
|
551
|
+
}),
|
|
552
|
+
bn && /* @__PURE__ */ T("div", {
|
|
553
|
+
className: t.dockCol,
|
|
554
|
+
style: { flexBasis: vt },
|
|
555
|
+
children: [/* @__PURE__ */ w(p, {
|
|
556
|
+
panel: "right",
|
|
557
|
+
width: vt,
|
|
558
|
+
min: 320,
|
|
559
|
+
max: 680,
|
|
560
|
+
onResize: yt,
|
|
561
|
+
label: "Resize log drawer",
|
|
562
|
+
className: t.dockColResizer
|
|
563
|
+
}), /* @__PURE__ */ T("aside", {
|
|
564
|
+
className: S(e.aside, t.dockAside, j?.log),
|
|
565
|
+
children: [/* @__PURE__ */ T("div", {
|
|
566
|
+
className: t.dockHead,
|
|
567
|
+
children: [
|
|
568
|
+
/* @__PURE__ */ w("span", {
|
|
569
|
+
className: t.dockTitle,
|
|
570
|
+
children: "Full log"
|
|
571
|
+
}),
|
|
572
|
+
/* @__PURE__ */ T("span", {
|
|
573
|
+
className: t.dockCount,
|
|
574
|
+
children: [O.length, " events"]
|
|
575
|
+
}),
|
|
576
|
+
/* @__PURE__ */ w("div", { className: t.drawerSpacer }),
|
|
577
|
+
/* @__PURE__ */ w("button", {
|
|
578
|
+
type: "button",
|
|
579
|
+
className: e.asideClose,
|
|
580
|
+
"aria-label": "Close full log",
|
|
581
|
+
onClick: () => ht(null),
|
|
582
|
+
children: "✕"
|
|
583
|
+
})
|
|
584
|
+
]
|
|
585
|
+
}), /* @__PURE__ */ w("div", {
|
|
586
|
+
ref: At,
|
|
587
|
+
className: S(t.dockScroll, t.logBody),
|
|
588
|
+
children: Sn.map((n, r) => {
|
|
589
|
+
let i = n.end == null, o = n.url ? n.url.replace(/^https?:\/\/[^/]+/, "") : "", s = se(n);
|
|
590
|
+
return /* @__PURE__ */ T("div", {
|
|
591
|
+
"data-crk-log-id": n.id,
|
|
592
|
+
className: S(t.logEntry, I === n.id && t.logEntrySelected, jt === n.id && t.logEntryFlash),
|
|
593
|
+
onClick: () => {
|
|
594
|
+
Zt(n), V.current = n.id;
|
|
595
|
+
},
|
|
596
|
+
children: [
|
|
597
|
+
/* @__PURE__ */ T("div", {
|
|
598
|
+
className: t.logTop,
|
|
599
|
+
children: [
|
|
600
|
+
/* @__PURE__ */ w("span", {
|
|
601
|
+
className: t.logNum,
|
|
602
|
+
children: String(r + 1).padStart(2, "0")
|
|
603
|
+
}),
|
|
604
|
+
n.method && /* @__PURE__ */ w("span", {
|
|
605
|
+
className: S(t.methodBadge, t.badgeSm),
|
|
606
|
+
children: n.method
|
|
607
|
+
}),
|
|
608
|
+
/* @__PURE__ */ w(ie, {
|
|
609
|
+
event: n,
|
|
610
|
+
pending: i,
|
|
611
|
+
small: !0
|
|
612
|
+
}),
|
|
613
|
+
/* @__PURE__ */ w("span", {
|
|
614
|
+
className: t.logPair,
|
|
615
|
+
children: ce(n)
|
|
616
|
+
}),
|
|
617
|
+
/* @__PURE__ */ w("div", { className: t.drawerSpacer }),
|
|
618
|
+
/* @__PURE__ */ w("span", {
|
|
619
|
+
className: t.logClock,
|
|
620
|
+
children: a(n.start)
|
|
621
|
+
})
|
|
622
|
+
]
|
|
623
|
+
}),
|
|
624
|
+
/* @__PURE__ */ w("div", {
|
|
625
|
+
className: t.logOp,
|
|
626
|
+
children: /* @__PURE__ */ w(te, {
|
|
627
|
+
text: String(_(n)),
|
|
628
|
+
query: W
|
|
629
|
+
})
|
|
630
|
+
}),
|
|
631
|
+
o && /* @__PURE__ */ w("div", {
|
|
632
|
+
className: t.logPath,
|
|
633
|
+
children: o
|
|
634
|
+
}),
|
|
635
|
+
n.message && /* @__PURE__ */ w("div", {
|
|
636
|
+
className: t.logMessage,
|
|
637
|
+
children: /* @__PURE__ */ w(te, {
|
|
638
|
+
text: n.message,
|
|
639
|
+
query: W
|
|
640
|
+
})
|
|
641
|
+
}),
|
|
642
|
+
!!n.details?.length && /* @__PURE__ */ w("div", {
|
|
643
|
+
className: S(t.fieldList, t.logFields),
|
|
644
|
+
onClick: (e) => e.stopPropagation(),
|
|
645
|
+
children: n.details.map((e, t) => /* @__PURE__ */ w(ae, {
|
|
646
|
+
field: e,
|
|
647
|
+
query: W
|
|
648
|
+
}, e.label + t))
|
|
649
|
+
}),
|
|
650
|
+
n.payload != null && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("div", {
|
|
651
|
+
className: t.logPayloadHead,
|
|
652
|
+
children: [/* @__PURE__ */ w("span", {
|
|
653
|
+
className: t.logPayloadLabel,
|
|
654
|
+
children: "Payload"
|
|
655
|
+
}), /* @__PURE__ */ w("span", {
|
|
656
|
+
className: t.copyStop,
|
|
657
|
+
onClick: (e) => e.stopPropagation(),
|
|
658
|
+
children: /* @__PURE__ */ w(g, {
|
|
659
|
+
size: "sm",
|
|
660
|
+
className: t.payloadCopy,
|
|
661
|
+
value: () => v(n.payload),
|
|
662
|
+
"aria-label": "Copy payload"
|
|
663
|
+
})
|
|
664
|
+
})]
|
|
665
|
+
}), /* @__PURE__ */ w("pre", {
|
|
666
|
+
className: S(e.asideRaw, t.logPre),
|
|
667
|
+
children: v(n.payload)
|
|
668
|
+
})] }),
|
|
669
|
+
s && /* @__PURE__ */ T(C, { children: [
|
|
670
|
+
/* @__PURE__ */ T("div", {
|
|
671
|
+
className: t.logPayloadHead,
|
|
672
|
+
children: [/* @__PURE__ */ w("span", {
|
|
673
|
+
className: t.logPayloadLabel,
|
|
674
|
+
children: "Request"
|
|
675
|
+
}), n.reqBody != null && /* @__PURE__ */ w("span", {
|
|
676
|
+
className: t.copyStop,
|
|
677
|
+
onClick: (e) => e.stopPropagation(),
|
|
678
|
+
children: /* @__PURE__ */ w(g, {
|
|
679
|
+
size: "sm",
|
|
680
|
+
className: t.payloadCopy,
|
|
681
|
+
value: () => v(n.reqBody),
|
|
682
|
+
"aria-label": "Copy request payload"
|
|
683
|
+
})
|
|
684
|
+
})]
|
|
685
|
+
}),
|
|
686
|
+
/* @__PURE__ */ w("pre", {
|
|
687
|
+
className: S(e.asideRaw, t.logPre),
|
|
688
|
+
children: n.reqBody == null ? "(empty)" : v(n.reqBody)
|
|
689
|
+
}),
|
|
690
|
+
/* @__PURE__ */ T("div", {
|
|
691
|
+
className: t.logPayloadHead,
|
|
692
|
+
children: [/* @__PURE__ */ w("span", {
|
|
693
|
+
className: t.logPayloadLabel,
|
|
694
|
+
children: "Response"
|
|
695
|
+
}), !i && n.resBody != null && /* @__PURE__ */ w("span", {
|
|
696
|
+
className: t.copyStop,
|
|
697
|
+
onClick: (e) => e.stopPropagation(),
|
|
698
|
+
children: /* @__PURE__ */ w(g, {
|
|
699
|
+
size: "sm",
|
|
700
|
+
className: t.payloadCopy,
|
|
701
|
+
value: () => v(n.resBody),
|
|
702
|
+
"aria-label": "Copy response payload"
|
|
703
|
+
})
|
|
704
|
+
})]
|
|
705
|
+
}),
|
|
706
|
+
i ? /* @__PURE__ */ T("div", {
|
|
707
|
+
className: t.awaiting,
|
|
708
|
+
children: [/* @__PURE__ */ w("span", { className: S(e.pulseDot, t.awaitingDot) }), "Awaiting response…"]
|
|
709
|
+
}) : /* @__PURE__ */ w("pre", {
|
|
710
|
+
className: S(e.asideRaw, t.logPre),
|
|
711
|
+
children: n.resBody == null ? "(empty)" : v(n.resBody)
|
|
712
|
+
})
|
|
713
|
+
] }),
|
|
714
|
+
!s && i && /* @__PURE__ */ T("div", {
|
|
715
|
+
className: t.awaiting,
|
|
716
|
+
children: [/* @__PURE__ */ w("span", { className: S(e.pulseDot, t.awaitingDot) }), "Still ongoing…"]
|
|
717
|
+
})
|
|
718
|
+
]
|
|
719
|
+
}, n.id);
|
|
720
|
+
})
|
|
721
|
+
})]
|
|
722
|
+
})]
|
|
723
|
+
}),
|
|
724
|
+
k === "bubble" && Cn
|
|
725
|
+
]
|
|
726
|
+
}), /* @__PURE__ */ w("div", {
|
|
727
|
+
className: S(e.footnote, j?.footnote),
|
|
728
|
+
children: "Click an event to open its details in the side panel · dashed pills are still in flight"
|
|
729
|
+
})]
|
|
730
|
+
}),
|
|
731
|
+
(k === "right" || k === "floating") && Cn,
|
|
732
|
+
A && /* @__PURE__ */ T("div", {
|
|
733
|
+
className: S(t.rail, j?.rail),
|
|
734
|
+
children: [/* @__PURE__ */ w("button", {
|
|
735
|
+
type: "button",
|
|
736
|
+
title: "Event details",
|
|
737
|
+
"aria-label": "Toggle event details drawer",
|
|
738
|
+
"aria-pressed": L === "details",
|
|
739
|
+
className: S(t.railBtn, L === "details" && t.railBtnActive),
|
|
740
|
+
onClick: () => ht(L === "details" ? null : "details"),
|
|
741
|
+
children: /* @__PURE__ */ T("span", {
|
|
742
|
+
className: t.railGlyphDetails,
|
|
743
|
+
"aria-hidden": !0,
|
|
744
|
+
children: [
|
|
745
|
+
/* @__PURE__ */ w("span", {}),
|
|
746
|
+
/* @__PURE__ */ w("span", {}),
|
|
747
|
+
/* @__PURE__ */ w("span", {})
|
|
748
|
+
]
|
|
749
|
+
})
|
|
750
|
+
}), /* @__PURE__ */ w("button", {
|
|
751
|
+
type: "button",
|
|
752
|
+
title: "Full log",
|
|
753
|
+
"aria-label": "Toggle full log drawer",
|
|
754
|
+
"aria-pressed": L === "log",
|
|
755
|
+
className: S(t.railBtn, L === "log" && t.railBtnActive),
|
|
756
|
+
onClick: () => {
|
|
757
|
+
let e = L === "log" ? null : "log";
|
|
758
|
+
e === "log" && I != null && (H.current = I), ht(e);
|
|
759
|
+
},
|
|
760
|
+
children: /* @__PURE__ */ T("span", {
|
|
761
|
+
className: t.railGlyphLog,
|
|
762
|
+
"aria-hidden": !0,
|
|
763
|
+
children: [
|
|
764
|
+
/* @__PURE__ */ w("span", {}),
|
|
765
|
+
/* @__PURE__ */ w("span", {}),
|
|
766
|
+
/* @__PURE__ */ w("span", {})
|
|
767
|
+
]
|
|
768
|
+
})
|
|
769
|
+
})]
|
|
770
|
+
})
|
|
771
|
+
]
|
|
772
|
+
}),
|
|
773
|
+
k === "bottom" && Cn,
|
|
774
|
+
N && (() => {
|
|
775
|
+
let t = O.find((e) => e.id === N.id), n = t && Ye ? Ye(t, {
|
|
776
|
+
color: Y[t.service] || r.body,
|
|
777
|
+
pending: t.end == null,
|
|
778
|
+
durationMs: (t.end ?? z) - t.start
|
|
779
|
+
}) : void 0;
|
|
780
|
+
return Ye && n == null ? null : /* @__PURE__ */ w(h, {
|
|
781
|
+
x: N.x,
|
|
782
|
+
y: N.y,
|
|
783
|
+
className: j?.tooltip,
|
|
784
|
+
children: n === void 0 ? /* @__PURE__ */ T(C, { children: [
|
|
785
|
+
/* @__PURE__ */ w("div", {
|
|
786
|
+
className: S(e.tooltipTitle, e.tooltipMono),
|
|
787
|
+
children: N.rid
|
|
788
|
+
}),
|
|
789
|
+
/* @__PURE__ */ w("div", {
|
|
790
|
+
className: e.tooltipLine,
|
|
791
|
+
style: { marginTop: 4 },
|
|
792
|
+
children: N.route
|
|
793
|
+
}),
|
|
794
|
+
N.label && /* @__PURE__ */ w("div", {
|
|
795
|
+
className: S(e.tooltipLine, e.tooltipMono),
|
|
796
|
+
style: { marginTop: 2 },
|
|
797
|
+
children: N.label
|
|
798
|
+
}),
|
|
799
|
+
/* @__PURE__ */ w("div", {
|
|
800
|
+
className: e.tooltipLine,
|
|
801
|
+
style: { marginTop: 4 },
|
|
802
|
+
children: N.time
|
|
803
|
+
}),
|
|
804
|
+
/* @__PURE__ */ w("div", {
|
|
805
|
+
className: e.tooltipLine,
|
|
806
|
+
children: N.durLine
|
|
807
|
+
}),
|
|
808
|
+
N.url && /* @__PURE__ */ w("div", {
|
|
809
|
+
className: S(e.tooltipDim, e.tooltipMono),
|
|
810
|
+
style: {
|
|
811
|
+
marginTop: 4,
|
|
812
|
+
wordBreak: "break-all",
|
|
813
|
+
fontSize: "10.5px"
|
|
814
|
+
},
|
|
815
|
+
children: N.url
|
|
816
|
+
})
|
|
817
|
+
] }) : n
|
|
818
|
+
});
|
|
819
|
+
})()
|
|
820
|
+
]
|
|
821
|
+
});
|
|
822
|
+
});
|
|
823
|
+
export { Ce as TraceTimeline };
|