@ape.swap/bonds-sdk 2.7.1 → 2.7.2-test.2

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/dist/main.js CHANGED
@@ -4359,7 +4359,7 @@ const Twitter = ({ direction = 'right', color = 'white', width, getStyles }) =>
4359
4359
  degree: deg[direction],
4360
4360
  color,
4361
4361
  });
4362
- return (jsx$2("svg", { width: width || '27', viewBox: "0 0 27 23", fill: "none", xmlns: "http://www.w3.org/2000/svg", sx: style, children: jsx$2("path", { d: "M26.7504 3.35709C25.8006 3.78243 24.7804 4.06982 23.7078 4.19972C24.8145 3.53043 25.6425 2.47705 26.0372 1.23613C24.9974 1.86034 23.8595 2.29971 22.6728 2.53515C21.8748 1.67397 20.8177 1.10316 19.6659 0.911352C18.514 0.719545 17.3317 0.917465 16.3025 1.47439C15.2733 2.03131 14.4548 2.91607 13.9741 3.99131C13.4934 5.06655 13.3774 6.2721 13.6441 7.42081C11.5373 7.31389 9.47624 6.76044 7.59475 5.79636C5.71326 4.83228 4.05337 3.47913 2.72279 1.82471C2.26783 2.61791 2.00623 3.53757 2.00623 4.517C2.00572 5.39871 2.22055 6.26692 2.63166 7.04459C3.04277 7.82226 3.63744 8.48535 4.36292 8.97502C3.52156 8.94796 2.69876 8.71819 1.96301 8.30482V8.3738C1.96292 9.61043 2.38616 10.809 3.1609 11.7662C3.93564 12.7233 5.01416 13.3801 6.21347 13.625C5.43297 13.8385 4.61467 13.87 3.82038 13.717C4.15875 14.781 4.81787 15.7115 5.70547 16.3781C6.59306 17.0448 7.6647 17.4142 8.77034 17.4347C6.89344 18.9238 4.57548 19.7316 2.18935 19.7281C1.76667 19.7282 1.34435 19.7032 0.924561 19.6534C3.34663 21.2273 6.16608 22.0626 9.04559 22.0594C18.7931 22.0594 24.1218 13.8998 24.1218 6.82303C24.1218 6.59312 24.1161 6.36091 24.1059 6.13099C25.1424 5.3734 26.0371 4.43526 26.7481 3.36054L26.7504 3.35709Z", fill: "white" }) }));
4362
+ return (jsx$2("svg", { width: width || '33', viewBox: "0 0 33 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", sx: style, children: jsxs("g", { children: [jsx$2("title", { children: "Layer 1" }), jsx$2("g", { id: "svg_1", children: jsx$2("path", { d: "m22.7035,6.25l3.308,0l-7.227,8.26l8.502,11.24l-6.657,0l-5.214,-6.817l-5.966,6.817l-3.31,0l7.73,-8.835l-8.156,-10.665l6.826,0l4.713,6.231l5.451,-6.231zm-1.161,17.52l1.833,0l-11.832,-15.644l-1.967,0l11.966,15.644z", id: "svg_2", fill: "red" }) })] }) }));
4363
4363
  };
4364
4364
 
4365
4365
  const Send = ({ direction = 'right', color = 'white', width, getStyles }) => {
@@ -69232,6 +69232,32 @@ const styles$b = {
69232
69232
  gap: '10px',
69233
69233
  zIndex: 3,
69234
69234
  },
69235
+ tagShareBond: {
69236
+ cursor: 'pointer',
69237
+ background: 'rgb(223 65 65 / 80%)',
69238
+ borderRadius: 'small',
69239
+ p: '1px 5px',
69240
+ position: 'absolute',
69241
+ height: '20px',
69242
+ left: '-235px',
69243
+ fontSize: '12px',
69244
+ fontWeight: 400,
69245
+ lineHeight: '17px',
69246
+ width: 'auto',
69247
+ top: '5px',
69248
+ '&:before': {
69249
+ content: '""',
69250
+ display: 'block',
69251
+ height: 0,
69252
+ width: 0,
69253
+ position: 'absolute',
69254
+ top: '50%',
69255
+ left: 'calc(100% - 0px)',
69256
+ border: '5px solid transparent',
69257
+ borderLeftColor: 'rgb(223 65 65 / 80%)',
69258
+ transform: 'translateY(-50%)',
69259
+ },
69260
+ },
69235
69261
  };
69236
69262
 
69237
69263
  var domToImage = {exports: {}};
@@ -70153,6 +70179,7 @@ function checkImageExists(fileName) {
70153
70179
  const LinkShare = ({ bondNFTData, userBill, }) => {
70154
70180
  var _a, _b, _c, _d;
70155
70181
  const [isLoading, setIsLoading] = useState(false);
70182
+ const [hideTag, setHideTag] = useState(false);
70156
70183
  const mainUrl = useURLByEnvironment('mainUrl');
70157
70184
  const apiUrl = (_a = useURLByEnvironment('apiV2')) !== null && _a !== void 0 ? _a : '';
70158
70185
  const shareUrl = `${mainUrl}/bond-nft?bondAddress=${(_c = (_b = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _b === void 0 ? void 0 : _b.billNftAddress) === null || _c === void 0 ? void 0 : _c.toLowerCase()}%26bondChain=${bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.chainId}%26tokenId=${userBill === null || userBill === void 0 ? void 0 : userBill.id}%26af=${(_d = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _d === void 0 ? void 0 : _d.createdAddressOwner}`;
@@ -70164,7 +70191,10 @@ const LinkShare = ({ bondNFTData, userBill, }) => {
70164
70191
  yield generateImageFromTemplate(bondNFTData, url, apiUrl);
70165
70192
  setIsLoading(false);
70166
70193
  });
70167
- return (jsx$2(Flex$1, { sx: styles$b.containerLinksShare, children: bondNFTData && bondNFTData.data && (jsxs(Fragment$1, { children: [jsx$2(Flex$1, { sx: styles$b.linkShareButton, onClick: () => handleShare(`https://twitter.com/intent/tweet?text=${text}&url=${shareUrl}`), children: isLoading ? jsx$2(Spinner, { size: 16 }) : jsx$2(Svg, { icon: "twitter", width: 16 }) }), jsx$2(Flex$1, { sx: styles$b.linkShareButton, onClick: () => handleShare(`https://warpcast.com/~/compose?text=${text}&embeds[]=${shareUrl}`), children: isLoading ? jsx$2(Spinner, { size: 16 }) : jsx$2(Svg, { icon: "Farcaster", width: 16 }) })] })) }));
70194
+ useEffect(() => {
70195
+ setTimeout(() => setHideTag(true), 10000);
70196
+ }, []);
70197
+ return (jsx$2(Flex$1, { sx: styles$b.containerLinksShare, children: bondNFTData && bondNFTData.data && (jsxs(Fragment$1, { children: [jsx$2(Link, { href: "https://app.fuul.xyz/incentives/apebond", target: "_blank", className: `fade-out ${hideTag ? 'hidden' : ''}`, children: jsx$2(Flex$1, { sx: styles$b.tagShareBond, children: "Share your Bonds and earn rewards!" }) }), jsx$2(Flex$1, { sx: styles$b.linkShareButton, onClick: () => handleShare(`https://twitter.com/intent/tweet?text=${text}&url=${shareUrl}`), children: isLoading ? jsx$2(Spinner, { size: 16 }) : jsx$2(Svg, { icon: "twitter", width: 24 }) }), jsx$2(Flex$1, { sx: styles$b.linkShareButton, onClick: () => handleShare(`https://warpcast.com/~/compose?text=${text}&embeds[]=${shareUrl}`), children: isLoading ? jsx$2(Spinner, { size: 16 }) : jsx$2(Svg, { icon: "Farcaster", width: 16 }) })] })) }));
70168
70198
  };
70169
70199
 
70170
70200
  const YourBondsModal = ({ onDismiss, userBill }) => {
@@ -70242,7 +70272,7 @@ const YourBondsModal = ({ onDismiss, userBill }) => {
70242
70272
  justifyContent: 'center',
70243
70273
  alignItems: 'center',
70244
70274
  zIndex: 1,
70245
- }, children: jsx$2(Spinner, { width: 100 }) })), jsx$2(LinkShare, { bondNFTData: bondNFTData, userBill: userBill })] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_k = (_j = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _j === void 0 ? void 0 : _j.showcaseTokenName) !== null && _k !== void 0 ? _k : (_m = (_l = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _l === void 0 ? void 0 : _l.earnToken) === null || _m === void 0 ? void 0 : _m.symbol, size: 40, chain: userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_p = (_o = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _o === void 0 ? void 0 : _o.showcaseTokenName) !== null && _p !== void 0 ? _p : userBill === null || userBill === void 0 ? void 0 : userBill.bond.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_r = (_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.tags) === null || _r === void 0 ? void 0 : _r.slice(0, 1).map((tag) => {
70275
+ }, children: jsx$2(Spinner, { width: 100 }) })), imgLoaded && jsx$2(LinkShare, { bondNFTData: bondNFTData, userBill: userBill })] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_k = (_j = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _j === void 0 ? void 0 : _j.showcaseTokenName) !== null && _k !== void 0 ? _k : (_m = (_l = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _l === void 0 ? void 0 : _l.earnToken) === null || _m === void 0 ? void 0 : _m.symbol, size: 40, chain: userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_p = (_o = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _o === void 0 ? void 0 : _o.showcaseTokenName) !== null && _p !== void 0 ? _p : userBill === null || userBill === void 0 ? void 0 : userBill.bond.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_r = (_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.tags) === null || _r === void 0 ? void 0 : _r.slice(0, 1).map((tag) => {
70246
70276
  return (jsx$2(Flex$1, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
70247
70277
  }) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["#", userBill === null || userBill === void 0 ? void 0 : userBill.id] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [jsxs(Flex$1, { className: "attributes-container", children: [jsxs(Flex$1, { className: "attributes-header", sx: {
70248
70278
  borderRadius: `${isOpenTraits ? '6px 6px 0px 0px' : 'normal'}`,
package/dist/styles.css CHANGED
@@ -1392,6 +1392,17 @@ span.flex-inline {
1392
1392
  opacity: 0;
1393
1393
  }
1394
1394
  }
1395
+ .fade-out {
1396
+ opacity: 1;
1397
+ visibility: visible;
1398
+ transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
1399
+ }
1400
+
1401
+ .fade-out.hidden {
1402
+ opacity: 0;
1403
+ visibility: hidden;
1404
+ }
1405
+
1395
1406
  .yourbondsmodal-backdrop {
1396
1407
  position: fixed;
1397
1408
  top: 0;
@@ -1,2 +1,2 @@
1
1
  import { ThemeUIStyleObject } from 'theme-ui';
2
- export declare const styles: Record<'linkShareButton' | 'containerLinksShare', ThemeUIStyleObject>;
2
+ export declare const styles: Record<'linkShareButton' | 'containerLinksShare' | 'tagShareBond', ThemeUIStyleObject>;
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": "2.7.1",
6
+ "version": "2.7.2-test.2",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",