@tscircuit/core 0.0.2156 → 0.0.2157

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -119173,7 +119173,7 @@ var RoutingPhasePreparationError = class extends Error {
119173
119173
  var package_default = {
119174
119174
  name: "@tscircuit/core",
119175
119175
  type: "module",
119176
- version: "0.0.2155",
119176
+ version: "0.0.2156",
119177
119177
  types: "dist/index.d.ts",
119178
119178
  main: "dist/index.js",
119179
119179
  module: "dist/index.js",
@@ -119980,14 +119980,21 @@ function getEndpointSourcePortIdsFromGeometry(db2, trace) {
119980
119980
  (point6) => Boolean(point6) && point6.route_type === "wire" && point6.x !== void 0 && point6.y !== void 0
119981
119981
  );
119982
119982
  for (const endpoint of endpoints) {
119983
+ const exactEndpointSourcePortIds = /* @__PURE__ */ new Set();
119983
119984
  for (const pcbPort of db2.pcb_port.list()) {
119984
119985
  if (!pcbPort.source_port_id) continue;
119985
119986
  if (endpoint.layer && pcbPort.layers && !pcbPort.layers.includes(endpoint.layer))
119986
119987
  continue;
119987
119988
  if (distance18(endpoint, pcbPort) <= 0.01) {
119988
- sourcePortIds.add(pcbPort.source_port_id);
119989
+ exactEndpointSourcePortIds.add(pcbPort.source_port_id);
119989
119990
  }
119990
119991
  }
119992
+ if (exactEndpointSourcePortIds.size > 0) {
119993
+ for (const sourcePortId of exactEndpointSourcePortIds) {
119994
+ sourcePortIds.add(sourcePortId);
119995
+ }
119996
+ continue;
119997
+ }
119991
119998
  for (const smtpad of db2.pcb_smtpad.list()) {
119992
119999
  if (!smtpad.pcb_port_id) continue;
119993
120000
  if (endpoint.layer && smtpad.layer !== endpoint.layer) continue;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.2156",
4
+ "version": "0.0.2157",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",