@flowsterix/react 0.11.0 → 0.11.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/chunk-D5LQLRSU.cjs +289 -0
- package/dist/chunk-FCOKCGV3.cjs +21 -0
- package/dist/chunk-HPVLOLCD.cjs +1 -0
- package/dist/components/TourPopoverPortal.d.ts +1 -1
- package/dist/components/TourPopoverPortal.d.ts.map +1 -1
- package/dist/context.d.ts +6 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/devtools/globalBridge.d.ts +24 -0
- package/dist/devtools/globalBridge.d.ts.map +1 -0
- package/dist/devtools/hooks/useFlowsData.d.ts.map +1 -1
- package/dist/devtools/index.cjs +409 -430
- package/dist/devtools/index.mjs +52 -21
- package/dist/hooks/useHiddenTargetFallback.d.ts.map +1 -1
- package/dist/hooks/useTourOverlay.d.ts.map +1 -1
- package/dist/index.cjs +701 -927
- package/dist/index.mjs +116 -42
- package/dist/router/index.cjs +13 -202
- package/dist/router/nextAppRouterAdapter.cjs +11 -200
- package/dist/router/nextPagesRouterAdapter.cjs +10 -199
- package/dist/router/reactRouterAdapter.cjs +10 -199
- package/dist/router/tanstackRouterAdapter.cjs +22 -214
- package/package.json +1 -1
package/dist/devtools/index.cjs
CHANGED
|
@@ -1,67 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/devtools/index.tsx
|
|
21
|
-
var devtools_exports = {};
|
|
22
|
-
__export(devtools_exports, {
|
|
23
|
-
DevToolsContext: () => DevToolsContext,
|
|
24
|
-
DevToolsProvider: () => DevToolsProvider,
|
|
25
|
-
FlowEditModal: () => FlowEditModal,
|
|
26
|
-
FlowItem: () => FlowItem,
|
|
27
|
-
FlowsTab: () => FlowsTab,
|
|
28
|
-
GrabberOverlay: () => GrabberOverlay,
|
|
29
|
-
SortableStepItem: () => SortableStepItem,
|
|
30
|
-
StepItem: () => SortableStepItem,
|
|
31
|
-
StepItemDragPreview: () => StepItemDragPreview,
|
|
32
|
-
StepList: () => StepList,
|
|
33
|
-
TabNav: () => TabNav,
|
|
34
|
-
Toolbar: () => Toolbar,
|
|
35
|
-
clearSteps: () => clearSteps,
|
|
36
|
-
extractComponentHierarchy: () => extractComponentHierarchy,
|
|
37
|
-
extractSource: () => extractSource,
|
|
38
|
-
formatSourcePath: () => formatSourcePath,
|
|
39
|
-
generateSelector: () => generateSelector,
|
|
40
|
-
getVSCodeLink: () => getVSCodeLink,
|
|
41
|
-
loadSteps: () => loadSteps,
|
|
42
|
-
saveSteps: () => saveSteps,
|
|
43
|
-
useDevToolsContext: () => useDevToolsContext,
|
|
44
|
-
useDevToolsContextRequired: () => useDevToolsContextRequired,
|
|
45
|
-
useElementInfo: () => useElementInfo,
|
|
46
|
-
useFlowsData: () => useFlowsData,
|
|
47
|
-
useGrabMode: () => useGrabMode,
|
|
48
|
-
useStepStore: () => useStepStore
|
|
49
|
-
});
|
|
50
|
-
module.exports = __toCommonJS(devtools_exports);
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkFCOKCGV3cjs = require('../chunk-FCOKCGV3.cjs');
|
|
51
6
|
|
|
52
7
|
// src/devtools/DevToolsProvider.tsx
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
8
|
+
var _react = require('react');
|
|
9
|
+
var _reactdom = require('react-dom');
|
|
10
|
+
var _react3 = require('motion/react');
|
|
56
11
|
|
|
57
12
|
// src/devtools/components/GrabberOverlay.tsx
|
|
58
|
-
|
|
59
|
-
|
|
13
|
+
|
|
14
|
+
|
|
60
15
|
|
|
61
16
|
// src/devtools/utils/sourceExtractor.ts
|
|
62
17
|
function getReactFiber(element) {
|
|
63
18
|
const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
64
|
-
if (hook
|
|
19
|
+
if (_optionalChain([hook, 'optionalAccess', _ => _.renderers])) {
|
|
65
20
|
for (const renderer of hook.renderers.values()) {
|
|
66
21
|
if (renderer.findFiberByHostInstance) {
|
|
67
22
|
const fiber = renderer.findFiberByHostInstance(element);
|
|
@@ -101,10 +56,10 @@ function findDebugSource(fiber) {
|
|
|
101
56
|
return {
|
|
102
57
|
fileName: source.fileName,
|
|
103
58
|
lineNumber: source.lineNumber,
|
|
104
|
-
columnNumber: source.columnNumber
|
|
59
|
+
columnNumber: _nullishCoalesce(source.columnNumber, () => ( 0))
|
|
105
60
|
};
|
|
106
61
|
}
|
|
107
|
-
current = current.return
|
|
62
|
+
current = _nullishCoalesce(current.return, () => ( null));
|
|
108
63
|
depth++;
|
|
109
64
|
}
|
|
110
65
|
return null;
|
|
@@ -116,7 +71,7 @@ function extractSource(params) {
|
|
|
116
71
|
const fiber = getReactFiber(element);
|
|
117
72
|
if (!fiber) return null;
|
|
118
73
|
return findDebugSource(fiber);
|
|
119
|
-
} catch {
|
|
74
|
+
} catch (e2) {
|
|
120
75
|
return null;
|
|
121
76
|
}
|
|
122
77
|
}
|
|
@@ -135,11 +90,11 @@ function extractComponentHierarchy(params) {
|
|
|
135
90
|
if (name && !hierarchy.includes(name)) {
|
|
136
91
|
hierarchy.push(name);
|
|
137
92
|
}
|
|
138
|
-
current = current.return
|
|
93
|
+
current = _nullishCoalesce(current.return, () => ( null));
|
|
139
94
|
depth++;
|
|
140
95
|
}
|
|
141
96
|
return hierarchy;
|
|
142
|
-
} catch {
|
|
97
|
+
} catch (e3) {
|
|
143
98
|
return hierarchy;
|
|
144
99
|
}
|
|
145
100
|
}
|
|
@@ -154,7 +109,7 @@ function getVSCodeLink(params) {
|
|
|
154
109
|
}
|
|
155
110
|
|
|
156
111
|
// src/devtools/components/GrabberOverlay.tsx
|
|
157
|
-
var
|
|
112
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
158
113
|
var styles = {
|
|
159
114
|
root: {
|
|
160
115
|
position: "fixed",
|
|
@@ -274,7 +229,7 @@ var springTransition = {
|
|
|
274
229
|
function GrabberOverlay(props) {
|
|
275
230
|
const { isGrabbing, hoveredInfo, container } = props;
|
|
276
231
|
if (typeof window === "undefined") return null;
|
|
277
|
-
const portalContainer = container
|
|
232
|
+
const portalContainer = _nullishCoalesce(container, () => ( document.body));
|
|
278
233
|
const labelStyle = {
|
|
279
234
|
...styles.label
|
|
280
235
|
};
|
|
@@ -288,10 +243,10 @@ function GrabberOverlay(props) {
|
|
|
288
243
|
labelStyle.left = "auto";
|
|
289
244
|
labelStyle.right = 0;
|
|
290
245
|
}
|
|
291
|
-
return (0,
|
|
292
|
-
/* @__PURE__ */ (0,
|
|
293
|
-
/* @__PURE__ */ (0,
|
|
294
|
-
|
|
246
|
+
return _reactdom.createPortal.call(void 0,
|
|
247
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.root, "data-devtools-panel": "", children: [
|
|
248
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { children: isGrabbing && hoveredInfo && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
249
|
+
_react3.motion.div,
|
|
295
250
|
{
|
|
296
251
|
style: styles.highlight,
|
|
297
252
|
initial: {
|
|
@@ -312,21 +267,21 @@ function GrabberOverlay(props) {
|
|
|
312
267
|
opacity: 0
|
|
313
268
|
},
|
|
314
269
|
transition: springTransition,
|
|
315
|
-
children: /* @__PURE__ */ (0,
|
|
316
|
-
|
|
270
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
271
|
+
_react3.motion.div,
|
|
317
272
|
{
|
|
318
273
|
style: labelStyle,
|
|
319
274
|
initial: { opacity: 0, y: 4 },
|
|
320
275
|
animate: { opacity: 1, y: 0 },
|
|
321
276
|
transition: { delay: 0.03, duration: 0.12 },
|
|
322
277
|
children: [
|
|
323
|
-
/* @__PURE__ */ (0,
|
|
324
|
-
/* @__PURE__ */ (0,
|
|
278
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.labelTop, children: [
|
|
279
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: styles.tagBadge, children: [
|
|
325
280
|
"<",
|
|
326
281
|
hoveredInfo.tag,
|
|
327
282
|
">"
|
|
328
283
|
] }),
|
|
329
|
-
hoveredInfo.text && /* @__PURE__ */ (0,
|
|
284
|
+
hoveredInfo.text && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
330
285
|
"span",
|
|
331
286
|
{
|
|
332
287
|
style: {
|
|
@@ -341,9 +296,9 @@ function GrabberOverlay(props) {
|
|
|
341
296
|
}
|
|
342
297
|
)
|
|
343
298
|
] }),
|
|
344
|
-
/* @__PURE__ */ (0,
|
|
345
|
-
hoveredInfo.source && /* @__PURE__ */ (0,
|
|
346
|
-
/* @__PURE__ */ (0,
|
|
299
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.selector, children: hoveredInfo.selector }),
|
|
300
|
+
hoveredInfo.source && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.source, children: [
|
|
301
|
+
/* @__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: "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" }) }),
|
|
347
302
|
formatSourcePath({ source: hoveredInfo.source })
|
|
348
303
|
] })
|
|
349
304
|
]
|
|
@@ -352,8 +307,8 @@ function GrabberOverlay(props) {
|
|
|
352
307
|
},
|
|
353
308
|
"grabber-highlight"
|
|
354
309
|
) }),
|
|
355
|
-
/* @__PURE__ */ (0,
|
|
356
|
-
|
|
310
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { children: isGrabbing && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
311
|
+
_react3.motion.div,
|
|
357
312
|
{
|
|
358
313
|
style: styles.hint,
|
|
359
314
|
initial: { opacity: 0, y: 10, scale: 0.95 },
|
|
@@ -361,19 +316,19 @@ function GrabberOverlay(props) {
|
|
|
361
316
|
exit: { opacity: 0, y: 10, scale: 0.95 },
|
|
362
317
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
363
318
|
children: [
|
|
364
|
-
/* @__PURE__ */ (0,
|
|
365
|
-
/* @__PURE__ */ (0,
|
|
366
|
-
/* @__PURE__ */ (0,
|
|
319
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.hintItem, children: [
|
|
320
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.kbd, children: "Click" }),
|
|
321
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Add step" })
|
|
367
322
|
] }),
|
|
368
|
-
/* @__PURE__ */ (0,
|
|
369
|
-
/* @__PURE__ */ (0,
|
|
370
|
-
/* @__PURE__ */ (0,
|
|
371
|
-
/* @__PURE__ */ (0,
|
|
323
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.divider }),
|
|
324
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.hintItem, children: [
|
|
325
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.kbd, children: "ESC" }),
|
|
326
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Cancel" })
|
|
372
327
|
] }),
|
|
373
|
-
/* @__PURE__ */ (0,
|
|
374
|
-
/* @__PURE__ */ (0,
|
|
375
|
-
/* @__PURE__ */ (0,
|
|
376
|
-
/* @__PURE__ */ (0,
|
|
328
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles.divider }),
|
|
329
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles.hintItem, children: [
|
|
330
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles.kbd, children: "Ctrl+Shift+G" }),
|
|
331
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Toggle" })
|
|
377
332
|
] })
|
|
378
333
|
]
|
|
379
334
|
},
|
|
@@ -385,14 +340,26 @@ function GrabberOverlay(props) {
|
|
|
385
340
|
}
|
|
386
341
|
|
|
387
342
|
// src/devtools/components/StepList.tsx
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
var _core = require('@dnd-kit/core');
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
var _sortable = require('@dnd-kit/sortable');
|
|
391
358
|
|
|
392
359
|
// src/devtools/components/StepItem.tsx
|
|
393
|
-
|
|
394
|
-
var
|
|
395
|
-
|
|
360
|
+
|
|
361
|
+
var _utilities = require('@dnd-kit/utilities');
|
|
362
|
+
|
|
396
363
|
var styles2 = {
|
|
397
364
|
card: {
|
|
398
365
|
display: "flex",
|
|
@@ -549,7 +516,7 @@ function SortableStepItem(props) {
|
|
|
549
516
|
transform,
|
|
550
517
|
transition,
|
|
551
518
|
isDragging
|
|
552
|
-
} = (0,
|
|
519
|
+
} = _sortable.useSortable.call(void 0, { id: step.id });
|
|
553
520
|
const handleCopySource = async () => {
|
|
554
521
|
if (step.source) {
|
|
555
522
|
const path = formatSourcePath({ source: step.source });
|
|
@@ -558,8 +525,8 @@ function SortableStepItem(props) {
|
|
|
558
525
|
};
|
|
559
526
|
const isGhost = isDragging || isBeingDragged;
|
|
560
527
|
const wrapperStyle = {
|
|
561
|
-
transform:
|
|
562
|
-
transition: transition
|
|
528
|
+
transform: _utilities.CSS.Transform.toString(transform),
|
|
529
|
+
transition: _nullishCoalesce(transition, () => ( "transform 200ms ease"))
|
|
563
530
|
};
|
|
564
531
|
const cardStyle = {
|
|
565
532
|
...styles2.card,
|
|
@@ -568,38 +535,38 @@ function SortableStepItem(props) {
|
|
|
568
535
|
const handleStyle = {
|
|
569
536
|
...styles2.dragHandle
|
|
570
537
|
};
|
|
571
|
-
return /* @__PURE__ */ (0,
|
|
572
|
-
/* @__PURE__ */ (0,
|
|
573
|
-
/* @__PURE__ */ (0,
|
|
574
|
-
/* @__PURE__ */ (0,
|
|
575
|
-
/* @__PURE__ */ (0,
|
|
576
|
-
/* @__PURE__ */ (0,
|
|
577
|
-
/* @__PURE__ */ (0,
|
|
578
|
-
/* @__PURE__ */ (0,
|
|
538
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: setNodeRef, style: wrapperStyle, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: cardStyle, children: [
|
|
539
|
+
/* @__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: [
|
|
540
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "3", cy: "2", r: "1.5" }),
|
|
541
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "7", cy: "2", r: "1.5" }),
|
|
542
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "3", cy: "8", r: "1.5" }),
|
|
543
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "7", cy: "8", r: "1.5" }),
|
|
544
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "3", cy: "14", r: "1.5" }),
|
|
545
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "7", cy: "14", r: "1.5" })
|
|
579
546
|
] }) }),
|
|
580
|
-
/* @__PURE__ */ (0,
|
|
581
|
-
/* @__PURE__ */ (0,
|
|
582
|
-
/* @__PURE__ */ (0,
|
|
583
|
-
/* @__PURE__ */ (0,
|
|
547
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles2.content, children: [
|
|
548
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles2.header, children: [
|
|
549
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles2.order, children: index + 1 }),
|
|
550
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: styles2.tagBadge, children: [
|
|
584
551
|
"<",
|
|
585
552
|
step.elementTag,
|
|
586
553
|
">"
|
|
587
554
|
] }),
|
|
588
|
-
step.elementText && /* @__PURE__ */ (0,
|
|
555
|
+
step.elementText && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles2.text, children: step.elementText })
|
|
589
556
|
] }),
|
|
590
|
-
/* @__PURE__ */ (0,
|
|
591
|
-
step.source && /* @__PURE__ */ (0,
|
|
592
|
-
/* @__PURE__ */ (0,
|
|
557
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles2.selector, children: step.selector }),
|
|
558
|
+
step.source && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles2.sourceRow, children: [
|
|
559
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
593
560
|
"svg",
|
|
594
561
|
{
|
|
595
562
|
width: "10",
|
|
596
563
|
height: "10",
|
|
597
564
|
viewBox: "0 0 16 16",
|
|
598
565
|
fill: "hsl(142 71% 55%)",
|
|
599
|
-
children: /* @__PURE__ */ (0,
|
|
566
|
+
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" })
|
|
600
567
|
}
|
|
601
568
|
),
|
|
602
|
-
/* @__PURE__ */ (0,
|
|
569
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
603
570
|
"a",
|
|
604
571
|
{
|
|
605
572
|
href: getVSCodeLink({ source: step.source }),
|
|
@@ -608,14 +575,14 @@ function SortableStepItem(props) {
|
|
|
608
575
|
children: formatSourcePath({ source: step.source })
|
|
609
576
|
}
|
|
610
577
|
),
|
|
611
|
-
/* @__PURE__ */ (0,
|
|
578
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
612
579
|
"button",
|
|
613
580
|
{
|
|
614
581
|
type: "button",
|
|
615
582
|
style: styles2.copyButton,
|
|
616
583
|
onClick: handleCopySource,
|
|
617
584
|
title: "Copy path",
|
|
618
|
-
children: /* @__PURE__ */ (0,
|
|
585
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
619
586
|
"svg",
|
|
620
587
|
{
|
|
621
588
|
width: "10",
|
|
@@ -623,8 +590,8 @@ function SortableStepItem(props) {
|
|
|
623
590
|
viewBox: "0 0 16 16",
|
|
624
591
|
fill: "currentColor",
|
|
625
592
|
children: [
|
|
626
|
-
/* @__PURE__ */ (0,
|
|
627
|
-
/* @__PURE__ */ (0,
|
|
593
|
+
/* @__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" }),
|
|
594
|
+
/* @__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" })
|
|
628
595
|
]
|
|
629
596
|
}
|
|
630
597
|
)
|
|
@@ -632,14 +599,14 @@ function SortableStepItem(props) {
|
|
|
632
599
|
)
|
|
633
600
|
] })
|
|
634
601
|
] }),
|
|
635
|
-
/* @__PURE__ */ (0,
|
|
602
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
636
603
|
"button",
|
|
637
604
|
{
|
|
638
605
|
type: "button",
|
|
639
606
|
style: styles2.deleteButton,
|
|
640
607
|
onClick: onDelete,
|
|
641
608
|
title: "Delete step",
|
|
642
|
-
children: /* @__PURE__ */ (0,
|
|
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" }) })
|
|
643
610
|
}
|
|
644
611
|
)
|
|
645
612
|
] }) });
|
|
@@ -656,48 +623,48 @@ function StepItemDragPreview(props) {
|
|
|
656
623
|
...styles2.dragHandle,
|
|
657
624
|
...styles2.dragHandleActive
|
|
658
625
|
};
|
|
659
|
-
return /* @__PURE__ */ (0,
|
|
660
|
-
/* @__PURE__ */ (0,
|
|
661
|
-
/* @__PURE__ */ (0,
|
|
662
|
-
/* @__PURE__ */ (0,
|
|
663
|
-
/* @__PURE__ */ (0,
|
|
664
|
-
/* @__PURE__ */ (0,
|
|
665
|
-
/* @__PURE__ */ (0,
|
|
666
|
-
/* @__PURE__ */ (0,
|
|
626
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: cardStyle, children: [
|
|
627
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: handleStyle, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "10", height: "16", viewBox: "0 0 10 16", fill: "currentColor", children: [
|
|
628
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "3", cy: "2", r: "1.5" }),
|
|
629
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "7", cy: "2", r: "1.5" }),
|
|
630
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "3", cy: "8", r: "1.5" }),
|
|
631
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "7", cy: "8", r: "1.5" }),
|
|
632
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "3", cy: "14", r: "1.5" }),
|
|
633
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "7", cy: "14", r: "1.5" })
|
|
667
634
|
] }) }),
|
|
668
|
-
/* @__PURE__ */ (0,
|
|
669
|
-
/* @__PURE__ */ (0,
|
|
670
|
-
/* @__PURE__ */ (0,
|
|
671
|
-
/* @__PURE__ */ (0,
|
|
635
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles2.content, children: [
|
|
636
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles2.header, children: [
|
|
637
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles2.order, children: index + 1 }),
|
|
638
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: styles2.tagBadge, children: [
|
|
672
639
|
"<",
|
|
673
640
|
step.elementTag,
|
|
674
641
|
">"
|
|
675
642
|
] }),
|
|
676
|
-
step.elementText && /* @__PURE__ */ (0,
|
|
643
|
+
step.elementText && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles2.text, children: step.elementText })
|
|
677
644
|
] }),
|
|
678
|
-
/* @__PURE__ */ (0,
|
|
679
|
-
step.source && /* @__PURE__ */ (0,
|
|
680
|
-
/* @__PURE__ */ (0,
|
|
645
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles2.selector, children: step.selector }),
|
|
646
|
+
step.source && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles2.sourceRow, children: [
|
|
647
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
681
648
|
"svg",
|
|
682
649
|
{
|
|
683
650
|
width: "10",
|
|
684
651
|
height: "10",
|
|
685
652
|
viewBox: "0 0 16 16",
|
|
686
653
|
fill: "hsl(142 71% 55%)",
|
|
687
|
-
children: /* @__PURE__ */ (0,
|
|
654
|
+
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" })
|
|
688
655
|
}
|
|
689
656
|
),
|
|
690
|
-
/* @__PURE__ */ (0,
|
|
657
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles2.sourceLink, children: formatSourcePath({ source: step.source }) })
|
|
691
658
|
] })
|
|
692
659
|
] }),
|
|
693
|
-
/* @__PURE__ */ (0,
|
|
660
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { ...styles2.deleteButton, visibility: "hidden" }, 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" }) }) })
|
|
694
661
|
] });
|
|
695
662
|
}
|
|
696
663
|
|
|
697
664
|
// src/devtools/components/Toolbar.tsx
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
701
668
|
var styles3 = {
|
|
702
669
|
toolbar: {
|
|
703
670
|
display: "flex",
|
|
@@ -792,7 +759,7 @@ var styles3 = {
|
|
|
792
759
|
};
|
|
793
760
|
function Toolbar(props) {
|
|
794
761
|
const { mode, stepCount, onToggleGrab, onExport, onCopyForAI, onReset } = props;
|
|
795
|
-
const [copied, setCopied] = (0,
|
|
762
|
+
const [copied, setCopied] = _react.useState.call(void 0, false);
|
|
796
763
|
const isGrabbing = mode === "grabbing";
|
|
797
764
|
const hasSteps = stepCount > 0;
|
|
798
765
|
const handleCopy = async () => {
|
|
@@ -817,17 +784,17 @@ function Toolbar(props) {
|
|
|
817
784
|
...!hasSteps && styles3.actionButtonDisabled,
|
|
818
785
|
...hasSteps && styles3.actionButtonDanger
|
|
819
786
|
};
|
|
820
|
-
return /* @__PURE__ */ (0,
|
|
821
|
-
/* @__PURE__ */ (0,
|
|
822
|
-
|
|
787
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles3.toolbar, children: [
|
|
788
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles3.grabRow, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
789
|
+
_react3.motion.button,
|
|
823
790
|
{
|
|
824
791
|
type: "button",
|
|
825
792
|
style: grabButtonStyle,
|
|
826
793
|
onClick: onToggleGrab,
|
|
827
794
|
whileHover: { scale: 1.01 },
|
|
828
795
|
whileTap: { scale: 0.98 },
|
|
829
|
-
children: isGrabbing ? /* @__PURE__ */ (0,
|
|
830
|
-
/* @__PURE__ */ (0,
|
|
796
|
+
children: isGrabbing ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
797
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
831
798
|
"svg",
|
|
832
799
|
{
|
|
833
800
|
width: "14",
|
|
@@ -835,8 +802,8 @@ function Toolbar(props) {
|
|
|
835
802
|
viewBox: "0 0 16 16",
|
|
836
803
|
fill: "currentColor",
|
|
837
804
|
children: [
|
|
838
|
-
/* @__PURE__ */ (0,
|
|
839
|
-
/* @__PURE__ */ (0,
|
|
805
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "circle", { cx: "8", cy: "8", r: "3", children: [
|
|
806
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
840
807
|
"animate",
|
|
841
808
|
{
|
|
842
809
|
attributeName: "r",
|
|
@@ -845,7 +812,7 @@ function Toolbar(props) {
|
|
|
845
812
|
repeatCount: "indefinite"
|
|
846
813
|
}
|
|
847
814
|
),
|
|
848
|
-
/* @__PURE__ */ (0,
|
|
815
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
849
816
|
"animate",
|
|
850
817
|
{
|
|
851
818
|
attributeName: "opacity",
|
|
@@ -855,7 +822,7 @@ function Toolbar(props) {
|
|
|
855
822
|
}
|
|
856
823
|
)
|
|
857
824
|
] }),
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
825
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
859
826
|
"circle",
|
|
860
827
|
{
|
|
861
828
|
cx: "8",
|
|
@@ -866,7 +833,7 @@ function Toolbar(props) {
|
|
|
866
833
|
strokeWidth: "1",
|
|
867
834
|
opacity: "0.3",
|
|
868
835
|
children: [
|
|
869
|
-
/* @__PURE__ */ (0,
|
|
836
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
870
837
|
"animate",
|
|
871
838
|
{
|
|
872
839
|
attributeName: "r",
|
|
@@ -875,7 +842,7 @@ function Toolbar(props) {
|
|
|
875
842
|
repeatCount: "indefinite"
|
|
876
843
|
}
|
|
877
844
|
),
|
|
878
|
-
/* @__PURE__ */ (0,
|
|
845
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
879
846
|
"animate",
|
|
880
847
|
{
|
|
881
848
|
attributeName: "opacity",
|
|
@@ -891,25 +858,25 @@ function Toolbar(props) {
|
|
|
891
858
|
}
|
|
892
859
|
),
|
|
893
860
|
"Grabbing..."
|
|
894
|
-
] }) : /* @__PURE__ */ (0,
|
|
895
|
-
/* @__PURE__ */ (0,
|
|
861
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
862
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
896
863
|
"svg",
|
|
897
864
|
{
|
|
898
865
|
width: "14",
|
|
899
866
|
height: "14",
|
|
900
867
|
viewBox: "0 0 16 16",
|
|
901
868
|
fill: "currentColor",
|
|
902
|
-
children: /* @__PURE__ */ (0,
|
|
869
|
+
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" })
|
|
903
870
|
}
|
|
904
871
|
),
|
|
905
872
|
"Grab Element",
|
|
906
|
-
/* @__PURE__ */ (0,
|
|
873
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles3.kbd, children: "Ctrl+Shift+G" })
|
|
907
874
|
] })
|
|
908
875
|
}
|
|
909
876
|
) }),
|
|
910
|
-
/* @__PURE__ */ (0,
|
|
911
|
-
/* @__PURE__ */ (0,
|
|
912
|
-
|
|
877
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles3.actionRow, children: [
|
|
878
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
879
|
+
_react3.motion.button,
|
|
913
880
|
{
|
|
914
881
|
type: "button",
|
|
915
882
|
style: exportButtonStyle,
|
|
@@ -919,16 +886,16 @@ function Toolbar(props) {
|
|
|
919
886
|
whileTap: hasSteps ? { scale: 0.98 } : {},
|
|
920
887
|
title: "Download JSON file",
|
|
921
888
|
children: [
|
|
922
|
-
/* @__PURE__ */ (0,
|
|
923
|
-
/* @__PURE__ */ (0,
|
|
924
|
-
/* @__PURE__ */ (0,
|
|
889
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "11", height: "11", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
890
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z" }),
|
|
891
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z" })
|
|
925
892
|
] }),
|
|
926
893
|
"Export"
|
|
927
894
|
]
|
|
928
895
|
}
|
|
929
896
|
),
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
931
|
-
|
|
897
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
898
|
+
_react3.motion.button,
|
|
932
899
|
{
|
|
933
900
|
type: "button",
|
|
934
901
|
style: copyButtonStyle,
|
|
@@ -938,13 +905,13 @@ function Toolbar(props) {
|
|
|
938
905
|
whileTap: hasSteps ? { scale: 0.98 } : {},
|
|
939
906
|
title: "Copy JSON to clipboard",
|
|
940
907
|
children: [
|
|
941
|
-
/* @__PURE__ */ (0,
|
|
942
|
-
/* @__PURE__ */ (0,
|
|
943
|
-
/* @__PURE__ */ (0,
|
|
908
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "11", height: "11", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
909
|
+
/* @__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" }),
|
|
910
|
+
/* @__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" })
|
|
944
911
|
] }),
|
|
945
912
|
"Copy",
|
|
946
|
-
copied && /* @__PURE__ */ (0,
|
|
947
|
-
|
|
913
|
+
copied && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
914
|
+
_react3.motion.span,
|
|
948
915
|
{
|
|
949
916
|
style: styles3.copiedBadge,
|
|
950
917
|
initial: { opacity: 0, scale: 0.8, y: 4 },
|
|
@@ -956,8 +923,8 @@ function Toolbar(props) {
|
|
|
956
923
|
]
|
|
957
924
|
}
|
|
958
925
|
),
|
|
959
|
-
/* @__PURE__ */ (0,
|
|
960
|
-
|
|
926
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
927
|
+
_react3.motion.button,
|
|
961
928
|
{
|
|
962
929
|
type: "button",
|
|
963
930
|
style: resetButtonStyle,
|
|
@@ -967,9 +934,9 @@ function Toolbar(props) {
|
|
|
967
934
|
whileTap: hasSteps ? { scale: 0.98 } : {},
|
|
968
935
|
title: "Clear all steps",
|
|
969
936
|
children: [
|
|
970
|
-
/* @__PURE__ */ (0,
|
|
971
|
-
/* @__PURE__ */ (0,
|
|
972
|
-
/* @__PURE__ */ (0,
|
|
937
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "11", height: "11", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
938
|
+
/* @__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" }),
|
|
939
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
973
940
|
"path",
|
|
974
941
|
{
|
|
975
942
|
fillRule: "evenodd",
|
|
@@ -986,7 +953,7 @@ function Toolbar(props) {
|
|
|
986
953
|
}
|
|
987
954
|
|
|
988
955
|
// src/devtools/components/StepList.tsx
|
|
989
|
-
|
|
956
|
+
|
|
990
957
|
var styles4 = {
|
|
991
958
|
scrollArea: {
|
|
992
959
|
flex: 1,
|
|
@@ -1045,23 +1012,23 @@ function StepList(props) {
|
|
|
1045
1012
|
onClearAll,
|
|
1046
1013
|
onExport
|
|
1047
1014
|
} = props;
|
|
1048
|
-
const [activeId, setActiveId] = (0,
|
|
1015
|
+
const [activeId, setActiveId] = _react.useState.call(void 0, null);
|
|
1049
1016
|
const activeStep = activeId ? steps.find((s) => s.id === activeId) : null;
|
|
1050
1017
|
const activeIndex = activeId ? steps.findIndex((s) => s.id === activeId) : -1;
|
|
1051
|
-
const sensors = (0,
|
|
1052
|
-
(0,
|
|
1018
|
+
const sensors = _core.useSensors.call(void 0,
|
|
1019
|
+
_core.useSensor.call(void 0, _core.PointerSensor, {
|
|
1053
1020
|
activationConstraint: {
|
|
1054
1021
|
distance: 4
|
|
1055
1022
|
}
|
|
1056
1023
|
}),
|
|
1057
|
-
(0,
|
|
1058
|
-
coordinateGetter:
|
|
1024
|
+
_core.useSensor.call(void 0, _core.KeyboardSensor, {
|
|
1025
|
+
coordinateGetter: _sortable.sortableKeyboardCoordinates
|
|
1059
1026
|
})
|
|
1060
1027
|
);
|
|
1061
|
-
const handleDragStart = (0,
|
|
1028
|
+
const handleDragStart = _react.useCallback.call(void 0, (event) => {
|
|
1062
1029
|
setActiveId(event.active.id);
|
|
1063
1030
|
}, []);
|
|
1064
|
-
const handleDragEnd = (0,
|
|
1031
|
+
const handleDragEnd = _react.useCallback.call(void 0,
|
|
1065
1032
|
(event) => {
|
|
1066
1033
|
const { active, over } = event;
|
|
1067
1034
|
setActiveId(null);
|
|
@@ -1075,10 +1042,10 @@ function StepList(props) {
|
|
|
1075
1042
|
},
|
|
1076
1043
|
[steps, onReorderSteps]
|
|
1077
1044
|
);
|
|
1078
|
-
const handleDragCancel = (0,
|
|
1045
|
+
const handleDragCancel = _react.useCallback.call(void 0, () => {
|
|
1079
1046
|
setActiveId(null);
|
|
1080
1047
|
}, []);
|
|
1081
|
-
const handleExportClick = (0,
|
|
1048
|
+
const handleExportClick = _react.useCallback.call(void 0, () => {
|
|
1082
1049
|
const data = onExport();
|
|
1083
1050
|
const blob = new Blob([JSON.stringify(data, null, 2)], {
|
|
1084
1051
|
type: "application/json"
|
|
@@ -1090,18 +1057,18 @@ function StepList(props) {
|
|
|
1090
1057
|
a.click();
|
|
1091
1058
|
URL.revokeObjectURL(url);
|
|
1092
1059
|
}, [onExport]);
|
|
1093
|
-
const handleCopyForAI = (0,
|
|
1060
|
+
const handleCopyForAI = _react.useCallback.call(void 0, async () => {
|
|
1094
1061
|
const data = onExport();
|
|
1095
1062
|
await navigator.clipboard.writeText(JSON.stringify(data, null, 2));
|
|
1096
1063
|
}, [onExport]);
|
|
1097
|
-
const handleReset = (0,
|
|
1064
|
+
const handleReset = _react.useCallback.call(void 0, () => {
|
|
1098
1065
|
if (confirm("Clear all steps? This cannot be undone.")) {
|
|
1099
1066
|
onClearAll();
|
|
1100
1067
|
}
|
|
1101
1068
|
}, [onClearAll]);
|
|
1102
1069
|
if (typeof window === "undefined") return null;
|
|
1103
|
-
return /* @__PURE__ */ (0,
|
|
1104
|
-
/* @__PURE__ */ (0,
|
|
1070
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1071
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1105
1072
|
Toolbar,
|
|
1106
1073
|
{
|
|
1107
1074
|
mode,
|
|
@@ -1112,40 +1079,40 @@ function StepList(props) {
|
|
|
1112
1079
|
onReset: handleReset
|
|
1113
1080
|
}
|
|
1114
1081
|
),
|
|
1115
|
-
/* @__PURE__ */ (0,
|
|
1116
|
-
/* @__PURE__ */ (0,
|
|
1082
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles4.scrollArea, children: steps.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles4.empty, children: [
|
|
1083
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles4.emptyIcon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1117
1084
|
"svg",
|
|
1118
1085
|
{
|
|
1119
1086
|
width: "20",
|
|
1120
1087
|
height: "20",
|
|
1121
1088
|
viewBox: "0 0 16 16",
|
|
1122
1089
|
fill: "hsl(215 20% 45%)",
|
|
1123
|
-
children: /* @__PURE__ */ (0,
|
|
1090
|
+
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" })
|
|
1124
1091
|
}
|
|
1125
1092
|
) }),
|
|
1126
|
-
/* @__PURE__ */ (0,
|
|
1127
|
-
/* @__PURE__ */ (0,
|
|
1128
|
-
/* @__PURE__ */ (0,
|
|
1093
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles4.emptyText, children: [
|
|
1094
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: "No steps captured yet." }),
|
|
1095
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { marginTop: 6 }, children: [
|
|
1129
1096
|
"Press ",
|
|
1130
|
-
/* @__PURE__ */ (0,
|
|
1097
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles4.kbd, children: "Ctrl+Shift+G" }),
|
|
1131
1098
|
" to grab"
|
|
1132
1099
|
] })
|
|
1133
1100
|
] })
|
|
1134
|
-
] }) : /* @__PURE__ */ (0,
|
|
1135
|
-
|
|
1101
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1102
|
+
_core.DndContext,
|
|
1136
1103
|
{
|
|
1137
1104
|
sensors,
|
|
1138
|
-
collisionDetection:
|
|
1105
|
+
collisionDetection: _core.closestCenter,
|
|
1139
1106
|
onDragStart: handleDragStart,
|
|
1140
1107
|
onDragEnd: handleDragEnd,
|
|
1141
1108
|
onDragCancel: handleDragCancel,
|
|
1142
1109
|
children: [
|
|
1143
|
-
/* @__PURE__ */ (0,
|
|
1144
|
-
|
|
1110
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1111
|
+
_sortable.SortableContext,
|
|
1145
1112
|
{
|
|
1146
1113
|
items: steps.map((s) => s.id),
|
|
1147
|
-
strategy:
|
|
1148
|
-
children: /* @__PURE__ */ (0,
|
|
1114
|
+
strategy: _sortable.verticalListSortingStrategy,
|
|
1115
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles4.stepList, children: steps.map((step, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1149
1116
|
SortableStepItem,
|
|
1150
1117
|
{
|
|
1151
1118
|
step,
|
|
@@ -1158,7 +1125,7 @@ function StepList(props) {
|
|
|
1158
1125
|
)) })
|
|
1159
1126
|
}
|
|
1160
1127
|
),
|
|
1161
|
-
/* @__PURE__ */ (0,
|
|
1128
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _core.DragOverlay, { dropAnimation: null, children: activeStep && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StepItemDragPreview, { step: activeStep, index: activeIndex }) })
|
|
1162
1129
|
]
|
|
1163
1130
|
}
|
|
1164
1131
|
) })
|
|
@@ -1166,7 +1133,7 @@ function StepList(props) {
|
|
|
1166
1133
|
}
|
|
1167
1134
|
|
|
1168
1135
|
// src/devtools/components/TabNav.tsx
|
|
1169
|
-
|
|
1136
|
+
|
|
1170
1137
|
var styles5 = {
|
|
1171
1138
|
container: {
|
|
1172
1139
|
display: "flex",
|
|
@@ -1233,30 +1200,30 @@ function TabNav(props) {
|
|
|
1233
1200
|
...styles5.badge,
|
|
1234
1201
|
...activeTab === "flows" && styles5.badgeActive
|
|
1235
1202
|
};
|
|
1236
|
-
return /* @__PURE__ */ (0,
|
|
1237
|
-
/* @__PURE__ */ (0,
|
|
1203
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles5.container, children: [
|
|
1204
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1238
1205
|
"button",
|
|
1239
1206
|
{
|
|
1240
1207
|
type: "button",
|
|
1241
1208
|
style: stepsTabStyle,
|
|
1242
1209
|
onClick: () => onTabChange("steps"),
|
|
1243
1210
|
children: [
|
|
1244
|
-
/* @__PURE__ */ (0,
|
|
1211
|
+
/* @__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" }) }),
|
|
1245
1212
|
"Steps",
|
|
1246
|
-
stepCount > 0 && /* @__PURE__ */ (0,
|
|
1213
|
+
stepCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: stepsBadgeStyle, children: stepCount })
|
|
1247
1214
|
]
|
|
1248
1215
|
}
|
|
1249
1216
|
),
|
|
1250
|
-
/* @__PURE__ */ (0,
|
|
1217
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1251
1218
|
"button",
|
|
1252
1219
|
{
|
|
1253
1220
|
type: "button",
|
|
1254
1221
|
style: flowsTabStyle,
|
|
1255
1222
|
onClick: () => onTabChange("flows"),
|
|
1256
1223
|
children: [
|
|
1257
|
-
/* @__PURE__ */ (0,
|
|
1224
|
+
/* @__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" }) }),
|
|
1258
1225
|
"Flows",
|
|
1259
|
-
flowCount > 0 && /* @__PURE__ */ (0,
|
|
1226
|
+
flowCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: flowsBadgeStyle, children: flowCount })
|
|
1260
1227
|
]
|
|
1261
1228
|
}
|
|
1262
1229
|
)
|
|
@@ -1264,38 +1231,53 @@ function TabNav(props) {
|
|
|
1264
1231
|
}
|
|
1265
1232
|
|
|
1266
1233
|
// src/devtools/components/FlowsTab.tsx
|
|
1267
|
-
|
|
1268
|
-
|
|
1234
|
+
|
|
1235
|
+
|
|
1269
1236
|
|
|
1270
1237
|
// src/devtools/hooks/useFlowsData.ts
|
|
1271
|
-
var import_react6 = require("react");
|
|
1272
1238
|
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
var
|
|
1276
|
-
function
|
|
1277
|
-
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
const
|
|
1281
|
-
if (!
|
|
1282
|
-
|
|
1283
|
-
"useDevToolsContext must be used within a TourProvider with devtools enabled"
|
|
1284
|
-
);
|
|
1239
|
+
|
|
1240
|
+
// src/devtools/globalBridge.ts
|
|
1241
|
+
var BRIDGE_KEY = "__FLOWSTERIX_DEVTOOLS_BRIDGE__";
|
|
1242
|
+
function getBridge() {
|
|
1243
|
+
if (typeof window === "undefined") {
|
|
1244
|
+
return { value: null, listeners: /* @__PURE__ */ new Set() };
|
|
1245
|
+
}
|
|
1246
|
+
const w = window;
|
|
1247
|
+
if (!w[BRIDGE_KEY]) {
|
|
1248
|
+
w[BRIDGE_KEY] = { value: null, listeners: /* @__PURE__ */ new Set() };
|
|
1285
1249
|
}
|
|
1286
|
-
return
|
|
1250
|
+
return w[BRIDGE_KEY];
|
|
1251
|
+
}
|
|
1252
|
+
function getDevToolsBridge() {
|
|
1253
|
+
return getBridge().value;
|
|
1254
|
+
}
|
|
1255
|
+
function subscribeDevToolsBridge(listener) {
|
|
1256
|
+
const bridge = getBridge();
|
|
1257
|
+
bridge.listeners.add(listener);
|
|
1258
|
+
return () => {
|
|
1259
|
+
bridge.listeners.delete(listener);
|
|
1260
|
+
};
|
|
1287
1261
|
}
|
|
1288
1262
|
|
|
1289
1263
|
// src/devtools/hooks/useFlowsData.ts
|
|
1264
|
+
function useBridge() {
|
|
1265
|
+
return _react.useSyncExternalStore.call(void 0,
|
|
1266
|
+
subscribeDevToolsBridge,
|
|
1267
|
+
getDevToolsBridge,
|
|
1268
|
+
() => null
|
|
1269
|
+
// Server snapshot
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1290
1272
|
function useFlowsData() {
|
|
1291
|
-
const
|
|
1292
|
-
const [flowsData, setFlowsData] = (0,
|
|
1293
|
-
const loadFlowStates = (0,
|
|
1294
|
-
if (!
|
|
1273
|
+
const bridge = useBridge();
|
|
1274
|
+
const [flowsData, setFlowsData] = _react.useState.call(void 0, []);
|
|
1275
|
+
const loadFlowStates = _react.useCallback.call(void 0, async () => {
|
|
1276
|
+
if (!bridge) {
|
|
1295
1277
|
setFlowsData([]);
|
|
1296
1278
|
return;
|
|
1297
1279
|
}
|
|
1298
|
-
const { flows, activeFlowId, state: activeState, getFlowState } =
|
|
1280
|
+
const { flows, activeFlowId, state: activeState, getFlowState } = bridge;
|
|
1299
1281
|
const flowDataPromises = [];
|
|
1300
1282
|
for (const [flowId, definition] of flows) {
|
|
1301
1283
|
const isActive = flowId === activeFlowId;
|
|
@@ -1313,30 +1295,28 @@ function useFlowsData() {
|
|
|
1313
1295
|
}
|
|
1314
1296
|
const results = await Promise.all(flowDataPromises);
|
|
1315
1297
|
setFlowsData(results);
|
|
1316
|
-
}, [
|
|
1317
|
-
(0,
|
|
1298
|
+
}, [bridge]);
|
|
1299
|
+
_react.useEffect.call(void 0, () => {
|
|
1318
1300
|
void loadFlowStates();
|
|
1319
1301
|
}, [loadFlowStates]);
|
|
1320
|
-
|
|
1321
|
-
if (!devtools?.activeFlowId || !devtools?.state) return;
|
|
1322
|
-
void loadFlowStates();
|
|
1323
|
-
}, [devtools?.activeFlowId, devtools?.state, loadFlowStates]);
|
|
1324
|
-
const deleteFlow = (0, import_react6.useCallback)(
|
|
1302
|
+
const deleteFlow = _react.useCallback.call(void 0,
|
|
1325
1303
|
async (flowId) => {
|
|
1326
|
-
if (!
|
|
1327
|
-
|
|
1328
|
-
|
|
1304
|
+
if (!bridge) return;
|
|
1305
|
+
if (bridge.activeFlowId === flowId) {
|
|
1306
|
+
bridge.cancel();
|
|
1307
|
+
}
|
|
1308
|
+
await bridge.deleteFlowStorage(flowId);
|
|
1329
1309
|
await loadFlowStates();
|
|
1330
1310
|
},
|
|
1331
|
-
[
|
|
1311
|
+
[bridge, loadFlowStates]
|
|
1332
1312
|
);
|
|
1333
|
-
const updateFlow = (0,
|
|
1334
|
-
async (flowId,
|
|
1335
|
-
if (!
|
|
1336
|
-
await
|
|
1313
|
+
const updateFlow = _react.useCallback.call(void 0,
|
|
1314
|
+
async (flowId, newState) => {
|
|
1315
|
+
if (!bridge) return;
|
|
1316
|
+
await bridge.updateFlowStorage(flowId, newState);
|
|
1337
1317
|
await loadFlowStates();
|
|
1338
1318
|
},
|
|
1339
|
-
[
|
|
1319
|
+
[bridge, loadFlowStates]
|
|
1340
1320
|
);
|
|
1341
1321
|
return {
|
|
1342
1322
|
flows: flowsData,
|
|
@@ -1347,9 +1327,9 @@ function useFlowsData() {
|
|
|
1347
1327
|
}
|
|
1348
1328
|
|
|
1349
1329
|
// src/devtools/components/FlowItem.tsx
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
|
|
1353
1333
|
var styles6 = {
|
|
1354
1334
|
card: {
|
|
1355
1335
|
display: "flex",
|
|
@@ -1480,7 +1460,7 @@ var statusStyles = {
|
|
|
1480
1460
|
function FlowItem(props) {
|
|
1481
1461
|
const { flow, onEdit, onDelete } = props;
|
|
1482
1462
|
const { flowId, definition, state, isActive } = flow;
|
|
1483
|
-
const [confirmDelete, setConfirmDelete] = (0,
|
|
1463
|
+
const [confirmDelete, setConfirmDelete] = _react.useState.call(void 0, false);
|
|
1484
1464
|
const handleDelete = () => {
|
|
1485
1465
|
if (confirmDelete) {
|
|
1486
1466
|
onDelete();
|
|
@@ -1503,31 +1483,31 @@ function FlowItem(props) {
|
|
|
1503
1483
|
...confirmDelete && styles6.actionButtonDanger
|
|
1504
1484
|
};
|
|
1505
1485
|
const stepInfo = state ? `Step ${state.stepIndex + 1}/${definition.steps.length}` : null;
|
|
1506
|
-
return /* @__PURE__ */ (0,
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1508
|
-
/* @__PURE__ */ (0,
|
|
1509
|
-
/* @__PURE__ */ (0,
|
|
1510
|
-
isActive && /* @__PURE__ */ (0,
|
|
1486
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: cardStyle, children: [
|
|
1487
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.header, children: [
|
|
1488
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.titleGroup, children: [
|
|
1489
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.flowId, children: flowId }),
|
|
1490
|
+
isActive && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { ...styles6.statusBadge, ...styles6.activeBadge }, children: "Active" })
|
|
1511
1491
|
] }),
|
|
1512
|
-
/* @__PURE__ */ (0,
|
|
1492
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: statusBadgeStyle, children: _nullishCoalesce(_optionalChain([state, 'optionalAccess', _2 => _2.status]), () => ( "no state")) })
|
|
1513
1493
|
] }),
|
|
1514
|
-
state ? /* @__PURE__ */ (0,
|
|
1515
|
-
stepInfo && /* @__PURE__ */ (0,
|
|
1516
|
-
/* @__PURE__ */ (0,
|
|
1517
|
-
/* @__PURE__ */ (0,
|
|
1494
|
+
state ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.infoRow, children: [
|
|
1495
|
+
stepInfo && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.infoItem, children: [
|
|
1496
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.label, children: "Step:" }),
|
|
1497
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.value, children: stepInfo })
|
|
1518
1498
|
] }),
|
|
1519
|
-
/* @__PURE__ */ (0,
|
|
1520
|
-
/* @__PURE__ */ (0,
|
|
1521
|
-
/* @__PURE__ */ (0,
|
|
1499
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.infoItem, children: [
|
|
1500
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.label, children: "Version:" }),
|
|
1501
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.value, children: state.version })
|
|
1522
1502
|
] }),
|
|
1523
|
-
state.stepId && /* @__PURE__ */ (0,
|
|
1524
|
-
/* @__PURE__ */ (0,
|
|
1525
|
-
/* @__PURE__ */ (0,
|
|
1503
|
+
state.stepId && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.infoItem, children: [
|
|
1504
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.label, children: "ID:" }),
|
|
1505
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles6.value, children: state.stepId })
|
|
1526
1506
|
] })
|
|
1527
|
-
] }) : /* @__PURE__ */ (0,
|
|
1528
|
-
/* @__PURE__ */ (0,
|
|
1529
|
-
/* @__PURE__ */ (0,
|
|
1530
|
-
|
|
1507
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles6.noState, children: "No stored state" }),
|
|
1508
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles6.actions, children: [
|
|
1509
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1510
|
+
_react3.motion.button,
|
|
1531
1511
|
{
|
|
1532
1512
|
type: "button",
|
|
1533
1513
|
style: styles6.actionButton,
|
|
@@ -1537,13 +1517,13 @@ function FlowItem(props) {
|
|
|
1537
1517
|
whileTap: state ? { scale: 0.98 } : {},
|
|
1538
1518
|
title: state ? "Edit flow state" : "No state to edit",
|
|
1539
1519
|
children: [
|
|
1540
|
-
/* @__PURE__ */ (0,
|
|
1520
|
+
/* @__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" }) }),
|
|
1541
1521
|
"Edit"
|
|
1542
1522
|
]
|
|
1543
1523
|
}
|
|
1544
1524
|
),
|
|
1545
|
-
/* @__PURE__ */ (0,
|
|
1546
|
-
|
|
1525
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1526
|
+
_react3.motion.button,
|
|
1547
1527
|
{
|
|
1548
1528
|
type: "button",
|
|
1549
1529
|
style: deleteButtonStyle,
|
|
@@ -1553,9 +1533,9 @@ function FlowItem(props) {
|
|
|
1553
1533
|
whileTap: state ? { scale: 0.98 } : {},
|
|
1554
1534
|
title: confirmDelete ? "Click again to confirm deletion" : state ? "Delete flow state" : "No state to delete",
|
|
1555
1535
|
children: [
|
|
1556
|
-
/* @__PURE__ */ (0,
|
|
1557
|
-
/* @__PURE__ */ (0,
|
|
1558
|
-
/* @__PURE__ */ (0,
|
|
1536
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
1537
|
+
/* @__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" }),
|
|
1538
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1559
1539
|
"path",
|
|
1560
1540
|
{
|
|
1561
1541
|
fillRule: "evenodd",
|
|
@@ -1572,10 +1552,10 @@ function FlowItem(props) {
|
|
|
1572
1552
|
}
|
|
1573
1553
|
|
|
1574
1554
|
// src/devtools/components/FlowEditModal.tsx
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
|
|
1579
1559
|
var styles7 = {
|
|
1580
1560
|
overlay: {
|
|
1581
1561
|
position: "fixed",
|
|
@@ -1695,15 +1675,15 @@ var styles7 = {
|
|
|
1695
1675
|
};
|
|
1696
1676
|
function FlowEditModal(props) {
|
|
1697
1677
|
const { isOpen, flowId, initialState, onClose, onSave, container } = props;
|
|
1698
|
-
const [jsonValue, setJsonValue] = (0,
|
|
1699
|
-
const [error, setError] = (0,
|
|
1700
|
-
(0,
|
|
1678
|
+
const [jsonValue, setJsonValue] = _react.useState.call(void 0, "");
|
|
1679
|
+
const [error, setError] = _react.useState.call(void 0, null);
|
|
1680
|
+
_react.useEffect.call(void 0, () => {
|
|
1701
1681
|
if (isOpen && initialState) {
|
|
1702
1682
|
setJsonValue(JSON.stringify(initialState, null, 2));
|
|
1703
1683
|
setError(null);
|
|
1704
1684
|
}
|
|
1705
1685
|
}, [isOpen, initialState]);
|
|
1706
|
-
const handleSave = (0,
|
|
1686
|
+
const handleSave = _react.useCallback.call(void 0, () => {
|
|
1707
1687
|
try {
|
|
1708
1688
|
const parsed = JSON.parse(jsonValue);
|
|
1709
1689
|
if (typeof parsed.status !== "string") {
|
|
@@ -1721,7 +1701,7 @@ function FlowEditModal(props) {
|
|
|
1721
1701
|
setError(err instanceof Error ? err.message : "Invalid JSON");
|
|
1722
1702
|
}
|
|
1723
1703
|
}, [jsonValue, onSave, onClose]);
|
|
1724
|
-
const handleKeyDown = (0,
|
|
1704
|
+
const handleKeyDown = _react.useCallback.call(void 0,
|
|
1725
1705
|
(e) => {
|
|
1726
1706
|
if (e.key === "Escape") {
|
|
1727
1707
|
onClose();
|
|
@@ -1734,7 +1714,7 @@ function FlowEditModal(props) {
|
|
|
1734
1714
|
[onClose, handleSave]
|
|
1735
1715
|
);
|
|
1736
1716
|
if (typeof window === "undefined") return null;
|
|
1737
|
-
const portalContainer = container
|
|
1717
|
+
const portalContainer = _nullishCoalesce(container, () => ( document.body));
|
|
1738
1718
|
const textareaStyle = {
|
|
1739
1719
|
...styles7.textarea,
|
|
1740
1720
|
...error && styles7.textareaError
|
|
@@ -1744,9 +1724,9 @@ function FlowEditModal(props) {
|
|
|
1744
1724
|
...styles7.buttonPrimary,
|
|
1745
1725
|
...error && styles7.buttonDisabled
|
|
1746
1726
|
};
|
|
1747
|
-
return (0,
|
|
1748
|
-
/* @__PURE__ */ (0,
|
|
1749
|
-
|
|
1727
|
+
return _reactdom.createPortal.call(void 0,
|
|
1728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { children: isOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1729
|
+
_react3.motion.div,
|
|
1750
1730
|
{
|
|
1751
1731
|
style: styles7.overlay,
|
|
1752
1732
|
initial: { opacity: 0 },
|
|
@@ -1757,8 +1737,8 @@ function FlowEditModal(props) {
|
|
|
1757
1737
|
if (e.target === e.currentTarget) onClose();
|
|
1758
1738
|
},
|
|
1759
1739
|
onKeyDown: handleKeyDown,
|
|
1760
|
-
children: /* @__PURE__ */ (0,
|
|
1761
|
-
|
|
1740
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1741
|
+
_react3.motion.div,
|
|
1762
1742
|
{
|
|
1763
1743
|
style: styles7.modal,
|
|
1764
1744
|
initial: { opacity: 0, scale: 0.95, y: 10 },
|
|
@@ -1767,24 +1747,24 @@ function FlowEditModal(props) {
|
|
|
1767
1747
|
transition: { duration: 0.15, ease: [0.16, 1, 0.3, 1] },
|
|
1768
1748
|
onClick: (e) => e.stopPropagation(),
|
|
1769
1749
|
children: [
|
|
1770
|
-
/* @__PURE__ */ (0,
|
|
1771
|
-
/* @__PURE__ */ (0,
|
|
1750
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles7.header, children: [
|
|
1751
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: styles7.title, children: [
|
|
1772
1752
|
"Edit Flow: ",
|
|
1773
1753
|
flowId
|
|
1774
1754
|
] }),
|
|
1775
|
-
/* @__PURE__ */ (0,
|
|
1755
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1776
1756
|
"button",
|
|
1777
1757
|
{
|
|
1778
1758
|
type: "button",
|
|
1779
1759
|
style: styles7.closeButton,
|
|
1780
1760
|
onClick: onClose,
|
|
1781
1761
|
title: "Close",
|
|
1782
|
-
children: /* @__PURE__ */ (0,
|
|
1762
|
+
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" }) })
|
|
1783
1763
|
}
|
|
1784
1764
|
)
|
|
1785
1765
|
] }),
|
|
1786
|
-
/* @__PURE__ */ (0,
|
|
1787
|
-
/* @__PURE__ */ (0,
|
|
1766
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles7.body, children: [
|
|
1767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1788
1768
|
"textarea",
|
|
1789
1769
|
{
|
|
1790
1770
|
style: textareaStyle,
|
|
@@ -1797,10 +1777,10 @@ function FlowEditModal(props) {
|
|
|
1797
1777
|
autoFocus: true
|
|
1798
1778
|
}
|
|
1799
1779
|
),
|
|
1800
|
-
error && /* @__PURE__ */ (0,
|
|
1780
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles7.error, children: error })
|
|
1801
1781
|
] }),
|
|
1802
|
-
/* @__PURE__ */ (0,
|
|
1803
|
-
/* @__PURE__ */ (0,
|
|
1782
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles7.footer, children: [
|
|
1783
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1804
1784
|
"button",
|
|
1805
1785
|
{
|
|
1806
1786
|
type: "button",
|
|
@@ -1809,8 +1789,8 @@ function FlowEditModal(props) {
|
|
|
1809
1789
|
children: "Cancel"
|
|
1810
1790
|
}
|
|
1811
1791
|
),
|
|
1812
|
-
/* @__PURE__ */ (0,
|
|
1813
|
-
|
|
1792
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1793
|
+
_react3.motion.button,
|
|
1814
1794
|
{
|
|
1815
1795
|
type: "button",
|
|
1816
1796
|
style: saveButtonStyle,
|
|
@@ -1832,7 +1812,7 @@ function FlowEditModal(props) {
|
|
|
1832
1812
|
}
|
|
1833
1813
|
|
|
1834
1814
|
// src/devtools/components/FlowsTab.tsx
|
|
1835
|
-
|
|
1815
|
+
|
|
1836
1816
|
var styles8 = {
|
|
1837
1817
|
container: {
|
|
1838
1818
|
display: "flex",
|
|
@@ -1905,12 +1885,12 @@ var styles8 = {
|
|
|
1905
1885
|
function FlowsTab(props) {
|
|
1906
1886
|
const { container } = props;
|
|
1907
1887
|
const { flows, refreshFlows, deleteFlow, updateFlow } = useFlowsData();
|
|
1908
|
-
const [editModal, setEditModal] = (0,
|
|
1888
|
+
const [editModal, setEditModal] = _react.useState.call(void 0, {
|
|
1909
1889
|
isOpen: false,
|
|
1910
1890
|
flowId: "",
|
|
1911
1891
|
state: null
|
|
1912
1892
|
});
|
|
1913
|
-
const handleEdit = (0,
|
|
1893
|
+
const handleEdit = _react.useCallback.call(void 0, (flowId, state) => {
|
|
1914
1894
|
if (!state) return;
|
|
1915
1895
|
setEditModal({
|
|
1916
1896
|
isOpen: true,
|
|
@@ -1918,49 +1898,49 @@ function FlowsTab(props) {
|
|
|
1918
1898
|
state
|
|
1919
1899
|
});
|
|
1920
1900
|
}, []);
|
|
1921
|
-
const handleCloseModal = (0,
|
|
1901
|
+
const handleCloseModal = _react.useCallback.call(void 0, () => {
|
|
1922
1902
|
setEditModal((prev) => ({ ...prev, isOpen: false }));
|
|
1923
1903
|
}, []);
|
|
1924
|
-
const handleSave = (0,
|
|
1904
|
+
const handleSave = _react.useCallback.call(void 0,
|
|
1925
1905
|
async (newState) => {
|
|
1926
1906
|
await updateFlow(editModal.flowId, newState);
|
|
1927
1907
|
},
|
|
1928
1908
|
[editModal.flowId, updateFlow]
|
|
1929
1909
|
);
|
|
1930
|
-
const handleDelete = (0,
|
|
1910
|
+
const handleDelete = _react.useCallback.call(void 0,
|
|
1931
1911
|
async (flowId) => {
|
|
1932
1912
|
await deleteFlow(flowId);
|
|
1933
1913
|
},
|
|
1934
1914
|
[deleteFlow]
|
|
1935
1915
|
);
|
|
1936
1916
|
if (flows.length === 0) {
|
|
1937
|
-
return /* @__PURE__ */ (0,
|
|
1938
|
-
/* @__PURE__ */ (0,
|
|
1917
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles8.container, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles8.empty, children: [
|
|
1918
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles8.emptyIcon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1939
1919
|
"svg",
|
|
1940
1920
|
{
|
|
1941
1921
|
width: "20",
|
|
1942
1922
|
height: "20",
|
|
1943
1923
|
viewBox: "0 0 16 16",
|
|
1944
1924
|
fill: "hsl(215 20% 45%)",
|
|
1945
|
-
children: /* @__PURE__ */ (0,
|
|
1925
|
+
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" })
|
|
1946
1926
|
}
|
|
1947
1927
|
) }),
|
|
1948
|
-
/* @__PURE__ */ (0,
|
|
1949
|
-
/* @__PURE__ */ (0,
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
1928
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles8.emptyText, children: [
|
|
1929
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: "No flows registered." }),
|
|
1930
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { marginTop: 6, fontSize: 11, color: "hsl(215 20% 45%)" }, children: "Add flows to TourProvider to see them here." })
|
|
1951
1931
|
] })
|
|
1952
1932
|
] }) });
|
|
1953
1933
|
}
|
|
1954
|
-
return /* @__PURE__ */ (0,
|
|
1955
|
-
/* @__PURE__ */ (0,
|
|
1956
|
-
/* @__PURE__ */ (0,
|
|
1934
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles8.container, children: [
|
|
1935
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles8.toolbar, children: [
|
|
1936
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { fontSize: 11, color: "hsl(215 20% 50%)" }, children: [
|
|
1957
1937
|
flows.length,
|
|
1958
1938
|
" flow",
|
|
1959
1939
|
flows.length !== 1 ? "s" : "",
|
|
1960
1940
|
" registered"
|
|
1961
1941
|
] }),
|
|
1962
|
-
/* @__PURE__ */ (0,
|
|
1963
|
-
|
|
1942
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1943
|
+
_react3.motion.button,
|
|
1964
1944
|
{
|
|
1965
1945
|
type: "button",
|
|
1966
1946
|
style: styles8.refreshButton,
|
|
@@ -1969,22 +1949,22 @@ function FlowsTab(props) {
|
|
|
1969
1949
|
whileTap: { scale: 0.98 },
|
|
1970
1950
|
title: "Refresh flow states",
|
|
1971
1951
|
children: [
|
|
1972
|
-
/* @__PURE__ */ (0,
|
|
1973
|
-
/* @__PURE__ */ (0,
|
|
1952
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "currentColor", children: [
|
|
1953
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1974
1954
|
"path",
|
|
1975
1955
|
{
|
|
1976
1956
|
fillRule: "evenodd",
|
|
1977
1957
|
d: "M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z"
|
|
1978
1958
|
}
|
|
1979
1959
|
),
|
|
1980
|
-
/* @__PURE__ */ (0,
|
|
1960
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" })
|
|
1981
1961
|
] }),
|
|
1982
1962
|
"Refresh"
|
|
1983
1963
|
]
|
|
1984
1964
|
}
|
|
1985
1965
|
)
|
|
1986
1966
|
] }),
|
|
1987
|
-
/* @__PURE__ */ (0,
|
|
1967
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles8.flowList, children: flows.map((flow) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1988
1968
|
FlowItem,
|
|
1989
1969
|
{
|
|
1990
1970
|
flow,
|
|
@@ -1993,7 +1973,7 @@ function FlowsTab(props) {
|
|
|
1993
1973
|
},
|
|
1994
1974
|
flow.flowId
|
|
1995
1975
|
)) }),
|
|
1996
|
-
editModal.state && /* @__PURE__ */ (0,
|
|
1976
|
+
editModal.state && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1997
1977
|
FlowEditModal,
|
|
1998
1978
|
{
|
|
1999
1979
|
isOpen: editModal.isOpen,
|
|
@@ -2008,15 +1988,15 @@ function FlowsTab(props) {
|
|
|
2008
1988
|
}
|
|
2009
1989
|
|
|
2010
1990
|
// src/devtools/hooks/useGrabMode.ts
|
|
2011
|
-
|
|
1991
|
+
|
|
2012
1992
|
|
|
2013
1993
|
// src/devtools/hooks/useElementInfo.ts
|
|
2014
|
-
|
|
1994
|
+
|
|
2015
1995
|
|
|
2016
1996
|
// src/devtools/utils/selectorGenerator.ts
|
|
2017
1997
|
function generateSemanticName(element) {
|
|
2018
1998
|
const tag = element.tagName.toLowerCase();
|
|
2019
|
-
const text = element.textContent
|
|
1999
|
+
const text = _optionalChain([element, 'access', _3 => _3.textContent, 'optionalAccess', _4 => _4.trim, 'call', _5 => _5(), 'access', _6 => _6.slice, 'call', _7 => _7(0, 20), 'access', _8 => _8.toLowerCase, 'call', _9 => _9()]) || "";
|
|
2020
2000
|
const className = element.className;
|
|
2021
2001
|
const id = element.id;
|
|
2022
2002
|
if (text) {
|
|
@@ -2048,7 +2028,7 @@ function getExistingDataAttrs(element) {
|
|
|
2048
2028
|
function isUnique(params) {
|
|
2049
2029
|
try {
|
|
2050
2030
|
return document.querySelectorAll(params.selector).length === 1;
|
|
2051
|
-
} catch {
|
|
2031
|
+
} catch (e4) {
|
|
2052
2032
|
return false;
|
|
2053
2033
|
}
|
|
2054
2034
|
}
|
|
@@ -2107,27 +2087,27 @@ function generateSelector(params) {
|
|
|
2107
2087
|
|
|
2108
2088
|
// src/devtools/hooks/useElementInfo.ts
|
|
2109
2089
|
function useElementInfo() {
|
|
2110
|
-
const getElementInfo = (0,
|
|
2090
|
+
const getElementInfo = _react.useCallback.call(void 0, (params) => {
|
|
2111
2091
|
const { element } = params;
|
|
2112
2092
|
const selectorResult = generateSelector({ element });
|
|
2113
2093
|
const source = extractSource({ element });
|
|
2114
2094
|
const componentHierarchy = extractComponentHierarchy({ element });
|
|
2115
2095
|
const rect = element.getBoundingClientRect();
|
|
2116
2096
|
const htmlElement = element;
|
|
2117
|
-
const styleAttr = htmlElement.getAttribute
|
|
2097
|
+
const styleAttr = _optionalChain([htmlElement, 'access', _10 => _10.getAttribute, 'optionalCall', _11 => _11("style")]) || void 0;
|
|
2118
2098
|
return {
|
|
2119
2099
|
element,
|
|
2120
2100
|
selector: selectorResult.selector,
|
|
2121
2101
|
selectorType: selectorResult.selectorType,
|
|
2122
2102
|
suggestedAttrName: selectorResult.suggestedAttrName,
|
|
2123
2103
|
tag: element.tagName.toLowerCase(),
|
|
2124
|
-
text: element.textContent
|
|
2104
|
+
text: _optionalChain([element, 'access', _12 => _12.textContent, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14(), 'access', _15 => _15.slice, 'call', _16 => _16(0, 50)]) || void 0,
|
|
2125
2105
|
className: typeof element.className === "string" ? element.className : void 0,
|
|
2126
2106
|
style: styleAttr,
|
|
2127
2107
|
existingAttrs: selectorResult.existingAttrs,
|
|
2128
2108
|
componentHierarchy,
|
|
2129
2109
|
rect,
|
|
2130
|
-
source: source
|
|
2110
|
+
source: _nullishCoalesce(source, () => ( void 0))
|
|
2131
2111
|
};
|
|
2132
2112
|
}, []);
|
|
2133
2113
|
return { getElementInfo };
|
|
@@ -2140,31 +2120,31 @@ function isDevToolsElement(element) {
|
|
|
2140
2120
|
const root = element.getRootNode();
|
|
2141
2121
|
if (root instanceof ShadowRoot) {
|
|
2142
2122
|
const host = root.host;
|
|
2143
|
-
if (host
|
|
2123
|
+
if (_optionalChain([host, 'optionalAccess', _17 => _17.hasAttribute, 'call', _18 => _18("data-devtools-host")])) return true;
|
|
2144
2124
|
}
|
|
2145
2125
|
return false;
|
|
2146
2126
|
}
|
|
2147
2127
|
function useGrabMode() {
|
|
2148
|
-
const [mode, setMode] = (0,
|
|
2149
|
-
const [hoveredElement, setHoveredElement] = (0,
|
|
2128
|
+
const [mode, setMode] = _react.useState.call(void 0, "idle");
|
|
2129
|
+
const [hoveredElement, setHoveredElement] = _react.useState.call(void 0, null);
|
|
2150
2130
|
const { getElementInfo } = useElementInfo();
|
|
2151
|
-
const startGrabbing = (0,
|
|
2131
|
+
const startGrabbing = _react.useCallback.call(void 0, () => {
|
|
2152
2132
|
setMode("grabbing");
|
|
2153
2133
|
setHoveredElement(null);
|
|
2154
2134
|
}, []);
|
|
2155
|
-
const stopGrabbing = (0,
|
|
2135
|
+
const stopGrabbing = _react.useCallback.call(void 0, () => {
|
|
2156
2136
|
setMode("idle");
|
|
2157
2137
|
setHoveredElement(null);
|
|
2158
2138
|
}, []);
|
|
2159
|
-
const toggleGrabbing = (0,
|
|
2139
|
+
const toggleGrabbing = _react.useCallback.call(void 0, () => {
|
|
2160
2140
|
setMode((prev) => prev === "grabbing" ? "idle" : "grabbing");
|
|
2161
2141
|
setHoveredElement(null);
|
|
2162
2142
|
}, []);
|
|
2163
|
-
const selectCurrent = (0,
|
|
2143
|
+
const selectCurrent = _react.useCallback.call(void 0, () => {
|
|
2164
2144
|
if (!hoveredElement) return null;
|
|
2165
2145
|
return hoveredElement.info;
|
|
2166
2146
|
}, [hoveredElement]);
|
|
2167
|
-
(0,
|
|
2147
|
+
_react.useEffect.call(void 0, () => {
|
|
2168
2148
|
if (mode !== "grabbing") return;
|
|
2169
2149
|
const handleMouseMove = (e) => {
|
|
2170
2150
|
const target = document.elementFromPoint(e.clientX, e.clientY);
|
|
@@ -2188,7 +2168,7 @@ function useGrabMode() {
|
|
|
2188
2168
|
document.addEventListener("mousemove", handleMouseMove, { passive: true });
|
|
2189
2169
|
return () => document.removeEventListener("mousemove", handleMouseMove);
|
|
2190
2170
|
}, [mode, getElementInfo]);
|
|
2191
|
-
(0,
|
|
2171
|
+
_react.useEffect.call(void 0, () => {
|
|
2192
2172
|
const handleKeyDown = (e) => {
|
|
2193
2173
|
if (e.ctrlKey && e.shiftKey && e.key.toLowerCase() === "g") {
|
|
2194
2174
|
e.preventDefault();
|
|
@@ -2215,15 +2195,15 @@ function useGrabMode() {
|
|
|
2215
2195
|
}
|
|
2216
2196
|
|
|
2217
2197
|
// src/devtools/hooks/useStepStore.ts
|
|
2218
|
-
|
|
2198
|
+
|
|
2219
2199
|
|
|
2220
2200
|
// src/devtools/utils/storage.ts
|
|
2221
2201
|
var STORAGE_KEY = "flowsterix-devtools-steps";
|
|
2222
2202
|
function migrateStep(step) {
|
|
2223
2203
|
return {
|
|
2224
2204
|
...step,
|
|
2225
|
-
componentHierarchy: step.componentHierarchy
|
|
2226
|
-
existingAttrs: step.existingAttrs
|
|
2205
|
+
componentHierarchy: _nullishCoalesce(step.componentHierarchy, () => ( [])),
|
|
2206
|
+
existingAttrs: _nullishCoalesce(step.existingAttrs, () => ( []))
|
|
2227
2207
|
};
|
|
2228
2208
|
}
|
|
2229
2209
|
function loadSteps() {
|
|
@@ -2234,7 +2214,7 @@ function loadSteps() {
|
|
|
2234
2214
|
const parsed = JSON.parse(data);
|
|
2235
2215
|
if (!Array.isArray(parsed)) return [];
|
|
2236
2216
|
return parsed.map(migrateStep);
|
|
2237
|
-
} catch {
|
|
2217
|
+
} catch (e5) {
|
|
2238
2218
|
return [];
|
|
2239
2219
|
}
|
|
2240
2220
|
}
|
|
@@ -2242,14 +2222,14 @@ function saveSteps(steps) {
|
|
|
2242
2222
|
if (typeof window === "undefined") return;
|
|
2243
2223
|
try {
|
|
2244
2224
|
localStorage.setItem(STORAGE_KEY, JSON.stringify(steps));
|
|
2245
|
-
} catch {
|
|
2225
|
+
} catch (e6) {
|
|
2246
2226
|
}
|
|
2247
2227
|
}
|
|
2248
2228
|
function clearSteps() {
|
|
2249
2229
|
if (typeof window === "undefined") return;
|
|
2250
2230
|
try {
|
|
2251
2231
|
localStorage.removeItem(STORAGE_KEY);
|
|
2252
|
-
} catch {
|
|
2232
|
+
} catch (e7) {
|
|
2253
2233
|
}
|
|
2254
2234
|
}
|
|
2255
2235
|
|
|
@@ -2277,18 +2257,18 @@ function generateId() {
|
|
|
2277
2257
|
return `step-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
|
|
2278
2258
|
}
|
|
2279
2259
|
function useStepStore() {
|
|
2280
|
-
const steps = (0,
|
|
2281
|
-
(0,
|
|
2260
|
+
const steps = _react.useSyncExternalStore.call(void 0, subscribe, getSnapshot, getServerSnapshot);
|
|
2261
|
+
_react.useEffect.call(void 0, () => {
|
|
2282
2262
|
const saved = loadSteps();
|
|
2283
2263
|
if (saved.length > 0) {
|
|
2284
2264
|
store.steps = saved;
|
|
2285
2265
|
notifyListeners();
|
|
2286
2266
|
}
|
|
2287
2267
|
}, []);
|
|
2288
|
-
(0,
|
|
2268
|
+
_react.useEffect.call(void 0, () => {
|
|
2289
2269
|
saveSteps(steps);
|
|
2290
2270
|
}, [steps]);
|
|
2291
|
-
const addStep = (0,
|
|
2271
|
+
const addStep = _react.useCallback.call(void 0, (params) => {
|
|
2292
2272
|
const { info } = params;
|
|
2293
2273
|
const newStep = {
|
|
2294
2274
|
id: generateId(),
|
|
@@ -2315,12 +2295,12 @@ function useStepStore() {
|
|
|
2315
2295
|
notifyListeners();
|
|
2316
2296
|
return newStep;
|
|
2317
2297
|
}, []);
|
|
2318
|
-
const removeStep = (0,
|
|
2298
|
+
const removeStep = _react.useCallback.call(void 0, (params) => {
|
|
2319
2299
|
const { id } = params;
|
|
2320
2300
|
store.steps = store.steps.filter((s) => s.id !== id).map((s, i) => ({ ...s, order: i }));
|
|
2321
2301
|
notifyListeners();
|
|
2322
2302
|
}, []);
|
|
2323
|
-
const updateStep = (0,
|
|
2303
|
+
const updateStep = _react.useCallback.call(void 0,
|
|
2324
2304
|
(params) => {
|
|
2325
2305
|
const { id, updates } = params;
|
|
2326
2306
|
store.steps = store.steps.map(
|
|
@@ -2330,7 +2310,7 @@ function useStepStore() {
|
|
|
2330
2310
|
},
|
|
2331
2311
|
[]
|
|
2332
2312
|
);
|
|
2333
|
-
const reorderSteps = (0,
|
|
2313
|
+
const reorderSteps = _react.useCallback.call(void 0,
|
|
2334
2314
|
(params) => {
|
|
2335
2315
|
const { fromIndex, toIndex } = params;
|
|
2336
2316
|
const newSteps = [...store.steps];
|
|
@@ -2341,12 +2321,12 @@ function useStepStore() {
|
|
|
2341
2321
|
},
|
|
2342
2322
|
[]
|
|
2343
2323
|
);
|
|
2344
|
-
const clearAllSteps = (0,
|
|
2324
|
+
const clearAllSteps = _react.useCallback.call(void 0, () => {
|
|
2345
2325
|
store.steps = [];
|
|
2346
2326
|
clearSteps();
|
|
2347
2327
|
notifyListeners();
|
|
2348
2328
|
}, []);
|
|
2349
|
-
const exportSteps = (0,
|
|
2329
|
+
const exportSteps = _react.useCallback.call(void 0, () => {
|
|
2350
2330
|
return {
|
|
2351
2331
|
version: "1.0",
|
|
2352
2332
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -2390,7 +2370,7 @@ function useStepStore() {
|
|
|
2390
2370
|
}
|
|
2391
2371
|
|
|
2392
2372
|
// src/devtools/DevToolsProvider.tsx
|
|
2393
|
-
|
|
2373
|
+
|
|
2394
2374
|
var styles9 = {
|
|
2395
2375
|
panel: {
|
|
2396
2376
|
position: "fixed",
|
|
@@ -2472,10 +2452,10 @@ var styles9 = {
|
|
|
2472
2452
|
};
|
|
2473
2453
|
function DevToolsProvider(props) {
|
|
2474
2454
|
const { children, enabled = true, defaultTab = "steps" } = props;
|
|
2475
|
-
const [mounted, setMounted] = (0,
|
|
2476
|
-
const [shadowRoot, setShadowRoot] = (0,
|
|
2477
|
-
const [activeTab, setActiveTab] = (0,
|
|
2478
|
-
(0,
|
|
2455
|
+
const [mounted, setMounted] = _react.useState.call(void 0, false);
|
|
2456
|
+
const [shadowRoot, setShadowRoot] = _react.useState.call(void 0, null);
|
|
2457
|
+
const [activeTab, setActiveTab] = _react.useState.call(void 0, defaultTab);
|
|
2458
|
+
_react.useEffect.call(void 0, () => {
|
|
2479
2459
|
setMounted(true);
|
|
2480
2460
|
const host = document.createElement("div");
|
|
2481
2461
|
host.setAttribute("data-devtools-host", "");
|
|
@@ -2506,11 +2486,11 @@ function DevToolsProvider(props) {
|
|
|
2506
2486
|
exportSteps
|
|
2507
2487
|
} = useStepStore();
|
|
2508
2488
|
const { flows } = useFlowsData();
|
|
2509
|
-
const [collapsed, setCollapsed] = (0,
|
|
2510
|
-
const [position, setPosition] = (0,
|
|
2511
|
-
const [isPanelDragging, setIsPanelDragging] = (0,
|
|
2512
|
-
const dragStartRef =
|
|
2513
|
-
const handleClick = (0,
|
|
2489
|
+
const [collapsed, setCollapsed] = _react.useState.call(void 0, false);
|
|
2490
|
+
const [position, setPosition] = _react.useState.call(void 0, { x: 16, y: 16 });
|
|
2491
|
+
const [isPanelDragging, setIsPanelDragging] = _react.useState.call(void 0, false);
|
|
2492
|
+
const dragStartRef = _react.useRef.call(void 0, null);
|
|
2493
|
+
const handleClick = _react.useCallback.call(void 0,
|
|
2514
2494
|
(e) => {
|
|
2515
2495
|
if (mode !== "grabbing") return;
|
|
2516
2496
|
const target = e.target;
|
|
@@ -2519,7 +2499,7 @@ function DevToolsProvider(props) {
|
|
|
2519
2499
|
const root = target.getRootNode();
|
|
2520
2500
|
if (root instanceof ShadowRoot) {
|
|
2521
2501
|
const host = root.host;
|
|
2522
|
-
if (host
|
|
2502
|
+
if (_optionalChain([host, 'optionalAccess', _19 => _19.hasAttribute, 'call', _20 => _20("data-devtools-host")])) return;
|
|
2523
2503
|
}
|
|
2524
2504
|
e.preventDefault();
|
|
2525
2505
|
e.stopPropagation();
|
|
@@ -2530,12 +2510,12 @@ function DevToolsProvider(props) {
|
|
|
2530
2510
|
},
|
|
2531
2511
|
[mode, selectCurrent, addStep]
|
|
2532
2512
|
);
|
|
2533
|
-
(0,
|
|
2513
|
+
_react.useEffect.call(void 0, () => {
|
|
2534
2514
|
if (mode !== "grabbing") return;
|
|
2535
2515
|
document.addEventListener("click", handleClick, { capture: true });
|
|
2536
2516
|
return () => document.removeEventListener("click", handleClick, { capture: true });
|
|
2537
2517
|
}, [mode, handleClick]);
|
|
2538
|
-
(0,
|
|
2518
|
+
_react.useEffect.call(void 0, () => {
|
|
2539
2519
|
if (mode !== "grabbing") return;
|
|
2540
2520
|
const preventDefault = (e) => {
|
|
2541
2521
|
const target = e.target;
|
|
@@ -2547,7 +2527,7 @@ function DevToolsProvider(props) {
|
|
|
2547
2527
|
document.removeEventListener("submit", preventDefault, { capture: true });
|
|
2548
2528
|
};
|
|
2549
2529
|
}, [mode]);
|
|
2550
|
-
(0,
|
|
2530
|
+
_react.useEffect.call(void 0, () => {
|
|
2551
2531
|
const handleKeyDown = (e) => {
|
|
2552
2532
|
if (e.ctrlKey && e.shiftKey && e.key.toLowerCase() === "m") {
|
|
2553
2533
|
e.preventDefault();
|
|
@@ -2557,7 +2537,7 @@ function DevToolsProvider(props) {
|
|
|
2557
2537
|
document.addEventListener("keydown", handleKeyDown);
|
|
2558
2538
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
2559
2539
|
}, []);
|
|
2560
|
-
const handlePointerDown = (0,
|
|
2540
|
+
const handlePointerDown = _react.useCallback.call(void 0,
|
|
2561
2541
|
(e) => {
|
|
2562
2542
|
const target = e.target;
|
|
2563
2543
|
if (target.closest("button")) return;
|
|
@@ -2573,7 +2553,7 @@ function DevToolsProvider(props) {
|
|
|
2573
2553
|
},
|
|
2574
2554
|
[position]
|
|
2575
2555
|
);
|
|
2576
|
-
const handlePointerMove = (0,
|
|
2556
|
+
const handlePointerMove = _react.useCallback.call(void 0,
|
|
2577
2557
|
(e) => {
|
|
2578
2558
|
if (!dragStartRef.current || !isPanelDragging) return;
|
|
2579
2559
|
const dx = e.clientX - dragStartRef.current.x;
|
|
@@ -2584,15 +2564,15 @@ function DevToolsProvider(props) {
|
|
|
2584
2564
|
},
|
|
2585
2565
|
[isPanelDragging]
|
|
2586
2566
|
);
|
|
2587
|
-
const handlePointerUp = (0,
|
|
2567
|
+
const handlePointerUp = _react.useCallback.call(void 0, (e) => {
|
|
2588
2568
|
setIsPanelDragging(false);
|
|
2589
2569
|
dragStartRef.current = null;
|
|
2590
2570
|
e.target.releasePointerCapture(e.pointerId);
|
|
2591
2571
|
}, []);
|
|
2592
2572
|
if (!enabled || !mounted) {
|
|
2593
|
-
return /* @__PURE__ */ (0,
|
|
2573
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children });
|
|
2594
2574
|
}
|
|
2595
|
-
const shadowContainer = shadowRoot
|
|
2575
|
+
const shadowContainer = _nullishCoalesce(_optionalChain([shadowRoot, 'optionalAccess', _21 => _21.lastElementChild]), () => ( null));
|
|
2596
2576
|
const panelStyle = {
|
|
2597
2577
|
...styles9.panel,
|
|
2598
2578
|
right: position.x,
|
|
@@ -2602,20 +2582,20 @@ function DevToolsProvider(props) {
|
|
|
2602
2582
|
...styles9.header,
|
|
2603
2583
|
...isPanelDragging && styles9.headerDragging
|
|
2604
2584
|
};
|
|
2605
|
-
const portalContainer = shadowContainer
|
|
2606
|
-
return /* @__PURE__ */ (0,
|
|
2585
|
+
const portalContainer = _nullishCoalesce(shadowContainer, () => ( document.body));
|
|
2586
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2607
2587
|
children,
|
|
2608
|
-
/* @__PURE__ */ (0,
|
|
2588
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2609
2589
|
GrabberOverlay,
|
|
2610
2590
|
{
|
|
2611
2591
|
isGrabbing: mode === "grabbing",
|
|
2612
|
-
hoveredInfo: hoveredElement
|
|
2592
|
+
hoveredInfo: _nullishCoalesce(_optionalChain([hoveredElement, 'optionalAccess', _22 => _22.info]), () => ( null)),
|
|
2613
2593
|
container: shadowContainer
|
|
2614
2594
|
}
|
|
2615
2595
|
),
|
|
2616
|
-
(0,
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2618
|
-
|
|
2596
|
+
_reactdom.createPortal.call(void 0,
|
|
2597
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2598
|
+
_react3.motion.div,
|
|
2619
2599
|
{
|
|
2620
2600
|
style: panelStyle,
|
|
2621
2601
|
initial: { opacity: 0, x: 20, scale: 0.95 },
|
|
@@ -2623,7 +2603,7 @@ function DevToolsProvider(props) {
|
|
|
2623
2603
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
2624
2604
|
"data-devtools-panel": "",
|
|
2625
2605
|
children: [
|
|
2626
|
-
/* @__PURE__ */ (0,
|
|
2606
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2627
2607
|
"div",
|
|
2628
2608
|
{
|
|
2629
2609
|
style: headerStyle,
|
|
@@ -2632,21 +2612,21 @@ function DevToolsProvider(props) {
|
|
|
2632
2612
|
onPointerUp: handlePointerUp,
|
|
2633
2613
|
onPointerCancel: handlePointerUp,
|
|
2634
2614
|
children: [
|
|
2635
|
-
/* @__PURE__ */ (0,
|
|
2636
|
-
/* @__PURE__ */ (0,
|
|
2637
|
-
/* @__PURE__ */ (0,
|
|
2638
|
-
/* @__PURE__ */ (0,
|
|
2615
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: styles9.titleGroup, children: [
|
|
2616
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles9.logo, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "hsl(217 91% 70%)", children: [
|
|
2617
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 0L14.9 4v8L8 16 1.1 12V4L8 0zm0 2.3L3.1 5.2v5.6L8 13.7l4.9-2.9V5.2L8 2.3z" }),
|
|
2618
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 5l3 1.7v3.4L8 11.8 5 10.1V6.7L8 5z" })
|
|
2639
2619
|
] }) }),
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
2620
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: styles9.title, children: "DevTools" })
|
|
2641
2621
|
] }),
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
2622
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: styles9.headerButtons, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2643
2623
|
"button",
|
|
2644
2624
|
{
|
|
2645
2625
|
type: "button",
|
|
2646
2626
|
style: styles9.iconButton,
|
|
2647
2627
|
onClick: () => setCollapsed(!collapsed),
|
|
2648
2628
|
title: collapsed ? "Expand (Ctrl+Shift+M)" : "Collapse (Ctrl+Shift+M)",
|
|
2649
|
-
children: /* @__PURE__ */ (0,
|
|
2629
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2650
2630
|
"svg",
|
|
2651
2631
|
{
|
|
2652
2632
|
width: "14",
|
|
@@ -2657,7 +2637,7 @@ function DevToolsProvider(props) {
|
|
|
2657
2637
|
transform: collapsed ? "rotate(180deg)" : "none",
|
|
2658
2638
|
transition: "transform 0.2s ease"
|
|
2659
2639
|
},
|
|
2660
|
-
children: /* @__PURE__ */ (0,
|
|
2640
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z" })
|
|
2661
2641
|
}
|
|
2662
2642
|
)
|
|
2663
2643
|
}
|
|
@@ -2665,8 +2645,8 @@ function DevToolsProvider(props) {
|
|
|
2665
2645
|
]
|
|
2666
2646
|
}
|
|
2667
2647
|
),
|
|
2668
|
-
/* @__PURE__ */ (0,
|
|
2669
|
-
|
|
2648
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { initial: false, children: !collapsed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2649
|
+
_react3.motion.div,
|
|
2670
2650
|
{
|
|
2671
2651
|
style: styles9.body,
|
|
2672
2652
|
initial: { height: 0, opacity: 0 },
|
|
@@ -2674,7 +2654,7 @@ function DevToolsProvider(props) {
|
|
|
2674
2654
|
exit: { height: 0, opacity: 0 },
|
|
2675
2655
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
2676
2656
|
children: [
|
|
2677
|
-
/* @__PURE__ */ (0,
|
|
2657
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2678
2658
|
TabNav,
|
|
2679
2659
|
{
|
|
2680
2660
|
activeTab,
|
|
@@ -2683,7 +2663,7 @@ function DevToolsProvider(props) {
|
|
|
2683
2663
|
flowCount: flows.length
|
|
2684
2664
|
}
|
|
2685
2665
|
),
|
|
2686
|
-
activeTab === "steps" ? /* @__PURE__ */ (0,
|
|
2666
|
+
activeTab === "steps" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2687
2667
|
StepList,
|
|
2688
2668
|
{
|
|
2689
2669
|
steps,
|
|
@@ -2694,7 +2674,7 @@ function DevToolsProvider(props) {
|
|
|
2694
2674
|
onClearAll: clearAllSteps,
|
|
2695
2675
|
onExport: exportSteps
|
|
2696
2676
|
}
|
|
2697
|
-
) : /* @__PURE__ */ (0,
|
|
2677
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FlowsTab, { container: shadowContainer })
|
|
2698
2678
|
]
|
|
2699
2679
|
}
|
|
2700
2680
|
) })
|
|
@@ -2705,32 +2685,31 @@ function DevToolsProvider(props) {
|
|
|
2705
2685
|
)
|
|
2706
2686
|
] });
|
|
2707
2687
|
}
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
});
|
|
2688
|
+
|
|
2689
|
+
|
|
2690
|
+
|
|
2691
|
+
|
|
2692
|
+
|
|
2693
|
+
|
|
2694
|
+
|
|
2695
|
+
|
|
2696
|
+
|
|
2697
|
+
|
|
2698
|
+
|
|
2699
|
+
|
|
2700
|
+
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
|
|
2704
|
+
|
|
2705
|
+
|
|
2706
|
+
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
|
|
2711
|
+
|
|
2712
|
+
|
|
2713
|
+
|
|
2714
|
+
|
|
2715
|
+
exports.DevToolsContext = _chunkFCOKCGV3cjs.DevToolsContext; exports.DevToolsProvider = DevToolsProvider; exports.FlowEditModal = FlowEditModal; exports.FlowItem = FlowItem; exports.FlowsTab = FlowsTab; exports.GrabberOverlay = GrabberOverlay; exports.SortableStepItem = SortableStepItem; exports.StepItem = SortableStepItem; exports.StepItemDragPreview = StepItemDragPreview; exports.StepList = StepList; exports.TabNav = TabNav; exports.Toolbar = Toolbar; exports.clearSteps = clearSteps; exports.extractComponentHierarchy = extractComponentHierarchy; exports.extractSource = extractSource; exports.formatSourcePath = formatSourcePath; exports.generateSelector = generateSelector; exports.getVSCodeLink = getVSCodeLink; exports.loadSteps = loadSteps; exports.saveSteps = saveSteps; exports.useDevToolsContext = _chunkFCOKCGV3cjs.useDevToolsContext; exports.useDevToolsContextRequired = _chunkFCOKCGV3cjs.useDevToolsContextRequired; exports.useElementInfo = useElementInfo; exports.useFlowsData = useFlowsData; exports.useGrabMode = useGrabMode; exports.useStepStore = useStepStore;
|