@tscircuit/core 0.0.1508 → 0.0.1509
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 +3 -3
- package/dist/index.js +28 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -132627,9 +132627,9 @@ declare class Transistor extends NormalComponent<typeof transistorProps, Transis
|
|
|
132627
132627
|
shouldRenderAsSchematicBox: boolean;
|
|
132628
132628
|
};
|
|
132629
132629
|
initPorts(): void;
|
|
132630
|
-
|
|
132631
|
-
|
|
132632
|
-
|
|
132630
|
+
get collector(): Port;
|
|
132631
|
+
get base(): Port;
|
|
132632
|
+
get emitter(): Port;
|
|
132633
132633
|
doInitialCreateNetsFromProps(): void;
|
|
132634
132634
|
doInitialCreateTracesFromProps(): void;
|
|
132635
132635
|
doInitialSourceRender(): void;
|
package/dist/index.js
CHANGED
|
@@ -23714,7 +23714,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
23714
23714
|
var package_default = {
|
|
23715
23715
|
name: "@tscircuit/core",
|
|
23716
23716
|
type: "module",
|
|
23717
|
-
version: "0.0.
|
|
23717
|
+
version: "0.0.1508",
|
|
23718
23718
|
types: "dist/index.d.ts",
|
|
23719
23719
|
main: "dist/index.js",
|
|
23720
23720
|
module: "dist/index.js",
|
|
@@ -26892,6 +26892,11 @@ function inflateSourceTrace(sourceTrace, inflatorContext) {
|
|
|
26892
26892
|
|
|
26893
26893
|
// lib/components/normal-components/Transistor.ts
|
|
26894
26894
|
import { transistorProps } from "@tscircuit/props";
|
|
26895
|
+
var SHORT_ALIASES = {
|
|
26896
|
+
collector: ["c"],
|
|
26897
|
+
base: ["b"],
|
|
26898
|
+
emitter: ["e"]
|
|
26899
|
+
};
|
|
26895
26900
|
var Transistor = class extends NormalComponent3 {
|
|
26896
26901
|
get config() {
|
|
26897
26902
|
const baseSymbolName = this.props.type === "npn" ? "npn_bipolar_transistor" : "pnp_bipolar_transistor";
|
|
@@ -26904,19 +26909,32 @@ var Transistor = class extends NormalComponent3 {
|
|
|
26904
26909
|
};
|
|
26905
26910
|
}
|
|
26906
26911
|
initPorts() {
|
|
26907
|
-
const
|
|
26908
|
-
|
|
26909
|
-
|
|
26910
|
-
|
|
26911
|
-
|
|
26912
|
+
const additionalAliases = {};
|
|
26913
|
+
const symbol = this.getSchematicSymbol();
|
|
26914
|
+
for (const symPort of symbol?.ports ?? []) {
|
|
26915
|
+
const pinNumber = getPinNumberFromLabels(symPort.labels);
|
|
26916
|
+
if (!pinNumber) continue;
|
|
26917
|
+
for (const label of symPort.labels) {
|
|
26918
|
+
const shortAliases = SHORT_ALIASES[label];
|
|
26919
|
+
if (shortAliases) {
|
|
26920
|
+
additionalAliases[`pin${pinNumber}`] = shortAliases;
|
|
26921
|
+
}
|
|
26922
|
+
}
|
|
26923
|
+
}
|
|
26912
26924
|
super.initPorts({
|
|
26913
26925
|
pinCount: 3,
|
|
26914
|
-
additionalAliases
|
|
26926
|
+
additionalAliases
|
|
26915
26927
|
});
|
|
26916
26928
|
}
|
|
26917
|
-
|
|
26918
|
-
|
|
26919
|
-
|
|
26929
|
+
get collector() {
|
|
26930
|
+
return this.portMap.collector;
|
|
26931
|
+
}
|
|
26932
|
+
get base() {
|
|
26933
|
+
return this.portMap.base;
|
|
26934
|
+
}
|
|
26935
|
+
get emitter() {
|
|
26936
|
+
return this.portMap.emitter;
|
|
26937
|
+
}
|
|
26920
26938
|
doInitialCreateNetsFromProps() {
|
|
26921
26939
|
this._createNetsFromProps([...this._getNetsFromConnectionsProp()]);
|
|
26922
26940
|
}
|