@ape.swap/bonds-sdk 3.0.10 → 3.0.11
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 +28 -30
- package/dist/main.js +36 -7
- package/dist/state/useSDKConfig.d.ts +2 -2
- package/dist/theme/colors.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,36 +41,34 @@ import 'swiper/swiper.min.css'
|
|
|
41
41
|
const MyBondsComponent = () => {
|
|
42
42
|
return (
|
|
43
43
|
<FullBondsView
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}}
|
|
73
|
-
}}
|
|
44
|
+
referenceId="yourProjectId"
|
|
45
|
+
chains={[
|
|
46
|
+
ChainId.BSC,
|
|
47
|
+
ChainId.BASE,
|
|
48
|
+
ChainId.MATIC,
|
|
49
|
+
ChainId.MAINNET,
|
|
50
|
+
ChainId.ARBITRUM,
|
|
51
|
+
ChainId.LIGHTLINK,
|
|
52
|
+
ChainId.LINEA,
|
|
53
|
+
ChainId.GRAPHLINQ,
|
|
54
|
+
ChainId.IOTA,
|
|
55
|
+
ChainId.CROSSFI,
|
|
56
|
+
]}
|
|
57
|
+
useRainbowKit={true}
|
|
58
|
+
useHotBonds={true}
|
|
59
|
+
theme={{
|
|
60
|
+
"radii": "10px",
|
|
61
|
+
"colors": {
|
|
62
|
+
"primaryButton": "#6560C5",
|
|
63
|
+
"white1": "#0E0D16",
|
|
64
|
+
"white2": "#161420",
|
|
65
|
+
"white3": "#1F1D29",
|
|
66
|
+
"white4": "#282632",
|
|
67
|
+
"white5": "#312F3A",
|
|
68
|
+
"text": "#FAFAFA",
|
|
69
|
+
"primaryBright": "#FFF"
|
|
70
|
+
}
|
|
71
|
+
}}
|
|
74
72
|
/>
|
|
75
73
|
)
|
|
76
74
|
}
|
package/dist/main.js
CHANGED
|
@@ -18789,7 +18789,7 @@ const defaultUrls = {
|
|
|
18789
18789
|
const useSDKConfig = (config) => {
|
|
18790
18790
|
const { data } = useQuery({
|
|
18791
18791
|
queryKey: [QUERY_KEYS.SDK_CONFIG],
|
|
18792
|
-
initialData: Object.assign(Object.assign({}, config), { urls: Object.assign(Object.assign({}, defaultUrls), config === null || config === void 0 ? void 0 : config.urls), highestCompatibleVersion: '2.0.0' }),
|
|
18792
|
+
initialData: Object.assign(Object.assign({}, config), { modalVariant: 'standard', urls: Object.assign(Object.assign({}, defaultUrls), config === null || config === void 0 ? void 0 : config.urls), highestCompatibleVersion: '2.0.0' }),
|
|
18793
18793
|
});
|
|
18794
18794
|
return data;
|
|
18795
18795
|
};
|
|
@@ -74385,7 +74385,7 @@ const HotBondCards = () => {
|
|
|
74385
74385
|
display: 'flex',
|
|
74386
74386
|
justifyContent: 'center',
|
|
74387
74387
|
}, children: jsx$2(HotBondCard, { bond: bond }, `${bond.billAddress}-${index}`) }, index));
|
|
74388
|
-
}) }), jsx$2(Flex, {
|
|
74388
|
+
}) }), jsx$2(Flex, { children: [...Array(hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.length)].map((_, i) => {
|
|
74389
74389
|
return jsx$2(SwiperDots, { isActive: i === activeSlide, onClick: () => slideTo(i) }, i);
|
|
74390
74390
|
}) })] })] }));
|
|
74391
74391
|
};
|
|
@@ -74692,7 +74692,7 @@ const Toggle = ({ options, activeOption, handleToggle, claimableBillsAmount, })
|
|
|
74692
74692
|
|
|
74693
74693
|
const SwiperDots = ({ isActive, onClick }) => {
|
|
74694
74694
|
return (jsx$2(Flex, { sx: {
|
|
74695
|
-
background: isActive ? '
|
|
74695
|
+
background: isActive ? 'abondGradient' : 'white4',
|
|
74696
74696
|
height: '14px',
|
|
74697
74697
|
width: '14px',
|
|
74698
74698
|
borderRadius: '50px',
|
|
@@ -75380,6 +75380,9 @@ const colors$1 = {
|
|
|
75380
75380
|
// Text-related colors
|
|
75381
75381
|
text: '#FAFAFA',
|
|
75382
75382
|
textDisabled: '#424242',
|
|
75383
|
+
primaryBright: '#FAFAFA',
|
|
75384
|
+
abondGradient: 'linear-gradient(98.79deg, #6560C5 -2.37%, #E07753 100%)',
|
|
75385
|
+
modalOverlay: 'rgba(66, 66, 66, 0.5)',
|
|
75383
75386
|
};
|
|
75384
75387
|
|
|
75385
75388
|
const defaultTheme = Object.assign(Object.assign(Object.assign({}, baseTheme), components), { colors: Object.assign({}, colors$1) });
|
|
@@ -75462,10 +75465,36 @@ BigNumber$1.config({
|
|
|
75462
75465
|
DECIMAL_PLACES: 80,
|
|
75463
75466
|
});
|
|
75464
75467
|
const Providers = ({ children, theme }) => {
|
|
75465
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
75466
|
-
|
|
75467
|
-
|
|
75468
|
-
|
|
75468
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
75469
|
+
const themeToUse = defaultTheme;
|
|
75470
|
+
if (((_a = themeToUse === null || themeToUse === void 0 ? void 0 : themeToUse.colors) === null || _a === void 0 ? void 0 : _a.primaryButton) && ((_b = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _b === void 0 ? void 0 : _b.primaryButton)) {
|
|
75471
|
+
themeToUse.colors.primaryButton = (_c = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _c === void 0 ? void 0 : _c.primaryButton;
|
|
75472
|
+
}
|
|
75473
|
+
if (((_d = themeToUse === null || themeToUse === void 0 ? void 0 : themeToUse.colors) === null || _d === void 0 ? void 0 : _d.white1) && ((_e = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _e === void 0 ? void 0 : _e.white1)) {
|
|
75474
|
+
themeToUse.colors.white1 = (_f = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _f === void 0 ? void 0 : _f.white1;
|
|
75475
|
+
}
|
|
75476
|
+
if (((_g = themeToUse === null || themeToUse === void 0 ? void 0 : themeToUse.colors) === null || _g === void 0 ? void 0 : _g.white2) && ((_h = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _h === void 0 ? void 0 : _h.white2)) {
|
|
75477
|
+
themeToUse.colors.white2 = (_j = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _j === void 0 ? void 0 : _j.white2;
|
|
75478
|
+
}
|
|
75479
|
+
if (((_k = themeToUse === null || themeToUse === void 0 ? void 0 : themeToUse.colors) === null || _k === void 0 ? void 0 : _k.white3) && ((_l = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _l === void 0 ? void 0 : _l.white3)) {
|
|
75480
|
+
themeToUse.colors.white3 = (_m = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _m === void 0 ? void 0 : _m.white3;
|
|
75481
|
+
}
|
|
75482
|
+
if (((_o = themeToUse === null || themeToUse === void 0 ? void 0 : themeToUse.colors) === null || _o === void 0 ? void 0 : _o.white4) && ((_p = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _p === void 0 ? void 0 : _p.white4)) {
|
|
75483
|
+
themeToUse.colors.white4 = (_q = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _q === void 0 ? void 0 : _q.white4;
|
|
75484
|
+
}
|
|
75485
|
+
if (((_r = themeToUse === null || themeToUse === void 0 ? void 0 : themeToUse.colors) === null || _r === void 0 ? void 0 : _r.white5) && ((_s = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _s === void 0 ? void 0 : _s.white5)) {
|
|
75486
|
+
themeToUse.colors.white5 = (_t = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _t === void 0 ? void 0 : _t.white5;
|
|
75487
|
+
}
|
|
75488
|
+
if (((_u = themeToUse === null || themeToUse === void 0 ? void 0 : themeToUse.colors) === null || _u === void 0 ? void 0 : _u.text) && ((_v = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _v === void 0 ? void 0 : _v.text)) {
|
|
75489
|
+
themeToUse.colors.text = (_w = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _w === void 0 ? void 0 : _w.text;
|
|
75490
|
+
}
|
|
75491
|
+
if (((_x = themeToUse === null || themeToUse === void 0 ? void 0 : themeToUse.colors) === null || _x === void 0 ? void 0 : _x.primaryBright) && ((_y = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _y === void 0 ? void 0 : _y.primaryBright)) {
|
|
75492
|
+
themeToUse.colors.primaryBright = (_z = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _z === void 0 ? void 0 : _z.primaryBright;
|
|
75493
|
+
}
|
|
75494
|
+
if ((themeToUse === null || themeToUse === void 0 ? void 0 : themeToUse.radii) && (theme === null || theme === void 0 ? void 0 : theme.radii)) {
|
|
75495
|
+
themeToUse.radii = { normal: theme === null || theme === void 0 ? void 0 : theme.radii };
|
|
75496
|
+
}
|
|
75497
|
+
return (jsx$2(ThemeUIProvider, { theme: themeToUse, children: jsx$2(ModalProvider, { children: jsx$2(Popups, { children: children }) }) }));
|
|
75469
75498
|
};
|
|
75470
75499
|
|
|
75471
75500
|
const BondsWithProviders = (props) => {
|
|
@@ -3,11 +3,12 @@ export interface SDKProps {
|
|
|
3
3
|
chains: number[];
|
|
4
4
|
useRainbowKit: boolean;
|
|
5
5
|
useHotBonds: boolean;
|
|
6
|
-
modalVariant
|
|
6
|
+
modalVariant?: 'alt' | 'standard';
|
|
7
7
|
urls?: Partial<Record<URLKeys, string>>;
|
|
8
8
|
theme?: any;
|
|
9
9
|
}
|
|
10
10
|
export declare const useSDKConfig: (config?: SDKProps) => {
|
|
11
|
+
modalVariant: string;
|
|
11
12
|
urls: {
|
|
12
13
|
apiV2: string;
|
|
13
14
|
realTimeApi: string;
|
|
@@ -19,7 +20,6 @@ export declare const useSDKConfig: (config?: SDKProps) => {
|
|
|
19
20
|
chains?: number[] | undefined;
|
|
20
21
|
useRainbowKit?: boolean | undefined;
|
|
21
22
|
useHotBonds?: boolean | undefined;
|
|
22
|
-
modalVariant?: "alt" | "standard" | undefined;
|
|
23
23
|
theme?: any;
|
|
24
24
|
};
|
|
25
25
|
export type URLKeys = 'apiV2' | 'realTimeApi' | 'apeswapLists' | 'mainUrl';
|
package/dist/theme/colors.d.ts
CHANGED