@tscircuit/core 0.0.283 → 0.0.284
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 +5 -5
- package/dist/index.js +9 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -781,7 +781,7 @@ declare class Port extends PrimitiveComponent<typeof portProps> {
|
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
interface INormalComponent {
|
|
784
|
-
|
|
784
|
+
_getInternallyConnectedPins(): Port[][];
|
|
785
785
|
}
|
|
786
786
|
|
|
787
787
|
type PortMap<T extends string> = {
|
|
@@ -813,8 +813,8 @@ declare class NormalComponent<ZodProps extends ZodType = any, PortNames extends
|
|
|
813
813
|
/**
|
|
814
814
|
* Override this property for component defaults
|
|
815
815
|
*/
|
|
816
|
-
get
|
|
817
|
-
get
|
|
816
|
+
get defaultInternallyConnectedPinNames(): string[][];
|
|
817
|
+
get internallyConnectedPinNames(): string[][];
|
|
818
818
|
constructor(props: z.input<ZodProps>);
|
|
819
819
|
/**
|
|
820
820
|
* Override this method for better control over the auto-discovery of ports.
|
|
@@ -848,7 +848,7 @@ declare class NormalComponent<ZodProps extends ZodType = any, PortNames extends
|
|
|
848
848
|
*/
|
|
849
849
|
doInitialSchematicComponentRender(): void;
|
|
850
850
|
_getSchematicSymbolDisplayValue(): string | undefined;
|
|
851
|
-
|
|
851
|
+
_getInternallyConnectedPins(): Port[][];
|
|
852
852
|
_doInitialSchematicComponentRenderWithSymbol(): void;
|
|
853
853
|
_doInitialSchematicComponentRenderWithSchematicBoxDimensions(): void;
|
|
854
854
|
doInitialPcbComponentRender(): void;
|
|
@@ -8587,7 +8587,7 @@ declare class PushButton extends NormalComponent<typeof pushButtonProps, Passive
|
|
|
8587
8587
|
}>;
|
|
8588
8588
|
sourceFtype: "simple_push_button";
|
|
8589
8589
|
};
|
|
8590
|
-
get
|
|
8590
|
+
get defaultInternallyConnectedPinNames(): string[][];
|
|
8591
8591
|
initPorts(): void;
|
|
8592
8592
|
doInitialSourceRender(): void;
|
|
8593
8593
|
}
|
package/dist/index.js
CHANGED
|
@@ -2052,8 +2052,8 @@ var Port = class extends PrimitiveComponent {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
_getPortsInternallyConnectedToThisPort() {
|
|
2054
2054
|
const parent = this.parent;
|
|
2055
|
-
if (!parent || !parent.
|
|
2056
|
-
const internallyConnectedPorts = parent.
|
|
2055
|
+
if (!parent || !parent._getInternallyConnectedPins) return [];
|
|
2056
|
+
const internallyConnectedPorts = parent._getInternallyConnectedPins();
|
|
2057
2057
|
for (const ports of internallyConnectedPorts) {
|
|
2058
2058
|
if (ports.some((port) => port === this)) {
|
|
2059
2059
|
return ports;
|
|
@@ -2877,11 +2877,11 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
2877
2877
|
/**
|
|
2878
2878
|
* Override this property for component defaults
|
|
2879
2879
|
*/
|
|
2880
|
-
get
|
|
2880
|
+
get defaultInternallyConnectedPinNames() {
|
|
2881
2881
|
return [];
|
|
2882
2882
|
}
|
|
2883
|
-
get
|
|
2884
|
-
return this._parsedProps.
|
|
2883
|
+
get internallyConnectedPinNames() {
|
|
2884
|
+
return this._parsedProps.internallyConnectedPins ?? this.defaultInternallyConnectedPinNames;
|
|
2885
2885
|
}
|
|
2886
2886
|
constructor(props) {
|
|
2887
2887
|
super(props);
|
|
@@ -3124,10 +3124,10 @@ var NormalComponent = class extends PrimitiveComponent {
|
|
|
3124
3124
|
_getSchematicSymbolDisplayValue() {
|
|
3125
3125
|
return void 0;
|
|
3126
3126
|
}
|
|
3127
|
-
|
|
3128
|
-
if (this.
|
|
3127
|
+
_getInternallyConnectedPins() {
|
|
3128
|
+
if (this.internallyConnectedPinNames.length === 0) return [];
|
|
3129
3129
|
const internallyConnectedPorts = [];
|
|
3130
|
-
for (const netPortNames of this.
|
|
3130
|
+
for (const netPortNames of this.internallyConnectedPinNames) {
|
|
3131
3131
|
const ports = [];
|
|
3132
3132
|
for (const portName of netPortNames) {
|
|
3133
3133
|
ports.push(this.portMap[portName]);
|
|
@@ -6389,7 +6389,7 @@ var PushButton = class extends NormalComponent {
|
|
|
6389
6389
|
sourceFtype: FTYPE.simple_push_button
|
|
6390
6390
|
};
|
|
6391
6391
|
}
|
|
6392
|
-
get
|
|
6392
|
+
get defaultInternallyConnectedPinNames() {
|
|
6393
6393
|
return [
|
|
6394
6394
|
["pin1", "pin4"],
|
|
6395
6395
|
["pin2", "pin3"]
|