@tscircuit/parts-engine 0.0.4 → 0.0.6

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.
@@ -0,0 +1,26 @@
1
+ # Created using @tscircuit/plop (npm install -g @tscircuit/plop)
2
+ name: Format Check
3
+
4
+ on:
5
+ push:
6
+ branches: [main]
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ jobs:
11
+ format-check:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Setup bun
18
+ uses: oven-sh/setup-bun@v2
19
+ with:
20
+ bun-version: latest
21
+
22
+ - name: Install dependencies
23
+ run: bun install
24
+
25
+ - name: Run format check
26
+ run: bun run format:check
@@ -0,0 +1,26 @@
1
+ # Created using @tscircuit/plop (npm install -g @tscircuit/plop)
2
+ name: Type Check
3
+
4
+ on:
5
+ push:
6
+ branches: [main]
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ jobs:
11
+ type-check:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Setup bun
18
+ uses: oven-sh/setup-bun@v2
19
+ with:
20
+ bun-version: latest
21
+
22
+ - name: Install dependencies
23
+ run: bun i
24
+
25
+ - name: Run type check
26
+ run: bunx tsc --noEmit
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.227",
8
+ "@tscircuit/props": "^0.0.238",
9
9
  "@types/bun": "latest",
10
- "circuit-json": "^0.0.209",
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.227", "", { "peerDependencies": { "@tscircuit/layout": "*", "circuit-json": "*", "react": "*", "zod": "*" } }, "sha512-vJMZ2vHPX3nhfYCwCoijp/r+w1SLM3zocVSdofr6VQpV4Ct8JrLJUJ+h3AhKPttD8kunZ66jbWMlC9wA+U7iNQ=="],
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.209", "", { "dependencies": { "nanoid": "^5.0.7", "zod": "^3.25.64" } }, "sha512-cu/LQQS7XPGgAfDvwbusQqJbPyMdYRkKN4jMvi837TuCSXa0Xt7cBvSqkQekyipXuAtqnLJiaAucFVHpMUNyWA=="],
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
 
@@ -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,19 +1,20 @@
1
1
  {
2
2
  "name": "@tscircuit/parts-engine",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
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.227",
8
+ "@tscircuit/props": "^0.0.238",
9
9
  "@types/bun": "latest",
10
- "circuit-json": "^0.0.209",
10
+ "circuit-json": "^0.0.213",
11
11
  "tsup": "^8.4.0"
12
12
  },
13
13
  "scripts": {
14
14
  "format": "biome format --write .",
15
15
  "test": "bun test",
16
- "build": "tsup-node index.ts --format esm --dts --sourcemap"
16
+ "build": "tsup-node index.ts --format esm --dts --sourcemap",
17
+ "format:check": "biome format ."
17
18
  },
18
19
  "peerDependencies": {
19
20
  "typescript": "^5"