@ape.swap/bonds-sdk 1.0.90 → 1.0.91

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.
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsxs as _jsxs, jsx as _jsx } from "theme-ui/jsx-runtime";
13
- import { Flex, ThemeUIProvider } from "theme-ui";
13
+ import { Flex, ThemeUIProvider, Input } from "theme-ui";
14
14
  import { useWeb3React } from "@web3-react/core";
15
15
  import { getColumnDiscountStyle } from '../Bonds/styles';
16
16
  import { defaultTheme } from '../../theme';
@@ -27,6 +27,6 @@ var BondModal = function (_a) {
27
27
  var vestingTime = function (vestingTerm) {
28
28
  return getTimePeriods(vestingTerm !== null && vestingTerm !== void 0 ? vestingTerm : 0, true);
29
29
  };
30
- return (_jsx(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: _jsx(Flex, __assign({ className: "modal modal-backdrop" }, { children: _jsxs(Flex, __assign({ className: "modal modal-content" }, { children: [isActive && account && (_jsxs("p", { children: ["Wallet Address: ", account] })), _jsxs(Flex, __assign({ className: "modal modal-header" }, { children: [_jsx(Flex, __assign({ className: "new" }, { children: "NEW" })), _jsxs(Flex, __assign({ className: "project-info" }, { children: ["Project Info", _jsx(Flex, __assign({ className: "project-info icon" }, { children: _jsx(Svg, { icon: "expand" }) }))] })), _jsx(Flex, __assign({ className: "svg-close", onClick: onClose }, { children: _jsx(Svg, { icon: "close" }) }))] })), _jsxs(Flex, __assign({ className: "modal-container table-container" }, { children: [_jsx(Flex, __assign({ className: "modal-container title-container" }, { children: _jsx("h2", { children: bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName }) })), _jsx(Flex, __assign({ className: "modal-container description-container" }, { children: _jsx("p", { children: bond === null || bond === void 0 ? void 0 : bond.shortDescription }) })), _jsxs(Flex, __assign({ className: "modal-container blocks-container" }, { children: [_jsxs(Flex, __assign({ className: "modal-block column-discount", sx: getColumnDiscountStyle((_b = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _b !== void 0 ? _b : 0) }, { children: [_jsxs(Flex, __assign({ className: "block-header header" }, { children: ["Discount", _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionFill" }) }))] })), "".concat((_c = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%")] })), _jsxs(Flex, __assign({ className: "modal-block column-arr" }, { children: [_jsxs(Flex, __assign({ className: "block-header header" }, { children: ["ARR", _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionFill" }) }))] })), "".concat("".concat(((((_d = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _d !== void 0 ? _d : 0) * 365) / vestingTime((_e = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _e !== void 0 ? _e : 0).days).toFixed(2), "%"))] })), _jsxs(Flex, __assign({ className: "modal-block column-term" }, { children: [_jsxs(Flex, __assign({ className: "block-header header" }, { children: ["Terms", _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionFill" }) }))] })), vestingTime((_f = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _f !== void 0 ? _f : 0).days ? "".concat(vestingTime((_g = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _g !== void 0 ? _g : 0).days, " D") : '-'] })), _jsxs(Flex, __assign({ className: "modal-block column-maxbuy" }, { children: [_jsxs(Flex, __assign({ className: "block-header header" }, { children: ["Max Buy", _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionFill" }) }))] })), "1,000,000"] }))] }))] })), _jsxs(Flex, __assign({ className: "modal-container button-container" }, { children: [_jsxs(Button, { children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName] }), _jsxs(Button, { children: ["Buy ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName] })] }))] })) })) })));
30
+ return (_jsx(ThemeUIProvider, __assign({ theme: defaultTheme }, { children: _jsx(Flex, __assign({ className: "modal modal-backdrop" }, { children: _jsxs(Flex, __assign({ className: "modal modal-content" }, { children: [isActive && account && (_jsxs("p", { children: ["Wallet Address: ", account] })), _jsxs(Flex, __assign({ className: "modal modal-header" }, { children: [_jsx(Flex, __assign({ className: "new" }, { children: "NEW" })), _jsxs(Flex, __assign({ className: "project-info" }, { children: ["Project Info", _jsx(Flex, __assign({ className: "project-info icon" }, { children: _jsx(Svg, { icon: "expand" }) }))] })), _jsx(Flex, __assign({ className: "svg-close", onClick: onClose }, { children: _jsx(Svg, { icon: "close" }) }))] })), _jsxs(Flex, __assign({ className: "modal-container table-container" }, { children: [_jsx(Flex, __assign({ className: "modal-container title-container" }, { children: _jsx("h2", { children: bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName }) })), _jsx(Flex, __assign({ className: "modal-container description-container" }, { children: _jsx("p", { children: bond === null || bond === void 0 ? void 0 : bond.shortDescription }) })), _jsxs(Flex, __assign({ className: "modal-container blocks-container" }, { children: [_jsxs(Flex, __assign({ className: "modal-block column-discount", sx: getColumnDiscountStyle((_b = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _b !== void 0 ? _b : 0) }, { children: [_jsxs(Flex, __assign({ className: "block-header header" }, { children: ["Discount", _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), "".concat((_c = bond === null || bond === void 0 ? void 0 : bond.discount) === null || _c === void 0 ? void 0 : _c.toFixed(2), "%")] })), _jsxs(Flex, __assign({ className: "modal-block column-arr" }, { children: [_jsxs(Flex, __assign({ className: "block-header header" }, { children: ["ARR", _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), "".concat("".concat(((((_d = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _d !== void 0 ? _d : 0) * 365) / vestingTime((_e = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _e !== void 0 ? _e : 0).days).toFixed(2), "%"))] })), _jsxs(Flex, __assign({ className: "modal-block column-term" }, { children: [_jsxs(Flex, __assign({ className: "block-header header" }, { children: ["Terms", _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), vestingTime((_f = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _f !== void 0 ? _f : 0).days ? "".concat(vestingTime((_g = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _g !== void 0 ? _g : 0).days, " D") : '-'] })), _jsxs(Flex, __assign({ className: "modal-block column-maxbuy" }, { children: [_jsxs(Flex, __assign({ className: "block-header header" }, { children: ["Max Buy", _jsx(Flex, __assign({ className: "block-header icon" }, { children: _jsx(Svg, { icon: "questionFill", width: "15px" }) }))] })), "1,000,000"] }))] })), _jsxs(Flex, __assign({ className: "modal-container text-container" }, { children: [_jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsx("div", { children: "You spend:" }), _jsxs("div", { children: ["0 ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName, " = $ 0"] })] })), _jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsxs("div", { children: ["Premium: ", _jsx(Svg, { icon: "questionFill", width: "15px" })] }), _jsx("div", { children: "$ 0" })] })), _jsxs(Flex, __assign({ className: "text-container row" }, { children: [_jsx("div", { children: "You get (over 90 days):" }), _jsxs("div", { children: ["0 ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName, " = $ 0"] })] }))] })), _jsxs(Flex, __assign({ className: "modal-container input-container" }, { children: [_jsx(Flex, __assign({ className: "input-container input" }, { children: _jsx(Input, { type: "number", className: "number-input", placeholder: "0.0" }) })), _jsx(Flex, __assign({ className: "input-container token" }, { children: "Token" }))] })), _jsxs(Flex, __assign({ className: "modal-container button-container" }, { children: [_jsx(Flex, __assign({ className: "button-container get" }, { children: _jsxs(Button, { children: ["Get ", bond === null || bond === void 0 ? void 0 : bond.principalTokenName] }) })), _jsx(Flex, __assign({ className: "button-container buy" }, { children: _jsxs(Button, { children: ["Buy ", bond === null || bond === void 0 ? void 0 : bond.showcaseTokenName] }) }))] }))] }))] })) })) })));
31
31
  };
32
32
  export default BondModal;
@@ -8,15 +8,15 @@
8
8
  display: flex;
9
9
  justify-content: center;
10
10
  align-items: center;
11
- z-index: 1000; /* Ensure it's on top */
11
+ z-index: 1000;
12
12
  }
13
13
 
14
14
  .modal.modal-content {
15
15
  display: flex;
16
16
  flex-direction: column;
17
17
  border-radius: 10px;
18
- background-color: #0E0D16;
19
- padding: 20px;
18
+ background-color: var(--theme-ui-colors-white2);
19
+ padding: 10px;
20
20
  border-radius: 10px;
21
21
  z-index: 1001;
22
22
  max-width: 700px;
@@ -27,6 +27,7 @@
27
27
  display: flex;
28
28
  justify-content: end;
29
29
  align-items: center;
30
+ padding: 5px;
30
31
 
31
32
  .svg-close {
32
33
  height: 12px;
@@ -75,7 +76,9 @@
75
76
  width: 100%;
76
77
  display: flex;
77
78
  flex-direction: column;
78
- padding: 10px;
79
+ padding-left: 10px;
80
+ padding-right: 10px;
81
+ padding-bottom: 10px;
79
82
  }
80
83
 
81
84
  .modal-container.title-container {
@@ -94,8 +97,8 @@
94
97
  align-items: center;
95
98
  width: 100%;
96
99
  justify-content: space-around;
97
- margin-bottom: 20px;
98
- margin-top: 20px;
100
+ margin-bottom: 10px;
101
+ margin-top: 5px;
99
102
  }
100
103
 
101
104
  .modal-block {
@@ -122,7 +125,6 @@
122
125
  .block-header.icon {
123
126
  padding-left: 5px;
124
127
  align-items: start;
125
- width: 18px;
126
128
  cursor: pointer;
127
129
  }
128
130
 
@@ -145,15 +147,76 @@
145
147
  width: 350px;
146
148
  }
147
149
 
150
+ .modal-container.text-container {
151
+ display: flex;
152
+ flex-direction: column;
153
+ justify-content: center;
154
+ font-size: 12px;
155
+ }
156
+
157
+ .text-container.row {
158
+ padding-top: 2px;
159
+ padding-bottom: 2px;
160
+ display: flex;
161
+ flex-direction: row;
162
+ justify-content: space-between;
163
+ }
164
+
165
+ .modal-container.input-container {
166
+ display: flex;
167
+ flex-direction: row;
168
+ background: var(--theme-ui-colors-white3);
169
+ border-radius: 10px;
170
+ min-height: 100px;
171
+ margin-top: 10px;
172
+ margin-bottom: 0px;
173
+ padding: 10px;
174
+ }
175
+
176
+ .input-container.input {
177
+ background: var(--theme-ui-colors-white3);
178
+ border-radius: 10px;
179
+ border: medium;
180
+ padding-right: 10px;
181
+ width: 80%;
182
+ height: 50px;
183
+ font-size: 22px;
184
+ }
185
+
186
+ .input-container.token {
187
+ display: flex;
188
+ background: var(--theme-ui-colors-white4);
189
+ border-radius: 10px;
190
+ position: relative;
191
+ width: 190px;
192
+ height: 40px;
193
+ padding: 5px 4px;
194
+ cursor: unset;
195
+ }
196
+
148
197
  .modal-container.button-container {
149
198
  width: 100%;
199
+ padding-top: 10px;
200
+ display: flex;
201
+ flex-direction: row;
202
+ justify-content: space-between;
203
+ }
204
+
205
+ .button-container.get {
206
+ justify-content: center;
207
+ align-items: center;
208
+ cursor: pointer;
150
209
 
151
210
  Button {
152
- justify-content: center;
153
- align-items: center;
154
- flex: 1;
155
- margin-left: 10px;
156
- margin-right: 10px;
157
- cursor: pointer;
211
+ width: 275px;
212
+ }
213
+ }
214
+
215
+ .button-container.buy {
216
+ justify-content: center;
217
+ align-items: center;
218
+
219
+ Button {
220
+ width: 375px;
158
221
  }
159
222
  }
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.0.90",
6
+ "version": "1.0.91",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",