@flowsterix/react 0.12.0 → 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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevToolsProvider.d.ts","sourceRoot":"","sources":["../../src/devtools/DevToolsProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAatC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAoF1C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"DevToolsProvider.d.ts","sourceRoot":"","sources":["../../src/devtools/DevToolsProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAatC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAoF1C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CA8R5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowsTab.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/FlowsTab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlowsTab.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/FlowsTab.tsx"],"names":[],"mappings":"AA0FA,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CAC3B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA4H5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabNav.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/TabNav.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabNav.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/TabNav.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AA+D3C,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,WAAW,CAAA;IACtB,WAAW,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAA;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2CAiHxC"}
|
package/dist/devtools/index.cjs
CHANGED
|
@@ -1406,12 +1406,15 @@ function TabNav(props) {
|
|
|
1406
1406
|
{
|
|
1407
1407
|
style: stepsBadgeStyle,
|
|
1408
1408
|
initial: stepCountChanged && !reducedMotion ? { scale: 1.3 } : { scale: 1 },
|
|
1409
|
-
animate: {
|
|
1409
|
+
animate: {
|
|
1410
|
+
scale: stepCountChanged && !reducedMotion ? [1.3, 1] : 1,
|
|
1411
|
+
opacity: 1
|
|
1412
|
+
},
|
|
1410
1413
|
exit: { scale: 0.8, opacity: 0 },
|
|
1411
1414
|
transition: reducedMotion ? { duration: 0 } : springs.bouncy,
|
|
1412
1415
|
children: stepCount
|
|
1413
1416
|
},
|
|
1414
|
-
|
|
1417
|
+
"step-badge"
|
|
1415
1418
|
) })
|
|
1416
1419
|
]
|
|
1417
1420
|
}
|
|
@@ -1429,13 +1432,16 @@ function TabNav(props) {
|
|
|
1429
1432
|
_react3.motion.span,
|
|
1430
1433
|
{
|
|
1431
1434
|
style: flowsBadgeStyle,
|
|
1432
|
-
initial:
|
|
1433
|
-
animate: {
|
|
1435
|
+
initial: { scale: 0.8, opacity: 0 },
|
|
1436
|
+
animate: {
|
|
1437
|
+
scale: flowCountChanged && !reducedMotion ? [1.3, 1] : 1,
|
|
1438
|
+
opacity: 1
|
|
1439
|
+
},
|
|
1434
1440
|
exit: { scale: 0.8, opacity: 0 },
|
|
1435
1441
|
transition: reducedMotion ? { duration: 0 } : springs.bouncy,
|
|
1436
1442
|
children: flowCount
|
|
1437
1443
|
},
|
|
1438
|
-
|
|
1444
|
+
"flow-badge"
|
|
1439
1445
|
) })
|
|
1440
1446
|
]
|
|
1441
1447
|
}
|
|
@@ -2178,6 +2184,7 @@ var styles8 = {
|
|
|
2178
2184
|
function FlowsTab(props) {
|
|
2179
2185
|
const { container } = props;
|
|
2180
2186
|
const { flows, refreshFlows, deleteFlow, updateFlow } = useFlowsData();
|
|
2187
|
+
const reducedMotion = useReducedMotion();
|
|
2181
2188
|
const [editModal, setEditModal] = _react.useState.call(void 0, {
|
|
2182
2189
|
isOpen: false,
|
|
2183
2190
|
flowId: "",
|
|
@@ -2257,15 +2264,33 @@ function FlowsTab(props) {
|
|
|
2257
2264
|
}
|
|
2258
2265
|
)
|
|
2259
2266
|
] }),
|
|
2260
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2261
|
-
|
|
2267
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2268
|
+
_react3.motion.div,
|
|
2262
2269
|
{
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
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
|
+
),
|
|
2269
2294
|
editModal.state && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2270
2295
|
FlowEditModal,
|
|
2271
2296
|
{
|
|
@@ -2873,7 +2898,8 @@ function DevToolsProvider(props) {
|
|
|
2873
2898
|
};
|
|
2874
2899
|
const headerStyle = {
|
|
2875
2900
|
...styles9.header,
|
|
2876
|
-
...isPanelDragging && styles9.headerDragging
|
|
2901
|
+
...isPanelDragging && styles9.headerDragging,
|
|
2902
|
+
...collapsed && { borderBottom: "none" }
|
|
2877
2903
|
};
|
|
2878
2904
|
const portalContainer = _nullishCoalesce(shadowContainer, () => ( document.body));
|
|
2879
2905
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
@@ -2891,6 +2917,8 @@ function DevToolsProvider(props) {
|
|
|
2891
2917
|
_react3.motion.div,
|
|
2892
2918
|
{
|
|
2893
2919
|
style: panelStyle,
|
|
2920
|
+
layoutRoot: true,
|
|
2921
|
+
layout: "size",
|
|
2894
2922
|
initial: { opacity: 0, x: 20, scale: 0.95 },
|
|
2895
2923
|
animate: { opacity: 1, x: 0, scale: 1 },
|
|
2896
2924
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
@@ -2938,15 +2966,22 @@ function DevToolsProvider(props) {
|
|
|
2938
2966
|
]
|
|
2939
2967
|
}
|
|
2940
2968
|
),
|
|
2941
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2969
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2942
2970
|
_react3.motion.div,
|
|
2943
2971
|
{
|
|
2944
|
-
style: {
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
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: [
|
|
2950
2985
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2951
2986
|
TabNav,
|
|
2952
2987
|
{
|
|
@@ -2968,9 +3003,9 @@ function DevToolsProvider(props) {
|
|
|
2968
3003
|
onExport: exportSteps
|
|
2969
3004
|
}
|
|
2970
3005
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FlowsTab, { container: shadowContainer })
|
|
2971
|
-
]
|
|
3006
|
+
] })
|
|
2972
3007
|
}
|
|
2973
|
-
)
|
|
3008
|
+
)
|
|
2974
3009
|
]
|
|
2975
3010
|
}
|
|
2976
3011
|
),
|
package/dist/devtools/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
// src/devtools/DevToolsProvider.tsx
|
|
8
8
|
import { useCallback as useCallback8, useEffect as useEffect8, useRef as useRef2, useState as useState11 } from "react";
|
|
9
9
|
import { createPortal as createPortal3 } from "react-dom";
|
|
10
|
-
import {
|
|
10
|
+
import { motion as motion9 } from "motion/react";
|
|
11
11
|
|
|
12
12
|
// src/devtools/motion.ts
|
|
13
13
|
import { useEffect, useState } from "react";
|
|
@@ -1302,8 +1302,8 @@ function StepList(props) {
|
|
|
1302
1302
|
}
|
|
1303
1303
|
|
|
1304
1304
|
// src/devtools/components/TabNav.tsx
|
|
1305
|
+
import { AnimatePresence as AnimatePresence4, motion as motion5 } from "motion/react";
|
|
1305
1306
|
import { useEffect as useEffect3, useRef } from "react";
|
|
1306
|
-
import { motion as motion5, AnimatePresence as AnimatePresence4 } from "motion/react";
|
|
1307
1307
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1308
1308
|
var styles5 = {
|
|
1309
1309
|
container: {
|
|
@@ -1406,12 +1406,15 @@ function TabNav(props) {
|
|
|
1406
1406
|
{
|
|
1407
1407
|
style: stepsBadgeStyle,
|
|
1408
1408
|
initial: stepCountChanged && !reducedMotion ? { scale: 1.3 } : { scale: 1 },
|
|
1409
|
-
animate: {
|
|
1409
|
+
animate: {
|
|
1410
|
+
scale: stepCountChanged && !reducedMotion ? [1.3, 1] : 1,
|
|
1411
|
+
opacity: 1
|
|
1412
|
+
},
|
|
1410
1413
|
exit: { scale: 0.8, opacity: 0 },
|
|
1411
1414
|
transition: reducedMotion ? { duration: 0 } : springs.bouncy,
|
|
1412
1415
|
children: stepCount
|
|
1413
1416
|
},
|
|
1414
|
-
|
|
1417
|
+
"step-badge"
|
|
1415
1418
|
) })
|
|
1416
1419
|
]
|
|
1417
1420
|
}
|
|
@@ -1429,13 +1432,16 @@ function TabNav(props) {
|
|
|
1429
1432
|
motion5.span,
|
|
1430
1433
|
{
|
|
1431
1434
|
style: flowsBadgeStyle,
|
|
1432
|
-
initial:
|
|
1433
|
-
animate: {
|
|
1435
|
+
initial: { scale: 0.8, opacity: 0 },
|
|
1436
|
+
animate: {
|
|
1437
|
+
scale: flowCountChanged && !reducedMotion ? [1.3, 1] : 1,
|
|
1438
|
+
opacity: 1
|
|
1439
|
+
},
|
|
1434
1440
|
exit: { scale: 0.8, opacity: 0 },
|
|
1435
1441
|
transition: reducedMotion ? { duration: 0 } : springs.bouncy,
|
|
1436
1442
|
children: flowCount
|
|
1437
1443
|
},
|
|
1438
|
-
|
|
1444
|
+
"flow-badge"
|
|
1439
1445
|
) })
|
|
1440
1446
|
]
|
|
1441
1447
|
}
|
|
@@ -1456,7 +1462,7 @@ function TabNav(props) {
|
|
|
1456
1462
|
|
|
1457
1463
|
// src/devtools/components/FlowsTab.tsx
|
|
1458
1464
|
import { useCallback as useCallback4, useState as useState9 } from "react";
|
|
1459
|
-
import { motion as motion8 } from "motion/react";
|
|
1465
|
+
import { motion as motion8, AnimatePresence as AnimatePresence7 } from "motion/react";
|
|
1460
1466
|
|
|
1461
1467
|
// src/devtools/hooks/useFlowsData.ts
|
|
1462
1468
|
import { useCallback as useCallback2, useEffect as useEffect4, useState as useState6, useSyncExternalStore } from "react";
|
|
@@ -2178,6 +2184,7 @@ var styles8 = {
|
|
|
2178
2184
|
function FlowsTab(props) {
|
|
2179
2185
|
const { container } = props;
|
|
2180
2186
|
const { flows, refreshFlows, deleteFlow, updateFlow } = useFlowsData();
|
|
2187
|
+
const reducedMotion = useReducedMotion();
|
|
2181
2188
|
const [editModal, setEditModal] = useState9({
|
|
2182
2189
|
isOpen: false,
|
|
2183
2190
|
flowId: "",
|
|
@@ -2257,15 +2264,33 @@ function FlowsTab(props) {
|
|
|
2257
2264
|
}
|
|
2258
2265
|
)
|
|
2259
2266
|
] }),
|
|
2260
|
-
/* @__PURE__ */ jsx8(
|
|
2261
|
-
|
|
2267
|
+
/* @__PURE__ */ jsx8(
|
|
2268
|
+
motion8.div,
|
|
2262
2269
|
{
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2270
|
+
style: styles8.flowList,
|
|
2271
|
+
variants: reducedMotion ? void 0 : listContainerVariants,
|
|
2272
|
+
initial: "hidden",
|
|
2273
|
+
animate: "visible",
|
|
2274
|
+
children: /* @__PURE__ */ jsx8(AnimatePresence7, { mode: "popLayout", children: flows.map((flow) => /* @__PURE__ */ jsx8(
|
|
2275
|
+
motion8.div,
|
|
2276
|
+
{
|
|
2277
|
+
variants: reducedMotion ? void 0 : listItemVariants,
|
|
2278
|
+
initial: "hidden",
|
|
2279
|
+
animate: "visible",
|
|
2280
|
+
exit: "exit",
|
|
2281
|
+
children: /* @__PURE__ */ jsx8(
|
|
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
|
+
),
|
|
2269
2294
|
editModal.state && /* @__PURE__ */ jsx8(
|
|
2270
2295
|
FlowEditModal,
|
|
2271
2296
|
{
|
|
@@ -2873,7 +2898,8 @@ function DevToolsProvider(props) {
|
|
|
2873
2898
|
};
|
|
2874
2899
|
const headerStyle = {
|
|
2875
2900
|
...styles9.header,
|
|
2876
|
-
...isPanelDragging && styles9.headerDragging
|
|
2901
|
+
...isPanelDragging && styles9.headerDragging,
|
|
2902
|
+
...collapsed && { borderBottom: "none" }
|
|
2877
2903
|
};
|
|
2878
2904
|
const portalContainer = shadowContainer ?? document.body;
|
|
2879
2905
|
return /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
@@ -2891,6 +2917,8 @@ function DevToolsProvider(props) {
|
|
|
2891
2917
|
motion9.div,
|
|
2892
2918
|
{
|
|
2893
2919
|
style: panelStyle,
|
|
2920
|
+
layoutRoot: true,
|
|
2921
|
+
layout: "size",
|
|
2894
2922
|
initial: { opacity: 0, x: 20, scale: 0.95 },
|
|
2895
2923
|
animate: { opacity: 1, x: 0, scale: 1 },
|
|
2896
2924
|
transition: { duration: 0.2, ease: [0.16, 1, 0.3, 1] },
|
|
@@ -2938,15 +2966,22 @@ function DevToolsProvider(props) {
|
|
|
2938
2966
|
]
|
|
2939
2967
|
}
|
|
2940
2968
|
),
|
|
2941
|
-
/* @__PURE__ */ jsx9(
|
|
2969
|
+
/* @__PURE__ */ jsx9(
|
|
2942
2970
|
motion9.div,
|
|
2943
2971
|
{
|
|
2944
|
-
style: {
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
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__ */ jsxs9("div", { style: { pointerEvents: collapsed ? "none" : "auto" }, children: [
|
|
2950
2985
|
/* @__PURE__ */ jsx9(
|
|
2951
2986
|
TabNav,
|
|
2952
2987
|
{
|
|
@@ -2968,9 +3003,9 @@ function DevToolsProvider(props) {
|
|
|
2968
3003
|
onExport: exportSteps
|
|
2969
3004
|
}
|
|
2970
3005
|
) : /* @__PURE__ */ jsx9(FlowsTab, { container: shadowContainer })
|
|
2971
|
-
]
|
|
3006
|
+
] })
|
|
2972
3007
|
}
|
|
2973
|
-
)
|
|
3008
|
+
)
|
|
2974
3009
|
]
|
|
2975
3010
|
}
|
|
2976
3011
|
),
|