From dd2c696498dc02cb14211ec0b05d11c85e77e1aa Mon Sep 17 00:00:00 2001
From: Elliot Hesp
Date: Thu, 13 Nov 2025 11:28:30 +0000
Subject: [PATCH 1/5] chore: Add license headers
---
eslint.config.ts | 16 ++++++++++++++++
packages/angular/jest.config.ts | 16 ++++++++++++++++
packages/angular/src/lib/components/form.ts | 16 ++++++++++++++++
.../angular/src/lib/components/logos/index.ts | 16 ++++++++++++++++
packages/angular/src/lib/tests/test-helpers.ts | 16 ++++++++++++++++
packages/core/src/auth.test.ts | 16 ++++++++++++++++
.../src/behaviors/anonymous-upgrade.test.ts | 16 ++++++++++++++++
.../core/src/behaviors/anonymous-upgrade.ts | 16 ++++++++++++++++
.../src/behaviors/auto-anonymous-login.test.ts | 16 ++++++++++++++++
.../core/src/behaviors/auto-anonymous-login.ts | 16 ++++++++++++++++
.../core/src/behaviors/country-codes.test.ts | 16 ++++++++++++++++
packages/core/src/behaviors/country-codes.ts | 16 ++++++++++++++++
packages/core/src/behaviors/index.test.ts | 16 ++++++++++++++++
packages/core/src/behaviors/index.ts | 16 ++++++++++++++++
packages/core/src/behaviors/one-tap.test.ts | 16 ++++++++++++++++
packages/core/src/behaviors/one-tap.ts | 16 ++++++++++++++++
.../src/behaviors/provider-strategy.test.ts | 16 ++++++++++++++++
.../core/src/behaviors/provider-strategy.ts | 16 ++++++++++++++++
packages/core/src/behaviors/recaptcha.test.ts | 16 ++++++++++++++++
packages/core/src/behaviors/recaptcha.ts | 16 ++++++++++++++++
.../src/behaviors/require-display-name.test.ts | 16 ++++++++++++++++
.../core/src/behaviors/require-display-name.ts | 16 ++++++++++++++++
packages/core/src/behaviors/utils.test.ts | 16 ++++++++++++++++
packages/core/src/behaviors/utils.ts | 16 ++++++++++++++++
packages/core/src/config.test.ts | 16 ++++++++++++++++
packages/core/src/country-data.test.ts | 16 ++++++++++++++++
packages/core/src/errors.test.ts | 16 ++++++++++++++++
packages/core/src/register-framework.test.ts | 16 ++++++++++++++++
packages/core/src/register-framework.ts | 16 ++++++++++++++++
packages/core/src/schemas.test.ts | 16 ++++++++++++++++
packages/core/src/translations.test.ts | 16 ++++++++++++++++
packages/core/tests/utils.ts | 16 ++++++++++++++++
packages/core/vite.config.ts | 16 ++++++++++++++++
.../mfa/sms-multi-factor-assertion-form.tsx | 16 ++++++++++++++++
.../mfa/sms-multi-factor-enrollment-form.tsx | 16 ++++++++++++++++
.../totp-multi-factor-assertion-form.test.tsx | 16 ++++++++++++++++
.../mfa/totp-multi-factor-assertion-form.tsx | 16 ++++++++++++++++
.../mfa/totp-multi-factor-enrollment-form.tsx | 16 ++++++++++++++++
.../forms/multi-factor-auth-assertion-form.tsx | 16 ++++++++++++++++
.../multi-factor-auth-enrollment-form.tsx | 16 ++++++++++++++++
.../multi-factor-auth-assertion-screen.tsx | 16 ++++++++++++++++
.../multi-factor-auth-enrollment-screen.tsx | 16 ++++++++++++++++
packages/react/src/components/form.test.tsx | 16 ++++++++++++++++
packages/react/src/components/form.tsx | 16 ++++++++++++++++
.../react/src/components/logos/apple/Logo.tsx | 16 ++++++++++++++++
.../src/components/logos/facebook/Logo.tsx | 16 ++++++++++++++++
.../react/src/components/logos/github/Logo.tsx | 16 ++++++++++++++++
.../react/src/components/logos/google/Logo.tsx | 16 ++++++++++++++++
.../react/src/components/logos/line/Logo.tsx | 16 ++++++++++++++++
.../src/components/logos/microsoft/Logo.tsx | 16 ++++++++++++++++
.../src/components/logos/snapchat/Logo.tsx | 16 ++++++++++++++++
.../src/components/logos/twitter/Logo.tsx | 16 ++++++++++++++++
.../react/src/components/redirect-error.tsx | 16 ++++++++++++++++
packages/react/tests/utils.tsx | 16 ++++++++++++++++
packages/shadcn/build.ts | 16 ++++++++++++++++
packages/shadcn/registry-spec.test.ts | 16 ++++++++++++++++
.../src/components/apple-sign-in-button.tsx | 16 ++++++++++++++++
.../shadcn/src/components/country-selector.tsx | 16 ++++++++++++++++
.../src/components/email-link-auth-form.tsx | 16 ++++++++++++++++
.../src/components/email-link-auth-screen.tsx | 16 ++++++++++++++++
.../src/components/facebook-sign-in-button.tsx | 16 ++++++++++++++++
.../components/forgot-password-auth-form.tsx | 16 ++++++++++++++++
.../components/forgot-password-auth-screen.tsx | 16 ++++++++++++++++
.../src/components/github-sign-in-button.tsx | 16 ++++++++++++++++
.../src/components/google-sign-in-button.tsx | 16 ++++++++++++++++
.../components/microsoft-sign-in-button.tsx | 16 ++++++++++++++++
.../multi-factor-auth-assertion-form.test.tsx | 16 ++++++++++++++++
.../multi-factor-auth-assertion-form.tsx | 16 ++++++++++++++++
.../multi-factor-auth-assertion-screen.tsx | 16 ++++++++++++++++
.../multi-factor-auth-enrollment-form.tsx | 16 ++++++++++++++++
.../multi-factor-auth-enrollment-screen.tsx | 16 ++++++++++++++++
.../shadcn/src/components/oauth-button.tsx | 16 ++++++++++++++++
.../shadcn/src/components/oauth-screen.tsx | 16 ++++++++++++++++
.../shadcn/src/components/phone-auth-form.tsx | 16 ++++++++++++++++
.../src/components/phone-auth-screen.tsx | 16 ++++++++++++++++
packages/shadcn/src/components/policies.tsx | 16 ++++++++++++++++
.../shadcn/src/components/redirect-error.tsx | 16 ++++++++++++++++
.../src/components/sign-in-auth-form.tsx | 16 ++++++++++++++++
.../src/components/sign-in-auth-screen.tsx | 16 ++++++++++++++++
.../src/components/sign-up-auth-form.tsx | 16 ++++++++++++++++
.../src/components/sign-up-auth-screen.tsx | 16 ++++++++++++++++
.../sms-multi-factor-assertion-form.test.tsx | 18 ++++++++++++++++--
.../sms-multi-factor-assertion-form.tsx | 16 ++++++++++++++++
.../sms-multi-factor-enrollment-form.tsx | 16 ++++++++++++++++
.../totp-multi-factor-assertion-form.test.tsx | 16 ++++++++++++++++
.../totp-multi-factor-assertion-form.tsx | 16 ++++++++++++++++
.../totp-multi-factor-enrollment-form.tsx | 16 ++++++++++++++++
.../src/components/twitter-sign-in-button.tsx | 16 ++++++++++++++++
packages/shadcn/src/lib/utils.ts | 16 ++++++++++++++++
packages/shadcn/tests/utils.tsx | 16 ++++++++++++++++
packages/shadcn/vite.config.ts | 16 ++++++++++++++++
packages/styles/src/index.ts | 16 ++++++++++++++++
92 files changed, 1472 insertions(+), 2 deletions(-)
diff --git a/eslint.config.ts b/eslint.config.ts
index cdbc5aa62..844817204 100644
--- a/eslint.config.ts
+++ b/eslint.config.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
/* eslint-disable @typescript-eslint/no-explicit-any */
import js from "@eslint/js";
diff --git a/packages/angular/jest.config.ts b/packages/angular/jest.config.ts
index 5b1d8abf3..d6d1aff08 100644
--- a/packages/angular/jest.config.ts
+++ b/packages/angular/jest.config.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import type { Config } from "jest";
import { createCjsPreset } from "jest-preset-angular/presets/index.js";
diff --git a/packages/angular/src/lib/components/form.ts b/packages/angular/src/lib/components/form.ts
index 034cb860c..db5e1c2b7 100644
--- a/packages/angular/src/lib/components/form.ts
+++ b/packages/angular/src/lib/components/form.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { Component, computed, input } from "@angular/core";
import { AnyFieldApi, AnyFormState, injectField } from "@tanstack/angular-form";
import { ButtonComponent } from "./button";
diff --git a/packages/angular/src/lib/components/logos/index.ts b/packages/angular/src/lib/components/logos/index.ts
index 677873a2b..9385b0a33 100644
--- a/packages/angular/src/lib/components/logos/index.ts
+++ b/packages/angular/src/lib/components/logos/index.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
export { AppleLogoComponent } from "./apple";
export { FacebookLogoComponent } from "./facebook";
export { GithubLogoComponent } from "./github";
diff --git a/packages/angular/src/lib/tests/test-helpers.ts b/packages/angular/src/lib/tests/test-helpers.ts
index f606320d8..8b8dd83cb 100644
--- a/packages/angular/src/lib/tests/test-helpers.ts
+++ b/packages/angular/src/lib/tests/test-helpers.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
// Mock implementations for @invertase/firebaseui-core to avoid ESM issues in tests
export const sendPasswordResetEmail = jest.fn();
export const sendSignInLinkToEmail = jest.fn();
diff --git a/packages/core/src/auth.test.ts b/packages/core/src/auth.test.ts
index 07908689a..692757355 100644
--- a/packages/core/src/auth.test.ts
+++ b/packages/core/src/auth.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import {
signInWithEmailAndPassword,
diff --git a/packages/core/src/behaviors/anonymous-upgrade.test.ts b/packages/core/src/behaviors/anonymous-upgrade.test.ts
index a8e6fdaee..e551a25ad 100644
--- a/packages/core/src/behaviors/anonymous-upgrade.test.ts
+++ b/packages/core/src/behaviors/anonymous-upgrade.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach } from "vitest";
import {
Auth,
diff --git a/packages/core/src/behaviors/anonymous-upgrade.ts b/packages/core/src/behaviors/anonymous-upgrade.ts
index ce534de17..1f93fc311 100644
--- a/packages/core/src/behaviors/anonymous-upgrade.ts
+++ b/packages/core/src/behaviors/anonymous-upgrade.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { type AuthCredential, type AuthProvider, linkWithCredential, type UserCredential } from "firebase/auth";
import { type FirebaseUI } from "~/config";
import { getBehavior } from "~/behaviors";
diff --git a/packages/core/src/behaviors/auto-anonymous-login.test.ts b/packages/core/src/behaviors/auto-anonymous-login.test.ts
index 9dd033a96..c2648a284 100644
--- a/packages/core/src/behaviors/auto-anonymous-login.test.ts
+++ b/packages/core/src/behaviors/auto-anonymous-login.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach } from "vitest";
import { Auth, signInAnonymously, User } from "firebase/auth";
import { autoAnonymousLoginHandler } from "./auto-anonymous-login";
diff --git a/packages/core/src/behaviors/auto-anonymous-login.ts b/packages/core/src/behaviors/auto-anonymous-login.ts
index 8d625f383..f2bf23cff 100644
--- a/packages/core/src/behaviors/auto-anonymous-login.ts
+++ b/packages/core/src/behaviors/auto-anonymous-login.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { signInAnonymously } from "firebase/auth";
import { type InitHandler } from "./utils";
diff --git a/packages/core/src/behaviors/country-codes.test.ts b/packages/core/src/behaviors/country-codes.test.ts
index b348b0556..b3c5cce8a 100644
--- a/packages/core/src/behaviors/country-codes.test.ts
+++ b/packages/core/src/behaviors/country-codes.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi } from "vitest";
import { countryCodesHandler, CountryCodesOptions } from "./country-codes";
import { countryData } from "../country-data";
diff --git a/packages/core/src/behaviors/country-codes.ts b/packages/core/src/behaviors/country-codes.ts
index 4c3e503aa..a4965f621 100644
--- a/packages/core/src/behaviors/country-codes.ts
+++ b/packages/core/src/behaviors/country-codes.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { type CountryCode, countryData } from "../country-data";
export type CountryCodesOptions = {
diff --git a/packages/core/src/behaviors/index.test.ts b/packages/core/src/behaviors/index.test.ts
index 305b289d1..0994558eb 100644
--- a/packages/core/src/behaviors/index.test.ts
+++ b/packages/core/src/behaviors/index.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach } from "vitest";
import { createMockUI } from "~/tests/utils";
import {
diff --git a/packages/core/src/behaviors/index.ts b/packages/core/src/behaviors/index.ts
index 417fa0564..99739cbde 100644
--- a/packages/core/src/behaviors/index.ts
+++ b/packages/core/src/behaviors/index.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import type { FirebaseUI } from "~/config";
import type { RecaptchaVerifier, UserCredential } from "firebase/auth";
import * as anonymousUpgradeHandlers from "./anonymous-upgrade";
diff --git a/packages/core/src/behaviors/one-tap.test.ts b/packages/core/src/behaviors/one-tap.test.ts
index 43a6c7de6..6017b28b7 100644
--- a/packages/core/src/behaviors/one-tap.test.ts
+++ b/packages/core/src/behaviors/one-tap.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { Auth, User } from "firebase/auth";
import { oneTapSignInHandler, type OneTapSignInOptions } from "./one-tap";
diff --git a/packages/core/src/behaviors/one-tap.ts b/packages/core/src/behaviors/one-tap.ts
index 5154a4f79..93d608f38 100644
--- a/packages/core/src/behaviors/one-tap.ts
+++ b/packages/core/src/behaviors/one-tap.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { GoogleAuthProvider } from "firebase/auth";
import type { IdConfiguration } from "google-one-tap";
import type { FirebaseUI } from "~/config";
diff --git a/packages/core/src/behaviors/provider-strategy.test.ts b/packages/core/src/behaviors/provider-strategy.test.ts
index 9eda32cb1..08a158687 100644
--- a/packages/core/src/behaviors/provider-strategy.test.ts
+++ b/packages/core/src/behaviors/provider-strategy.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach } from "vitest";
import {
Auth,
diff --git a/packages/core/src/behaviors/provider-strategy.ts b/packages/core/src/behaviors/provider-strategy.ts
index 32c395ac6..a0f02ab9c 100644
--- a/packages/core/src/behaviors/provider-strategy.ts
+++ b/packages/core/src/behaviors/provider-strategy.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import {
type AuthProvider,
linkWithPopup,
diff --git a/packages/core/src/behaviors/recaptcha.test.ts b/packages/core/src/behaviors/recaptcha.test.ts
index 08fce46f2..543e176bc 100644
--- a/packages/core/src/behaviors/recaptcha.test.ts
+++ b/packages/core/src/behaviors/recaptcha.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach } from "vitest";
import { RecaptchaVerifier } from "firebase/auth";
import { recaptchaVerificationHandler, type RecaptchaVerificationOptions } from "./recaptcha";
diff --git a/packages/core/src/behaviors/recaptcha.ts b/packages/core/src/behaviors/recaptcha.ts
index 707070ee2..206b0087e 100644
--- a/packages/core/src/behaviors/recaptcha.ts
+++ b/packages/core/src/behaviors/recaptcha.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { RecaptchaVerifier } from "firebase/auth";
import { type FirebaseUI } from "~/config";
diff --git a/packages/core/src/behaviors/require-display-name.test.ts b/packages/core/src/behaviors/require-display-name.test.ts
index e9134de0f..8e0b207b7 100644
--- a/packages/core/src/behaviors/require-display-name.test.ts
+++ b/packages/core/src/behaviors/require-display-name.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach } from "vitest";
import { User } from "firebase/auth";
import { requireDisplayNameHandler } from "./require-display-name";
diff --git a/packages/core/src/behaviors/require-display-name.ts b/packages/core/src/behaviors/require-display-name.ts
index 1402d1a48..d40ad177d 100644
--- a/packages/core/src/behaviors/require-display-name.ts
+++ b/packages/core/src/behaviors/require-display-name.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { updateProfile, type User } from "firebase/auth";
import { type FirebaseUI } from "~/config";
diff --git a/packages/core/src/behaviors/utils.test.ts b/packages/core/src/behaviors/utils.test.ts
index abfc34c0a..f37afc51f 100644
--- a/packages/core/src/behaviors/utils.test.ts
+++ b/packages/core/src/behaviors/utils.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach } from "vitest";
import {
callableBehavior,
diff --git a/packages/core/src/behaviors/utils.ts b/packages/core/src/behaviors/utils.ts
index 7d332e7a7..6f30e39c6 100644
--- a/packages/core/src/behaviors/utils.ts
+++ b/packages/core/src/behaviors/utils.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import type { UserCredential } from "firebase/auth";
import type { FirebaseUI } from "~/config";
diff --git a/packages/core/src/config.test.ts b/packages/core/src/config.test.ts
index 1312c8ca9..84bb48859 100644
--- a/packages/core/src/config.test.ts
+++ b/packages/core/src/config.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { FirebaseApp } from "firebase/app";
import { Auth, MultiFactorResolver } from "firebase/auth";
import { describe, it, expect, vi, beforeEach } from "vitest";
diff --git a/packages/core/src/country-data.test.ts b/packages/core/src/country-data.test.ts
index d13bc7c8f..6a23cb81f 100644
--- a/packages/core/src/country-data.test.ts
+++ b/packages/core/src/country-data.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect } from "vitest";
import { countryData, formatPhoneNumber, CountryData, CountryCode } from "./country-data";
diff --git a/packages/core/src/errors.test.ts b/packages/core/src/errors.test.ts
index a4226ea2b..c59f5b264 100644
--- a/packages/core/src/errors.test.ts
+++ b/packages/core/src/errors.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach } from "vitest";
import { FirebaseError } from "firebase/app";
import { Auth, AuthCredential, MultiFactorResolver } from "firebase/auth";
diff --git a/packages/core/src/register-framework.test.ts b/packages/core/src/register-framework.test.ts
index 30b0f16c8..c9034626c 100644
--- a/packages/core/src/register-framework.test.ts
+++ b/packages/core/src/register-framework.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi, beforeEach } from "vitest";
import { registerFramework } from "./register-framework";
diff --git a/packages/core/src/register-framework.ts b/packages/core/src/register-framework.ts
index 3817ad7c0..dce604e81 100644
--- a/packages/core/src/register-framework.ts
+++ b/packages/core/src/register-framework.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { registerVersion } from "firebase/app";
/**
diff --git a/packages/core/src/schemas.test.ts b/packages/core/src/schemas.test.ts
index 13edc30e3..4f215193d 100644
--- a/packages/core/src/schemas.test.ts
+++ b/packages/core/src/schemas.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, vi } from "vitest";
import { createMockUI } from "~/tests/utils";
import {
diff --git a/packages/core/src/translations.test.ts b/packages/core/src/translations.test.ts
index 3118eb25a..62cd98362 100644
--- a/packages/core/src/translations.test.ts
+++ b/packages/core/src/translations.test.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, expect, it, vi } from "vitest";
// Mock the translations module first
diff --git a/packages/core/tests/utils.ts b/packages/core/tests/utils.ts
index 948540cac..28b573968 100644
--- a/packages/core/tests/utils.ts
+++ b/packages/core/tests/utils.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { vi } from "vitest";
import type { FirebaseApp } from "firebase/app";
diff --git a/packages/core/vite.config.ts b/packages/core/vite.config.ts
index 8220a98e6..aee7ce7f8 100644
--- a/packages/core/vite.config.ts
+++ b/packages/core/vite.config.ts
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { defineConfig } from "vite";
import path from "node:path";
import { fileURLToPath } from "node:url";
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 28a784339..6ad451b2c 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
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { useCallback, useRef, useState } from "react";
import {
PhoneAuthProvider,
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 7a521d0e3..ceb1892e8 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
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { useCallback, useRef, useState } from "react";
import { multiFactor, PhoneAuthProvider, PhoneMultiFactorGenerator, type RecaptchaVerifier } from "firebase/auth";
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 a3eb97af6..de7a5d145 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
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
/**
* @license
* Copyright 2024 Google LLC
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 0a69fb230..29100ee63 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,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { useCallback } from "react";
import { TotpMultiFactorGenerator, type MultiFactorInfo, type UserCredential } from "firebase/auth";
import { signInWithMultiFactorAssertion, FirebaseUIError, getTranslation } from "@invertase/firebaseui-core";
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 ef36fe05e..0a2a2c262 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
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { useCallback, useState } from "react";
import { TotpMultiFactorGenerator, type TotpSecret } from "firebase/auth";
import {
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 a06eb79ed..64e27714c 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
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import {
PhoneMultiFactorGenerator,
TotpMultiFactorGenerator,
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 a3a41ad34..261a9b8d2 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,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { FactorId } from "firebase/auth";
import { getTranslation } from "@invertase/firebaseui-core";
import { type ComponentProps, useState } from "react";
diff --git a/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.tsx b/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.tsx
index 1d6ff4b97..c5e300800 100644
--- a/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.tsx
+++ b/packages/react/src/auth/screens/multi-factor-auth-assertion-screen.tsx
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { getTranslation } from "@invertase/firebaseui-core";
import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card";
import { useUI } from "~/hooks";
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 7c4275925..fdc2b8ad4 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,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { getTranslation } from "@invertase/firebaseui-core";
import { Card, CardContent, CardHeader, CardSubtitle, CardTitle } from "~/components/card";
import { useUI } from "~/hooks";
diff --git a/packages/react/src/components/form.test.tsx b/packages/react/src/components/form.test.tsx
index db1557dff..c609c80ae 100644
--- a/packages/react/src/components/form.test.tsx
+++ b/packages/react/src/components/form.test.tsx
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { describe, it, expect, afterEach, vi, beforeEach } from "vitest";
import { render, screen, cleanup, renderHook, act, waitFor } from "@testing-library/react";
import { form } from "./form";
diff --git a/packages/react/src/components/form.tsx b/packages/react/src/components/form.tsx
index a27e9501f..2de60c677 100644
--- a/packages/react/src/components/form.tsx
+++ b/packages/react/src/components/form.tsx
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import { type ComponentProps, type PropsWithChildren, type ReactNode } from "react";
import { type AnyFieldApi, createFormHook, createFormHookContexts } from "@tanstack/react-form";
import { Button } from "./button";
diff --git a/packages/react/src/components/logos/apple/Logo.tsx b/packages/react/src/components/logos/apple/Logo.tsx
index 844d6c48c..760b9c761 100644
--- a/packages/react/src/components/logos/apple/Logo.tsx
+++ b/packages/react/src/components/logos/apple/Logo.tsx
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
import type { SVGProps } from "react";
const SvgLogo = (props: SVGProps) => (
`,
})
+/**
+ * The subtitle of a card.
+ */
export class CardSubtitleComponent {}
@Component({
@@ -89,4 +101,7 @@ export class CardSubtitleComponent {}
},
template: ` `,
})
+/**
+ * The content section of a card.
+ */
export class CardContentComponent {}
diff --git a/packages/angular/src/lib/components/content.ts b/packages/angular/src/lib/components/content.ts
index ce3ddc4b9..b426dea79 100644
--- a/packages/angular/src/lib/components/content.ts
+++ b/packages/angular/src/lib/components/content.ts
@@ -32,6 +32,9 @@ import { injectTranslation } from "../provider";
`,
})
+/**
+ * A content wrapper component that displays a divider and children content.
+ */
export class ContentComponent {
dividerOrLabel = injectTranslation("messages", "dividerOr");
}
diff --git a/packages/angular/src/lib/components/country-selector.ts b/packages/angular/src/lib/components/country-selector.ts
index 4ac72704c..72c8969c2 100644
--- a/packages/angular/src/lib/components/country-selector.ts
+++ b/packages/angular/src/lib/components/country-selector.ts
@@ -47,9 +47,15 @@ import { injectCountries, injectDefaultCountry } from "../provider";
`,
})
+/**
+ * A country selector component for phone number input.
+ *
+ * Displays a dropdown with country flags, dial codes, and names for selecting a country.
+ */
export class CountrySelectorComponent {
countries = injectCountries();
defaultCountry = injectDefaultCountry();
+ /** The selected country code (two-way binding). */
value = model();
selected = computed(() => {
diff --git a/packages/angular/src/lib/components/divider.ts b/packages/angular/src/lib/components/divider.ts
index 40b3e43db..63c0ba8d3 100644
--- a/packages/angular/src/lib/components/divider.ts
+++ b/packages/angular/src/lib/components/divider.ts
@@ -34,6 +34,10 @@ import { CommonModule } from "@angular/common";
`,
})
+/**
+ * A divider component that can display a line or a line with text in the middle.
+ */
export class DividerComponent {
+ /** Optional label text to display in the center of the divider. */
label = input();
}
diff --git a/packages/angular/src/lib/components/form.ts b/packages/angular/src/lib/components/form.ts
index db5e1c2b7..856a96fa7 100644
--- a/packages/angular/src/lib/components/form.ts
+++ b/packages/angular/src/lib/components/form.ts
@@ -34,7 +34,11 @@ import { ButtonComponent } from "./button";
}
`,
})
+/**
+ * A component that displays form field metadata, such as validation errors.
+ */
export class FormMetadataComponent {
+ /** The form field API instance. */
field = input.required();
errors = computed(() =>
this.field()
@@ -76,10 +80,16 @@ export class FormMetadataComponent {
`,
})
+/**
+ * A form input component with label, description, and validation support.
+ */
export class FormInputComponent {
field = injectField();
+ /** The label text for the input field. */
label = input.required();
+ /** The input type (e.g., "text", "email", "password"). */
type = input("text");
+ /** Optional description text displayed below the label. */
description = input();
}
@@ -92,6 +102,9 @@ export class FormInputComponent {
},
template: ` `,
})
+/**
+ * A button component for form actions (e.g., "Forgot Password?" link).
+ */
export class FormActionComponent {}
@Component({
@@ -108,8 +121,15 @@ export class FormActionComponent {}
`,
})
+/**
+ * A submit button component for forms.
+ *
+ * Automatically disables when the form is submitting.
+ */
export class FormSubmitComponent {
+ /** Optional additional CSS classes. */
class = input();
+ /** The form state for tracking submission status. */
state = input.required();
isSubmitting = computed(() => this.state().isSubmitting);
@@ -129,7 +149,13 @@ export class FormSubmitComponent {
}
`,
})
+/**
+ * A component that displays form-level error messages.
+ *
+ * Shows errors from form submission, not validation errors.
+ */
export class FormErrorMessageComponent {
+ /** The form state containing error information. */
state = input.required();
errorMessage = computed(() => {
diff --git a/packages/angular/src/lib/components/logos/apple.ts b/packages/angular/src/lib/components/logos/apple.ts
index 7e9727b1d..5506447e7 100644
--- a/packages/angular/src/lib/components/logos/apple.ts
+++ b/packages/angular/src/lib/components/logos/apple.ts
@@ -30,8 +30,14 @@ import { Component, input } from "@angular/core";
`,
})
+/**
+ * The Apple logo SVG component.
+ */
export class AppleLogoComponent {
+ /** The width of the logo. */
width = input("1em");
+ /** The height of the logo. */
height = input("1em");
+ /** Optional additional CSS class names. */
className = input("");
}
diff --git a/packages/angular/src/lib/components/logos/facebook.ts b/packages/angular/src/lib/components/logos/facebook.ts
index 7812040d3..c022c5db1 100644
--- a/packages/angular/src/lib/components/logos/facebook.ts
+++ b/packages/angular/src/lib/components/logos/facebook.ts
@@ -30,8 +30,14 @@ import { Component, input } from "@angular/core";
`,
})
+/**
+ * The Facebook logo SVG component.
+ */
export class FacebookLogoComponent {
+ /** The width of the logo. */
width = input("1em");
+ /** The height of the logo. */
height = input("1em");
+ /** Optional additional CSS class names. */
className = input("");
}
diff --git a/packages/angular/src/lib/components/logos/github.ts b/packages/angular/src/lib/components/logos/github.ts
index fce4b33c6..bd417c8fd 100644
--- a/packages/angular/src/lib/components/logos/github.ts
+++ b/packages/angular/src/lib/components/logos/github.ts
@@ -29,8 +29,14 @@ import { Component, input } from "@angular/core";
`,
})
+/**
+ * The GitHub logo SVG component.
+ */
export class GithubLogoComponent {
+ /** The width of the logo. */
width = input("1em");
+ /** The height of the logo. */
height = input("1em");
+ /** Optional additional CSS class names. */
className = input("");
}
diff --git a/packages/angular/src/lib/components/logos/google.ts b/packages/angular/src/lib/components/logos/google.ts
index 8acab00de..805114852 100644
--- a/packages/angular/src/lib/components/logos/google.ts
+++ b/packages/angular/src/lib/components/logos/google.ts
@@ -42,8 +42,14 @@ import { Component, input } from "@angular/core";
`,
})
+/**
+ * The Google logo SVG component.
+ */
export class GoogleLogoComponent {
+ /** The width of the logo. */
width = input("1em");
+ /** The height of the logo. */
height = input("1em");
+ /** Optional additional CSS class names. */
className = input("");
}
diff --git a/packages/angular/src/lib/components/logos/line.ts b/packages/angular/src/lib/components/logos/line.ts
index d3b98fd3f..ce7c69923 100644
--- a/packages/angular/src/lib/components/logos/line.ts
+++ b/packages/angular/src/lib/components/logos/line.ts
@@ -34,8 +34,14 @@ import { Component, input } from "@angular/core";
`,
})
+/**
+ * The Line logo SVG component.
+ */
export class LineLogoComponent {
+ /** The width of the logo. */
width = input("1em");
+ /** The height of the logo. */
height = input("1em");
+ /** Optional additional CSS class names. */
className = input("");
}
diff --git a/packages/angular/src/lib/components/logos/microsoft.ts b/packages/angular/src/lib/components/logos/microsoft.ts
index 88006fafe..c4563b0d8 100644
--- a/packages/angular/src/lib/components/logos/microsoft.ts
+++ b/packages/angular/src/lib/components/logos/microsoft.ts
@@ -30,8 +30,14 @@ import { Component, input } from "@angular/core";
`,
})
+/**
+ * The Microsoft logo SVG component.
+ */
export class MicrosoftLogoComponent {
+ /** The width of the logo. */
width = input("1em");
+ /** The height of the logo. */
height = input("1em");
+ /** Optional additional CSS class names. */
className = input("");
}
diff --git a/packages/angular/src/lib/components/logos/snapchat.ts b/packages/angular/src/lib/components/logos/snapchat.ts
index c11ec3c00..0b129fc39 100644
--- a/packages/angular/src/lib/components/logos/snapchat.ts
+++ b/packages/angular/src/lib/components/logos/snapchat.ts
@@ -30,8 +30,14 @@ import { Component, input } from "@angular/core";
`,
})
+/**
+ * The Snapchat logo SVG component.
+ */
export class SnapchatLogoComponent {
+ /** The width of the logo. */
width = input("1em");
+ /** The height of the logo. */
height = input("1em");
+ /** Optional additional CSS class names. */
className = input("");
}
diff --git a/packages/angular/src/lib/components/logos/twitter.ts b/packages/angular/src/lib/components/logos/twitter.ts
index 3acbbb71d..9630ea8e6 100644
--- a/packages/angular/src/lib/components/logos/twitter.ts
+++ b/packages/angular/src/lib/components/logos/twitter.ts
@@ -29,8 +29,14 @@ import { Component, input } from "@angular/core";
`,
})
+/**
+ * The Twitter/X logo SVG component.
+ */
export class TwitterLogoComponent {
+ /** The width of the logo. */
width = input("1em");
+ /** The height of the logo. */
height = input("1em");
+ /** Optional additional CSS class names. */
className = input("");
}
diff --git a/packages/angular/src/lib/components/policies.ts b/packages/angular/src/lib/components/policies.ts
index b8675b7e1..efe22bc16 100644
--- a/packages/angular/src/lib/components/policies.ts
+++ b/packages/angular/src/lib/components/policies.ts
@@ -48,6 +48,11 @@ type PolicyPart =
}
`,
})
+/**
+ * A component that displays terms of service and privacy policy links.
+ *
+ * Parses the terms and privacy policy template and renders clickable links.
+ */
export class PoliciesComponent {
private readonly policies = injectPolicies();
diff --git a/packages/angular/src/lib/components/redirect-error.ts b/packages/angular/src/lib/components/redirect-error.ts
index 224e5be99..9ef2a9bc7 100644
--- a/packages/angular/src/lib/components/redirect-error.ts
+++ b/packages/angular/src/lib/components/redirect-error.ts
@@ -30,6 +30,11 @@ import { injectRedirectError } from "../provider";
}
`,
})
+/**
+ * A component that displays redirect error messages.
+ *
+ * Shows errors that occurred during OAuth redirect flows.
+ */
export class RedirectErrorComponent {
error = injectRedirectError();
}
diff --git a/packages/angular/src/lib/provider.ts b/packages/angular/src/lib/provider.ts
index 0c1d1b480..41e1f75c9 100644
--- a/packages/angular/src/lib/provider.ts
+++ b/packages/angular/src/lib/provider.ts
@@ -53,11 +53,22 @@ import {
const FIREBASE_UI_STORE = new InjectionToken("firebaseui.store");
const FIREBASE_UI_POLICIES = new InjectionToken("firebaseui.policies");
+/** Configuration for terms of service and privacy policy links. */
type PolicyConfig = {
+ /** The URL to the terms of service page. */
termsOfServiceUrl: string;
+ /** The URL to the privacy policy page. */
privacyPolicyUrl: string;
};
+/**
+ * Provides FirebaseUI configuration for the Angular application.
+ *
+ * This function must be called in your application's providers array to enable FirebaseUI functionality.
+ *
+ * @param uiFactory - Factory function that creates a FirebaseUIStore from Firebase apps.
+ * @returns Environment providers for FirebaseUI.
+ */
export function provideFirebaseUI(uiFactory: (apps: FirebaseApps) => FirebaseUIStore): EnvironmentProviders {
const providers: Provider[] = [
// TODO: This should depend on the FirebaseAuth provider via deps,
@@ -78,12 +89,25 @@ export function provideFirebaseUI(uiFactory: (apps: FirebaseApps) => FirebaseUIS
return makeEnvironmentProviders(providers);
}
+/**
+ * Provides policy configuration (terms of service and privacy policy URLs) for FirebaseUI components.
+ *
+ * @param factory - Factory function that returns the policy configuration.
+ * @returns Environment providers for FirebaseUI policies.
+ */
export function provideFirebaseUIPolicies(factory: () => PolicyConfig) {
const providers: Provider[] = [{ provide: FIREBASE_UI_POLICIES, useFactory: factory }];
return makeEnvironmentProviders(providers);
}
+/**
+ * Injects the FirebaseUI store as a reactive signal.
+ *
+ * Returns a readonly signal that updates when the UI state changes.
+ *
+ * @returns A readonly signal containing the current FirebaseUI state.
+ */
export function injectUI() {
const store = inject(FIREBASE_UI_STORE);
const ui = signal(store.get());
@@ -95,6 +119,13 @@ export function injectUI() {
return ui.asReadonly();
}
+/**
+ * Injects a callback that is called when a user is authenticated.
+ *
+ * The callback is only triggered for non-anonymous users.
+ *
+ * @param onAuthenticated - Callback function called when a user is authenticated.
+ */
export function injectUserAuthenticated(onAuthenticated: (user: User) => void) {
const auth = inject(Auth);
const state = authState(auth);
@@ -112,6 +143,14 @@ export function injectUserAuthenticated(onAuthenticated: (user: User) => void) {
});
}
+/**
+ * Injects a reCAPTCHA verifier for phone authentication.
+ *
+ * Automatically renders the reCAPTCHA widget in the provided element when available.
+ *
+ * @param element - Function that returns the element reference where reCAPTCHA should be rendered.
+ * @returns A computed signal containing the reCAPTCHA verifier instance, or null if not available.
+ */
export function injectRecaptchaVerifier(element: () => ElementRef) {
const ui = injectUI();
const platformId = inject(PLATFORM_ID);
@@ -137,41 +176,85 @@ export function injectRecaptchaVerifier(element: () => ElementRef getTranslation(ui(), category as any, key as any));
}
+/**
+ * Injects the sign-in authentication form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the sign-in form schema.
+ */
export function injectSignInAuthFormSchema(): Signal> {
const ui = injectUI();
return computed(() => createSignInAuthFormSchema(ui()));
}
+/**
+ * Injects the sign-up authentication form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the sign-up form schema.
+ */
export function injectSignUpAuthFormSchema(): Signal> {
const ui = injectUI();
return computed(() => createSignUpAuthFormSchema(ui()));
}
+/**
+ * Injects the forgot password authentication form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the forgot password form schema.
+ */
export function injectForgotPasswordAuthFormSchema(): Signal> {
const ui = injectUI();
return computed(() => createForgotPasswordAuthFormSchema(ui()));
}
+/**
+ * Injects the email link authentication form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the email link auth form schema.
+ */
export function injectEmailLinkAuthFormSchema(): Signal> {
const ui = injectUI();
return computed(() => createEmailLinkAuthFormSchema(ui()));
}
+/**
+ * Injects the phone authentication number form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the phone auth number form schema.
+ */
export function injectPhoneAuthFormSchema(): Signal> {
const ui = injectUI();
return computed(() => createPhoneAuthNumberFormSchema(ui()));
}
+/**
+ * Injects the phone authentication verification form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the phone auth verification form schema.
+ */
export function injectPhoneAuthVerifyFormSchema(): Signal> {
const ui = injectUI();
return computed(() => createPhoneAuthVerifyFormSchema(ui()));
}
+/**
+ * Injects the multi-factor phone authentication number form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the MFA phone auth number form schema.
+ */
export function injectMultiFactorPhoneAuthNumberFormSchema(): Signal<
ReturnType
> {
@@ -179,6 +262,11 @@ export function injectMultiFactorPhoneAuthNumberFormSchema(): Signal<
return computed(() => createMultiFactorPhoneAuthNumberFormSchema(ui()));
}
+/**
+ * Injects the multi-factor phone authentication assertion form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the MFA phone auth assertion form schema.
+ */
export function injectMultiFactorPhoneAuthAssertionFormSchema(): Signal<
ReturnType
> {
@@ -186,6 +274,11 @@ export function injectMultiFactorPhoneAuthAssertionFormSchema(): Signal<
return computed(() => createMultiFactorPhoneAuthAssertionFormSchema(ui()));
}
+/**
+ * Injects the multi-factor phone authentication verification form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the MFA phone auth verification form schema.
+ */
export function injectMultiFactorPhoneAuthVerifyFormSchema(): Signal<
ReturnType
> {
@@ -193,6 +286,11 @@ export function injectMultiFactorPhoneAuthVerifyFormSchema(): Signal<
return computed(() => createMultiFactorPhoneAuthVerifyFormSchema(ui()));
}
+/**
+ * Injects the multi-factor TOTP authentication number form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the MFA TOTP auth number form schema.
+ */
export function injectMultiFactorTotpAuthNumberFormSchema(): Signal<
ReturnType
> {
@@ -200,6 +298,11 @@ export function injectMultiFactorTotpAuthNumberFormSchema(): Signal<
return computed(() => createMultiFactorTotpAuthNumberFormSchema(ui()));
}
+/**
+ * Injects the multi-factor TOTP authentication verification form schema as a reactive signal.
+ *
+ * @returns A computed signal containing the MFA TOTP auth verification form schema.
+ */
export function injectMultiFactorTotpAuthVerifyFormSchema(): Signal<
ReturnType
> {
@@ -207,20 +310,42 @@ export function injectMultiFactorTotpAuthVerifyFormSchema(): Signal<
return computed(() => createMultiFactorTotpAuthVerifyFormSchema(ui()));
}
+/**
+ * Injects the policy configuration (terms of service and privacy policy URLs).
+ *
+ * @returns The policy configuration, or null if not provided.
+ */
export function injectPolicies(): PolicyConfig | null {
return inject(FIREBASE_UI_POLICIES, { optional: true });
}
+/**
+ * Injects the list of allowed countries for phone authentication as a reactive signal.
+ *
+ * @returns A computed signal containing the array of allowed country data.
+ */
export function injectCountries(): Signal {
const ui = injectUI();
return computed(() => getBehavior(ui(), "countryCodes")().allowedCountries);
}
+/**
+ * Injects the default country for phone authentication as a reactive signal.
+ *
+ * @returns A computed signal containing the default country data.
+ */
export function injectDefaultCountry(): Signal {
const ui = injectUI();
return computed(() => getBehavior(ui(), "countryCodes")().defaultCountry);
}
+/**
+ * Injects the redirect error message as a reactive signal.
+ *
+ * Returns the error message if a redirect error occurred, undefined otherwise.
+ *
+ * @returns A computed signal containing the redirect error message, or undefined if no error.
+ */
export function injectRedirectError(): Signal {
const ui = injectUI();
return computed(() => {
diff --git a/packages/styles/src/index.ts b/packages/styles/src/index.ts
index 907ceae0c..f743df957 100644
--- a/packages/styles/src/index.ts
+++ b/packages/styles/src/index.ts
@@ -16,6 +16,11 @@
import { cva, type VariantProps } from "cva";
+/**
+ * Class variance authority configuration for button variants.
+ *
+ * Defines the CSS class variants for buttons with primary and secondary styles.
+ */
export const buttonVariant = cva({
base: "fui-button",
variants: {
@@ -29,4 +34,5 @@ export const buttonVariant = cva({
},
});
+/** Button variant type derived from the buttonVariant configuration. */
export type ButtonVariant = VariantProps["variant"];