-
Notifications
You must be signed in to change notification settings - Fork 95
feat: add Connector component with USB-C standard support #1715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ce7aa51 to
a6e62e0
Compare
Implements the `<connector standard="usb_c" />` flow as described in issue tscircuit#748. - Add Connector class extending NormalComponent - Define USB-C standard pin mapping (DP, DM, CC1, CC2, VBUS, GND, SBU, TX/RX) - Auto-create ports with standard names when standard prop is set - Support internally connected pins for connectors - Export getStandardPins() helper and USB_C_STANDARD_PINS constant - Add unit tests for connector functionality Usage: ```tsx <Connector standard="usb_c" name="USB1" /> <trace from=".USB1 > .DP" to=".MCU > .USB_DP" /> ```
a6e62e0 to
b26eaa8
Compare
Lulzx
added a commit
to Lulzx/tscircuit
that referenced
this pull request
Dec 4, 2025
This feature is implemented across multiple repositories: - tscircuit/core#1715 - Add Connector component with USB-C standard support - tscircuit/parts-engine#17 - Add USB-C connector support and findStandardPart API - tscircuit/props#525 - Add StandardPartResult type and findStandardPart to PartsEngine - tscircuit/circuit-json#366 - Add source_simple_connector type No changes needed in this repository as it re-exports from @tscircuit/core. Once the dependent packages are published, the Connector component will be available automatically. Usage: ```tsx <connector standard="usb_c" name="USB1" /> <trace from=".USB1 > .DP" to=".MCU > .USB_DP" /> ``` Closes tscircuit#748
Override doInitialPartsEngineRender to call findStandardPart when a standard prop is specified. This enables automatic footprint loading from the parts engine for standard connectors like USB-C. - Add doInitialPartsEngineRender override for standard connectors - Add updatePartsEngineRender to apply async results - Add _applyStandardPartResult to update supplier part numbers and create footprint components from Circuit JSON
- Add DP1, DP2, D+2 aliases to USB_C_STANDARD_PINS.DP - Add DM1, DM2, D-2 aliases to USB_C_STANDARD_PINS.DM - This ensures 16-pin USB-C footprints map correctly to standard ports - Add tests for parts engine integration with findStandardPart - Add tests for fallback behavior and error handling
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
|
This PR was closed because it has been inactive for 1 day since being marked as stale. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements the
<connector standard="usb_c" />flow as described in issue tscircuit/tscircuit#748.Connectorclass extendingNormalComponentDP,DM(with aliases D+, D-)CC1,CC2VBUS1-4,GND1-4SBU1,SBU2VCONN,SHIELDstandardprop is setinternallyConnectedPinsfor connectorsgetStandardPins()helper andUSB_C_STANDARD_PINSconstantUsage
Related PRs
This is part of a multi-repo implementation:
StandardPartResulttype andfindStandardPartto PartsEnginesource_simple_connectortypeTest plan