@tscircuit/core 0.0.310 → 0.0.312
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 +7 -1
- package/dist/index.js +15 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1376,6 +1376,7 @@ type Ftype = AnySourceComponent["ftype"];
|
|
|
1376
1376
|
type TwoPinPorts = "pin1" | "pin2";
|
|
1377
1377
|
type PassivePorts = TwoPinPorts;
|
|
1378
1378
|
type PolarizedPassivePorts = PassivePorts | "anode" | "cathode" | "pos" | "neg";
|
|
1379
|
+
type TransistorPorts = "pin1" | "pin2" | "pin3" | "emitter" | "collector" | "base";
|
|
1379
1380
|
|
|
1380
1381
|
declare class Capacitor extends NormalComponent<typeof capacitorProps, PassivePorts> {
|
|
1381
1382
|
get config(): {
|
|
@@ -9068,7 +9069,7 @@ declare class Crystal extends NormalComponent<typeof crystalProps, PolarizedPass
|
|
|
9068
9069
|
doInitialSourceRender(): void;
|
|
9069
9070
|
}
|
|
9070
9071
|
|
|
9071
|
-
declare class Transistor extends NormalComponent<typeof transistorProps> {
|
|
9072
|
+
declare class Transistor extends NormalComponent<typeof transistorProps, TransistorPorts> {
|
|
9072
9073
|
get config(): {
|
|
9073
9074
|
componentName: string;
|
|
9074
9075
|
schematicSymbolName: "npn_bipolar_transistor" | "pnp_bipolar_transistor";
|
|
@@ -9469,8 +9470,13 @@ declare class Transistor extends NormalComponent<typeof transistorProps> {
|
|
|
9469
9470
|
children?: any;
|
|
9470
9471
|
symbolName?: string | undefined;
|
|
9471
9472
|
}>;
|
|
9473
|
+
sourceFtype: Ftype;
|
|
9472
9474
|
shouldRenderAsSchematicBox: boolean;
|
|
9473
9475
|
};
|
|
9476
|
+
initPorts(): void;
|
|
9477
|
+
emitter: Port;
|
|
9478
|
+
collector: Port;
|
|
9479
|
+
base: Port;
|
|
9474
9480
|
doInitialSourceRender(): void;
|
|
9475
9481
|
}
|
|
9476
9482
|
|
package/dist/index.js
CHANGED
|
@@ -3928,6 +3928,7 @@ var Group = class extends NormalComponent {
|
|
|
3928
3928
|
const debug4 = Debug5("tscircuit:core:doInitialPcbTraceRender");
|
|
3929
3929
|
if (!this.isSubcircuit) return;
|
|
3930
3930
|
if (this.root?.pcbDisabled) return;
|
|
3931
|
+
if (this.getInheritedProperty("routingDisabled")) return;
|
|
3931
3932
|
if (this._shouldUseTraceByTraceRouting()) return;
|
|
3932
3933
|
if (!this._areChildSubcircuitsRouted()) {
|
|
3933
3934
|
debug4(
|
|
@@ -6531,9 +6532,23 @@ var Transistor = class extends NormalComponent {
|
|
|
6531
6532
|
componentName: "Transistor",
|
|
6532
6533
|
schematicSymbolName: baseSymbolName,
|
|
6533
6534
|
zodProps: transistorProps,
|
|
6535
|
+
sourceFtype: "simple_transistor",
|
|
6534
6536
|
shouldRenderAsSchematicBox: false
|
|
6535
6537
|
};
|
|
6536
6538
|
}
|
|
6539
|
+
initPorts() {
|
|
6540
|
+
super.initPorts({
|
|
6541
|
+
pinCount: 3,
|
|
6542
|
+
additionalAliases: {
|
|
6543
|
+
pin1: ["emitter", "e"],
|
|
6544
|
+
pin2: ["collector", "c"],
|
|
6545
|
+
pin3: ["base", "b"]
|
|
6546
|
+
}
|
|
6547
|
+
});
|
|
6548
|
+
}
|
|
6549
|
+
emitter = this.portMap.pin1;
|
|
6550
|
+
collector = this.portMap.pin2;
|
|
6551
|
+
base = this.portMap.pin3;
|
|
6537
6552
|
doInitialSourceRender() {
|
|
6538
6553
|
const { db } = this.root;
|
|
6539
6554
|
const { _parsedProps: props } = this;
|