@tscircuit/core 0.0.1091 → 0.0.1092

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 +14 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -8321,9 +8321,19 @@ var Port = class extends PrimitiveComponent2 {
8321
8321
  }
8322
8322
  if (pcbMatches.length > 1) {
8323
8323
  if (!areAllPcbPrimitivesOverlapping(pcbMatches)) {
8324
- throw new Error(
8325
- `${this.getString()} has multiple non-overlapping pcb matches, unclear how to place pcb_port: ${pcbMatches.map((c) => c.getString()).join(", ")}. (Note: tscircuit core does not currently allow you to specify internally connected pcb primitives with the same port hints, try giving them different port hints and specifying they are connected externally- or file an issue)`
8324
+ const portName = this.props.name;
8325
+ const componentName = this.getParentNormalComponent()?.props.name ?? "unknown";
8326
+ const altAliases = this.getNameAndAliases().filter(
8327
+ (h) => h !== portName
8326
8328
  );
8329
+ const altMsg = altAliases.length > 0 ? ` (consider using alternate aliases: ${altAliases.join(", ")})` : "";
8330
+ db.source_ambiguous_port_reference.insert({
8331
+ error_type: "source_ambiguous_port_reference",
8332
+ message: `${componentName}.${portName} is ambiguous: ${componentName}.${portName} references multiple non-overlapping pads: ${pcbMatches.map((c) => c.getString()).join(", ")}${altMsg}`,
8333
+ source_port_id: this.source_port_id ?? void 0,
8334
+ source_component_id: this.getParentNormalComponent()?.source_component_id ?? void 0
8335
+ });
8336
+ return;
8327
8337
  }
8328
8338
  matchCenter = getCenterOfPcbPrimitives(pcbMatches);
8329
8339
  }
@@ -18200,7 +18210,7 @@ import { identity as identity5 } from "transformation-matrix";
18200
18210
  var package_default = {
18201
18211
  name: "@tscircuit/core",
18202
18212
  type: "module",
18203
- version: "0.0.1090",
18213
+ version: "0.0.1091",
18204
18214
  types: "dist/index.d.ts",
18205
18215
  main: "dist/index.js",
18206
18216
  module: "dist/index.js",
@@ -18259,7 +18269,7 @@ var package_default = {
18259
18269
  "bun-match-svg": "0.0.12",
18260
18270
  "calculate-elbow": "^0.0.12",
18261
18271
  "chokidar-cli": "^3.0.0",
18262
- "circuit-json": "^0.0.390",
18272
+ "circuit-json": "^0.0.393",
18263
18273
  "circuit-json-to-bpc": "^0.0.13",
18264
18274
  "circuit-json-to-connectivity-map": "^0.0.23",
18265
18275
  "circuit-json-to-gltf": "^0.0.73",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1091",
4
+ "version": "0.0.1092",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -60,7 +60,7 @@
60
60
  "bun-match-svg": "0.0.12",
61
61
  "calculate-elbow": "^0.0.12",
62
62
  "chokidar-cli": "^3.0.0",
63
- "circuit-json": "^0.0.390",
63
+ "circuit-json": "^0.0.393",
64
64
  "circuit-json-to-bpc": "^0.0.13",
65
65
  "circuit-json-to-connectivity-map": "^0.0.23",
66
66
  "circuit-json-to-gltf": "^0.0.73",