@tscircuit/parts-engine 0.0.4 → 0.0.5
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/bun.lock +4 -4
- package/lib/jlc-parts-engine.ts +10 -0
- package/package.json +3 -3
package/bun.lock
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"name": "@tscircuit/parts-engine",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@biomejs/biome": "^1.9.4",
|
|
8
|
-
"@tscircuit/props": "^0.0.
|
|
8
|
+
"@tscircuit/props": "^0.0.238",
|
|
9
9
|
"@types/bun": "latest",
|
|
10
|
-
"circuit-json": "^0.0.
|
|
10
|
+
"circuit-json": "^0.0.213",
|
|
11
11
|
"tsup": "^8.4.0",
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
|
|
143
143
|
"@tscircuit/manual-edit-events": ["@tscircuit/manual-edit-events@0.0.6", "", { "dependencies": { "zod": "^3.23.8" } }, "sha512-PLgy+/Dsw1YcnNVNqfieNGTNIaRKRJ70Jt2LcSMljwaBOtsiOwtdzj24xCYO9XzJUZc7opKytShMlx863PehTQ=="],
|
|
144
144
|
|
|
145
|
-
"@tscircuit/props": ["@tscircuit/props@0.0.
|
|
145
|
+
"@tscircuit/props": ["@tscircuit/props@0.0.238", "", { "peerDependencies": { "@tscircuit/layout": "*", "circuit-json": "*", "react": "*", "zod": "*" } }, "sha512-Mq9CScwlc/zd6wgTWGBKTN2x/qarImr1Um3dt0a/WY76pPIRdjnsznN+7IZVmNxY3H/RD6CbCNjgc0DKphWYIg=="],
|
|
146
146
|
|
|
147
147
|
"@tscircuit/schematic-autolayout": ["@tscircuit/schematic-autolayout@0.0.6", "", { "dependencies": { "@tscircuit/soup-util": "^0.0.38", "transformation-matrix": "^2.16.1" } }, "sha512-34cQxtlSylBKyHkzaMBCynaWJgN9c/mWm7cz63StTYIafKmfFs383K8Xoc4QX8HXCvVrHYl1aK15onZua9MxeA=="],
|
|
148
148
|
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
|
|
173
173
|
"chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="],
|
|
174
174
|
|
|
175
|
-
"circuit-json": ["circuit-json@0.0.
|
|
175
|
+
"circuit-json": ["circuit-json@0.0.213", "", { "dependencies": { "nanoid": "^5.0.7", "zod": "*" } }, "sha512-WgKoSYyvhI+anWo1EzTBEgNQSyh68zgpW+7X3SPmpQwIkybB01j23uKp+SQPZ0U6iHRE5p84TuixWN0K6vApPQ=="],
|
|
176
176
|
|
|
177
177
|
"color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
|
|
178
178
|
|
package/lib/jlc-parts-engine.ts
CHANGED
|
@@ -196,6 +196,16 @@ export const jlcPartsEngine: PartsEngine = {
|
|
|
196
196
|
return {
|
|
197
197
|
jlcpcb: (leds ?? []).map((l: any) => `C${l.lcsc}`).slice(0, 3),
|
|
198
198
|
}
|
|
199
|
+
} else if (
|
|
200
|
+
sourceComponent.type === "source_component" &&
|
|
201
|
+
sourceComponent.ftype === "simple_fuse"
|
|
202
|
+
) {
|
|
203
|
+
const { fuses } = await getJlcPartsCached("fuses", {
|
|
204
|
+
package: footprinterString,
|
|
205
|
+
})
|
|
206
|
+
return {
|
|
207
|
+
jlcpcb: fuses.map((l: any) => `C${l.lcsc}`).slice(0, 3),
|
|
208
|
+
}
|
|
199
209
|
}
|
|
200
210
|
return {}
|
|
201
211
|
},
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/parts-engine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@biomejs/biome": "^1.9.4",
|
|
8
|
-
"@tscircuit/props": "^0.0.
|
|
8
|
+
"@tscircuit/props": "^0.0.238",
|
|
9
9
|
"@types/bun": "latest",
|
|
10
|
-
"circuit-json": "^0.0.
|
|
10
|
+
"circuit-json": "^0.0.213",
|
|
11
11
|
"tsup": "^8.4.0"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|