@tscircuit/core 0.0.1019 → 0.0.1021
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 +10 -0
- package/dist/index.js +30 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1544,6 +1544,12 @@ declare class NormalComponent<ZodProps extends z.ZodType = any, PortNames extend
|
|
|
1544
1544
|
get portMap(): PortMap<PortNames>;
|
|
1545
1545
|
getInstanceForReactElement(element: ReactElement): NormalComponent | null;
|
|
1546
1546
|
doInitialSourceRender(): void;
|
|
1547
|
+
/**
|
|
1548
|
+
* After ports have their source_port_id assigned, create
|
|
1549
|
+
* source_component_internal_connection records so that the connectivity
|
|
1550
|
+
* map (and therefore DRC) knows which pins are internally connected.
|
|
1551
|
+
*/
|
|
1552
|
+
doInitialSourceParentAttachment(): void;
|
|
1547
1553
|
/**
|
|
1548
1554
|
* Render the schematic component for this NormalComponent using the
|
|
1549
1555
|
* config.schematicSymbolName if it exists, or create a generic box if
|
|
@@ -65249,6 +65255,10 @@ declare class Keepout extends PrimitiveComponent<typeof pcbKeepoutProps> {
|
|
|
65249
65255
|
}>]>;
|
|
65250
65256
|
};
|
|
65251
65257
|
doInitialPcbPrimitiveRender(): void;
|
|
65258
|
+
getPcbSize(): {
|
|
65259
|
+
width: number;
|
|
65260
|
+
height: number;
|
|
65261
|
+
};
|
|
65252
65262
|
}
|
|
65253
65263
|
|
|
65254
65264
|
declare class NetLabel extends PrimitiveComponent<typeof netLabelProps> {
|
package/dist/index.js
CHANGED
|
@@ -3216,6 +3216,16 @@ var Keepout = class extends PrimitiveComponent2 {
|
|
|
3216
3216
|
this.pcb_keepout_id = pcb_keepout.pcb_keepout_id;
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
|
+
getPcbSize() {
|
|
3220
|
+
const { _parsedProps: props } = this;
|
|
3221
|
+
if (props.shape === "circle") {
|
|
3222
|
+
return { width: props.radius * 2, height: props.radius * 2 };
|
|
3223
|
+
}
|
|
3224
|
+
if (props.shape === "rect") {
|
|
3225
|
+
return { width: props.width, height: props.height };
|
|
3226
|
+
}
|
|
3227
|
+
return { width: 0, height: 0 };
|
|
3228
|
+
}
|
|
3219
3229
|
};
|
|
3220
3230
|
|
|
3221
3231
|
// lib/components/primitive-components/Hole.ts
|
|
@@ -9127,6 +9137,25 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
9127
9137
|
});
|
|
9128
9138
|
this.source_component_id = source_component.source_component_id;
|
|
9129
9139
|
}
|
|
9140
|
+
/**
|
|
9141
|
+
* After ports have their source_port_id assigned, create
|
|
9142
|
+
* source_component_internal_connection records so that the connectivity
|
|
9143
|
+
* map (and therefore DRC) knows which pins are internally connected.
|
|
9144
|
+
*/
|
|
9145
|
+
doInitialSourceParentAttachment() {
|
|
9146
|
+
const { db } = this.root;
|
|
9147
|
+
const internallyConnectedPorts = this._getInternallyConnectedPins();
|
|
9148
|
+
for (const ports of internallyConnectedPorts) {
|
|
9149
|
+
const sourcePortIds = ports.map((port) => port.source_port_id).filter((id) => id !== null);
|
|
9150
|
+
if (sourcePortIds.length >= 2) {
|
|
9151
|
+
db.source_component_internal_connection.insert({
|
|
9152
|
+
source_component_id: this.source_component_id,
|
|
9153
|
+
subcircuit_id: this.getSubcircuit()?.subcircuit_id,
|
|
9154
|
+
source_port_ids: sourcePortIds
|
|
9155
|
+
});
|
|
9156
|
+
}
|
|
9157
|
+
}
|
|
9158
|
+
}
|
|
9130
9159
|
/**
|
|
9131
9160
|
* Render the schematic component for this NormalComponent using the
|
|
9132
9161
|
* config.schematicSymbolName if it exists, or create a generic box if
|
|
@@ -22239,7 +22268,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
22239
22268
|
var package_default = {
|
|
22240
22269
|
name: "@tscircuit/core",
|
|
22241
22270
|
type: "module",
|
|
22242
|
-
version: "0.0.
|
|
22271
|
+
version: "0.0.1020",
|
|
22243
22272
|
types: "dist/index.d.ts",
|
|
22244
22273
|
main: "dist/index.js",
|
|
22245
22274
|
module: "dist/index.js",
|