Skip to content

Commit 9e58a57

Browse files
committed
Merge branch 'main' into ss/DOCS-10983
2 parents 5932883 + 88e3b64 commit 9e58a57

File tree

159 files changed

+2280
-827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+2280
-827
lines changed

.changeset/brave-apples-sign.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/client-trust-state.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/eleven-phones-say.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
File renamed without changes.

.changeset/ripe-banks-pay.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@clerk/clerk-js': minor
3+
'@clerk/types': minor
4+
---
5+
6+
[Experimental] Add support for modal SSO sign-ins to new APIs
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/shared': patch
3+
---
4+
5+
Add email codes as an option to `PrepareSecondFactorParams`

.changeset/tricky-badgers-post.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.typedoc/custom-plugin.mjs

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,20 +119,50 @@ function getRelativeLinkReplacements() {
119119
function getCatchAllReplacements() {
120120
return [
121121
{
122-
pattern: /\(setActiveParams\)/g,
123-
replace: '([setActiveParams](/docs/reference/javascript/types/set-active-params))',
122+
pattern: /(?<![\[\w`])`Appearance`\\<`Theme`\\>/g,
123+
replace: '[`Appearance<Theme>`](/docs/guides/customizing-clerk/appearance-prop/overview)',
124+
},
125+
{
126+
pattern: /\(CreateOrganizationParams\)/g,
127+
replace: '([CreateOrganizationParams](#create-organization-params))',
124128
},
125129
{
126130
pattern: /`LoadedClerk`/g,
127131
replace: '[Clerk](/docs/reference/javascript/clerk)',
128132
},
129133
{
130-
pattern: /\(CreateOrganizationParams\)/g,
131-
replace: '([CreateOrganizationParams](#create-organization-params))',
134+
pattern: /(?<![\[\w`])`?LocalizationResource`?(?![\]\w`])/g,
135+
replace: '[`LocalizationResource`](/docs/guides/customizing-clerk/localization)',
136+
},
137+
{
138+
// SessionResource appears in plain text, with an array next to it, with backticks, etc.
139+
// e.g. `SessionResource[]`
140+
pattern: /(?<![`[\]])\bSessionResource(\[\])?\b(?![\]\)`])/g,
141+
replace: '[`SessionResource`](/docs/reference/javascript/session)$1',
142+
},
143+
{
144+
pattern: /(?<![\[\w`])`?SessionStatusClaim`?(?![\]\w`])/g,
145+
replace: '[`SessionStatusClaim`](/docs/reference/javascript/types/session-status)',
132146
},
133147
{
134-
pattern: /\| `SignInResource` \|/,
135-
replace: '| [SignInResource](/docs/reference/javascript/sign-in) |',
148+
pattern: /(?<![`[\]])\bSetActiveParams\b(?![\]\(])/g,
149+
replace: '[SetActiveParams](/docs/reference/javascript/types/set-active-params)',
150+
},
151+
{
152+
pattern: /(?<![\[\w`])`?SignInResource`?(?![\]\w`])/g,
153+
replace: '[`SignInResource`](/docs/reference/javascript/sign-in)',
154+
},
155+
{
156+
pattern: /(?<![\[\w`])`?SignedInSessionResource`?(?![\]\w`])/g,
157+
replace: '[`SignedInSessionResource`](/docs/reference/javascript/session)',
158+
},
159+
{
160+
pattern: /(?<![\[\w`])`?SignUpResource`?(?![\]\w`])/g,
161+
replace: '[`SignUpResource`](/docs/reference/javascript/sign-up)',
162+
},
163+
{
164+
pattern: /(?<![\[\w`])`?OrganizationResource`?(?![\]\w`])/g,
165+
replace: '[`OrganizationResource`](/docs/reference/javascript/organization)',
136166
},
137167
{
138168
pattern: /`OrganizationPrivateMetadata`/g,
@@ -163,6 +193,10 @@ function getCatchAllReplacements() {
163193
replace:
164194
'[`OrganizationMembershipPublicMetadata`](/docs/reference/javascript/types/metadata#organization-membership-public-metadata)',
165195
},
196+
{
197+
pattern: /(?<![\[\w`])`?UserResource`?(?![\]\w`])/g,
198+
replace: '[`UserResource`](/docs/reference/javascript/user)',
199+
},
166200
{
167201
/**
168202
* By default, `@deprecated` is output with `**Deprecated**`. We want to add a full stop to it.

eslint.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ export default tseslint.config([
367367
},
368368
},
369369
{
370-
name: 'packages/clerk-js - vitest',
371-
files: ['packages/clerk-js/src/**/*.test.{ts,tsx}'],
370+
name: 'packages - vitest',
371+
files: ['packages/*/src/**/*.test.{ts,tsx}'],
372372
rules: {
373373
'jest/unbound-method': 'off',
374374
'@typescript-eslint/unbound-method': 'off',
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
'use client';
2+
import { usePlans, useSubscription, useStatements } from '@clerk/nextjs/experimental';
3+
4+
export default function Home() {
5+
const { data: plans, count: planCount } = usePlans();
6+
const { data: subscription } = useSubscription();
7+
const { data: statements, count: statementCount } = useStatements();
8+
return (
9+
<main>
10+
{plans?.map(plan => (
11+
<div key={plan.id}>
12+
<h2>Plan: {plan.name}</h2>
13+
<p>{plan.description}</p>
14+
</div>
15+
))}
16+
17+
{planCount > 0 ? <p>Plans found</p> : <p>No plans found</p>}
18+
19+
{statements?.map(statement => (
20+
<div key={statement.id}>
21+
<p>Statement total: {statement.totals.grandTotal.amountFormatted}</p>
22+
</div>
23+
))}
24+
25+
{statementCount > 0 ? <p>Statements found</p> : <p>No statements found</p>}
26+
27+
{subscription ? (
28+
<div>
29+
<h2>Subscribed to {subscription.subscriptionItems[0].plan.name}</h2>
30+
</div>
31+
) : (
32+
<p>No subscription found</p>
33+
)}
34+
</main>
35+
);
36+
}

0 commit comments

Comments
 (0)