@tscircuit/core 0.0.397 → 0.0.398

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
@@ -4266,6 +4266,7 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
4266
4266
  };
4267
4267
  doInitialSourceRender(): void;
4268
4268
  doInitialPcbComponentRender(): void;
4269
+ doInitialPcbTraceRender(): void;
4269
4270
  }
4270
4271
 
4271
4272
  declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts> {
package/dist/index.js CHANGED
@@ -7172,6 +7172,36 @@ var Jumper = class extends NormalComponent {
7172
7172
  });
7173
7173
  this.pcb_component_id = pcb_component.pcb_component_id;
7174
7174
  }
7175
+ doInitialPcbTraceRender() {
7176
+ const { db } = this.root;
7177
+ const pcb_ports = db.pcb_port.list({
7178
+ pcb_component_id: this.pcb_component_id
7179
+ });
7180
+ const pinLabelToPortId = {};
7181
+ for (const port of pcb_ports) {
7182
+ const match = port.source_port_id && port.source_port_id.match(/(\d+)$/);
7183
+ if (match) {
7184
+ const label = (parseInt(match[1], 10) + 1).toString();
7185
+ pinLabelToPortId[label] = port.pcb_port_id;
7186
+ }
7187
+ }
7188
+ const traces = db.pcb_trace.list();
7189
+ const updatePortId = (portId) => {
7190
+ if (portId && typeof portId === "string" && portId.startsWith("{PIN")) {
7191
+ const pin = portId.replace("{PIN", "").replace("}", "");
7192
+ return pinLabelToPortId[pin] || portId;
7193
+ }
7194
+ return portId;
7195
+ };
7196
+ for (const trace of traces) {
7197
+ if (!trace.route) continue;
7198
+ for (const segment of trace.route) {
7199
+ if (segment.route_type !== "wire") continue;
7200
+ segment.start_pcb_port_id = updatePortId(segment.start_pcb_port_id);
7201
+ segment.end_pcb_port_id = updatePortId(segment.end_pcb_port_id);
7202
+ }
7203
+ }
7204
+ }
7175
7205
  };
7176
7206
 
7177
7207
  // lib/components/normal-components/Led.ts
@@ -8127,7 +8157,7 @@ import { identity as identity4 } from "transformation-matrix";
8127
8157
  var package_default = {
8128
8158
  name: "@tscircuit/core",
8129
8159
  type: "module",
8130
- version: "0.0.396",
8160
+ version: "0.0.397",
8131
8161
  types: "dist/index.d.ts",
8132
8162
  main: "dist/index.js",
8133
8163
  module: "dist/index.js",
@@ -8150,7 +8180,7 @@ var package_default = {
8150
8180
  },
8151
8181
  devDependencies: {
8152
8182
  "@biomejs/biome": "^1.8.3",
8153
- "@tscircuit/footprinter": "^0.0.155",
8183
+ "@tscircuit/footprinter": "^0.0.156",
8154
8184
  "@tscircuit/import-snippet": "^0.0.4",
8155
8185
  "@tscircuit/layout": "^0.0.28",
8156
8186
  "@tscircuit/log-soup": "^1.0.2",
@@ -8181,14 +8211,14 @@ var package_default = {
8181
8211
  dependencies: {
8182
8212
  "@lume/kiwi": "^0.4.3",
8183
8213
  "@tscircuit/capacity-autorouter": "^0.0.52",
8184
- "@tscircuit/checks": "^0.0.37",
8214
+ "@tscircuit/checks": "^0.0.46",
8185
8215
  "@tscircuit/circuit-json-util": "^0.0.47",
8186
8216
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
8187
8217
  "@tscircuit/math-utils": "^0.0.14",
8188
8218
  "@tscircuit/props": "^0.0.178",
8189
8219
  "@tscircuit/schematic-autolayout": "^0.0.6",
8220
+ "circuit-json-to-connectivity-map": "^0.0.22",
8190
8221
  "circuit-json": "0.0.170",
8191
- "circuit-json-to-connectivity-map": "^0.0.20",
8192
8222
  "css-select": "^5.1.0",
8193
8223
  "format-si-unit": "^0.0.3",
8194
8224
  nanoid: "^5.0.7",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.397",
4
+ "version": "0.0.398",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@biomejs/biome": "^1.8.3",
27
- "@tscircuit/footprinter": "^0.0.155",
27
+ "@tscircuit/footprinter": "^0.0.156",
28
28
  "@tscircuit/import-snippet": "^0.0.4",
29
29
  "@tscircuit/layout": "^0.0.28",
30
30
  "@tscircuit/log-soup": "^1.0.2",
@@ -55,14 +55,14 @@
55
55
  "dependencies": {
56
56
  "@lume/kiwi": "^0.4.3",
57
57
  "@tscircuit/capacity-autorouter": "^0.0.52",
58
- "@tscircuit/checks": "^0.0.37",
58
+ "@tscircuit/checks": "^0.0.46",
59
59
  "@tscircuit/circuit-json-util": "^0.0.47",
60
60
  "@tscircuit/infgrid-ijump-astar": "^0.0.33",
61
61
  "@tscircuit/math-utils": "^0.0.14",
62
62
  "@tscircuit/props": "^0.0.178",
63
63
  "@tscircuit/schematic-autolayout": "^0.0.6",
64
+ "circuit-json-to-connectivity-map": "^0.0.22",
64
65
  "circuit-json": "0.0.170",
65
- "circuit-json-to-connectivity-map": "^0.0.20",
66
66
  "css-select": "^5.1.0",
67
67
  "format-si-unit": "^0.0.3",
68
68
  "nanoid": "^5.0.7",