Skip to content

Commit 20cade3

Browse files
committed
feat: export more components and helpers
1 parent 482a925 commit 20cade3

File tree

5 files changed

+43
-11
lines changed

5 files changed

+43
-11
lines changed

packages/auth/Auth.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
>
99
<SocialAuth
1010
v-if="isSignView"
11-
:appearance="appearance"
1211
:supabaseClient="supabaseClient"
12+
:appearance="appearance"
1313
:providers="providers"
1414
:providerScopes="providerScopes"
1515
:queryParams="queryParams"
@@ -21,7 +21,7 @@
2121
<template v-if="!onlyThirdPartyProviders">
2222
<EmailAuth
2323
v-if="authView === 'sign_in' || authView === 'sign_up'"
24-
:supabase-client="supabaseClient"
24+
:supabaseClient="supabaseClient"
2525
:appearance="appearance"
2626
:redirectTo="redirectTo"
2727
:magicLink="magicLink"
@@ -31,7 +31,7 @@
3131
/>
3232
<MagicLink
3333
v-if="authView === 'magic_link'"
34-
:supabase-client="supabaseClient"
34+
:supabaseClient="supabaseClient"
3535
:appearance="appearance"
3636
:redirectTo="redirectTo"
3737
:showLinks="showLinks"
@@ -42,21 +42,21 @@
4242
<template v-else>
4343
<ForgottenPassword
4444
v-if="authView === 'forgotten_password'"
45-
:supabase-client="supabaseClient"
45+
:supabaseClient="supabaseClient"
4646
:appearance="appearance"
4747
:redirectTo="redirectTo"
4848
:showLinks="showLinks"
4949
:i18n="i18n"
5050
/>
5151
<UpdatePassword
5252
v-if="authView === 'update_password'"
53-
:supabase-client="supabaseClient"
53+
:supabaseClient="supabaseClient"
5454
:appearance="appearance"
5555
:i18n="i18n"
5656
/>
5757
<VerifyOtp
5858
v-if="authView === 'verify_otp'"
59-
:supabase-client="supabaseClient"
59+
:supabaseClient="supabaseClient"
6060
:appearance="appearance"
6161
:otpType="otpType"
6262
:i18n="i18n"

packages/component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
export { default as Auth } from './auth/Auth.vue'
2+
export { default as ForgottenPassword } from './auth/ForgottenPassword.vue'
3+
export { default as UpdatePassword } from './auth/UpdatePassword.vue'
4+
export { default as MagicLink } from './auth/MagicLink.vue'
25
export {
36
default as UserContextProvider,
47
useSupabaseUser

packages/index.ts

+24-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
import type { Plugin } from 'vue'
2-
import { Auth, UserContextProvider, useSupabaseUser } from './component'
2+
import {
3+
Auth,
4+
ForgottenPassword,
5+
UpdatePassword,
6+
MagicLink,
7+
UserContextProvider,
8+
useSupabaseUser
9+
} from './component'
10+
import { injectStrict } from './utils'
11+
import type {
12+
UserContextProviderInjection,
13+
UserContextProviderKey
14+
} from './types'
315

4-
export { Auth, UserContextProvider, useSupabaseUser }
16+
export {
17+
Auth,
18+
ForgottenPassword,
19+
UpdatePassword,
20+
MagicLink,
21+
injectStrict,
22+
UserContextProvider,
23+
useSupabaseUser,
24+
UserContextProviderInjection,
25+
UserContextProviderKey
26+
}
527

628
const plugin: Plugin = {
729
install(app) {

src/App.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
}
5757
}
5858
}"
59-
:supabase-client="supabaseClient"
59+
:supabaseClient="supabaseClient"
6060
:view="view.id"
6161
:providers="['github', 'google', 'twitter']"
6262
:socialLayout="socialLayout"
@@ -73,7 +73,7 @@
7373
</section>
7474
<section class="col-span-12 md:col-span-5 lg:col-span-6">
7575
<div class="container mx-auto max-w-full sm:max-w-2xl relative">
76-
<UserContextProvider :supabase-client="supabaseClient">
76+
<UserContextProvider :supabaseClient="supabaseClient">
7777
<Hero />
7878
</UserContextProvider>
7979

volar.d.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
// Auto generated component declarations
2-
declare module 'vue' {
2+
import '@vue/runtime-core'
3+
4+
declare module '@vue/runtime-core' {
35
export interface GlobalComponents {
46
Auth: typeof import('@nuxtbase/auth-ui-vue')['Auth']
7+
ForgottenPassword: typeof import('@nuxtbase/auth-ui-vue')['ForgottenPassword']
8+
UpdatePassword: typeof import('@nuxtbase/auth-ui-vue')['UpdatePassword']
9+
MagicLink: typeof import('@nuxtbase/auth-ui-vue')['MagicLink']
10+
UserContextProvider: typeof import('@nuxtbase/auth-ui-vue')['UserContextProvider']
511
}
612
}
13+
714
export {}

0 commit comments

Comments
 (0)