@tscircuit/props 0.0.648 → 0.0.649

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/README.md CHANGED
@@ -468,7 +468,9 @@ export interface BreakoutProps
468
468
  * Saved port-to-exit wire/via routes in the fanout's local PCB frame.
469
469
  * Numeric distances are mm; unit strings are normalized to mm. Each route
470
470
  * must start at its selected port and end at its fanout exit. Layers name
471
- * physical board layers. Core creates the exits and preserves saved copper.
471
+ * physical board layers. Either endpoint may be a via when permitted by
472
+ * the circuit's routing rules (e.g. allowViaInPad for a via at a pad).
473
+ * Core creates the exits and preserves saved copper.
472
474
  * When supplied, replaces automatic routing (including `autorouter`) for
473
475
  * this fanout and must cover all its routing connections. Do not also add
474
476
  * a breakoutpoint/fanoutpoint for the same port. Omitted by default; existing
package/dist/index.d.ts CHANGED
@@ -31614,7 +31614,10 @@ declare const subpanelProps: z.ZodObject<Omit<{
31614
31614
  * fanout's local PCB frame, in mm: +X right, +Y up, right-handed with +Z
31615
31615
  * above the board. They are points (placement adds translation), not
31616
31616
  * directions. Numeric distances are mm; unit strings are parsed to mm.
31617
- * Layers are physical board layers, independent of placement.
31617
+ * Layers are physical board layers, independent of placement. Either endpoint
31618
+ * may be a via: the initial layer is its from_layer and the final layer is its
31619
+ * to_layer. Placement legality (including allowViaInPad) is checked by core,
31620
+ * since this schema has no pad geometry or inherited routing configuration.
31618
31621
  */
31619
31622
  declare const fanoutTracePath: z.ZodObject<{
31620
31623
  connection: z.ZodString;
@@ -32036,7 +32039,9 @@ interface BreakoutProps extends Omit<SubcircuitGroupProps, "subcircuit">, Fanout
32036
32039
  * Saved port-to-exit wire/via routes in the fanout's local PCB frame.
32037
32040
  * Numeric distances are mm; unit strings are normalized to mm. Each route
32038
32041
  * must start at its selected port and end at its fanout exit. Layers name
32039
- * physical board layers. Core creates the exits and preserves saved copper.
32042
+ * physical board layers. Either endpoint may be a via when permitted by
32043
+ * the circuit's routing rules (e.g. allowViaInPad for a via at a pad).
32044
+ * Core creates the exits and preserves saved copper.
32040
32045
  * When supplied, replaces automatic routing (including `autorouter`) for
32041
32046
  * this fanout and must cover all its routing connections. Do not also add
32042
32047
  * a breakoutpoint/fanoutpoint for the same port. Omitted by default; existing
package/dist/index.js CHANGED
@@ -16782,13 +16782,8 @@ var routePoint = z47.discriminatedUnion("route_type", [
16782
16782
  var fanoutTracePath = z47.object({
16783
16783
  connection: z47.string().min(1),
16784
16784
  route: z47.array(routePoint).min(2).superRefine((route, ctx) => {
16785
- if (route[0]?.route_type !== "wire" || route.at(-1)?.route_type !== "wire") {
16786
- ctx.addIssue({
16787
- code: "custom",
16788
- message: "A fanout trace path must start and end with wire points"
16789
- });
16790
- }
16791
- let layer = route[0]?.route_type === "wire" ? route[0].layer : void 0;
16785
+ const first = route[0];
16786
+ let layer = first?.route_type === "via" ? first.from_layer : first?.layer;
16792
16787
  for (const point8 of route) {
16793
16788
  if ((point8.route_type === "wire" ? point8.layer : point8.from_layer) !== layer) {
16794
16789
  ctx.addIssue({