@ape.swap/bonds-sdk 1.1.0-test.68 → 1.1.0-test.69

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.
@@ -0,0 +1,4 @@
1
+ export default function useChainFilterOption(): {
2
+ data: string[];
3
+ setChainFilterOption: (newValue: string[]) => void;
4
+ };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { BondsData } from '../../types/bonds';
3
+ import '../../scss/BondRow.scss';
4
+ interface BondRowProps {
5
+ key: string;
6
+ bond: BondsData;
7
+ hotBonds?: string[];
8
+ modalVariant?: 'standard' | 'alt';
9
+ }
10
+ declare const BondRow: React.FC<BondRowProps>;
11
+ export default BondRow;
@@ -0,0 +1,15 @@
1
+ /** @jsxImportSource theme-ui */
2
+ import React from 'react';
3
+ import '../../scss/BondRowHeader.scss';
4
+ interface BondRowHeaderProps {
5
+ searchQuery: string;
6
+ setSearchQuery: (value: string) => void;
7
+ setChainFilterOption: (newValue: string[]) => void;
8
+ chainFilterOption: string[];
9
+ filterOptions: string[];
10
+ filterOption: string;
11
+ setFilterOption: (newOption: string) => void;
12
+ onSort: (key: 'discount' | 'arr' | 'terms' | 'tokensRemaining') => void;
13
+ }
14
+ declare const BondRowHeader: React.FC<BondRowHeaderProps>;
15
+ export default BondRowHeader;
@@ -0,0 +1,11 @@
1
+ import { BondsData } from '../../types/bonds';
2
+ import '../../scss/BondRowsByChain.scss';
3
+ export interface BondRowsByChainProps {
4
+ bonds: BondsData[];
5
+ hotBonds?: string[];
6
+ hideTitles: boolean;
7
+ chains?: number[];
8
+ modalVariant?: 'standard' | 'alt';
9
+ }
10
+ declare const BondRowsByChain: React.FC<BondRowsByChainProps>;
11
+ export default BondRowsByChain;
@@ -0,0 +1,11 @@
1
+ import { BondsData } from '../../types/bonds';
2
+ import '../../scss/BondRowsWithTitle.scss';
3
+ export interface BondRowsWithTitleProps {
4
+ chain: number;
5
+ bonds: BondsData[];
6
+ hotBonds?: string[];
7
+ hideTitles: boolean;
8
+ modalVariant?: 'standard' | 'alt';
9
+ }
10
+ declare const BondRowsWithTitle: React.FC<BondRowsWithTitleProps>;
11
+ export default BondRowsWithTitle;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare const ChainTitle: ({ chain, pt, hideTitles, isOpen, }: {
3
+ chain: number;
4
+ pt: string;
5
+ hideTitles?: boolean;
6
+ isOpen: boolean;
7
+ }) => React.JSX.Element;
8
+ export default ChainTitle;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const DisconnectedPlaceholder: () => React.JSX.Element;
3
+ export default DisconnectedPlaceholder;
@@ -0,0 +1,11 @@
1
+ import { Language } from '../../contexts/Localization/types';
2
+ export declare const EN: Language;
3
+ export declare const ESES: Language;
4
+ export declare const JA: Language;
5
+ export declare const PTBR: Language;
6
+ export declare const RU: Language;
7
+ export declare const TR: Language;
8
+ export declare const ZHCN: Language;
9
+ export declare const ZHTW: Language;
10
+ export declare const languages: Record<string, Language>;
11
+ export declare const languageList: Language[];
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ContextApi } from './types';
3
+ export declare const languageMap: Map<string, Record<string, string>>;
4
+ export declare const LanguageContext: React.Context<ContextApi | undefined>;
5
+ export declare const LanguageProvider: ({ children }: {
6
+ children: React.ReactNode;
7
+ }) => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const LS_KEY = "apeswap_language";
2
+ export declare const fetchLocale: (locale: string) => Promise<any>;
3
+ export declare const getLanguageCodeFromLS: () => any;
@@ -0,0 +1,3 @@
1
+ export * from './Provider';
2
+ export { default as useTranslation } from './useTranslation';
3
+ export type { TranslateFunction } from './types';
@@ -0,0 +1,21 @@
1
+ import translations from '../../config/localization/translations.json';
2
+ export interface Language {
3
+ code: string;
4
+ language: string;
5
+ locale: string;
6
+ }
7
+ export type ContextData = {
8
+ [key: string]: string | number;
9
+ };
10
+ export interface ProviderState {
11
+ isFetching: boolean;
12
+ currentLanguage: Language;
13
+ }
14
+ export interface ContextApi extends ProviderState {
15
+ setLanguage: (language: Language) => void;
16
+ t: TranslateFunction;
17
+ }
18
+ type MaybeObject = Record<never, never>;
19
+ export type TranslationKey = keyof typeof translations | (string & MaybeObject);
20
+ export type TranslateFunction = (key: TranslationKey, data?: ContextData) => string;
21
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const useTranslation: () => import("./types").ContextApi;
2
+ export default useTranslation;
@@ -0,0 +1,2 @@
1
+ import { BondsData } from '../types/bonds';
2
+ export declare const useTopTags: (initialBondList?: BondsData[]) => string[];
package/dist/main.js CHANGED
@@ -79105,14 +79105,14 @@ const BuyAgainRow = () => {
79105
79105
  position: 'relative',
79106
79106
  overflow: 'hidden',
79107
79107
  width: '100%',
79108
- }, children: jsxs(Flex, { sx: {
79108
+ }, children: jsxs(Flex, { className: "buy-again-container", sx: {
79109
79109
  p: '0 1px',
79110
79110
  width: '100%',
79111
79111
  mt: '10px',
79112
79112
  background: 'linear-gradient(0deg, rgba(170, 128, 249, 0.20) 0%, rgba(170, 128, 249, 0.20) 100%), var(--Neutral-Elevation-2, #1F1D29)',
79113
79113
  borderRadius: 'normal',
79114
79114
  flexDirection: 'column',
79115
- }, children: [jsx$2(Flex, { sx: {
79115
+ }, children: [jsx$2(Flex, { className: "buy-again-row", sx: {
79116
79116
  width: '100%',
79117
79117
  fontSize: '12px',
79118
79118
  fontWeight: 500,
@@ -79161,7 +79161,7 @@ const styles$3 = {
79161
79161
  const SmallRecommendationCard = ({ recommendation }) => {
79162
79162
  var _a;
79163
79163
  const vestingTime = getTimePeriods((_a = recommendation.vestingTerm) !== null && _a !== void 0 ? _a : 0, true);
79164
- return (jsxs(Flex, { sx: styles$3.smallCardContainer, children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: recommendation.payoutTokenName, size: 32, chain: recommendation.chainId }), jsxs(Flex, { sx: { mx: '10px', alignItems: 'center' }, children: [jsx$2(Flex, { sx: { fontSize: '14px', px: '6px' }, children: recommendation.payoutTokenName }), jsxs(Flex, { sx: styles$3.subTitle, children: [vestingTime.days, "D"] })] })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: styles$3.subTitle, children: "Discount" }), jsxs(Flex, { sx: { fontSize: '12px', color: recommendation.discount > 0 ? 'success' : 'error', ml: '6px' }, children: [recommendation.discount.toFixed(2), "%"] })] })] }));
79164
+ return (jsxs(Flex, { className: "small-recommendation-card", sx: styles$3.smallCardContainer, children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: recommendation.payoutTokenName, size: 32, chain: recommendation.chainId }), jsxs(Flex, { sx: { mx: '10px', alignItems: 'center' }, children: [jsx$2(Flex, { sx: { fontSize: '14px', px: '6px' }, children: recommendation.payoutTokenName }), jsxs(Flex, { sx: styles$3.subTitle, children: [vestingTime.days, "D"] })] })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: styles$3.subTitle, children: "Discount" }), jsxs(Flex, { sx: { fontSize: '12px', color: recommendation.discount > 0 ? 'success' : 'error', ml: '6px' }, children: [recommendation.discount.toFixed(2), "%"] })] })] }));
79165
79165
  };
79166
79166
 
79167
79167
  const RecommendationCards = () => {
@@ -79197,18 +79197,18 @@ const RecommendationCards = () => {
79197
79197
  setActiveOption('Hot');
79198
79198
  }
79199
79199
  }, [account]);
79200
- return (jsxs(Flex, { sx: { mt: '15px', flexDirection: 'column', width: '100%', display: ['none', 'none', 'none', 'flex'] }, children: [jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsxs(Flex, { children: [jsx$2(Flex, { sx: {
79200
+ return (jsxs(Flex, { className: "recommendation-card-container", sx: { mt: '15px', flexDirection: 'column', width: '100%', display: ['none', 'none', 'none', 'flex'] }, children: [jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsxs(Flex, { className: "recommendation-selector", children: [jsx$2(Flex, { sx: {
79201
79201
  width: ['60px', '60px', '60px', 'unset'],
79202
79202
  mr: ['0px', '0px', '0px', '15px'],
79203
79203
  alignItems: 'center',
79204
79204
  color: 'grey',
79205
79205
  fontSize: ['11px'],
79206
79206
  fontWeight: 500,
79207
- }, children: "BONDS MARKETS:" }), jsx$2(RecommendationSelector, { options: options, activeOption: activeOption, setActiveOption: setActiveOption })] }), jsx$2(Flex, { sx: { display: ['none', 'none', 'none', 'flex'] }, children: jsx$2(Image, { width: 190, height: 20, alt: "poweredBy", src: "/images/bills/powered.png", sx: {
79207
+ }, children: "BONDS MARKETS:" }), jsx$2(RecommendationSelector, { options: options, activeOption: activeOption, setActiveOption: setActiveOption })] }), jsx$2(Flex, { className: 'powered-by-container', sx: { display: ['none', 'none', 'none', 'flex'] }, children: jsx$2(Image, { width: 190, height: 20, alt: "poweredBy", src: "/images/bills/powered.png", sx: {
79208
79208
  width: '190px',
79209
79209
  height: '20px',
79210
79210
  cursor: 'pointer',
79211
- } }) })] }), jsx$2(Flex, { sx: {
79211
+ } }) })] }), jsx$2(Flex, { className: "recommendation-card", sx: {
79212
79212
  my: '10px',
79213
79213
  minHeight: '47.45px',
79214
79214
  }, children: parsedBondsToRender &&
package/dist/styles.css CHANGED
@@ -59,6 +59,7 @@
59
59
  width: 100%;
60
60
  max-width: 700px;
61
61
  min-width: 700px;
62
+ padding: 20px;
62
63
  }
63
64
 
64
65
  .gpt {
@@ -79,6 +80,15 @@
79
80
  cursor: pointer;
80
81
  }
81
82
 
83
+ .slippage-cog.alt {
84
+ padding-top: 10px;
85
+ position: relative;
86
+ align-items: center;
87
+ left: 1020px;
88
+ cursor: pointer;
89
+ padding-bottom: 20px;
90
+ }
91
+
82
92
  .modaltable-container.title-container {
83
93
  font-weight: bold;
84
94
  font-size: 1.5rem;
@@ -405,6 +415,20 @@
405
415
  margin-left: 10px;
406
416
  }
407
417
 
418
+ .button-container.buy.alt {
419
+ justify-content: center;
420
+ align-items: center;
421
+ cursor: pointer;
422
+ }
423
+ .button-container.buy.alt .action-button {
424
+ width: 375px;
425
+ margin-left: 10px;
426
+ }
427
+ .button-container.buy.alt .switch-button {
428
+ width: 375px;
429
+ margin-left: 10px;
430
+ }
431
+
408
432
  .modaltable-container.accordion-container {
409
433
  display: flex;
410
434
  width: 100%;
@@ -489,13 +513,15 @@ span.flex-inline {
489
513
  }
490
514
 
491
515
  .footer-details {
492
- margin-left: -10px !important;
493
- margin-right: -10px !important;
494
- margin-bottom: -10px !important;
516
+ margin-left: -20px !important;
517
+ margin-right: -20px !important;
518
+ margin-bottom: -20px !important;
495
519
  margin-top: 20px !important;
496
520
  height: 50px;
497
521
  align-items: center;
498
522
  border-top: 1px solid #FFFFFF;
523
+ border-bottom-left-radius: 10px !important;
524
+ border-bottom-right-radius: 10px !important;
499
525
  }
500
526
 
501
527
  .expand-icon {
@@ -543,7 +569,7 @@ span.flex-inline {
543
569
  }
544
570
 
545
571
  .column.column-tokenicons {
546
- width: 50px;
572
+ width: 20%;
547
573
  flex-direction: row;
548
574
  align-items: center;
549
575
  justify-content: flex-start;
@@ -599,6 +625,13 @@ span.flex-inline {
599
625
  width: 30%;
600
626
  }
601
627
 
628
+ .column.column-hotbond {
629
+ flex-direction: row;
630
+ justify-content: center;
631
+ align-items: center;
632
+ width: 10%;
633
+ }
634
+
602
635
  .bondrow-header {
603
636
  display: flex;
604
637
  justify-content: space-around;
@@ -632,6 +665,10 @@ span.flex-inline {
632
665
  width: 40%;
633
666
  }
634
667
 
668
+ .column.column-search {
669
+ padding-bottom: 15px;
670
+ }
671
+
635
672
  .column.column-tokeninfoname {
636
673
  width: 100%;
637
674
  height: 100%;
@@ -650,7 +687,7 @@ span.flex-inline {
650
687
  }
651
688
 
652
689
  .column.column-tokenicons {
653
- width: 20%;
690
+ width: 0px;
654
691
  flex-direction: row;
655
692
  align-items: center;
656
693
  justify-content: flex-start;
@@ -659,7 +696,7 @@ span.flex-inline {
659
696
  .column.column-bondinfo {
660
697
  flex-direction: row;
661
698
  align-items: center;
662
- justify-content: flex-end;
699
+ justify-content: flex-start;
663
700
  width: 70%;
664
701
  }
665
702
 
@@ -701,6 +738,13 @@ span.flex-inline {
701
738
  width: 30%;
702
739
  }
703
740
 
741
+ .column.column-hotbond {
742
+ flex-direction: row;
743
+ justify-content: center;
744
+ align-items: center;
745
+ width: 10%;
746
+ }
747
+
704
748
  .column.tooltip {
705
749
  flex-direction: row;
706
750
  align-items: center;
@@ -730,7 +774,10 @@ span.flex-inline {
730
774
  width: 100%;
731
775
  display: flex;
732
776
  flex-direction: column;
733
- padding: 0 20px;
777
+ padding-top: 50px;
778
+ padding-left: 100px;
779
+ padding-right: 100px;
780
+ padding-bottom: 50px;
734
781
  }
735
782
 
736
783
  .bonds-spinner {
@@ -766,6 +813,24 @@ span.flex-inline {
766
813
  overflow: hidden;
767
814
  border-radius: 10px;
768
815
  }
816
+ @media (min-width: 576px) {
817
+ .tokeninfoname.container {
818
+ justify-content: space-between;
819
+ margin-right: 10px;
820
+ }
821
+ }
822
+ @media (min-width: 768px) {
823
+ .tokeninfoname.container {
824
+ justify-content: space-between;
825
+ margin-right: 10px;
826
+ }
827
+ }
828
+ @media (min-width: 992px) {
829
+ .tokeninfoname.container {
830
+ justify-content: flex-start;
831
+ margin-right: 0px;
832
+ }
833
+ }
769
834
 
770
835
  .tokeninfoname.gradient {
771
836
  position: absolute;
@@ -788,6 +853,7 @@ span.flex-inline {
788
853
  .tokeninfoname.tokencontainer {
789
854
  padding-left: 6px;
790
855
  width: 100%;
856
+ max-width: 170px;
791
857
  align-items: center;
792
858
  }
793
859
 
@@ -796,7 +862,6 @@ span.flex-inline {
796
862
  font-size: 16px;
797
863
  font-weight: 700;
798
864
  width: 100%;
799
- max-width: 100px;
800
865
  flex-direction: column;
801
866
  }
802
867
 
@@ -815,7 +880,10 @@ span.flex-inline {
815
880
  width: 100%;
816
881
  display: flex;
817
882
  flex-direction: column;
818
- padding: 0 20px;
883
+ padding-top: 50px;
884
+ padding-left: 100px;
885
+ padding-right: 100px;
886
+ padding-bottom: 50px;
819
887
  }
820
888
 
821
889
  .yourbonds.header-container {
@@ -1021,10 +1089,14 @@ span.flex-inline {
1021
1089
  flex-direction: column;
1022
1090
  border-radius: 10px;
1023
1091
  background-color: var(--theme-ui-colors-white2);
1092
+ padding: 10px;
1024
1093
  border-radius: 10px;
1025
1094
  z-index: 1001;
1026
1095
  max-width: 1200px;
1027
1096
  min-width: 1000px;
1097
+ height: auto;
1098
+ max-height: 60vh;
1099
+ min-height: 400px;
1028
1100
  overflow: auto;
1029
1101
  }
1030
1102
 
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": "1.1.0-test.68",
6
+ "version": "1.1.0-test.69",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -90,5 +90,6 @@
90
90
  "last 1 firefox version",
91
91
  "last 1 safari version"
92
92
  ]
93
- }
93
+ },
94
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
94
95
  }