@tscircuit/core 0.0.2010 → 0.0.2012

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 +17 -8
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -19167,7 +19167,10 @@ function getSavedPcbTracePathTransform(group, port) {
19167
19167
  // lib/components/primitive-components/Group/get-saved-autorouting-phase-traces.ts
19168
19168
  import { applyToPoint as applyToPoint27 } from "transformation-matrix";
19169
19169
  import "@tscircuit/props";
19170
- var touchesEndpoint = (point6, endpoint) => Math.hypot(point6.x - endpoint.x, point6.y - endpoint.y) < 1e-4 && point6.layer === endpoint.layer;
19170
+ var touchesEndpoint = ({
19171
+ point: point6,
19172
+ endpoint
19173
+ }, db) => Math.hypot(point6.x - endpoint.x, point6.y - endpoint.y) < 1e-4 && (point6.pcb_port_id ? db.pcb_port.get(point6.pcb_port_id).layers.some((layer) => layer === endpoint.layer) : point6.layer === endpoint.layer);
19171
19174
  function getSavedAutoroutingPhaseTraces(phase, input, isFanout) {
19172
19175
  return getSavedAutoroutingPhaseTracesFromPaths({
19173
19176
  group: phase.getGroup(),
@@ -19243,16 +19246,22 @@ function getSavedAutoroutingPhaseTracesFromPaths({
19243
19246
  const last = route.at(-1);
19244
19247
  const firstLayer = first.route_type === "wire" ? first.layer : first.from_layer;
19245
19248
  const lastLayer = last.route_type === "wire" ? last.layer : last.to_layer;
19246
- if (!touchesEndpoint(remainingPoints[startIndex], {
19247
- ...first,
19248
- layer: firstLayer
19249
- })) {
19249
+ if (!touchesEndpoint(
19250
+ {
19251
+ point: remainingPoints[startIndex],
19252
+ endpoint: { ...first, layer: firstLayer }
19253
+ },
19254
+ port.root.db
19255
+ )) {
19250
19256
  throw new Error(
19251
19257
  `Saved phase path "${path.connection}" must start at its PCB port on an available layer`
19252
19258
  );
19253
19259
  }
19254
19260
  const endIndex = remainingPoints.findIndex(
19255
- (point6, index) => index !== startIndex && touchesEndpoint(point6, { ...last, layer: lastLayer })
19261
+ (point6, index) => index !== startIndex && touchesEndpoint(
19262
+ { point: point6, endpoint: { ...last, layer: lastLayer } },
19263
+ port.root.db
19264
+ )
19256
19265
  );
19257
19266
  if (!input.allowViaInPad && (first.route_type === "via" || last.route_type === "via" && endIndex >= 0)) {
19258
19267
  throw new Error(
@@ -64456,7 +64465,7 @@ function Group_getRoutingPhasePlans(group) {
64456
64465
  var package_default = {
64457
64466
  name: "@tscircuit/core",
64458
64467
  type: "module",
64459
- version: "0.0.2009",
64468
+ version: "0.0.2011",
64460
64469
  types: "dist/index.d.ts",
64461
64470
  main: "dist/index.js",
64462
64471
  module: "dist/index.js",
@@ -64492,7 +64501,7 @@ var package_default = {
64492
64501
  "@tscircuit/bga-fanout-solver": "github:tscircuit/bga-fanout-solver#247c835cb8d69b65e53891dcf869731079415b39",
64493
64502
  "@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
64494
64503
  "@tscircuit/capacity-autorouter": "^0.0.941",
64495
- "@tscircuit/checks": "^0.0.226",
64504
+ "@tscircuit/checks": "^0.0.227",
64496
64505
  "@tscircuit/circuit-json-util": "^0.0.116",
64497
64506
  "@tscircuit/common": "^0.0.20",
64498
64507
  "@tscircuit/copper-pour-solver": "^0.0.62",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.2010",
4
+ "version": "0.0.2012",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -37,7 +37,7 @@
37
37
  "@tscircuit/bga-fanout-solver": "github:tscircuit/bga-fanout-solver#247c835cb8d69b65e53891dcf869731079415b39",
38
38
  "@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
39
39
  "@tscircuit/capacity-autorouter": "^0.0.941",
40
- "@tscircuit/checks": "^0.0.226",
40
+ "@tscircuit/checks": "^0.0.227",
41
41
  "@tscircuit/circuit-json-util": "^0.0.116",
42
42
  "@tscircuit/common": "^0.0.20",
43
43
  "@tscircuit/copper-pour-solver": "^0.0.62",