@zautha/react 0.4.0 → 0.5.0

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/README.md CHANGED
@@ -32,8 +32,11 @@ export function App() {
32
32
 
33
33
  ## Account management
34
34
 
35
- `<UserProfile />` is the signed-in user's account page: name and username, email addresses, password, active
36
- devices and (when the instance allows it) account deletion. `<UserButton />`'s "Manage account" opens it in a modal, or
35
+ `<UserProfile />` is the signed-in user's account page: name and username, email addresses, password, passkeys,
36
+ two-step verification, active devices and (when the instance allows it) account deletion. Passkeys show only where the
37
+ browser and the page can use them: on a page under the instance's passkey domain (production: your domain, shared with
38
+ the hosted pages; development: the page's own host, so a passkey added on `localhost` does not work on the hosted pages
39
+ and the other way round). See `@zautha/js`'s "Passkeys". `<UserButton />`'s "Manage account" opens it in a modal, or
37
40
  goes to `userProfileUrl` when you pass one (e.g. your instance's hosted `/user` page).
38
41
 
39
42
  ## Sensitive actions (reverification)
package/dist/index.cjs CHANGED
@@ -373,6 +373,12 @@ Object.defineProperty(exports, "ZauthaOfflineError", {
373
373
  return _zautha_js.ZauthaOfflineError;
374
374
  }
375
375
  });
376
+ Object.defineProperty(exports, "ZauthaPasskeyError", {
377
+ enumerable: true,
378
+ get: function() {
379
+ return _zautha_js.ZauthaPasskeyError;
380
+ }
381
+ });
376
382
  exports.ZauthaProvider = ZauthaProvider;
377
383
  Object.defineProperty(exports, "isReverificationCancelledError", {
378
384
  enumerable: true,
@@ -410,6 +416,12 @@ Object.defineProperty(exports, "isZauthaOfflineError", {
410
416
  return _zautha_js.isZauthaOfflineError;
411
417
  }
412
418
  });
419
+ Object.defineProperty(exports, "isZauthaPasskeyError", {
420
+ enumerable: true,
421
+ get: function() {
422
+ return _zautha_js.isZauthaPasskeyError;
423
+ }
424
+ });
413
425
  exports.useAuth = useAuth;
414
426
  exports.useReverification = useReverification;
415
427
  exports.useSession = useSession;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { AttemptErrors, EmailAddress, Environment, FetchStatus, ReverificationCancelledError, ReverificationRequiredError, ReverificationRequirement, Session, Session as Session$1, SessionWithActivity, SignInResource, SignInResource as SignInResource$1, SignUpResource, SignUpResource as SignUpResource$1, User, UserResource, UserResource as UserResource$1, Zautha, ZauthaApiError, ZauthaError, ZauthaErrorCode, ZauthaNetworkError, ZauthaOfflineError, ZauthaOptions, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError } from "@zautha/js";
2
+ import { AttemptErrors, EmailAddress, Environment, FetchStatus, Passkey, ReverificationCancelledError, ReverificationRequiredError, ReverificationRequirement, Session, Session as Session$1, SessionWithActivity, SignInResource, SignInResource as SignInResource$1, SignUpResource, SignUpResource as SignUpResource$1, User, UserResource, UserResource as UserResource$1, Zautha, ZauthaApiError, ZauthaError, ZauthaErrorCode, ZauthaNetworkError, ZauthaOfflineError, ZauthaOptions, ZauthaPasskeyError, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError, isZauthaPasskeyError } from "@zautha/js";
3
3
  import { ReactNode } from "react";
4
4
  //#region src/provider.d.ts
5
5
  interface ZauthaProviderProps extends Omit<ZauthaOptions, "fetch"> {
@@ -126,5 +126,5 @@ export declare function UserButton(props: import("@zautha/ui").UserButtonProps):
126
126
  export declare function UserProfile(props: import("@zautha/ui").UserProfileProps): ReactNode;
127
127
  export declare function OAuthConsent(props: import("@zautha/ui").OAuthConsentProps): ReactNode;
128
128
  //#endregion
129
- export { type EmailAddress, type Environment, type Has, type HasParams, ReverificationCancelledError, ReverificationRequiredError, type ReverificationRequirement, type Session, type SessionWithActivity, type ShowWhen, type SignInResource, type SignUpResource, type UseAuthResult, type UseSignInResult, type UseSignUpResult, type User, type UserResource, ZauthaApiError, ZauthaError, type ZauthaErrorCode, ZauthaNetworkError, ZauthaOfflineError, type ZauthaProviderProps, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError };
129
+ export { type EmailAddress, type Environment, type Has, type HasParams, type Passkey, ReverificationCancelledError, ReverificationRequiredError, type ReverificationRequirement, type Session, type SessionWithActivity, type ShowWhen, type SignInResource, type SignUpResource, type UseAuthResult, type UseSignInResult, type UseSignUpResult, type User, type UserResource, ZauthaApiError, ZauthaError, type ZauthaErrorCode, ZauthaNetworkError, ZauthaOfflineError, ZauthaPasskeyError, type ZauthaProviderProps, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError, isZauthaPasskeyError };
130
130
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { AttemptErrors, EmailAddress, Environment, FetchStatus, ReverificationCancelledError, ReverificationRequiredError, ReverificationRequirement, Session, Session as Session$1, SessionWithActivity, SignInResource, SignInResource as SignInResource$1, SignUpResource, SignUpResource as SignUpResource$1, User, UserResource, UserResource as UserResource$1, Zautha, ZauthaApiError, ZauthaError, ZauthaErrorCode, ZauthaNetworkError, ZauthaOfflineError, ZauthaOptions, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError } from "@zautha/js";
2
+ import { AttemptErrors, EmailAddress, Environment, FetchStatus, Passkey, ReverificationCancelledError, ReverificationRequiredError, ReverificationRequirement, Session, Session as Session$1, SessionWithActivity, SignInResource, SignInResource as SignInResource$1, SignUpResource, SignUpResource as SignUpResource$1, User, UserResource, UserResource as UserResource$1, Zautha, ZauthaApiError, ZauthaError, ZauthaErrorCode, ZauthaNetworkError, ZauthaOfflineError, ZauthaOptions, ZauthaPasskeyError, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError, isZauthaPasskeyError } from "@zautha/js";
3
3
  import { ReactNode } from "react";
4
4
  //#region src/provider.d.ts
5
5
  interface ZauthaProviderProps extends Omit<ZauthaOptions, "fetch"> {
@@ -126,5 +126,5 @@ export declare function UserButton(props: import("@zautha/ui").UserButtonProps):
126
126
  export declare function UserProfile(props: import("@zautha/ui").UserProfileProps): ReactNode;
127
127
  export declare function OAuthConsent(props: import("@zautha/ui").OAuthConsentProps): ReactNode;
128
128
  //#endregion
129
- export { type EmailAddress, type Environment, type Has, type HasParams, ReverificationCancelledError, ReverificationRequiredError, type ReverificationRequirement, type Session, type SessionWithActivity, type ShowWhen, type SignInResource, type SignUpResource, type UseAuthResult, type UseSignInResult, type UseSignUpResult, type User, type UserResource, ZauthaApiError, ZauthaError, type ZauthaErrorCode, ZauthaNetworkError, ZauthaOfflineError, type ZauthaProviderProps, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError };
129
+ export { type EmailAddress, type Environment, type Has, type HasParams, type Passkey, ReverificationCancelledError, ReverificationRequiredError, type ReverificationRequirement, type Session, type SessionWithActivity, type ShowWhen, type SignInResource, type SignUpResource, type UseAuthResult, type UseSignInResult, type UseSignUpResult, type User, type UserResource, ZauthaApiError, ZauthaError, type ZauthaErrorCode, ZauthaNetworkError, ZauthaOfflineError, ZauthaPasskeyError, type ZauthaProviderProps, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError, isZauthaPasskeyError };
130
130
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { ReverificationCancelledError, ReverificationRequiredError, Zautha, ZauthaApiError, ZauthaError, ZauthaNetworkError, ZauthaOfflineError, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError, withReverification } from "@zautha/js";
2
+ import { ReverificationCancelledError, ReverificationRequiredError, Zautha, ZauthaApiError, ZauthaError, ZauthaNetworkError, ZauthaOfflineError, ZauthaPasskeyError, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError, isZauthaPasskeyError, withReverification } from "@zautha/js";
3
3
  import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/provider.tsx
@@ -321,6 +321,6 @@ function OAuthConsent(props) {
321
321
  });
322
322
  }
323
323
  //#endregion
324
- export { OAuthConsent, RedirectToSignIn, RedirectToSignUp, ReverificationCancelledError, ReverificationRequiredError, Show, SignIn, SignInButton, SignOutButton, SignUp, SignUpButton, UserButton, UserProfile, ZauthaApiError, ZauthaDegraded, ZauthaError, ZauthaFailed, ZauthaLoaded, ZauthaLoading, ZauthaNetworkError, ZauthaOfflineError, ZauthaProvider, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError, useAuth, useReverification, useSession, useSignIn, useSignUp, useUser, useZautha };
324
+ export { OAuthConsent, RedirectToSignIn, RedirectToSignUp, ReverificationCancelledError, ReverificationRequiredError, Show, SignIn, SignInButton, SignOutButton, SignUp, SignUpButton, UserButton, UserProfile, ZauthaApiError, ZauthaDegraded, ZauthaError, ZauthaFailed, ZauthaLoaded, ZauthaLoading, ZauthaNetworkError, ZauthaOfflineError, ZauthaPasskeyError, ZauthaProvider, isReverificationCancelledError, isReverificationRequiredError, isZauthaApiError, isZauthaError, isZauthaNetworkError, isZauthaOfflineError, isZauthaPasskeyError, useAuth, useReverification, useSession, useSignIn, useSignUp, useUser, useZautha };
325
325
 
326
326
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zautha/react",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "description": "React bindings for Zautha: provider, hooks, <Show>, buttons and prebuilt components.",
6
6
  "license": "MIT",
@@ -31,12 +31,12 @@
31
31
  "LICENSE"
32
32
  ],
33
33
  "dependencies": {
34
- "@zautha/js": "^0.4.0"
34
+ "@zautha/js": "^0.5.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "react": "^19.0.0",
38
38
  "react-dom": "^19.0.0",
39
- "@zautha/ui": "^0.4.0"
39
+ "@zautha/ui": "^0.5.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@size-limit/preset-small-lib": "14.0.1",
@@ -44,7 +44,7 @@
44
44
  "@testing-library/user-event": "14.6.7",
45
45
  "@types/react": "19.3.0",
46
46
  "@types/react-dom": "19.3.0",
47
- "@zautha/ui": "0.4.0",
47
+ "@zautha/ui": "0.5.0",
48
48
  "happy-dom": "20.14.5",
49
49
  "msw": "2.15.0",
50
50
  "react": "19.3.0",