@ape.swap/bonds-sdk 3.0.9 → 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.d.ts CHANGED
@@ -5,4 +5,5 @@ import FullBondsView from './views/FullBondsView';
5
5
  import ProjectView from './views/ProjectView';
6
6
  import { generateImageFromTemplate } from './views/YourBondsModal/components/LinkShare/utils';
7
7
  import { ChainId } from '@ape.swap/apeswap-lists';
8
- export { Bonds, BondModal, YourBonds, FullBondsView, ProjectView, generateImageFromTemplate, ChainId };
8
+ import SingleBond from './views/SingleBond';
9
+ export { Bonds, BondModal, YourBonds, FullBondsView, ProjectView, generateImageFromTemplate, ChainId, SingleBond };
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',
@@ -75369,12 +75369,7 @@ const colors$1 = {
75369
75369
  white3: '#1F1D29',
75370
75370
  white4: '#282632',
75371
75371
  white5: '#312F3A',
75372
- brandPrimary140: '#C1BDE7',
75373
- navBar: 'rgba(22, 20, 32, 0.8)',
75374
75372
  primaryButton: '#6560C5', //this should've been called just "primary"
75375
- primaryShade: '#514CA133',
75376
- secondary: '#E69275',
75377
- footer: '#000000',
75378
75373
  success: '#38A611',
75379
75374
  error: '#DF4141',
75380
75375
  yellow: '#FFB300',
@@ -75385,74 +75380,9 @@ const colors$1 = {
75385
75380
  // Text-related colors
75386
75381
  text: '#FAFAFA',
75387
75382
  textDisabled: '#424242',
75388
- home: {
75389
- c1: 'radial-gradient(50% 50% at 50% 50%, rgba(217, 217, 217, 0) 0%, rgba(217, 217, 217, 0.02) 100%)',
75390
- c2: 'radial-gradient(50% 50% at 50% 50%, rgba(217, 217, 217, 0) 0%, rgba(217, 217, 217, 0.02) 100%)',
75391
- c3: 'radial-gradient(50% 50% at 50% 50%, rgba(217, 217, 217, 0) 0%, rgba(217, 217, 217, 0.02) 100%)',
75392
- cShadow: 'transparent',
75393
- hideCircles: '#0E0D16',
75394
- title: 'linear-gradient(98.79deg, #6560C5 -2.37%, #E07753 100%)',
75395
- shadowImage: 'rgba(101, 96, 197, 0.25)',
75396
- },
75397
- backgroundDisabled: '#3c3742',
75398
- listTagBg: {
75399
- ape: 'linear-gradient(99.09deg, rgba(161, 101, 82, 0.8) 0%, rgba(255, 179, 0, 0.8) 106.96%)',
75400
- launch: 'rgba(213, 49, 49, 0.2)',
75401
- reserve: 'rgba(90, 208, 109, 0.2)',
75402
- liquidity: 'rgba(60, 106, 181, 0.19)',
75403
- ark: 'rgba(208, 126, 90, 0.8)',
75404
- hot: '#DF4141',
75405
- new: '#38A611',
75406
- default: '#38A611',
75407
- auto: '#DF4141',
75408
- beta: '#38A611',
75409
- max: '#38A611',
75410
- real_yield: '#F0B90B',
75411
- bondLp: 'rgba(254, 185, 1, 0.2)',
75412
- migration: '#6F6AC930',
75413
- cex_fund: 'rgba(213, 49, 49, 0.2)',
75414
- expired: '#E07753',
75415
- permatlock: '#38A611',
75416
- },
75417
- listTagTextColor: {
75418
- liquidity: '#3B78D3',
75419
- cex_fund: '#D53131',
75420
- },
75421
- //
75422
- body: '#FDFBF5',
75423
- lvl1: '#F1EADA',
75424
- lvl2: '#EADFC7',
75425
75383
  primaryBright: '#FAFAFA',
75426
- primaryDark: '#0B0B0B',
75427
- info: '#4D4040',
75428
- secondaryButtonDisableBg: '#F1EADA',
75429
- secondaryButtonDisableColor: 'rgba(66, 66, 66, 0.5)',
75430
- buttonDisabledText: '#A09F9C',
75431
- dividerColor: '#E2E2E2',
75432
- textareaColor: '#4D4040',
75433
- heading: '#4D4040',
75434
- black: '#000000',
75435
- gradient: 'linear-gradient(53.53deg, #A16552 15.88%, #E1B242 92.56%)',
75436
- smartGradient: 'linear-gradient(94.44deg, #BA801E -9.73%, #E7CF67 40.14%, #BA801E 93.01%)',
75437
- white2Opacity09: 'rgba(241, 234, 218, 0.50)',
75438
- radioChecked: '#FAFAFA',
75439
- navMenuLogo: '#C8BA9C',
75440
- input: '#4D4040',
75441
- primaryGray: '#4D40407F',
75442
- gray: '#7A7A7A',
75443
- brown: '#4D4040',
75444
- hoveredYellow: '#FFDA00',
75445
- hoveredSuccess: '#38A611B3',
75446
- hoveredDanger: '#DF4141B3',
75384
+ abondGradient: 'linear-gradient(98.79deg, #6560C5 -2.37%, #E07753 100%)',
75447
75385
  modalOverlay: 'rgba(66, 66, 66, 0.5)',
75448
- opacityBadge: 'rgba(66, 66, 66, 0.5)',
75449
- gnanaWarningBackground: '#FFB300',
75450
- moon: '#7A7A7A',
75451
- island: '#4D4040',
75452
- migration: '#6560C5',
75453
- bg1: 'linear-gradient(180deg, #FFFFFF 0%, #EEDFC7 10%, #FFFFFF 40%, #FEFAE0 50%, #EEDFC7 100%), linear-gradient(180deg, #FEFCEC 27.58%, #EEDFC7 79.74%, #FEFAE0 131.91%, #F5ECDD 154.81%)',
75454
- bg2: 'linear-gradient(180deg, #FEFCEC 27.58%, #EEDFC7 79.74%, #FEFAE0 131.91%, #F5ECDD 154.81%)',
75455
- progressBar: 'linear-gradient(90deg, #312E7A 0%, #5C4FAE 41.5%, #AD6568 74.5%, #AD6E66 100%)',
75456
75386
  };
75457
75387
 
75458
75388
  const defaultTheme = Object.assign(Object.assign(Object.assign({}, baseTheme), components), { colors: Object.assign({}, colors$1) });
@@ -75535,14 +75465,41 @@ BigNumber$1.config({
75535
75465
  DECIMAL_PLACES: 80,
75536
75466
  });
75537
75467
  const Providers = ({ children, theme }) => {
75538
- return (jsx$2(ThemeUIProvider, { theme: Object.assign(Object.assign({}, defaultTheme), {
75539
- //@ts-ignore
75540
- colors: Object.assign(Object.assign({}, defaultTheme.colors), { primaryButton: theme.colors.primaryButton, white1: theme.colors.white1, white2: theme.colors.white2, white3: theme.colors.white3, white4: theme.colors.white4, white5: theme.colors.white5, text: theme.colors.text, primaryBright: theme.colors.primaryBright }), radii: { normal: 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 }) }) }));
75541
75498
  };
75542
75499
 
75543
75500
  const BondsWithProviders = (props) => {
75544
75501
  useSDKConfig(props);
75545
- return (jsx$2(Providers, { theme: props.theme, children: jsx$2(Bonds, {}) }));
75502
+ return (jsx$2(Providers, { theme: props === null || props === void 0 ? void 0 : props.theme, children: jsx$2(Bonds, {}) }));
75546
75503
  };
75547
75504
 
75548
75505
  const YourBondsWithProviders = (props) => {
@@ -75557,7 +75514,7 @@ const BondModalWithProviders = (props) => {
75557
75514
 
75558
75515
  const FullBondsViewWithProviders = (props) => {
75559
75516
  useSDKConfig(props);
75560
- return (jsx$2(Providers, { theme: props.theme, children: jsx$2(FullBondsView, {}) }));
75517
+ return (jsx$2(Providers, { theme: props === null || props === void 0 ? void 0 : props.theme, children: jsx$2(FullBondsView, {}) }));
75561
75518
  };
75562
75519
 
75563
75520
  const styles$4 = {
@@ -91227,5 +91184,14 @@ const ProjectViewWithProviders = (props) => {
91227
91184
  return (jsx$2(Providers, { theme: props.theme, children: jsx$2(ProjectView, Object.assign({}, props)) }));
91228
91185
  };
91229
91186
 
91187
+ const SingleBond = () => {
91188
+ return jsx$2(Flex, { children: "asd!" });
91189
+ };
91190
+
91191
+ const SingleBondWithProviders = (props) => {
91192
+ useSDKConfig(props);
91193
+ return (jsx$2(Providers, { theme: props.theme, children: jsx$2(SingleBond, {}) }));
91194
+ };
91195
+
91230
91196
  var ChainId = types.ChainId;
91231
- export { BondModalWithProviders as BondModal, BondsWithProviders as Bonds, ChainId, FullBondsViewWithProviders as FullBondsView, ProjectViewWithProviders as ProjectView, YourBondsWithProviders as YourBonds, generateImageFromTemplate };
91197
+ export { BondModalWithProviders as BondModal, BondsWithProviders as Bonds, ChainId, FullBondsViewWithProviders as FullBondsView, ProjectViewWithProviders as ProjectView, SingleBondWithProviders as SingleBond, YourBondsWithProviders as YourBonds, generateImageFromTemplate };
@@ -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';
@@ -4,12 +4,7 @@ declare const colors: {
4
4
  white3: string;
5
5
  white4: string;
6
6
  white5: string;
7
- brandPrimary140: string;
8
- navBar: string;
9
7
  primaryButton: string;
10
- primaryShade: string;
11
- secondary: string;
12
- footer: string;
13
8
  success: string;
14
9
  error: string;
15
10
  yellow: string;
@@ -18,72 +13,8 @@ declare const colors: {
18
13
  textDisabledButton: string;
19
14
  text: string;
20
15
  textDisabled: string;
21
- home: {
22
- c1: string;
23
- c2: string;
24
- c3: string;
25
- cShadow: string;
26
- hideCircles: string;
27
- title: string;
28
- shadowImage: string;
29
- };
30
- backgroundDisabled: string;
31
- listTagBg: {
32
- ape: string;
33
- launch: string;
34
- reserve: string;
35
- liquidity: string;
36
- ark: string;
37
- hot: string;
38
- new: string;
39
- default: string;
40
- auto: string;
41
- beta: string;
42
- max: string;
43
- real_yield: string;
44
- bondLp: string;
45
- migration: string;
46
- cex_fund: string;
47
- expired: string;
48
- permatlock: string;
49
- };
50
- listTagTextColor: {
51
- liquidity: string;
52
- cex_fund: string;
53
- };
54
- body: string;
55
- lvl1: string;
56
- lvl2: string;
57
16
  primaryBright: string;
58
- primaryDark: string;
59
- info: string;
60
- secondaryButtonDisableBg: string;
61
- secondaryButtonDisableColor: string;
62
- buttonDisabledText: string;
63
- dividerColor: string;
64
- textareaColor: string;
65
- heading: string;
66
- black: string;
67
- gradient: string;
68
- smartGradient: string;
69
- white2Opacity09: string;
70
- radioChecked: string;
71
- navMenuLogo: string;
72
- input: string;
73
- primaryGray: string;
74
- gray: string;
75
- brown: string;
76
- hoveredYellow: string;
77
- hoveredSuccess: string;
78
- hoveredDanger: string;
17
+ abondGradient: string;
79
18
  modalOverlay: string;
80
- opacityBadge: string;
81
- gnanaWarningBackground: string;
82
- moon: string;
83
- island: string;
84
- migration: string;
85
- bg1: string;
86
- bg2: string;
87
- progressBar: string;
88
19
  };
89
20
  export default colors;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SingleBond: () => React.JSX.Element;
3
+ export default SingleBond;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SDKProps } from '../../state/useSDKConfig';
3
+ declare const SingleBondWithProviders: React.FC<SDKProps>;
4
+ export default SingleBondWithProviders;
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.9",
6
+ "version": "3.0.11",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",