@bian-womp/spark-workbench 0.2.44 → 0.2.46

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
@@ -3128,9 +3128,6 @@ function NodeContextMenu({ open, clientPos, nodeId, onClose, }) {
3128
3128
  if (!typeId || raw === undefined)
3129
3129
  return;
3130
3130
  const unwrap = (v) => sparkGraph.isTypedOutput(v) ? sparkGraph.getTypedOutputValue(v) : v;
3131
- const clone = (v) => typeof structuredClone === "function"
3132
- ? structuredClone(v)
3133
- : JSON.parse(JSON.stringify(v));
3134
3131
  const coerceIfNeeded = async (fromType, toType, value) => {
3135
3132
  if (!toType || toType === fromType || !runner?.coerce)
3136
3133
  return value;
@@ -3196,7 +3193,7 @@ function NodeContextMenu({ open, clientPos, nodeId, onClose, }) {
3196
3193
  typeId: elemTarget.nodeTypeId,
3197
3194
  position: { x: pos.x + (col + 1) * DX, y: pos.y + row * DY },
3198
3195
  params: {},
3199
- initialInputs: { [elemTarget.inputHandle]: clone(cv) },
3196
+ initialInputs: { [elemTarget.inputHandle]: structuredClone(cv) },
3200
3197
  });
3201
3198
  runner.update(wb.export());
3202
3199
  await runner.whenIdle();