@tscircuit/core 0.0.915 → 0.0.916
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 +1 -0
- package/dist/index.js +51 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -10020,6 +10020,52 @@ var getSimpleRouteJsonFromCircuitJson = ({
|
|
|
10020
10020
|
);
|
|
10021
10021
|
obstacle.connectedTo.push(...additionalIds);
|
|
10022
10022
|
}
|
|
10023
|
+
const internalConnections = db.source_component_internal_connection.list();
|
|
10024
|
+
const sourcePortIdToInternalConnectionId = /* @__PURE__ */ new Map();
|
|
10025
|
+
for (const ic of internalConnections) {
|
|
10026
|
+
for (const sourcePortId of ic.source_port_ids) {
|
|
10027
|
+
sourcePortIdToInternalConnectionId.set(
|
|
10028
|
+
sourcePortId,
|
|
10029
|
+
ic.source_component_internal_connection_id
|
|
10030
|
+
);
|
|
10031
|
+
}
|
|
10032
|
+
}
|
|
10033
|
+
const pcbElementIdToSourcePortId = /* @__PURE__ */ new Map();
|
|
10034
|
+
for (const pcbPort of db.pcb_port.list()) {
|
|
10035
|
+
if (pcbPort.source_port_id) {
|
|
10036
|
+
const smtpad = db.pcb_smtpad.getWhere({
|
|
10037
|
+
pcb_port_id: pcbPort.pcb_port_id
|
|
10038
|
+
});
|
|
10039
|
+
if (smtpad) {
|
|
10040
|
+
pcbElementIdToSourcePortId.set(
|
|
10041
|
+
smtpad.pcb_smtpad_id,
|
|
10042
|
+
pcbPort.source_port_id
|
|
10043
|
+
);
|
|
10044
|
+
}
|
|
10045
|
+
const platedHole = db.pcb_plated_hole.getWhere({
|
|
10046
|
+
pcb_port_id: pcbPort.pcb_port_id
|
|
10047
|
+
});
|
|
10048
|
+
if (platedHole) {
|
|
10049
|
+
pcbElementIdToSourcePortId.set(
|
|
10050
|
+
platedHole.pcb_plated_hole_id,
|
|
10051
|
+
pcbPort.source_port_id
|
|
10052
|
+
);
|
|
10053
|
+
}
|
|
10054
|
+
}
|
|
10055
|
+
}
|
|
10056
|
+
for (const obstacle of obstacles) {
|
|
10057
|
+
for (const connectedId of obstacle.connectedTo) {
|
|
10058
|
+
const sourcePortId = pcbElementIdToSourcePortId.get(connectedId);
|
|
10059
|
+
if (sourcePortId) {
|
|
10060
|
+
const internalConnectionId = sourcePortIdToInternalConnectionId.get(sourcePortId);
|
|
10061
|
+
if (internalConnectionId) {
|
|
10062
|
+
obstacle.offBoardConnectsTo = [internalConnectionId];
|
|
10063
|
+
obstacle.netIsAssignable = true;
|
|
10064
|
+
break;
|
|
10065
|
+
}
|
|
10066
|
+
}
|
|
10067
|
+
}
|
|
10068
|
+
}
|
|
10023
10069
|
const allPoints = obstacles.flatMap((o) => [
|
|
10024
10070
|
{
|
|
10025
10071
|
x: o.center.x - o.width / 2,
|
|
@@ -16365,6 +16411,9 @@ var Interconnect = class extends NormalComponent3 {
|
|
|
16365
16411
|
if (sourcePortIds.length >= 2) {
|
|
16366
16412
|
db.source_component_internal_connection.insert({
|
|
16367
16413
|
source_component_id: this.source_component_id,
|
|
16414
|
+
// @ts-expect-error uncomment when circuit-json includes subcircuit_id
|
|
16415
|
+
// in the source_component_internal_connection schema
|
|
16416
|
+
subcircuit_id: this.getSubcircuit()?.subcircuit_id,
|
|
16368
16417
|
source_port_ids: sourcePortIds
|
|
16369
16418
|
});
|
|
16370
16419
|
}
|
|
@@ -19199,7 +19248,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19199
19248
|
var package_default = {
|
|
19200
19249
|
name: "@tscircuit/core",
|
|
19201
19250
|
type: "module",
|
|
19202
|
-
version: "0.0.
|
|
19251
|
+
version: "0.0.915",
|
|
19203
19252
|
types: "dist/index.d.ts",
|
|
19204
19253
|
main: "dist/index.js",
|
|
19205
19254
|
module: "dist/index.js",
|
|
@@ -19259,7 +19308,7 @@ var package_default = {
|
|
|
19259
19308
|
"chokidar-cli": "^3.0.0",
|
|
19260
19309
|
"circuit-json": "^0.0.328",
|
|
19261
19310
|
"circuit-json-to-bpc": "^0.0.13",
|
|
19262
|
-
"circuit-json-to-connectivity-map": "^0.0.
|
|
19311
|
+
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
19263
19312
|
"circuit-json-to-gltf": "^0.0.31",
|
|
19264
19313
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
19265
19314
|
"circuit-json-to-spice": "^0.0.30",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.916",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"chokidar-cli": "^3.0.0",
|
|
62
62
|
"circuit-json": "^0.0.328",
|
|
63
63
|
"circuit-json-to-bpc": "^0.0.13",
|
|
64
|
-
"circuit-json-to-connectivity-map": "^0.0.
|
|
64
|
+
"circuit-json-to-connectivity-map": "^0.0.23",
|
|
65
65
|
"circuit-json-to-gltf": "^0.0.31",
|
|
66
66
|
"circuit-json-to-simple-3d": "^0.0.9",
|
|
67
67
|
"circuit-json-to-spice": "^0.0.30",
|