Repository navigation
refactor(mosaic): split compound components into client leaves and namespace parts - #10795
alexcarpenter wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 89199fa The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
6733f4e to
89199fa
Compare



Description
Stacked on #10754. Prepares compound components for React Server Components; #10806 builds on this to make them render from RSC.
Each of the 25 compound components now follows the Base UI layout:
<name>.tsxis a'use client'leaf with prefixed exports (PanelRoot,PanelTitle, ...).<name>.parts.tsre-exports them under the part names (Root,Title, ...).index.tsdoesexport * as Panel from './panel.parts'.The 7 published compound indexes (
avatar,banner,data-list,empty-state,entity,item,table) keep'use client', so published behavior is unchanged.X.Partusage and theXPropstypes are unchanged. Each compound is now a module namespace object instead of a plain object, so its parts are read-only.Other changes:
Panel.Titlepasses[ref, panelTitleRef]touseRenderinstead of a conditional ref. Theforward-ref-partsrule now checks it because it is exported, and it could not trace the conditional. Behavior is unchanged: the old ref was onlynullinside a profile page, whereenabledis false anduseRenderreturnsnullwithout rendering an element.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change