@gearbox-protocol/ui-kit 4.0.0-next.54 → 4.0.0-next.55

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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../apy-breakdown-body/apy-breakdown-body.cjs"),p=require("../values/no-value.cjs"),i=require("../../../utils/apy-breakdown.cjs");require("@gearbox-protocol/sdk/onchain");require("clsx");require("tailwind-merge");require("luxon");require("../../../utils/z-index.cjs");require("viem");require("react");const r=require("./constants.cjs"),k=require("../../points-icon/points-icon.cjs"),w=require("../../token-icon/token-icon.cjs");require("../../tooltip/simple-tooltip.cjs");require("../../tooltip/tooltip.cjs");const t=require("../../typed-intl/index.cjs");require("../../badge/badge.cjs");require("../../badge/chip.cjs");function A({data:s,period:a}){const l=s?i.totalApyOf(s):void 0,d=s?.organicApy,c=s==null?void 0:(l??0)-(d??0),u=s?i.tokenRewardsOf(s):[],y=s?i.pointProgramsOf(s):[],m=[...u.filter(o=>o.supplyApr!=null),...y];return e.jsxs(n.ApyBreakdownBody,{testId:r.PoolApyBreakdownCardTest.root,title:e.jsx(t.FormattedMessageTyped,{messageId:n.periodMessageId(a,"components.poolApyBreakdownCard.title","components.poolApyBreakdownCard.title7d")}),chip:l==null?e.jsx(p.NoValue,{reason:a}):n.formatBreakdownRate(l),chipPositive:(l??0)>0,chipTestId:r.PoolApyBreakdownCardTest.net,children:[e.jsx(n.ApyBreakdownRow,{valueTestId:r.PoolApyBreakdownCardTest.value,label:e.jsx(t.FormattedMessageTyped,{messageId:n.periodMessageId(a,"components.poolApyBreakdownCard.organicApy","components.poolApyBreakdownCard.organicApy7d")}),value:d==null?e.jsx(p.NoValue,{reason:a}):n.formatBreakdownRate(d)}),e.jsx(n.ApyBreakdownRow,{valueTestId:r.PoolApyBreakdownCardTest.value,label:e.jsx(t.FormattedMessageTyped,{messageId:n.periodMessageId(a,"components.poolApyBreakdownCard.incentiveApy","components.poolApyBreakdownCard.incentiveApy7d")}),value:c==null?e.jsx(p.NoValue,{reason:a}):n.formatBreakdownRate(c)}),m.length>0?e.jsxs(e.Fragment,{children:[e.jsx(n.ApyBreakdownDivider,{}),u.map(o=>o.supplyApr==null?null:e.jsx(n.ApyBreakdownRow,{valueTestId:r.PoolApyBreakdownCardTest.reward,label:e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{children:e.jsx(t.FormattedMessageTyped,{messageId:"components.apyParts.extraAPY",values:{symbol:o.token.symbol}})}),e.jsx(w.TokenIcon,{token:o.token,symbol:o.token.symbol,size:16,className:"shrink-0"})]}),value:n.formatBreakdownRate(o.supplyApr)},`incentive-${o.token.address}-${o.supplyApr}`)),y.map(o=>e.jsx(n.ApyBreakdownRow,{valueTestId:r.PoolApyBreakdownCardTest.points,label:e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{children:e.jsx(t.FormattedMessageTyped,{messageId:"components.yieldBreakdown.programPoints",values:{name:o.name}})}),e.jsx(k.PointsIcon,{reward:{name:o.name,type:o.id},size:16,className:"shrink-0"})]}),value:o.multiplier!=null?`${o.multiplier}×`:n.BREAKDOWN_DASH},o.id))]}):null]})}exports.PoolApyBreakdownCardTest=r.PoolApyBreakdownCardTest;exports.PoolApyBreakdownCard=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../apy-breakdown-body/apy-breakdown-body.cjs"),l=require("../values/no-value.cjs"),p=require("../../../utils/apy-breakdown.cjs");require("@gearbox-protocol/sdk/onchain");require("clsx");require("tailwind-merge");require("luxon");require("../../../utils/z-index.cjs");require("viem");require("react");const a=require("./constants.cjs"),m=require("../../points-icon/points-icon.cjs"),u=require("../../token-icon/token-icon.cjs");require("../../tooltip/simple-tooltip.cjs");require("../../tooltip/tooltip.cjs");const t=require("../../typed-intl/index.cjs");require("../../badge/badge.cjs");require("../../badge/chip.cjs");function k({data:s,period:r}){const d=s?p.totalApyOf(s):void 0,i=s?.organicApy,c=s?p.tokenRewardsOf(s):[],y=s?p.pointProgramsOf(s):[];return e.jsxs(o.ApyBreakdownBody,{testId:a.PoolApyBreakdownCardTest.root,title:e.jsx(t.FormattedMessageTyped,{messageId:o.periodMessageId(r,"components.poolApyBreakdownCard.title","components.poolApyBreakdownCard.title7d")}),chip:d==null?e.jsx(l.NoValue,{reason:r}):o.formatBreakdownRate(d),chipPositive:(d??0)>0,chipTestId:a.PoolApyBreakdownCardTest.net,children:[e.jsx(o.ApyBreakdownRow,{valueTestId:a.PoolApyBreakdownCardTest.value,label:e.jsx(t.FormattedMessageTyped,{messageId:o.periodMessageId(r,"components.poolApyBreakdownCard.organicApy","components.poolApyBreakdownCard.organicApy7d")}),value:i==null?e.jsx(l.NoValue,{reason:r}):o.formatBreakdownRate(i)}),c.length>0?c.map(n=>e.jsx(o.ApyBreakdownRow,{valueTestId:a.PoolApyBreakdownCardTest.value,label:e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{children:e.jsx(t.FormattedMessageTyped,{messageId:o.periodMessageId(r,"components.poolApyBreakdownCard.tokenIncentiveApy","components.poolApyBreakdownCard.tokenIncentiveApy7d"),values:{symbol:n.token.symbol}})}),e.jsx(u.TokenIcon,{token:n.token,symbol:n.token.symbol,size:16,className:"shrink-0"})]}),value:o.formatBreakdownRate(n.supplyApr??0)},`incentive-${n.token.address}`)):e.jsx(o.ApyBreakdownRow,{valueTestId:a.PoolApyBreakdownCardTest.value,label:e.jsx(t.FormattedMessageTyped,{messageId:o.periodMessageId(r,"components.poolApyBreakdownCard.incentiveApy","components.poolApyBreakdownCard.incentiveApy7d")}),value:s==null?e.jsx(l.NoValue,{reason:r}):o.formatBreakdownRate(0)}),y.length>0?e.jsxs(e.Fragment,{children:[e.jsx(o.ApyBreakdownDivider,{}),y.map(n=>e.jsx(o.ApyBreakdownRow,{valueTestId:a.PoolApyBreakdownCardTest.points,label:e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{children:e.jsx(t.FormattedMessageTyped,{messageId:"components.yieldBreakdown.programPoints",values:{name:n.name}})}),e.jsx(m.PointsIcon,{reward:{name:n.name,type:n.id},size:16,className:"shrink-0"})]}),value:n.multiplier!=null?`${n.multiplier}×`:o.BREAKDOWN_DASH},n.id))]}):null]})}exports.PoolApyBreakdownCardTest=a.PoolApyBreakdownCardTest;exports.PoolApyBreakdownCard=k;
@@ -1 +1 @@
1
- "use strict";const e={"errors.networkError":"Network error. Can't fetch data","errors.incorrectAddressError":"Incorrect address. Please, check url","errors.noOpenedAccountsError":"You have no opened Credit Accounts. Perhaps, you have recently been liquidated? Check notification centre to see more.","errors.notFound":"Not found","errors.tooManyRequests":"Too many requests","errors.incorrectAddress":"Incorrect address","components.errorMessage.oops":"Oops...","components.networkIndicator.title":"Network","components.infiniteScrollWrapper.showMore":"Show more","components.alertModal.ok":"Ok","components.footer.privacy":"Privacy Notice","components.footer.terms":"Terms of Service","components.footer.disclosure":"Risk Disclosure Statement","components.footer.legalNotice":"Legal Notice","components.footer.legal":"Legal Info","components.footer.gearbox":"Copyright © Gearbox Foundation 2023-2026.","components.footer.built":"Built at ETHGlobal MarketMake hackathon.","components.footer.version":"Version {value}","components.sdkStatus.connecting":"Connecting…","components.sdkStatus.connected":"Connected","components.sdkStatus.disconnected":"Not connected","components.creditAccountHistory.table.protocol":"Protocol","components.creditAccountHistory.table.operation":"Operation","components.creditAccountHistory.table.details":"Details","components.notificationCenter.empty":"No notifications yet","components.notificationCenter.requests":"Requests","components.notificationCenter.recent":"Recent","components.notificationCenter.clear":"Clear all","components.liquidationPrice.check":"Check Area","components.loading.loading":"Loading","components.loading.loadingPercent":"Loading {percent}%","components.loading.wait":"Please wait...","components.smartNumberInput.balance":"Balance","components.smartNumberInput.amountLabel":"Amount","components.smartNumberInput.inputTitle":"Token Amount","components.smartNumberInput.confirm.input":"Input","components.smartNumberInput.selectToken":"Select token","components.tipWindow.title":"Tip","components.healthFactor.low":"Extremely low! This HF may not cover possible oracle deviations.","components.headCell":"Sort by {value}","components.graphView.noData":"Can't get data for this graph","components.filterBlock.reset":"Reset All","components.filterModal.searchPlaceholder":"Search options...","components.filterModal.noOptionsAvailable":"No options available","components.filterModal.noOptionsMatchSearch":"No options match your search","components.filterModal.reset":"Reset","components.filterModal.apply":"Apply","components.value.accruing":"Averaged data is still being computed and will be available shortly.","components.APY.tip":"These APYs are derived from the underlying protocols’ APIs and may differ in reality. Check respective protocols for their methodology.","components.creditSessionDetailedLiquidation.graph.noData":"No data","components.creditSessionDetailedLiquidation.graph.legend.point":"Current Price","components.creditSessionDetailedLiquidation.graph.legend.area":"Liquidation Area","components.creditSessionDetailedLiquidation.graph.tip.hf":"Health Factor","components.creditSessionDetailedLiquidation.graph.tip.price":"Price","components.creditSessionDetailedLiquidation.table.noData":"No data","components.creditSessionDetailedLiquidation.table.seeGraph":"See graph","components.creditSessionDetailedLiquidation.table.asset":"Asset","components.creditSessionDetailedLiquidation.table.currentPrice":"Current Price","components.creditSessionDetailedLiquidation.table.modelPrice":"Model Price","components.apyParts.features.points":"Points","components.apyParts.features.incent":"Incent.","components.apyParts.supplyAPY":"Organic APY","components.apyParts.title":"APY Type","components.apyParts.supplyAPY.tip":"Yield from lending funds","components.apyParts.tokenYield":"Intrinsic APY","components.apyParts.tokenYield.tip":"Yield from holding wstETH","components.apyParts.extraAPY":"{symbol} Incentive","components.apyParts.extraAPY.tip":"Calculated at the current rate","components.apyParts.totalAPY":"Overall APY","components.apyParts.points":"{symbol} Incentive","components.apyParts.points.condition.crossDeposit":"For cross-chain deposits made via Omni","components.yieldBreakdown.titleNetAtLeverage":"Net APY at {leverage}× Leverage","components.yieldBreakdown.titleNetAtLeverage7d":"Net APY at {leverage}× Leverage (7d)","components.yieldBreakdown.titleNet":"Net APY","components.yieldBreakdown.titleNet7d":"Net APY (7d)","components.yieldBreakdown.collateralApy":"Collateral APY","components.yieldBreakdown.collateralApy7d":"Collateral APY (7d)","components.yieldBreakdown.baseApy":"Base APY","components.yieldBreakdown.baseApy7d":"Base APY (7d)","components.yieldBreakdown.incentive":"Incentive","components.yieldBreakdown.incentiveApy":"Incentive APY","components.yieldBreakdown.incentiveApy7d":"Incentive APY (7d)","components.yieldBreakdown.borrowRate":"Borrow Rate","components.yieldBreakdown.borrowRate7d":"Borrow Rate (7d)","components.yieldBreakdown.programPoints":"{name} Points","components.yieldBreakdown.points":"Points","components.openCopyButtons.copy":"Copy to clipboard","components.openCopyButtons.explorer":"View in explorer","components.poolAssetsTable.asset":"Name","components.poolAssetsTable.rate":"Effective Rate","components.poolAssetsTable.exposure":"Exposure","components.poolAssetsTable.cap":"Cap","components.poolAssetsTable.capUtilization":"Cap Utilization","components.poolAssetsTable.usage":"{amount} of {total}","components.poolAssetsTable.head.name":"Credit Manager","components.poolAssetsTable.head.currentDebt":"Current Debt","components.poolAssetsTable.head.assets":"Asset LT","components.poolCreditManagersTable.assets":"{amount} assets","components.creditManagerInfo.title":"Assets and LT’s","components.creditManagerInfo.info.title":"Credit Managers","components.creditManagerInfo.info.copy.tip":"Copy Credit Manager address","components.creditManagerInfo.info.minDebt":"Min Debt","components.creditManagerInfo.info.maxDebt":"Max Debt","components.creditManagerInfo.info.liquidationFee":"Liquid. Fee","components.creditManagerInfo.info.liquidationPremium":"Liquid. Premium","components.creditManagerInfo.info.interestFee":"Interest Fee","components.creditManagerInfo.info.debtLimit":"Debt Limit","components.creditManagerInfo.info.maxEnabledTokens":"Max Tokens","dialogs.oraclesAndLTInfo.filter.hide0Quota":"Hide 0-Quota","components.oraclesAndLTInfo.title":"Oracles and LTs","components.oraclesAndLTTable.head.token":"Token","components.oraclesAndLTTable.head.oracles":"Oracles","components.oraclesAndLTTable.head.lt":"LT","components.poolTable.pool":"Market","components.poolTable.market":"Market","components.poolTable.description.universal":"Universal","components.poolTable.supply":"Supply","components.poolTable.borrowed":"Borrowed","components.poolTable.supplyApy":"Supply APY","components.poolTable.supplyApy.tip":"Annual percentage yield that you earn for supplying capital. This number constantly changes as the utilization of the Markets goes up and down","components.poolTable.depositApy":"Deposit APY","components.poolTable.depositApy.tip":"Deposit APY breakdown: base rate, extra rewards, and points","components.poolTable.borrowApy":"Borrow Rate","components.poolTable.utilizationApy":"Utilization APY","components.poolTable.borrowApy.tip":"On top of the utilization borrow rate, there is a borrow quota rate for different assets","components.poolTable.utilization":"Utilization","components.poolTable.collateral":"Collateral","components.poolTable.collateral.showAll":"Show All","components.poolTable.balance":"Your Balance","components.poolTable.balance.tip":`You don't earn token rewards, only organic yield. Please migrate liquidity by using "Migrate" flow above.`,"components.poolTable.emptyList":"No Pools found","components.poolTable.notFound.dashboard":"You currently have no open Market positions.","components.poolTable.notFound.list":"No Markets found","components.poolTable.notFound.description.dashboard":"Choose earn above.","components.poolTable.notFound.description.list":"Choose another chain or toggle Show All Markets","components.poolTable.externalApy.tooltipShort":"{value} APY boost when depositing via {name}","components.poolTable.line.rwa.tip":"This is RWA market.","components.rewardsTooltip.without.title":"Without Leverage","components.rewardsTooltip.without.extra":"Extra APY","components.rewardsTooltip.without.extra.tip":"Any deposit through Gearbox","components.rewardsTooltip.with.title":"With {leverage} Leverage","components.rewardsTooltip.with.borrowRate":"{symbol} borrow rate","components.rewardsTooltip.with.quotaRate":"Quota Rate","components.rewardsTooltip.with.extra":"+ Extra APR","components.rewardsTooltip.button":"Click to show rewards details","components.strategiesTable.head.name":"Strategy","components.strategiesTable.head.rewards":"Rewards","components.strategiesTable.head.leverage":"Max Leverage","components.strategiesTable.head.earn":"You Can Earn","components.strategiesTable.body.notFound":"No strategy found","components.strategiesTable.line.disabled":"This strategy is currently not available, cause of lack or quota or liquidity. Please contact us on Discord, and we’ll assist you.","components.strategiesTable.line.name.disabled":"This strategy is currently not available","components.strategiesTable.line.points.tip":"For debt nominated in {symbol}","components.strategiesTable.line.points.tipAny":"For debt","components.strategiesTable.line.0slippage":"0-slippage","components.strategiesTable.line.0slippage.tip":"Wrapping/unwrapping happens directly through smart-contracts, so {symbol} deposits and withdrawals don't incur slippage.","components.strategiesTable.line.rwa":"RWA","components.strategiesTable.line.rwa.tip":"This strategy is available on RWA market.","dialogs.common.review":"Review","components.amountInput.max":"Max","components.amountInput.label":"Amount","components.amountInput.balance":"Balance","components.amountInput.selectToken":"Select token","components.amountInput.inputTitle":"Token Amount","components.leverageInput.label":"Leverage","components.leverageInput.reset":"Reset","components.leverageInput.available":"Available Leverage","components.healthFactorBlock.label":"Health Factor","components.healthFactorBlock.tip":"Health Factor is a numeric representation of your account 'health'. If your health factor drops below 1 or close to it, you might be liquidated.","components.liquidationPriceBlock.label":"Liquidation Price","components.liquidationPriceBlock.tip":"The asset price at which the account's health factor would reach 1 and become eligible for liquidation.","components.timeToLiquidationBlock.label":"Time to Liquidation","components.timeToLiquidationBlock.tip":"Time to liquidation estimates how long the account can stay open if prices remain constant and no yield is earned—only accounting for borrow interest accrual.","components.historyChart.error":"Couldn't load chart data","components.historyChart.empty":"No data","components.positionTypeBadge.pool":"LP","components.positionTypeBadge.strategy":"Strategy","components.positionTypeBadge.liquidation":"Liquidation","components.positionStatusBadge.active":"Active","components.positionStatusBadge.repaid":"Repaid","components.titleMeta.unknownCurator":"Curator","components.moreAccordion.more":"More details","components.moreAccordion.less":"Less details","components.poolApyBreakdownCard.title":"Net APY","components.poolApyBreakdownCard.title7d":"Net APY (7d)","components.poolApyBreakdownCard.organicApy":"Base APY","components.poolApyBreakdownCard.organicApy7d":"Base APY (7d)","components.poolApyBreakdownCard.incentiveApy":"Incentive APY","components.poolApyBreakdownCard.incentiveApy7d":"Incentive APY (7d)","components.strategyApyBreakdownCard.formula":"{leverage} × {base}","components.strategyApyBreakdownCard.borrowFormula":"{leverage} × {totalRate} − {borrowRate}","components.leveragePresetChips.label":"Leverage:","components.liquidationParamsTable.lt":"Liquidation Threshold","components.liquidationParamsTable.penalty":"Liquidation Discount","components.liquidationParamsTable.premium":"Liquidation Premium","components.liquidationParamsTable.fee":"Liquidation Fee","components.borrowRateBlock.label":"Borrow Rate","components.borrowRateBlock.tip":"Borrow rate is displayed for your entire position size in total. You can reduce it in quota management.","components.borrowRateBlock.description":"Your borrow rate consists of the Base Rate plus the Quota Rates for every asset separately.","components.borrowRateBlock.baseRate":"Base Rate for Debt","components.borrowRateBlock.normalization":"Rates Normalization","components.borrowRateBlock.normalization.tip":"Borrowers pay {quota} and {utilization}, which have a different base. Therefore, the total borrow rate value is normalized by Account value or Debt amount.","components.transactionConfirm.previewLoading":"Parsing transaction…","components.transactionConfirm.previewErrorTitle":"Preview error"};module.exports=e;
1
+ "use strict";const e={"errors.networkError":"Network error. Can't fetch data","errors.incorrectAddressError":"Incorrect address. Please, check url","errors.noOpenedAccountsError":"You have no opened Credit Accounts. Perhaps, you have recently been liquidated? Check notification centre to see more.","errors.notFound":"Not found","errors.tooManyRequests":"Too many requests","errors.incorrectAddress":"Incorrect address","components.errorMessage.oops":"Oops...","components.networkIndicator.title":"Network","components.infiniteScrollWrapper.showMore":"Show more","components.alertModal.ok":"Ok","components.footer.privacy":"Privacy Notice","components.footer.terms":"Terms of Service","components.footer.disclosure":"Risk Disclosure Statement","components.footer.legalNotice":"Legal Notice","components.footer.legal":"Legal Info","components.footer.gearbox":"Copyright © Gearbox Foundation 2023-2026.","components.footer.built":"Built at ETHGlobal MarketMake hackathon.","components.footer.version":"Version {value}","components.sdkStatus.connecting":"Connecting…","components.sdkStatus.connected":"Connected","components.sdkStatus.disconnected":"Not connected","components.creditAccountHistory.table.protocol":"Protocol","components.creditAccountHistory.table.operation":"Operation","components.creditAccountHistory.table.details":"Details","components.notificationCenter.empty":"No notifications yet","components.notificationCenter.requests":"Requests","components.notificationCenter.recent":"Recent","components.notificationCenter.clear":"Clear all","components.liquidationPrice.check":"Check Area","components.loading.loading":"Loading","components.loading.loadingPercent":"Loading {percent}%","components.loading.wait":"Please wait...","components.smartNumberInput.balance":"Balance","components.smartNumberInput.amountLabel":"Amount","components.smartNumberInput.inputTitle":"Token Amount","components.smartNumberInput.confirm.input":"Input","components.smartNumberInput.selectToken":"Select token","components.tipWindow.title":"Tip","components.healthFactor.low":"Extremely low! This HF may not cover possible oracle deviations.","components.headCell":"Sort by {value}","components.graphView.noData":"Can't get data for this graph","components.filterBlock.reset":"Reset All","components.filterModal.searchPlaceholder":"Search options...","components.filterModal.noOptionsAvailable":"No options available","components.filterModal.noOptionsMatchSearch":"No options match your search","components.filterModal.reset":"Reset","components.filterModal.apply":"Apply","components.value.accruing":"Averaged data is still being computed and will be available shortly.","components.APY.tip":"These APYs are derived from the underlying protocols’ APIs and may differ in reality. Check respective protocols for their methodology.","components.creditSessionDetailedLiquidation.graph.noData":"No data","components.creditSessionDetailedLiquidation.graph.legend.point":"Current Price","components.creditSessionDetailedLiquidation.graph.legend.area":"Liquidation Area","components.creditSessionDetailedLiquidation.graph.tip.hf":"Health Factor","components.creditSessionDetailedLiquidation.graph.tip.price":"Price","components.creditSessionDetailedLiquidation.table.noData":"No data","components.creditSessionDetailedLiquidation.table.seeGraph":"See graph","components.creditSessionDetailedLiquidation.table.asset":"Asset","components.creditSessionDetailedLiquidation.table.currentPrice":"Current Price","components.creditSessionDetailedLiquidation.table.modelPrice":"Model Price","components.apyParts.features.points":"Points","components.apyParts.features.incent":"Incent.","components.apyParts.supplyAPY":"Organic APY","components.apyParts.title":"APY Type","components.apyParts.supplyAPY.tip":"Yield from lending funds","components.apyParts.tokenYield":"Intrinsic APY","components.apyParts.tokenYield.tip":"Yield from holding wstETH","components.apyParts.extraAPY":"{symbol} Incentive","components.apyParts.extraAPY.tip":"Calculated at the current rate","components.apyParts.totalAPY":"Overall APY","components.apyParts.points":"{symbol} Incentive","components.apyParts.points.condition.crossDeposit":"For cross-chain deposits made via Omni","components.yieldBreakdown.titleNetAtLeverage":"Net APY at {leverage}× Leverage","components.yieldBreakdown.titleNetAtLeverage7d":"Net APY at {leverage}× Leverage (7d)","components.yieldBreakdown.titleNet":"Net APY","components.yieldBreakdown.titleNet7d":"Net APY (7d)","components.yieldBreakdown.collateralApy":"Collateral APY","components.yieldBreakdown.collateralApy7d":"Collateral APY (7d)","components.yieldBreakdown.baseApy":"Base APY","components.yieldBreakdown.baseApy7d":"Base APY (7d)","components.yieldBreakdown.incentive":"Incentive","components.yieldBreakdown.incentiveApy":"Incentive APY","components.yieldBreakdown.incentiveApy7d":"Incentive APY (7d)","components.yieldBreakdown.borrowRate":"Borrow Rate","components.yieldBreakdown.borrowRate7d":"Borrow Rate (7d)","components.yieldBreakdown.programPoints":"{name} Points","components.yieldBreakdown.points":"Points","components.openCopyButtons.copy":"Copy to clipboard","components.openCopyButtons.explorer":"View in explorer","components.poolAssetsTable.asset":"Name","components.poolAssetsTable.rate":"Effective Rate","components.poolAssetsTable.exposure":"Exposure","components.poolAssetsTable.cap":"Cap","components.poolAssetsTable.capUtilization":"Cap Utilization","components.poolAssetsTable.usage":"{amount} of {total}","components.poolAssetsTable.head.name":"Credit Manager","components.poolAssetsTable.head.currentDebt":"Current Debt","components.poolAssetsTable.head.assets":"Asset LT","components.poolCreditManagersTable.assets":"{amount} assets","components.creditManagerInfo.title":"Assets and LT’s","components.creditManagerInfo.info.title":"Credit Managers","components.creditManagerInfo.info.copy.tip":"Copy Credit Manager address","components.creditManagerInfo.info.minDebt":"Min Debt","components.creditManagerInfo.info.maxDebt":"Max Debt","components.creditManagerInfo.info.liquidationFee":"Liquid. Fee","components.creditManagerInfo.info.liquidationPremium":"Liquid. Premium","components.creditManagerInfo.info.interestFee":"Interest Fee","components.creditManagerInfo.info.debtLimit":"Debt Limit","components.creditManagerInfo.info.maxEnabledTokens":"Max Tokens","dialogs.oraclesAndLTInfo.filter.hide0Quota":"Hide 0-Quota","components.oraclesAndLTInfo.title":"Oracles and LTs","components.oraclesAndLTTable.head.token":"Token","components.oraclesAndLTTable.head.oracles":"Oracles","components.oraclesAndLTTable.head.lt":"LT","components.poolTable.pool":"Market","components.poolTable.market":"Market","components.poolTable.description.universal":"Universal","components.poolTable.supply":"Supply","components.poolTable.borrowed":"Borrowed","components.poolTable.supplyApy":"Supply APY","components.poolTable.supplyApy.tip":"Annual percentage yield that you earn for supplying capital. This number constantly changes as the utilization of the Markets goes up and down","components.poolTable.depositApy":"Deposit APY","components.poolTable.depositApy.tip":"Deposit APY breakdown: base rate, extra rewards, and points","components.poolTable.borrowApy":"Borrow Rate","components.poolTable.utilizationApy":"Utilization APY","components.poolTable.borrowApy.tip":"On top of the utilization borrow rate, there is a borrow quota rate for different assets","components.poolTable.utilization":"Utilization","components.poolTable.collateral":"Collateral","components.poolTable.collateral.showAll":"Show All","components.poolTable.balance":"Your Balance","components.poolTable.balance.tip":`You don't earn token rewards, only organic yield. Please migrate liquidity by using "Migrate" flow above.`,"components.poolTable.emptyList":"No Pools found","components.poolTable.notFound.dashboard":"You currently have no open Market positions.","components.poolTable.notFound.list":"No Markets found","components.poolTable.notFound.description.dashboard":"Choose earn above.","components.poolTable.notFound.description.list":"Choose another chain or toggle Show All Markets","components.poolTable.externalApy.tooltipShort":"{value} APY boost when depositing via {name}","components.poolTable.line.rwa.tip":"This is RWA market.","components.rewardsTooltip.without.title":"Without Leverage","components.rewardsTooltip.without.extra":"Extra APY","components.rewardsTooltip.without.extra.tip":"Any deposit through Gearbox","components.rewardsTooltip.with.title":"With {leverage} Leverage","components.rewardsTooltip.with.borrowRate":"{symbol} borrow rate","components.rewardsTooltip.with.quotaRate":"Quota Rate","components.rewardsTooltip.with.extra":"+ Extra APR","components.rewardsTooltip.button":"Click to show rewards details","components.strategiesTable.head.name":"Strategy","components.strategiesTable.head.rewards":"Rewards","components.strategiesTable.head.leverage":"Max Leverage","components.strategiesTable.head.earn":"You Can Earn","components.strategiesTable.body.notFound":"No strategy found","components.strategiesTable.line.disabled":"This strategy is currently not available, cause of lack or quota or liquidity. Please contact us on Discord, and we’ll assist you.","components.strategiesTable.line.name.disabled":"This strategy is currently not available","components.strategiesTable.line.points.tip":"For debt nominated in {symbol}","components.strategiesTable.line.points.tipAny":"For debt","components.strategiesTable.line.0slippage":"0-slippage","components.strategiesTable.line.0slippage.tip":"Wrapping/unwrapping happens directly through smart-contracts, so {symbol} deposits and withdrawals don't incur slippage.","components.strategiesTable.line.rwa":"RWA","components.strategiesTable.line.rwa.tip":"This strategy is available on RWA market.","dialogs.common.review":"Review","components.amountInput.max":"Max","components.amountInput.label":"Amount","components.amountInput.balance":"Balance","components.amountInput.selectToken":"Select token","components.amountInput.inputTitle":"Token Amount","components.leverageInput.label":"Leverage","components.leverageInput.reset":"Reset","components.leverageInput.available":"Available Leverage","components.healthFactorBlock.label":"Health Factor","components.healthFactorBlock.tip":"Health Factor is a numeric representation of your account 'health'. If your health factor drops below 1 or close to it, you might be liquidated.","components.liquidationPriceBlock.label":"Liquidation Price","components.liquidationPriceBlock.tip":"The asset price at which the account's health factor would reach 1 and become eligible for liquidation.","components.timeToLiquidationBlock.label":"Time to Liquidation","components.timeToLiquidationBlock.tip":"Time to liquidation estimates how long the account can stay open if prices remain constant and no yield is earned—only accounting for borrow interest accrual.","components.historyChart.error":"Couldn't load chart data","components.historyChart.empty":"No data","components.positionTypeBadge.pool":"LP","components.positionTypeBadge.strategy":"Strategy","components.positionTypeBadge.liquidation":"Liquidation","components.positionStatusBadge.active":"Active","components.positionStatusBadge.repaid":"Repaid","components.titleMeta.unknownCurator":"Curator","components.moreAccordion.more":"More details","components.moreAccordion.less":"Less details","components.poolApyBreakdownCard.title":"Net APY","components.poolApyBreakdownCard.title7d":"Net APY (7d)","components.poolApyBreakdownCard.organicApy":"Base APY","components.poolApyBreakdownCard.organicApy7d":"Base APY (7d)","components.poolApyBreakdownCard.incentiveApy":"Incentive APY","components.poolApyBreakdownCard.incentiveApy7d":"Incentive APY (7d)","components.poolApyBreakdownCard.tokenIncentiveApy":"{symbol} Incentive APY","components.poolApyBreakdownCard.tokenIncentiveApy7d":"{symbol} Incentive APY (7d)","components.strategyApyBreakdownCard.formula":"{leverage} × {base}","components.strategyApyBreakdownCard.borrowFormula":"{leverage} × {totalRate} − {borrowRate}","components.leveragePresetChips.label":"Leverage:","components.liquidationParamsTable.lt":"Liquidation Threshold","components.liquidationParamsTable.penalty":"Liquidation Discount","components.liquidationParamsTable.premium":"Liquidation Premium","components.liquidationParamsTable.fee":"Liquidation Fee","components.borrowRateBlock.label":"Borrow Rate","components.borrowRateBlock.tip":"Borrow rate is displayed for your entire position size in total. You can reduce it in quota management.","components.borrowRateBlock.description":"Your borrow rate consists of the Base Rate plus the Quota Rates for every asset separately.","components.borrowRateBlock.baseRate":"Base Rate for Debt","components.borrowRateBlock.normalization":"Rates Normalization","components.borrowRateBlock.normalization.tip":"Borrowers pay {quota} and {utilization}, which have a different base. Therefore, the total borrow rate value is normalized by Account value or Debt amount.","components.transactionConfirm.previewLoading":"Parsing transaction…","components.transactionConfirm.previewErrorTitle":"Preview error"};module.exports=e;
@@ -1,7 +1,7 @@
1
- import { jsxs as a, jsx as e, Fragment as v } from "react/jsx-runtime";
2
- import { ApyBreakdownBody as w, formatBreakdownRate as p, ApyBreakdownRow as i, periodMessageId as d, ApyBreakdownDivider as g, BREAKDOWN_DASH as f } from "../apy-breakdown-body/apy-breakdown-body.js";
3
- import { NoValue as c } from "../values/no-value.js";
4
- import { totalApyOf as B, tokenRewardsOf as I, pointProgramsOf as h } from "../../../utils/apy-breakdown.js";
1
+ import { jsxs as a, jsx as e, Fragment as u } from "react/jsx-runtime";
2
+ import { ApyBreakdownBody as A, formatBreakdownRate as l, ApyBreakdownRow as p, periodMessageId as i, ApyBreakdownDivider as v, BREAKDOWN_DASH as w } from "../apy-breakdown-body/apy-breakdown-body.js";
3
+ import { NoValue as d } from "../values/no-value.js";
4
+ import { totalApyOf as g, tokenRewardsOf as B, pointProgramsOf as I } from "../../../utils/apy-breakdown.js";
5
5
  import "@gearbox-protocol/sdk/onchain";
6
6
  import "clsx";
7
7
  import "tailwind-merge";
@@ -9,105 +9,106 @@ import "luxon";
9
9
  import "../../../utils/z-index.js";
10
10
  import "viem";
11
11
  import "react";
12
- import { PoolApyBreakdownCardTest as l } from "./constants.js";
13
- import { PointsIcon as b } from "../../points-icon/points-icon.js";
14
- import { TokenIcon as C } from "../../token-icon/token-icon.js";
12
+ import { PoolApyBreakdownCardTest as t } from "./constants.js";
13
+ import { PointsIcon as f } from "../../points-icon/points-icon.js";
14
+ import { TokenIcon as h } from "../../token-icon/token-icon.js";
15
15
  import "../../tooltip/simple-tooltip.js";
16
16
  import "../../tooltip/tooltip.js";
17
17
  import { FormattedMessageTyped as s } from "../../typed-intl/index.js";
18
18
  import "../../badge/badge.js";
19
19
  import "../../badge/chip.js";
20
- function _({
20
+ function W({
21
21
  data: n,
22
22
  period: r
23
23
  }) {
24
- const t = n ? B(n) : void 0, m = n?.organicApy, u = n == null ? void 0 : (t ?? 0) - (m ?? 0), y = n ? I(n) : [], A = n ? h(n) : [], k = [...y.filter((o) => o.supplyApr != null), ...A];
24
+ const m = n ? g(n) : void 0, c = n?.organicApy, y = n ? B(n) : [], k = n ? I(n) : [];
25
25
  return /* @__PURE__ */ a(
26
- w,
26
+ A,
27
27
  {
28
- testId: l.root,
28
+ testId: t.root,
29
29
  title: /* @__PURE__ */ e(
30
30
  s,
31
31
  {
32
- messageId: d(
32
+ messageId: i(
33
33
  r,
34
34
  "components.poolApyBreakdownCard.title",
35
35
  "components.poolApyBreakdownCard.title7d"
36
36
  )
37
37
  }
38
38
  ),
39
- chip: t == null ? /* @__PURE__ */ e(c, { reason: r }) : p(t),
40
- chipPositive: (t ?? 0) > 0,
41
- chipTestId: l.net,
39
+ chip: m == null ? /* @__PURE__ */ e(d, { reason: r }) : l(m),
40
+ chipPositive: (m ?? 0) > 0,
41
+ chipTestId: t.net,
42
42
  children: [
43
43
  /* @__PURE__ */ e(
44
- i,
44
+ p,
45
45
  {
46
- valueTestId: l.value,
46
+ valueTestId: t.value,
47
47
  label: /* @__PURE__ */ e(
48
48
  s,
49
49
  {
50
- messageId: d(
50
+ messageId: i(
51
51
  r,
52
52
  "components.poolApyBreakdownCard.organicApy",
53
53
  "components.poolApyBreakdownCard.organicApy7d"
54
54
  )
55
55
  }
56
56
  ),
57
- value: m == null ? /* @__PURE__ */ e(c, { reason: r }) : p(m)
57
+ value: c == null ? /* @__PURE__ */ e(d, { reason: r }) : l(c)
58
58
  }
59
59
  ),
60
- /* @__PURE__ */ e(
61
- i,
60
+ y.length > 0 ? y.map((o) => /* @__PURE__ */ e(
61
+ p,
62
+ {
63
+ valueTestId: t.value,
64
+ label: /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1.5", children: [
65
+ /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
66
+ s,
67
+ {
68
+ messageId: i(
69
+ r,
70
+ "components.poolApyBreakdownCard.tokenIncentiveApy",
71
+ "components.poolApyBreakdownCard.tokenIncentiveApy7d"
72
+ ),
73
+ values: { symbol: o.token.symbol }
74
+ }
75
+ ) }),
76
+ /* @__PURE__ */ e(
77
+ h,
78
+ {
79
+ token: o.token,
80
+ symbol: o.token.symbol,
81
+ size: 16,
82
+ className: "shrink-0"
83
+ }
84
+ )
85
+ ] }),
86
+ value: l(o.supplyApr ?? 0)
87
+ },
88
+ `incentive-${o.token.address}`
89
+ )) : /* @__PURE__ */ e(
90
+ p,
62
91
  {
63
- valueTestId: l.value,
92
+ valueTestId: t.value,
64
93
  label: /* @__PURE__ */ e(
65
94
  s,
66
95
  {
67
- messageId: d(
96
+ messageId: i(
68
97
  r,
69
98
  "components.poolApyBreakdownCard.incentiveApy",
70
99
  "components.poolApyBreakdownCard.incentiveApy7d"
71
100
  )
72
101
  }
73
102
  ),
74
- value: u == null ? /* @__PURE__ */ e(c, { reason: r }) : p(u)
103
+ value: n == null ? /* @__PURE__ */ e(d, { reason: r }) : l(0)
75
104
  }
76
105
  ),
77
- k.length > 0 ? /* @__PURE__ */ a(v, { children: [
78
- /* @__PURE__ */ e(g, {}),
79
- y.map(
80
- (o) => o.supplyApr == null ? null : /* @__PURE__ */ e(
81
- i,
82
- {
83
- valueTestId: l.reward,
84
- label: /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1.5", children: [
85
- /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
86
- s,
87
- {
88
- messageId: "components.apyParts.extraAPY",
89
- values: { symbol: o.token.symbol }
90
- }
91
- ) }),
92
- /* @__PURE__ */ e(
93
- C,
94
- {
95
- token: o.token,
96
- symbol: o.token.symbol,
97
- size: 16,
98
- className: "shrink-0"
99
- }
100
- )
101
- ] }),
102
- value: p(o.supplyApr)
103
- },
104
- `incentive-${o.token.address}-${o.supplyApr}`
105
- )
106
- ),
107
- A.map((o) => /* @__PURE__ */ e(
108
- i,
106
+ k.length > 0 ? /* @__PURE__ */ a(u, { children: [
107
+ /* @__PURE__ */ e(v, {}),
108
+ k.map((o) => /* @__PURE__ */ e(
109
+ p,
109
110
  {
110
- valueTestId: l.points,
111
+ valueTestId: t.points,
111
112
  label: /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1.5", children: [
112
113
  /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
113
114
  s,
@@ -117,7 +118,7 @@ function _({
117
118
  }
118
119
  ) }),
119
120
  /* @__PURE__ */ e(
120
- b,
121
+ f,
121
122
  {
122
123
  reward: { name: o.name, type: o.id },
123
124
  size: 16,
@@ -125,7 +126,7 @@ function _({
125
126
  }
126
127
  )
127
128
  ] }),
128
- value: o.multiplier != null ? `${o.multiplier}×` : f
129
+ value: o.multiplier != null ? `${o.multiplier}×` : w
129
130
  },
130
131
  o.id
131
132
  ))
@@ -135,6 +136,6 @@ function _({
135
136
  );
136
137
  }
137
138
  export {
138
- _ as PoolApyBreakdownCard,
139
- l as PoolApyBreakdownCardTest
139
+ W as PoolApyBreakdownCard,
140
+ t as PoolApyBreakdownCardTest
140
141
  };
@@ -188,6 +188,8 @@ const e = {
188
188
  "components.poolApyBreakdownCard.organicApy7d": "Base APY (7d)",
189
189
  "components.poolApyBreakdownCard.incentiveApy": "Incentive APY",
190
190
  "components.poolApyBreakdownCard.incentiveApy7d": "Incentive APY (7d)",
191
+ "components.poolApyBreakdownCard.tokenIncentiveApy": "{symbol} Incentive APY",
192
+ "components.poolApyBreakdownCard.tokenIncentiveApy7d": "{symbol} Incentive APY (7d)",
191
193
  "components.strategyApyBreakdownCard.formula": "{leverage} × {base}",
192
194
  "components.strategyApyBreakdownCard.borrowFormula": "{leverage} × {totalRate} − {borrowRate}",
193
195
  "components.leveragePresetChips.label": "Leverage:",
@@ -11,7 +11,8 @@ export interface PoolApyBreakdownCardProps {
11
11
  /**
12
12
  * How a pool's net APY is arrived at: base yield plus incentives.
13
13
  *
14
- * Base and Incentive add up to the chip. Token rewards and points programs
15
- * sit under a divider as a breakdown of the incentive, not as extra addends.
14
+ * A token reward names the incentive row (`GEAR Incentive APY`). With none,
15
+ * that row is still shown as Incentive APY at 0%. Points sit under a divider
16
+ * when present; they are not addends.
16
17
  */
17
18
  export declare function PoolApyBreakdownCard({ data, period, }: PoolApyBreakdownCardProps): React.ReactElement;
@@ -228,6 +228,8 @@ declare const _default: {
228
228
  "components.poolApyBreakdownCard.organicApy7d": "Base APY (7d)",
229
229
  "components.poolApyBreakdownCard.incentiveApy": "Incentive APY",
230
230
  "components.poolApyBreakdownCard.incentiveApy7d": "Incentive APY (7d)",
231
+ "components.poolApyBreakdownCard.tokenIncentiveApy": "{symbol} Incentive APY",
232
+ "components.poolApyBreakdownCard.tokenIncentiveApy7d": "{symbol} Incentive APY (7d)",
231
233
  "components.strategyApyBreakdownCard.formula": "{leverage} × {base}",
232
234
  "components.strategyApyBreakdownCard.borrowFormula": "{leverage} × {totalRate} − {borrowRate}",
233
235
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "4.0.0-next.54",
3
+ "version": "4.0.0-next.55",
4
4
  "description": "Internal UI components",
5
5
  "repository": {
6
6
  "type": "git",