@tscircuit/eval 0.0.106 → 0.0.107

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  "devDependencies": {
6
6
  "@babel/standalone": "^7.26.2",
7
7
  "@biomejs/biome": "^1.9.4",
8
- "@tscircuit/core": "^0.0.325",
8
+ "@tscircuit/core": "^0.0.326",
9
9
  "@tscircuit/math-utils": "^0.0.10",
10
10
  "@types/babel__standalone": "^7.1.9",
11
11
  "@types/bun": "latest",
@@ -166,7 +166,7 @@
166
166
 
167
167
  "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.34.6", "", { "os": "win32", "cpu": "x64" }, "sha512-0PVwmgzZ8+TZ9oGBmdZoQVXflbvuwzN/HRclujpl4N/q3i+y0lqLw8n1bXA8ru3sApDjlmONaNAuYr38y1Kr9w=="],
168
168
 
169
- "@tscircuit/core": ["@tscircuit/core@0.0.325", "", { "dependencies": { "@lume/kiwi": "^0.4.3", "@tscircuit/footprinter": "^0.0.135", "@tscircuit/infgrid-ijump-astar": "^0.0.33", "@tscircuit/math-utils": "^0.0.9", "@tscircuit/props": "^0.0.152", "@tscircuit/schematic-autolayout": "^0.0.6", "@tscircuit/soup-util": "^0.0.41", "circuit-json": "^0.0.139", "circuit-json-to-connectivity-map": "^0.0.17", "format-si-unit": "^0.0.3", "nanoid": "^5.0.7", "performance-now": "^2.1.0", "react-reconciler": "^0.31.0", "react-reconciler-18": "npm:react-reconciler@0.29.2", "schematic-symbols": "^0.0.121", "transformation-matrix": "^2.16.1", "zod": "^3.23.8" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-rhnPwYyEQxkewis/7W+YC+mXwndras6fyFh3syHfaW5Z8zTC3njbXiGkFPWtExrWAV2+AG0g/uL6NfQ+eDCA8Q=="],
169
+ "@tscircuit/core": ["@tscircuit/core@0.0.326", "", { "dependencies": { "@lume/kiwi": "^0.4.3", "@tscircuit/infgrid-ijump-astar": "^0.0.33", "@tscircuit/math-utils": "^0.0.9", "@tscircuit/props": "^0.0.152", "@tscircuit/schematic-autolayout": "^0.0.6", "@tscircuit/soup-util": "^0.0.41", "circuit-json": "^0.0.139", "circuit-json-to-connectivity-map": "^0.0.17", "format-si-unit": "^0.0.3", "nanoid": "^5.0.7", "performance-now": "^2.1.0", "react-reconciler": "^0.31.0", "react-reconciler-18": "npm:react-reconciler@0.29.2", "schematic-symbols": "^0.0.121", "transformation-matrix": "^2.16.1", "zod": "^3.23.8" }, "peerDependencies": { "@tscircuit/footprinter": "*", "typescript": "^5.0.0" } }, "sha512-gILKPwSi0iGyjpnLAI75VOqbNqpSSllLJEJIPbayTj3rilJZ2bBr+cwc91vpIDAkN+DOF73pAmVksfwlTvGXGw=="],
170
170
 
171
171
  "@tscircuit/footprinter": ["@tscircuit/footprinter@0.0.135", "", { "dependencies": { "@tscircuit/mm": "^0.0.8", "zod": "^3.23.8" }, "peerDependencies": { "circuit-json": "*" } }, "sha512-+8MasMGTNQL/NINnlWk2v6zw/NDerfdIBG3uqhrTr0r7VOHh4lK1ymTkQR7IeoypkxTIHYGB9wHbOt39XAF3mg=="],
172
172
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/eval",
3
3
  "main": "dist/lib/index.js",
4
- "version": "0.0.106",
4
+ "version": "0.0.107",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "bun run build:lib && bun run build:webworker && bun run build:blob-url && bun run build:eval",
@@ -34,7 +34,7 @@
34
34
  "devDependencies": {
35
35
  "@babel/standalone": "^7.26.2",
36
36
  "@biomejs/biome": "^1.9.4",
37
- "@tscircuit/core": "^0.0.325",
37
+ "@tscircuit/core": "^0.0.326",
38
38
  "@tscircuit/math-utils": "^0.0.10",
39
39
  "@types/babel__standalone": "^7.1.9",
40
40
  "@types/bun": "latest",
@@ -0,0 +1,28 @@
1
+ import { createCircuitWebWorker } from "lib/index"
2
+ import { expect, test } from "bun:test"
3
+
4
+ test("example8-footprinter-to220", async () => {
5
+ const circuitWebWorker = await createCircuitWebWorker({
6
+ webWorkerUrl: new URL("../webworker/index.ts", import.meta.url),
7
+ })
8
+
9
+ await circuitWebWorker.execute(`
10
+ circuit.add(
11
+ <board width="10mm" height="10mm">
12
+ <chip footprint="to220_3" name="U3" pcbX={15} pcbY={0} />
13
+ </board>
14
+ )
15
+ `)
16
+
17
+ await circuitWebWorker.renderUntilSettled()
18
+
19
+ const circuitJson = await circuitWebWorker.getCircuitJson()
20
+
21
+ const pcb_plated_hole = circuitJson.filter(
22
+ (el: any) => el.type === "pcb_plated_hole",
23
+ )
24
+ expect(pcb_plated_hole).toBeDefined()
25
+
26
+ const chip = circuitJson.find((el: any) => el.name === "U3")
27
+ expect(chip).toBeDefined()
28
+ })