@tscircuit/core 0.0.1947 → 0.0.1949

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 +18 -14
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -63461,7 +63461,7 @@ function Group_getRoutingPhasePlans(group) {
63461
63461
  var package_default = {
63462
63462
  name: "@tscircuit/core",
63463
63463
  type: "module",
63464
- version: "0.0.1946",
63464
+ version: "0.0.1948",
63465
63465
  types: "dist/index.d.ts",
63466
63466
  main: "dist/index.js",
63467
63467
  module: "dist/index.js",
@@ -63500,7 +63500,7 @@ var package_default = {
63500
63500
  "@tscircuit/checks": "^0.0.204",
63501
63501
  "@tscircuit/circuit-json-util": "^0.0.114",
63502
63502
  "@tscircuit/common": "^0.0.20",
63503
- "@tscircuit/copper-pour-solver": "^0.0.54",
63503
+ "@tscircuit/copper-pour-solver": "^0.0.56",
63504
63504
  "@tscircuit/create-fdm-enclosure": "0.0.4",
63505
63505
  "@tscircuit/fanout-solver": "0.0.78",
63506
63506
  "@tscircuit/footprinter": "^0.0.426",
@@ -63996,15 +63996,16 @@ function Group_syncFanoutExitsWithGlobalConnections({
63996
63996
  // lib/components/primitive-components/Group/add-port-ids-to-traces-at-jumper-pads.ts
63997
63997
  function getJumperPadInfos(db) {
63998
63998
  const padInfos = [];
63999
- const pcbSmtpads = db.pcb_smtpad.list();
64000
- const jumperSmtpads = pcbSmtpads.filter((pad) => {
64001
- const component = db.pcb_component.get(pad.pcb_component_id);
64002
- if (!component) return false;
64003
- const sourceComponent = db.source_component.get(
64004
- component.source_component_id
64005
- );
64006
- return sourceComponent?.name?.startsWith("__autoplaced_jumper");
64007
- });
63999
+ const jumperSourceComponentIds = new Set(
64000
+ db.source_component.list().filter((component) => component.name?.startsWith("__autoplaced_jumper")).map((component) => component.source_component_id)
64001
+ );
64002
+ if (jumperSourceComponentIds.size === 0) return padInfos;
64003
+ const jumperPcbComponentIds = new Set(
64004
+ db.pcb_component.list().filter(
64005
+ (component) => jumperSourceComponentIds.has(component.source_component_id)
64006
+ ).map((component) => component.pcb_component_id)
64007
+ );
64008
+ const jumperSmtpads = db.pcb_smtpad.list().filter((pad) => jumperPcbComponentIds.has(pad.pcb_component_id));
64008
64009
  for (const smtpad of jumperSmtpads) {
64009
64010
  if (smtpad.shape === "polygon") continue;
64010
64011
  if (!smtpad.pcb_port_id) continue;
@@ -64079,8 +64080,7 @@ function splitRouteAtJumperPads(route, padInfos) {
64079
64080
  }
64080
64081
  return segments;
64081
64082
  }
64082
- function addPortIdsToTracesAtJumperPads(segments, db) {
64083
- const padInfos = getJumperPadInfos(db);
64083
+ function addPortIdsToTracesAtJumperPads(segments, padInfos) {
64084
64084
  if (padInfos.length === 0) return segments;
64085
64085
  const result = [];
64086
64086
  for (const segment2 of segments) {
@@ -66126,6 +66126,7 @@ var Group5 = class extends NormalComponent3 {
66126
66126
  pcbTraceIdsToReplace: pcb_trace_ids_to_be_replaced
66127
66127
  });
66128
66128
  const materializedPcbVias = db.pcb_via.list();
66129
+ const jumperPadInfos = getJumperPadInfos(db);
66129
66130
  for (const pcb_trace of output_pcb_traces) {
66130
66131
  if (pcb_trace.type !== "pcb_trace") continue;
66131
66132
  pcb_trace.subcircuit_id ??= this.subcircuit_id;
@@ -66160,7 +66161,10 @@ var Group5 = class extends NormalComponent3 {
66160
66161
  if (segments === null) {
66161
66162
  segments = [cjRoute];
66162
66163
  }
66163
- const processedSegments = addPortIdsToTracesAtJumperPads(segments, db);
66164
+ const processedSegments = addPortIdsToTracesAtJumperPads(
66165
+ segments,
66166
+ jumperPadInfos
66167
+ );
66164
66168
  for (const segment2 of processedSegments) {
66165
66169
  if (segment2.length > 0) {
66166
66170
  const circuitJsonSegment = getCircuitJsonPcbTraceRoute(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1947",
4
+ "version": "0.0.1949",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -40,7 +40,7 @@
40
40
  "@tscircuit/checks": "^0.0.204",
41
41
  "@tscircuit/circuit-json-util": "^0.0.114",
42
42
  "@tscircuit/common": "^0.0.20",
43
- "@tscircuit/copper-pour-solver": "^0.0.54",
43
+ "@tscircuit/copper-pour-solver": "^0.0.56",
44
44
  "@tscircuit/create-fdm-enclosure": "0.0.4",
45
45
  "@tscircuit/fanout-solver": "0.0.78",
46
46
  "@tscircuit/footprinter": "^0.0.426",