@tscircuit/core 0.0.689 → 0.0.691

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
@@ -12,7 +12,7 @@ import { CircuitJsonUtilObjects } from '@tscircuit/circuit-json-util';
12
12
  import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
13
13
  import { GraphicsObject } from 'graphics-debug';
14
14
 
15
- declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbLayout", "PcbBoardAutoSize", "PcbTraceHintRender", "PcbManualTraceRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender"];
15
+ declare const orderedRenderPhases: readonly ["ReactSubtreesRender", "SourceNameDuplicateComponentRemoval", "PcbFootprintStringRender", "InitializePortsFromChildren", "CreateNetsFromProps", "AssignFallbackProps", "CreateTracesFromProps", "CreateTracesFromNetLabels", "CreateTraceHintsFromProps", "SourceGroupRender", "AssignNameToUnnamedComponents", "SourceRender", "SourceParentAttachment", "PortMatching", "OptimizeSelectorCache", "SourceTraceRender", "SourceAddConnectivityMapKey", "SourceDesignRuleChecks", "SimulationRender", "SchematicComponentRender", "SchematicPortRender", "SchematicPrimitiveRender", "SchematicLayout", "SchematicTraceRender", "SchematicReplaceNetLabelsWithSymbols", "PcbComponentRender", "PcbPrimitiveRender", "PcbFootprintLayout", "PcbPortRender", "PcbPortAttachment", "PcbComponentSizeCalculation", "PcbLayout", "PcbBoardAutoSize", "PcbTraceHintRender", "PcbManualTraceRender", "PcbTraceRender", "PcbRouteNetIslands", "PcbDesignRuleChecks", "SilkscreenOverlapAdjustment", "CadModelRender", "PartsEngineRender"];
16
16
  type RenderPhase = (typeof orderedRenderPhases)[number];
17
17
  type RenderPhaseFn<K extends RenderPhase = RenderPhase> = `doInitial${K}` | `update${K}` | `remove${K}`;
18
18
  type RenderPhaseStates = Record<RenderPhase, {
@@ -1026,6 +1026,7 @@ declare class NormalComponent<ZodProps extends z.ZodType = any, PortNames extend
1026
1026
  get defaultInternallyConnectedPinNames(): string[][];
1027
1027
  get internallyConnectedPinNames(): string[][];
1028
1028
  constructor(props: z.input<ZodProps>);
1029
+ doInitialSourceNameDuplicateComponentRemoval(): void;
1029
1030
  /**
1030
1031
  * Override this method for better control over the auto-discovery of ports.
1031
1032
  *
@@ -1046,7 +1047,6 @@ declare class NormalComponent<ZodProps extends z.ZodType = any, PortNames extend
1046
1047
  ignoreSymbolPorts?: boolean;
1047
1048
  }): void;
1048
1049
  _getImpliedFootprintString(): string | null;
1049
- _isFootprintUrl(s: string): boolean;
1050
1050
  _addChildrenFromStringFootprint(): void;
1051
1051
  get portMap(): PortMap<PortNames>;
1052
1052
  getInstanceForReactElement(element: ReactElement): NormalComponent | null;
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ __export(components_exports, {
30
30
  Mosfet: () => Mosfet,
31
31
  Net: () => Net,
32
32
  NetLabel: () => NetLabel,
33
- NormalComponent: () => NormalComponent,
33
+ NormalComponent: () => NormalComponent2,
34
34
  PcbTrace: () => PcbTrace,
35
35
  PinHeader: () => PinHeader,
36
36
  Pinout: () => Pinout,
@@ -85,6 +85,7 @@ import Debug from "debug";
85
85
  var debug = Debug("tscircuit:renderable");
86
86
  var orderedRenderPhases = [
87
87
  "ReactSubtreesRender",
88
+ "SourceNameDuplicateComponentRemoval",
88
89
  "PcbFootprintStringRender",
89
90
  "InitializePortsFromChildren",
90
91
  "CreateNetsFromProps",
@@ -3696,7 +3697,7 @@ var getAllDimensionsForSchematicBox = (params) => {
3696
3697
 
3697
3698
  // lib/components/base-components/NormalComponent/NormalComponent.ts
3698
3699
  import {
3699
- isValidElement as isReactElement,
3700
+ isValidElement as isReactElement2,
3700
3701
  isValidElement
3701
3702
  } from "react";
3702
3703
  import { symbols as symbols2 } from "schematic-symbols";
@@ -6454,6 +6455,94 @@ function isValidPinLabel(pin, label) {
6454
6455
  }
6455
6456
  }
6456
6457
 
6458
+ // lib/components/base-components/NormalComponent/NormalComponent_doInitialPcbFootprintStringRender.ts
6459
+ import { isValidElement as isReactElement } from "react";
6460
+
6461
+ // lib/components/base-components/NormalComponent/utils/isFoorprintUrl.ts
6462
+ var isFootprintUrl = (s) => s.startsWith("http://") || s.startsWith("https://");
6463
+
6464
+ // lib/components/base-components/NormalComponent/utils/parseLibraryFootprintRef.ts
6465
+ var parseLibraryFootprintRef = (s) => {
6466
+ if (isFootprintUrl(s)) return null;
6467
+ const idx = s.indexOf(":");
6468
+ if (idx <= 0) return null;
6469
+ const footprintLib = s.slice(0, idx);
6470
+ const footprintName = s.slice(idx + 1);
6471
+ if (!footprintLib || !footprintName) return null;
6472
+ return { footprintLib, footprintName };
6473
+ };
6474
+
6475
+ // lib/components/base-components/NormalComponent/NormalComponent_doInitialPcbFootprintStringRender.ts
6476
+ function NormalComponent_doInitialPcbFootprintStringRender(component, queueAsyncEffect) {
6477
+ let { footprint } = component.props;
6478
+ footprint ??= component._getImpliedFootprintString?.();
6479
+ if (!footprint) return;
6480
+ const { pcbRotation, pinLabels, pcbPinLabels } = component.props;
6481
+ if (typeof footprint === "string" && isFootprintUrl(footprint)) {
6482
+ if (component._hasStartedFootprintUrlLoad) return;
6483
+ component._hasStartedFootprintUrlLoad = true;
6484
+ const url = footprint;
6485
+ queueAsyncEffect("load-footprint-url", async () => {
6486
+ const res = await fetch(url);
6487
+ const soup = await res.json();
6488
+ const fpComponents = createComponentsFromCircuitJson(
6489
+ {
6490
+ componentName: component.name,
6491
+ componentRotation: pcbRotation,
6492
+ footprint: url,
6493
+ pinLabels,
6494
+ pcbPinLabels
6495
+ },
6496
+ soup
6497
+ );
6498
+ component.addAll(fpComponents);
6499
+ component._markDirty("InitializePortsFromChildren");
6500
+ });
6501
+ return;
6502
+ }
6503
+ if (typeof footprint === "string") {
6504
+ const libRef = parseLibraryFootprintRef(footprint);
6505
+ if (!libRef) return;
6506
+ if (component._hasStartedFootprintUrlLoad) return;
6507
+ component._hasStartedFootprintUrlLoad = true;
6508
+ const platform = component.root?.platform;
6509
+ const libMap = platform?.footprintLibraryMap?.[libRef.footprintLib];
6510
+ let resolverFn;
6511
+ if (typeof libMap === "function") {
6512
+ resolverFn = libMap;
6513
+ }
6514
+ if (!resolverFn) return;
6515
+ queueAsyncEffect("load-lib-footprint", async () => {
6516
+ const result = await resolverFn(libRef.footprintName);
6517
+ const circuitJson = Array.isArray(result) ? result : Array.isArray(result?.footprintCircuitJson) ? result.footprintCircuitJson : null;
6518
+ if (!circuitJson) return;
6519
+ const fpComponents = createComponentsFromCircuitJson(
6520
+ {
6521
+ componentName: component.name,
6522
+ componentRotation: pcbRotation,
6523
+ footprint,
6524
+ pinLabels,
6525
+ pcbPinLabels
6526
+ },
6527
+ circuitJson
6528
+ );
6529
+ component.addAll(fpComponents);
6530
+ component._markDirty("InitializePortsFromChildren");
6531
+ });
6532
+ return;
6533
+ }
6534
+ if (isReactElement(footprint)) {
6535
+ if (component.reactSubtrees.some((rs) => rs.element === footprint)) return;
6536
+ const subtree = component._renderReactSubtree(footprint);
6537
+ component.reactSubtrees.push(subtree);
6538
+ component.add(subtree.component);
6539
+ return;
6540
+ }
6541
+ if (!isReactElement(footprint) && footprint.componentName === "Footprint") {
6542
+ component.add(footprint);
6543
+ }
6544
+ }
6545
+
6457
6546
  // lib/components/base-components/NormalComponent/NormalComponent.ts
6458
6547
  var debug3 = Debug4("tscircuit:core");
6459
6548
  var rotation3 = z8.object({
@@ -6461,7 +6550,7 @@ var rotation3 = z8.object({
6461
6550
  y: rotation,
6462
6551
  z: rotation
6463
6552
  });
6464
- var NormalComponent = class extends PrimitiveComponent2 {
6553
+ var NormalComponent2 = class extends PrimitiveComponent2 {
6465
6554
  reactSubtrees = [];
6466
6555
  _impliedFootprint;
6467
6556
  isPrimitiveContainer = true;
@@ -6507,6 +6596,32 @@ var NormalComponent = class extends PrimitiveComponent2 {
6507
6596
  this._addChildrenFromStringFootprint();
6508
6597
  this.initPorts();
6509
6598
  }
6599
+ doInitialSourceNameDuplicateComponentRemoval() {
6600
+ if (!this.name) return;
6601
+ const root = this.root;
6602
+ const componentsWithSameName = this.getSubcircuit().selectAll(
6603
+ `.${this.name}`
6604
+ );
6605
+ const conflictingComponents = componentsWithSameName.filter(
6606
+ (component) => component !== this && component._isNormalComponent && component.renderPhaseStates?.SourceNameDuplicateComponentRemoval?.initialized
6607
+ );
6608
+ if (conflictingComponents.length > 0) {
6609
+ const pcbPosition = this._getGlobalPcbPositionBeforeLayout();
6610
+ const schematicPosition = this._getGlobalSchematicPositionBeforeLayout();
6611
+ root.db.source_failed_to_create_component_error.insert({
6612
+ component_name: this.name,
6613
+ error_type: "source_failed_to_create_component_error",
6614
+ message: `Cannot create component "${this.name}": A component with the same name already exists`,
6615
+ pcb_center: pcbPosition,
6616
+ schematic_center: schematicPosition
6617
+ });
6618
+ this.shouldBeRemoved = true;
6619
+ const childrenToRemove = [...this.children];
6620
+ for (const child of childrenToRemove) {
6621
+ this.remove(child);
6622
+ }
6623
+ }
6624
+ }
6510
6625
  /**
6511
6626
  * Override this method for better control over the auto-discovery of ports.
6512
6627
  *
@@ -6691,16 +6806,14 @@ var NormalComponent = class extends PrimitiveComponent2 {
6691
6806
  _getImpliedFootprintString() {
6692
6807
  return null;
6693
6808
  }
6694
- _isFootprintUrl(s) {
6695
- return s.startsWith("http://") || s.startsWith("https://");
6696
- }
6697
6809
  _addChildrenFromStringFootprint() {
6698
6810
  const { pcbRotation, pinLabels, pcbPinLabels } = this.props;
6699
6811
  let { footprint } = this.props;
6700
6812
  footprint ??= this._getImpliedFootprintString?.();
6701
6813
  if (!footprint) return;
6702
6814
  if (typeof footprint === "string") {
6703
- if (this._isFootprintUrl(footprint)) return;
6815
+ if (isFootprintUrl(footprint)) return;
6816
+ if (parseLibraryFootprintRef(footprint)) return;
6704
6817
  const fpSoup = fp.string(footprint).soup();
6705
6818
  const fpComponents = createComponentsFromCircuitJson(
6706
6819
  {
@@ -6970,42 +7083,10 @@ var NormalComponent = class extends PrimitiveComponent2 {
6970
7083
  doInitialReactSubtreesRender() {
6971
7084
  }
6972
7085
  doInitialPcbFootprintStringRender() {
6973
- let { footprint } = this.props;
6974
- footprint ??= this._getImpliedFootprintString?.();
6975
- if (!footprint) return;
6976
- const { pcbRotation, pinLabels, pcbPinLabels } = this.props;
6977
- if (typeof footprint === "string" && this._isFootprintUrl(footprint)) {
6978
- if (this._hasStartedFootprintUrlLoad) return;
6979
- this._hasStartedFootprintUrlLoad = true;
6980
- const url = footprint;
6981
- this._queueAsyncEffect("load-footprint-url", async () => {
6982
- const res = await fetch(url);
6983
- const soup = await res.json();
6984
- const fpComponents = createComponentsFromCircuitJson(
6985
- {
6986
- componentName: this.name,
6987
- componentRotation: pcbRotation,
6988
- footprint: url,
6989
- pinLabels,
6990
- pcbPinLabels
6991
- },
6992
- soup
6993
- );
6994
- this.addAll(fpComponents);
6995
- this._markDirty("InitializePortsFromChildren");
6996
- });
6997
- return;
6998
- }
6999
- if (isReactElement(footprint)) {
7000
- if (this.reactSubtrees.some((rs) => rs.element === footprint)) return;
7001
- const subtree = this._renderReactSubtree(footprint);
7002
- this.reactSubtrees.push(subtree);
7003
- this.add(subtree.component);
7004
- return;
7005
- }
7006
- if (!isValidElement(footprint) && footprint.componentName === "Footprint") {
7007
- this.add(footprint);
7008
- }
7086
+ NormalComponent_doInitialPcbFootprintStringRender(
7087
+ this,
7088
+ (name, effect) => this._queueAsyncEffect(name, effect)
7089
+ );
7009
7090
  }
7010
7091
  _hasExistingPortExactly(port1) {
7011
7092
  const existingPorts = this.children.filter(
@@ -7019,7 +7100,7 @@ var NormalComponent = class extends PrimitiveComponent2 {
7019
7100
  }
7020
7101
  add(componentOrElm) {
7021
7102
  let component;
7022
- if (isReactElement(componentOrElm)) {
7103
+ if (isReactElement2(componentOrElm)) {
7023
7104
  const subtree = this._renderReactSubtree(componentOrElm);
7024
7105
  this.reactSubtrees.push(subtree);
7025
7106
  component = subtree.component;
@@ -7048,7 +7129,8 @@ var NormalComponent = class extends PrimitiveComponent2 {
7048
7129
  footprint = this.children.find((c) => c.componentName === "Footprint");
7049
7130
  }
7050
7131
  if (typeof footprint === "string") {
7051
- if (this._isFootprintUrl(footprint)) return [];
7132
+ if (isFootprintUrl(footprint)) return [];
7133
+ if (parseLibraryFootprintRef(footprint)) return [];
7052
7134
  const fpSoup = fp.string(footprint).soup();
7053
7135
  const newPorts2 = [];
7054
7136
  for (const elm of fpSoup) {
@@ -10651,7 +10733,7 @@ var Group_doInitialSchematicTraceRender = (group) => {
10651
10733
  };
10652
10734
 
10653
10735
  // lib/components/primitive-components/Group/Group.ts
10654
- var Group6 = class extends NormalComponent {
10736
+ var Group6 = class extends NormalComponent2 {
10655
10737
  pcb_group_id = null;
10656
10738
  schematic_group_id = null;
10657
10739
  subcircuit_id = null;
@@ -11624,7 +11706,7 @@ var FTYPE = stringProxy;
11624
11706
 
11625
11707
  // lib/components/normal-components/Capacitor.ts
11626
11708
  import { formatSiUnit } from "format-si-unit";
11627
- var Capacitor = class extends NormalComponent {
11709
+ var Capacitor = class extends NormalComponent2 {
11628
11710
  _adjustSilkscreenTextAutomatically = true;
11629
11711
  // @ts-ignore (cause the symbolName is string and not fixed)
11630
11712
  get config() {
@@ -11700,7 +11782,7 @@ var Capacitor = class extends NormalComponent {
11700
11782
 
11701
11783
  // lib/components/normal-components/Chip.ts
11702
11784
  import { chipProps as chipProps2 } from "@tscircuit/props";
11703
- var Chip = class extends NormalComponent {
11785
+ var Chip = class extends NormalComponent2 {
11704
11786
  schematicBoxDimensions = null;
11705
11787
  constructor(props) {
11706
11788
  super(props);
@@ -11872,7 +11954,7 @@ var Pinout = class extends Chip {
11872
11954
 
11873
11955
  // lib/components/normal-components/Diode.ts
11874
11956
  import { diodeProps } from "@tscircuit/props";
11875
- var Diode = class extends NormalComponent {
11957
+ var Diode = class extends NormalComponent2 {
11876
11958
  // @ts-ignore
11877
11959
  get config() {
11878
11960
  const symbolMap = {
@@ -11919,7 +12001,7 @@ var Diode = class extends NormalComponent {
11919
12001
  // lib/components/normal-components/Fuse.ts
11920
12002
  import { fuseProps } from "@tscircuit/props";
11921
12003
  import { formatSiUnit as formatSiUnit2 } from "format-si-unit";
11922
- var Fuse = class extends NormalComponent {
12004
+ var Fuse = class extends NormalComponent2 {
11923
12005
  get config() {
11924
12006
  return {
11925
12007
  componentName: "fuse",
@@ -11954,7 +12036,7 @@ var Fuse = class extends NormalComponent {
11954
12036
 
11955
12037
  // lib/components/normal-components/Jumper.ts
11956
12038
  import { jumperProps } from "@tscircuit/props";
11957
- var Jumper = class extends NormalComponent {
12039
+ var Jumper = class extends NormalComponent2 {
11958
12040
  schematicDimensions = null;
11959
12041
  get config() {
11960
12042
  return {
@@ -12053,7 +12135,7 @@ var Jumper = class extends NormalComponent {
12053
12135
 
12054
12136
  // lib/components/normal-components/SolderJumper.ts
12055
12137
  import { solderjumperProps } from "@tscircuit/props";
12056
- var SolderJumper = class extends NormalComponent {
12138
+ var SolderJumper = class extends NormalComponent2 {
12057
12139
  schematicDimensions = null;
12058
12140
  _getPinNumberFromBridgedPinName(pinName) {
12059
12141
  const port = this.selectOne(`port.${pinName}`, {
@@ -12207,7 +12289,7 @@ var SolderJumper = class extends NormalComponent {
12207
12289
 
12208
12290
  // lib/components/normal-components/Led.ts
12209
12291
  import { ledProps } from "@tscircuit/props";
12210
- var Led = class extends NormalComponent {
12292
+ var Led = class extends NormalComponent2 {
12211
12293
  get config() {
12212
12294
  const symbolMap = {
12213
12295
  laser: "laser_diode"
@@ -12255,7 +12337,7 @@ var Led = class extends NormalComponent {
12255
12337
 
12256
12338
  // lib/components/normal-components/PowerSource.ts
12257
12339
  import { powerSourceProps } from "@tscircuit/props";
12258
- var PowerSource = class extends NormalComponent {
12340
+ var PowerSource = class extends NormalComponent2 {
12259
12341
  // @ts-ignore
12260
12342
  get config() {
12261
12343
  return {
@@ -12306,7 +12388,7 @@ var voltageSourceProps = commonComponentProps.extend({
12306
12388
  phase: rotation2.optional(),
12307
12389
  dutyCycle: z12.number().optional()
12308
12390
  });
12309
- var VoltageSource = class extends NormalComponent {
12391
+ var VoltageSource = class extends NormalComponent2 {
12310
12392
  get config() {
12311
12393
  const isSquare = this.props.waveShape === "square";
12312
12394
  return {
@@ -12377,7 +12459,7 @@ var VoltageSource = class extends NormalComponent {
12377
12459
  // lib/components/normal-components/Resistor.ts
12378
12460
  import { resistorProps } from "@tscircuit/props";
12379
12461
  import { formatSiUnit as formatSiUnit3 } from "format-si-unit";
12380
- var Resistor = class extends NormalComponent {
12462
+ var Resistor = class extends NormalComponent2 {
12381
12463
  _adjustSilkscreenTextAutomatically = true;
12382
12464
  get config() {
12383
12465
  return {
@@ -13118,7 +13200,7 @@ var Via = class extends PrimitiveComponent2 {
13118
13200
 
13119
13201
  // lib/components/normal-components/Battery.ts
13120
13202
  import { batteryProps } from "@tscircuit/props";
13121
- var Battery = class extends NormalComponent {
13203
+ var Battery = class extends NormalComponent2 {
13122
13204
  get config() {
13123
13205
  return {
13124
13206
  componentName: "Battery",
@@ -13151,7 +13233,7 @@ var Battery = class extends NormalComponent {
13151
13233
 
13152
13234
  // lib/components/normal-components/PinHeader.ts
13153
13235
  import { pinHeaderProps } from "@tscircuit/props";
13154
- var PinHeader = class extends NormalComponent {
13236
+ var PinHeader = class extends NormalComponent2 {
13155
13237
  get config() {
13156
13238
  return {
13157
13239
  componentName: "PinHeader",
@@ -13260,7 +13342,7 @@ function getResonatorSymbolName(variant) {
13260
13342
  return "crystal";
13261
13343
  }
13262
13344
  }
13263
- var Resonator = class extends NormalComponent {
13345
+ var Resonator = class extends NormalComponent2 {
13264
13346
  get config() {
13265
13347
  return {
13266
13348
  componentName: "Resonator",
@@ -13296,7 +13378,7 @@ var Resonator = class extends NormalComponent {
13296
13378
  // lib/components/normal-components/Inductor.ts
13297
13379
  import { inductorProps } from "@tscircuit/props";
13298
13380
  import { formatSiUnit as formatSiUnit5 } from "format-si-unit";
13299
- var Inductor = class extends NormalComponent {
13381
+ var Inductor = class extends NormalComponent2 {
13300
13382
  _adjustSilkscreenTextAutomatically = true;
13301
13383
  get config() {
13302
13384
  return {
@@ -13344,7 +13426,7 @@ function getPotentiometerSymbolName(variant) {
13344
13426
  return "potentiometer2";
13345
13427
  }
13346
13428
  }
13347
- var Potentiometer = class extends NormalComponent {
13429
+ var Potentiometer = class extends NormalComponent2 {
13348
13430
  get config() {
13349
13431
  return {
13350
13432
  componentName: "Potentiometer",
@@ -13374,7 +13456,7 @@ var Potentiometer = class extends NormalComponent {
13374
13456
  // lib/components/normal-components/PushButton.ts
13375
13457
  import { pushButtonProps } from "@tscircuit/props";
13376
13458
  import { symbols as symbols3 } from "schematic-symbols";
13377
- var PushButton = class extends NormalComponent {
13459
+ var PushButton = class extends NormalComponent2 {
13378
13460
  get config() {
13379
13461
  return {
13380
13462
  componentName: "PushButton",
@@ -13439,7 +13521,7 @@ var PushButton = class extends NormalComponent {
13439
13521
  // lib/components/normal-components/Crystal.ts
13440
13522
  import { crystalProps } from "@tscircuit/props";
13441
13523
  import { formatSiUnit as formatSiUnit7 } from "format-si-unit";
13442
- var Crystal = class extends NormalComponent {
13524
+ var Crystal = class extends NormalComponent2 {
13443
13525
  // @ts-ignore
13444
13526
  get config() {
13445
13527
  const symbolName = this.props.symbolName ?? (this.props.pinVariant === "four_pin" ? "crystal_4pin" : "crystal");
@@ -13490,7 +13572,7 @@ var Crystal = class extends NormalComponent {
13490
13572
 
13491
13573
  // lib/components/normal-components/Transistor.ts
13492
13574
  import { transistorProps } from "@tscircuit/props";
13493
- var Transistor = class extends NormalComponent {
13575
+ var Transistor = class extends NormalComponent2 {
13494
13576
  get config() {
13495
13577
  const baseSymbolName = this.props.type === "npn" ? "npn_bipolar_transistor" : "pnp_bipolar_transistor";
13496
13578
  return {
@@ -13535,7 +13617,7 @@ var Transistor = class extends NormalComponent {
13535
13617
 
13536
13618
  // lib/components/normal-components/Mosfet.ts
13537
13619
  import { mosfetProps } from "@tscircuit/props";
13538
- var Mosfet = class extends NormalComponent {
13620
+ var Mosfet = class extends NormalComponent2 {
13539
13621
  get config() {
13540
13622
  const mosfetMode = this.props.mosfetMode === "depletion" ? "d" : "e";
13541
13623
  const channelType = this.props.channelType;
@@ -13562,7 +13644,7 @@ var Mosfet = class extends NormalComponent {
13562
13644
 
13563
13645
  // lib/components/normal-components/Switch.ts
13564
13646
  import { switchProps } from "@tscircuit/props";
13565
- var Switch = class extends NormalComponent {
13647
+ var Switch = class extends NormalComponent2 {
13566
13648
  _getSwitchType() {
13567
13649
  const { spst, spdt, dpst, dpdt, type } = this._parsedProps ?? {};
13568
13650
  if (dpdt) return "dpdt";
@@ -13609,7 +13691,7 @@ var TESTPOINT_DEFAULTS = {
13609
13691
  SMT_CIRCLE_DIAMETER: 1.2,
13610
13692
  SMT_RECT_SIZE: 2
13611
13693
  };
13612
- var TestPoint = class extends NormalComponent {
13694
+ var TestPoint = class extends NormalComponent2 {
13613
13695
  get config() {
13614
13696
  return {
13615
13697
  componentName: "TestPoint",
@@ -14090,7 +14172,7 @@ import { identity as identity6 } from "transformation-matrix";
14090
14172
  var package_default = {
14091
14173
  name: "@tscircuit/core",
14092
14174
  type: "module",
14093
- version: "0.0.688",
14175
+ version: "0.0.690",
14094
14176
  types: "dist/index.d.ts",
14095
14177
  main: "dist/index.js",
14096
14178
  module: "dist/index.js",
@@ -14129,7 +14211,7 @@ var package_default = {
14129
14211
  "@tscircuit/matchpack": "^0.0.16",
14130
14212
  "@tscircuit/math-utils": "^0.0.18",
14131
14213
  "@tscircuit/miniflex": "^0.0.4",
14132
- "@tscircuit/props": "0.0.297",
14214
+ "@tscircuit/props": "0.0.298",
14133
14215
  "@tscircuit/schematic-autolayout": "^0.0.6",
14134
14216
  "@tscircuit/schematic-match-adapt": "^0.0.16",
14135
14217
  "@tscircuit/schematic-trace-solver": "^0.0.25",
@@ -14608,7 +14690,7 @@ export {
14608
14690
  Mosfet,
14609
14691
  Net,
14610
14692
  NetLabel,
14611
- NormalComponent,
14693
+ NormalComponent2 as NormalComponent,
14612
14694
  PcbTrace,
14613
14695
  PinHeader,
14614
14696
  Pinout,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.689",
4
+ "version": "0.0.691",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -40,7 +40,7 @@
40
40
  "@tscircuit/matchpack": "^0.0.16",
41
41
  "@tscircuit/math-utils": "^0.0.18",
42
42
  "@tscircuit/miniflex": "^0.0.4",
43
- "@tscircuit/props": "0.0.297",
43
+ "@tscircuit/props": "0.0.298",
44
44
  "@tscircuit/schematic-autolayout": "^0.0.6",
45
45
  "@tscircuit/schematic-match-adapt": "^0.0.16",
46
46
  "@tscircuit/schematic-trace-solver": "^0.0.25",