@tscircuit/core 0.0.461 → 0.0.462

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 +6 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -486,8 +486,10 @@ var preprocessSelector = (selector) => {
486
486
  );
487
487
  }
488
488
  if (/net\.[0-9]/.test(selector)) {
489
+ const match = selector.match(/net\.([^ >]+)/);
490
+ const netName = match ? match[1] : "";
489
491
  throw new Error(
490
- 'Net names cannot start with a number, try using a prefix like "VBUS1"'
492
+ `Net name "${netName}" cannot start with a number, try using a prefix like "VBUS1"`
491
493
  );
492
494
  }
493
495
  return selector.replace(/ pin/g, " port").replace(/ subcircuit\./g, " group[isSubcircuit=true]").replace(/([^ ])\>([^ ])/g, "$1 > $2").replace(
@@ -1621,8 +1623,9 @@ var createNetsFromProps = (component, props) => {
1621
1623
  );
1622
1624
  }
1623
1625
  if (/net\.[0-9]/.test(prop)) {
1626
+ const netName = prop.split("net.")[1];
1624
1627
  throw new Error(
1625
- 'Net names cannot start with a number, try using a prefix like "VBUS1"'
1628
+ `Net name "${netName}" cannot start with a number, try using a prefix like "VBUS1"`
1626
1629
  );
1627
1630
  }
1628
1631
  const subcircuit = component.getSubcircuit();
@@ -9616,7 +9619,7 @@ import { identity as identity4 } from "transformation-matrix";
9616
9619
  var package_default = {
9617
9620
  name: "@tscircuit/core",
9618
9621
  type: "module",
9619
- version: "0.0.460",
9622
+ version: "0.0.461",
9620
9623
  types: "dist/index.d.ts",
9621
9624
  main: "dist/index.js",
9622
9625
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.461",
4
+ "version": "0.0.462",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",