From c6bd5ce432fa5ce1797ea6fdba343751e192f3b2 Mon Sep 17 00:00:00 2001 From: Jeff Huleatt <3759507+jhuleatt@users.noreply.github.com> Date: Fri, 31 Oct 2025 10:39:54 -0400 Subject: [PATCH 1/4] rename packages to @firebase-oss/ui-* --- README.md | 50 ++++++++--------- examples/angular/package.json | 8 +-- examples/angular/src/app/app.config.ts | 4 +- .../email-link-oauth.component.ts | 2 +- .../auth/email-link/email-link.component.ts | 2 +- .../forgot-password.component.ts | 2 +- .../src/app/auth/oauth/oauth.component.ts | 2 +- .../auth/phone-oauth/phone-oauth.component.ts | 2 +- .../app/auth/phone/phone-screen.component.ts | 2 +- .../app/auth/register/register.component.ts | 2 +- .../sign-in-oauth/sign-in-oauth.component.ts | 2 +- .../src/app/auth/sign-in/sign-in.component.ts | 2 +- .../sign-up-oauth/sign-up-oauth.component.ts | 2 +- .../src/app/auth/sign-up/sign-up.component.ts | 2 +- .../email-link-auth-screen.component.ts | 2 +- .../oauth-screen/oauth-screen.component.ts | 2 +- .../phone-auth-screen.component.ts | 2 +- .../sign-in-auth-screen.component.ts | 2 +- .../sign-up-auth-screen.component.ts | 2 +- examples/angular/src/styles.css | 2 +- .../nextjs/app/forgot-password/screen.tsx | 2 +- examples/nextjs/app/globals.css | 6 +- examples/nextjs/app/register/screen.tsx | 2 +- .../email-link-auth-screen-w-oauth/page.tsx | 2 +- .../screens/email-link-auth-screen/page.tsx | 2 +- .../nextjs/app/screens/oauth-screen/page.tsx | 2 +- .../screens/password-reset-screen/page.tsx | 2 +- .../phone-auth-screen-w-oauth/page.tsx | 2 +- .../app/screens/phone-auth-screen/page.tsx | 2 +- .../sign-in-auth-screen-w-handlers/page.tsx | 2 +- .../sign-in-auth-screen-w-oauth/page.tsx | 2 +- .../app/screens/sign-in-auth-screen/page.tsx | 2 +- .../sign-up-auth-screen-w-oauth/page.tsx | 2 +- .../app/screens/sign-up-auth-screen/page.tsx | 2 +- examples/nextjs/app/sign-in/email/screen.tsx | 2 +- examples/nextjs/app/sign-in/phone/screen.tsx | 2 +- examples/nextjs/app/sign-in/screen.tsx | 2 +- examples/nextjs/lib/examples/1/page.tsx | 2 +- examples/nextjs/lib/examples/2/page.tsx | 2 +- examples/nextjs/lib/examples/3/page.tsx | 2 +- examples/nextjs/lib/examples/4/page.tsx | 2 +- examples/nextjs/lib/firebase/clientApp.ts | 2 +- examples/nextjs/lib/firebase/ui.tsx | 2 +- examples/nextjs/package.json | 8 +-- examples/react/package.json | 8 +-- examples/react/src/firebase/firebase.ts | 2 +- examples/react/src/index.css | 6 +- examples/react/src/main.tsx | 2 +- .../email-link-auth-screen-w-oauth.tsx | 2 +- .../src/screens/email-link-auth-screen.tsx | 2 +- .../screens/forgot-password-auth-screen.tsx | 2 +- .../src/screens/mfa-enrollment-screen.tsx | 2 +- examples/react/src/screens/oauth-screen.tsx | 2 +- .../src/screens/phone-auth-screen-w-oauth.tsx | 2 +- .../react/src/screens/phone-auth-screen.tsx | 2 +- .../sign-in-auth-screen-w-handlers.tsx | 2 +- .../screens/sign-in-auth-screen-w-oauth.tsx | 2 +- .../react/src/screens/sign-in-auth-screen.tsx | 2 +- .../sign-up-auth-screen-w-handlers.tsx | 2 +- .../screens/sign-up-auth-screen-w-oauth.tsx | 2 +- .../react/src/screens/sign-up-auth-screen.tsx | 2 +- examples/shadcn/package.json | 6 +- .../src/components/email-link-auth-form.tsx | 6 +- .../src/components/email-link-auth-screen.tsx | 4 +- .../components/forgot-password-auth-form.tsx | 6 +- .../forgot-password-auth-screen.tsx | 4 +- .../src/components/google-sign-in-button.tsx | 4 +- .../shadcn/src/components/oauth-button.tsx | 2 +- .../shadcn/src/components/phone-auth-form.tsx | 6 +- examples/shadcn/src/components/policies.tsx | 4 +- .../src/components/sign-in-auth-form.tsx | 6 +- .../src/components/sign-in-auth-screen.tsx | 4 +- .../src/components/sign-up-auth-form.tsx | 6 +- .../src/components/sign-up-auth-screen.tsx | 4 +- examples/shadcn/src/firebase/firebase.ts | 2 +- examples/shadcn/src/main.tsx | 2 +- package.json | 50 ++++++++--------- packages/angular/jest.config.ts | 2 +- packages/angular/ng-package.json | 4 +- packages/angular/package.json | 6 +- .../auth/forms/email-link-auth-form.spec.ts | 8 +-- .../lib/auth/forms/email-link-auth-form.ts | 2 +- .../forms/forgot-password-auth-form.spec.ts | 8 +-- .../auth/forms/forgot-password-auth-form.ts | 2 +- .../mfa/sms-multi-factor-assertion-form.ts | 2 +- .../sms-multi-factor-enrollment-form.spec.ts | 6 +- .../mfa/sms-multi-factor-enrollment-form.ts | 2 +- .../totp-multi-factor-assertion-form.spec.ts | 6 +- .../mfa/totp-multi-factor-assertion-form.ts | 2 +- .../mfa/totp-multi-factor-enrollment-form.ts | 2 +- .../lib/auth/forms/phone-auth-form.spec.ts | 8 +-- .../src/lib/auth/forms/phone-auth-form.ts | 2 +- .../lib/auth/forms/sign-in-auth-form.spec.ts | 2 +- .../src/lib/auth/forms/sign-in-auth-form.ts | 2 +- .../lib/auth/forms/sign-up-auth-form.spec.ts | 2 +- .../src/lib/auth/forms/sign-up-auth-form.ts | 2 +- .../src/lib/auth/oauth/oauth-button.spec.ts | 2 +- .../src/lib/auth/oauth/oauth-button.ts | 2 +- packages/angular/src/lib/components/button.ts | 2 +- .../src/lib/components/country-selector.ts | 2 +- packages/angular/src/lib/provider.ts | 2 +- .../angular/src/lib/tests/test-helpers.ts | 4 +- packages/angular/src/public-api.ts | 2 +- packages/angular/tsconfig.json | 6 +- packages/angular/tsconfig.spec.json | 4 +- packages/core/GEMINI.md | 12 ++-- packages/core/package.json | 4 +- packages/core/src/config.test.ts | 2 +- packages/core/src/config.ts | 2 +- packages/core/src/errors.test.ts | 2 +- packages/core/src/errors.ts | 2 +- packages/core/src/schemas.test.ts | 2 +- packages/core/src/translations.test.ts | 4 +- packages/core/src/translations.ts | 2 +- packages/core/tests/utils.ts | 2 +- packages/core/tsconfig.json | 2 +- packages/core/vite.config.ts | 4 +- packages/core/vitest.config.ts | 2 +- packages/react/GEMINI.md | 18 +++--- packages/react/README.md | 18 +++--- packages/react/package.json | 8 +-- .../auth/forms/email-link-auth-form.test.tsx | 8 +-- .../src/auth/forms/email-link-auth-form.tsx | 2 +- .../forms/forgot-password-auth-form.test.tsx | 8 +-- .../auth/forms/forgot-password-auth-form.tsx | 2 +- .../sms-multi-factor-assertion-form.test.tsx | 8 +-- .../mfa/sms-multi-factor-assertion-form.tsx | 2 +- .../sms-multi-factor-enrollment-form.test.tsx | 8 +-- .../mfa/sms-multi-factor-enrollment-form.tsx | 2 +- .../totp-multi-factor-assertion-form.test.tsx | 8 +-- .../mfa/totp-multi-factor-assertion-form.tsx | 2 +- ...totp-multi-factor-enrollment-form.test.tsx | 8 +-- .../mfa/totp-multi-factor-enrollment-form.tsx | 2 +- .../multi-factor-auth-assertion-form.test.tsx | 2 +- .../multi-factor-auth-assertion-form.tsx | 2 +- ...multi-factor-auth-enrollment-form.test.tsx | 2 +- .../multi-factor-auth-enrollment-form.tsx | 2 +- .../src/auth/forms/phone-auth-form.test.tsx | 8 +-- .../react/src/auth/forms/phone-auth-form.tsx | 2 +- .../src/auth/forms/sign-in-auth-form.test.tsx | 8 +-- .../src/auth/forms/sign-in-auth-form.tsx | 2 +- .../src/auth/forms/sign-up-auth-form.test.tsx | 8 +-- .../src/auth/forms/sign-up-auth-form.tsx | 2 +- .../auth/oauth/apple-sign-in-button.test.tsx | 2 +- .../src/auth/oauth/apple-sign-in-button.tsx | 2 +- .../oauth/facebook-sign-in-button.test.tsx | 2 +- .../auth/oauth/facebook-sign-in-button.tsx | 2 +- .../auth/oauth/github-sign-in-button.test.tsx | 2 +- .../src/auth/oauth/github-sign-in-button.tsx | 2 +- .../auth/oauth/google-sign-in-button.test.tsx | 2 +- .../src/auth/oauth/google-sign-in-button.tsx | 2 +- .../oauth/microsoft-sign-in-button.test.tsx | 2 +- .../auth/oauth/microsoft-sign-in-button.tsx | 2 +- .../src/auth/oauth/oauth-button.test.tsx | 14 ++--- .../react/src/auth/oauth/oauth-button.tsx | 2 +- .../oauth/twitter-sign-in-button.test.tsx | 2 +- .../src/auth/oauth/twitter-sign-in-button.tsx | 2 +- .../screens/email-link-auth-screen.test.tsx | 2 +- .../auth/screens/email-link-auth-screen.tsx | 2 +- .../forgot-password-auth-screen.test.tsx | 2 +- .../screens/forgot-password-auth-screen.tsx | 2 +- ...lti-factor-auth-enrollment-screen.test.tsx | 2 +- .../multi-factor-auth-enrollment-screen.tsx | 2 +- .../src/auth/screens/oauth-screen.test.tsx | 2 +- .../react/src/auth/screens/oauth-screen.tsx | 2 +- .../auth/screens/phone-auth-screen.test.tsx | 2 +- .../src/auth/screens/phone-auth-screen.tsx | 2 +- .../auth/screens/sign-in-auth-screen.test.tsx | 2 +- .../src/auth/screens/sign-in-auth-screen.tsx | 2 +- .../auth/screens/sign-up-auth-screen.test.tsx | 2 +- .../src/auth/screens/sign-up-auth-screen.tsx | 2 +- packages/react/src/components/button.tsx | 2 +- .../src/components/country-selector.test.tsx | 2 +- .../react/src/components/country-selector.tsx | 2 +- packages/react/src/components/policies.tsx | 2 +- packages/react/src/context.tsx | 2 +- packages/react/src/hooks.test.tsx | 2 +- packages/react/src/hooks.ts | 2 +- packages/react/src/index.ts | 2 +- .../email-link-auth.integration.test.tsx | 2 +- .../email-password-auth.integration.test.tsx | 2 +- .../forgot-password.integration.test.tsx | 2 +- .../react/tests/register.integration.test.tsx | 2 +- packages/react/tests/utils.tsx | 4 +- packages/react/tsconfig.json | 6 +- packages/react/vitest.config.ts | 2 +- packages/shadcn/README.md | 8 +-- packages/shadcn/package.json | 8 +-- .../shadcn/public/apple-sign-in-button.json | 4 +- packages/shadcn/public/country-selector.json | 4 +- .../shadcn/public/email-link-auth-form.json | 4 +- .../shadcn/public/email-link-auth-screen.json | 4 +- .../public/facebook-sign-in-button.json | 4 +- .../public/forgot-password-auth-form.json | 4 +- .../public/forgot-password-auth-screen.json | 4 +- .../shadcn/public/github-sign-in-button.json | 4 +- .../shadcn/public/google-sign-in-button.json | 4 +- .../public/microsoft-sign-in-button.json | 4 +- .../multi-factor-auth-assertion-form.json | 4 +- .../multi-factor-auth-enrollment-form.json | 4 +- .../multi-factor-auth-enrollment-screen.json | 4 +- packages/shadcn/public/oauth-button.json | 4 +- packages/shadcn/public/oauth-screen.json | 4 +- packages/shadcn/public/phone-auth-form.json | 4 +- packages/shadcn/public/phone-auth-screen.json | 4 +- packages/shadcn/public/policies.json | 4 +- packages/shadcn/public/redirect-error.json | 4 +- packages/shadcn/public/sign-in-auth-form.json | 4 +- .../shadcn/public/sign-in-auth-screen.json | 4 +- packages/shadcn/public/sign-up-auth-form.json | 4 +- .../shadcn/public/sign-up-auth-screen.json | 4 +- .../sms-multi-factor-assertion-form.json | 4 +- .../sms-multi-factor-enrollment-form.json | 4 +- .../totp-multi-factor-assertion-form.json | 4 +- .../totp-multi-factor-enrollment-form.json | 4 +- .../shadcn/public/twitter-sign-in-button.json | 4 +- packages/shadcn/registry-spec.json | 56 +++++++++---------- .../registry/apple-sign-in-button.test.tsx | 8 +-- .../src/registry/apple-sign-in-button.tsx | 4 +- .../src/registry/country-selector.test.tsx | 8 +-- .../shadcn/src/registry/country-selector.tsx | 4 +- .../registry/email-link-auth-form.test.tsx | 16 +++--- .../src/registry/email-link-auth-form.tsx | 6 +- .../registry/email-link-auth-screen.test.tsx | 4 +- .../src/registry/email-link-auth-screen.tsx | 4 +- .../registry/facebook-sign-in-button.test.tsx | 8 +-- .../src/registry/facebook-sign-in-button.tsx | 4 +- .../forgot-password-auth-form.test.tsx | 14 ++--- .../registry/forgot-password-auth-form.tsx | 6 +- .../forgot-password-auth-screen.test.tsx | 4 +- .../registry/forgot-password-auth-screen.tsx | 4 +- .../registry/github-sign-in-button.test.tsx | 8 +-- .../src/registry/github-sign-in-button.tsx | 4 +- .../registry/google-sign-in-button.test.tsx | 8 +-- .../src/registry/google-sign-in-button.tsx | 4 +- .../microsoft-sign-in-button.test.tsx | 8 +-- .../src/registry/microsoft-sign-in-button.tsx | 4 +- .../multi-factor-auth-assertion-form.test.tsx | 2 +- .../multi-factor-auth-assertion-form.tsx | 4 +- ...multi-factor-auth-enrollment-form.test.tsx | 4 +- .../multi-factor-auth-enrollment-form.tsx | 4 +- ...lti-factor-auth-enrollment-screen.test.tsx | 4 +- .../multi-factor-auth-enrollment-screen.tsx | 4 +- .../shadcn/src/registry/oauth-button.test.tsx | 12 ++-- packages/shadcn/src/registry/oauth-button.tsx | 2 +- .../shadcn/src/registry/oauth-screen.test.tsx | 2 +- packages/shadcn/src/registry/oauth-screen.tsx | 4 +- .../src/registry/phone-auth-form.test.tsx | 18 +++--- .../shadcn/src/registry/phone-auth-form.tsx | 4 +- .../src/registry/phone-auth-screen.test.tsx | 2 +- .../shadcn/src/registry/phone-auth-screen.tsx | 4 +- .../shadcn/src/registry/policies.test.tsx | 8 +-- packages/shadcn/src/registry/policies.tsx | 4 +- .../shadcn/src/registry/redirect-error.tsx | 2 +- .../src/registry/sign-in-auth-form.test.tsx | 14 ++--- .../shadcn/src/registry/sign-in-auth-form.tsx | 6 +- .../src/registry/sign-in-auth-screen.test.tsx | 4 +- .../src/registry/sign-in-auth-screen.tsx | 4 +- .../src/registry/sign-up-auth-form.test.tsx | 14 ++--- .../shadcn/src/registry/sign-up-auth-form.tsx | 6 +- .../src/registry/sign-up-auth-screen.test.tsx | 4 +- .../src/registry/sign-up-auth-screen.tsx | 4 +- .../sms-multi-factor-assertion-form.test.tsx | 14 ++--- .../sms-multi-factor-assertion-form.tsx | 4 +- .../sms-multi-factor-enrollment-form.test.tsx | 12 ++-- .../sms-multi-factor-enrollment-form.tsx | 4 +- .../totp-multi-factor-assertion-form.test.tsx | 8 +-- .../totp-multi-factor-assertion-form.tsx | 4 +- ...totp-multi-factor-enrollment-form.test.tsx | 8 +-- .../totp-multi-factor-enrollment-form.tsx | 4 +- .../registry/twitter-sign-in-button.test.tsx | 8 +-- .../src/registry/twitter-sign-in-button.tsx | 4 +- packages/shadcn/tests/utils.tsx | 8 +-- packages/shadcn/tsconfig.json | 4 +- packages/shadcn/vitest.config.ts | 2 +- packages/styles/GEMINI.md | 10 ++-- packages/styles/README.md | 10 ++-- packages/styles/package.json | 2 +- packages/styles/vitest.config.ts | 2 +- packages/translations/GEMINI.md | 24 ++++---- packages/translations/package.json | 2 +- packages/translations/vitest.config.ts | 2 +- pnpm-lock.yaml | 48 ++++++++-------- 283 files changed, 668 insertions(+), 668 deletions(-) diff --git a/README.md b/README.md index 8075ae123..bd230e912 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,10 @@ Packages have been created for both `React` and `Angular`. For now, they're only ```json { "dependencies": { - "@firebase-ui/react": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-react-0.0.1.tgz", - "@firebase-ui/core": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-core-0.0.1.tgz", - "@firebase-ui/styles": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-styles-0.0.1.tgz", - "@firebase-ui/translations": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-translations-0.0.1.tgz" + "@firebase-oss/ui-react": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-react-0.0.1.tgz", + "@firebase-oss/ui-core": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-core-0.0.1.tgz", + "@firebase-oss/ui-styles": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-styles-0.0.1.tgz", + "@firebase-oss/ui-translations": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-translations-0.0.1.tgz" } } ``` @@ -41,10 +41,10 @@ FirebaseUI for Angular depends on the [AngularFire](https://github.com/angular/a { "dependencies": { "@angular/fire": "^19.1.0", - "@firebase-ui/angular": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-angular-0.0.1.tgz", - "@firebase-ui/core": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-core-0.0.1.tgz", - "@firebase-ui/styles": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-styles-0.0.1.tgz", - "@firebase-ui/translations": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-translations-0.0.1.tgz" + "@firebase-oss/ui-angular": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-angular-0.0.1.tgz", + "@firebase-oss/ui-core": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-core-0.0.1.tgz", + "@firebase-oss/ui-styles": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-styles-0.0.1.tgz", + "@firebase-oss/ui-translations": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-translations-0.0.1.tgz" } } ``` @@ -63,10 +63,10 @@ import { initializeApp } from 'firebase/app'; const app = initializeApp({ ... }); ``` -Next, setup and configure FirebaseUI, import the `initializeUI` function from `@firebase-ui/core`: +Next, setup and configure FirebaseUI, import the `initializeUI` function from `@firebase-oss/ui-core`: ```ts -import { initializeUI } from "@firebase-ui/core"; +import { initializeUI } from "@firebase-oss/ui-core"; const ui = initializeUI(); ``` @@ -82,8 +82,8 @@ FirebaseUI for React requires that your application be wrapped in the `ConfigPro ```tsx import { initializeApp } from 'firebase/app'; -import { initializeUI } from "@firebase-ui/core"; -import { ConfigProvider } from '@firebase-ui/react'; +import { initializeUI } from "@firebase-oss/ui-core"; +import { ConfigProvider } from '@firebase-oss/ui-react'; const app = initializeApp({ .. }); const ui = initializeUI({ app }); @@ -107,8 +107,8 @@ FirebaseUI depends on [AngularFire](https://github.com/angular/angularfire) bein ```tsx import { provideFirebaseApp, initializeApp } from '@angular/fire/app'; import { provideAuth, getAuth } from '@angular/fire/auth'; -import { provideFirebaseUI } from '@firebase-ui/angular'; -import { initializeUI } from '@firebase-ui/core'; +import { provideFirebaseUI } from '@firebase-oss/ui-angular'; +import { initializeUI } from '@firebase-oss/ui-core'; export const appConfig: ApplicationConfig = { providers: [ @@ -127,17 +127,17 @@ export const appConfig: ApplicationConfig = { Next, import the CSS styles for the FirebaseUI project. -If you are using [TailwindCSS](https://tailwindcss.com/), import the base CSS from the `@firebase-ui/styles` package after your Tailwind import: +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-ui/styles/tailwind"; +@import "@firebase-oss/ui-styles/tailwind"; ``` If you are not using Tailwind, import the distributable CSS in your project: ```css -@import "@firebase-ui/styles"; +@import "@firebase-oss/ui-styles"; ``` To learn more about theming, view the [theming](#theming) section. @@ -154,7 +154,7 @@ Allows users to sign in with an email and password: React ```tsx -import { SignInAuthScreen } from "@firebase-ui/react"; +import { SignInAuthScreen } from "@firebase-oss/ui-react"; function App() { return ; @@ -166,7 +166,7 @@ Props: `onForgotPasswordClick` / `onRegisterClick` Additionally, allow the user to sign in with an OAuth provider by providing children: ```tsx -import { SignInAuthScreen, GoogleSignInButton } from "@firebase-ui/react"; +import { SignInAuthScreen, GoogleSignInButton } from "@firebase-oss/ui-react"; function App() { return ( @@ -183,7 +183,7 @@ function App() { Angular ```tsx -import { SignUpAuthScreenComponent } from "@firebase-ui/angular"; +import { SignUpAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-root", @@ -257,7 +257,7 @@ The default values are based on the [TailwindCSS](https://tailwindcss.com/docs/t ## FirebaseUI Core Integration -`@firebase-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. +`@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 @@ -278,7 +278,7 @@ The default values are based on the [TailwindCSS](https://tailwindcss.com/docs/t Call initializeUI() with your Firebase app and configuration options: ```js -import { initializeUI } from '@firebase-ui/core'; +import { initializeUI } from '@firebase-oss/ui-core'; const ui = initializeUI({ app: firebaseApp, @@ -459,7 +459,7 @@ uiStore.subscribe((ui) => { You can pass one or more translations to support localized strings. ```js -import { english } from "@firebase-ui/translations"; +import { english } from "@firebase-oss/ui-translations"; initializeUI({ app, @@ -484,7 +484,7 @@ const customFr = { To use a string at runtime (e.g., in an error message): ```js -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; const message = getTranslation(config, "errors", "unknownError"); ``` @@ -507,7 +507,7 @@ Validates a sign-in or sign-up form using email and password. - _password_: Must be at least 8 characters. ```js -import { createEmailFormSchema } from "@firebase-ui/core"; +import { createEmailFormSchema } from "@firebase-oss/ui-core"; const schema = createEmailFormSchema(translations); ``` diff --git a/examples/angular/package.json b/examples/angular/package.json index 9dd3e0c8d..9b55ee80c 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", - "@firebase-ui/angular": "workspace:*", - "@firebase-ui/core": "workspace:*", - "@firebase-ui/styles": "workspace:*", - "@firebase-ui/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.config.ts b/examples/angular/src/app/app.config.ts index 49a5f3078..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 "@firebase-ui/angular"; -import { initializeUI } from "@firebase-ui/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 21b708cba..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 "@firebase-ui/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 5a613ac30..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 "@firebase-ui/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 9b82a5213..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 "@firebase-ui/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 66bf0a9dc..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 "@firebase-ui/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 054e2c90f..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 "@firebase-ui/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 6f3a7571e..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 "@firebase-ui/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 688f6b901..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 "@firebase-ui/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 bc39e1b25..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 "@firebase-ui/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 7dfdaa35c..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 "@firebase-ui/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 de85e47e2..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 "@firebase-ui/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 b7cb0703a..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 "@firebase-ui/angular"; +import { SignUpAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-sign-up", diff --git a/examples/angular/src/app/screens/email-link-auth-screen/email-link-auth-screen.component.ts b/examples/angular/src/app/screens/email-link-auth-screen/email-link-auth-screen.component.ts index 41e530070..e3f552fb7 100644 --- a/examples/angular/src/app/screens/email-link-auth-screen/email-link-auth-screen.component.ts +++ b/examples/angular/src/app/screens/email-link-auth-screen/email-link-auth-screen.component.ts @@ -16,7 +16,7 @@ import { Component } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { EmailLinkAuthScreenComponent } from "@firebase-ui/angular"; +import { EmailLinkAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-email-link-auth-screen", diff --git a/examples/angular/src/app/screens/oauth-screen/oauth-screen.component.ts b/examples/angular/src/app/screens/oauth-screen/oauth-screen.component.ts index 9e04f94e7..da9284849 100644 --- a/examples/angular/src/app/screens/oauth-screen/oauth-screen.component.ts +++ b/examples/angular/src/app/screens/oauth-screen/oauth-screen.component.ts @@ -16,7 +16,7 @@ import { Component } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { OAuthScreenComponent } from "@firebase-ui/angular"; +import { OAuthScreenComponent } from "@firebase-oss/ui-angular"; @Component({ selector: "app-oauth-screen", diff --git a/examples/angular/src/app/screens/phone-auth-screen/phone-auth-screen.component.ts b/examples/angular/src/app/screens/phone-auth-screen/phone-auth-screen.component.ts index 953e105e8..93fb76fb2 100644 --- a/examples/angular/src/app/screens/phone-auth-screen/phone-auth-screen.component.ts +++ b/examples/angular/src/app/screens/phone-auth-screen/phone-auth-screen.component.ts @@ -16,7 +16,7 @@ import { Component } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { PhoneAuthScreenComponent } from "@firebase-ui/angular"; +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/sign-in-auth-screen.component.ts b/examples/angular/src/app/screens/sign-in-auth-screen/sign-in-auth-screen.component.ts index beefadb8a..45c92b442 100644 --- a/examples/angular/src/app/screens/sign-in-auth-screen/sign-in-auth-screen.component.ts +++ b/examples/angular/src/app/screens/sign-in-auth-screen/sign-in-auth-screen.component.ts @@ -16,7 +16,7 @@ import { Component } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { SignInAuthScreenComponent } from "@firebase-ui/angular"; +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/sign-up-auth-screen.component.ts b/examples/angular/src/app/screens/sign-up-auth-screen/sign-up-auth-screen.component.ts index 95bfe94c7..a852fbab9 100644 --- a/examples/angular/src/app/screens/sign-up-auth-screen/sign-up-auth-screen.component.ts +++ b/examples/angular/src/app/screens/sign-up-auth-screen/sign-up-auth-screen.component.ts @@ -16,7 +16,7 @@ import { Component } from "@angular/core"; import { CommonModule } from "@angular/common"; -import { SignUpAuthScreenComponent } from "@firebase-ui/angular"; +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 cacaabe1e..fd82282d9 100644 --- a/examples/angular/src/styles.css +++ b/examples/angular/src/styles.css @@ -16,4 +16,4 @@ /* You can add global styles to this file, and also import other style files */ @import "tailwindcss"; -@import "@firebase-ui/styles/tailwind"; +@import "@firebase-oss/ui-styles/tailwind"; diff --git a/examples/nextjs/app/forgot-password/screen.tsx b/examples/nextjs/app/forgot-password/screen.tsx index f98c57587..791ae2baa 100644 --- a/examples/nextjs/app/forgot-password/screen.tsx +++ b/examples/nextjs/app/forgot-password/screen.tsx @@ -16,7 +16,7 @@ "use client"; -import { PasswordResetScreen } from "@firebase-ui/react"; +import { PasswordResetScreen } 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 731524bd1..981d5e7de 100644 --- a/examples/nextjs/app/globals.css +++ b/examples/nextjs/app/globals.css @@ -15,7 +15,7 @@ */ @import "tailwindcss"; -@import "@firebase-ui/styles/src/base.css"; +@import "@firebase-oss/ui-styles/src/base.css"; -/* @import "@firebase-ui/styles/src/themes/dark.css"; */ -/* @import "@firebase-ui/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/nextjs/app/register/screen.tsx b/examples/nextjs/app/register/screen.tsx index 97abc25de..52db64371 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 "@firebase-ui/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 b1e15278a..54cbb6c7b 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 @@ -16,7 +16,7 @@ "use client"; -import { EmailLinkAuthScreen, GoogleSignInButton } from "@firebase-ui/react"; +import { EmailLinkAuthScreen, GoogleSignInButton } from "@firebase-oss/ui-react"; export default function EmailLinkAuthScreenWithOAuthPage() { return ( 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 6f5f03912..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 "@firebase-ui/react"; +import { EmailLinkAuthScreen } from "@firebase-oss/ui-react"; export default function EmailLinkAuthScreenPage() { return ; diff --git a/examples/nextjs/app/screens/oauth-screen/page.tsx b/examples/nextjs/app/screens/oauth-screen/page.tsx index 662ccecd6..15adbaabc 100644 --- a/examples/nextjs/app/screens/oauth-screen/page.tsx +++ b/examples/nextjs/app/screens/oauth-screen/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { GoogleSignInButton, OAuthScreen } from "@firebase-ui/react"; +import { GoogleSignInButton, OAuthScreen } from "@firebase-oss/ui-react"; export default function OAuthScreenPage() { return ( diff --git a/examples/nextjs/app/screens/password-reset-screen/page.tsx b/examples/nextjs/app/screens/password-reset-screen/page.tsx index f81d1c7d0..dd39eabca 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 { PasswordResetScreen } from "@firebase-ui/react"; +import { PasswordResetScreen } 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 45637cc5c..938bd7abd 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 @@ -16,7 +16,7 @@ "use client"; -import { GoogleSignInButton, PhoneAuthScreen } from "@firebase-ui/react"; +import { GoogleSignInButton, PhoneAuthScreen } from "@firebase-oss/ui-react"; export default function PhoneAuthScreenWithOAuthPage() { return ( diff --git a/examples/nextjs/app/screens/phone-auth-screen/page.tsx b/examples/nextjs/app/screens/phone-auth-screen/page.tsx index 032a66dff..5770d1536 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 "@firebase-ui/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 6299fd5fa..d1dcf2e28 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 "@firebase-ui/react"; +import { SignInAuthScreen } from "@firebase-oss/ui-react"; export default function SignInAuthScreenWithHandlersPage() { return {}} onRegisterClick={() => {}} />; 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 887545e40..44338d931 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 @@ -16,7 +16,7 @@ "use client"; -import { GoogleSignInButton, SignInAuthScreen } from "@firebase-ui/react"; +import { GoogleSignInButton, SignInAuthScreen } from "@firebase-oss/ui-react"; import { useRouter } from "next/navigation"; export default function SignInAuthScreenWithOAuthPage() { 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 01bac68ef..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 "@firebase-ui/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-oauth/page.tsx b/examples/nextjs/app/screens/sign-up-auth-screen-w-oauth/page.tsx index 98a803bdf..d865301db 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 @@ -16,7 +16,7 @@ "use client"; -import { GoogleSignInButton, SignUpAuthScreen } from "@firebase-ui/react"; +import { GoogleSignInButton, SignUpAuthScreen } from "@firebase-oss/ui-react"; export default function SignUpAuthScreenWithOAuthPage() { return ( 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 0af1806ae..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 "@firebase-ui/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 37112e710..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 "@firebase-ui/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 839e60433..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 "@firebase-ui/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 7d89bd46d..44e541d1f 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 "@firebase-ui/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/examples/1/page.tsx b/examples/nextjs/lib/examples/1/page.tsx index 7ab2e03d8..5c6352b88 100644 --- a/examples/nextjs/lib/examples/1/page.tsx +++ b/examples/nextjs/lib/examples/1/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { EmailPasswordForm, RegisterForm } from "@firebase-ui/react"; +import { EmailPasswordForm, RegisterForm } from "@firebase-oss/ui-react"; import { useState } from "react"; export default function Example1() { diff --git a/examples/nextjs/lib/examples/2/page.tsx b/examples/nextjs/lib/examples/2/page.tsx index 071452f1f..5647d6080 100644 --- a/examples/nextjs/lib/examples/2/page.tsx +++ b/examples/nextjs/lib/examples/2/page.tsx @@ -17,7 +17,7 @@ "use client"; import { useState } from "react"; -import { EmailPasswordForm, RegisterForm, Card, CardHeader, CardTitle, CardSubtitle } from "@firebase-ui/react"; +import { EmailPasswordForm, RegisterForm, Card, CardHeader, CardTitle, CardSubtitle } from "@firebase-oss/ui-react"; export default function Example2() { const [showRegister, setShowRegister] = useState(false); diff --git a/examples/nextjs/lib/examples/3/page.tsx b/examples/nextjs/lib/examples/3/page.tsx index 61f1b7492..17f4c32ec 100644 --- a/examples/nextjs/lib/examples/3/page.tsx +++ b/examples/nextjs/lib/examples/3/page.tsx @@ -17,7 +17,7 @@ "use client"; import { useState } from "react"; -import { EmailPasswordForm, RegisterForm } from "@firebase-ui/react"; +import { EmailPasswordForm, RegisterForm } from "@firebase-oss/ui-react"; export default function Example3() { const [showModal, setShowModal] = useState(false); diff --git a/examples/nextjs/lib/examples/4/page.tsx b/examples/nextjs/lib/examples/4/page.tsx index 3bbcd6c2e..f6dc3f0ac 100644 --- a/examples/nextjs/lib/examples/4/page.tsx +++ b/examples/nextjs/lib/examples/4/page.tsx @@ -16,7 +16,7 @@ "use client"; -import { SignInAuthScreen } from "@firebase-ui/react"; +import { SignInAuthScreen } from "@firebase-oss/ui-react"; export default function Example4() { return {}} onRegisterClick={() => {}} />; diff --git a/examples/nextjs/lib/firebase/clientApp.ts b/examples/nextjs/lib/firebase/clientApp.ts index 7153840f3..4b523a256 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 "@firebase-ui/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 fb91b4b2e..9ea1765d1 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 { ConfigProvider } from "@firebase-ui/react"; +import { ConfigProvider } from "@firebase-oss/ui-react"; export function FirebaseUIProvider({ children }: { children: React.ReactNode }) { return ( diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 972ca9775..72062dedd 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -12,10 +12,10 @@ "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,css,md}\"" }, "dependencies": { - "@firebase-ui/react": "workspace:*", - "@firebase-ui/core": "workspace:*", - "@firebase-ui/styles": "workspace:*", - "@firebase-ui/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 af1cd48dc..b54e7466e 100644 --- a/examples/react/package.json +++ b/examples/react/package.json @@ -13,10 +13,10 @@ "preview": "vite preview" }, "dependencies": { - "@firebase-ui/react": "workspace:*", - "@firebase-ui/core": "workspace:*", - "@firebase-ui/styles": "workspace:*", - "@firebase-ui/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/firebase/firebase.ts b/examples/react/src/firebase/firebase.ts index d8fe45604..05ca4ca63 100644 --- a/examples/react/src/firebase/firebase.ts +++ b/examples/react/src/firebase/firebase.ts @@ -19,7 +19,7 @@ import { initializeApp, getApps } from "firebase/app"; import { firebaseConfig } from "./config"; import { getAuth } from "firebase/auth"; -import { initializeUI, oneTapSignIn, countryCodes } from "@firebase-ui/core"; +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 f265e7fc8..afabc2e09 100644 --- a/examples/react/src/index.css +++ b/examples/react/src/index.css @@ -15,7 +15,7 @@ */ @import "tailwindcss"; -@import "@firebase-ui/styles/tailwind"; +@import "@firebase-oss/ui-styles/tailwind"; -/* @import "@firebase-ui/styles/src/themes/dark.css"; */ -/* @import "@firebase-ui/styles/src/themes/brutalist.css"; */ \ No newline at end of file +/* @import "@firebase-oss/ui-styles/src/themes/dark.css"; */ +/* @import "@firebase-oss/ui-styles/src/themes/brutalist.css"; */ \ No newline at end of file diff --git a/examples/react/src/main.tsx b/examples/react/src/main.tsx index 00c616208..73c4a9496 100644 --- a/examples/react/src/main.tsx +++ b/examples/react/src/main.tsx @@ -17,7 +17,7 @@ import { BrowserRouter, Routes, Route } from "react-router"; import ReactDOM from "react-dom/client"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { ui, auth } from "./firebase/firebase"; import App from "./App"; import { hiddenRoutes, routes } from "./routes"; 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 1a3e84d7e..4e9c71b24 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 "@firebase-ui/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 f1d37fc08..28a3b823b 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 "@firebase-ui/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 1a4c2250a..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 "@firebase-ui/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 6bc6561dc..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 "@firebase-ui/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 fb55582ad..1b06dc158 100644 --- a/examples/react/src/screens/oauth-screen.tsx +++ b/examples/react/src/screens/oauth-screen.tsx @@ -23,7 +23,7 @@ import { MicrosoftSignInButton, OAuthScreen, TwitterSignInButton, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; export default function OAuthScreenPage() { const [themed, setThemed] = useState(false); 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 69058e3b7..30dafd880 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 "@firebase-ui/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 4514fd923..3299abf37 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 "@firebase-ui/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 34a12ade4..e5d6b410b 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 "@firebase-ui/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 bd516725f..c54d123c0 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 "@firebase-ui/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 e16935b4f..e8920ed42 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 "@firebase-ui/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 e8d0225b3..2c85669c3 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 "@firebase-ui/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 ac00827d2..eba9c9253 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 "@firebase-ui/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 9c2121cfa..35553a3a3 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 "@firebase-ui/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 654e7976d..5cfb21eda 100644 --- a/examples/shadcn/package.json +++ b/examples/shadcn/package.json @@ -8,9 +8,9 @@ "shadcn:add-all": "tsx add-all.ts" }, "dependencies": { - "@firebase-ui/core": "workspace:*", - "@firebase-ui/react": "workspace:*", - "@firebase-ui/styles": "workspace:*", + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-react": "workspace:*", + "@firebase-oss/ui-styles": "workspace:*", "@hookform/resolvers": "^5.2.2", "@radix-ui/react-accordion": "^1.2.12", "@radix-ui/react-alert-dialog": "^1.1.15", diff --git a/examples/shadcn/src/components/email-link-auth-form.tsx b/examples/shadcn/src/components/email-link-auth-form.tsx index b51c077cb..ed3c13895 100644 --- a/examples/shadcn/src/components/email-link-auth-form.tsx +++ b/examples/shadcn/src/components/email-link-auth-form.tsx @@ -1,15 +1,15 @@ "use client"; -import type { EmailLinkAuthFormSchema } from "@firebase-ui/core"; +import type { EmailLinkAuthFormSchema } from "@firebase-oss/ui-core"; import { useEmailLinkAuthFormAction, useEmailLinkAuthFormCompleteSignIn, useEmailLinkAuthFormSchema, useUI, type EmailLinkAuthFormProps, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/core"; +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 b636fe9db..4641ca897 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 "@firebase-ui/core"; -import { useUI, type EmailLinkAuthScreenProps } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type EmailLinkAuthScreenProps } from "@firebase-oss/ui-react"; import { EmailLinkAuthForm } from "@/components/email-link-auth-form"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; diff --git a/examples/shadcn/src/components/forgot-password-auth-form.tsx b/examples/shadcn/src/components/forgot-password-auth-form.tsx index e050d262f..4eed22c7c 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 "@firebase-ui/core"; +import type { ForgotPasswordAuthFormSchema } from "@firebase-oss/ui-core"; import { useForgotPasswordAuthFormAction, useForgotPasswordAuthFormSchema, useUI, type ForgotPasswordAuthFormProps, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/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 cb074b2f1..2ffb2cabf 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 "@firebase-ui/core"; -import { useUI, type ForgotPasswordAuthScreenProps } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type ForgotPasswordAuthScreenProps } from "@firebase-oss/ui-react"; import { ForgotPasswordAuthForm } from "@/components/forgot-password-auth-form"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; diff --git a/examples/shadcn/src/components/google-sign-in-button.tsx b/examples/shadcn/src/components/google-sign-in-button.tsx index 775234acb..9c7f6257d 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 "@firebase-ui/core"; -import { useUI, type GoogleSignInButtonProps, GoogleLogo } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type GoogleSignInButtonProps, GoogleLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/components"; diff --git a/examples/shadcn/src/components/oauth-button.tsx b/examples/shadcn/src/components/oauth-button.tsx index dd5d3740e..8c0d1f0ab 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 "@firebase-ui/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/phone-auth-form.tsx b/examples/shadcn/src/components/phone-auth-form.tsx index 05dc29594..d09549a03 100644 --- a/examples/shadcn/src/components/phone-auth-form.tsx +++ b/examples/shadcn/src/components/phone-auth-form.tsx @@ -1,13 +1,13 @@ "use client"; -import type { PhoneAuthNumberFormSchema } from "@firebase-ui/core"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/core"; +import type { PhoneAuthNumberFormSchema } from "@firebase-oss/ui-core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { type PhoneAuthFormProps, usePhoneAuthNumberFormSchema, usePhoneNumberFormAction, useUI, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; import { useForm } from "react-hook-form"; diff --git a/examples/shadcn/src/components/policies.tsx b/examples/shadcn/src/components/policies.tsx index 970cf37ff..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 "@firebase-ui/core"; -import { useUI, PolicyContext } from "@firebase-ui/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/sign-in-auth-form.tsx b/examples/shadcn/src/components/sign-in-auth-form.tsx index 907d63123..8df4ca109 100644 --- a/examples/shadcn/src/components/sign-in-auth-form.tsx +++ b/examples/shadcn/src/components/sign-in-auth-form.tsx @@ -1,10 +1,10 @@ "use client"; -import type { SignInAuthFormSchema } from "@firebase-ui/core"; -import { useSignInAuthFormAction, useSignInAuthFormSchema, useUI, type SignInAuthFormProps } from "@firebase-ui/react"; +import type { SignInAuthFormSchema } from "@firebase-oss/ui-core"; +import { useSignInAuthFormAction, useSignInAuthFormSchema, useUI, type SignInAuthFormProps } from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/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 0b6cf4ea6..50743ba4f 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 "@firebase-ui/core"; -import { useUI, type SignInAuthScreenProps } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type SignInAuthScreenProps } from "@firebase-oss/ui-react"; import { SignInAuthForm } from "@/components/sign-in-auth-form"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; diff --git a/examples/shadcn/src/components/sign-up-auth-form.tsx b/examples/shadcn/src/components/sign-up-auth-form.tsx index dc8ea78c1..1916d3439 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 "@firebase-ui/core"; +import type { SignUpAuthFormSchema } from "@firebase-oss/ui-core"; import { useSignUpAuthFormAction, useSignUpAuthFormSchema, useUI, type SignUpAuthFormProps, useRequireDisplayName, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/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 048f4584f..73cc516df 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 "@firebase-ui/core"; -import { useUI, type SignUpAuthScreenProps } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type SignUpAuthScreenProps } from "@firebase-oss/ui-react"; import { SignUpAuthForm } from "@/components/sign-up-auth-form"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; diff --git a/examples/shadcn/src/firebase/firebase.ts b/examples/shadcn/src/firebase/firebase.ts index aeed4e444..3f2d12609 100644 --- a/examples/shadcn/src/firebase/firebase.ts +++ b/examples/shadcn/src/firebase/firebase.ts @@ -19,7 +19,7 @@ import { initializeApp, getApps } from "firebase/app"; import { firebaseConfig } from "./config"; import { connectAuthEmulator, getAuth } from "firebase/auth"; -import { autoAnonymousLogin, initializeUI, oneTapSignIn, countryCodes } from "@firebase-ui/core"; +import { autoAnonymousLogin, initializeUI, oneTapSignIn, countryCodes } from "@firebase-oss/ui-core"; export const firebaseApp = getApps().length === 0 ? initializeApp(firebaseConfig) : getApps()[0]; diff --git a/examples/shadcn/src/main.tsx b/examples/shadcn/src/main.tsx index bc692dc4b..a2fa29b58 100644 --- a/examples/shadcn/src/main.tsx +++ b/examples/shadcn/src/main.tsx @@ -15,7 +15,7 @@ import { BrowserRouter, Route, Routes } from "react-router"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import ReactDOM from "react-dom/client"; import { ui } from "./firebase/firebase"; diff --git a/package.json b/package.json index 0f6162e92..d3ca41000 100644 --- a/package.json +++ b/package.json @@ -1,42 +1,42 @@ { - "name": "@firebaseui/root", + "name": "@firebase-oss/ui-root", "private": true, "type": "module", "scripts": { "emulators": "firebase emulators:start --only auth --project demo-test", "build": "pnpm run build:translations && pnpm run build:core && pnpm run build:react", - "build:core": "pnpm --filter=@firebase-ui/core run build", - "build:translations": "pnpm --filter=@firebase-ui/translations run build", - "build:react": "pnpm --filter=@firebase-ui/react run build", - "build:angular": "pnpm --filter=@firebase-ui/angular run build", - "build:shadcn": "pnpm --filter=@firebase-ui/shadcn run build", + "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 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-ui/core run test", - "test:react": "pnpm --filter=@firebase-ui/react run test", - "test:angular": "pnpm --filter=@firebase-ui/angular run test", - "test:translations": "pnpm --filter=@firebase-ui/translations run test", - "test:styles": "pnpm --filter=@firebase-ui/styles run test", - "test:shadcn": "pnpm --filter=@firebase-ui/shadcn run test", + "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-ui/core run test:unit:watch", - "test:react:watch": "pnpm --filter=@firebase-ui/react run test:unit:watch", - "test:angular:watch": "pnpm --filter=@firebase-ui/angular run test:watch", - "publish:tags:core": "pnpm --filter=@firebase-ui/core run publish:tags", - "publish:tags:translations": "pnpm --filter=@firebase-ui/translations run publish:tags", - "publish:tags:react": "pnpm --filter=@firebase-ui/react run publish:tags", - "publish:tags:angular": "pnpm --filter=@firebase-ui/angular run publish:tags", - "publish:tags:styles": "pnpm --filter=@firebase-ui/styles run publish:tags", + "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-ui/core run release", - "release:translations": "pnpm --filter=@firebase-ui/translations run release", - "release:react": "pnpm --filter=@firebase-ui/react run release", - "release:angular": "pnpm --filter=@firebase-ui/angular run release", - "release:styles": "pnpm --filter=@firebase-ui/styles run release", + "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": { diff --git a/packages/angular/jest.config.ts b/packages/angular/jest.config.ts index 95c7310d5..583f7ed09 100644 --- a/packages/angular/jest.config.ts +++ b/packages/angular/jest.config.ts @@ -7,7 +7,7 @@ const config: Config = { coveragePathIgnorePatterns: ["/node_modules/", "/dist/"], testEnvironment: "jsdom", moduleNameMapper: { - "^@firebase-ui/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 bf6ad713b..b2bbb9901 100644 --- a/packages/angular/ng-package.json +++ b/packages/angular/ng-package.json @@ -5,8 +5,8 @@ "entryFile": "src/public-api.ts" }, "allowedNonPeerDependencies": [ - "@firebase-ui/core", - "@firebase-ui/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 423715eb1..c0f9b3392 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -1,5 +1,5 @@ { - "name": "@firebase-ui/angular", + "name": "@firebase-oss/ui-angular", "version": "0.0.1", "files": [ "dist" @@ -26,8 +26,8 @@ "@angular/fire": "catalog:peerDependencies" }, "dependencies": { - "@firebase-ui/core": "workspace:*", - "@firebase-ui/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 1c1077cf6..1ce1d3662 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 @firebase-ui/core module but preserve Angular providers -jest.mock("@firebase-ui/core", () => { - const originalModule = jest.requireActual("@firebase-ui/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("@firebase-ui/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 9ab4f60b6..352f8419a 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, 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 "@firebase-ui/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 fb08fea1f..97fb3b415 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 @@ -26,9 +26,9 @@ import { } from "../../components/form"; import { PoliciesComponent } from "../../components/policies"; -// Mock the @firebase-ui/core module but preserve Angular providers -jest.mock("@firebase-ui/core", () => { - const originalModule = jest.requireActual("@firebase-ui/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(), @@ -46,7 +46,7 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { sendPasswordResetEmail, FirebaseUIError } = require("@firebase-ui/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 f66226e93..0cf47836d 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, signal } from "@angular/core"; import { CommonModule } from "@angular/common"; import { injectForm, injectStore, TanStackAppField, TanStackField } from "@tanstack/angular-form"; -import { FirebaseUIError, sendPasswordResetEmail } from "@firebase-ui/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.ts b/packages/angular/src/lib/auth/forms/mfa/sms-multi-factor-assertion-form.ts index 8256dd57d..b19ada200 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 @@ -25,7 +25,7 @@ import { } from "../../../provider"; import { RecaptchaVerifier } from "@angular/fire/auth"; import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } from "../../../components/form"; -import { FirebaseUIError, verifyPhoneNumber, signInWithMultiFactorAssertion } from "@firebase-ui/core"; +import { FirebaseUIError, verifyPhoneNumber, signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { PhoneAuthProvider, PhoneMultiFactorGenerator, type MultiFactorInfo } from "firebase/auth"; type PhoneMultiFactorInfo = MultiFactorInfo & { 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 1bf2bfdf8..314d52437 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 @@ -22,8 +22,8 @@ import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } fr import { CountrySelectorComponent } from "../../../components/country-selector"; import { PoliciesComponent } from "../../../components/policies"; -jest.mock("@firebase-ui/core", () => { - const originalModule = jest.requireActual("@firebase-ui/core"); +jest.mock("@firebase-oss/ui-core", () => { + const originalModule = jest.requireActual("@firebase-oss/ui-core"); return { ...originalModule, verifyPhoneNumber: jest.fn(), @@ -74,7 +74,7 @@ describe("", () => { enrollWithMultiFactorAssertion, formatPhoneNumber, FirebaseUIError, - } = require("@firebase-ui/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 2683759e3..b27bb5aef 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 "@firebase-ui/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 ec780ba03..007f40189 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("@firebase-ui/core", () => { - const originalModule = jest.requireActual("@firebase-ui/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("@firebase-ui/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 6e479bf8e..cc8758727 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 @@ -18,7 +18,7 @@ import { CommonModule } from "@angular/common"; 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 "@firebase-ui/core"; +import { FirebaseUIError, signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { TotpMultiFactorGenerator, type MultiFactorInfo } from "firebase/auth"; @Component({ 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 fd34de97a..699d244ae 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 "@firebase-ui/core"; +} from "@firebase-oss/ui-core"; import { FormInputComponent, FormSubmitComponent, FormErrorMessageComponent } from "../../../components/form"; import { PoliciesComponent } from "../../../components/policies"; import { 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 9c233c3e8..2f8679438 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 @firebase-ui/core module but preserve Angular providers -jest.mock("@firebase-ui/core", () => { - const originalModule = jest.requireActual("@firebase-ui/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(), @@ -49,7 +49,7 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { verifyPhoneNumber, confirmPhoneNumber, formatPhoneNumber, FirebaseUIError } = require("@firebase-ui/core"); + const { verifyPhoneNumber, confirmPhoneNumber, formatPhoneNumber, FirebaseUIError } = 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 72b189c52..abb882fc6 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 "@firebase-ui/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 e8fa25734..e4a0e5a15 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 @@ -32,7 +32,7 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { signInWithEmailAndPassword, FirebaseUIError } = require("@firebase-ui/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 b2e6bb9ea..5a79fe1da 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, 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 "@firebase-ui/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 44c2065c0..74a1f1947 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 @@ -33,7 +33,7 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { createUserWithEmailAndPassword, hasBehavior, FirebaseUIError } = require("@firebase-ui/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 fba5b9ee0..4e27b1f20 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, effect, computed } from "@angular/core"; import { CommonModule } from "@angular/common"; import { injectForm, injectStore, TanStackAppField, TanStackField } from "@tanstack/angular-form"; -import { FirebaseUIError, createUserWithEmailAndPassword, hasBehavior } from "@firebase-ui/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 a3e46a7be..58a5d2956 100644 --- a/packages/angular/src/lib/auth/oauth/oauth-button.spec.ts +++ b/packages/angular/src/lib/auth/oauth/oauth-button.spec.ts @@ -42,7 +42,7 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { signInWithProvider, FirebaseUIError } = require("@firebase-ui/core"); + const { signInWithProvider, FirebaseUIError } = require("@firebase-oss/ui-core"); mockSignInWithProvider = signInWithProvider; mockFirebaseUIError = FirebaseUIError; diff --git a/packages/angular/src/lib/auth/oauth/oauth-button.ts b/packages/angular/src/lib/auth/oauth/oauth-button.ts index 9336aa2ab..222305944 100644 --- a/packages/angular/src/lib/auth/oauth/oauth-button.ts +++ b/packages/angular/src/lib/auth/oauth/oauth-button.ts @@ -19,7 +19,7 @@ import { CommonModule } from "@angular/common"; import { ButtonComponent } from "../../components/button"; import { injectTranslation, injectUI } from "../../provider"; import { AuthProvider } from "@angular/fire/auth"; -import { FirebaseUIError, signInWithProvider } from "@firebase-ui/core"; +import { FirebaseUIError, signInWithProvider } from "@firebase-oss/ui-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 136f61a14..e91f17441 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 "@firebase-ui/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 ee1cd456b..4190b2fa3 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 "@firebase-ui/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/provider.ts b/packages/angular/src/lib/provider.ts index e0c479335..f5a6c6659 100644 --- a/packages/angular/src/lib/provider.ts +++ b/packages/angular/src/lib/provider.ts @@ -43,7 +43,7 @@ import { getTranslation, getBehavior, type CountryData, -} from "@firebase-ui/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 7beb83899..be2e99174 100644 --- a/packages/angular/src/lib/tests/test-helpers.ts +++ b/packages/angular/src/lib/tests/test-helpers.ts @@ -1,4 +1,4 @@ -// Mock implementations for @firebase-ui/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(); @@ -151,7 +151,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 @firebase-ui/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 9c6581df0..5885b6031 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 "@firebase-ui/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 56d5e8a12..217f1fb49 100644 --- a/packages/angular/tsconfig.json +++ b/packages/angular/tsconfig.json @@ -8,9 +8,9 @@ "paths": { "~/*": ["./src/*"], "~/tests/*": ["./tests/*"], - "@firebase-ui/core": ["../core/src/index.ts"], - "@firebase-ui/translations": ["../translations/src/index.ts"], - "@firebase-ui/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 2d41c266f..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/*"], - "@firebase-ui/core": ["../core/src/index.ts"], - "@firebase-ui/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 5661434db..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 `@firebase-ui/core` package. +This document provides context for the `@firebase-oss/ui-core` package. ## Overview -The `@firebase-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-ui/react` and `@firebase-ui/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 "@firebase-ui/core"; -import { enUs } from "@firebase-ui/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 "@firebase-ui/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 "@firebase-ui/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 f46b174d6..c5eb7c122 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,5 +1,5 @@ { - "name": "@firebase-ui/core", + "name": "@firebase-oss/ui-core", "version": "0.0.1", "description": "Core authentication service for Firebase UI", "type": "module", @@ -49,7 +49,7 @@ "firebase": "catalog:peerDependencies" }, "dependencies": { - "@firebase-ui/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 a583702be..d72efd0bb 100644 --- a/packages/core/src/config.test.ts +++ b/packages/core/src/config.test.ts @@ -2,7 +2,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 "@firebase-ui/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 0ffbf72ec..0829d28ed 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 "@firebase-ui/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 95da383b7..528ade4d5 100644 --- a/packages/core/src/errors.test.ts +++ b/packages/core/src/errors.test.ts @@ -3,7 +3,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 "@firebase-ui/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 da9f1e524..67971f30b 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 "@firebase-ui/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 ecda98f1a..a0d375f3e 100644 --- a/packages/core/src/schemas.test.ts +++ b/packages/core/src/schemas.test.ts @@ -8,7 +8,7 @@ import { createSignInAuthFormSchema, createSignUpAuthFormSchema, } from "./schemas"; -import { registerLocale } from "@firebase-ui/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 77527b1ee..4df8a8fb7 100644 --- a/packages/core/src/translations.test.ts +++ b/packages/core/src/translations.test.ts @@ -1,12 +1,12 @@ import { describe, expect, it, vi } from "vitest"; // Mock the translations module first -vi.mock("@firebase-ui/translations", async (original) => ({ +vi.mock("@firebase-oss/ui-translations", async (original) => ({ ...(await original()), getTranslation: vi.fn(), })); -import { getTranslation as _getTranslation, registerLocale } from "@firebase-ui/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 ffdcea7e4..911ba5cac 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 "@firebase-ui/translations"; +} from "@firebase-oss/ui-translations"; import { type FirebaseUI } from "./config"; export function getTranslation(ui: FirebaseUI, category: T, key: TranslationKey) { diff --git a/packages/core/tests/utils.ts b/packages/core/tests/utils.ts index 6f0528533..a72823f3f 100644 --- a/packages/core/tests/utils.ts +++ b/packages/core/tests/utils.ts @@ -2,7 +2,7 @@ import { vi } from "vitest"; import type { FirebaseApp } from "firebase/app"; import type { Auth } from "firebase/auth"; -import { enUs } from "@firebase-ui/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 1aad27cc9..8a3a3e61b 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -6,7 +6,7 @@ "paths": { "~/*": ["./src/*"], "~/tests/*": ["./tests/*"], - "@firebase-ui/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 26574b536..6b617e5ac 100644 --- a/packages/core/vite.config.ts +++ b/packages/core/vite.config.ts @@ -6,8 +6,8 @@ import { fileURLToPath } from "node:url"; export default defineConfig({ resolve: { alias: { - "@firebase-ui/styles": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../styles/src"), - "@firebase-ui/translations": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../translations/src"), + "@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"), "~/tests": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "./tests"), "~": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "./src"), }, diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.ts index 13c59b518..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: "@firebase-ui/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 e821961b5..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 `@firebase-ui/react` package. +This document provides context for the `@firebase-oss/ui-react` package. ## Overview -The `@firebase-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-ui/core` and `@firebase-ui/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 "@firebase-ui/core"; -import { enUs } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/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 "@firebase-ui/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 "@firebase-ui/react"; -import { signInWithEmailAndPassword } from "@firebase-ui/core"; +import { useUI } from "@firebase-oss/ui-react"; +import { signInWithEmailAndPassword } from "@firebase-oss/ui-core"; function CustomSignInButton() { const ui = useUI(); const handleClick = () => { - // Functions from @firebase-ui/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 44188ed08..3e789a4fe 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -1,4 +1,4 @@ -# @firebase-ui/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 @firebase-ui/react +npm install @firebase-oss/ui-react ``` ## Usage ### Importing styles -To use the components, you need to import the styles from the `@firebase-ui/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 "@firebase-ui/styles/src/base.css"; +@import "@firebase-oss/ui-styles/src/base.css"; ``` Alternatively, you can import the fully compiled CSS file into your project. ```tsx -import "@firebase-ui/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 "@firebase-ui/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 "@firebase-ui/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 `@firebase-ui/react` package. +To use the components, you need to import the components from the `@firebase-oss/ui-react` package. ```tsx -import { SignInAuthScreen, GoogleSignInButton } from "@firebase-ui/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 baae3baf3..be5244942 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,5 +1,5 @@ { - "name": "@firebase-ui/react", + "name": "@firebase-oss/ui-react", "version": "0.0.1", "type": "module", "main": "./dist/index.cjs", @@ -40,8 +40,8 @@ "react-dom": "catalog:peerDependencies" }, "dependencies": { - "@firebase-ui/core": "workspace:*", - "@firebase-ui/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", @@ -50,7 +50,7 @@ "zod": "catalog:" }, "devDependencies": { - "@firebase-ui/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 06dd37b3b..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 "@firebase-ui/core"; +import { sendSignInLinkToEmail, completeEmailLinkSignIn } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/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("@firebase-ui/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 95e145aaf..50ff79f71 100644 --- a/packages/react/src/auth/forms/email-link-auth-form.tsx +++ b/packages/react/src/auth/forms/email-link-auth-form.tsx @@ -16,7 +16,7 @@ "use client"; -import { FirebaseUIError, completeEmailLinkSignIn, getTranslation, sendSignInLinkToEmail } from "@firebase-ui/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 7b8255c03..11e360c27 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 "@firebase-ui/core"; +import { sendPasswordResetEmail } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/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("@firebase-ui/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 67e30623f..075da9b31 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 "@firebase-ui/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 e9d606640..27410f5b9 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 "@firebase-ui/core"; +import { verifyPhoneNumber, signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { PhoneAuthProvider, PhoneMultiFactorGenerator } from "firebase/auth"; -vi.mock("@firebase-ui/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 21132eac3..53501a6ef 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 @@ -6,7 +6,7 @@ import { type RecaptchaVerifier, } from "firebase/auth"; -import { signInWithMultiFactorAssertion, FirebaseUIError, getTranslation, verifyPhoneNumber } from "@firebase-ui/core"; +import { signInWithMultiFactorAssertion, FirebaseUIError, getTranslation, verifyPhoneNumber } from "@firebase-oss/ui-core"; import { form } from "~/components/form"; import { useMultiFactorPhoneAuthNumberFormSchema, 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 dd8d41e35..082925b2b 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 "@firebase-ui/core"; +import { verifyPhoneNumber, enrollWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { PhoneAuthProvider, PhoneMultiFactorGenerator } from "firebase/auth"; -vi.mock("@firebase-ui/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 84f0d2db5..d870740b1 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 @@ -6,7 +6,7 @@ import { formatPhoneNumber, getTranslation, verifyPhoneNumber, -} from "@firebase-ui/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 4a20ee067..2a8d3d2df 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 @@ -22,13 +22,13 @@ import { useTotpMultiFactorAssertionFormAction, } from "./totp-multi-factor-assertion-form"; import { act } from "react"; -import { signInWithMultiFactorAssertion } from "@firebase-ui/core"; +import { signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { TotpMultiFactorGenerator } from "firebase/auth"; -vi.mock("@firebase-ui/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 152385aaf..577fb8714 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 @@ -1,6 +1,6 @@ import { useCallback } from "react"; import { TotpMultiFactorGenerator, type MultiFactorInfo } from "firebase/auth"; -import { signInWithMultiFactorAssertion, FirebaseUIError, getTranslation } from "@firebase-ui/core"; +import { signInWithMultiFactorAssertion, FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; 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 370e92897..a5dff9813 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 "@firebase-ui/core"; +import { generateTotpSecret, generateTotpQrCode, enrollWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { TotpMultiFactorGenerator } from "firebase/auth"; -vi.mock("@firebase-ui/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 fa9806cf0..5d256588b 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 @@ -6,7 +6,7 @@ import { generateTotpQrCode, generateTotpSecret, getTranslation, -} from "@firebase-ui/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 5c5677595..fe6bc4b3c 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 @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, fireEvent, cleanup } from "@testing-library/react"; import { MultiFactorAuthAssertionForm } from "~/auth/forms/multi-factor-auth-assertion-form"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { FactorId, MultiFactorResolver, PhoneMultiFactorGenerator, TotpMultiFactorGenerator } from "firebase/auth"; vi.mock("~/auth/forms/mfa/sms-multi-factor-assertion-form", () => ({ 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 e60f1c459..c967771b1 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 @@ -4,7 +4,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 "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; export function MultiFactorAuthAssertionForm() { const ui = useUI(); 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 7bc796ab9..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 "@firebase-ui/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 2311ee198..829cc07b3 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 @@ -1,5 +1,5 @@ import { FactorId } from "firebase/auth"; -import { getTranslation } from "@firebase-ui/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 bfeac38ea..03a22fe4d 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("@firebase-ui/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 "@firebase-ui/core"; +import { verifyPhoneNumber, confirmPhoneNumber } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/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 40d5146d0..0bb8a5dca 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 "@firebase-ui/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 d2cf05ce5..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 "@firebase-ui/core"; +import { signInWithEmailAndPassword } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/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("@firebase-ui/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 91be199a9..ea0e7cc22 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 "@firebase-ui/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 8e115f386..34c36a70c 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 "@firebase-ui/core"; +import { createUserWithEmailAndPassword } from "@firebase-oss/ui-core"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/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("@firebase-ui/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 6210ce01e..87b02db01 100644 --- a/packages/react/src/auth/forms/sign-up-auth-form.tsx +++ b/packages/react/src/auth/forms/sign-up-auth-form.tsx @@ -16,7 +16,7 @@ "use client"; -import { FirebaseUIError, getTranslation, createUserWithEmailAndPassword, hasBehavior } from "@firebase-ui/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 be131ccf9..3fb59309d 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,7 +17,7 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { AppleLogo, AppleSignInButton } from "./apple-sign-in-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { OAuthProvider } from "firebase/auth"; vi.mock("firebase/auth", async () => { 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 1320b04c6..9a958cfd4 100644 --- a/packages/react/src/auth/oauth/apple-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/apple-sign-in-button.tsx @@ -16,7 +16,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { OAuthProvider } from "firebase/auth"; import { useUI } from "~/hooks"; import { OAuthButton } from "./oauth-button"; 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 6bafb76e6..131d06e63 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 @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { FacebookLogo, FacebookSignInButton } from "./facebook-sign-in-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; vi.mock("firebase/auth", async () => { const actual = await vi.importActual("firebase/auth"); 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 3065e33e0..068072419 100644 --- a/packages/react/src/auth/oauth/facebook-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/facebook-sign-in-button.tsx @@ -16,7 +16,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { FacebookAuthProvider } from "firebase/auth"; import { useUI } from "~/hooks"; import { OAuthButton } from "./oauth-button"; 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 b57145be3..1b1a7c6ba 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 @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { GitHubLogo, GitHubSignInButton } from "./github-sign-in-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; vi.mock("firebase/auth", async () => { const actual = await vi.importActual("firebase/auth"); 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 0603f1d0d..6da70b4f7 100644 --- a/packages/react/src/auth/oauth/github-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/github-sign-in-button.tsx @@ -16,7 +16,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { GithubAuthProvider } from "firebase/auth"; import { useUI } from "~/hooks"; import { OAuthButton } from "./oauth-button"; 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 16cfdba5a..d07111f5a 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 @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { GoogleLogo, GoogleSignInButton } from "./google-sign-in-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; vi.mock("firebase/auth", async () => { const actual = await vi.importActual("firebase/auth"); 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 45c03f219..5a67cfd13 100644 --- a/packages/react/src/auth/oauth/google-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/google-sign-in-button.tsx @@ -16,7 +16,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { GoogleAuthProvider } from "firebase/auth"; import { useUI } from "~/hooks"; import { OAuthButton } from "./oauth-button"; 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 7227b7e35..8c8a943fb 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,7 +17,7 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { MicrosoftLogo, MicrosoftSignInButton } from "./microsoft-sign-in-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { OAuthProvider } from "firebase/auth"; vi.mock("firebase/auth", async () => { 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 7bae44d74..e2a3c2285 100644 --- a/packages/react/src/auth/oauth/microsoft-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/microsoft-sign-in-button.tsx @@ -16,7 +16,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { OAuthProvider } from "firebase/auth"; import { useUI } from "~/hooks"; import { OAuthButton } from "./oauth-button"; diff --git a/packages/react/src/auth/oauth/oauth-button.test.tsx b/packages/react/src/auth/oauth/oauth-button.test.tsx index ecd6d5b0d..9e143c710 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 } from "@testing-library/react"; import { OAuthButton, useSignInWithProvider } from "./oauth-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { enUs, registerLocale } from "@firebase-ui/translations"; +import { enUs, registerLocale } from "@firebase-oss/ui-translations"; import type { AuthProvider, UserCredential } from "firebase/auth"; import { ComponentProps } from "react"; -import { signInWithProvider } from "@firebase-ui/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("@firebase-ui/core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), @@ -133,7 +133,7 @@ describe("", () => { }); it("displays FirebaseUIError message when FirebaseUIError occurs", async () => { - const { FirebaseUIError } = await import("@firebase-ui/core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); const mockError = new FirebaseUIError( @@ -198,7 +198,7 @@ describe("", () => { }); it("clears error when button is clicked again", async () => { - const { FirebaseUIError } = await import("@firebase-ui/core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); @@ -271,7 +271,7 @@ describe("useSignInWithProvider", () => { }); it("sets error state when FirebaseUIError occurs", async () => { - const { FirebaseUIError } = await import("@firebase-ui/core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); const mockError = new FirebaseUIError( @@ -327,7 +327,7 @@ describe("useSignInWithProvider", () => { }); it("clears error when callback is called again", async () => { - const { FirebaseUIError } = await import("@firebase-ui/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 caa83c6dd..3d5fd1cf2 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 "@firebase-ui/core"; +import { FirebaseUIError, getTranslation, signInWithProvider } from "@firebase-oss/ui-core"; import type { AuthProvider } 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 e36b5b7de..eafe4f32f 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 @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { TwitterLogo, TwitterSignInButton } from "./twitter-sign-in-button"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; vi.mock("firebase/auth", async () => { const actual = await vi.importActual("firebase/auth"); 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 e040785e1..bb0b08417 100644 --- a/packages/react/src/auth/oauth/twitter-sign-in-button.tsx +++ b/packages/react/src/auth/oauth/twitter-sign-in-button.tsx @@ -16,7 +16,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { TwitterAuthProvider } from "firebase/auth"; import { useUI } from "~/hooks"; import { OAuthButton } from "./oauth-button"; 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 fa42dde97..3b0dcf8f2 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,7 +18,7 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { EmailLinkAuthScreen } from "~/auth/screens/email-link-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +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 368f6eef7..b3f770ed8 100644 --- a/packages/react/src/auth/screens/email-link-auth-screen.tsx +++ b/packages/react/src/auth/screens/email-link-auth-screen.tsx @@ -15,7 +15,7 @@ */ import type { PropsWithChildren } from "react"; -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { Divider } from "~/components/divider"; import { useUI } from "~/hooks"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card"; 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 53b77daf7..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 "@firebase-ui/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 932b00744..949454a60 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 "@firebase-ui/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-enrollment-screen.test.tsx b/packages/react/src/auth/screens/multi-factor-auth-enrollment-screen.test.tsx index d43e09aef..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 "@firebase-ui/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 d7150f37e..82addc29e 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,4 +1,4 @@ -import { getTranslation } from "@firebase-ui/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 05e33cd90..14c4bf916 100644 --- a/packages/react/src/auth/screens/oauth-screen.test.tsx +++ b/packages/react/src/auth/screens/oauth-screen.test.tsx @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { OAuthScreen } from "~/auth/screens/oauth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { MultiFactorResolver } from "firebase/auth"; vi.mock("~/components/policies", async (originalModule) => { diff --git a/packages/react/src/auth/screens/oauth-screen.tsx b/packages/react/src/auth/screens/oauth-screen.tsx index ac129f457..dcf1d3717 100644 --- a/packages/react/src/auth/screens/oauth-screen.tsx +++ b/packages/react/src/auth/screens/oauth-screen.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { type PropsWithChildren } from "react"; import { useUI } from "~/hooks"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card"; 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 090fa60ae..b988c8866 100644 --- a/packages/react/src/auth/screens/phone-auth-screen.test.tsx +++ b/packages/react/src/auth/screens/phone-auth-screen.test.tsx @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { PhoneAuthScreen } from "~/auth/screens/phone-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { MultiFactorResolver } from "firebase/auth"; vi.mock("~/auth/forms/phone-auth-form", () => ({ diff --git a/packages/react/src/auth/screens/phone-auth-screen.tsx b/packages/react/src/auth/screens/phone-auth-screen.tsx index 292b02908..d2868b156 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 "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { Divider } from "~/components/divider"; import { 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 6ef6a76ee..7b0d4b1f6 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,7 +17,7 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, fireEvent, cleanup } from "@testing-library/react"; import { SignInAuthScreen } from "~/auth/screens/sign-in-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { MultiFactorResolver } from "firebase/auth"; vi.mock("~/auth/forms/sign-in-auth-form", () => ({ 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 31af077ae..8495b114e 100644 --- a/packages/react/src/auth/screens/sign-in-auth-screen.tsx +++ b/packages/react/src/auth/screens/sign-in-auth-screen.tsx @@ -15,7 +15,7 @@ */ import type { PropsWithChildren } from "react"; -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { Divider } from "~/components/divider"; import { useUI } from "~/hooks"; import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "../../components/card"; 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 9765a0c20..894471b99 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,7 +17,7 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, fireEvent, cleanup } from "@testing-library/react"; import { SignUpAuthScreen } from "~/auth/screens/sign-up-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { MultiFactorResolver } from "firebase/auth"; vi.mock("~/auth/forms/sign-up-auth-form", () => ({ 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 70ad50cde..81103538a 100644 --- a/packages/react/src/auth/screens/sign-up-auth-screen.tsx +++ b/packages/react/src/auth/screens/sign-up-auth-screen.tsx @@ -19,7 +19,7 @@ import { Divider } from "~/components/divider"; import { 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 "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { RedirectError } from "~/components/redirect-error"; import { MultiFactorAuthAssertionForm } from "../forms/multi-factor-auth-assertion-form"; diff --git a/packages/react/src/components/button.tsx b/packages/react/src/components/button.tsx index 7b21626d2..e4c45d3cd 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 "@firebase-ui/styles"; +import { buttonVariant, type ButtonVariant } from "@firebase-oss/ui-styles"; import { cn } from "~/utils/cn"; export type ButtonProps = ComponentProps<"button"> & { diff --git a/packages/react/src/components/country-selector.test.tsx b/packages/react/src/components/country-selector.test.tsx index d1b1fc176..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 "@firebase-ui/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 4a3628fbf..42402895a 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 "@firebase-ui/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/policies.tsx b/packages/react/src/components/policies.tsx index 612bcca76..34c8efc87 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 "@firebase-ui/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 010eb7b4f..cb27ae119 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 "@firebase-ui/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 ca0c17fee..4caebe5b1 100644 --- a/packages/react/src/hooks.test.tsx +++ b/packages/react/src/hooks.test.tsx @@ -29,7 +29,7 @@ import { useRecaptchaVerifier, } from "./hooks"; import { createFirebaseUIProvider, createMockUI } from "~/tests/utils"; -import { registerLocale, enUs } from "@firebase-ui/translations"; +import { registerLocale, enUs } from "@firebase-oss/ui-translations"; import type { RecaptchaVerifier } from "firebase/auth"; // Mock RecaptchaVerifier from firebase/auth diff --git a/packages/react/src/hooks.ts b/packages/react/src/hooks.ts index 920685a55..e94beab9e 100644 --- a/packages/react/src/hooks.ts +++ b/packages/react/src/hooks.ts @@ -28,7 +28,7 @@ import { createSignInAuthFormSchema, createSignUpAuthFormSchema, getBehavior, -} from "@firebase-ui/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 b9aca1ee3..b2ce6a2d3 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { registerFramework } from "@firebase-ui/core"; +import { registerFramework } from "@firebase-oss/ui-core"; import pkgJson from "../package.json"; export { PolicyContext } from "./components/policies"; diff --git a/packages/react/tests/email-link-auth.integration.test.tsx b/packages/react/tests/email-link-auth.integration.test.tsx index 6e33824ec..3748cb1b3 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 "@firebase-ui/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 747d225d0..8d36e51bb 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 "@firebase-ui/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 1de2e6556..a62edb66d 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 "@firebase-ui/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 a091252ab..10579fc05 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 "@firebase-ui/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 9815b1915..2f2596350 100644 --- a/packages/react/tests/utils.tsx +++ b/packages/react/tests/utils.tsx @@ -1,7 +1,7 @@ import type { FirebaseApp } from "firebase/app"; import type { Auth } from "firebase/auth"; -import { enUs } from "@firebase-ui/translations"; -import { Behavior, FirebaseUI, FirebaseUIOptions, FirebaseUIStore, initializeUI } from "@firebase-ui/core"; +import { enUs } from "@firebase-oss/ui-translations"; +import { Behavior, FirebaseUI, FirebaseUIOptions, FirebaseUIStore, initializeUI } from "@firebase-oss/ui-core"; import { FirebaseUIProvider } from "../src/context"; export function createMockUI(overrides?: Partial): FirebaseUIStore { diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index 9c22dfe51..9bbedb919 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -6,9 +6,9 @@ "paths": { "~/*": ["./src/*"], "~/tests/*": ["./tests/*"], - "@firebase-ui/core": ["../core/src/index.ts"], - "@firebase-ui/translations": ["../translations/src/index.ts"], - "@firebase-ui/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 69f42c550..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: "@firebase-ui/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 c999969ae..71828c686 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 `@firebase-ui/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 `@firebase-ui/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,8 +27,8 @@ 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 '@firebase-ui/core'; -import { FirebaseUIProvider } from '@firebase-ui/react'; +import { initalizeUI } from '@firebase-oss/ui-core'; +import { FirebaseUIProvider } from '@firebase-oss/ui-react'; import { SignInAuthScreen } from '@/components/sign-in-auth-screen'; const ui = initalizeUI(...); diff --git a/packages/shadcn/package.json b/packages/shadcn/package.json index dba277a13..bd872726b 100644 --- a/packages/shadcn/package.json +++ b/packages/shadcn/package.json @@ -1,5 +1,5 @@ { - "name": "@firebase-ui/shadcn", + "name": "@firebase-oss/ui-shadcn", "private": true, "version": "0.0.0", "type": "module", @@ -10,7 +10,7 @@ "test": "vitest run" }, "devDependencies": { - "@firebase-ui/translations": "workspace:*", + "@firebase-oss/ui-translations": "workspace:*", "@tailwindcss/vite": "catalog:", "@testing-library/jest-dom": "catalog:", "@testing-library/react": "catalog:", @@ -33,8 +33,8 @@ "yargs-parser": "^22.0.0" }, "dependencies": { - "@firebase-ui/core": "workspace:*", - "@firebase-ui/react": "workspace:*", + "@firebase-oss/ui-core": "workspace:*", + "@firebase-oss/ui-react": "workspace:*", "@hookform/resolvers": "^5.2.2", "@radix-ui/react-label": "^2.1.7", "@radix-ui/react-select": "^2.2.6", diff --git a/packages/shadcn/public/apple-sign-in-button.json b/packages/shadcn/public/apple-sign-in-button.json index 2622b88f5..b0cd0f216 100644 --- a/packages/shadcn/public/apple-sign-in-button.json +++ b/packages/shadcn/public/apple-sign-in-button.json @@ -5,7 +5,7 @@ "title": "Apple Sign In Button", "description": "A button component for Apple OAuth authentication.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "https://fir-ui-shadcn.web.app/oauth-button.json" @@ -13,7 +13,7 @@ "files": [ { "path": "src/registry/apple-sign-in-button.tsx", - "content": "\"use client\";\n\nimport { OAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type AppleSignInButtonProps, AppleLogo } from \"@firebase-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", + "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" } ], diff --git a/packages/shadcn/public/country-selector.json b/packages/shadcn/public/country-selector.json index 5ff8e95d9..cbd47a0c0 100644 --- a/packages/shadcn/public/country-selector.json +++ b/packages/shadcn/public/country-selector.json @@ -5,7 +5,7 @@ "title": "Country Selector", "description": "A country selector component for phone number input with country codes and flags.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "select" @@ -13,7 +13,7 @@ "files": [ { "path": "src/registry/country-selector.tsx", - "content": "\"use client\";\n\nimport { forwardRef, useCallback, useImperativeHandle, useState } from \"react\";\nimport type { CountryCode, CountryData } from \"@firebase-ui/core\";\nimport {\n type CountrySelectorRef,\n type CountrySelectorProps,\n useCountries,\n useDefaultCountry,\n} from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/email-link-auth-form.json b/packages/shadcn/public/email-link-auth-form.json index ecc2a8a50..81cf8e303 100644 --- a/packages/shadcn/public/email-link-auth-form.json +++ b/packages/shadcn/public/email-link-auth-form.json @@ -5,7 +5,7 @@ "title": "Email Link Auth Form", "description": "A form allowing users to sign in via email link.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "input", @@ -16,7 +16,7 @@ "files": [ { "path": "src/registry/email-link-auth-form.tsx", - "content": "\"use client\";\n\nimport type { EmailLinkAuthFormSchema } from \"@firebase-ui/core\";\nimport {\n useUI,\n useEmailLinkAuthFormAction,\n useEmailLinkAuthFormSchema,\n useEmailLinkAuthFormCompleteSignIn,\n type EmailLinkAuthFormProps,\n} from \"@firebase-ui/react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport { FirebaseUIError, getTranslation } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/email-link-auth-screen.json b/packages/shadcn/public/email-link-auth-screen.json index edfabe319..2c65abda5 100644 --- a/packages/shadcn/public/email-link-auth-screen.json +++ b/packages/shadcn/public/email-link-auth-screen.json @@ -5,7 +5,7 @@ "title": "Email Link Auth Screen", "description": "A screen allowing users to sign in via email link.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "separator", @@ -15,7 +15,7 @@ "files": [ { "path": "src/registry/email-link-auth-screen.tsx", - "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type EmailLinkAuthScreenProps } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/facebook-sign-in-button.json b/packages/shadcn/public/facebook-sign-in-button.json index d0d81cc00..50c9bcaaf 100644 --- a/packages/shadcn/public/facebook-sign-in-button.json +++ b/packages/shadcn/public/facebook-sign-in-button.json @@ -5,7 +5,7 @@ "title": "Facebook Sign In Button", "description": "A button component for Facebook OAuth authentication.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "https://fir-ui-shadcn.web.app/oauth-button.json" @@ -13,7 +13,7 @@ "files": [ { "path": "src/registry/facebook-sign-in-button.tsx", - "content": "\"use client\";\n\nimport { FacebookAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type FacebookSignInButtonProps, FacebookLogo } from \"@firebase-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", + "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" } ], diff --git a/packages/shadcn/public/forgot-password-auth-form.json b/packages/shadcn/public/forgot-password-auth-form.json index 13b9caa7c..d597c720a 100644 --- a/packages/shadcn/public/forgot-password-auth-form.json +++ b/packages/shadcn/public/forgot-password-auth-form.json @@ -5,7 +5,7 @@ "title": "Forgot Password Auth Form", "description": "A form allowing users to reset their password via email.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "input", @@ -16,7 +16,7 @@ "files": [ { "path": "src/registry/forgot-password-auth-form.tsx", - "content": "\"use client\";\n\nimport type { ForgotPasswordAuthFormSchema } from \"@firebase-ui/core\";\nimport {\n useForgotPasswordAuthFormAction,\n useForgotPasswordAuthFormSchema,\n useUI,\n type ForgotPasswordAuthFormProps,\n} from \"@firebase-ui/react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport { FirebaseUIError, getTranslation } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/forgot-password-auth-screen.json b/packages/shadcn/public/forgot-password-auth-screen.json index 6997072b5..49ee186dd 100644 --- a/packages/shadcn/public/forgot-password-auth-screen.json +++ b/packages/shadcn/public/forgot-password-auth-screen.json @@ -5,7 +5,7 @@ "title": "Forgot Password Auth Screen", "description": "A screen allowing users to reset their password via email.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "card", @@ -14,7 +14,7 @@ "files": [ { "path": "src/registry/forgot-password-auth-screen.tsx", - "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type ForgotPasswordAuthScreenProps } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/github-sign-in-button.json b/packages/shadcn/public/github-sign-in-button.json index 25586c8f2..20aa063ce 100644 --- a/packages/shadcn/public/github-sign-in-button.json +++ b/packages/shadcn/public/github-sign-in-button.json @@ -5,7 +5,7 @@ "title": "GitHub Sign In Button", "description": "A button component for GitHub OAuth authentication.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "https://fir-ui-shadcn.web.app/oauth-button.json" @@ -13,7 +13,7 @@ "files": [ { "path": "src/registry/github-sign-in-button.tsx", - "content": "\"use client\";\n\nimport { GithubAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type GitHubSignInButtonProps, GitHubLogo } from \"@firebase-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", + "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" } ], diff --git a/packages/shadcn/public/google-sign-in-button.json b/packages/shadcn/public/google-sign-in-button.json index 964cf2d90..f5cefdd00 100644 --- a/packages/shadcn/public/google-sign-in-button.json +++ b/packages/shadcn/public/google-sign-in-button.json @@ -5,7 +5,7 @@ "title": "Google Sign In Button", "description": "A button component for Google OAuth authentication.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "https://fir-ui-shadcn.web.app/oauth-button.json" @@ -13,7 +13,7 @@ "files": [ { "path": "src/registry/google-sign-in-button.tsx", - "content": "\"use client\";\n\nimport { GoogleAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type GoogleSignInButtonProps, GoogleLogo } from \"@firebase-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", + "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" } ], diff --git a/packages/shadcn/public/microsoft-sign-in-button.json b/packages/shadcn/public/microsoft-sign-in-button.json index a7532edb9..dd88c8f13 100644 --- a/packages/shadcn/public/microsoft-sign-in-button.json +++ b/packages/shadcn/public/microsoft-sign-in-button.json @@ -5,7 +5,7 @@ "title": "Microsoft Sign In Button", "description": "A button component for Microsoft OAuth authentication.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "https://fir-ui-shadcn.web.app/oauth-button.json" @@ -13,7 +13,7 @@ "files": [ { "path": "src/registry/microsoft-sign-in-button.tsx", - "content": "\"use client\";\n\nimport { OAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type MicrosoftSignInButtonProps, MicrosoftLogo } from \"@firebase-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", + "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" } ], diff --git a/packages/shadcn/public/multi-factor-auth-assertion-form.json b/packages/shadcn/public/multi-factor-auth-assertion-form.json index bb2d35d1a..24b8e02c0 100644 --- a/packages/shadcn/public/multi-factor-auth-assertion-form.json +++ b/packages/shadcn/public/multi-factor-auth-assertion-form.json @@ -5,7 +5,7 @@ "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-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "button", @@ -15,7 +15,7 @@ "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-ui/core\";\nimport { useUI } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/multi-factor-auth-enrollment-form.json b/packages/shadcn/public/multi-factor-auth-enrollment-form.json index bd0f3e4c3..55de337b4 100644 --- a/packages/shadcn/public/multi-factor-auth-enrollment-form.json +++ b/packages/shadcn/public/multi-factor-auth-enrollment-form.json @@ -5,7 +5,7 @@ "title": "Multi-Factor Auth Enrollment Form", "description": "A form allowing users to select and configure multi-factor authentication methods.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "button", @@ -15,7 +15,7 @@ "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-ui/core\";\nimport { useUI } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/multi-factor-auth-enrollment-screen.json b/packages/shadcn/public/multi-factor-auth-enrollment-screen.json index 9e3971ed4..5ae139008 100644 --- a/packages/shadcn/public/multi-factor-auth-enrollment-screen.json +++ b/packages/shadcn/public/multi-factor-auth-enrollment-screen.json @@ -5,7 +5,7 @@ "title": "Multi-Factor Auth Enrollment Screen", "description": "A screen allowing users to set up multi-factor authentication with TOTP or SMS options.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "card", @@ -14,7 +14,7 @@ "files": [ { "path": "src/registry/multi-factor-auth-enrollment-screen.tsx", - "content": "\"use client\";\n\nimport React, { type PropsWithChildren } from \"react\";\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type MultiFactorAuthEnrollmentFormProps } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/oauth-button.json b/packages/shadcn/public/oauth-button.json index ccd43e596..befbdb020 100644 --- a/packages/shadcn/public/oauth-button.json +++ b/packages/shadcn/public/oauth-button.json @@ -5,7 +5,7 @@ "title": "OAuth Button", "description": "A button component for OAuth authentication providers.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "button" @@ -13,7 +13,7 @@ "files": [ { "path": "src/registry/oauth-button.tsx", - "content": "\"use client\";\n\nimport { useUI, type OAuthButtonProps, useSignInWithProvider } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/oauth-screen.json b/packages/shadcn/public/oauth-screen.json index efd06bd3f..182dc56c1 100644 --- a/packages/shadcn/public/oauth-screen.json +++ b/packages/shadcn/public/oauth-screen.json @@ -5,7 +5,7 @@ "title": "OAuth Screen", "description": "A screen allowing users to sign in with OAuth providers.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "card", @@ -16,7 +16,7 @@ "files": [ { "path": "src/registry/oauth-screen.tsx", - "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { type PropsWithChildren } from \"react\";\nimport { useUI } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/phone-auth-form.json b/packages/shadcn/public/phone-auth-form.json index b579ab26a..779e85462 100644 --- a/packages/shadcn/public/phone-auth-form.json +++ b/packages/shadcn/public/phone-auth-form.json @@ -5,7 +5,7 @@ "title": "Phone Auth Form", "description": "A form allowing users to authenticate using their phone number with SMS verification.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "form", @@ -17,7 +17,7 @@ "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-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-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", + "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" } ] diff --git a/packages/shadcn/public/phone-auth-screen.json b/packages/shadcn/public/phone-auth-screen.json index 46dac8cdc..bf3ca80e0 100644 --- a/packages/shadcn/public/phone-auth-screen.json +++ b/packages/shadcn/public/phone-auth-screen.json @@ -5,7 +5,7 @@ "title": "Phone Auth Screen", "description": "A screen allowing users to authenticate using their phone number with SMS verification.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "card", @@ -17,7 +17,7 @@ "files": [ { "path": "src/registry/phone-auth-screen.tsx", - "content": "\"use client\";\n\nimport type { PropsWithChildren } from \"react\";\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/policies.json b/packages/shadcn/public/policies.json index 5afca182c..cdb112409 100644 --- a/packages/shadcn/public/policies.json +++ b/packages/shadcn/public/policies.json @@ -5,12 +5,12 @@ "title": "Policies", "description": "A component allowing users to navigate to the terms of service and privacy policy.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "files": [ { "path": "src/registry/policies.tsx", - "content": "import { cn } from \"@/lib/utils\";\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, PolicyContext } from \"@firebase-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", + "content": "\"use client\";\n\nimport type { SignInAuthFormSchema } from \"@firebase-oss/ui-core\";\nimport { useSignInAuthFormAction, useSignInAuthFormSchema, useUI, type SignInAuthFormProps } 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 { SignInAuthFormProps };\n\nexport function SignInAuthForm(props: SignInAuthFormProps) {\n const ui = useUI();\n const schema = useSignInAuthFormSchema();\n const action = useSignInAuthFormAction();\n\n const form = useForm({\n resolver: standardSchemaResolver(schema),\n defaultValues: {\n email: \"\",\n password: \"\",\n },\n });\n\n async function onSubmit(values: SignInAuthFormSchema) {\n try {\n const credential = await action(values);\n props.onSignIn?.(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 {props.onForgotPasswordClick ? (\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" } ] diff --git a/packages/shadcn/public/sign-in-auth-screen.json b/packages/shadcn/public/sign-in-auth-screen.json index 4fabd25ef..a9a96daae 100644 --- a/packages/shadcn/public/sign-in-auth-screen.json +++ b/packages/shadcn/public/sign-in-auth-screen.json @@ -5,7 +5,7 @@ "title": "Sign In Auth Screen", "description": "A screen allowing users to sign in with email and password.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "separator", @@ -15,7 +15,7 @@ "files": [ { "path": "src/registry/sign-in-auth-screen.tsx", - "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type SignInAuthScreenProps } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/sign-up-auth-form.json b/packages/shadcn/public/sign-up-auth-form.json index aa4c33f67..f658b9731 100644 --- a/packages/shadcn/public/sign-up-auth-form.json +++ b/packages/shadcn/public/sign-up-auth-form.json @@ -5,7 +5,7 @@ "title": "Sign Up Auth Form", "description": "A form allowing users to sign up with email and password.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "input", @@ -16,7 +16,7 @@ "files": [ { "path": "src/registry/sign-up-auth-form.tsx", - "content": "\"use client\";\n\nimport type { SignUpAuthFormSchema } from \"@firebase-ui/core\";\nimport {\n useSignUpAuthFormAction,\n useSignUpAuthFormSchema,\n useUI,\n type SignUpAuthFormProps,\n useRequireDisplayName,\n} from \"@firebase-ui/react\";\nimport { useForm } from \"react-hook-form\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport { FirebaseUIError, getTranslation } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/sign-up-auth-screen.json b/packages/shadcn/public/sign-up-auth-screen.json index 3f8687226..e65db9000 100644 --- a/packages/shadcn/public/sign-up-auth-screen.json +++ b/packages/shadcn/public/sign-up-auth-screen.json @@ -5,7 +5,7 @@ "title": "Sign Up Auth Screen", "description": "A screen allowing users to sign up with email and password.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "separator", @@ -15,7 +15,7 @@ "files": [ { "path": "src/registry/sign-up-auth-screen.tsx", - "content": "\"use client\";\n\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type SignUpAuthScreenProps } from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/sms-multi-factor-assertion-form.json b/packages/shadcn/public/sms-multi-factor-assertion-form.json index 1b03a141d..74ea8c0b9 100644 --- a/packages/shadcn/public/sms-multi-factor-assertion-form.json +++ b/packages/shadcn/public/sms-multi-factor-assertion-form.json @@ -5,7 +5,7 @@ "title": "SMS Multi-Factor Assertion Form", "description": "A form allowing users to complete SMS-based multi-factor authentication during sign-in.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "form", @@ -16,7 +16,7 @@ "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-ui/core\";\nimport {\n useMultiFactorPhoneAuthVerifyFormSchema,\n useRecaptchaVerifier,\n useUI,\n useSmsMultiFactorAssertionPhoneFormAction,\n useSmsMultiFactorAssertionVerifyFormAction,\n} from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/sms-multi-factor-enrollment-form.json b/packages/shadcn/public/sms-multi-factor-enrollment-form.json index 4df076a27..cc656d155 100644 --- a/packages/shadcn/public/sms-multi-factor-enrollment-form.json +++ b/packages/shadcn/public/sms-multi-factor-enrollment-form.json @@ -5,7 +5,7 @@ "title": "SMS Multi-Factor Enrollment Form", "description": "A form allowing users to enroll SMS-based multi-factor authentication.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "form", @@ -17,7 +17,7 @@ "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-ui/core\";\nimport { CountrySelector, type CountrySelectorRef } from \"@/registry/country-selector\";\nimport {\n useMultiFactorPhoneAuthNumberFormSchema,\n useMultiFactorPhoneAuthVerifyFormSchema,\n useRecaptchaVerifier,\n useUI,\n} from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/totp-multi-factor-assertion-form.json b/packages/shadcn/public/totp-multi-factor-assertion-form.json index decc75ccd..3ce71ccfd 100644 --- a/packages/shadcn/public/totp-multi-factor-assertion-form.json +++ b/packages/shadcn/public/totp-multi-factor-assertion-form.json @@ -5,7 +5,7 @@ "title": "TOTP Multi-Factor Assertion Form", "description": "A form allowing users to complete TOTP-based multi-factor authentication during sign-in.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "form", @@ -15,7 +15,7 @@ "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-ui/core\";\nimport {\n useMultiFactorTotpAuthVerifyFormSchema,\n useUI,\n useTotpMultiFactorAssertionFormAction,\n} from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/totp-multi-factor-enrollment-form.json b/packages/shadcn/public/totp-multi-factor-enrollment-form.json index 5de677e23..ced8a0bab 100644 --- a/packages/shadcn/public/totp-multi-factor-enrollment-form.json +++ b/packages/shadcn/public/totp-multi-factor-enrollment-form.json @@ -5,7 +5,7 @@ "title": "TOTP Multi-Factor Enrollment Form", "description": "A form allowing users to enroll TOTP-based multi-factor authentication with QR code generation.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "form", @@ -16,7 +16,7 @@ "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-ui/core\";\nimport {\n useMultiFactorTotpAuthNumberFormSchema,\n useMultiFactorTotpAuthVerifyFormSchema,\n useUI,\n} from \"@firebase-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", + "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" } ] diff --git a/packages/shadcn/public/twitter-sign-in-button.json b/packages/shadcn/public/twitter-sign-in-button.json index 20f49f260..a07adecc4 100644 --- a/packages/shadcn/public/twitter-sign-in-button.json +++ b/packages/shadcn/public/twitter-sign-in-button.json @@ -5,7 +5,7 @@ "title": "Twitter Sign In Button", "description": "A button component for Twitter OAuth authentication.", "dependencies": [ - "@firebase-ui/react" + "@firebase-oss/ui-react" ], "registryDependencies": [ "https://fir-ui-shadcn.web.app/oauth-button.json" @@ -13,7 +13,7 @@ "files": [ { "path": "src/registry/twitter-sign-in-button.tsx", - "content": "\"use client\";\n\nimport { TwitterAuthProvider } from \"firebase/auth\";\nimport { getTranslation } from \"@firebase-ui/core\";\nimport { useUI, type TwitterSignInButtonProps, TwitterLogo } from \"@firebase-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", + "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" } ], diff --git a/packages/shadcn/registry-spec.json b/packages/shadcn/registry-spec.json index f1bf02e00..5b8476138 100644 --- a/packages/shadcn/registry-spec.json +++ b/packages/shadcn/registry-spec.json @@ -8,7 +8,7 @@ "type": "registry:block", "title": "Apple Sign In Button", "description": "A button component for Apple OAuth authentication.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { @@ -42,7 +42,7 @@ "type": "registry:block", "title": "Country Selector", "description": "A country selector component for phone number input with country codes and flags.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["select"], "files": [ { @@ -56,7 +56,7 @@ "type": "registry:block", "title": "Email Link Auth Form", "description": "A form allowing users to sign in via email link.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/policies.json"], "files": [ { @@ -70,7 +70,7 @@ "type": "registry:block", "title": "Email Link Auth Screen", "description": "A screen allowing users to sign in via email link.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["separator", "card", "{{ DOMAIN }}/email-link-auth-form.json"], "files": [ { @@ -84,7 +84,7 @@ "type": "registry:block", "title": "Facebook Sign In Button", "description": "A button component for Facebook OAuth authentication.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { @@ -109,7 +109,7 @@ "type": "registry:block", "title": "Forgot Password Auth Form", "description": "A form allowing users to reset their password via email.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/policies.json"], "files": [ { @@ -123,7 +123,7 @@ "type": "registry:block", "title": "Forgot Password Auth Screen", "description": "A screen allowing users to reset their password via email.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["card", "{{ DOMAIN }}/forgot-password-auth-form.json"], "files": [ { @@ -137,7 +137,7 @@ "type": "registry:block", "title": "GitHub Sign In Button", "description": "A button component for GitHub OAuth authentication.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { @@ -171,7 +171,7 @@ "type": "registry:block", "title": "Google Sign In Button", "description": "A button component for Google OAuth authentication.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { @@ -212,7 +212,7 @@ "type": "registry:block", "title": "Microsoft Sign In Button", "description": "A button component for Microsoft OAuth authentication.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { @@ -246,7 +246,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 | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "button", "{{ DOMAIN }}/sms-multi-factor-assertion-form.json", @@ -264,7 +264,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 | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "button", "{{ DOMAIN }}/sms-multi-factor-enrollment-form.json", @@ -282,7 +282,7 @@ "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 | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["card", "{{ DOMAIN }}/multi-factor-auth-enrollment-form.json"], "files": [ { @@ -296,7 +296,7 @@ "type": "registry:block", "title": "OAuth Button", "description": "A button component for OAuth authentication providers.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["button"], "files": [ { @@ -310,7 +310,7 @@ "type": "registry:block", "title": "OAuth Screen", "description": "A screen allowing users to sign in with OAuth providers.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "card", "{{ DOMAIN }}/policies.json", @@ -329,7 +329,7 @@ "type": "registry:block", "title": "Phone Auth Form", "description": "A form allowing users to authenticate using their phone number with SMS verification.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "form", "input", @@ -349,7 +349,7 @@ "type": "registry:block", "title": "Phone Auth Screen", "description": "A screen allowing users to authenticate using their phone number with SMS verification.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": [ "card", "separator", @@ -369,7 +369,7 @@ "type": "registry:block", "title": "Policies", "description": "A component allowing users to navigate to the terms of service and privacy policy.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "files": [ { "path": "src/registry/policies.tsx", @@ -382,7 +382,7 @@ "type": "registry:block", "title": "Redirect Error", "description": "A component that displays redirect errors from Firebase UI authentication flow.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "files": [ { "path": "src/registry/redirect-error.tsx", @@ -395,7 +395,7 @@ "type": "registry:block", "title": "Sign In Auth Form", "description": "A form allowing users to sign in with email and password.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/policies.json"], "files": [ { @@ -409,7 +409,7 @@ "type": "registry:block", "title": "Sign In Auth Screen", "description": "A screen allowing users to sign in with email and password.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["separator", "card", "{{ DOMAIN }}/sign-in-auth-form.json"], "files": [ { @@ -423,7 +423,7 @@ "type": "registry:block", "title": "Sign Up Auth Form", "description": "A form allowing users to sign up with email and password.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["input", "button", "form", "{{ DOMAIN }}/policies.json"], "files": [ { @@ -437,7 +437,7 @@ "type": "registry:block", "title": "Sign Up Auth Screen", "description": "A screen allowing users to sign up with email and password.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["separator", "card", "{{ DOMAIN }}/sign-up-auth-form.json"], "files": [ { @@ -451,7 +451,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 | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["form", "input", "button", "input-otp"], "files": [ { @@ -465,7 +465,7 @@ "type": "registry:block", "title": "SMS Multi-Factor Enrollment Form", "description": "A form allowing users to enroll SMS-based multi-factor authentication.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["form", "input", "button", "input-otp", "{{ DOMAIN }}/country-selector.json"], "files": [ { @@ -479,7 +479,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 | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["form", "button", "input-otp"], "files": [ { @@ -493,7 +493,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 | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["form", "input", "button", "input-otp"], "files": [ { @@ -507,7 +507,7 @@ "type": "registry:block", "title": "Twitter Sign In Button", "description": "A button component for Twitter OAuth authentication.", - "dependencies": ["{{ DEP | @firebase-ui/react }}"], + "dependencies": ["{{ DEP | @firebase-oss/ui-react }}"], "registryDependencies": ["{{ DOMAIN }}/oauth-button.json"], "files": [ { diff --git a/packages/shadcn/src/registry/apple-sign-in-button.test.tsx b/packages/shadcn/src/registry/apple-sign-in-button.test.tsx index b381805ee..6d7e5b793 100644 --- a/packages/shadcn/src/registry/apple-sign-in-button.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { OAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed }: any) => ( @@ -32,8 +32,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@firebase-ui/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/registry/apple-sign-in-button.tsx b/packages/shadcn/src/registry/apple-sign-in-button.tsx index f600032bc..a0c1de402 100644 --- a/packages/shadcn/src/registry/apple-sign-in-button.tsx +++ b/packages/shadcn/src/registry/apple-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { OAuthProvider } from "firebase/auth"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type AppleSignInButtonProps, AppleLogo } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type AppleSignInButtonProps, AppleLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/registry/oauth-button"; diff --git a/packages/shadcn/src/registry/country-selector.test.tsx b/packages/shadcn/src/registry/country-selector.test.tsx index 6b9befb3d..9c22e7720 100644 --- a/packages/shadcn/src/registry/country-selector.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/core"; +import { countryCodes } from "@firebase-oss/ui-core"; import { CountrySelector } from "./country-selector"; import { createMockUI, createFirebaseUIProvider } from "../../tests/utils"; -import { FirebaseUIProvider } from "@firebase-ui/react"; -import { useCountries, useDefaultCountry } from "@firebase-ui/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 "@firebase-ui/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/registry/country-selector.tsx b/packages/shadcn/src/registry/country-selector.tsx index b3fc77cc7..1e74e40e2 100644 --- a/packages/shadcn/src/registry/country-selector.tsx +++ b/packages/shadcn/src/registry/country-selector.tsx @@ -1,13 +1,13 @@ "use client"; import { forwardRef, useCallback, useImperativeHandle, useState } from "react"; -import type { CountryCode, CountryData } from "@firebase-ui/core"; +import type { CountryCode, CountryData } from "@firebase-oss/ui-core"; import { type CountrySelectorRef, type CountrySelectorProps, useCountries, useDefaultCountry, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; diff --git a/packages/shadcn/src/registry/email-link-auth-form.test.tsx b/packages/shadcn/src/registry/email-link-auth-form.test.tsx index f93e4306f..f9a872616 100644 --- a/packages/shadcn/src/registry/email-link-auth-form.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/react"; +import { useEmailLinkAuthFormAction } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { UserCredential } from "firebase/auth"; -import { completeEmailLinkSignIn } from "@firebase-ui/core"; +import { completeEmailLinkSignIn } from "@firebase-oss/ui-core"; -vi.mock("@firebase-ui/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("@firebase-ui/core", async (importOriginal) => { }; }); -vi.mock("@firebase-ui/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/registry/email-link-auth-form.tsx b/packages/shadcn/src/registry/email-link-auth-form.tsx index 20e28c68e..4780472d3 100644 --- a/packages/shadcn/src/registry/email-link-auth-form.tsx +++ b/packages/shadcn/src/registry/email-link-auth-form.tsx @@ -1,16 +1,16 @@ "use client"; -import type { EmailLinkAuthFormSchema } from "@firebase-ui/core"; +import type { EmailLinkAuthFormSchema } from "@firebase-oss/ui-core"; import { useUI, useEmailLinkAuthFormAction, useEmailLinkAuthFormSchema, useEmailLinkAuthFormCompleteSignIn, type EmailLinkAuthFormProps, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/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/registry/email-link-auth-screen.test.tsx b/packages/shadcn/src/registry/email-link-auth-screen.test.tsx index 48879ecaf..439009a82 100644 --- a/packages/shadcn/src/registry/email-link-auth-screen.test.tsx +++ b/packages/shadcn/src/registry/email-link-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 { EmailLinkAuthScreen } from "./email-link-auth-screen"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./email-link-auth-form", () => ({ EmailLinkAuthForm: ({ onEmailSent, onSignIn }: any) => ( diff --git a/packages/shadcn/src/registry/email-link-auth-screen.tsx b/packages/shadcn/src/registry/email-link-auth-screen.tsx index 27c4beafa..1ba16af6e 100644 --- a/packages/shadcn/src/registry/email-link-auth-screen.tsx +++ b/packages/shadcn/src/registry/email-link-auth-screen.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type EmailLinkAuthScreenProps } from "@firebase-ui/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/packages/shadcn/src/registry/facebook-sign-in-button.test.tsx b/packages/shadcn/src/registry/facebook-sign-in-button.test.tsx index 26b33f532..44a986215 100644 --- a/packages/shadcn/src/registry/facebook-sign-in-button.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { FacebookAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed }: any) => ( @@ -32,8 +32,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@firebase-ui/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/registry/facebook-sign-in-button.tsx b/packages/shadcn/src/registry/facebook-sign-in-button.tsx index 6708ab607..0947e1ad9 100644 --- a/packages/shadcn/src/registry/facebook-sign-in-button.tsx +++ b/packages/shadcn/src/registry/facebook-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { FacebookAuthProvider } from "firebase/auth"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type FacebookSignInButtonProps, FacebookLogo } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type FacebookSignInButtonProps, FacebookLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/registry/oauth-button"; diff --git a/packages/shadcn/src/registry/forgot-password-auth-form.test.tsx b/packages/shadcn/src/registry/forgot-password-auth-form.test.tsx index b450c9b5f..b363e14e1 100644 --- a/packages/shadcn/src/registry/forgot-password-auth-form.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/react"; +import { useForgotPasswordAuthFormAction } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; -vi.mock("@firebase-ui/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("@firebase-ui/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/registry/forgot-password-auth-form.tsx b/packages/shadcn/src/registry/forgot-password-auth-form.tsx index e050d262f..4eed22c7c 100644 --- a/packages/shadcn/src/registry/forgot-password-auth-form.tsx +++ b/packages/shadcn/src/registry/forgot-password-auth-form.tsx @@ -1,15 +1,15 @@ "use client"; -import type { ForgotPasswordAuthFormSchema } from "@firebase-ui/core"; +import type { ForgotPasswordAuthFormSchema } from "@firebase-oss/ui-core"; import { useForgotPasswordAuthFormAction, useForgotPasswordAuthFormSchema, useUI, type ForgotPasswordAuthFormProps, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/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/registry/forgot-password-auth-screen.test.tsx b/packages/shadcn/src/registry/forgot-password-auth-screen.test.tsx index fd65e7469..c5302aef0 100644 --- a/packages/shadcn/src/registry/forgot-password-auth-screen.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/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/registry/forgot-password-auth-screen.tsx b/packages/shadcn/src/registry/forgot-password-auth-screen.tsx index 15d1336bd..a392152d7 100644 --- a/packages/shadcn/src/registry/forgot-password-auth-screen.tsx +++ b/packages/shadcn/src/registry/forgot-password-auth-screen.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type ForgotPasswordAuthScreenProps } from "@firebase-ui/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 "@/registry/forgot-password-auth-form"; diff --git a/packages/shadcn/src/registry/github-sign-in-button.test.tsx b/packages/shadcn/src/registry/github-sign-in-button.test.tsx index 49a7feac9..439e598d8 100644 --- a/packages/shadcn/src/registry/github-sign-in-button.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { GithubAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed }: any) => ( @@ -32,8 +32,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@firebase-ui/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/registry/github-sign-in-button.tsx b/packages/shadcn/src/registry/github-sign-in-button.tsx index 80f70ca89..be663b856 100644 --- a/packages/shadcn/src/registry/github-sign-in-button.tsx +++ b/packages/shadcn/src/registry/github-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { GithubAuthProvider } from "firebase/auth"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type GitHubSignInButtonProps, GitHubLogo } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type GitHubSignInButtonProps, GitHubLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/registry/oauth-button"; diff --git a/packages/shadcn/src/registry/google-sign-in-button.test.tsx b/packages/shadcn/src/registry/google-sign-in-button.test.tsx index 1f6ec87be..674579398 100644 --- a/packages/shadcn/src/registry/google-sign-in-button.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { GoogleAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed }: any) => ( @@ -32,8 +32,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@firebase-ui/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/registry/google-sign-in-button.tsx b/packages/shadcn/src/registry/google-sign-in-button.tsx index 7d5c213ac..354cc6821 100644 --- a/packages/shadcn/src/registry/google-sign-in-button.tsx +++ b/packages/shadcn/src/registry/google-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { GoogleAuthProvider } from "firebase/auth"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type GoogleSignInButtonProps, GoogleLogo } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type GoogleSignInButtonProps, GoogleLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/registry/oauth-button"; diff --git a/packages/shadcn/src/registry/microsoft-sign-in-button.test.tsx b/packages/shadcn/src/registry/microsoft-sign-in-button.test.tsx index 26bf20538..677bf8817 100644 --- a/packages/shadcn/src/registry/microsoft-sign-in-button.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { OAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed }: any) => ( @@ -32,8 +32,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@firebase-ui/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/registry/microsoft-sign-in-button.tsx b/packages/shadcn/src/registry/microsoft-sign-in-button.tsx index 69c460104..d9edec518 100644 --- a/packages/shadcn/src/registry/microsoft-sign-in-button.tsx +++ b/packages/shadcn/src/registry/microsoft-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { OAuthProvider } from "firebase/auth"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type MicrosoftSignInButtonProps, MicrosoftLogo } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type MicrosoftSignInButtonProps, MicrosoftLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/registry/oauth-button"; diff --git a/packages/shadcn/src/registry/multi-factor-auth-assertion-form.test.tsx b/packages/shadcn/src/registry/multi-factor-auth-assertion-form.test.tsx index 6911068a7..425ebd407 100644 --- a/packages/shadcn/src/registry/multi-factor-auth-assertion-form.test.tsx +++ b/packages/shadcn/src/registry/multi-factor-auth-assertion-form.test.tsx @@ -2,7 +2,7 @@ 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 "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { FactorId, MultiFactorResolver, PhoneMultiFactorGenerator, TotpMultiFactorGenerator } from "firebase/auth"; vi.mock("@/registry/sms-multi-factor-assertion-form", () => ({ diff --git a/packages/shadcn/src/registry/multi-factor-auth-assertion-form.tsx b/packages/shadcn/src/registry/multi-factor-auth-assertion-form.tsx index 98669e2ab..86afa783c 100644 --- a/packages/shadcn/src/registry/multi-factor-auth-assertion-form.tsx +++ b/packages/shadcn/src/registry/multi-factor-auth-assertion-form.tsx @@ -2,8 +2,8 @@ import { PhoneMultiFactorGenerator, TotpMultiFactorGenerator, type MultiFactorInfo } from "firebase/auth"; import { type ComponentProps, useState } from "react"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI } from "@firebase-oss/ui-react"; import { SmsMultiFactorAssertionForm } from "./sms-multi-factor-assertion-form"; import { TotpMultiFactorAssertionForm } from "./totp-multi-factor-assertion-form"; diff --git a/packages/shadcn/src/registry/multi-factor-auth-enrollment-form.test.tsx b/packages/shadcn/src/registry/multi-factor-auth-enrollment-form.test.tsx index 850f5f696..fd78d9260 100644 --- a/packages/shadcn/src/registry/multi-factor-auth-enrollment-form.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/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/registry/multi-factor-auth-enrollment-form.tsx b/packages/shadcn/src/registry/multi-factor-auth-enrollment-form.tsx index eaf6a6899..779d1115f 100644 --- a/packages/shadcn/src/registry/multi-factor-auth-enrollment-form.tsx +++ b/packages/shadcn/src/registry/multi-factor-auth-enrollment-form.tsx @@ -2,8 +2,8 @@ import { type ComponentProps, useState } from "react"; import { FactorId } from "firebase/auth"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI } from "@firebase-oss/ui-react"; import { SmsMultiFactorEnrollmentForm } from "@/registry/sms-multi-factor-enrollment-form"; import { TotpMultiFactorEnrollmentForm } from "@/registry/totp-multi-factor-enrollment-form"; diff --git a/packages/shadcn/src/registry/multi-factor-auth-enrollment-screen.test.tsx b/packages/shadcn/src/registry/multi-factor-auth-enrollment-screen.test.tsx index 8096da31f..e97276b4c 100644 --- a/packages/shadcn/src/registry/multi-factor-auth-enrollment-screen.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/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/registry/multi-factor-auth-enrollment-screen.tsx b/packages/shadcn/src/registry/multi-factor-auth-enrollment-screen.tsx index 7a320e8d4..d0b54ba79 100644 --- a/packages/shadcn/src/registry/multi-factor-auth-enrollment-screen.tsx +++ b/packages/shadcn/src/registry/multi-factor-auth-enrollment-screen.tsx @@ -1,8 +1,8 @@ "use client"; import React, { type PropsWithChildren } from "react"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type MultiFactorAuthEnrollmentFormProps } from "@firebase-ui/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 "@/registry/multi-factor-auth-enrollment-form"; diff --git a/packages/shadcn/src/registry/oauth-button.test.tsx b/packages/shadcn/src/registry/oauth-button.test.tsx index 978c91725..7d447ce18 100644 --- a/packages/shadcn/src/registry/oauth-button.test.tsx +++ b/packages/shadcn/src/registry/oauth-button.test.tsx @@ -18,15 +18,15 @@ import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"; import { render, screen, fireEvent, cleanup } from "@testing-library/react"; import { OAuthButton } from "./oauth-button"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import type { AuthProvider, UserCredential } from "firebase/auth"; import { ComponentProps } from "react"; -import { signInWithProvider } from "@firebase-ui/core"; +import { signInWithProvider } from "@firebase-oss/ui-core"; import { FirebaseError } from "firebase/app"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; -vi.mock("@firebase-ui/core", async (importOriginal) => { +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { const mod = await importOriginal(); return { ...(mod as object), @@ -142,7 +142,7 @@ describe("", () => { }); it("displays FirebaseUIError message when FirebaseUIError occurs", async () => { - const { FirebaseUIError } = await import("@firebase-ui/core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); const mockError = new FirebaseUIError( @@ -211,7 +211,7 @@ describe("", () => { }); it("clears error when button is clicked again", async () => { - const { FirebaseUIError } = await import("@firebase-ui/core"); + const { FirebaseUIError } = await import("@firebase-oss/ui-core"); const mockSignInWithProvider = vi.mocked(signInWithProvider); const ui = createMockUI(); diff --git a/packages/shadcn/src/registry/oauth-button.tsx b/packages/shadcn/src/registry/oauth-button.tsx index dd5d3740e..8c0d1f0ab 100644 --- a/packages/shadcn/src/registry/oauth-button.tsx +++ b/packages/shadcn/src/registry/oauth-button.tsx @@ -1,6 +1,6 @@ "use client"; -import { useUI, type OAuthButtonProps, useSignInWithProvider } from "@firebase-ui/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/registry/oauth-screen.test.tsx b/packages/shadcn/src/registry/oauth-screen.test.tsx index 7126a5dbd..8bfd1d977 100644 --- a/packages/shadcn/src/registry/oauth-screen.test.tsx +++ b/packages/shadcn/src/registry/oauth-screen.test.tsx @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { OAuthScreen } from "@/registry/oauth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { MultiFactorResolver } from "firebase/auth"; vi.mock("@/registry/policies", () => ({ diff --git a/packages/shadcn/src/registry/oauth-screen.tsx b/packages/shadcn/src/registry/oauth-screen.tsx index 7b9172e6f..de42028cc 100644 --- a/packages/shadcn/src/registry/oauth-screen.tsx +++ b/packages/shadcn/src/registry/oauth-screen.tsx @@ -1,8 +1,8 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; +import { getTranslation } from "@firebase-oss/ui-core"; import { type PropsWithChildren } from "react"; -import { useUI } from "@firebase-ui/react"; +import { useUI } from "@firebase-oss/ui-react"; import { Card, CardContent, CardHeader, CardDescription, CardTitle } from "@/components/ui/card"; import { Policies } from "@/registry/policies"; import { MultiFactorAuthAssertionForm } from "@/registry/multi-factor-auth-assertion-form"; diff --git a/packages/shadcn/src/registry/phone-auth-form.test.tsx b/packages/shadcn/src/registry/phone-auth-form.test.tsx index e26768453..6e28269c5 100644 --- a/packages/shadcn/src/registry/phone-auth-form.test.tsx +++ b/packages/shadcn/src/registry/phone-auth-form.test.tsx @@ -18,17 +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 "@firebase-ui/react"; +import { usePhoneNumberFormAction, useVerifyPhoneNumberFormAction, useUI } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { User, UserCredential } from "firebase/auth"; -import { FirebaseUI, FirebaseUIError } from "@firebase-ui/core"; +import { FirebaseUI, FirebaseUIError } from "@firebase-oss/ui-core"; import { FirebaseError } from "firebase/app"; -import { ERROR_CODE_MAP } from "@firebase-ui/translations"; +import { ERROR_CODE_MAP } from "@firebase-oss/ui-translations"; -vi.mock("@firebase-ui/core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, verifyPhoneNumber: vi.fn(), @@ -49,8 +49,8 @@ vi.mock("@firebase-ui/core", async (importOriginal) => { }; }); -vi.mock("@firebase-ui/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/registry/phone-auth-form.tsx b/packages/shadcn/src/registry/phone-auth-form.tsx index a13b284b3..0a1c59bec 100644 --- a/packages/shadcn/src/registry/phone-auth-form.tsx +++ b/packages/shadcn/src/registry/phone-auth-form.tsx @@ -9,7 +9,7 @@ import { useRecaptchaVerifier, useUI, useVerifyPhoneNumberFormAction, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; import { useState } from "react"; import type { UserCredential } from "firebase/auth"; import { useRef } from "react"; @@ -21,7 +21,7 @@ import { getTranslation, type PhoneAuthNumberFormSchema, type PhoneAuthVerifyFormSchema, -} from "@firebase-ui/core"; +} 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/registry/phone-auth-screen.test.tsx b/packages/shadcn/src/registry/phone-auth-screen.test.tsx index 06d665895..6764d8009 100644 --- a/packages/shadcn/src/registry/phone-auth-screen.test.tsx +++ b/packages/shadcn/src/registry/phone-auth-screen.test.tsx @@ -17,7 +17,7 @@ import { describe, it, expect, vi, afterEach } from "vitest"; import { render, screen, cleanup } from "@testing-library/react"; import { PhoneAuthScreen } from "@/registry/phone-auth-screen"; import { CreateFirebaseUIProvider, createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { MultiFactorResolver } from "firebase/auth"; vi.mock("@/registry/phone-auth-form", () => ({ diff --git a/packages/shadcn/src/registry/phone-auth-screen.tsx b/packages/shadcn/src/registry/phone-auth-screen.tsx index 23cdd3235..28c17fc11 100644 --- a/packages/shadcn/src/registry/phone-auth-screen.tsx +++ b/packages/shadcn/src/registry/phone-auth-screen.tsx @@ -1,8 +1,8 @@ "use client"; import type { PropsWithChildren } from "react"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI } from "@firebase-oss/ui-react"; import { Card, CardContent, CardHeader, CardDescription, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { PhoneAuthForm, type PhoneAuthFormProps } from "@/registry/phone-auth-form"; diff --git a/packages/shadcn/src/registry/policies.test.tsx b/packages/shadcn/src/registry/policies.test.tsx index 805360723..c7358f35e 100644 --- a/packages/shadcn/src/registry/policies.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; -vi.mock("@firebase-ui/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/registry/policies.tsx b/packages/shadcn/src/registry/policies.tsx index 970cf37ff..3c352ea90 100644 --- a/packages/shadcn/src/registry/policies.tsx +++ b/packages/shadcn/src/registry/policies.tsx @@ -1,6 +1,6 @@ import { cn } from "@/lib/utils"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, PolicyContext } from "@firebase-ui/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/registry/redirect-error.tsx b/packages/shadcn/src/registry/redirect-error.tsx index db0fa5272..6beaeed37 100644 --- a/packages/shadcn/src/registry/redirect-error.tsx +++ b/packages/shadcn/src/registry/redirect-error.tsx @@ -1,6 +1,6 @@ "use client"; -import { useRedirectError } from "@firebase-ui/react"; +import { useRedirectError } from "@firebase-oss/ui-react"; export function RedirectError() { const error = useRedirectError(); diff --git a/packages/shadcn/src/registry/sign-in-auth-form.test.tsx b/packages/shadcn/src/registry/sign-in-auth-form.test.tsx index 634c21116..1536e5a11 100644 --- a/packages/shadcn/src/registry/sign-in-auth-form.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/react"; +import { useSignInAuthFormAction } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { UserCredential } from "firebase/auth"; -vi.mock("@firebase-ui/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("@firebase-ui/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/registry/sign-in-auth-form.tsx b/packages/shadcn/src/registry/sign-in-auth-form.tsx index 6950c8f1a..a2bea703a 100644 --- a/packages/shadcn/src/registry/sign-in-auth-form.tsx +++ b/packages/shadcn/src/registry/sign-in-auth-form.tsx @@ -1,10 +1,10 @@ "use client"; -import type { SignInAuthFormSchema } from "@firebase-ui/core"; -import { useSignInAuthFormAction, useSignInAuthFormSchema, useUI, type SignInAuthFormProps } from "@firebase-ui/react"; +import type { SignInAuthFormSchema } from "@firebase-oss/ui-core"; +import { useSignInAuthFormAction, useSignInAuthFormSchema, useUI, type SignInAuthFormProps } from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/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/registry/sign-in-auth-screen.test.tsx b/packages/shadcn/src/registry/sign-in-auth-screen.test.tsx index 2bfd6a688..82f53f09c 100644 --- a/packages/shadcn/src/registry/sign-in-auth-screen.test.tsx +++ b/packages/shadcn/src/registry/sign-in-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 { SignInAuthScreen } from "./sign-in-auth-screen"; import { createMockUI, createFirebaseUIProvider } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +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/registry/sign-in-auth-screen.tsx b/packages/shadcn/src/registry/sign-in-auth-screen.tsx index aed39534e..3eba44c34 100644 --- a/packages/shadcn/src/registry/sign-in-auth-screen.tsx +++ b/packages/shadcn/src/registry/sign-in-auth-screen.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type SignInAuthScreenProps } from "@firebase-ui/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/packages/shadcn/src/registry/sign-up-auth-form.test.tsx b/packages/shadcn/src/registry/sign-up-auth-form.test.tsx index 48de25791..ef6c20113 100644 --- a/packages/shadcn/src/registry/sign-up-auth-form.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/react"; +import { useSignUpAuthFormAction, useRequireDisplayName } from "@firebase-oss/ui-react"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; import { UserCredential } from "firebase/auth"; -vi.mock("@firebase-ui/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("@firebase-ui/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/registry/sign-up-auth-form.tsx b/packages/shadcn/src/registry/sign-up-auth-form.tsx index dc8ea78c1..1916d3439 100644 --- a/packages/shadcn/src/registry/sign-up-auth-form.tsx +++ b/packages/shadcn/src/registry/sign-up-auth-form.tsx @@ -1,16 +1,16 @@ "use client"; -import type { SignUpAuthFormSchema } from "@firebase-ui/core"; +import type { SignUpAuthFormSchema } from "@firebase-oss/ui-core"; import { useSignUpAuthFormAction, useSignUpAuthFormSchema, useUI, type SignUpAuthFormProps, useRequireDisplayName, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; import { useForm } from "react-hook-form"; import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/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/registry/sign-up-auth-screen.test.tsx b/packages/shadcn/src/registry/sign-up-auth-screen.test.tsx index 6f7b6a3b8..ddd79a89a 100644 --- a/packages/shadcn/src/registry/sign-up-auth-screen.test.tsx +++ b/packages/shadcn/src/registry/sign-up-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 { SignUpAuthScreen } from "./sign-up-auth-screen"; import { createMockUI } from "../../tests/utils"; -import { registerLocale } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { registerLocale } from "@firebase-oss/ui-translations"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./sign-up-auth-form", () => ({ SignUpAuthForm: ({ onSignUp, onBackToSignInClick }: any) => ( diff --git a/packages/shadcn/src/registry/sign-up-auth-screen.tsx b/packages/shadcn/src/registry/sign-up-auth-screen.tsx index 6cd47be9d..bd8769a6d 100644 --- a/packages/shadcn/src/registry/sign-up-auth-screen.tsx +++ b/packages/shadcn/src/registry/sign-up-auth-screen.tsx @@ -1,7 +1,7 @@ "use client"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type SignUpAuthScreenProps } from "@firebase-ui/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/packages/shadcn/src/registry/sms-multi-factor-assertion-form.test.tsx b/packages/shadcn/src/registry/sms-multi-factor-assertion-form.test.tsx index f5f0cd417..c4d9a9e44 100644 --- a/packages/shadcn/src/registry/sms-multi-factor-assertion-form.test.tsx +++ b/packages/shadcn/src/registry/sms-multi-factor-assertion-form.test.tsx @@ -2,13 +2,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 "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { PhoneMultiFactorGenerator } from "firebase/auth"; -import { verifyPhoneNumber, signInWithMultiFactorAssertion } from "@firebase-ui/core"; +import { verifyPhoneNumber, signInWithMultiFactorAssertion } from "@firebase-oss/ui-core"; import { useSmsMultiFactorAssertionPhoneFormAction, useSmsMultiFactorAssertionVerifyFormAction, -} from "@firebase-ui/react"; +} from "@firebase-oss/ui-react"; import React from "react"; // Mock input-otp components to prevent window access issues @@ -25,8 +25,8 @@ vi.mock("@/components/ui/input-otp", () => ({ }), })); -vi.mock("@firebase-ui/core", async (importOriginal) => { - const mod = await importOriginal(); +vi.mock("@firebase-oss/ui-core", async (importOriginal) => { + const mod = await importOriginal(); return { ...mod, verifyPhoneNumber: vi.fn(), @@ -34,8 +34,8 @@ vi.mock("@firebase-ui/core", async (importOriginal) => { }; }); -vi.mock("@firebase-ui/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/registry/sms-multi-factor-assertion-form.tsx b/packages/shadcn/src/registry/sms-multi-factor-assertion-form.tsx index 35ee4e52b..b2d420bd7 100644 --- a/packages/shadcn/src/registry/sms-multi-factor-assertion-form.tsx +++ b/packages/shadcn/src/registry/sms-multi-factor-assertion-form.tsx @@ -3,14 +3,14 @@ import { useRef, useState } from "react"; import { type MultiFactorInfo } from "firebase/auth"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { useMultiFactorPhoneAuthVerifyFormSchema, useRecaptchaVerifier, useUI, useSmsMultiFactorAssertionPhoneFormAction, useSmsMultiFactorAssertionVerifyFormAction, -} from "@firebase-ui/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/registry/sms-multi-factor-enrollment-form.test.tsx b/packages/shadcn/src/registry/sms-multi-factor-enrollment-form.test.tsx index fc3b43828..28005c80a 100644 --- a/packages/shadcn/src/registry/sms-multi-factor-enrollment-form.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; -import { verifyPhoneNumber, enrollWithMultiFactorAssertion } from "@firebase-ui/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("@firebase-ui/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("@firebase-ui/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/registry/sms-multi-factor-enrollment-form.tsx b/packages/shadcn/src/registry/sms-multi-factor-enrollment-form.tsx index 0eec29e4d..47afdd773 100644 --- a/packages/shadcn/src/registry/sms-multi-factor-enrollment-form.tsx +++ b/packages/shadcn/src/registry/sms-multi-factor-enrollment-form.tsx @@ -8,14 +8,14 @@ import { formatPhoneNumber, getTranslation, verifyPhoneNumber, -} from "@firebase-ui/core"; +} from "@firebase-oss/ui-core"; import { CountrySelector, type CountrySelectorRef } from "@/registry/country-selector"; import { useMultiFactorPhoneAuthNumberFormSchema, useMultiFactorPhoneAuthVerifyFormSchema, useRecaptchaVerifier, useUI, -} from "@firebase-ui/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/registry/totp-multi-factor-assertion-form.test.tsx b/packages/shadcn/src/registry/totp-multi-factor-assertion-form.test.tsx index 71acc8afd..adba84f62 100644 --- a/packages/shadcn/src/registry/totp-multi-factor-assertion-form.test.tsx +++ b/packages/shadcn/src/registry/totp-multi-factor-assertion-form.test.tsx @@ -2,9 +2,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 "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { TotpMultiFactorGenerator } from "firebase/auth"; -import { useTotpMultiFactorAssertionFormAction } from "@firebase-ui/react"; +import { useTotpMultiFactorAssertionFormAction } from "@firebase-oss/ui-react"; import React from "react"; // Mock input-otp components to prevent window access issues @@ -21,8 +21,8 @@ vi.mock("@/components/ui/input-otp", () => ({ }), })); -vi.mock("@firebase-ui/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/registry/totp-multi-factor-assertion-form.tsx b/packages/shadcn/src/registry/totp-multi-factor-assertion-form.tsx index 7410c1b2f..e8d35548b 100644 --- a/packages/shadcn/src/registry/totp-multi-factor-assertion-form.tsx +++ b/packages/shadcn/src/registry/totp-multi-factor-assertion-form.tsx @@ -1,12 +1,12 @@ "use client"; import { type MultiFactorInfo } from "firebase/auth"; -import { FirebaseUIError, getTranslation } from "@firebase-ui/core"; +import { FirebaseUIError, getTranslation } from "@firebase-oss/ui-core"; import { useMultiFactorTotpAuthVerifyFormSchema, useUI, useTotpMultiFactorAssertionFormAction, -} from "@firebase-ui/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/registry/totp-multi-factor-enrollment-form.test.tsx b/packages/shadcn/src/registry/totp-multi-factor-enrollment-form.test.tsx index eb210d519..bbc8350e7 100644 --- a/packages/shadcn/src/registry/totp-multi-factor-enrollment-form.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; -import { generateTotpSecret, generateTotpQrCode, enrollWithMultiFactorAssertion } from "@firebase-ui/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("@firebase-ui/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/registry/totp-multi-factor-enrollment-form.tsx b/packages/shadcn/src/registry/totp-multi-factor-enrollment-form.tsx index b37571d23..d56a2697c 100644 --- a/packages/shadcn/src/registry/totp-multi-factor-enrollment-form.tsx +++ b/packages/shadcn/src/registry/totp-multi-factor-enrollment-form.tsx @@ -8,12 +8,12 @@ import { generateTotpQrCode, generateTotpSecret, getTranslation, -} from "@firebase-ui/core"; +} from "@firebase-oss/ui-core"; import { useMultiFactorTotpAuthNumberFormSchema, useMultiFactorTotpAuthVerifyFormSchema, useUI, -} from "@firebase-ui/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/registry/twitter-sign-in-button.test.tsx b/packages/shadcn/src/registry/twitter-sign-in-button.test.tsx index ad175ea5a..05267bb53 100644 --- a/packages/shadcn/src/registry/twitter-sign-in-button.test.tsx +++ b/packages/shadcn/src/registry/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 "@firebase-ui/translations"; +import { registerLocale } from "@firebase-oss/ui-translations"; import { TwitterAuthProvider } from "firebase/auth"; -import { FirebaseUIProvider } from "@firebase-ui/react"; +import { FirebaseUIProvider } from "@firebase-oss/ui-react"; vi.mock("./oauth-button", () => ({ OAuthButton: ({ provider, children, themed }: any) => ( @@ -32,8 +32,8 @@ vi.mock("./oauth-button", () => ({ ), })); -vi.mock("@firebase-ui/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/registry/twitter-sign-in-button.tsx b/packages/shadcn/src/registry/twitter-sign-in-button.tsx index 8f42bbb4a..de981cbc5 100644 --- a/packages/shadcn/src/registry/twitter-sign-in-button.tsx +++ b/packages/shadcn/src/registry/twitter-sign-in-button.tsx @@ -1,8 +1,8 @@ "use client"; import { TwitterAuthProvider } from "firebase/auth"; -import { getTranslation } from "@firebase-ui/core"; -import { useUI, type TwitterSignInButtonProps, TwitterLogo } from "@firebase-ui/react"; +import { getTranslation } from "@firebase-oss/ui-core"; +import { useUI, type TwitterSignInButtonProps, TwitterLogo } from "@firebase-oss/ui-react"; import { OAuthButton } from "@/registry/oauth-button"; diff --git a/packages/shadcn/tests/utils.tsx b/packages/shadcn/tests/utils.tsx index ced93dc2f..f38cc83ff 100644 --- a/packages/shadcn/tests/utils.tsx +++ b/packages/shadcn/tests/utils.tsx @@ -1,9 +1,9 @@ import type { FirebaseApp } from "firebase/app"; import type { Auth } from "firebase/auth"; -import { enUs } from "@firebase-ui/translations"; -import { FirebaseUIProvider } from "@firebase-ui/react"; -import { Behavior, FirebaseUIOptions, initializeUI } from "@firebase-ui/core"; -import { FirebaseUIStore } from "@firebase-ui/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 2a150020f..b24344581 100644 --- a/packages/shadcn/tsconfig.json +++ b/packages/shadcn/tsconfig.json @@ -8,8 +8,8 @@ "paths": { "@/*": ["./src/*"], "@/tests/*": ["./tests/*"], - "@firebase-ui/core": ["../core/src/index.ts"], - "@firebase-ui/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 20a7334b6..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: "@firebase-ui/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 4855e83a5..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 `@firebase-ui/styles` package. +This document provides context for the `@firebase-oss/ui-styles` package. ## Overview -The `@firebase-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. +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 "@firebase-ui/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 "@firebase-ui/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 "@firebase-ui/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 97908a37a..046be2bb5 100644 --- a/packages/styles/README.md +++ b/packages/styles/README.md @@ -1,4 +1,4 @@ -# @firebase-ui/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 "@firebase-ui/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 "@firebase-ui/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 "@firebase-ui/styles/tailwind"; -@import "@firebase-ui/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 22ce3757a..855e91fed 100644 --- a/packages/styles/package.json +++ b/packages/styles/package.json @@ -1,5 +1,5 @@ { - "name": "@firebase-ui/styles", + "name": "@firebase-oss/ui-styles", "version": "0.0.1", "type": "module", "main": "./dist/index.cjs", diff --git a/packages/styles/vitest.config.ts b/packages/styles/vitest.config.ts index 99fa62f88..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: "@firebase-ui/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 d70a165b1..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 `@firebase-ui/translations` package. +This document provides context for the `@firebase-oss/ui-translations` package. ## Overview -The `@firebase-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. +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 `@firebase-ui/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 `@firebase-ui/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 "@firebase-ui/core"; -import { enUs } from "@firebase-ui/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 "@firebase-ui/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 "@firebase-ui/core"; - import { registerLocale } from "@firebase-ui/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 "@firebase-ui/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 "@firebase-ui/core"; - import { registerLocale, enUs } from "@firebase-ui/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 34e0d9b20..a15b47a20 100644 --- a/packages/translations/package.json +++ b/packages/translations/package.json @@ -1,5 +1,5 @@ { - "name": "@firebase-ui/translations", + "name": "@firebase-oss/ui-translations", "version": "0.0.1", "description": "Translations for Firebase UI", "type": "module", diff --git a/packages/translations/vitest.config.ts b/packages/translations/vitest.config.ts index a2ec77be2..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: "@firebase-ui/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 7b8676744..c533b955e 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) - '@firebase-ui/angular': + '@firebase-oss/ui-angular': specifier: workspace:* version: link:../../packages/angular - '@firebase-ui/core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../../packages/core - '@firebase-ui/styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../../packages/styles - '@firebase-ui/translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../../packages/translations '@tailwindcss/postcss': @@ -279,16 +279,16 @@ importers: examples/nextjs: dependencies: - '@firebase-ui/core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../../packages/core - '@firebase-ui/react': + '@firebase-oss/ui-react': specifier: workspace:* version: link:../../packages/react - '@firebase-ui/styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../../packages/styles - '@firebase-ui/translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../../packages/translations firebase: @@ -334,16 +334,16 @@ importers: examples/react: dependencies: - '@firebase-ui/core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../../packages/core - '@firebase-ui/react': + '@firebase-oss/ui-react': specifier: workspace:* version: link:../../packages/react - '@firebase-ui/styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../../packages/styles - '@firebase-ui/translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../../packages/translations firebase: @@ -398,13 +398,13 @@ importers: examples/shadcn: dependencies: - '@firebase-ui/core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../../packages/core - '@firebase-ui/react': + '@firebase-oss/ui-react': specifier: workspace:* version: link:../../packages/react - '@firebase-ui/styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../../packages/styles '@hookform/resolvers': @@ -591,10 +591,10 @@ importers: packages/angular: dependencies: - '@firebase-ui/core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../core - '@firebase-ui/styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../styles '@tanstack/angular-form': @@ -694,7 +694,7 @@ importers: packages/core: dependencies: - '@firebase-ui/translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../translations libphonenumber-js: @@ -740,10 +740,10 @@ importers: packages/react: dependencies: - '@firebase-ui/core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../core - '@firebase-ui/styles': + '@firebase-oss/ui-styles': specifier: workspace:* version: link:../styles '@nanostores/react': @@ -765,7 +765,7 @@ importers: specifier: 'catalog:' version: 4.1.12 devDependencies: - '@firebase-ui/translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../translations '@testing-library/jest-dom': @@ -822,10 +822,10 @@ importers: packages/shadcn: dependencies: - '@firebase-ui/core': + '@firebase-oss/ui-core': specifier: workspace:* version: link:../core - '@firebase-ui/react': + '@firebase-oss/ui-react': specifier: workspace:* version: link:../react '@hookform/resolvers': @@ -865,7 +865,7 @@ importers: specifier: 'catalog:' version: 4.1.12 devDependencies: - '@firebase-ui/translations': + '@firebase-oss/ui-translations': specifier: workspace:* version: link:../translations '@tailwindcss/vite': From 5c2263567857cc5d3bd3f35b31ff60f76eb0b43a Mon Sep 17 00:00:00 2001 From: Jeff Huleatt <3759507+jhuleatt@users.noreply.github.com> Date: Fri, 31 Oct 2025 10:54:54 -0400 Subject: [PATCH 2/4] update readmes with new package names --- README.md | 29 ++++++----------------------- packages/angular/README.md | 14 +++++++++++++- packages/react/README.md | 2 +- packages/shadcn/README.md | 4 ++-- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index bd230e912..0ce115482 100644 --- a/README.md +++ b/README.md @@ -10,24 +10,15 @@ FirebaseUI requires the `firebase` package to be installed: npm install firebase ``` -**Note**: Since the packages are not yet published to npm, you must manually install them from GitHub releases. Once published, these steps will be simplified. +### Framework-specific Installation -###  Framework-specific Installation - -Packages have been created for both `React` and `Angular`. For now, they're only available as direct downloads from this repository. Add the following to your `package.json` file: +Packages have been created for both `React` and `Angular`.
React -```json -{ - "dependencies": { - "@firebase-oss/ui-react": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-react-0.0.1.tgz", - "@firebase-oss/ui-core": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-core-0.0.1.tgz", - "@firebase-oss/ui-styles": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-styles-0.0.1.tgz", - "@firebase-oss/ui-translations": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-translations-0.0.1.tgz" - } -} +```bash +npm install @firebase-oss/ui-react @firebase-oss/ui-core @firebase-oss/ui-styles @firebase-oss/ui-translations ```
@@ -37,16 +28,8 @@ Packages have been created for both `React` and `Angular`. For now, they're only FirebaseUI for Angular depends on the [AngularFire](https://github.com/angular/angularfire) package: -```json -{ - "dependencies": { - "@angular/fire": "^19.1.0", - "@firebase-oss/ui-angular": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-angular-0.0.1.tgz", - "@firebase-oss/ui-core": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-core-0.0.1.tgz", - "@firebase-oss/ui-styles": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-styles-0.0.1.tgz", - "@firebase-oss/ui-translations": "https://github.com/firebase/firebaseui-web/raw/refs/heads/v7-alpha/releases/firebase-ui-translations-0.0.1.tgz" - } -} +```bash +npm install @angular/fire @firebase-oss/ui-angular @firebase-oss/ui-core @firebase-oss/ui-styles @firebase-oss/ui-translations ``` 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/react/README.md b/packages/react/README.md index 3e789a4fe..017053015 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -20,7 +20,7 @@ If using Tailwind CSS, you can import the styles directly into your project. ```css @import "tailwindcss"; -@import "@firebase-oss/ui-styles/src/base.css"; +@import "@firebase-oss/ui-styles/tailwind"; ``` Alternatively, you can import the fully compiled CSS file into your project. diff --git a/packages/shadcn/README.md b/packages/shadcn/README.md index 71828c686..b67864835 100644 --- a/packages/shadcn/README.md +++ b/packages/shadcn/README.md @@ -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 '@firebase-oss/ui-core'; +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 ( From 49ca92382fa5e39443aa07bbb956bdb8a8e6f737 Mon Sep 17 00:00:00 2001 From: Jeff Huleatt <3759507+jhuleatt@users.noreply.github.com> Date: Fri, 31 Oct 2025 11:06:20 -0400 Subject: [PATCH 3/4] prettier --- examples/shadcn/src/components/sign-in-auth-form.tsx | 7 ++++++- .../angular/src/lib/auth/forms/phone-auth-form.spec.ts | 7 ++++++- .../src/auth/forms/mfa/sms-multi-factor-assertion-form.tsx | 7 ++++++- packages/shadcn/src/registry/sign-in-auth-form.tsx | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/examples/shadcn/src/components/sign-in-auth-form.tsx b/examples/shadcn/src/components/sign-in-auth-form.tsx index 8df4ca109..31adb3bd0 100644 --- a/examples/shadcn/src/components/sign-in-auth-form.tsx +++ b/examples/shadcn/src/components/sign-in-auth-form.tsx @@ -1,7 +1,12 @@ "use client"; import type { SignInAuthFormSchema } from "@firebase-oss/ui-core"; -import { useSignInAuthFormAction, useSignInAuthFormSchema, useUI, type SignInAuthFormProps } from "@firebase-oss/ui-react"; +import { + useSignInAuthFormAction, + useSignInAuthFormSchema, + useUI, + type SignInAuthFormProps, +} 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"; 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 2f8679438..2671de6af 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 @@ -49,7 +49,12 @@ describe("", () => { let mockFirebaseUIError: any; beforeEach(() => { - const { verifyPhoneNumber, confirmPhoneNumber, formatPhoneNumber, FirebaseUIError } = require("@firebase-oss/ui-core"); + const { + verifyPhoneNumber, + confirmPhoneNumber, + formatPhoneNumber, + FirebaseUIError, + } = require("@firebase-oss/ui-core"); const { injectRecaptchaVerifier } = require("../../tests/test-helpers"); mockVerifyPhoneNumber = verifyPhoneNumber; mockConfirmPhoneNumber = confirmPhoneNumber; 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 53501a6ef..283a7095c 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 @@ -6,7 +6,12 @@ import { type RecaptchaVerifier, } from "firebase/auth"; -import { signInWithMultiFactorAssertion, FirebaseUIError, getTranslation, verifyPhoneNumber } from "@firebase-oss/ui-core"; +import { + signInWithMultiFactorAssertion, + FirebaseUIError, + getTranslation, + verifyPhoneNumber, +} from "@firebase-oss/ui-core"; import { form } from "~/components/form"; import { useMultiFactorPhoneAuthNumberFormSchema, diff --git a/packages/shadcn/src/registry/sign-in-auth-form.tsx b/packages/shadcn/src/registry/sign-in-auth-form.tsx index a2bea703a..61d0d4c9f 100644 --- a/packages/shadcn/src/registry/sign-in-auth-form.tsx +++ b/packages/shadcn/src/registry/sign-in-auth-form.tsx @@ -1,7 +1,12 @@ "use client"; import type { SignInAuthFormSchema } from "@firebase-oss/ui-core"; -import { useSignInAuthFormAction, useSignInAuthFormSchema, useUI, type SignInAuthFormProps } from "@firebase-oss/ui-react"; +import { + useSignInAuthFormAction, + useSignInAuthFormSchema, + useUI, + type SignInAuthFormProps, +} 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"; From ecfce260bb5aac5c365e0d70494beb3ff74edb13 Mon Sep 17 00:00:00 2001 From: Jeff Huleatt <3759507+jhuleatt@users.noreply.github.com> Date: Fri, 31 Oct 2025 11:08:31 -0400 Subject: [PATCH 4/4] lint --- packages/core/vite.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/vite.config.ts b/packages/core/vite.config.ts index 6b617e5ac..3189ee4bf 100644 --- a/packages/core/vite.config.ts +++ b/packages/core/vite.config.ts @@ -7,7 +7,10 @@ export default defineConfig({ resolve: { alias: { "@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"), + "@firebase-oss/ui-translations": path.resolve( + path.dirname(fileURLToPath(import.meta.url)), + "../translations/src" + ), "~/tests": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "./tests"), "~": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "./src"), },