@bluxcc/react 0.1.5 → 0.1.6

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.
Files changed (36) hide show
  1. package/dist/assets/Icons.d.ts +1 -0
  2. package/dist/components/Modal/Backdrop/index.d.ts +2 -1
  3. package/dist/components/Modal/index.d.ts +2 -1
  4. package/dist/components/Transaction/History/index.d.ts +8 -6
  5. package/dist/components/Transaction/Summery/index.d.ts +1 -1
  6. package/dist/constants/index.d.ts +2 -1
  7. package/dist/constants/networkDetails.d.ts +8 -0
  8. package/dist/containers/BluxModal/content.d.ts +4 -2
  9. package/dist/containers/Pages/WrongNetwork/index.d.ts +3 -0
  10. package/dist/context/provider.d.ts +2 -2
  11. package/dist/context/useCheckWalletNetwork.d.ts +3 -0
  12. package/dist/hooks/useAccount.d.ts +1 -1
  13. package/dist/hooks/useBlux.d.ts +2 -1
  14. package/dist/hooks/useCheckProvider.d.ts +2 -0
  15. package/dist/hooks/useCustomNetwork.d.ts +7 -0
  16. package/dist/index.cjs.js +1 -1
  17. package/dist/index.cjs.js.map +1 -1
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.esm.js +1 -1
  20. package/dist/index.esm.js.map +1 -1
  21. package/dist/networks.d.ts +1 -1
  22. package/dist/types/index.d.ts +20 -8
  23. package/dist/useStellar/index.d.ts +6 -2
  24. package/dist/useStellar/useAccount.d.ts +12 -0
  25. package/dist/useStellar/useBalance.d.ts +11 -6
  26. package/dist/useStellar/useNetwork.d.ts +2 -0
  27. package/dist/useStellar/useSwitchNetwork.d.ts +5 -0
  28. package/dist/useStellar/useTransactions.d.ts +18 -0
  29. package/dist/utils/formatDate.d.ts +2 -0
  30. package/dist/utils/getWalletNetwork.d.ts +1 -1
  31. package/dist/utils/network/getNetworkRpc.d.ts +4 -0
  32. package/dist/utils/stellar/getTransactionDetails.d.ts +2 -2
  33. package/dist/utils/stellar/signTransaction.d.ts +1 -1
  34. package/dist/utils/stellar/submitTransaction.d.ts +2 -1
  35. package/dist/utils/toTitleFormat.d.ts +2 -0
  36. package/package.json +3 -1
@@ -37,3 +37,4 @@ export declare const SmallEmailIcon: ({ fill }: {
37
37
  export declare const EmailIcon: ({ fill }: {
38
38
  fill?: string;
39
39
  }) => React.JSX.Element;
40
+ export declare const RedExclamation: () => React.JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  interface BackdropProps {
3
3
  isClosing: boolean;
4
+ isSticky?: boolean;
4
5
  onClose: () => void;
5
6
  }
6
- declare const ModalBackdrop: ({ isClosing, onClose }: BackdropProps) => React.JSX.Element;
7
+ declare const ModalBackdrop: ({ isClosing, onClose, isSticky, }: BackdropProps) => React.JSX.Element;
7
8
  export default ModalBackdrop;
@@ -8,6 +8,7 @@ interface ModalProps {
8
8
  onInfo?: () => void;
9
9
  closeButton?: boolean;
10
10
  title: string;
11
+ isSticky?: boolean;
11
12
  }
12
- declare const Modal: ({ isOpen, onClose, onBack, onInfo, children, title, icon, closeButton, }: ModalProps) => React.JSX.Element | null;
13
+ declare const Modal: ({ isOpen, onClose, onBack, onInfo, children, title, icon, isSticky, closeButton, }: ModalProps) => React.JSX.Element | null;
13
14
  export default Modal;
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
- interface TransactionProps {
3
- amount: string;
4
- date: string;
5
- status: 'success' | 'failed' | string;
6
- action: string;
2
+ export type TxDetail = {
7
3
  hash: string;
4
+ date: string;
5
+ title: string;
6
+ description: string;
7
+ };
8
+ interface TransactionProps {
9
+ tx: TxDetail;
8
10
  }
9
- declare const _default: React.MemoExoticComponent<({ amount, date, status, action, hash }: TransactionProps) => React.JSX.Element>;
11
+ declare const _default: React.MemoExoticComponent<({ tx }: TransactionProps) => React.JSX.Element>;
10
12
  export default _default;
@@ -5,5 +5,5 @@ interface SummaryProps {
5
5
  estimatedFee: string;
6
6
  action: string;
7
7
  }
8
- declare const Summary: ({ operationsCount, sender, estimatedFee, action }: SummaryProps) => React.JSX.Element;
8
+ declare const Summary: ({ operationsCount, sender, estimatedFee, action, }: SummaryProps) => React.JSX.Element;
9
9
  export default Summary;
@@ -4,4 +4,5 @@ export declare const HORIZON_SERVERS: {
4
4
  testnet: string;
5
5
  futurenet: string;
6
6
  };
7
- export declare const defaultAppearance: IAppearance;
7
+ export declare const defaultLightTheme: IAppearance;
8
+ export declare const defaultDarkTheme: IAppearance;
@@ -0,0 +1,8 @@
1
+ import { Url } from "../utils/network/url";
2
+ export interface NetworkDetails {
3
+ name: string;
4
+ horizon: Url;
5
+ soroban: Url;
6
+ }
7
+ declare const NETWORKS_DETAILS: Record<string, NetworkDetails>;
8
+ export default NETWORKS_DETAILS;
@@ -4,8 +4,10 @@ interface ModalContentProps {
4
4
  showAllWallets: boolean;
5
5
  setShowAllWallets: (show: boolean) => void;
6
6
  }
7
- export declare const modalContent: Record<Routes, {
7
+ type RouteContent = {
8
8
  title: string;
9
+ isSticky?: boolean;
9
10
  Component: React.FC<ModalContentProps>;
10
- }>;
11
+ };
12
+ export declare const modalContent: Record<Routes, RouteContent>;
11
13
  export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const WrongNetwork: () => React.JSX.Element;
3
+ export default WrongNetwork;
@@ -4,8 +4,8 @@ export declare const ProviderContext: React.Context<ContextState | null>;
4
4
  type BluxProviderProps = {
5
5
  isDemo?: boolean;
6
6
  config: IProviderConfig;
7
- children: React.ReactNode;
7
+ children: React.ReactNode | any;
8
8
  };
9
- export declare const BluxProvider: ({ config, isDemo, children }: BluxProviderProps) => React.JSX.Element;
9
+ export declare const BluxProvider: ({ config, isDemo, children, }: BluxProviderProps) => React.JSX.Element;
10
10
  export declare const useProvider: () => ContextState;
11
11
  export {};
@@ -0,0 +1,3 @@
1
+ import { ContextInterface, Routes } from "../types";
2
+ declare const useCheckWalletNetwork: (value: ContextInterface, setValue: React.Dispatch<React.SetStateAction<ContextInterface>>, setRoute: React.Dispatch<React.SetStateAction<Routes>>) => void;
3
+ export default useCheckWalletNetwork;
@@ -8,5 +8,5 @@ interface AccountHookProps {
8
8
  publicKey: string;
9
9
  passphrase: string;
10
10
  }
11
- declare const useAccount: ({ publicKey, passphrase }: AccountHookProps) => AccountHookResult;
11
+ declare const useAccount: ({ publicKey, passphrase, }: AccountHookProps) => AccountHookResult;
12
12
  export default useAccount;
@@ -1,8 +1,9 @@
1
+ import { ISendTransactionOptions } from '../types';
1
2
  export declare const useBlux: () => {
2
3
  login: () => void;
3
4
  logout: () => void;
4
5
  profile: () => void;
5
- sendTransaction: (xdr: string) => Promise<unknown>;
6
+ sendTransaction: (xdr: string, options?: ISendTransactionOptions) => Promise<unknown>;
6
7
  user: import("../types").IUser;
7
8
  isReady: boolean;
8
9
  isAuthenticated: boolean;
@@ -0,0 +1,2 @@
1
+ declare const useCheckProvider: () => import("../types").ContextState;
2
+ export default useCheckProvider;
@@ -0,0 +1,7 @@
1
+ import { Horizon, rpc } from "@stellar/stellar-sdk";
2
+ declare const useCustomNetwork: (network?: string) => {
3
+ soroban: rpc.Server;
4
+ horizon: Horizon.Server;
5
+ networkPassphrase: string;
6
+ };
7
+ export default useCustomNetwork;