@erikey/react 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui/index.mjs CHANGED
@@ -861,11 +861,15 @@ var $e = fe(function(e, t2) {
861
861
  }));
862
862
  });
863
863
 
864
+ // src/stubs/captcha.ts
865
+ var GoogleReCaptchaProvider = ({ children }) => children;
866
+ var useGoogleReCaptcha = () => ({ executeRecaptcha: null });
867
+ var CaptchaFox = () => null;
868
+ var HCaptcha = () => null;
869
+ var captcha_default = HCaptcha;
870
+ var Turnstile = () => null;
871
+
864
872
  // src/ui/components/captcha/recaptcha-v3.tsx
865
- import {
866
- GoogleReCaptchaProvider,
867
- useGoogleReCaptcha
868
- } from "@wojtekmaj/react-recaptcha-v3";
869
873
  import { useContext, useEffect as useEffect3 } from "react";
870
874
 
871
875
  // src/ui/hooks/use-hydrated.ts
@@ -18696,9 +18700,11 @@ import { useContext as useContext18, useMemo as useMemo14, useState as useState2
18696
18700
  // src/ui/components/user-avatar.tsx
18697
18701
  import { useContext as useContext17 } from "react";
18698
18702
 
18703
+ // src/stubs/hashes.ts
18704
+ var sha256 = () => new Uint8Array(32);
18705
+ var bytesToHex = (_bytes) => "";
18706
+
18699
18707
  // src/ui/lib/gravatar-utils.ts
18700
- import { sha256 } from "@noble/hashes/sha2.js";
18701
- import { bytesToHex } from "@noble/hashes/utils.js";
18702
18708
  function getGravatarUrl(email, options) {
18703
18709
  if (!email) return null;
18704
18710
  try {
@@ -26450,8 +26456,8 @@ import { useContext as useContext49 } from "react";
26450
26456
  // src/ui/components/settings/teams/user-team-cell.tsx
26451
26457
  import { useContext as useContext48, useState as useState42 } from "react";
26452
26458
 
26453
- // src/ui/types/auth-client.ts
26454
- import { passkeyClient } from "@better-auth/passkey/client";
26459
+ // src/stubs/passkey.ts
26460
+ var passkeyClient = () => ({});
26455
26461
 
26456
26462
  // ../../../node_modules/.pnpm/@better-auth+core@1.4.10_@better-auth+utils@0.3.0_@better-fetch+fetch@1.1.21_better-call@1.1._s4ptmt7cznbdkhj2rfry3i4hxy/node_modules/@better-auth/core/dist/env-DbssmzoK.mjs
26457
26463
  var _envShim = /* @__PURE__ */ Object.create(null);
@@ -30664,7 +30670,6 @@ import { useContext as useContext68, useEffect as useEffect42 } from "react";
30664
30670
  import { useContext as useContext58, useEffect as useEffect32, useState as useState46 } from "react";
30665
30671
 
30666
30672
  // src/ui/hooks/use-captcha.tsx
30667
- import { useGoogleReCaptcha as useGoogleReCaptcha2 } from "@wojtekmaj/react-recaptcha-v3";
30668
30673
  import { useContext as useContext53, useRef as useRef24 } from "react";
30669
30674
  var DEFAULT_CAPTCHA_ENDPOINTS = [
30670
30675
  "/sign-up/email",
@@ -30682,7 +30687,7 @@ function useCaptcha({
30682
30687
  const { captcha, localization: contextLocalization } = useContext53(AuthUIContext);
30683
30688
  localization = { ...contextLocalization, ...localization };
30684
30689
  const captchaRef = useRef24(null);
30685
- const { executeRecaptcha } = useGoogleReCaptcha2();
30690
+ const { executeRecaptcha } = useGoogleReCaptcha();
30686
30691
  const executeCaptcha = async (action) => {
30687
30692
  if (!captcha) throw new Error(localization.MISSING_RESPONSE);
30688
30693
  let response;
@@ -30768,9 +30773,6 @@ function useCaptcha({
30768
30773
  }
30769
30774
 
30770
30775
  // src/ui/components/captcha/captcha.tsx
30771
- import { CaptchaFox } from "@captchafox/react";
30772
- import HCaptcha from "@hcaptcha/react-hcaptcha";
30773
- import { Turnstile } from "@marsidev/react-turnstile";
30774
30776
  import { useContext as useContext56 } from "react";
30775
30777
 
30776
30778
  // src/ui/components/captcha/recaptcha-badge.tsx
@@ -30829,7 +30831,6 @@ function RecaptchaBadge({
30829
30831
 
30830
30832
  // src/ui/components/captcha/recaptcha-v2.tsx
30831
30833
  import { useContext as useContext55, useEffect as useEffect28 } from "react";
30832
- import ReCAPTCHA from "react-google-recaptcha";
30833
30834
  import { Fragment as Fragment30, jsx as jsx89, jsxs as jsxs55 } from "react/jsx-runtime";
30834
30835
  function RecaptchaV2({ ref }) {
30835
30836
  const { captcha } = useContext55(AuthUIContext);
@@ -30858,7 +30859,7 @@ function RecaptchaV2({ ref }) {
30858
30859
  }
30859
30860
  ` }),
30860
30861
  /* @__PURE__ */ jsx89(
30861
- ReCAPTCHA,
30862
+ captcha_default,
30862
30863
  {
30863
30864
  ref,
30864
30865
  sitekey: captcha.siteKey,
@@ -30912,7 +30913,7 @@ function Captcha({ ref, localization, action }) {
30912
30913
  }
30913
30914
  ),
30914
30915
  showHCaptcha && /* @__PURE__ */ jsx90("div", { className: "mx-auto", children: /* @__PURE__ */ jsx90(
30915
- HCaptcha,
30916
+ captcha_default,
30916
30917
  {
30917
30918
  ref,
30918
30919
  sitekey: captcha.siteKey,
@@ -33038,7 +33039,12 @@ function SignUpForm({
33038
33039
 
33039
33040
  // src/ui/components/auth/forms/two-factor-form.tsx
33040
33041
  import { useContext as useContext66, useEffect as useEffect40, useRef as useRef29, useState as useState49 } from "react";
33041
- import QRCode from "react-qr-code";
33042
+
33043
+ // src/stubs/qr-code.ts
33044
+ var QRCode = () => null;
33045
+ var qr_code_default = QRCode;
33046
+
33047
+ // src/ui/components/auth/forms/two-factor-form.tsx
33042
33048
  import { Fragment as Fragment35, jsx as jsx101, jsxs as jsxs67 } from "react/jsx-runtime";
33043
33049
  function TwoFactorForm({
33044
33050
  className,
@@ -33168,7 +33174,7 @@ function TwoFactorForm({
33168
33174
  twoFactor?.includes("totp") && totpURI && method === "totp" && /* @__PURE__ */ jsxs67("div", { className: "space-y-3", children: [
33169
33175
  /* @__PURE__ */ jsx101(Label4, { className: classNames?.label, children: localization.TWO_FACTOR_TOTP_LABEL }),
33170
33176
  /* @__PURE__ */ jsx101(
33171
- QRCode,
33177
+ qr_code_default,
33172
33178
  {
33173
33179
  className: cn(
33174
33180
  "border shadow-xs",
@@ -38080,6 +38086,7 @@ export {
38080
38086
  ApiKeysCard,
38081
38087
  AppleIcon,
38082
38088
  AuthCallback,
38089
+ AuthView as AuthCard,
38083
38090
  AuthForm,
38084
38091
  AuthLoading,
38085
38092
  AuthUIProvider as AuthProvider,