diff --git a/bun.lock b/bun.lock index ad3fe5ea..3f9e571a 100644 --- a/bun.lock +++ b/bun.lock @@ -36,7 +36,7 @@ "react-cosmos-plugin-vite": "7.0.0-beta.0", "react-dom": "19.1.0", "react-use": "^17.4.0", - "tscircuit": "^0.0.1015", + "tscircuit": "^0.0.1040", "tsup": "^8.0.2", "type-fest": "^3.0.0", "typescript": "^5.4.4", @@ -402,7 +402,7 @@ "@tscircuit/alphabet": ["@tscircuit/alphabet@0.0.8", "", { "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-YhYdeBUXXoFWvkkBd3um80Qtfm7zs5B3PXria2BhTcQfCdp6ZfeawY9zRYhM+DXnRm9fxFPH+F7rTp+AkDL/rQ=="], - "@tscircuit/capacity-autorouter": ["@tscircuit/capacity-autorouter@0.0.140", "", { "dependencies": { "fast-json-stable-stringify": "^2.1.0", "object-hash": "^3.0.0" } }, "sha512-WKkcVDobcbnIEeQ0R/sjaao6x6cwn1jlGoC8l7jdziJdSlhbV6GI84xqFzbuOXm+GKLFFjHDrL08kGcebAWShA=="], + "@tscircuit/capacity-autorouter": ["@tscircuit/capacity-autorouter@0.0.178", "", { "dependencies": { "bun-match-svg": "^0.0.14", "fast-json-stable-stringify": "^2.1.0", "object-hash": "^3.0.0" } }, "sha512-Ja5sK7NYigMUhvb0t6pH5iHT1rELaZY2dl7wTGYr+MH5D0ihpbMPP0CjcWjwUO9yIUoeJ8dgvsOvf6x2xQ8HqA=="], "@tscircuit/checks": ["@tscircuit/checks@0.0.87", "", { "peerDependencies": { "@flatten-js/core": "*", "@tscircuit/math-utils": "*", "circuit-json": "*", "circuit-json-to-connectivity-map": "*", "typescript": "^5.5.3" } }, "sha512-vg/dZd1nVBVKfiRKtQj0HmGkhJk+0FJL2v6MjOULQeXBLxcYu7G4PcWZg4kWRp76zky8JKgmgEzdM2C5+1UXBg=="], @@ -410,15 +410,15 @@ "@tscircuit/circuit-json-util": ["@tscircuit/circuit-json-util@0.0.72", "", { "dependencies": { "parsel-js": "^1.1.2" }, "peerDependencies": { "circuit-json": "*", "transformation-matrix": "*", "zod": "3" } }, "sha512-8KqdPYz1Q+rYgPuP9VBBxusLgq0MmpVw4FjLORNHYr2qfWmM1m/1OQEokZHZZZLTUbfcn86zUOcv69+LqHa0FA=="], - "@tscircuit/cli": ["@tscircuit/cli@0.1.608", "", { "peerDependencies": { "tscircuit": "*" }, "bin": { "tscircuit-cli": "cli/entrypoint.js" } }, "sha512-87SygUdy6wwAf4JRHlVuI/Ql70f6JLR+Bw7WhZ3MhLQFJh9bV7BncQvNhkqOesLdIBivhkf5oFiTdUCghlnqZw=="], + "@tscircuit/cli": ["@tscircuit/cli@0.1.635", "", { "peerDependencies": { "tscircuit": "*" }, "bin": { "tscircuit-cli": "cli/entrypoint.js" } }, "sha512-0QOSqNyoF5Kdn1SCcP6SHC731cXW4ZvNdVGUDSbF42jhJ2brnjlN+hVv9sbze8/+TF1VEIi6GRjq+/iM6JNnOw=="], "@tscircuit/copper-pour-solver": ["@tscircuit/copper-pour-solver@0.0.14", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-kOZfgMXo/jw6G+b3JilhdPYVnfBespChkA542GsLNzR79bB+tn/zdR8tfsqCr/qvHMPG34tELr/XrUhvNOagVw=="], - "@tscircuit/core": ["@tscircuit/core@0.0.900", "", { "dependencies": { "@flatten-js/core": "^1.6.2", "@lume/kiwi": "^0.4.3", "calculate-packing": "0.0.62", "css-select": "5.1.0", "format-si-unit": "^0.0.3", "nanoid": "^5.0.7", "performance-now": "^2.1.0", "react-reconciler": "^0.32.0", "transformation-matrix": "^2.16.1", "zod": "^3.25.67" }, "peerDependencies": { "@tscircuit/capacity-autorouter": "*", "@tscircuit/checks": "*", "@tscircuit/circuit-json-util": "*", "@tscircuit/footprinter": "*", "@tscircuit/infgrid-ijump-astar": "*", "@tscircuit/matchpack": "*", "@tscircuit/math-utils": "*", "@tscircuit/props": "*", "@tscircuit/schematic-autolayout": "*", "@tscircuit/schematic-match-adapt": "*", "bpc-graph": "*", "circuit-json": "*", "circuit-json-to-bpc": "*", "circuit-json-to-connectivity-map": "*", "schematic-symbols": "*", "typescript": "^5.0.0" } }, "sha512-aDBSNaYIj4Z1gAK/bH8ymX7HrfeuGhtd5UTUi232RvD8cye51cRXeD+oUFyUWvmakTeaGsiIE26qQ99fhVdJ/A=="], + "@tscircuit/core": ["@tscircuit/core@0.0.922", "", { "dependencies": { "@flatten-js/core": "^1.6.2", "@lume/kiwi": "^0.4.3", "calculate-packing": "0.0.68", "css-select": "5.1.0", "format-si-unit": "^0.0.3", "nanoid": "^5.0.7", "performance-now": "^2.1.0", "react-reconciler": "^0.32.0", "transformation-matrix": "^2.16.1", "zod": "^3.25.67" }, "peerDependencies": { "@tscircuit/capacity-autorouter": "*", "@tscircuit/checks": "*", "@tscircuit/circuit-json-util": "*", "@tscircuit/footprinter": "*", "@tscircuit/infgrid-ijump-astar": "*", "@tscircuit/matchpack": "*", "@tscircuit/math-utils": "*", "@tscircuit/props": "*", "@tscircuit/schematic-autolayout": "*", "@tscircuit/schematic-match-adapt": "*", "bpc-graph": "*", "circuit-json": "*", "circuit-json-to-bpc": "*", "circuit-json-to-connectivity-map": "*", "schematic-symbols": "*", "typescript": "^5.0.0" } }, "sha512-FVmFBfp44RmiSdQGUdDKD+ldyEHWTm6r8fBIuF+zcAuEL+gbgOAgyxqxxT66zqLE8HJpaCc1SViV986HHythRA=="], "@tscircuit/eagle-xml-converter": ["@tscircuit/eagle-xml-converter@1.0.4", "", { "dependencies": { "fast-xml-parser": "^4.0.10" } }, "sha512-cg3aDShfpvf+WmN+A5wxofogE9zHTx9mOU9Xn/ArqnMjbT+0hIf7iePgWxZJb86SUuoWeoh2rshwxvS2zDYuFw=="], - "@tscircuit/eval": ["@tscircuit/eval@0.0.522", "", { "peerDependencies": { "@tscircuit/core": "*", "circuit-json": "*", "typescript": "^5.0.0", "zod": "3" } }, "sha512-w5XeSF68JC2PnZeOS3b8PkHKdHzIajV2uLQLbx2YMtPz+7Yi7DFJTP7P6qB6nxS3hm+T08dIdQ3qSbw/YMSqZA=="], + "@tscircuit/eval": ["@tscircuit/eval@0.0.537", "", { "peerDependencies": { "@tscircuit/core": "*", "circuit-json": "*", "typescript": "^5.0.0", "zod": "3" } }, "sha512-PgZK9wozFuuethvrqw/VOF5CICdVSL9VBHQvc4l6ztL83i3YEwUnRXLjbSA9zC7KtWeccSXqj7vTCpme6NMNmQ=="], "@tscircuit/footprinter": ["@tscircuit/footprinter@0.0.236", "", { "dependencies": { "@tscircuit/mm": "^0.0.8", "zod": "^3.23.8" }, "peerDependencies": { "circuit-json": "*" } }, "sha512-SE03ZCNp9FxzSa3LdbQOMBHjT16Q86ZwN6iLu+RPsAbFrdE1RwtM7dv5lOb6lkh78mL3e7yyuyay+QrERiLcYQ=="], @@ -432,11 +432,11 @@ "@tscircuit/mm": ["@tscircuit/mm@0.0.8", "", { "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-nl7nxE7AhARbKuobflI0LUzoir7+wJyvwfPw6bzA/O0Q3YTcH3vBkU/Of+V/fp6ht+AofiCXj7YAH9E446138Q=="], - "@tscircuit/ngspice-spice-engine": ["@tscircuit/ngspice-spice-engine@0.0.4", "", { "dependencies": { "eecircuit-engine": "^1.5.6" }, "peerDependencies": { "@tscircuit/props": "*", "circuit-json": "*", "typescript": "^5" } }, "sha512-6Co8UvMnqdOQrtiostEc9DFXfcAUh+s1+iEiDrWq8koH/5C+a8CcmBlgqQoQSzqt2eD/j/5yGneUnKCCbASVbA=="], + "@tscircuit/ngspice-spice-engine": ["@tscircuit/ngspice-spice-engine@0.0.8", "", { "dependencies": { "eecircuit-engine": "^1.5.6" }, "peerDependencies": { "@tscircuit/props": "*", "circuit-json": "*", "typescript": "^5" } }, "sha512-jubJ8Kgpm9FPRdHBiRBYkf5+B37bqkjDRKpCXOMqS08UZnbS+iCv2k4ACMW+s1zbK0Xa5v+9yjuoHlfKFW1v/Q=="], - "@tscircuit/props": ["@tscircuit/props@0.0.423", "", { "peerDependencies": { "circuit-json": "*", "react": "*", "zod": "*" } }, "sha512-Q/Rhy+RgaFK1sEk4Y7GA30mkKZ4p5jbN/hIJ27k+XAu/7fg03FEjX/atlVOZI6OO0xwdYGsnEUXPTy3VmWyZ0Q=="], + "@tscircuit/props": ["@tscircuit/props@0.0.427", "", { "peerDependencies": { "circuit-json": "*", "react": "*", "zod": "*" } }, "sha512-Nx4q34tooHA64WY8JEarrngPdcbCgeadAYsyrry+sNJRB1WnmfvCJOVUx8opDDe54YrECuff42ITCNM1Z0gApQ=="], - "@tscircuit/runframe": ["@tscircuit/runframe@0.0.1347", "", {}, "sha512-oLAiI0D5RQ67e0aijrZX6RkgG7qAZQxo+twoqTKYWBuCNwiyDufw1E0g0TVvbRfCHJtgKDCkBQDLkWSMGWt7qQ=="], + "@tscircuit/runframe": ["@tscircuit/runframe@0.0.1385", "", {}, "sha512-aFC7Z1lip974MbkGXvN+PIVZvz51WcZldmliLhx2Cx/fdsoHCJT1QvnXH4xDbhAe96Kj8o/o2Fw73RhiZPQ/4A=="], "@tscircuit/schematic-autolayout": ["@tscircuit/schematic-autolayout@0.0.6", "", { "dependencies": { "@tscircuit/soup-util": "^0.0.38", "transformation-matrix": "^2.16.1" } }, "sha512-34cQxtlSylBKyHkzaMBCynaWJgN9c/mWm7cz63StTYIafKmfFs383K8Xoc4QX8HXCvVrHYl1aK15onZua9MxeA=="], @@ -584,7 +584,7 @@ "buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="], - "bun-match-svg": ["bun-match-svg@0.0.9", "", { "dependencies": { "looks-same": "^9.0.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "bin": { "bun-match-svg": "cli.ts" } }, "sha512-WISE8cUd3ztIEbYRymuxs+l4qwRviHIhyRQHmDz26vnhKON9g+Ur+2L3pfJrffpGiYWGF/jtWoWmYRQiaimTxg=="], + "bun-match-svg": ["bun-match-svg@0.0.14", "", { "dependencies": { "looks-same": "^9.0.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "bin": { "bun-match-svg": "cli.ts" } }, "sha512-6tiAOY70cwf0aptY/0etMa3/8W1JggJBk3odwPhLhcUABoS3gaEbfYe8hE2z3o/tcbZ/imcmKz94c3T/ht7M+Q=="], "bun-types": ["bun-types@1.2.21", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-sa2Tj77Ijc/NTLS0/Odjq/qngmEPZfbfnOERi0KRUYhT9R8M4VBioWVmMWE5GrYbKMc+5lVybXygLdibHaqVqw=="], @@ -600,7 +600,7 @@ "calculate-elbow": ["calculate-elbow@0.0.12", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-UkGS4EhabJn1WR6+UyoWpcxhKMx6MxM7+rK+3G0JcaPLMiYlvv5pEuc91unC/nH7kLGHV9xsVavhr5jJ50o+HA=="], - "calculate-packing": ["calculate-packing@0.0.62", "", { "peerDependencies": { "@tscircuit/circuit-json-util": "*", "typescript": "^5" } }, "sha512-nEgHjbUKhbrptXENw+AZQ2n87nhmTORuMRXkNj+iR+OjhycpwPaDzD3Xx/m6QuNXYynuOeS5bF01BE0Pj0Xu1A=="], + "calculate-packing": ["calculate-packing@0.0.68", "", { "peerDependencies": { "@tscircuit/circuit-json-util": "*", "typescript": "^5" } }, "sha512-FbTBKbvofrsf867iMGHIFbJiQ2B156pxHtO/7IifszXJ0tuzyaaQ9rj7iH7/G/yPwXM/B4mky5RDK7KWHoE4/Q=="], "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="], @@ -628,13 +628,13 @@ "circuit-json-to-bpc": ["circuit-json-to-bpc@0.0.13", "", { "peerDependencies": { "bpc-graph": "*", "circuit-json": "*", "typescript": "^5" } }, "sha512-3wSMtPa6tJkiBQN4tsm7f0Mb7Wp90X2c8dNbULoDVE4mGGoFqP1DXqBlyvvZZl+4SjqznzQQ0EioLe2SCQTOcg=="], - "circuit-json-to-connectivity-map": ["circuit-json-to-connectivity-map@0.0.22", "", { "dependencies": { "@tscircuit/math-utils": "^0.0.9" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-HN8DiISjZZLTglGEkYNRpKeQ/DMG4dDo5j4Hck0UGSJbpux9aFwtJOGszMf06Inh/gu5oKBrpZJIeWxaNacKUg=="], + "circuit-json-to-connectivity-map": ["circuit-json-to-connectivity-map@0.0.23", "", { "dependencies": { "@tscircuit/math-utils": "^0.0.9" }, "peerDependencies": { "typescript": "^5.9.3" } }, "sha512-DSOiXaXOTvjU+7et8ITXb2LjgKto6cQzLv3hReYdXuUNtLw2GVnpOly1G83VcIBcSQ4hRVHI4VMKRyZB3XVzdg=="], "circuit-json-to-gltf": ["circuit-json-to-gltf@0.0.31", "", { "dependencies": { "@jscad/modeling": "^2.12.6", "jscad-electronics": "^0.0.53", "jscad-to-gltf": "^0.0.5" }, "peerDependencies": { "@resvg/resvg-js": "2", "@resvg/resvg-wasm": "2", "@tscircuit/circuit-json-util": "*", "circuit-json": "*", "circuit-to-svg": "*", "typescript": "^5" }, "optionalPeers": ["@resvg/resvg-js", "@resvg/resvg-wasm"] }, "sha512-TJ2yT7Ph//UyCt5u5W6PdyvAxil3Opy25hzzwRheqTw+UMo2WhcY6oug6svjPmaGyjjN6fhl0eMeoUgcfgq3sQ=="], "circuit-json-to-simple-3d": ["circuit-json-to-simple-3d@0.0.9", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-thpCtDb9LpAQfGO+Z0hae19sxVAmJAMYM/It9UTMCtyXC3zoUHwRcp/oqtMO/ZIW+JDBhiR8AHmmtKScL2kW7Q=="], - "circuit-json-to-spice": ["circuit-json-to-spice@0.0.27", "", { "dependencies": { "circuit-json-to-connectivity-map": "^0.0.22" }, "peerDependencies": { "@tscircuit/circuit-json-util": "*", "circuit-json": "*", "typescript": "^5.0.0" } }, "sha512-eftfzVaBDNkzHeLlOHyD2it6AmJDjeGj1xg8lbTU+3tHcFzlEFK6vnVfHQjbjXQB9/0Zy6t+hd/2Cen+LrEcBw=="], + "circuit-json-to-spice": ["circuit-json-to-spice@0.0.30", "", { "dependencies": { "circuit-json-to-connectivity-map": "^0.0.22" }, "peerDependencies": { "@tscircuit/circuit-json-util": "*", "circuit-json": "*", "typescript": "^5.0.0" } }, "sha512-ArMfJhxh7lWI1OiZLMNBong7r3tArX9Q6JOprDPirku0bUZwLXr5AY4w/pDlkEivlaRX6yvamqebWja6yIONog=="], "circuit-to-svg": ["circuit-to-svg@0.0.271", "", { "dependencies": { "@types/node": "^22.5.5", "bun-types": "^1.1.40", "calculate-elbow": "0.0.12", "svgson": "^5.3.1", "transformation-matrix": "^2.16.1" } }, "sha512-6g57xJT5lGiiSr29NIZztSwWhXq50ZXgwYbU2NCDLooZNXIz3d+sDrwhHltax53czFrt6w8q1om2XGPZHzAq6g=="], @@ -1606,7 +1606,7 @@ "ts-interface-checker": ["ts-interface-checker@0.1.13", "", {}, "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="], - "tscircuit": ["tscircuit@0.0.1015", "", { "dependencies": { "@flatten-js/core": "^1.6.2", "@lume/kiwi": "^0.4.3", "@resvg/resvg-js": "^2.6.2", "@rollup/plugin-commonjs": "^29.0.0", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-typescript": "^12.3.0", "@tscircuit/capacity-autorouter": "^0.0.140", "@tscircuit/checks": "^0.0.87", "@tscircuit/circuit-json-flex": "^0.0.3", "@tscircuit/circuit-json-util": "^0.0.73", "@tscircuit/cli": "^0.1.608", "@tscircuit/copper-pour-solver": "^0.0.14", "@tscircuit/core": "^0.0.900", "@tscircuit/eval": "^0.0.522", "@tscircuit/footprinter": "^0.0.236", "@tscircuit/infgrid-ijump-astar": "^0.0.33", "@tscircuit/matchpack": "^0.0.16", "@tscircuit/math-utils": "^0.0.29", "@tscircuit/miniflex": "^0.0.4", "@tscircuit/ngspice-spice-engine": "^0.0.4", "@tscircuit/props": "^0.0.423", "@tscircuit/runframe": "^0.0.1347", "@tscircuit/schematic-match-adapt": "^0.0.16", "@tscircuit/schematic-trace-solver": "^v0.0.45", "@tscircuit/simple-3d-svg": "^0.0.41", "@tscircuit/solver-utils": "^0.0.3", "bpc-graph": "^0.0.57", "calculate-elbow": "^0.0.12", "calculate-packing": "0.0.62", "circuit-json": "^0.0.325", "circuit-json-to-bpc": "^0.0.13", "circuit-json-to-connectivity-map": "^0.0.22", "circuit-json-to-gltf": "^0.0.31", "circuit-json-to-simple-3d": "^0.0.9", "circuit-json-to-spice": "^0.0.27", "circuit-to-svg": "^0.0.280", "comlink": "^4.4.2", "connectivity-map": "^1.0.0", "css-select": "5.1.0", "debug": "^4.3.6", "flatbush": "^4.5.0", "format-si-unit": "^0.0.3", "graphics-debug": "^0.0.60", "jscad-planner": "^0.0.13", "kicad-component-converter": "^0.1.30", "kicad-to-circuit-json": "^0.0.15", "kicadts": "^0.0.22", "minicssgrid": "^0.0.9", "performance-now": "^2.1.0", "poppygl": "^0.0.16", "react": "^19.1.0", "react-dom": "^19.1.0", "rollup": "^4.53.2", "rollup-plugin-dts": "^6.2.3", "s-expression": "^3.1.1", "schematic-symbols": "^0.0.202", "spicey": "^0.0.14", "sucrase": "^3.35.0", "transformation-matrix": "^2.16.1", "tslib": "^2.8.1", "zod": "^3.25.67" }, "peerDependencies": { "typescript": "^5.0.0" }, "bin": { "tsci": "cli.mjs", "tscircuit": "cli.mjs" } }, "sha512-wp7zXoaqpxwuEIJPyO6oOsdHKgt8yvZ7ey3En7zjXss6gj/7cqNmpWIbsC8zxk092xpYyTJEurcZpS2orbKu2Q=="], + "tscircuit": ["tscircuit@0.0.1040", "", { "dependencies": { "@flatten-js/core": "^1.6.2", "@lume/kiwi": "^0.4.3", "@resvg/resvg-js": "^2.6.2", "@rollup/plugin-commonjs": "^29.0.0", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-typescript": "^12.3.0", "@tscircuit/capacity-autorouter": "^0.0.178", "@tscircuit/checks": "^0.0.87", "@tscircuit/circuit-json-flex": "^0.0.3", "@tscircuit/circuit-json-util": "^0.0.73", "@tscircuit/cli": "^0.1.635", "@tscircuit/copper-pour-solver": "^0.0.14", "@tscircuit/core": "^0.0.922", "@tscircuit/eval": "^0.0.537", "@tscircuit/footprinter": "^0.0.236", "@tscircuit/infgrid-ijump-astar": "^0.0.33", "@tscircuit/matchpack": "^0.0.16", "@tscircuit/math-utils": "^0.0.29", "@tscircuit/miniflex": "^0.0.4", "@tscircuit/ngspice-spice-engine": "^0.0.8", "@tscircuit/props": "^0.0.427", "@tscircuit/runframe": "^0.0.1385", "@tscircuit/schematic-match-adapt": "^0.0.16", "@tscircuit/schematic-trace-solver": "^v0.0.45", "@tscircuit/simple-3d-svg": "^0.0.41", "@tscircuit/solver-utils": "^0.0.3", "bpc-graph": "^0.0.57", "calculate-elbow": "^0.0.12", "calculate-packing": "0.0.68", "circuit-json": "^0.0.333", "circuit-json-to-bpc": "^0.0.13", "circuit-json-to-connectivity-map": "^0.0.23", "circuit-json-to-gltf": "^0.0.31", "circuit-json-to-simple-3d": "^0.0.9", "circuit-json-to-spice": "^0.0.30", "circuit-to-svg": "^0.0.293", "comlink": "^4.4.2", "connectivity-map": "^1.0.0", "css-select": "5.1.0", "debug": "^4.3.6", "flatbush": "^4.5.0", "format-si-unit": "^0.0.3", "graphics-debug": "^0.0.60", "jscad-planner": "^0.0.13", "kicad-component-converter": "^0.1.30", "kicad-to-circuit-json": "^0.0.15", "kicadts": "^0.0.22", "minicssgrid": "^0.0.9", "performance-now": "^2.1.0", "poppygl": "^0.0.16", "react": "^19.1.0", "react-dom": "^19.1.0", "rollup": "^4.53.2", "rollup-plugin-dts": "^6.2.3", "s-expression": "^3.1.1", "schematic-symbols": "^0.0.202", "spicey": "^0.0.14", "sucrase": "^3.35.0", "transformation-matrix": "^2.16.1", "tslib": "^2.8.1", "zod": "^3.25.67" }, "peerDependencies": { "typescript": "^5.0.0" }, "bin": { "tsci": "cli.mjs", "tscircuit": "cli.mjs" } }, "sha512-8Ii4q4Z9WBxy/lVBQvIhcjkIvvJ08hk5teHWcnx5h4R+wwbtddVEoZmpp1XNwlvOhLehlbH724D3Dwk9cX9qBQ=="], "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], @@ -1780,6 +1780,8 @@ "circuit-json-to-connectivity-map/@tscircuit/math-utils": ["@tscircuit/math-utils@0.0.9", "", { "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-sPzfXndijet8z29X6f5vnSZddiso2tRg7m6rB+268bVj60mxnxUMD14rKuMlLn6n84fMOpD/X7pRTZUfi6M+Tg=="], + "circuit-json-to-spice/circuit-json-to-connectivity-map": ["circuit-json-to-connectivity-map@0.0.22", "", { "dependencies": { "@tscircuit/math-utils": "^0.0.9" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-HN8DiISjZZLTglGEkYNRpKeQ/DMG4dDo5j4Hck0UGSJbpux9aFwtJOGszMf06Inh/gu5oKBrpZJIeWxaNacKUg=="], + "circuit-to-svg/@types/node": ["@types/node@22.14.1", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw=="], "cli-highlight/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], @@ -1824,6 +1826,8 @@ "globby/slash": ["slash@5.1.0", "", {}, "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg=="], + "graphics-debug/bun-match-svg": ["bun-match-svg@0.0.9", "", { "dependencies": { "looks-same": "^9.0.1" }, "peerDependencies": { "typescript": "^5.0.0" }, "bin": { "bun-match-svg": "cli.ts" } }, "sha512-WISE8cUd3ztIEbYRymuxs+l4qwRviHIhyRQHmDz26vnhKON9g+Ur+2L3pfJrffpGiYWGF/jtWoWmYRQiaimTxg=="], + "graphics-debug/transformation-matrix": ["transformation-matrix@3.0.0", "", {}, "sha512-C6NlNnD6T8JqDeY4BpGznuve4d8/JlLDZLcJbnnx7gQKoyk01+uk2XYVFjBGqvNsVxJUpUwb3WZpjpdPr+05FQ=="], "handlebars/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], @@ -2322,9 +2326,7 @@ "tscircuit/@tscircuit/circuit-json-util": ["@tscircuit/circuit-json-util@0.0.73", "", { "dependencies": { "parsel-js": "^1.1.2" }, "peerDependencies": { "circuit-json": "*", "transformation-matrix": "*", "zod": "3" } }, "sha512-R5zdAZ6LMxjSBMj0EU8D24pTnKhLtoCTp5QM+C/mSrQvI5t+ohni7O8PS714YQHNSPfA9N77UzN8tqD3t43LFQ=="], - "tscircuit/circuit-json": ["circuit-json@0.0.325", "", {}, "sha512-6RBqf+G2HlyIb4Fi+w94QqTNT2L9LJA828V5T4039QEllFBhy2vORJ9GiyYB6VcfxTf/JSsLl3dfOnL3SLeYqg=="], - - "tscircuit/circuit-to-svg": ["circuit-to-svg@0.0.280", "", { "dependencies": { "@types/node": "^22.5.5", "bun-types": "^1.1.40", "calculate-elbow": "0.0.12", "svgson": "^5.3.1", "transformation-matrix": "^2.16.1" } }, "sha512-WnPBSLUF59v3Q2opx9JOGuI64FAUaqEsAPSQOVKAkDB27ilt6G4faM2zh5Ohb+Fn3/iv+ys8Vtgds53tK9memw=="], + "tscircuit/circuit-to-svg": ["circuit-to-svg@0.0.293", "", { "dependencies": { "@types/node": "^22.5.5", "bun-types": "^1.1.40", "calculate-elbow": "0.0.12", "svgson": "^5.3.1", "transformation-matrix": "^2.16.1" }, "peerDependencies": { "@tscircuit/alphabet": "*" } }, "sha512-OhRUyGu5a8DAZ7jAFsr1eRx/28b8QT59mNLjHbyJeXNvfcXgEOEXA/WAdscPT9FtJ+Qhy+GXg9BW8ngeN5VcEg=="], "tscircuit/react": ["react@19.1.1", "", {}, "sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ=="], @@ -2400,6 +2402,8 @@ "body-parser/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], + "circuit-json-to-spice/circuit-json-to-connectivity-map/@tscircuit/math-utils": ["@tscircuit/math-utils@0.0.9", "", { "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-sPzfXndijet8z29X6f5vnSZddiso2tRg7m6rB+268bVj60mxnxUMD14rKuMlLn6n84fMOpD/X7pRTZUfi6M+Tg=="], + "cli-highlight/chalk/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], "cli-highlight/chalk/supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], diff --git a/package.json b/package.json index ea04818f..d35367f5 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "react-cosmos-plugin-vite": "7.0.0-beta.0", "react-dom": "19.1.0", "react-use": "^17.4.0", - "tscircuit": "^0.0.1015", + "tscircuit": "^0.0.1040", "tsup": "^8.0.2", "type-fest": "^3.0.0", "typescript": "^5.4.4", diff --git a/src/examples/story-components/MacroKeypad.tsx b/src/assets/story-components/MacroKeypad.tsx similarity index 100% rename from src/examples/story-components/MacroKeypad.tsx rename to src/assets/story-components/MacroKeypad.tsx diff --git a/src/examples/assets/timer-555.ts b/src/assets/timer-555.ts similarity index 100% rename from src/examples/assets/timer-555.ts rename to src/assets/timer-555.ts diff --git a/src/examples/repros/contribution-board-performance-test/useHS91L02W2C01.tsx b/src/assets/useHS91L02W2C01.tsx similarity index 100% rename from src/examples/repros/contribution-board-performance-test/useHS91L02W2C01.tsx rename to src/assets/useHS91L02W2C01.tsx diff --git a/src/examples/repros/contribution-board-performance-test/usePICO.tsx b/src/assets/usePICO.tsx similarity index 100% rename from src/examples/repros/contribution-board-performance-test/usePICO.tsx rename to src/assets/usePICO.tsx diff --git a/src/examples/repros/contribution-board-performance-test/useWS2812B_2020.tsx b/src/assets/useWS2812B_2020.tsx similarity index 100% rename from src/examples/repros/contribution-board-performance-test/useWS2812B_2020.tsx rename to src/assets/useWS2812B_2020.tsx diff --git a/src/examples/DRC-errors-highlight.fixture.tsx b/src/examples/2025/DRC-errors-highlight.fixture.tsx similarity index 96% rename from src/examples/DRC-errors-highlight.fixture.tsx rename to src/examples/2025/DRC-errors-highlight.fixture.tsx index 1089a036..992b0937 100644 --- a/src/examples/DRC-errors-highlight.fixture.tsx +++ b/src/examples/2025/DRC-errors-highlight.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import { Circuit } from "@tscircuit/core" import { useEffect, useMemo, useState } from "react" diff --git a/src/examples/Fabication-note-dimension.fixture.tsx b/src/examples/2025/Fabication-note-dimension.fixture.tsx similarity index 96% rename from src/examples/Fabication-note-dimension.fixture.tsx rename to src/examples/2025/Fabication-note-dimension.fixture.tsx index 2efa6146..b3c28063 100644 --- a/src/examples/Fabication-note-dimension.fixture.tsx +++ b/src/examples/2025/Fabication-note-dimension.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import React from "react" export const FabricationNoteDimension: React.FC = () => { diff --git a/src/examples/Fabication-note-rect.fixture.tsx b/src/examples/2025/Fabication-note-rect.fixture.tsx similarity index 96% rename from src/examples/Fabication-note-rect.fixture.tsx rename to src/examples/2025/Fabication-note-rect.fixture.tsx index 52450494..6e30c38d 100644 --- a/src/examples/Fabication-note-rect.fixture.tsx +++ b/src/examples/2025/Fabication-note-rect.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import React from "react" export const FabricationNoteRect: React.FC = () => { diff --git a/src/examples/autorouting-animations.fixture.tsx b/src/examples/2025/autorouting-animations.fixture.tsx similarity index 97% rename from src/examples/autorouting-animations.fixture.tsx rename to src/examples/2025/autorouting-animations.fixture.tsx index 75bc06be..28055ec3 100644 --- a/src/examples/autorouting-animations.fixture.tsx +++ b/src/examples/2025/autorouting-animations.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import { Circuit } from "@tscircuit/core" import type { GraphicsObject } from "graphics-debug" import { Fragment, useEffect, useMemo, useRef, useState } from "react" diff --git a/src/examples/board-anchor-offset.fixture.tsx b/src/examples/2025/board-anchor-offset.fixture.tsx similarity index 98% rename from src/examples/board-anchor-offset.fixture.tsx rename to src/examples/2025/board-anchor-offset.fixture.tsx index 8f34b5ba..3bb4ce58 100644 --- a/src/examples/board-anchor-offset.fixture.tsx +++ b/src/examples/2025/board-anchor-offset.fixture.tsx @@ -1,6 +1,6 @@ import type React from "react" import type { AnyCircuitElement } from "circuit-json" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" const circuitJson: AnyCircuitElement[] = [ { diff --git a/src/examples/board.fixture.tsx b/src/examples/2025/board.fixture.tsx similarity index 98% rename from src/examples/board.fixture.tsx rename to src/examples/2025/board.fixture.tsx index 6feb5e56..65ae1b74 100644 --- a/src/examples/board.fixture.tsx +++ b/src/examples/2025/board.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const BasicRectangleBoard = () => { const circuit = new Circuit() diff --git a/src/examples/canvas-elements-renderer.fixture.tsx b/src/examples/2025/canvas-elements-renderer.fixture.tsx similarity index 78% rename from src/examples/canvas-elements-renderer.fixture.tsx rename to src/examples/2025/canvas-elements-renderer.fixture.tsx index 14306f45..404a9d4e 100644 --- a/src/examples/canvas-elements-renderer.fixture.tsx +++ b/src/examples/2025/canvas-elements-renderer.fixture.tsx @@ -1,4 +1,5 @@ -import { CanvasElementsRenderer } from "../components/CanvasElementsRenderer" +import { CanvasElementsRenderer } from "../../components/CanvasElementsRenderer" +import { ContextProviders } from "../../components/ContextProviders" import { useState } from "react" import { useMeasure } from "react-use" import useMouseMatrixTransform from "use-mouse-matrix-transform" @@ -123,26 +124,28 @@ const CanvasElementsTest = () => { return (
- {}} - onCreateEditEvent={() => {}} - onModifyEditEvent={() => {}} - /> + + {}} + onCreateEditEvent={() => {}} + onModifyEditEvent={() => {}} + /> +
) diff --git a/src/examples/circular_hole_with_rect_pad.fixture.tsx b/src/examples/2025/circular_hole_with_rect_pad.fixture.tsx similarity index 94% rename from src/examples/circular_hole_with_rect_pad.fixture.tsx rename to src/examples/2025/circular_hole_with_rect_pad.fixture.tsx index 3d04d71e..83ea9963 100644 --- a/src/examples/circular_hole_with_rect_pad.fixture.tsx +++ b/src/examples/2025/circular_hole_with_rect_pad.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const PlatedHoleRotatedPillWithRectPad: React.FC = () => { return ( diff --git a/src/examples/components.fixture.tsx b/src/examples/2025/components.fixture.tsx similarity index 97% rename from src/examples/components.fixture.tsx rename to src/examples/2025/components.fixture.tsx index 2718696d..0a060b08 100644 --- a/src/examples/components.fixture.tsx +++ b/src/examples/2025/components.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" const silkscreenCircuitJson = [ { diff --git a/src/examples/connected-resistors.fixture.tsx b/src/examples/2025/connected-resistors.fixture.tsx similarity index 95% rename from src/examples/connected-resistors.fixture.tsx rename to src/examples/2025/connected-resistors.fixture.tsx index 8c8848a0..4a1e5120 100644 --- a/src/examples/connected-resistors.fixture.tsx +++ b/src/examples/2025/connected-resistors.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" const ConnectedResistors = () => { const circuit = new Circuit() diff --git a/src/examples/coordinate-flip.fixture.tsx b/src/examples/2025/coordinate-flip.fixture.tsx similarity index 92% rename from src/examples/coordinate-flip.fixture.tsx rename to src/examples/2025/coordinate-flip.fixture.tsx index c166d733..feecbba8 100644 --- a/src/examples/coordinate-flip.fixture.tsx +++ b/src/examples/2025/coordinate-flip.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const CoordinateFlip = () => { const circuit = new Circuit() diff --git a/src/examples/copper-pour.fixture.tsx b/src/examples/2025/copper-pour.fixture.tsx similarity index 98% rename from src/examples/copper-pour.fixture.tsx rename to src/examples/2025/copper-pour.fixture.tsx index e1948527..85385c52 100644 --- a/src/examples/copper-pour.fixture.tsx +++ b/src/examples/2025/copper-pour.fixture.tsx @@ -1,6 +1,6 @@ import type React from "react" import type { AnyCircuitElement, PcbCopperPour } from "circuit-json" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const CopperPour: React.FC = () => { const soup: AnyCircuitElement[] = [ diff --git a/src/examples/copper-text.fixture.tsx b/src/examples/2025/copper-text.fixture.tsx similarity index 99% rename from src/examples/copper-text.fixture.tsx rename to src/examples/2025/copper-text.fixture.tsx index 9dd68d9a..12c89f6c 100644 --- a/src/examples/copper-text.fixture.tsx +++ b/src/examples/2025/copper-text.fixture.tsx @@ -1,6 +1,6 @@ import type React from "react" import type { AnyCircuitElement } from "circuit-json" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const CopperText: React.FC = () => { const soup: AnyCircuitElement[] = [ diff --git a/src/examples/corner-radius-component.fixture.tsx b/src/examples/2025/corner-radius-component.fixture.tsx similarity index 96% rename from src/examples/corner-radius-component.fixture.tsx rename to src/examples/2025/corner-radius-component.fixture.tsx index f52364a4..4744bddd 100644 --- a/src/examples/corner-radius-component.fixture.tsx +++ b/src/examples/2025/corner-radius-component.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" const CornerRadiusCircuitJson = [ { diff --git a/src/examples/debugGraphics.fixture.tsx b/src/examples/2025/debugGraphics.fixture.tsx similarity index 97% rename from src/examples/debugGraphics.fixture.tsx rename to src/examples/2025/debugGraphics.fixture.tsx index 0db9b6d4..6c7bd6df 100644 --- a/src/examples/debugGraphics.fixture.tsx +++ b/src/examples/2025/debugGraphics.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import { Circuit } from "@tscircuit/core" import type { GraphicsObject } from "graphics-debug" import { useEffect, useState } from "react" diff --git a/src/examples/disable-pcb-groups.fixture.tsx b/src/examples/2025/disable-pcb-groups.fixture.tsx similarity index 97% rename from src/examples/disable-pcb-groups.fixture.tsx rename to src/examples/2025/disable-pcb-groups.fixture.tsx index c57e45bb..e48670f7 100644 --- a/src/examples/disable-pcb-groups.fixture.tsx +++ b/src/examples/2025/disable-pcb-groups.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import { circuitJson } from "./pcb-group.fixture" export const DisablePcbGroupsComparison = () => { diff --git a/src/examples/error-hover-highlight.fixture.tsx b/src/examples/2025/error-hover-highlight.fixture.tsx similarity index 98% rename from src/examples/error-hover-highlight.fixture.tsx rename to src/examples/2025/error-hover-highlight.fixture.tsx index af6174c2..2d569372 100644 --- a/src/examples/error-hover-highlight.fixture.tsx +++ b/src/examples/2025/error-hover-highlight.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import type { PcbTraceError } from "circuit-json" export const ErrorHoverHighlight: React.FC = () => { diff --git a/src/examples/error-in-circuit-should-display.fixture.tsx b/src/examples/2025/error-in-circuit-should-display.fixture.tsx similarity index 91% rename from src/examples/error-in-circuit-should-display.fixture.tsx rename to src/examples/2025/error-in-circuit-should-display.fixture.tsx index 8d3905da..b05d989a 100644 --- a/src/examples/error-in-circuit-should-display.fixture.tsx +++ b/src/examples/2025/error-in-circuit-should-display.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import { Circuit } from "@tscircuit/core" export const ErrorInCircuit: React.FC = () => { diff --git a/src/examples/fabrication/fabrication-path.fixture.tsx b/src/examples/2025/fabrication/fabrication-path.fixture.tsx similarity index 93% rename from src/examples/fabrication/fabrication-path.fixture.tsx rename to src/examples/2025/fabrication/fabrication-path.fixture.tsx index a96d003c..068c6445 100644 --- a/src/examples/fabrication/fabrication-path.fixture.tsx +++ b/src/examples/2025/fabrication/fabrication-path.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const FabricationPath: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/fabrication/fabrication-text.fixture.tsx b/src/examples/2025/fabrication/fabrication-text.fixture.tsx similarity index 93% rename from src/examples/fabrication/fabrication-text.fixture.tsx rename to src/examples/2025/fabrication/fabrication-text.fixture.tsx index 05c1ef2f..dd6beaf1 100644 --- a/src/examples/fabrication/fabrication-text.fixture.tsx +++ b/src/examples/2025/fabrication/fabrication-text.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const FabricationNoteText: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/features/click-to-enable-zoom.fixture.tsx b/src/examples/2025/features/click-to-enable-zoom.fixture.tsx similarity index 94% rename from src/examples/features/click-to-enable-zoom.fixture.tsx rename to src/examples/2025/features/click-to-enable-zoom.fixture.tsx index 7abba1cf..04c153cc 100644 --- a/src/examples/features/click-to-enable-zoom.fixture.tsx +++ b/src/examples/2025/features/click-to-enable-zoom.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" const ClickToEnableInteractionDemo: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/group-anchor-hover-offset.fixture.tsx b/src/examples/2025/group-anchor-hover-offset.fixture.tsx similarity index 99% rename from src/examples/group-anchor-hover-offset.fixture.tsx rename to src/examples/2025/group-anchor-hover-offset.fixture.tsx index 7cec6b83..09a3602e 100644 --- a/src/examples/group-anchor-hover-offset.fixture.tsx +++ b/src/examples/2025/group-anchor-hover-offset.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import { AnyCircuitElement } from "circuit-json" export const GroupAnchorHoverOffset: React.FC = () => { diff --git a/src/examples/group-to-group-and-board-anchor.fixture.tsx b/src/examples/2025/group-to-group-and-board-anchor.fixture.tsx similarity index 97% rename from src/examples/group-to-group-and-board-anchor.fixture.tsx rename to src/examples/2025/group-to-group-and-board-anchor.fixture.tsx index 79506436..0b8d69f3 100644 --- a/src/examples/group-to-group-and-board-anchor.fixture.tsx +++ b/src/examples/2025/group-to-group-and-board-anchor.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import { AnyCircuitElement } from "circuit-json" export const GroupToGroupAndBoardAnchor: React.FC = () => { @@ -234,8 +234,8 @@ export const GroupToGroupAndBoardAnchor: React.FC = () => { anchor_alignment: "center", position_mode: "relative_to_group_anchor", positioned_relative_to_pcb_group_id: "group_1", - display_offset_x: "Group Δx: 12.00mm", - display_offset_y: "Group Δy: 0.00mm", + display_offset_x: "12.00mm", + display_offset_y: "0.00mm", pcb_component_ids: ["pcb_resistor_3", "pcb_resistor_4"], }, // Group 3 - Positioned relative to Board center (0, 0) - clearly different from Group 1 @@ -326,8 +326,8 @@ export const GroupToGroupAndBoardAnchor: React.FC = () => { anchor_alignment: "center", position_mode: "relative_to_group_anchor", positioned_relative_to_pcb_board_id: "pcb_board_0", - display_offset_x: "Board Δx: -7.00mm", - display_offset_y: "Board Δy: 8.00mm", + display_offset_x: "-7.00mm", + display_offset_y: "8.00mm", pcb_component_ids: ["pcb_resistor_5", "pcb_resistor_6"], }, ] as AnyCircuitElement[] diff --git a/src/examples/hole-rect.fixture.tsx b/src/examples/2025/hole-rect.fixture.tsx similarity index 96% rename from src/examples/hole-rect.fixture.tsx rename to src/examples/2025/hole-rect.fixture.tsx index 79bf965f..4045a924 100644 --- a/src/examples/hole-rect.fixture.tsx +++ b/src/examples/2025/hole-rect.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const RectangularHole = () => { return ( diff --git a/src/examples/hole-rotated-pill.fixture.tsx b/src/examples/2025/hole-rotated-pill.fixture.tsx similarity index 96% rename from src/examples/hole-rotated-pill.fixture.tsx rename to src/examples/2025/hole-rotated-pill.fixture.tsx index 92ac3074..6d93d59b 100644 --- a/src/examples/hole-rotated-pill.fixture.tsx +++ b/src/examples/2025/hole-rotated-pill.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const RotatedPillHole = () => { return ( diff --git a/src/examples/hole.fixture.tsx b/src/examples/2025/hole.fixture.tsx similarity index 95% rename from src/examples/hole.fixture.tsx rename to src/examples/2025/hole.fixture.tsx index 40329d29..588fd68b 100644 --- a/src/examples/hole.fixture.tsx +++ b/src/examples/2025/hole.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import { Circuit } from "@tscircuit/core" export const HoleExample: React.FC = () => { diff --git a/src/examples/hole_with_polygon_pad.fixture.tsx b/src/examples/2025/hole_with_polygon_pad.fixture.tsx similarity index 99% rename from src/examples/hole_with_polygon_pad.fixture.tsx rename to src/examples/2025/hole_with_polygon_pad.fixture.tsx index 98831e5f..0a05bf37 100644 --- a/src/examples/hole_with_polygon_pad.fixture.tsx +++ b/src/examples/2025/hole_with_polygon_pad.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const HoleWithPolygonPadFixture = () => { return ( diff --git a/src/examples/hover-behavior.fixture.tsx b/src/examples/2025/hover-behavior.fixture.tsx similarity index 97% rename from src/examples/hover-behavior.fixture.tsx rename to src/examples/2025/hover-behavior.fixture.tsx index 3bebd9fd..20f823ed 100644 --- a/src/examples/hover-behavior.fixture.tsx +++ b/src/examples/2025/hover-behavior.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" const HoverBehaviorDemo: React.FC<{ focusOnHover?: boolean }> = ({ focusOnHover, diff --git a/src/examples/initial-centering.fixture.tsx b/src/examples/2025/initial-centering.fixture.tsx similarity index 93% rename from src/examples/initial-centering.fixture.tsx rename to src/examples/2025/initial-centering.fixture.tsx index 8a47ea9d..dbd93460 100644 --- a/src/examples/initial-centering.fixture.tsx +++ b/src/examples/2025/initial-centering.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const SpacedResistors = () => { const circuit = new Circuit() diff --git a/src/examples/keepout.fixture.tsx b/src/examples/2025/keepout.fixture.tsx similarity index 99% rename from src/examples/keepout.fixture.tsx rename to src/examples/2025/keepout.fixture.tsx index 43d34dba..b644e565 100644 --- a/src/examples/keepout.fixture.tsx +++ b/src/examples/2025/keepout.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const KeepoutRectExample = () => { return ( diff --git a/src/examples/keyboard.fixture.tsx b/src/examples/2025/keyboard.fixture.tsx similarity index 63% rename from src/examples/keyboard.fixture.tsx rename to src/examples/2025/keyboard.fixture.tsx index 1b4c3869..af7eb3d0 100644 --- a/src/examples/keyboard.fixture.tsx +++ b/src/examples/2025/keyboard.fixture.tsx @@ -1,16 +1,12 @@ import React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import { Circuit } from "@tscircuit/core" -import { MacroKeypad } from "./story-components/MacroKeypad" +import { MacroKeypad } from "../../assets/story-components/MacroKeypad" export const KeyboardExample: React.FC = () => { const circuit = new Circuit() - circuit.add( - - - , - ) + circuit.add() const soup = circuit.getCircuitJson() diff --git a/src/examples/long-line-errors.fixture.tsx b/src/examples/2025/long-line-errors.fixture.tsx similarity index 72% rename from src/examples/long-line-errors.fixture.tsx rename to src/examples/2025/long-line-errors.fixture.tsx index dd53d58c..ee0c4b63 100644 --- a/src/examples/long-line-errors.fixture.tsx +++ b/src/examples/2025/long-line-errors.fixture.tsx @@ -1,6 +1,6 @@ import React from "react" -import { PCBViewer } from "../PCBViewer" -import timer555 from "./assets/timer-555" +import { PCBViewer } from "../../PCBViewer" +import timer555 from "../../assets/timer-555" export const LongLineErrorExample: React.FC = () => { return ( diff --git a/src/examples/manual-edit-conflicts-highlight.fixture.tsx b/src/examples/2025/manual-edit-conflicts-highlight.fixture.tsx similarity index 97% rename from src/examples/manual-edit-conflicts-highlight.fixture.tsx rename to src/examples/2025/manual-edit-conflicts-highlight.fixture.tsx index 89cd8540..21b5e34d 100644 --- a/src/examples/manual-edit-conflicts-highlight.fixture.tsx +++ b/src/examples/2025/manual-edit-conflicts-highlight.fixture.tsx @@ -1,6 +1,6 @@ import type React from "react" import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" const ManualConfliictsWarningBox: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/multi-layer-circuit.fixture.tsx b/src/examples/2025/multi-layer-circuit.fixture.tsx similarity index 94% rename from src/examples/multi-layer-circuit.fixture.tsx rename to src/examples/2025/multi-layer-circuit.fixture.tsx index d549c4ff..e944aca2 100644 --- a/src/examples/multi-layer-circuit.fixture.tsx +++ b/src/examples/2025/multi-layer-circuit.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const MultiLayerCircuit: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/multi-layer/eight-layer-circuit.fixture.tsx b/src/examples/2025/multi-layer/eight-layer-circuit.fixture.tsx similarity index 98% rename from src/examples/multi-layer/eight-layer-circuit.fixture.tsx rename to src/examples/2025/multi-layer/eight-layer-circuit.fixture.tsx index bb47500e..a1d5ea3d 100644 --- a/src/examples/multi-layer/eight-layer-circuit.fixture.tsx +++ b/src/examples/2025/multi-layer/eight-layer-circuit.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" import type { AnyCircuitElement } from "circuit-json" const EightLayerCircuit = () => { diff --git a/src/examples/multi-layer/four-layer-circuit.fixture.tsx b/src/examples/2025/multi-layer/four-layer-circuit.fixture.tsx similarity index 97% rename from src/examples/multi-layer/four-layer-circuit.fixture.tsx rename to src/examples/2025/multi-layer/four-layer-circuit.fixture.tsx index bdb2afa4..50291a5f 100644 --- a/src/examples/multi-layer/four-layer-circuit.fixture.tsx +++ b/src/examples/2025/multi-layer/four-layer-circuit.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" import type { AnyCircuitElement } from "circuit-json" export const FourLayerCircuit: React.FC = () => { diff --git a/src/examples/multi-layer/overlapping-layers-test.fixture.tsx b/src/examples/2025/multi-layer/overlapping-layers-test.fixture.tsx similarity index 98% rename from src/examples/multi-layer/overlapping-layers-test.fixture.tsx rename to src/examples/2025/multi-layer/overlapping-layers-test.fixture.tsx index c3d0b1a0..4b215df3 100644 --- a/src/examples/multi-layer/overlapping-layers-test.fixture.tsx +++ b/src/examples/2025/multi-layer/overlapping-layers-test.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" import type { AnyCircuitElement } from "circuit-json" const OverlappingLayersTest = () => { diff --git a/src/examples/multi-layer/six-layer-circuit.fixture.tsx b/src/examples/2025/multi-layer/six-layer-circuit.fixture.tsx similarity index 98% rename from src/examples/multi-layer/six-layer-circuit.fixture.tsx rename to src/examples/2025/multi-layer/six-layer-circuit.fixture.tsx index 02d0d1d9..8330c1f6 100644 --- a/src/examples/multi-layer/six-layer-circuit.fixture.tsx +++ b/src/examples/2025/multi-layer/six-layer-circuit.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" import type { AnyCircuitElement } from "circuit-json" export const SixLayerCircuit: React.FC = () => { diff --git a/src/examples/multi-layer/two-layer-circuit.fixture.tsx b/src/examples/2025/multi-layer/two-layer-circuit.fixture.tsx similarity index 96% rename from src/examples/multi-layer/two-layer-circuit.fixture.tsx rename to src/examples/2025/multi-layer/two-layer-circuit.fixture.tsx index 37dc3428..23c62e6a 100644 --- a/src/examples/multi-layer/two-layer-circuit.fixture.tsx +++ b/src/examples/2025/multi-layer/two-layer-circuit.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" import type { AnyCircuitElement } from "circuit-json" export const TwoLayerCircuit: React.FC = () => { diff --git a/src/examples/pcb-group-anchor.fixture.tsx b/src/examples/2025/pcb-group-anchor.fixture.tsx similarity index 99% rename from src/examples/pcb-group-anchor.fixture.tsx rename to src/examples/2025/pcb-group-anchor.fixture.tsx index 1d0c15fe..b6b028a9 100644 --- a/src/examples/pcb-group-anchor.fixture.tsx +++ b/src/examples/2025/pcb-group-anchor.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const PcbGroupWithAnchor: React.FC = () => { return ( diff --git a/src/examples/pcb-group.fixture.tsx b/src/examples/2025/pcb-group.fixture.tsx similarity index 99% rename from src/examples/pcb-group.fixture.tsx rename to src/examples/2025/pcb-group.fixture.tsx index 7ba9cd2d..348347a3 100644 --- a/src/examples/pcb-group.fixture.tsx +++ b/src/examples/2025/pcb-group.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const circuitJson = [ { diff --git a/src/examples/pcb-panel-multiple-boards.fixture.tsx b/src/examples/2025/pcb-panel-multiple-boards.fixture.tsx similarity index 94% rename from src/examples/pcb-panel-multiple-boards.fixture.tsx rename to src/examples/2025/pcb-panel-multiple-boards.fixture.tsx index b1d8c68b..2e349d56 100644 --- a/src/examples/pcb-panel-multiple-boards.fixture.tsx +++ b/src/examples/2025/pcb-panel-multiple-boards.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const PcbPanelMultipleBoardsExample: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/pcb-panel.fixture.tsx b/src/examples/2025/pcb-panel.fixture.tsx similarity index 95% rename from src/examples/pcb-panel.fixture.tsx rename to src/examples/2025/pcb-panel.fixture.tsx index f4630f36..5745c4bc 100644 --- a/src/examples/pcb-panel.fixture.tsx +++ b/src/examples/2025/pcb-panel.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const PcbPanelExample = () => { return ( diff --git a/src/examples/pcb_note.fixture.tsx b/src/examples/2025/pcb_note.fixture.tsx similarity index 97% rename from src/examples/pcb_note.fixture.tsx rename to src/examples/2025/pcb_note.fixture.tsx index b907bb5e..e5b108ca 100644 --- a/src/examples/pcb_note.fixture.tsx +++ b/src/examples/2025/pcb_note.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const PcbNoteExample: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/pcb_plated_hole_pill_shape_rotation.fixture.tsx b/src/examples/2025/pcb_plated_hole_pill_shape_rotation.fixture.tsx similarity index 93% rename from src/examples/pcb_plated_hole_pill_shape_rotation.fixture.tsx rename to src/examples/2025/pcb_plated_hole_pill_shape_rotation.fixture.tsx index d46fdb9f..77d05a4e 100644 --- a/src/examples/pcb_plated_hole_pill_shape_rotation.fixture.tsx +++ b/src/examples/2025/pcb_plated_hole_pill_shape_rotation.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const PcbPlatedHolePillShapeRotation: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/pill-smtpad.fixture.tsx b/src/examples/2025/pill-smtpad.fixture.tsx similarity index 98% rename from src/examples/pill-smtpad.fixture.tsx rename to src/examples/2025/pill-smtpad.fixture.tsx index b132dc29..9a74829a 100644 --- a/src/examples/pill-smtpad.fixture.tsx +++ b/src/examples/2025/pill-smtpad.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" // Example showing pill SMT usage export const PillSmtpadExample = () => { diff --git a/src/examples/plated-hole-oval-shap.fixture.tsx b/src/examples/2025/plated-hole-oval-shap.fixture.tsx similarity index 96% rename from src/examples/plated-hole-oval-shap.fixture.tsx rename to src/examples/2025/plated-hole-oval-shap.fixture.tsx index 9dc4404a..3cc0ac46 100644 --- a/src/examples/plated-hole-oval-shap.fixture.tsx +++ b/src/examples/2025/plated-hole-oval-shap.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const PlatedHoleOvalShape: React.FC = () => { return ( diff --git a/src/examples/plated_hole_pill_shape.fixture.tsx b/src/examples/2025/plated_hole_pill_shape.fixture.tsx similarity index 99% rename from src/examples/plated_hole_pill_shape.fixture.tsx rename to src/examples/2025/plated_hole_pill_shape.fixture.tsx index 053cfb25..01cc8868 100644 --- a/src/examples/plated_hole_pill_shape.fixture.tsx +++ b/src/examples/2025/plated_hole_pill_shape.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const PlatedHolePillShape: React.FC = () => { return ( diff --git a/src/examples/plated_hole_rotated_pill_hole_with_rect_pad.fixture.tsx b/src/examples/2025/plated_hole_rotated_pill_hole_with_rect_pad.fixture.tsx similarity index 97% rename from src/examples/plated_hole_rotated_pill_hole_with_rect_pad.fixture.tsx rename to src/examples/2025/plated_hole_rotated_pill_hole_with_rect_pad.fixture.tsx index 1ca8adb0..42d0ff34 100644 --- a/src/examples/plated_hole_rotated_pill_hole_with_rect_pad.fixture.tsx +++ b/src/examples/2025/plated_hole_rotated_pill_hole_with_rect_pad.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const PlatedHoleRotatedPillWithRectPad: React.FC = () => { return ( diff --git a/src/examples/polygon-smtpad.fixture.tsx b/src/examples/2025/polygon-smtpad.fixture.tsx similarity index 98% rename from src/examples/polygon-smtpad.fixture.tsx rename to src/examples/2025/polygon-smtpad.fixture.tsx index 31a46ad8..b57cd0fb 100644 --- a/src/examples/polygon-smtpad.fixture.tsx +++ b/src/examples/2025/polygon-smtpad.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" // Example showing polygon SMT pad usage export const PolygonSmtpadExample = () => { diff --git a/src/examples/rect_border_radius.fixture.tsx b/src/examples/2025/rect_border_radius.fixture.tsx similarity index 97% rename from src/examples/rect_border_radius.fixture.tsx rename to src/examples/2025/rect_border_radius.fixture.tsx index c2c2547a..6aed718b 100644 --- a/src/examples/rect_border_radius.fixture.tsx +++ b/src/examples/2025/rect_border_radius.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import React from "react" export const RectBorderRadius: React.FC = () => { diff --git a/src/examples/repros/contribution-board-performance-test/contribution-board.fixture.tsx b/src/examples/2025/repros/contribution-board-performance-test/contribution-board.fixture.tsx similarity index 95% rename from src/examples/repros/contribution-board-performance-test/contribution-board.fixture.tsx rename to src/examples/2025/repros/contribution-board-performance-test/contribution-board.fixture.tsx index 6122289c..d1701c65 100644 --- a/src/examples/repros/contribution-board-performance-test/contribution-board.fixture.tsx +++ b/src/examples/2025/repros/contribution-board-performance-test/contribution-board.fixture.tsx @@ -1,9 +1,9 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../../PCBViewer" -import { usePICO_W } from "./usePICO" -import { useHS91L02W2C01 } from "./useHS91L02W2C01" -import { WS2812B_2020 as LedWithIc } from "./useWS2812B_2020" +import { PCBViewer } from "../../../../PCBViewer" +import { usePICO_W } from "../../../../assets/usePICO" +import { useHS91L02W2C01 } from "../../../../assets/useHS91L02W2C01" +import { WS2812B_2020 as LedWithIc } from "../../../../assets/useWS2812B_2020" export const contributionBoard: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/repros/null-trace-hint copy/null-trace-hint.fixture.tsx b/src/examples/2025/repros/null-trace-hint copy/null-trace-hint.fixture.tsx similarity index 84% rename from src/examples/repros/null-trace-hint copy/null-trace-hint.fixture.tsx rename to src/examples/2025/repros/null-trace-hint copy/null-trace-hint.fixture.tsx index 6584bfea..4b00d96a 100644 --- a/src/examples/repros/null-trace-hint copy/null-trace-hint.fixture.tsx +++ b/src/examples/2025/repros/null-trace-hint copy/null-trace-hint.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../../../PCBViewer" +import { PCBViewer } from "../../../../PCBViewer" import soup from "./nulltracehint-soup.json" export const Macrokeypad: React.FC = () => { diff --git a/src/examples/repros/null-trace-hint copy/nulltracehint-soup.json b/src/examples/2025/repros/null-trace-hint copy/nulltracehint-soup.json similarity index 100% rename from src/examples/repros/null-trace-hint copy/nulltracehint-soup.json rename to src/examples/2025/repros/null-trace-hint copy/nulltracehint-soup.json diff --git a/src/examples/repros/null-trace-hint/null-trace-hint.fixture.tsx b/src/examples/2025/repros/null-trace-hint/null-trace-hint.fixture.tsx similarity index 84% rename from src/examples/repros/null-trace-hint/null-trace-hint.fixture.tsx rename to src/examples/2025/repros/null-trace-hint/null-trace-hint.fixture.tsx index b967eb15..75379f72 100644 --- a/src/examples/repros/null-trace-hint/null-trace-hint.fixture.tsx +++ b/src/examples/2025/repros/null-trace-hint/null-trace-hint.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../../../PCBViewer" +import { PCBViewer } from "../../../../PCBViewer" import soup from "./nulltracehint-soup.json" export const NullTraceHint: React.FC = () => { diff --git a/src/examples/repros/null-trace-hint/nulltracehint-soup.json b/src/examples/2025/repros/null-trace-hint/nulltracehint-soup.json similarity index 100% rename from src/examples/repros/null-trace-hint/nulltracehint-soup.json rename to src/examples/2025/repros/null-trace-hint/nulltracehint-soup.json diff --git a/src/examples/repros/polygon-smtpad-hover.fixture.tsx b/src/examples/2025/repros/polygon-smtpad-hover.fixture.tsx similarity index 99% rename from src/examples/repros/polygon-smtpad-hover.fixture.tsx rename to src/examples/2025/repros/polygon-smtpad-hover.fixture.tsx index 2d312f7e..6a3a1522 100644 --- a/src/examples/repros/polygon-smtpad-hover.fixture.tsx +++ b/src/examples/2025/repros/polygon-smtpad-hover.fixture.tsx @@ -1,6 +1,6 @@ import { useMemo, type CSSProperties } from "react" import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" const description = ` Reproduction fixture for a bug where hovering or zooming after interacting diff --git a/src/examples/repros/port-hints-not-showing/port-hints-not-showing.fixture.tsx b/src/examples/2025/repros/port-hints-not-showing/port-hints-not-showing.fixture.tsx similarity index 84% rename from src/examples/repros/port-hints-not-showing/port-hints-not-showing.fixture.tsx rename to src/examples/2025/repros/port-hints-not-showing/port-hints-not-showing.fixture.tsx index 3f9591b5..14efc2ac 100644 --- a/src/examples/repros/port-hints-not-showing/port-hints-not-showing.fixture.tsx +++ b/src/examples/2025/repros/port-hints-not-showing/port-hints-not-showing.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../../../PCBViewer" +import { PCBViewer } from "../../../../PCBViewer" import soup from "./soup.json" export const PortHintsNotShowing: React.FC = () => { diff --git a/src/examples/repros/port-hints-not-showing/soup.json b/src/examples/2025/repros/port-hints-not-showing/soup.json similarity index 100% rename from src/examples/repros/port-hints-not-showing/soup.json rename to src/examples/2025/repros/port-hints-not-showing/soup.json diff --git a/src/examples/repros/repro4-large-led-matrix/large-led-matrix.circuit.json b/src/examples/2025/repros/repro4-large-led-matrix/large-led-matrix.circuit.json similarity index 100% rename from src/examples/repros/repro4-large-led-matrix/large-led-matrix.circuit.json rename to src/examples/2025/repros/repro4-large-led-matrix/large-led-matrix.circuit.json diff --git a/src/examples/repros/repro4-large-led-matrix/repro4-large-led-matrix.fixture.tsx b/src/examples/2025/repros/repro4-large-led-matrix/repro4-large-led-matrix.fixture.tsx similarity index 85% rename from src/examples/repros/repro4-large-led-matrix/repro4-large-led-matrix.fixture.tsx rename to src/examples/2025/repros/repro4-large-led-matrix/repro4-large-led-matrix.fixture.tsx index a4ef10d7..87cff116 100644 --- a/src/examples/repros/repro4-large-led-matrix/repro4-large-led-matrix.fixture.tsx +++ b/src/examples/2025/repros/repro4-large-led-matrix/repro4-large-led-matrix.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../../../PCBViewer" +import { PCBViewer } from "../../../../PCBViewer" import circuitJson from "./large-led-matrix.circuit.json" export const Repro4LargeLedMatrix: React.FC = () => { diff --git a/src/examples/repros/sparkfunusb-to-serialbreakout-ft232rl/circuit.json b/src/examples/2025/repros/sparkfunusb-to-serialbreakout-ft232rl/circuit.json similarity index 100% rename from src/examples/repros/sparkfunusb-to-serialbreakout-ft232rl/circuit.json rename to src/examples/2025/repros/sparkfunusb-to-serialbreakout-ft232rl/circuit.json diff --git a/src/examples/repros/sparkfunusb-to-serialbreakout-ft232rl/sparkfunusb-to-serialbreakout-ft232rl.fixture.tsx b/src/examples/2025/repros/sparkfunusb-to-serialbreakout-ft232rl/sparkfunusb-to-serialbreakout-ft232rl.fixture.tsx similarity index 89% rename from src/examples/repros/sparkfunusb-to-serialbreakout-ft232rl/sparkfunusb-to-serialbreakout-ft232rl.fixture.tsx rename to src/examples/2025/repros/sparkfunusb-to-serialbreakout-ft232rl/sparkfunusb-to-serialbreakout-ft232rl.fixture.tsx index e83dbe0e..49ca3dac 100644 --- a/src/examples/repros/sparkfunusb-to-serialbreakout-ft232rl/sparkfunusb-to-serialbreakout-ft232rl.fixture.tsx +++ b/src/examples/2025/repros/sparkfunusb-to-serialbreakout-ft232rl/sparkfunusb-to-serialbreakout-ft232rl.fixture.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from "react" -import { PCBViewer } from "../../../PCBViewer" +import { PCBViewer } from "../../../../PCBViewer" import circuitJson from "./circuit.json" export const Circuit: React.FC = () => { diff --git a/src/examples/rotated-rec.fixture.tsx b/src/examples/2025/rotated-rec.fixture.tsx similarity index 95% rename from src/examples/rotated-rec.fixture.tsx rename to src/examples/2025/rotated-rec.fixture.tsx index 5153a100..bc21101e 100644 --- a/src/examples/rotated-rec.fixture.tsx +++ b/src/examples/2025/rotated-rec.fixture.tsx @@ -1,7 +1,7 @@ import { Circuit } from "@tscircuit/core" import type { PcbTraceError } from "circuit-json" import type React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const rotatedRec: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/silkscreen/silkscreen-circle.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-circle.fixture.tsx similarity index 91% rename from src/examples/silkscreen/silkscreen-circle.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-circle.fixture.tsx index 10367941..32b8ed58 100644 --- a/src/examples/silkscreen/silkscreen-circle.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-circle.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const SilkscreenCircle: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/silkscreen/silkscreen-layer.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-layer.fixture.tsx similarity index 95% rename from src/examples/silkscreen/silkscreen-layer.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-layer.fixture.tsx index 5e221ba6..b73c0066 100644 --- a/src/examples/silkscreen/silkscreen-layer.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-layer.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const Silkscreenlayers: React.FC = () => { return ( diff --git a/src/examples/silkscreen/silkscreen-line.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-line.fixture.tsx similarity index 90% rename from src/examples/silkscreen/silkscreen-line.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-line.fixture.tsx index b613fc53..9544346d 100644 --- a/src/examples/silkscreen/silkscreen-line.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-line.fixture.tsx @@ -1,5 +1,5 @@ import React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const SilkscreenLine: React.FC = () => { return ( diff --git a/src/examples/silkscreen/silkscreen-oval.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-oval.fixture.tsx similarity index 69% rename from src/examples/silkscreen/silkscreen-oval.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-oval.fixture.tsx index 181f7c65..e092f6bd 100644 --- a/src/examples/silkscreen/silkscreen-oval.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-oval.fixture.tsx @@ -1,5 +1,6 @@ import React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" +import { AnyCircuitElement } from "circuit-json" export const SilkscreenOval: React.FC = () => { return ( @@ -12,14 +13,6 @@ export const SilkscreenOval: React.FC = () => { name: "R1", supplier_part_numbers: {}, }, - { - type: "schematic_component", - schematic_component_id: "schematic_generic_component_0", - source_component_id: "generic_0", - center: { x: 0, y: 0 }, - rotation: 0, - size: { width: 0, height: 0 }, - }, { type: "pcb_component", source_component_id: "generic_0", @@ -35,11 +28,11 @@ export const SilkscreenOval: React.FC = () => { layer: "top", pcb_component_id: "pcb_generic_component_0", pcb_silkscreen_oval_id: "pcb_silkscreen_oval_0", - radiusX: 0.8, - radiusY: 1.6, + radius_x: 0.8, + radius_y: 1.6, center: { x: 0, y: 0 }, }, - ] as any + ] as AnyCircuitElement[] } /> ) diff --git a/src/examples/silkscreen/silkscreen-path.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-path.fixture.tsx similarity index 93% rename from src/examples/silkscreen/silkscreen-path.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-path.fixture.tsx index df785ab9..c33c36c5 100644 --- a/src/examples/silkscreen/silkscreen-path.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-path.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" import { Circuit } from "@tscircuit/core" export const SilkscreenPath: React.FC = () => { diff --git a/src/examples/silkscreen/silkscreen-pill.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-pill.fixture.tsx similarity index 96% rename from src/examples/silkscreen/silkscreen-pill.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-pill.fixture.tsx index 83ea5ea3..cee20200 100644 --- a/src/examples/silkscreen/silkscreen-pill.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-pill.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const SilkscreenPill: React.FC = () => { return ( diff --git a/src/examples/silkscreen/silkscreen-rect.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-rect.fixture.tsx similarity index 91% rename from src/examples/silkscreen/silkscreen-rect.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-rect.fixture.tsx index 16919fa5..65af9ffa 100644 --- a/src/examples/silkscreen/silkscreen-rect.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-rect.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const SilkscreenRect: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/silkscreen/silkscreen-text-alphabet.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-text-alphabet.fixture.tsx similarity index 96% rename from src/examples/silkscreen/silkscreen-text-alphabet.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-text-alphabet.fixture.tsx index abb44a5c..c60c6b1a 100644 --- a/src/examples/silkscreen/silkscreen-text-alphabet.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-text-alphabet.fixture.tsx @@ -1,7 +1,7 @@ import { Circuit } from "@tscircuit/core" -import { svgAlphabet } from "../../assets/alphabet" +import { svgAlphabet } from "../../../assets/alphabet" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const SilkscreenTextAlphabet: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/silkscreen/silkscreen-text-anchor.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-text-anchor.fixture.tsx similarity index 98% rename from src/examples/silkscreen/silkscreen-text-anchor.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-text-anchor.fixture.tsx index 033292be..281cf086 100644 --- a/src/examples/silkscreen/silkscreen-text-anchor.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-text-anchor.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" const boardProps = { width: "12mm", height: "12mm", thickness: 1.2 } const textProps = { pcbX: 0, pcbY: 0, fontSize: 1 } diff --git a/src/examples/silkscreen/silkscreen-text-bottom-layer.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-text-bottom-layer.fixture.tsx similarity index 96% rename from src/examples/silkscreen/silkscreen-text-bottom-layer.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-text-bottom-layer.fixture.tsx index ee9a8074..892c9651 100644 --- a/src/examples/silkscreen/silkscreen-text-bottom-layer.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-text-bottom-layer.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const SilkscreenTextBottomLayer: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/silkscreen/silkscreen-text-lowercase.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-text-lowercase.fixture.tsx similarity index 97% rename from src/examples/silkscreen/silkscreen-text-lowercase.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-text-lowercase.fixture.tsx index e794599c..498b6e80 100644 --- a/src/examples/silkscreen/silkscreen-text-lowercase.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-text-lowercase.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const SilkscreenTextLowercase: React.FC = () => { return ( diff --git a/src/examples/silkscreen/silkscreen-text-multiline.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-text-multiline.fixture.tsx similarity index 95% rename from src/examples/silkscreen/silkscreen-text-multiline.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-text-multiline.fixture.tsx index 81b7993e..2df6caa0 100644 --- a/src/examples/silkscreen/silkscreen-text-multiline.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-text-multiline.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" const boardProps = { width: "18mm", height: "14mm", thickness: 1.2 } const multilineLabel = "Multi-line\nsilkscreen\ntext" diff --git a/src/examples/silkscreen/silkscreen-text-rotation.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-text-rotation.fixture.tsx similarity index 96% rename from src/examples/silkscreen/silkscreen-text-rotation.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-text-rotation.fixture.tsx index 1d56fc9c..52520476 100644 --- a/src/examples/silkscreen/silkscreen-text-rotation.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-text-rotation.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const SilkscreenTextRotation: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/silkscreen/silkscreen-text.fixture.tsx b/src/examples/2025/silkscreen/silkscreen-text.fixture.tsx similarity index 97% rename from src/examples/silkscreen/silkscreen-text.fixture.tsx rename to src/examples/2025/silkscreen/silkscreen-text.fixture.tsx index 689514ef..4d11677f 100644 --- a/src/examples/silkscreen/silkscreen-text.fixture.tsx +++ b/src/examples/2025/silkscreen/silkscreen-text.fixture.tsx @@ -1,6 +1,6 @@ import { Circuit } from "@tscircuit/core" import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" export const SilkscreenText: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/simple-resistor.fixture.tsx b/src/examples/2025/simple-resistor.fixture.tsx similarity index 97% rename from src/examples/simple-resistor.fixture.tsx rename to src/examples/2025/simple-resistor.fixture.tsx index bada2bcd..29e1420b 100644 --- a/src/examples/simple-resistor.fixture.tsx +++ b/src/examples/2025/simple-resistor.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const SimpleResistorSMD: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/simple/pcb-cutout-corner-radius.fixture.tsx b/src/examples/2025/simple/pcb-cutout-corner-radius.fixture.tsx similarity index 96% rename from src/examples/simple/pcb-cutout-corner-radius.fixture.tsx rename to src/examples/2025/simple/pcb-cutout-corner-radius.fixture.tsx index 252e6f43..c53dd90d 100644 --- a/src/examples/simple/pcb-cutout-corner-radius.fixture.tsx +++ b/src/examples/2025/simple/pcb-cutout-corner-radius.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" import type { AnyCircuitElement } from "circuit-json" export const PcbCutoutCornerRadiusExample: React.FC = () => { diff --git a/src/examples/simple/pcb-cutouts.fixture.tsx b/src/examples/2025/simple/pcb-cutouts.fixture.tsx similarity index 97% rename from src/examples/simple/pcb-cutouts.fixture.tsx rename to src/examples/2025/simple/pcb-cutouts.fixture.tsx index 997362c9..b297446b 100644 --- a/src/examples/simple/pcb-cutouts.fixture.tsx +++ b/src/examples/2025/simple/pcb-cutouts.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" import { AnyCircuitElement } from "circuit-json" export const PcbCutoutsExample: React.FC = () => { diff --git a/src/examples/simple/rotated_rect_smtpad.fixture.tsx b/src/examples/2025/simple/rotated_rect_smtpad.fixture.tsx similarity index 96% rename from src/examples/simple/rotated_rect_smtpad.fixture.tsx rename to src/examples/2025/simple/rotated_rect_smtpad.fixture.tsx index be30139c..1e34c497 100644 --- a/src/examples/simple/rotated_rect_smtpad.fixture.tsx +++ b/src/examples/2025/simple/rotated_rect_smtpad.fixture.tsx @@ -1,5 +1,5 @@ import type React from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" import { AnyCircuitElement } from "circuit-json" export const RotatedRectExample: React.FC = () => { diff --git a/src/examples/smtpad-corner-radius.fixture.tsx b/src/examples/2025/smtpad-corner-radius.fixture.tsx similarity index 97% rename from src/examples/smtpad-corner-radius.fixture.tsx rename to src/examples/2025/smtpad-corner-radius.fixture.tsx index 9fc3bbeb..6521e998 100644 --- a/src/examples/smtpad-corner-radius.fixture.tsx +++ b/src/examples/2025/smtpad-corner-radius.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import React from "react" export const CornerRadius: React.FC = () => { diff --git a/src/examples/solder-mask-smtpad.fixture.tsx b/src/examples/2025/solder-mask-smtpad.fixture.tsx similarity index 97% rename from src/examples/solder-mask-smtpad.fixture.tsx rename to src/examples/2025/solder-mask-smtpad.fixture.tsx index 5b47fc25..1d4c8bbb 100644 --- a/src/examples/solder-mask-smtpad.fixture.tsx +++ b/src/examples/2025/solder-mask-smtpad.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import type { PcbSmtPad, PcbBoard } from "circuit-json" const SolderMaskSmtPadFixture = () => { diff --git a/src/examples/tests/transform-on-update.fixture.tsx b/src/examples/2025/tests/transform-on-update.fixture.tsx similarity index 94% rename from src/examples/tests/transform-on-update.fixture.tsx rename to src/examples/2025/tests/transform-on-update.fixture.tsx index 90fdede6..c503f8e1 100644 --- a/src/examples/tests/transform-on-update.fixture.tsx +++ b/src/examples/2025/tests/transform-on-update.fixture.tsx @@ -1,5 +1,6 @@ import { useState } from "react" -import { PCBViewer } from "../../PCBViewer" +import { PCBViewer } from "../../../PCBViewer" +import { AnyCircuitElement } from "circuit-json" // Create a test component that maintains PCBViewer instance while updating circuit const PCBViewerTransformTest = () => { @@ -104,7 +105,7 @@ const PCBViewerTransformTest = () => {
- +
) diff --git a/src/examples/trace-and-net.fixture.tsx b/src/examples/2025/trace-and-net.fixture.tsx similarity index 96% rename from src/examples/trace-and-net.fixture.tsx rename to src/examples/2025/trace-and-net.fixture.tsx index c23a1f7f..f935857f 100644 --- a/src/examples/trace-and-net.fixture.tsx +++ b/src/examples/2025/trace-and-net.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" const TraceAndNet = () => { const circuit = new Circuit() diff --git a/src/examples/trace-error.fixture.tsx b/src/examples/2025/trace-error.fixture.tsx similarity index 99% rename from src/examples/trace-error.fixture.tsx rename to src/examples/2025/trace-error.fixture.tsx index dd51bf38..8d28d2c6 100644 --- a/src/examples/trace-error.fixture.tsx +++ b/src/examples/2025/trace-error.fixture.tsx @@ -1,7 +1,7 @@ import { Circuit } from "@tscircuit/core" import type { PcbTraceError } from "circuit-json" import type React from "react" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const TraceErrorCircuit1: React.FC = () => { const circuit = new Circuit() diff --git a/src/examples/tracehint.fixture.tsx b/src/examples/2025/tracehint.fixture.tsx similarity index 99% rename from src/examples/tracehint.fixture.tsx rename to src/examples/2025/tracehint.fixture.tsx index 3e1c4d41..a19812ca 100644 --- a/src/examples/tracehint.fixture.tsx +++ b/src/examples/2025/tracehint.fixture.tsx @@ -1,4 +1,4 @@ -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const TraceHintExample = () => { return ( diff --git a/src/examples/traces-length-tooltip.fixture.tsx b/src/examples/2025/traces-length-tooltip.fixture.tsx similarity index 97% rename from src/examples/traces-length-tooltip.fixture.tsx rename to src/examples/2025/traces-length-tooltip.fixture.tsx index d6d8cca5..ec6046fd 100644 --- a/src/examples/traces-length-tooltip.fixture.tsx +++ b/src/examples/2025/traces-length-tooltip.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" import type React from "react" export const tracesLengthTooltip: React.FC = () => { diff --git a/src/examples/via.fixture.tsx b/src/examples/2025/via.fixture.tsx similarity index 92% rename from src/examples/via.fixture.tsx rename to src/examples/2025/via.fixture.tsx index ce7f3fa2..2c036de0 100644 --- a/src/examples/via.fixture.tsx +++ b/src/examples/2025/via.fixture.tsx @@ -1,5 +1,5 @@ import { Circuit } from "@tscircuit/core" -import { PCBViewer } from "../PCBViewer" +import { PCBViewer } from "../../PCBViewer" export const ViaExample = () => { const circuit = new Circuit() diff --git a/src/examples/all-features.fixture.tsx b/src/examples/all-features.fixture.tsx new file mode 100644 index 00000000..09db450d --- /dev/null +++ b/src/examples/all-features.fixture.tsx @@ -0,0 +1,324 @@ +import { Circuit } from "@tscircuit/core" +import { PCBViewer } from "../PCBViewer" +import { AnyCircuitElement } from "circuit-json" + +export const AllFeaturesExample = () => { + const circuit = new Circuit() + + circuit.add( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + /> + + + + + + + + + , + ) + + const circuitJson = circuit.getCircuitJson() + console.log(JSON.stringify(circuitJson, null, 2)) + return ( +
+ +
+ ) +} + +export default AllFeaturesExample diff --git a/src/examples/tsconfig.json b/src/examples/tsconfig.json index 148c09e3..ac2dafd4 100644 --- a/src/examples/tsconfig.json +++ b/src/examples/tsconfig.json @@ -16,6 +16,14 @@ "baseUrl": "./src", "jsx": "react-jsx" }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + "../assets/timer-555.ts", + "../assets/useHS91L02W2C01.tsx", + "../assets/usePICO.tsx", + "../assets/useWS2812B_2020.tsx" + ], "exclude": ["node_modules"] }