@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 || '
|
|
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
|
-
|
|
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>;
|