@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.
package/README.md CHANGED
@@ -942,7 +942,14 @@ export interface FabricationNoteDimensionProps extends Omit<
942
942
  from: string | Point;
943
943
  to: string | Point;
944
944
  text?: string;
945
+ /** Offset distance in mm, or a unit-bearing string. Defaults to no offset. */
945
946
  offset?: string | number;
947
+ /**
948
+ * Unitless direction in footprint-local coordinates (+X right, +Y up).
949
+ * Preserved as supplied; omitted uses the perpendicular to from -> to.
950
+ * The direction rotates/mirrors with the footprint, without translation.
951
+ */
952
+ offsetDirection?: { x: number; y: number };
946
953
  font?: "tscircuit2024";
947
954
  fontSize?: string | number;
948
955
  color?: string;
@@ -1532,7 +1539,14 @@ export interface PcbNoteDimensionProps extends Omit<
1532
1539
  from: string | Point;
1533
1540
  to: string | Point;
1534
1541
  text?: string;
1542
+ /** Offset distance in mm, or a unit-bearing string. Defaults to no offset. */
1535
1543
  offset?: string | number;
1544
+ /**
1545
+ * Unitless direction in footprint-local coordinates (+X right, +Y up).
1546
+ * Preserved as supplied; omitted uses the perpendicular to from -> to.
1547
+ * The direction rotates/mirrors with the footprint, without translation.
1548
+ */
1549
+ offsetDirection?: { x: number; y: number };
1536
1550
  font?: "tscircuit2024";
1537
1551
  fontSize?: string | number;
1538
1552
  color?: string;
package/dist/index.d.ts CHANGED
@@ -33638,11 +33638,20 @@ interface AutorouterConfig {
33638
33638
  algorithmFn?: (simpleRouteJson: any) => Promise<any>;
33639
33639
  /** Override the solver used to place implicit breakout points. */
33640
33640
  implicitBreakoutPointSolverFn?: ImplicitBreakoutPointSolverFn;
33641
- preset?: /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential_trace" | "subcircuit" | "default" | "auto" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | "dogbone" | "bus_lanes" | /** @deprecated Use "auto_jumper" */ "auto-jumper" | /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential-trace" | /** @deprecated Use "auto_local" */ "auto-local" | /** @deprecated Use "auto_cloud" */ "auto-cloud";
33641
+ /**
33642
+ * single_layer_bus and single_layer_buses are aliases that parse as bus_lanes.
33643
+ * Omitted leaves the preset unset. Existing presets remain unchanged; no
33644
+ * conflicting fields or migration are introduced.
33645
+ */
33646
+ preset?: /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential_trace" | "subcircuit" | "default" | "auto" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | "dogbone" | "bus_lanes" | "single_layer_bus" | "single_layer_buses" | /** @deprecated Use "auto_jumper" */ "auto-jumper" | /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential-trace" | /** @deprecated Use "auto_local" */ "auto-local" | /** @deprecated Use "auto_cloud" */ "auto-cloud";
33642
33647
  }
33643
33648
  type AutorouterPreset = /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential_trace" | "subcircuit" | "default" | "auto" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout"
33644
33649
  /** Local pad-to-via fanout without routing to a breakout boundary. */
33645
- | "dogbone" | "bus_lanes" | "auto-jumper" | /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential-trace" | "auto-local" | "auto-cloud";
33650
+ | "dogbone" | "bus_lanes"
33651
+ /** Alias for bus_lanes; parsing normalizes to bus_lanes. */
33652
+ | "single_layer_bus"
33653
+ /** Alias for bus_lanes; parsing normalizes to bus_lanes. */
33654
+ | "single_layer_buses" | "auto-jumper" | /** @deprecated Disabled by default in core. Use the default autorouter with <autoroutingphase /> or <fanout /> as needed. Legacy support requires platformConfig.allowLegacyAutorouters: true. */ "sequential-trace" | "auto-local" | "auto-cloud";
33646
33655
  type AutorouterProp = AutorouterConfig | AutocompleteString<AutorouterPreset>;
33647
33656
  declare const routingTolerances: z.ZodObject<{
33648
33657
  minTraceWidth: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
@@ -33690,7 +33699,7 @@ declare const autorouterConfig: z.ZodObject<{
33690
33699
  groupMode: z.ZodOptional<z.ZodEnum<["sequential_trace", "subcircuit", "sequential-trace"]>>;
33691
33700
  algorithmFn: z.ZodOptional<z.ZodType<(simpleRouteJson: any) => Promise<any>, z.ZodTypeDef, (simpleRouteJson: any) => Promise<any>>>;
33692
33701
  implicitBreakoutPointSolverFn: z.ZodOptional<z.ZodType<ImplicitBreakoutPointSolverFn, z.ZodTypeDef, ImplicitBreakoutPointSolverFn>>;
33693
- preset: z.ZodOptional<z.ZodEnum<["sequential_trace", "subcircuit", "default", "auto", "auto_local", "auto_cloud", "auto_jumper", "tscircuit_beta", "krt", "freerouting", "simplify", "laser_prefab", "single_layer_fanout", "fanout", "dogbone", "bus_lanes", "auto-jumper", "sequential-trace", "auto-local", "auto-cloud"]>>;
33702
+ preset: z.ZodOptional<z.ZodEffects<z.ZodEnum<["sequential_trace", "subcircuit", "default", "auto", "auto_local", "auto_cloud", "auto_jumper", "tscircuit_beta", "krt", "freerouting", "simplify", "laser_prefab", "single_layer_fanout", "fanout", "dogbone", "bus_lanes", "single_layer_bus", "single_layer_buses", "auto-jumper", "sequential-trace", "auto-local", "auto-cloud"]>, "default" | "auto" | "sequential_trace" | "subcircuit" | "sequential-trace" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | "dogbone" | "bus_lanes" | "auto-jumper" | "auto-local" | "auto-cloud", "default" | "auto" | "sequential_trace" | "subcircuit" | "sequential-trace" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | "dogbone" | "bus_lanes" | "single_layer_bus" | "single_layer_buses" | "auto-jumper" | "auto-local" | "auto-cloud">>;
33694
33703
  local: z.ZodOptional<z.ZodBoolean>;
33695
33704
  }, "strip", z.ZodTypeAny, {
33696
33705
  serverUrl?: string | undefined;
@@ -33718,10 +33727,10 @@ declare const autorouterConfig: z.ZodObject<{
33718
33727
  groupMode?: "sequential_trace" | "subcircuit" | "sequential-trace" | undefined;
33719
33728
  algorithmFn?: ((simpleRouteJson: any) => Promise<any>) | undefined;
33720
33729
  implicitBreakoutPointSolverFn?: ImplicitBreakoutPointSolverFn | undefined;
33721
- preset?: "default" | "auto" | "sequential_trace" | "subcircuit" | "sequential-trace" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | "dogbone" | "bus_lanes" | "auto-jumper" | "auto-local" | "auto-cloud" | undefined;
33730
+ preset?: "default" | "auto" | "sequential_trace" | "subcircuit" | "sequential-trace" | "auto_local" | "auto_cloud" | "auto_jumper" | "tscircuit_beta" | "krt" | "freerouting" | "simplify" | "laser_prefab" | "single_layer_fanout" | "fanout" | "dogbone" | "bus_lanes" | "single_layer_bus" | "single_layer_buses" | "auto-jumper" | "auto-local" | "auto-cloud" | undefined;
33722
33731
  local?: boolean | undefined;
33723
33732
  }>;
33724
- declare const autorouterPreset: z.ZodUnion<[z.ZodLiteral<"sequential_trace">, z.ZodLiteral<"subcircuit">, z.ZodLiteral<"default">, z.ZodLiteral<"auto">, z.ZodLiteral<"auto_local">, z.ZodLiteral<"auto_cloud">, z.ZodLiteral<"auto_jumper">, z.ZodLiteral<"tscircuit_beta">, z.ZodLiteral<"krt">, z.ZodLiteral<"freerouting">, z.ZodLiteral<"simplify">, z.ZodLiteral<"laser_prefab">, z.ZodLiteral<"single_layer_fanout">, z.ZodLiteral<"fanout">, z.ZodLiteral<"dogbone">, z.ZodLiteral<"bus_lanes">, z.ZodLiteral<"auto-jumper">, z.ZodLiteral<"sequential-trace">, z.ZodLiteral<"auto-local">, z.ZodLiteral<"auto-cloud">]>;
33733
+ declare const autorouterPreset: z.ZodUnion<[z.ZodLiteral<"sequential_trace">, z.ZodLiteral<"subcircuit">, z.ZodLiteral<"default">, z.ZodLiteral<"auto">, z.ZodLiteral<"auto_local">, z.ZodLiteral<"auto_cloud">, z.ZodLiteral<"auto_jumper">, z.ZodLiteral<"tscircuit_beta">, z.ZodLiteral<"krt">, z.ZodLiteral<"freerouting">, z.ZodLiteral<"simplify">, z.ZodLiteral<"laser_prefab">, z.ZodLiteral<"single_layer_fanout">, z.ZodLiteral<"fanout">, z.ZodLiteral<"dogbone">, z.ZodLiteral<"bus_lanes">, z.ZodEffects<z.ZodLiteral<"single_layer_bus">, "bus_lanes", "single_layer_bus">, z.ZodEffects<z.ZodLiteral<"single_layer_buses">, "bus_lanes", "single_layer_buses">, z.ZodLiteral<"auto-jumper">, z.ZodLiteral<"sequential-trace">, z.ZodLiteral<"auto-local">, z.ZodLiteral<"auto-cloud">]>;
33725
33734
  declare const autorouterProp: z.ZodType<AutorouterProp>;
33726
33735
  declare const autorouterEffortLevel: z.ZodEnum<["1x", "1.5x", "2x", "5x", "10x", "100x"]>;
33727
33736
  declare const preflightRoutingCheckPolicy: z.ZodEnum<["none", "basic", "conservative"]>;
@@ -202807,7 +202816,17 @@ interface FabricationNoteDimensionProps extends Omit<PcbLayoutProps, "pcbLeftEdg
202807
202816
  from: string | Point;
202808
202817
  to: string | Point;
202809
202818
  text?: string;
202819
+ /** Offset distance in mm, or a unit-bearing string. Defaults to no offset. */
202810
202820
  offset?: string | number;
202821
+ /**
202822
+ * Unitless direction in footprint-local coordinates (+X right, +Y up).
202823
+ * Preserved as supplied; omitted uses the perpendicular to from -> to.
202824
+ * The direction rotates/mirrors with the footprint, without translation.
202825
+ */
202826
+ offsetDirection?: {
202827
+ x: number;
202828
+ y: number;
202829
+ };
202811
202830
  font?: "tscircuit2024";
202812
202831
  fontSize?: string | number;
202813
202832
  color?: string;
@@ -202905,6 +202924,16 @@ declare const fabricationNoteDimensionProps: z.ZodObject<Omit<{
202905
202924
  }>]>;
202906
202925
  text: z.ZodOptional<z.ZodString>;
202907
202926
  offset: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
202927
+ offsetDirection: z.ZodOptional<z.ZodObject<{
202928
+ x: z.ZodNumber;
202929
+ y: z.ZodNumber;
202930
+ }, "strip", z.ZodTypeAny, {
202931
+ x: number;
202932
+ y: number;
202933
+ }, {
202934
+ x: number;
202935
+ y: number;
202936
+ }>>;
202908
202937
  font: z.ZodOptional<z.ZodEnum<["tscircuit2024"]>>;
202909
202938
  fontSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
202910
202939
  color: z.ZodOptional<z.ZodString>;
@@ -202951,6 +202980,10 @@ declare const fabricationNoteDimensionProps: z.ZodObject<Omit<{
202951
202980
  centerToCenter?: true | undefined;
202952
202981
  color?: string | undefined;
202953
202982
  text?: string | undefined;
202983
+ offsetDirection?: {
202984
+ x: number;
202985
+ y: number;
202986
+ } | undefined;
202954
202987
  arrowSize?: number | undefined;
202955
202988
  units?: "in" | "mm" | undefined;
202956
202989
  outerEdgeToEdge?: true | undefined;
@@ -202995,6 +203028,10 @@ declare const fabricationNoteDimensionProps: z.ZodObject<Omit<{
202995
203028
  centerToCenter?: true | undefined;
202996
203029
  color?: string | undefined;
202997
203030
  text?: string | undefined;
203031
+ offsetDirection?: {
203032
+ x: number;
203033
+ y: number;
203034
+ } | undefined;
202998
203035
  arrowSize?: string | number | undefined;
202999
203036
  units?: "in" | "mm" | undefined;
203000
203037
  outerEdgeToEdge?: true | undefined;
@@ -241208,7 +241245,17 @@ interface PcbNoteDimensionProps extends Omit<PcbLayoutProps, "pcbLeftEdgeX" | "p
241208
241245
  from: string | Point;
241209
241246
  to: string | Point;
241210
241247
  text?: string;
241248
+ /** Offset distance in mm, or a unit-bearing string. Defaults to no offset. */
241211
241249
  offset?: string | number;
241250
+ /**
241251
+ * Unitless direction in footprint-local coordinates (+X right, +Y up).
241252
+ * Preserved as supplied; omitted uses the perpendicular to from -> to.
241253
+ * The direction rotates/mirrors with the footprint, without translation.
241254
+ */
241255
+ offsetDirection?: {
241256
+ x: number;
241257
+ y: number;
241258
+ };
241212
241259
  font?: "tscircuit2024";
241213
241260
  fontSize?: string | number;
241214
241261
  color?: string;
@@ -241306,6 +241353,16 @@ declare const pcbNoteDimensionProps: z.ZodObject<Omit<{
241306
241353
  }>]>;
241307
241354
  text: z.ZodOptional<z.ZodString>;
241308
241355
  offset: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
241356
+ offsetDirection: z.ZodOptional<z.ZodObject<{
241357
+ x: z.ZodNumber;
241358
+ y: z.ZodNumber;
241359
+ }, "strip", z.ZodTypeAny, {
241360
+ x: number;
241361
+ y: number;
241362
+ }, {
241363
+ x: number;
241364
+ y: number;
241365
+ }>>;
241309
241366
  font: z.ZodOptional<z.ZodEnum<["tscircuit2024"]>>;
241310
241367
  fontSize: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>>;
241311
241368
  color: z.ZodOptional<z.ZodString>;
@@ -241352,6 +241409,10 @@ declare const pcbNoteDimensionProps: z.ZodObject<Omit<{
241352
241409
  centerToCenter?: true | undefined;
241353
241410
  color?: string | undefined;
241354
241411
  text?: string | undefined;
241412
+ offsetDirection?: {
241413
+ x: number;
241414
+ y: number;
241415
+ } | undefined;
241355
241416
  arrowSize?: number | undefined;
241356
241417
  units?: "in" | "mm" | undefined;
241357
241418
  outerEdgeToEdge?: true | undefined;
@@ -241396,6 +241457,10 @@ declare const pcbNoteDimensionProps: z.ZodObject<Omit<{
241396
241457
  centerToCenter?: true | undefined;
241397
241458
  color?: string | undefined;
241398
241459
  text?: string | undefined;
241460
+ offsetDirection?: {
241461
+ x: number;
241462
+ y: number;
241463
+ } | undefined;
241399
241464
  arrowSize?: string | number | undefined;
241400
241465
  units?: "in" | "mm" | undefined;
241401
241466
  outerEdgeToEdge?: true | undefined;
package/dist/index.js CHANGED
@@ -16533,11 +16533,15 @@ var autorouterConfig = z44.object({
16533
16533
  "fanout",
16534
16534
  "dogbone",
16535
16535
  "bus_lanes",
16536
+ "single_layer_bus",
16537
+ "single_layer_buses",
16536
16538
  "auto-jumper",
16537
16539
  "sequential-trace",
16538
16540
  "auto-local",
16539
16541
  "auto-cloud"
16540
- ]).optional(),
16542
+ ]).transform(
16543
+ (preset) => preset === "single_layer_bus" || preset === "single_layer_buses" ? "bus_lanes" : preset
16544
+ ).optional(),
16541
16545
  local: z44.boolean().optional()
16542
16546
  });
16543
16547
  var autorouterPreset = z44.union([
@@ -16558,6 +16562,8 @@ var autorouterPreset = z44.union([
16558
16562
  z44.literal("fanout"),
16559
16563
  z44.literal("dogbone"),
16560
16564
  z44.literal("bus_lanes"),
16565
+ z44.literal("single_layer_bus").transform(() => "bus_lanes"),
16566
+ z44.literal("single_layer_buses").transform(() => "bus_lanes"),
16561
16567
  z44.literal("auto-jumper"),
16562
16568
  z44.literal("sequential-trace"),
16563
16569
  z44.literal("auto-local"),
@@ -18631,6 +18637,7 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
18631
18637
  to: dimensionTarget,
18632
18638
  text: z108.string().optional(),
18633
18639
  offset: distance24.optional(),
18640
+ offsetDirection: z108.object({ x: z108.number().finite(), y: z108.number().finite() }).optional(),
18634
18641
  font: z108.enum(["tscircuit2024"]).optional(),
18635
18642
  fontSize: length6.optional(),
18636
18643
  color: z108.string().optional(),
@@ -19449,6 +19456,7 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
19449
19456
  to: dimensionTarget2,
19450
19457
  text: z153.string().optional(),
19451
19458
  offset: distance51.optional(),
19459
+ offsetDirection: z153.object({ x: z153.number().finite(), y: z153.number().finite() }).optional(),
19452
19460
  font: z153.enum(["tscircuit2024"]).optional(),
19453
19461
  fontSize: length13.optional(),
19454
19462
  color: z153.string().optional(),