@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 CHANGED
@@ -41,36 +41,34 @@ import 'swiper/swiper.min.css'
41
41
  const MyBondsComponent = () => {
42
42
  return (
43
43
  <FullBondsView
44
- config={{
45
- referenceId: 'yourProjectId',
46
- chains: [
47
- ChainId.BSC,
48
- ChainId.BASE,
49
- ChainId.MATIC,
50
- ChainId.MAINNET,
51
- ChainId.ARBITRUM,
52
- ChainId.LIGHTLINK,
53
- ChainId.LINEA,
54
- ChainId.GRAPHLINQ,
55
- ChainId.IOTA,
56
- ChainId.CROSSFI,
57
- ],
58
- useRainbowKit: true,
59
- useHotBonds: true,
60
- theme: {{
61
- "radii": "10px",
62
- "colors": {
63
- "primaryButton": "#6560C5",
64
- "white1": "#0E0D16",
65
- "white2": "#161420",
66
- "white3": "#1F1D29",
67
- "white4": "#282632",
68
- "white5": "#312F3A",
69
- "text": "#FAFAFA",
70
- "primaryBright": "#FFF"
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, { sx: styles$c.bubbleContainer, children: [...Array(hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.length)].map((_, i) => {
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 ? 'home.title' : 'white4',
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
- return (jsx$2(ThemeUIProvider, { theme: Object.assign(Object.assign({}, defaultTheme), {
75467
- //@ts-ignore
75468
- colors: Object.assign(Object.assign({}, defaultTheme.colors), { primaryButton: (_a = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _a === void 0 ? void 0 : _a.primaryButton, white1: (_b = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _b === void 0 ? void 0 : _b.white1, white2: (_c = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _c === void 0 ? void 0 : _c.white2, white3: (_d = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _d === void 0 ? void 0 : _d.white3, white4: (_e = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _e === void 0 ? void 0 : _e.white4, white5: (_f = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _f === void 0 ? void 0 : _f.white5, text: (_g = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _g === void 0 ? void 0 : _g.text, primaryBright: (_h = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _h === void 0 ? void 0 : _h.primaryBright }), radii: { normal: theme === null || theme === void 0 ? void 0 : theme.radii } }), children: jsx$2(ModalProvider, { children: jsx$2(Popups, { children: children }) }) }));
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: 'alt' | 'standard';
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';
@@ -13,5 +13,8 @@ declare const colors: {
13
13
  textDisabledButton: string;
14
14
  text: string;
15
15
  textDisabled: string;
16
+ primaryBright: string;
17
+ abondGradient: string;
18
+ modalOverlay: string;
16
19
  };
17
20
  export default colors;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "3.0.10",
6
+ "version": "3.0.11",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",