diff --git a/.changeset/tame-donuts-shake.md b/.changeset/tame-donuts-shake.md new file mode 100644 index 00000000000..a10461d753e --- /dev/null +++ b/.changeset/tame-donuts-shake.md @@ -0,0 +1,6 @@ +--- +'@clerk/astro': patch +'@clerk/vue': patch +--- + +Fix the `appearance` option rejecting valid properties such as `theme`, `variables`, and `elements` with a "does not exist in type `Appearance`" TypeScript error. This also affects `@clerk/nuxt`, which derives its module options from `@clerk/vue`. diff --git a/packages/astro/src/types.ts b/packages/astro/src/types.ts index 57e482c4010..c6c563a68da 100644 --- a/packages/astro/src/types.ts +++ b/packages/astro/src/types.ts @@ -9,10 +9,10 @@ import type { Without, } from '@clerk/shared/types'; import type { ClerkUIConstructor } from '@clerk/shared/ui'; -import type { Appearance, Ui } from '@clerk/ui/internal'; +import type { Appearance, ExtractAppearanceType, Ui } from '@clerk/ui/internal'; type AstroClerkUpdateOptions = Pick & { - appearance?: Appearance; + appearance?: ExtractAppearanceType; }; type AstroClerkIntegrationParams = Without< @@ -29,7 +29,7 @@ type AstroClerkIntegrationParams = Without< | 'appearance' > & MultiDomainAndOrProxyPrimitives & { - appearance?: Appearance; + appearance?: ExtractAppearanceType; /** * Controls prefetching of the `@clerk/ui` script. * - `false` - Skip prefetching the UI (for custom UIs using Control Components) diff --git a/packages/vue/src/plugin.ts b/packages/vue/src/plugin.ts index 7c6ff11109e..698c6eef1d5 100644 --- a/packages/vue/src/plugin.ts +++ b/packages/vue/src/plugin.ts @@ -13,7 +13,7 @@ import type { Without, } from '@clerk/shared/types'; import type { ClerkUIConstructor } from '@clerk/shared/ui'; -import type { Appearance, Ui } from '@clerk/ui/internal'; +import type { Appearance, ExtractAppearanceType, Ui } from '@clerk/ui/internal'; import type { Plugin } from 'vue'; import { computed, ref, shallowRef, triggerRef } from 'vue'; @@ -30,7 +30,7 @@ export type PluginOptions = Without< > & MultiDomainAndOrProxy & { initialState?: InitialState; - appearance?: Appearance; + appearance?: ExtractAppearanceType; /** * An object to use the bundled Clerk UI instead of loading from CDN. * Import `ui` from `@clerk/ui` and pass it here to bundle the UI with your application. diff --git a/packages/vue/src/utils/updateClerkOptions.ts b/packages/vue/src/utils/updateClerkOptions.ts index 998f9e58bf0..22a629f4d06 100644 --- a/packages/vue/src/utils/updateClerkOptions.ts +++ b/packages/vue/src/utils/updateClerkOptions.ts @@ -1,8 +1,8 @@ import type { ClerkOptions } from '@clerk/shared/types'; -import type { Appearance, Ui } from '@clerk/ui/internal'; +import type { Appearance, ExtractAppearanceType, Ui } from '@clerk/ui/internal'; type ClerkUpdateOptions = Pick & { - appearance?: Appearance; + appearance?: ExtractAppearanceType; }; /**