@tscircuit/core 0.0.189 → 0.0.191

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 +8 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2785,8 +2785,14 @@ var NormalComponent = class extends PrimitiveComponent {
2785
2785
  const { _parsedProps: props } = this;
2786
2786
  const dimensions = this._getSchematicBoxDimensions();
2787
2787
  const primaryPortLabels = {};
2788
- for (const [port, label] of Object.entries(props.pinLabels ?? {})) {
2789
- primaryPortLabels[port] = Array.isArray(label) ? label[0] : label;
2788
+ if (Array.isArray(props.pinLabels)) {
2789
+ props.pinLabels.forEach((label, index) => {
2790
+ primaryPortLabels[String(index + 1)] = label;
2791
+ });
2792
+ } else {
2793
+ for (const [port, label] of Object.entries(props.pinLabels ?? {})) {
2794
+ primaryPortLabels[port] = Array.isArray(label) ? label[0] : label;
2795
+ }
2790
2796
  }
2791
2797
  const schematic_component2 = db.schematic_component.insert({
2792
2798
  center: { x: props.schX ?? 0, y: props.schY ?? 0 },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.189",
4
+ "version": "0.0.191",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -45,7 +45,7 @@
45
45
  "@tscircuit/soup-util": "^0.0.40",
46
46
  "circuit-json": "^0.0.104",
47
47
  "circuit-json-to-connectivity-map": "^0.0.17",
48
- "circuit-to-svg": "^0.0.81",
48
+ "circuit-to-svg": "^0.0.82",
49
49
  "format-si-unit": "^0.0.2",
50
50
  "nanoid": "^5.0.7",
51
51
  "performance-now": "^2.1.0",