@tscircuit/core 0.0.1929 → 0.0.1931

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 CHANGED
@@ -109183,6 +109183,7 @@ declare class Via extends PrimitiveComponent<typeof viaProps> {
109183
109183
  doInitialPcbComponentRender(): void;
109184
109184
  doInitialSourceRender(): void;
109185
109185
  doInitialSourceTraceRender(): void;
109186
+ doInitialPcbPortAttachment(): void;
109186
109187
  doInitialPcbPrimitiveRender(): void;
109187
109188
  }
109188
109189
 
package/dist/index.js CHANGED
@@ -4858,13 +4858,10 @@ var Via = class extends PrimitiveComponent2 {
4858
4858
  initPorts() {
4859
4859
  const layers = this._parsedProps.layers;
4860
4860
  for (const layer of layers) {
4861
- const port2 = new Port({ name: layer, layer });
4862
- port2.registerMatch(this);
4863
- this.add(port2);
4861
+ const port = new Port({ name: layer, layer });
4862
+ port.registerMatch(this);
4863
+ this.add(port);
4864
4864
  }
4865
- const port = new Port({ name: "pin1" });
4866
- port.registerMatch(this);
4867
- this.add(port);
4868
4865
  }
4869
4866
  /**
4870
4867
  * Find the Net or Trace that this via is connected to
@@ -4978,6 +4975,14 @@ var Via = class extends PrimitiveComponent2 {
4978
4975
  source_trace_id: this.source_trace_id ?? void 0
4979
4976
  });
4980
4977
  }
4978
+ doInitialPcbPortAttachment() {
4979
+ if (this.root?.pcbDisabled) return;
4980
+ this.root.db.pcb_via.update(this.pcb_via_id, {
4981
+ pcb_port_ids: this.children.flatMap(
4982
+ (child) => child instanceof Port && child.pcb_port_id ? [child.pcb_port_id] : []
4983
+ )
4984
+ });
4985
+ }
4981
4986
  doInitialPcbPrimitiveRender() {
4982
4987
  if (this.root?.pcbDisabled) return;
4983
4988
  const { db } = this.root;
@@ -63312,7 +63317,7 @@ function Group_getRoutingPhasePlans(group) {
63312
63317
  var package_default = {
63313
63318
  name: "@tscircuit/core",
63314
63319
  type: "module",
63315
- version: "0.0.1928",
63320
+ version: "0.0.1930",
63316
63321
  types: "dist/index.d.ts",
63317
63322
  main: "dist/index.js",
63318
63323
  module: "dist/index.js",
@@ -63382,7 +63387,7 @@ var package_default = {
63382
63387
  "bun-match-svg": "0.0.12",
63383
63388
  "calculate-elbow": "^0.0.12",
63384
63389
  "chokidar-cli": "^3.0.0",
63385
- "circuit-json": "^0.0.492",
63390
+ "circuit-json": "^0.0.493",
63386
63391
  "circuit-json-to-bpc": "^0.0.13",
63387
63392
  "circuit-json-to-connectivity-map": "^0.0.30",
63388
63393
  "circuit-json-to-gltf": "^0.0.128",
@@ -63446,7 +63451,7 @@ var package_default = {
63446
63451
  overrides: {
63447
63452
  "@tscircuit/circuit-json-util": "^0.0.114",
63448
63453
  "@tscircuit/props": "^0.0.660",
63449
- "circuit-json": "^0.0.492"
63454
+ "circuit-json": "^0.0.493"
63450
63455
  }
63451
63456
  };
63452
63457
 
@@ -64856,7 +64861,7 @@ var Group5 = class extends NormalComponent3 {
64856
64861
  x: centerX,
64857
64862
  y: centerY
64858
64863
  };
64859
- const shouldUsePcbContentCenter = this.isSubcircuit || pcbContentBounds !== void 0;
64864
+ const shouldUsePcbContentCenter = this.isSubcircuit || this.isRoutingDirective || pcbContentBounds !== void 0;
64860
64865
  let center = hasExplicitPositioning ? shouldUsePcbContentCenter ? {
64861
64866
  x: props.width === void 0 ? centerX : existingCenter.x,
64862
64867
  y: props.height === void 0 ? centerY : existingCenter.y
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1929",
4
+ "version": "0.0.1931",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -71,7 +71,7 @@
71
71
  "bun-match-svg": "0.0.12",
72
72
  "calculate-elbow": "^0.0.12",
73
73
  "chokidar-cli": "^3.0.0",
74
- "circuit-json": "^0.0.492",
74
+ "circuit-json": "^0.0.493",
75
75
  "circuit-json-to-bpc": "^0.0.13",
76
76
  "circuit-json-to-connectivity-map": "^0.0.30",
77
77
  "circuit-json-to-gltf": "^0.0.128",
@@ -135,6 +135,6 @@
135
135
  "overrides": {
136
136
  "@tscircuit/circuit-json-util": "^0.0.114",
137
137
  "@tscircuit/props": "^0.0.660",
138
- "circuit-json": "^0.0.492"
138
+ "circuit-json": "^0.0.493"
139
139
  }
140
140
  }