@getpara/react-sdk 1.4.0 → 1.4.2

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/index.js.br CHANGED
Binary file
package/dist/index.js.gz CHANGED
Binary file
@@ -1,4 +1 @@
1
- export declare const BiometricCreationStep: ({ handlePasswordClick, handlePasskeyClick, }: {
2
- handlePasswordClick: () => Promise<void>;
3
- handlePasskeyClick: () => Promise<void>;
4
- }) => import("react/jsx-runtime").JSX.Element;
1
+ export declare const BiometricCreationStep: () => import("react/jsx-runtime").JSX.Element;
@@ -5,8 +5,6 @@ interface BodyProps {
5
5
  disableEmailLogin: boolean;
6
6
  disablePhoneLogin: boolean;
7
7
  onClose: () => void;
8
- createAccountWithPasskey: () => Promise<void>;
9
- createAccountWithPassword: () => Promise<void>;
10
8
  }
11
- export declare const Body: ({ oAuthMethods, twoFactorAuthEnabled, disableEmailLogin, disablePhoneLogin, onClose, createAccountWithPasskey, createAccountWithPassword, }: BodyProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Body: ({ oAuthMethods, twoFactorAuthEnabled, disableEmailLogin, disablePhoneLogin, onClose }: BodyProps) => import("react/jsx-runtime").JSX.Element;
12
10
  export {};
@@ -0,0 +1,4 @@
1
+ export declare function useCreateAccount(): {
2
+ withPasskey: () => void;
3
+ withPassword: () => void;
4
+ };
@@ -3,6 +3,7 @@ import { OnRampConfig as OnRampConfigBase, OnRampPurchase, WalletType } from '@g
3
3
  import { Tab as AddFundsTabType } from '../../components/AddFunds/AddFunds.js';
4
4
  import { AuthMethod } from '@getpara/core-sdk';
5
5
  import { BiometricLocationHint } from '@getpara/user-management-client';
6
+ import { MutableRefObject } from 'react';
6
7
  type Flow = 'login' | 'signUp' | 'account';
7
8
  type ActiveWallet = [string | undefined, WalletType | undefined];
8
9
  export type OnRampConfig = OnRampConfigBase & {
@@ -24,7 +25,6 @@ interface ModalState {
24
25
  onModalStepChange: (value: OnModalStepChangeValue) => void | undefined;
25
26
  onRampConfig: OnRampConfig | undefined;
26
27
  onRampPurchase: Partial<OnRampPurchase> | undefined;
27
- popupWindow: Window | undefined;
28
28
  isFullyLoggedIn: boolean;
29
29
  accountAddFundTab?: AddFundsTabType;
30
30
  selectedExternalWalletId?: string;
@@ -36,6 +36,14 @@ interface ModalState {
36
36
  biometricLocationHints: BiometricLocationHint[] | undefined;
37
37
  iFrameUrl: string | undefined;
38
38
  isIFrameReady: boolean | undefined;
39
+ refs: {
40
+ popupWindow: MutableRefObject<Window>;
41
+ poll: MutableRefObject<{
42
+ action: 'login' | 'createPasskey' | 'createPassword';
43
+ timeout: number;
44
+ }>;
45
+ currentStep: MutableRefObject<ModalStep>;
46
+ };
39
47
  }
40
48
  export interface ModalActions {
41
49
  resetState: () => void;
@@ -52,7 +60,6 @@ export interface ModalActions {
52
60
  setOnModalStepChange: (fn: (value: OnModalStepChangeValue) => void) => void;
53
61
  setOnRampConfig: (_: OnRampConfig | undefined) => void;
54
62
  setOnRampPurchase: (_: Partial<OnRampPurchase> | undefined) => void;
55
- setPopupWindow: (_: Window | undefined) => void;
56
63
  setIsFullyLoggedIn: (isFullyLoggedIn: boolean) => void;
57
64
  setAccountAddFundTab: (accountAddFundTab: AddFundsTabType) => void;
58
65
  setSelectedExternalWalletId: (id?: string) => void;
@@ -1 +1,6 @@
1
- export declare function openPopup(popupUrl: string, target: string, type: 'OAUTH' | 'LOGIN_PASSKEY' | 'CREATE_PASSKEY' | 'TRANSACTION_REVIEW' | 'CREATE_PASSWORD' | 'LOGIN_PASSWORD'): Window;
1
+ export declare function openPopup({ url, target, type, current, }: {
2
+ url: string;
3
+ target: string;
4
+ type: 'OAUTH' | 'LOGIN_PASSKEY' | 'CREATE_PASSKEY' | 'TRANSACTION_REVIEW' | 'CREATE_PASSWORD' | 'LOGIN_PASSWORD';
5
+ current?: Window;
6
+ }): Window;
@@ -1,4 +1,5 @@
1
+ import ParaWeb from '@getpara/web-sdk';
1
2
  /**
2
3
  * Hook for retrieving the Para client
3
4
  */
4
- export declare const useClient: () => import("@getpara/web-sdk").ParaWeb;
5
+ export declare const useClient: () => ParaWeb | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/react-sdk",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,12 +12,11 @@
12
12
  "*.css"
13
13
  ],
14
14
  "dependencies": {
15
- "@getpara/react-common": "1.4.0",
16
- "@getpara/react-components": "1.4.0",
17
- "@getpara/web-sdk": "1.4.0",
15
+ "@getpara/react-common": "1.4.2",
16
+ "@getpara/react-components": "1.4.2",
17
+ "@getpara/web-sdk": "1.4.2",
18
18
  "@tanstack/react-query": "^5.0.0",
19
19
  "date-fns": "^3.6.0",
20
- "detect-browser": "^5.3.0",
21
20
  "framer-motion": "11.3.28",
22
21
  "libphonenumber-js": "^1.11.1",
23
22
  "styled-components": "^6.1.8",
@@ -50,5 +49,5 @@
50
49
  "resolutions": {
51
50
  "styled-components": "^6"
52
51
  },
53
- "gitHead": "b7610939d5a0121729be24c38d418eb45760258a"
52
+ "gitHead": "8404d1f8461109347360fe21be6057f826d31cec"
54
53
  }
@@ -1,3 +0,0 @@
1
- import { StoreApi } from 'zustand';
2
- import { ParaActions, ParaStore } from './useParaStore.js';
3
- export declare const getActions: (set: StoreApi<ParaStore>["setState"]) => ParaActions;
@@ -1,10 +0,0 @@
1
- import { ParaInternal } from '@getpara/react-common';
2
- interface ParaState {
3
- para: ParaInternal | undefined;
4
- }
5
- export interface ParaActions {
6
- setPara: (para: ParaInternal) => void;
7
- }
8
- export type ParaStore = ParaState & ParaActions;
9
- export declare const useParaStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ParaStore>>;
10
- export {};
@@ -1 +0,0 @@
1
- export declare const isPasskeySupported: () => boolean;