@bian-womp/spark-workbench 0.2.16 → 0.2.17
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 +19 -14
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/misc/context/WorkbenchContext.provider.d.ts.map +1 -1
- package/lib/esm/index.js +19 -14
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/misc/context/WorkbenchContext.provider.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,2CAsjBA"}
|
package/lib/esm/index.js
CHANGED
|
@@ -1533,17 +1533,23 @@ function WorkbenchProvider({ wb, runner, registry, setRegistry, children, }) {
|
|
|
1533
1533
|
const snap = await runner.snapshotFull();
|
|
1534
1534
|
const remoteDef = snap?.def;
|
|
1535
1535
|
if (remoteDef && Array.isArray(remoteDef.nodes)) {
|
|
1536
|
+
// Mutate current def in-place to avoid emitting graphChanged and causing update loop
|
|
1536
1537
|
const cur = wb.export();
|
|
1537
|
-
const
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1538
|
+
const byId = new Map((remoteDef.nodes || []).map((n) => [n.nodeId, n]));
|
|
1539
|
+
let changed = false;
|
|
1540
|
+
for (const n of cur.nodes) {
|
|
1541
|
+
const rn = byId.get(n.nodeId);
|
|
1542
|
+
if (rn && rn.resolvedHandles) {
|
|
1543
|
+
const before = JSON.stringify(n.resolvedHandles || {});
|
|
1544
|
+
const after = JSON.stringify(rn.resolvedHandles || {});
|
|
1545
|
+
if (before !== after) {
|
|
1546
|
+
n.resolvedHandles = rn.resolvedHandles;
|
|
1547
|
+
changed = true;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
if (changed)
|
|
1552
|
+
wb.refreshValidation();
|
|
1547
1553
|
}
|
|
1548
1554
|
}
|
|
1549
1555
|
catch { }
|
|
@@ -1555,8 +1561,6 @@ function WorkbenchProvider({ wb, runner, registry, setRegistry, children, }) {
|
|
|
1555
1561
|
...s,
|
|
1556
1562
|
[nodeId]: { ...s[nodeId], invalidated: true },
|
|
1557
1563
|
}));
|
|
1558
|
-
// On any input change, refresh resolved handles (covers context-driven dynamic ports)
|
|
1559
|
-
refreshResolvedHandles();
|
|
1560
1564
|
}
|
|
1561
1565
|
return add("runner", "value")(e);
|
|
1562
1566
|
});
|
|
@@ -1600,9 +1604,10 @@ function WorkbenchProvider({ wb, runner, registry, setRegistry, children, }) {
|
|
|
1600
1604
|
return next;
|
|
1601
1605
|
});
|
|
1602
1606
|
}
|
|
1603
|
-
// After build/update, pull resolved handles
|
|
1604
|
-
if (e?.reason === "graph-updated" || e?.reason === "graph-built")
|
|
1607
|
+
// After build/update, pull resolved handles and merge in-place (no graphChanged)
|
|
1608
|
+
if (e?.reason === "graph-updated" || e?.reason === "graph-built") {
|
|
1605
1609
|
refreshResolvedHandles();
|
|
1610
|
+
}
|
|
1606
1611
|
return add("runner", "invalidate")(e);
|
|
1607
1612
|
});
|
|
1608
1613
|
const off3b = runner.on("stats", (s) => {
|