@bian-womp/spark-workbench 0.1.7 → 0.1.9
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 +13 -4
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/examples/reactflow/WorkbenchStudio.d.ts.map +1 -1
- package/lib/esm/index.js +13 -4
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/examples/reactflow/WorkbenchStudio.d.ts.map +1 -1
- package/package.json +4 -4
package/lib/cjs/index.cjs
CHANGED
|
@@ -877,7 +877,7 @@ function toReactFlow(def, positions, registry, selectedNodeIds, selectedEdgeIds,
|
|
|
877
877
|
toDisplay: opts?.toDisplay,
|
|
878
878
|
},
|
|
879
879
|
position: positions[n.nodeId] ?? { x: 0, y: 0 },
|
|
880
|
-
type: opts?.resolveNodeType?.(n.typeId) ?? "
|
|
880
|
+
type: opts?.resolveNodeType?.(n.typeId) ?? "spark:default",
|
|
881
881
|
selected: selectedNodeIds ? selectedNodeIds.has(n.nodeId) : undefined,
|
|
882
882
|
};
|
|
883
883
|
});
|
|
@@ -1004,11 +1004,11 @@ function WorkbenchCanvas({ showValues, toDisplay, }) {
|
|
|
1004
1004
|
if (renderer)
|
|
1005
1005
|
custom.set(typeId, renderer);
|
|
1006
1006
|
}
|
|
1007
|
-
const types = { "
|
|
1007
|
+
const types = { "spark:default": DefaultNode };
|
|
1008
1008
|
for (const [typeId, comp] of custom.entries()) {
|
|
1009
1009
|
types[`spark:${typeId}`] = comp;
|
|
1010
1010
|
}
|
|
1011
|
-
const resolver = (nodeTypeId) => custom.has(nodeTypeId) ? `spark:${nodeTypeId}` : "
|
|
1011
|
+
const resolver = (nodeTypeId) => custom.has(nodeTypeId) ? `spark:${nodeTypeId}` : "spark:default";
|
|
1012
1012
|
return { nodeTypes: types, resolveNodeType: resolver };
|
|
1013
1013
|
// registry is stable; ui renderers expected to be set up before mount
|
|
1014
1014
|
}, [wb, registry]);
|
|
@@ -1582,7 +1582,16 @@ function WorkbenchStudioCanvas({ setRegistry, autoScroll, onAutoScrollChange, ex
|
|
|
1582
1582
|
}
|
|
1583
1583
|
// Coercions (client-side no-op to satisfy validation) if provided
|
|
1584
1584
|
for (const c of desc.coercions) {
|
|
1585
|
-
|
|
1585
|
+
if (c.async) {
|
|
1586
|
+
r.registerAsyncCoercion(c.from, c.to, async (v) => v, {
|
|
1587
|
+
nonTransitive: c.nonTransitive,
|
|
1588
|
+
});
|
|
1589
|
+
}
|
|
1590
|
+
else {
|
|
1591
|
+
r.registerCoercion(c.from, c.to, (v) => v, {
|
|
1592
|
+
nonTransitive: c.nonTransitive,
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1586
1595
|
}
|
|
1587
1596
|
// Nodes (use no-op impl for compute)
|
|
1588
1597
|
for (const n of desc.nodes) {
|