@bian-womp/spark-workbench 0.3.26 → 0.3.27

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 CHANGED
@@ -2846,6 +2846,10 @@ function toReactFlow(def, positions, sizes, registry, opts) {
2846
2846
  }));
2847
2847
  const handleLayout = geom.handleLayout;
2848
2848
  const handles = geom.handles;
2849
+ const handleMetadata = {};
2850
+ for (const handleId of Object.keys(inputSource)) {
2851
+ handleMetadata[handleId] = sparkGraph.getInputHandleMetadata(inputSource, handleId);
2852
+ }
2849
2853
  const baseData = {
2850
2854
  typeId: n.typeId,
2851
2855
  params: n.params,
@@ -2864,6 +2868,7 @@ function toReactFlow(def, positions, sizes, registry, opts) {
2864
2868
  inputValues: opts.inputs?.[n.nodeId],
2865
2869
  inputDefaults: opts.inputDefaults?.[n.nodeId],
2866
2870
  outputValues: opts.outputs?.[n.nodeId],
2871
+ handleMetadata,
2867
2872
  status: opts.nodeStatus?.[n.nodeId],
2868
2873
  validation: {
2869
2874
  inputs: opts.nodeValidation?.inputs?.[n.nodeId] ?? [],
@@ -6118,7 +6123,6 @@ const WorkbenchCanvasComponent = React.forwardRef((props, ref) => {
6118
6123
  wb,
6119
6124
  uiVersion,
6120
6125
  ]);
6121
- const throttled = useThrottledValue(rfData, 100);
6122
6126
  const [menuState, setMenuState] = React.useState(null);
6123
6127
  // Compute the rectangular screen-space bounds of the current selection
6124
6128
  const getSelectionScreenBounds = () => {
@@ -6521,7 +6525,7 @@ const WorkbenchCanvasComponent = React.forwardRef((props, ref) => {
6521
6525
  return () => off();
6522
6526
  }, [wb]);
6523
6527
  const { onInit: userOnInit, ...restReactFlowProps } = reactFlowProps || {};
6524
- return (jsxRuntime.jsxs("div", { className: "w-full h-full relative overflow-hidden", onContextMenu: onContextMenu, children: [jsxRuntime.jsxs(react.ReactFlowProvider, { children: [jsxRuntime.jsxs(react.ReactFlow, { ...restReactFlowProps, nodes: throttled.nodes, edges: throttled.edges, nodeTypes: nodeTypes, edgeTypes: edgeTypes, connectionLineComponent: connectionLineRenderer, selectionOnDrag: true, onInit: (inst) => {
6528
+ return (jsxRuntime.jsxs("div", { className: "w-full h-full relative overflow-hidden", onContextMenu: onContextMenu, children: [jsxRuntime.jsxs(react.ReactFlowProvider, { children: [jsxRuntime.jsxs(react.ReactFlow, { ...restReactFlowProps, nodes: rfData.nodes, edges: rfData.edges, nodeTypes: nodeTypes, edgeTypes: edgeTypes, connectionLineComponent: connectionLineRenderer, selectionOnDrag: true, onInit: (inst) => {
6525
6529
  rfInstanceRef.current = inst;
6526
6530
  const savedViewport = wb.getViewport();
6527
6531
  if (savedViewport) {