@tscircuit/core 0.0.1960 → 0.0.1962

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
@@ -1614,6 +1614,7 @@ interface RoutingPhasePlan {
1614
1614
  /** The single breakout/fanout boundary; breakout points may expand it. */
1615
1615
  fanoutBounds?: SimpleRouteBounds;
1616
1616
  autorouter?: AutorouterProp;
1617
+ algorithmFn?: AutoroutingPhaseProps["algorithmFn"];
1617
1618
  reroute?: boolean;
1618
1619
  region?: AutoroutingPhaseProps["region"];
1619
1620
  connectionSelectors?: string[];
@@ -94366,6 +94367,7 @@ declare class AutoroutingPhase extends PrimitiveComponent<typeof autoroutingPhas
94366
94367
  key: zod.ZodOptional<zod.ZodAny>;
94367
94368
  name: zod.ZodOptional<zod.ZodString>;
94368
94369
  autorouter: zod.ZodOptional<zod.ZodType<_tscircuit_props.AutorouterProp, zod.ZodTypeDef, _tscircuit_props.AutorouterProp>>;
94370
+ algorithmFn: zod.ZodOptional<zod.ZodType<(simpleRouteJson: any) => Promise<any>, zod.ZodTypeDef, (simpleRouteJson: any) => Promise<any>>>;
94369
94371
  preflightRoutingCheckPolicy: zod.ZodOptional<zod.ZodEnum<["none", "basic", "conservative"]>>;
94370
94372
  phaseIndex: zod.ZodOptional<zod.ZodNumber>;
94371
94373
  pcbTracePaths: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
@@ -94531,6 +94533,7 @@ declare class AutoroutingPhase extends PrimitiveComponent<typeof autoroutingPhas
94531
94533
  minBoardEdgeClearance?: number | undefined;
94532
94534
  minViaHoleDiameter?: number | undefined;
94533
94535
  minViaPadDiameter?: number | undefined;
94536
+ algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
94534
94537
  autorouter?: _tscircuit_props.AutorouterProp | undefined;
94535
94538
  preflightRoutingCheckPolicy?: "none" | "basic" | "conservative" | undefined;
94536
94539
  connection?: string | undefined;
@@ -94585,6 +94588,7 @@ declare class AutoroutingPhase extends PrimitiveComponent<typeof autoroutingPhas
94585
94588
  minBoardEdgeClearance?: string | number | undefined;
94586
94589
  minViaHoleDiameter?: string | number | undefined;
94587
94590
  minViaPadDiameter?: string | number | undefined;
94591
+ algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
94588
94592
  autorouter?: _tscircuit_props.AutorouterProp | undefined;
94589
94593
  preflightRoutingCheckPolicy?: "none" | "basic" | "conservative" | undefined;
94590
94594
  connection?: string | undefined;
@@ -94649,6 +94653,7 @@ declare class AutoroutingPhase extends PrimitiveComponent<typeof autoroutingPhas
94649
94653
  minBoardEdgeClearance?: number | undefined;
94650
94654
  minViaHoleDiameter?: number | undefined;
94651
94655
  minViaPadDiameter?: number | undefined;
94656
+ algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
94652
94657
  autorouter?: _tscircuit_props.AutorouterProp | undefined;
94653
94658
  preflightRoutingCheckPolicy?: "none" | "basic" | "conservative" | undefined;
94654
94659
  connection?: string | undefined;
@@ -94703,6 +94708,7 @@ declare class AutoroutingPhase extends PrimitiveComponent<typeof autoroutingPhas
94703
94708
  minBoardEdgeClearance?: string | number | undefined;
94704
94709
  minViaHoleDiameter?: string | number | undefined;
94705
94710
  minViaPadDiameter?: string | number | undefined;
94711
+ algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
94706
94712
  autorouter?: _tscircuit_props.AutorouterProp | undefined;
94707
94713
  preflightRoutingCheckPolicy?: "none" | "basic" | "conservative" | undefined;
94708
94714
  connection?: string | undefined;
package/dist/index.js CHANGED
@@ -63604,6 +63604,7 @@ function Group_getRoutingPhasePlans(group) {
63604
63604
  for (const plan of plans) {
63605
63605
  plan.autorouter = autoroutersByPhaseIndex.get(plan.routingPhaseIndex);
63606
63606
  const phaseProps = phasePropsByPhaseIndex.get(plan.routingPhaseIndex);
63607
+ plan.algorithmFn = phaseProps?.algorithmFn;
63607
63608
  plan.isImplicitRemainingPhase = plan.routingPhaseIndex === null && phaseProps === void 0;
63608
63609
  plan.phaseName = phaseProps?.name;
63609
63610
  plan.reroute = phaseProps?.reroute;
@@ -63744,7 +63745,7 @@ function Group_getRoutingPhasePlans(group) {
63744
63745
  var package_default = {
63745
63746
  name: "@tscircuit/core",
63746
63747
  type: "module",
63747
- version: "0.0.1959",
63748
+ version: "0.0.1961",
63748
63749
  types: "dist/index.d.ts",
63749
63750
  main: "dist/index.js",
63750
63751
  module: "dist/index.js",
@@ -63781,7 +63782,7 @@ var package_default = {
63781
63782
  "@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
63782
63783
  "@tscircuit/capacity-autorouter": "^0.0.919",
63783
63784
  "@tscircuit/checks": "^0.0.208",
63784
- "@tscircuit/circuit-json-util": "^0.0.115",
63785
+ "@tscircuit/circuit-json-util": "^0.0.116",
63785
63786
  "@tscircuit/common": "^0.0.20",
63786
63787
  "@tscircuit/copper-pour-solver": "^0.0.56",
63787
63788
  "@tscircuit/create-fdm-enclosure": "0.0.4",
@@ -63798,7 +63799,7 @@ var package_default = {
63798
63799
  "@tscircuit/math-utils": "^0.0.36",
63799
63800
  "@tscircuit/miniflex": "^0.0.4",
63800
63801
  "@tscircuit/ngspice-spice-engine": "^0.0.20",
63801
- "@tscircuit/props": "^0.0.664",
63802
+ "@tscircuit/props": "^0.0.665",
63802
63803
  "@tscircuit/schematic-match-adapt": "^0.0.18",
63803
63804
  "@tscircuit/schematic-trace-solver": "^0.0.205",
63804
63805
  "@tscircuit/solver-utils": "^0.0.16",
@@ -63817,9 +63818,9 @@ var package_default = {
63817
63818
  "circuit-json": "^0.0.497",
63818
63819
  "circuit-json-to-bpc": "^0.0.13",
63819
63820
  "circuit-json-to-connectivity-map": "^0.0.30",
63820
- "circuit-json-to-gltf": "^0.0.128",
63821
+ "circuit-json-to-gltf": "^0.0.132",
63821
63822
  "circuit-json-to-spice": "^0.0.45",
63822
- "circuit-to-svg": "^0.0.424",
63823
+ "circuit-to-svg": "^0.0.430",
63823
63824
  concurrently: "^9.1.2",
63824
63825
  "connectivity-map": "^1.0.0",
63825
63826
  debug: "^4.3.6",
@@ -63876,8 +63877,8 @@ var package_default = {
63876
63877
  zod: "^3.25.67"
63877
63878
  },
63878
63879
  overrides: {
63879
- "@tscircuit/circuit-json-util": "^0.0.115",
63880
- "@tscircuit/props": "^0.0.664",
63880
+ "@tscircuit/circuit-json-util": "^0.0.116",
63881
+ "@tscircuit/props": "^0.0.665",
63881
63882
  "circuit-json": "^0.0.497"
63882
63883
  }
63883
63884
  };
@@ -65610,7 +65611,11 @@ var Group5 = class extends NormalComponent {
65610
65611
  allowViaInPad: (typeof routingPhasePlan.autorouter === "object" ? routingPhasePlan.autorouter.allowViaInPad : void 0) ?? autorouterConfig.allowViaInPad
65611
65612
  } : resolvedPhaseAutorouterConfig;
65612
65613
  const stages = getLocalAutoroutingStages(
65613
- phaseAutorouterConfig,
65614
+ routingPhasePlan.algorithmFn ? {
65615
+ ...phaseAutorouterConfig,
65616
+ // The phase callback overrides inherited or preset callbacks.
65617
+ algorithmFn: routingPhasePlan.algorithmFn
65618
+ } : phaseAutorouterConfig,
65614
65619
  this.root?.platform
65615
65620
  );
65616
65621
  return stages.map((stage, phaseStageIndex) => ({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1960",
4
+ "version": "0.0.1962",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "@tscircuit/bus-lanes-solver": "github:tscircuit/bus-lanes-solver#0bc8d071241b18a3e7465a878881abe4998f6384",
39
39
  "@tscircuit/capacity-autorouter": "^0.0.919",
40
40
  "@tscircuit/checks": "^0.0.208",
41
- "@tscircuit/circuit-json-util": "^0.0.115",
41
+ "@tscircuit/circuit-json-util": "^0.0.116",
42
42
  "@tscircuit/common": "^0.0.20",
43
43
  "@tscircuit/copper-pour-solver": "^0.0.56",
44
44
  "@tscircuit/create-fdm-enclosure": "0.0.4",
@@ -55,7 +55,7 @@
55
55
  "@tscircuit/math-utils": "^0.0.36",
56
56
  "@tscircuit/miniflex": "^0.0.4",
57
57
  "@tscircuit/ngspice-spice-engine": "^0.0.20",
58
- "@tscircuit/props": "^0.0.664",
58
+ "@tscircuit/props": "^0.0.665",
59
59
  "@tscircuit/schematic-match-adapt": "^0.0.18",
60
60
  "@tscircuit/schematic-trace-solver": "^0.0.205",
61
61
  "@tscircuit/solver-utils": "^0.0.16",
@@ -74,9 +74,9 @@
74
74
  "circuit-json": "^0.0.497",
75
75
  "circuit-json-to-bpc": "^0.0.13",
76
76
  "circuit-json-to-connectivity-map": "^0.0.30",
77
- "circuit-json-to-gltf": "^0.0.128",
77
+ "circuit-json-to-gltf": "^0.0.132",
78
78
  "circuit-json-to-spice": "^0.0.45",
79
- "circuit-to-svg": "^0.0.424",
79
+ "circuit-to-svg": "^0.0.430",
80
80
  "concurrently": "^9.1.2",
81
81
  "connectivity-map": "^1.0.0",
82
82
  "debug": "^4.3.6",
@@ -133,8 +133,8 @@
133
133
  "zod": "^3.25.67"
134
134
  },
135
135
  "overrides": {
136
- "@tscircuit/circuit-json-util": "^0.0.115",
137
- "@tscircuit/props": "^0.0.664",
136
+ "@tscircuit/circuit-json-util": "^0.0.116",
137
+ "@tscircuit/props": "^0.0.665",
138
138
  "circuit-json": "^0.0.497"
139
139
  }
140
140
  }