@bian-womp/spark-workbench 0.2.5 → 0.2.7
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/lib/cjs/index.cjs +35 -33
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/index.d.ts +1 -0
- package/lib/cjs/src/index.d.ts.map +1 -1
- package/lib/cjs/src/misc/DefaultNode.d.ts +1 -0
- package/lib/cjs/src/misc/DefaultNode.d.ts.map +1 -1
- package/lib/cjs/src/misc/WorkbenchCanvas.d.ts.map +1 -1
- package/lib/cjs/src/misc/context/WorkbenchContext.provider.d.ts.map +1 -1
- package/lib/esm/index.js +34 -34
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/index.d.ts +1 -0
- package/lib/esm/src/index.d.ts.map +1 -1
- package/lib/esm/src/misc/DefaultNode.d.ts +1 -0
- package/lib/esm/src/misc/DefaultNode.d.ts.map +1 -1
- package/lib/esm/src/misc/WorkbenchCanvas.d.ts.map +1 -1
- package/lib/esm/src/misc/context/WorkbenchContext.provider.d.ts.map +1 -1
- package/package.json +4 -4
package/lib/cjs/src/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./misc/mapping";
|
|
|
11
11
|
export * from "./misc/context/WorkbenchContext";
|
|
12
12
|
export * from "./misc/context/WorkbenchContext.provider";
|
|
13
13
|
export * from "./misc/Inspector";
|
|
14
|
+
export * from "./misc/DefaultNode";
|
|
14
15
|
export * from "./misc/WorkbenchCanvas";
|
|
15
16
|
export * from "./misc/WorkbenchStudio";
|
|
16
17
|
export * from "./misc/value";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AAEzD,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AAEzD,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
|
|
@@ -2,4 +2,5 @@ import React from "react";
|
|
|
2
2
|
import { type NodeProps, type Node } from "@xyflow/react";
|
|
3
3
|
import { type RFNodeData } from "./mapping";
|
|
4
4
|
export declare const DefaultNode: React.NamedExoticComponent<NodeProps<Node<RFNodeData>>>;
|
|
5
|
+
export declare function DefaultNodeContent({ data, isConnectable, }: Pick<NodeProps<Node<RFNodeData>>, "data" | "isConnectable">): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
//# sourceMappingURL=DefaultNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultNode.d.ts","sourceRoot":"","sources":["../../../../src/misc/DefaultNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,IAAI,EACV,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultNode.d.ts","sourceRoot":"","sources":["../../../../src/misc/DefaultNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,IAAI,EACV,MAAM,eAAe,CAAC;AAMvB,OAAO,EAA2B,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAErE,eAAO,MAAM,WAAW,yDAgFtB,CAAC;AAGH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,aAAa,GACd,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,2CA2H7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkbenchCanvas.d.ts","sourceRoot":"","sources":["../../../../src/misc/WorkbenchCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAiB9E,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,eAAe;iBAGX,OAAO;cACV,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,MAAM;eAC3C,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,GAAG,CAAC,OAAO;yBACvC,CACnB,MAAM,EAAE,MAAM,KACX;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;+
|
|
1
|
+
{"version":3,"file":"WorkbenchCanvas.d.ts","sourceRoot":"","sources":["../../../../src/misc/WorkbenchCanvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAiB9E,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,eAAe;iBAGX,OAAO;cACV,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,MAAM;eAC3C,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,GAAG,CAAC,OAAO;yBACvC,CACnB,MAAM,EAAE,MAAM,KACX;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;+CAyUpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkbenchContext.provider.d.ts","sourceRoot":"","sources":["../../../../../src/misc/context/WorkbenchContext.provider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"WorkbenchContext.provider.d.ts","sourceRoot":"","sources":["../../../../../src/misc/context/WorkbenchContext.provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,QAAQ,EAAwB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAmB,MAAM,4BAA4B,CAAC;AAiB3E,wBAAgB,iBAAiB,CAAC,EAChC,EAAE,EACF,MAAM,EACN,QAAQ,EACR,WAAW,EACX,QAAQ,GACT,EAAE;IACD,EAAE,EAAE,iBAAiB,CAAC;IACtB,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAshBA"}
|
package/lib/esm/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import React, { useCallback, useState, useRef, useEffect, useMemo, createContext
|
|
|
4
4
|
import { Position, Handle, useUpdateNodeInternals, useReactFlow, ReactFlowProvider, ReactFlow, Background, BackgroundVariant, MiniMap, Controls } from '@xyflow/react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { XCircleIcon, WarningCircleIcon, PlugsConnectedIcon, ClockClockwiseIcon, WifiHighIcon, WifiSlashIcon } from '@phosphor-icons/react';
|
|
7
|
-
import isEqual from 'lodash/isEqual';
|
|
8
7
|
import cx from 'classnames';
|
|
8
|
+
import isEqual from 'lodash/isEqual';
|
|
9
9
|
|
|
10
10
|
class DefaultUIExtensionRegistry {
|
|
11
11
|
constructor() {
|
|
@@ -1286,7 +1286,7 @@ function WorkbenchProvider({ wb, runner, registry, setRegistry, children, }) {
|
|
|
1286
1286
|
const FALLBACK_TOTAL_MS = 2 * 60 * 1000;
|
|
1287
1287
|
const [fallbackStarts, setFallbackStarts] = useState({});
|
|
1288
1288
|
// Track runs that emitted an error so we can keep progress on completion
|
|
1289
|
-
const
|
|
1289
|
+
const errorRunsRef = useRef({});
|
|
1290
1290
|
// Periodically advance fallback progress for running nodes without explicit progress
|
|
1291
1291
|
useEffect(() => {
|
|
1292
1292
|
const interval = setInterval(() => {
|
|
@@ -1449,6 +1449,7 @@ function WorkbenchProvider({ wb, runner, registry, setRegistry, children, }) {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
else if (nodeError.nodeId) {
|
|
1451
1451
|
const nodeId = nodeError.nodeId;
|
|
1452
|
+
const runId = nodeError.runId;
|
|
1452
1453
|
setNodeStatus((s) => ({
|
|
1453
1454
|
...s,
|
|
1454
1455
|
[nodeId]: {
|
|
@@ -1457,11 +1458,11 @@ function WorkbenchProvider({ wb, runner, registry, setRegistry, children, }) {
|
|
|
1457
1458
|
},
|
|
1458
1459
|
}));
|
|
1459
1460
|
// Mark this runId as errored
|
|
1460
|
-
if (
|
|
1461
|
-
|
|
1462
|
-
...
|
|
1463
|
-
[
|
|
1464
|
-
}
|
|
1461
|
+
if (runId) {
|
|
1462
|
+
errorRunsRef.current[nodeId] = {
|
|
1463
|
+
...errorRunsRef.current[nodeId],
|
|
1464
|
+
[runId]: true,
|
|
1465
|
+
};
|
|
1465
1466
|
}
|
|
1466
1467
|
}
|
|
1467
1468
|
return add("runner", "error")(e);
|
|
@@ -1514,38 +1515,29 @@ function WorkbenchProvider({ wb, runner, registry, setRegistry, children, }) {
|
|
|
1514
1515
|
setNodeStatus((prev) => {
|
|
1515
1516
|
const current = prev[id]?.activeRuns ?? 0;
|
|
1516
1517
|
const nextActive = current - 1;
|
|
1517
|
-
const hadError = !!(runId &&
|
|
1518
|
+
const hadError = !!(runId && errorRunsRef.current[id]?.[runId]);
|
|
1518
1519
|
const keepProgress = hadError || nextActive > 0;
|
|
1520
|
+
// Clear error flag for this runId
|
|
1521
|
+
if (runId && errorRunsRef.current[id]?.[runId]) {
|
|
1522
|
+
delete errorRunsRef.current[id]?.[runId];
|
|
1523
|
+
}
|
|
1519
1524
|
return {
|
|
1520
1525
|
...prev,
|
|
1521
1526
|
[id]: {
|
|
1522
1527
|
...prev[id],
|
|
1523
1528
|
activeRuns: nextActive,
|
|
1524
1529
|
progress: keepProgress ? prev[id]?.progress : 0,
|
|
1530
|
+
lastError: hadError ? prev[id]?.lastError : undefined,
|
|
1525
1531
|
},
|
|
1526
1532
|
};
|
|
1527
1533
|
});
|
|
1528
1534
|
// Clear fallback start timestamp if no more active runs
|
|
1529
1535
|
setFallbackStarts((prev) => {
|
|
1530
|
-
prev[id];
|
|
1531
1536
|
const nextPrev = { ...prev };
|
|
1532
1537
|
// If we don't know nextActive here, conservatively clear to stop animation
|
|
1533
1538
|
delete nextPrev[id];
|
|
1534
1539
|
return nextPrev;
|
|
1535
1540
|
});
|
|
1536
|
-
// Clear error flag for this runId
|
|
1537
|
-
if (runId) {
|
|
1538
|
-
setErrorRuns((prev) => {
|
|
1539
|
-
const nodeMap = { ...(prev[id] || {}) };
|
|
1540
|
-
delete nodeMap[runId];
|
|
1541
|
-
const next = { ...prev };
|
|
1542
|
-
if (Object.keys(nodeMap).length === 0)
|
|
1543
|
-
delete next[id];
|
|
1544
|
-
else
|
|
1545
|
-
next[id] = nodeMap;
|
|
1546
|
-
return next;
|
|
1547
|
-
});
|
|
1548
|
-
}
|
|
1549
1541
|
}
|
|
1550
1542
|
else if (s.kind === "edge-start") {
|
|
1551
1543
|
const id = s.edgeId;
|
|
@@ -1987,7 +1979,7 @@ function NodeHandles({ data, isConnectable, inputClassName = "!w-2 !h-2 !bg-gray
|
|
|
1987
1979
|
const y = placed?.y;
|
|
1988
1980
|
const cls = getClassName?.({ kind: "output", id: h.id, type: "source" }) ??
|
|
1989
1981
|
outputClassName;
|
|
1990
|
-
return (jsxs(React.Fragment, { children: [jsx(Handle, { id: h.id, type: "source", position: position, isConnectable: isConnectable, className: cls
|
|
1982
|
+
return (jsxs(React.Fragment, { children: [jsx(Handle, { id: h.id, type: "source", position: position, isConnectable: isConnectable, className: `${cls} wb-nodrag wb-nowheel`, style: y !== undefined ? { top: y } : undefined }), renderLabel && (jsx("div", { className: labelClassName + " right-2", style: {
|
|
1991
1983
|
top: (y ?? 0) - 8,
|
|
1992
1984
|
left: "50%",
|
|
1993
1985
|
textAlign: "right",
|
|
@@ -2000,7 +1992,7 @@ function NodeHandles({ data, isConnectable, inputClassName = "!w-2 !h-2 !bg-gray
|
|
|
2000
1992
|
|
|
2001
1993
|
const DefaultNode = React.memo(function DefaultNode({ id, data, selected, isConnectable, }) {
|
|
2002
1994
|
const updateNodeInternals = useUpdateNodeInternals();
|
|
2003
|
-
const { typeId, showValues
|
|
1995
|
+
const { typeId, showValues } = data;
|
|
2004
1996
|
const inputEntries = data.inputHandles ?? [];
|
|
2005
1997
|
const outputEntries = data.outputHandles ?? [];
|
|
2006
1998
|
React.useEffect(() => {
|
|
@@ -2018,14 +2010,11 @@ const DefaultNode = React.memo(function DefaultNode({ id, data, selected, isConn
|
|
|
2018
2010
|
outputs: [],
|
|
2019
2011
|
issues: [],
|
|
2020
2012
|
};
|
|
2021
|
-
const hasError = !!status.lastError;
|
|
2022
|
-
const isRunning = !!status.activeRuns;
|
|
2023
2013
|
const containerBorder = getNodeBorderClassNames({
|
|
2024
2014
|
selected,
|
|
2025
2015
|
status,
|
|
2026
2016
|
validation,
|
|
2027
2017
|
});
|
|
2028
|
-
const pct = Math.round(Math.max(0, Math.min(1, Number(status.progress) || 0)) * 100);
|
|
2029
2018
|
return (jsxs("div", { className: cx("rounded-lg bg-white/70 !dark:bg-stone-900", containerBorder), style: {
|
|
2030
2019
|
position: "relative",
|
|
2031
2020
|
minWidth: typeof data.renderWidth === "number" ? data.renderWidth : undefined,
|
|
@@ -2033,11 +2022,24 @@ const DefaultNode = React.memo(function DefaultNode({ id, data, selected, isConn
|
|
|
2033
2022
|
}, children: [jsxs("div", { className: "flex items-center justify-center px-2 border-b border-solid border-gray-500 dark:border-gray-400 text-gray-600 dark:text-gray-300", style: {
|
|
2034
2023
|
maxHeight: NODE_HEADER_HEIGHT_PX,
|
|
2035
2024
|
minHeight: NODE_HEADER_HEIGHT_PX,
|
|
2036
|
-
}, children: [jsx("strong", { className: "flex-1 h-full text-sm", style: { lineHeight: `${NODE_HEADER_HEIGHT_PX}px` }, children: typeId }), jsxs("div", { className: "flex items-center gap-1", children: [
|
|
2025
|
+
}, children: [jsx("strong", { className: "flex-1 h-full text-sm", style: { lineHeight: `${NODE_HEADER_HEIGHT_PX}px` }, children: typeId }), jsxs("div", { className: "flex items-center gap-1", children: [validation.issues && validation.issues.length > 0 && (jsx(IssueBadge, { level: validation.issues.some((i) => i.level === "error")
|
|
2037
2026
|
? "error"
|
|
2038
2027
|
: "warning", size: 12, className: "w-3 h-3", title: validation.issues
|
|
2039
2028
|
.map((v) => `${v.code}: ${v.message}`)
|
|
2040
|
-
.join("; ") })), jsxs("span", { className: "text-[10px] opacity-70", children: ["(", id, ")"] })] })] }), jsx(
|
|
2029
|
+
.join("; ") })), jsxs("span", { className: "text-[10px] opacity-70", children: ["(", id, ")"] })] })] }), jsx(DefaultNodeContent, { data: data, isConnectable: isConnectable })] }));
|
|
2030
|
+
});
|
|
2031
|
+
DefaultNode.displayName = "DefaultNode";
|
|
2032
|
+
function DefaultNodeContent({ data, isConnectable, }) {
|
|
2033
|
+
const { showValues, inputValues, outputValues, toString } = data;
|
|
2034
|
+
const inputEntries = data.inputHandles ?? [];
|
|
2035
|
+
const outputEntries = data.outputHandles ?? [];
|
|
2036
|
+
const status = data.status ?? { activeRuns: 0 };
|
|
2037
|
+
const validation = data.validation ?? {
|
|
2038
|
+
inputs: [],
|
|
2039
|
+
outputs: []};
|
|
2040
|
+
const isRunning = !!status.activeRuns;
|
|
2041
|
+
const pct = Math.round(Math.max(0, Math.min(1, Number(status.progress) || 0)) * 100);
|
|
2042
|
+
return (jsxs(Fragment, { children: [jsx("div", { className: cx("h-px", (isRunning || pct > 0) && "bg-blue-200 dark:bg-blue-900"), children: jsx("div", { className: cx("h-px transition-all", (isRunning || pct > 0) && "bg-blue-500"), style: { width: isRunning || pct > 0 ? `${pct}%` : 0 } }) }), jsx(NodeHandles, { data: data, isConnectable: isConnectable, getClassName: ({ kind, id }) => {
|
|
2041
2043
|
const vIssues = (kind === "input" ? validation.inputs : validation.outputs).filter((v) => v.handle === id);
|
|
2042
2044
|
const hasAny = vIssues.length > 0;
|
|
2043
2045
|
const hasErr = vIssues.some((v) => v.level === "error");
|
|
@@ -2053,7 +2055,6 @@ const DefaultNode = React.memo(function DefaultNode({ id, data, selected, isConn
|
|
|
2053
2055
|
const title = vIssues
|
|
2054
2056
|
.map((v) => `${v.code}: ${v.message}`)
|
|
2055
2057
|
.join("; ");
|
|
2056
|
-
// Compose label with truncated value to prevent layout growth
|
|
2057
2058
|
const valueText = (() => {
|
|
2058
2059
|
if (!showValues)
|
|
2059
2060
|
return undefined;
|
|
@@ -2067,8 +2068,7 @@ const DefaultNode = React.memo(function DefaultNode({ id, data, selected, isConn
|
|
|
2067
2068
|
})();
|
|
2068
2069
|
return (jsxs("span", { className: "flex items-center gap-1 w-full", children: [kind === "output" ? (jsxs(Fragment, { children: [valueText !== undefined && (jsx("span", { className: "opacity-60 truncate pl-1", style: { flex: 1, minWidth: 0, maxWidth: "100%" }, children: valueText })), jsx("span", { className: "truncate shrink-0", style: { maxWidth: "40%" }, children: id })] })) : (jsxs(Fragment, { children: [jsx("span", { className: "truncate shrink-0", style: { maxWidth: "40%" }, children: id }), valueText !== undefined && (jsx("span", { className: "opacity-60 truncate pr-1", style: { flex: 1, minWidth: 0, maxWidth: "100%" }, children: valueText }))] })), hasAny && (jsx(IssueBadge, { level: hasErr ? "error" : "warning", size: 12, className: "shrink-0", title: title }))] }));
|
|
2069
2070
|
} })] }));
|
|
2070
|
-
}
|
|
2071
|
-
DefaultNode.displayName = "DefaultNode";
|
|
2071
|
+
}
|
|
2072
2072
|
|
|
2073
2073
|
function DefaultContextMenu({ open, clientPos, onAdd, onClose, }) {
|
|
2074
2074
|
const { registry } = useWorkbenchContext();
|
|
@@ -2457,7 +2457,7 @@ const WorkbenchCanvas = React.forwardRef(({ showValues, toString, toElement, get
|
|
|
2457
2457
|
const addNodeAt = (typeId, pos) => {
|
|
2458
2458
|
wb.addNode({ typeId, position: pos });
|
|
2459
2459
|
};
|
|
2460
|
-
return (jsx("div", { className: "w-full h-full", onContextMenu: onContextMenu, children: jsx(ReactFlowProvider, { children: jsxs(ReactFlow, { nodes: throttled.nodes, edges: throttled.edges, nodeTypes: nodeTypes,
|
|
2460
|
+
return (jsx("div", { className: "w-full h-full", onContextMenu: onContextMenu, children: jsx(ReactFlowProvider, { children: jsxs(ReactFlow, { nodes: throttled.nodes, edges: throttled.edges, nodeTypes: nodeTypes, selectionOnDrag: true, onInit: (inst) => (rfInstanceRef.current = inst), onConnect: onConnect, onEdgesChange: onEdgesChange, onEdgesDelete: onEdgesDelete, onNodesDelete: onNodesDelete, onNodesChange: onNodesChange, deleteKeyCode: ["Backspace", "Delete"], proOptions: { hideAttribution: true }, noDragClassName: "wb-nodrag", noWheelClassName: "wb-nowheel", noPanClassName: "wb-nopan", fitView: true, children: [jsx(Background, { id: "workbench-canvas-background", variant: BackgroundVariant.Dots, gap: 12, size: 1 }), jsx(MiniMap, {}), jsx(Controls, {}), jsx(DefaultContextMenu, { open: menuOpen, clientPos: menuPos, onAdd: addNodeAt, onClose: () => setMenuOpen(false) }), jsx(NodeContextMenu, { open: nodeMenuOpen, clientPos: nodeMenuPos, nodeId: nodeAtMenu, onClose: () => setNodeMenuOpen(false) })] }) }) }));
|
|
2461
2461
|
});
|
|
2462
2462
|
|
|
2463
2463
|
function WorkbenchStudioCanvas({ setRegistry, autoScroll, onAutoScrollChange, example, onExampleChange, engine, onEngineChange, backendKind, onBackendKindChange, httpBaseUrl, onHttpBaseUrlChange, wsUrl, onWsUrlChange, debug, onDebugChange, showValues, onShowValuesChange, hideWorkbench, onHideWorkbenchChange, overrides, onInit, onChange, }) {
|
|
@@ -2941,5 +2941,5 @@ function WorkbenchStudio({ engine, onEngineChange, example, onExampleChange, bac
|
|
|
2941
2941
|
}, httpBaseUrl: httpBaseUrl, onHttpBaseUrlChange: onHttpBaseUrlChange, wsUrl: wsUrl, onWsUrlChange: onWsUrlChange, debug: debug, onDebugChange: onDebugChange, showValues: showValues, onShowValuesChange: onShowValuesChange, hideWorkbench: hideWorkbench, onHideWorkbenchChange: onHideWorkbenchChange, overrides: overrides, onInit: onInit, onChange: onChange }) }));
|
|
2942
2942
|
}
|
|
2943
2943
|
|
|
2944
|
-
export { AbstractWorkbench, CLIWorkbench, DefaultUIExtensionRegistry, InMemoryWorkbench, Inspector, LocalGraphRunner, NodeHandles, RemoteGraphRunner, WorkbenchCanvas, WorkbenchContext, WorkbenchProvider, WorkbenchStudio, formatDataUrlAsLabel, formatDeclaredTypeSignature, getNodeBorderClassNames, preformatValueForDisplay, resolveOutputDisplay, summarizeDeep, toReactFlow, useQueryParamBoolean, useQueryParamString, useThrottledValue, useWorkbenchBridge, useWorkbenchContext, useWorkbenchGraphTick, useWorkbenchGraphUiTick, useWorkbenchVersionTick };
|
|
2944
|
+
export { AbstractWorkbench, CLIWorkbench, DefaultNode, DefaultNodeContent, DefaultUIExtensionRegistry, InMemoryWorkbench, Inspector, LocalGraphRunner, NodeHandles, RemoteGraphRunner, WorkbenchCanvas, WorkbenchContext, WorkbenchProvider, WorkbenchStudio, formatDataUrlAsLabel, formatDeclaredTypeSignature, getNodeBorderClassNames, preformatValueForDisplay, resolveOutputDisplay, summarizeDeep, toReactFlow, useQueryParamBoolean, useQueryParamString, useThrottledValue, useWorkbenchBridge, useWorkbenchContext, useWorkbenchGraphTick, useWorkbenchGraphUiTick, useWorkbenchVersionTick };
|
|
2945
2945
|
//# sourceMappingURL=index.js.map
|