@vuer-ai/vuer-uikit 0.0.97 → 0.0.98
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/README.md +106 -7
- package/cli/dial-cli.js +49 -7
- package/dist/SyncScroll/SyncScroll.cjs +9 -9
- package/dist/SyncScroll/SyncScroll.mjs +2 -2
- package/dist/SyncScroll/index.cjs +9 -9
- package/dist/SyncScroll/index.mjs +2 -2
- package/dist/chunk-4KWGGESI.cjs +494 -0
- package/dist/{chunk-6YDZA2RP.cjs → chunk-7GWDO25E.cjs} +1 -1
- package/dist/chunk-A5LCX2UQ.cjs +208 -0
- package/dist/chunk-BEJIZ56L.mjs +300 -0
- package/dist/chunk-C7VGRU3O.mjs +283 -0
- package/dist/chunk-LJMNHTTG.cjs +679 -0
- package/dist/chunk-O66RESRR.cjs +285 -0
- package/dist/{chunk-JBHXGZUF.mjs → chunk-TTYSYGVE.mjs} +1 -1
- package/dist/chunk-VA3PEYFM.mjs +489 -0
- package/dist/chunk-VBBJSIY7.cjs +308 -0
- package/dist/chunk-W4JCKCW7.mjs +661 -0
- package/dist/chunk-WWGF6TBZ.mjs +206 -0
- package/dist/dial/DialPanel.cjs +11 -11
- package/dist/dial/DialPanel.mjs +10 -10
- package/dist/dial/index.cjs +27 -27
- package/dist/dial/index.mjs +10 -10
- package/dist/dial/wrapped-inputs/ControlledInputs.cjs +14 -14
- package/dist/dial/wrapped-inputs/ControlledInputs.mjs +10 -10
- package/dist/dial/wrapped-inputs/DialInputs.cjs +21 -21
- package/dist/dial/wrapped-inputs/DialInputs.mjs +10 -10
- package/dist/dial/wrapped-inputs/DialVectorInput.cjs +11 -11
- package/dist/dial/wrapped-inputs/DialVectorInput.mjs +10 -10
- package/dist/dial/wrapped-inputs/index.cjs +26 -26
- package/dist/dial/wrapped-inputs/index.mjs +10 -10
- package/dist/highlight-cursor/cursor-provider.cjs +3 -3
- package/dist/highlight-cursor/cursor-provider.mjs +2 -2
- package/dist/highlight-cursor/enhanced-components.cjs +1 -1
- package/dist/highlight-cursor/enhanced-components.mjs +1 -1
- package/dist/highlight-cursor/index.cjs +3 -3
- package/dist/highlight-cursor/index.mjs +2 -2
- package/dist/index.cjs +86 -86
- package/dist/index.mjs +10 -10
- package/dist/ui/UIKitBadge.cjs +5 -5
- package/dist/ui/UIKitBadge.mjs +1 -1
- package/dist/ui/badge.d.cts +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/index.cjs +12 -12
- package/dist/ui/index.mjs +6 -6
- package/dist/ui/inputs/input.d.cts +1 -1
- package/dist/ui/inputs/input.d.ts +1 -1
- package/dist/ui/select.d.cts +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/textarea.d.cts +1 -1
- package/dist/ui/textarea.d.ts +1 -1
- package/dist/ui/tree-view-legacy.cjs +8 -8
- package/dist/ui/tree-view-legacy.mjs +4 -4
- package/dist/ui/waterfall/index.cjs +5 -5
- package/dist/ui/waterfall/index.mjs +4 -4
- package/package.json +1 -1
- package/src/cli/dial-cli.ts +64 -8
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { useTimelineState } from './chunk-JWKOW2OV.mjs';
|
|
2
|
+
import { useViewport } from './chunk-VPQ5SSY3.mjs';
|
|
3
|
+
import { TimeRuleEventDot } from './chunk-OC4HRPZU.mjs';
|
|
4
|
+
import { TimelineEvent } from './chunk-N6DSPSMM.mjs';
|
|
5
|
+
import { TimelineProcessBar } from './chunk-CO6EASQO.mjs';
|
|
6
|
+
import { LeftWedge, RightWedge } from './chunk-IR334P7F.mjs';
|
|
7
|
+
import { WheelZoomContext } from './chunk-CIPI2V54.mjs';
|
|
8
|
+
import { TreeSearchBar } from './chunk-73VF2W3D.mjs';
|
|
9
|
+
import { TreeView } from './chunk-VQPJ7TLB.mjs';
|
|
10
|
+
import { useTreeState, useTreeSearch } from './chunk-PC5DHSC4.mjs';
|
|
11
|
+
import { CursorOverlay } from './chunk-SA5WKLYB.mjs';
|
|
12
|
+
import { NavigationControls } from './chunk-5EXV5EWF.mjs';
|
|
13
|
+
import { rightWedgeClasses, leftWedgeClasses, TOTAL_DURATION } from './chunk-4U232QAX.mjs';
|
|
14
|
+
import { Tick } from './chunk-K22BEXUA.mjs';
|
|
15
|
+
import { TooltipProvider } from './chunk-ZNPI2TYG.mjs';
|
|
16
|
+
import { SyncScroll, SyncDragY, SyncScrollSlave } from './chunk-BEJIZ56L.mjs';
|
|
17
|
+
import { SyncScrollProvider } from './chunk-SAGQV2YZ.mjs';
|
|
18
|
+
import { cn } from './chunk-HMN4IKTG.mjs';
|
|
19
|
+
import { useState, useEffect } from 'react';
|
|
20
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
21
|
+
|
|
22
|
+
function Waterfall({
|
|
23
|
+
logData,
|
|
24
|
+
temporalCursor,
|
|
25
|
+
onTemporalCursorChange,
|
|
26
|
+
getIcon,
|
|
27
|
+
panelWidth = 300,
|
|
28
|
+
className,
|
|
29
|
+
hoveredId: externalHoveredId,
|
|
30
|
+
onItemHover: externalOnItemHover,
|
|
31
|
+
minWindow = 0.01,
|
|
32
|
+
maxWindow,
|
|
33
|
+
zoomFactor = 1.1,
|
|
34
|
+
enabled = true,
|
|
35
|
+
children
|
|
36
|
+
}) {
|
|
37
|
+
const [visibleLogData, setVisibleLogData] = useState([]);
|
|
38
|
+
const [temporalMarkers, setTemporalMarkers] = useState([]);
|
|
39
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
40
|
+
const [isCaseSensitive, setIsCaseSensitive] = useState(false);
|
|
41
|
+
const [isRegex, setIsRegex] = useState(false);
|
|
42
|
+
const internalTimelineState = useTimelineState(logData);
|
|
43
|
+
const hoveredId = externalHoveredId ?? internalTimelineState.hoveredId;
|
|
44
|
+
const setHoveredId = externalOnItemHover ?? internalTimelineState.setHoveredId;
|
|
45
|
+
const { visibleData, expandedItems, toggleItem, hasDescendants, dataWithMeta } = useTreeState({
|
|
46
|
+
data: logData,
|
|
47
|
+
defaultExpanded: true
|
|
48
|
+
});
|
|
49
|
+
const { filteredData, searchResultsCount, isRegexValid, renderLabel, hasActiveSearch } = useTreeSearch({
|
|
50
|
+
data: logData,
|
|
51
|
+
searchQuery,
|
|
52
|
+
isCaseSensitive,
|
|
53
|
+
isRegex
|
|
54
|
+
});
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const dataToUse = hasActiveSearch ? dataWithMeta.filter((item) => filteredData.some((f) => f.id === item.id)) : visibleData;
|
|
57
|
+
setVisibleLogData(dataToUse);
|
|
58
|
+
}, [filteredData, visibleData, dataWithMeta, hasActiveSearch]);
|
|
59
|
+
const {
|
|
60
|
+
viewStart,
|
|
61
|
+
viewDuration,
|
|
62
|
+
timelineContainerRef,
|
|
63
|
+
timeToPercent,
|
|
64
|
+
ticks,
|
|
65
|
+
eventDots,
|
|
66
|
+
handlePan,
|
|
67
|
+
handleZoomDragStart,
|
|
68
|
+
setViewStart,
|
|
69
|
+
setViewDuration,
|
|
70
|
+
cursorVisible,
|
|
71
|
+
cursorPosition,
|
|
72
|
+
cursorLabel,
|
|
73
|
+
showMagnet
|
|
74
|
+
} = useViewport({
|
|
75
|
+
visibleLogData,
|
|
76
|
+
onTemporalCursorChange,
|
|
77
|
+
temporalCursor
|
|
78
|
+
});
|
|
79
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(SyncScrollProvider, { children: /* @__PURE__ */ jsx(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
className: cn(
|
|
83
|
+
"bg-bg-primary text-text-primary rounded-uk-md border-line-primary/50",
|
|
84
|
+
"mx-auto flex w-full flex-col overflow-hidden border font-sans",
|
|
85
|
+
"shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
|
|
86
|
+
className
|
|
87
|
+
),
|
|
88
|
+
children: /* @__PURE__ */ jsxs("div", { className: "relative flex h-full flex-row items-stretch", children: [
|
|
89
|
+
/* @__PURE__ */ jsxs(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
className: "border-line-primary/50 relative flex h-full flex-none flex-col border-r",
|
|
93
|
+
style: { width: panelWidth },
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ jsx(
|
|
96
|
+
TreeSearchBar,
|
|
97
|
+
{
|
|
98
|
+
className: "p-1",
|
|
99
|
+
searchQuery,
|
|
100
|
+
setSearchQuery,
|
|
101
|
+
isCaseSensitive,
|
|
102
|
+
setIsCaseSensitive,
|
|
103
|
+
isRegex,
|
|
104
|
+
setIsRegex,
|
|
105
|
+
isRegexValid,
|
|
106
|
+
searchResultsCount
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ jsx(SyncScroll, { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
110
|
+
TreeView,
|
|
111
|
+
{
|
|
112
|
+
data: hasActiveSearch ? dataWithMeta.filter((item) => filteredData.some((f) => f.id === item.id)) : visibleData,
|
|
113
|
+
getIcon,
|
|
114
|
+
expandedItems,
|
|
115
|
+
onToggleItem: toggleItem,
|
|
116
|
+
onItemHover: setHoveredId,
|
|
117
|
+
hoveredId,
|
|
118
|
+
hasDescendants,
|
|
119
|
+
renderLabel
|
|
120
|
+
}
|
|
121
|
+
) })
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
/* @__PURE__ */ jsxs(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
ref: timelineContainerRef,
|
|
129
|
+
className: "overflow-y-none scrollbar-hide relative flex h-full w-full flex-auto cursor-crosshair flex-col overflow-x-hidden pl-px active:cursor-grabbing",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ jsx("div", { className: "bg-bg-primary sticky top-0", children: /* @__PURE__ */ jsxs("div", { className: "border-line-primary/50 relative h-8 border-b", children: [
|
|
132
|
+
ticks.map((marker, ind) => /* @__PURE__ */ jsx(
|
|
133
|
+
Tick,
|
|
134
|
+
{
|
|
135
|
+
time: marker.time,
|
|
136
|
+
label: marker.label,
|
|
137
|
+
timeToPercent,
|
|
138
|
+
zIndex: ind < ticks.length - 1 ? 10 : 0
|
|
139
|
+
},
|
|
140
|
+
marker.time
|
|
141
|
+
)),
|
|
142
|
+
eventDots.map(({ time }, tickIndex) => /* @__PURE__ */ jsx(
|
|
143
|
+
TimeRuleEventDot,
|
|
144
|
+
{
|
|
145
|
+
percent: timeToPercent(time)
|
|
146
|
+
},
|
|
147
|
+
`snap-${time}-${tickIndex}`
|
|
148
|
+
))
|
|
149
|
+
] }) }),
|
|
150
|
+
/* @__PURE__ */ jsxs(
|
|
151
|
+
WheelZoomContext,
|
|
152
|
+
{
|
|
153
|
+
className: "scrollbar-hide relative h-full max-h-full overflow-auto",
|
|
154
|
+
viewStart,
|
|
155
|
+
viewDuration,
|
|
156
|
+
onViewStartChange: setViewStart,
|
|
157
|
+
onWindowChange: setViewDuration,
|
|
158
|
+
minWindow,
|
|
159
|
+
maxWindow: maxWindow ?? TOTAL_DURATION * 10,
|
|
160
|
+
zoomFactor,
|
|
161
|
+
enabled,
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ jsx(SyncDragY, { className: "scrollbar-hide hide-scrollbar relative h-full w-full", children: visibleLogData.map(
|
|
164
|
+
(item, index) => item.time === void 0 ? (
|
|
165
|
+
// Render TimelineProcessBar for duration events
|
|
166
|
+
/* @__PURE__ */ jsx(
|
|
167
|
+
TimelineProcessBar,
|
|
168
|
+
{
|
|
169
|
+
index,
|
|
170
|
+
item,
|
|
171
|
+
isHovered: hoveredId === item.id,
|
|
172
|
+
onMouseEnter: () => setHoveredId(item.id),
|
|
173
|
+
onMouseLeave: () => setHoveredId(null),
|
|
174
|
+
onClick: (time) => {
|
|
175
|
+
setTemporalMarkers((prev) => [...prev, time]);
|
|
176
|
+
},
|
|
177
|
+
viewStart,
|
|
178
|
+
viewWindow: viewDuration,
|
|
179
|
+
timeToPercent
|
|
180
|
+
},
|
|
181
|
+
item.id
|
|
182
|
+
)
|
|
183
|
+
) : (
|
|
184
|
+
// Render TimelineEvent for instant events (with time property)
|
|
185
|
+
/* @__PURE__ */ jsx(
|
|
186
|
+
TimelineEvent,
|
|
187
|
+
{
|
|
188
|
+
item,
|
|
189
|
+
isHovered: hoveredId === item.id,
|
|
190
|
+
onMouseEnter: () => setHoveredId(item.id),
|
|
191
|
+
onMouseLeave: () => setHoveredId(null),
|
|
192
|
+
onClick: (time) => {
|
|
193
|
+
setTemporalMarkers((prev) => [...prev, time]);
|
|
194
|
+
},
|
|
195
|
+
timeToPercent,
|
|
196
|
+
index
|
|
197
|
+
},
|
|
198
|
+
item.id
|
|
199
|
+
)
|
|
200
|
+
)
|
|
201
|
+
) }),
|
|
202
|
+
/* @__PURE__ */ jsx(SyncScrollSlave, { className: "scrollbar-hide pointer-events-none absolute top-0 left-0 z-10 h-full w-2", children: visibleLogData.map((item, index) => /* @__PURE__ */ jsx(
|
|
203
|
+
LeftWedge,
|
|
204
|
+
{
|
|
205
|
+
item,
|
|
206
|
+
classes: rightWedgeClasses,
|
|
207
|
+
viewStart,
|
|
208
|
+
index
|
|
209
|
+
},
|
|
210
|
+
`left-wedge-${item.id}`
|
|
211
|
+
)) }),
|
|
212
|
+
/* @__PURE__ */ jsx(SyncScrollSlave, { className: "scrollbar-hide pointer-events-none absolute top-0 right-0 z-10 h-full w-2", children: visibleLogData.map((item, index) => /* @__PURE__ */ jsx(
|
|
213
|
+
RightWedge,
|
|
214
|
+
{
|
|
215
|
+
item,
|
|
216
|
+
classes: leftWedgeClasses,
|
|
217
|
+
viewEnd: viewStart + viewDuration,
|
|
218
|
+
index
|
|
219
|
+
},
|
|
220
|
+
`right-wedge-${item.id}`
|
|
221
|
+
)) }),
|
|
222
|
+
children,
|
|
223
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-1 left-1/2 -translate-x-1/2 justify-center pb-4", children: /* @__PURE__ */ jsx(
|
|
224
|
+
NavigationControls,
|
|
225
|
+
{
|
|
226
|
+
viewDuration,
|
|
227
|
+
handlePan,
|
|
228
|
+
handleZoomDragStart
|
|
229
|
+
}
|
|
230
|
+
) })
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
temporalMarkers.map((time, index) => /* @__PURE__ */ jsxs(
|
|
235
|
+
"div",
|
|
236
|
+
{
|
|
237
|
+
className: "pointer-events-none absolute top-0 h-8 w-20 cursor-pointer",
|
|
238
|
+
style: {
|
|
239
|
+
zIndex: 110,
|
|
240
|
+
left: `calc(${timeToPercent(time)}% - 2.5rem)`
|
|
241
|
+
},
|
|
242
|
+
onClick: () => {
|
|
243
|
+
setTemporalMarkers((prev) => prev.filter((_, i) => i !== index));
|
|
244
|
+
},
|
|
245
|
+
title: "Click to remove marker",
|
|
246
|
+
children: [
|
|
247
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-auto relative h-full w-full" }),
|
|
248
|
+
/* @__PURE__ */ jsx(
|
|
249
|
+
CursorOverlay,
|
|
250
|
+
{
|
|
251
|
+
left: 50,
|
|
252
|
+
label: `T${index + 1}`,
|
|
253
|
+
color: "#3b82f6",
|
|
254
|
+
showReadout: true,
|
|
255
|
+
variant: "static",
|
|
256
|
+
zIndex: 110
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
`marker-${time}-${index}`
|
|
262
|
+
)),
|
|
263
|
+
cursorVisible && /* @__PURE__ */ jsx(
|
|
264
|
+
CursorOverlay,
|
|
265
|
+
{
|
|
266
|
+
left: cursorPosition,
|
|
267
|
+
label: cursorLabel,
|
|
268
|
+
color: "#ef4444",
|
|
269
|
+
showReadout: true,
|
|
270
|
+
showMagnet,
|
|
271
|
+
className: "transition-opacity duration-150",
|
|
272
|
+
zIndex: 100
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
)
|
|
278
|
+
] })
|
|
279
|
+
}
|
|
280
|
+
) }) });
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export { Waterfall };
|