Repository navigation
refactor(mosaic): split compound components into client leaves and namespace parts - #10795
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 7bfa7a4 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:
|
|
| Merge-base | This PR 7bfa7a43 |
|---|---|
Also checked · 3 match
Proof on 7bfa7a43 · Did Proof get it right? Yes · No
View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss
6733f4e to
89199fa
Compare
89199fa to
7bfa7a4
Compare
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |


Description
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 12 published compound indexes (
avatar,banner,data-list,empty-state,entity,item,panel,profile,radio,section,segmented-control,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