@uipath/apollo-react 4.48.4 → 4.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.cjs +138 -0
  2. package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.d.ts +3 -0
  3. package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.d.ts.map +1 -0
  4. package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.js +104 -0
  5. package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.types.cjs +18 -0
  6. package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.types.d.ts +18 -0
  7. package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.types.d.ts.map +1 -0
  8. package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.types.js +0 -0
  9. package/dist/canvas/components/NodePropertyPanel/index.cjs +36 -0
  10. package/dist/canvas/components/NodePropertyPanel/index.d.ts +3 -0
  11. package/dist/canvas/components/NodePropertyPanel/index.d.ts.map +1 -0
  12. package/dist/canvas/components/NodePropertyPanel/index.js +2 -0
  13. package/dist/canvas/components/ProbeCard/ProbeCard.cjs +482 -0
  14. package/dist/canvas/components/ProbeCard/ProbeCard.d.ts +48 -0
  15. package/dist/canvas/components/ProbeCard/ProbeCard.d.ts.map +1 -0
  16. package/dist/canvas/components/ProbeCard/ProbeCard.js +448 -0
  17. package/dist/canvas/components/ProbeCard/ProbeResizeHandles.cjs +118 -0
  18. package/dist/canvas/components/ProbeCard/ProbeResizeHandles.d.ts +18 -0
  19. package/dist/canvas/components/ProbeCard/ProbeResizeHandles.d.ts.map +1 -0
  20. package/dist/canvas/components/ProbeCard/ProbeResizeHandles.js +84 -0
  21. package/dist/canvas/components/ProbeCard/index.cjs +36 -0
  22. package/dist/canvas/components/ProbeCard/index.d.ts +4 -0
  23. package/dist/canvas/components/ProbeCard/index.d.ts.map +1 -0
  24. package/dist/canvas/components/ProbeCard/index.js +2 -0
  25. package/dist/canvas/components/ProbeCard/useDragSession.cjs +79 -0
  26. package/dist/canvas/components/ProbeCard/useDragSession.d.ts +11 -0
  27. package/dist/canvas/components/ProbeCard/useDragSession.d.ts.map +1 -0
  28. package/dist/canvas/components/ProbeCard/useDragSession.js +45 -0
  29. package/dist/canvas/components/ProbeCard/useLatestRef.cjs +46 -0
  30. package/dist/canvas/components/ProbeCard/useLatestRef.d.ts +2 -0
  31. package/dist/canvas/components/ProbeCard/useLatestRef.d.ts.map +1 -0
  32. package/dist/canvas/components/ProbeCard/useLatestRef.js +12 -0
  33. package/dist/canvas/components/index.cjs +66 -52
  34. package/dist/canvas/components/index.d.ts +2 -0
  35. package/dist/canvas/components/index.d.ts.map +1 -1
  36. package/dist/canvas/components/index.js +2 -0
  37. package/dist/canvas/styles/tailwind.canvas.css +1 -1
  38. package/package.json +2 -2
@@ -0,0 +1,482 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ ProbeCard: ()=>ProbeCard
28
+ });
29
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const external_react_namespaceObject = require("react");
31
+ const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
32
+ const external_lucide_react_namespaceObject = require("lucide-react");
33
+ const external_ProbeResizeHandles_cjs_namespaceObject = require("./ProbeResizeHandles.cjs");
34
+ const external_useDragSession_cjs_namespaceObject = require("./useDragSession.cjs");
35
+ const external_useLatestRef_cjs_namespaceObject = require("./useLatestRef.cjs");
36
+ function WatchValueView({ value, depth = 0 }) {
37
+ if (null === value) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
38
+ className: "text-[11px] font-mono text-foreground-subtle italic",
39
+ children: "null"
40
+ });
41
+ if (void 0 === value) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
42
+ className: "text-[11px] font-mono text-foreground-subtle italic",
43
+ children: "undefined"
44
+ });
45
+ if ('string' == typeof value) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
46
+ className: "text-[11px] font-mono text-emerald-600 dark:text-emerald-400",
47
+ children: [
48
+ '"',
49
+ value,
50
+ '"'
51
+ ]
52
+ });
53
+ if ('number' == typeof value) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
54
+ className: "text-[11px] font-mono text-blue-600 dark:text-blue-400",
55
+ children: String(value)
56
+ });
57
+ if ('boolean' == typeof value) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
58
+ className: "text-[11px] font-mono text-violet-600 dark:text-violet-400",
59
+ children: String(value)
60
+ });
61
+ if ('object' == typeof value) {
62
+ const isArray = Array.isArray(value);
63
+ const entries = isArray ? value.map((v, i)=>[
64
+ String(i),
65
+ v
66
+ ]) : Object.entries(value);
67
+ if (0 === entries.length) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
68
+ className: "text-[11px] font-mono text-foreground-subtle",
69
+ children: isArray ? '[]' : '{}'
70
+ });
71
+ if (depth >= 3) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
72
+ className: "text-[11px] font-mono text-foreground-subtle",
73
+ children: isArray ? `[…${entries.length}]` : '{…}'
74
+ });
75
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
76
+ className: "pl-2 space-y-0.5",
77
+ children: entries.map(([k, v])=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
78
+ className: "flex gap-1 text-[11px] font-mono min-w-0",
79
+ children: [
80
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
81
+ className: "text-foreground-muted shrink-0",
82
+ children: [
83
+ k,
84
+ ":"
85
+ ]
86
+ }),
87
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(WatchValueView, {
88
+ value: v,
89
+ depth: depth + 1
90
+ })
91
+ ]
92
+ }, k))
93
+ });
94
+ }
95
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
96
+ className: "text-[11px] font-mono text-foreground-muted",
97
+ children: String(value)
98
+ });
99
+ }
100
+ function RemoveButton({ onRemove, label }) {
101
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
102
+ variant: "ghost",
103
+ size: "3xs",
104
+ icon: true,
105
+ onMouseDown: (e)=>e.stopPropagation(),
106
+ onClick: onRemove,
107
+ className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity shrink-0 self-center",
108
+ title: label,
109
+ "aria-label": label,
110
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.X, {})
111
+ });
112
+ }
113
+ function DisclosureButton({ expanded, onToggle, label }) {
114
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
115
+ variant: "ghost",
116
+ size: "3xs",
117
+ icon: true,
118
+ onMouseDown: (e)=>e.stopPropagation(),
119
+ onClick: onToggle,
120
+ title: label,
121
+ "aria-label": label,
122
+ "aria-expanded": expanded,
123
+ children: expanded ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRight, {})
124
+ });
125
+ }
126
+ function WatchRow({ watch, onChange, onRemove }) {
127
+ const [expr, setExpr] = (0, external_react_namespaceObject.useState)(watch.expression);
128
+ const [expanded, setExpanded] = (0, external_react_namespaceObject.useState)(true);
129
+ (0, external_react_namespaceObject.useEffect)(()=>{
130
+ setExpr(watch.expression);
131
+ }, [
132
+ watch.expression
133
+ ]);
134
+ const commit = ()=>{
135
+ if (expr !== watch.expression) onChange(expr);
136
+ };
137
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
138
+ className: "group px-2 py-1 border-b border-border-subtle last:border-b-0",
139
+ children: [
140
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
141
+ className: "flex items-center gap-1 min-w-0",
142
+ children: [
143
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DisclosureButton, {
144
+ expanded: expanded,
145
+ onToggle: ()=>setExpanded((e)=>!e),
146
+ label: "Toggle value"
147
+ }),
148
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("input", {
149
+ value: expr,
150
+ onChange: (e)=>setExpr(e.target.value),
151
+ onBlur: commit,
152
+ onKeyDown: (e)=>{
153
+ e.stopPropagation();
154
+ if ('Enter' === e.key) commit();
155
+ },
156
+ placeholder: "e.g. output.items[0].id",
157
+ "aria-label": "Watch expression",
158
+ "data-probe-watch-input": "true",
159
+ className: "flex-1 min-w-0 text-sm font-mono text-foreground-secondary bg-transparent outline-none border-b border-transparent focus:border-foreground-accent"
160
+ }),
161
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(RemoveButton, {
162
+ onRemove: onRemove,
163
+ label: "Remove watch"
164
+ })
165
+ ]
166
+ }),
167
+ expanded && watch.hasValue && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
168
+ className: "pl-2 pt-0.5",
169
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(WatchValueView, {
170
+ value: watch.value
171
+ })
172
+ })
173
+ ]
174
+ });
175
+ }
176
+ const PAN_ON_SCROLL_SPEED = 0.5;
177
+ function ProbeCardComponent({ watches, iterationControl, onAddWatch, onUpdateWatch, onRemoveWatch, onDragStart, onDrag, onDragEnd, onResizeStart, onResize, onResizeEnd, onClose, onCanvasPan, onCanvasZoom }) {
178
+ const [hovered, setHovered] = (0, external_react_namespaceObject.useState)(false);
179
+ const cardRef = (0, external_react_namespaceObject.useRef)(null);
180
+ const watchListRef = (0, external_react_namespaceObject.useRef)(null);
181
+ const pendingFocusNewWatchRef = (0, external_react_namespaceObject.useRef)(false);
182
+ const previousWatchCountRef = (0, external_react_namespaceObject.useRef)(watches.length);
183
+ const onCloseRef = (0, external_useLatestRef_cjs_namespaceObject.useLatestRef)(onClose);
184
+ const onCanvasPanRef = (0, external_useLatestRef_cjs_namespaceObject.useLatestRef)(onCanvasPan);
185
+ const onCanvasZoomRef = (0, external_useLatestRef_cjs_namespaceObject.useLatestRef)(onCanvasZoom);
186
+ const isSpacePressedRef = (0, external_react_namespaceObject.useRef)(false);
187
+ const canvasPanCleanupRef = (0, external_react_namespaceObject.useRef)(null);
188
+ const canvasPanLastPointRef = (0, external_react_namespaceObject.useRef)(null);
189
+ const suppressNextClickRef = (0, external_react_namespaceObject.useRef)(false);
190
+ const handleHeaderMouseDown = (0, external_useDragSession_cjs_namespaceObject.useDragSession)({
191
+ onStart: onDragStart,
192
+ onMove: onDrag,
193
+ onEnd: onDragEnd
194
+ });
195
+ const handleAddWatch = ()=>{
196
+ pendingFocusNewWatchRef.current = true;
197
+ onAddWatch();
198
+ };
199
+ (0, external_react_namespaceObject.useLayoutEffect)(()=>{
200
+ const previousCount = previousWatchCountRef.current;
201
+ previousWatchCountRef.current = watches.length;
202
+ if (!pendingFocusNewWatchRef.current || watches.length <= previousCount) return;
203
+ pendingFocusNewWatchRef.current = false;
204
+ const inputs = watchListRef.current?.querySelectorAll('[data-probe-watch-input="true"]');
205
+ const input = inputs?.[inputs.length - 1];
206
+ if (!input) return;
207
+ input.scrollIntoView({
208
+ block: 'nearest'
209
+ });
210
+ input.focus({
211
+ preventScroll: true
212
+ });
213
+ }, [
214
+ watches.length
215
+ ]);
216
+ (0, external_react_namespaceObject.useEffect)(()=>{
217
+ const handler = (e)=>{
218
+ const card = cardRef.current;
219
+ if (!card || !card.contains(document.activeElement)) return;
220
+ if ('Escape' === e.key) {
221
+ e.stopPropagation();
222
+ e.preventDefault();
223
+ onCloseRef.current();
224
+ return;
225
+ }
226
+ if ('ArrowDown' === e.key || 'ArrowUp' === e.key) {
227
+ const inputs = Array.from(card.querySelectorAll('[data-probe-watch-input="true"]'));
228
+ const idx = inputs.indexOf(document.activeElement);
229
+ if (-1 === idx) return;
230
+ const next = inputs['ArrowDown' === e.key ? idx + 1 : idx - 1];
231
+ if (next) {
232
+ e.preventDefault();
233
+ e.stopPropagation();
234
+ next.focus();
235
+ next.select();
236
+ }
237
+ return;
238
+ }
239
+ if ('Delete' !== e.key && 'Backspace' !== e.key) return;
240
+ const active = document.activeElement;
241
+ const isEditable = !!active && ('INPUT' === active.tagName || 'TEXTAREA' === active.tagName || active.isContentEditable);
242
+ if (isEditable) return;
243
+ e.stopPropagation();
244
+ e.preventDefault();
245
+ onCloseRef.current();
246
+ };
247
+ window.addEventListener('keydown', handler, true);
248
+ return ()=>window.removeEventListener('keydown', handler, true);
249
+ }, [
250
+ onCloseRef
251
+ ]);
252
+ (0, external_react_namespaceObject.useEffect)(()=>{
253
+ const handleKeyDown = (e)=>{
254
+ if (' ' === e.key || 'Space' === e.code) isSpacePressedRef.current = true;
255
+ };
256
+ const handleKeyUp = (e)=>{
257
+ if (' ' === e.key || 'Space' === e.code) isSpacePressedRef.current = false;
258
+ };
259
+ window.addEventListener('keydown', handleKeyDown, true);
260
+ window.addEventListener('keyup', handleKeyUp, true);
261
+ return ()=>{
262
+ window.removeEventListener('keydown', handleKeyDown, true);
263
+ window.removeEventListener('keyup', handleKeyUp, true);
264
+ canvasPanCleanupRef.current?.();
265
+ };
266
+ }, []);
267
+ const startCanvasPan = (e)=>{
268
+ if (!onCanvasPanRef.current) return;
269
+ e.stopPropagation();
270
+ e.preventDefault();
271
+ suppressNextClickRef.current = true;
272
+ canvasPanCleanupRef.current?.();
273
+ canvasPanLastPointRef.current = {
274
+ x: e.clientX,
275
+ y: e.clientY
276
+ };
277
+ const handleMove = (ev)=>{
278
+ const last = canvasPanLastPointRef.current;
279
+ if (!last) return;
280
+ const next = {
281
+ x: ev.clientX,
282
+ y: ev.clientY
283
+ };
284
+ canvasPanLastPointRef.current = next;
285
+ onCanvasPanRef.current?.({
286
+ x: next.x - last.x,
287
+ y: next.y - last.y
288
+ });
289
+ };
290
+ const handleUp = ()=>{
291
+ window.removeEventListener('mousemove', handleMove);
292
+ window.removeEventListener('mouseup', handleUp);
293
+ canvasPanCleanupRef.current = null;
294
+ canvasPanLastPointRef.current = null;
295
+ window.setTimeout(()=>{
296
+ suppressNextClickRef.current = false;
297
+ }, 0);
298
+ };
299
+ canvasPanCleanupRef.current = handleUp;
300
+ window.addEventListener('mousemove', handleMove);
301
+ window.addEventListener('mouseup', handleUp);
302
+ };
303
+ const handleMouseDownCapture = (e)=>{
304
+ const target = e.target instanceof Element ? e.target : null;
305
+ const startedMiddlePan = 1 === e.button;
306
+ const startedSpacePan = 0 === e.button && isSpacePressedRef.current && !isInteractiveTarget(target);
307
+ if (startedMiddlePan || startedSpacePan) return void startCanvasPan(e);
308
+ if (0 === e.button && !isInteractiveTarget(target)) cardRef.current?.focus();
309
+ };
310
+ const handleClickCapture = (e)=>{
311
+ if (!suppressNextClickRef.current) return;
312
+ suppressNextClickRef.current = false;
313
+ e.stopPropagation();
314
+ e.preventDefault();
315
+ };
316
+ (0, external_react_namespaceObject.useEffect)(()=>{
317
+ const card = cardRef.current;
318
+ if (!card) return;
319
+ const onWheel = (e)=>{
320
+ if (e.ctrlKey) {
321
+ if (onCanvasZoomRef.current) {
322
+ e.stopPropagation();
323
+ e.preventDefault();
324
+ onCanvasZoomRef.current({
325
+ clientX: e.clientX,
326
+ clientY: e.clientY,
327
+ deltaY: e.deltaY,
328
+ deltaMode: e.deltaMode,
329
+ ctrlKey: e.ctrlKey
330
+ });
331
+ }
332
+ return;
333
+ }
334
+ const target = e.target instanceof Node ? e.target : null;
335
+ if (target && watchListRef.current?.contains(target) && canScrollVertically(watchListRef.current, e.deltaY)) return void e.stopPropagation();
336
+ if (onCanvasPanRef.current) {
337
+ e.stopPropagation();
338
+ e.preventDefault();
339
+ const deltaNormalize = 1 === e.deltaMode ? 20 : 1;
340
+ let deltaX = e.deltaX * deltaNormalize;
341
+ let deltaY = e.deltaY * deltaNormalize;
342
+ if (!isMac() && e.shiftKey) {
343
+ deltaX = e.deltaY * deltaNormalize;
344
+ deltaY = 0;
345
+ }
346
+ onCanvasPanRef.current({
347
+ x: -deltaX * PAN_ON_SCROLL_SPEED,
348
+ y: -deltaY * PAN_ON_SCROLL_SPEED
349
+ });
350
+ }
351
+ };
352
+ card.addEventListener('wheel', onWheel, {
353
+ passive: false
354
+ });
355
+ return ()=>card.removeEventListener('wheel', onWheel);
356
+ }, [
357
+ onCanvasZoomRef,
358
+ onCanvasPanRef
359
+ ]);
360
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
361
+ ref: cardRef,
362
+ tabIndex: 0,
363
+ role: "group",
364
+ "aria-label": "Probe",
365
+ className: "relative h-full flex flex-col rounded-[20px] border border-dashed border-border bg-surface-raised shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-foreground-accent-muted nodrag",
366
+ onMouseDownCapture: handleMouseDownCapture,
367
+ onClickCapture: handleClickCapture,
368
+ onMouseDown: (e)=>e.stopPropagation(),
369
+ onClick: (e)=>e.stopPropagation(),
370
+ onKeyDown: (e)=>e.stopPropagation(),
371
+ onMouseEnter: ()=>setHovered(true),
372
+ onMouseLeave: ()=>setHovered(false),
373
+ children: [
374
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
375
+ onMouseDown: handleHeaderMouseDown,
376
+ className: "flex items-center gap-2 px-3 py-2 border-b border-border-subtle bg-surface-overlay/30 cursor-move select-none shrink-0",
377
+ children: [
378
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
379
+ className: "min-w-0 flex-1 truncate text-xs font-semibold text-foreground",
380
+ children: "Probe"
381
+ }),
382
+ iterationControl && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
383
+ className: "flex items-center gap-0.5 shrink-0",
384
+ children: [
385
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
386
+ variant: "ghost",
387
+ size: "3xs",
388
+ icon: true,
389
+ disabled: 0 === iterationControl.current,
390
+ onMouseDown: (e)=>e.stopPropagation(),
391
+ onClick: iterationControl.onPrev,
392
+ title: "Previous iteration",
393
+ "aria-label": "Previous iteration",
394
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeft, {})
395
+ }),
396
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
397
+ className: "text-[10px] font-mono text-foreground-subtle tabular-nums select-none",
398
+ children: [
399
+ iterationControl.current + 1,
400
+ "/",
401
+ iterationControl.total
402
+ ]
403
+ }),
404
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
405
+ variant: "ghost",
406
+ size: "3xs",
407
+ icon: true,
408
+ disabled: iterationControl.current === iterationControl.total - 1,
409
+ onMouseDown: (e)=>e.stopPropagation(),
410
+ onClick: iterationControl.onNext,
411
+ title: "Next iteration",
412
+ "aria-label": "Next iteration",
413
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRight, {})
414
+ })
415
+ ]
416
+ }),
417
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
418
+ variant: "ghost",
419
+ size: "3xs",
420
+ icon: true,
421
+ onMouseDown: (e)=>e.stopPropagation(),
422
+ onClick: handleAddWatch,
423
+ title: "Add watch",
424
+ "aria-label": "Add watch",
425
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {})
426
+ }),
427
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
428
+ variant: "ghost",
429
+ size: "3xs",
430
+ icon: true,
431
+ onMouseDown: (e)=>e.stopPropagation(),
432
+ onClick: onClose,
433
+ title: "Remove probe",
434
+ "aria-label": "Remove probe",
435
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.X, {})
436
+ })
437
+ ]
438
+ }),
439
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
440
+ ref: watchListRef,
441
+ className: "flex-1 min-h-0 overflow-y-auto",
442
+ children: 0 === watches.length ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
443
+ className: "flex items-center justify-center h-full px-4",
444
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
445
+ className: "text-[11px] text-foreground-subtle text-center leading-relaxed",
446
+ children: "No watches — use + to add one"
447
+ })
448
+ }) : watches.map((w)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(WatchRow, {
449
+ watch: w,
450
+ onChange: (expr)=>onUpdateWatch(w.id, expr),
451
+ onRemove: ()=>onRemoveWatch(w.id)
452
+ }, w.id))
453
+ }),
454
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ProbeResizeHandles_cjs_namespaceObject.ProbeResizeHandles, {
455
+ active: hovered,
456
+ onResizeStart: onResizeStart,
457
+ onResize: onResize,
458
+ onResizeEnd: onResizeEnd
459
+ })
460
+ ]
461
+ });
462
+ }
463
+ const ProbeCard = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(ProbeCardComponent);
464
+ function isInteractiveTarget(target) {
465
+ return !!target?.closest('input, textarea, select, button, a, [contenteditable], [role="button"], [role="menuitem"]');
466
+ }
467
+ function isMac() {
468
+ return "u" > typeof navigator && navigator.userAgent.includes('Mac');
469
+ }
470
+ function canScrollVertically(element, deltaY) {
471
+ if (0 === deltaY) return false;
472
+ const maxScrollTop = element.scrollHeight - element.clientHeight;
473
+ if (maxScrollTop <= 0) return false;
474
+ return deltaY < 0 ? element.scrollTop > 0 : element.scrollTop < maxScrollTop;
475
+ }
476
+ exports.ProbeCard = __webpack_exports__.ProbeCard;
477
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
478
+ "ProbeCard"
479
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
480
+ Object.defineProperty(exports, '__esModule', {
481
+ value: true
482
+ });
@@ -0,0 +1,48 @@
1
+ import { type ResizeEdges } from './ProbeResizeHandles';
2
+ export interface IterationControl {
3
+ current: number;
4
+ total: number;
5
+ onPrev: () => void;
6
+ onNext: () => void;
7
+ }
8
+ export interface WatchResult {
9
+ id: string;
10
+ expression: string;
11
+ value: unknown;
12
+ hasValue: boolean;
13
+ }
14
+ export interface ProbeCardProps {
15
+ watches: readonly WatchResult[];
16
+ iterationControl?: IterationControl;
17
+ onAddWatch: () => void;
18
+ onUpdateWatch: (watchId: string, expression: string) => void;
19
+ onRemoveWatch: (watchId: string) => void;
20
+ onDragStart: () => void;
21
+ onDrag: (cumulativeDelta: {
22
+ x: number;
23
+ y: number;
24
+ }) => void;
25
+ onDragEnd: () => void;
26
+ onResizeStart: () => void;
27
+ onResize: (cumulativeDelta: {
28
+ x: number;
29
+ y: number;
30
+ }, edges: ResizeEdges) => void;
31
+ onResizeEnd: () => void;
32
+ onClose: () => void;
33
+ onCanvasPan?: (delta: {
34
+ x: number;
35
+ y: number;
36
+ }) => void;
37
+ onCanvasZoom?: (params: {
38
+ clientX: number;
39
+ clientY: number;
40
+ deltaY: number;
41
+ deltaMode: number;
42
+ ctrlKey: boolean;
43
+ }) => void;
44
+ }
45
+ declare function ProbeCardComponent({ watches, iterationControl, onAddWatch, onUpdateWatch, onRemoveWatch, onDragStart, onDrag, onDragEnd, onResizeStart, onResize, onResizeEnd, onClose, onCanvasPan, onCanvasZoom, }: ProbeCardProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare const ProbeCard: import("react").MemoExoticComponent<typeof ProbeCardComponent>;
47
+ export {};
48
+ //# sourceMappingURL=ProbeCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProbeCard.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ProbeCard/ProbeCard.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAS5E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAGD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IAEf,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,EAAE,CAAC,eAAe,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC5D,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,EAAE,CAAC,eAAe,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAClF,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IAMpB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAKxD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;KAClB,KAAK,IAAI,CAAC;CACZ;AA8KD,iBAAS,kBAAkB,CAAC,EAC1B,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,MAAM,EACN,SAAS,EACT,aAAa,EACb,QAAQ,EACR,WAAW,EACX,OAAO,EACP,WAAW,EACX,YAAY,GACb,EAAE,cAAc,2CAmThB;AAmDD,eAAO,MAAM,SAAS,gEAA2B,CAAC"}