fix: export ControlledSchematicViewer from the package entry point - #251
Open
Priyanshubhartistm wants to merge 3 commits into
Open
fix: export ControlledSchematicViewer from the package entry point#251Priyanshubhartistm wants to merge 3 commits into
Priyanshubhartistm wants to merge 3 commits into
Conversation
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
Signed-off-by: Priyanshubhartistm <bhartipriyanshustm@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
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
ControlledSchematicViewerwrapsSchematicViewerand manageseditEvents/onEditEventfor you — it's the pattern 7 of the example fixtures use for drag-to-edit, and it's referenced indocs/dragndrop-spec.md.export { ControlledSchematicViewer } from "./components/ControlledSchematicViewer"tolib/index.ts.lib/components/ControlledSchematicViewerto import fromlib/indexinstead, so the examples now demonstrate the actual public API.tests/lib-index-exports.test.tsto lock in the package's export surface so this can't silently regress again.Why
ControlledSchematicViewerwas never added tolib/index.ts, so consumers of the published@tscircuit/schematic-viewerpackage had no way to import it only Cosmos'slib/*path alias made the examples work, and that alias doesn't exist indist/.Impact
Consumers of
@tscircuit/schematic-viewercan now importControlledSchematicViewerdirectly, matching the pattern every relevant example and the drag-and-drop docs already show as the intended usage.Validation
bun run format:checkbunx tsc --noEmitbun test(6 pass, 0 fail)bun run start, droveexample1,example4,example5, andexample14with Playwright after switching their imports tolib/index— all render correctly, zero page errors.