@tscircuit/core 0.0.90 → 0.0.91

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
@@ -261,6 +261,7 @@ declare const netProps: z.ZodObject<{
261
261
  }>;
262
262
  declare class Net extends PrimitiveComponent<typeof netProps> {
263
263
  source_net_id?: string;
264
+ componentName: string;
264
265
  getPortSelector(): string;
265
266
  doInitialSourceRender(): void;
266
267
  /**
@@ -289,6 +290,7 @@ declare class Trace extends PrimitiveComponent<typeof traceProps> {
289
290
  pcb_trace_id: string | null;
290
291
  schematic_trace_id: string | null;
291
292
  _portsRoutedOnPcb: Port[];
293
+ componentName: string;
292
294
  constructor(props: z.input<typeof traceProps>);
293
295
  get config(): {
294
296
  zodProps: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
@@ -534,6 +536,7 @@ declare class Port extends PrimitiveComponent<typeof portProps> {
534
536
  schematicSymbolPortDef: SchSymbol["ports"][number] | null;
535
537
  matchedComponents: PrimitiveComponent[];
536
538
  facingDirection: "up" | "down" | "left" | "right" | null;
539
+ componentName: string;
537
540
  constructor(props: z.input<typeof portProps>);
538
541
  _getGlobalPcbPositionBeforeLayout(): {
539
542
  x: number;
@@ -685,11 +688,13 @@ declare class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>
685
688
  get config(): {
686
689
  zodProps: Props;
687
690
  };
691
+ componentName: string;
688
692
  doInitialCreateTraceHintsFromProps(): void;
689
693
  }
690
694
 
691
695
  declare class Board extends Group<typeof boardProps> {
692
696
  pcb_board_id: string | null;
697
+ componentName: string;
693
698
  get isSubcircuit(): boolean;
694
699
  get config(): {
695
700
  zodProps: z.ZodObject<{
@@ -750,6 +755,7 @@ declare class Board extends Group<typeof boardProps> {
750
755
  }
751
756
 
752
757
  declare class Footprint extends PrimitiveComponent<typeof footprintProps> {
758
+ componentName: string;
753
759
  /**
754
760
  * A footprint is a constrainedlayout, the db elements are adjusted according
755
761
  * to any constraints that are defined.
@@ -761,6 +767,7 @@ declare class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
761
767
  pcb_smtpad_id: string | null;
762
768
  matchedPort: Port | null;
763
769
  isPcbPrimitive: boolean;
770
+ componentName: string;
764
771
  get config(): {
765
772
  zodProps: zod.ZodUnion<[zod.ZodObject<zod.objectUtil.extendShape<Omit<{
766
773
  pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
@@ -866,6 +873,7 @@ type PassivePorts = TwoPinPorts;
866
873
  type PolarizedPassivePorts = PassivePorts | "anode" | "cathode" | "pos" | "neg";
867
874
 
868
875
  declare class Resistor extends NormalComponent<typeof resistorProps, PassivePorts> {
876
+ componentName: string;
869
877
  get config(): {
870
878
  schematicSymbolName: BaseSymbolName;
871
879
  zodProps: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
@@ -1688,6 +1696,7 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
1688
1696
  }>;
1689
1697
  sourceFtype: Ftype;
1690
1698
  };
1699
+ componentName: string;
1691
1700
  pos: Port;
1692
1701
  pin1: Port;
1693
1702
  anode: Port;
@@ -2095,6 +2104,7 @@ declare class Diode extends NormalComponent<typeof diodeProps, TwoPinPorts> {
2095
2104
  }>;
2096
2105
  sourceFtype: Ftype;
2097
2106
  };
2107
+ componentName: string;
2098
2108
  initPorts(): void;
2099
2109
  }
2100
2110
 
@@ -2500,6 +2510,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PortNames
2500
2510
  }>;
2501
2511
  sourceFtype: "simple_capacitor";
2502
2512
  };
2513
+ componentName: string;
2503
2514
  pin1: Port;
2504
2515
  pin2: Port;
2505
2516
  doInitialCreateNetsFromProps(): void;
@@ -2509,6 +2520,7 @@ declare class Capacitor extends NormalComponent<typeof capacitorProps, PortNames
2509
2520
 
2510
2521
  declare class TraceHint extends PrimitiveComponent<typeof traceHintProps> {
2511
2522
  matchedPort: Port | null;
2523
+ componentName: string;
2512
2524
  doInitialPortMatching(): void;
2513
2525
  getPcbRouteHints(): Array<RouteHintPoint>;
2514
2526
  doInitialPcbTraceHintRender(): void;
@@ -3129,6 +3141,7 @@ declare class Chip<PinLabels extends string = never> extends NormalComponent<typ
3129
3141
  schHeight?: string | number | undefined;
3130
3142
  }>;
3131
3143
  };
3144
+ componentName: string;
3132
3145
  doInitialSourceRender(): void;
3133
3146
  doInitialSchematicComponentRender(): void;
3134
3147
  doInitialPcbComponentRender(): void;
@@ -3740,6 +3753,7 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
3740
3753
  schDirection?: "left" | "right" | undefined;
3741
3754
  }>;
3742
3755
  };
3756
+ componentName: string;
3743
3757
  doInitialSourceRender(): void;
3744
3758
  doInitialSchematicComponentRender(): void;
3745
3759
  doInitialPcbComponentRender(): void;
@@ -3747,6 +3761,7 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
3747
3761
 
3748
3762
  declare class SilkscreenPath extends PrimitiveComponent<typeof silkscreenPathProps> {
3749
3763
  pcb_silkscreen_path_id: string | null;
3764
+ componentName: string;
3750
3765
  get config(): {
3751
3766
  zodProps: zod.ZodObject<zod.objectUtil.extendShape<Omit<{
3752
3767
  pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
@@ -3825,6 +3840,7 @@ declare class PlatedHole extends PrimitiveComponent<typeof platedHoleProps> {
3825
3840
  pcb_plated_hole_id: string | null;
3826
3841
  matchedPort: Port | null;
3827
3842
  isPcbPrimitive: boolean;
3843
+ componentName: string;
3828
3844
  get config(): {
3829
3845
  zodProps: zod.ZodUnion<[zod.ZodObject<zod.objectUtil.extendShape<Omit<{
3830
3846
  pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
@@ -4019,6 +4035,7 @@ declare class Constraint extends PrimitiveComponent<typeof constraintProps> {
4019
4035
  declare class Hole extends PrimitiveComponent<typeof holeProps> {
4020
4036
  pcb_hole_id: string | null;
4021
4037
  isPcbPrimitive: boolean;
4038
+ componentName: string;
4022
4039
  get config(): {
4023
4040
  zodProps: zod.ZodEffects<zod.ZodObject<zod.objectUtil.extendShape<Omit<{
4024
4041
  pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
@@ -4098,6 +4115,7 @@ declare class Hole extends PrimitiveComponent<typeof holeProps> {
4098
4115
 
4099
4116
  declare class SilkscreenText extends PrimitiveComponent<typeof silkscreenTextProps> {
4100
4117
  isPcbPrimitive: boolean;
4118
+ componentName: string;
4101
4119
  doInitialPcbPrimitiveRender(): void;
4102
4120
  getPcbSize(): {
4103
4121
  width: number;
@@ -4108,6 +4126,7 @@ declare class SilkscreenText extends PrimitiveComponent<typeof silkscreenTextPro
4108
4126
  declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
4109
4127
  pcb_keepout_id: string | null;
4110
4128
  isPcbPrimitive: boolean;
4129
+ componentName: string;
4111
4130
  get config(): {
4112
4131
  zodProps: zod.ZodUnion<[zod.ZodObject<zod.objectUtil.extendShape<Omit<{
4113
4132
  pcbX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
@@ -4180,10 +4199,12 @@ declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
4180
4199
  }
4181
4200
 
4182
4201
  declare class FabricationNoteText extends PrimitiveComponent<typeof fabricationNoteTextProps> {
4202
+ componentName: string;
4183
4203
  doInitialPcbPrimitiveRender(): void;
4184
4204
  }
4185
4205
 
4186
4206
  declare class FabricationNotePath extends PrimitiveComponent<typeof fabricationNotePathProps> {
4207
+ componentName: string;
4187
4208
  fabrication_note_path_id: string | null;
4188
4209
  get config(): {
4189
4210
  zodProps: zod.ZodObject<zod.objectUtil.extendShape<Omit<{
package/dist/index.js CHANGED
@@ -573,6 +573,7 @@ import * as kiwi from "@lume/kiwi";
573
573
  import Debug from "debug";
574
574
  var debug = Debug("tscircuit:core:footprint");
575
575
  var Footprint = class extends PrimitiveComponent {
576
+ componentName = "Footprint";
576
577
  /**
577
578
  * A footprint is a constrainedlayout, the db elements are adjusted according
578
579
  * to any constraints that are defined.
@@ -801,6 +802,7 @@ var Port = class extends PrimitiveComponent {
801
802
  schematicSymbolPortDef = null;
802
803
  matchedComponents;
803
804
  facingDirection = null;
805
+ componentName = "Port";
804
806
  constructor(props) {
805
807
  if (!props.name && props.pinNumber) props.name = `pin${props.pinNumber}`;
806
808
  if (!props.name) {
@@ -1162,6 +1164,7 @@ var SmtPad = class extends PrimitiveComponent {
1162
1164
  pcb_smtpad_id = null;
1163
1165
  matchedPort = null;
1164
1166
  isPcbPrimitive = true;
1167
+ componentName = "SmtPad";
1165
1168
  get config() {
1166
1169
  return {
1167
1170
  zodProps: smtPadProps
@@ -1292,6 +1295,7 @@ import { silkscreenPathProps } from "@tscircuit/props";
1292
1295
  import { applyToPoint as applyToPoint4 } from "transformation-matrix";
1293
1296
  var SilkscreenPath = class extends PrimitiveComponent {
1294
1297
  pcb_silkscreen_path_id = null;
1298
+ componentName = "SilkscreenPath";
1295
1299
  get config() {
1296
1300
  return {
1297
1301
  zodProps: silkscreenPathProps
@@ -1333,6 +1337,7 @@ var PlatedHole = class extends PrimitiveComponent {
1333
1337
  pcb_plated_hole_id = null;
1334
1338
  matchedPort = null;
1335
1339
  isPcbPrimitive = true;
1340
+ componentName = "PlatedHole";
1336
1341
  get config() {
1337
1342
  return {
1338
1343
  zodProps: platedHoleProps
@@ -1427,6 +1432,7 @@ import { decomposeTSR as decomposeTSR2 } from "transformation-matrix";
1427
1432
  var Keepout = class extends PrimitiveComponent {
1428
1433
  pcb_keepout_id = null;
1429
1434
  isPcbPrimitive = true;
1435
+ componentName = "Keepout";
1430
1436
  get config() {
1431
1437
  return {
1432
1438
  zodProps: pcbKeepoutProps
@@ -1561,6 +1567,7 @@ var netProps = z3.object({
1561
1567
  });
1562
1568
  var Net = class extends PrimitiveComponent {
1563
1569
  source_net_id;
1570
+ componentName = "Net";
1564
1571
  getPortSelector() {
1565
1572
  return `net.${this.props.name}`;
1566
1573
  }
@@ -2110,6 +2117,7 @@ import "@tscircuit/props";
2110
2117
  import { applyToPoint as applyToPoint5 } from "transformation-matrix";
2111
2118
  var TraceHint = class extends PrimitiveComponent {
2112
2119
  matchedPort = null;
2120
+ componentName = "TraceHint";
2113
2121
  doInitialPortMatching() {
2114
2122
  const { db } = this.root;
2115
2123
  const { _parsedProps: props, parent } = this;
@@ -2166,6 +2174,7 @@ var Group = class extends NormalComponent {
2166
2174
  zodProps: groupProps
2167
2175
  };
2168
2176
  }
2177
+ componentName = "Group";
2169
2178
  doInitialCreateTraceHintsFromProps() {
2170
2179
  const { _parsedProps: props } = this;
2171
2180
  const { db } = this.root;
@@ -2187,6 +2196,7 @@ var Group = class extends NormalComponent {
2187
2196
  // lib/components/normal-components/Board.ts
2188
2197
  var Board = class extends Group {
2189
2198
  pcb_board_id = null;
2199
+ componentName = "Board";
2190
2200
  get isSubcircuit() {
2191
2201
  return true;
2192
2202
  }
@@ -2429,6 +2439,7 @@ var Trace = class extends PrimitiveComponent {
2429
2439
  pcb_trace_id = null;
2430
2440
  schematic_trace_id = null;
2431
2441
  _portsRoutedOnPcb;
2442
+ componentName = "Trace";
2432
2443
  constructor(props) {
2433
2444
  super(props);
2434
2445
  this._portsRoutedOnPcb = [];
@@ -2867,6 +2878,7 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
2867
2878
 
2868
2879
  // lib/components/normal-components/Resistor.ts
2869
2880
  var Resistor = class extends NormalComponent {
2881
+ componentName = "Resistor";
2870
2882
  get config() {
2871
2883
  return {
2872
2884
  schematicSymbolName: "boxresistor",
@@ -2920,6 +2932,7 @@ var Led = class extends NormalComponent {
2920
2932
  sourceFtype: "simple_diode"
2921
2933
  };
2922
2934
  }
2935
+ componentName = "Led";
2923
2936
  pos = this.portMap.pin1;
2924
2937
  pin1 = this.portMap.pin1;
2925
2938
  anode = this.portMap.pin1;
@@ -2951,6 +2964,7 @@ var Diode = class extends NormalComponent {
2951
2964
  sourceFtype: "simple_diode"
2952
2965
  };
2953
2966
  }
2967
+ componentName = "Diode";
2954
2968
  initPorts() {
2955
2969
  this.add(new Port({ name: "pin1", aliases: ["1", "pin1"] }));
2956
2970
  this.add(new Port({ name: "pin2", aliases: ["2", "pin2"] }));
@@ -2967,6 +2981,7 @@ var Capacitor = class extends NormalComponent {
2967
2981
  sourceFtype: FTYPE.simple_capacitor
2968
2982
  };
2969
2983
  }
2984
+ componentName = "Capacitor";
2970
2985
  pin1 = this.portMap.pin1;
2971
2986
  pin2 = this.portMap.pin2;
2972
2987
  doInitialCreateNetsFromProps() {
@@ -3302,6 +3317,7 @@ var Chip = class extends NormalComponent {
3302
3317
  zodProps: chipProps
3303
3318
  };
3304
3319
  }
3320
+ componentName = "Chip";
3305
3321
  doInitialSourceRender() {
3306
3322
  const { db } = this.root;
3307
3323
  const { _parsedProps: props } = this;
@@ -3371,6 +3387,7 @@ var Jumper = class extends NormalComponent {
3371
3387
  zodProps: jumperProps
3372
3388
  };
3373
3389
  }
3390
+ componentName = "Jumper";
3374
3391
  doInitialSourceRender() {
3375
3392
  const { db } = this.root;
3376
3393
  const { _parsedProps: props } = this;
@@ -3503,6 +3520,7 @@ import { holeProps } from "@tscircuit/props";
3503
3520
  var Hole = class extends PrimitiveComponent {
3504
3521
  pcb_hole_id = null;
3505
3522
  isPcbPrimitive = true;
3523
+ componentName = "Hole";
3506
3524
  get config() {
3507
3525
  return {
3508
3526
  zodProps: holeProps
@@ -3554,6 +3572,7 @@ var Hole = class extends PrimitiveComponent {
3554
3572
  import "@tscircuit/props";
3555
3573
  var SilkscreenText = class extends PrimitiveComponent {
3556
3574
  isPcbPrimitive = true;
3575
+ componentName = "SilkscreenText";
3557
3576
  doInitialPcbPrimitiveRender() {
3558
3577
  const { db } = this.root;
3559
3578
  const { _parsedProps: props } = this;
@@ -3586,6 +3605,7 @@ var SilkscreenText = class extends PrimitiveComponent {
3586
3605
  // lib/components/primitive-components/FabricationNoteText.ts
3587
3606
  import "@tscircuit/props";
3588
3607
  var FabricationNoteText = class extends PrimitiveComponent {
3608
+ componentName = "FabricationNoteText";
3589
3609
  doInitialPcbPrimitiveRender() {
3590
3610
  const { db } = this.root;
3591
3611
  const { _parsedProps: props } = this;
@@ -3610,6 +3630,7 @@ var FabricationNoteText = class extends PrimitiveComponent {
3610
3630
  import { fabricationNotePathProps } from "@tscircuit/props";
3611
3631
  import { applyToPoint as applyToPoint6 } from "transformation-matrix";
3612
3632
  var FabricationNotePath = class extends PrimitiveComponent {
3633
+ componentName = "FabricationNotePath";
3613
3634
  fabrication_note_path_id = null;
3614
3635
  get config() {
3615
3636
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.90",
4
+ "version": "0.0.91",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",