From b09a3c0ca497de85bc100b373e02e8a8290c0d2d Mon Sep 17 00:00:00 2001 From: Severin Ibarluzea Date: Mon, 10 Feb 2025 22:41:32 -0800 Subject: [PATCH 1/6] fix non-subcircuits triggering autorouting, fix autorouting running when no traces need to be routed (#615) * fix non-subcircuits routing boards * lots of fixes for unnecessary circuit routing * mark test with bug fixed in http request ordering * update to include local autorouter for subcircuit --- bun.lockb | Bin 225622 -> 225252 bytes .../primitive-components/Group/Group.ts | 87 ++++++++++++------ package.json | 2 +- ...e19-subcircuit-overlap-traces-pcb.snap.svg | 2 +- ...ample19-subcircuit-overlap-traces.test.tsx | 45 +++------ ...ircuit3-dependent-autorouting-pcb.snap.svg | 2 +- ...subcircuit3-dependent-autorouting.test.tsx | 10 +- ...bcircuit4-nested-group-autorouter.test.tsx | 59 ++++++++++++ 8 files changed, 141 insertions(+), 66 deletions(-) create mode 100644 tests/subcircuits/subcircuit4-nested-group-autorouter.test.tsx diff --git a/bun.lockb b/bun.lockb index 443565b49c4d34c45856660e84c377cb5c5c66d9..97db4981fe12d10d531865bd7e52dd6df7ceed83 100755 GIT binary patch delta 39058 zcmeIbd7O>)|Nno^VKj%v&X|UfoyIbQnK8>jmKkI0Vr&`vU!dQmJ=4iT0wx@BX;1>)_p6@9+2X{e5r0e}0{MoagKLcs*a+^R-^rT$l6S zXJKD_61KQ$qt4#wHg#URqxXhVH_sn1>G~4SroWX^v;7kr3x{U^xGBDI`#w1(Jo=<9 z=~vUYuEUb)Z|1i}t>Ez#bo6^XHIS{5<&eK1!;sxedpu>4`;gL0m+^QiAv>TGEI7zl zdE_2fZb2&j2I8+n#*#?s>mrrzeWcP=L1GtOP}(K-Vnwjv0b~{A?Zm2LW04WaI7+FA z9AJ5U4N{AVl66h5$3sa4Q*x(HRLkNhgPIpKMT$S>>Z3+vO;-GrtOYD)N_%3eHt_ zD)1Rn1&zJI>6-3H>R#{`QhXaE9xJG8cS0pkLD{-a!I?<)VIQkP$(s4^HSl;K3U;`1 z5wZ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X+k$Dbhwum!*h8v`CV3ARACH>% zvHtE^qMjSj{5_^}3A6NXdNN8Ei|zTpWUD7@hAIVNS0z-iw(xq+tFLiqX|PxaUU{FNbtp9np>BqM|13k5BJ- zsY<5_IJ!5_$IREt_*)aQp9<_=?+kX2tRW3H43C?`gKcNhc;=e5`|S#7`gv#WetW-< zuMAE%C!fY#WPXPtHf(e{x$=)@X@i7UA1LdMY7=YUHtjcU4|41CHV$D_w_ANt1hEeihp v!BbOrKXS-d+i!OK>1$+OO)gX3EI7jObTEm-$}}`p-u6}6{msk1a}WM6)A@pd diff --git a/lib/components/primitive-components/Group/Group.ts b/lib/components/primitive-components/Group/Group.ts index b1146a65..e478f3a0 100644 --- a/lib/components/primitive-components/Group/Group.ts +++ b/lib/components/primitive-components/Group/Group.ts @@ -167,31 +167,27 @@ export class Group = typeof groupProps> } _shouldRouteAsync(): boolean { - const props = this._parsedProps as SubcircuitGroupProps - if (props.autorouter === "auto-local") return true - if (props.autorouter === "auto-cloud") return true - if (props.autorouter === "sequential-trace") return false - if (typeof props.autorouter === "object") return true - return false + const autorouter = this._getAutorouterConfig() + if (autorouter.local) return false + if (autorouter.groupMode === "sequential-trace") return false + return true + } + + _hasTracesToRoute(): boolean { + const debug = Debug("tscircuit:core:_hasTracesToRoute") + const traces = this.selectAll("trace") as Trace[] + debug(`[${this.getString()}] has ${traces.length} traces to route`) + return traces.length > 0 } async _runEffectMakeHttpAutoroutingRequest() { const debug = Debug("tscircuit:core:_runEffectMakeHttpAutoroutingRequest") const props = this._parsedProps as SubcircuitGroupProps - const autorouterPropObj = - typeof props.autorouter === "object" ? props.autorouter : {} - - const autoroutingOptions: AutorouterConfig = { - ...autorouterPropObj, - serverUrl: - autorouterPropObj.serverUrl ?? "https://registry-api.tscircuit.com", - serverMode: autorouterPropObj.serverMode ?? "job", - serverCacheEnabled: autorouterPropObj.serverCacheEnabled ?? false, - } + const autorouterConfig = this._getAutorouterConfig() - const serverUrl = autoroutingOptions.serverUrl! - const serverMode = autoroutingOptions.serverMode! + const serverUrl = autorouterConfig.serverUrl! + const serverMode = autorouterConfig.serverMode! const fetchWithDebug = (url: string, options: RequestInit) => { debug("fetching", url) @@ -252,7 +248,7 @@ export class Group = typeof groupProps> autostart: true, display_name: this.root?.name, subcircuit_id: this.subcircuit_id, - server_cache_enabled: autoroutingOptions.serverCacheEnabled, + server_cache_enabled: autorouterConfig.serverCacheEnabled, }), headers: { "Content-Type": "application/json" }, }, @@ -321,6 +317,7 @@ export class Group = typeof groupProps> doInitialPcbTraceRender() { const debug = Debug("tscircuit:core:doInitialPcbTraceRender") + if (!this.isSubcircuit) return if (this.root?.pcbDisabled) return if (this._shouldUseTraceByTraceRouting()) return @@ -334,12 +331,18 @@ export class Group = typeof groupProps> debug( `[${this.getString()}] no child subcircuits to wait for, initiating async routing`, ) + if (!this._hasTracesToRoute()) return this._startAsyncAutorouting() } updatePcbTraceRender() { const debug = Debug("tscircuit:core:updatePcbTraceRender") - if (this._shouldRouteAsync() && !this._hasStartedAsyncAutorouting) { + if (!this.isSubcircuit) return + if ( + this._shouldRouteAsync() && + this._hasTracesToRoute() && + !this._hasStartedAsyncAutorouting + ) { if (this._areChildSubcircuitsRouted()) { debug( `[${this.getString()}] child subcircuits are now routed, starting async autorouting`, @@ -463,6 +466,42 @@ export class Group = typeof groupProps> SAL.mutateSoupForScene(db.toArray(), laidOutScene) } + _getAutorouterConfig(): AutorouterConfig { + const defaults = { + serverUrl: "https://registry-api.tscircuit.com", + serverMode: "job", + serverCacheEnabled: false, + } + // Inherit from parent if not set by props + const autorouter = + this._parsedProps.autorouter ?? this.getInheritedProperty("autorouter") + + if (typeof autorouter === "object") { + return { + local: !( + autorouter.serverUrl || + autorouter.serverMode || + autorouter.serverCacheEnabled + ), + ...defaults, + ...autorouter, + } + } + + if (autorouter === "auto-local") + return { + local: true, + } + if (autorouter === "sequential-trace") + return { + local: true, + groupMode: "sequential-trace", + } + return { + local: true, + groupMode: "sequential-trace", + } + } /** * Trace-by-trace autorouting is where each trace routes itself in a well-known * order. It's the most deterministic way to autoroute, because a new trace @@ -473,11 +512,7 @@ export class Group = typeof groupProps> */ _shouldUseTraceByTraceRouting(): boolean { // Inherit from parent if not set by props - const autorouter = - this._parsedProps.autorouter ?? this.getInheritedProperty("autorouter") - if (autorouter === "auto-local") return true - if (autorouter === "sequential-trace") return true - if (autorouter) return false - return true + const autorouter = this._getAutorouterConfig() + return autorouter.groupMode === "sequential-trace" } } diff --git a/package.json b/package.json index ba8d73a7..48ce5cb5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@tscircuit/footprinter": "^0.0.97", "@tscircuit/infgrid-ijump-astar": "^0.0.33", "@tscircuit/math-utils": "^0.0.9", - "@tscircuit/props": "^0.0.142", + "@tscircuit/props": "^0.0.144", "@tscircuit/schematic-autolayout": "^0.0.6", "@tscircuit/soup-util": "^0.0.41", "circuit-json": "^0.0.136", diff --git a/tests/examples/__snapshots__/example19-subcircuit-overlap-traces-pcb.snap.svg b/tests/examples/__snapshots__/example19-subcircuit-overlap-traces-pcb.snap.svg index 18e3a18a..c7051fd3 100644 --- a/tests/examples/__snapshots__/example19-subcircuit-overlap-traces-pcb.snap.svg +++ b/tests/examples/__snapshots__/example19-subcircuit-overlap-traces-pcb.snap.svg @@ -10,4 +10,4 @@ .pcb-silkscreen-top { stroke: #f2eda1; } .pcb-silkscreen-bottom { stroke: #f2eda1; } .pcb-silkscreen-text { fill: #f2eda1; } - \ No newline at end of file + \ No newline at end of file diff --git a/tests/examples/example19-subcircuit-overlap-traces.test.tsx b/tests/examples/example19-subcircuit-overlap-traces.test.tsx index 3a11d15f..fb515763 100644 --- a/tests/examples/example19-subcircuit-overlap-traces.test.tsx +++ b/tests/examples/example19-subcircuit-overlap-traces.test.tsx @@ -83,7 +83,7 @@ test.skip("If the subcircuit is routing disabled, it should not have traces from `) }) -test("Autorouter should not create traces if the parent subcircuit has async autorouter enabled", async () => { +test("Autorouter should inherit if the parent subcircuit has async autorouter enabled", async () => { const { circuit } = getTestFixture() const { autoroutingServerUrl } = getTestAutoroutingServer() @@ -109,61 +109,44 @@ test("Autorouter should not create traces if the parent subcircuit has async aut expect(pcb_traces).toMatchInlineSnapshot(` [ { - "pcb_trace_id": "pcb_trace_Net-(R1_source_component_0-Pad1)", + "pcb_trace_id": "pcb_trace_0", "route": [ { "layer": "top", "route_type": "wire", - "width": 0.16, - "x": 1.5, + "width": 0.1, + "x": -2.5, "y": 0, }, { "layer": "top", "route_type": "wire", - "width": 0.16, - "x": 0.9483, + "width": 0.1, + "x": -2, "y": 0, }, - ], - "source_trace_id": "source_trace_0", - "trace_length": 0.5517, - "type": "pcb_trace", - }, - { - "pcb_trace_id": "pcb_trace_Net-(R1_source_component_0-Pad1)", - "route": [ { "layer": "top", "route_type": "wire", - "width": 0.16, - "x": 0.9483, - "y": 0, + "width": 0.1, + "x": -2, + "y": 1.3, }, { "layer": "top", "route_type": "wire", - "width": 0.16, - "x": 0.3966, - "y": -0.5517, - }, - { - "layer": "top", - "route_type": "wire", - "width": 0.16, - "x": -1.9483, - "y": -0.5517, + "width": 0.1, + "x": 1.5, + "y": 1.3, }, { "layer": "top", "route_type": "wire", - "width": 0.16, - "x": -2.5, + "width": 0.1, + "x": 1.5, "y": 0, }, ], - "source_trace_id": "source_trace_0", - "trace_length": 3.9053, "type": "pcb_trace", }, ] diff --git a/tests/subcircuits/__snapshots__/subcircuit3-dependent-autorouting-pcb.snap.svg b/tests/subcircuits/__snapshots__/subcircuit3-dependent-autorouting-pcb.snap.svg index 12831a8d..4c071f04 100644 --- a/tests/subcircuits/__snapshots__/subcircuit3-dependent-autorouting-pcb.snap.svg +++ b/tests/subcircuits/__snapshots__/subcircuit3-dependent-autorouting-pcb.snap.svg @@ -10,4 +10,4 @@ .pcb-silkscreen-top { stroke: #f2eda1; } .pcb-silkscreen-bottom { stroke: #f2eda1; } .pcb-silkscreen-text { fill: #f2eda1; } - \ No newline at end of file + \ No newline at end of file diff --git a/tests/subcircuits/subcircuit3-dependent-autorouting.test.tsx b/tests/subcircuits/subcircuit3-dependent-autorouting.test.tsx index 590f2842..36d8bda0 100644 --- a/tests/subcircuits/subcircuit3-dependent-autorouting.test.tsx +++ b/tests/subcircuits/subcircuit3-dependent-autorouting.test.tsx @@ -33,7 +33,10 @@ test("subcircuit3-dependent-autorouting", async () => { /> - + { "effectName": "make-http-autorouting-request", "phase": "PcbTraceRender", }, - { - "componentDisplayName": "", - "effectName": "make-http-autorouting-request", - "phase": "PcbTraceRender", - }, ] `) diff --git a/tests/subcircuits/subcircuit4-nested-group-autorouter.test.tsx b/tests/subcircuits/subcircuit4-nested-group-autorouter.test.tsx new file mode 100644 index 00000000..272db4e4 --- /dev/null +++ b/tests/subcircuits/subcircuit4-nested-group-autorouter.test.tsx @@ -0,0 +1,59 @@ +import React from "react" +import { test, expect } from "bun:test" +import { getTestFixture } from "tests/fixtures/get-test-fixture" +import { getTestAutoroutingServer } from "tests/fixtures/get-test-autorouting-server" + +test("Nested group within a subcircuit triggers autorouter only once", async () => { + const { autoroutingServerUrl } = getTestAutoroutingServer() + + const cloudAutorouterConfig = { + serverUrl: autoroutingServerUrl, + serverMode: "solve-endpoint", + inputFormat: "simplified", + } as const + const { circuit } = getTestFixture() + + // Count the number of times the autorouter is triggered + let autorouterCallCount = 0 + circuit.on("asyncEffect:start", (event) => { + if (event.effectName === "make-http-autorouting-request") { + autorouterCallCount++ + } + }) + + // Add a board with autorouter configuration + circuit.add( + + + + + + + + + , + ) + + await circuit.renderUntilSettled() + + // Expect that the autorouter is called only once for the subcircuit, + // not once for the nested group + expect(autorouterCallCount).toBe(1) +}) From 2b6849e126dad689c9fbdc0341adc4f2a6455014 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 11 Feb 2025 06:42:01 +0000 Subject: [PATCH 2/6] v0.0.308 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 48ce5cb5..43ab01cf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@tscircuit/core", "type": "module", - "version": "0.0.307", + "version": "0.0.308", "types": "dist/index.d.ts", "main": "dist/index.js", "module": "dist/index.js", From a6cd4a470439185a344f7721fd0bb3d2c463764a Mon Sep 17 00:00:00 2001 From: Ansh Grover <168731971+Anshgrover23@users.noreply.github.com> Date: Wed, 12 Feb 2025 00:00:03 +0530 Subject: [PATCH 3/6] fix failing test snapshots (#620) * update-dependcies * update snapshot --- bun.lockb | Bin 225252 -> 225616 bytes package.json | 4 ++-- .../capacitor-polarized-schematic.snap.svg | 4 ++-- .../__snapshots__/mosfet-schematic.snap.svg | 4 ++-- .../pushbutton1-schematic.snap.svg | 2 +- .../pushbutton2-schematic.snap.svg | 2 +- ...ansistor.test.tsx.npn.0-schematic.snap.svg | 2 +- ...sistor.test.tsx.npn.180-schematic.snap.svg | 2 +- ...sistor.test.tsx.npn.270-schematic.snap.svg | 2 +- ...nsistor.test.tsx.npn.90-schematic.snap.svg | 2 +- ...ansistor.test.tsx.pnp.0-schematic.snap.svg | 2 +- ...sistor.test.tsx.pnp.180-schematic.snap.svg | 2 +- ...sistor.test.tsx.pnp.270-schematic.snap.svg | 2 +- ...nsistor.test.tsx.pnp.90-schematic.snap.svg | 2 +- ...hematic-neg-schRotation-schematic.snap.svg | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bun.lockb b/bun.lockb index 97db4981fe12d10d531865bd7e52dd6df7ceed83..30f8399f429d83516a47f103c7a34c4ee7cafd31 100755 GIT binary patch delta 2968 zcmb`Jc}x{o6vk&RJXsWFQ$bKfwju}u3gUtwi|h!>CWwNH0xFXP$0bE;aP}khZ_tBc*UkYk{6ZBf2KpPJABPu*T3_ zGgT;xnYP5-#^3F*qKs6OGE-z5YUGQIxn|wf$e!4HeVNypJkM6e+c&@r*9m zJVwQ_7U7Wfk=G&{B5&wx!GF(|(>$+4PzVB_s+XdeYKa#cg=<#2FZ})zl8-FhZp8*&2X3bT*BNgON61HW2zz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o%Rvem((hx0OxZ#qOJ1UoE%iMJIkJsHuH#yd zx^*$`k&~>tuDWRdJgF$I(%7ed?=aj@BbwdrrVFg3qTDW!JsBcJ-pUZCy_^AD;pM!* zTG^E;X032WDfW{x9sb+oWy&;W?qH9g3A^AAt*ros zo&rS&=7t!^jGi9Bb#vtywFp8A2R%f}V+fkR9+9d7-~*I|g(A}U@z5y_W??cW8!hH> zDhR2osG;SW&ny`FIT}Q{o>LJ>`En|O*&?u`aI!>Zi=n+S zM7lFcvV~eK=TsEXQ|LK}$;_gmzk<_JuV5Af{WCOKiX5aC2AtBoRPF4bjLovclG$UA%QV|8i-y$WUnxL5xR~Cy@lBtum&)i_^UFe04=t1YAw(ga2h;q zV7jsjZikb#fzd?P!Oy^{Zin1MEp~GGdZ2zz?P6Aqa|fJkHy93O1Dw{6CcZ~rqZWI) z+yWF!HL%y1)k4!tuo7_}vpVPyuG=s5g=q0Qr|OZS2fGUX2D44j=ioFNdZW>m4e&3S zy(wF$1wC~%?ztME^mgW*Dn3?A+BqI4ud8;ECxpOp!-v?!%idXfRSI8OY!TkF)*=FC(Cey?wlb`5P#&^iIOFxgM@BUW ztz*<8eh}&sNAE_VQKj#o$aVZxFZPv9WaS5gqSim*)a2*doyT$Yw?j0-NsWn2j9h|t zg)(qR`1wzL*UkJxz8948UFWlcc4+6jrdwC#~L+y ZY1pK3bGTm>%^%6&Z$+r%{w7Ve)4vtxtXcp7 diff --git a/package.json b/package.json index 43ab01cf..7ee9755c 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@tscircuit/footprinter": "^0.0.97", "@tscircuit/infgrid-ijump-astar": "^0.0.33", "@tscircuit/math-utils": "^0.0.9", - "@tscircuit/props": "^0.0.144", + "@tscircuit/props": "^0.0.145", "@tscircuit/schematic-autolayout": "^0.0.6", "@tscircuit/soup-util": "^0.0.41", "circuit-json": "^0.0.136", @@ -64,7 +64,7 @@ "performance-now": "^2.1.0", "react-reconciler": "^0.31.0", "react-reconciler-18": "npm:react-reconciler@0.29.2", - "schematic-symbols": "^0.0.113", + "schematic-symbols": "^0.0.119", "transformation-matrix": "^2.16.1", "zod": "^3.23.8" } diff --git a/tests/components/normal-components/__snapshots__/capacitor-polarized-schematic.snap.svg b/tests/components/normal-components/__snapshots__/capacitor-polarized-schematic.snap.svg index b91f2abd..ee794ca4 100644 --- a/tests/components/normal-components/__snapshots__/capacitor-polarized-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/capacitor-polarized-schematic.snap.svg @@ -1,4 +1,4 @@ --2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1C110µF \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/mosfet-schematic.snap.svg b/tests/components/normal-components/__snapshots__/mosfet-schematic.snap.svg index 628cb4d9..29b636da 100644 --- a/tests/components/normal-components/__snapshots__/mosfet-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/mosfet-schematic.snap.svg @@ -1,4 +1,4 @@ --6,-3-6,-2-6,-1-6,0-6,1-6,2-6,3-5,-3-5,-2-5,-1-5,0-5,1-5,2-5,3-4,-3-4,-2-4,-1-4,0-4,1-4,2-4,3-3,-3-3,-2-3,-1-3,0-3,1-3,2-3,3-2,-3-2,-2-2,-1-2,0-2,1-2,2-2,3-1,-3-1,-2-1,-1-1,0-1,1-1,2-1,30,-30,-20,-10,00,10,20,31,-31,-21,-11,01,11,21,3M1M2M3M4 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/pushbutton1-schematic.snap.svg b/tests/components/normal-components/__snapshots__/pushbutton1-schematic.snap.svg index aa166369..836b8c3c 100644 --- a/tests/components/normal-components/__snapshots__/pushbutton1-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/pushbutton1-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1PB1 \ No newline at end of file + -2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1PB1 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/pushbutton2-schematic.snap.svg b/tests/components/normal-components/__snapshots__/pushbutton2-schematic.snap.svg index eeab2b9d..7d01b2da 100644 --- a/tests/components/normal-components/__snapshots__/pushbutton2-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/pushbutton2-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -5,-1-5,0-5,1-5,2-4,-1-4,0-4,1-4,2-3,-1-3,0-3,1-3,2-2,-1-2,0-2,1-2,2-1,-1-1,0-1,1-1,20,-10,00,10,21,-11,01,11,22,-12,02,12,23,-13,03,13,24,-14,04,14,25,-15,05,15,2SW1SW2 \ No newline at end of file + -5,-1-5,0-5,1-5,2-4,-1-4,0-4,1-4,2-3,-1-3,0-3,1-3,2-2,-1-2,0-2,1-2,2-1,-1-1,0-1,1-1,20,-10,00,10,21,-11,01,11,22,-12,02,12,23,-13,03,13,24,-14,04,14,25,-15,05,15,2SW1SW2 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.0-schematic.snap.svg b/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.0-schematic.snap.svg index 6b9ac524..98b0e4a7 100644 --- a/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.0-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.0-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,2Q1 \ No newline at end of file + -1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,2Q1 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.180-schematic.snap.svg b/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.180-schematic.snap.svg index 0e7fe183..7f388055 100644 --- a/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.180-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.180-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,2Q1 \ No newline at end of file + -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,2Q1 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.270-schematic.snap.svg b/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.270-schematic.snap.svg index e955729b..ef46d2a0 100644 --- a/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.270-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.270-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1Q1 \ No newline at end of file + -2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1Q1 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.90-schematic.snap.svg b/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.90-schematic.snap.svg index d00faaa9..19b89b55 100644 --- a/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.90-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/transistor.test.tsx.npn.90-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,2Q1 \ No newline at end of file + -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,2Q1 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.0-schematic.snap.svg b/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.0-schematic.snap.svg index 89bcb2b1..9daf7db8 100644 --- a/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.0-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.0-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,2Q2 \ No newline at end of file + -1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,2Q2 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.180-schematic.snap.svg b/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.180-schematic.snap.svg index 3f7b55cd..62db5739 100644 --- a/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.180-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.180-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,2Q2 \ No newline at end of file + -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,2Q2 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.270-schematic.snap.svg b/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.270-schematic.snap.svg index 28fca448..b80f610f 100644 --- a/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.270-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.270-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1Q2 \ No newline at end of file + -2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1Q2 \ No newline at end of file diff --git a/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.90-schematic.snap.svg b/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.90-schematic.snap.svg index d9d2d084..bc51aa8b 100644 --- a/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.90-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/transistor.test.tsx.pnp.90-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,2Q2 \ No newline at end of file + -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,2Q2 \ No newline at end of file diff --git a/tests/components/primitive-components/__snapshots__/schematic-neg-schRotation-schematic.snap.svg b/tests/components/primitive-components/__snapshots__/schematic-neg-schRotation-schematic.snap.svg index 8f249735..f5aabbff 100644 --- a/tests/components/primitive-components/__snapshots__/schematic-neg-schRotation-schematic.snap.svg +++ b/tests/components/primitive-components/__snapshots__/schematic-neg-schRotation-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - 1,-21,-11,01,11,21,31,41,52,-22,-12,02,12,22,32,42,53,-23,-13,03,13,23,33,43,54,-24,-14,04,14,24,34,44,55,-25,-15,05,15,25,35,45,56,-26,-16,06,16,26,36,46,57,-27,-17,07,17,27,37,47,58,-28,-18,08,18,28,38,48,59,-29,-19,09,19,29,39,49,510,-210,-110,010,110,210,310,410,5C1_n9010µFC2_n18010µFC3_n27010µFC4_n36010µFC5_noRotation10µF \ No newline at end of file + 1,-21,-11,01,11,21,31,41,52,-22,-12,02,12,22,32,42,53,-23,-13,03,13,23,33,43,54,-24,-14,04,14,24,34,44,55,-25,-15,05,15,25,35,45,56,-26,-16,06,16,26,36,46,57,-27,-17,07,17,27,37,47,58,-28,-18,08,18,28,38,48,59,-29,-19,09,19,29,39,49,510,-210,-110,010,110,210,310,410,5C1_n9010µFC2_n18010µFC3_n27010µFC4_n36010µFC5_noRotation10µF \ No newline at end of file From 1231a2d50d2ccd5811a957b9dd2954d3af8e8b63 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 11 Feb 2025 18:30:31 +0000 Subject: [PATCH 4/6] v0.0.309 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ee9755c..e417dcc8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@tscircuit/core", "type": "module", - "version": "0.0.308", + "version": "0.0.309", "types": "dist/index.d.ts", "main": "dist/index.js", "module": "dist/index.js", From 0a2ac78f52da6f71ba4a802ea9ac8ce16a2a5317 Mon Sep 17 00:00:00 2001 From: Ansh Grover <168731971+Anshgrover23@users.noreply.github.com> Date: Wed, 12 Feb 2025 00:17:49 +0530 Subject: [PATCH 5/6] add 3pin Potentiometer component (#618) --- .../potentiometer-default-schematic.snap.svg | 17 ++++++ ...potentiometer-three-pin-schematic.snap.svg | 17 ++++++ .../potentiometer-two-pin-schematic.snap.svg | 17 ++++++ .../normal-components/Potentiometer.ts | 53 ++++++++----------- .../potentiometer-schematic.snap.svg | 2 +- .../normal-components/potentiometer.test.tsx | 34 +++++++++++- 6 files changed, 107 insertions(+), 33 deletions(-) create mode 100644 __snapshots__/potentiometer-default-schematic.snap.svg create mode 100644 __snapshots__/potentiometer-three-pin-schematic.snap.svg create mode 100644 __snapshots__/potentiometer-two-pin-schematic.snap.svg diff --git a/__snapshots__/potentiometer-default-schematic.snap.svg b/__snapshots__/potentiometer-default-schematic.snap.svg new file mode 100644 index 00000000..bf51d8f2 --- /dev/null +++ b/__snapshots__/potentiometer-default-schematic.snap.svg @@ -0,0 +1,17 @@ +-2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1P3 \ No newline at end of file diff --git a/__snapshots__/potentiometer-three-pin-schematic.snap.svg b/__snapshots__/potentiometer-three-pin-schematic.snap.svg new file mode 100644 index 00000000..131da091 --- /dev/null +++ b/__snapshots__/potentiometer-three-pin-schematic.snap.svg @@ -0,0 +1,17 @@ +-2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1P2 \ No newline at end of file diff --git a/__snapshots__/potentiometer-two-pin-schematic.snap.svg b/__snapshots__/potentiometer-two-pin-schematic.snap.svg new file mode 100644 index 00000000..6497cba4 --- /dev/null +++ b/__snapshots__/potentiometer-two-pin-schematic.snap.svg @@ -0,0 +1,17 @@ +-2,-1-2,0-2,1-1,-1-1,0-1,10,-10,00,11,-11,01,12,-12,02,1P1 \ No newline at end of file diff --git a/lib/components/normal-components/Potentiometer.ts b/lib/components/normal-components/Potentiometer.ts index 9fb4e94c..2ba1a36e 100644 --- a/lib/components/normal-components/Potentiometer.ts +++ b/lib/components/normal-components/Potentiometer.ts @@ -1,50 +1,41 @@ import { potentiometerProps } from "@tscircuit/props" -import { - type BaseSymbolName, - type Ftype, - type PolarizedPassivePorts, -} from "lib/utils/constants" import { NormalComponent } from "../base-components/NormalComponent/NormalComponent" -import { Port } from "../primitive-components/Port" -import type { SourceSimplePotentiometer } from "circuit-json" -import { formatSiUnit } from "format-si-unit" +import type { BaseSymbolName } from "lib/utils/constants" -export class Potentiometer extends NormalComponent< - typeof potentiometerProps, - PolarizedPassivePorts -> { - // @ts-ignore +function getPotentiometerSymbolName( + variant: string | undefined, +): BaseSymbolName { + switch (variant) { + case "three_pin": + return "potentiometer3" + case "two_pin": + return "potentiometer2" + default: + return "potentiometer2" + } +} + +export class Potentiometer extends NormalComponent { get config() { return { - schematicSymbolName: - this.props.symbolName ?? ("potentiometer2" as BaseSymbolName), componentName: "Potentiometer", + schematicSymbolName: + this.props.symbolName ?? + getPotentiometerSymbolName(this.props.pinVariant), zodProps: potentiometerProps, - sourceFtype: "simple_potentiometer" as Ftype, + shouldRenderAsSchematicBox: false, } } - initPorts() { - super.initPorts({ - additionalAliases: { - pin1: ["pos", "left"], - pin2: ["neg", "right"], - }, - }) - } - - _getSchematicSymbolDisplayValue(): string | undefined { - return `${formatSiUnit(this._parsedProps.maxResistance)}Ω` - } - doInitialSourceRender() { const { db } = this.root! const { _parsedProps: props } = this const source_component = db.source_component.insert({ - name: props.name, ftype: "simple_potentiometer", + name: props.name, max_resistance: props.maxResistance, - } as SourceSimplePotentiometer) + pin_variant: props.pinVariant || "two_pin", + } as any) this.source_component_id = source_component.source_component_id } } diff --git a/tests/components/normal-components/__snapshots__/potentiometer-schematic.snap.svg b/tests/components/normal-components/__snapshots__/potentiometer-schematic.snap.svg index f4efb654..cfd55c56 100644 --- a/tests/components/normal-components/__snapshots__/potentiometer-schematic.snap.svg +++ b/tests/components/normal-components/__snapshots__/potentiometer-schematic.snap.svg @@ -14,4 +14,4 @@ .pin-number { fill: rgb(169, 0, 0); } .port-label { fill: rgb(0, 100, 100); } .component-name { fill: rgb(0, 100, 100); } - -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,23,-23,-13,03,13,24,-24,-14,04,14,25,-25,-15,05,15,26,-26,-16,06,16,27,-27,-17,07,17,210kΩP110kΩP210kΩP310kΩP4 \ No newline at end of file + -2,-2-2,-1-2,0-2,1-2,2-1,-2-1,-1-1,0-1,1-1,20,-20,-10,00,10,21,-21,-11,01,11,22,-22,-12,02,12,23,-23,-13,03,13,24,-24,-14,04,14,25,-25,-15,05,15,26,-26,-16,06,16,27,-27,-17,07,17,2P1P2P3P4 \ No newline at end of file diff --git a/tests/components/normal-components/potentiometer.test.tsx b/tests/components/normal-components/potentiometer.test.tsx index e4fdae92..81bbd2be 100644 --- a/tests/components/normal-components/potentiometer.test.tsx +++ b/tests/components/normal-components/potentiometer.test.tsx @@ -1,9 +1,41 @@ import { test, expect } from "bun:test" import { getTestFixture } from "tests/fixtures/get-test-fixture" -test("potentiometer schematic", () => { +test("should render a two-pin potentiometer", async () => { const { circuit } = getTestFixture() + circuit.add( + + + , + ) + circuit.render() + expect(circuit).toMatchSchematicSnapshot("potentiometer-two-pin") +}) +test("should render a three-pin potentiometer", async () => { + const { circuit } = getTestFixture() + circuit.add( + + + , + ) + circuit.render() + expect(circuit).toMatchSchematicSnapshot("potentiometer-three-pin") +}) + +test("should render a potentiometer without pinVariant specified", async () => { + const { circuit } = getTestFixture() + circuit.add( + + + , + ) + circuit.render() + expect(circuit).toMatchSchematicSnapshot("potentiometer-default") +}) + +test("should render multiple potentiometers with different rotations", async () => { + const { circuit } = getTestFixture() circuit.add( Date: Tue, 11 Feb 2025 18:48:14 +0000 Subject: [PATCH 6/6] v0.0.310 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e417dcc8..9c260b89 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@tscircuit/core", "type": "module", - "version": "0.0.309", + "version": "0.0.310", "types": "dist/index.d.ts", "main": "dist/index.js", "module": "dist/index.js",