@tscircuit/core 0.0.487 → 0.0.488
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/dist/index.d.ts +1 -0
- package/dist/index.js +15 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -760,6 +760,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> implements Tra
|
|
|
760
760
|
ports?: undefined;
|
|
761
761
|
portsWithSelectors?: undefined;
|
|
762
762
|
};
|
|
763
|
+
_resolveNet(selector: string): Net | null;
|
|
763
764
|
_findConnectedNets(): {
|
|
764
765
|
nets: Net[];
|
|
765
766
|
netsWithSelectors: Array<{
|
package/dist/index.js
CHANGED
|
@@ -4668,11 +4668,24 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
|
|
|
4668
4668
|
ports: portsWithSelectors.map(({ port }) => port)
|
|
4669
4669
|
};
|
|
4670
4670
|
}
|
|
4671
|
+
_resolveNet(selector) {
|
|
4672
|
+
const direct = this.getSubcircuit().selectOne(selector, {
|
|
4673
|
+
type: "net"
|
|
4674
|
+
});
|
|
4675
|
+
if (direct) return direct;
|
|
4676
|
+
const match = selector.match(/^net\.(.+)$/);
|
|
4677
|
+
const netName = match ? match[1] : null;
|
|
4678
|
+
if (!netName) return null;
|
|
4679
|
+
const allDescendants = this.root._getBoard().getDescendants();
|
|
4680
|
+
return allDescendants.find(
|
|
4681
|
+
(d) => d.componentName === "Net" && d._parsedProps.name === netName
|
|
4682
|
+
) || null;
|
|
4683
|
+
}
|
|
4671
4684
|
_findConnectedNets() {
|
|
4672
4685
|
const netsWithSelectors = this.getTracePathNetSelectors().map(
|
|
4673
4686
|
(selector) => ({
|
|
4674
4687
|
selector,
|
|
4675
|
-
net: this.
|
|
4688
|
+
net: this._resolveNet(selector)
|
|
4676
4689
|
})
|
|
4677
4690
|
);
|
|
4678
4691
|
const undefinedNets = netsWithSelectors.filter((n) => !n.net);
|
|
@@ -10228,7 +10241,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
10228
10241
|
var package_default = {
|
|
10229
10242
|
name: "@tscircuit/core",
|
|
10230
10243
|
type: "module",
|
|
10231
|
-
version: "0.0.
|
|
10244
|
+
version: "0.0.487",
|
|
10232
10245
|
types: "dist/index.d.ts",
|
|
10233
10246
|
main: "dist/index.js",
|
|
10234
10247
|
module: "dist/index.js",
|