@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkbenchStudio.d.ts","sourceRoot":"","sources":["../../../../../src/examples/reactflow/WorkbenchStudio.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkbenchStudio.d.ts","sourceRoot":"","sources":["../../../../../src/examples/reactflow/WorkbenchStudio.tsx"],"names":[],"mappings":"AAyhBA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,MAAM,EACN,cAAc,EACd,OAAO,EACP,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,aAAa,EACb,KAAK,EACL,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,qBAAqB,EACrB,UAAU,EACV,kBAAkB,GACnB,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAClD,WAAW,EAAE,OAAO,GAAG,aAAa,GAAG,WAAW,CAAC;IACnD,mBAAmB,EAAE,CAAC,CAAC,EAAE,OAAO,GAAG,aAAa,GAAG,WAAW,KAAK,IAAI,CAAC;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,qBAAqB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C,2CAiDA"}
|
package/lib/esm/index.js
CHANGED
|
@@ -875,7 +875,7 @@ function toReactFlow(def, positions, registry, selectedNodeIds, selectedEdgeIds,
|
|
|
875
875
|
toDisplay: opts?.toDisplay,
|
|
876
876
|
},
|
|
877
877
|
position: positions[n.nodeId] ?? { x: 0, y: 0 },
|
|
878
|
-
type: opts?.resolveNodeType?.(n.typeId) ?? "
|
|
878
|
+
type: opts?.resolveNodeType?.(n.typeId) ?? "spark:default",
|
|
879
879
|
selected: selectedNodeIds ? selectedNodeIds.has(n.nodeId) : undefined,
|
|
880
880
|
};
|
|
881
881
|
});
|
|
@@ -1002,11 +1002,11 @@ function WorkbenchCanvas({ showValues, toDisplay, }) {
|
|
|
1002
1002
|
if (renderer)
|
|
1003
1003
|
custom.set(typeId, renderer);
|
|
1004
1004
|
}
|
|
1005
|
-
const types = { "
|
|
1005
|
+
const types = { "spark:default": DefaultNode };
|
|
1006
1006
|
for (const [typeId, comp] of custom.entries()) {
|
|
1007
1007
|
types[`spark:${typeId}`] = comp;
|
|
1008
1008
|
}
|
|
1009
|
-
const resolver = (nodeTypeId) => custom.has(nodeTypeId) ? `spark:${nodeTypeId}` : "
|
|
1009
|
+
const resolver = (nodeTypeId) => custom.has(nodeTypeId) ? `spark:${nodeTypeId}` : "spark:default";
|
|
1010
1010
|
return { nodeTypes: types, resolveNodeType: resolver };
|
|
1011
1011
|
// registry is stable; ui renderers expected to be set up before mount
|
|
1012
1012
|
}, [wb, registry]);
|
|
@@ -1580,7 +1580,16 @@ function WorkbenchStudioCanvas({ setRegistry, autoScroll, onAutoScrollChange, ex
|
|
|
1580
1580
|
}
|
|
1581
1581
|
// Coercions (client-side no-op to satisfy validation) if provided
|
|
1582
1582
|
for (const c of desc.coercions) {
|
|
1583
|
-
|
|
1583
|
+
if (c.async) {
|
|
1584
|
+
r.registerAsyncCoercion(c.from, c.to, async (v) => v, {
|
|
1585
|
+
nonTransitive: c.nonTransitive,
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1588
|
+
else {
|
|
1589
|
+
r.registerCoercion(c.from, c.to, (v) => v, {
|
|
1590
|
+
nonTransitive: c.nonTransitive,
|
|
1591
|
+
});
|
|
1592
|
+
}
|
|
1584
1593
|
}
|
|
1585
1594
|
// Nodes (use no-op impl for compute)
|
|
1586
1595
|
for (const n of desc.nodes) {
|