-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into alexcarpenter/input-primitive-placeholder-color
- Loading branch information
Showing
134 changed files
with
2,421 additions
and
1,163 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
'@clerk/elements': minor | ||
'@clerk/shared': minor | ||
'@clerk/astro': minor | ||
'@clerk/clerk-react': minor | ||
'@clerk/types': minor | ||
'@clerk/clerk-expo': minor | ||
'@clerk/vue': minor | ||
--- | ||
|
||
Surface new `pending` session as a signed-in state |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clerk/clerk-js': patch | ||
--- | ||
|
||
Bug fix: Broadcast a sign out event to all opened tabs when `Clerk.signOut()` or `User.delete()` is called. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
'@clerk/agent-toolkit': patch | ||
'@clerk/react-router': patch | ||
'@clerk/astro': patch | ||
'@clerk/nuxt': patch | ||
'@clerk/vue': patch | ||
--- | ||
|
||
The [`exports` map](https://nodejs.org/api/packages.html#conditional-exports) inside `package.json` has been slightly adjusted to allow for [`require(esm)`](https://joyeecheung.github.io/blog/2024/03/18/require-esm-in-node-js/) to work correctly. The `"import"` conditions have been changed to `"default"`. | ||
|
||
You shouldn't see any change in behavior/functionality on your end. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@clerk/clerk-js': patch | ||
'@clerk/types': patch | ||
--- | ||
|
||
Initialize `tasks` on `Session` resource |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
'@clerk/clerk-js': minor | ||
--- | ||
|
||
- Initialize new `pending` session status as an signed-in state | ||
- Deprecate `Clerk.client.activeSessions` in favor of `Clerk.client.signedInSessions` | ||
- Introduce `Clerk.isSignedIn` property as an explicit signed-in state check, instead of `!!Clerk.session` or `!!Clerk.user`: | ||
|
||
```ts | ||
- if (Clerk.user) { | ||
+ if (Clerk.isSignedIn) { | ||
// Mount user button component | ||
document.getElementById('signed-in').innerHTML = ` | ||
<div id="user-button"></div> | ||
` | ||
|
||
const userbuttonDiv = document.getElementById('user-button') | ||
|
||
clerk.mountUserButton(userbuttonDiv) | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"*.{mjs,js,jsx,ts,tsx}": ["pnpm eslint --fix", "pnpm prettier --write"], | ||
"*.{mjs,js,jsx,ts,tsx,vue}": ["pnpm eslint --fix", "pnpm prettier --write"], | ||
"*.{json,md,mdx}": ["pnpm prettier --write"] | ||
} |
This file contains 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
This file contains 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
68 changes: 68 additions & 0 deletions
68
...ation/templates/react-vite/src/custom-user-button/with-dynamic-label-and-custom-pages.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { UserButton } from '@clerk/clerk-react'; | ||
import { PageContextProvider } from '../PageContext.tsx'; | ||
import React from 'react'; | ||
|
||
export default function Page() { | ||
const [open, setIsOpen] = React.useState(false); | ||
const [theme, setTheme] = React.useState('light'); | ||
const [notifications, setNotifications] = React.useState(false); | ||
const [language, setLanguage] = React.useState('en'); | ||
|
||
return ( | ||
<PageContextProvider> | ||
<UserButton | ||
fallback={<>Loading user button</>} | ||
userProfileProps={{ appearance: { elements: { modalBackdrop: { zIndex: '100' } } } }} | ||
> | ||
<UserButton.MenuItems> | ||
<UserButton.Action | ||
label={`Chat is ${open ? 'ON' : 'OFF'}`} | ||
labelIcon={<span>🌐</span>} | ||
onClick={() => setIsOpen(!open)} | ||
/> | ||
<UserButton.Action | ||
label={`Theme: ${theme === 'light' ? '☀️ Light' : '🌙 Dark'}`} | ||
labelIcon={<span>🌐</span>} | ||
onClick={() => setTheme(t => (t === 'light' ? 'dark' : 'light'))} | ||
/> | ||
<UserButton.Action | ||
label={`Notifications ${notifications ? '🔔 ON' : '🔕 OFF'}`} | ||
labelIcon={<span>🌐</span>} | ||
onClick={() => setNotifications(n => !n)} | ||
/> | ||
<UserButton.Action | ||
label={`Language: ${language.toUpperCase()}`} | ||
labelIcon={<span>🌍</span>} | ||
onClick={() => setLanguage(l => (l === 'en' ? 'es' : 'en'))} | ||
/> | ||
<UserButton.Action label={'manageAccount'} /> | ||
<UserButton.Action label={'signOut'} /> | ||
<UserButton.Link | ||
href={'http://clerk.com'} | ||
label={'Visit Clerk'} | ||
labelIcon={<span>🌐</span>} | ||
/> | ||
|
||
<UserButton.Link | ||
href={'/user'} | ||
label={'Visit User page'} | ||
labelIcon={<span>🌐</span>} | ||
/> | ||
|
||
<UserButton.Action | ||
label={'Custom Alert'} | ||
labelIcon={<span>🔔</span>} | ||
onClick={() => alert('custom-alert')} | ||
/> | ||
</UserButton.MenuItems> | ||
<UserButton.UserProfilePage | ||
label='Notifications Page' | ||
url='notifications' | ||
labelIcon={<span>🔔</span>} | ||
> | ||
<h1 data-page='notifications-page'>Notifications page</h1> | ||
</UserButton.UserProfilePage> | ||
</UserButton> | ||
</PageContextProvider> | ||
); | ||
} |
20 changes: 1 addition & 19 deletions
20
integration/templates/react-vite/src/custom-user-button/with-dynamic-labels.tsx
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.