@flowsterix/react 0.11.1 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devtools/DevToolsProvider.d.ts.map +1 -1
- package/dist/devtools/components/FlowEditModal.d.ts.map +1 -1
- package/dist/devtools/components/FlowItem.d.ts.map +1 -1
- package/dist/devtools/components/FlowsTab.d.ts.map +1 -1
- package/dist/devtools/components/GrabberOverlay.d.ts +1 -0
- package/dist/devtools/components/GrabberOverlay.d.ts.map +1 -1
- package/dist/devtools/components/StepItem.d.ts.map +1 -1
- package/dist/devtools/components/StepList.d.ts.map +1 -1
- package/dist/devtools/components/TabNav.d.ts.map +1 -1
- package/dist/devtools/components/Toolbar.d.ts.map +1 -1
- package/dist/devtools/index.cjs +555 -227
- package/dist/devtools/index.mjs +607 -279
- package/dist/devtools/motion.d.ts +64 -0
- package/dist/devtools/motion.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/devtools/index.cjs
CHANGED
|
@@ -9,10 +9,81 @@ var _react = require('react');
|
|
|
9
9
|
var _reactdom = require('react-dom');
|
|
10
10
|
var _react3 = require('motion/react');
|
|
11
11
|
|
|
12
|
+
// src/devtools/motion.ts
|
|
13
|
+
|
|
14
|
+
var springs = {
|
|
15
|
+
snappy: {
|
|
16
|
+
type: "spring",
|
|
17
|
+
damping: 30,
|
|
18
|
+
stiffness: 500,
|
|
19
|
+
mass: 0.5
|
|
20
|
+
},
|
|
21
|
+
smooth: {
|
|
22
|
+
type: "spring",
|
|
23
|
+
damping: 30,
|
|
24
|
+
stiffness: 300,
|
|
25
|
+
mass: 0.8
|
|
26
|
+
},
|
|
27
|
+
bouncy: {
|
|
28
|
+
type: "spring",
|
|
29
|
+
damping: 15,
|
|
30
|
+
stiffness: 400,
|
|
31
|
+
mass: 0.5
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var stagger = {
|
|
35
|
+
fast: {
|
|
36
|
+
staggerChildren: 0.03,
|
|
37
|
+
delayChildren: 0.05
|
|
38
|
+
},
|
|
39
|
+
default: {
|
|
40
|
+
staggerChildren: 0.05,
|
|
41
|
+
delayChildren: 0.1
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var listItemVariants = {
|
|
45
|
+
hidden: {
|
|
46
|
+
opacity: 0,
|
|
47
|
+
y: 8,
|
|
48
|
+
scale: 0.98
|
|
49
|
+
},
|
|
50
|
+
visible: {
|
|
51
|
+
opacity: 1,
|
|
52
|
+
y: 0,
|
|
53
|
+
scale: 1
|
|
54
|
+
},
|
|
55
|
+
exit: {
|
|
56
|
+
opacity: 0,
|
|
57
|
+
scale: 0.95,
|
|
58
|
+
transition: { duration: 0.15 }
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var listContainerVariants = {
|
|
62
|
+
hidden: { opacity: 0 },
|
|
63
|
+
visible: {
|
|
64
|
+
opacity: 1,
|
|
65
|
+
transition: stagger.fast
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
function useReducedMotion() {
|
|
69
|
+
const [prefersReducedMotion, setPrefersReducedMotion] = _react.useState.call(void 0, false);
|
|
70
|
+
_react.useEffect.call(void 0, () => {
|
|
71
|
+
const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
72
|
+
setPrefersReducedMotion(mediaQuery.matches);
|
|
73
|
+
const handler = (event) => {
|
|
74
|
+
setPrefersReducedMotion(event.matches);
|
|
75
|
+
};
|
|
76
|
+
mediaQuery.addEventListener("change", handler);
|
|
77
|
+
return () => mediaQuery.removeEventListener("change", handler);
|
|
78
|
+
}, []);
|
|
79
|
+
return prefersReducedMotion;
|
|
80
|
+
}
|
|
81
|
+
|
|
12
82
|
// src/devtools/components/GrabberOverlay.tsx
|
|
13
83
|
|
|
14
84
|
|
|
15
85
|
|
|
86
|
+
|
|
16
87
|
// src/devtools/utils/sourceExtractor.ts
|
|
17
88
|
function getReactFiber(element) {
|
|
18
89
|
const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
@@ -125,6 +196,10 @@ var styles = {
|
|
|
125
196
|
pointerEvents: "none",
|
|
126
197
|
boxShadow: "0 0 0 4px hsl(217 91% 60% / 0.15), 0 4px 20px hsl(217 91% 60% / 0.2)"
|
|
127
198
|
},
|
|
199
|
+
highlightPulse: {
|
|
200
|
+
boxShadow: "0 0 0 8px hsl(142 71% 55% / 0.3), 0 4px 20px hsl(142 71% 55% / 0.4)",
|
|
201
|
+
borderColor: "hsl(142 71% 55%)"
|
|
202
|
+
},
|
|
128
203
|
label: {
|
|
129
204
|
position: "absolute",
|
|
130
205
|
bottom: "100%",
|
|
@@ -183,7 +258,6 @@ var styles = {
|
|
|
183
258
|
position: "fixed",
|
|
184
259
|
bottom: 20,
|
|
185
260
|
left: "50%",
|
|
186
|
-
transform: "translateX(-50%)",
|
|
187
261
|
display: "flex",
|
|
188
262
|
alignItems: "center",
|
|
189
263
|
gap: 12,
|
|
@@ -227,7 +301,24 @@ var springTransition = {
|
|
|
227
301
|
mass: 0.8
|
|
228
302
|
};
|
|
229
303
|
function GrabberOverlay(props) {
|
|
230
|
-
const { isGrabbing, hoveredInfo, container } = props;
|
|
304
|
+
const { isGrabbing, hoveredInfo, container, onElementSelected } = props;
|
|
305
|
+
const reducedMotion = useReducedMotion();
|
|
306
|
+
const [showPulse, setShowPulse] = _react.useState.call(void 0, false);
|
|
307
|
+
_react.useEffect.call(void 0, () => {
|
|
308
|
+
if (onElementSelected) {
|
|
309
|
+
}
|
|
310
|
+
}, [onElementSelected]);
|
|
311
|
+
_react.useEffect.call(void 0, () => {
|
|
312
|
+
const handlePulse = () => {
|
|
313
|
+
if (reducedMotion) return;
|
|
314
|
+
setShowPulse(true);
|
|
315
|
+
setTimeout(() => setShowPulse(false), 300);
|
|
316
|
+
};
|
|
317
|
+
window.__devtools_pulse = handlePulse;
|
|
318
|
+
return () => {
|
|
319
|
+
delete window.__devtools_pulse;
|
|
320
|
+
};
|
|
321
|
+
}, [reducedMotion]);
|
|
231
322
|
if (typeof window === "undefined") return null;
|
|
232
323
|
const portalContainer = _nullishCoalesce(container, () => ( document.body));
|
|
233
324
|
const labelStyle = {
|
|
@@ -243,12 +334,16 @@ function GrabberOverlay(props) {
|
|
|
243
334
|
labelStyle.left = "auto";
|
|
244
335
|
labelStyle.right = 0;
|
|
245
336
|
}
|
|
337
|
+
const highlightStyle = {
|
|
338
|
+
...styles.highlight,
|
|
339
|
+
...showPulse && styles.highlightPulse
|
|
340
|
+
};
|
|
246
341
|
return _reactdom.createPortal.call(void 0,
|
|
247
342
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.root, "data-devtools-panel": "", children: [
|
|
248
343
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { children: isGrabbing && hoveredInfo && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
249
344
|
_react3.motion.div,
|
|
250
345
|
{
|
|
251
|
-
style:
|
|
346
|
+
style: highlightStyle,
|
|
252
347
|
initial: {
|
|
253
348
|
top: hoveredInfo.rect.top,
|
|
254
349
|
left: hoveredInfo.rect.left,
|
|
@@ -261,19 +356,20 @@ function GrabberOverlay(props) {
|
|
|
261
356
|
left: hoveredInfo.rect.left,
|
|
262
357
|
width: hoveredInfo.rect.width,
|
|
263
358
|
height: hoveredInfo.rect.height,
|
|
264
|
-
opacity: 1
|
|
359
|
+
opacity: 1,
|
|
360
|
+
scale: showPulse ? 1.02 : 1
|
|
265
361
|
},
|
|
266
362
|
exit: {
|
|
267
363
|
opacity: 0
|
|
268
364
|
},
|
|
269
|
-
transition: springTransition,
|
|
365
|
+
transition: reducedMotion ? { duration: 0 } : springTransition,
|
|
270
366
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
271
367
|
_react3.motion.div,
|
|
272
368
|
{
|
|
273
369
|
style: labelStyle,
|
|
274
|
-
initial: { opacity: 0, y: 4 },
|
|
370
|
+
initial: reducedMotion ? {} : { opacity: 0, y: 4 },
|
|
275
371
|
animate: { opacity: 1, y: 0 },
|
|
276
|
-
transition: { delay: 0.03, duration: 0.12 },
|
|
372
|
+
transition: reducedMotion ? { duration: 0 } : { delay: 0.03, duration: 0.12 },
|
|
277
373
|
children: [
|
|
278
374
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.labelTop, children: [
|
|
279
375
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: styles.tagBadge, children: [
|
|
@@ -311,10 +407,10 @@ function GrabberOverlay(props) {
|
|
|
311
407
|
_react3.motion.div,
|
|
312
408
|
{
|
|
313
409
|
style: styles.hint,
|
|
314
|
-
initial: { opacity: 0, y: 10, scale: 0.95 },
|
|
315
|
-
animate: { opacity: 1, y: 0, scale: 1 },
|
|
316
|
-
exit: { opacity: 0, y: 10, scale: 0.95 },
|
|
317
|
-
transition: { duration: 0
|
|
410
|
+
initial: reducedMotion ? {} : { opacity: 0, y: 10, scale: 0.95, x: "-50%" },
|
|
411
|
+
animate: { opacity: 1, y: 0, scale: 1, x: "-50%" },
|
|
412
|
+
exit: reducedMotion ? {} : { opacity: 0, y: 10, scale: 0.95, x: "-50%" },
|
|
413
|
+
transition: reducedMotion ? { duration: 0 } : springs.smooth,
|
|
318
414
|
children: [
|
|
319
415
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.hintItem, children: [
|
|
320
416
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.kbd, children: "Click" }),
|
|
@@ -349,6 +445,7 @@ function GrabberOverlay(props) {
|
|
|
349
445
|
|
|
350
446
|
|
|
351
447
|
|
|
448
|
+
|
|
352
449
|
var _core = require('@dnd-kit/core');
|
|
353
450
|
|
|
354
451
|
|
|
@@ -358,8 +455,10 @@ var _sortable = require('@dnd-kit/sortable');
|
|
|
358
455
|
|
|
359
456
|
// src/devtools/components/StepItem.tsx
|
|
360
457
|
|
|
458
|
+
|
|
361
459
|
var _utilities = require('@dnd-kit/utilities');
|
|
362
460
|
|
|
461
|
+
|
|
363
462
|
var styles2 = {
|
|
364
463
|
card: {
|
|
365
464
|
display: "flex",
|
|
@@ -370,7 +469,12 @@ var styles2 = {
|
|
|
370
469
|
border: "1px solid hsl(215 20% 22%)",
|
|
371
470
|
fontSize: 12,
|
|
372
471
|
fontFamily: "inherit",
|
|
373
|
-
overflow: "hidden"
|
|
472
|
+
overflow: "hidden",
|
|
473
|
+
transition: "border-color 0.15s ease, box-shadow 0.15s ease"
|
|
474
|
+
},
|
|
475
|
+
cardHover: {
|
|
476
|
+
borderColor: "hsl(217 91% 55% / 0.4)",
|
|
477
|
+
boxShadow: "0 0 0 2px hsl(217 91% 55% / 0.1), 0 4px 12px rgba(0, 0, 0, 0.2)"
|
|
374
478
|
},
|
|
375
479
|
cardGhost: {
|
|
376
480
|
opacity: 0.4,
|
|
@@ -509,6 +613,8 @@ var styles2 = {
|
|
|
509
613
|
};
|
|
510
614
|
function SortableStepItem(props) {
|
|
511
615
|
const { step, index, onDelete, isBeingDragged = false } = props;
|
|
616
|
+
const [isHovered, setIsHovered] = _react.useState.call(void 0, false);
|
|
617
|
+
const reducedMotion = useReducedMotion();
|
|
512
618
|
const {
|
|
513
619
|
attributes,
|
|
514
620
|
listeners,
|
|
@@ -530,86 +636,108 @@ function SortableStepItem(props) {
|
|
|
530
636
|
};
|
|
531
637
|
const cardStyle = {
|
|
532
638
|
...styles2.card,
|
|
639
|
+
...isHovered && !isGhost && styles2.cardHover,
|
|
533
640
|
...isGhost && styles2.cardGhost
|
|
534
641
|
};
|
|
535
642
|
const handleStyle = {
|
|
536
643
|
...styles2.dragHandle
|
|
537
644
|
};
|
|
538
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
/* @__PURE__ */ _jsxruntime.
|
|
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
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
579
|
-
"button",
|
|
580
|
-
{
|
|
581
|
-
type: "button",
|
|
582
|
-
style: styles2.copyButton,
|
|
583
|
-
onClick: handleCopySource,
|
|
584
|
-
title: "Copy path",
|
|
585
|
-
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
645
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
646
|
+
"div",
|
|
647
|
+
{
|
|
648
|
+
ref: setNodeRef,
|
|
649
|
+
style: wrapperStyle,
|
|
650
|
+
onMouseEnter: () => setIsHovered(true),
|
|
651
|
+
onMouseLeave: () => setIsHovered(false),
|
|
652
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: cardStyle, children: [
|
|
653
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: handleStyle, ...attributes, ...listeners, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "10", height: "16", viewBox: "0 0 10 16", fill: "currentColor", children: [
|
|
654
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "3", cy: "2", r: "1.5" }),
|
|
655
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "7", cy: "2", r: "1.5" }),
|
|
656
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "3", cy: "8", r: "1.5" }),
|
|
657
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "7", cy: "8", r: "1.5" }),
|
|
658
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "3", cy: "14", r: "1.5" }),
|
|
659
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "7", cy: "14", r: "1.5" })
|
|
660
|
+
] }) }),
|
|
661
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles2.content, children: [
|
|
662
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles2.header, children: [
|
|
663
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
664
|
+
_react3.motion.span,
|
|
665
|
+
{
|
|
666
|
+
style: styles2.order,
|
|
667
|
+
initial: reducedMotion ? {} : { scale: 1.2 },
|
|
668
|
+
animate: { scale: 1 },
|
|
669
|
+
transition: reducedMotion ? { duration: 0 } : springs.bouncy,
|
|
670
|
+
children: index + 1
|
|
671
|
+
},
|
|
672
|
+
`order-${index}`
|
|
673
|
+
),
|
|
674
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: styles2.tagBadge, children: [
|
|
675
|
+
"<",
|
|
676
|
+
step.elementTag,
|
|
677
|
+
">"
|
|
678
|
+
] }),
|
|
679
|
+
step.elementText && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles2.text, children: step.elementText })
|
|
680
|
+
] }),
|
|
681
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles2.selector, children: step.selector }),
|
|
682
|
+
step.source && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles2.sourceRow, children: [
|
|
683
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
586
684
|
"svg",
|
|
587
685
|
{
|
|
588
686
|
width: "10",
|
|
589
687
|
height: "10",
|
|
590
688
|
viewBox: "0 0 16 16",
|
|
591
|
-
fill: "
|
|
592
|
-
children:
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
689
|
+
fill: "hsl(142 71% 55%)",
|
|
690
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z" })
|
|
691
|
+
}
|
|
692
|
+
),
|
|
693
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
694
|
+
"a",
|
|
695
|
+
{
|
|
696
|
+
href: getVSCodeLink({ source: step.source }),
|
|
697
|
+
style: styles2.sourceLink,
|
|
698
|
+
title: "Open in VS Code",
|
|
699
|
+
children: formatSourcePath({ source: step.source })
|
|
700
|
+
}
|
|
701
|
+
),
|
|
702
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
703
|
+
"button",
|
|
704
|
+
{
|
|
705
|
+
type: "button",
|
|
706
|
+
style: styles2.copyButton,
|
|
707
|
+
onClick: handleCopySource,
|
|
708
|
+
title: "Copy path",
|
|
709
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
710
|
+
"svg",
|
|
711
|
+
{
|
|
712
|
+
width: "10",
|
|
713
|
+
height: "10",
|
|
714
|
+
viewBox: "0 0 16 16",
|
|
715
|
+
fill: "currentColor",
|
|
716
|
+
children: [
|
|
717
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10 2H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM4 1h6a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3z" }),
|
|
718
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M14 5a1 1 0 0 1 1 1v8a2 2 0 0 1-2 2H6a1 1 0 0 1 0-2h7V6a1 1 0 0 1 1-1z" })
|
|
719
|
+
]
|
|
720
|
+
}
|
|
721
|
+
)
|
|
596
722
|
}
|
|
597
723
|
)
|
|
724
|
+
] })
|
|
725
|
+
] }),
|
|
726
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
727
|
+
_react3.motion.button,
|
|
728
|
+
{
|
|
729
|
+
type: "button",
|
|
730
|
+
style: styles2.deleteButton,
|
|
731
|
+
onClick: onDelete,
|
|
732
|
+
title: "Delete step",
|
|
733
|
+
whileHover: reducedMotion ? {} : { scale: 1.1, color: "hsl(0 70% 60%)" },
|
|
734
|
+
whileTap: reducedMotion ? {} : { scale: 0.9 },
|
|
735
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" }) })
|
|
598
736
|
}
|
|
599
737
|
)
|
|
600
738
|
] })
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
"button",
|
|
604
|
-
{
|
|
605
|
-
type: "button",
|
|
606
|
-
style: styles2.deleteButton,
|
|
607
|
-
onClick: onDelete,
|
|
608
|
-
title: "Delete step",
|
|
609
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" }) })
|
|
610
|
-
}
|
|
611
|
-
)
|
|
612
|
-
] }) });
|
|
739
|
+
}
|
|
740
|
+
);
|
|
613
741
|
}
|
|
614
742
|
function StepItemDragPreview(props) {
|
|
615
743
|
const { step, index } = props;
|
|
@@ -698,7 +826,8 @@ var styles3 = {
|
|
|
698
826
|
backgroundColor: "rgba(59, 130, 246, 0.15)",
|
|
699
827
|
borderColor: "rgba(59, 130, 246, 0.4)",
|
|
700
828
|
color: "#60a5fa",
|
|
701
|
-
boxShadow: "0 0 0 2px rgba(59, 130, 246, 0.1)"
|
|
829
|
+
boxShadow: "0 0 0 2px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.2)",
|
|
830
|
+
animation: "grabPulse 2s ease-in-out infinite"
|
|
702
831
|
},
|
|
703
832
|
actionRow: {
|
|
704
833
|
display: "flex",
|
|
@@ -755,11 +884,18 @@ var styles3 = {
|
|
|
755
884
|
fontWeight: 600,
|
|
756
885
|
borderRadius: 4,
|
|
757
886
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.3)"
|
|
758
|
-
}
|
|
887
|
+
},
|
|
888
|
+
pulseKeyframes: `
|
|
889
|
+
@keyframes grabPulse {
|
|
890
|
+
0%, 100% { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.2); }
|
|
891
|
+
50% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 0 20px rgba(59, 130, 246, 0.3); }
|
|
892
|
+
}
|
|
893
|
+
`
|
|
759
894
|
};
|
|
760
895
|
function Toolbar(props) {
|
|
761
896
|
const { mode, stepCount, onToggleGrab, onExport, onCopyForAI, onReset } = props;
|
|
762
897
|
const [copied, setCopied] = _react.useState.call(void 0, false);
|
|
898
|
+
const reducedMotion = useReducedMotion();
|
|
763
899
|
const isGrabbing = mode === "grabbing";
|
|
764
900
|
const hasSteps = stepCount > 0;
|
|
765
901
|
const handleCopy = async () => {
|
|
@@ -785,14 +921,15 @@ function Toolbar(props) {
|
|
|
785
921
|
...hasSteps && styles3.actionButtonDanger
|
|
786
922
|
};
|
|
787
923
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles3.toolbar, children: [
|
|
924
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { children: styles3.pulseKeyframes }),
|
|
788
925
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles3.grabRow, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
789
926
|
_react3.motion.button,
|
|
790
927
|
{
|
|
791
928
|
type: "button",
|
|
792
929
|
style: grabButtonStyle,
|
|
793
930
|
onClick: onToggleGrab,
|
|
794
|
-
whileHover: { scale: 1.01 },
|
|
795
|
-
whileTap: { scale: 0.98 },
|
|
931
|
+
whileHover: reducedMotion ? {} : { scale: 1.01 },
|
|
932
|
+
whileTap: reducedMotion ? {} : { scale: 0.98 },
|
|
796
933
|
children: isGrabbing ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
797
934
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
798
935
|
"svg",
|
|
@@ -882,8 +1019,8 @@ function Toolbar(props) {
|
|
|
882
1019
|
style: exportButtonStyle,
|
|
883
1020
|
onClick: onExport,
|
|
884
1021
|
disabled: !hasSteps,
|
|
885
|
-
whileHover: hasSteps ? { scale: 1.02 } : {},
|
|
886
|
-
whileTap: hasSteps ? { scale: 0.98 } : {},
|
|
1022
|
+
whileHover: hasSteps && !reducedMotion ? { scale: 1.02 } : {},
|
|
1023
|
+
whileTap: hasSteps && !reducedMotion ? { scale: 0.98 } : {},
|
|
887
1024
|
title: "Download JSON file",
|
|
888
1025
|
children: [
|
|
889
1026
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "11", height: "11", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
@@ -901,8 +1038,8 @@ function Toolbar(props) {
|
|
|
901
1038
|
style: copyButtonStyle,
|
|
902
1039
|
onClick: handleCopy,
|
|
903
1040
|
disabled: !hasSteps,
|
|
904
|
-
whileHover: hasSteps ? { scale: 1.02 } : {},
|
|
905
|
-
whileTap: hasSteps ? { scale: 0.98 } : {},
|
|
1041
|
+
whileHover: hasSteps && !reducedMotion ? { scale: 1.02 } : {},
|
|
1042
|
+
whileTap: hasSteps && !reducedMotion ? { scale: 0.98 } : {},
|
|
906
1043
|
title: "Copy JSON to clipboard",
|
|
907
1044
|
children: [
|
|
908
1045
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "11", height: "11", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
@@ -910,16 +1047,17 @@ function Toolbar(props) {
|
|
|
910
1047
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M14 5a1 1 0 0 1 1 1v8a2 2 0 0 1-2 2H6a1 1 0 0 1 0-2h7V6a1 1 0 0 1 1-1z" })
|
|
911
1048
|
] }),
|
|
912
1049
|
"Copy",
|
|
913
|
-
copied && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1050
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { children: copied && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
914
1051
|
_react3.motion.span,
|
|
915
1052
|
{
|
|
916
1053
|
style: styles3.copiedBadge,
|
|
917
|
-
initial: { opacity: 0, scale: 0.
|
|
1054
|
+
initial: reducedMotion ? {} : { opacity: 0, scale: 0.5, y: 4 },
|
|
918
1055
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
919
|
-
exit: { opacity: 0, scale: 0.
|
|
1056
|
+
exit: reducedMotion ? {} : { opacity: 0, scale: 0.5, y: 4 },
|
|
1057
|
+
transition: reducedMotion ? { duration: 0 } : springs.bouncy,
|
|
920
1058
|
children: "Copied!"
|
|
921
1059
|
}
|
|
922
|
-
)
|
|
1060
|
+
) })
|
|
923
1061
|
]
|
|
924
1062
|
}
|
|
925
1063
|
),
|
|
@@ -930,8 +1068,8 @@ function Toolbar(props) {
|
|
|
930
1068
|
style: resetButtonStyle,
|
|
931
1069
|
onClick: onReset,
|
|
932
1070
|
disabled: !hasSteps,
|
|
933
|
-
whileHover: hasSteps ? { scale: 1.02 } : {},
|
|
934
|
-
whileTap: hasSteps ? { scale: 0.98 } : {},
|
|
1071
|
+
whileHover: hasSteps && !reducedMotion ? { scale: 1.02 } : {},
|
|
1072
|
+
whileTap: hasSteps && !reducedMotion ? { scale: 0.98 } : {},
|
|
935
1073
|
title: "Clear all steps",
|
|
936
1074
|
children: [
|
|
937
1075
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "11", height: "11", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
@@ -1013,6 +1151,7 @@ function StepList(props) {
|
|
|
1013
1151
|
onExport
|
|
1014
1152
|
} = props;
|
|
1015
1153
|
const [activeId, setActiveId] = _react.useState.call(void 0, null);
|
|
1154
|
+
const reducedMotion = useReducedMotion();
|
|
1016
1155
|
const activeStep = activeId ? steps.find((s) => s.id === activeId) : null;
|
|
1017
1156
|
const activeIndex = activeId ? steps.findIndex((s) => s.id === activeId) : -1;
|
|
1018
1157
|
const sensors = _core.useSensors.call(void 0,
|
|
@@ -1079,26 +1218,37 @@ function StepList(props) {
|
|
|
1079
1218
|
onReset: handleReset
|
|
1080
1219
|
}
|
|
1081
1220
|
),
|
|
1082
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles4.scrollArea, children: steps.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1221
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles4.scrollArea, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { mode: "wait", children: steps.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1222
|
+
_react3.motion.div,
|
|
1223
|
+
{
|
|
1224
|
+
style: styles4.empty,
|
|
1225
|
+
initial: reducedMotion ? {} : { opacity: 0 },
|
|
1226
|
+
animate: { opacity: 1 },
|
|
1227
|
+
exit: reducedMotion ? {} : { opacity: 0 },
|
|
1228
|
+
transition: { duration: 0.2 },
|
|
1229
|
+
children: [
|
|
1230
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles4.emptyIcon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1231
|
+
"svg",
|
|
1232
|
+
{
|
|
1233
|
+
width: "20",
|
|
1234
|
+
height: "20",
|
|
1235
|
+
viewBox: "0 0 16 16",
|
|
1236
|
+
fill: "hsl(215 20% 45%)",
|
|
1237
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M14 0a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h12zM5.904 10.803L10 6.707v2.768a.5.5 0 0 0 1 0V5.5a.5.5 0 0 0-.5-.5H6.525a.5.5 0 1 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 .707.707z" })
|
|
1238
|
+
}
|
|
1239
|
+
) }),
|
|
1240
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles4.emptyText, children: [
|
|
1241
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: "No steps captured yet." }),
|
|
1242
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { marginTop: 6 }, children: [
|
|
1243
|
+
"Press ",
|
|
1244
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles4.kbd, children: "Ctrl+Shift+G" }),
|
|
1245
|
+
" to grab"
|
|
1246
|
+
] })
|
|
1247
|
+
] })
|
|
1248
|
+
]
|
|
1249
|
+
},
|
|
1250
|
+
"empty-state"
|
|
1251
|
+
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1102
1252
|
_core.DndContext,
|
|
1103
1253
|
{
|
|
1104
1254
|
sensors,
|
|
@@ -1112,34 +1262,56 @@ function StepList(props) {
|
|
|
1112
1262
|
{
|
|
1113
1263
|
items: steps.map((s) => s.id),
|
|
1114
1264
|
strategy: _sortable.verticalListSortingStrategy,
|
|
1115
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1116
|
-
|
|
1265
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1266
|
+
_react3.motion.div,
|
|
1117
1267
|
{
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1268
|
+
style: styles4.stepList,
|
|
1269
|
+
variants: reducedMotion ? void 0 : listContainerVariants,
|
|
1270
|
+
initial: "hidden",
|
|
1271
|
+
animate: "visible",
|
|
1272
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { mode: "popLayout", children: steps.map((step, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1273
|
+
_react3.motion.div,
|
|
1274
|
+
{
|
|
1275
|
+
variants: reducedMotion ? void 0 : listItemVariants,
|
|
1276
|
+
initial: "hidden",
|
|
1277
|
+
animate: "visible",
|
|
1278
|
+
exit: "exit",
|
|
1279
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1280
|
+
SortableStepItem,
|
|
1281
|
+
{
|
|
1282
|
+
step,
|
|
1283
|
+
index,
|
|
1284
|
+
onDelete: () => onDeleteStep({ id: step.id }),
|
|
1285
|
+
isDragActive: activeId !== null,
|
|
1286
|
+
isBeingDragged: step.id === activeId
|
|
1287
|
+
}
|
|
1288
|
+
)
|
|
1289
|
+
},
|
|
1290
|
+
step.id
|
|
1291
|
+
)) })
|
|
1123
1292
|
},
|
|
1124
|
-
step
|
|
1125
|
-
)
|
|
1293
|
+
"step-list"
|
|
1294
|
+
)
|
|
1126
1295
|
}
|
|
1127
1296
|
),
|
|
1128
1297
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _core.DragOverlay, { dropAnimation: null, children: activeStep && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StepItemDragPreview, { step: activeStep, index: activeIndex }) })
|
|
1129
1298
|
]
|
|
1130
1299
|
}
|
|
1131
|
-
) })
|
|
1300
|
+
) }) })
|
|
1132
1301
|
] });
|
|
1133
1302
|
}
|
|
1134
1303
|
|
|
1135
1304
|
// src/devtools/components/TabNav.tsx
|
|
1136
1305
|
|
|
1306
|
+
|
|
1307
|
+
|
|
1137
1308
|
var styles5 = {
|
|
1138
1309
|
container: {
|
|
1139
1310
|
display: "flex",
|
|
1140
1311
|
gap: 2,
|
|
1141
1312
|
padding: "8px 10px 0",
|
|
1142
|
-
borderBottom: "1px solid hsl(215 20% 20%)"
|
|
1313
|
+
borderBottom: "1px solid hsl(215 20% 20%)",
|
|
1314
|
+
position: "relative"
|
|
1143
1315
|
},
|
|
1144
1316
|
tab: {
|
|
1145
1317
|
flex: 1,
|
|
@@ -1156,13 +1328,21 @@ var styles5 = {
|
|
|
1156
1328
|
fontWeight: 500,
|
|
1157
1329
|
fontFamily: "inherit",
|
|
1158
1330
|
cursor: "pointer",
|
|
1159
|
-
transition: "
|
|
1331
|
+
transition: "color 0.15s ease",
|
|
1160
1332
|
outline: "none",
|
|
1161
|
-
marginBottom: -1
|
|
1333
|
+
marginBottom: -1,
|
|
1334
|
+
position: "relative",
|
|
1335
|
+
zIndex: 1
|
|
1162
1336
|
},
|
|
1163
1337
|
tabActive: {
|
|
1164
|
-
color: "hsl(217 91% 70%)"
|
|
1165
|
-
|
|
1338
|
+
color: "hsl(217 91% 70%)"
|
|
1339
|
+
},
|
|
1340
|
+
indicator: {
|
|
1341
|
+
position: "absolute",
|
|
1342
|
+
bottom: -1,
|
|
1343
|
+
height: 2,
|
|
1344
|
+
backgroundColor: "hsl(217 91% 60%)",
|
|
1345
|
+
borderRadius: 1
|
|
1166
1346
|
},
|
|
1167
1347
|
badge: {
|
|
1168
1348
|
display: "inline-flex",
|
|
@@ -1184,6 +1364,17 @@ var styles5 = {
|
|
|
1184
1364
|
};
|
|
1185
1365
|
function TabNav(props) {
|
|
1186
1366
|
const { activeTab, onTabChange, stepCount, flowCount } = props;
|
|
1367
|
+
const reducedMotion = useReducedMotion();
|
|
1368
|
+
const prevStepCount = _react.useRef.call(void 0, stepCount);
|
|
1369
|
+
const prevFlowCount = _react.useRef.call(void 0, flowCount);
|
|
1370
|
+
const stepCountChanged = stepCount !== prevStepCount.current;
|
|
1371
|
+
const flowCountChanged = flowCount !== prevFlowCount.current;
|
|
1372
|
+
_react.useEffect.call(void 0, () => {
|
|
1373
|
+
prevStepCount.current = stepCount;
|
|
1374
|
+
}, [stepCount]);
|
|
1375
|
+
_react.useEffect.call(void 0, () => {
|
|
1376
|
+
prevFlowCount.current = flowCount;
|
|
1377
|
+
}, [flowCount]);
|
|
1187
1378
|
const stepsTabStyle = {
|
|
1188
1379
|
...styles5.tab,
|
|
1189
1380
|
...activeTab === "steps" && styles5.tabActive
|
|
@@ -1210,7 +1401,21 @@ function TabNav(props) {
|
|
|
1210
1401
|
children: [
|
|
1211
1402
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M14 0a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h12zM5.904 10.803L10 6.707v2.768a.5.5 0 0 0 1 0V5.5a.5.5 0 0 0-.5-.5H6.525a.5.5 0 1 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 .707.707z" }) }),
|
|
1212
1403
|
"Steps",
|
|
1213
|
-
|
|
1404
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { mode: "popLayout", children: stepCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1405
|
+
_react3.motion.span,
|
|
1406
|
+
{
|
|
1407
|
+
style: stepsBadgeStyle,
|
|
1408
|
+
initial: stepCountChanged && !reducedMotion ? { scale: 1.3 } : { scale: 1 },
|
|
1409
|
+
animate: {
|
|
1410
|
+
scale: stepCountChanged && !reducedMotion ? [1.3, 1] : 1,
|
|
1411
|
+
opacity: 1
|
|
1412
|
+
},
|
|
1413
|
+
exit: { scale: 0.8, opacity: 0 },
|
|
1414
|
+
transition: reducedMotion ? { duration: 0 } : springs.bouncy,
|
|
1415
|
+
children: stepCount
|
|
1416
|
+
},
|
|
1417
|
+
"step-badge"
|
|
1418
|
+
) })
|
|
1214
1419
|
]
|
|
1215
1420
|
}
|
|
1216
1421
|
),
|
|
@@ -1223,9 +1428,34 @@ function TabNav(props) {
|
|
|
1223
1428
|
children: [
|
|
1224
1429
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M6 3.5A1.5 1.5 0 0 1 7.5 2h1A1.5 1.5 0 0 1 10 3.5v1A1.5 1.5 0 0 1 8.5 6v1H14a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0V8h-5v.5a.5.5 0 0 1-1 0V8h-5v.5a.5.5 0 0 1-1 0v-1A.5.5 0 0 1 2 7h5.5V6A1.5 1.5 0 0 1 6 4.5v-1zm-3 8A1.5 1.5 0 0 1 4.5 10h1A1.5 1.5 0 0 1 7 11.5v1A1.5 1.5 0 0 1 5.5 14h-1A1.5 1.5 0 0 1 3 12.5v-1zm6 0a1.5 1.5 0 0 1 1.5-1.5h1a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1-1.5 1.5h-1A1.5 1.5 0 0 1 9 12.5v-1z" }) }),
|
|
1225
1430
|
"Flows",
|
|
1226
|
-
|
|
1431
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { mode: "popLayout", children: flowCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1432
|
+
_react3.motion.span,
|
|
1433
|
+
{
|
|
1434
|
+
style: flowsBadgeStyle,
|
|
1435
|
+
initial: { scale: 0.8, opacity: 0 },
|
|
1436
|
+
animate: {
|
|
1437
|
+
scale: flowCountChanged && !reducedMotion ? [1.3, 1] : 1,
|
|
1438
|
+
opacity: 1
|
|
1439
|
+
},
|
|
1440
|
+
exit: { scale: 0.8, opacity: 0 },
|
|
1441
|
+
transition: reducedMotion ? { duration: 0 } : springs.bouncy,
|
|
1442
|
+
children: flowCount
|
|
1443
|
+
},
|
|
1444
|
+
"flow-badge"
|
|
1445
|
+
) })
|
|
1227
1446
|
]
|
|
1228
1447
|
}
|
|
1448
|
+
),
|
|
1449
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1450
|
+
"div",
|
|
1451
|
+
{
|
|
1452
|
+
style: {
|
|
1453
|
+
...styles5.indicator,
|
|
1454
|
+
left: activeTab === "steps" ? 10 : "50%",
|
|
1455
|
+
width: "calc(50% - 11px)",
|
|
1456
|
+
transition: reducedMotion ? "none" : "left 0.2s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1229
1459
|
)
|
|
1230
1460
|
] });
|
|
1231
1461
|
}
|
|
@@ -1340,7 +1570,12 @@ var styles6 = {
|
|
|
1340
1570
|
borderRadius: 8,
|
|
1341
1571
|
border: "1px solid hsl(215 20% 22%)",
|
|
1342
1572
|
fontSize: 12,
|
|
1343
|
-
fontFamily: "inherit"
|
|
1573
|
+
fontFamily: "inherit",
|
|
1574
|
+
transition: "border-color 0.15s ease, box-shadow 0.15s ease"
|
|
1575
|
+
},
|
|
1576
|
+
cardHover: {
|
|
1577
|
+
borderColor: "hsl(215 20% 28%)",
|
|
1578
|
+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)"
|
|
1344
1579
|
},
|
|
1345
1580
|
cardActive: {
|
|
1346
1581
|
borderColor: "hsl(217 91% 55% / 0.5)",
|
|
@@ -1461,6 +1696,8 @@ function FlowItem(props) {
|
|
|
1461
1696
|
const { flow, onEdit, onDelete } = props;
|
|
1462
1697
|
const { flowId, definition, state, isActive } = flow;
|
|
1463
1698
|
const [confirmDelete, setConfirmDelete] = _react.useState.call(void 0, false);
|
|
1699
|
+
const [isHovered, setIsHovered] = _react.useState.call(void 0, false);
|
|
1700
|
+
const reducedMotion = useReducedMotion();
|
|
1464
1701
|
const handleDelete = () => {
|
|
1465
1702
|
if (confirmDelete) {
|
|
1466
1703
|
onDelete();
|
|
@@ -1472,6 +1709,7 @@ function FlowItem(props) {
|
|
|
1472
1709
|
};
|
|
1473
1710
|
const cardStyle = {
|
|
1474
1711
|
...styles6.card,
|
|
1712
|
+
...isHovered && styles6.cardHover,
|
|
1475
1713
|
...isActive && styles6.cardActive
|
|
1476
1714
|
};
|
|
1477
1715
|
const statusBadgeStyle = {
|
|
@@ -1483,72 +1721,103 @@ function FlowItem(props) {
|
|
|
1483
1721
|
...confirmDelete && styles6.actionButtonDanger
|
|
1484
1722
|
};
|
|
1485
1723
|
const stepInfo = state ? `Step ${state.stepIndex + 1}/${definition.steps.length}` : null;
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1724
|
+
const currentStatus = _nullishCoalesce(_optionalChain([state, 'optionalAccess', _2 => _2.status]), () => ( "no state"));
|
|
1725
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1726
|
+
"div",
|
|
1727
|
+
{
|
|
1728
|
+
style: cardStyle,
|
|
1729
|
+
onMouseEnter: () => setIsHovered(true),
|
|
1730
|
+
onMouseLeave: () => setIsHovered(false),
|
|
1731
|
+
children: [
|
|
1732
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.header, children: [
|
|
1733
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.titleGroup, children: [
|
|
1734
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.flowId, children: flowId }),
|
|
1735
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { mode: "wait", children: isActive && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1736
|
+
_react3.motion.span,
|
|
1737
|
+
{
|
|
1738
|
+
style: { ...styles6.statusBadge, ...styles6.activeBadge },
|
|
1739
|
+
initial: reducedMotion ? {} : { scale: 0.8, opacity: 0 },
|
|
1740
|
+
animate: { scale: 1, opacity: 1 },
|
|
1741
|
+
exit: reducedMotion ? {} : { scale: 0.8, opacity: 0 },
|
|
1742
|
+
transition: reducedMotion ? { duration: 0 } : springs.bouncy,
|
|
1743
|
+
children: "Active"
|
|
1744
|
+
},
|
|
1745
|
+
"active-badge"
|
|
1746
|
+
) })
|
|
1747
|
+
] }),
|
|
1748
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1749
|
+
_react3.motion.span,
|
|
1750
|
+
{
|
|
1751
|
+
style: statusBadgeStyle,
|
|
1752
|
+
initial: reducedMotion ? {} : { scale: 0.9, opacity: 0 },
|
|
1753
|
+
animate: { scale: 1, opacity: 1 },
|
|
1754
|
+
exit: reducedMotion ? {} : { scale: 0.9, opacity: 0 },
|
|
1755
|
+
transition: reducedMotion ? { duration: 0 } : { duration: 0.15 },
|
|
1756
|
+
children: currentStatus
|
|
1757
|
+
},
|
|
1758
|
+
currentStatus
|
|
1759
|
+
) })
|
|
1760
|
+
] }),
|
|
1761
|
+
state ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.infoRow, children: [
|
|
1762
|
+
stepInfo && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.infoItem, children: [
|
|
1763
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.label, children: "Step:" }),
|
|
1764
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.value, children: stepInfo })
|
|
1765
|
+
] }),
|
|
1766
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.infoItem, children: [
|
|
1767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.label, children: "Version:" }),
|
|
1768
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.value, children: state.version })
|
|
1769
|
+
] }),
|
|
1770
|
+
state.stepId && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.infoItem, children: [
|
|
1771
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.label, children: "ID:" }),
|
|
1772
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.value, children: state.stepId })
|
|
1773
|
+
] })
|
|
1774
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles6.noState, children: "No stored state" }),
|
|
1775
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.actions, children: [
|
|
1776
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1777
|
+
_react3.motion.button,
|
|
1778
|
+
{
|
|
1779
|
+
type: "button",
|
|
1780
|
+
style: styles6.actionButton,
|
|
1781
|
+
onClick: onEdit,
|
|
1782
|
+
disabled: !state,
|
|
1783
|
+
whileHover: state && !reducedMotion ? { scale: 1.02 } : {},
|
|
1784
|
+
whileTap: state && !reducedMotion ? { scale: 0.98 } : {},
|
|
1785
|
+
title: state ? "Edit flow state" : "No state to edit",
|
|
1786
|
+
children: [
|
|
1787
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z" }) }),
|
|
1788
|
+
"Edit"
|
|
1789
|
+
]
|
|
1790
|
+
}
|
|
1791
|
+
),
|
|
1792
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1793
|
+
_react3.motion.button,
|
|
1794
|
+
{
|
|
1795
|
+
type: "button",
|
|
1796
|
+
style: deleteButtonStyle,
|
|
1797
|
+
onClick: handleDelete,
|
|
1798
|
+
disabled: !state,
|
|
1799
|
+
whileHover: state && !reducedMotion ? { scale: 1.02 } : {},
|
|
1800
|
+
whileTap: state && !reducedMotion ? { scale: 0.98 } : {},
|
|
1801
|
+
title: confirmDelete ? "Click again to confirm deletion" : state ? "Delete flow state" : "No state to delete",
|
|
1802
|
+
children: [
|
|
1803
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
1804
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z" }),
|
|
1805
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1806
|
+
"path",
|
|
1807
|
+
{
|
|
1808
|
+
fillRule: "evenodd",
|
|
1809
|
+
d: "M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"
|
|
1810
|
+
}
|
|
1811
|
+
)
|
|
1812
|
+
] }),
|
|
1813
|
+
confirmDelete ? "Confirm?" : "Delete"
|
|
1814
|
+
]
|
|
1815
|
+
}
|
|
1816
|
+
)
|
|
1817
|
+
] })
|
|
1818
|
+
]
|
|
1819
|
+
}
|
|
1820
|
+
);
|
|
1552
1821
|
}
|
|
1553
1822
|
|
|
1554
1823
|
// src/devtools/components/FlowEditModal.tsx
|
|
@@ -1561,6 +1830,8 @@ var styles7 = {
|
|
|
1561
1830
|
position: "fixed",
|
|
1562
1831
|
inset: 0,
|
|
1563
1832
|
backgroundColor: "rgba(0, 0, 0, 0.6)",
|
|
1833
|
+
backdropFilter: "blur(4px)",
|
|
1834
|
+
WebkitBackdropFilter: "blur(4px)",
|
|
1564
1835
|
display: "flex",
|
|
1565
1836
|
alignItems: "center",
|
|
1566
1837
|
justifyContent: "center",
|
|
@@ -1623,7 +1894,8 @@ var styles7 = {
|
|
|
1623
1894
|
fontFamily: "ui-monospace, monospace",
|
|
1624
1895
|
resize: "vertical",
|
|
1625
1896
|
outline: "none",
|
|
1626
|
-
lineHeight: 1.5
|
|
1897
|
+
lineHeight: 1.5,
|
|
1898
|
+
transition: "border-color 0.15s ease"
|
|
1627
1899
|
},
|
|
1628
1900
|
textareaError: {
|
|
1629
1901
|
borderColor: "hsl(0 70% 50%)"
|
|
@@ -1677,12 +1949,19 @@ function FlowEditModal(props) {
|
|
|
1677
1949
|
const { isOpen, flowId, initialState, onClose, onSave, container } = props;
|
|
1678
1950
|
const [jsonValue, setJsonValue] = _react.useState.call(void 0, "");
|
|
1679
1951
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
1952
|
+
const [shake, setShake] = _react.useState.call(void 0, false);
|
|
1953
|
+
const reducedMotion = useReducedMotion();
|
|
1680
1954
|
_react.useEffect.call(void 0, () => {
|
|
1681
1955
|
if (isOpen && initialState) {
|
|
1682
1956
|
setJsonValue(JSON.stringify(initialState, null, 2));
|
|
1683
1957
|
setError(null);
|
|
1684
1958
|
}
|
|
1685
1959
|
}, [isOpen, initialState]);
|
|
1960
|
+
const triggerShake = _react.useCallback.call(void 0, () => {
|
|
1961
|
+
if (reducedMotion) return;
|
|
1962
|
+
setShake(true);
|
|
1963
|
+
setTimeout(() => setShake(false), 400);
|
|
1964
|
+
}, [reducedMotion]);
|
|
1686
1965
|
const handleSave = _react.useCallback.call(void 0, () => {
|
|
1687
1966
|
try {
|
|
1688
1967
|
const parsed = JSON.parse(jsonValue);
|
|
@@ -1699,8 +1978,9 @@ function FlowEditModal(props) {
|
|
|
1699
1978
|
onClose();
|
|
1700
1979
|
} catch (err) {
|
|
1701
1980
|
setError(err instanceof Error ? err.message : "Invalid JSON");
|
|
1981
|
+
triggerShake();
|
|
1702
1982
|
}
|
|
1703
|
-
}, [jsonValue, onSave, onClose]);
|
|
1983
|
+
}, [jsonValue, onSave, onClose, triggerShake]);
|
|
1704
1984
|
const handleKeyDown = _react.useCallback.call(void 0,
|
|
1705
1985
|
(e) => {
|
|
1706
1986
|
if (e.key === "Escape") {
|
|
@@ -1729,10 +2009,10 @@ function FlowEditModal(props) {
|
|
|
1729
2009
|
_react3.motion.div,
|
|
1730
2010
|
{
|
|
1731
2011
|
style: styles7.overlay,
|
|
1732
|
-
initial: { opacity: 0 },
|
|
2012
|
+
initial: reducedMotion ? {} : { opacity: 0 },
|
|
1733
2013
|
animate: { opacity: 1 },
|
|
1734
|
-
exit: { opacity: 0 },
|
|
1735
|
-
transition: { duration: 0.15 },
|
|
2014
|
+
exit: reducedMotion ? {} : { opacity: 0 },
|
|
2015
|
+
transition: reducedMotion ? { duration: 0 } : { duration: 0.15 },
|
|
1736
2016
|
onClick: (e) => {
|
|
1737
2017
|
if (e.target === e.currentTarget) onClose();
|
|
1738
2018
|
},
|
|
@@ -1741,10 +2021,15 @@ function FlowEditModal(props) {
|
|
|
1741
2021
|
_react3.motion.div,
|
|
1742
2022
|
{
|
|
1743
2023
|
style: styles7.modal,
|
|
1744
|
-
initial: { opacity: 0, scale: 0.95, y: 10 },
|
|
1745
|
-
animate: {
|
|
1746
|
-
|
|
1747
|
-
|
|
2024
|
+
initial: reducedMotion ? {} : { opacity: 0, scale: 0.95, y: 10 },
|
|
2025
|
+
animate: {
|
|
2026
|
+
opacity: 1,
|
|
2027
|
+
scale: 1,
|
|
2028
|
+
y: 0,
|
|
2029
|
+
x: shake ? [0, -8, 8, -6, 6, -4, 4, 0] : 0
|
|
2030
|
+
},
|
|
2031
|
+
exit: reducedMotion ? {} : { opacity: 0, scale: 0.95, y: 10 },
|
|
2032
|
+
transition: reducedMotion ? { duration: 0 } : springs.smooth,
|
|
1748
2033
|
onClick: (e) => e.stopPropagation(),
|
|
1749
2034
|
children: [
|
|
1750
2035
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles7.header, children: [
|
|
@@ -1753,12 +2038,14 @@ function FlowEditModal(props) {
|
|
|
1753
2038
|
flowId
|
|
1754
2039
|
] }),
|
|
1755
2040
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1756
|
-
|
|
2041
|
+
_react3.motion.button,
|
|
1757
2042
|
{
|
|
1758
2043
|
type: "button",
|
|
1759
2044
|
style: styles7.closeButton,
|
|
1760
2045
|
onClick: onClose,
|
|
1761
2046
|
title: "Close",
|
|
2047
|
+
whileHover: reducedMotion ? {} : { scale: 1.1 },
|
|
2048
|
+
whileTap: reducedMotion ? {} : { scale: 0.9 },
|
|
1762
2049
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" }) })
|
|
1763
2050
|
}
|
|
1764
2051
|
)
|
|
@@ -1777,15 +2064,27 @@ function FlowEditModal(props) {
|
|
|
1777
2064
|
autoFocus: true
|
|
1778
2065
|
}
|
|
1779
2066
|
),
|
|
1780
|
-
|
|
2067
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { children: error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2068
|
+
_react3.motion.div,
|
|
2069
|
+
{
|
|
2070
|
+
style: styles7.error,
|
|
2071
|
+
initial: reducedMotion ? {} : { opacity: 0, y: -4 },
|
|
2072
|
+
animate: { opacity: 1, y: 0 },
|
|
2073
|
+
exit: reducedMotion ? {} : { opacity: 0, y: -4 },
|
|
2074
|
+
transition: { duration: 0.15 },
|
|
2075
|
+
children: error
|
|
2076
|
+
}
|
|
2077
|
+
) })
|
|
1781
2078
|
] }),
|
|
1782
2079
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles7.footer, children: [
|
|
1783
2080
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1784
|
-
|
|
2081
|
+
_react3.motion.button,
|
|
1785
2082
|
{
|
|
1786
2083
|
type: "button",
|
|
1787
2084
|
style: styles7.button,
|
|
1788
2085
|
onClick: onClose,
|
|
2086
|
+
whileHover: reducedMotion ? {} : { scale: 1.02 },
|
|
2087
|
+
whileTap: reducedMotion ? {} : { scale: 0.98 },
|
|
1789
2088
|
children: "Cancel"
|
|
1790
2089
|
}
|
|
1791
2090
|
),
|
|
@@ -1796,8 +2095,8 @@ function FlowEditModal(props) {
|
|
|
1796
2095
|
style: saveButtonStyle,
|
|
1797
2096
|
onClick: handleSave,
|
|
1798
2097
|
disabled: !!error,
|
|
1799
|
-
whileHover: !error ? { scale: 1.02 } : {},
|
|
1800
|
-
whileTap: !error ? { scale: 0.98 } : {},
|
|
2098
|
+
whileHover: !error && !reducedMotion ? { scale: 1.02 } : {},
|
|
2099
|
+
whileTap: !error && !reducedMotion ? { scale: 0.98 } : {},
|
|
1801
2100
|
children: "Save"
|
|
1802
2101
|
}
|
|
1803
2102
|
)
|
|
@@ -1885,6 +2184,7 @@ var styles8 = {
|
|
|
1885
2184
|
function FlowsTab(props) {
|
|
1886
2185
|
const { container } = props;
|
|
1887
2186
|
const { flows, refreshFlows, deleteFlow, updateFlow } = useFlowsData();
|
|
2187
|
+
const reducedMotion = useReducedMotion();
|
|
1888
2188
|
const [editModal, setEditModal] = _react.useState.call(void 0, {
|
|
1889
2189
|
isOpen: false,
|
|
1890
2190
|
flowId: "",
|
|
@@ -1964,15 +2264,33 @@ function FlowsTab(props) {
|
|
|
1964
2264
|
}
|
|
1965
2265
|
)
|
|
1966
2266
|
] }),
|
|
1967
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1968
|
-
|
|
2267
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2268
|
+
_react3.motion.div,
|
|
1969
2269
|
{
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
2270
|
+
style: styles8.flowList,
|
|
2271
|
+
variants: reducedMotion ? void 0 : listContainerVariants,
|
|
2272
|
+
initial: "hidden",
|
|
2273
|
+
animate: "visible",
|
|
2274
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { mode: "popLayout", children: flows.map((flow) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2275
|
+
_react3.motion.div,
|
|
2276
|
+
{
|
|
2277
|
+
variants: reducedMotion ? void 0 : listItemVariants,
|
|
2278
|
+
initial: "hidden",
|
|
2279
|
+
animate: "visible",
|
|
2280
|
+
exit: "exit",
|
|
2281
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2282
|
+
FlowItem,
|
|
2283
|
+
{
|
|
2284
|
+
flow,
|
|
2285
|
+
onEdit: () => handleEdit(flow.flowId, flow.state),
|
|
2286
|
+
onDelete: () => void handleDelete(flow.flowId)
|
|
2287
|
+
}
|
|
2288
|
+
)
|
|
2289
|
+
},
|
|
2290
|
+
flow.flowId
|
|
2291
|
+
)) })
|
|
2292
|
+
}
|
|
2293
|
+
),
|
|
1976
2294
|
editModal.state && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1977
2295
|
FlowEditModal,
|
|
1978
2296
|
{
|
|
@@ -2580,7 +2898,8 @@ function DevToolsProvider(props) {
|
|
|
2580
2898
|
};
|
|
2581
2899
|
const headerStyle = {
|
|
2582
2900
|
...styles9.header,
|
|
2583
|
-
...isPanelDragging && styles9.headerDragging
|
|
2901
|
+
...isPanelDragging && styles9.headerDragging,
|
|
2902
|
+
...collapsed && { borderBottom: "none" }
|
|
2584
2903
|
};
|
|
2585
2904
|
const portalContainer = _nullishCoalesce(shadowContainer, () => ( document.body));
|
|
2586
2905
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
@@ -2598,6 +2917,8 @@ function DevToolsProvider(props) {
|
|
|
2598
2917
|
_react3.motion.div,
|
|
2599
2918
|
{
|
|
2600
2919
|
style: panelStyle,
|
|
2920
|
+
layoutRoot: true,
|
|
2921
|
+
layout: "size",
|
|
2601
2922
|
initial: { opacity: 0, x: 20, scale: 0.95 },
|
|
2602
2923
|
animate: { opacity: 1, x: 0, scale: 1 },
|
|
2603
2924
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
@@ -2645,15 +2966,22 @@ function DevToolsProvider(props) {
|
|
|
2645
2966
|
]
|
|
2646
2967
|
}
|
|
2647
2968
|
),
|
|
2648
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2969
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2649
2970
|
_react3.motion.div,
|
|
2650
2971
|
{
|
|
2651
|
-
style:
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2972
|
+
style: {
|
|
2973
|
+
...styles9.body,
|
|
2974
|
+
overflow: "hidden",
|
|
2975
|
+
flex: collapsed ? "0 0 auto" : "1 1 auto"
|
|
2976
|
+
},
|
|
2977
|
+
initial: false,
|
|
2978
|
+
animate: { height: collapsed ? 0 : "auto", opacity: collapsed ? 0 : 1 },
|
|
2979
|
+
transition: {
|
|
2980
|
+
height: springs.smooth,
|
|
2981
|
+
opacity: { duration: 0.12 }
|
|
2982
|
+
},
|
|
2983
|
+
"aria-hidden": collapsed,
|
|
2984
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { pointerEvents: collapsed ? "none" : "auto" }, children: [
|
|
2657
2985
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2658
2986
|
TabNav,
|
|
2659
2987
|
{
|
|
@@ -2675,9 +3003,9 @@ function DevToolsProvider(props) {
|
|
|
2675
3003
|
onExport: exportSteps
|
|
2676
3004
|
}
|
|
2677
3005
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FlowsTab, { container: shadowContainer })
|
|
2678
|
-
]
|
|
3006
|
+
] })
|
|
2679
3007
|
}
|
|
2680
|
-
)
|
|
3008
|
+
)
|
|
2681
3009
|
]
|
|
2682
3010
|
}
|
|
2683
3011
|
),
|