@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.
@@ -1 +1 @@
1
- {"version":3,"file":"NodeContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/misc/NodeContextMenu.tsx"],"names":[],"mappings":"AAQA,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,SAAS,EACT,MAAM,EACN,OAAO,GACR,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,kDA2RA"}
1
+ {"version":3,"file":"NodeContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/misc/NodeContextMenu.tsx"],"names":[],"mappings":"AAQA,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,SAAS,EACT,MAAM,EACN,OAAO,GACR,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,kDAuRA"}
package/lib/esm/index.js CHANGED
@@ -3126,9 +3126,6 @@ function NodeContextMenu({ open, clientPos, nodeId, onClose, }) {
3126
3126
  if (!typeId || raw === undefined)
3127
3127
  return;
3128
3128
  const unwrap = (v) => isTypedOutput(v) ? getTypedOutputValue(v) : v;
3129
- const clone = (v) => typeof structuredClone === "function"
3130
- ? structuredClone(v)
3131
- : JSON.parse(JSON.stringify(v));
3132
3129
  const coerceIfNeeded = async (fromType, toType, value) => {
3133
3130
  if (!toType || toType === fromType || !runner?.coerce)
3134
3131
  return value;
@@ -3194,7 +3191,7 @@ function NodeContextMenu({ open, clientPos, nodeId, onClose, }) {
3194
3191
  typeId: elemTarget.nodeTypeId,
3195
3192
  position: { x: pos.x + (col + 1) * DX, y: pos.y + row * DY },
3196
3193
  params: {},
3197
- initialInputs: { [elemTarget.inputHandle]: clone(cv) },
3194
+ initialInputs: { [elemTarget.inputHandle]: structuredClone(cv) },
3198
3195
  });
3199
3196
  runner.update(wb.export());
3200
3197
  await runner.whenIdle();