improvement(emcn): extract design system into shared @sim/emcn package#5257
Conversation
Moves apps/sim/components/emcn into a shared @sim/emcn package consumed directly by apps/sim and apps/docs. cn/keyboard/use-copy-to-clipboard move into the package; all imports become direct @sim/emcn (icons via @sim/emcn/icons, CSS via file path). ChipModal email validation is now prop-driven (quickValidateEmail stays in apps/sim, injected via validate). Docs drops its local chip/chip-dropdown/dropdown-menu mirrors and consumes @sim/emcn.
|
Too many files changed for review. ( |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview
Contributor rules ( Reviewed by Cursor Bugbot for commit c7d4e7f. Configure here. |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c7d4e7f. Configure here.
|
@greptile |
1 similar comment
|
@greptile |
Summary
@sim/emcnpackage, consumed directly by bothapps/simandapps/docs— one source of truth, no duplication.cn,keyboard, anduse-copy-to-clipboardinto the package. Rewrote allapps/simimports to direct@sim/emcn(icons via@sim/emcn/icons, CSS modules via file path); removed the@/components/emcnalias and the old re-export shims.apps/docsnow consumes@sim/emcndirectly — deleted its hand-rolledchip/chip-dropdown/dropdown-menumirrors and bridged the few missing CSS tokens.ChipModalemail validation prop-driven: the design system keeps only a generic syntax gate; app-specific disposable-domain policy (quickValidateEmail) stays inapps/simand is injected via the field'svalidateprop (3 invite call sites), preserving behavior.Calendar/Tablecomponent-vs-icon name collisions explicitly (the icon stays available from@sim/emcn/icons). Updated the import conventions inCLAUDE.mdand the rules.Type of Change
Testing
apps/simtypecheck: 0 errorsapps/docstypecheck: 0 errors@sim/emcntypecheck: 0 errors, 10 tests passcheck:api-validationpassesChecklist