@tscircuit/core 0.0.397 → 0.0.399
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 +54 -14
- package/package.json +24 -14
package/dist/index.d.ts
CHANGED
|
@@ -4266,6 +4266,7 @@ declare class Jumper<PinLabels extends string = never> extends NormalComponent<t
|
|
|
4266
4266
|
};
|
|
4267
4267
|
doInitialSourceRender(): void;
|
|
4268
4268
|
doInitialPcbComponentRender(): void;
|
|
4269
|
+
doInitialPcbTraceRender(): void;
|
|
4269
4270
|
}
|
|
4270
4271
|
|
|
4271
4272
|
declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts> {
|
package/dist/index.js
CHANGED
|
@@ -7172,6 +7172,36 @@ var Jumper = class extends NormalComponent {
|
|
|
7172
7172
|
});
|
|
7173
7173
|
this.pcb_component_id = pcb_component.pcb_component_id;
|
|
7174
7174
|
}
|
|
7175
|
+
doInitialPcbTraceRender() {
|
|
7176
|
+
const { db } = this.root;
|
|
7177
|
+
const pcb_ports = db.pcb_port.list({
|
|
7178
|
+
pcb_component_id: this.pcb_component_id
|
|
7179
|
+
});
|
|
7180
|
+
const pinLabelToPortId = {};
|
|
7181
|
+
for (const port of pcb_ports) {
|
|
7182
|
+
const match = port.source_port_id && port.source_port_id.match(/(\d+)$/);
|
|
7183
|
+
if (match) {
|
|
7184
|
+
const label = (parseInt(match[1], 10) + 1).toString();
|
|
7185
|
+
pinLabelToPortId[label] = port.pcb_port_id;
|
|
7186
|
+
}
|
|
7187
|
+
}
|
|
7188
|
+
const traces = db.pcb_trace.list();
|
|
7189
|
+
const updatePortId = (portId) => {
|
|
7190
|
+
if (portId && typeof portId === "string" && portId.startsWith("{PIN")) {
|
|
7191
|
+
const pin = portId.replace("{PIN", "").replace("}", "");
|
|
7192
|
+
return pinLabelToPortId[pin] || portId;
|
|
7193
|
+
}
|
|
7194
|
+
return portId;
|
|
7195
|
+
};
|
|
7196
|
+
for (const trace of traces) {
|
|
7197
|
+
if (!trace.route) continue;
|
|
7198
|
+
for (const segment of trace.route) {
|
|
7199
|
+
if (segment.route_type !== "wire") continue;
|
|
7200
|
+
segment.start_pcb_port_id = updatePortId(segment.start_pcb_port_id);
|
|
7201
|
+
segment.end_pcb_port_id = updatePortId(segment.end_pcb_port_id);
|
|
7202
|
+
}
|
|
7203
|
+
}
|
|
7204
|
+
}
|
|
7175
7205
|
};
|
|
7176
7206
|
|
|
7177
7207
|
// lib/components/normal-components/Led.ts
|
|
@@ -8127,7 +8157,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
8127
8157
|
var package_default = {
|
|
8128
8158
|
name: "@tscircuit/core",
|
|
8129
8159
|
type: "module",
|
|
8130
|
-
version: "0.0.
|
|
8160
|
+
version: "0.0.398",
|
|
8131
8161
|
types: "dist/index.d.ts",
|
|
8132
8162
|
main: "dist/index.js",
|
|
8133
8163
|
module: "dist/index.js",
|
|
@@ -8150,7 +8180,7 @@ var package_default = {
|
|
|
8150
8180
|
},
|
|
8151
8181
|
devDependencies: {
|
|
8152
8182
|
"@biomejs/biome": "^1.8.3",
|
|
8153
|
-
"@tscircuit/footprinter": "^0.0.
|
|
8183
|
+
"@tscircuit/footprinter": "^0.0.156",
|
|
8154
8184
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
8155
8185
|
"@tscircuit/layout": "^0.0.28",
|
|
8156
8186
|
"@tscircuit/log-soup": "^1.0.2",
|
|
@@ -8172,30 +8202,40 @@ var package_default = {
|
|
|
8172
8202
|
react: "^19.0.0",
|
|
8173
8203
|
"react-dom": "^19.0.0",
|
|
8174
8204
|
"ts-expect": "^1.3.0",
|
|
8175
|
-
tsup: "^8.2.4"
|
|
8176
|
-
},
|
|
8177
|
-
peerDependencies: {
|
|
8178
|
-
"@tscircuit/footprinter": "*",
|
|
8179
|
-
typescript: "^5.0.0"
|
|
8180
|
-
},
|
|
8181
|
-
dependencies: {
|
|
8182
|
-
"@lume/kiwi": "^0.4.3",
|
|
8205
|
+
tsup: "^8.2.4",
|
|
8183
8206
|
"@tscircuit/capacity-autorouter": "^0.0.52",
|
|
8184
|
-
"@tscircuit/checks": "^0.0.
|
|
8207
|
+
"@tscircuit/checks": "^0.0.46",
|
|
8185
8208
|
"@tscircuit/circuit-json-util": "^0.0.47",
|
|
8186
8209
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
8187
|
-
"@tscircuit/math-utils": "^0.0.
|
|
8210
|
+
"@tscircuit/math-utils": "^0.0.18",
|
|
8188
8211
|
"@tscircuit/props": "^0.0.178",
|
|
8189
8212
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
8213
|
+
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
8190
8214
|
"circuit-json": "0.0.170",
|
|
8191
|
-
"
|
|
8215
|
+
"schematic-symbols": "^0.0.132"
|
|
8216
|
+
},
|
|
8217
|
+
peerDependencies: {
|
|
8218
|
+
typescript: "^5.0.0",
|
|
8219
|
+
"@tscircuit/footprinter": "*",
|
|
8220
|
+
"@tscircuit/capacity-autorouter": "*",
|
|
8221
|
+
"@tscircuit/checks": "*",
|
|
8222
|
+
"@tscircuit/circuit-json-util": "*",
|
|
8223
|
+
"@tscircuit/infgrid-ijump-astar": "*",
|
|
8224
|
+
"@tscircuit/math-utils": "*",
|
|
8225
|
+
"@tscircuit/props": "*",
|
|
8226
|
+
"@tscircuit/schematic-autolayout": "*",
|
|
8227
|
+
"circuit-json-to-connectivity-map": "*",
|
|
8228
|
+
"circuit-json": "*",
|
|
8229
|
+
"schematic-symbols": "*"
|
|
8230
|
+
},
|
|
8231
|
+
dependencies: {
|
|
8232
|
+
"@lume/kiwi": "^0.4.3",
|
|
8192
8233
|
"css-select": "^5.1.0",
|
|
8193
8234
|
"format-si-unit": "^0.0.3",
|
|
8194
8235
|
nanoid: "^5.0.7",
|
|
8195
8236
|
"performance-now": "^2.1.0",
|
|
8196
8237
|
"react-reconciler": "^0.31.0",
|
|
8197
8238
|
"react-reconciler-18": "npm:react-reconciler@0.29.2",
|
|
8198
|
-
"schematic-symbols": "^0.0.132",
|
|
8199
8239
|
"transformation-matrix": "^2.16.1",
|
|
8200
8240
|
zod: "^3.23.8"
|
|
8201
8241
|
}
|
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.399",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@biomejs/biome": "^1.8.3",
|
|
27
|
-
"@tscircuit/footprinter": "^0.0.
|
|
27
|
+
"@tscircuit/footprinter": "^0.0.156",
|
|
28
28
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
29
29
|
"@tscircuit/layout": "^0.0.28",
|
|
30
30
|
"@tscircuit/log-soup": "^1.0.2",
|
|
@@ -46,30 +46,40 @@
|
|
|
46
46
|
"react": "^19.0.0",
|
|
47
47
|
"react-dom": "^19.0.0",
|
|
48
48
|
"ts-expect": "^1.3.0",
|
|
49
|
-
"tsup": "^8.2.4"
|
|
50
|
-
},
|
|
51
|
-
"peerDependencies": {
|
|
52
|
-
"@tscircuit/footprinter": "*",
|
|
53
|
-
"typescript": "^5.0.0"
|
|
54
|
-
},
|
|
55
|
-
"dependencies": {
|
|
56
|
-
"@lume/kiwi": "^0.4.3",
|
|
49
|
+
"tsup": "^8.2.4",
|
|
57
50
|
"@tscircuit/capacity-autorouter": "^0.0.52",
|
|
58
|
-
"@tscircuit/checks": "^0.0.
|
|
51
|
+
"@tscircuit/checks": "^0.0.46",
|
|
59
52
|
"@tscircuit/circuit-json-util": "^0.0.47",
|
|
60
53
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
61
|
-
"@tscircuit/math-utils": "^0.0.
|
|
54
|
+
"@tscircuit/math-utils": "^0.0.18",
|
|
62
55
|
"@tscircuit/props": "^0.0.178",
|
|
63
56
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
57
|
+
"circuit-json-to-connectivity-map": "^0.0.22",
|
|
64
58
|
"circuit-json": "0.0.170",
|
|
65
|
-
"
|
|
59
|
+
"schematic-symbols": "^0.0.132"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"typescript": "^5.0.0",
|
|
63
|
+
"@tscircuit/footprinter": "*",
|
|
64
|
+
"@tscircuit/capacity-autorouter": "*",
|
|
65
|
+
"@tscircuit/checks": "*",
|
|
66
|
+
"@tscircuit/circuit-json-util": "*",
|
|
67
|
+
"@tscircuit/infgrid-ijump-astar": "*",
|
|
68
|
+
"@tscircuit/math-utils": "*",
|
|
69
|
+
"@tscircuit/props": "*",
|
|
70
|
+
"@tscircuit/schematic-autolayout": "*",
|
|
71
|
+
"circuit-json-to-connectivity-map": "*",
|
|
72
|
+
"circuit-json": "*",
|
|
73
|
+
"schematic-symbols": "*"
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@lume/kiwi": "^0.4.3",
|
|
66
77
|
"css-select": "^5.1.0",
|
|
67
78
|
"format-si-unit": "^0.0.3",
|
|
68
79
|
"nanoid": "^5.0.7",
|
|
69
80
|
"performance-now": "^2.1.0",
|
|
70
81
|
"react-reconciler": "^0.31.0",
|
|
71
82
|
"react-reconciler-18": "npm:react-reconciler@0.29.2",
|
|
72
|
-
"schematic-symbols": "^0.0.132",
|
|
73
83
|
"transformation-matrix": "^2.16.1",
|
|
74
84
|
"zod": "^3.23.8"
|
|
75
85
|
}
|