@bluxcc/react 0.1.22 → 0.1.24
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/Provider.d.ts +8 -0
- package/dist/hooks/useBlux.d.ts +10 -14
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -6
- package/dist/index.esm.js +1 -1
- package/dist/useStellar/index.d.ts +4 -6
- package/dist/useStellar/useAccount.d.ts +5 -10
- package/dist/useStellar/useNetwork.d.ts +1 -2
- package/dist/useStellar/useSwitchNetwork.d.ts +8 -3
- package/package.json +4 -10
- package/dist/assets/Icons.d.ts +0 -47
- package/dist/assets/bluxLogo.d.ts +0 -5
- package/dist/assets/logos.d.ts +0 -25
- package/dist/components/Button/index.d.ts +0 -17
- package/dist/components/CardItem/index.d.ts +0 -15
- package/dist/components/Header/index.d.ts +0 -11
- package/dist/components/Input/OTPInput.d.ts +0 -8
- package/dist/components/Input/index.d.ts +0 -18
- package/dist/components/Modal/Backdrop/index.d.ts +0 -8
- package/dist/components/Modal/index.d.ts +0 -9
- package/dist/components/Transaction/History/index.d.ts +0 -12
- package/dist/components/Transaction/Summary/index.d.ts +0 -11
- package/dist/constants/explorers.d.ts +0 -9
- package/dist/constants/index.d.ts +0 -4
- package/dist/constants/locales.d.ts +0 -9
- package/dist/constants/networkDetails.d.ts +0 -8
- package/dist/constants/storageKeys.d.ts +0 -1
- package/dist/containers/BluxModal/content.d.ts +0 -10
- package/dist/containers/BluxModal/index.d.ts +0 -7
- package/dist/containers/Pages/Activity/index.d.ts +0 -3
- package/dist/containers/Pages/ConfirmCode/index.d.ts +0 -3
- package/dist/containers/Pages/OnBoarding/index.d.ts +0 -3
- package/dist/containers/Pages/Profile/index.d.ts +0 -3
- package/dist/containers/Pages/SelectAsset/index.d.ts +0 -9
- package/dist/containers/Pages/Send/SendForm.d.ts +0 -3
- package/dist/containers/Pages/Send/index.d.ts +0 -3
- package/dist/containers/Pages/SignTransaction/index.d.ts +0 -3
- package/dist/containers/Pages/Successful/index.d.ts +0 -3
- package/dist/containers/Pages/Waiting/index.d.ts +0 -3
- package/dist/containers/Pages/WrongNetwork/index.d.ts +0 -3
- package/dist/context/provider.d.ts +0 -11
- package/dist/context/useCheckWalletNetwork.d.ts +0 -3
- package/dist/hooks/useCheckProvider.d.ts +0 -2
- package/dist/hooks/useCustomNetwork.d.ts +0 -7
- package/dist/hooks/useDynamicHeight.d.ts +0 -4
- package/dist/hooks/useIsMobile.d.ts +0 -1
- package/dist/hooks/useLang.d.ts +0 -2
- package/dist/hooks/useModalAnimation.d.ts +0 -7
- package/dist/networks.d.ts +0 -8
- package/dist/types/index.d.ts +0 -248
- package/dist/useStellar/useBalance.d.ts +0 -13
- package/dist/useStellar/useTransactions.d.ts +0 -18
- package/dist/utils/apis/getAssetLogos.d.ts +0 -12
- package/dist/utils/capitalizeFirstLetter.d.ts +0 -2
- package/dist/utils/copyText.d.ts +0 -2
- package/dist/utils/formatDate.d.ts +0 -2
- package/dist/utils/getContrastColor.d.ts +0 -2
- package/dist/utils/getWalletNetwork.d.ts +0 -3
- package/dist/utils/handleLogos.d.ts +0 -3
- package/dist/utils/hexToRgba.d.ts +0 -2
- package/dist/utils/humanizeAmount.d.ts +0 -3
- package/dist/utils/initializeRabetMobile.d.ts +0 -2
- package/dist/utils/isBackgroundDark.d.ts +0 -2
- package/dist/utils/mappedWallets.d.ts +0 -3
- package/dist/utils/network/getNetworkRpc.d.ts +0 -4
- package/dist/utils/network/getNetworkTitle.d.ts +0 -2
- package/dist/utils/network/url.d.ts +0 -12
- package/dist/utils/setRecentConnectionMethod.d.ts +0 -3
- package/dist/utils/shortenAddress.d.ts +0 -2
- package/dist/utils/sortWallets.d.ts +0 -3
- package/dist/utils/stellar/finalizeSorobanTransaction.d.ts +0 -3
- package/dist/utils/stellar/getExplorerUrl.d.ts +0 -3
- package/dist/utils/stellar/getNetworkByPassphrase.d.ts +0 -2
- package/dist/utils/stellar/getTransactionDetails.d.ts +0 -8
- package/dist/utils/stellar/handleTransactionSigning.d.ts +0 -3
- package/dist/utils/stellar/paymentTransaction.d.ts +0 -4
- package/dist/utils/stellar/signTransaction.d.ts +0 -3
- package/dist/utils/stellar/submitTransaction.d.ts +0 -10
- package/dist/utils/toTitleFormat.d.ts +0 -2
- package/dist/utils/translate.d.ts +0 -2
- package/dist/wallets/configs/albedoConfig.d.ts +0 -2
- package/dist/wallets/configs/freighterConfig.d.ts +0 -2
- package/dist/wallets/configs/hanaConfig.d.ts +0 -2
- package/dist/wallets/configs/hotConfig.d.ts +0 -2
- package/dist/wallets/configs/lobstrConfig.d.ts +0 -2
- package/dist/wallets/configs/rabetConfig.d.ts +0 -2
- package/dist/wallets/configs/xbullConfig.d.ts +0 -2
- package/dist/wallets/walletsConfig.d.ts +0 -2
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import useSwitchNetwork from './useSwitchNetwork';
|
|
6
|
-
export { useAccount, useBalance, useNetwork, useTransactions, useSwitchNetwork, };
|
|
1
|
+
export { networks } from '@bluxcc/core';
|
|
2
|
+
export * from './useAccount';
|
|
3
|
+
export * from './useNetwork';
|
|
4
|
+
export { useSwitchNetwork } from './useSwitchNetwork';
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
address?: string;
|
|
4
|
-
network?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface UseAccountResult {
|
|
1
|
+
import { GetAccountResult, GetAccountOptions } from '@bluxcc/core/dist/exports/core/getAccount';
|
|
2
|
+
export type UseAccountResult = {
|
|
7
3
|
loading: boolean;
|
|
8
4
|
error: Error | null;
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
declare
|
|
12
|
-
export default useAccount;
|
|
5
|
+
result: GetAccountResult;
|
|
6
|
+
};
|
|
7
|
+
export declare function useAccount(options: GetAccountOptions): UseAccountResult;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const useNetwork: () => string;
|
|
2
|
-
export default useNetwork;
|
|
1
|
+
export declare const useNetwork: () => string;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
declare const useSwitchNetwork: () => {
|
|
1
|
+
export declare const useSwitchNetwork: () => {
|
|
2
|
+
networks: {
|
|
3
|
+
mainnet: import("@stellar/stellar-base").Networks;
|
|
4
|
+
testnet: import("@stellar/stellar-base").Networks;
|
|
5
|
+
sandbox: import("@stellar/stellar-base").Networks;
|
|
6
|
+
futurenet: import("@stellar/stellar-base").Networks;
|
|
7
|
+
standalone: import("@stellar/stellar-base").Networks;
|
|
8
|
+
};
|
|
2
9
|
switchNetwork: (newNetwork: string) => void;
|
|
3
|
-
networks: string[];
|
|
4
10
|
};
|
|
5
|
-
export default useSwitchNetwork;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluxcc/react",
|
|
3
3
|
"author": "Blux team",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.24",
|
|
5
5
|
"homepage": "https://blux.cc",
|
|
6
6
|
"description": "Connecting to the Stellar Ecosystem and Beyond",
|
|
7
7
|
"repository": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/bluxcc/blux"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
|
-
"main": "dist/index.
|
|
12
|
+
"main": "dist/index.cjs.js",
|
|
13
13
|
"module": "dist/index.esm.js",
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"exports": {
|
|
@@ -30,10 +30,7 @@
|
|
|
30
30
|
"build": "rollup -c rollup.config.prod.js"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"@lobstrco/signer-extension-api": "^1.0.0-beta.0",
|
|
35
|
-
"@stellar/freighter-api": "^3.0.0",
|
|
36
|
-
"@stellar/stellar-sdk": "^14.1.1",
|
|
33
|
+
"@bluxcc/core": "^0.1.13",
|
|
37
34
|
"react": ">=17.0.0",
|
|
38
35
|
"react-dom": ">=17.0.0"
|
|
39
36
|
},
|
|
@@ -71,8 +68,5 @@
|
|
|
71
68
|
},
|
|
72
69
|
"sideEffects": [
|
|
73
70
|
"*.css"
|
|
74
|
-
]
|
|
75
|
-
"dependencies": {
|
|
76
|
-
"@hot-wallet/sdk": "^1.0.11"
|
|
77
|
-
}
|
|
71
|
+
]
|
|
78
72
|
}
|
package/dist/assets/Icons.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const InfoIcon: ({ fill }: {
|
|
3
|
-
fill?: string;
|
|
4
|
-
}) => React.JSX.Element;
|
|
5
|
-
export declare const ArrowRight: ({ fill }: {
|
|
6
|
-
fill?: string;
|
|
7
|
-
}) => React.JSX.Element;
|
|
8
|
-
export declare const ArrowLeft: ({ fill }: {
|
|
9
|
-
fill?: string;
|
|
10
|
-
}) => React.JSX.Element;
|
|
11
|
-
export declare const Close: ({ fill }: {
|
|
12
|
-
fill?: string;
|
|
13
|
-
}) => React.JSX.Element;
|
|
14
|
-
export declare const Loading: ({ fill }: {
|
|
15
|
-
fill?: string;
|
|
16
|
-
}) => React.JSX.Element;
|
|
17
|
-
export declare const Search: ({ fill }: {
|
|
18
|
-
fill?: string;
|
|
19
|
-
}) => React.JSX.Element;
|
|
20
|
-
export declare const GreenCheck: () => React.JSX.Element;
|
|
21
|
-
export declare const LogOut: ({ fill }: {
|
|
22
|
-
fill?: string;
|
|
23
|
-
}) => React.JSX.Element;
|
|
24
|
-
export declare const Copy: ({ fill }: {
|
|
25
|
-
fill?: string;
|
|
26
|
-
}) => React.JSX.Element;
|
|
27
|
-
export declare const History: ({ fill }: {
|
|
28
|
-
fill?: string;
|
|
29
|
-
}) => React.JSX.Element;
|
|
30
|
-
export declare const Send: ({ fill }: {
|
|
31
|
-
fill?: string;
|
|
32
|
-
}) => React.JSX.Element;
|
|
33
|
-
export declare const ArrowDropUp: ({ fill }: {
|
|
34
|
-
fill?: string;
|
|
35
|
-
}) => React.JSX.Element;
|
|
36
|
-
export declare const RedAlert: () => React.JSX.Element;
|
|
37
|
-
export declare const Upstream: () => React.JSX.Element;
|
|
38
|
-
export declare const MultiOperation: () => React.JSX.Element;
|
|
39
|
-
export declare const Downstream: () => React.JSX.Element;
|
|
40
|
-
export declare const Globe: () => React.JSX.Element;
|
|
41
|
-
export declare const SmallEmailIcon: ({ fill }: {
|
|
42
|
-
fill?: string;
|
|
43
|
-
}) => React.JSX.Element;
|
|
44
|
-
export declare const EmailIcon: ({ fill }: {
|
|
45
|
-
fill?: string;
|
|
46
|
-
}) => React.JSX.Element;
|
|
47
|
-
export declare const RedExclamation: () => React.JSX.Element;
|
package/dist/assets/logos.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const AlbedoLogo: () => React.JSX.Element;
|
|
3
|
-
export declare const HanaLogo: ({ fill }: {
|
|
4
|
-
fill?: string;
|
|
5
|
-
}) => React.JSX.Element;
|
|
6
|
-
export declare const HotLogo: () => React.JSX.Element;
|
|
7
|
-
export declare const RabetLogo: ({ fill }: {
|
|
8
|
-
fill?: string;
|
|
9
|
-
}) => React.JSX.Element;
|
|
10
|
-
export declare const FreighterLogo: ({ fill }: {
|
|
11
|
-
fill?: string;
|
|
12
|
-
}) => React.JSX.Element;
|
|
13
|
-
export declare const XBullLogo: ({ fill }: {
|
|
14
|
-
fill?: string;
|
|
15
|
-
}) => React.JSX.Element;
|
|
16
|
-
export declare const LobstrLogo: ({ fill }: {
|
|
17
|
-
fill?: string;
|
|
18
|
-
}) => React.JSX.Element;
|
|
19
|
-
export declare const StellarLogo: ({ fill }: {
|
|
20
|
-
fill?: string;
|
|
21
|
-
}) => React.JSX.Element;
|
|
22
|
-
export declare const StellarSmallLogo: ({ fill }: {
|
|
23
|
-
fill?: string;
|
|
24
|
-
}) => React.JSX.Element;
|
|
25
|
-
export declare const GoogleLogo: () => React.JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type ButtonSize = 'small' | 'medium' | 'large';
|
|
3
|
-
type ButtonVariant = 'outline' | 'text' | 'fill';
|
|
4
|
-
type ButtonState = 'enabled' | 'disabled' | 'selected';
|
|
5
|
-
interface ButtonProps {
|
|
6
|
-
size?: ButtonSize;
|
|
7
|
-
variant?: ButtonVariant;
|
|
8
|
-
state?: ButtonState;
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
startIcon?: React.ReactNode;
|
|
11
|
-
endIcon?: React.ReactNode;
|
|
12
|
-
onClick?: () => void;
|
|
13
|
-
style?: React.CSSProperties;
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
16
|
-
declare const Button: ({ size, variant, state, children, startIcon, endIcon, onClick, style, className, }: ButtonProps) => React.JSX.Element;
|
|
17
|
-
export default Button;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type CardItemProps = {
|
|
3
|
-
variant?: 'social' | 'default' | 'input';
|
|
4
|
-
startIcon: React.ReactNode;
|
|
5
|
-
endArrow?: boolean;
|
|
6
|
-
isRecent?: boolean;
|
|
7
|
-
label?: string;
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
onChange?: (value: string) => void;
|
|
10
|
-
onEnter?: (value: string) => void;
|
|
11
|
-
onSubmit?: (value: string) => void;
|
|
12
|
-
inputType?: 'text' | 'password' | 'number' | 'email' | string;
|
|
13
|
-
};
|
|
14
|
-
declare const CardItem: ({ variant, startIcon, endArrow, isRecent, label, onClick, onChange, onEnter, onSubmit, inputType, }: CardItemProps) => React.JSX.Element;
|
|
15
|
-
export default CardItem;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface HeaderProps {
|
|
3
|
-
icon?: 'info' | 'back';
|
|
4
|
-
onInfo?: () => void;
|
|
5
|
-
onBack?: () => void;
|
|
6
|
-
title: string;
|
|
7
|
-
closeButton?: boolean;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
}
|
|
10
|
-
declare const Header: ({ icon, onInfo, onBack, title, closeButton, onClose, }: HeaderProps) => React.JSX.Element;
|
|
11
|
-
export default Header;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type InputFieldProps = {
|
|
3
|
-
label?: string;
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
error?: string;
|
|
6
|
-
type?: 'text' | 'password' | 'number';
|
|
7
|
-
iconRight?: React.ReactNode;
|
|
8
|
-
iconLeft?: React.ReactNode;
|
|
9
|
-
button?: string | React.ReactNode;
|
|
10
|
-
onButtonClick?: () => void;
|
|
11
|
-
value?: string;
|
|
12
|
-
autoFocus?: boolean;
|
|
13
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
-
customLabel?: React.ReactNode;
|
|
15
|
-
className?: string;
|
|
16
|
-
};
|
|
17
|
-
declare const InputField: ({ label, autoFocus, type, placeholder, error, iconRight, iconLeft, button, onButtonClick, customLabel, value, className, onChange, }: InputFieldProps) => React.JSX.Element;
|
|
18
|
-
export default InputField;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ModalProps {
|
|
3
|
-
isOpen: boolean;
|
|
4
|
-
onClose?: () => void;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
isSticky?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare const Modal: ({ isOpen, onClose, children, isSticky, }: ModalProps) => React.JSX.Element | null;
|
|
9
|
-
export default Modal;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type TxDetail = {
|
|
3
|
-
hash: string;
|
|
4
|
-
date: string;
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
interface TransactionProps {
|
|
9
|
-
tx: TxDetail;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: React.MemoExoticComponent<({ tx }: TransactionProps) => React.JSX.Element>;
|
|
12
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface SummaryProps {
|
|
3
|
-
operationsCount: number;
|
|
4
|
-
sender: string;
|
|
5
|
-
receiver?: string | null;
|
|
6
|
-
estimatedFee: string;
|
|
7
|
-
action: string;
|
|
8
|
-
network: string;
|
|
9
|
-
}
|
|
10
|
-
declare const Summary: ({ operationsCount, sender, receiver, network, estimatedFee, action, }: SummaryProps) => React.JSX.Element;
|
|
11
|
-
export default Summary;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type LanguageKey = 'en' | 'es';
|
|
2
|
-
export type Translations = {
|
|
3
|
-
[key: string]: {
|
|
4
|
-
[lang in LanguageKey]: string;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
export type TranslationKey = keyof typeof translations;
|
|
8
|
-
declare const translations: Translations;
|
|
9
|
-
export default translations;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const RECENT_CONNECTION_METHODS = "__BLUX__RECENT_CONNECTION_METHODS";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Routes } from '../../types';
|
|
2
|
-
import { LanguageKey } from '../../constants/locales';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
type RouteContent = {
|
|
5
|
-
title: string;
|
|
6
|
-
isSticky?: boolean;
|
|
7
|
-
Component: React.JSX.Element;
|
|
8
|
-
};
|
|
9
|
-
export declare const getModalContent: (lang: LanguageKey) => Record<Routes, RouteContent>;
|
|
10
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IAsset } from '../../../types';
|
|
3
|
-
type SelectAssetsProps = {
|
|
4
|
-
assets: IAsset[];
|
|
5
|
-
setShowSelectAssetPage: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
-
setSelectedAsset: React.Dispatch<React.SetStateAction<IAsset>>;
|
|
7
|
-
};
|
|
8
|
-
declare const SelectAssets: ({ assets, setSelectedAsset, setShowSelectAssetPage, }: SelectAssetsProps) => React.JSX.Element;
|
|
9
|
-
export default SelectAssets;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ContextState, IProviderConfig } from '../types';
|
|
3
|
-
export declare const ProviderContext: React.Context<ContextState | null>;
|
|
4
|
-
type BluxProviderProps = {
|
|
5
|
-
isDemo?: boolean;
|
|
6
|
-
config: IProviderConfig;
|
|
7
|
-
children: React.ReactNode | any;
|
|
8
|
-
};
|
|
9
|
-
export declare const BluxProvider: ({ config, isDemo, children, }: BluxProviderProps) => React.JSX.Element;
|
|
10
|
-
export declare const useProvider: () => ContextState;
|
|
11
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useIsMobile: (breakpoint?: number) => boolean;
|
package/dist/hooks/useLang.d.ts
DELETED