# Seve - @Abse bitmap probing
Channel: #contributor
Source: https://discord.com/channels/1233487248129921135/1522628340366840019
Started: 2026-07-03T15:41:26.554000+00:00
Last activity: 2026-07-06T14:35:23.471000+00:00
## Seve — 2026-07-04T16:38:47.386000+00:00
If the ai isnt populating internallyConnectedPins, then we should warn when a pushbutton has four pins and doesn’t explicitly say internallyConnectedPins
## Seve — 2026-07-04T16:39:02.594000+00:00
Standard missing prop warning
## Abse — 2026-07-04T16:44:02.145000+00:00
ok on which repo should this warning be , also we are using chips for the imported pushbuttons how can we detect if it's a pushbutton ?
## Abse — 2026-07-04T16:47:02.392000+00:00
circuit json to gerber does not have gerber rasterization to pixels
Attachment: image.png — https://community.tscircuit.com/media/1523007240850772139
## Seve — 2026-07-04T17:03:40.442000+00:00
Svg to png is fine
## Seve — 2026-07-04T17:03:51.369000+00:00
Core
## Seve — 2026-07-04T17:04:29.895000+00:00
Pushbuttons should be imported with the name or when imported from jlcpcb
## Seve — 2026-07-04T17:05:54.205000+00:00
If a user specifies the name as PB* or SW* but they use a chip- we should warn about reference designator convention (which needs a new circuit JSON warning)
## Abse — 2026-07-04T17:17:39.553000+00:00
ok I'm lost haha , should I start with easyeda converter to make sure we use pushbutton or switch componet when importing ?
## Seve — 2026-07-04T17:23:44.871000+00:00
Yea i mean all these things have to come together
## Seve — 2026-07-04T17:24:23.274000+00:00
You can start anywhere but the methodology is just to warn the user to add precision until we fully understand how the chip is configured
## Seve — 2026-07-04T17:24:55.016000+00:00
Its like in typescript- you can keep adding types until you fully pass typecheck or you can ignore them
## Abse — 2026-07-04T17:25:21.875000+00:00
ok for the svg to png should we use @resvg/resvg-js ?
## Seve — 2026-07-04T17:25:46.239000+00:00
Use @tscircuit/image-utils if possible? If not yea
## Seve — 2026-07-04T17:25:57.771000+00:00
I think image utils handles the browser/node issues
## Seve — 2026-07-04T17:26:11.665000+00:00
Because you have to use wasm sometimes for it to run in browser
## Seve — 2026-07-04T17:27:01.948000+00:00
We should have an svg to png in image utils for sure that manages all the annoying compat issues
## Abse — 2026-07-04T17:27:50.581000+00:00
@tscircuit/image-utils don't do svg to png on it's own
## Abse — 2026-07-04T17:28:02.423000+00:00
[attachment]
Attachment: image.png — https://community.tscircuit.com/media/1523017559035609259
## Seve — 2026-07-04T17:28:36.391000+00:00
Yea maybe expose it from image utils
## Abse — 2026-07-04T17:29:00.602000+00:00
ok
## Seve — 2026-07-04T17:30:18.020000+00:00
[attachment]
Attachment: 80487892779__19F40DFB-6248-4D31-99D8-9E01B68FD07B.mov — https://cdn.discordapp.com/attachments/1522628340366840019/1523018127263142054/80487892779__19F40DFB-6248-4D31-99D8-9E01B68FD07B.mov?ex=6a567229&is=6a5520a9&hm=004710eac193d07b51bf36dda5490f6eec389761dd36a683c9e7cac063fe7f4f&
## Seve — 2026-07-04T17:30:19.267000+00:00
It might be easier to use resvg just to get things moving
## Abse — 2026-07-04T17:32:48.586000+00:00
we should do @tscircuit/image-utils/resvg
## Abse — 2026-07-04T17:33:01.089000+00:00
I can start it
## Seve — 2026-07-04T17:34:13.530000+00:00
Yea its not very dangerous because all the exports have their own folder
## Seve — 2026-07-04T17:34:21.416000+00:00
So i dont see how you could break things
## Seve — 2026-07-04T17:35:05.052000+00:00
Idk also
## Seve — 2026-07-04T17:35:12.784000+00:00
Bundling can be weird with wasm
## Abse — 2026-07-04T17:35:24.242000+00:00
your scaring me haha , is it a vital dep that can break things ?
## Seve — 2026-07-04T17:35:26.087000+00:00
So you might want to use the wasm version only
## Seve — 2026-07-04T17:35:51.802000+00:00
It cant break things because you have a subdir
## Seve — 2026-07-04T17:36:05.381000+00:00
@tscircuit/image-utils/resvg
## Seve — 2026-07-04T17:36:20.444000+00:00
But like, resvg-js doesnt work in browsers
## Abse — 2026-07-04T17:36:49.230000+00:00
so we need a good repro and prove that we fixed it
## Seve — 2026-07-04T17:36:51.721000+00:00
Maybe just focus on the gerber stuff haha
## Seve — 2026-07-04T17:36:53+00:00
Yea
## Seve — 2026-07-04T17:37:16.617000+00:00
Rushabh did some work on this cc <@452450065941004289>
## Abse — 2026-07-04T17:37:59.205000+00:00
ok so I will go with resvg for this pr and we can make it cleaner with time ig ?
## Seve — 2026-07-04T17:38:04.208000+00:00
Yea
## Seve — 2026-07-04T17:38:45.844000+00:00
Otherwise you would need to use playwright and check bundle sizes which is annoying
## Seve — 2026-07-04T17:39:33.561000+00:00
I think resvg is great but i think we could probably create a slower clone of it that is vanilla js
## Seve — 2026-07-04T17:39:51.900000+00:00
That works for our subset of svgs
## Seve — 2026-07-04T17:40:01.298000+00:00
Eventually
## Abse — 2026-07-04T18:18:57.852000+00:00
<@757706909351411845> https://github.com/tscircuit/check-shorts/pull/5 I used resvg and tried to split code into smaller files
## Abse — 2026-07-04T18:33:27.269000+00:00
also ` ` doesn’t take `pinLabels` the way ` ` and `` do
## Abse — 2026-07-04T18:34:08.567000+00:00
should we add it ? to make the import possible with ?
## Seve — 2026-07-04T18:44:08.829000+00:00
Yea for sure we should add it
## Seve — 2026-07-04T18:44:44.839000+00:00
pinLabels on everything mosy
## Abse — 2026-07-04T18:45:12.679000+00:00
still messing the with pinLabels will add then tag you for review
## Abse — 2026-07-04T18:45:16.412000+00:00
https://github.com/tscircuit/easyeda-converter/pull/402
## Abse — 2026-07-04T18:52:11.359000+00:00
<@757706909351411845> `source_simple_switch` is extending `source_component_base` , should we add pin labels there ?
## Seve — 2026-07-04T18:52:29.697000+00:00
pinLabels is a props thing
## Abse — 2026-07-04T18:52:44.117000+00:00
omg haha I'm lost
## Abse — 2026-07-04T18:57:15.116000+00:00
```tsx
export interface CommonComponentProps
extends CommonLayoutProps {
key?: any
name: string
displayName?: string
datasheetUrl?: string
pinAttributes?: Record
supplierPartNumbers?: SupplierPartNumbers
cadModel?: CadModelProp
kicadFootprintMetadata?: KicadFootprintMetadata
kicadSymbolMetadata?: KicadSymbolMetadata
children?: any
symbolName?: string
doNotPlace?: boolean
/**
* Allows the PCB component to hang off the board (e.g. for USB ports or displays)
*/
allowOffBoard?: boolean
/**
* Does this component take up all the space within its bounds on a layer. This is generally true
* except for when separated pin headers are being represented by a single component (in which case,
* chips can be placed between the pin headers) or for tall modules where chips fit underneath.
*/
obstructsWithinBounds?: boolean
/**
* Whether to show this component's CAD model as translucent in the 3D viewer.
*/
showAsTranslucentModel?: boolean
mfn?: string
manufacturerPartNumber?: string
/**
* This component will be drawn as part of this section e.g. "Power"
*/
schSectionName?: string
/**
* This component will be drawn as part of this sheet e.g. "Main"
*/
schSheetName?: string
}
```
## Abse — 2026-07-04T18:58:36.631000+00:00
we don't want pinlables to be added to CommonComponentProps ?
## Seve — 2026-07-04T18:58:56.999000+00:00
Probably
## Abse — 2026-07-04T18:59:29.138000+00:00
probably no ?
## Abse — 2026-07-04T18:59:36.156000+00:00
so we only add it to switch props ?
## Seve — 2026-07-04T18:59:39.085000+00:00
Probably yes but idk
## Seve — 2026-07-04T18:59:42.556000+00:00
I think so
## Seve — 2026-07-04T18:59:47.692000+00:00
Idk why we havent
## Abse — 2026-07-04T19:00:11.751000+00:00
ok will add it to CommonComponentProps
## Abse — 2026-07-04T19:02:16.485000+00:00
<@757706909351411845> can we merge this ?
## Abse — 2026-07-04T19:02:26.341000+00:00
https://github.com/tscircuit/check-shorts/pull/5
## Seve — 2026-07-04T19:02:42.309000+00:00
Yea go nuts
## Seve — 2026-07-04T19:03:06.949000+00:00
Ill do a more comprehensive review of the repo at some point but as long as there are readable analysis pngs ur probably good
## Abse — 2026-07-04T19:03:18.553000+00:00
sg
## Abse — 2026-07-04T19:44:42.602000+00:00
<@757706909351411845> We’re adding pinLabels to common component props so can use the same pin label map style as .
I moved the shared pin label type/parser out of chip.ts into common code, then had both chip and common props use it. Chip keeps the same exports, so nothing should break.
pin-header stays special because it also supports array labels like ["VCC", "GND"].
## Abse — 2026-07-04T19:45:19.906000+00:00
should all support array labels like ["VCC", "GND"] ? or just keep it for pin headers only
## Seve — 2026-07-04T19:54:29.553000+00:00
kk
## Seve — 2026-07-04T19:54:32.956000+00:00
uhh
## Seve — 2026-07-04T19:55:03.491000+00:00
so one thing i'd be cautious about is certain elements have more precise pinLabels
## Seve — 2026-07-04T19:55:09.171000+00:00
that might be why it's separated
## Seve — 2026-07-04T19:55:24.610000+00:00
we want to make sure we're still able to do type autocomplete i think
## Seve — 2026-07-04T19:55:46.779000+00:00
i like the idea of introducing a side1/side2 alias for pushbuttons 🤔
## Seve — 2026-07-04T19:56:18.878000+00:00
i.e. pinLabels={{ side1: "..." }} might be type safe for some types of elements
## Seve — 2026-07-04T19:56:20.934000+00:00
i can't remember
## Seve — 2026-07-04T19:57:00.958000+00:00
i mean fwiw you could just quickly add pinLabels to switch or pushbutton if there's a type issue and we can just figure out the design later
## Abse — 2026-07-04T20:22:43.080000+00:00
https://github.com/tscircuit/props/pull/717
## Abse — 2026-07-04T23:22:06.061000+00:00
<@757706909351411845> https://github.com/tscircuit/core/pull/2580
## Abse — 2026-07-04T23:56:30.636000+00:00
<@757706909351411845> what is the concern with the PR?
## Seve — 2026-07-04T23:59:40.315000+00:00
How do we map pin numbers to the symbol ports
## Abse — 2026-07-05T00:02:09.072000+00:00
I'm not sure, I can check tomorrow?
I went to bed, although I thought this was handled before in core I just updated the package and made the test
## Seve — 2026-07-05T00:02:30.160000+00:00
Yea its ok- just preparing for a future issue
## Abse — 2026-07-05T00:19:32.218000+00:00
So what should I change to make this acceptable to merge?
## Abse — 2026-07-05T00:19:49.807000+00:00
I couldn't sleep thinking about this 🤣
## Seve — 2026-07-05T00:19:51.310000+00:00
It’s OK to merge, but we’re probably gonna have to change it and we should keep that in mind
## Seve — 2026-07-05T00:20:09.888000+00:00
We need to make sure that when the JC footprints come in that we’re able to match them so that the symbol is correct
## Seve — 2026-07-05T00:20:15.777000+00:00
The schematic symbol
## Abse — 2026-07-05T18:22:38.221000+00:00
<@757706909351411845> eval is not updated in tscircuit https://github.com/tscircuit/tscircuit
## Abse — 2026-07-05T18:28:42.387000+00:00
[attachment]
Attachment: image.png — https://community.tscircuit.com/media/1523395213987545179
## Seve — 2026-07-05T18:29:30.222000+00:00
hmm
## Seve — 2026-07-05T18:31:17.561000+00:00
i thought we were creating auto-merge prs for these changes
## Seve — 2026-07-05T18:32:21.066000+00:00
i just added tscircuitbot being able to bypass that rule- but this repo isn't set up like our other repos that require a pull request
## Seve — 2026-07-05T18:32:23.626000+00:00
CC <@809856037376491570>
## Abse — 2026-07-06T10:09:38.975000+00:00
<@757706909351411845> <@809856037376491570> https://github.com/tscircuit/tscircuit.com/pull/3831
## Abse — 2026-07-06T14:19:34.926000+00:00
<@757706909351411845> https://github.com/tscircuit/easyeda-converter/pull/405
## Abse — 2026-07-06T14:35:23.471000+00:00
one of the gameboy diodes had (_NEG) we need this to only let a-z 0-9 and + - only