@ape.swap/bonds-sdk 4.5.0-test.11 → 4.5.0-test.13

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.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { ChainId, Token } from '@ape.swap/apeswap-lists';
3
- declare const TokenSelectorPanel: ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled, }: {
2
+ import { ChainId, MarketingCampaign, Token } from '@ape.swap/apeswap-lists';
3
+ declare const TokenSelectorPanel: ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled, marketingCampaign, }: {
4
4
  typedValue: string;
5
5
  setTypedValue: (value: React.SetStateAction<string>) => void;
6
6
  selectedToken?: "NATIVE" | Token;
@@ -12,5 +12,6 @@ declare const TokenSelectorPanel: ({ typedValue, setTypedValue, selectedToken, b
12
12
  selectedTokenPrice?: number;
13
13
  bondPrincipalToken?: Token;
14
14
  inputDisabled?: boolean;
15
+ marketingCampaign?: MarketingCampaign;
15
16
  }) => React.JSX.Element;
16
17
  export default TokenSelectorPanel;
package/dist/main.js CHANGED
@@ -64838,6 +64838,7 @@ const fetchUserOwnedBills = (chainId, account, bonds, tokenPrices, priceApiUrl)
64838
64838
  payoutClaimed: (_p = billData[billPos][0]) === null || _p === void 0 ? void 0 : _p.payoutClaimed.toString(),
64839
64839
  billNftAddress: (_q = bond.billNnftAddress[bond.chainId]) !== null && _q !== void 0 ? _q : '',
64840
64840
  vesting: (_r = billData[billPos][0]) === null || _r === void 0 ? void 0 : _r.vesting.toString(),
64841
+ // TODO: sync this with solana so that both implementation have the same logic
64841
64842
  lastBlockTimestamp: (_s = billData[billPos][0]) === null || _s === void 0 ? void 0 : _s.vestingStartTimestamp.toString(),
64842
64843
  truePricePaid: (_t = billData[billPos][0]) === null || _t === void 0 ? void 0 : _t.truePricePaid.toString(),
64843
64844
  pendingRewards: billData[billPos + 1][0].toString(),
@@ -67650,61 +67651,52 @@ const AddFavToken = ({ tokenSymbol, hotBond }) => {
67650
67651
  }, children: jsx$2(AnimatePresence, { mode: "wait", children: jsx$2(motion.div, { initial: false, animate: { opacity: 1, scale: 1.0 }, exit: { opacity: 0, scale: 0.8 }, transition: { duration: 0.2 }, style: { display: 'flex' }, children: isFavToken ? (jsx$2(Svg, { icon: "StarFilled", width: 22, height: 22, color: '#DE62F3' })) : (jsx$2(Svg, { icon: hotBond ? 'FirePink' : 'Star', width: hotBond ? 25 : 20, height: hotBond ? 25 : 20, color: '#73728E' })) }, isFavToken ? 'StarFilled' : 'Star') }) }));
67651
67652
  };
67652
67653
 
67653
- // Styles of the row in the bonds list. In other words "/bonds" page.
67654
- const bondRowCampaignStyles = {
67655
- [main.MarketingCampaign.Christmas2025]: {
67656
- backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/fire.png)',
67657
- backgroundSize: 'cover',
67658
- },
67659
- };
67660
67654
  // Styles of the tag component.
67661
- const tagCampaignStyles = {
67655
+ const MCTagStyles = {
67662
67656
  [main.MarketingCampaign.Christmas2025]: {
67663
- background: '#FF5A00',
67657
+ background: '#DF4141',
67664
67658
  color: '#fff',
67665
67659
  },
67666
67660
  };
67667
- const tagIconCampaignStyles = {
67661
+ // Styles of the buy bond modal.
67662
+ const MCBuyComponentStyles = {
67668
67663
  [main.MarketingCampaign.Christmas2025]: {
67669
- display: 'flex',
67670
- position: 'absolute',
67671
- right: '-40px',
67672
- zIndex: 1,
67673
- backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/fireTag.png)',
67674
- backgroundSize: 'contain',
67675
- backgroundRepeat: 'no-repeat',
67676
- backgroundPosition: 'center',
67677
- width: '50px',
67678
- height: '35px',
67679
- marginRight: '4px',
67680
- top: '50%',
67681
- transform: 'translateY(-50%)',
67664
+ backgroundImage: 'url(https://ape.bond/images/mc/christmas-buy.png)',
67665
+ backgroundSize: 'cover',
67666
+ opacity: 1,
67682
67667
  },
67683
67668
  };
67684
- // Styles of the buy bond modal.
67685
- const buyComponentStyles = {
67669
+ const MCBondRowStyles = {
67686
67670
  [main.MarketingCampaign.Christmas2025]: {
67687
- backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/buyBond.png)',
67671
+ backgroundImage: 'url(https://ape.bond/images/mc/christmas-row.png)',
67688
67672
  backgroundSize: 'cover',
67673
+ opacity: 1,
67674
+ },
67675
+ };
67676
+ const MCColorMapping = {
67677
+ white3: {
67678
+ [main.MarketingCampaign.Christmas2025]: '#348C9E33 !important',
67679
+ },
67680
+ white4: {
67681
+ [main.MarketingCampaign.Christmas2025]: '#348C9E33 !important',
67689
67682
  },
67690
67683
  };
67691
67684
  // Styles of the token image displayed in the buy bond modal.
67692
- const tokenImageIconStyles = {
67685
+ const MCTokenIconStyles = {
67693
67686
  [main.MarketingCampaign.Christmas2025]: {
67694
- display: 'flex',
67695
- top: '12px',
67696
- left: '50%',
67697
- transform: 'translate(-50%, -50%)',
67698
- width: '55px',
67699
- height: '90px',
67700
- zIndex: 1,
67701
- backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/littleFire.png)',
67687
+ position: 'absolute',
67688
+ top: '-25px',
67689
+ left: '18%',
67690
+ width: '100%',
67691
+ height: '50px',
67692
+ zIndex: 10,
67693
+ backgroundImage: 'url(https://ape.bond/images/mc/christmas-hat.png)',
67702
67694
  backgroundRepeat: 'no-repeat',
67703
67695
  backgroundSize: 'contain',
67704
67696
  backgroundPosition: 'center',
67705
67697
  },
67706
67698
  };
67707
- const tagNameMapping = {
67699
+ const MCTagNameMapping = {
67708
67700
  [main.MarketingCampaign.Christmas2025]: 'Christmas Sale',
67709
67701
  };
67710
67702
 
@@ -67744,13 +67736,13 @@ const TokenInfoAndName = ({ tokenSymbol, chain, tag, vestEnds, isHotBond, market
67744
67736
  } }), jsx$2(Flex, { className: "tokeninfoname chain", children: jsx$2(Svg, { width: 20, height: 20, icon: chain ? NETWORK_ICONS[chain] : 'question' }) }), jsxs(Flex, { className: "tokeninfoname tokencontainer", sx: {
67745
67737
  marginTop: vestEnds ? ['10px', '10px', '10px', '0px'] : 0,
67746
67738
  maxWidth: ['175px', '175px', '140px', '190px', '190px'],
67747
- }, children: [jsx$2(TokenImage, { symbol: tokenSymbol === 'AIX' && chain === main.ChainId.SOL ? 'SOLAIX' : tokenSymbol, size: 33 }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [jsx$2(Flex, { sx: { justifyContent: 'space-between', width: '100%', alignItems: 'center' }, children: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '14px', '16px'] }, children: tokenSymbol }) }), vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { className: "tokeninfofav", sx: {
67739
+ }, children: [jsxs(Flex, { sx: { position: 'relative', minWidth: '33px' }, children: [jsx$2(Flex, { sx: MCTokenIconStyles[marketingCampaign] }), jsx$2(TokenImage, { symbol: tokenSymbol === 'AIX' && chain === main.ChainId.SOL ? 'SOLAIX' : tokenSymbol, size: 33 })] }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [jsx$2(Flex, { sx: { justifyContent: 'space-between', width: '100%', alignItems: 'center' }, children: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '14px', '16px'] }, children: tokenSymbol }) }), vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { className: "tokeninfofav", sx: {
67748
67740
  minWidth: '25px',
67749
67741
  p: '5px',
67750
67742
  }, children: jsx$2(AddFavToken, { tokenSymbol: tokenSymbol, hotBond: !vestEnds && isHotBond }) })] }), jsx$2(Flex, { sx: {
67751
67743
  justifyContent: isHotBond ? 'center' : 'flex-start',
67752
67744
  alignItems: 'center',
67753
- }, children: jsx$2(Flex, { sx: { display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'] }, children: (tag || marketingCampaign) && (jsx$2(ListTag, { text: tagNameMapping[marketingCampaign] || tag, marketingCampaign: marketingCampaign })) }) })] }));
67745
+ }, children: jsx$2(Flex, { sx: { display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'] }, children: (tag || marketingCampaign) && (jsx$2(ListTag, { text: MCTagNameMapping[marketingCampaign] || tag, marketingCampaign: marketingCampaign })) }) })] }));
67754
67746
  };
67755
67747
 
67756
67748
  //TODO: remove this shit
@@ -77153,7 +77145,7 @@ const TokenSelectorModal = ({ bondPrincipalToken, handleCurrencySelect, chainId,
77153
77145
  }) })] }) }) }));
77154
77146
  };
77155
77147
 
77156
- const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled = false, }) => {
77148
+ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled = false, marketingCampaign, }) => {
77157
77149
  var _a, _b;
77158
77150
  const { address: account } = useEVMAccount();
77159
77151
  const { publicKey: solanaAccount } = useSOLAccount();
@@ -77164,7 +77156,7 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChai
77164
77156
  setTypedValue(event.target.value);
77165
77157
  };
77166
77158
  const [onTokenSelectorModal] = useModal(jsx$2(TokenSelectorModal, { bondPrincipalToken: bondPrincipalToken, handleCurrencySelect: handleCurrencySelect, chainId: bondChainId }), true, false, `tokenSelectorOnLiquidityModal${(_b = bondPrincipalToken === null || bondPrincipalToken === void 0 ? void 0 : bondPrincipalToken.address) === null || _b === void 0 ? void 0 : _b[bondChainId]}-${bondPrincipalToken === null || bondPrincipalToken === void 0 ? void 0 : bondPrincipalToken.symbol}`);
77167
- return (jsxs(Flex$1, { className: "token-selector-panel", sx: { borderRadius: 'normal', opacity: 0.9 }, children: [jsxs(Flex$1, { className: "input-container inputrow", children: [jsx$2(Flex$1, { className: "input-container input", children: jsx$2(Input$1, { placeholder: "0.0", value: typedValue, pattern: "^[0-9]*[.,]?[0-9]*$", onChange: handleInputChange, onInput: (v) => {
77159
+ return (jsxs(Flex$1, { className: "token-selector-panel", sx: { borderRadius: 'normal', background: MCColorMapping.white3[marketingCampaign] }, children: [jsxs(Flex$1, { className: "input-container inputrow", children: [jsx$2(Flex$1, { className: "input-container input", children: jsx$2(Input$1, { placeholder: "0.0", value: typedValue, pattern: "^[0-9]*[.,]?[0-9]*$", onChange: handleInputChange, onInput: (v) => {
77168
77160
  if (v.currentTarget.value.includes(',')) {
77169
77161
  v.currentTarget.value = v.currentTarget.value.replace(/,/g, '.');
77170
77162
  }
@@ -77178,7 +77170,11 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChai
77178
77170
  !!v.currentTarget.value && isNumber$1(v.currentTarget.value) && parseFloat(v.currentTarget.value) >= 0
77179
77171
  ? v.currentTarget.value
77180
77172
  : v.currentTarget.value.slice(0, v.currentTarget.value.length - 1);
77181
- }, disabled: inputDisabled }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: { cursor: enableZap ? 'pointer' : 'default', borderRadius: 'normal' }, children: [jsxs(Flex$1, { sx: { alignItems: 'center', gap: '10px' }, children: [jsx$2(Flex$1, { className: "input-container bondicon", children: lodashExports.isArray(splited) ? (jsx$2(TokenImage, { symbol: splited[0], symbol2: splited[1], size: 28, chain: bondChainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, bondChainId), size: 28, chain: bondChainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, bondChainId) })] }), enableZap && (jsx$2(Flex$1, { sx: { mr: '8px' }, children: jsx$2(Svg, { icon: "caret" }) }))] })] }), jsxs(Flex$1, { className: "input-container balancerow", children: [jsx$2(Flex$1, { children: selectedTokenPrice && typedValue
77173
+ }, disabled: inputDisabled }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: {
77174
+ cursor: enableZap ? 'pointer' : 'default',
77175
+ borderRadius: 'normal',
77176
+ background: MCColorMapping.white4[marketingCampaign],
77177
+ }, children: [jsxs(Flex$1, { sx: { alignItems: 'center', gap: '10px' }, children: [jsx$2(Flex$1, { className: "input-container bondicon", children: lodashExports.isArray(splited) ? (jsx$2(TokenImage, { symbol: splited[0], symbol2: splited[1], size: 28, chain: bondChainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, bondChainId), size: 28, chain: bondChainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, bondChainId) })] }), enableZap && (jsx$2(Flex$1, { sx: { mr: '8px' }, children: jsx$2(Svg, { icon: "caret" }) }))] })] }), jsxs(Flex$1, { className: "input-container balancerow", children: [jsx$2(Flex$1, { sx: { opacity: 0.6 }, children: selectedTokenPrice && typedValue
77182
77178
  ? `$${formatUSDNumber((selectedTokenPrice * parseFloat(typedValue)).toFixed(2))}`
77183
77179
  : '' }), jsxs(Flex$1, { children: [showBalance && jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsx$2(Flex$1, { className: "balancerow max", children: showBalance && tokenBalance && tokenBalance !== '0' && handleValueBtn && (jsx$2(Fragment$1, { children: jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" }) })) })] })] })] }));
77184
77180
  };
@@ -78817,7 +78813,7 @@ const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
78817
78813
  height: '30px',
78818
78814
  mb: ['10px', '10px', '10px', '0px'],
78819
78815
  justifyContent: ['space-between', 'space-between', 'space-between', 'flex-end'],
78820
- }, children: [jsx$2(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'] }, children: jsx$2(BondModalMinTierHeader, { minTier: minTier }) }), jsx$2(Flex, { sx: { cursor: 'pointer' }, children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(Flex, { sx: { mx: '25px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) }), jsx$2(Flex, { onClick: handleClose, children: jsx$2(Svg, { icon: "close", color: "text", width: isMobile ? '12px' : '18px' }) })] })) : (jsx$2(Flex, { sx: { py: '3px', mt: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) })) })] }), jsxs(Flex, { sx: { width: '100%' }, children: [jsxs(Flex, { className: "title-container bondicon", children: [jsx$2(Flex, { sx: Object.assign({ display: 'none', position: 'absolute' }, tokenImageIconStyles[bondData.marketingCampaign]) }), jsx$2(Flex, { sx: { position: 'relative', zIndex: 2, display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: jsx$2(TokenImage, { symbol: (_b = bondData.showcaseTokenName) !== null && _b !== void 0 ? _b : bondData.earnToken.symbol, size: 50, chain: bondData.chainId }) })] }), jsxs(Flex, { sx: {
78816
+ }, children: [jsx$2(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'] }, children: jsx$2(BondModalMinTierHeader, { minTier: minTier }) }), jsx$2(Flex, { sx: { cursor: 'pointer' }, children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(Flex, { sx: { mx: '25px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) }), jsx$2(Flex, { onClick: handleClose, children: jsx$2(Svg, { icon: "close", color: "text", width: isMobile ? '12px' : '18px' }) })] })) : (jsx$2(Flex, { sx: { py: '3px', mt: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) })) })] }), jsxs(Flex, { sx: { width: '100%' }, children: [jsxs(Flex, { className: "title-container bondicon", children: [jsx$2(Flex, { sx: MCTokenIconStyles[bondData.marketingCampaign] }), jsx$2(TokenImage, { symbol: (_b = bondData.showcaseTokenName) !== null && _b !== void 0 ? _b : bondData.earnToken.symbol, size: 50, chain: bondData.chainId })] }), jsxs(Flex, { sx: {
78821
78817
  display: 'flex',
78822
78818
  flexDirection: 'column',
78823
78819
  pl: ['10px', '10px', '10px', '20px'],
@@ -78952,6 +78948,7 @@ const BondCards = ({ bondData }) => {
78952
78948
  borderBottomRightRadius: 'normal',
78953
78949
  borderBottomLeftRadius: 'normal',
78954
78950
  },
78951
+ background: MCColorMapping.white3[bondData.marketingCampaign],
78955
78952
  }, children: [jsxs(Flex, { className: "bond-card-title", children: [SDKConfig.namingPreference, jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(BonusComponent, { trueBondPrices: SDKConfig.namingPreference !== 'Discount' ? bondData.trueBondPrices : undefined, minTier: bondData.minTier, tooltipPosition: isMobile ? 'bottomRight' : 'bottomLeft', bonus: SDKConfig.namingPreference === 'Discount' ? `${(_a = bondData === null || bondData === void 0 ? void 0 : bondData.discountWithFee) === null || _a === void 0 ? void 0 : _a.toFixed(2)}%` : undefined })] }), jsxs("div", { className: "bond-card-block", sx: {
78956
78953
  borderRadius: ['0px', '0px', '0px', 'normal'],
78957
78954
  '&:first-of-type': {
@@ -78962,6 +78959,7 @@ const BondCards = ({ bondData }) => {
78962
78959
  borderBottomRightRadius: 'normal',
78963
78960
  borderBottomLeftRadius: 'normal',
78964
78961
  },
78962
+ background: MCColorMapping.white3[bondData.marketingCampaign],
78965
78963
  }, children: [jsxs("div", { className: "bond-card-title", children: ["Terms", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs("div", { className: "bond-card-content", children: [getVestingTermsString(bondData), bondData.vestingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: getVestingTermsTooltipString(bondData) }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] })] }), jsxs("div", { className: "bond-card-block", sx: {
78966
78964
  borderRadius: ['0px', '0px', '0px', 'normal'],
78967
78965
  '&:first-of-type': {
@@ -78972,6 +78970,7 @@ const BondCards = ({ bondData }) => {
78972
78970
  borderBottomRightRadius: 'normal',
78973
78971
  borderBottomLeftRadius: 'normal',
78974
78972
  },
78973
+ background: MCColorMapping.white3[bondData.marketingCampaign],
78975
78974
  }, children: [jsxs("div", { className: "bond-card-title", children: ["Max Buy", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.MaxBuy((_b = bondData === null || bondData === void 0 ? void 0 : bondData.earnToken) === null || _b === void 0 ? void 0 : _b.symbol) }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { className: "bond-card-content", sx: { alignItems: 'center' }, children: [jsx$2("div", { style: { paddingRight: '3px' }, children: jsx$2(TokenImage, { symbol: (_c = bondData.showcaseTokenName) !== null && _c !== void 0 ? _c : bondData.earnToken.symbol, size: 22, chain: bondData.chainId }) }), formatNumberSI(maxBuy(bondData, SDKConfig.showLowValueBonds).toFixed(0), 2)] })] }), jsxs("div", { className: "bond-card-block", sx: {
78976
78975
  borderRadius: ['0px', '0px', '0px', 'normal'],
78977
78976
  '&:first-of-type': {
@@ -78982,6 +78981,7 @@ const BondCards = ({ bondData }) => {
78982
78981
  borderBottomRightRadius: 'normal',
78983
78982
  borderBottomLeftRadius: 'normal',
78984
78983
  },
78984
+ background: MCColorMapping.white3[bondData.marketingCampaign],
78985
78985
  }, children: [jsxs(Flex, { className: "bond-card-title", children: ["Tokens Remaining", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: remainingPercentage(bondData) }), style: {
78986
78986
  width: '127px',
78987
78987
  height: '25px',
@@ -79654,7 +79654,7 @@ const BuyComponent = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond,
79654
79654
  }
79655
79655
  /* eslint-disable react-hooks/exhaustive-deps */
79656
79656
  }, [rateChanged]);
79657
- return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, buyComponentStyles[bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: zapEnabled, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice, inputDisabled: isUserRestricted }), SDKConfig.useTiers && jsx$2(GetUpToComponent, { bond: bondData, depositAmount: depositAmount }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
79657
+ return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, MCBuyComponentStyles[bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: zapEnabled, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice, inputDisabled: isUserRestricted, marketingCampaign: bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign }), SDKConfig.useTiers && jsx$2(GetUpToComponent, { bond: bondData, depositAmount: depositAmount }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
79658
79658
  width: '100%',
79659
79659
  background: '#DE62F366',
79660
79660
  // justifyContent: 'center',
@@ -81112,7 +81112,7 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
81112
81112
  }
81113
81113
  /* eslint-disable react-hooks/exhaustive-deps */
81114
81114
  }, [inputCurrencyBalance, zapListFetched]);
81115
- return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, buyComponentStyles[bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: true, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : undefined, selectedTokenPrice: inputTokenPrice }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
81115
+ return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, MCBuyComponentStyles[bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: true, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : undefined, selectedTokenPrice: inputTokenPrice }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
81116
81116
  width: '100%',
81117
81117
  background: '#DE62F366',
81118
81118
  justifyContent: 'center',
@@ -81741,7 +81741,7 @@ const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billT
81741
81741
  });
81742
81742
  };
81743
81743
  return (jsxs("div", { className: "bond-row" // Insert special campaign styles here
81744
- , onClick: handleOpenModal, sx: Object.assign(Object.assign({ borderRadius: 'normal' }, bondRowCampaignStyles['Christmas2025']), { cursor: !bondSoldOut || (soldoutBondsCount && !isOpen) ? 'pointer' : 'default' }), children: [jsx$2("div", { className: "token-info-container", sx: { width: ['40%', '40%', '40%', '30%'] }, children: jsx$2(TokenInfoAndName, { tokenSymbol: payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol, chain: bondChain, tag: tag, marketingCampaign: marketingCampaign }) }), SDKConfig.useCardsView && shortDescription && (jsx$2("div", { className: "short-description", children: jsx$2(SafeHTMLComponent, { html: shortDescription }) })), jsxs("div", { className: "bond-info-columns", sx: { width: ['60%', '60%', '60%', '70%'] }, children: [!SDKConfig.useCardsView && jsx$2(Flex, { sx: { display: ['none', 'none', 'none', 'flex'], width: '125px' } }), jsx$2(BonusContainer, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip }), jsxs("div", { className: "terms-column", children: [vestingTermString, vestingCliffString && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: vestingCliffString }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }), jsx$2("div", { className: "tokens-remaining-column", children: bondSoldOut ? ('-') : (jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: percentageAvailable }), style: {
81744
+ , onClick: handleOpenModal, sx: Object.assign(Object.assign({ borderRadius: 'normal' }, MCBondRowStyles[marketingCampaign]), { cursor: !bondSoldOut || (soldoutBondsCount && !isOpen) ? 'pointer' : 'default' }), children: [jsx$2("div", { className: "token-info-container", sx: { width: ['40%', '40%', '40%', '30%'] }, children: jsx$2(TokenInfoAndName, { tokenSymbol: payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol, chain: bondChain, tag: tag, marketingCampaign: marketingCampaign }) }), SDKConfig.useCardsView && shortDescription && (jsx$2("div", { className: "short-description", children: jsx$2(SafeHTMLComponent, { html: shortDescription }) })), jsxs("div", { className: "bond-info-columns", sx: { width: ['60%', '60%', '60%', '70%'] }, children: [!SDKConfig.useCardsView && jsx$2(Flex, { sx: { display: ['none', 'none', 'none', 'flex'], width: '125px' } }), jsx$2(BonusContainer, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip }), jsxs("div", { className: "terms-column", children: [vestingTermString, vestingCliffString && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: vestingCliffString }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }), jsx$2("div", { className: "tokens-remaining-column", children: bondSoldOut ? ('-') : (jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: percentageAvailable }), style: {
81745
81745
  width: '127px',
81746
81746
  height: '25px',
81747
81747
  flexDirection: 'column',
@@ -87633,7 +87633,7 @@ const SelectItem = (_a) => {
87633
87633
  };
87634
87634
 
87635
87635
  const ListTag = ({ text = '', marketingCampaign }) => {
87636
- return (jsxs(Flex, { sx: { position: 'relative' }, children: [jsx$2(Flex, { sx: Object.assign({ display: 'none' }, tagIconCampaignStyles[marketingCampaign]) }), jsx$2(Flex, { sx: Object.assign(Object.assign({ background: '#3C6AB530', color: '#3b78d3', fontSize: '10px', fontWeight: 600, lineHeight: '15px', p: '2px 6px', borderRadius: '5px', width: 'fit-content' }, tagCampaignStyles[marketingCampaign]), { zIndex: 2 }), children: text.toUpperCase() })] }));
87636
+ return (jsx$2(Flex, { sx: { position: 'relative' }, children: jsx$2(Flex, { sx: Object.assign({ background: '#3C6AB530', color: '#3b78d3', fontSize: '10px', fontWeight: 600, lineHeight: '15px', p: '2px 6px', borderRadius: '5px', width: 'fit-content', zIndex: 2 }, MCTagStyles[marketingCampaign]), children: text.toUpperCase() }) }));
87637
87637
  };
87638
87638
 
87639
87639
  const Context = createContext$1({
package/dist/styles.css CHANGED
@@ -73,18 +73,20 @@
73
73
  }
74
74
  .bonds-cards .bond-card-block {
75
75
  display: flex;
76
- padding: 8px 12px;
76
+ padding: 6px 12px;
77
77
  background: var(--theme-ui-colors-white3);
78
78
  width: 100%;
79
79
  align-items: center;
80
80
  justify-content: space-between;
81
- margin-bottom: 1px;
81
+ border-bottom: 1px solid var(--theme-ui-colors-white2);
82
+ max-height: 32px;
82
83
  }
83
84
  @media screen and (min-width: 800px) {
84
85
  .bonds-cards .bond-card-block {
85
86
  width: 350px;
86
87
  flex-direction: column;
87
88
  padding: 12px;
89
+ max-height: none;
88
90
  }
89
91
  }
90
92
  .bonds-cards .bond-card-block .bond-card-title {
@@ -379,12 +381,11 @@
379
381
  flex-direction: row;
380
382
  align-items: center;
381
383
  justify-content: space-between;
382
- opacity: 0.8;
383
384
  padding-left: 6px;
384
385
  }
385
386
 
386
387
  .balancerow.text {
387
- opacity: 0.8;
388
+ opacity: 0.6;
388
389
  align-items: center;
389
390
  font-size: 12px;
390
391
  }
@@ -1,8 +1,15 @@
1
1
  import { ThemeUIStyleObject } from 'theme-ui';
2
2
  import { MarketingCampaign } from '@ape.swap/apeswap-lists';
3
- export declare const bondRowCampaignStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
4
- export declare const tagCampaignStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
5
- export declare const tagIconCampaignStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
6
- export declare const buyComponentStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
7
- export declare const tokenImageIconStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
8
- export declare const tagNameMapping: Partial<Record<MarketingCampaign, string>>;
3
+ export declare const MCTagStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
4
+ export declare const MCBuyComponentStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
5
+ export declare const MCBondRowStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
6
+ export declare const MCColorMapping: {
7
+ white3: {
8
+ Christmas2025: string;
9
+ };
10
+ white4: {
11
+ Christmas2025: string;
12
+ };
13
+ };
14
+ export declare const MCTokenIconStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
15
+ export declare const MCTagNameMapping: Partial<Record<MarketingCampaign, string>>;
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": "4.5.0-test.11",
6
+ "version": "4.5.0-test.13",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",