diff --git a/README.md b/README.md index 3c50dbf33..d06d03686 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,35 @@ To get started, make sure that the [`firebase`](https://www.npmjs.com/package/fi npm install firebase ``` -Once installed, setup Firebase in your project ensuring you have configured your Firebase instance via `initializeApp`: +### Framework-specific Installation + +Packages have been created for both `React` and `Angular`. + +
+ React + +```bash +npm install @firebase-oss/ui-react @firebase-oss/ui-core @firebase-oss/ui-styles @firebase-oss/ui-translations +``` + +
+ +
+ Angular + +FirebaseUI for Angular depends on the [AngularFire](https://github.com/angular/angularfire) package: + +```bash +npm install @angular/fire @firebase-oss/ui-angular @firebase-oss/ui-core @firebase-oss/ui-styles @firebase-oss/ui-translations +``` + +
+ +## Getting Started + +FirebaseUI requires that your Firebase app is setup following the [Getting Started with Firebase](https://firebase.google.com/docs/web/setup) flow for Web: + +### Initialization ```ts import { initializeApp } from 'firebase/app'; @@ -41,22 +69,33 @@ import { initializeApp } from 'firebase/app'; const app = initializeApp({ ... }); ``` -Next, follow the framework specific installation steps, for either React, Shadcn or Angular: +Next, setup and configure FirebaseUI, import the `initializeUI` function from `@firebase-oss/ui-core`: + +```ts +import { initializeUI } from "@firebase-oss/ui-core"; + +const ui = initializeUI(); +``` + +> To learn more about configuring FirebaseUI, view the [configuration](#configuration) section. + +### Framework Setup
React - Install the `@invertase/firebaseui-react` package: + Install the `@firebase-oss/ui-react` package: - ```bash - npm install @invertase/firebaseui-react - ``` +```tsx +import { initializeApp } from 'firebase/app'; +import { initializeUI } from "@firebase-oss/ui-core"; +import { ConfigProvider } from '@firebase-oss/ui-react'; Alongside your Firebase configuration, import the `initializeUI` function and pass your configured Firebase App instance: ```ts import { initializeApp } from 'firebase/app'; - import { initializeUI } from '@invertase/firebaseui-core'; + import { initializeUI } from '@firebase-oss/ui-core'; const app = initializeApp({ ... }); @@ -68,7 +107,7 @@ Next, follow the framework specific installation steps, for either React, Shadcn Once configured, provide the `ui` instance to your application by wrapping it within the `FirebaseUIProvider` component: ```tsx - import { FirebaseUIProvider } from '@invertase/firebaseui-react'; + import { FirebaseUIProvider } from '@firebase-oss/ui-react'; function App() { return ( @@ -82,15 +121,15 @@ Next, follow the framework specific installation steps, for either React, Shadcn Ensure your application includes the bundled styles for Firebase UI (see [styling](#styling) for additional info). ```css - @import "@invertase/firebaseui-styles/dist.min.css"; + @import "@firebase-oss/ui-styles/dist.min.css"; /* Or for tailwind users */ - @import "@invertase/firebaseui-styles/tailwind"; + @import "@firebase-oss/ui-styles/tailwind"; ``` That's it 🎉 You can now import components and start building: ```tsx - import { SignInAuthScreen } from '@invertase/firebaseui-react'; + import { SignInAuthScreen } from '@firebase-oss/ui-react'; export function MySignInPage() { return ( @@ -133,7 +172,7 @@ Next, follow the framework specific installation steps, for either React, Shadcn ```ts import { initializeApp } from 'firebase/app'; - import { initializeUI } from '@invertase/firebaseui-core'; + import { initializeUI } from '@firebase-oss/ui-core'; const app = initializeApp({ ... }); @@ -145,7 +184,7 @@ Next, follow the framework specific installation steps, for either React, Shadcn Once configured, provide the `ui` instance to your application by wrapping it within the `FirebaseUIProvider` component: ```tsx - import { FirebaseUIProvider } from '@invertase/firebaseui-react'; + import { FirebaseUIProvider } from '@firebase-oss/ui-react'; function App() { return ( @@ -179,17 +218,21 @@ Next, follow the framework specific installation steps, for either React, Shadcn The Angular project requires that [AngularFire](https://github.com/angular/angularfire) is setup and configured before using Firebase UI. - Once you have provided the Firebase App instance to your application using `provideFirebaseApp`, install the Firebase UI for Angular package: +```tsx +import { provideFirebaseApp, initializeApp } from '@angular/fire/app'; +import { provideAuth, getAuth } from '@angular/fire/auth'; +import { provideFirebaseUI } from '@firebase-oss/ui-angular'; +import { initializeUI } from '@firebase-oss/ui-core'; ```bash - npm install @invertase/firebaseui-angular + npm install @firebase-oss/ui-angular ``` Alongside your existing providers, add the `provideFirebaseUI` provider, returning a new Firebase UI instance via `initializeUI`: ```ts import { provideFirebaseApp, initializeApp } from '@angular/fire/app'; - import { initializeUI } from '@invertase/firebaseui-core'; + import { initializeUI } from '@firebase-oss/ui-core'; export const appConfig: ApplicationConfig = { providers: [ @@ -202,16 +245,16 @@ Next, follow the framework specific installation steps, for either React, Shadcn Ensure your application includes the bundled styles for Firebase UI (see [styling](#styling) for additional info). ```css - @import "@invertase/firebaseui-styles/dist.min.css"; + @import "@firebase-oss/ui-styles/dist.min.css"; /* Or for tailwind users */ - @import "@invertase/firebaseui-styles/tailwind"; + @import "@firebase-oss/ui-styles/tailwind"; ``` That's it 🎉 You can now import components and start building: ```tsx import { Component } from "@angular/core"; - import { SignInAuthScreenComponent } from "@invertase/firebaseui-angular"; + import { SignInAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "sign-in-route", @@ -236,48 +279,104 @@ Next, follow the framework specific installation steps, for either React, Shadcn Firebase UI provides out-of-the-box styling via CSS, and provides means to customize the UI to align with your existing application or guidelines. -> Note: if you are using Shadcn this section does not apply. All styles are inherited from your Shadcn configuration. +If you are using [TailwindCSS](https://tailwindcss.com/), import the base CSS from the `@firebase-oss/ui-styles` package after your Tailwind import: + +```css +@import "tailwindcss"; +@import "@firebase-oss/ui-styles/tailwind"; +``` + +### Via CDN + +```css +@import "@firebase-oss/ui-styles"; +``` -Ensure your application imports the Firebase UI CSS file. This can be handled a number of ways depending on your setup: +### Theming -### CSS Bundling +### Authentication Components -If your bundler supports importing CSS files from node_modules: +FirebaseUI provides a number of opinionated components designed to drop into your application which handle common user flows, such as signing in or registration. -Via JS: +### Sign-in -```ts -import '@invertase/firebaseui-styles/dist.min.css'; +Allows users to sign in with an email and password: + +
+ React + +```tsx +import { SignInAuthScreen } from "@firebase-oss/ui-react"; + +function App() { + return ; +} ``` -Via CSS: +Props: `onForgotPasswordClick` / `onRegisterClick` -```css -@import "@invertase/firebaseui-styles/dist.min.css"; +Additionally, allow the user to sign in with an OAuth provider by providing children: + +```tsx +import { SignInAuthScreen, GoogleSignInButton } from "@firebase-oss/ui-react"; + +function App() { + return ( + + + + ); +} ``` -### Tailwind +
-If you are using [Tailwind CSS](https://tailwindcss.com/), add the Tailwind specific CSS file: +
+ Angular -```css -@import "tailwindcss"; -@import "@invertase/firebaseui-styles/tailwind"; +```tsx +import { SignUpAuthScreenComponent } from "@firebase-oss/ui-angular"; + +@Component({ + selector: "app-root", + imports: [SignUpAuthScreenComponent], + template: ``, +}) +export class AppComponent {} ``` -### Via CDN +
+ +## Configuration + +The initializeUI function accepts an options object that allows you to customize FirebaseUI’s behavior. -If none of these options apply, include the CSS file via a CDN: +### Type Definition -```html - - - +```js +type FirebaseUIOptions = { + app: FirebaseApp; + auth?: Auth; + locale?: Locale; + behaviors?: Behavior[]; +}; ``` -### Theming +**App**: The initialized Firebase app instance. This is required. + +**Locale**: Optional locale string to override the default language (e.g., 'en', 'fr', 'es'). + +**Translations**: Add or override translation strings for labels, prompts, and errors. + +**Behaviors**: Customize UI behavior such as automatic sign-in or error handling. + +**RecaptchaMode**:Set the reCAPTCHA mode for phone auth (default is 'normal'). -Out of the box, Firebase UI provides a neutral light and dark theme with some opinionated styling (colors, border radii etc). These are all controlled via CSS variables, allowing you to update these at will to match any existing UI design guidelines. To modify the variables, override the following CSS variables: +## Theming + +FirebaseUI provides a basic default theme out of the box, however the theme can be customized to match your application's design. + +The package uses CSS Variables, which can be overridden in your application's CSS. Below is a list of all available variables: ```css :root { @@ -310,10 +409,211 @@ Out of the box, Firebase UI provides a neutral light and dark theme with some op Out of the box, Firebase UI applies sensible default behaviors for how the UI should handle specific scenarios which may occur during user flows. You can however customize this behavior by modifying your `initializeUI` to provide an array of "behaviors", for example: -```ts -import { requireDisplayName } from '@invertase/firebaseui-core'; +`@firebase-oss/ui-core` is a framework-agnostic layer that manages the complete lifecycle of Firebase Authentication flows. It exposes a reactive store via nanostores that can be wrapped and adapted into any JavaScript framework such as React, Angular, Vue, Svelte, or SolidJS to name a few. + +### What FirebaseUI Core Provides + +- Manages Firebase Authentication flows (sign-in, sign-out, linking, etc.) + +- Reactive UI state via [nanostores](https://github.com/nanostores/nanostores) + +- Form schemas using [Zod](https://zod.dev/) + +- Pluggable behaviors (e.g. autoAnonymousLogin) + +- i18n and translations + +- Error parsing and localization + +#### Initialize the Core + +Call initializeUI() with your Firebase app and configuration options: + +```js +import { initializeUI } from '@firebase-oss/ui-core'; const ui = initializeUI({ + app: firebaseApp, + .. +}); +``` + +Configuration Type: + +```js +type FirebaseUIOptions = { + app: FirebaseApp; + locale?: Locale | undefined; + translations?: RegisteredTranslations[] | undefined; + behaviors?: Partial>[] | undefined; + recaptchaMode?: 'normal' | 'invisible' | undefined; +}; +``` + +#### Firebase Authentication Flows + +**signInWithEmailAndPassword**: Signs in the user based on an email/password credential. + +- _ui_: FirebaseUI +- _email_: string +- _password_: string + +**createUserWithEmailAndPassword**: Creates a user account based on an email/password credential. + +- _ui_: FirebaseUI +- _email_: string +- _password_: string + +**signInWithPhoneNumber**: Signs in the user based on a provided phone number, using ReCaptcha to verify the sign-in. + +- _ui_: FirebaseUI +- _phoneNumber_: string +- _recaptchaVerifier_: string + +**confirmPhoneNumber**: Verifies the phonenumber credential and signs in the user. + +- _ui_: FirebaseUI +- _confirmationResult_: [ConfirmationResult](https://firebase.google.com/docs/reference/node/firebase.auth.ConfirmationResult) +- _verificationCode_: string + +**sendPasswordResetEmail**: Sends password reset instructions to an email account. + +- _ui_: FirebaseUI +- _email_: string + +**sendSignInLinkToEmail**: Send an sign-in links to an email account. + +- _ui_: FirebaseUI +- _email_: string + +**signInWithEmailLink**: Signs in with the user with the email link. If `autoUpgradeAnonymousCredential` then a pending credential will be handled. + +- _ui_: FirebaseUI +- _email_: string +- _link_: string + +**signInAnonymously**: Signs in as an anonymous user. + +- _ui_: FirebaseUI + +**signInWithOAuth**: Signs in with a provider such as Google via a redirect link. If `autoUpgradeAnonymousCredential` then the account will upgraded. + +- _ui_: FirebaseUI +- _provider_: [AuthProvider](https://firebase.google.com/docs/reference/node/firebase.auth.AuthProvider) + +**completeEmailLinkSignIn**: Completes the signing process based on a user signing in with an email link. + +- _ui_: FirebaseUI +- _currentUrl_: string + +#### Provide a Store via Context + +Using the returned `FirebaseUI`, it is reccomended to use local context/providers/dependency-injection to expose the FirebaseUI to the application. Here is an example context wrapper which accepts the configuration as a `ui` parameter: + +```js +/** Creates a framework-agnostic context for Firebase UI configuration **/ +export function createFirebaseUIContext(initialConfig) { + let config = initialConfig; + const subscribers = new Set(); + + return { + /** Retrieve current config **/ + getConfig() { + return config; + }, + + /** Update config and notify subscribers **/ + setConfig(newConfig) { + config = newConfig; + subscribers.forEach((callback) => callback(config)); + }, + + /** Subscribe to config changes (for use in any framework) **/ + subscribe(callback) { + subscribers.add(callback); + /** Optionally call immediately with current config**/ + callback(config); + return () => subscribers.delete(callback); + }, + }; +} +``` + +FirebaseUI Configuration Type: + +```js +export type FirebaseUI = { + app: FirebaseApp, + getAuth: () => Auth, + setLocale: (locale: Locale) => void, + state: FirebaseUIState, + setState: (state: FirebaseUIState) => void, + locale: Locale, + translations: TranslationsConfig, + behaviors: Partial>, + recaptchaMode: "normal" | "invisible", +}; +``` + +Through this approach, you can now achieve global access to the FirebaseUI methods and state. + +#### State Management + +FirebaseUI Core provides built-in state management to track the current step in the authentication flow. This can be used to drive UI transitions, control rendering, or show progress indicators. + +##### Available States + +```js +type FirebaseUIState = + | "loading" + | "idle" + | "signing-in" + | "signing-out" + | "linking" + | "creating-user" + | "sending-password-reset-email" + | "sending-sign-in-link-to-email"; +``` + +These represent the current phase of the user experience — such as waiting for input, submitting credentials, or linking accounts. + +##### Updating State Manually + +The core module automatically updates state based on auth activity, but you can also override it manually if needed: + +```js +/** Set the UI state to "idle" **/ +ui.setState("idle"); +``` + +##### Reading State in Your App + +In a component, you can access the current state through the FirebaseUI configuration: + +```js +/** Sample: Framework-agnostic UI state management **/ + +/** Create a simple UI state store with an initial state **/ +const uiStore = createUIStateStore({ state: "idle" }); + +uiStore.subscribe((ui) => { + /** Replace `showSpinner` and `showMainApp` with your actual rendering logic **/ + if (ui.state === "signing-in") { + showSpinner(); + } else { + showMainApp(); + } +}); +``` + +### Translations (i18n) + +You can pass one or more translations to support localized strings. + +```js +import { english } from "@firebase-oss/ui-translations"; + +initializeUI({ app, behaviors: [ requireDisplayName(), @@ -326,7 +626,7 @@ const ui = initializeUI({ The `autoAnonymousLogin` behavior will automatically sign users in via [anonymous authentication](https://firebase.google.com/docs/auth/web/anonymous-auth) when initialized. Whilst authenticating, the Firebase UI state will be set to "loading", allowing you to block the loading of the application if you wish. ```ts -import { autoAnonymousLogin } from '@invertase/firebaseui-core'; +import { autoAnonymousLogin } from '@firebase-oss/ui-core'; const ui = initializeUI({ app, @@ -339,7 +639,7 @@ const ui = initializeUI({ The `autoUpgradeAnonymousUsers` behavior will automatically upgrade a user who is anonymously authenticated with your application upon a successful sign in (including OAuth). You can optionally provide a callback to handle an upgrade (such as merging account data). During the async callback, the UI will stay in a pending state. ```ts -import { autoUpgradeAnonymousUsers } from '@invertase/firebaseui-core'; +import { autoUpgradeAnonymousUsers } from '@firebase-oss/ui-core'; const ui = initializeUI({ app, @@ -358,7 +658,7 @@ The `recaptchaVerification` behavior allows you to customize how the [reCAPTCHA By default, the reCAPTCHA UI will be rendered in "invisible" mode. To override this: ```ts -import { recaptchaVerification } from '@invertase/firebaseui-core'; +import { recaptchaVerification } from '@firebase-oss/ui-core'; const ui = initializeUI({ app, @@ -374,7 +674,7 @@ const ui = initializeUI({ The `providerRedirectStrategy` behavior redirects any external provider authentication (e.g. OAuth) via a redirect flow. ```ts -import { providerRedirectStrategy } from '@invertase/firebaseui-core'; +import { providerRedirectStrategy } from '@firebase-oss/ui-core'; const ui = initializeUI({ app, @@ -387,7 +687,7 @@ const ui = initializeUI({ The `providerPopupStrategy` behavior causes any external provider authentication (e.g. OAuth) to be handled via a popup window. This is the default strategy. ```ts -import { providerPopupStrategy } from '@invertase/firebaseui-core'; +import { providerPopupStrategy } from '@firebase-oss/ui-core'; const ui = initializeUI({ app, @@ -404,7 +704,7 @@ Note: This behavior requires that Google Sign In is enabled as an authentication The One Tap popup can be additionally configured via this behavior: ```ts -import { oneTapSignIn } from '@invertase/firebaseui-core'; +import { oneTapSignIn } from '@firebase-oss/ui-core'; const ui = initializeUI({ app, @@ -425,7 +725,7 @@ The `requireDisplayName` behavior configures Firebase UI to display a required " If you are not using pre-built components, the `createUserWithEmailAndPassword` function from Firebase UI will throw if a display name is not provided. ```ts -import { requireDisplayName } from '@invertase/firebaseui-core'; +import { requireDisplayName } from '@firebase-oss/ui-core'; const ui = initializeUI({ app, @@ -438,7 +738,7 @@ const ui = initializeUI({ The `countryCodes` behavior controls how country codes are consumed throughout your application, for example during Phone Authentication flows when selecting a phone numbers country code. ```ts -import { countryCodes } from '@invertase/firebaseui-core'; +import { countryCodes } from '@firebase-oss/ui-core'; const ui = initializeUI({ app, @@ -453,10 +753,10 @@ const ui = initializeUI({ > Note: Firebase UI currently only provides English (en-US) translations out of the box. -Firebase UI provides a mechanism for overriding any localized strings in the UI components. To define your own custom locale, use the `registerLocale` function from the `@invertase/firebaseui-translations` package: +Firebase UI provides a mechanism for overriding any localized strings in the UI components. To define your own custom locale, use the `registerLocale` function from the `@firebase-oss/ui-translations` package: ```ts -import { registerLocale } from '@invertase/firebaseui-translations'; +import { registerLocale } from '@firebase-oss/ui-translations'; const frFr = registerLocale('fr-FR', { labels: { @@ -467,11 +767,10 @@ const frFr = registerLocale('fr-FR', { To use this locale, provide it to the `initializeUI` configuration: -```ts -const ui = initializeUI({ - app, - locale: frFr, -}); +```js +import { getTranslation } from "@firebase-oss/ui-core"; + +const message = getTranslation(config, "errors", "unknownError"); ``` ### Dynamic translations @@ -486,9 +785,19 @@ const ui = initializeUI({ ... - +#### Available Schemas + +**createEmailFormSchema(translations?)** +Validates a sign-in or sign-up form using email and password. + +- _email_: Must be a valid email address. + +- _password_: Must be at least 8 characters. + +```js +import { createEmailFormSchema } from "@firebase-oss/ui-core"; + +const schema = createEmailFormSchema(translations); ``` ### Fallback @@ -498,7 +807,7 @@ By default, any missing translations will fallback to English if not specified. ## Reference
- @invertase/firebaseui-core + @firebase-oss/ui-core **`initializeUI`** @@ -947,7 +1256,7 @@ By default, any missing translations will fallback to English if not specified.
- @invertase/firebaseui-react + @firebase-oss/ui-react **`FirebaseUIProvider`** @@ -1567,7 +1876,7 @@ By default, any missing translations will fallback to English if not specified.
- @invertase/firebaseui-angular + @firebase-oss/ui-angular **`provideFirebaseUI`** @@ -2044,8 +2353,8 @@ Forms are less opinionated, and only contain the relevant logic required to func Every supported platform follows this principle, thus you can easily swap out a Screen for a Form if required. For example with React: ```diff -- import { SignInAuthScreen } from '@invertase/firebaseui-react'; -+ import { SignInAuthForm } from '@invertase/firebaseui-react'; +- import { SignInAuthScreen } from '@firebase-oss/ui-react'; ++ import { SignInAuthForm } from '@firebase-oss/ui-react'; ``` ## Building your own UI @@ -2076,12 +2385,12 @@ The reactive store allows you to easily add states to your application, such as ### Core package -The `@invertase/firebaseui-core` exports functionality which is directly tied to Firebase UI. Some of these functions mimic the Firebase JS SDK (with added benefits), whereas others are specifically for Firebase UI. +The `@firebase-oss/ui-core` exports functionality which is directly tied to Firebase UI. Some of these functions mimic the Firebase JS SDK (with added benefits), whereas others are specifically for Firebase UI. For example, let's use the `signInWithEmailAndPassword` function: ```ts -import { signInWithEmailAndPassword } from '@invertase/firebaseui-core'; +import { signInWithEmailAndPassword } from '@firebase-oss/ui-core'; await signInWithEmailAndPassword(ui.get(), 'test@test.com', '123456'); ``` @@ -2123,7 +2432,7 @@ supporting SAML or OIDC, you can achive this by extending the OAuth component: ```tsx import { OAuthProvider } from 'firebase/auth'; - import { OAuthButton } from '@invertase/firebaseui-react'; + import { OAuthButton } from '@firebase-oss/ui-react'; function MyProviderButton() { // Get the provider ID from the Firebase Console @@ -2145,7 +2454,7 @@ supporting SAML or OIDC, you can achive this by extending the OAuth component: import { Component } from '@angular/core'; import { CommonModule } from '@angular/common'; import { OAuthProvider, UserCredential } from '@angular/fire/auth'; - import { OAuthButtonComponent } from '@invertase/firebaseui-angular'; + import { OAuthButtonComponent } from '@firebase-oss/ui-angular'; @Component({ selector: 'app-my-provider-button', diff --git a/examples/angular/package.json b/examples/angular/package.json index 9b12ae8df..890177853 100644 --- a/examples/angular/package.json +++ b/examples/angular/package.json @@ -32,10 +32,10 @@ "@angular/platform-server": "^20.2.2", "@angular/router": "^20.2.2", "@angular/ssr": "^20.2.2", - "@invertase/firebaseui-angular": "workspace:*", - "@invertase/firebaseui-core": "workspace:*", - "@invertase/firebaseui-styles": "workspace:*", - "@invertase/firebaseui-translations": "workspace:*", + "@firebase-oss/ui-angular": "workspace:*", + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-styles": "workspace:*", + "@firebase-oss/ui-translations": "workspace:*", "@tailwindcss/postcss": "^4.0.6", "express": "^4.18.2", "postcss": "^8.5.2", diff --git a/examples/angular/src/app/app.component.ts b/examples/angular/src/app/app.component.ts index acd98aab5..070de3ebe 100644 --- a/examples/angular/src/app/app.component.ts +++ b/examples/angular/src/app/app.component.ts @@ -21,8 +21,8 @@ import { Auth, multiFactor, sendEmailVerification, signOut, type User } from "@a import { routes } from "./routes"; import { ThemeToggleComponent } from "./components/theme-toggle/theme-toggle.component"; import { PirateToggleComponent } from "./components/pirate-toggle/pirate-toggle.component"; -import { MultiFactorAuthAssertionScreenComponent } from "@invertase/firebaseui-angular"; -import { injectUI } from "@invertase/firebaseui-angular"; +import { MultiFactorAuthAssertionScreenComponent } from "@firebase-oss/ui-angular"; +import { injectUI } from "@firebase-oss/ui-angular"; @Component({ selector: "app-unauthenticated", diff --git a/examples/angular/src/app/app.config.ts b/examples/angular/src/app/app.config.ts index 689e78ee3..69676139b 100644 --- a/examples/angular/src/app/app.config.ts +++ b/examples/angular/src/app/app.config.ts @@ -22,8 +22,8 @@ import { provideClientHydration, withEventReplay } from "@angular/platform-brows import { provideFirebaseApp, initializeApp } from "@angular/fire/app"; import { provideAuth, getAuth, connectAuthEmulator } from "@angular/fire/auth"; -import { provideFirebaseUI, provideFirebaseUIPolicies } from "@invertase/firebaseui-angular"; -import { initializeUI } from "@invertase/firebaseui-core"; +import { provideFirebaseUI, provideFirebaseUIPolicies } from "@firebase-oss/ui-angular"; +import { initializeUI } from "@firebase-oss/ui-core"; const firebaseConfig = { apiKey: "AIzaSyCvMftIUCD9lUQ3BzIrimfSfBbCUQYZf-I", diff --git a/examples/angular/src/app/auth/email-link-oauth/email-link-oauth.component.ts b/examples/angular/src/app/auth/email-link-oauth/email-link-oauth.component.ts index 8e0459e96..860612b3f 100644 --- a/examples/angular/src/app/auth/email-link-oauth/email-link-oauth.component.ts +++ b/examples/angular/src/app/auth/email-link-oauth/email-link-oauth.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { EmailLinkAuthScreenComponent, GoogleSignInButtonComponent } from "@invertase/firebaseui-angular"; +import { EmailLinkAuthScreenComponent, GoogleSignInButtonComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-email-link-oauth", diff --git a/examples/angular/src/app/auth/email-link/email-link.component.ts b/examples/angular/src/app/auth/email-link/email-link.component.ts index 25b458c74..a8a8d1362 100644 --- a/examples/angular/src/app/auth/email-link/email-link.component.ts +++ b/examples/angular/src/app/auth/email-link/email-link.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { EmailLinkAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { EmailLinkAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-email-link", diff --git a/examples/angular/src/app/auth/forgot-password/forgot-password.component.ts b/examples/angular/src/app/auth/forgot-password/forgot-password.component.ts index 96cbb297d..0ec35c40e 100644 --- a/examples/angular/src/app/auth/forgot-password/forgot-password.component.ts +++ b/examples/angular/src/app/auth/forgot-password/forgot-password.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { ForgotPasswordAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { ForgotPasswordAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-forgot-password", diff --git a/examples/angular/src/app/auth/oauth/oauth.component.ts b/examples/angular/src/app/auth/oauth/oauth.component.ts index cb70269e6..c4c72f6ad 100644 --- a/examples/angular/src/app/auth/oauth/oauth.component.ts +++ b/examples/angular/src/app/auth/oauth/oauth.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { OAuthScreenComponent, GoogleSignInButtonComponent } from "@invertase/firebaseui-angular"; +import { OAuthScreenComponent, GoogleSignInButtonComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-oauth", diff --git a/examples/angular/src/app/auth/phone-oauth/phone-oauth.component.ts b/examples/angular/src/app/auth/phone-oauth/phone-oauth.component.ts index fd6fb821f..61d0d14af 100644 --- a/examples/angular/src/app/auth/phone-oauth/phone-oauth.component.ts +++ b/examples/angular/src/app/auth/phone-oauth/phone-oauth.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { PhoneAuthScreenComponent, GoogleSignInButtonComponent } from "@invertase/firebaseui-angular"; +import { PhoneAuthScreenComponent, GoogleSignInButtonComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-phone-oauth", diff --git a/examples/angular/src/app/auth/phone/phone-screen.component.ts b/examples/angular/src/app/auth/phone/phone-screen.component.ts index fbe2f3f44..207dbf782 100644 --- a/examples/angular/src/app/auth/phone/phone-screen.component.ts +++ b/examples/angular/src/app/auth/phone/phone-screen.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { PhoneAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { PhoneAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-phone", diff --git a/examples/angular/src/app/auth/register/register.component.ts b/examples/angular/src/app/auth/register/register.component.ts index 947fd0594..979c9301d 100644 --- a/examples/angular/src/app/auth/register/register.component.ts +++ b/examples/angular/src/app/auth/register/register.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { SignUpAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { SignUpAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-register", diff --git a/examples/angular/src/app/auth/sign-in-oauth/sign-in-oauth.component.ts b/examples/angular/src/app/auth/sign-in-oauth/sign-in-oauth.component.ts index 2347ca24f..24415807d 100644 --- a/examples/angular/src/app/auth/sign-in-oauth/sign-in-oauth.component.ts +++ b/examples/angular/src/app/auth/sign-in-oauth/sign-in-oauth.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { SignInAuthScreenComponent, GoogleSignInButtonComponent } from "@invertase/firebaseui-angular"; +import { SignInAuthScreenComponent, GoogleSignInButtonComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-sign-in-oauth", diff --git a/examples/angular/src/app/auth/sign-in/sign-in.component.ts b/examples/angular/src/app/auth/sign-in/sign-in.component.ts index cb3c7af51..4fcd3dcb1 100644 --- a/examples/angular/src/app/auth/sign-in/sign-in.component.ts +++ b/examples/angular/src/app/auth/sign-in/sign-in.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { SignInAuthScreenComponent, GoogleSignInButtonComponent } from "@invertase/firebaseui-angular"; +import { SignInAuthScreenComponent, GoogleSignInButtonComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-sign-in", diff --git a/examples/angular/src/app/auth/sign-up-oauth/sign-up-oauth.component.ts b/examples/angular/src/app/auth/sign-up-oauth/sign-up-oauth.component.ts index 1ab32d402..c6ffe88c5 100644 --- a/examples/angular/src/app/auth/sign-up-oauth/sign-up-oauth.component.ts +++ b/examples/angular/src/app/auth/sign-up-oauth/sign-up-oauth.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { SignUpAuthScreenComponent, GoogleSignInButtonComponent } from "@invertase/firebaseui-angular"; +import { SignUpAuthScreenComponent, GoogleSignInButtonComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-sign-up-oauth", diff --git a/examples/angular/src/app/auth/sign-up/sign-up.component.ts b/examples/angular/src/app/auth/sign-up/sign-up.component.ts index e309166cc..fa5cfc01a 100644 --- a/examples/angular/src/app/auth/sign-up/sign-up.component.ts +++ b/examples/angular/src/app/auth/sign-up/sign-up.component.ts @@ -18,7 +18,7 @@ import { Component, type OnInit, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router, RouterModule } from "@angular/router"; import { Auth, type User, authState } from "@angular/fire/auth"; -import { SignUpAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { SignUpAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-sign-up", diff --git a/examples/angular/src/app/components/pirate-toggle/pirate-toggle.component.ts b/examples/angular/src/app/components/pirate-toggle/pirate-toggle.component.ts index 77401b370..c82590659 100644 --- a/examples/angular/src/app/components/pirate-toggle/pirate-toggle.component.ts +++ b/examples/angular/src/app/components/pirate-toggle/pirate-toggle.component.ts @@ -16,8 +16,8 @@ import { Component, computed } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { injectUI } from "@invertase/firebaseui-angular"; -import { enUs } from "@invertase/firebaseui-translations"; +import { injectUI } from "@firebase-oss/ui-angular"; +import { enUs } from "@firebase-oss/ui-translations"; import { pirate } from "../../pirate"; @Component({ diff --git a/examples/angular/src/app/pirate.ts b/examples/angular/src/app/pirate.ts index aa92433ce..5ae42e88c 100644 --- a/examples/angular/src/app/pirate.ts +++ b/examples/angular/src/app/pirate.ts @@ -1,4 +1,4 @@ -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; export const pirate = registerLocale("pirate", { errors: { diff --git a/examples/angular/src/app/screens/email-link-auth-screen-w-oauth.ts b/examples/angular/src/app/screens/email-link-auth-screen-w-oauth.ts index 8fb5c0263..4bbae4c52 100644 --- a/examples/angular/src/app/screens/email-link-auth-screen-w-oauth.ts +++ b/examples/angular/src/app/screens/email-link-auth-screen-w-oauth.ts @@ -16,7 +16,7 @@ import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { EmailLinkAuthScreenComponent, GoogleSignInButtonComponent } from "@invertase/firebaseui-angular"; +import { EmailLinkAuthScreenComponent, GoogleSignInButtonComponent } from "@firebase-oss/ui-angular"; import { Router } from "@angular/router"; @Component({ diff --git a/examples/angular/src/app/screens/email-link-auth-screen.ts b/examples/angular/src/app/screens/email-link-auth-screen.ts index 3a702d5d5..72102fc2e 100644 --- a/examples/angular/src/app/screens/email-link-auth-screen.ts +++ b/examples/angular/src/app/screens/email-link-auth-screen.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { EmailLinkAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { Component, inject } from "@angular/core"; import { Router } from "@angular/router"; +import { EmailLinkAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-email-link-auth-screen", diff --git a/examples/angular/src/app/screens/forgot-password-auth-screen-w-handlers.ts b/examples/angular/src/app/screens/forgot-password-auth-screen-w-handlers.ts index e8c09a3ca..ab598b09f 100644 --- a/examples/angular/src/app/screens/forgot-password-auth-screen-w-handlers.ts +++ b/examples/angular/src/app/screens/forgot-password-auth-screen-w-handlers.ts @@ -17,7 +17,7 @@ import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router } from "@angular/router"; -import { ForgotPasswordAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { ForgotPasswordAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-forgot-password-auth-screen-w-handlers", diff --git a/examples/angular/src/app/screens/forgot-password-auth-screen.ts b/examples/angular/src/app/screens/forgot-password-auth-screen.ts index ceb20bc35..b217eac55 100644 --- a/examples/angular/src/app/screens/forgot-password-auth-screen.ts +++ b/examples/angular/src/app/screens/forgot-password-auth-screen.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { Component } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { ForgotPasswordAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { Component } from "@angular/core"; +import { ForgotPasswordAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-forgot-password-auth-screen", diff --git a/examples/angular/src/app/screens/mfa-enrollment-screen.ts b/examples/angular/src/app/screens/mfa-enrollment-screen.ts index 4e7c7fd8e..3baf78232 100644 --- a/examples/angular/src/app/screens/mfa-enrollment-screen.ts +++ b/examples/angular/src/app/screens/mfa-enrollment-screen.ts @@ -17,7 +17,7 @@ import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router } from "@angular/router"; -import { MultiFactorAuthEnrollmentScreenComponent } from "@invertase/firebaseui-angular"; +import { MultiFactorAuthEnrollmentScreenComponent } from "@firebase-oss/ui-angular"; import { FactorId } from "firebase/auth"; @Component({ diff --git a/examples/angular/src/app/screens/oauth-screen.ts b/examples/angular/src/app/screens/oauth-screen.ts index 1424a5e70..ea336b40f 100644 --- a/examples/angular/src/app/screens/oauth-screen.ts +++ b/examples/angular/src/app/screens/oauth-screen.ts @@ -24,7 +24,7 @@ import { GitHubSignInButtonComponent, MicrosoftSignInButtonComponent, TwitterSignInButtonComponent, -} from "@invertase/firebaseui-angular"; +} from "@firebase-oss/ui-angular"; import { Router } from "@angular/router"; @Component({ diff --git a/examples/angular/src/app/screens/phone-auth-screen-w-oauth.ts b/examples/angular/src/app/screens/phone-auth-screen-w-oauth.ts index f5e50ef68..9893f7065 100644 --- a/examples/angular/src/app/screens/phone-auth-screen-w-oauth.ts +++ b/examples/angular/src/app/screens/phone-auth-screen-w-oauth.ts @@ -16,7 +16,7 @@ import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { PhoneAuthScreenComponent, GoogleSignInButtonComponent, ContentComponent } from "@invertase/firebaseui-angular"; +import { PhoneAuthScreenComponent, GoogleSignInButtonComponent, ContentComponent } from "@firebase-oss/ui-angular"; import { Router } from "@angular/router"; @Component({ diff --git a/examples/angular/src/app/screens/phone-auth-screen.ts b/examples/angular/src/app/screens/phone-auth-screen.ts index e0ff32d21..a99b58804 100644 --- a/examples/angular/src/app/screens/phone-auth-screen.ts +++ b/examples/angular/src/app/screens/phone-auth-screen.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { PhoneAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { Component, inject } from "@angular/core"; import { Router } from "@angular/router"; +import { PhoneAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-phone-auth-screen", diff --git a/examples/angular/src/app/screens/sign-in-auth-screen-w-handlers.ts b/examples/angular/src/app/screens/sign-in-auth-screen-w-handlers.ts index 063c52c62..3c40fce39 100644 --- a/examples/angular/src/app/screens/sign-in-auth-screen-w-handlers.ts +++ b/examples/angular/src/app/screens/sign-in-auth-screen-w-handlers.ts @@ -17,7 +17,7 @@ import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router } from "@angular/router"; -import { SignInAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { SignInAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-sign-in-auth-screen-w-handlers", diff --git a/examples/angular/src/app/screens/sign-in-auth-screen-w-oauth.ts b/examples/angular/src/app/screens/sign-in-auth-screen-w-oauth.ts index 56cf346ba..79878116d 100644 --- a/examples/angular/src/app/screens/sign-in-auth-screen-w-oauth.ts +++ b/examples/angular/src/app/screens/sign-in-auth-screen-w-oauth.ts @@ -25,7 +25,7 @@ import { GitHubSignInButtonComponent, MicrosoftSignInButtonComponent, TwitterSignInButtonComponent, -} from "@invertase/firebaseui-angular"; +} from "@firebase-oss/ui-angular"; import { Router } from "@angular/router"; @Component({ diff --git a/examples/angular/src/app/screens/sign-in-auth-screen.ts b/examples/angular/src/app/screens/sign-in-auth-screen.ts index b87cee771..e587e9afd 100644 --- a/examples/angular/src/app/screens/sign-in-auth-screen.ts +++ b/examples/angular/src/app/screens/sign-in-auth-screen.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { SignInAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { Component, inject } from "@angular/core"; import { Router } from "@angular/router"; +import { SignInAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-sign-in-auth-screen", diff --git a/examples/angular/src/app/screens/sign-up-auth-screen-w-handlers.ts b/examples/angular/src/app/screens/sign-up-auth-screen-w-handlers.ts index f3b0b73d9..8f67c4d22 100644 --- a/examples/angular/src/app/screens/sign-up-auth-screen-w-handlers.ts +++ b/examples/angular/src/app/screens/sign-up-auth-screen-w-handlers.ts @@ -17,7 +17,7 @@ import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; import { Router } from "@angular/router"; -import { SignUpAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { SignUpAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-sign-up-auth-screen-w-handlers", diff --git a/examples/angular/src/app/screens/sign-up-auth-screen-w-oauth.ts b/examples/angular/src/app/screens/sign-up-auth-screen-w-oauth.ts index 450120e07..5c5a54c78 100644 --- a/examples/angular/src/app/screens/sign-up-auth-screen-w-oauth.ts +++ b/examples/angular/src/app/screens/sign-up-auth-screen-w-oauth.ts @@ -25,7 +25,7 @@ import { GitHubSignInButtonComponent, MicrosoftSignInButtonComponent, TwitterSignInButtonComponent, -} from "@invertase/firebaseui-angular"; +} from "@firebase-oss/ui-angular"; import { Router } from "@angular/router"; @Component({ diff --git a/examples/angular/src/app/screens/sign-up-auth-screen.ts b/examples/angular/src/app/screens/sign-up-auth-screen.ts index d235c6800..6fb555e97 100644 --- a/examples/angular/src/app/screens/sign-up-auth-screen.ts +++ b/examples/angular/src/app/screens/sign-up-auth-screen.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { Component, inject } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { SignUpAuthScreenComponent } from "@invertase/firebaseui-angular"; +import { Component, inject } from "@angular/core"; import { Router } from "@angular/router"; +import { SignUpAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-sign-up-auth-screen", diff --git a/examples/angular/src/styles.css b/examples/angular/src/styles.css index c0f242db4..fd82282d9 100644 --- a/examples/angular/src/styles.css +++ b/examples/angular/src/styles.css @@ -16,5 +16,4 @@ /* You can add global styles to this file, and also import other style files */ @import "tailwindcss"; -@custom-variant dark (&:where(.dark, .dark *)); -@import "@invertase/firebaseui-styles/tailwind"; +@import "@firebase-oss/ui-styles/tailwind"; diff --git a/examples/nextjs-ssr/app/forgot-password/screen.tsx b/examples/nextjs-ssr/app/forgot-password/screen.tsx index acda21245..a20390637 100644 --- a/examples/nextjs-ssr/app/forgot-password/screen.tsx +++ b/examples/nextjs-ssr/app/forgot-password/screen.tsx @@ -16,7 +16,7 @@ "use client"; -import { ForgotPasswordAuthScreen } from "@invertase/firebaseui-react"; +import { ForgotPasswordAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; export default function Screen() { diff --git a/examples/nextjs-ssr/app/register/screen.tsx b/examples/nextjs-ssr/app/register/screen.tsx index d53d41292..2db8405de 100644 --- a/examples/nextjs-ssr/app/register/screen.tsx +++ b/examples/nextjs-ssr/app/register/screen.tsx @@ -17,7 +17,7 @@ "use client"; import { useUser } from "@/lib/firebase/hooks"; -import { GoogleSignInButton, SignUpAuthScreen } from "@invertase/firebaseui-react"; +import { GoogleSignInButton, SignUpAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; diff --git a/examples/nextjs-ssr/app/screens/email-link-auth-screen-w-oauth/page.tsx b/examples/nextjs-ssr/app/screens/email-link-auth-screen-w-oauth/page.tsx index 97cb74e0d..347ab36b0 100644 --- a/examples/nextjs-ssr/app/screens/email-link-auth-screen-w-oauth/page.tsx +++ b/examples/nextjs-ssr/app/screens/email-link-auth-screen-w-oauth/page.tsx @@ -25,7 +25,7 @@ import { MicrosoftSignInButton, TwitterSignInButton, OAuthButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { OAuthProvider } from "firebase/auth"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs-ssr/app/screens/email-link-auth-screen/page.tsx b/examples/nextjs-ssr/app/screens/email-link-auth-screen/page.tsx index 532261734..76855f684 100644 --- a/examples/nextjs-ssr/app/screens/email-link-auth-screen/page.tsx +++ b/examples/nextjs-ssr/app/screens/email-link-auth-screen/page.tsx @@ -16,8 +16,59 @@ "use client"; -import { EmailLinkAuthScreen } from "@invertase/firebaseui-react"; +import { + AppleSignInButton, + EmailLinkAuthScreen, + FacebookSignInButton, + GitHubSignInButton, + GoogleSignInButton, + MicrosoftSignInButton, + OAuthButton, + TwitterSignInButton, +} from "@firebase-oss/ui-react"; +import { OAuthProvider } from "firebase/auth"; +import { useRouter } from "next/navigation"; -export default function EmailLinkAuthScreenPage() { - return ; +export default function EmailLinkAuthScreenWithOAuthPage() { + const router = useRouter(); + + return ( + { + alert("Email has been sent - please check your email"); + }} + onSignIn={(credential) => { + console.log(credential); + router.push("/"); + }} + > + + + + + + + + + ); +} + +function LineSignInButton() { + const provider = new OAuthProvider("oidc.line"); + + return ( + + + + + + Sign in with Line + + ); } diff --git a/examples/nextjs-ssr/app/screens/forgot-password-auth-screen/page.tsx b/examples/nextjs-ssr/app/screens/forgot-password-auth-screen/page.tsx index d0cd87312..42c96c90b 100644 --- a/examples/nextjs-ssr/app/screens/forgot-password-auth-screen/page.tsx +++ b/examples/nextjs-ssr/app/screens/forgot-password-auth-screen/page.tsx @@ -17,7 +17,7 @@ "use client"; -import { ForgotPasswordAuthScreen } from "@invertase/firebaseui-react"; +import { ForgotPasswordAuthScreen } from "@firebase-oss/ui-react"; export default function ForgotPasswordAuthScreenPage() { return {}} />; diff --git a/examples/nextjs-ssr/app/screens/oauth-screen/page.tsx b/examples/nextjs-ssr/app/screens/oauth-screen/page.tsx index 04049a4f5..34f58d72a 100644 --- a/examples/nextjs-ssr/app/screens/oauth-screen/page.tsx +++ b/examples/nextjs-ssr/app/screens/oauth-screen/page.tsx @@ -27,7 +27,7 @@ import { MicrosoftSignInButton, OAuthScreen, TwitterSignInButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; export default function OAuthScreenPage() { const [themed, setThemed] = useState(false); diff --git a/examples/nextjs-ssr/app/screens/password-reset-screen/page.tsx b/examples/nextjs-ssr/app/screens/password-reset-screen/page.tsx index d400ee5f8..8b63cd9a6 100644 --- a/examples/nextjs-ssr/app/screens/password-reset-screen/page.tsx +++ b/examples/nextjs-ssr/app/screens/password-reset-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { ForgotPasswordAuthScreen } from "@invertase/firebaseui-react"; +import { ForgotPasswordAuthScreen } from "@firebase-oss/ui-react"; export default function PasswordResetScreenPage() { return {}} />; diff --git a/examples/nextjs-ssr/app/screens/phone-auth-screen-w-oauth/page.tsx b/examples/nextjs-ssr/app/screens/phone-auth-screen-w-oauth/page.tsx index 5a0f3ff6a..490184d5d 100644 --- a/examples/nextjs-ssr/app/screens/phone-auth-screen-w-oauth/page.tsx +++ b/examples/nextjs-ssr/app/screens/phone-auth-screen-w-oauth/page.tsx @@ -25,7 +25,7 @@ import { TwitterSignInButton, MicrosoftSignInButton, OAuthButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { OAuthProvider } from "firebase/auth"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs-ssr/app/screens/phone-auth-screen/page.tsx b/examples/nextjs-ssr/app/screens/phone-auth-screen/page.tsx index 980cb9362..b4b6f9722 100644 --- a/examples/nextjs-ssr/app/screens/phone-auth-screen/page.tsx +++ b/examples/nextjs-ssr/app/screens/phone-auth-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { PhoneAuthScreen } from "@invertase/firebaseui-react"; +import { PhoneAuthScreen } from "@firebase-oss/ui-react"; export default function PhoneAuthScreenPage() { return ; diff --git a/examples/nextjs-ssr/app/screens/sign-in-auth-screen-w-handlers/page.tsx b/examples/nextjs-ssr/app/screens/sign-in-auth-screen-w-handlers/page.tsx index d457b7ad8..d5c825393 100644 --- a/examples/nextjs-ssr/app/screens/sign-in-auth-screen-w-handlers/page.tsx +++ b/examples/nextjs-ssr/app/screens/sign-in-auth-screen-w-handlers/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignInAuthScreen } from "@invertase/firebaseui-react"; +import { SignInAuthScreen } from "@firebase-oss/ui-react"; export default function SignInAuthScreenWithHandlersPage() { return ( diff --git a/examples/nextjs-ssr/app/screens/sign-in-auth-screen-w-oauth/page.tsx b/examples/nextjs-ssr/app/screens/sign-in-auth-screen-w-oauth/page.tsx index 94f26ce41..012b088ab 100644 --- a/examples/nextjs-ssr/app/screens/sign-in-auth-screen-w-oauth/page.tsx +++ b/examples/nextjs-ssr/app/screens/sign-in-auth-screen-w-oauth/page.tsx @@ -25,7 +25,7 @@ import { MicrosoftSignInButton, TwitterSignInButton, OAuthButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { OAuthProvider } from "firebase/auth"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs-ssr/app/screens/sign-in-auth-screen/page.tsx b/examples/nextjs-ssr/app/screens/sign-in-auth-screen/page.tsx index 9952a1f3a..e52d68cc6 100644 --- a/examples/nextjs-ssr/app/screens/sign-in-auth-screen/page.tsx +++ b/examples/nextjs-ssr/app/screens/sign-in-auth-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignInAuthScreen } from "@invertase/firebaseui-react"; +import { SignInAuthScreen } from "@firebase-oss/ui-react"; export default function SignInAuthScreenPage() { return ; diff --git a/examples/nextjs-ssr/app/screens/sign-up-auth-screen-w-handlers/page.tsx b/examples/nextjs-ssr/app/screens/sign-up-auth-screen-w-handlers/page.tsx index eed16bfc9..1126fec43 100644 --- a/examples/nextjs-ssr/app/screens/sign-up-auth-screen-w-handlers/page.tsx +++ b/examples/nextjs-ssr/app/screens/sign-up-auth-screen-w-handlers/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignUpAuthScreen } from "@invertase/firebaseui-react"; +import { SignUpAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; export default function SignUpAuthScreenWithHandlersPage() { diff --git a/examples/nextjs-ssr/app/screens/sign-up-auth-screen-w-oauth/page.tsx b/examples/nextjs-ssr/app/screens/sign-up-auth-screen-w-oauth/page.tsx index 6c8c28749..1d87fd718 100644 --- a/examples/nextjs-ssr/app/screens/sign-up-auth-screen-w-oauth/page.tsx +++ b/examples/nextjs-ssr/app/screens/sign-up-auth-screen-w-oauth/page.tsx @@ -25,7 +25,7 @@ import { TwitterSignInButton, MicrosoftSignInButton, OAuthButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { OAuthProvider } from "firebase/auth"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs-ssr/app/screens/sign-up-auth-screen/page.tsx b/examples/nextjs-ssr/app/screens/sign-up-auth-screen/page.tsx index 04b840189..14197761e 100644 --- a/examples/nextjs-ssr/app/screens/sign-up-auth-screen/page.tsx +++ b/examples/nextjs-ssr/app/screens/sign-up-auth-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignUpAuthScreen } from "@invertase/firebaseui-react"; +import { SignUpAuthScreen } from "@firebase-oss/ui-react"; export default function SignUpAuthScreenPage() { return ; diff --git a/examples/nextjs-ssr/app/sign-in/email/screen.tsx b/examples/nextjs-ssr/app/sign-in/email/screen.tsx index 3251fe345..8a2ed796f 100644 --- a/examples/nextjs-ssr/app/sign-in/email/screen.tsx +++ b/examples/nextjs-ssr/app/sign-in/email/screen.tsx @@ -17,7 +17,7 @@ "use client"; import { useUser } from "@/lib/firebase/hooks"; -import { EmailLinkAuthScreen } from "@invertase/firebaseui-react"; +import { EmailLinkAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; diff --git a/examples/nextjs-ssr/app/sign-in/phone/screen.tsx b/examples/nextjs-ssr/app/sign-in/phone/screen.tsx index 6e7cfd2bf..24c586c27 100644 --- a/examples/nextjs-ssr/app/sign-in/phone/screen.tsx +++ b/examples/nextjs-ssr/app/sign-in/phone/screen.tsx @@ -17,7 +17,7 @@ "use client"; import { useUser } from "@/lib/firebase/hooks"; -import { PhoneAuthScreen } from "@invertase/firebaseui-react"; +import { PhoneAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; diff --git a/examples/nextjs-ssr/app/sign-in/screen.tsx b/examples/nextjs-ssr/app/sign-in/screen.tsx index 3d304b91c..8d5e5871d 100644 --- a/examples/nextjs-ssr/app/sign-in/screen.tsx +++ b/examples/nextjs-ssr/app/sign-in/screen.tsx @@ -17,7 +17,7 @@ "use client"; import { useUser } from "@/lib/firebase/hooks"; -import { GoogleSignInButton, SignInAuthScreen } from "@invertase/firebaseui-react"; +import { GoogleSignInButton, SignInAuthScreen } from "@firebase-oss/ui-react"; import Link from "next/link"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs-ssr/app/unauthenticated-app.tsx b/examples/nextjs-ssr/app/unauthenticated-app.tsx index 0a61c76e5..d52148add 100644 --- a/examples/nextjs-ssr/app/unauthenticated-app.tsx +++ b/examples/nextjs-ssr/app/unauthenticated-app.tsx @@ -16,7 +16,7 @@ "use client"; -import { MultiFactorAuthAssertionScreen, useUI } from "@invertase/firebaseui-react"; +import { MultiFactorAuthAssertionScreen, useUI } from "@firebase-oss/ui-react"; import { routes } from "@/lib/routes"; import Link from "next/link"; diff --git a/examples/nextjs-ssr/lib/components/pirate-toggle.tsx b/examples/nextjs-ssr/lib/components/pirate-toggle.tsx index d4b48e583..a89eb2996 100644 --- a/examples/nextjs-ssr/lib/components/pirate-toggle.tsx +++ b/examples/nextjs-ssr/lib/components/pirate-toggle.tsx @@ -16,8 +16,8 @@ "use client"; -import { useUI } from "@invertase/firebaseui-react"; -import { enUs } from "@invertase/firebaseui-translations"; +import { useUI } from "@firebase-oss/ui-react"; +import { enUs } from "@firebase-oss/ui-translations"; import { pirate } from "../pirate"; export function PirateToggle() { diff --git a/examples/nextjs-ssr/lib/firebase/clientApp.ts b/examples/nextjs-ssr/lib/firebase/clientApp.ts index 447415d82..2564bfd85 100644 --- a/examples/nextjs-ssr/lib/firebase/clientApp.ts +++ b/examples/nextjs-ssr/lib/firebase/clientApp.ts @@ -19,7 +19,7 @@ import { initializeApp, getApps } from "firebase/app"; import { firebaseConfig } from "./config"; import { connectAuthEmulator, getAuth } from "firebase/auth"; -import { autoAnonymousLogin, initializeUI } from "@invertase/firebaseui-core"; +import { autoAnonymousLogin, initializeUI } from "@firebase-oss/ui-core"; export const firebaseApp = getApps().length === 0 ? initializeApp(firebaseConfig) : getApps()[0]; diff --git a/examples/nextjs-ssr/lib/firebase/ui.tsx b/examples/nextjs-ssr/lib/firebase/ui.tsx index 93b5b1aef..b7ed1e597 100644 --- a/examples/nextjs-ssr/lib/firebase/ui.tsx +++ b/examples/nextjs-ssr/lib/firebase/ui.tsx @@ -17,7 +17,7 @@ "use client"; import { ui } from "@/lib/firebase/clientApp"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; export function FirebaseUIProviderHoc({ children }: { children: React.ReactNode }) { return ( diff --git a/examples/nextjs-ssr/lib/pirate.ts b/examples/nextjs-ssr/lib/pirate.ts index aa92433ce..5ae42e88c 100644 --- a/examples/nextjs-ssr/lib/pirate.ts +++ b/examples/nextjs-ssr/lib/pirate.ts @@ -1,4 +1,4 @@ -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; export const pirate = registerLocale("pirate", { errors: { diff --git a/examples/nextjs-ssr/package.json b/examples/nextjs-ssr/package.json index 6fad1510d..3fbf63325 100644 --- a/examples/nextjs-ssr/package.json +++ b/examples/nextjs-ssr/package.json @@ -13,10 +13,10 @@ "deploy": "pnpm run build && firebase deploy --only hosting:fir-ui-rework-nextjs-ssr" }, "dependencies": { - "@invertase/firebaseui-react": "latest", - "@invertase/firebaseui-core": "latest", - "@invertase/firebaseui-styles": "latest", - "@invertase/firebaseui-translations": "latest", + "@firebase-oss/ui-react": "workspace:*", + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-styles": "workspace:*", + "@firebase-oss/ui-translations": "workspace:*", "firebase": "^11.10.0", "next": "15.1.7", "react": "19.1.1", diff --git a/examples/nextjs/app/forgot-password/screen.tsx b/examples/nextjs/app/forgot-password/screen.tsx index acda21245..a20390637 100644 --- a/examples/nextjs/app/forgot-password/screen.tsx +++ b/examples/nextjs/app/forgot-password/screen.tsx @@ -16,7 +16,7 @@ "use client"; -import { ForgotPasswordAuthScreen } from "@invertase/firebaseui-react"; +import { ForgotPasswordAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; export default function Screen() { diff --git a/examples/nextjs/app/globals.css b/examples/nextjs/app/globals.css index 1fda7fe64..873a37029 100644 --- a/examples/nextjs/app/globals.css +++ b/examples/nextjs/app/globals.css @@ -15,6 +15,7 @@ */ @import "tailwindcss"; + @custom-variant dark (&:where(.dark, .dark *)); @import "@invertase/firebaseui-styles/tailwind"; @@ -33,7 +34,6 @@ html.theme-loaded body { --color-primary-hover: --alpha(var(--line-primary) / 85%); --color-primary-surface: #FFFFFF; --color-border: var(--line-primary); -} -/* @import "@invertase/firebaseui-styles/themes/dark.css"; */ -/* @import "@invertase/firebaseui-styles/themes/brutalist.css"; */ +/* @import "@firebase-oss/ui-styles/src/themes/dark.css"; */ +/* @import "@firebase-oss/ui-styles/src/themes/brutalist.css"; */ diff --git a/examples/nextjs/app/page.tsx b/examples/nextjs/app/page.tsx index 69ede49ac..f5a3d2f88 100644 --- a/examples/nextjs/app/page.tsx +++ b/examples/nextjs/app/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { MultiFactorAuthAssertionScreen, useUI } from "@invertase/firebaseui-react"; +import { MultiFactorAuthAssertionScreen, useUI } from "@firebase-oss/ui-react"; import { multiFactor, sendEmailVerification, signOut } from "firebase/auth"; import { useRouter } from "next/navigation"; import { useUser } from "@/lib/firebase/hooks"; diff --git a/examples/nextjs/app/register/screen.tsx b/examples/nextjs/app/register/screen.tsx index d53d41292..2db8405de 100644 --- a/examples/nextjs/app/register/screen.tsx +++ b/examples/nextjs/app/register/screen.tsx @@ -17,7 +17,7 @@ "use client"; import { useUser } from "@/lib/firebase/hooks"; -import { GoogleSignInButton, SignUpAuthScreen } from "@invertase/firebaseui-react"; +import { GoogleSignInButton, SignUpAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; diff --git a/examples/nextjs/app/screens/email-link-auth-screen-w-oauth/page.tsx b/examples/nextjs/app/screens/email-link-auth-screen-w-oauth/page.tsx index 97cb74e0d..4a2e720d7 100644 --- a/examples/nextjs/app/screens/email-link-auth-screen-w-oauth/page.tsx +++ b/examples/nextjs/app/screens/email-link-auth-screen-w-oauth/page.tsx @@ -15,7 +15,6 @@ */ "use client"; - import { AppleSignInButton, EmailLinkAuthScreen, @@ -23,9 +22,9 @@ import { GitHubSignInButton, GoogleSignInButton, MicrosoftSignInButton, - TwitterSignInButton, OAuthButton, -} from "@invertase/firebaseui-react"; + TwitterSignInButton, +} from "@firebase-oss/ui-react"; import { OAuthProvider } from "firebase/auth"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs/app/screens/email-link-auth-screen/page.tsx b/examples/nextjs/app/screens/email-link-auth-screen/page.tsx index 532261734..01e92ade6 100644 --- a/examples/nextjs/app/screens/email-link-auth-screen/page.tsx +++ b/examples/nextjs/app/screens/email-link-auth-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { EmailLinkAuthScreen } from "@invertase/firebaseui-react"; +import { EmailLinkAuthScreen } from "@firebase-oss/ui-react"; export default function EmailLinkAuthScreenPage() { return ; diff --git a/examples/nextjs/app/screens/forgot-password-auth-screen/page.tsx b/examples/nextjs/app/screens/forgot-password-auth-screen/page.tsx index d0cd87312..42c96c90b 100644 --- a/examples/nextjs/app/screens/forgot-password-auth-screen/page.tsx +++ b/examples/nextjs/app/screens/forgot-password-auth-screen/page.tsx @@ -17,7 +17,7 @@ "use client"; -import { ForgotPasswordAuthScreen } from "@invertase/firebaseui-react"; +import { ForgotPasswordAuthScreen } from "@firebase-oss/ui-react"; export default function ForgotPasswordAuthScreenPage() { return {}} />; diff --git a/examples/nextjs/app/screens/oauth-screen/page.tsx b/examples/nextjs/app/screens/oauth-screen/page.tsx index 04049a4f5..30e47ccd9 100644 --- a/examples/nextjs/app/screens/oauth-screen/page.tsx +++ b/examples/nextjs/app/screens/oauth-screen/page.tsx @@ -16,18 +16,18 @@ "use client"; -import { useState } from "react"; -import { OAuthProvider } from "firebase/auth"; import { - OAuthButton, - FacebookSignInButton, AppleSignInButton, + FacebookSignInButton, GitHubSignInButton, GoogleSignInButton, MicrosoftSignInButton, + OAuthButton, OAuthScreen, TwitterSignInButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; +import { OAuthProvider } from "firebase/auth"; +import { useState } from "react"; export default function OAuthScreenPage() { const [themed, setThemed] = useState(false); diff --git a/examples/nextjs/app/screens/password-reset-screen/page.tsx b/examples/nextjs/app/screens/password-reset-screen/page.tsx index d400ee5f8..8b63cd9a6 100644 --- a/examples/nextjs/app/screens/password-reset-screen/page.tsx +++ b/examples/nextjs/app/screens/password-reset-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { ForgotPasswordAuthScreen } from "@invertase/firebaseui-react"; +import { ForgotPasswordAuthScreen } from "@firebase-oss/ui-react"; export default function PasswordResetScreenPage() { return {}} />; diff --git a/examples/nextjs/app/screens/phone-auth-screen-w-oauth/page.tsx b/examples/nextjs/app/screens/phone-auth-screen-w-oauth/page.tsx index 5a0f3ff6a..255e32194 100644 --- a/examples/nextjs/app/screens/phone-auth-screen-w-oauth/page.tsx +++ b/examples/nextjs/app/screens/phone-auth-screen-w-oauth/page.tsx @@ -17,15 +17,15 @@ "use client"; import { + AppleSignInButton, FacebookSignInButton, GitHubSignInButton, - AppleSignInButton, GoogleSignInButton, - PhoneAuthScreen, - TwitterSignInButton, MicrosoftSignInButton, OAuthButton, -} from "@invertase/firebaseui-react"; + PhoneAuthScreen, + TwitterSignInButton, +} from "@firebase-oss/ui-react"; import { OAuthProvider } from "firebase/auth"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs/app/screens/phone-auth-screen/page.tsx b/examples/nextjs/app/screens/phone-auth-screen/page.tsx index 980cb9362..b4b6f9722 100644 --- a/examples/nextjs/app/screens/phone-auth-screen/page.tsx +++ b/examples/nextjs/app/screens/phone-auth-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { PhoneAuthScreen } from "@invertase/firebaseui-react"; +import { PhoneAuthScreen } from "@firebase-oss/ui-react"; export default function PhoneAuthScreenPage() { return ; diff --git a/examples/nextjs/app/screens/sign-in-auth-screen-w-handlers/page.tsx b/examples/nextjs/app/screens/sign-in-auth-screen-w-handlers/page.tsx index d457b7ad8..d5c825393 100644 --- a/examples/nextjs/app/screens/sign-in-auth-screen-w-handlers/page.tsx +++ b/examples/nextjs/app/screens/sign-in-auth-screen-w-handlers/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignInAuthScreen } from "@invertase/firebaseui-react"; +import { SignInAuthScreen } from "@firebase-oss/ui-react"; export default function SignInAuthScreenWithHandlersPage() { return ( diff --git a/examples/nextjs/app/screens/sign-in-auth-screen-w-oauth/page.tsx b/examples/nextjs/app/screens/sign-in-auth-screen-w-oauth/page.tsx index 94f26ce41..c3c2ee7e7 100644 --- a/examples/nextjs/app/screens/sign-in-auth-screen-w-oauth/page.tsx +++ b/examples/nextjs/app/screens/sign-in-auth-screen-w-oauth/page.tsx @@ -18,14 +18,14 @@ import { AppleSignInButton, - GoogleSignInButton, - SignInAuthScreen, FacebookSignInButton, GitHubSignInButton, + GoogleSignInButton, MicrosoftSignInButton, - TwitterSignInButton, OAuthButton, -} from "@invertase/firebaseui-react"; + SignInAuthScreen, + TwitterSignInButton, +} from "@firebase-oss/ui-react"; import { OAuthProvider } from "firebase/auth"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs/app/screens/sign-in-auth-screen/page.tsx b/examples/nextjs/app/screens/sign-in-auth-screen/page.tsx index 9952a1f3a..e52d68cc6 100644 --- a/examples/nextjs/app/screens/sign-in-auth-screen/page.tsx +++ b/examples/nextjs/app/screens/sign-in-auth-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignInAuthScreen } from "@invertase/firebaseui-react"; +import { SignInAuthScreen } from "@firebase-oss/ui-react"; export default function SignInAuthScreenPage() { return ; diff --git a/examples/nextjs/app/screens/sign-up-auth-screen-w-handlers/page.tsx b/examples/nextjs/app/screens/sign-up-auth-screen-w-handlers/page.tsx index eed16bfc9..1126fec43 100644 --- a/examples/nextjs/app/screens/sign-up-auth-screen-w-handlers/page.tsx +++ b/examples/nextjs/app/screens/sign-up-auth-screen-w-handlers/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignUpAuthScreen } from "@invertase/firebaseui-react"; +import { SignUpAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; export default function SignUpAuthScreenWithHandlersPage() { diff --git a/examples/nextjs/app/screens/sign-up-auth-screen-w-oauth/page.tsx b/examples/nextjs/app/screens/sign-up-auth-screen-w-oauth/page.tsx index 6c8c28749..56f05730d 100644 --- a/examples/nextjs/app/screens/sign-up-auth-screen-w-oauth/page.tsx +++ b/examples/nextjs/app/screens/sign-up-auth-screen-w-oauth/page.tsx @@ -17,15 +17,14 @@ "use client"; import { + AppleSignInButton, FacebookSignInButton, GitHubSignInButton, - AppleSignInButton, GoogleSignInButton, - SignUpAuthScreen, - TwitterSignInButton, MicrosoftSignInButton, OAuthButton, -} from "@invertase/firebaseui-react"; + TwitterSignInButton, +} from "@firebase-oss/ui-react"; import { OAuthProvider } from "firebase/auth"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs/app/screens/sign-up-auth-screen/page.tsx b/examples/nextjs/app/screens/sign-up-auth-screen/page.tsx index 04b840189..14197761e 100644 --- a/examples/nextjs/app/screens/sign-up-auth-screen/page.tsx +++ b/examples/nextjs/app/screens/sign-up-auth-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignUpAuthScreen } from "@invertase/firebaseui-react"; +import { SignUpAuthScreen } from "@firebase-oss/ui-react"; export default function SignUpAuthScreenPage() { return ; diff --git a/examples/nextjs/app/sign-in/email/screen.tsx b/examples/nextjs/app/sign-in/email/screen.tsx index 3251fe345..8a2ed796f 100644 --- a/examples/nextjs/app/sign-in/email/screen.tsx +++ b/examples/nextjs/app/sign-in/email/screen.tsx @@ -17,7 +17,7 @@ "use client"; import { useUser } from "@/lib/firebase/hooks"; -import { EmailLinkAuthScreen } from "@invertase/firebaseui-react"; +import { EmailLinkAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; diff --git a/examples/nextjs/app/sign-in/phone/screen.tsx b/examples/nextjs/app/sign-in/phone/screen.tsx index 6e7cfd2bf..24c586c27 100644 --- a/examples/nextjs/app/sign-in/phone/screen.tsx +++ b/examples/nextjs/app/sign-in/phone/screen.tsx @@ -17,7 +17,7 @@ "use client"; import { useUser } from "@/lib/firebase/hooks"; -import { PhoneAuthScreen } from "@invertase/firebaseui-react"; +import { PhoneAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; diff --git a/examples/nextjs/app/sign-in/screen.tsx b/examples/nextjs/app/sign-in/screen.tsx index 3d304b91c..8d5e5871d 100644 --- a/examples/nextjs/app/sign-in/screen.tsx +++ b/examples/nextjs/app/sign-in/screen.tsx @@ -17,7 +17,7 @@ "use client"; import { useUser } from "@/lib/firebase/hooks"; -import { GoogleSignInButton, SignInAuthScreen } from "@invertase/firebaseui-react"; +import { GoogleSignInButton, SignInAuthScreen } from "@firebase-oss/ui-react"; import Link from "next/link"; import { useRouter } from "next/navigation"; diff --git a/examples/nextjs/lib/components/pirate-toggle.tsx b/examples/nextjs/lib/components/pirate-toggle.tsx index d4b48e583..a89eb2996 100644 --- a/examples/nextjs/lib/components/pirate-toggle.tsx +++ b/examples/nextjs/lib/components/pirate-toggle.tsx @@ -16,8 +16,8 @@ "use client"; -import { useUI } from "@invertase/firebaseui-react"; -import { enUs } from "@invertase/firebaseui-translations"; +import { useUI } from "@firebase-oss/ui-react"; +import { enUs } from "@firebase-oss/ui-translations"; import { pirate } from "../pirate"; export function PirateToggle() { diff --git a/examples/nextjs/lib/firebase/clientApp.ts b/examples/nextjs/lib/firebase/clientApp.ts index 447415d82..2564bfd85 100644 --- a/examples/nextjs/lib/firebase/clientApp.ts +++ b/examples/nextjs/lib/firebase/clientApp.ts @@ -19,7 +19,7 @@ import { initializeApp, getApps } from "firebase/app"; import { firebaseConfig } from "./config"; import { connectAuthEmulator, getAuth } from "firebase/auth"; -import { autoAnonymousLogin, initializeUI } from "@invertase/firebaseui-core"; +import { autoAnonymousLogin, initializeUI } from "@firebase-oss/ui-core"; export const firebaseApp = getApps().length === 0 ? initializeApp(firebaseConfig) : getApps()[0]; diff --git a/examples/nextjs/lib/firebase/ui.tsx b/examples/nextjs/lib/firebase/ui.tsx index 93b5b1aef..b7ed1e597 100644 --- a/examples/nextjs/lib/firebase/ui.tsx +++ b/examples/nextjs/lib/firebase/ui.tsx @@ -17,7 +17,7 @@ "use client"; import { ui } from "@/lib/firebase/clientApp"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; export function FirebaseUIProviderHoc({ children }: { children: React.ReactNode }) { return ( diff --git a/examples/nextjs/lib/pirate.ts b/examples/nextjs/lib/pirate.ts index aa92433ce..5ae42e88c 100644 --- a/examples/nextjs/lib/pirate.ts +++ b/examples/nextjs/lib/pirate.ts @@ -1,4 +1,4 @@ -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; export const pirate = registerLocale("pirate", { errors: { diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index d1a1ec007..7d6a800fe 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -13,10 +13,10 @@ "deploy": "pnpm run build && firebase deploy --only hosting:fir-ui-rework-nextjs-ssg" }, "dependencies": { - "@invertase/firebaseui-react": "workspace:*", - "@invertase/firebaseui-core": "workspace:*", - "@invertase/firebaseui-styles": "workspace:*", - "@invertase/firebaseui-translations": "workspace:*", + "@firebase-oss/ui-react": "workspace:*", + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-styles": "workspace:*", + "@firebase-oss/ui-translations": "workspace:*", "firebase": "catalog:", "next": "15.1.7", "react": "catalog:", diff --git a/examples/react/package.json b/examples/react/package.json index 43d19dba1..60d9801cb 100644 --- a/examples/react/package.json +++ b/examples/react/package.json @@ -11,10 +11,10 @@ "deploy": "pnpm run build && firebase deploy --only hosting:fir-ui-rework" }, "dependencies": { - "@invertase/firebaseui-react": "workspace:*", - "@invertase/firebaseui-core": "workspace:*", - "@invertase/firebaseui-styles": "workspace:*", - "@invertase/firebaseui-translations": "workspace:*", + "@firebase-oss/ui-react": "workspace:*", + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-styles": "workspace:*", + "@firebase-oss/ui-translations": "workspace:*", "firebase": "^11.6.0", "react": "catalog:", "react-dom": "catalog:", diff --git a/examples/react/src/App.tsx b/examples/react/src/App.tsx index 70433ee0e..d0d457921 100644 --- a/examples/react/src/App.tsx +++ b/examples/react/src/App.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { MultiFactorAuthAssertionScreen, useUI } from "@invertase/firebaseui-react"; +import { MultiFactorAuthAssertionScreen, useUI } from "@firebase-oss/ui-react"; import { multiFactor, sendEmailVerification, signOut } from "firebase/auth"; import { Link, useNavigate } from "react-router"; import { auth } from "./firebase/firebase"; diff --git a/examples/react/src/firebase/firebase.ts b/examples/react/src/firebase/firebase.ts index bf8d592d1..dbd048084 100644 --- a/examples/react/src/firebase/firebase.ts +++ b/examples/react/src/firebase/firebase.ts @@ -16,11 +16,13 @@ "use client"; -import { countryCodes, initializeUI, oneTapSignIn } from "@invertase/firebaseui-core"; +import { countryCodes, initializeUI, oneTapSignIn } from "@firebase-oss/ui-core"; import { getApps, initializeApp } from "firebase/app"; import { connectAuthEmulator, getAuth } from "firebase/auth"; import { firebaseConfig } from "./config"; +import { getAuth } from "firebase/auth"; +import { initializeUI, oneTapSignIn, countryCodes } from "@firebase-oss/ui-core"; export const firebaseApp = getApps().length === 0 ? initializeApp(firebaseConfig) : getApps()[0]; diff --git a/examples/react/src/index.css b/examples/react/src/index.css index 9de588ee1..494c9e58a 100644 --- a/examples/react/src/index.css +++ b/examples/react/src/index.css @@ -19,12 +19,12 @@ @import "@invertase/firebaseui-styles/tailwind"; .fui-provider__button[data-provider="oidc.line"][data-themed="true"] { - --line-primary: #07B53B; + --line-primary: #07b53b; --color-primary: var(--line-primary); --color-primary-hover: --alpha(var(--line-primary) / 85%); - --color-primary-surface: #FFFFFF; + --color-primary-surface: #ffffff; --color-border: var(--line-primary); } -/* @import "@invertase/firebaseui-styles/src/themes/dark.css"; */ -/* @import "@invertase/firebaseui-styles/src/themes/brutalist.css"; */ +/* @import "@firebase-oss/ui-styles/src/themes/dark.css"; */ +/* @import "@firebase-oss/ui-styles/src/themes/brutalist.css"; */ diff --git a/examples/react/src/main.tsx b/examples/react/src/main.tsx index ef5e0494a..5343fbfa0 100644 --- a/examples/react/src/main.tsx +++ b/examples/react/src/main.tsx @@ -14,15 +14,15 @@ * limitations under the License. */ -import { BrowserRouter, Routes, Route, Outlet, NavLink } from "react-router"; +import { BrowserRouter, NavLink, Outlet, Route, Routes } from "react-router"; +import { FirebaseUIProvider, useUI } from "@firebase-oss/ui-react"; +import { enUs } from "@firebase-oss/ui-translations"; import ReactDOM from "react-dom/client"; -import { FirebaseUIProvider, useUI } from "@invertase/firebaseui-react"; -import { ui, auth } from "./firebase/firebase"; import App from "./App"; -import { hiddenRoutes, routes } from "./routes"; -import { enUs } from "@invertase/firebaseui-translations"; +import { auth, ui } from "./firebase/firebase"; import { pirate } from "./pirate"; +import { hiddenRoutes, routes } from "./routes"; const root = document.getElementById("root")!; diff --git a/examples/react/src/pirate.ts b/examples/react/src/pirate.ts index aa92433ce..5ae42e88c 100644 --- a/examples/react/src/pirate.ts +++ b/examples/react/src/pirate.ts @@ -1,4 +1,4 @@ -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; export const pirate = registerLocale("pirate", { errors: { diff --git a/examples/react/src/screens/email-link-auth-screen-w-oauth.tsx b/examples/react/src/screens/email-link-auth-screen-w-oauth.tsx index b918a5a0d..9821ace14 100644 --- a/examples/react/src/screens/email-link-auth-screen-w-oauth.tsx +++ b/examples/react/src/screens/email-link-auth-screen-w-oauth.tsx @@ -24,7 +24,7 @@ import { GoogleSignInButton, MicrosoftSignInButton, TwitterSignInButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function EmailLinkAuthScreenWithOAuthPage() { diff --git a/examples/react/src/screens/email-link-auth-screen.tsx b/examples/react/src/screens/email-link-auth-screen.tsx index 1a7d7a1cf..f12e9e8ef 100644 --- a/examples/react/src/screens/email-link-auth-screen.tsx +++ b/examples/react/src/screens/email-link-auth-screen.tsx @@ -16,7 +16,7 @@ "use client"; -import { EmailLinkAuthScreen } from "@invertase/firebaseui-react"; +import { EmailLinkAuthScreen } from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function EmailLinkAuthScreenPage() { diff --git a/examples/react/src/screens/forgot-password-auth-screen.tsx b/examples/react/src/screens/forgot-password-auth-screen.tsx index 7488fc46b..0b6ed801f 100644 --- a/examples/react/src/screens/forgot-password-auth-screen.tsx +++ b/examples/react/src/screens/forgot-password-auth-screen.tsx @@ -16,7 +16,7 @@ "use client"; -import { ForgotPasswordAuthScreen } from "@invertase/firebaseui-react"; +import { ForgotPasswordAuthScreen } from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function ForgotPasswordAuthScreenPage() { diff --git a/examples/react/src/screens/mfa-enrollment-screen.tsx b/examples/react/src/screens/mfa-enrollment-screen.tsx index 2eec5af26..4553a1e2c 100644 --- a/examples/react/src/screens/mfa-enrollment-screen.tsx +++ b/examples/react/src/screens/mfa-enrollment-screen.tsx @@ -16,7 +16,7 @@ "use client"; -import { MultiFactorAuthEnrollmentScreen } from "@invertase/firebaseui-react"; +import { MultiFactorAuthEnrollmentScreen } from "@firebase-oss/ui-react"; import { FactorId } from "firebase/auth"; import { useNavigate } from "react-router"; diff --git a/examples/react/src/screens/oauth-screen.tsx b/examples/react/src/screens/oauth-screen.tsx index b85a1fb30..d71cd2721 100644 --- a/examples/react/src/screens/oauth-screen.tsx +++ b/examples/react/src/screens/oauth-screen.tsx @@ -14,18 +14,18 @@ * limitations under the License. */ -import { useState } from "react"; -import { OAuthProvider } from "firebase/auth"; import { - OAuthButton, - FacebookSignInButton, AppleSignInButton, + FacebookSignInButton, GitHubSignInButton, GoogleSignInButton, MicrosoftSignInButton, + OAuthButton, OAuthScreen, TwitterSignInButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; +import { OAuthProvider } from "firebase/auth"; +import { useState } from "react"; import { useNavigate } from "react-router"; export default function OAuthScreenPage() { diff --git a/examples/react/src/screens/phone-auth-screen-w-oauth.tsx b/examples/react/src/screens/phone-auth-screen-w-oauth.tsx index a8f892732..d3de7a62e 100644 --- a/examples/react/src/screens/phone-auth-screen-w-oauth.tsx +++ b/examples/react/src/screens/phone-auth-screen-w-oauth.tsx @@ -24,7 +24,7 @@ import { PhoneAuthScreen, TwitterSignInButton, MicrosoftSignInButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function PhoneAuthScreenWithOAuthPage() { diff --git a/examples/react/src/screens/phone-auth-screen.tsx b/examples/react/src/screens/phone-auth-screen.tsx index c244f99f6..89d0e2dcb 100644 --- a/examples/react/src/screens/phone-auth-screen.tsx +++ b/examples/react/src/screens/phone-auth-screen.tsx @@ -16,7 +16,7 @@ "use client"; -import { PhoneAuthScreen } from "@invertase/firebaseui-react"; +import { PhoneAuthScreen } from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function PhoneAuthScreenPage() { diff --git a/examples/react/src/screens/sign-in-auth-screen-w-handlers.tsx b/examples/react/src/screens/sign-in-auth-screen-w-handlers.tsx index a881d1f3e..6bb8e089d 100644 --- a/examples/react/src/screens/sign-in-auth-screen-w-handlers.tsx +++ b/examples/react/src/screens/sign-in-auth-screen-w-handlers.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignInAuthScreen } from "@invertase/firebaseui-react"; +import { SignInAuthScreen } from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function SignInAuthScreenWithHandlersPage() { diff --git a/examples/react/src/screens/sign-in-auth-screen-w-oauth.tsx b/examples/react/src/screens/sign-in-auth-screen-w-oauth.tsx index d3c8a9c28..c84d86cd1 100644 --- a/examples/react/src/screens/sign-in-auth-screen-w-oauth.tsx +++ b/examples/react/src/screens/sign-in-auth-screen-w-oauth.tsx @@ -22,7 +22,7 @@ import { GitHubSignInButton, MicrosoftSignInButton, TwitterSignInButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function SignInAuthScreenWithOAuthPage() { diff --git a/examples/react/src/screens/sign-in-auth-screen.tsx b/examples/react/src/screens/sign-in-auth-screen.tsx index 3392f9a1b..17a464032 100644 --- a/examples/react/src/screens/sign-in-auth-screen.tsx +++ b/examples/react/src/screens/sign-in-auth-screen.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { SignInAuthScreen } from "@invertase/firebaseui-react"; +import { SignInAuthScreen } from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function SignInAuthScreenPage() { diff --git a/examples/react/src/screens/sign-up-auth-screen-w-handlers.tsx b/examples/react/src/screens/sign-up-auth-screen-w-handlers.tsx index 2f8d3ddab..7f1c35ce9 100644 --- a/examples/react/src/screens/sign-up-auth-screen-w-handlers.tsx +++ b/examples/react/src/screens/sign-up-auth-screen-w-handlers.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignUpAuthScreen } from "@invertase/firebaseui-react"; +import { SignUpAuthScreen } from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function SignUpAuthScreenWithHandlersPage() { diff --git a/examples/react/src/screens/sign-up-auth-screen-w-oauth.tsx b/examples/react/src/screens/sign-up-auth-screen-w-oauth.tsx index 9497c778d..d1521a6dd 100644 --- a/examples/react/src/screens/sign-up-auth-screen-w-oauth.tsx +++ b/examples/react/src/screens/sign-up-auth-screen-w-oauth.tsx @@ -24,7 +24,7 @@ import { SignUpAuthScreen, TwitterSignInButton, MicrosoftSignInButton, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function SignUpAuthScreenWithOAuthPage() { diff --git a/examples/react/src/screens/sign-up-auth-screen.tsx b/examples/react/src/screens/sign-up-auth-screen.tsx index d0a902c79..a446132ee 100644 --- a/examples/react/src/screens/sign-up-auth-screen.tsx +++ b/examples/react/src/screens/sign-up-auth-screen.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignUpAuthScreen } from "@invertase/firebaseui-react"; +import { SignUpAuthScreen } from "@firebase-oss/ui-react"; import { useNavigate } from "react-router"; export default function SignUpAuthScreenPage() { diff --git a/examples/shadcn/package.json b/examples/shadcn/package.json index d09596348..162e1791d 100644 --- a/examples/shadcn/package.json +++ b/examples/shadcn/package.json @@ -13,10 +13,10 @@ }, "dependencies": { "@hookform/resolvers": "^5.2.2", - "@invertase/firebaseui-core": "workspace:*", - "@invertase/firebaseui-react": "workspace:*", - "@invertase/firebaseui-styles": "workspace:*", - "@invertase/firebaseui-translations": "workspace:*", + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-react": "workspace:*", + "@firebase-oss/ui-styles": "workspace:*", + "@firebase-oss/ui-translations": "workspace:*", "@radix-ui/react-accordion": "^1.2.12", "@radix-ui/react-alert-dialog": "^1.1.15", "@radix-ui/react-aspect-ratio": "^1.1.7", diff --git a/examples/shadcn/src/components/apple-sign-in-button.tsx b/examples/shadcn/src/components/apple-sign-in-button.tsx index ad310636c..1b27d8c83 100644 --- a/examples/shadcn/src/components/apple-sign-in-button.tsx +++ b/examples/shadcn/src/components/apple-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { OAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type AppleSignInButtonProps, AppleLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type AppleSignInButtonProps, AppleLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/examples/shadcn/src/components/country-selector.tsx b/examples/shadcn/src/components/country-selector.tsx index 371c48407..1e74e40e2 100644 --- a/examples/shadcn/src/components/country-selector.tsx +++ b/examples/shadcn/src/components/country-selector.tsx @@ -1,13 +1,13 @@ "use client"; import { forwardRef, useCallback, useImperativeHandle, useState } from "react"; -import type { CountryCode, CountryData } from "@invertase/firebaseui-core"; +import type { CountryCode, CountryData } from "@firebase-oss/ui-core"; import { type CountrySelectorRef, type CountrySelectorProps, useCountries, useDefaultCountry, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; diff --git a/examples/shadcn/src/components/email-link-auth-form.tsx b/examples/shadcn/src/components/email-link-auth-form.tsx index eea16df10..4bae824ec 100644 --- a/examples/shadcn/src/components/email-link-auth-form.tsx +++ b/examples/shadcn/src/components/email-link-auth-form.tsx @@ -1,15 +1,16 @@ "use client"; -import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import type { EmailLinkAuthFormSchema } from "@invertase/firebaseui-core"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import type { EmailLinkAuthFormSchema } from "@firebase-oss/ui-core"; import { useEmailLinkAuthFormAction, useEmailLinkAuthFormCompleteSignIn, useEmailLinkAuthFormSchema, useUI, type EmailLinkAuthFormProps, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; + +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; +import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; import { useState } from "react"; import { useForm } from "react-hook-form"; diff --git a/examples/shadcn/src/components/email-link-auth-screen.tsx b/examples/shadcn/src/components/email-link-auth-screen.tsx index 171a55de7..415f9d71f 100644 --- a/examples/shadcn/src/components/email-link-auth-screen.tsx +++ b/examples/shadcn/src/components/email-link-auth-screen.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type EmailLinkAuthScreenProps, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type EmailLinkAuthScreenProps } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; diff --git a/examples/shadcn/src/components/facebook-sign-in-button.tsx b/examples/shadcn/src/components/facebook-sign-in-button.tsx index 3bd0bc52c..1e3adc854 100644 --- a/examples/shadcn/src/components/facebook-sign-in-button.tsx +++ b/examples/shadcn/src/components/facebook-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { FacebookAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type FacebookSignInButtonProps, FacebookLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type FacebookSignInButtonProps, FacebookLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/examples/shadcn/src/components/forgot-password-auth-form.tsx b/examples/shadcn/src/components/forgot-password-auth-form.tsx index 28c721b68..d82304ba6 100644 --- a/examples/shadcn/src/components/forgot-password-auth-form.tsx +++ b/examples/shadcn/src/components/forgot-password-auth-form.tsx @@ -1,15 +1,15 @@ "use client"; -import type { ForgotPasswordAuthFormSchema } from "@invertase/firebaseui-core"; +import type { ForgotPasswordAuthFormSchema } from "@firebase-oss/ui-core"; import { useForgotPasswordAuthFormAction, useForgotPasswordAuthFormSchema, useUI, type ForgotPasswordAuthFormProps, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { useState } from "react"; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; diff --git a/examples/shadcn/src/components/forgot-password-auth-screen.tsx b/examples/shadcn/src/components/forgot-password-auth-screen.tsx index 98991d51d..32536de4d 100644 --- a/examples/shadcn/src/components/forgot-password-auth-screen.tsx +++ b/examples/shadcn/src/components/forgot-password-auth-screen.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type ForgotPasswordAuthScreenProps } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type ForgotPasswordAuthScreenProps } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { ForgotPasswordAuthForm } from "@/components/forgot-password-auth-form"; diff --git a/examples/shadcn/src/components/github-sign-in-button.tsx b/examples/shadcn/src/components/github-sign-in-button.tsx index a2b92a65b..7d7f1fdaf 100644 --- a/examples/shadcn/src/components/github-sign-in-button.tsx +++ b/examples/shadcn/src/components/github-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { GithubAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type GitHubSignInButtonProps, GitHubLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type GitHubSignInButtonProps, GitHubLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/examples/shadcn/src/components/google-sign-in-button.tsx b/examples/shadcn/src/components/google-sign-in-button.tsx index 4d0796c70..bf3de420a 100644 --- a/examples/shadcn/src/components/google-sign-in-button.tsx +++ b/examples/shadcn/src/components/google-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { GoogleAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type GoogleSignInButtonProps, GoogleLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type GoogleSignInButtonProps, GoogleLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/examples/shadcn/src/components/microsoft-sign-in-button.tsx b/examples/shadcn/src/components/microsoft-sign-in-button.tsx index f5288b6a1..967064a02 100644 --- a/examples/shadcn/src/components/microsoft-sign-in-button.tsx +++ b/examples/shadcn/src/components/microsoft-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { OAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type MicrosoftSignInButtonProps, MicrosoftLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type MicrosoftSignInButtonProps, MicrosoftLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/examples/shadcn/src/components/multi-factor-auth-assertion-form.tsx b/examples/shadcn/src/components/multi-factor-auth-assertion-form.tsx index 4ad2eeeb8..ede0031f5 100644 --- a/examples/shadcn/src/components/multi-factor-auth-assertion-form.tsx +++ b/examples/shadcn/src/components/multi-factor-auth-assertion-form.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI } from "@firebase-oss/ui-react"; import { PhoneMultiFactorGenerator, TotpMultiFactorGenerator, @@ -9,11 +9,11 @@ import { type UserCredential, } from "firebase/auth"; import { useState, type ComponentProps } from "react"; -import { useMultiFactorAssertionCleanup } from "@invertase/firebaseui-react"; import { SmsMultiFactorAssertionForm } from "@/components/sms-multi-factor-assertion-form"; import { TotpMultiFactorAssertionForm } from "@/components/totp-multi-factor-assertion-form"; import { Button } from "@/components/ui/button"; +import { useMultiFactorAssertionCleanup } from "@firebase-oss/ui-react"; export type MultiFactorAuthAssertionFormProps = { onSuccess?: (credential: UserCredential) => void; diff --git a/examples/shadcn/src/components/multi-factor-auth-assertion-screen.tsx b/examples/shadcn/src/components/multi-factor-auth-assertion-screen.tsx index 17a1dda7d..d18f5509b 100644 --- a/examples/shadcn/src/components/multi-factor-auth-assertion-screen.tsx +++ b/examples/shadcn/src/components/multi-factor-auth-assertion-screen.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type MultiFactorAuthAssertionScreenProps } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type MultiFactorAuthAssertionScreenProps } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { MultiFactorAuthAssertionForm } from "@/components/multi-factor-auth-assertion-form"; diff --git a/examples/shadcn/src/components/multi-factor-auth-enrollment-form.tsx b/examples/shadcn/src/components/multi-factor-auth-enrollment-form.tsx index 5935c159e..fcd960fb6 100644 --- a/examples/shadcn/src/components/multi-factor-auth-enrollment-form.tsx +++ b/examples/shadcn/src/components/multi-factor-auth-enrollment-form.tsx @@ -2,8 +2,8 @@ import { type ComponentProps, useState } from "react"; import { FactorId } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI } from "@firebase-oss/ui-react"; import { SmsMultiFactorEnrollmentForm } from "@/components/sms-multi-factor-enrollment-form"; import { TotpMultiFactorEnrollmentForm } from "@/components/totp-multi-factor-enrollment-form"; diff --git a/examples/shadcn/src/components/multi-factor-auth-enrollment-screen.tsx b/examples/shadcn/src/components/multi-factor-auth-enrollment-screen.tsx index c226b87ea..318777a37 100644 --- a/examples/shadcn/src/components/multi-factor-auth-enrollment-screen.tsx +++ b/examples/shadcn/src/components/multi-factor-auth-enrollment-screen.tsx @@ -1,10 +1,10 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type MultiFactorAuthEnrollmentFormProps } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type MultiFactorAuthEnrollmentFormProps } from "@firebase-oss/ui-react"; -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { MultiFactorAuthEnrollmentForm } from "@/components/multi-factor-auth-enrollment-form"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; export type MultiFactorAuthEnrollmentScreenProps = MultiFactorAuthEnrollmentFormProps; diff --git a/examples/shadcn/src/components/oauth-button.tsx b/examples/shadcn/src/components/oauth-button.tsx index 3707c2012..dfbb57b19 100644 --- a/examples/shadcn/src/components/oauth-button.tsx +++ b/examples/shadcn/src/components/oauth-button.tsx @@ -1,6 +1,6 @@ "use client"; -import { useUI, type OAuthButtonProps, useSignInWithProvider } from "@invertase/firebaseui-react"; +import { useUI, type OAuthButtonProps, useSignInWithProvider } from "@firebase-oss/ui-react"; import { Button } from "@/components/ui/button"; export type { OAuthButtonProps }; diff --git a/examples/shadcn/src/components/oauth-screen.tsx b/examples/shadcn/src/components/oauth-screen.tsx index a586527d2..2ecafda12 100644 --- a/examples/shadcn/src/components/oauth-screen.tsx +++ b/examples/shadcn/src/components/oauth-screen.tsx @@ -1,9 +1,9 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { type User } from "firebase/auth"; import { type PropsWithChildren } from "react"; -import { useUI, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { useUI, useOnUserAuthenticated } from "@firebase-oss/ui-react"; import { Card, CardContent, CardHeader, CardDescription, CardTitle } from "@/components/ui/card"; import { Policies } from "@/components/policies"; import { MultiFactorAuthAssertionScreen } from "@/components/multi-factor-auth-assertion-screen"; diff --git a/examples/shadcn/src/components/phone-auth-form.tsx b/examples/shadcn/src/components/phone-auth-form.tsx index c1a4dd1d1..d4c588210 100644 --- a/examples/shadcn/src/components/phone-auth-form.tsx +++ b/examples/shadcn/src/components/phone-auth-form.tsx @@ -1,5 +1,12 @@ "use client"; +import { + FirebaseUIError, + formatPhoneNumber, + getTranslation, + type PhoneAuthNumberFormSchema, + type PhoneAuthVerifyFormSchema, +} from "@firebase-oss/ui-core"; import { type PhoneAuthFormProps, usePhoneAuthNumberFormSchema, @@ -8,25 +15,17 @@ import { useRecaptchaVerifier, useUI, useVerifyPhoneNumberFormAction, -} from "@invertase/firebaseui-react"; -import { useState } from "react"; +} from "@firebase-oss/ui-react"; +import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; import type { UserCredential } from "firebase/auth"; -import { useRef } from "react"; +import { useRef, useState } from "react"; import { useForm } from "react-hook-form"; -import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { - FirebaseUIError, - formatPhoneNumber, - getTranslation, - type PhoneAuthNumberFormSchema, - type PhoneAuthVerifyFormSchema, -} from "@invertase/firebaseui-core"; +import { CountrySelector, type CountrySelectorRef } from "@/components/country-selector"; +import { Policies } from "@/components/policies"; +import { Button } from "@/components/ui/button"; import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; -import { Button } from "@/components/ui/button"; -import { Policies } from "@/components/policies"; -import { CountrySelector, type CountrySelectorRef } from "@/components/country-selector"; import { InputOTP, InputOTPGroup, InputOTPSlot } from "@/components/ui/input-otp"; type VerifyPhoneNumberFormProps = { diff --git a/examples/shadcn/src/components/phone-auth-screen.tsx b/examples/shadcn/src/components/phone-auth-screen.tsx index 7908c58c8..bae968f5e 100644 --- a/examples/shadcn/src/components/phone-auth-screen.tsx +++ b/examples/shadcn/src/components/phone-auth-screen.tsx @@ -1,8 +1,8 @@ "use client"; import type { PropsWithChildren } from "react"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, useOnUserAuthenticated } from "@firebase-oss/ui-react"; import { Card, CardContent, CardHeader, CardDescription, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { PhoneAuthForm } from "@/components/phone-auth-form"; diff --git a/examples/shadcn/src/components/policies.tsx b/examples/shadcn/src/components/policies.tsx index b0cfef637..3c352ea90 100644 --- a/examples/shadcn/src/components/policies.tsx +++ b/examples/shadcn/src/components/policies.tsx @@ -1,6 +1,6 @@ import { cn } from "@/lib/utils"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, PolicyContext } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, PolicyContext } from "@firebase-oss/ui-react"; import { cloneElement, useContext } from "react"; export function Policies() { diff --git a/examples/shadcn/src/components/redirect-error.tsx b/examples/shadcn/src/components/redirect-error.tsx index b76348cb4..2a8246816 100644 --- a/examples/shadcn/src/components/redirect-error.tsx +++ b/examples/shadcn/src/components/redirect-error.tsx @@ -1,6 +1,6 @@ "use client"; -import { useRedirectError } from "@invertase/firebaseui-react"; +import { useRedirectError } from "@firebase-oss/ui-react"; export function RedirectError() { const error = useRedirectError(); diff --git a/examples/shadcn/src/components/sign-in-auth-form.tsx b/examples/shadcn/src/components/sign-in-auth-form.tsx index 3109ba05e..b3a48e82b 100644 --- a/examples/shadcn/src/components/sign-in-auth-form.tsx +++ b/examples/shadcn/src/components/sign-in-auth-form.tsx @@ -1,15 +1,15 @@ "use client"; -import type { SignInAuthFormSchema } from "@invertase/firebaseui-core"; +import type { SignInAuthFormSchema } from "@firebase-oss/ui-core"; import { useSignInAuthFormAction, useSignInAuthFormSchema, useUI, type SignInAuthFormProps, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; diff --git a/examples/shadcn/src/components/sign-in-auth-screen.tsx b/examples/shadcn/src/components/sign-in-auth-screen.tsx index 3397fac0d..86c98ffe1 100644 --- a/examples/shadcn/src/components/sign-in-auth-screen.tsx +++ b/examples/shadcn/src/components/sign-in-auth-screen.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type SignInAuthScreenProps, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type SignInAuthScreenProps } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; diff --git a/examples/shadcn/src/components/sign-up-auth-form.tsx b/examples/shadcn/src/components/sign-up-auth-form.tsx index 565ca3430..e202e57af 100644 --- a/examples/shadcn/src/components/sign-up-auth-form.tsx +++ b/examples/shadcn/src/components/sign-up-auth-form.tsx @@ -1,16 +1,16 @@ "use client"; -import type { SignUpAuthFormSchema } from "@invertase/firebaseui-core"; +import type { SignUpAuthFormSchema } from "@firebase-oss/ui-core"; import { useSignUpAuthFormAction, useSignUpAuthFormSchema, useUI, type SignUpAuthFormProps, useRequireDisplayName, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; diff --git a/examples/shadcn/src/components/sign-up-auth-screen.tsx b/examples/shadcn/src/components/sign-up-auth-screen.tsx index f358a163e..59ecea077 100644 --- a/examples/shadcn/src/components/sign-up-auth-screen.tsx +++ b/examples/shadcn/src/components/sign-up-auth-screen.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type SignUpAuthScreenProps, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type SignUpAuthScreenProps } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; diff --git a/examples/shadcn/src/components/sms-multi-factor-assertion-form.tsx b/examples/shadcn/src/components/sms-multi-factor-assertion-form.tsx index 7f6c424b0..d33fd7591 100644 --- a/examples/shadcn/src/components/sms-multi-factor-assertion-form.tsx +++ b/examples/shadcn/src/components/sms-multi-factor-assertion-form.tsx @@ -3,14 +3,14 @@ import { useRef, useState } from "react"; import { type UserCredential, type MultiFactorInfo } from "firebase/auth"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { useMultiFactorPhoneAuthVerifyFormSchema, useRecaptchaVerifier, useUI, useSmsMultiFactorAssertionPhoneFormAction, useSmsMultiFactorAssertionVerifyFormAction, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; diff --git a/examples/shadcn/src/components/sms-multi-factor-enrollment-form.tsx b/examples/shadcn/src/components/sms-multi-factor-enrollment-form.tsx index db6d3ddc7..5c9a61180 100644 --- a/examples/shadcn/src/components/sms-multi-factor-enrollment-form.tsx +++ b/examples/shadcn/src/components/sms-multi-factor-enrollment-form.tsx @@ -8,14 +8,14 @@ import { formatPhoneNumber, getTranslation, verifyPhoneNumber, -} from "@invertase/firebaseui-core"; -import { CountrySelector, type CountrySelectorRef } from "@/components/country-selector"; +} from "@firebase-oss/ui-core"; +import { CountrySelector, type CountrySelectorRef } from "@/registry/country-selector"; import { useMultiFactorPhoneAuthNumberFormSchema, useMultiFactorPhoneAuthVerifyFormSchema, useRecaptchaVerifier, useUI, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; diff --git a/examples/shadcn/src/components/totp-multi-factor-assertion-form.tsx b/examples/shadcn/src/components/totp-multi-factor-assertion-form.tsx index 1c0324c52..f8d5fee49 100644 --- a/examples/shadcn/src/components/totp-multi-factor-assertion-form.tsx +++ b/examples/shadcn/src/components/totp-multi-factor-assertion-form.tsx @@ -1,12 +1,12 @@ "use client"; -import { type UserCredential, type MultiFactorInfo } from "firebase/auth"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { type MultiFactorInfo } from "firebase/auth"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { useMultiFactorTotpAuthVerifyFormSchema, useUI, useTotpMultiFactorAssertionFormAction, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; diff --git a/examples/shadcn/src/components/totp-multi-factor-enrollment-form.tsx b/examples/shadcn/src/components/totp-multi-factor-enrollment-form.tsx index bd9aa2f84..f7809c331 100644 --- a/examples/shadcn/src/components/totp-multi-factor-enrollment-form.tsx +++ b/examples/shadcn/src/components/totp-multi-factor-enrollment-form.tsx @@ -8,12 +8,12 @@ import { generateTotpQrCode, generateTotpSecret, getTranslation, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { useMultiFactorTotpAuthNumberFormSchema, useMultiFactorTotpAuthVerifyFormSchema, useUI, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; diff --git a/examples/shadcn/src/components/twitter-sign-in-button.tsx b/examples/shadcn/src/components/twitter-sign-in-button.tsx index 7d4cc39ad..0b6e2a551 100644 --- a/examples/shadcn/src/components/twitter-sign-in-button.tsx +++ b/examples/shadcn/src/components/twitter-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { TwitterAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type TwitterSignInButtonProps, TwitterLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type TwitterSignInButtonProps, TwitterLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/examples/shadcn/src/main.tsx b/examples/shadcn/src/main.tsx index 954711da4..d8b5c4415 100644 --- a/examples/shadcn/src/main.tsx +++ b/examples/shadcn/src/main.tsx @@ -16,13 +16,14 @@ import { BrowserRouter, Routes, Route, Outlet, Link } from "react-router"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import ReactDOM from "react-dom/client"; -import { FirebaseUIProvider, useUI } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider, useUI } from "@firebase-oss/ui-react"; import { ui, auth } from "./firebase/firebase"; import App from "./App"; import { Button } from "@/components/ui/button"; import { hiddenRoutes, routes } from "./routes"; -import { enUs } from "@invertase/firebaseui-translations"; +import { enUs } from "@firebase-oss/ui-translations"; import { pirate } from "./pirate"; const root = document.getElementById("root")!; diff --git a/examples/shadcn/src/pirate.ts b/examples/shadcn/src/pirate.ts index aa92433ce..5ae42e88c 100644 --- a/examples/shadcn/src/pirate.ts +++ b/examples/shadcn/src/pirate.ts @@ -1,4 +1,4 @@ -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; export const pirate = registerLocale("pirate", { errors: { diff --git a/package.json b/package.json index 50f6747f0..d3ca41000 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,43 @@ { - "name": "@firebaseui/root", + "name": "@firebase-oss/ui-root", "private": true, "type": "module", "scripts": { "emulators": "firebase emulators:start --only auth --project demo-test", - "build": "pnpm --filter=@invertase/firebaseui-translations run build && pnpm --filter=@invertase/firebaseui-styles run build && pnpm --filter=@invertase/firebaseui-core run build && pnpm --filter=@invertase/firebaseui-react run build && pnpm --filter=@invertase/firebaseui-angular run build && pnpm --filter=@invertase/firebaseui-shadcn run build && pnpm --filter react run build && pnpm --filter nextjs run build && pnpm --filter nextjs-ssr run build && pnpm --filter angular-example run build && pnpm --filter shadcn run build", - "build:packages": "pnpm --filter=@invertase/firebaseui-translations run build && pnpm --filter=@invertase/firebaseui-styles run build && pnpm --filter=@invertase/firebaseui-core run build && pnpm --filter=@invertase/firebaseui-react run build && pnpm --filter=@invertase/firebaseui-angular run build", - "deploy:hosting:all": "pnpm run build && pnpm --filter react run deploy && pnpm --filter nextjs run deploy && pnpm --filter nextjs-ssr run deploy && pnpm --filter angular-example run deploy && pnpm --filter shadcn run deploy", + "build": "pnpm run build:translations && pnpm run build:core && pnpm run build:react", + "build:core": "pnpm --filter=@firebase-oss/ui-core run build", + "build:translations": "pnpm --filter=@firebase-oss/ui-translations run build", + "build:react": "pnpm --filter=@firebase-oss/ui-react run build", + "build:angular": "pnpm --filter=@firebase-oss/ui-angular run build", + "build:shadcn": "pnpm --filter=@firebase-oss/ui-shadcn run build", + "shadcn:deploy": "pnpm run build:shadcn && firebase deploy --only hosting:fir-ui-shadcn", "lint:check": "eslint", "lint:fix": "eslint --fix", "format:check": "prettier --check **/{src,tests}/**/*.{ts,tsx}", "format:write": "prettier --write **/{src,tests}/**/*.{ts,tsx}", - "test": "pnpm --filter=@invertase/firebaseui-core run test && pnpm --filter=@invertase/firebaseui-translations run test && pnpm --filter=@invertase/firebaseui-styles run test && pnpm --filter=@invertase/firebaseui-react run test && pnpm --filter=@invertase/firebaseui-shadcn run test && pnpm --filter=@invertase/firebaseui-angular run test", - "test:watch": "pnpm --filter=@invertase/firebaseui-core run test:unit:watch & pnpm --filter=@invertase/firebaseui-react run test:unit:watch & pnpm --filter=@invertase/firebaseui-angular run test:watch", - "version:bump:all": "pnpm --filter=@invertase/firebaseui-core run version:bump && pnpm --filter=@invertase/firebaseui-translations run version:bump && pnpm --filter=@invertase/firebaseui-react run version:bump && pnpm --filter=@invertase/firebaseui-styles run version:bump && pnpm --filter=@invertase/firebaseui-angular run version:bump", - "publish:tags:all": "pnpm i && pnpm --filter=@invertase/firebaseui-core run publish:tags && pnpm --filter=@invertase/firebaseui-translations run publish:tags && pnpm --filter=@invertase/firebaseui-react run publish:tags && pnpm --filter=@invertase/firebaseui-styles run publish:tags && pnpm --filter=@invertase/firebaseui-angular run publish:tags", - "publish:npm:all": "pnpm run build:packages && pnpm run publish:npm:core && pnpm run publish:npm:translations && pnpm run publish:npm:react && pnpm run publish:npm:styles && pnpm run publish:npm:angular" + "test": "pnpm run test:core && pnpm run test:translations && pnpm run test:styles && pnpm run test:react && pnpm run test:shadcn && pnpm run test:angular", + "test:core": "pnpm --filter=@firebase-oss/ui-core run test", + "test:react": "pnpm --filter=@firebase-oss/ui-react run test", + "test:angular": "pnpm --filter=@firebase-oss/ui-angular run test", + "test:translations": "pnpm --filter=@firebase-oss/ui-translations run test", + "test:styles": "pnpm --filter=@firebase-oss/ui-styles run test", + "test:shadcn": "pnpm --filter=@firebase-oss/ui-shadcn run test", + "test:watch": "pnpm run test:core:watch & pnpm run test:react:watch & pnpm run test:angular:watch", + "test:core:watch": "pnpm --filter=@firebase-oss/ui-core run test:unit:watch", + "test:react:watch": "pnpm --filter=@firebase-oss/ui-react run test:unit:watch", + "test:angular:watch": "pnpm --filter=@firebase-oss/ui-angular run test:watch", + "publish:tags:core": "pnpm --filter=@firebase-oss/ui-core run publish:tags", + "publish:tags:translations": "pnpm --filter=@firebase-oss/ui-translations run publish:tags", + "publish:tags:react": "pnpm --filter=@firebase-oss/ui-react run publish:tags", + "publish:tags:angular": "pnpm --filter=@firebase-oss/ui-angular run publish:tags", + "publish:tags:styles": "pnpm --filter=@firebase-oss/ui-styles run publish:tags", + "publish:tags:all": "pnpm i && pnpm run publish:tags:core && pnpm run publish:tags:translations && pnpm run publish:tags:react && pnpm run publish:tags:styles && pnpm run publish:tags:angular", + "release:core": "pnpm --filter=@firebase-oss/ui-core run release", + "release:translations": "pnpm --filter=@firebase-oss/ui-translations run release", + "release:react": "pnpm --filter=@firebase-oss/ui-react run release", + "release:angular": "pnpm --filter=@firebase-oss/ui-angular run release", + "release:styles": "pnpm --filter=@firebase-oss/ui-styles run release", + "release:all": "pnpm i && pnpm run release:core && pnpm run release:translations && pnpm run release:react && pnpm run release:styles && pnpm run release:angular" }, "devDependencies": { "@eslint/css": "^0.11.1", diff --git a/packages/angular/README.md b/packages/angular/README.md index 2359a0db8..63958a267 100644 --- a/packages/angular/README.md +++ b/packages/angular/README.md @@ -1,4 +1,16 @@ -# FirebaseuiAngular +# @firebase-oss/ui-angular + +This package contains the Angular components for FirebaseUI. + +## Installation + +Install the package from NPM: + +```bash +npm install @angular/fire @firebase-oss/ui-angular @firebase-oss/ui-core @firebase-oss/ui-styles @firebase-oss/ui-translations +``` + +## Development This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.0. diff --git a/packages/angular/jest.config.ts b/packages/angular/jest.config.ts index d6d1aff08..825584422 100644 --- a/packages/angular/jest.config.ts +++ b/packages/angular/jest.config.ts @@ -23,7 +23,7 @@ const config: Config = { coveragePathIgnorePatterns: ["/node_modules/", "/dist/"], testEnvironment: "jsdom", moduleNameMapper: { - "^@invertase/firebaseui-core$": "/src/lib/tests/test-helpers.ts", + "^@firebase-oss/ui-core$": "/src/lib/tests/test-helpers.ts", "^@angular/fire/auth$": "/src/lib/tests/test-helpers.ts", "^firebase/auth$": "/src/lib/tests/test-helpers.ts", "^../provider$": "/src/lib/tests/test-helpers.ts", diff --git a/packages/angular/ng-package.json b/packages/angular/ng-package.json index 01c23e4ad..b2bbb9901 100644 --- a/packages/angular/ng-package.json +++ b/packages/angular/ng-package.json @@ -5,8 +5,8 @@ "entryFile": "src/public-api.ts" }, "allowedNonPeerDependencies": [ - "@invertase/firebaseui-core", - "@invertase/firebaseui-styles", + "@firebase-oss/ui-core", + "@firebase-oss/ui-styles", "@tanstack/angular-form", "firebase", "nanostores", diff --git a/packages/angular/package.json b/packages/angular/package.json index 98c5f8095..8e2fb5d89 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -1,6 +1,6 @@ { - "name": "@invertase/firebaseui-angular", - "version": "0.0.5", + "name": "@firebase-oss/ui-angular", + "version": "0.0.1", "files": [ "dist" ], @@ -28,8 +28,8 @@ "@angular/fire": "catalog:peerDependencies" }, "dependencies": { - "@invertase/firebaseui-core": "workspace:*", - "@invertase/firebaseui-styles": "workspace:*", + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-styles": "workspace:*", "@tanstack/angular-form": "^1.23.1", "nanostores": "catalog:", "tslib": "^2.8.1" diff --git a/packages/angular/src/lib/auth/forms/email-link-auth-form.spec.ts b/packages/angular/src/lib/auth/forms/email-link-auth-form.spec.ts index a1c9a5edc..3c87479be 100644 --- a/packages/angular/src/lib/auth/forms/email-link-auth-form.spec.ts +++ b/packages/angular/src/lib/auth/forms/email-link-auth-form.spec.ts @@ -22,9 +22,9 @@ import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } fr import { PoliciesComponent } from "../../components/policies"; import { UserCredential } from "@angular/fire/auth"; -// Mock the @invertase/firebaseui-core module but preserve Angular providers -jest.mock("@invertase/firebaseui-core", () => { - const originalModule = jest.requireActual("@invertase/firebaseui-core"); +// Mock the @firebase-oss/ui-core module but preserve Angular providers +jest.mock("@firebase-oss/ui-core", () => { + const originalModule = jest.requireActual("@firebase-oss/ui-core"); return { ...originalModule, sendSignInLinkToEmail: jest.fn(), @@ -44,7 +44,7 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { sendSignInLinkToEmail, completeEmailLinkSignIn, FirebaseUIError } = require("@invertase/firebaseui-core"); + const { sendSignInLinkToEmail, completeEmailLinkSignIn, FirebaseUIError } = require("@firebase-oss/ui-core"); mockSendSignInLinkToEmail = sendSignInLinkToEmail; mockCompleteEmailLinkSignIn = completeEmailLinkSignIn; mockFirebaseUIError = FirebaseUIError; diff --git a/packages/angular/src/lib/auth/forms/email-link-auth-form.ts b/packages/angular/src/lib/auth/forms/email-link-auth-form.ts index 223297376..0e7f0709f 100644 --- a/packages/angular/src/lib/auth/forms/email-link-auth-form.ts +++ b/packages/angular/src/lib/auth/forms/email-link-auth-form.ts @@ -18,7 +18,7 @@ import { Component, effect, Output, EventEmitter, signal } from "@angular/core"; import { CommonModule } from "@angular/common"; import { injectForm, injectStore, TanStackAppField, TanStackField } from "@tanstack/angular-form"; import { UserCredential } from "@angular/fire/auth"; -import { FirebaseUIError, completeEmailLinkSignIn, sendSignInLinkToEmail } from "@invertase/firebaseui-core"; +import { FirebaseUIError, completeEmailLinkSignIn, sendSignInLinkToEmail } from "@firebase-oss/ui-core"; import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } from "../../components/form"; import { PoliciesComponent } from "../../components/policies"; diff --git a/packages/angular/src/lib/auth/forms/forgot-password-auth-form.spec.ts b/packages/angular/src/lib/auth/forms/forgot-password-auth-form.spec.ts index 71517c7b0..d943c93db 100644 --- a/packages/angular/src/lib/auth/forms/forgot-password-auth-form.spec.ts +++ b/packages/angular/src/lib/auth/forms/forgot-password-auth-form.spec.ts @@ -27,9 +27,9 @@ import { } from "../../components/form"; import { PoliciesComponent } from "../../components/policies"; -// Mock the @invertase/firebaseui-core module but preserve Angular providers -jest.mock("@invertase/firebaseui-core", () => { - const originalModule = jest.requireActual("@invertase/firebaseui-core"); +// Mock the @firebase-oss/ui-core module but preserve Angular providers +jest.mock("@firebase-oss/ui-core", () => { + const originalModule = jest.requireActual("@firebase-oss/ui-core"); return { ...originalModule, sendPasswordResetEmail: jest.fn(), @@ -47,7 +47,7 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { sendPasswordResetEmail, FirebaseUIError } = require("@invertase/firebaseui-core"); + const { sendPasswordResetEmail, FirebaseUIError } = require("@firebase-oss/ui-core"); mockSendPasswordResetEmail = sendPasswordResetEmail; mockFirebaseUIError = FirebaseUIError; }); diff --git a/packages/angular/src/lib/auth/forms/forgot-password-auth-form.ts b/packages/angular/src/lib/auth/forms/forgot-password-auth-form.ts index 40a190f13..e45e6509d 100644 --- a/packages/angular/src/lib/auth/forms/forgot-password-auth-form.ts +++ b/packages/angular/src/lib/auth/forms/forgot-password-auth-form.ts @@ -17,7 +17,7 @@ import { Component, effect, Output, EventEmitter, input, signal } from "@angular/core"; import { CommonModule } from "@angular/common"; import { injectForm, injectStore, TanStackAppField, TanStackField } from "@tanstack/angular-form"; -import { FirebaseUIError, sendPasswordResetEmail } from "@invertase/firebaseui-core"; +import { FirebaseUIError, sendPasswordResetEmail } from "@firebase-oss/ui-core"; import { FormInputComponent, diff --git a/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-assertion-form.spec.ts b/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-assertion-form.spec.ts index 4221d1f73..f05f9f93e 100644 --- a/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-assertion-form.spec.ts +++ b/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-assertion-form.spec.ts @@ -37,7 +37,7 @@ describe("", () => { injectRecaptchaVerifier, } = require("../../../tests/test-helpers"); - const { getTranslation } = require("@invertase/firebaseui-core"); + const { getTranslation } = require("@firebase-oss/ui-core"); getTranslation.mockImplementation((ui: any, category: string, key: string, params?: any) => { if (category === "messages" && key === "mfaSmsAssertionPrompt" && params) { return `A verification code will be sent to ${params.phoneNumber} to complete the authentication process.`; @@ -220,7 +220,7 @@ describe("", () => { injectMultiFactorPhoneAuthAssertionFormSchema, } = require("../../../tests/test-helpers"); - const { getTranslation } = require("@invertase/firebaseui-core"); + const { getTranslation } = require("@firebase-oss/ui-core"); getTranslation.mockImplementation((ui: any, category: string, key: string, params?: any) => { if (category === "messages" && key === "mfaSmsAssertionPrompt" && params) { return `A verification code will be sent to ${params.phoneNumber} to complete the authentication process.`; diff --git a/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-assertion-form.ts b/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-assertion-form.ts index b45742577..65c8b3c5f 100644 --- a/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-assertion-form.ts +++ b/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-assertion-form.ts @@ -13,23 +13,23 @@ * limitations under the License. */ -import { Component, ElementRef, effect, input, signal, Output, EventEmitter, computed, viewChild } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { injectForm, injectStore, TanStackAppField, TanStackField } from "@tanstack/angular-form"; +import { Component, ElementRef, EventEmitter, Output, computed, effect, input, signal, viewChild } from "@angular/core"; +import { + FirebaseUIError, + getTranslation, + signInWithMultiFactorAssertion, + verifyPhoneNumber, +} from "@firebase-oss/ui-core"; +import { TanStackAppField, TanStackField, injectForm, injectStore } from "@tanstack/angular-form"; +import { PhoneAuthProvider, PhoneMultiFactorGenerator, type MultiFactorInfo, type UserCredential } from "firebase/auth"; +import { FormErrorMessageComponent, FormInputComponent, FormSubmitComponent } from "../../../components/form"; import { injectMultiFactorPhoneAuthVerifyFormSchema, injectRecaptchaVerifier, injectTranslation, injectUI, } from "../../../provider"; -import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } from "../../../components/form"; -import { - FirebaseUIError, - verifyPhoneNumber, - signInWithMultiFactorAssertion, - getTranslation, -} from "@invertase/firebaseui-core"; -import { PhoneAuthProvider, PhoneMultiFactorGenerator, type MultiFactorInfo, type UserCredential } from "firebase/auth"; type PhoneMultiFactorInfo = MultiFactorInfo & { phoneNumber?: string; diff --git a/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-enrollment-form.spec.ts b/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-enrollment-form.spec.ts index 5819cbd47..322ccdff2 100644 --- a/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-enrollment-form.spec.ts +++ b/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-enrollment-form.spec.ts @@ -21,8 +21,8 @@ import { SmsMultiFactorEnrollmentFormComponent } from "./sms-multi-factor-enroll import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } from "../../../components/form"; import { CountrySelectorComponent } from "../../../components/country-selector"; -jest.mock("@invertase/firebaseui-core", () => { - const originalModule = jest.requireActual("@invertase/firebaseui-core"); +jest.mock("@firebase-oss/ui-core", () => { + const originalModule = jest.requireActual("@firebase-oss/ui-core"); return { ...originalModule, verifyPhoneNumber: jest.fn(), @@ -73,7 +73,7 @@ describe("", () => { enrollWithMultiFactorAssertion, formatPhoneNumber, FirebaseUIError, - } = require("@invertase/firebaseui-core"); + } = require("@firebase-oss/ui-core"); const { multiFactor } = require("firebase/auth"); mockVerifyPhoneNumber = verifyPhoneNumber; diff --git a/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-enrollment-form.ts b/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-enrollment-form.ts index 6a949b6d0..680244e5d 100644 --- a/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-enrollment-form.ts +++ b/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-enrollment-form.ts @@ -25,7 +25,7 @@ import { enrollWithMultiFactorAssertion, formatPhoneNumber, FirebaseUIError, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { multiFactor } from "firebase/auth"; import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } from "../../../components/form"; import { CountrySelectorComponent } from "../../../components/country-selector"; diff --git a/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-assertion-form.spec.ts b/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-assertion-form.spec.ts index a1df6dc81..1dae6f7a7 100644 --- a/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-assertion-form.spec.ts +++ b/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-assertion-form.spec.ts @@ -18,8 +18,8 @@ import { render, screen, waitFor } from "@testing-library/angular"; import { TotpMultiFactorAssertionFormComponent } from "./totp-multi-factor-assertion-form"; import { signInWithMultiFactorAssertion, FirebaseUIError } from "../../../tests/test-helpers"; -jest.mock("@invertase/firebaseui-core", () => { - const originalModule = jest.requireActual("@invertase/firebaseui-core"); +jest.mock("@firebase-oss/ui-core", () => { + const originalModule = jest.requireActual("@firebase-oss/ui-core"); return { ...originalModule, signInWithMultiFactorAssertion: jest.fn(), @@ -42,7 +42,7 @@ describe("", () => { injectMultiFactorTotpAuthVerifyFormSchema, } = require("../../../tests/test-helpers"); - const { signInWithMultiFactorAssertion } = require("@invertase/firebaseui-core"); + const { signInWithMultiFactorAssertion } = require("@firebase-oss/ui-core"); injectTranslation.mockImplementation((category: string, key: string) => { const mockTranslations: Record> = { diff --git a/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-assertion-form.ts b/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-assertion-form.ts index ecf9190c6..38cacc6f7 100644 --- a/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-assertion-form.ts +++ b/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-assertion-form.ts @@ -13,13 +13,13 @@ * limitations under the License. */ -import { Component, effect, input, Output, EventEmitter } from "@angular/core"; import { CommonModule } from "@angular/common"; +import { Component, effect, EventEmitter, input, Output } from "@angular/core"; +import { FirebaseUIError, signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { injectForm, injectStore, TanStackAppField, TanStackField } from "@tanstack/angular-form"; -import { injectMultiFactorTotpAuthVerifyFormSchema, injectTranslation, injectUI } from "../../../provider"; -import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } from "../../../components/form"; -import { FirebaseUIError, signInWithMultiFactorAssertion } from "@invertase/firebaseui-core"; import { TotpMultiFactorGenerator, type MultiFactorInfo, type UserCredential } from "firebase/auth"; +import { FormErrorMessageComponent, FormInputComponent, FormSubmitComponent } from "../../../components/form"; +import { injectMultiFactorTotpAuthVerifyFormSchema, injectTranslation, injectUI } from "../../../provider"; @Component({ selector: "fui-totp-multi-factor-assertion-form", diff --git a/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-enrollment-form.ts b/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-enrollment-form.ts index 157dde79f..936690eb8 100644 --- a/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-enrollment-form.ts +++ b/packages/angular/src/lib/auth/forms/mfa/totp-multi-factor-enrollment-form.ts @@ -23,7 +23,7 @@ import { generateTotpSecret, generateTotpQrCode, FirebaseUIError, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } from "../../../components/form"; import { injectUI, diff --git a/packages/angular/src/lib/auth/forms/phone-auth-form.spec.ts b/packages/angular/src/lib/auth/forms/phone-auth-form.spec.ts index 0f0d15c1e..48aba7def 100644 --- a/packages/angular/src/lib/auth/forms/phone-auth-form.spec.ts +++ b/packages/angular/src/lib/auth/forms/phone-auth-form.spec.ts @@ -26,9 +26,9 @@ import { } from "../../components/form"; import { UserCredential } from "@angular/fire/auth"; -// Mock the @invertase/firebaseui-core module but preserve Angular providers -jest.mock("@invertase/firebaseui-core", () => { - const originalModule = jest.requireActual("@invertase/firebaseui-core"); +// Mock the @firebase-oss/ui-core module but preserve Angular providers +jest.mock("@firebase-oss/ui-core", () => { + const originalModule = jest.requireActual("@firebase-oss/ui-core"); return { ...originalModule, verifyPhoneNumber: jest.fn(), @@ -54,7 +54,7 @@ describe("", () => { confirmPhoneNumber, formatPhoneNumber, FirebaseUIError, - } = require("@invertase/firebaseui-core"); + } = require("@firebase-oss/ui-core"); const { injectRecaptchaVerifier } = require("../../tests/test-helpers"); mockVerifyPhoneNumber = verifyPhoneNumber; mockConfirmPhoneNumber = confirmPhoneNumber; diff --git a/packages/angular/src/lib/auth/forms/phone-auth-form.ts b/packages/angular/src/lib/auth/forms/phone-auth-form.ts index 39c6a77b8..b87d10fe8 100644 --- a/packages/angular/src/lib/auth/forms/phone-auth-form.ts +++ b/packages/angular/src/lib/auth/forms/phone-auth-form.ts @@ -35,7 +35,7 @@ import { confirmPhoneNumber, verifyPhoneNumber, CountryCode, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; @Component({ selector: "fui-phone-number-form", diff --git a/packages/angular/src/lib/auth/forms/sign-in-auth-form.spec.ts b/packages/angular/src/lib/auth/forms/sign-in-auth-form.spec.ts index 616bb4cc1..a29009c6b 100644 --- a/packages/angular/src/lib/auth/forms/sign-in-auth-form.spec.ts +++ b/packages/angular/src/lib/auth/forms/sign-in-auth-form.spec.ts @@ -33,7 +33,7 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { signInWithEmailAndPassword, FirebaseUIError } = require("@invertase/firebaseui-core"); + const { signInWithEmailAndPassword, FirebaseUIError } = require("@firebase-oss/ui-core"); mockSignInWithEmailAndPassword = signInWithEmailAndPassword; mockFirebaseUIError = FirebaseUIError; }); diff --git a/packages/angular/src/lib/auth/forms/sign-in-auth-form.ts b/packages/angular/src/lib/auth/forms/sign-in-auth-form.ts index a88cb3379..a1fa5c12e 100644 --- a/packages/angular/src/lib/auth/forms/sign-in-auth-form.ts +++ b/packages/angular/src/lib/auth/forms/sign-in-auth-form.ts @@ -18,7 +18,7 @@ import { Component, Output, EventEmitter, input, effect } from "@angular/core"; import { CommonModule } from "@angular/common"; import { UserCredential } from "@angular/fire/auth"; import { injectForm, TanStackField, TanStackAppField, injectStore } from "@tanstack/angular-form"; -import { FirebaseUIError, signInWithEmailAndPassword } from "@invertase/firebaseui-core"; +import { FirebaseUIError, signInWithEmailAndPassword } from "@firebase-oss/ui-core"; import { injectSignInAuthFormSchema, injectTranslation, injectUI } from "../../provider"; import { PoliciesComponent } from "../../components/policies"; diff --git a/packages/angular/src/lib/auth/forms/sign-up-auth-form.spec.ts b/packages/angular/src/lib/auth/forms/sign-up-auth-form.spec.ts index 57161b17c..2db89b0ce 100644 --- a/packages/angular/src/lib/auth/forms/sign-up-auth-form.spec.ts +++ b/packages/angular/src/lib/auth/forms/sign-up-auth-form.spec.ts @@ -34,7 +34,7 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { createUserWithEmailAndPassword, hasBehavior, FirebaseUIError } = require("@invertase/firebaseui-core"); + const { createUserWithEmailAndPassword, hasBehavior, FirebaseUIError } = require("@firebase-oss/ui-core"); mockCreateUserWithEmailAndPassword = createUserWithEmailAndPassword; mockHasBehavior = hasBehavior; mockFirebaseUIError = FirebaseUIError; diff --git a/packages/angular/src/lib/auth/forms/sign-up-auth-form.ts b/packages/angular/src/lib/auth/forms/sign-up-auth-form.ts index 266d2904d..498d985c5 100644 --- a/packages/angular/src/lib/auth/forms/sign-up-auth-form.ts +++ b/packages/angular/src/lib/auth/forms/sign-up-auth-form.ts @@ -17,7 +17,7 @@ import { Component, Output, EventEmitter, input, effect, computed } from "@angular/core"; import { CommonModule } from "@angular/common"; import { injectForm, injectStore, TanStackAppField, TanStackField } from "@tanstack/angular-form"; -import { FirebaseUIError, createUserWithEmailAndPassword, hasBehavior } from "@invertase/firebaseui-core"; +import { FirebaseUIError, createUserWithEmailAndPassword, hasBehavior } from "@firebase-oss/ui-core"; import { UserCredential } from "@angular/fire/auth"; import { PoliciesComponent } from "../../components/policies"; diff --git a/packages/angular/src/lib/auth/oauth/oauth-button.spec.ts b/packages/angular/src/lib/auth/oauth/oauth-button.spec.ts index 67e2bac80..fceab8bef 100644 --- a/packages/angular/src/lib/auth/oauth/oauth-button.spec.ts +++ b/packages/angular/src/lib/auth/oauth/oauth-button.spec.ts @@ -58,7 +58,7 @@ describe("", () => { let mockGetTranslation: any; beforeEach(() => { - const { signInWithProvider, FirebaseUIError, getTranslation } = require("@invertase/firebaseui-core"); + const { signInWithProvider, FirebaseUIError } = require("@firebase-oss/ui-core"); mockSignInWithProvider = signInWithProvider; mockFirebaseUIError = FirebaseUIError; mockGetTranslation = getTranslation; diff --git a/packages/angular/src/lib/auth/oauth/oauth-button.ts b/packages/angular/src/lib/auth/oauth/oauth-button.ts index 1556808e7..dc84d3cbb 100644 --- a/packages/angular/src/lib/auth/oauth/oauth-button.ts +++ b/packages/angular/src/lib/auth/oauth/oauth-button.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { Component, input, signal, computed, output } from "@angular/core"; import { CommonModule } from "@angular/common"; +import { Component, computed, input, output, signal } from "@angular/core"; +import { AuthProvider, UserCredential } from "@angular/fire/auth"; +import { FirebaseUIError, getTranslation, signInWithProvider } from "@firebase-oss/ui-core"; import { ButtonComponent } from "../../components/button"; import { injectUI } from "../../provider"; -import { AuthProvider, UserCredential } from "@angular/fire/auth"; -import { FirebaseUIError, signInWithProvider, getTranslation } from "@invertase/firebaseui-core"; @Component({ selector: "fui-oauth-button", diff --git a/packages/angular/src/lib/components/button.ts b/packages/angular/src/lib/components/button.ts index 70654bcfd..66c30fa5d 100644 --- a/packages/angular/src/lib/components/button.ts +++ b/packages/angular/src/lib/components/button.ts @@ -15,7 +15,7 @@ */ import { Component, HostBinding, input } from "@angular/core"; -import { buttonVariant, type ButtonVariant } from "@invertase/firebaseui-styles"; +import { buttonVariant, type ButtonVariant } from "@firebase-oss/ui-styles"; @Component({ selector: "button[fui-button]", diff --git a/packages/angular/src/lib/components/country-selector.ts b/packages/angular/src/lib/components/country-selector.ts index 72c8969c2..976cd5dc7 100644 --- a/packages/angular/src/lib/components/country-selector.ts +++ b/packages/angular/src/lib/components/country-selector.ts @@ -16,7 +16,7 @@ import { Component, computed, model } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { type CountryCode } from "@invertase/firebaseui-core"; +import { type CountryCode } from "@firebase-oss/ui-core"; import { FormsModule } from "@angular/forms"; import { injectCountries, injectDefaultCountry } from "../provider"; diff --git a/packages/angular/src/lib/components/logos/apple.ts b/packages/angular/src/lib/components/logos/apple.ts index 5506447e7..7e9727b1d 100644 --- a/packages/angular/src/lib/components/logos/apple.ts +++ b/packages/angular/src/lib/components/logos/apple.ts @@ -30,14 +30,8 @@ import { Component, input } from "@angular/core"; `, }) -/** - * The Apple logo SVG component. - */ export class AppleLogoComponent { - /** The width of the logo. */ width = input("1em"); - /** The height of the logo. */ height = input("1em"); - /** Optional additional CSS class names. */ className = input(""); } diff --git a/packages/angular/src/lib/components/logos/facebook.ts b/packages/angular/src/lib/components/logos/facebook.ts index c022c5db1..7812040d3 100644 --- a/packages/angular/src/lib/components/logos/facebook.ts +++ b/packages/angular/src/lib/components/logos/facebook.ts @@ -30,14 +30,8 @@ import { Component, input } from "@angular/core"; `, }) -/** - * The Facebook logo SVG component. - */ export class FacebookLogoComponent { - /** The width of the logo. */ width = input("1em"); - /** The height of the logo. */ height = input("1em"); - /** Optional additional CSS class names. */ className = input(""); } diff --git a/packages/angular/src/lib/components/logos/github.ts b/packages/angular/src/lib/components/logos/github.ts index bd417c8fd..fce4b33c6 100644 --- a/packages/angular/src/lib/components/logos/github.ts +++ b/packages/angular/src/lib/components/logos/github.ts @@ -29,14 +29,8 @@ import { Component, input } from "@angular/core"; `, }) -/** - * The GitHub logo SVG component. - */ export class GithubLogoComponent { - /** The width of the logo. */ width = input("1em"); - /** The height of the logo. */ height = input("1em"); - /** Optional additional CSS class names. */ className = input(""); } diff --git a/packages/angular/src/lib/components/logos/google.ts b/packages/angular/src/lib/components/logos/google.ts index 805114852..8acab00de 100644 --- a/packages/angular/src/lib/components/logos/google.ts +++ b/packages/angular/src/lib/components/logos/google.ts @@ -42,14 +42,8 @@ import { Component, input } from "@angular/core"; `, }) -/** - * The Google logo SVG component. - */ export class GoogleLogoComponent { - /** The width of the logo. */ width = input("1em"); - /** The height of the logo. */ height = input("1em"); - /** Optional additional CSS class names. */ className = input(""); } diff --git a/packages/angular/src/lib/components/logos/index.ts b/packages/angular/src/lib/components/logos/index.ts index 9385b0a33..677873a2b 100644 --- a/packages/angular/src/lib/components/logos/index.ts +++ b/packages/angular/src/lib/components/logos/index.ts @@ -1,19 +1,3 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export { AppleLogoComponent } from "./apple"; export { FacebookLogoComponent } from "./facebook"; export { GithubLogoComponent } from "./github"; diff --git a/packages/angular/src/lib/components/logos/line.ts b/packages/angular/src/lib/components/logos/line.ts index ce7c69923..d3b98fd3f 100644 --- a/packages/angular/src/lib/components/logos/line.ts +++ b/packages/angular/src/lib/components/logos/line.ts @@ -34,14 +34,8 @@ import { Component, input } from "@angular/core"; `, }) -/** - * The Line logo SVG component. - */ export class LineLogoComponent { - /** The width of the logo. */ width = input("1em"); - /** The height of the logo. */ height = input("1em"); - /** Optional additional CSS class names. */ className = input(""); } diff --git a/packages/angular/src/lib/components/logos/microsoft.ts b/packages/angular/src/lib/components/logos/microsoft.ts index c4563b0d8..88006fafe 100644 --- a/packages/angular/src/lib/components/logos/microsoft.ts +++ b/packages/angular/src/lib/components/logos/microsoft.ts @@ -30,14 +30,8 @@ import { Component, input } from "@angular/core"; `, }) -/** - * The Microsoft logo SVG component. - */ export class MicrosoftLogoComponent { - /** The width of the logo. */ width = input("1em"); - /** The height of the logo. */ height = input("1em"); - /** Optional additional CSS class names. */ className = input(""); } diff --git a/packages/angular/src/lib/components/logos/snapchat.ts b/packages/angular/src/lib/components/logos/snapchat.ts index 0b129fc39..c11ec3c00 100644 --- a/packages/angular/src/lib/components/logos/snapchat.ts +++ b/packages/angular/src/lib/components/logos/snapchat.ts @@ -30,14 +30,8 @@ import { Component, input } from "@angular/core"; `, }) -/** - * The Snapchat logo SVG component. - */ export class SnapchatLogoComponent { - /** The width of the logo. */ width = input("1em"); - /** The height of the logo. */ height = input("1em"); - /** Optional additional CSS class names. */ className = input(""); } diff --git a/packages/angular/src/lib/components/logos/twitter.ts b/packages/angular/src/lib/components/logos/twitter.ts index 9630ea8e6..3acbbb71d 100644 --- a/packages/angular/src/lib/components/logos/twitter.ts +++ b/packages/angular/src/lib/components/logos/twitter.ts @@ -29,14 +29,8 @@ import { Component, input } from "@angular/core"; `, }) -/** - * The Twitter/X logo SVG component. - */ export class TwitterLogoComponent { - /** The width of the logo. */ width = input("1em"); - /** The height of the logo. */ height = input("1em"); - /** Optional additional CSS class names. */ className = input(""); } diff --git a/packages/angular/src/lib/provider.ts b/packages/angular/src/lib/provider.ts index 41e1f75c9..7363fe3c6 100644 --- a/packages/angular/src/lib/provider.ts +++ b/packages/angular/src/lib/provider.ts @@ -48,7 +48,7 @@ import { getTranslation, getBehavior, type CountryData, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; const FIREBASE_UI_STORE = new InjectionToken("firebaseui.store"); const FIREBASE_UI_POLICIES = new InjectionToken("firebaseui.policies"); diff --git a/packages/angular/src/lib/tests/test-helpers.ts b/packages/angular/src/lib/tests/test-helpers.ts index 8b8dd83cb..1254737d0 100644 --- a/packages/angular/src/lib/tests/test-helpers.ts +++ b/packages/angular/src/lib/tests/test-helpers.ts @@ -1,20 +1,4 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Mock implementations for @invertase/firebaseui-core to avoid ESM issues in tests +// Mock implementations for @firebase-oss/ui-core to avoid ESM issues in tests export const sendPasswordResetEmail = jest.fn(); export const sendSignInLinkToEmail = jest.fn(); export const completeEmailLinkSignIn = jest.fn(); @@ -168,7 +152,7 @@ export const injectRedirectError = jest.fn().mockImplementation(() => { return () => undefined; }); -// TODO(ehesp): Unfortunately, we cannot use the real schemas here because of the ESM-only dependency on nanostores in @invertase/firebaseui-core - this is a little +// TODO(ehesp): Unfortunately, we cannot use the real schemas here because of the ESM-only dependency on nanostores in @firebase-oss/ui-core - this is a little // risky as schema updates and tests need aligning, but this is a workaround for now. export const createForgotPasswordAuthFormSchema = jest.fn(() => { diff --git a/packages/angular/src/public-api.ts b/packages/angular/src/public-api.ts index 1836ee38b..78d53fc82 100644 --- a/packages/angular/src/public-api.ts +++ b/packages/angular/src/public-api.ts @@ -15,7 +15,7 @@ */ import { isDevMode } from "@angular/core"; -import { registerFramework } from "@invertase/firebaseui-core"; +import { registerFramework } from "@firebase-oss/ui-core"; export { EmailLinkAuthFormComponent } from "./lib/auth/forms/email-link-auth-form"; export { ForgotPasswordAuthFormComponent } from "./lib/auth/forms/forgot-password-auth-form"; diff --git a/packages/angular/tsconfig.json b/packages/angular/tsconfig.json index 62d27df3e..217f1fb49 100644 --- a/packages/angular/tsconfig.json +++ b/packages/angular/tsconfig.json @@ -8,9 +8,9 @@ "paths": { "~/*": ["./src/*"], "~/tests/*": ["./tests/*"], - "@invertase/firebaseui-core": ["../core/src/index.ts"], - "@invertase/firebaseui-translations": ["../translations/src/index.ts"], - "@invertase/firebaseui-styles": ["../styles/src/index.ts"] + "@firebase-oss/ui-core": ["../core/src/index.ts"], + "@firebase-oss/ui-translations": ["../translations/src/index.ts"], + "@firebase-oss/ui-styles": ["../styles/src/index.ts"] } }, "include": ["src", "tests", "jest.config.ts", "setup-test.ts"] diff --git a/packages/angular/tsconfig.spec.json b/packages/angular/tsconfig.spec.json index 1dadd203e..1af6e0e30 100644 --- a/packages/angular/tsconfig.spec.json +++ b/packages/angular/tsconfig.spec.json @@ -6,8 +6,8 @@ "types": ["vitest/globals", "node"], "paths": { "~/tests/*": ["./tests/*"], - "@invertase/firebaseui-core": ["../core/src/index.ts"], - "@invertase/firebaseui-styles": ["../styles/src/index.ts"] + "@firebase-oss/ui-core": ["../core/src/index.ts"], + "@firebase-oss/ui-styles": ["../styles/src/index.ts"] } }, "files": ["setup-test.ts"], diff --git a/packages/core/GEMINI.md b/packages/core/GEMINI.md index f7d545f4f..9d6fb5600 100644 --- a/packages/core/GEMINI.md +++ b/packages/core/GEMINI.md @@ -1,18 +1,18 @@ # Firebase UI Core -This document provides context for the `@invertase/firebaseui-core` package. +This document provides context for the `@firebase-oss/ui-core` package. ## Overview -The `@invertase/firebaseui-core` package is the framework-agnostic core of the Firebase UI for Web library. It provides a set of functions and utilities for building UIs with Firebase Authentication. The core package is designed to be used by framework-specific packages like `@invertase/firebaseui-react` and `@invertase/firebaseui-angular`, but it can also be used directly to build custom UIs. +The `@firebase-oss/ui-core` package is the framework-agnostic core of the Firebase UI for Web library. It provides a set of functions and utilities for building UIs with Firebase Authentication. The core package is designed to be used by framework-specific packages like `@firebase-oss/ui-react` and `@firebase-oss/ui-angular`, but it can also be used directly to build custom UIs. ## Usage The main entry point to the core package is the `initializeUI` function. This function takes a configuration object and returns a `FirebaseUI` instance, which is a `nanostores` store that holds the configuration and state of the UI. ```typescript -import { initializeUI } from "@invertase/firebaseui-core"; -import { enUs } from "@invertase/firebaseui-translations"; +import { initializeUI } from "@firebase-oss/ui-core"; +import { enUs } from "@firebase-oss/ui-translations"; import { firebaseApp } from "./firebase"; const ui = initializeUI({ @@ -27,7 +27,7 @@ const ui = initializeUI({ The `FirebaseUI` instance can then be used to call the various authentication functions, such as `signInWithEmailAndPassword`, `createUserWithEmailAndPassword`, etc. ```typescript -import { initializeUI, signInWithEmailAndPassword } from "@invertase/firebaseui-core"; +import { initializeUI, signInWithEmailAndPassword } from "@firebase-oss/ui-core"; const ui = initializeUI({ // ... your config @@ -45,7 +45,7 @@ Behaviors are a way to customize the functionality of the Firebase UI. They are Behaviors are passed to the `initializeUI` function in the `behaviors` array. ```typescript -import { initializeUI, requireDisplayName } from "@invertase/firebaseui-core"; +import { initializeUI, requireDisplayName } from "@firebase-oss/ui-core"; const ui = initializeUI({ // ... diff --git a/packages/core/package.json b/packages/core/package.json index 2c44a22b4..aff999a99 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { - "name": "@invertase/firebaseui-core", - "version": "0.0.11", + "name": "@firebase-oss/ui-core", + "version": "0.0.1", "description": "Core authentication service for Firebase UI", "type": "module", "main": "./dist/index.cjs", @@ -51,7 +51,7 @@ "firebase": "catalog:peerDependencies" }, "dependencies": { - "@invertase/firebaseui-translations": "workspace:*", + "@firebase-oss/ui-translations": "workspace:*", "libphonenumber-js": "^1.12.23", "nanostores": "catalog:", "qrcode-generator": "^2.0.4", diff --git a/packages/core/src/config.test.ts b/packages/core/src/config.test.ts index 84bb48859..52bc5fa64 100644 --- a/packages/core/src/config.test.ts +++ b/packages/core/src/config.test.ts @@ -18,7 +18,7 @@ import { FirebaseApp } from "firebase/app"; import { Auth, MultiFactorResolver } from "firebase/auth"; import { describe, it, expect, vi, beforeEach } from "vitest"; import { initializeUI } from "./config"; -import { enUs, registerLocale } from "@invertase/firebaseui-translations"; +import { enUs, registerLocale } from "@firebase-oss/ui-translations"; import { autoUpgradeAnonymousUsers, autoAnonymousLogin } from "./behaviors"; // Mock Firebase Auth diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index b342c03a5..6fc9f3ac6 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { enUs, type RegisteredLocale } from "@invertase/firebaseui-translations"; +import { enUs, type RegisteredLocale } from "@firebase-oss/ui-translations"; import type { FirebaseApp } from "firebase/app"; import { type Auth, getAuth, getRedirectResult, type MultiFactorResolver } from "firebase/auth"; import { deepMap, type DeepMapStore, map } from "nanostores"; diff --git a/packages/core/src/errors.test.ts b/packages/core/src/errors.test.ts index c59f5b264..36ca4d2da 100644 --- a/packages/core/src/errors.test.ts +++ b/packages/core/src/errors.test.ts @@ -19,7 +19,7 @@ import { FirebaseError } from "firebase/app"; import { Auth, AuthCredential, MultiFactorResolver } from "firebase/auth"; import { FirebaseUIError, handleFirebaseError } from "./errors"; import { createMockUI } from "~/tests/utils"; -import { ERROR_CODE_MAP } from "@invertase/firebaseui-translations"; +import { ERROR_CODE_MAP } from "@firebase-oss/ui-translations"; vi.mock("./translations", () => ({ getTranslation: vi.fn(), diff --git a/packages/core/src/errors.ts b/packages/core/src/errors.ts index ec1fe1e7c..a2633f224 100644 --- a/packages/core/src/errors.ts +++ b/packages/core/src/errors.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { ERROR_CODE_MAP, type ErrorCode } from "@invertase/firebaseui-translations"; +import { ERROR_CODE_MAP, type ErrorCode } from "@firebase-oss/ui-translations"; import { FirebaseError } from "firebase/app"; import { type AuthCredential, getMultiFactorResolver, type MultiFactorError } from "firebase/auth"; import { type FirebaseUI } from "./config"; diff --git a/packages/core/src/schemas.test.ts b/packages/core/src/schemas.test.ts index 4f215193d..45b07c75b 100644 --- a/packages/core/src/schemas.test.ts +++ b/packages/core/src/schemas.test.ts @@ -25,7 +25,7 @@ import { createSignInAuthFormSchema, createSignUpAuthFormSchema, } from "./schemas"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { RecaptchaVerifier } from "firebase/auth"; describe("createSignInAuthFormSchema", () => { diff --git a/packages/core/src/translations.test.ts b/packages/core/src/translations.test.ts index 62cd98362..727db0712 100644 --- a/packages/core/src/translations.test.ts +++ b/packages/core/src/translations.test.ts @@ -17,12 +17,12 @@ import { describe, expect, it, vi } from "vitest"; // Mock the translations module first -vi.mock("@invertase/firebaseui-translations", async (original) => ({ +vi.mock("@firebase-oss/ui-translations", async (original) => ({ ...(await original()), getTranslation: vi.fn(), })); -import { getTranslation as _getTranslation, registerLocale } from "@invertase/firebaseui-translations"; +import { getTranslation as _getTranslation, registerLocale } from "@firebase-oss/ui-translations"; import { getTranslation } from "./translations"; import { createMockUI } from "~/tests/utils"; diff --git a/packages/core/src/translations.ts b/packages/core/src/translations.ts index f8dd6c56f..0bf63ecee 100644 --- a/packages/core/src/translations.ts +++ b/packages/core/src/translations.ts @@ -18,7 +18,7 @@ import { getTranslation as _getTranslation, type TranslationCategory, type TranslationKey, -} from "@invertase/firebaseui-translations"; +} from "@firebase-oss/ui-translations"; import { type FirebaseUI } from "./config"; /** diff --git a/packages/core/tests/utils.ts b/packages/core/tests/utils.ts index 28b573968..fa5e6daff 100644 --- a/packages/core/tests/utils.ts +++ b/packages/core/tests/utils.ts @@ -18,7 +18,7 @@ import { vi } from "vitest"; import type { FirebaseApp } from "firebase/app"; import type { Auth } from "firebase/auth"; -import { enUs } from "@invertase/firebaseui-translations"; +import { enUs } from "@firebase-oss/ui-translations"; import { FirebaseUI } from "../src/config"; export function createMockUI(overrides?: Partial): FirebaseUI { diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 8932418fd..8a3a3e61b 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -6,7 +6,7 @@ "paths": { "~/*": ["./src/*"], "~/tests/*": ["./tests/*"], - "@invertase/firebaseui-translations": ["../translations/src/index.ts"] + "@firebase-oss/ui-translations": ["../translations/src/index.ts"] } }, "include": ["src", "vitest.config.ts", "tsup.config.ts"] diff --git a/packages/core/vite.config.ts b/packages/core/vite.config.ts index aee7ce7f8..901c005c7 100644 --- a/packages/core/vite.config.ts +++ b/packages/core/vite.config.ts @@ -22,8 +22,8 @@ import { fileURLToPath } from "node:url"; export default defineConfig({ resolve: { alias: { - "@invertase/firebaseui-styles": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../styles/src"), - "@invertase/firebaseui-translations": path.resolve( + "@firebase-oss/ui-styles": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../styles/src"), + "@firebase-oss/ui-translations": path.resolve( path.dirname(fileURLToPath(import.meta.url)), "../translations/src" ), diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.ts index b1c380a5e..1de112cfa 100644 --- a/packages/core/vitest.config.ts +++ b/packages/core/vitest.config.ts @@ -19,7 +19,7 @@ import viteConfig from "./vite.config"; export default mergeConfig(viteConfig, { test: { - name: "@invertase/firebaseui-core", + name: "@firebase-oss/ui-core", environment: "jsdom", exclude: ["node_modules/**/*", "dist/**/*"], }, diff --git a/packages/react/GEMINI.md b/packages/react/GEMINI.md index e273aa5d1..4325d48fa 100644 --- a/packages/react/GEMINI.md +++ b/packages/react/GEMINI.md @@ -1,10 +1,10 @@ # Firebase UI React -This document provides context for the `@invertase/firebaseui-react` package. +This document provides context for the `@firebase-oss/ui-react` package. ## Overview -The `@invertase/firebaseui-react` package provides a set of React components and hooks to integrate Firebase UI for Web into a React application. It builds on top of `@invertase/firebaseui-core` and `@invertase/firebaseui-styles` to provide a seamless integration with the React ecosystem. +The `@firebase-oss/ui-react` package provides a set of React components and hooks to integrate Firebase UI for Web into a React application. It builds on top of `@firebase-oss/ui-core` and `@firebase-oss/ui-styles` to provide a seamless integration with the React ecosystem. The package offers two main ways to build your UI: @@ -18,9 +18,9 @@ To use the React package, you must first initialize Firebase UI using `initializ ```tsx // In your main App.tsx or a similar entry point -import { initializeUI } from "@invertase/firebaseui-core"; -import { enUs } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { initializeUI } from "@firebase-oss/ui-core"; +import { enUs } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { firebaseApp } from "./firebase"; // Your firebase config // 1. Initialize the UI @@ -48,7 +48,7 @@ The package includes several pre-built "screen" components for a quick setup. Th **Example: Sign-In Screen** ```tsx -import { SignInScreen } from "@invertase/firebaseui-react"; +import { SignInScreen } from "@firebase-oss/ui-react"; function MySignInPage() { return ; @@ -68,14 +68,14 @@ The main hook is `useUI()`. It returns the entire UI state object from the under **Example: Custom Button** ```tsx -import { useUI } from "@invertase/firebaseui-react"; -import { signInWithEmailAndPassword } from "@invertase/firebaseui-core"; +import { useUI } from "@firebase-oss/ui-react"; +import { signInWithEmailAndPassword } from "@firebase-oss/ui-core"; function CustomSignInButton() { const ui = useUI(); const handleClick = () => { - // Functions from @invertase/firebaseui-core require the `ui` instance + // Functions from @firebase-oss/ui-core require the `ui` instance signInWithEmailAndPassword(ui, "user@example.com", "password"); }; diff --git a/packages/react/README.md b/packages/react/README.md index ceac7dcad..017053015 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -1,4 +1,4 @@ -# @invertase/firebaseui-react +# @firebase-oss/ui-react This package contains the React components for the FirebaseUI. @@ -7,26 +7,26 @@ This package contains the React components for the FirebaseUI. Install the package from NPM: ```bash -npm install @invertase/firebaseui-react +npm install @firebase-oss/ui-react ``` ## Usage ### Importing styles -To use the components, you need to import the styles from the `@invertase/firebaseui-styles` package. +To use the components, you need to import the styles from the `@firebase-oss/ui-styles` package. If using Tailwind CSS, you can import the styles directly into your project. ```css @import "tailwindcss"; -@import "@invertase/firebaseui-styles/src/base.css"; +@import "@firebase-oss/ui-styles/tailwind"; ``` Alternatively, you can import the fully compiled CSS file into your project. ```tsx -import "@invertase/firebaseui-styles/dist.css"; +import "@firebase-oss/ui-styles/dist.css"; ``` ### Initializing the UI @@ -42,7 +42,7 @@ const app = initializeApp({ ... }); Then, initialize the FirebaseUI with the configuration: ```tsx -import { initializeUI } from "@invertase/firebaseui-react"; +import { initializeUI } from "@firebase-oss/ui-react"; const ui = initializeUI({ app, @@ -52,7 +52,7 @@ const ui = initializeUI({ Finally, wrap your app in the `ConfigProvider` component: ```tsx -import { ConfigProvider } from "@invertase/firebaseui-react"; +import { ConfigProvider } from "@firebase-oss/ui-react"; createRoot(document.getElementById("root")!).render( @@ -65,10 +65,10 @@ createRoot(document.getElementById("root")!).render( ### Importing components -To use the components, you need to import the components from the `@invertase/firebaseui-react` package. +To use the components, you need to import the components from the `@firebase-oss/ui-react` package. ```tsx -import { SignInAuthScreen, GoogleSignInButton } from "@invertase/firebaseui-react"; +import { SignInAuthScreen, GoogleSignInButton } from "@firebase-oss/ui-react"; function App() { return ( diff --git a/packages/react/package.json b/packages/react/package.json index 6afc75d0f..e72c61ebc 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { - "name": "@invertase/firebaseui-react", - "version": "0.0.10", + "name": "@firebase-oss/ui-react", + "version": "0.0.1", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.js", @@ -42,8 +42,8 @@ "react-dom": "catalog:peerDependencies" }, "dependencies": { - "@invertase/firebaseui-core": "workspace:*", - "@invertase/firebaseui-styles": "workspace:*", + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-styles": "workspace:*", "@nanostores/react": "^1.0.0", "@radix-ui/react-slot": "^1.2.3", "@tanstack/react-form": "1.20.0", @@ -52,7 +52,7 @@ "zod": "catalog:" }, "devDependencies": { - "@invertase/firebaseui-translations": "workspace:*", + "@firebase-oss/ui-translations": "workspace:*", "@testing-library/jest-dom": "catalog:", "@testing-library/react": "catalog:", "@types/jsdom": "catalog:", diff --git a/packages/react/src/auth/forms/email-link-auth-form.test.tsx b/packages/react/src/auth/forms/email-link-auth-form.test.tsx index 2eb86a535..4e358cc67 100644 --- a/packages/react/src/auth/forms/email-link-auth-form.test.tsx +++ b/packages/react/src/auth/forms/email-link-auth-form.test.tsx @@ -23,9 +23,9 @@ import { useEmailLinkAuthFormCompleteSignIn, } from "./email-link-auth-form"; import { act } from "react"; -import { sendSignInLinkToEmail, completeEmailLinkSignIn } from "@invertase/firebaseui-core"; +import { sendSignInLinkToEmail, completeEmailLinkSignIn } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { FirebaseUIProvider } from "~/context"; import type { UserCredential } from "firebase/auth"; @@ -37,8 +37,8 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, sendSignInLinkToEmail: vi.fn(), diff --git a/packages/react/src/auth/forms/email-link-auth-form.tsx b/packages/react/src/auth/forms/email-link-auth-form.tsx index c23bad858..028f25df5 100644 --- a/packages/react/src/auth/forms/email-link-auth-form.tsx +++ b/packages/react/src/auth/forms/email-link-auth-form.tsx @@ -16,12 +16,7 @@ "use client"; -import { - FirebaseUIError, - completeEmailLinkSignIn, - getTranslation, - sendSignInLinkToEmail, -} from "@invertase/firebaseui-core"; +import { FirebaseUIError, completeEmailLinkSignIn, getTranslation, sendSignInLinkToEmail } from "@firebase-oss/ui-core"; import type { UserCredential } from "firebase/auth"; import { useEmailLinkAuthFormSchema, useUI } from "~/hooks"; import { form } from "~/components/form"; diff --git a/packages/react/src/auth/forms/forgot-password-auth-form.test.tsx b/packages/react/src/auth/forms/forgot-password-auth-form.test.tsx index e51320b4c..3fe18a8f1 100644 --- a/packages/react/src/auth/forms/forgot-password-auth-form.test.tsx +++ b/packages/react/src/auth/forms/forgot-password-auth-form.test.tsx @@ -22,9 +22,9 @@ import { useForgotPasswordAuthFormAction, } from "./forgot-password-auth-form"; import { act } from "react"; -import { sendPasswordResetEmail } from "@invertase/firebaseui-core"; +import { sendPasswordResetEmail } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { FirebaseUIProvider } from "~/context"; vi.mock("firebase/auth", async () => { @@ -35,8 +35,8 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, sendPasswordResetEmail: vi.fn(), diff --git a/packages/react/src/auth/forms/forgot-password-auth-form.tsx b/packages/react/src/auth/forms/forgot-password-auth-form.tsx index f6d84a78d..ff6937edc 100644 --- a/packages/react/src/auth/forms/forgot-password-auth-form.tsx +++ b/packages/react/src/auth/forms/forgot-password-auth-form.tsx @@ -16,7 +16,7 @@ "use client"; -import { FirebaseUIError, getTranslation, sendPasswordResetEmail } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation, sendPasswordResetEmail } from "@firebase-oss/ui-core"; import { useForgotPasswordAuthFormSchema, useUI } from "~/hooks"; import { form } from "~/components/form"; import { Policies } from "~/components/policies"; diff --git a/packages/react/src/auth/forms/mfa/sms-multi-factor-assertion-form.test.tsx b/packages/react/src/auth/forms/mfa/sms-multi-factor-assertion-form.test.tsx index 3b9842317..8126903af 100644 --- a/packages/react/src/auth/forms/mfa/sms-multi-factor-assertion-form.test.tsx +++ b/packages/react/src/auth/forms/mfa/sms-multi-factor-assertion-form.test.tsx @@ -22,13 +22,13 @@ import { useSmsMultiFactorAssertionVerifyFormAction, } from "./sms-multi-factor-assertion-form"; import { act } from "react"; -import { verifyPhoneNumber, signInWithMultiFactorAssertion } from "@invertase/firebaseui-core"; +import { verifyPhoneNumber, signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { PhoneAuthProvider, PhoneMultiFactorGenerator } from "firebase/auth"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, verifyPhoneNumber: vi.fn(), diff --git a/packages/react/src/auth/forms/mfa/sms-multi-factor-assertion-form.tsx b/packages/react/src/auth/forms/mfa/sms-multi-factor-assertion-form.tsx index 904cccd3d..af6389799 100644 --- a/packages/react/src/auth/forms/mfa/sms-multi-factor-assertion-form.tsx +++ b/packages/react/src/auth/forms/mfa/sms-multi-factor-assertion-form.tsx @@ -14,22 +14,23 @@ * limitations under the License. */ -import { useCallback, useRef, useState } from "react"; import { PhoneAuthProvider, PhoneMultiFactorGenerator, - type UserCredential, type MultiFactorInfo, type RecaptchaVerifier, + type UserCredential, } from "firebase/auth"; +import { useCallback, useRef, useState } from "react"; import { - signInWithMultiFactorAssertion, FirebaseUIError, getTranslation, + signInWithMultiFactorAssertion, verifyPhoneNumber, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { form } from "~/components/form"; + import { useMultiFactorPhoneAuthVerifyFormSchema, useRecaptchaVerifier, useUI } from "~/hooks"; type PhoneMultiFactorInfo = MultiFactorInfo & { diff --git a/packages/react/src/auth/forms/mfa/sms-multi-factor-enrollment-form.test.tsx b/packages/react/src/auth/forms/mfa/sms-multi-factor-enrollment-form.test.tsx index a1f4ab5cb..0e884cf86 100644 --- a/packages/react/src/auth/forms/mfa/sms-multi-factor-enrollment-form.test.tsx +++ b/packages/react/src/auth/forms/mfa/sms-multi-factor-enrollment-form.test.tsx @@ -23,13 +23,13 @@ import { MultiFactorEnrollmentVerifyPhoneNumberForm, } from "./sms-multi-factor-enrollment-form"; import { act } from "react"; -import { verifyPhoneNumber, enrollWithMultiFactorAssertion } from "@invertase/firebaseui-core"; +import { verifyPhoneNumber, enrollWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { PhoneAuthProvider, PhoneMultiFactorGenerator } from "firebase/auth"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, verifyPhoneNumber: vi.fn(), diff --git a/packages/react/src/auth/forms/mfa/sms-multi-factor-enrollment-form.tsx b/packages/react/src/auth/forms/mfa/sms-multi-factor-enrollment-form.tsx index 4c9d5157c..3b3839557 100644 --- a/packages/react/src/auth/forms/mfa/sms-multi-factor-enrollment-form.tsx +++ b/packages/react/src/auth/forms/mfa/sms-multi-factor-enrollment-form.tsx @@ -22,7 +22,7 @@ import { formatPhoneNumber, getTranslation, verifyPhoneNumber, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { CountrySelector, type CountrySelectorRef } from "~/components/country-selector"; import { form } from "~/components/form"; import { diff --git a/packages/react/src/auth/forms/mfa/totp-multi-factor-assertion-form.test.tsx b/packages/react/src/auth/forms/mfa/totp-multi-factor-assertion-form.test.tsx index de7a5d145..9ac9fcce1 100644 --- a/packages/react/src/auth/forms/mfa/totp-multi-factor-assertion-form.test.tsx +++ b/packages/react/src/auth/forms/mfa/totp-multi-factor-assertion-form.test.tsx @@ -38,13 +38,13 @@ import { useTotpMultiFactorAssertionFormAction, } from "./totp-multi-factor-assertion-form"; import { act } from "react"; -import { signInWithMultiFactorAssertion } from "@invertase/firebaseui-core"; +import { signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { TotpMultiFactorGenerator } from "firebase/auth"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, signInWithMultiFactorAssertion: vi.fn(), diff --git a/packages/react/src/auth/forms/mfa/totp-multi-factor-assertion-form.tsx b/packages/react/src/auth/forms/mfa/totp-multi-factor-assertion-form.tsx index ad9896982..ccc661bf7 100644 --- a/packages/react/src/auth/forms/mfa/totp-multi-factor-assertion-form.tsx +++ b/packages/react/src/auth/forms/mfa/totp-multi-factor-assertion-form.tsx @@ -14,9 +14,9 @@ * limitations under the License. */ -import { useCallback } from "react"; +import { FirebaseUIError, getTranslation, signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { TotpMultiFactorGenerator, type MultiFactorInfo, type UserCredential } from "firebase/auth"; -import { signInWithMultiFactorAssertion, FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { useCallback } from "react"; import { form } from "~/components/form"; import { useMultiFactorTotpAuthVerifyFormSchema, useUI } from "~/hooks"; diff --git a/packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.test.tsx b/packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.test.tsx index b92be46d0..f2f274ddf 100644 --- a/packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.test.tsx +++ b/packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.test.tsx @@ -23,13 +23,13 @@ import { MultiFactorEnrollmentVerifyTotpForm, } from "./totp-multi-factor-enrollment-form"; import { act } from "react"; -import { generateTotpSecret, generateTotpQrCode, enrollWithMultiFactorAssertion } from "@invertase/firebaseui-core"; +import { generateTotpSecret, generateTotpQrCode, enrollWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { TotpMultiFactorGenerator } from "firebase/auth"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, generateTotpSecret: vi.fn(), diff --git a/packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.tsx b/packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.tsx index d800d48d5..6581875ab 100644 --- a/packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.tsx +++ b/packages/react/src/auth/forms/mfa/totp-multi-factor-enrollment-form.tsx @@ -22,7 +22,7 @@ import { generateTotpQrCode, generateTotpSecret, getTranslation, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { form } from "~/components/form"; import { useMultiFactorTotpAuthNumberFormSchema, useMultiFactorTotpAuthVerifyFormSchema, useUI } from "~/hooks"; diff --git a/packages/react/src/auth/forms/multi-factor-auth-assertion-form.test.tsx b/packages/react/src/auth/forms/multi-factor-auth-assertion-form.test.tsx index 178120043..aa92a0d89 100644 --- a/packages/react/src/auth/forms/multi-factor-auth-assertion-form.test.tsx +++ b/packages/react/src/auth/forms/multi-factor-auth-assertion-form.test.tsx @@ -13,15 +13,15 @@ * limitations under the License. */ -import { describe, it, expect, vi, afterEach } from "vitest"; -import { render, screen, fireEvent, cleanup, renderHook } from "@testing-library/react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { cleanup, fireEvent, render, renderHook, screen } from "@testing-library/react"; +import { MultiFactorResolver, PhoneMultiFactorGenerator, TotpMultiFactorGenerator } from "firebase/auth"; +import { afterEach, describe, expect, it, vi } from "vitest"; import { MultiFactorAuthAssertionForm, useMultiFactorAssertionCleanup, } from "~/auth/forms/multi-factor-auth-assertion-form"; -import { CreateFirebaseUIProvider, createMockUI, createFirebaseUIProvider } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FactorId, MultiFactorResolver, PhoneMultiFactorGenerator, TotpMultiFactorGenerator } from "firebase/auth"; +import { CreateFirebaseUIProvider, createFirebaseUIProvider, createMockUI } from "~/tests/utils"; vi.mock("~/auth/forms/mfa/sms-multi-factor-assertion-form", () => ({ SmsMultiFactorAssertionForm: ({ onSuccess }: { onSuccess?: (credential: any) => void }) => ( diff --git a/packages/react/src/auth/forms/multi-factor-auth-assertion-form.tsx b/packages/react/src/auth/forms/multi-factor-auth-assertion-form.tsx index 7135f1991..a0c2b23c6 100644 --- a/packages/react/src/auth/forms/multi-factor-auth-assertion-form.tsx +++ b/packages/react/src/auth/forms/multi-factor-auth-assertion-form.tsx @@ -25,7 +25,7 @@ import { useUI } from "~/hooks"; import { TotpMultiFactorAssertionForm } from "../forms/mfa/totp-multi-factor-assertion-form"; import { SmsMultiFactorAssertionForm } from "../forms/mfa/sms-multi-factor-assertion-form"; import { Button } from "~/components/button"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; /** Props for the MultiFactorAuthAssertionForm component. */ export type MultiFactorAuthAssertionFormProps = { diff --git a/packages/react/src/auth/forms/multi-factor-auth-enrollment-form.test.tsx b/packages/react/src/auth/forms/multi-factor-auth-enrollment-form.test.tsx index e73644171..5cf8ea576 100644 --- a/packages/react/src/auth/forms/multi-factor-auth-enrollment-form.test.tsx +++ b/packages/react/src/auth/forms/multi-factor-auth-enrollment-form.test.tsx @@ -18,7 +18,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup } from "@testing-library/react"; import { MultiFactorAuthEnrollmentForm } from "./multi-factor-auth-enrollment-form"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { FactorId } from "firebase/auth"; vi.mock("./mfa/sms-multi-factor-enrollment-form", () => ({ diff --git a/packages/react/src/auth/forms/multi-factor-auth-enrollment-form.tsx b/packages/react/src/auth/forms/multi-factor-auth-enrollment-form.tsx index 6b9ec9ce2..6077d1f2f 100644 --- a/packages/react/src/auth/forms/multi-factor-auth-enrollment-form.tsx +++ b/packages/react/src/auth/forms/multi-factor-auth-enrollment-form.tsx @@ -15,7 +15,7 @@ */ import { FactorId } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { type ComponentProps, useState } from "react"; import { SmsMultiFactorEnrollmentForm } from "./mfa/sms-multi-factor-enrollment-form"; diff --git a/packages/react/src/auth/forms/phone-auth-form.test.tsx b/packages/react/src/auth/forms/phone-auth-form.test.tsx index 619f7a171..7bd9d6fb0 100644 --- a/packages/react/src/auth/forms/phone-auth-form.test.tsx +++ b/packages/react/src/auth/forms/phone-auth-form.test.tsx @@ -41,8 +41,8 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, verifyPhoneNumber: vi.fn(), @@ -74,9 +74,9 @@ vi.mock("~/hooks", async (importOriginal) => { }; }); -import { verifyPhoneNumber, confirmPhoneNumber } from "@invertase/firebaseui-core"; +import { verifyPhoneNumber, confirmPhoneNumber } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { FirebaseUIProvider } from "~/context"; vi.mock("~/components/country-selector", () => ({ diff --git a/packages/react/src/auth/forms/phone-auth-form.tsx b/packages/react/src/auth/forms/phone-auth-form.tsx index b6c29cbc6..0553c4573 100644 --- a/packages/react/src/auth/forms/phone-auth-form.tsx +++ b/packages/react/src/auth/forms/phone-auth-form.tsx @@ -22,7 +22,7 @@ import { getTranslation, verifyPhoneNumber, confirmPhoneNumber, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { type RecaptchaVerifier, type UserCredential } from "firebase/auth"; import { useCallback, useRef, useState } from "react"; import { usePhoneAuthNumberFormSchema, usePhoneAuthVerifyFormSchema, useRecaptchaVerifier, useUI } from "~/hooks"; diff --git a/packages/react/src/auth/forms/sign-in-auth-form.test.tsx b/packages/react/src/auth/forms/sign-in-auth-form.test.tsx index de9ffa535..fff236399 100644 --- a/packages/react/src/auth/forms/sign-in-auth-form.test.tsx +++ b/packages/react/src/auth/forms/sign-in-auth-form.test.tsx @@ -18,9 +18,9 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, renderHook, cleanup } from "@testing-library/react"; import { SignInAuthForm, useSignInAuthForm, useSignInAuthFormAction } from "./sign-in-auth-form"; import { act } from "react"; -import { signInWithEmailAndPassword } from "@invertase/firebaseui-core"; +import { signInWithEmailAndPassword } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import type { UserCredential } from "firebase/auth"; import { FirebaseUIProvider } from "~/context"; @@ -32,8 +32,8 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, signInWithEmailAndPassword: vi.fn(), diff --git a/packages/react/src/auth/forms/sign-in-auth-form.tsx b/packages/react/src/auth/forms/sign-in-auth-form.tsx index 1812ccfd5..488a0462d 100644 --- a/packages/react/src/auth/forms/sign-in-auth-form.tsx +++ b/packages/react/src/auth/forms/sign-in-auth-form.tsx @@ -16,7 +16,7 @@ "use client"; -import { FirebaseUIError, getTranslation, signInWithEmailAndPassword } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation, signInWithEmailAndPassword } from "@firebase-oss/ui-core"; import type { UserCredential } from "firebase/auth"; import { useSignInAuthFormSchema, useUI } from "~/hooks"; import { form } from "~/components/form"; diff --git a/packages/react/src/auth/forms/sign-up-auth-form.test.tsx b/packages/react/src/auth/forms/sign-up-auth-form.test.tsx index 4a2df616c..0d3cdf53b 100644 --- a/packages/react/src/auth/forms/sign-up-auth-form.test.tsx +++ b/packages/react/src/auth/forms/sign-up-auth-form.test.tsx @@ -18,9 +18,9 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, renderHook, cleanup } from "@testing-library/react"; import { SignUpAuthForm, useSignUpAuthForm, useSignUpAuthFormAction, useRequireDisplayName } from "./sign-up-auth-form"; import { act } from "react"; -import { createUserWithEmailAndPassword } from "@invertase/firebaseui-core"; +import { createUserWithEmailAndPassword } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import type { UserCredential } from "firebase/auth"; import { FirebaseUIProvider } from "~/context"; @@ -32,8 +32,8 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, createUserWithEmailAndPassword: vi.fn(), diff --git a/packages/react/src/auth/forms/sign-up-auth-form.tsx b/packages/react/src/auth/forms/sign-up-auth-form.tsx index f40c4e382..b2eab4209 100644 --- a/packages/react/src/auth/forms/sign-up-auth-form.tsx +++ b/packages/react/src/auth/forms/sign-up-auth-form.tsx @@ -16,12 +16,7 @@ "use client"; -import { - FirebaseUIError, - getTranslation, - createUserWithEmailAndPassword, - hasBehavior, -} from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation, createUserWithEmailAndPassword, hasBehavior } from "@firebase-oss/ui-core"; import type { UserCredential } from "firebase/auth"; import { useSignUpAuthFormSchema, useUI } from "~/hooks"; import { form } from "~/components/form"; diff --git a/packages/react/src/auth/oauth/apple-sign-in-button.test.tsx b/packages/react/src/auth/oauth/apple-sign-in-button.test.tsx index 6165c5d96..03d332fbb 100644 --- a/packages/react/src/auth/oauth/apple-sign-in-button.test.tsx +++ b/packages/react/src/auth/oauth/apple-sign-in-button.test.tsx @@ -17,9 +17,9 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup, fireEvent, waitFor } from "@testing-library/react"; import { AppleLogo, AppleSignInButton } from "./apple-sign-in-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { OAuthProvider } from "firebase/auth"; -import { signInWithProvider } from "@invertase/firebaseui-core"; +import { signInWithProvider } from "@firebase-oss/ui-core"; import type { UserCredential } from "firebase/auth"; vi.mock("firebase/auth", async () => { @@ -35,7 +35,7 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), diff --git a/packages/react/src/auth/oauth/apple-sign-in-button.tsx b/packages/react/src/auth/oauth/apple-sign-in-button.tsx index 18c970d3b..aac68219d 100644 --- a/packages/react/src/auth/oauth/apple-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/apple-sign-in-button.tsx @@ -16,12 +16,12 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { OAuthProvider, type UserCredential } from "firebase/auth"; -import { useUI } from "~/hooks"; -import { OAuthButton } from "./oauth-button"; import AppleSvgLogo from "~/components/logos/apple/Logo"; +import { useUI } from "~/hooks"; import { cn } from "~/utils/cn"; +import { OAuthButton } from "./oauth-button"; /** Props for the AppleSignInButton component. */ export type AppleSignInButtonProps = { diff --git a/packages/react/src/auth/oauth/facebook-sign-in-button.test.tsx b/packages/react/src/auth/oauth/facebook-sign-in-button.test.tsx index 595042cbb..be0cc3416 100644 --- a/packages/react/src/auth/oauth/facebook-sign-in-button.test.tsx +++ b/packages/react/src/auth/oauth/facebook-sign-in-button.test.tsx @@ -13,13 +13,13 @@ * limitations under the License. */ -import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; -import { render, screen, cleanup, fireEvent, waitFor } from "@testing-library/react"; -import { FacebookLogo, FacebookSignInButton } from "./facebook-sign-in-button"; -import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { signInWithProvider } from "@invertase/firebaseui-core"; +import { signInWithProvider } from "@firebase-oss/ui-core"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react"; import type { UserCredential } from "firebase/auth"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; +import { FacebookLogo, FacebookSignInButton } from "./facebook-sign-in-button"; vi.mock("firebase/auth", async () => { const actual = await vi.importActual("firebase/auth"); @@ -34,7 +34,7 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), diff --git a/packages/react/src/auth/oauth/facebook-sign-in-button.tsx b/packages/react/src/auth/oauth/facebook-sign-in-button.tsx index 6e5d50841..ee524ffc4 100644 --- a/packages/react/src/auth/oauth/facebook-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/facebook-sign-in-button.tsx @@ -16,12 +16,12 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { FacebookAuthProvider, type UserCredential } from "firebase/auth"; -import { useUI } from "~/hooks"; -import { OAuthButton } from "./oauth-button"; import FacebookSvgLogo from "~/components/logos/facebook/Logo"; +import { useUI } from "~/hooks"; import { cn } from "~/utils/cn"; +import { OAuthButton } from "./oauth-button"; /** Props for the FacebookSignInButton component. */ export type FacebookSignInButtonProps = { diff --git a/packages/react/src/auth/oauth/github-sign-in-button.test.tsx b/packages/react/src/auth/oauth/github-sign-in-button.test.tsx index 7fe80b333..06b4d56ec 100644 --- a/packages/react/src/auth/oauth/github-sign-in-button.test.tsx +++ b/packages/react/src/auth/oauth/github-sign-in-button.test.tsx @@ -13,13 +13,13 @@ * limitations under the License. */ -import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; -import { render, screen, cleanup, fireEvent, waitFor } from "@testing-library/react"; -import { GitHubLogo, GitHubSignInButton } from "./github-sign-in-button"; -import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { signInWithProvider } from "@invertase/firebaseui-core"; +import { signInWithProvider } from "@firebase-oss/ui-core"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react"; import type { UserCredential } from "firebase/auth"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; +import { GitHubLogo, GitHubSignInButton } from "./github-sign-in-button"; vi.mock("firebase/auth", async () => { const actual = await vi.importActual("firebase/auth"); @@ -34,7 +34,7 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), diff --git a/packages/react/src/auth/oauth/github-sign-in-button.tsx b/packages/react/src/auth/oauth/github-sign-in-button.tsx index 41ae37a2a..33c7041d0 100644 --- a/packages/react/src/auth/oauth/github-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/github-sign-in-button.tsx @@ -16,12 +16,12 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { GithubAuthProvider, type UserCredential } from "firebase/auth"; -import { useUI } from "~/hooks"; -import { OAuthButton } from "./oauth-button"; import GitHubSvgLogo from "~/components/logos/github/Logo"; +import { useUI } from "~/hooks"; import { cn } from "~/utils/cn"; +import { OAuthButton } from "./oauth-button"; /** Props for the GitHubSignInButton component. */ export type GitHubSignInButtonProps = { diff --git a/packages/react/src/auth/oauth/google-sign-in-button.test.tsx b/packages/react/src/auth/oauth/google-sign-in-button.test.tsx index c9d1f18a5..1a11a3044 100644 --- a/packages/react/src/auth/oauth/google-sign-in-button.test.tsx +++ b/packages/react/src/auth/oauth/google-sign-in-button.test.tsx @@ -13,13 +13,13 @@ * limitations under the License. */ -import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; -import { render, screen, cleanup, fireEvent, waitFor } from "@testing-library/react"; -import { GoogleLogo, GoogleSignInButton } from "./google-sign-in-button"; -import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { signInWithProvider } from "@invertase/firebaseui-core"; +import { signInWithProvider } from "@firebase-oss/ui-core"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react"; import type { UserCredential } from "firebase/auth"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; +import { GoogleLogo, GoogleSignInButton } from "./google-sign-in-button"; vi.mock("firebase/auth", async () => { const actual = await vi.importActual("firebase/auth"); @@ -34,7 +34,7 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), diff --git a/packages/react/src/auth/oauth/google-sign-in-button.tsx b/packages/react/src/auth/oauth/google-sign-in-button.tsx index 37eaa2c51..33a533c56 100644 --- a/packages/react/src/auth/oauth/google-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/google-sign-in-button.tsx @@ -16,12 +16,12 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { GoogleAuthProvider, type UserCredential } from "firebase/auth"; -import { useUI } from "~/hooks"; -import { OAuthButton } from "./oauth-button"; import GoogleSvgLogo from "~/components/logos/google/Logo"; +import { useUI } from "~/hooks"; import { cn } from "~/utils/cn"; +import { OAuthButton } from "./oauth-button"; /** Props for the GoogleSignInButton component. */ export type GoogleSignInButtonProps = { diff --git a/packages/react/src/auth/oauth/microsoft-sign-in-button.test.tsx b/packages/react/src/auth/oauth/microsoft-sign-in-button.test.tsx index 3ed992392..3634e4140 100644 --- a/packages/react/src/auth/oauth/microsoft-sign-in-button.test.tsx +++ b/packages/react/src/auth/oauth/microsoft-sign-in-button.test.tsx @@ -17,9 +17,9 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup, fireEvent, waitFor } from "@testing-library/react"; import { MicrosoftLogo, MicrosoftSignInButton } from "./microsoft-sign-in-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { OAuthProvider } from "firebase/auth"; -import { signInWithProvider } from "@invertase/firebaseui-core"; +import { signInWithProvider } from "@firebase-oss/ui-core"; import type { UserCredential } from "firebase/auth"; vi.mock("firebase/auth", async () => { @@ -35,7 +35,7 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), diff --git a/packages/react/src/auth/oauth/microsoft-sign-in-button.tsx b/packages/react/src/auth/oauth/microsoft-sign-in-button.tsx index 7342a6843..af11d2921 100644 --- a/packages/react/src/auth/oauth/microsoft-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/microsoft-sign-in-button.tsx @@ -16,12 +16,12 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { OAuthProvider, type UserCredential } from "firebase/auth"; -import { useUI } from "~/hooks"; -import { OAuthButton } from "./oauth-button"; import MicrosoftSvgLogo from "~/components/logos/microsoft/Logo"; +import { useUI } from "~/hooks"; import { cn } from "~/utils/cn"; +import { OAuthButton } from "./oauth-button"; /** Props for the MicrosoftSignInButton component. */ export type MicrosoftSignInButtonProps = { diff --git a/packages/react/src/auth/oauth/oauth-button.test.tsx b/packages/react/src/auth/oauth/oauth-button.test.tsx index 209c85ae4..faf06e2d6 100644 --- a/packages/react/src/auth/oauth/oauth-button.test.tsx +++ b/packages/react/src/auth/oauth/oauth-button.test.tsx @@ -17,11 +17,11 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, fireEvent, cleanup, renderHook, act, waitFor } from "@testing-library/react"; import { OAuthButton, useSignInWithProvider } from "./oauth-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { enUs, registerLocale } from "@invertase/firebaseui-translations"; +import { enUs, registerLocale } from "@firebase-oss/ui-translations"; import type { AuthProvider, UserCredential } from "firebase/auth"; import { ComponentProps } from "react"; -import { signInWithProvider } from "@invertase/firebaseui-core"; +import { signInWithProvider } from "@firebase-oss/ui-core"; import { FirebaseError } from "firebase/app"; vi.mock("firebase/auth", async () => { @@ -32,7 +32,7 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), @@ -158,7 +158,7 @@ describe("", () => { }); it("does not call onSignIn callback when sign-in fails", async () => { - const { FirebaseUIError } = await import("@invertase/firebaseui-core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const onSignIn = vi.fn(); const ui = createMockUI(); @@ -185,7 +185,7 @@ describe("", () => { }); it("displays FirebaseUIError message when FirebaseUIError occurs", async () => { - const { FirebaseUIError } = await import("@invertase/firebaseui-core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); const mockError = new FirebaseUIError( @@ -248,7 +248,7 @@ describe("", () => { }); it("clears error when button is clicked again", async () => { - const { FirebaseUIError } = await import("@invertase/firebaseui-core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); @@ -342,7 +342,7 @@ describe("useSignInWithProvider", () => { }); it("does not call onSignIn callback when sign-in fails", async () => { - const { FirebaseUIError } = await import("@invertase/firebaseui-core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const onSignIn = vi.fn(); const ui = createMockUI(); @@ -366,7 +366,7 @@ describe("useSignInWithProvider", () => { }); it("sets error state when FirebaseUIError occurs", async () => { - const { FirebaseUIError } = await import("@invertase/firebaseui-core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); const mockError = new FirebaseUIError( @@ -422,7 +422,7 @@ describe("useSignInWithProvider", () => { }); it("clears error when callback is called again", async () => { - const { FirebaseUIError } = await import("@invertase/firebaseui-core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); diff --git a/packages/react/src/auth/oauth/oauth-button.tsx b/packages/react/src/auth/oauth/oauth-button.tsx index 83427e35d..160c9dbe0 100644 --- a/packages/react/src/auth/oauth/oauth-button.tsx +++ b/packages/react/src/auth/oauth/oauth-button.tsx @@ -16,7 +16,7 @@ "use client"; -import { FirebaseUIError, getTranslation, signInWithProvider } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation, signInWithProvider } from "@firebase-oss/ui-core"; import type { AuthProvider, UserCredential } from "firebase/auth"; import type { PropsWithChildren } from "react"; import { useCallback, useState } from "react"; diff --git a/packages/react/src/auth/oauth/twitter-sign-in-button.test.tsx b/packages/react/src/auth/oauth/twitter-sign-in-button.test.tsx index 3d940db6b..27ed1915b 100644 --- a/packages/react/src/auth/oauth/twitter-sign-in-button.test.tsx +++ b/packages/react/src/auth/oauth/twitter-sign-in-button.test.tsx @@ -13,13 +13,13 @@ * limitations under the License. */ -import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; -import { render, screen, cleanup, fireEvent, waitFor } from "@testing-library/react"; -import { TwitterLogo, TwitterSignInButton } from "./twitter-sign-in-button"; -import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { signInWithProvider } from "@invertase/firebaseui-core"; +import { signInWithProvider } from "@firebase-oss/ui-core"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react"; import type { UserCredential } from "firebase/auth"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; +import { TwitterLogo, TwitterSignInButton } from "./twitter-sign-in-button"; vi.mock("firebase/auth", async () => { const actual = await vi.importActual("firebase/auth"); @@ -34,7 +34,7 @@ vi.mock("firebase/auth", async () => { }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), diff --git a/packages/react/src/auth/oauth/twitter-sign-in-button.tsx b/packages/react/src/auth/oauth/twitter-sign-in-button.tsx index 7f14db802..9bd1c67b9 100644 --- a/packages/react/src/auth/oauth/twitter-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/twitter-sign-in-button.tsx @@ -16,12 +16,12 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { TwitterAuthProvider, type UserCredential } from "firebase/auth"; -import { useUI } from "~/hooks"; -import { OAuthButton } from "./oauth-button"; import TwitterSvgLogo from "~/components/logos/twitter/Logo"; +import { useUI } from "~/hooks"; import { cn } from "~/utils/cn"; +import { OAuthButton } from "./oauth-button"; /** Props for the TwitterSignInButton component. */ export type TwitterSignInButtonProps = { diff --git a/packages/react/src/auth/screens/email-link-auth-screen.test.tsx b/packages/react/src/auth/screens/email-link-auth-screen.test.tsx index 52734863d..b7d338b80 100644 --- a/packages/react/src/auth/screens/email-link-auth-screen.test.tsx +++ b/packages/react/src/auth/screens/email-link-auth-screen.test.tsx @@ -18,8 +18,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, cleanup, fireEvent, act } from "@testing-library/react"; import { EmailLinkAuthScreen } from "~/auth/screens/email-link-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import type { MultiFactorResolver, User } from "firebase/auth"; +import { registerLocale } from "@firebase-oss/ui-translations"; vi.mock("~/auth/forms/email-link-auth-form", () => ({ EmailLinkAuthForm: () =>
Email Link Form
, diff --git a/packages/react/src/auth/screens/email-link-auth-screen.tsx b/packages/react/src/auth/screens/email-link-auth-screen.tsx index 268a79988..9ab07d389 100644 --- a/packages/react/src/auth/screens/email-link-auth-screen.tsx +++ b/packages/react/src/auth/screens/email-link-auth-screen.tsx @@ -14,14 +14,14 @@ * limitations under the License. */ -import type { PropsWithChildren } from "react"; +import { getTranslation } from "@firebase-oss/ui-core"; import type { User } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; +import type { PropsWithChildren } from "react"; +import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card"; import { Divider } from "~/components/divider"; +import { RedirectError } from "~/components/redirect-error"; import { useOnUserAuthenticated, useUI } from "~/hooks"; -import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card"; import { EmailLinkAuthForm, type EmailLinkAuthFormProps } from "../forms/email-link-auth-form"; -import { RedirectError } from "~/components/redirect-error"; import { MultiFactorAuthAssertionScreen } from "./multi-factor-auth-assertion-screen"; /** Props for the EmailLinkAuthScreen component. */ diff --git a/packages/react/src/auth/screens/forgot-password-auth-screen.test.tsx b/packages/react/src/auth/screens/forgot-password-auth-screen.test.tsx index 8e126eb9d..badff1612 100644 --- a/packages/react/src/auth/screens/forgot-password-auth-screen.test.tsx +++ b/packages/react/src/auth/screens/forgot-password-auth-screen.test.tsx @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup } from "@testing-library/react"; import { ForgotPasswordAuthScreen } from "~/auth/screens/forgot-password-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; vi.mock("~/auth/forms/forgot-password-auth-form", () => ({ ForgotPasswordAuthForm: ({ onBackToSignInClick }: { onBackToSignInClick?: () => void }) => ( diff --git a/packages/react/src/auth/screens/forgot-password-auth-screen.tsx b/packages/react/src/auth/screens/forgot-password-auth-screen.tsx index 944fbea12..59812d49d 100644 --- a/packages/react/src/auth/screens/forgot-password-auth-screen.tsx +++ b/packages/react/src/auth/screens/forgot-password-auth-screen.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { useUI } from "~/hooks"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "../../components/card"; import { ForgotPasswordAuthForm, type ForgotPasswordAuthFormProps } from "../forms/forgot-password-auth-form"; diff --git a/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.test.tsx b/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.test.tsx index 8a0b194e3..227767514 100644 --- a/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.test.tsx +++ b/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.test.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { cleanup, render, screen } from "@testing-library/react"; import { type UserCredential } from "firebase/auth"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.tsx b/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.tsx index 79c5c3e69..c12a31813 100644 --- a/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.tsx +++ b/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card"; import { useUI } from "~/hooks"; import { diff --git a/packages/react/src/auth/screens/multi-factor-auth-enrollment-screen.test.tsx b/packages/react/src/auth/screens/multi-factor-auth-enrollment-screen.test.tsx index 702b21bc0..513a87ecf 100644 --- a/packages/react/src/auth/screens/multi-factor-auth-enrollment-screen.test.tsx +++ b/packages/react/src/auth/screens/multi-factor-auth-enrollment-screen.test.tsx @@ -18,7 +18,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { MultiFactorAuthEnrollmentScreen } from "~/auth/screens/multi-factor-auth-enrollment-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { FactorId } from "firebase/auth"; vi.mock("~/auth/forms/multi-factor-auth-enrollment-form", () => ({ diff --git a/packages/react/src/auth/screens/multi-factor-auth-enrollment-screen.tsx b/packages/react/src/auth/screens/multi-factor-auth-enrollment-screen.tsx index f76716b41..e17942460 100644 --- a/packages/react/src/auth/screens/multi-factor-auth-enrollment-screen.tsx +++ b/packages/react/src/auth/screens/multi-factor-auth-enrollment-screen.tsx @@ -1,20 +1,4 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card"; import { useUI } from "~/hooks"; import { diff --git a/packages/react/src/auth/screens/oauth-screen.test.tsx b/packages/react/src/auth/screens/oauth-screen.test.tsx index 4afcedab1..190fe36fb 100644 --- a/packages/react/src/auth/screens/oauth-screen.test.tsx +++ b/packages/react/src/auth/screens/oauth-screen.test.tsx @@ -17,8 +17,8 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, cleanup, fireEvent, act } from "@testing-library/react"; import { OAuthScreen } from "~/auth/screens/oauth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { MultiFactorResolver, type User } from "firebase/auth"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { MultiFactorResolver } from "firebase/auth"; vi.mock("~/components/policies", async (originalModule) => { const module = await originalModule(); diff --git a/packages/react/src/auth/screens/oauth-screen.tsx b/packages/react/src/auth/screens/oauth-screen.tsx index 86d551002..249ab953e 100644 --- a/packages/react/src/auth/screens/oauth-screen.tsx +++ b/packages/react/src/auth/screens/oauth-screen.tsx @@ -14,14 +14,14 @@ * limitations under the License. */ -import { getTranslation } from "@invertase/firebaseui-core"; -import { type User } from "firebase/auth"; +import { getTranslation } from "@firebase-oss/ui-core"; +import type { User } from "firebase/auth"; import { type PropsWithChildren } from "react"; -import { useOnUserAuthenticated, useUI } from "~/hooks"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card"; import { Policies } from "~/components/policies"; -import { MultiFactorAuthAssertionScreen } from "./multi-factor-auth-assertion-screen"; import { RedirectError } from "~/components/redirect-error"; +import { useOnUserAuthenticated, useUI } from "~/hooks"; +import { MultiFactorAuthAssertionScreen } from "./multi-factor-auth-assertion-screen"; /** Props for the OAuthScreen component. */ export type OAuthScreenProps = PropsWithChildren<{ diff --git a/packages/react/src/auth/screens/phone-auth-screen.test.tsx b/packages/react/src/auth/screens/phone-auth-screen.test.tsx index 3159aec39..2042f81e9 100644 --- a/packages/react/src/auth/screens/phone-auth-screen.test.tsx +++ b/packages/react/src/auth/screens/phone-auth-screen.test.tsx @@ -17,8 +17,8 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, cleanup, act } from "@testing-library/react"; import { PhoneAuthScreen } from "~/auth/screens/phone-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { MultiFactorResolver, type User } from "firebase/auth"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { MultiFactorResolver } from "firebase/auth"; vi.mock("~/auth/forms/phone-auth-form", () => ({ PhoneAuthForm: ({ resendDelay }: { resendDelay?: number }) => ( diff --git a/packages/react/src/auth/screens/phone-auth-screen.tsx b/packages/react/src/auth/screens/phone-auth-screen.tsx index 095e6558b..283421c1a 100644 --- a/packages/react/src/auth/screens/phone-auth-screen.tsx +++ b/packages/react/src/auth/screens/phone-auth-screen.tsx @@ -15,7 +15,7 @@ */ import type { PropsWithChildren } from "react"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { Divider } from "~/components/divider"; import { useOnUserAuthenticated, useUI } from "~/hooks"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card"; diff --git a/packages/react/src/auth/screens/sign-in-auth-screen.test.tsx b/packages/react/src/auth/screens/sign-in-auth-screen.test.tsx index 4a9b176ed..0376f6746 100644 --- a/packages/react/src/auth/screens/sign-in-auth-screen.test.tsx +++ b/packages/react/src/auth/screens/sign-in-auth-screen.test.tsx @@ -17,8 +17,8 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, fireEvent, cleanup, act } from "@testing-library/react"; import { SignInAuthScreen } from "~/auth/screens/sign-in-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { MultiFactorResolver, type User } from "firebase/auth"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { MultiFactorResolver } from "firebase/auth"; vi.mock("~/auth/forms/sign-in-auth-form", () => ({ SignInAuthForm: ({ diff --git a/packages/react/src/auth/screens/sign-in-auth-screen.tsx b/packages/react/src/auth/screens/sign-in-auth-screen.tsx index a56af1a2d..e574398d7 100644 --- a/packages/react/src/auth/screens/sign-in-auth-screen.tsx +++ b/packages/react/src/auth/screens/sign-in-auth-screen.tsx @@ -14,15 +14,15 @@ * limitations under the License. */ -import type { PropsWithChildren } from "react"; +import { getTranslation } from "@firebase-oss/ui-core"; import type { User } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; +import type { PropsWithChildren } from "react"; import { Divider } from "~/components/divider"; +import { RedirectError } from "~/components/redirect-error"; import { useOnUserAuthenticated, useUI } from "~/hooks"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "../../components/card"; import { SignInAuthForm, type SignInAuthFormProps } from "../forms/sign-in-auth-form"; import { MultiFactorAuthAssertionScreen } from "./multi-factor-auth-assertion-screen"; -import { RedirectError } from "~/components/redirect-error"; /** Props for the SignInAuthScreen component. */ export type SignInAuthScreenProps = PropsWithChildren> & { diff --git a/packages/react/src/auth/screens/sign-up-auth-screen.test.tsx b/packages/react/src/auth/screens/sign-up-auth-screen.test.tsx index 2c7d21b56..bfb614645 100644 --- a/packages/react/src/auth/screens/sign-up-auth-screen.test.tsx +++ b/packages/react/src/auth/screens/sign-up-auth-screen.test.tsx @@ -17,8 +17,8 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, fireEvent, cleanup, act } from "@testing-library/react"; import { SignUpAuthScreen } from "~/auth/screens/sign-up-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { MultiFactorResolver, type User } from "firebase/auth"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { MultiFactorResolver } from "firebase/auth"; vi.mock("~/auth/forms/sign-up-auth-form", () => ({ SignUpAuthForm: ({ onSignInClick }: { onSignInClick?: () => void }) => ( diff --git a/packages/react/src/auth/screens/sign-up-auth-screen.tsx b/packages/react/src/auth/screens/sign-up-auth-screen.tsx index 09a6115cf..433af8fb9 100644 --- a/packages/react/src/auth/screens/sign-up-auth-screen.tsx +++ b/packages/react/src/auth/screens/sign-up-auth-screen.tsx @@ -20,7 +20,7 @@ import { Divider } from "~/components/divider"; import { useOnUserAuthenticated, useUI } from "~/hooks"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "../../components/card"; import { SignUpAuthForm, type SignUpAuthFormProps } from "../forms/sign-up-auth-form"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { RedirectError } from "~/components/redirect-error"; import { MultiFactorAuthAssertionScreen } from "./multi-factor-auth-assertion-screen"; diff --git a/packages/react/src/components/button.tsx b/packages/react/src/components/button.tsx index 3e6813155..08d069a34 100644 --- a/packages/react/src/components/button.tsx +++ b/packages/react/src/components/button.tsx @@ -16,7 +16,7 @@ import { type ComponentProps } from "react"; import { Slot } from "@radix-ui/react-slot"; -import { buttonVariant, type ButtonVariant } from "@invertase/firebaseui-styles"; +import { buttonVariant, type ButtonVariant } from "@firebase-oss/ui-styles"; import { cn } from "~/utils/cn"; /** Props for the Button component. */ diff --git a/packages/react/src/components/country-selector.test.tsx b/packages/react/src/components/country-selector.test.tsx index 089af7fca..99b2ca267 100644 --- a/packages/react/src/components/country-selector.test.tsx +++ b/packages/react/src/components/country-selector.test.tsx @@ -16,7 +16,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, renderHook, waitFor } from "@testing-library/react"; -import { countryData, countryCodes } from "@invertase/firebaseui-core"; +import { countryData, countryCodes } from "@firebase-oss/ui-core"; import { CountrySelector, CountrySelectorRef, useCountries, useDefaultCountry } from "./country-selector"; import { createMockUI, createFirebaseUIProvider } from "~/tests/utils"; import { RefObject } from "react"; diff --git a/packages/react/src/components/country-selector.tsx b/packages/react/src/components/country-selector.tsx index bfa4bfbdc..148cfb2a8 100644 --- a/packages/react/src/components/country-selector.tsx +++ b/packages/react/src/components/country-selector.tsx @@ -16,7 +16,7 @@ "use client"; -import { type CountryCode, type CountryData, getBehavior } from "@invertase/firebaseui-core"; +import { type CountryCode, type CountryData, getBehavior } from "@firebase-oss/ui-core"; import { type ComponentProps, forwardRef, useImperativeHandle, useState, useCallback } from "react"; import { useUI } from "~/hooks"; import { cn } from "~/utils/cn"; diff --git a/packages/react/src/components/logos/apple/Logo.tsx b/packages/react/src/components/logos/apple/Logo.tsx index 760b9c761..844d6c48c 100644 --- a/packages/react/src/components/logos/apple/Logo.tsx +++ b/packages/react/src/components/logos/apple/Logo.tsx @@ -1,19 +1,3 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import type { SVGProps } from "react"; const SvgLogo = (props: SVGProps) => ( diff --git a/packages/react/src/components/logos/facebook/Logo.tsx b/packages/react/src/components/logos/facebook/Logo.tsx index 2b2f78126..19c6abd48 100644 --- a/packages/react/src/components/logos/facebook/Logo.tsx +++ b/packages/react/src/components/logos/facebook/Logo.tsx @@ -1,19 +1,3 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import type { SVGProps } from "react"; const SvgLogo = (props: SVGProps) => ( diff --git a/packages/react/src/components/logos/github/Logo.tsx b/packages/react/src/components/logos/github/Logo.tsx index 6991e839b..207382960 100644 --- a/packages/react/src/components/logos/github/Logo.tsx +++ b/packages/react/src/components/logos/github/Logo.tsx @@ -1,19 +1,3 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import type { SVGProps } from "react"; const SvgLogo = (props: SVGProps) => ( diff --git a/packages/react/src/components/logos/google/Logo.tsx b/packages/react/src/components/logos/google/Logo.tsx index 142ecbc90..f8d84c7eb 100644 --- a/packages/react/src/components/logos/google/Logo.tsx +++ b/packages/react/src/components/logos/google/Logo.tsx @@ -1,19 +1,3 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import type { SVGProps } from "react"; const SvgLogo = (props: SVGProps) => ( diff --git a/packages/react/src/components/logos/line/Logo.tsx b/packages/react/src/components/logos/line/Logo.tsx index b7f22ce61..ec6db6eba 100644 --- a/packages/react/src/components/logos/line/Logo.tsx +++ b/packages/react/src/components/logos/line/Logo.tsx @@ -1,19 +1,3 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import type { SVGProps } from "react"; const SvgLogo = (props: SVGProps) => ( diff --git a/packages/react/src/components/logos/microsoft/Logo.tsx b/packages/react/src/components/logos/microsoft/Logo.tsx index d0cf0f1cc..1427b32e0 100644 --- a/packages/react/src/components/logos/microsoft/Logo.tsx +++ b/packages/react/src/components/logos/microsoft/Logo.tsx @@ -1,19 +1,3 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import type { SVGProps } from "react"; const SvgLogo = (props: SVGProps) => ( diff --git a/packages/react/src/components/logos/snapchat/Logo.tsx b/packages/react/src/components/logos/snapchat/Logo.tsx index d4053b853..ad751c49a 100644 --- a/packages/react/src/components/logos/snapchat/Logo.tsx +++ b/packages/react/src/components/logos/snapchat/Logo.tsx @@ -1,19 +1,3 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import type { SVGProps } from "react"; const SvgLogo = (props: SVGProps) => ( diff --git a/packages/react/src/components/logos/twitter/Logo.tsx b/packages/react/src/components/logos/twitter/Logo.tsx index 461129238..dc360cae9 100644 --- a/packages/react/src/components/logos/twitter/Logo.tsx +++ b/packages/react/src/components/logos/twitter/Logo.tsx @@ -1,19 +1,3 @@ -/** - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import type { SVGProps } from "react"; const SvgLogo = (props: SVGProps) => ( diff --git a/packages/react/src/components/policies.tsx b/packages/react/src/components/policies.tsx index d3ae91061..650e86829 100644 --- a/packages/react/src/components/policies.tsx +++ b/packages/react/src/components/policies.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { cloneElement, createContext, useContext } from "react"; import { useUI } from "~/hooks"; diff --git a/packages/react/src/context.tsx b/packages/react/src/context.tsx index 63abe9bdf..9d124f37d 100644 --- a/packages/react/src/context.tsx +++ b/packages/react/src/context.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { type FirebaseUIStore, type FirebaseUI } from "@invertase/firebaseui-core"; +import { type FirebaseUIStore, type FirebaseUI } from "@firebase-oss/ui-core"; import { useStore } from "@nanostores/react"; import { type PolicyProps, PolicyProvider } from "~/components/policies"; import { createContext } from "react"; diff --git a/packages/react/src/hooks.test.tsx b/packages/react/src/hooks.test.tsx index 622be7ab6..f7a6f5bf5 100644 --- a/packages/react/src/hooks.test.tsx +++ b/packages/react/src/hooks.test.tsx @@ -29,8 +29,8 @@ import { useOnUserAuthenticated, } from "./hooks"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale, enUs } from "@invertase/firebaseui-translations"; -import type { RecaptchaVerifier, User } from "firebase/auth"; +import { registerLocale, enUs } from "@firebase-oss/ui-translations"; +import type { RecaptchaVerifier } from "firebase/auth"; // Mock RecaptchaVerifier from firebase/auth const mockRender = vi.fn(); diff --git a/packages/react/src/hooks.ts b/packages/react/src/hooks.ts index b220c10be..75cb777c8 100644 --- a/packages/react/src/hooks.ts +++ b/packages/react/src/hooks.ts @@ -28,7 +28,7 @@ import { createSignInAuthFormSchema, createSignUpAuthFormSchema, getBehavior, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { FirebaseUIContext } from "./context"; /** diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index b0d565497..118e01ef6 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { registerFramework } from "@invertase/firebaseui-core"; +import { registerFramework } from "@firebase-oss/ui-core"; import pkgJson from "../package.json"; export * from "./auth"; diff --git a/packages/react/tests/email-link-auth.integration.test.tsx b/packages/react/tests/email-link-auth.integration.test.tsx index ef3cd31a5..32a8d41aa 100644 --- a/packages/react/tests/email-link-auth.integration.test.tsx +++ b/packages/react/tests/email-link-auth.integration.test.tsx @@ -19,7 +19,7 @@ import { describe, it, expect, afterAll } from "vitest"; // import { EmailLinkAuthForm } from "../src"; // import { initializeApp } from "firebase/app"; // import { getAuth, connectAuthEmulator, deleteUser } from "firebase/auth"; -// import { initializeUI } from "@invertase/firebaseui-core"; +// import { initializeUI } from "@firebase-oss/ui-core"; // import { FirebaseUIProvider } from "~/context"; // // Prepare the test environment diff --git a/packages/react/tests/email-password-auth.integration.test.tsx b/packages/react/tests/email-password-auth.integration.test.tsx index 762ae7eb9..91f4e15ef 100644 --- a/packages/react/tests/email-password-auth.integration.test.tsx +++ b/packages/react/tests/email-password-auth.integration.test.tsx @@ -26,7 +26,7 @@ import { describe } from "vitest"; // deleteUser, // } from "firebase/auth"; // import { FirebaseUIProvider } from "~/context"; -// import { initializeUI } from "@invertase/firebaseui-core"; +// import { initializeUI } from "@firebase-oss/ui-core"; // // Prepare the test environment // const firebaseConfig = { diff --git a/packages/react/tests/forgot-password.integration.test.tsx b/packages/react/tests/forgot-password.integration.test.tsx index 9d6d4aff0..0ae330570 100644 --- a/packages/react/tests/forgot-password.integration.test.tsx +++ b/packages/react/tests/forgot-password.integration.test.tsx @@ -26,7 +26,7 @@ import { describe } from "vitest"; // createUserWithEmailAndPassword, // signInWithEmailAndPassword, // } from "firebase/auth"; -// import { initializeUI } from "@invertase/firebaseui-core"; +// import { initializeUI } from "@firebase-oss/ui-core"; // import { FirebaseUIProvider } from "~/context"; // // Prepare the test environment diff --git a/packages/react/tests/register.integration.test.tsx b/packages/react/tests/register.integration.test.tsx index 759ccfa8a..f0cd04ad6 100644 --- a/packages/react/tests/register.integration.test.tsx +++ b/packages/react/tests/register.integration.test.tsx @@ -19,7 +19,7 @@ import { describe } from "vitest"; // import { SignUpAuthForm } from "../src"; // import { initializeApp } from "firebase/app"; // import { getAuth, connectAuthEmulator, deleteUser, signOut, signInWithEmailAndPassword } from "firebase/auth"; -// import { initializeUI } from "@invertase/firebaseui-core"; +// import { initializeUI } from "@firebase-oss/ui-core"; // import { FirebaseUIProvider } from "~/context"; // // Prepare the test environment diff --git a/packages/react/tests/utils.tsx b/packages/react/tests/utils.tsx index 16da68d0c..67ac68d2b 100644 --- a/packages/react/tests/utils.tsx +++ b/packages/react/tests/utils.tsx @@ -16,8 +16,8 @@ import type { FirebaseApp } from "firebase/app"; import type { Auth } from "firebase/auth"; -import { enUs } from "@invertase/firebaseui-translations"; -import { Behavior, FirebaseUI, FirebaseUIOptions, FirebaseUIStore, initializeUI } from "@invertase/firebaseui-core"; +import { enUs } from "@firebase-oss/ui-translations"; +import { Behavior, FirebaseUI, FirebaseUIOptions, FirebaseUIStore, initializeUI } from "@firebase-oss/ui-core"; import { FirebaseUIProvider } from "../src/context"; import { vi } from "vitest"; diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index 770a3c69e..9bbedb919 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -6,9 +6,9 @@ "paths": { "~/*": ["./src/*"], "~/tests/*": ["./tests/*"], - "@invertase/firebaseui-core": ["../core/src/index.ts"], - "@invertase/firebaseui-translations": ["../translations/src/index.ts"], - "@invertase/firebaseui-styles": ["../styles/src/index.ts"] + "@firebase-oss/ui-core": ["../core/src/index.ts"], + "@firebase-oss/ui-translations": ["../translations/src/index.ts"], + "@firebase-oss/ui-styles": ["../styles/src/index.ts"] } }, "include": ["src", "vite.config.ts", "setup-test.ts"] diff --git a/packages/react/vitest.config.ts b/packages/react/vitest.config.ts index ff386db0c..1b8dcd38b 100644 --- a/packages/react/vitest.config.ts +++ b/packages/react/vitest.config.ts @@ -19,7 +19,7 @@ import viteConfig from "./vite.config"; export default mergeConfig(viteConfig, { test: { - name: "@invertase/firebaseui-react", + name: "@firebase-oss/ui-react", // Use the same environment as the package environment: "jsdom", // Include TypeScript files diff --git a/packages/shadcn/README.md b/packages/shadcn/README.md index 95a226a0e..b67864835 100644 --- a/packages/shadcn/README.md +++ b/packages/shadcn/README.md @@ -3,7 +3,7 @@ > This package is private and not published to npm. -The shadcn package exposes React components via the [Shadcn Registy](https://ui.shadcn.com/docs/registry), allowing users +The `@firebase-oss/ui-shadcn` package exposes React components via the [Shadcn Registy](https://ui.shadcn.com/docs/registry), allowing users to take advantage of Firebase UI for Web logic but bringing their own UI via Shadcn. To get started, add the `@firebase` registry [namespace](https://ui.shadcn.com/docs/registry/namespace) to your `components.json`: @@ -17,7 +17,7 @@ To get started, add the `@firebase` registry [namespace](https://ui.shadcn.com/d } ``` -Next install one of the registry components - this will automatically install the `@invertase/firebaseui-react` for you, +Next install one of the registry components - this will automatically install the `@firebase-oss/ui-react` for you, alongwith adding any additionally required components. ```bash @@ -27,11 +27,11 @@ npx shadcn@latest add @firebase/sign-up-auth-screen Before consuming a component, ensure you have initalized your Firebase UI application: ```tsx -import { initalizeUI } from '@invertase/firebaseui-core'; -import { FirebaseUIProvider } from '@invertase/firebaseui-react'; +import { initializeUI } from '@firebase-oss/ui-core'; +import { FirebaseUIProvider } from '@firebase-oss/ui-react'; import { SignInAuthScreen } from '@/components/sign-in-auth-screen'; -const ui = initalizeUI(...); +const ui = initializeUI(...); function App() { return ( diff --git a/packages/shadcn/package.json b/packages/shadcn/package.json index e3dbf9e79..7732a2b17 100644 --- a/packages/shadcn/package.json +++ b/packages/shadcn/package.json @@ -1,6 +1,7 @@ { - "name": "@invertase/firebaseui-shadcn", - "version": "0.0.2", + "name": "@firebase-oss/ui-shadcn", + "private": true, + "version": "0.0.1", "type": "module", "bin": "./dist/bin/cli.js", "files": [ @@ -14,7 +15,7 @@ "test": "vitest run" }, "devDependencies": { - "@invertase/firebaseui-translations": "workspace:*", + "@firebase-oss/ui-translations": "workspace:*", "@tailwindcss/vite": "catalog:", "@testing-library/jest-dom": "catalog:", "@testing-library/react": "catalog:", @@ -38,9 +39,9 @@ "yargs-parser": "^22.0.0" }, "dependencies": { + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-react": "workspace:*", "@hookform/resolvers": "^5.2.2", - "@invertase/firebaseui-core": "workspace:*", - "@invertase/firebaseui-react": "workspace:*", "@radix-ui/react-label": "^2.1.7", "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-separator": "^1.1.7", diff --git a/packages/shadcn/public/apple-sign-in-button.json b/packages/shadcn/public/apple-sign-in-button.json new file mode 100644 index 000000000..b0cd0f216 --- /dev/null +++ b/packages/shadcn/public/apple-sign-in-button.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "apple-sign-in-button", + "type": "registry:block", + "title": "Apple Sign In Button", + "description": "A button component for Apple OAuth authentication.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "https://fir-ui-shadcn.web.app/oauth-button.json" + ], + "files": [ + { + "path": "src/registry/apple-sign-in-button.tsx", + "content": "\"use client\";\n\nimport { OAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type AppleSignInButtonProps, AppleLogo } from \"@firebase-oss/ui-react\";\n\nimport { OAuthButton } from \"@/registry/oauth-button\";\n\nexport type { AppleSignInButtonProps };\n\nexport function AppleSignInButton({ provider, themed }: AppleSignInButtonProps) {\n const ui = useUI();\n\n return (\n \n \n {getTranslation(ui, \"labels\", \"signInWithApple\")}\n
\n );\n}\n", + "type": "registry:component" + } + ], + "css": { + "@layer components": { + "button[data-provider='apple.com'][data-themed='true']": { + "--apple-primary": "#000000", + "--color-primary": "var(--apple-primary)", + "--color-primary-hover": "--alpha(var(--apple-primary) / 85%)", + "--color-primary-surface": "#FFFFFF", + "--color-border": "var(--apple-primary)" + } + }, + "@variant dark": { + "button[data-provider='apple.com'][data-themed='true']": { + "--apple-primary": "var(--color-white)", + "--color-primary": "var(--apple-primary)", + "--color-primary-hover": "--alpha(var(--apple-primary) / 85%)", + "--color-primary-surface": "var(--color-black)", + "--color-border": "var(--color-white)" + } + } + } +} \ No newline at end of file diff --git a/packages/shadcn/public/country-selector.json b/packages/shadcn/public/country-selector.json new file mode 100644 index 000000000..cbd47a0c0 --- /dev/null +++ b/packages/shadcn/public/country-selector.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "country-selector", + "type": "registry:block", + "title": "Country Selector", + "description": "A country selector component for phone number input with country codes and flags.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "select" + ], + "files": [ + { + "path": "src/registry/country-selector.tsx", + "content": "\"use client\";\n\nimport { forwardRef, useCallback, useImperativeHandle, useState } from \"react\";\nimport type { CountryCode, CountryData } from \"@firebase-oss/ui-core\";\nimport {\n type CountrySelectorRef,\n type CountrySelectorProps,\n useCountries,\n useDefaultCountry,\n} from \"@firebase-oss/ui-react\";\n\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@/components/ui/select\";\n\nexport type { CountrySelectorRef };\n\nexport const CountrySelector = forwardRef((_props, ref) => {\n const countries = useCountries();\n const defaultCountry = useDefaultCountry();\n const [selected, setSelected] = useState(defaultCountry);\n\n const setCountry = useCallback(\n (code: CountryCode) => {\n const foundCountry = countries.find((country) => country.code === code);\n setSelected(foundCountry!);\n },\n [countries]\n );\n\n useImperativeHandle(\n ref,\n () => ({\n getCountry: () => selected,\n setCountry,\n }),\n [selected, setCountry]\n );\n\n return (\n \n );\n});\n\nCountrySelector.displayName = \"CountrySelector\";\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/email-link-auth-form.json b/packages/shadcn/public/email-link-auth-form.json new file mode 100644 index 000000000..81cf8e303 --- /dev/null +++ b/packages/shadcn/public/email-link-auth-form.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "email-link-auth-form", + "type": "registry:block", + "title": "Email Link Auth Form", + "description": "A form allowing users to sign in via email link.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "input", + "button", + "form", + "https://fir-ui-shadcn.web.app/policies.json" + ], + "files": [ + { + "path": "src/registry/email-link-auth-form.tsx", + "content": "\"use client\";\n\nimport type { EmailLinkAuthFormSchema } from \"@firebase-oss/ui-core\";\nimport {\n useUI,\n useEmailLinkAuthFormAction,\n useEmailLinkAuthFormSchema,\n useEmailLinkAuthFormCompleteSignIn,\n type EmailLinkAuthFormProps,\n} from \"@firebase-oss/ui-react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport { FirebaseUIError, getTranslation } from \"@firebase-oss/ui-core\";\nimport { useState } from \"react\";\n\nimport { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Button } from \"@/components/ui/button\";\nimport { Policies } from \"./policies\";\n\nexport type { EmailLinkAuthFormProps };\n\nexport function EmailLinkAuthForm(props: EmailLinkAuthFormProps) {\n const { onEmailSent, onSignIn } = props;\n const ui = useUI();\n const schema = useEmailLinkAuthFormSchema();\n const action = useEmailLinkAuthFormAction();\n const [emailSent, setEmailSent] = useState(false);\n\n const form = useForm({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n email: \"\",\n },\n });\n\n useEmailLinkAuthFormCompleteSignIn(onSignIn);\n\n async function onSubmit(values: EmailLinkAuthFormSchema) {\n try {\n await action(values);\n setEmailSent(true);\n onEmailSent?.();\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n }\n\n if (emailSent) {\n return (\n
\n
{getTranslation(ui, \"messages\", \"signInLinkSent\")}
\n
\n );\n }\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"emailAddress\")}\n \n \n \n \n \n )}\n />\n \n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n \n \n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/email-link-auth-screen.json b/packages/shadcn/public/email-link-auth-screen.json new file mode 100644 index 000000000..2c65abda5 --- /dev/null +++ b/packages/shadcn/public/email-link-auth-screen.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "email-link-auth-screen", + "type": "registry:block", + "title": "Email Link Auth Screen", + "description": "A screen allowing users to sign in via email link.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "separator", + "card", + "https://fir-ui-shadcn.web.app/email-link-auth-form.json" + ], + "files": [ + { + "path": "src/registry/email-link-auth-screen.tsx", + "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type EmailLinkAuthScreenProps } from \"@firebase-oss/ui-react\";\n\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { EmailLinkAuthForm } from \"@/registry/email-link-auth-form\";\n\nexport type { EmailLinkAuthScreenProps };\n\nexport function EmailLinkAuthScreen({ children, ...props }: EmailLinkAuthScreenProps) {\n const ui = useUI();\n\n const titleText = getTranslation(ui, \"labels\", \"signIn\");\n const subtitleText = getTranslation(ui, \"prompts\", \"signInToAccount\");\n\n return (\n
\n \n \n {titleText}\n {subtitleText}\n \n \n \n {children ? (\n <>\n {getTranslation(ui, \"messages\", \"dividerOr\")}\n
{children}
\n \n ) : null}\n
\n
\n
\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/facebook-sign-in-button.json b/packages/shadcn/public/facebook-sign-in-button.json new file mode 100644 index 000000000..50c9bcaaf --- /dev/null +++ b/packages/shadcn/public/facebook-sign-in-button.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "facebook-sign-in-button", + "type": "registry:block", + "title": "Facebook Sign In Button", + "description": "A button component for Facebook OAuth authentication.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "https://fir-ui-shadcn.web.app/oauth-button.json" + ], + "files": [ + { + "path": "src/registry/facebook-sign-in-button.tsx", + "content": "\"use client\";\n\nimport { FacebookAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type FacebookSignInButtonProps, FacebookLogo } from \"@firebase-oss/ui-react\";\n\nimport { OAuthButton } from \"@/registry/oauth-button\";\n\nexport type { FacebookSignInButtonProps };\n\nexport function FacebookSignInButton({ provider, themed }: FacebookSignInButtonProps) {\n const ui = useUI();\n\n return (\n \n \n {getTranslation(ui, \"labels\", \"signInWithFacebook\")}\n \n );\n}\n", + "type": "registry:component" + } + ], + "css": { + "@layer components": { + "button[data-provider='facebook.com'][data-themed='true']": { + "--facebook-primary": "#1877F2", + "--color-primary": "var(--facebook-primary)", + "--color-primary-hover": "--alpha(var(--facebook-primary) / 85%)", + "--color-primary-surface": "var(--color-white)", + "--color-border": "var(--facebook-primary)" + } + } + } +} \ No newline at end of file diff --git a/packages/shadcn/public/forgot-password-auth-form.json b/packages/shadcn/public/forgot-password-auth-form.json new file mode 100644 index 000000000..d597c720a --- /dev/null +++ b/packages/shadcn/public/forgot-password-auth-form.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "forgot-password-auth-form", + "type": "registry:block", + "title": "Forgot Password Auth Form", + "description": "A form allowing users to reset their password via email.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "input", + "button", + "form", + "https://fir-ui-shadcn.web.app/policies.json" + ], + "files": [ + { + "path": "src/registry/forgot-password-auth-form.tsx", + "content": "\"use client\";\n\nimport type { ForgotPasswordAuthFormSchema } from \"@firebase-oss/ui-core\";\nimport {\n useForgotPasswordAuthFormAction,\n useForgotPasswordAuthFormSchema,\n useUI,\n type ForgotPasswordAuthFormProps,\n} from \"@firebase-oss/ui-react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport { FirebaseUIError, getTranslation } from \"@firebase-oss/ui-core\";\nimport { useState } from \"react\";\n\nimport { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Button } from \"@/components/ui/button\";\nimport { Policies } from \"./policies\";\n\nexport type { ForgotPasswordAuthFormProps };\n\nexport function ForgotPasswordAuthForm(props: ForgotPasswordAuthFormProps) {\n const ui = useUI();\n const schema = useForgotPasswordAuthFormSchema();\n const action = useForgotPasswordAuthFormAction();\n const [emailSent, setEmailSent] = useState(false);\n\n const form = useForm({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n email: \"\",\n },\n });\n\n async function onSubmit(values: ForgotPasswordAuthFormSchema) {\n try {\n await action(values);\n setEmailSent(true);\n props.onPasswordSent?.();\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n }\n\n if (emailSent) {\n return (\n
\n
{getTranslation(ui, \"messages\", \"checkEmailForReset\")}
\n
\n );\n }\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"emailAddress\")}\n \n \n \n \n \n )}\n />\n \n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n {props.onBackToSignInClick ? (\n \n ) : null}\n \n \n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/forgot-password-auth-screen.json b/packages/shadcn/public/forgot-password-auth-screen.json new file mode 100644 index 000000000..49ee186dd --- /dev/null +++ b/packages/shadcn/public/forgot-password-auth-screen.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "forgot-password-auth-screen", + "type": "registry:block", + "title": "Forgot Password Auth Screen", + "description": "A screen allowing users to reset their password via email.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "card", + "https://fir-ui-shadcn.web.app/forgot-password-auth-form.json" + ], + "files": [ + { + "path": "src/registry/forgot-password-auth-screen.tsx", + "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type ForgotPasswordAuthScreenProps } from \"@firebase-oss/ui-react\";\n\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { ForgotPasswordAuthForm } from \"@/registry/forgot-password-auth-form\";\n\nexport type { ForgotPasswordAuthScreenProps };\n\nexport function ForgotPasswordAuthScreen(props: ForgotPasswordAuthScreenProps) {\n const ui = useUI();\n\n const titleText = getTranslation(ui, \"labels\", \"resetPassword\");\n const subtitleText = getTranslation(ui, \"prompts\", \"enterEmailToReset\");\n\n return (\n
\n \n \n {titleText}\n {subtitleText}\n \n \n \n \n \n
\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/github-sign-in-button.json b/packages/shadcn/public/github-sign-in-button.json new file mode 100644 index 000000000..20aa063ce --- /dev/null +++ b/packages/shadcn/public/github-sign-in-button.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "github-sign-in-button", + "type": "registry:block", + "title": "GitHub Sign In Button", + "description": "A button component for GitHub OAuth authentication.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "https://fir-ui-shadcn.web.app/oauth-button.json" + ], + "files": [ + { + "path": "src/registry/github-sign-in-button.tsx", + "content": "\"use client\";\n\nimport { GithubAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type GitHubSignInButtonProps, GitHubLogo } from \"@firebase-oss/ui-react\";\n\nimport { OAuthButton } from \"@/registry/oauth-button\";\n\nexport type { GitHubSignInButtonProps };\n\nexport function GitHubSignInButton({ provider, themed }: GitHubSignInButtonProps) {\n const ui = useUI();\n\n return (\n \n \n {getTranslation(ui, \"labels\", \"signInWithGitHub\")}\n \n );\n}\n", + "type": "registry:component" + } + ], + "css": { + "@layer components": { + "button[data-provider='github.com'][data-themed='true']": { + "--github-primary": "#000000", + "--color-primary": "var(--github-primary)", + "--color-primary-hover": "--alpha(var(--github-primary) / 85%)", + "--color-primary-surface": "#FFFFFF", + "--color-border": "var(--github-primary)" + } + }, + "@variant dark": { + "button[data-provider='github.com'][data-themed='true']": { + "--github-primary": "var(--color-white)", + "--color-primary": "var(--github-primary)", + "--color-primary-hover": "--alpha(var(--github-primary) / 85%)", + "--color-primary-surface": "var(--color-black)", + "--color-border": "var(--color-white)" + } + } + } +} \ No newline at end of file diff --git a/packages/shadcn/public/google-sign-in-button.json b/packages/shadcn/public/google-sign-in-button.json new file mode 100644 index 000000000..f5cefdd00 --- /dev/null +++ b/packages/shadcn/public/google-sign-in-button.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "google-sign-in-button", + "type": "registry:block", + "title": "Google Sign In Button", + "description": "A button component for Google OAuth authentication.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "https://fir-ui-shadcn.web.app/oauth-button.json" + ], + "files": [ + { + "path": "src/registry/google-sign-in-button.tsx", + "content": "\"use client\";\n\nimport { GoogleAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type GoogleSignInButtonProps, GoogleLogo } from \"@firebase-oss/ui-react\";\n\nimport { OAuthButton } from \"@/registry/oauth-button\";\n\nexport type { GoogleSignInButtonProps };\n\nexport function GoogleSignInButton({ provider, themed }: GoogleSignInButtonProps) {\n const ui = useUI();\n\n return (\n \n \n {getTranslation(ui, \"labels\", \"signInWithGoogle\")}\n \n );\n}\n", + "type": "registry:component" + } + ], + "css": { + "@layer components": { + "button[data-provider='google.com'][data-themed='true']": { + "--google-primary": "#131314", + "--color-primary": "var(--google-primary)", + "--color-primary-hover": "--alpha(var(--google-primary) / 85%)", + "--color-primary-surface": "#FFFFFF", + "--color-border": "var(--google-primary)" + }, + "button[data-provider='google.com'][data-themed='neutral']": { + "--google-primary": "#F2F2F2", + "--color-primary": "var(--google-primary)", + "--color-primary-hover": "--alpha(var(--google-primary) / 85%)", + "--color-primary-surface": "#1F1F1F", + "--color-border": "transparent" + } + }, + "@variant dark": { + "button[data-provider='google.com'][data-themed='true']": { + "--google-primary": "#FFFFFF", + "--color-primary": "var(--google-primary)", + "--color-primary-hover": "--alpha(var(--google-primary) / 85%)", + "--color-primary-surface": "#1F1F1F", + "--color-border": "#747775" + } + } + } +} \ No newline at end of file diff --git a/packages/shadcn/public/microsoft-sign-in-button.json b/packages/shadcn/public/microsoft-sign-in-button.json new file mode 100644 index 000000000..dd88c8f13 --- /dev/null +++ b/packages/shadcn/public/microsoft-sign-in-button.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "microsoft-sign-in-button", + "type": "registry:block", + "title": "Microsoft Sign In Button", + "description": "A button component for Microsoft OAuth authentication.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "https://fir-ui-shadcn.web.app/oauth-button.json" + ], + "files": [ + { + "path": "src/registry/microsoft-sign-in-button.tsx", + "content": "\"use client\";\n\nimport { OAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type MicrosoftSignInButtonProps, MicrosoftLogo } from \"@firebase-oss/ui-react\";\n\nimport { OAuthButton } from \"@/registry/oauth-button\";\n\nexport type { MicrosoftSignInButtonProps };\n\nexport function MicrosoftSignInButton({ provider, themed }: MicrosoftSignInButtonProps) {\n const ui = useUI();\n\n return (\n \n \n {getTranslation(ui, \"labels\", \"signInWithMicrosoft\")}\n \n );\n}\n", + "type": "registry:component" + } + ], + "css": { + "@layer components": { + "button[data-provider='microsoft.com'][data-themed='true']": { + "--microsoft-primary": "#2F2F2F", + "--color-primary": "var(--microsoft-primary)", + "--color-primary-hover": "--alpha(var(--microsoft-primary) / 85%)", + "--color-primary-surface": "#FFFFFF", + "--color-border": "var(--microsoft-primary)" + } + }, + "@variant dark": { + "button[data-provider='microsoft.com'][data-themed='true']": { + "--microsoft-primary": "var(--color-white)", + "--color-primary": "var(--microsoft-primary)", + "--color-primary-hover": "--alpha(var(--microsoft-primary) / 85%)", + "--color-primary-surface": "#5E5E5E", + "--color-border": "var(--color-white)" + } + } + } +} \ No newline at end of file diff --git a/packages/shadcn/public/multi-factor-auth-assertion-form.json b/packages/shadcn/public/multi-factor-auth-assertion-form.json new file mode 100644 index 000000000..24b8e02c0 --- /dev/null +++ b/packages/shadcn/public/multi-factor-auth-assertion-form.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "multi-factor-auth-assertion-form", + "type": "registry:block", + "title": "Multi-Factor Auth Assertion Form", + "description": "A form allowing users to complete multi-factor authentication during sign-in with TOTP or SMS options.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "button", + "https://fir-ui-shadcn.web.app/sms-multi-factor-assertion-form.json", + "https://fir-ui-shadcn.web.app/totp-multi-factor-assertion-form.json" + ], + "files": [ + { + "path": "src/registry/multi-factor-auth-assertion-form.tsx", + "content": "\"use client\";\n\nimport { PhoneMultiFactorGenerator, TotpMultiFactorGenerator, type MultiFactorInfo } from \"firebase/auth\";\nimport { type ComponentProps, useState } from \"react\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI } from \"@firebase-oss/ui-react\";\n\nimport { SmsMultiFactorAssertionForm } from \"./sms-multi-factor-assertion-form\";\nimport { TotpMultiFactorAssertionForm } from \"./totp-multi-factor-assertion-form\";\nimport { Button } from \"@/components/ui/button\";\n\nexport function MultiFactorAuthAssertionForm() {\n const ui = useUI();\n const resolver = ui.multiFactorResolver;\n\n if (!resolver) {\n throw new Error(\"MultiFactorAuthAssertionForm requires a multi-factor resolver\");\n }\n\n // If only a single hint is provided, select it by default to improve UX.\n const [hint, setHint] = useState(\n resolver.hints.length === 1 ? resolver.hints[0] : undefined\n );\n\n if (hint) {\n if (hint.factorId === PhoneMultiFactorGenerator.FACTOR_ID) {\n return ;\n }\n\n if (hint.factorId === TotpMultiFactorGenerator.FACTOR_ID) {\n return ;\n }\n }\n\n return (\n
\n

Select a multi-factor authentication method

\n {resolver.hints.map((hint) => {\n if (hint.factorId === TotpMultiFactorGenerator.FACTOR_ID) {\n return setHint(hint)} />;\n }\n\n if (hint.factorId === PhoneMultiFactorGenerator.FACTOR_ID) {\n return setHint(hint)} />;\n }\n\n return null;\n })}\n
\n );\n}\n\nfunction TotpButton(props: ComponentProps) {\n const ui = useUI();\n const labelText = getTranslation(ui, \"labels\", \"mfaTotpVerification\");\n return ;\n}\n\nfunction SmsButton(props: ComponentProps) {\n const ui = useUI();\n const labelText = getTranslation(ui, \"labels\", \"mfaSmsVerification\");\n return ;\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/multi-factor-auth-enrollment-form.json b/packages/shadcn/public/multi-factor-auth-enrollment-form.json new file mode 100644 index 000000000..55de337b4 --- /dev/null +++ b/packages/shadcn/public/multi-factor-auth-enrollment-form.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "multi-factor-auth-enrollment-form", + "type": "registry:block", + "title": "Multi-Factor Auth Enrollment Form", + "description": "A form allowing users to select and configure multi-factor authentication methods.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "button", + "https://fir-ui-shadcn.web.app/sms-multi-factor-enrollment-form.json", + "https://fir-ui-shadcn.web.app/totp-multi-factor-enrollment-form.json" + ], + "files": [ + { + "path": "src/registry/multi-factor-auth-enrollment-form.tsx", + "content": "\"use client\";\n\nimport { type ComponentProps, useState } from \"react\";\nimport { FactorId } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI } from \"@firebase-oss/ui-react\";\n\nimport { SmsMultiFactorEnrollmentForm } from \"@/registry/sms-multi-factor-enrollment-form\";\nimport { TotpMultiFactorEnrollmentForm } from \"@/registry/totp-multi-factor-enrollment-form\";\nimport { Button } from \"@/components/ui/button\";\n\ntype Hint = (typeof FactorId)[keyof typeof FactorId];\n\nexport type MultiFactorAuthEnrollmentFormProps = {\n onEnrollment?: () => void;\n hints?: Hint[];\n};\n\nconst DEFAULT_HINTS = [FactorId.TOTP, FactorId.PHONE] as const;\n\nexport function MultiFactorAuthEnrollmentForm(props: MultiFactorAuthEnrollmentFormProps) {\n const hints = props.hints ?? DEFAULT_HINTS;\n\n if (hints.length === 0) {\n throw new Error(\"MultiFactorAuthEnrollmentForm must have at least one hint\");\n }\n\n // If only a single hint is provided, select it by default to improve UX.\n const [hint, setHint] = useState(hints.length === 1 ? hints[0] : undefined);\n\n if (hint) {\n if (hint === FactorId.TOTP) {\n return ;\n }\n\n if (hint === FactorId.PHONE) {\n return ;\n }\n\n throw new Error(`Unknown multi-factor enrollment type: ${hint}`);\n }\n\n return (\n
\n {hints.map((hint) => {\n if (hint === FactorId.TOTP) {\n return setHint(hint)} />;\n }\n\n if (hint === FactorId.PHONE) {\n return setHint(hint)} />;\n }\n\n return null;\n })}\n
\n );\n}\n\nfunction TotpButton(props: ComponentProps) {\n const ui = useUI();\n const labelText = getTranslation(ui, \"labels\", \"mfaTotpVerification\");\n return ;\n}\n\nfunction SmsButton(props: ComponentProps) {\n const ui = useUI();\n const labelText = getTranslation(ui, \"labels\", \"mfaSmsVerification\");\n return ;\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/multi-factor-auth-enrollment-screen.json b/packages/shadcn/public/multi-factor-auth-enrollment-screen.json new file mode 100644 index 000000000..5ae139008 --- /dev/null +++ b/packages/shadcn/public/multi-factor-auth-enrollment-screen.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "multi-factor-auth-enrollment-screen", + "type": "registry:block", + "title": "Multi-Factor Auth Enrollment Screen", + "description": "A screen allowing users to set up multi-factor authentication with TOTP or SMS options.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "card", + "https://fir-ui-shadcn.web.app/multi-factor-auth-enrollment-form.json" + ], + "files": [ + { + "path": "src/registry/multi-factor-auth-enrollment-screen.tsx", + "content": "\"use client\";\n\nimport React, { type PropsWithChildren } from \"react\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type MultiFactorAuthEnrollmentFormProps } from \"@firebase-oss/ui-react\";\n\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { MultiFactorAuthEnrollmentForm } from \"@/registry/multi-factor-auth-enrollment-form\";\n\nexport type MultiFactorAuthEnrollmentScreenProps = PropsWithChildren;\n\nexport function MultiFactorAuthEnrollmentScreen({ children, ...props }: MultiFactorAuthEnrollmentScreenProps) {\n const ui = useUI();\n\n const titleText = getTranslation(ui, \"labels\", \"multiFactorEnrollment\");\n const subtitleText = getTranslation(ui, \"prompts\", \"mfaEnrollmentPrompt\");\n\n return (\n
\n \n \n {titleText}\n {subtitleText}\n \n \n \n {children ?
{children}
: null}\n
\n
\n
\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/oauth-button.json b/packages/shadcn/public/oauth-button.json new file mode 100644 index 000000000..befbdb020 --- /dev/null +++ b/packages/shadcn/public/oauth-button.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "oauth-button", + "type": "registry:block", + "title": "OAuth Button", + "description": "A button component for OAuth authentication providers.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "button" + ], + "files": [ + { + "path": "src/registry/oauth-button.tsx", + "content": "\"use client\";\n\nimport { useUI, type OAuthButtonProps, useSignInWithProvider } from \"@firebase-oss/ui-react\";\nimport { Button } from \"@/components/ui/button\";\n\nexport type { OAuthButtonProps };\n\nexport function OAuthButton({ provider, children, themed }: OAuthButtonProps) {\n const ui = useUI();\n\n const { error, callback } = useSignInWithProvider(provider);\n\n return (\n
\n \n {children}\n \n {error &&
{error}
}\n
\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/oauth-screen.json b/packages/shadcn/public/oauth-screen.json new file mode 100644 index 000000000..182dc56c1 --- /dev/null +++ b/packages/shadcn/public/oauth-screen.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "oauth-screen", + "type": "registry:block", + "title": "OAuth Screen", + "description": "A screen allowing users to sign in with OAuth providers.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "card", + "https://fir-ui-shadcn.web.app/policies.json", + "https://fir-ui-shadcn.web.app/multi-factor-auth-assertion-form.json", + "https://fir-ui-shadcn.web.app/redirect-error.json" + ], + "files": [ + { + "path": "src/registry/oauth-screen.tsx", + "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { type PropsWithChildren } from \"react\";\nimport { useUI } from \"@firebase-oss/ui-react\";\nimport { Card, CardContent, CardHeader, CardDescription, CardTitle } from \"@/components/ui/card\";\nimport { Policies } from \"@/registry/policies\";\nimport { MultiFactorAuthAssertionForm } from \"@/registry/multi-factor-auth-assertion-form\";\nimport { RedirectError } from \"@/registry/redirect-error\";\n\nexport type OAuthScreenProps = PropsWithChildren;\n\nexport function OAuthScreen({ children }: OAuthScreenProps) {\n const ui = useUI();\n\n const titleText = getTranslation(ui, \"labels\", \"signIn\");\n const subtitleText = getTranslation(ui, \"prompts\", \"signInToAccount\");\n const mfaResolver = ui.multiFactorResolver;\n\n return (\n
\n \n \n {titleText}\n {subtitleText}\n \n \n {mfaResolver ? (\n \n ) : (\n <>\n
\n {children}\n \n \n
\n \n )}\n
\n
\n
\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/phone-auth-form.json b/packages/shadcn/public/phone-auth-form.json new file mode 100644 index 000000000..779e85462 --- /dev/null +++ b/packages/shadcn/public/phone-auth-form.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "phone-auth-form", + "type": "registry:block", + "title": "Phone Auth Form", + "description": "A form allowing users to authenticate using their phone number with SMS verification.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "form", + "input", + "button", + "https://fir-ui-shadcn.web.app/country-selector.json", + "https://fir-ui-shadcn.web.app/policies.json" + ], + "files": [ + { + "path": "src/registry/phone-auth-form.tsx", + "content": "\"use client\";\n\nimport {\n CountrySelector,\n type PhoneAuthFormProps,\n usePhoneAuthNumberFormSchema,\n usePhoneAuthVerifyFormSchema,\n usePhoneNumberFormAction,\n useRecaptchaVerifier,\n useUI,\n useVerifyPhoneNumberFormAction,\n} from \"@firebase-oss/ui-react\";\nimport { useState } from \"react\";\nimport type { UserCredential } from \"firebase/auth\";\nimport { useRef } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport {\n FirebaseUIError,\n formatPhoneNumber,\n getTranslation,\n type PhoneAuthNumberFormSchema,\n type PhoneAuthVerifyFormSchema,\n} from \"@firebase-oss/ui-core\";\n\nimport { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Button } from \"@/components/ui/button\";\nimport { Policies } from \"@/registry/policies\";\nimport { type CountrySelectorRef } from \"@/registry/country-selector\";\n\ntype VerifyPhoneNumberFormProps = {\n verificationId: string;\n onSuccess: (credential: UserCredential) => void;\n};\n\nfunction VerifyPhoneNumberForm(props: VerifyPhoneNumberFormProps) {\n const ui = useUI();\n const schema = usePhoneAuthVerifyFormSchema();\n const action = useVerifyPhoneNumberFormAction();\n\n const form = useForm({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n verificationId: props.verificationId,\n verificationCode: \"\",\n },\n });\n\n async function onSubmit(values: PhoneAuthVerifyFormSchema) {\n try {\n const credential = await action(values);\n props.onSuccess(credential);\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n }\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"verificationCode\")}\n \n \n \n \n \n )}\n />\n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n \n \n );\n}\n\ntype PhoneNumberFormProps = {\n onSubmit: (verificationId: string) => void;\n};\n\nfunction PhoneNumberForm(props: PhoneNumberFormProps) {\n const ui = useUI();\n const recaptchaContainerRef = useRef(null);\n const recaptchaVerifier = useRecaptchaVerifier(recaptchaContainerRef);\n const countrySelector = useRef(null);\n const action = usePhoneNumberFormAction();\n const schema = usePhoneAuthNumberFormSchema();\n\n const form = useForm({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n phoneNumber: \"\",\n },\n });\n\n async function onSubmit(values: PhoneAuthNumberFormSchema) {\n try {\n const formatted = formatPhoneNumber(values.phoneNumber, countrySelector.current!.getCountry());\n const verificationId = await action({ phoneNumber: formatted, recaptchaVerifier: recaptchaVerifier! });\n props.onSubmit(verificationId);\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n }\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"phoneNumber\")}\n \n
\n \n \n
\n
\n \n
\n )}\n />\n
\n \n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n \n \n );\n}\n\nexport type { PhoneAuthFormProps };\n\nexport function PhoneAuthForm(props: PhoneAuthFormProps) {\n const [verificationId, setVerificationId] = useState(null);\n\n if (!verificationId) {\n return ;\n }\n\n return (\n {\n props.onSignIn?.(credential);\n }}\n />\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/phone-auth-screen.json b/packages/shadcn/public/phone-auth-screen.json new file mode 100644 index 000000000..bf3ca80e0 --- /dev/null +++ b/packages/shadcn/public/phone-auth-screen.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "phone-auth-screen", + "type": "registry:block", + "title": "Phone Auth Screen", + "description": "A screen allowing users to authenticate using their phone number with SMS verification.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "card", + "separator", + "https://fir-ui-shadcn.web.app/phone-auth-form.json", + "https://fir-ui-shadcn.web.app/multi-factor-auth-assertion-form.json", + "https://fir-ui-shadcn.web.app/redirect-error.json" + ], + "files": [ + { + "path": "src/registry/phone-auth-screen.tsx", + "content": "\"use client\";\n\nimport type { PropsWithChildren } from \"react\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI } from \"@firebase-oss/ui-react\";\nimport { Card, CardContent, CardHeader, CardDescription, CardTitle } from \"@/components/ui/card\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { PhoneAuthForm, type PhoneAuthFormProps } from \"@/registry/phone-auth-form\";\nimport { MultiFactorAuthAssertionForm } from \"@/registry/multi-factor-auth-assertion-form\";\nimport { RedirectError } from \"@/registry/redirect-error\";\n\nexport type PhoneAuthScreenProps = PropsWithChildren;\n\nexport function PhoneAuthScreen({ children, ...props }: PhoneAuthScreenProps) {\n const ui = useUI();\n\n const titleText = getTranslation(ui, \"labels\", \"signIn\");\n const subtitleText = getTranslation(ui, \"prompts\", \"signInToAccount\");\n const mfaResolver = ui.multiFactorResolver;\n\n return (\n
\n \n \n {titleText}\n {subtitleText}\n \n \n {mfaResolver ? (\n \n ) : (\n <>\n \n {children ? (\n <>\n {getTranslation(ui, \"messages\", \"dividerOr\")}\n
\n {children}\n \n
\n \n ) : null}\n \n )}\n
\n
\n
\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/policies.json b/packages/shadcn/public/policies.json new file mode 100644 index 000000000..cdb112409 --- /dev/null +++ b/packages/shadcn/public/policies.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "policies", + "type": "registry:block", + "title": "Policies", + "description": "A component allowing users to navigate to the terms of service and privacy policy.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "files": [ + { + "path": "src/registry/policies.tsx", + "content": "import { cn } from \"@/lib/utils\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, PolicyContext } from \"@firebase-oss/ui-react\";\nimport { cloneElement, useContext } from \"react\";\n\nexport function Policies() {\n const ui = useUI();\n const policies = useContext(PolicyContext);\n\n if (!policies) {\n return null;\n }\n\n const { termsOfServiceUrl, privacyPolicyUrl, onNavigate } = policies;\n const termsAndPrivacyText = getTranslation(ui, \"messages\", \"termsAndPrivacy\");\n const parts = termsAndPrivacyText.split(/(\\{tos\\}|\\{privacy\\})/);\n\n const className = cn(\"hover:underline font-semibold\");\n const Handler = onNavigate ? (\n \n ) : null}\n
\n \n \n \n )}\n />\n \n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n {props.onRegisterClick ? (\n <>\n \n \n ) : null}\n \n \n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/sign-in-auth-screen.json b/packages/shadcn/public/sign-in-auth-screen.json new file mode 100644 index 000000000..a9a96daae --- /dev/null +++ b/packages/shadcn/public/sign-in-auth-screen.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "sign-in-auth-screen", + "type": "registry:block", + "title": "Sign In Auth Screen", + "description": "A screen allowing users to sign in with email and password.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "separator", + "card", + "https://fir-ui-shadcn.web.app/sign-in-auth-form.json" + ], + "files": [ + { + "path": "src/registry/sign-in-auth-screen.tsx", + "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type SignInAuthScreenProps } from \"@firebase-oss/ui-react\";\n\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { SignInAuthForm } from \"@/registry/sign-in-auth-form\";\nimport { MultiFactorAuthAssertionForm } from \"@/registry/multi-factor-auth-assertion-form\";\n\nexport type { SignInAuthScreenProps };\n\nexport function SignInAuthScreen({ children, ...props }: SignInAuthScreenProps) {\n const ui = useUI();\n\n const titleText = getTranslation(ui, \"labels\", \"signIn\");\n const subtitleText = getTranslation(ui, \"prompts\", \"signInToAccount\");\n\n const mfaResolver = ui.multiFactorResolver;\n\n return (\n
\n \n \n {titleText}\n {subtitleText}\n \n \n {mfaResolver ? (\n \n ) : (\n <>\n \n {children ? (\n <>\n {getTranslation(ui, \"messages\", \"dividerOr\")}\n
{children}
\n \n ) : null}\n \n )}\n
\n
\n
\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/sign-up-auth-form.json b/packages/shadcn/public/sign-up-auth-form.json new file mode 100644 index 000000000..f658b9731 --- /dev/null +++ b/packages/shadcn/public/sign-up-auth-form.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "sign-up-auth-form", + "type": "registry:block", + "title": "Sign Up Auth Form", + "description": "A form allowing users to sign up with email and password.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "input", + "button", + "form", + "https://fir-ui-shadcn.web.app/policies.json" + ], + "files": [ + { + "path": "src/registry/sign-up-auth-form.tsx", + "content": "\"use client\";\n\nimport type { SignUpAuthFormSchema } from \"@firebase-oss/ui-core\";\nimport {\n useSignUpAuthFormAction,\n useSignUpAuthFormSchema,\n useUI,\n type SignUpAuthFormProps,\n useRequireDisplayName,\n} from \"@firebase-oss/ui-react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport { FirebaseUIError, getTranslation } from \"@firebase-oss/ui-core\";\n\nimport { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Button } from \"@/components/ui/button\";\nimport { Policies } from \"./policies\";\n\nexport type { SignUpAuthFormProps };\n\nexport function SignUpAuthForm(props: SignUpAuthFormProps) {\n const ui = useUI();\n const schema = useSignUpAuthFormSchema();\n const action = useSignUpAuthFormAction();\n const requireDisplayName = useRequireDisplayName();\n\n const form = useForm({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n email: \"\",\n password: \"\",\n displayName: requireDisplayName ? \"\" : undefined,\n },\n });\n\n async function onSubmit(values: SignUpAuthFormSchema) {\n try {\n const credential = await action(values);\n props.onSignUp?.(credential);\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n }\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"emailAddress\")}\n \n \n \n \n \n )}\n />\n (\n \n {getTranslation(ui, \"labels\", \"password\")}\n \n \n \n \n \n )}\n />\n {requireDisplayName ? (\n (\n \n {getTranslation(ui, \"labels\", \"displayName\")}\n \n \n \n \n \n )}\n />\n ) : null}\n \n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n {props.onBackToSignInClick ? (\n \n ) : null}\n \n \n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/sign-up-auth-screen.json b/packages/shadcn/public/sign-up-auth-screen.json new file mode 100644 index 000000000..e65db9000 --- /dev/null +++ b/packages/shadcn/public/sign-up-auth-screen.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "sign-up-auth-screen", + "type": "registry:block", + "title": "Sign Up Auth Screen", + "description": "A screen allowing users to sign up with email and password.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "separator", + "card", + "https://fir-ui-shadcn.web.app/sign-up-auth-form.json" + ], + "files": [ + { + "path": "src/registry/sign-up-auth-screen.tsx", + "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type SignUpAuthScreenProps } from \"@firebase-oss/ui-react\";\n\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Separator } from \"@/components/ui/separator\";\nimport { SignUpAuthForm } from \"@/registry/sign-up-auth-form\";\n\nexport type { SignUpAuthScreenProps };\n\nexport function SignUpAuthScreen({ children, ...props }: SignUpAuthScreenProps) {\n const ui = useUI();\n\n const titleText = getTranslation(ui, \"labels\", \"register\");\n const subtitleText = getTranslation(ui, \"prompts\", \"enterDetailsToCreate\");\n\n return (\n
\n \n \n {titleText}\n {subtitleText}\n \n \n \n {children ? (\n <>\n {getTranslation(ui, \"messages\", \"dividerOr\")}\n
{children}
\n \n ) : null}\n
\n
\n
\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/sms-multi-factor-assertion-form.json b/packages/shadcn/public/sms-multi-factor-assertion-form.json new file mode 100644 index 000000000..74ea8c0b9 --- /dev/null +++ b/packages/shadcn/public/sms-multi-factor-assertion-form.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "sms-multi-factor-assertion-form", + "type": "registry:block", + "title": "SMS Multi-Factor Assertion Form", + "description": "A form allowing users to complete SMS-based multi-factor authentication during sign-in.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "form", + "input", + "button", + "input-otp" + ], + "files": [ + { + "path": "src/registry/sms-multi-factor-assertion-form.tsx", + "content": "\"use client\";\n\nimport { useRef, useState } from \"react\";\nimport { type MultiFactorInfo } from \"firebase/auth\";\n\nimport { FirebaseUIError, getTranslation } from \"@firebase-oss/ui-core\";\nimport {\n useMultiFactorPhoneAuthVerifyFormSchema,\n useRecaptchaVerifier,\n useUI,\n useSmsMultiFactorAssertionPhoneFormAction,\n useSmsMultiFactorAssertionVerifyFormAction,\n} from \"@firebase-oss/ui-react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\n\nimport { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from \"@/components/ui/form\";\nimport { Button } from \"@/components/ui/button\";\nimport { InputOTP, InputOTPGroup, InputOTPSlot } from \"@/components/ui/input-otp\";\n\ntype PhoneMultiFactorInfo = MultiFactorInfo & {\n phoneNumber?: string;\n};\n\ntype SmsMultiFactorAssertionPhoneFormProps = {\n hint: MultiFactorInfo;\n onSubmit: (verificationId: string) => void;\n};\n\nfunction SmsMultiFactorAssertionPhoneForm(props: SmsMultiFactorAssertionPhoneFormProps) {\n const ui = useUI();\n const recaptchaContainerRef = useRef(null);\n const recaptchaVerifier = useRecaptchaVerifier(recaptchaContainerRef);\n const action = useSmsMultiFactorAssertionPhoneFormAction();\n const [error, setError] = useState(null);\n\n const onSubmit = async () => {\n try {\n setError(null);\n const verificationId = await action({ hint: props.hint, recaptchaVerifier: recaptchaVerifier! });\n props.onSubmit(verificationId);\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n setError(message);\n }\n };\n\n return (\n
\n
\n \n
\n {(props.hint as PhoneMultiFactorInfo).phoneNumber || \"No phone number available\"}\n
\n
\n
\n \n {error &&
{error}
}\n
\n );\n}\n\ntype SmsMultiFactorAssertionVerifyFormProps = {\n verificationId: string;\n onSuccess: () => void;\n};\n\nfunction SmsMultiFactorAssertionVerifyForm(props: SmsMultiFactorAssertionVerifyFormProps) {\n const ui = useUI();\n const schema = useMultiFactorPhoneAuthVerifyFormSchema();\n const action = useSmsMultiFactorAssertionVerifyFormAction();\n\n const form = useForm<{ verificationId: string; verificationCode: string }>({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n verificationId: props.verificationId,\n verificationCode: \"\",\n },\n });\n\n const onSubmit = async (values: { verificationId: string; verificationCode: string }) => {\n try {\n await action({ verificationId: values.verificationId, verificationCode: values.verificationCode });\n props.onSuccess();\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n };\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"verificationCode\")}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n />\n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n \n \n );\n}\n\nexport type SmsMultiFactorAssertionFormProps = {\n hint: MultiFactorInfo;\n onSuccess?: () => void;\n};\n\nexport function SmsMultiFactorAssertionForm(props: SmsMultiFactorAssertionFormProps) {\n const [verification, setVerification] = useState<{\n verificationId: string;\n } | null>(null);\n\n if (!verification) {\n return (\n setVerification({ verificationId })}\n />\n );\n }\n\n return (\n {\n props.onSuccess?.();\n }}\n />\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/sms-multi-factor-enrollment-form.json b/packages/shadcn/public/sms-multi-factor-enrollment-form.json new file mode 100644 index 000000000..cc656d155 --- /dev/null +++ b/packages/shadcn/public/sms-multi-factor-enrollment-form.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "sms-multi-factor-enrollment-form", + "type": "registry:block", + "title": "SMS Multi-Factor Enrollment Form", + "description": "A form allowing users to enroll SMS-based multi-factor authentication.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "form", + "input", + "button", + "input-otp", + "https://fir-ui-shadcn.web.app/country-selector.json" + ], + "files": [ + { + "path": "src/registry/sms-multi-factor-enrollment-form.tsx", + "content": "\"use client\";\n\nimport { useRef, useState } from \"react\";\nimport { multiFactor, PhoneAuthProvider, PhoneMultiFactorGenerator } from \"firebase/auth\";\nimport {\n enrollWithMultiFactorAssertion,\n FirebaseUIError,\n formatPhoneNumber,\n getTranslation,\n verifyPhoneNumber,\n} from \"@firebase-oss/ui-core\";\nimport { CountrySelector, type CountrySelectorRef } from \"@/registry/country-selector\";\nimport {\n useMultiFactorPhoneAuthNumberFormSchema,\n useMultiFactorPhoneAuthVerifyFormSchema,\n useRecaptchaVerifier,\n useUI,\n} from \"@firebase-oss/ui-react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\n\nimport { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Button } from \"@/components/ui/button\";\nimport { InputOTP, InputOTPGroup, InputOTPSlot } from \"@/components/ui/input-otp\";\n\ntype MultiFactorEnrollmentPhoneNumberFormProps = {\n onSubmit: (verificationId: string, displayName?: string) => void;\n};\n\nfunction MultiFactorEnrollmentPhoneNumberForm(props: MultiFactorEnrollmentPhoneNumberFormProps) {\n const ui = useUI();\n const recaptchaContainerRef = useRef(null);\n const recaptchaVerifier = useRecaptchaVerifier(recaptchaContainerRef);\n const countrySelector = useRef(null);\n const schema = useMultiFactorPhoneAuthNumberFormSchema();\n\n const form = useForm<{ displayName: string; phoneNumber: string }>({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n displayName: \"\",\n phoneNumber: \"\",\n },\n });\n\n const onSubmit = async (values: { displayName: string; phoneNumber: string }) => {\n try {\n const formatted = formatPhoneNumber(values.phoneNumber, countrySelector.current!.getCountry());\n const mfaUser = multiFactor(ui.auth.currentUser!);\n const confirmationResult = await verifyPhoneNumber(ui, formatted, recaptchaVerifier!, mfaUser);\n props.onSubmit(confirmationResult, values.displayName);\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n };\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"displayName\")}\n \n \n \n \n \n )}\n />\n (\n \n {getTranslation(ui, \"labels\", \"phoneNumber\")}\n \n
\n \n \n
\n
\n \n
\n )}\n />\n
\n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n \n \n );\n}\n\ntype MultiFactorEnrollmentVerifyPhoneNumberFormProps = {\n verificationId: string;\n displayName?: string;\n onSuccess: () => void;\n};\n\nexport function MultiFactorEnrollmentVerifyPhoneNumberForm(props: MultiFactorEnrollmentVerifyPhoneNumberFormProps) {\n const ui = useUI();\n const schema = useMultiFactorPhoneAuthVerifyFormSchema();\n\n const form = useForm<{ verificationId: string; verificationCode: string }>({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n verificationId: props.verificationId,\n verificationCode: \"\",\n },\n });\n\n const onSubmit = async (values: { verificationId: string; verificationCode: string }) => {\n try {\n const credential = PhoneAuthProvider.credential(values.verificationId, values.verificationCode);\n const assertion = PhoneMultiFactorGenerator.assertion(credential);\n await enrollWithMultiFactorAssertion(ui, assertion, props.displayName);\n props.onSuccess();\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n };\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"verificationCode\")}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n />\n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n \n \n );\n}\n\nexport type SmsMultiFactorEnrollmentFormProps = {\n onSuccess?: () => void;\n};\n\nexport function SmsMultiFactorEnrollmentForm(props: SmsMultiFactorEnrollmentFormProps) {\n const ui = useUI();\n\n const [verification, setVerification] = useState<{\n verificationId: string;\n displayName?: string;\n } | null>(null);\n\n if (!ui.auth.currentUser) {\n throw new Error(\"User must be authenticated to enroll with multi-factor authentication\");\n }\n\n if (!verification) {\n return (\n setVerification({ verificationId, displayName })}\n />\n );\n }\n\n return (\n {\n props.onSuccess?.();\n }}\n />\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/totp-multi-factor-assertion-form.json b/packages/shadcn/public/totp-multi-factor-assertion-form.json new file mode 100644 index 000000000..3ce71ccfd --- /dev/null +++ b/packages/shadcn/public/totp-multi-factor-assertion-form.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "totp-multi-factor-assertion-form", + "type": "registry:block", + "title": "TOTP Multi-Factor Assertion Form", + "description": "A form allowing users to complete TOTP-based multi-factor authentication during sign-in.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "form", + "button", + "input-otp" + ], + "files": [ + { + "path": "src/registry/totp-multi-factor-assertion-form.tsx", + "content": "\"use client\";\n\nimport { type MultiFactorInfo } from \"firebase/auth\";\nimport { FirebaseUIError, getTranslation } from \"@firebase-oss/ui-core\";\nimport {\n useMultiFactorTotpAuthVerifyFormSchema,\n useUI,\n useTotpMultiFactorAssertionFormAction,\n} from \"@firebase-oss/ui-react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\n\nimport { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from \"@/components/ui/form\";\nimport { Button } from \"@/components/ui/button\";\nimport { InputOTP, InputOTPGroup, InputOTPSlot } from \"@/components/ui/input-otp\";\n\ntype TotpMultiFactorAssertionFormProps = {\n hint: MultiFactorInfo;\n onSuccess?: () => void;\n};\n\nexport function TotpMultiFactorAssertionForm(props: TotpMultiFactorAssertionFormProps) {\n const ui = useUI();\n const schema = useMultiFactorTotpAuthVerifyFormSchema();\n const action = useTotpMultiFactorAssertionFormAction();\n\n const form = useForm<{ verificationCode: string }>({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n verificationCode: \"\",\n },\n });\n\n const onSubmit = async (values: { verificationCode: string }) => {\n try {\n await action({ verificationCode: values.verificationCode, hint: props.hint });\n props.onSuccess?.();\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n };\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"verificationCode\")}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n />\n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n \n \n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/totp-multi-factor-enrollment-form.json b/packages/shadcn/public/totp-multi-factor-enrollment-form.json new file mode 100644 index 000000000..ced8a0bab --- /dev/null +++ b/packages/shadcn/public/totp-multi-factor-enrollment-form.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "totp-multi-factor-enrollment-form", + "type": "registry:block", + "title": "TOTP Multi-Factor Enrollment Form", + "description": "A form allowing users to enroll TOTP-based multi-factor authentication with QR code generation.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "form", + "input", + "button", + "input-otp" + ], + "files": [ + { + "path": "src/registry/totp-multi-factor-enrollment-form.tsx", + "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { TotpMultiFactorGenerator, type TotpSecret } from \"firebase/auth\";\nimport {\n enrollWithMultiFactorAssertion,\n FirebaseUIError,\n generateTotpQrCode,\n generateTotpSecret,\n getTranslation,\n} from \"@firebase-oss/ui-core\";\nimport {\n useMultiFactorTotpAuthNumberFormSchema,\n useMultiFactorTotpAuthVerifyFormSchema,\n useUI,\n} from \"@firebase-oss/ui-react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\n\nimport { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Button } from \"@/components/ui/button\";\nimport { InputOTP, InputOTPGroup, InputOTPSlot } from \"@/components/ui/input-otp\";\n\ntype TotpMultiFactorSecretGenerationFormProps = {\n onSubmit: (secret: TotpSecret, displayName: string) => void;\n};\n\nfunction TotpMultiFactorSecretGenerationForm(props: TotpMultiFactorSecretGenerationFormProps) {\n const ui = useUI();\n const schema = useMultiFactorTotpAuthNumberFormSchema();\n\n const form = useForm<{ displayName: string }>({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n displayName: \"\",\n },\n });\n\n const onSubmit = async (values: { displayName: string }) => {\n try {\n const secret = await generateTotpSecret(ui);\n props.onSubmit(secret, values.displayName);\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n };\n\n return (\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"displayName\")}\n \n \n \n \n \n )}\n />\n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n \n \n );\n}\n\ntype MultiFactorEnrollmentVerifyTotpFormProps = {\n secret: TotpSecret;\n displayName: string;\n onSuccess: () => void;\n};\n\nexport function MultiFactorEnrollmentVerifyTotpForm(props: MultiFactorEnrollmentVerifyTotpFormProps) {\n const ui = useUI();\n const schema = useMultiFactorTotpAuthVerifyFormSchema();\n\n const form = useForm<{ verificationCode: string }>({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n verificationCode: \"\",\n },\n });\n\n const onSubmit = async (values: { verificationCode: string }) => {\n try {\n const assertion = TotpMultiFactorGenerator.assertionForEnrollment(props.secret, values.verificationCode);\n await enrollWithMultiFactorAssertion(ui, assertion, values.verificationCode);\n props.onSuccess();\n } catch (error) {\n const message = error instanceof FirebaseUIError ? error.message : String(error);\n form.setError(\"root\", { message });\n }\n };\n\n const qrCodeDataUrl = generateTotpQrCode(ui, props.secret, props.displayName);\n\n return (\n
\n
\n
\n \"TOTP\n

\n Scan this QR code with your authenticator app\n

\n
\n
\n
\n \n (\n \n {getTranslation(ui, \"labels\", \"verificationCode\")}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n />\n \n {form.formState.errors.root && {form.formState.errors.root.message}}\n \n \n
\n );\n}\n\nexport type TotpMultiFactorEnrollmentFormProps = {\n onSuccess?: () => void;\n};\n\nexport function TotpMultiFactorEnrollmentForm(props: TotpMultiFactorEnrollmentFormProps) {\n const ui = useUI();\n\n const [enrollment, setEnrollment] = useState<{\n secret: TotpSecret;\n displayName: string;\n } | null>(null);\n\n if (!ui.auth.currentUser) {\n throw new Error(\"User must be authenticated to enroll with multi-factor authentication\");\n }\n\n if (!enrollment) {\n return (\n setEnrollment({ secret, displayName })} />\n );\n }\n\n return (\n {\n props.onSuccess?.();\n }}\n />\n );\n}\n", + "type": "registry:component" + } + ] +} \ No newline at end of file diff --git a/packages/shadcn/public/twitter-sign-in-button.json b/packages/shadcn/public/twitter-sign-in-button.json new file mode 100644 index 000000000..a07adecc4 --- /dev/null +++ b/packages/shadcn/public/twitter-sign-in-button.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://ui.shadcn.com/schema/registry-item.json", + "name": "twitter-sign-in-button", + "type": "registry:block", + "title": "Twitter Sign In Button", + "description": "A button component for Twitter OAuth authentication.", + "dependencies": [ + "@firebase-oss/ui-react" + ], + "registryDependencies": [ + "https://fir-ui-shadcn.web.app/oauth-button.json" + ], + "files": [ + { + "path": "src/registry/twitter-sign-in-button.tsx", + "content": "\"use client\";\n\nimport { TwitterAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-oss/ui-core\";\nimport { useUI, type TwitterSignInButtonProps, TwitterLogo } from \"@firebase-oss/ui-react\";\n\nimport { OAuthButton } from \"@/registry/oauth-button\";\n\nexport type { TwitterSignInButtonProps };\n\nexport function TwitterSignInButton({ provider, themed }: TwitterSignInButtonProps) {\n const ui = useUI();\n\n return (\n \n \n {getTranslation(ui, \"labels\", \"signInWithTwitter\")}\n \n );\n}\n", + "type": "registry:component" + } + ], + "css": { + "@layer components": { + "button[data-provider='twitter.com'][data-themed='true']": { + "--twitter-primary": "#1DA1F2", + "--color-primary": "var(--twitter-primary)", + "--color-primary-hover": "--alpha(var(--twitter-primary) / 85%)", + "--color-primary-surface": "#FFFFFF", + "--color-border": "var(--twitter-primary)" + } + } + } +} \ No newline at end of file diff --git a/packages/shadcn/registry-spec.json b/packages/shadcn/registry-spec.json index 271bfcec4..1943c0d4e 100644 --- a/packages/shadcn/registry-spec.json +++ b/packages/shadcn/registry-spec.json @@ -11,8 +11,8 @@ "type": "registry:block", "title": "Apple Sign In Button", "description": "A button component for Apple OAuth authentication.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["{{ DOMAIN }}/r/oauth-button.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { "path": "src/components/apple-sign-in-button.tsx", @@ -44,7 +44,7 @@ "type": "registry:block", "title": "Country Selector", "description": "A country selector component for phone number input with country codes and flags.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["select"], "files": [ { @@ -61,8 +61,8 @@ "type": "registry:block", "title": "Email Link Auth Form", "description": "A form allowing users to sign in via email link.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["input", "button", "form", "alert", "{{ DOMAIN }}/r/policies.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/policies.json"], "files": [ { "path": "src/components/email-link-auth-form.tsx", @@ -78,13 +78,8 @@ "type": "registry:block", "title": "Email Link Auth Screen", "description": "A screen allowing users to sign in via email link.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": [ - "separator", - "card", - "{{ DOMAIN }}/r/email-link-auth-form.json", - "{{ DOMAIN }}/r/redirect-error.json" - ], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["separator", "card", "{{ DOMAIN }}/email-link-auth-form.json"], "files": [ { "path": "src/components/email-link-auth-screen.tsx", @@ -100,8 +95,8 @@ "type": "registry:block", "title": "Facebook Sign In Button", "description": "A button component for Facebook OAuth authentication.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["{{ DOMAIN }}/r/oauth-button.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { "path": "src/components/facebook-sign-in-button.tsx", @@ -126,8 +121,8 @@ "type": "registry:block", "title": "Forgot Password Auth Form", "description": "A form allowing users to reset their password via email.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/r/policies.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/policies.json"], "files": [ { "path": "src/components/forgot-password-auth-form.tsx", @@ -143,8 +138,8 @@ "type": "registry:block", "title": "Forgot Password Auth Screen", "description": "A screen allowing users to reset their password via email.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["card", "{{ DOMAIN }}/r/forgot-password-auth-form.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["card", "{{ DOMAIN }}/forgot-password-auth-form.json"], "files": [ { "path": "src/components/forgot-password-auth-screen.tsx", @@ -160,8 +155,8 @@ "type": "registry:block", "title": "GitHub Sign In Button", "description": "A button component for GitHub OAuth authentication.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["{{ DOMAIN }}/r/oauth-button.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { "path": "src/components/github-sign-in-button.tsx", @@ -193,8 +188,8 @@ "type": "registry:block", "title": "Google Sign In Button", "description": "A button component for Google OAuth authentication.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["{{ DOMAIN }}/r/oauth-button.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { "path": "src/components/google-sign-in-button.tsx", @@ -231,8 +226,8 @@ "type": "registry:block", "title": "Microsoft Sign In Button", "description": "A button component for Microsoft OAuth authentication.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["{{ DOMAIN }}/r/oauth-button.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { "path": "src/components/microsoft-sign-in-button.tsx", @@ -264,7 +259,7 @@ "type": "registry:block", "title": "Multi-Factor Auth Assertion Form", "description": "A form allowing users to complete multi-factor authentication during sign-in with TOTP or SMS options.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "button", "{{ DOMAIN }}/r/sms-multi-factor-assertion-form.json", @@ -285,7 +280,7 @@ "type": "registry:block", "title": "Multi-Factor Auth Assertion Screen", "description": "A screen allowing users to complete multi-factor authentication during sign-in with TOTP or SMS options.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["card", "{{ DOMAIN }}/r/multi-factor-auth-assertion-form.json"], "files": [ { @@ -302,7 +297,7 @@ "type": "registry:block", "title": "Multi-Factor Auth Enrollment Form", "description": "A form allowing users to select and configure multi-factor authentication methods.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "button", "{{ DOMAIN }}/r/sms-multi-factor-enrollment-form.json", @@ -323,8 +318,8 @@ "type": "registry:block", "title": "Multi-Factor Auth Enrollment Screen", "description": "A screen allowing users to set up multi-factor authentication with TOTP or SMS options.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["card", "{{ DOMAIN }}/r/multi-factor-auth-enrollment-form.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["card", "{{ DOMAIN }}/multi-factor-auth-enrollment-form.json"], "files": [ { "path": "src/components/multi-factor-auth-enrollment-screen.tsx", @@ -340,7 +335,7 @@ "type": "registry:block", "title": "OAuth Button", "description": "A button component for OAuth authentication providers.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["button"], "files": [ { @@ -357,7 +352,7 @@ "type": "registry:block", "title": "OAuth Screen", "description": "A screen allowing users to sign in with OAuth providers.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "card", "{{ DOMAIN }}/r/policies.json", @@ -379,7 +374,7 @@ "type": "registry:block", "title": "Phone Auth Form", "description": "A form allowing users to authenticate using their phone number with SMS verification.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "form", "input", @@ -402,7 +397,7 @@ "type": "registry:block", "title": "Phone Auth Screen", "description": "A screen allowing users to authenticate using their phone number with SMS verification.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "card", "separator", @@ -425,7 +420,7 @@ "type": "registry:block", "title": "Policies", "description": "A component allowing users to navigate to the terms of service and privacy policy.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "files": [ { "path": "src/components/policies.tsx", @@ -441,7 +436,7 @@ "type": "registry:block", "title": "Redirect Error", "description": "A component that displays redirect errors from Firebase UI authentication flow.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "files": [ { "path": "src/components/redirect-error.tsx", @@ -457,8 +452,8 @@ "type": "registry:block", "title": "Sign In Auth Form", "description": "A form allowing users to sign in with email and password.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/r/policies.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/policies.json"], "files": [ { "path": "src/components/sign-in-auth-form.tsx", @@ -474,13 +469,8 @@ "type": "registry:block", "title": "Sign In Auth Screen", "description": "A screen allowing users to sign in with email and password.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": [ - "separator", - "card", - "{{ DOMAIN }}/r/sign-in-auth-form.json", - "{{ DOMAIN }}/r/multi-factor-auth-assertion-screen.json" - ], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["separator", "card", "{{ DOMAIN }}/sign-in-auth-form.json"], "files": [ { "path": "src/components/sign-in-auth-screen.tsx", @@ -496,8 +486,8 @@ "type": "registry:block", "title": "Sign Up Auth Form", "description": "A form allowing users to sign up with email and password.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/r/policies.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/policies.json"], "files": [ { "path": "src/components/sign-up-auth-form.tsx", @@ -513,13 +503,8 @@ "type": "registry:block", "title": "Sign Up Auth Screen", "description": "A screen allowing users to sign up with email and password.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": [ - "separator", - "card", - "{{ DOMAIN }}/r/sign-up-auth-form.json", - "{{ DOMAIN }}/r/multi-factor-auth-assertion-screen.json" - ], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["separator", "card", "{{ DOMAIN }}/sign-up-auth-form.json"], "files": [ { "path": "src/components/sign-up-auth-screen.tsx", @@ -535,7 +520,7 @@ "type": "registry:block", "title": "SMS Multi-Factor Assertion Form", "description": "A form allowing users to complete SMS-based multi-factor authentication during sign-in.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["form", "input", "button", "input-otp"], "files": [ { @@ -552,8 +537,8 @@ "type": "registry:block", "title": "SMS Multi-Factor Enrollment Form", "description": "A form allowing users to enroll SMS-based multi-factor authentication.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["form", "input", "button", "input-otp", "{{ DOMAIN }}/r/country-selector.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["form", "input", "button", "input-otp", "{{ DOMAIN }}/country-selector.json"], "files": [ { "path": "src/components/sms-multi-factor-enrollment-form.tsx", @@ -569,7 +554,7 @@ "type": "registry:block", "title": "TOTP Multi-Factor Assertion Form", "description": "A form allowing users to complete TOTP-based multi-factor authentication during sign-in.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["form", "button", "input-otp"], "files": [ { @@ -586,7 +571,7 @@ "type": "registry:block", "title": "TOTP Multi-Factor Enrollment Form", "description": "A form allowing users to enroll TOTP-based multi-factor authentication with QR code generation.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["form", "input", "button", "input-otp"], "files": [ { @@ -603,8 +588,8 @@ "type": "registry:block", "title": "Twitter Sign In Button", "description": "A button component for Twitter OAuth authentication.", - "dependencies": ["{{ DEP | @invertase/firebaseui-react }}"], - "registryDependencies": ["{{ DOMAIN }}/r/oauth-button.json"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], + "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { "path": "src/components/twitter-sign-in-button.tsx", diff --git a/packages/shadcn/src/components/apple-sign-in-button.test.tsx b/packages/shadcn/src/components/apple-sign-in-button.test.tsx index 490b11362..77cc8635f 100644 --- a/packages/shadcn/src/components/apple-sign-in-button.test.tsx +++ b/packages/shadcn/src/components/apple-sign-in-button.test.tsx @@ -18,9 +18,9 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { AppleSignInButton } from "./apple-sign-in-button"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { OAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed, onSignIn }: any) => ( @@ -33,8 +33,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, AppleLogo: ({ className, ...props }: any) => ( diff --git a/packages/shadcn/src/components/apple-sign-in-button.tsx b/packages/shadcn/src/components/apple-sign-in-button.tsx index 4aa656fff..01eaf0acf 100644 --- a/packages/shadcn/src/components/apple-sign-in-button.tsx +++ b/packages/shadcn/src/components/apple-sign-in-button.tsx @@ -17,8 +17,8 @@ "use client"; import { OAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type AppleSignInButtonProps, AppleLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type AppleSignInButtonProps, AppleLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/packages/shadcn/src/components/country-selector.test.tsx b/packages/shadcn/src/components/country-selector.test.tsx index f7a2e6651..9c22e7720 100644 --- a/packages/shadcn/src/components/country-selector.test.tsx +++ b/packages/shadcn/src/components/country-selector.test.tsx @@ -16,13 +16,13 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, cleanup, renderHook, waitFor } from "@testing-library/react"; -import { countryCodes } from "@invertase/firebaseui-core"; +import { countryCodes } from "@firebase-oss/ui-core"; import { CountrySelector } from "./country-selector"; import { createMockUI, createFirebaseUIProvider } from "../../tests/utils"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; -import { useCountries, useDefaultCountry } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; +import { useCountries, useDefaultCountry } from "@firebase-oss/ui-react"; import type { RefObject } from "react"; -import type { CountrySelectorRef } from "@invertase/firebaseui-react"; +import type { CountrySelectorRef } from "@firebase-oss/ui-react"; // Mock the shadcn Select components vi.mock("@/components/ui/select", () => ({ diff --git a/packages/shadcn/src/components/country-selector.tsx b/packages/shadcn/src/components/country-selector.tsx index aa9c38e39..15599609a 100644 --- a/packages/shadcn/src/components/country-selector.tsx +++ b/packages/shadcn/src/components/country-selector.tsx @@ -17,13 +17,13 @@ "use client"; import { forwardRef, useCallback, useImperativeHandle, useState } from "react"; -import type { CountryCode, CountryData } from "@invertase/firebaseui-core"; +import type { CountryCode, CountryData } from "@firebase-oss/ui-core"; import { type CountrySelectorRef, type CountrySelectorProps, useCountries, useDefaultCountry, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; diff --git a/packages/shadcn/src/components/email-link-auth-form.test.tsx b/packages/shadcn/src/components/email-link-auth-form.test.tsx index ae0396ab2..233cc6f94 100644 --- a/packages/shadcn/src/components/email-link-auth-form.test.tsx +++ b/packages/shadcn/src/components/email-link-auth-form.test.tsx @@ -18,15 +18,15 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { EmailLinkAuthForm } from "./email-link-auth-form"; import { act } from "react"; -import { useEmailLinkAuthFormAction } from "@invertase/firebaseui-react"; +import { useEmailLinkAuthFormAction } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; -import { UserCredential } from "firebase/auth"; -import { completeEmailLinkSignIn } from "@invertase/firebaseui-core"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; +import type { UserCredential } from "firebase/auth"; +import { completeEmailLinkSignIn } from "@firebase-oss/ui-core"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, sendSignInLinkToEmail: vi.fn(), @@ -34,8 +34,8 @@ vi.mock("@invertase/firebaseui-core", async (importOriginal) => { }; }); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, useEmailLinkAuthFormAction: vi.fn(), diff --git a/packages/shadcn/src/components/email-link-auth-form.tsx b/packages/shadcn/src/components/email-link-auth-form.tsx index f34c7a304..6ca8509a8 100644 --- a/packages/shadcn/src/components/email-link-auth-form.tsx +++ b/packages/shadcn/src/components/email-link-auth-form.tsx @@ -16,16 +16,17 @@ "use client"; -import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import type { EmailLinkAuthFormSchema } from "@invertase/firebaseui-core"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import type { EmailLinkAuthFormSchema } from "@firebase-oss/ui-core"; import { + useUI, useEmailLinkAuthFormAction, - useEmailLinkAuthFormCompleteSignIn, useEmailLinkAuthFormSchema, - useUI, + useEmailLinkAuthFormCompleteSignIn, type EmailLinkAuthFormProps, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; +import { useForm } from "react-hook-form"; +import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { useState } from "react"; import { useForm } from "react-hook-form"; diff --git a/packages/shadcn/src/components/email-link-auth-screen.test.tsx b/packages/shadcn/src/components/email-link-auth-screen.test.tsx index 3bc4493b5..05e9ab796 100644 --- a/packages/shadcn/src/components/email-link-auth-screen.test.tsx +++ b/packages/shadcn/src/components/email-link-auth-screen.test.tsx @@ -18,8 +18,8 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, cleanup, act } from "@testing-library/react"; import { EmailLinkAuthScreen } from "./email-link-auth-screen"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { MultiFactorResolver, type User } from "firebase/auth"; vi.mock("./email-link-auth-form", () => ({ diff --git a/packages/shadcn/src/components/email-link-auth-screen.tsx b/packages/shadcn/src/components/email-link-auth-screen.tsx index dcb962dfa..044d02859 100644 --- a/packages/shadcn/src/components/email-link-auth-screen.tsx +++ b/packages/shadcn/src/components/email-link-auth-screen.tsx @@ -16,8 +16,8 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type EmailLinkAuthScreenProps, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type EmailLinkAuthScreenProps, useOnUserAuthenticated } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; diff --git a/packages/shadcn/src/components/facebook-sign-in-button.test.tsx b/packages/shadcn/src/components/facebook-sign-in-button.test.tsx index daebce5fb..9357c3051 100644 --- a/packages/shadcn/src/components/facebook-sign-in-button.test.tsx +++ b/packages/shadcn/src/components/facebook-sign-in-button.test.tsx @@ -18,9 +18,9 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { FacebookSignInButton } from "./facebook-sign-in-button"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { FacebookAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed, onSignIn }: any) => ( @@ -33,8 +33,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, FacebookLogo: ({ className, ...props }: any) => ( diff --git a/packages/shadcn/src/components/facebook-sign-in-button.tsx b/packages/shadcn/src/components/facebook-sign-in-button.tsx index 0afdc44a8..b65311ad0 100644 --- a/packages/shadcn/src/components/facebook-sign-in-button.tsx +++ b/packages/shadcn/src/components/facebook-sign-in-button.tsx @@ -17,8 +17,8 @@ "use client"; import { FacebookAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type FacebookSignInButtonProps, FacebookLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type FacebookSignInButtonProps, FacebookLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/packages/shadcn/src/components/forgot-password-auth-form.test.tsx b/packages/shadcn/src/components/forgot-password-auth-form.test.tsx index 3a9a4efa3..b363e14e1 100644 --- a/packages/shadcn/src/components/forgot-password-auth-form.test.tsx +++ b/packages/shadcn/src/components/forgot-password-auth-form.test.tsx @@ -18,21 +18,21 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { ForgotPasswordAuthForm } from "./forgot-password-auth-form"; import { act } from "react"; -import { useForgotPasswordAuthFormAction } from "@invertase/firebaseui-react"; +import { useForgotPasswordAuthFormAction } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, sendPasswordResetEmail: vi.fn(), }; }); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, useForgotPasswordAuthFormAction: vi.fn(), diff --git a/packages/shadcn/src/components/forgot-password-auth-form.tsx b/packages/shadcn/src/components/forgot-password-auth-form.tsx index c7fad3fe8..60546ce1f 100644 --- a/packages/shadcn/src/components/forgot-password-auth-form.tsx +++ b/packages/shadcn/src/components/forgot-password-auth-form.tsx @@ -16,16 +16,16 @@ "use client"; -import type { ForgotPasswordAuthFormSchema } from "@invertase/firebaseui-core"; +import type { ForgotPasswordAuthFormSchema } from "@firebase-oss/ui-core"; import { useForgotPasswordAuthFormAction, useForgotPasswordAuthFormSchema, useUI, type ForgotPasswordAuthFormProps, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { useState } from "react"; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; diff --git a/packages/shadcn/src/components/forgot-password-auth-screen.test.tsx b/packages/shadcn/src/components/forgot-password-auth-screen.test.tsx index f35b9a18d..c5302aef0 100644 --- a/packages/shadcn/src/components/forgot-password-auth-screen.test.tsx +++ b/packages/shadcn/src/components/forgot-password-auth-screen.test.tsx @@ -18,8 +18,8 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { ForgotPasswordAuthScreen } from "./forgot-password-auth-screen"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./forgot-password-auth-form", () => ({ ForgotPasswordAuthForm: ({ onPasswordSent, onBackToSignInClick }: any) => ( diff --git a/packages/shadcn/src/components/forgot-password-auth-screen.tsx b/packages/shadcn/src/components/forgot-password-auth-screen.tsx index 6f92dd180..338ea8629 100644 --- a/packages/shadcn/src/components/forgot-password-auth-screen.tsx +++ b/packages/shadcn/src/components/forgot-password-auth-screen.tsx @@ -16,8 +16,8 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type ForgotPasswordAuthScreenProps } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type ForgotPasswordAuthScreenProps } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { ForgotPasswordAuthForm } from "@/components/forgot-password-auth-form"; diff --git a/packages/shadcn/src/components/github-sign-in-button.test.tsx b/packages/shadcn/src/components/github-sign-in-button.test.tsx index 7a35558b1..d7fd1d3eb 100644 --- a/packages/shadcn/src/components/github-sign-in-button.test.tsx +++ b/packages/shadcn/src/components/github-sign-in-button.test.tsx @@ -18,9 +18,9 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { GitHubSignInButton } from "./github-sign-in-button"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { GithubAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed, onSignIn }: any) => ( @@ -33,8 +33,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, GitHubLogo: ({ className, ...props }: any) => ( diff --git a/packages/shadcn/src/components/github-sign-in-button.tsx b/packages/shadcn/src/components/github-sign-in-button.tsx index 094160352..e93e581bf 100644 --- a/packages/shadcn/src/components/github-sign-in-button.tsx +++ b/packages/shadcn/src/components/github-sign-in-button.tsx @@ -17,8 +17,8 @@ "use client"; import { GithubAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type GitHubSignInButtonProps, GitHubLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type GitHubSignInButtonProps, GitHubLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/packages/shadcn/src/components/google-sign-in-button.test.tsx b/packages/shadcn/src/components/google-sign-in-button.test.tsx index d7765f1c8..aab0a8483 100644 --- a/packages/shadcn/src/components/google-sign-in-button.test.tsx +++ b/packages/shadcn/src/components/google-sign-in-button.test.tsx @@ -18,9 +18,9 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { GoogleSignInButton } from "./google-sign-in-button"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { GoogleAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed, onSignIn }: any) => ( @@ -33,8 +33,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, GoogleLogo: ({ className, ...props }: any) => ( diff --git a/packages/shadcn/src/components/google-sign-in-button.tsx b/packages/shadcn/src/components/google-sign-in-button.tsx index 3cb91d41f..596bc6724 100644 --- a/packages/shadcn/src/components/google-sign-in-button.tsx +++ b/packages/shadcn/src/components/google-sign-in-button.tsx @@ -17,8 +17,8 @@ "use client"; import { GoogleAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type GoogleSignInButtonProps, GoogleLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type GoogleSignInButtonProps, GoogleLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/packages/shadcn/src/components/microsoft-sign-in-button.test.tsx b/packages/shadcn/src/components/microsoft-sign-in-button.test.tsx index e7b9667f8..1111b5f06 100644 --- a/packages/shadcn/src/components/microsoft-sign-in-button.test.tsx +++ b/packages/shadcn/src/components/microsoft-sign-in-button.test.tsx @@ -18,9 +18,9 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { MicrosoftSignInButton } from "./microsoft-sign-in-button"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { OAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed, onSignIn }: any) => ( @@ -33,8 +33,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, MicrosoftLogo: ({ className, ...props }: any) => ( diff --git a/packages/shadcn/src/components/microsoft-sign-in-button.tsx b/packages/shadcn/src/components/microsoft-sign-in-button.tsx index b2aa2a3c0..7ae7672a2 100644 --- a/packages/shadcn/src/components/microsoft-sign-in-button.tsx +++ b/packages/shadcn/src/components/microsoft-sign-in-button.tsx @@ -17,8 +17,8 @@ "use client"; import { OAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type MicrosoftSignInButtonProps, MicrosoftLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type MicrosoftSignInButtonProps, MicrosoftLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/packages/shadcn/src/components/multi-factor-auth-assertion-form.test.tsx b/packages/shadcn/src/components/multi-factor-auth-assertion-form.test.tsx index e3995cfb6..8f9aca22f 100644 --- a/packages/shadcn/src/components/multi-factor-auth-assertion-form.test.tsx +++ b/packages/shadcn/src/components/multi-factor-auth-assertion-form.test.tsx @@ -18,12 +18,12 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup } from "@testing-library/react"; import { MultiFactorAuthAssertionForm } from "./multi-factor-auth-assertion-form"; import { createFirebaseUIProvider, createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { MultiFactorResolver, PhoneMultiFactorGenerator, TotpMultiFactorGenerator } from "firebase/auth"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FactorId, MultiFactorResolver, PhoneMultiFactorGenerator, TotpMultiFactorGenerator } from "firebase/auth"; const mockUseMultiFactorAssertionCleanup = vi.fn(); -vi.mock("@invertase/firebaseui-react", async () => { - const actual = await vi.importActual("@invertase/firebaseui-react"); +vi.mock("@firebase-oss/ui-react", async () => { + const actual = await vi.importActual("@firebase-oss/ui-react"); return { ...actual, useMultiFactorAssertionCleanup: () => mockUseMultiFactorAssertionCleanup(), diff --git a/packages/shadcn/src/components/multi-factor-auth-assertion-form.tsx b/packages/shadcn/src/components/multi-factor-auth-assertion-form.tsx index 24930fb1d..185cbfca5 100644 --- a/packages/shadcn/src/components/multi-factor-auth-assertion-form.tsx +++ b/packages/shadcn/src/components/multi-factor-auth-assertion-form.tsx @@ -16,8 +16,8 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI } from "@firebase-oss/ui-react"; import { PhoneMultiFactorGenerator, TotpMultiFactorGenerator, @@ -25,7 +25,7 @@ import { type UserCredential, } from "firebase/auth"; import { useState, type ComponentProps } from "react"; -import { useMultiFactorAssertionCleanup } from "@invertase/firebaseui-react"; +import { useMultiFactorAssertionCleanup } from "@firebase-oss/ui-react"; import { SmsMultiFactorAssertionForm } from "@/components/sms-multi-factor-assertion-form"; import { TotpMultiFactorAssertionForm } from "@/components/totp-multi-factor-assertion-form"; diff --git a/packages/shadcn/src/components/multi-factor-auth-assertion-screen.test.tsx b/packages/shadcn/src/components/multi-factor-auth-assertion-screen.test.tsx index e0c12197c..9c0338611 100644 --- a/packages/shadcn/src/components/multi-factor-auth-assertion-screen.test.tsx +++ b/packages/shadcn/src/components/multi-factor-auth-assertion-screen.test.tsx @@ -14,8 +14,8 @@ * limitations under the License. */ -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { cleanup, render, screen } from "@testing-library/react"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { createMockUI } from "../../tests/utils"; diff --git a/packages/shadcn/src/components/multi-factor-auth-assertion-screen.tsx b/packages/shadcn/src/components/multi-factor-auth-assertion-screen.tsx index b841181c3..157198959 100644 --- a/packages/shadcn/src/components/multi-factor-auth-assertion-screen.tsx +++ b/packages/shadcn/src/components/multi-factor-auth-assertion-screen.tsx @@ -16,8 +16,8 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type MultiFactorAuthAssertionScreenProps } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type MultiFactorAuthAssertionScreenProps } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { MultiFactorAuthAssertionForm } from "@/components/multi-factor-auth-assertion-form"; diff --git a/packages/shadcn/src/components/multi-factor-auth-enrollment-form.test.tsx b/packages/shadcn/src/components/multi-factor-auth-enrollment-form.test.tsx index b2efec12e..c13815560 100644 --- a/packages/shadcn/src/components/multi-factor-auth-enrollment-form.test.tsx +++ b/packages/shadcn/src/components/multi-factor-auth-enrollment-form.test.tsx @@ -18,8 +18,8 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup } from "@testing-library/react"; import { MultiFactorAuthEnrollmentForm } from "./multi-factor-auth-enrollment-form"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { FactorId } from "firebase/auth"; vi.mock("./sms-multi-factor-enrollment-form", () => ({ diff --git a/packages/shadcn/src/components/multi-factor-auth-enrollment-form.tsx b/packages/shadcn/src/components/multi-factor-auth-enrollment-form.tsx index 451757dfd..0d6d66e49 100644 --- a/packages/shadcn/src/components/multi-factor-auth-enrollment-form.tsx +++ b/packages/shadcn/src/components/multi-factor-auth-enrollment-form.tsx @@ -18,8 +18,8 @@ import { type ComponentProps, useState } from "react"; import { FactorId } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI } from "@firebase-oss/ui-react"; import { SmsMultiFactorEnrollmentForm } from "@/components/sms-multi-factor-enrollment-form"; import { TotpMultiFactorEnrollmentForm } from "@/components/totp-multi-factor-enrollment-form"; diff --git a/packages/shadcn/src/components/multi-factor-auth-enrollment-screen.test.tsx b/packages/shadcn/src/components/multi-factor-auth-enrollment-screen.test.tsx index 553f4ed25..68f396a01 100644 --- a/packages/shadcn/src/components/multi-factor-auth-enrollment-screen.test.tsx +++ b/packages/shadcn/src/components/multi-factor-auth-enrollment-screen.test.tsx @@ -18,8 +18,8 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { MultiFactorAuthEnrollmentScreen } from "./multi-factor-auth-enrollment-screen"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./multi-factor-auth-enrollment-form", () => ({ MultiFactorAuthEnrollmentForm: ({ onEnrollment }: { onEnrollment?: () => void }) => ( diff --git a/packages/shadcn/src/components/multi-factor-auth-enrollment-screen.tsx b/packages/shadcn/src/components/multi-factor-auth-enrollment-screen.tsx index eba761160..8bad3717e 100644 --- a/packages/shadcn/src/components/multi-factor-auth-enrollment-screen.tsx +++ b/packages/shadcn/src/components/multi-factor-auth-enrollment-screen.tsx @@ -16,8 +16,8 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type MultiFactorAuthEnrollmentFormProps } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type MultiFactorAuthEnrollmentFormProps } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { MultiFactorAuthEnrollmentForm } from "@/components/multi-factor-auth-enrollment-form"; diff --git a/packages/shadcn/src/components/oauth-button.test.tsx b/packages/shadcn/src/components/oauth-button.test.tsx index ccbddf858..9692ea7ce 100644 --- a/packages/shadcn/src/components/oauth-button.test.tsx +++ b/packages/shadcn/src/components/oauth-button.test.tsx @@ -18,15 +18,15 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { OAuthButton } from "./oauth-button"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import type { AuthProvider, UserCredential } from "firebase/auth"; import { ComponentProps } from "react"; -import { signInWithProvider } from "@invertase/firebaseui-core"; +import { signInWithProvider } from "@firebase-oss/ui-core"; import { FirebaseError } from "firebase/app"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), @@ -167,7 +167,7 @@ describe("", () => { }); it("does not call onSignIn callback when sign-in fails", async () => { - const { FirebaseUIError } = await import("@invertase/firebaseui-core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const onSignIn = vi.fn(); const ui = createMockUI(); @@ -194,7 +194,7 @@ describe("", () => { }); it("displays FirebaseUIError message when FirebaseUIError occurs", async () => { - const { FirebaseUIError } = await import("@invertase/firebaseui-core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); const mockError = new FirebaseUIError( @@ -261,7 +261,7 @@ describe("", () => { }); it("clears error when button is clicked again", async () => { - const { FirebaseUIError } = await import("@invertase/firebaseui-core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); diff --git a/packages/shadcn/src/components/oauth-button.tsx b/packages/shadcn/src/components/oauth-button.tsx index 2d59b3553..871d984a5 100644 --- a/packages/shadcn/src/components/oauth-button.tsx +++ b/packages/shadcn/src/components/oauth-button.tsx @@ -16,7 +16,7 @@ "use client"; -import { useUI, type OAuthButtonProps, useSignInWithProvider } from "@invertase/firebaseui-react"; +import { useUI, type OAuthButtonProps, useSignInWithProvider } from "@firebase-oss/ui-react"; import { Button } from "@/components/ui/button"; export type { OAuthButtonProps }; diff --git a/packages/shadcn/src/components/oauth-screen.test.tsx b/packages/shadcn/src/components/oauth-screen.test.tsx index bb49c5799..dd71700f8 100644 --- a/packages/shadcn/src/components/oauth-screen.test.tsx +++ b/packages/shadcn/src/components/oauth-screen.test.tsx @@ -17,8 +17,8 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, cleanup, act } from "@testing-library/react"; import { OAuthScreen } from "@/components/oauth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { MultiFactorResolver, type User } from "firebase/auth"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { MultiFactorResolver } from "firebase/auth"; vi.mock("@/components/policies", () => ({ Policies: () =>
Policies
, diff --git a/packages/shadcn/src/components/oauth-screen.tsx b/packages/shadcn/src/components/oauth-screen.tsx index 97cd600ce..b6f227664 100644 --- a/packages/shadcn/src/components/oauth-screen.tsx +++ b/packages/shadcn/src/components/oauth-screen.tsx @@ -16,10 +16,10 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { type User } from "firebase/auth"; import { type PropsWithChildren } from "react"; -import { useUI, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { useUI, useOnUserAuthenticated } from "@firebase-oss/ui-react"; import { Card, CardContent, CardHeader, CardDescription, CardTitle } from "@/components/ui/card"; import { Policies } from "@/components/policies"; import { MultiFactorAuthAssertionScreen } from "@/components/multi-factor-auth-assertion-screen"; diff --git a/packages/shadcn/src/components/phone-auth-form.test.tsx b/packages/shadcn/src/components/phone-auth-form.test.tsx index d8c7e5c01..2bb7624f8 100644 --- a/packages/shadcn/src/components/phone-auth-form.test.tsx +++ b/packages/shadcn/src/components/phone-auth-form.test.tsx @@ -18,16 +18,17 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { PhoneAuthForm } from "./phone-auth-form"; import { act } from "react"; -import { usePhoneNumberFormAction, useVerifyPhoneNumberFormAction, useUI } from "@invertase/firebaseui-react"; +import { usePhoneNumberFormAction, useVerifyPhoneNumberFormAction, useUI } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; -import { User, UserCredential } from "firebase/auth"; -import { FirebaseUI, FirebaseUIError } from "@invertase/firebaseui-core"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; +import type { User, UserCredential } from "firebase/auth"; +import { FirebaseUI, FirebaseUIError } from "@firebase-oss/ui-core"; import { FirebaseError } from "firebase/app"; +import { ERROR_CODE_MAP } from "@firebase-oss/ui-translations"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, verifyPhoneNumber: vi.fn(), @@ -50,8 +51,8 @@ vi.mock("@invertase/firebaseui-core", async (importOriginal) => { }; }); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, usePhoneNumberFormAction: vi.fn().mockReturnValue(vi.fn().mockResolvedValue("verification-id-123")), diff --git a/packages/shadcn/src/components/phone-auth-form.tsx b/packages/shadcn/src/components/phone-auth-form.tsx index adbe84f78..0708e7be6 100644 --- a/packages/shadcn/src/components/phone-auth-form.tsx +++ b/packages/shadcn/src/components/phone-auth-form.tsx @@ -24,7 +24,7 @@ import { useRecaptchaVerifier, useUI, useVerifyPhoneNumberFormAction, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useState } from "react"; import type { UserCredential } from "firebase/auth"; import { useRef } from "react"; @@ -36,7 +36,7 @@ import { getTranslation, type PhoneAuthNumberFormSchema, type PhoneAuthVerifyFormSchema, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; diff --git a/packages/shadcn/src/components/phone-auth-screen.test.tsx b/packages/shadcn/src/components/phone-auth-screen.test.tsx index d789517f3..c86fd0c45 100644 --- a/packages/shadcn/src/components/phone-auth-screen.test.tsx +++ b/packages/shadcn/src/components/phone-auth-screen.test.tsx @@ -17,8 +17,8 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, cleanup, act } from "@testing-library/react"; import { PhoneAuthScreen } from "@/components/phone-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { MultiFactorResolver, type User } from "firebase/auth"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { MultiFactorResolver } from "firebase/auth"; vi.mock("@/components/phone-auth-form", () => ({ PhoneAuthForm: ({ resendDelay }: { resendDelay?: number }) => ( diff --git a/packages/shadcn/src/components/phone-auth-screen.tsx b/packages/shadcn/src/components/phone-auth-screen.tsx index 28d7e78e4..14835bd05 100644 --- a/packages/shadcn/src/components/phone-auth-screen.tsx +++ b/packages/shadcn/src/components/phone-auth-screen.tsx @@ -17,8 +17,8 @@ "use client"; import type { PropsWithChildren } from "react"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, useOnUserAuthenticated } from "@firebase-oss/ui-react"; import { Card, CardContent, CardHeader, CardDescription, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { PhoneAuthForm } from "@/components/phone-auth-form"; diff --git a/packages/shadcn/src/components/policies.test.tsx b/packages/shadcn/src/components/policies.test.tsx index 85610b92e..c7358f35e 100644 --- a/packages/shadcn/src/components/policies.test.tsx +++ b/packages/shadcn/src/components/policies.test.tsx @@ -18,11 +18,11 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup } from "@testing-library/react"; import { Policies } from "./policies"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, signInWithEmailAndPassword: vi.fn(), diff --git a/packages/shadcn/src/components/policies.tsx b/packages/shadcn/src/components/policies.tsx index f15645afb..84cb3b557 100644 --- a/packages/shadcn/src/components/policies.tsx +++ b/packages/shadcn/src/components/policies.tsx @@ -15,8 +15,8 @@ */ import { cn } from "@/lib/utils"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, PolicyContext } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, PolicyContext } from "@firebase-oss/ui-react"; import { cloneElement, useContext } from "react"; export function Policies() { diff --git a/packages/shadcn/src/components/redirect-error.tsx b/packages/shadcn/src/components/redirect-error.tsx index 3bef7da6d..1515fab88 100644 --- a/packages/shadcn/src/components/redirect-error.tsx +++ b/packages/shadcn/src/components/redirect-error.tsx @@ -16,7 +16,7 @@ "use client"; -import { useRedirectError } from "@invertase/firebaseui-react"; +import { useRedirectError } from "@firebase-oss/ui-react"; export function RedirectError() { const error = useRedirectError(); diff --git a/packages/shadcn/src/components/sign-in-auth-form.test.tsx b/packages/shadcn/src/components/sign-in-auth-form.test.tsx index 24503e01d..1536e5a11 100644 --- a/packages/shadcn/src/components/sign-in-auth-form.test.tsx +++ b/packages/shadcn/src/components/sign-in-auth-form.test.tsx @@ -18,22 +18,22 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { SignInAuthForm } from "./sign-in-auth-form"; import { act } from "react"; -import { useSignInAuthFormAction } from "@invertase/firebaseui-react"; +import { useSignInAuthFormAction } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { UserCredential } from "firebase/auth"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, signInWithEmailAndPassword: vi.fn(), }; }); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, useSignInAuthFormAction: vi.fn(), diff --git a/packages/shadcn/src/components/sign-in-auth-form.tsx b/packages/shadcn/src/components/sign-in-auth-form.tsx index 71c62a4b9..76c510ebd 100644 --- a/packages/shadcn/src/components/sign-in-auth-form.tsx +++ b/packages/shadcn/src/components/sign-in-auth-form.tsx @@ -16,16 +16,16 @@ "use client"; -import type { SignInAuthFormSchema } from "@invertase/firebaseui-core"; +import type { SignInAuthFormSchema } from "@firebase-oss/ui-core"; import { useSignInAuthFormAction, useSignInAuthFormSchema, useUI, type SignInAuthFormProps, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; diff --git a/packages/shadcn/src/components/sign-in-auth-screen.test.tsx b/packages/shadcn/src/components/sign-in-auth-screen.test.tsx index dca816c20..25e288bc7 100644 --- a/packages/shadcn/src/components/sign-in-auth-screen.test.tsx +++ b/packages/shadcn/src/components/sign-in-auth-screen.test.tsx @@ -17,10 +17,9 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, cleanup, act } from "@testing-library/react"; import { SignInAuthScreen } from "./sign-in-auth-screen"; -import { createMockUI } from "../../tests/utils"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { MultiFactorResolver, type User } from "firebase/auth"; +import { createMockUI, createFirebaseUIProvider } from "../../tests/utils"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./sign-in-auth-form", () => ({ SignInAuthForm: ({ onSignIn, onForgotPasswordClick, onRegisterClick }: any) => ( diff --git a/packages/shadcn/src/components/sign-in-auth-screen.tsx b/packages/shadcn/src/components/sign-in-auth-screen.tsx index ba2f8812b..e229609ce 100644 --- a/packages/shadcn/src/components/sign-in-auth-screen.tsx +++ b/packages/shadcn/src/components/sign-in-auth-screen.tsx @@ -16,8 +16,8 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type SignInAuthScreenProps, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type SignInAuthScreenProps, useOnUserAuthenticated } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; diff --git a/packages/shadcn/src/components/sign-up-auth-form.test.tsx b/packages/shadcn/src/components/sign-up-auth-form.test.tsx index 951ad5771..59082c10c 100644 --- a/packages/shadcn/src/components/sign-up-auth-form.test.tsx +++ b/packages/shadcn/src/components/sign-up-auth-form.test.tsx @@ -18,22 +18,22 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { SignUpAuthForm } from "./sign-up-auth-form"; import { act } from "react"; -import { useSignUpAuthFormAction, useRequireDisplayName } from "@invertase/firebaseui-react"; +import { useSignUpAuthFormAction, useRequireDisplayName } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { UserCredential } from "firebase/auth"; -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, createUserWithEmailAndPassword: vi.fn(), }; }); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, useSignUpAuthFormAction: vi.fn(), diff --git a/packages/shadcn/src/components/sign-up-auth-form.tsx b/packages/shadcn/src/components/sign-up-auth-form.tsx index fca4bb3ab..431073942 100644 --- a/packages/shadcn/src/components/sign-up-auth-form.tsx +++ b/packages/shadcn/src/components/sign-up-auth-form.tsx @@ -16,17 +16,17 @@ "use client"; -import type { SignUpAuthFormSchema } from "@invertase/firebaseui-core"; +import type { SignUpAuthFormSchema } from "@firebase-oss/ui-core"; import { useSignUpAuthFormAction, useSignUpAuthFormSchema, useUI, type SignUpAuthFormProps, useRequireDisplayName, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; diff --git a/packages/shadcn/src/components/sign-up-auth-screen.test.tsx b/packages/shadcn/src/components/sign-up-auth-screen.test.tsx index afbaf6567..14277d350 100644 --- a/packages/shadcn/src/components/sign-up-auth-screen.test.tsx +++ b/packages/shadcn/src/components/sign-up-auth-screen.test.tsx @@ -18,8 +18,8 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, cleanup, act } from "@testing-library/react"; import { SignUpAuthScreen } from "./sign-up-auth-screen"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { MultiFactorResolver, type User } from "firebase/auth"; vi.mock("./sign-up-auth-form", () => ({ diff --git a/packages/shadcn/src/components/sign-up-auth-screen.tsx b/packages/shadcn/src/components/sign-up-auth-screen.tsx index 9b0ca46ff..acc40a126 100644 --- a/packages/shadcn/src/components/sign-up-auth-screen.tsx +++ b/packages/shadcn/src/components/sign-up-auth-screen.tsx @@ -16,8 +16,8 @@ "use client"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type SignUpAuthScreenProps, useOnUserAuthenticated } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type SignUpAuthScreenProps, useOnUserAuthenticated } from "@firebase-oss/ui-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; diff --git a/packages/shadcn/src/components/sms-multi-factor-assertion-form.test.tsx b/packages/shadcn/src/components/sms-multi-factor-assertion-form.test.tsx index 9d7e5aac7..487f7a0fc 100644 --- a/packages/shadcn/src/components/sms-multi-factor-assertion-form.test.tsx +++ b/packages/shadcn/src/components/sms-multi-factor-assertion-form.test.tsx @@ -18,11 +18,13 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { SmsMultiFactorAssertionForm } from "./sms-multi-factor-assertion-form"; import { createFirebaseUIProvider, createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { PhoneMultiFactorGenerator } from "firebase/auth"; +import { verifyPhoneNumber, signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { useSmsMultiFactorAssertionPhoneFormAction, useSmsMultiFactorAssertionVerifyFormAction, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import React from "react"; // Mock input-otp components to prevent window access issues @@ -39,18 +41,8 @@ vi.mock("@/components/ui/input-otp", () => ({ }), })); -vi.mock("@/components/ui/form", async (importOriginal) => { - const mod = await importOriginal(); - return { - ...mod, - FormItem: ({ children, ...props }: any) => React.createElement("div", { ...props }, children), - FormLabel: ({ children, ...props }: any) => React.createElement("label", { ...props }, children), - FormDescription: ({ children, ...props }: any) => React.createElement("p", { ...props }, children), - }; -}); - -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, verifyPhoneNumber: vi.fn(), @@ -58,8 +50,8 @@ vi.mock("@invertase/firebaseui-core", async (importOriginal) => { }; }); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, useRecaptchaVerifier: () => ({ diff --git a/packages/shadcn/src/components/sms-multi-factor-assertion-form.tsx b/packages/shadcn/src/components/sms-multi-factor-assertion-form.tsx index 0be341003..cc12fa807 100644 --- a/packages/shadcn/src/components/sms-multi-factor-assertion-form.tsx +++ b/packages/shadcn/src/components/sms-multi-factor-assertion-form.tsx @@ -19,14 +19,14 @@ import { useRef, useState } from "react"; import { type UserCredential, type MultiFactorInfo } from "firebase/auth"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { useMultiFactorPhoneAuthVerifyFormSchema, useRecaptchaVerifier, useUI, useSmsMultiFactorAssertionPhoneFormAction, useSmsMultiFactorAssertionVerifyFormAction, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; diff --git a/packages/shadcn/src/components/sms-multi-factor-enrollment-form.test.tsx b/packages/shadcn/src/components/sms-multi-factor-enrollment-form.test.tsx index 7d92ced2a..0fd6c3a99 100644 --- a/packages/shadcn/src/components/sms-multi-factor-enrollment-form.test.tsx +++ b/packages/shadcn/src/components/sms-multi-factor-enrollment-form.test.tsx @@ -17,8 +17,8 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { SmsMultiFactorEnrollmentForm } from "./sms-multi-factor-enrollment-form"; import { createFirebaseUIProvider, createMockUIWithUser } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { verifyPhoneNumber, enrollWithMultiFactorAssertion } from "@invertase/firebaseui-core"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { verifyPhoneNumber, enrollWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import React from "react"; // Mock input-otp components to prevent window access issues @@ -32,16 +32,16 @@ vi.mock("@/components/ui/input-otp", () => ({ })); // Mock the schema hooks -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, useRecaptchaVerifier: vi.fn().mockReturnValue({}), }; }); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, verifyPhoneNumber: vi.fn(), diff --git a/packages/shadcn/src/components/sms-multi-factor-enrollment-form.tsx b/packages/shadcn/src/components/sms-multi-factor-enrollment-form.tsx index cff880858..de1e786ec 100644 --- a/packages/shadcn/src/components/sms-multi-factor-enrollment-form.tsx +++ b/packages/shadcn/src/components/sms-multi-factor-enrollment-form.tsx @@ -24,14 +24,14 @@ import { formatPhoneNumber, getTranslation, verifyPhoneNumber, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { CountrySelector, type CountrySelectorRef } from "@/components/country-selector"; import { useMultiFactorPhoneAuthNumberFormSchema, useMultiFactorPhoneAuthVerifyFormSchema, useRecaptchaVerifier, useUI, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; diff --git a/packages/shadcn/src/components/totp-multi-factor-assertion-form.test.tsx b/packages/shadcn/src/components/totp-multi-factor-assertion-form.test.tsx index 6bcdcae72..83fbb845f 100644 --- a/packages/shadcn/src/components/totp-multi-factor-assertion-form.test.tsx +++ b/packages/shadcn/src/components/totp-multi-factor-assertion-form.test.tsx @@ -18,9 +18,9 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { TotpMultiFactorAssertionForm } from "./totp-multi-factor-assertion-form"; import { createFirebaseUIProvider, createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { TotpMultiFactorGenerator } from "firebase/auth"; -import { useTotpMultiFactorAssertionFormAction } from "@invertase/firebaseui-react"; +import { useTotpMultiFactorAssertionFormAction } from "@firebase-oss/ui-react"; import React from "react"; // Mock input-otp components to prevent window access issues @@ -37,8 +37,8 @@ vi.mock("@/components/ui/input-otp", () => ({ }), })); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, useTotpMultiFactorAssertionFormAction: vi.fn(), diff --git a/packages/shadcn/src/components/totp-multi-factor-assertion-form.tsx b/packages/shadcn/src/components/totp-multi-factor-assertion-form.tsx index a960d12f1..79bf17d0b 100644 --- a/packages/shadcn/src/components/totp-multi-factor-assertion-form.tsx +++ b/packages/shadcn/src/components/totp-multi-factor-assertion-form.tsx @@ -17,12 +17,12 @@ "use client"; import { type UserCredential, type MultiFactorInfo } from "firebase/auth"; -import { FirebaseUIError, getTranslation } from "@invertase/firebaseui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { useMultiFactorTotpAuthVerifyFormSchema, useUI, useTotpMultiFactorAssertionFormAction, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; diff --git a/packages/shadcn/src/components/totp-multi-factor-enrollment-form.test.tsx b/packages/shadcn/src/components/totp-multi-factor-enrollment-form.test.tsx index 8b3f100f9..5e85b707f 100644 --- a/packages/shadcn/src/components/totp-multi-factor-enrollment-form.test.tsx +++ b/packages/shadcn/src/components/totp-multi-factor-enrollment-form.test.tsx @@ -17,8 +17,8 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup, waitFor } from "@testing-library/react"; import { TotpMultiFactorEnrollmentForm } from "./totp-multi-factor-enrollment-form"; import { createFirebaseUIProvider, createMockUIWithUser } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; -import { generateTotpSecret, generateTotpQrCode, enrollWithMultiFactorAssertion } from "@invertase/firebaseui-core"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { generateTotpSecret, generateTotpQrCode, enrollWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import React from "react"; // Mock input-otp components to prevent window access issues @@ -35,8 +35,8 @@ vi.mock("@/components/ui/input-otp", () => ({ }), })); -vi.mock("@invertase/firebaseui-core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, generateTotpSecret: vi.fn(), diff --git a/packages/shadcn/src/components/totp-multi-factor-enrollment-form.tsx b/packages/shadcn/src/components/totp-multi-factor-enrollment-form.tsx index 734ebef61..3cc936cce 100644 --- a/packages/shadcn/src/components/totp-multi-factor-enrollment-form.tsx +++ b/packages/shadcn/src/components/totp-multi-factor-enrollment-form.tsx @@ -24,12 +24,12 @@ import { generateTotpQrCode, generateTotpSecret, getTranslation, -} from "@invertase/firebaseui-core"; +} from "@firebase-oss/ui-core"; import { useMultiFactorTotpAuthNumberFormSchema, useMultiFactorTotpAuthVerifyFormSchema, useUI, -} from "@invertase/firebaseui-react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; diff --git a/packages/shadcn/src/components/twitter-sign-in-button.test.tsx b/packages/shadcn/src/components/twitter-sign-in-button.test.tsx index 053580c4e..d3063ce9e 100644 --- a/packages/shadcn/src/components/twitter-sign-in-button.test.tsx +++ b/packages/shadcn/src/components/twitter-sign-in-button.test.tsx @@ -18,9 +18,9 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { TwitterSignInButton } from "./twitter-sign-in-button"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@invertase/firebaseui-translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { TwitterAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed, onSignIn }: any) => ( @@ -33,8 +33,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@invertase/firebaseui-react", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-react", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, TwitterLogo: ({ className, ...props }: any) => ( diff --git a/packages/shadcn/src/components/twitter-sign-in-button.tsx b/packages/shadcn/src/components/twitter-sign-in-button.tsx index de379fc0b..1073a6895 100644 --- a/packages/shadcn/src/components/twitter-sign-in-button.tsx +++ b/packages/shadcn/src/components/twitter-sign-in-button.tsx @@ -17,8 +17,8 @@ "use client"; import { TwitterAuthProvider } from "firebase/auth"; -import { getTranslation } from "@invertase/firebaseui-core"; -import { useUI, type TwitterSignInButtonProps, TwitterLogo } from "@invertase/firebaseui-react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type TwitterSignInButtonProps, TwitterLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components/oauth-button"; diff --git a/packages/shadcn/tests/utils.tsx b/packages/shadcn/tests/utils.tsx index 12f571779..833292abc 100644 --- a/packages/shadcn/tests/utils.tsx +++ b/packages/shadcn/tests/utils.tsx @@ -16,10 +16,10 @@ import type { FirebaseApp } from "firebase/app"; import type { Auth } from "firebase/auth"; -import { enUs } from "@invertase/firebaseui-translations"; -import { FirebaseUIProvider } from "@invertase/firebaseui-react"; -import { Behavior, FirebaseUIOptions, initializeUI } from "@invertase/firebaseui-core"; -import { FirebaseUIStore } from "@invertase/firebaseui-core"; +import { enUs } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; +import { Behavior, FirebaseUIOptions, initializeUI } from "@firebase-oss/ui-core"; +import { FirebaseUIStore } from "@firebase-oss/ui-core"; import { vi } from "vitest"; export function createMockUI(overrides?: Partial) { diff --git a/packages/shadcn/tsconfig.json b/packages/shadcn/tsconfig.json index a8e7da5e9..b24344581 100644 --- a/packages/shadcn/tsconfig.json +++ b/packages/shadcn/tsconfig.json @@ -8,8 +8,8 @@ "paths": { "@/*": ["./src/*"], "@/tests/*": ["./tests/*"], - "@invertase/firebaseui-core": ["../core/src/index.ts"], - "@invertase/firebaseui-react": ["../react/src/index.ts"] + "@firebase-oss/ui-core": ["../core/src/index.ts"], + "@firebase-oss/ui-react": ["../react/src/index.ts"] } }, "include": ["src", "tests", "vite.config.ts", "setup-test.ts"] diff --git a/packages/shadcn/vitest.config.ts b/packages/shadcn/vitest.config.ts index d658a1d4b..3ccebb4c8 100644 --- a/packages/shadcn/vitest.config.ts +++ b/packages/shadcn/vitest.config.ts @@ -19,7 +19,7 @@ import viteConfig from "./vite.config"; export default mergeConfig(viteConfig, { test: { - name: "@invertase/firebaseui-shadcn", + name: "@firebase-oss/ui-shadcn", // Use the same environment as the package environment: "jsdom", // Include TypeScript files diff --git a/packages/styles/GEMINI.md b/packages/styles/GEMINI.md index 8dfa1b46d..00af45eb9 100644 --- a/packages/styles/GEMINI.md +++ b/packages/styles/GEMINI.md @@ -1,10 +1,10 @@ # Firebase UI Styles -This document provides context for the `@invertase/firebaseui-styles` package. +This document provides context for the `@firebase-oss/ui-styles` package. ## Overview -The `@invertase/firebaseui-styles` package provides the core styling for all Firebase UI for Web components. It is framework-agnostic and offers multiple ways to be consumed. +The `@firebase-oss/ui-styles` package provides the core styling for all Firebase UI for Web components. It is framework-agnostic and offers multiple ways to be consumed. 1. **CSS Files**: For direct use in projects. It provides different files depending on whether you use Tailwind CSS. 2. **Component Variants**: It exports utilities using `cva` (Class Variance Authority) to programmatically apply styles, which is useful when building custom components. @@ -21,7 +21,7 @@ If your project uses Tailwind CSS, you should import the `tailwind` entry point ```css /* In your global styles.css */ -@import "@invertase/firebaseui-styles/tailwind"; +@import "@firebase-oss/ui-styles/tailwind"; ``` ### Without Tailwind CSS @@ -30,7 +30,7 @@ If you are not using Tailwind CSS, you can import the pre-compiled distributed f ```javascript // In your main application file -import "@invertase/firebaseui-styles"; +import "@firebase-oss/ui-styles"; ``` ## Component Variants (CVA) @@ -44,7 +44,7 @@ Currently, it exports a `buttonVariant` helper. Here is how you might use it in a React component: ```tsx -import { buttonVariant, ButtonVariant } from "@invertase/firebaseui-styles"; +import { buttonVariant, ButtonVariant } from "@firebase-oss/ui-styles"; import { type ComponentProps } from "react"; interface ButtonProps extends ComponentProps<"button"> { diff --git a/packages/styles/README.md b/packages/styles/README.md index 76e17da22..046be2bb5 100644 --- a/packages/styles/README.md +++ b/packages/styles/README.md @@ -1,4 +1,4 @@ -# @invertase/firebaseui-styles +# @firebase-oss/ui-styles This package contains the styles for the FirebaseUI components. @@ -10,7 +10,7 @@ If you are using Tailwind CSS in your project, you can import the source files d ```css @import "tailwindcss"; -@import "@invertase/firebaseui-styles/tailwind"; +@import "@firebase-oss/ui-styles/tailwind"; ``` ### With CSS @@ -18,7 +18,7 @@ If you are using Tailwind CSS in your project, you can import the source files d Alternatively, you can import fully compiled CSS files into your project. This output contains both the tailwind styles and the FirebaseUI styles. ```jsx -import "@invertase/firebaseui-styles"; +import "@firebase-oss/ui-styles"; ``` ## Themes @@ -27,8 +27,8 @@ The packages also exports themes which overrides the CSS variables with preset c ```css @import "tailwindcss"; -@import "@invertase/firebaseui-styles/tailwind"; -@import "@invertase/firebaseui-styles/themes/brualist"; +@import "@firebase-oss/ui-styles/tailwind"; +@import "@firebase-oss/ui-styles/themes/brualist"; ``` ## Building diff --git a/packages/styles/package.json b/packages/styles/package.json index 84b979721..c6529f129 100644 --- a/packages/styles/package.json +++ b/packages/styles/package.json @@ -1,6 +1,6 @@ { - "name": "@invertase/firebaseui-styles", - "version": "0.0.13", + "name": "@firebase-oss/ui-styles", + "version": "0.0.1", "type": "module", "zshy": { "exports": { diff --git a/packages/styles/vitest.config.ts b/packages/styles/vitest.config.ts index 50fd2244c..455adb70b 100644 --- a/packages/styles/vitest.config.ts +++ b/packages/styles/vitest.config.ts @@ -18,7 +18,7 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { - name: "@invertase/firebaseui-styles", + name: "@firebase-oss/ui-styles", environment: "jsdom", include: ["src/**/*.{test,spec}.{js,ts}"], exclude: ["node_modules/**/*", "dist/**/*"], diff --git a/packages/translations/GEMINI.md b/packages/translations/GEMINI.md index b210dec44..bc3a4d779 100644 --- a/packages/translations/GEMINI.md +++ b/packages/translations/GEMINI.md @@ -1,20 +1,20 @@ # Firebase UI Translations -This document provides context for the `@invertase/firebaseui-translations` package. +This document provides context for the `@firebase-oss/ui-translations` package. ## Overview -The `@invertase/firebaseui-translations` package provides the localization and internationalization (i18n) capabilities for the Firebase UI for Web library. It contains the translation strings for various languages and exports utilities to register and use different locales. +The `@firebase-oss/ui-translations` package provides the localization and internationalization (i18n) capabilities for the Firebase UI for Web library. It contains the translation strings for various languages and exports utilities to register and use different locales. -This package is a core dependency of `@invertase/firebaseui-core`, which uses it to display all user-facing text, such as labels, messages, and errors. +This package is a core dependency of `@firebase-oss/ui-core`, which uses it to display all user-facing text, such as labels, messages, and errors. ## Usage -The primary way to use this package is to import a pre-registered locale and pass it to the `initializeUI` function from the `@invertase/firebaseui-core` package. +The primary way to use this package is to import a pre-registered locale and pass it to the `initializeUI` function from the `@firebase-oss/ui-core` package. ```typescript -import { initializeUI } from "@invertase/firebaseui-core"; -import { enUs } from "@invertase/firebaseui-translations"; +import { initializeUI } from "@firebase-oss/ui-core"; +import { enUs } from "@firebase-oss/ui-translations"; import { firebaseApp } from "./firebase"; const ui = initializeUI({ @@ -49,7 +49,7 @@ To contribute a new language, you can create a new locale file and register it u 1. **Create the translation file (`fr.ts`):** ```typescript - import { type Translations } from "@invertase/firebaseui-translations"; + import { type Translations } from "@firebase-oss/ui-translations"; export const fr: Translations = { errors: { @@ -63,8 +63,8 @@ To contribute a new language, you can create a new locale file and register it u 2. **Register and use the locale:** ```typescript - import { initializeUI } from "@invertase/firebaseui-core"; - import { registerLocale } from "@invertase/firebaseui-translations"; + import { initializeUI } from "@firebase-oss/ui-core"; + import { registerLocale } from "@firebase-oss/ui-translations"; import { fr } from "./fr"; // Your custom locale file const frFr = registerLocale("fr-FR", fr); @@ -85,7 +85,7 @@ The `registerLocale` function accepts an optional third argument: a `fallback` l ```typescript // en-gb.ts - import { type Translations } from "@invertase/firebaseui-translations"; + import { type Translations } from "@firebase-oss/ui-translations"; // Only define the strings you want to override. export const enGB: Partial = { @@ -98,8 +98,8 @@ The `registerLocale` function accepts an optional third argument: a `fallback` l 2. **Register the locale with a fallback:** ```typescript - import { initializeUI } from "@invertase/firebaseui-core"; - import { registerLocale, enUs } from "@invertase/firebaseui-translations"; + import { initializeUI } from "@firebase-oss/ui-core"; + import { registerLocale, enUs } from "@firebase-oss/ui-translations"; import { enGB } from "./en-gb"; // Register en-GB, with en-US as the fallback. diff --git a/packages/translations/package.json b/packages/translations/package.json index 68578b026..6b5a987c6 100644 --- a/packages/translations/package.json +++ b/packages/translations/package.json @@ -1,6 +1,6 @@ { - "name": "@invertase/firebaseui-translations", - "version": "0.0.8", + "name": "@firebase-oss/ui-translations", + "version": "0.0.1", "description": "Translations for Firebase UI", "type": "module", "main": "./dist/index.cjs", diff --git a/packages/translations/vitest.config.ts b/packages/translations/vitest.config.ts index 43a017fa6..5f7669405 100644 --- a/packages/translations/vitest.config.ts +++ b/packages/translations/vitest.config.ts @@ -18,7 +18,7 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { - name: "@invertase/firebaseui-translations", + name: "@firebase-oss/ui-translations", include: ["src/**/*.{test,spec}.{js,ts}"], exclude: ["node_modules/**/*", "dist/**/*"], }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1be27c105..4b17532d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -179,16 +179,16 @@ importers: '@angular/ssr': specifier: ^20.2.2 version: 20.3.7(64ca8375dbaf48ae24b53908d91cad2b) - '@invertase/firebaseui-angular': + '@firebase-oss/ui-angular': specifier: workspace:* version: link:../../packages/angular - '@invertase/firebaseui-core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../../packages/core - '@invertase/firebaseui-styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../../packages/styles - '@invertase/firebaseui-translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../../packages/translations '@tailwindcss/postcss': @@ -291,16 +291,16 @@ importers: examples/nextjs: dependencies: - '@invertase/firebaseui-core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../../packages/core - '@invertase/firebaseui-react': + '@firebase-oss/ui-react': specifier: workspace:* version: link:../../packages/react - '@invertase/firebaseui-styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../../packages/styles - '@invertase/firebaseui-translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../../packages/translations firebase: @@ -346,18 +346,18 @@ importers: examples/nextjs-ssr: dependencies: - '@invertase/firebaseui-core': - specifier: latest - version: 0.0.12(firebase@11.10.0) - '@invertase/firebaseui-react': - specifier: latest - version: 0.0.11(@types/react@19.1.16)(firebase@11.10.0)(nanostores@1.0.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.3) - '@invertase/firebaseui-styles': - specifier: latest - version: 0.0.14(typescript@5.9.3) - '@invertase/firebaseui-translations': - specifier: latest - version: 0.0.9 + '@firebase-oss/ui-core': + specifier: workspace:* + version: link:../../packages/core + '@firebase-oss/ui-react': + specifier: workspace:* + version: link:../../packages/react + '@firebase-oss/ui-styles': + specifier: workspace:* + version: link:../../packages/styles + '@firebase-oss/ui-translations': + specifier: workspace:* + version: link:../../packages/translations firebase: specifier: ^11.10.0 version: 11.10.0 @@ -404,16 +404,16 @@ importers: examples/react: dependencies: - '@invertase/firebaseui-core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../../packages/core - '@invertase/firebaseui-react': + '@firebase-oss/ui-react': specifier: workspace:* version: link:../../packages/react - '@invertase/firebaseui-styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../../packages/styles - '@invertase/firebaseui-translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../../packages/translations firebase: @@ -468,21 +468,21 @@ importers: examples/shadcn: dependencies: - '@hookform/resolvers': - specifier: ^5.2.2 - version: 5.2.2(react-hook-form@7.65.0(react@19.1.1)) - '@invertase/firebaseui-core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../../packages/core - '@invertase/firebaseui-react': + '@firebase-oss/ui-react': specifier: workspace:* version: link:../../packages/react - '@invertase/firebaseui-styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../../packages/styles - '@invertase/firebaseui-translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../../packages/translations + '@hookform/resolvers': + specifier: ^5.2.2 + version: 5.2.2(react-hook-form@7.65.0(react@19.1.1)) '@radix-ui/react-accordion': specifier: ^1.2.12 version: 1.2.12(@types/react-dom@19.1.9(@types/react@19.1.16))(@types/react@19.1.16)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -664,10 +664,10 @@ importers: packages/angular: dependencies: - '@invertase/firebaseui-core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../core - '@invertase/firebaseui-styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../styles '@tanstack/angular-form': @@ -767,7 +767,7 @@ importers: packages/core: dependencies: - '@invertase/firebaseui-translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../translations libphonenumber-js: @@ -813,10 +813,10 @@ importers: packages/react: dependencies: - '@invertase/firebaseui-core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../core - '@invertase/firebaseui-styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../styles '@nanostores/react': @@ -838,7 +838,7 @@ importers: specifier: 'catalog:' version: 4.1.12 devDependencies: - '@invertase/firebaseui-translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../translations '@testing-library/jest-dom': @@ -895,15 +895,15 @@ importers: packages/shadcn: dependencies: - '@hookform/resolvers': - specifier: ^5.2.2 - version: 5.2.2(react-hook-form@7.65.0(react@19.1.1)) - '@invertase/firebaseui-core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../core - '@invertase/firebaseui-react': + '@firebase-oss/ui-react': specifier: workspace:* version: link:../react + '@hookform/resolvers': + specifier: ^5.2.2 + version: 5.2.2(react-hook-form@7.65.0(react@19.1.1)) '@radix-ui/react-label': specifier: ^2.1.7 version: 2.1.7(@types/react-dom@19.1.9(@types/react@19.1.16))(@types/react@19.1.16)(react-dom@19.1.1(react@19.1.1))(react@19.1.1) @@ -938,7 +938,7 @@ importers: specifier: 'catalog:' version: 4.1.12 devDependencies: - '@invertase/firebaseui-translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../translations '@tailwindcss/vite': @@ -3063,24 +3063,6 @@ packages: '@types/node': optional: true - '@invertase/firebaseui-core@0.0.12': - resolution: {integrity: sha512-tmP/OveY+gtqsSedqukmBtn/QWG6cj290EdWn50/ce0fCbgn1OMBSwO6ytCVkoYmIvoexiCV7dRTYHG/9Ub9/w==} - peerDependencies: - firebase: ^11 || ^12 - - '@invertase/firebaseui-react@0.0.11': - resolution: {integrity: sha512-qkP7G9T/6CEa14e6J3Ch5lTdtAffpR2KvcsIEzt1vX+WqKeTxL+jmMC9+RRvHLMiEbbSJvnp4XsvJ5Ta42ak2Q==} - peerDependencies: - firebase: ^11 || ^12 - react: ^19 - react-dom: ^19 - - '@invertase/firebaseui-styles@0.0.14': - resolution: {integrity: sha512-l6UfGhByfjS+aTMmOklK5Xpyk/Ktrh/1QkILwLAZhq+frDLmTo3hBGt7F7g5AyI84MQl+ge+L/NbQYjnQ3I6XQ==} - - '@invertase/firebaseui-translations@0.0.9': - resolution: {integrity: sha512-INTu2PQz7DB2PhmhT8bDUaVgV2/8MZ2yqy2Oesln4r6Lkcw6zVtU65VDnHutztaOVT+UiW91v41YXn5cZN7SRQ==} - '@isaacs/balanced-match@4.0.1': resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==} engines: {node: 20 || >=22} @@ -10222,7 +10204,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.2003.10(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.2003.10(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.101.2))(webpack@5.101.2) + '@angular-devkit/build-webpack': 0.2003.10(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.101.2))(webpack@5.101.2(esbuild@0.25.9)) '@angular-devkit/core': 20.3.10(chokidar@4.0.3) '@angular/build': 20.3.10(1be407f5110624cbb4aee41c10128f32) '@angular/compiler-cli': 20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3) @@ -10236,7 +10218,7 @@ snapshots: '@babel/preset-env': 7.28.3(@babel/core@7.28.3) '@babel/runtime': 7.28.3 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 20.3.10(@angular/compiler-cli@20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.101.2) + '@ngtools/webpack': 20.3.10(@angular/compiler-cli@20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.101.2(esbuild@0.25.9)) ansi-colors: 4.1.3 autoprefixer: 10.4.21(postcss@8.5.6) babel-loader: 10.0.0(@babel/core@7.28.3)(webpack@5.101.2) @@ -10313,7 +10295,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.2003.7(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.2003.7(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.101.2))(webpack@5.101.2(esbuild@0.25.9)) + '@angular-devkit/build-webpack': 0.2003.7(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.101.2))(webpack@5.101.2) '@angular-devkit/core': 20.3.7(chokidar@4.0.3) '@angular/build': 20.3.7(1849c53c536bd3612d435156c655d6b9) '@angular/compiler-cli': 20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3) @@ -10327,7 +10309,7 @@ snapshots: '@babel/preset-env': 7.28.3(@babel/core@7.28.3) '@babel/runtime': 7.28.3 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 20.3.7(@angular/compiler-cli@20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.101.2(esbuild@0.25.9)) + '@ngtools/webpack': 20.3.7(@angular/compiler-cli@20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.101.2) ansi-colors: 4.1.3 autoprefixer: 10.4.21(postcss@8.5.6) babel-loader: 10.0.0(@babel/core@7.28.3)(webpack@5.101.2) @@ -10400,7 +10382,7 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-webpack@0.2003.10(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.101.2))(webpack@5.101.2)': + '@angular-devkit/build-webpack@0.2003.10(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.101.2))(webpack@5.101.2(esbuild@0.25.9))': dependencies: '@angular-devkit/architect': 0.2003.10(chokidar@4.0.3) rxjs: 7.8.2 @@ -10409,7 +10391,7 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-webpack@0.2003.7(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.101.2))(webpack@5.101.2(esbuild@0.25.9))': + '@angular-devkit/build-webpack@0.2003.7(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.101.2))(webpack@5.101.2)': dependencies: '@angular-devkit/architect': 0.2003.7(chokidar@4.0.3) rxjs: 7.8.2 @@ -12600,42 +12582,6 @@ snapshots: optionalDependencies: '@types/node': 24.9.2 - '@invertase/firebaseui-core@0.0.12(firebase@11.10.0)': - dependencies: - '@invertase/firebaseui-translations': 0.0.9 - firebase: 11.10.0 - libphonenumber-js: 1.12.25 - nanostores: 1.0.1 - qrcode-generator: 2.0.4 - zod: 4.1.12 - - '@invertase/firebaseui-react@0.0.11(@types/react@19.1.16)(firebase@11.10.0)(nanostores@1.0.1)(react-dom@19.1.1(react@19.1.1))(react@19.1.1)(typescript@5.9.3)': - dependencies: - '@invertase/firebaseui-core': 0.0.12(firebase@11.10.0) - '@invertase/firebaseui-styles': 0.0.14(typescript@5.9.3) - '@nanostores/react': 1.0.0(nanostores@1.0.1)(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.1.16)(react@19.1.1) - '@tanstack/react-form': 1.20.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) - clsx: 2.1.1 - firebase: 11.10.0 - react: 19.1.1 - react-dom: 19.1.1(react@19.1.1) - tailwind-merge: 3.3.1 - zod: 4.1.12 - transitivePeerDependencies: - - '@tanstack/react-start' - - '@types/react' - - nanostores - - typescript - - '@invertase/firebaseui-styles@0.0.14(typescript@5.9.3)': - dependencies: - cva: 1.0.0-beta.4(typescript@5.9.3) - transitivePeerDependencies: - - typescript - - '@invertase/firebaseui-translations@0.0.9': {} - '@isaacs/balanced-match@4.0.1': {} '@isaacs/brace-expansion@5.0.0': @@ -13141,13 +13087,13 @@ snapshots: '@next/swc-win32-x64-msvc@15.1.7': optional: true - '@ngtools/webpack@20.3.10(@angular/compiler-cli@20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.101.2)': + '@ngtools/webpack@20.3.10(@angular/compiler-cli@20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.101.2(esbuild@0.25.9))': dependencies: '@angular/compiler-cli': 20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3) typescript: 5.9.3 webpack: 5.101.2(esbuild@0.25.9) - '@ngtools/webpack@20.3.7(@angular/compiler-cli@20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.101.2(esbuild@0.25.9))': + '@ngtools/webpack@20.3.7(@angular/compiler-cli@20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.101.2)': dependencies: '@angular/compiler-cli': 20.3.7(@angular/compiler@20.3.7)(typescript@5.9.3) typescript: 5.9.3 @@ -14922,7 +14868,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/node@24.9.2)(@vitest/ui@3.2.4)(jiti@2.6.1)(jsdom@26.1.0)(less@4.4.2)(lightningcss@1.30.2)(msw@2.11.6(@types/node@24.9.2)(typescript@5.9.3))(sass@1.93.2)(terser@5.43.1)(tsx@4.20.6) + vitest: 3.2.4(@types/node@20.19.24)(@vitest/ui@3.2.4)(jiti@2.6.1)(jsdom@25.0.1)(less@4.4.0)(lightningcss@1.30.2)(msw@2.11.6(@types/node@20.19.24)(typescript@5.9.3))(sass@1.90.0)(terser@5.43.1)(tsx@4.20.6) '@vitest/utils@3.2.4': dependencies: