@bian-womp/spark-workbench 0.2.13 → 0.2.14
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 +8 -5
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/misc/DefaultNode.d.ts +2 -7
- package/lib/cjs/src/misc/DefaultNode.d.ts.map +1 -1
- package/lib/cjs/src/misc/WorkbenchStudio.d.ts.map +1 -1
- package/lib/esm/index.js +9 -6
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/misc/DefaultNode.d.ts +2 -7
- package/lib/esm/src/misc/DefaultNode.d.ts.map +1 -1
- package/lib/esm/src/misc/WorkbenchStudio.d.ts.map +1 -1
- package/package.json +4 -4
package/lib/cjs/index.cjs
CHANGED
|
@@ -2119,10 +2119,10 @@ const DefaultNode = React.memo(function DefaultNode({ id, data, selected, isConn
|
|
|
2119
2119
|
position: "relative",
|
|
2120
2120
|
minWidth: typeof data.renderWidth === "number" ? data.renderWidth : undefined,
|
|
2121
2121
|
minHeight: typeof data.renderHeight === "number" ? data.renderHeight : undefined,
|
|
2122
|
-
}, children: [jsxRuntime.jsx(DefaultNodeHeader, { id: id, title: typeId,
|
|
2122
|
+
}, children: [jsxRuntime.jsx(DefaultNodeHeader, { id: id, title: typeId, validation: validation, showId: data.showValues }), jsxRuntime.jsx(DefaultNodeContent, { data: data, isConnectable: isConnectable })] }));
|
|
2123
2123
|
});
|
|
2124
2124
|
DefaultNode.displayName = "DefaultNode";
|
|
2125
|
-
function DefaultNodeHeader({ id, title,
|
|
2125
|
+
function DefaultNodeHeader({ id, title, validation, right, showId, onInvalidate, }) {
|
|
2126
2126
|
const ctx = useWorkbenchContext();
|
|
2127
2127
|
const handleInvalidate = React.useCallback(() => {
|
|
2128
2128
|
try {
|
|
@@ -2142,11 +2142,11 @@ function DefaultNodeHeader({ id, title, status, validation, right, onInvalidate,
|
|
|
2142
2142
|
}, children: [jsxRuntime.jsx("strong", { className: "flex-1 h-full text-sm", style: { lineHeight: `${NODE_HEADER_HEIGHT_PX}px` }, children: title }), jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [jsxRuntime.jsx("button", { className: "w-4 h-4 border border-gray-400 rounded text-[10px] leading-3 flex items-center justify-center", title: "Invalidate and re-run", onClick: (e) => {
|
|
2143
2143
|
e.stopPropagation();
|
|
2144
2144
|
handleInvalidate();
|
|
2145
|
-
}, children:
|
|
2145
|
+
}, children: jsxRuntime.jsx(react$1.ArrowClockwiseIcon, { size: 10 }) }), right, validation.issues && validation.issues.length > 0 && (jsxRuntime.jsx(IssueBadge, { level: validation.issues.some((i) => i.level === "error")
|
|
2146
2146
|
? "error"
|
|
2147
2147
|
: "warning", size: 12, className: "w-3 h-3", title: validation.issues
|
|
2148
2148
|
.map((v) => `${v.code}: ${v.message}`)
|
|
2149
|
-
.join("; ") })), jsxRuntime.jsxs("span", { className: "text-[10px] opacity-70", children: ["(", id, ")"] })] })] }));
|
|
2149
|
+
.join("; ") })), showId && jsxRuntime.jsxs("span", { className: "text-[10px] opacity-70", children: ["(", id, ")"] })] })] }));
|
|
2150
2150
|
}
|
|
2151
2151
|
function DefaultNodeContent({ data, isConnectable, }) {
|
|
2152
2152
|
const { showValues, inputValues, outputValues, toString } = data;
|
|
@@ -2911,8 +2911,11 @@ function WorkbenchStudioCanvas({ setRegistry, autoScroll, onAutoScrollChange, ex
|
|
|
2911
2911
|
if (positions && typeof positions === "object")
|
|
2912
2912
|
wb.setPositions(positions);
|
|
2913
2913
|
}
|
|
2914
|
+
else if (!runner.isRunning()) {
|
|
2915
|
+
alert("Engine is not running");
|
|
2916
|
+
}
|
|
2914
2917
|
else {
|
|
2915
|
-
alert("Graph definition is empty
|
|
2918
|
+
alert("Graph definition is empty");
|
|
2916
2919
|
}
|
|
2917
2920
|
}
|
|
2918
2921
|
else {
|