@gearbox-protocol/ui-kit 4.0.0-next.7 → 4.0.0-next.8

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"),s=require("@gearbox-protocol/static"),d=require("react"),p=require("../base-link/base-link.cjs"),m=require("../icon-button/icon-button.cjs"),f=require("../simple-dropdown/simple-dropdown.cjs"),x=require("../simple-dropdown/simple-dropdown-menu-item.cjs"),D=require("../../hooks/use-media-query.cjs");require("@gearbox-protocol/sdk");const b=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../utils/z-index.cjs");function g(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const j=g(d),l=j.forwardRef(function({explorerLinks:n,className:r,title:o},c){const a=D.useIsMobile()?32:40,u=()=>o||e.jsx(m.IconButton,{ref:c,buttonType:"outlined",size:a,title:"View in explorer",className:b.cn(r),children:e.jsx("span",{className:"flex items-center justify-center text-foreground",children:e.jsx(s.IconExternal,{size:14})})});return e.jsx(f.SimpleDropdown,{title:u(),asChild:!0,placement:"bottom",align:"end",children:n?.map(i=>e.jsx(x.SimpleDropdownMenuItem,{asChild:!0,children:e.jsxs(p.BaseLink,{href:i.url,external:!0,className:"flex items-center gap-2",children:[i.name,e.jsx(s.IconExternal,{size:14,className:"ml-auto",style:{width:14,height:14}})]})},i.url))})});l.displayName="DetailedPageTitleExplorerDropdown";exports.DetailedPageTitleExplorerDropdown=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("@gearbox-protocol/static"),p=require("react"),d=require("../base-link/base-link.cjs"),m=require("../icon-button/icon-button.cjs"),x=require("../simple-dropdown/simple-dropdown.cjs"),f=require("../simple-dropdown/simple-dropdown-menu-item.cjs"),_=require("../tooltip/simple-tooltip.cjs");require("../tooltip/tooltip.cjs");const g=require("../typed-intl/index.cjs"),q=require("../../hooks/use-media-query.cjs");require("@gearbox-protocol/sdk");const j=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../utils/z-index.cjs");function D(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const b=D(p),l=b.forwardRef(function({explorerLinks:o,className:n,title:r},c){const a=q.useIsMobile()?32:40,u=()=>r||e.jsx(m.IconButton,{ref:c,buttonType:"outlined",size:a,className:j.cn(n),children:e.jsx("span",{className:"flex items-center justify-center text-foreground",children:e.jsx(s.IconExternal,{size:14})})});return e.jsx(_.SimpleTooltip,{title:e.jsx(x.SimpleDropdown,{title:u(),asChild:!0,placement:"bottom",align:"end",children:o?.map(i=>e.jsx(f.SimpleDropdownMenuItem,{asChild:!0,children:e.jsxs(d.BaseLink,{href:i.url,external:!0,className:"flex items-center gap-2",children:[i.name,e.jsx(s.IconExternal,{size:14,className:"ml-auto",style:{width:14,height:14}})]})},i.url))}),placement:"top",children:e.jsx(g.FormattedMessageTyped,{messageId:"components.openCopyButtons.explorer"})})});l.displayName="DetailedPageTitleExplorerDropdown";exports.DetailedPageTitleExplorerDropdown=l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("lightweight-charts"),S=require("luxon"),h=require("../../utils/format-number.cjs"),{MIN_DISPLAY_THRESHOLD:M,MAX_EXPONENTIAL_THRESHOLD:_}=h.FORMAT_CONSTANTS,O=(t,e,a="full")=>{if(h.isBelowDisplayThreshold(t))return e?`<${M}${e}`:`<${M}`;if(t===0)return e?`0${e}`:"0";const r=h.formatNumberWithSuffix(t,{maxExponentialThreshold:_,minimumFractionDigits:0,maximumFractionDigits:a==="short"?1:0,format:a,adaptiveDecimals:a==="short"});return e?`${r}${e}`:r},X=2,p=(t,e)=>{if(h.isBelowDisplayThreshold(t))return e?`<${M}${e}`:`<${M}`;if(t===0)return e?`0${e}`:"0";const a=h.toSignificantDigits(t,X);return e?`${a}${e}`:a},w=4,y=t=>{if(h.isBelowDisplayThreshold(t))return`<${M}`;if(t===0)return"0";const e=Math.round(t),a=Math.abs(t-e);return a>0&&a<.01?t.toFixed(12).replace(/0+$/,"").replace(/\.$/,""):h.toSignificantDigits(t,w)},P=(t,e)=>{if(h.isBelowDisplayThreshold(t))return e?`<${M} ${e}`:`<${M}`;if(t===0)return e?`0 ${e}`:"0";const a=Number.isInteger(t),r=Math.abs(t),i=a&&r>=1e3,s=Math.round(t),o=Math.abs(t-s);if(o>0&&o<.01&&!i){const D=t.toFixed(12).replace(/0+$/,"").replace(/\.$/,"");return e?`${D} ${e}`:D}const F=h.formatNumberWithSuffix(t,{maxExponentialThreshold:_,minimumFractionDigits:a?0:2,maximumFractionDigits:i?1:a?0:2,format:i?"short":"full",adaptiveDecimals:i});return e?`${F} ${e}`:F},E={"%":p,$:O,token:P,none:y},C=t=>E[t]||E.token;function U(t,e,a=4){if(t===0)return e?`0 ${e}`:"0";const r=e&&Math.abs(t)>=1e3?0:a,i=t.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:r});return e?`${i} ${e}`:i}function b(t,e,a){const r=a?.yScaleMin;let i=t.length>0?Math.min(...t):0,s=t.length>0?Math.max(...t):0,o=[];const u=()=>{const n=(i+s)/2;let c=1,m="";return n>=1e9?(c=1e9,m="B"):n>=1e6?(c=1e6,m="M"):n>=1e3&&(c=1e3,m="K"),{scale:c,suffix:m}},F=8,D=.02;let x=0;const A=(n,c,m,d)=>{const l=(c>1?n/c:n).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:d,useGrouping:!1});return c>1?`${l}${m}`:l},H=(n,c,m)=>{for(let d=0;d<=F;d++){const g=new Set;let l=!0;for(const $ of n){const f=A($,c,m,d);if(g.has(f)){l=!1;break}g.add(f)}if(l)return d}return F},R=n=>{if(r!==void 0&&n<r)return"";if(n===0)return"0";const{scale:c,suffix:m}=u();return A(n,c,m,x)};return{formatter:n=>R(n),tickmarksFormatter:n=>{const{scale:c,suffix:m}=u(),d=s-i,g=d>0?o.filter(f=>Math.abs(f)>=d*D):o,l=n.filter(f=>f!==0&&!(r!==void 0&&f<r));x=H([...l,...g],c,m);const $=new Set;return n.map(f=>{if(r!==void 0&&f<r)return"";const k=f===0?"0":A(f,c,m,x);return!k||$.has(k)?"":($.add(k),k)})},updateVisibleRange:n=>{n.length>0&&(i=Math.min(...n),s=Math.max(...n))},updateLastValues:n=>{o=[...n]}}}const L=t=>S.DateTime.fromSeconds(Number(t)).toFormat("dd/LL/yyyy HH:mm"),Y=t=>S.DateTime.fromSeconds(Number(t)).toFormat("HH:mm"),q=(t,e)=>p(Number(t),e),N={time:L,"%":q};function B(t){const e=new Map;return(a,r,i)=>{const s=S.DateTime.fromSeconds(Number(a));let o;if(t===0)o=s.toFormat("HH:mm");else switch(r){case T.TickMarkType.Year:o=s.toFormat("yyyy");break;case T.TickMarkType.Month:case T.TickMarkType.DayOfMonth:o=t>365?s.toFormat("dd MMM yyyy"):s.toFormat("dd MMM");break;case T.TickMarkType.Time:case T.TickMarkType.TimeWithSeconds:o=s.toFormat("HH:mm");break;default:o=s.toFormat("dd MMM")}let u=e.get(r);return u||(u=new Set,e.set(r,u)),u.has(o)?" ":(u.add(o),o)}}const I=(t,e)=>{if(t==="time"&&e&&e.length>0){const r=S.DateTime.fromSeconds(Number(e[0].time)),i=S.DateTime.fromSeconds(Number(e[e.length-1].time)),s=r.hasSame(i,"day"),o=s?0:Math.ceil(i.diff(r,"days").days);return{timeFormatter:s?Y:L,tickMarkFormatter:B(o)}}const a=N[t]||N.time;return{timeFormatter:a,tickMarkFormatter:r=>a(r,void 0)}},G=(t,e)=>I(t,e).timeFormatter;exports.createAdaptiveYAxisFormatter=b;exports.formatExactValue=U;exports.getXFormatter=G;exports.getXFormatters=I;exports.getYFormatter=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("lightweight-charts"),S=require("luxon"),h=require("../../utils/format-number.cjs"),{MIN_DISPLAY_THRESHOLD:F,MAX_EXPONENTIAL_THRESHOLD:_}=h.FORMAT_CONSTANTS,U=(t,e,o="full")=>{if(h.isBelowDisplayThreshold(t))return e?`<${F}${e}`:`<${F}`;if(t===0)return e?`0${e}`:"0";const r=h.formatNumberWithSuffix(t,{maxExponentialThreshold:_,minimumFractionDigits:0,maximumFractionDigits:o==="short"?1:0,format:o,adaptiveDecimals:o==="short"});return e?`${r}${e}`:r},X=2,I=(t,e)=>{if(h.isBelowDisplayThreshold(t))return e?`<${F}${e}`:`<${F}`;if(t===0)return e?`0${e}`:"0";const o=h.toSignificantDigits(t,X);return e?`${o}${e}`:o},y=4,P=t=>{if(h.isBelowDisplayThreshold(t))return`<${F}`;if(t===0)return"0";const e=Math.round(t),o=Math.abs(t-e);return o>0&&o<.01?t.toFixed(12).replace(/0+$/,"").replace(/\.$/,""):h.toSignificantDigits(t,y)},Y=(t,e)=>{if(h.isBelowDisplayThreshold(t))return e?`<${F} ${e}`:`<${F}`;if(t===0)return e?`0 ${e}`:"0";const o=Number.isInteger(t),r=Math.abs(t),i=o&&r>=1e3,s=Math.round(t),a=Math.abs(t-s);if(a>0&&a<.01&&!i){const $=t.toFixed(12).replace(/0+$/,"").replace(/\.$/,"");return e?`${$} ${e}`:$}const g=h.formatNumberWithSuffix(t,{maxExponentialThreshold:_,minimumFractionDigits:o?0:2,maximumFractionDigits:i?1:o?0:2,format:i?"short":"full",adaptiveDecimals:i});return e?`${g} ${e}`:g},p={"%":I,$:U,token:Y,none:P},C=t=>p[t]||p.token;function q(t,e,o=4){if(t===0)return e?`0 ${e}`:"0";const r=e&&Math.abs(t)>=1e3?0:o,i=t.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:r});return e?`${i} ${e}`:i}function x(t,e){return!t||e==="none"||e==="token"?t:e==="$"?`$${t}`:e==="%"?`${t}%`:`${t} ${e}`}function N(t){return t.includes("/")?"none":t}function B(t,e,o){const r=o?.yScaleMin;let i=t.length>0?Math.min(...t):0,s=t.length>0?Math.max(...t):0,a=[];const u=()=>{const n=(i+s)/2;let c=1,m="";return n>=1e9?(c=1e9,m="B"):n>=1e6?(c=1e6,m="M"):n>=1e3&&(c=1e3,m="K"),{scale:c,suffix:m}},g=8,$=.02;let A=0;const E=(n,c,m,d)=>{const M=(c>1?n/c:n).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:d,useGrouping:!1});return c>1?`${M}${m}`:M},R=(n,c,m)=>{for(let d=0;d<=g;d++){const T=new Set;let M=!0;for(const D of n){const f=E(D,c,m,d);if(T.has(f)){M=!1;break}T.add(f)}if(M)return d}return g},O=n=>{if(r!==void 0&&n<r)return"";if(n===0)return x("0",N(e));const{scale:c,suffix:m}=u();return x(E(n,c,m,A),N(e))};return{formatter:n=>O(n),tickmarksFormatter:n=>{const{scale:c,suffix:m}=u(),d=s-i,T=d>0?a.filter(f=>Math.abs(f)>=d*$):a,M=n.filter(f=>f!==0&&!(r!==void 0&&f<r));A=R([...M,...T],c,m);const D=new Set;return n.map(f=>{if(r!==void 0&&f<r)return"";const k=f===0?"0":E(f,c,m,A);return!k||D.has(k)?"":(D.add(k),x(k,N(e)))})},updateVisibleRange:n=>{n.length>0&&(i=Math.min(...n),s=Math.max(...n))},updateLastValues:n=>{a=[...n]}}}const H=t=>S.DateTime.fromSeconds(Number(t)).toFormat("dd/LL/yyyy HH:mm"),G=t=>S.DateTime.fromSeconds(Number(t)).toFormat("HH:mm"),V=(t,e)=>I(Number(t),e),L={time:H,"%":V};function W(t){const e=new Map;return(o,r,i)=>{const s=S.DateTime.fromSeconds(Number(o));let a;if(t===0)a=s.toFormat("HH:mm");else switch(r){case l.TickMarkType.Year:a=s.toFormat("yyyy");break;case l.TickMarkType.Month:case l.TickMarkType.DayOfMonth:a=t>365?s.toFormat("dd MMM yyyy"):s.toFormat("dd MMM");break;case l.TickMarkType.Time:case l.TickMarkType.TimeWithSeconds:a=s.toFormat("HH:mm");break;default:a=s.toFormat("dd MMM")}let u=e.get(r);return u||(u=new Set,e.set(r,u)),u.has(a)?" ":(u.add(a),a)}}const w=(t,e)=>{if(t==="time"&&e&&e.length>0){const r=S.DateTime.fromSeconds(Number(e[0].time)),i=S.DateTime.fromSeconds(Number(e[e.length-1].time)),s=r.hasSame(i,"day"),a=s?0:Math.ceil(i.diff(r,"days").days);return{timeFormatter:s?G:H,tickMarkFormatter:W(a)}}const o=L[t]||L.time;return{timeFormatter:o,tickMarkFormatter:r=>o(r,t)}},b=(t,e)=>w(t,e).timeFormatter;exports.createAdaptiveYAxisFormatter=B;exports.formatExactValue=q;exports.getXFormatter=b;exports.getXFormatters=w;exports.getYFormatter=C;exports.withYAxisUnit=x;
@@ -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.blockSyncPill.syncError":", sync error","components.blockSyncPill.syncedAt":", synced at {time}","components.blockSyncPill.syncing":", syncing…","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.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.collateralApy":"Collateral APY","components.yieldBreakdown.incentive":"Incentive","components.yieldBreakdown.borrowRate":"Borrow Rate","components.yieldBreakdown.programPoints":"{name} Points","components.yieldBreakdown.points":"Points","components.openCopyButtons.copy":"Copy to clipboard","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 APY","components.poolTable.utilizationApy":"Utilization APY","components.poolTable.borrowApy.tip":"On top of the utilization borrow APY, there is a borrow quota APY 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":"APY Breakdown","components.poolApyBreakdownCard.organicApy":"Pool organic APY","components.poolApyBreakdownCard.incentiveApy":"Incentive APY","components.strategyApyBreakdownCard.titleAtLeverage":"APY at {leverage}× Leverage","components.strategyApyBreakdownCard.collateralApy":"Collateral APY","components.strategyApyBreakdownCard.incentiveApy":"Incentive APY","components.strategyApyBreakdownCard.borrowRate":"Borrow Rate","components.strategyApyBreakdownCard.formula":"{base} × {leverage} Lev.","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.blockSyncPill.syncError":", sync error","components.blockSyncPill.syncedAt":", synced at {time}","components.blockSyncPill.syncing":", syncing…","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.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.collateralApy":"Collateral APY","components.yieldBreakdown.incentive":"Incentive","components.yieldBreakdown.borrowRate":"Borrow Rate","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 APY","components.poolTable.utilizationApy":"Utilization APY","components.poolTable.borrowApy.tip":"On top of the utilization borrow APY, there is a borrow quota APY 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":"APY Breakdown","components.poolApyBreakdownCard.organicApy":"Pool organic APY","components.poolApyBreakdownCard.incentiveApy":"Incentive APY","components.strategyApyBreakdownCard.titleAtLeverage":"APY at {leverage}× Leverage","components.strategyApyBreakdownCard.collateralApy":"Collateral APY","components.strategyApyBreakdownCard.incentiveApy":"Incentive APY","components.strategyApyBreakdownCard.borrowRate":"Borrow Rate","components.strategyApyBreakdownCard.formula":"{base} × {leverage} Lev.","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,59 +1,68 @@
1
- import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
- import { IconExternal as t } from "@gearbox-protocol/static";
3
- import * as a from "react";
4
- import { BaseLink as p } from "../base-link/base-link.js";
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
+ import { IconExternal as o } from "@gearbox-protocol/static";
3
+ import * as s from "react";
4
+ import { BaseLink as a } from "../base-link/base-link.js";
5
5
  import { IconButton as d } from "../icon-button/icon-button.js";
6
6
  import { SimpleDropdown as c } from "../simple-dropdown/simple-dropdown.js";
7
7
  import { SimpleDropdownMenuItem as f } from "../simple-dropdown/simple-dropdown-menu-item.js";
8
- import { useIsMobile as u } from "../../hooks/use-media-query.js";
8
+ import { SimpleTooltip as u } from "../tooltip/simple-tooltip.js";
9
+ import "../tooltip/tooltip.js";
10
+ import { FormattedMessageTyped as h } from "../typed-intl/index.js";
11
+ import { useIsMobile as x } from "../../hooks/use-media-query.js";
9
12
  import "@gearbox-protocol/sdk";
10
- import { cn as h } from "../../utils/cn.js";
13
+ import { cn as g } from "../../utils/cn.js";
11
14
  import "sonner";
12
15
  import "@gearbox-protocol/sdk/common-utils";
13
16
  import "luxon";
14
17
  import "../../utils/z-index.js";
15
- const x = a.forwardRef(function({ explorerLinks: o, className: i, title: l }, n) {
16
- const m = u() ? 32 : 40;
18
+ const D = s.forwardRef(function({ explorerLinks: r, className: i, title: m }, n) {
19
+ const l = x() ? 32 : 40;
17
20
  return /* @__PURE__ */ e(
18
- c,
21
+ u,
19
22
  {
20
- title: l || /* @__PURE__ */ e(
21
- d,
23
+ title: /* @__PURE__ */ e(
24
+ c,
22
25
  {
23
- ref: n,
24
- buttonType: "outlined",
25
- size: m,
26
- title: "View in explorer",
27
- className: h(i),
28
- children: /* @__PURE__ */ e("span", { className: "flex items-center justify-center text-foreground", children: /* @__PURE__ */ e(t, { size: 14 }) })
26
+ title: m || /* @__PURE__ */ e(
27
+ d,
28
+ {
29
+ ref: n,
30
+ buttonType: "outlined",
31
+ size: l,
32
+ className: g(i),
33
+ children: /* @__PURE__ */ e("span", { className: "flex items-center justify-center text-foreground", children: /* @__PURE__ */ e(o, { size: 14 }) })
34
+ }
35
+ ),
36
+ asChild: !0,
37
+ placement: "bottom",
38
+ align: "end",
39
+ children: r?.map((t) => /* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ p(
40
+ a,
41
+ {
42
+ href: t.url,
43
+ external: !0,
44
+ className: "flex items-center gap-2",
45
+ children: [
46
+ t.name,
47
+ /* @__PURE__ */ e(
48
+ o,
49
+ {
50
+ size: 14,
51
+ className: "ml-auto",
52
+ style: { width: 14, height: 14 }
53
+ }
54
+ )
55
+ ]
56
+ }
57
+ ) }, t.url))
29
58
  }
30
59
  ),
31
- asChild: !0,
32
- placement: "bottom",
33
- align: "end",
34
- children: o?.map((r) => /* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ s(
35
- p,
36
- {
37
- href: r.url,
38
- external: !0,
39
- className: "flex items-center gap-2",
40
- children: [
41
- r.name,
42
- /* @__PURE__ */ e(
43
- t,
44
- {
45
- size: 14,
46
- className: "ml-auto",
47
- style: { width: 14, height: 14 }
48
- }
49
- )
50
- ]
51
- }
52
- ) }, r.url))
60
+ placement: "top",
61
+ children: /* @__PURE__ */ e(h, { messageId: "components.openCopyButtons.explorer" })
53
62
  }
54
63
  );
55
64
  });
56
- x.displayName = "DetailedPageTitleExplorerDropdown";
65
+ D.displayName = "DetailedPageTitleExplorerDropdown";
57
66
  export {
58
- x as DetailedPageTitleExplorerDropdown
67
+ D as DetailedPageTitleExplorerDropdown
59
68
  };
@@ -1,45 +1,45 @@
1
1
  import { TickMarkType as g } from "lightweight-charts";
2
2
  import { DateTime as S } from "luxon";
3
- import { isBelowDisplayThreshold as x, FORMAT_CONSTANTS as X, toSignificantDigits as L, formatNumberWithSuffix as k } from "../../utils/format-number.js";
4
- const { MIN_DISPLAY_THRESHOLD: M, MAX_EXPONENTIAL_THRESHOLD: I } = X, P = (t, e, o = "full") => {
3
+ import { isBelowDisplayThreshold as x, FORMAT_CONSTANTS as P, toSignificantDigits as I, formatNumberWithSuffix as p } from "../../utils/format-number.js";
4
+ const { MIN_DISPLAY_THRESHOLD: M, MAX_EXPONENTIAL_THRESHOLD: H } = P, w = (t, e, o = "full") => {
5
5
  if (x(t))
6
6
  return e ? `<${M}${e}` : `<${M}`;
7
7
  if (t === 0)
8
8
  return e ? `0${e}` : "0";
9
- const r = k(t, {
10
- maxExponentialThreshold: I,
9
+ const r = p(t, {
10
+ maxExponentialThreshold: H,
11
11
  minimumFractionDigits: 0,
12
12
  maximumFractionDigits: o === "short" ? 1 : 0,
13
13
  format: o,
14
14
  adaptiveDecimals: o === "short"
15
15
  });
16
16
  return e ? `${r}${e}` : r;
17
- }, U = 2, p = (t, e) => {
17
+ }, C = 2, R = (t, e) => {
18
18
  if (x(t))
19
19
  return e ? `<${M}${e}` : `<${M}`;
20
20
  if (t === 0)
21
21
  return e ? `0${e}` : "0";
22
- const o = L(t, U);
22
+ const o = I(t, C);
23
23
  return e ? `${o}${e}` : o;
24
- }, C = 4, w = (t) => {
24
+ }, Y = 4, G = (t) => {
25
25
  if (x(t))
26
26
  return `<${M}`;
27
27
  if (t === 0)
28
28
  return "0";
29
29
  const e = Math.round(t), o = Math.abs(t - e);
30
- return o > 0 && o < 0.01 ? t.toFixed(12).replace(/0+$/, "").replace(/\.$/, "") : L(t, C);
31
- }, G = (t, e) => {
30
+ return o > 0 && o < 0.01 ? t.toFixed(12).replace(/0+$/, "").replace(/\.$/, "") : I(t, Y);
31
+ }, V = (t, e) => {
32
32
  if (x(t))
33
33
  return e ? `<${M} ${e}` : `<${M}`;
34
34
  if (t === 0)
35
35
  return e ? `0 ${e}` : "0";
36
36
  const o = Number.isInteger(t), r = Math.abs(t), i = o && r >= 1e3, s = Math.round(t), a = Math.abs(t - s);
37
37
  if (a > 0 && a < 0.01 && !i) {
38
- const $ = t.toFixed(12).replace(/0+$/, "").replace(/\.$/, "");
39
- return e ? `${$} ${e}` : $;
38
+ const D = t.toFixed(12).replace(/0+$/, "").replace(/\.$/, "");
39
+ return e ? `${D} ${e}` : D;
40
40
  }
41
- const F = k(t, {
42
- maxExponentialThreshold: I,
41
+ const F = p(t, {
42
+ maxExponentialThreshold: H,
43
43
  minimumFractionDigits: o ? 0 : 2,
44
44
  maximumFractionDigits: i ? 1 : o ? 0 : 2,
45
45
  format: i ? "short" : "full",
@@ -47,12 +47,12 @@ const { MIN_DISPLAY_THRESHOLD: M, MAX_EXPONENTIAL_THRESHOLD: I } = X, P = (t, e,
47
47
  });
48
48
  return e ? `${F} ${e}` : F;
49
49
  }, N = {
50
- "%": p,
51
- $: P,
52
- token: G,
53
- none: w
54
- }, J = (t) => N[t] || N.token;
55
- function Z(t, e, o = 4) {
50
+ "%": R,
51
+ $: w,
52
+ token: V,
53
+ none: G
54
+ }, v = (t) => N[t] || N.token;
55
+ function tt(t, e, o = 4) {
56
56
  if (t === 0)
57
57
  return e ? `0 ${e}` : "0";
58
58
  const r = e && Math.abs(t) >= 1e3 ? 0 : o, i = t.toLocaleString("en-US", {
@@ -61,14 +61,20 @@ function Z(t, e, o = 4) {
61
61
  });
62
62
  return e ? `${i} ${e}` : i;
63
63
  }
64
- function v(t, e, o) {
64
+ function k(t, e) {
65
+ return !t || e === "none" || e === "token" ? t : e === "$" ? `$${t}` : e === "%" ? `${t}%` : `${t} ${e}`;
66
+ }
67
+ function L(t) {
68
+ return t.includes("/") ? "none" : t;
69
+ }
70
+ function et(t, e, o) {
65
71
  const r = o?.yScaleMin;
66
72
  let i = t.length > 0 ? Math.min(...t) : 0, s = t.length > 0 ? Math.max(...t) : 0, a = [];
67
73
  const u = () => {
68
74
  const n = (i + s) / 2;
69
75
  let c = 1, m = "";
70
76
  return n >= 1e9 ? (c = 1e9, m = "B") : n >= 1e6 ? (c = 1e6, m = "M") : n >= 1e3 && (c = 1e3, m = "K"), { scale: c, suffix: m };
71
- }, F = 8, $ = 0.02;
77
+ }, F = 8, D = 0.02;
72
78
  let A = 0;
73
79
  const E = (n, c, m, d) => {
74
80
  const h = (c > 1 ? n / c : n).toLocaleString("en-US", {
@@ -77,45 +83,48 @@ function v(t, e, o) {
77
83
  useGrouping: !1
78
84
  });
79
85
  return c > 1 ? `${h}${m}` : h;
80
- }, R = (n, c, m) => {
86
+ }, U = (n, c, m) => {
81
87
  for (let d = 0; d <= F; d++) {
82
- const l = /* @__PURE__ */ new Set();
88
+ const $ = /* @__PURE__ */ new Set();
83
89
  let h = !0;
84
- for (const D of n) {
85
- const f = E(D, c, m, d);
86
- if (l.has(f)) {
90
+ for (const T of n) {
91
+ const f = E(T, c, m, d);
92
+ if ($.has(f)) {
87
93
  h = !1;
88
94
  break;
89
95
  }
90
- l.add(f);
96
+ $.add(f);
91
97
  }
92
98
  if (h) return d;
93
99
  }
94
100
  return F;
95
- }, O = (n) => {
101
+ }, X = (n) => {
96
102
  if (r !== void 0 && n < r) return "";
97
- if (n === 0) return "0";
103
+ if (n === 0) return k("0", L(e));
98
104
  const { scale: c, suffix: m } = u();
99
- return E(n, c, m, A);
105
+ return k(
106
+ E(n, c, m, A),
107
+ L(e)
108
+ );
100
109
  };
101
110
  return {
102
- formatter: (n) => O(n),
111
+ formatter: (n) => X(n),
103
112
  tickmarksFormatter: (n) => {
104
- const { scale: c, suffix: m } = u(), d = s - i, l = d > 0 ? a.filter(
105
- (f) => Math.abs(f) >= d * $
113
+ const { scale: c, suffix: m } = u(), d = s - i, $ = d > 0 ? a.filter(
114
+ (f) => Math.abs(f) >= d * D
106
115
  ) : a, h = n.filter(
107
116
  (f) => f !== 0 && !(r !== void 0 && f < r)
108
117
  );
109
- A = R(
110
- [...h, ...l],
118
+ A = U(
119
+ [...h, ...$],
111
120
  c,
112
121
  m
113
122
  );
114
- const D = /* @__PURE__ */ new Set();
123
+ const T = /* @__PURE__ */ new Set();
115
124
  return n.map((f) => {
116
125
  if (r !== void 0 && f < r) return "";
117
- const T = f === 0 ? "0" : E(f, c, m, A);
118
- return !T || D.has(T) ? "" : (D.add(T), T);
126
+ const l = f === 0 ? "0" : E(f, c, m, A);
127
+ return !l || T.has(l) ? "" : (T.add(l), k(l, L(e)));
119
128
  });
120
129
  },
121
130
  updateVisibleRange: (n) => {
@@ -126,11 +135,11 @@ function v(t, e, o) {
126
135
  }
127
136
  };
128
137
  }
129
- const H = (t) => S.fromSeconds(Number(t)).toFormat("dd/LL/yyyy HH:mm"), Y = (t) => S.fromSeconds(Number(t)).toFormat("HH:mm"), V = (t, e) => p(Number(t), e), _ = {
130
- time: H,
131
- "%": V
138
+ const O = (t) => S.fromSeconds(Number(t)).toFormat("dd/LL/yyyy HH:mm"), W = (t) => S.fromSeconds(Number(t)).toFormat("HH:mm"), q = (t, e) => R(Number(t), e), _ = {
139
+ time: O,
140
+ "%": q
132
141
  };
133
- function W(t) {
142
+ function B(t) {
134
143
  const e = /* @__PURE__ */ new Map();
135
144
  return (o, r, i) => {
136
145
  const s = S.fromSeconds(Number(o));
@@ -160,26 +169,27 @@ function W(t) {
160
169
  return u || (u = /* @__PURE__ */ new Set(), e.set(r, u)), u.has(a) ? " " : (u.add(a), a);
161
170
  };
162
171
  }
163
- const b = (t, e) => {
172
+ const y = (t, e) => {
164
173
  if (t === "time" && e && e.length > 0) {
165
174
  const r = S.fromSeconds(Number(e[0].time)), i = S.fromSeconds(
166
175
  Number(e[e.length - 1].time)
167
176
  ), s = r.hasSame(i, "day"), a = s ? 0 : Math.ceil(i.diff(r, "days").days);
168
177
  return {
169
- timeFormatter: s ? Y : H,
170
- tickMarkFormatter: W(a)
178
+ timeFormatter: s ? W : O,
179
+ tickMarkFormatter: B(a)
171
180
  };
172
181
  }
173
182
  const o = _[t] || _.time;
174
183
  return {
175
184
  timeFormatter: o,
176
- tickMarkFormatter: (r) => o(r, void 0)
185
+ tickMarkFormatter: (r) => o(r, t)
177
186
  };
178
- }, tt = (t, e) => b(t, e).timeFormatter;
187
+ }, rt = (t, e) => y(t, e).timeFormatter;
179
188
  export {
180
- v as createAdaptiveYAxisFormatter,
181
- Z as formatExactValue,
182
- tt as getXFormatter,
183
- b as getXFormatters,
184
- J as getYFormatter
189
+ et as createAdaptiveYAxisFormatter,
190
+ tt as formatExactValue,
191
+ rt as getXFormatter,
192
+ y as getXFormatters,
193
+ v as getYFormatter,
194
+ k as withYAxisUnit
185
195
  };
@@ -76,6 +76,7 @@ const e = {
76
76
  "components.yieldBreakdown.programPoints": "{name} Points",
77
77
  "components.yieldBreakdown.points": "Points",
78
78
  "components.openCopyButtons.copy": "Copy to clipboard",
79
+ "components.openCopyButtons.explorer": "View in explorer",
79
80
  "components.poolAssetsTable.asset": "Name",
80
81
  "components.poolAssetsTable.rate": "Effective rate",
81
82
  "components.poolAssetsTable.exposure": "Exposure",
@@ -22,13 +22,18 @@ export interface AdaptiveYAxisFormatterOptions {
22
22
  */
23
23
  yScaleMin?: number;
24
24
  }
25
+ /**
26
+ * Compact unit on an already-formatted axis tick. Generic `"token"` / `"none"`
27
+ * stay bare so charts without a real unit don't render a placeholder.
28
+ */
29
+ export declare function withYAxisUnit(label: string, unit: YMeasureUnits): string;
25
30
  /**
26
31
  * Creates an adaptive Y-axis formatter that determines precision dynamically
27
32
  * based on visible range to ensure unique labels on the axis.
28
33
  * Data point values (like current price label) are shown with full precision.
29
34
  * Returns both the formatter and update functions.
30
35
  */
31
- export declare function createAdaptiveYAxisFormatter(initialValues: number[], _unit: YMeasureUnits, options?: AdaptiveYAxisFormatterOptions): {
36
+ export declare function createAdaptiveYAxisFormatter(initialValues: number[], unit: YMeasureUnits, options?: AdaptiveYAxisFormatterOptions): {
32
37
  formatter: (price: number) => string;
33
38
  tickmarksFormatter: (prices: number[]) => string[];
34
39
  updateVisibleRange: (visibleValues: number[]) => void;
@@ -94,6 +94,7 @@ declare const _default: {
94
94
  "components.yieldBreakdown.points": "Points",
95
95
 
96
96
  "components.openCopyButtons.copy": "Copy to clipboard",
97
+ "components.openCopyButtons.explorer": "View in explorer",
97
98
 
98
99
  "components.poolAssetsTable.asset": "Name",
99
100
  "components.poolAssetsTable.rate": "Effective rate",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "4.0.0-next.7",
3
+ "version": "4.0.0-next.8",
4
4
  "description": "Internal UI components",
5
5
  "repository": {
6
6
  "type": "git",