@tscircuit/core 0.0.749 → 0.0.751

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 (3) hide show
  1. package/dist/index.d.ts +380 -251
  2. package/dist/index.js +18 -15
  3. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -7721,7 +7721,8 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
7721
7721
  rotation: props.pcbRotation ?? accumulatedRotation,
7722
7722
  source_component_id: this.source_component_id,
7723
7723
  subcircuit_id: subcircuit.subcircuit_id ?? void 0,
7724
- do_not_place: props.doNotPlace ?? false
7724
+ do_not_place: props.doNotPlace ?? false,
7725
+ obstructs_within_bounds: props.obstructsWithinBounds ?? true
7725
7726
  });
7726
7727
  const footprint = props.footprint ?? this._getImpliedFootprintString();
7727
7728
  if (!footprint && !this.isGroup) {
@@ -11503,12 +11504,10 @@ var debug7 = Debug8("Group_doInitialSchematicTraceRender");
11503
11504
  function applyTracesFromSolverOutput(args) {
11504
11505
  const { group, solver, pinIdToSchematicPortId, userNetIdToSck } = args;
11505
11506
  const { db } = group.root;
11506
- const correctedMap = solver.traceOverlapShiftSolver?.correctedTraceMap;
11507
+ const traces = solver.traceLabelOverlapAvoidanceSolver?.getOutput().traces ?? solver.schematicTraceLinesSolver?.solvedTracePaths;
11507
11508
  const pendingTraces = [];
11508
- debug7(
11509
- `Traces inside SchematicTraceSolver output: ${Object.values(correctedMap ?? {}).length}`
11510
- );
11511
- for (const solvedTracePath of Object.values(correctedMap ?? {})) {
11509
+ debug7(`Traces inside SchematicTraceSolver output: ${(traces ?? []).length}`);
11510
+ for (const solvedTracePath of traces ?? []) {
11512
11511
  const points = solvedTracePath?.tracePath;
11513
11512
  if (!Array.isArray(points) || points.length < 2) {
11514
11513
  debug7(
@@ -11629,7 +11628,7 @@ function applyNetLabelPlacements(args) {
11629
11628
  schematicPortIdsWithRoutedTraces
11630
11629
  } = args;
11631
11630
  const { db } = group.root;
11632
- const netLabelPlacements = solver.netLabelPlacementSolver?.netLabelPlacements ?? [];
11631
+ const netLabelPlacements = solver.traceLabelOverlapAvoidanceSolver?.getOutput().netLabelPlacements ?? [];
11633
11632
  const globalConnMap = solver.mspConnectionPairSolver.globalConnMap;
11634
11633
  for (const placement of netLabelPlacements) {
11635
11634
  debug8(`processing placement: ${placement.netId}`);
@@ -13041,7 +13040,8 @@ var Chip = class extends NormalComponent3 {
13041
13040
  rotation: props.pcbRotation ?? 0,
13042
13041
  source_component_id: this.source_component_id,
13043
13042
  subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
13044
- do_not_place: props.doNotPlace ?? false
13043
+ do_not_place: props.doNotPlace ?? false,
13044
+ obstructs_within_bounds: props.obstructsWithinBounds ?? true
13045
13045
  });
13046
13046
  this.pcb_component_id = pcb_component.pcb_component_id;
13047
13047
  }
@@ -13266,7 +13266,8 @@ var Jumper = class extends NormalComponent3 {
13266
13266
  rotation: props.pcbRotation ?? 0,
13267
13267
  source_component_id: this.source_component_id,
13268
13268
  subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
13269
- do_not_place: props.doNotPlace ?? false
13269
+ do_not_place: props.doNotPlace ?? false,
13270
+ obstructs_within_bounds: props.obstructsWithinBounds ?? true
13270
13271
  });
13271
13272
  this.pcb_component_id = pcb_component.pcb_component_id;
13272
13273
  }
@@ -13421,7 +13422,8 @@ var SolderJumper = class extends NormalComponent3 {
13421
13422
  rotation: props.pcbRotation ?? 0,
13422
13423
  source_component_id: this.source_component_id,
13423
13424
  subcircuit_id: this.getSubcircuit().subcircuit_id ?? void 0,
13424
- do_not_place: props.doNotPlace ?? false
13425
+ do_not_place: props.doNotPlace ?? false,
13426
+ obstructs_within_bounds: props.obstructsWithinBounds ?? true
13425
13427
  });
13426
13428
  this.pcb_component_id = pcb_component.pcb_component_id;
13427
13429
  }
@@ -14399,7 +14401,8 @@ var Via = class extends PrimitiveComponent2 {
14399
14401
  layer: props.fromLayer ?? "top",
14400
14402
  rotation: 0,
14401
14403
  source_component_id: this.source_component_id,
14402
- subcircuit_id: subcircuit?.subcircuit_id ?? void 0
14404
+ subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
14405
+ obstructs_within_bounds: true
14403
14406
  });
14404
14407
  this.pcb_component_id = pcb_component.pcb_component_id;
14405
14408
  }
@@ -15775,7 +15778,7 @@ import { identity as identity6 } from "transformation-matrix";
15775
15778
  var package_default = {
15776
15779
  name: "@tscircuit/core",
15777
15780
  type: "module",
15778
- version: "0.0.748",
15781
+ version: "0.0.750",
15779
15782
  types: "dist/index.d.ts",
15780
15783
  main: "dist/index.js",
15781
15784
  module: "dist/index.js",
@@ -15814,10 +15817,10 @@ var package_default = {
15814
15817
  "@tscircuit/matchpack": "^0.0.16",
15815
15818
  "@tscircuit/math-utils": "^0.0.21",
15816
15819
  "@tscircuit/miniflex": "^0.0.4",
15817
- "@tscircuit/props": "0.0.335",
15820
+ "@tscircuit/props": "0.0.341",
15818
15821
  "@tscircuit/schematic-autolayout": "^0.0.6",
15819
15822
  "@tscircuit/schematic-match-adapt": "^0.0.16",
15820
- "@tscircuit/schematic-trace-solver": "^0.0.38",
15823
+ "@tscircuit/schematic-trace-solver": "^0.0.40",
15821
15824
  "@tscircuit/simple-3d-svg": "^0.0.41",
15822
15825
  "@types/bun": "^1.2.16",
15823
15826
  "@types/debug": "^4.1.12",
@@ -15828,7 +15831,7 @@ var package_default = {
15828
15831
  "bun-match-svg": "0.0.12",
15829
15832
  "calculate-elbow": "^0.0.12",
15830
15833
  "chokidar-cli": "^3.0.0",
15831
- "circuit-json": "^0.0.265",
15834
+ "circuit-json": "^0.0.267",
15832
15835
  "circuit-json-to-bpc": "^0.0.13",
15833
15836
  "circuit-json-to-connectivity-map": "^0.0.22",
15834
15837
  "circuit-json-to-simple-3d": "^0.0.9",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.749",
4
+ "version": "0.0.751",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -40,10 +40,10 @@
40
40
  "@tscircuit/matchpack": "^0.0.16",
41
41
  "@tscircuit/math-utils": "^0.0.21",
42
42
  "@tscircuit/miniflex": "^0.0.4",
43
- "@tscircuit/props": "0.0.335",
43
+ "@tscircuit/props": "0.0.341",
44
44
  "@tscircuit/schematic-autolayout": "^0.0.6",
45
45
  "@tscircuit/schematic-match-adapt": "^0.0.16",
46
- "@tscircuit/schematic-trace-solver": "^0.0.38",
46
+ "@tscircuit/schematic-trace-solver": "^0.0.40",
47
47
  "@tscircuit/simple-3d-svg": "^0.0.41",
48
48
  "@types/bun": "^1.2.16",
49
49
  "@types/debug": "^4.1.12",
@@ -54,7 +54,7 @@
54
54
  "bun-match-svg": "0.0.12",
55
55
  "calculate-elbow": "^0.0.12",
56
56
  "chokidar-cli": "^3.0.0",
57
- "circuit-json": "^0.0.265",
57
+ "circuit-json": "^0.0.267",
58
58
  "circuit-json-to-bpc": "^0.0.13",
59
59
  "circuit-json-to-connectivity-map": "^0.0.22",
60
60
  "circuit-json-to-simple-3d": "^0.0.9",