@tscircuit/props 0.0.673 → 0.0.675

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.
@@ -22,7 +22,14 @@ export interface FabricationNoteDimensionProps
22
22
  from: string | Point
23
23
  to: string | Point
24
24
  text?: string
25
+ /** Offset distance in mm, or a unit-bearing string. Defaults to no offset. */
25
26
  offset?: string | number
27
+ /**
28
+ * Unitless direction in footprint-local coordinates (+X right, +Y up).
29
+ * Preserved as supplied; omitted uses the perpendicular to from -> to.
30
+ * The direction rotates/mirrors with the footprint, without translation.
31
+ */
32
+ offsetDirection?: { x: number; y: number }
26
33
  font?: "tscircuit2024"
27
34
  fontSize?: string | number
28
35
  color?: string
@@ -50,6 +57,9 @@ export const fabricationNoteDimensionProps = pcbLayoutProps
50
57
  to: dimensionTarget,
51
58
  text: z.string().optional(),
52
59
  offset: distance.optional(),
60
+ offsetDirection: z
61
+ .object({ x: z.number().finite(), y: z.number().finite() })
62
+ .optional(),
53
63
  font: z.enum(["tscircuit2024"]).optional(),
54
64
  fontSize: length.optional(),
55
65
  color: z.string().optional(),
@@ -351,6 +351,11 @@ export interface AutorouterConfig {
351
351
  algorithmFn?: (simpleRouteJson: any) => Promise<any>
352
352
  /** Override the solver used to place implicit breakout points. */
353
353
  implicitBreakoutPointSolverFn?: ImplicitBreakoutPointSolverFn
354
+ /**
355
+ * single_layer_bus and single_layer_buses are aliases that parse as bus_lanes.
356
+ * Omitted leaves the preset unset. Existing presets remain unchanged; no
357
+ * conflicting fields or migration are introduced.
358
+ */
354
359
  preset?:
355
360
  | /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential_trace"
356
361
  | "subcircuit"
@@ -368,6 +373,8 @@ export interface AutorouterConfig {
368
373
  | "fanout"
369
374
  | "dogbone"
370
375
  | "bus_lanes"
376
+ | "single_layer_bus"
377
+ | "single_layer_buses"
371
378
  | /** @deprecated Use "auto_jumper" */ "auto-jumper"
372
379
  | /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential-trace"
373
380
  | /** @deprecated Use "auto_local" */ "auto-local"
@@ -392,6 +399,10 @@ export type AutorouterPreset =
392
399
  /** Local pad-to-via fanout without routing to a breakout boundary. */
393
400
  | "dogbone"
394
401
  | "bus_lanes"
402
+ /** Alias for bus_lanes; parsing normalizes to bus_lanes. */
403
+ | "single_layer_bus"
404
+ /** Alias for bus_lanes; parsing normalizes to bus_lanes. */
405
+ | "single_layer_buses"
395
406
  | "auto-jumper"
396
407
  | /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential-trace"
397
408
  | "auto-local"
@@ -467,11 +478,18 @@ export const autorouterConfig = z.object({
467
478
  "fanout",
468
479
  "dogbone",
469
480
  "bus_lanes",
481
+ "single_layer_bus",
482
+ "single_layer_buses",
470
483
  "auto-jumper",
471
484
  "sequential-trace",
472
485
  "auto-local",
473
486
  "auto-cloud",
474
487
  ])
488
+ .transform((preset) =>
489
+ preset === "single_layer_bus" || preset === "single_layer_buses"
490
+ ? "bus_lanes"
491
+ : preset,
492
+ )
475
493
  .optional(),
476
494
  local: z.boolean().optional(),
477
495
  })
@@ -493,6 +511,8 @@ export const autorouterPreset = z.union([
493
511
  z.literal("fanout"),
494
512
  z.literal("dogbone"),
495
513
  z.literal("bus_lanes"),
514
+ z.literal("single_layer_bus").transform(() => "bus_lanes" as const),
515
+ z.literal("single_layer_buses").transform(() => "bus_lanes" as const),
496
516
  z.literal("auto-jumper"),
497
517
  z.literal("sequential-trace"),
498
518
  z.literal("auto-local"),
@@ -22,7 +22,14 @@ export interface PcbNoteDimensionProps
22
22
  from: string | Point
23
23
  to: string | Point
24
24
  text?: string
25
+ /** Offset distance in mm, or a unit-bearing string. Defaults to no offset. */
25
26
  offset?: string | number
27
+ /**
28
+ * Unitless direction in footprint-local coordinates (+X right, +Y up).
29
+ * Preserved as supplied; omitted uses the perpendicular to from -> to.
30
+ * The direction rotates/mirrors with the footprint, without translation.
31
+ */
32
+ offsetDirection?: { x: number; y: number }
26
33
  font?: "tscircuit2024"
27
34
  fontSize?: string | number
28
35
  color?: string
@@ -50,6 +57,9 @@ export const pcbNoteDimensionProps = pcbLayoutProps
50
57
  to: dimensionTarget,
51
58
  text: z.string().optional(),
52
59
  offset: distance.optional(),
60
+ offsetDirection: z
61
+ .object({ x: z.number().finite(), y: z.number().finite() })
62
+ .optional(),
53
63
  font: z.enum(["tscircuit2024"]).optional(),
54
64
  fontSize: length.optional(),
55
65
  color: z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/props",
3
- "version": "0.0.673",
3
+ "version": "0.0.675",
4
4
  "description": "Props for tscircuit builtin component types",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",