@gearbox-protocol/ui-kit 4.0.0-next.2 → 4.0.0-next.20

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.
Files changed (317) hide show
  1. package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
  2. package/dist/cjs/components/badge/badge.cjs +1 -1
  3. package/dist/cjs/components/badge/chip.cjs +1 -0
  4. package/dist/cjs/components/badge/index.cjs +1 -1
  5. package/dist/cjs/components/base/amount-input/token-select-panel.cjs +1 -1
  6. package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
  7. package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.cjs +1 -1
  8. package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
  9. package/dist/cjs/components/base/health-factor-block/health-factor-block.cjs +1 -1
  10. package/dist/cjs/components/base/history-chart/history-chart.cjs +1 -1
  11. package/dist/cjs/components/base/index.cjs +1 -1
  12. package/dist/cjs/components/base/info-list/index.cjs +1 -1
  13. package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
  14. package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
  15. package/dist/cjs/components/base/leverage-preset-chips/constants.cjs +1 -0
  16. package/dist/cjs/components/base/leverage-preset-chips/index.cjs +1 -0
  17. package/dist/cjs/components/base/leverage-preset-chips/leverage-preset-chips.cjs +1 -0
  18. package/dist/cjs/components/base/liquidation-price-block/liquidation-price-block.cjs +1 -1
  19. package/dist/cjs/components/base/manage-pane/constants.cjs +1 -1
  20. package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
  21. package/dist/cjs/components/base/page-title/index.cjs +1 -1
  22. package/dist/cjs/components/base/page-title/page-title.cjs +1 -1
  23. package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
  24. package/dist/cjs/components/base/position-assets/constants.cjs +1 -0
  25. package/dist/cjs/components/base/position-assets/index.cjs +1 -0
  26. package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -0
  27. package/dist/cjs/components/base/review-button/constants.cjs +1 -1
  28. package/dist/cjs/components/base/review-button/review-button.cjs +1 -1
  29. package/dist/cjs/components/base/stat-badge/constants.cjs +1 -1
  30. package/dist/cjs/components/base/stat-badge/stat-badge.cjs +1 -1
  31. package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -1
  32. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
  33. package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
  34. package/dist/cjs/components/base/time-to-liquidation-block/time-to-liquidation-block.cjs +1 -1
  35. package/dist/cjs/components/base/title-meta/constants.cjs +1 -1
  36. package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -1
  37. package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
  38. package/dist/cjs/components/base/values/constants.cjs +1 -1
  39. package/dist/cjs/components/base/values/index.cjs +1 -1
  40. package/dist/cjs/components/base/values/points-value.cjs +1 -0
  41. package/dist/cjs/components/base/values/position-status-badge.cjs +1 -0
  42. package/dist/cjs/components/base/values/position-type-badge.cjs +1 -1
  43. package/dist/cjs/components/base/values/scalars.cjs +1 -1
  44. package/dist/cjs/components/base-table/base-table-line.cjs +1 -0
  45. package/dist/cjs/components/base-table/base-table.cjs +1 -0
  46. package/dist/cjs/components/base-table/constants.cjs +1 -0
  47. package/dist/cjs/components/base-table/index.cjs +1 -0
  48. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  49. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  50. package/dist/cjs/components/collateral-allocation-tooltip/allocation-wheel.cjs +1 -0
  51. package/dist/cjs/components/collateral-allocation-tooltip/collateral-allocation-tooltip.cjs +1 -0
  52. package/dist/cjs/components/collateral-allocation-tooltip/constants.cjs +1 -0
  53. package/dist/cjs/components/collateral-allocation-tooltip/index.cjs +1 -0
  54. package/dist/cjs/components/composites/index.cjs +1 -1
  55. package/dist/cjs/components/composites/pool-assets-table/constants.cjs +1 -0
  56. package/dist/cjs/components/composites/pool-assets-table/index.cjs +1 -1
  57. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
  58. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
  59. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
  60. package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
  61. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -1
  62. package/dist/cjs/components/composites/tx-preview/confirm/dialog/constants.cjs +1 -1
  63. package/dist/cjs/components/composites/tx-preview/confirm/dialog/index.cjs +1 -1
  64. package/dist/cjs/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.cjs +1 -0
  65. package/dist/cjs/components/composites/tx-preview/confirm/index.cjs +1 -1
  66. package/dist/cjs/components/composites/tx-preview/index.cjs +1 -1
  67. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  68. package/dist/cjs/components/detailed-page-title/detailed-page-title-explorer-dropdown.cjs +1 -1
  69. package/dist/cjs/components/filter/filter-chip.cjs +1 -1
  70. package/dist/cjs/components/graph/default-config.cjs +1 -1
  71. package/dist/cjs/components/graph/formatters.cjs +1 -1
  72. package/dist/cjs/components/graph/graph-view.cjs +1 -1
  73. package/dist/cjs/components/graph/graph.cjs +1 -1
  74. package/dist/cjs/components/hf-indicator/hf-indicator.cjs +1 -0
  75. package/dist/cjs/components/hf-indicator/index.cjs +1 -0
  76. package/dist/cjs/components/index.cjs +1 -1
  77. package/dist/cjs/components/infinite-scroll/index.cjs +1 -0
  78. package/dist/cjs/components/infinite-scroll/infinite-scroll-wrapper.cjs +1 -0
  79. package/dist/cjs/components/layout/app-footer/app-footer.cjs +1 -1
  80. package/dist/cjs/components/name-cell/index.cjs +1 -0
  81. package/dist/cjs/components/name-cell/name-cell.cjs +1 -0
  82. package/dist/cjs/components/network-icon/index.cjs +1 -1
  83. package/dist/cjs/components/network-icon/network-indicator.cjs +1 -0
  84. package/dist/cjs/components/sdk-status-pill/constants.cjs +1 -0
  85. package/dist/cjs/components/sdk-status-pill/index.cjs +1 -0
  86. package/dist/cjs/components/sdk-status-pill/sdk-status-pill.cjs +1 -0
  87. package/dist/cjs/components/sdk-status-pill/sdk-status.cjs +1 -0
  88. package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
  89. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  90. package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
  91. package/dist/cjs/configs/tailwind-preset.cjs +1 -1
  92. package/dist/cjs/hooks/index.cjs +1 -1
  93. package/dist/cjs/hooks/use-observed-width-key.cjs +1 -0
  94. package/dist/cjs/index.cjs +1 -1
  95. package/dist/cjs/locale/en.json.cjs +1 -1
  96. package/dist/cjs/utils/format-leverage.cjs +1 -0
  97. package/dist/cjs/utils/format-money.cjs +1 -1
  98. package/dist/cjs/utils/index.cjs +1 -1
  99. package/dist/cjs/utils/leverage-presets.cjs +1 -0
  100. package/dist/cjs/utils/strategy-apy.cjs +1 -0
  101. package/dist/esm/components/assets-list-cell/assets-list-cell.js +161 -159
  102. package/dist/esm/components/badge/badge.js +14 -8
  103. package/dist/esm/components/badge/chip.js +47 -0
  104. package/dist/esm/components/badge/index.js +8 -3
  105. package/dist/esm/components/base/amount-input/token-select-panel.js +33 -37
  106. package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +32 -25
  107. package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +6 -6
  108. package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +26 -27
  109. package/dist/esm/components/base/health-factor-block/health-factor-block.js +25 -25
  110. package/dist/esm/components/base/history-chart/history-chart.js +82 -41
  111. package/dist/esm/components/base/index.js +156 -141
  112. package/dist/esm/components/base/info-list/index.js +5 -4
  113. package/dist/esm/components/base/info-list/info-list.js +52 -27
  114. package/dist/esm/components/base/leverage-input/leverage-input.js +18 -20
  115. package/dist/esm/components/base/leverage-preset-chips/constants.js +7 -0
  116. package/dist/esm/components/base/leverage-preset-chips/index.js +6 -0
  117. package/dist/esm/components/base/leverage-preset-chips/leverage-preset-chips.js +39 -0
  118. package/dist/esm/components/base/liquidation-price-block/liquidation-price-block.js +33 -28
  119. package/dist/esm/components/base/manage-pane/constants.js +3 -2
  120. package/dist/esm/components/base/manage-pane/manage-pane.js +154 -113
  121. package/dist/esm/components/base/page-title/index.js +5 -4
  122. package/dist/esm/components/base/page-title/page-title.js +31 -23
  123. package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +23 -30
  124. package/dist/esm/components/base/position-assets/constants.js +8 -0
  125. package/dist/esm/components/base/position-assets/index.js +6 -0
  126. package/dist/esm/components/base/position-assets/position-assets.js +73 -0
  127. package/dist/esm/components/base/review-button/constants.js +3 -2
  128. package/dist/esm/components/base/review-button/review-button.js +35 -22
  129. package/dist/esm/components/base/stat-badge/constants.js +1 -0
  130. package/dist/esm/components/base/stat-badge/stat-badge.js +91 -47
  131. package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +3 -2
  132. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +219 -31
  133. package/dist/esm/components/base/tabber/tabber.js +67 -64
  134. package/dist/esm/components/base/time-to-liquidation-block/time-to-liquidation-block.js +31 -31
  135. package/dist/esm/components/base/title-meta/constants.js +1 -0
  136. package/dist/esm/components/base/title-meta/title-meta.js +53 -33
  137. package/dist/esm/components/base/token-amount/token-amount.js +17 -16
  138. package/dist/esm/components/base/values/constants.js +1 -0
  139. package/dist/esm/components/base/values/index.js +18 -13
  140. package/dist/esm/components/base/values/points-value.js +30 -0
  141. package/dist/esm/components/base/values/position-status-badge.js +26 -0
  142. package/dist/esm/components/base/values/position-type-badge.js +7 -6
  143. package/dist/esm/components/base/values/scalars.js +55 -34
  144. package/dist/esm/components/base-table/base-table-line.js +117 -0
  145. package/dist/esm/components/base-table/base-table.js +110 -0
  146. package/dist/esm/components/base-table/constants.js +12 -0
  147. package/dist/esm/components/base-table/index.js +9 -0
  148. package/dist/esm/components/checkbox/checkbox-labeled.js +25 -20
  149. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +25 -20
  150. package/dist/esm/components/collateral-allocation-tooltip/allocation-wheel.js +71 -0
  151. package/dist/esm/components/collateral-allocation-tooltip/collateral-allocation-tooltip.js +102 -0
  152. package/dist/esm/components/collateral-allocation-tooltip/constants.js +12 -0
  153. package/dist/esm/components/collateral-allocation-tooltip/index.js +9 -0
  154. package/dist/esm/components/composites/index.js +31 -31
  155. package/dist/esm/components/composites/pool-assets-table/constants.js +9 -0
  156. package/dist/esm/components/composites/pool-assets-table/index.js +8 -6
  157. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +52 -30
  158. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +111 -77
  159. package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +44 -26
  160. package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +50 -39
  161. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +114 -59
  162. package/dist/esm/components/composites/tx-preview/confirm/dialog/constants.js +10 -7
  163. package/dist/esm/components/composites/tx-preview/confirm/dialog/index.js +8 -10
  164. package/dist/esm/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.js +1 -0
  165. package/dist/esm/components/composites/tx-preview/confirm/index.js +24 -26
  166. package/dist/esm/components/composites/tx-preview/index.js +24 -26
  167. package/dist/esm/components/compound-apy/compound-apy.js +85 -80
  168. package/dist/esm/components/detailed-page-title/detailed-page-title-explorer-dropdown.js +50 -41
  169. package/dist/esm/components/filter/filter-chip.js +1 -0
  170. package/dist/esm/components/graph/default-config.js +20 -18
  171. package/dist/esm/components/graph/formatters.js +62 -52
  172. package/dist/esm/components/graph/graph-view.js +72 -88
  173. package/dist/esm/components/graph/graph.js +459 -458
  174. package/dist/esm/components/hf-indicator/hf-indicator.js +59 -0
  175. package/dist/esm/components/hf-indicator/index.js +4 -0
  176. package/dist/esm/components/index.js +739 -695
  177. package/dist/esm/components/infinite-scroll/index.js +4 -0
  178. package/dist/esm/components/infinite-scroll/infinite-scroll-wrapper.js +30 -0
  179. package/dist/esm/components/layout/app-footer/app-footer.js +20 -23
  180. package/dist/esm/components/name-cell/index.js +4 -0
  181. package/dist/esm/components/name-cell/name-cell.js +35 -0
  182. package/dist/esm/components/network-icon/index.js +4 -2
  183. package/dist/esm/components/network-icon/network-indicator.js +82 -0
  184. package/dist/esm/components/sdk-status-pill/constants.js +8 -0
  185. package/dist/esm/components/sdk-status-pill/index.js +8 -0
  186. package/dist/esm/components/sdk-status-pill/sdk-status-pill.js +59 -0
  187. package/dist/esm/components/sdk-status-pill/sdk-status.js +6 -0
  188. package/dist/esm/components/trading-view/trading-view.js +193 -155
  189. package/dist/esm/components/with-copy/with-copy.js +25 -20
  190. package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +112 -169
  191. package/dist/esm/configs/tailwind-preset.js +13 -1
  192. package/dist/esm/hooks/index.js +20 -18
  193. package/dist/esm/hooks/use-observed-width-key.js +24 -0
  194. package/dist/esm/index.js +899 -842
  195. package/dist/esm/locale/en.json.js +29 -22
  196. package/dist/esm/utils/format-leverage.js +6 -0
  197. package/dist/esm/utils/format-money.js +59 -41
  198. package/dist/esm/utils/index.js +101 -92
  199. package/dist/esm/utils/leverage-presets.js +13 -0
  200. package/dist/esm/utils/strategy-apy.js +51 -0
  201. package/dist/globals.css +1 -1
  202. package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +3 -0
  203. package/dist/types/components/badge/badge.d.ts +2 -1
  204. package/dist/types/components/badge/chip.d.ts +22 -0
  205. package/dist/types/components/badge/index.d.ts +1 -0
  206. package/dist/types/components/base/amount-input/amount-input.d.ts +3 -2
  207. package/dist/types/components/base/amount-input/token-select-panel.d.ts +4 -3
  208. package/dist/types/components/base/borrow-rate-block/borrow-rate-block.d.ts +10 -5
  209. package/dist/types/components/base/detailed-page-title/detailed-page-title.d.ts +1 -3
  210. package/dist/types/components/base/health-factor-block/health-factor-block.d.ts +6 -6
  211. package/dist/types/components/base/history-chart/history-chart.d.ts +32 -8
  212. package/dist/types/components/base/index.d.ts +2 -0
  213. package/dist/types/components/base/info-list/info-list.d.ts +7 -0
  214. package/dist/types/components/base/leverage-input/leverage-input.d.ts +1 -1
  215. package/dist/types/components/base/leverage-preset-chips/constants.d.ts +4 -0
  216. package/dist/types/components/base/leverage-preset-chips/index.d.ts +2 -0
  217. package/dist/types/components/base/leverage-preset-chips/leverage-preset-chips.d.ts +13 -0
  218. package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +2 -2
  219. package/dist/types/components/base/liquidation-price-block/liquidation-price-block.d.ts +6 -4
  220. package/dist/types/components/base/manage-pane/constants.d.ts +1 -0
  221. package/dist/types/components/base/manage-pane/manage-pane.d.ts +3 -1
  222. package/dist/types/components/base/page-title/page-title.d.ts +12 -6
  223. package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +4 -5
  224. package/dist/types/components/base/position-assets/constants.d.ts +5 -0
  225. package/dist/types/components/base/position-assets/index.d.ts +2 -0
  226. package/dist/types/components/base/position-assets/position-assets.d.ts +49 -0
  227. package/dist/types/components/base/review-button/constants.d.ts +1 -0
  228. package/dist/types/components/base/review-button/review-button.d.ts +17 -3
  229. package/dist/types/components/base/stat-badge/constants.d.ts +1 -0
  230. package/dist/types/components/base/stat-badge/stat-badge.d.ts +11 -1
  231. package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +1 -0
  232. package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +18 -4
  233. package/dist/types/components/base/tabber/tabber.d.ts +2 -2
  234. package/dist/types/components/base/time-to-liquidation-block/time-to-liquidation-block.d.ts +5 -6
  235. package/dist/types/components/base/title-meta/constants.d.ts +1 -0
  236. package/dist/types/components/base/title-meta/title-meta.d.ts +9 -1
  237. package/dist/types/components/base/token-amount/token-amount.d.ts +8 -2
  238. package/dist/types/components/base/values/constants.d.ts +1 -0
  239. package/dist/types/components/base/values/index.d.ts +3 -1
  240. package/dist/types/components/base/values/points-value.d.ts +11 -0
  241. package/dist/types/components/base/values/position-short-label.d.ts +1 -1
  242. package/dist/types/components/base/values/position-status-badge.d.ts +7 -0
  243. package/dist/types/components/base/values/position-type-badge.d.ts +1 -1
  244. package/dist/types/components/base/values/scalars.d.ts +13 -0
  245. package/dist/types/components/base-table/base-table-line.d.ts +21 -0
  246. package/dist/types/components/base-table/base-table.d.ts +19 -0
  247. package/dist/types/components/base-table/constants.d.ts +8 -0
  248. package/dist/types/components/base-table/index.d.ts +3 -0
  249. package/dist/types/components/base-table/types.d.ts +37 -0
  250. package/dist/types/components/collateral-allocation-tooltip/allocation-wheel.d.ts +10 -0
  251. package/dist/types/components/collateral-allocation-tooltip/collateral-allocation-tooltip.d.ts +23 -0
  252. package/dist/types/components/collateral-allocation-tooltip/constants.d.ts +8 -0
  253. package/dist/types/components/collateral-allocation-tooltip/index.d.ts +3 -0
  254. package/dist/types/components/composites/pool-assets-table/constants.d.ts +6 -0
  255. package/dist/types/components/composites/pool-assets-table/index.d.ts +1 -0
  256. package/dist/types/components/composites/pool-assets-table/pool-assets-table-head.d.ts +1 -2
  257. package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +8 -8
  258. package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +7 -20
  259. package/dist/types/components/composites/pool-assets-table/types.d.ts +4 -12
  260. package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +47 -14
  261. package/dist/types/components/composites/tx-preview/confirm/amounts/index.d.ts +1 -1
  262. package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts +23 -19
  263. package/dist/types/components/composites/tx-preview/confirm/dialog/index.d.ts +2 -2
  264. package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.d.ts +0 -3
  265. package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.d.ts +98 -0
  266. package/dist/types/components/compound-apy/compound-apy.d.ts +2 -2
  267. package/dist/types/components/graph/formatters.d.ts +6 -1
  268. package/dist/types/components/graph/graph-view.d.ts +1 -1
  269. package/dist/types/components/graph/graph.d.ts +4 -0
  270. package/dist/types/components/hf-indicator/hf-indicator.d.ts +17 -0
  271. package/dist/types/components/hf-indicator/index.d.ts +1 -0
  272. package/dist/types/components/index.d.ts +6 -1
  273. package/dist/types/components/infinite-scroll/index.d.ts +1 -0
  274. package/dist/types/components/infinite-scroll/infinite-scroll-wrapper.d.ts +11 -0
  275. package/dist/types/components/layout/app-footer/app-footer.d.ts +9 -15
  276. package/dist/types/components/name-cell/index.d.ts +1 -0
  277. package/dist/types/components/name-cell/name-cell.d.ts +13 -0
  278. package/dist/types/components/network-icon/index.d.ts +1 -0
  279. package/dist/types/components/network-icon/network-indicator.d.ts +23 -0
  280. package/dist/types/components/sdk-status-pill/constants.d.ts +5 -0
  281. package/dist/types/components/sdk-status-pill/index.d.ts +3 -0
  282. package/dist/types/components/sdk-status-pill/sdk-status-pill.d.ts +27 -0
  283. package/dist/types/components/sdk-status-pill/sdk-status.d.ts +11 -0
  284. package/dist/types/components/trading-view/trading-view.d.ts +14 -7
  285. package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +8 -10
  286. package/dist/types/configs/tailwind-preset.d.ts +12 -0
  287. package/dist/types/hooks/index.d.ts +1 -0
  288. package/dist/types/hooks/use-observed-width-key.d.ts +8 -0
  289. package/dist/types/index.d.ts +7 -3
  290. package/dist/types/locale/en.json.d.ts +32 -22
  291. package/dist/types/types/index.d.ts +0 -1
  292. package/dist/types/utils/format-leverage.d.ts +5 -0
  293. package/dist/types/utils/format-money.d.ts +11 -5
  294. package/dist/types/utils/index.d.ts +4 -1
  295. package/dist/types/utils/leverage-presets.d.ts +7 -0
  296. package/dist/types/utils/strategy-apy.d.ts +40 -0
  297. package/package.json +6 -6
  298. package/src/styles/base.css +30 -0
  299. package/src/styles/theme.css +16 -0
  300. package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +0 -1
  301. package/dist/cjs/components/block-sync-pill/block-sync-status.cjs +0 -1
  302. package/dist/cjs/components/block-sync-pill/index.cjs +0 -1
  303. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +0 -1
  304. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.cjs +0 -1
  305. package/dist/esm/components/block-sync-pill/block-sync-pill.js +0 -206
  306. package/dist/esm/components/block-sync-pill/block-sync-status.js +0 -12
  307. package/dist/esm/components/block-sync-pill/index.js +0 -4
  308. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +0 -176
  309. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +0 -54
  310. package/dist/types/components/block-sync-pill/block-sync-pill.d.ts +0 -35
  311. package/dist/types/components/block-sync-pill/block-sync-status.d.ts +0 -29
  312. package/dist/types/components/block-sync-pill/index.d.ts +0 -1
  313. package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.d.ts +0 -17
  314. package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts +0 -16
  315. package/dist/types/types/footer.d.ts +0 -51
  316. /package/dist/cjs/{types/footer.cjs → components/base-table/types.cjs} +0 -0
  317. /package/dist/esm/{types/footer.js → components/base-table/types.js} +0 -0
@@ -6,6 +6,8 @@ const e = {
6
6
  "errors.tooManyRequests": "Too many requests",
7
7
  "errors.incorrectAddress": "Incorrect address",
8
8
  "components.errorMessage.oops": "Oops...",
9
+ "components.networkIndicator.title": "Network",
10
+ "components.infiniteScrollWrapper.showMore": "Show more",
9
11
  "components.alertModal.ok": "Ok",
10
12
  "components.footer.privacy": "Privacy Notice",
11
13
  "components.footer.terms": "Terms of Service",
@@ -15,9 +17,9 @@ const e = {
15
17
  "components.footer.gearbox": "Copyright © Gearbox Foundation 2023-2026.",
16
18
  "components.footer.built": "Built at ETHGlobal MarketMake hackathon.",
17
19
  "components.footer.version": "Version {value}",
18
- "components.blockSyncPill.syncError": ", sync error",
19
- "components.blockSyncPill.syncedAt": ", synced at {time}",
20
- "components.blockSyncPill.syncing": ", syncing…",
20
+ "components.sdkStatus.connecting": "Connecting…",
21
+ "components.sdkStatus.connected": "Connected",
22
+ "components.sdkStatus.disconnected": "Not connected",
21
23
  "components.creditAccountHistory.table.protocol": "Protocol",
22
24
  "components.creditAccountHistory.table.operation": "Operation",
23
25
  "components.creditAccountHistory.table.details": "Details",
@@ -67,19 +69,19 @@ const e = {
67
69
  "components.apyParts.totalAPY": "Overall APY",
68
70
  "components.apyParts.points": "{symbol} Incentive",
69
71
  "components.apyParts.points.condition.crossDeposit": "For cross-chain deposits made via Omni",
70
- "components.yieldBreakdown.title": "Yield Breakdown",
71
- "components.yieldBreakdown.atLeverage": "at {leverage}× leverage",
72
- "components.yieldBreakdown.baseYield": "Base Yield",
73
- "components.yieldBreakdown.incentiveYield": "Incentive Yield",
72
+ "components.yieldBreakdown.titleNetAtLeverage": "Net APY at {leverage}× Leverage",
73
+ "components.yieldBreakdown.collateralApy": "Collateral APY",
74
+ "components.yieldBreakdown.incentive": "Incentive",
74
75
  "components.yieldBreakdown.borrowRate": "Borrow Rate",
75
- "components.yieldBreakdown.baseRate": "Base Rate",
76
- "components.yieldBreakdown.additionalRate": "Additional Rate",
77
- "components.yieldBreakdown.netYield": "Net Yield",
76
+ "components.yieldBreakdown.programPoints": "{name} Points",
78
77
  "components.yieldBreakdown.points": "Points",
79
78
  "components.openCopyButtons.copy": "Copy to clipboard",
80
- "components.poolAssetsTable.asset": "Asset",
79
+ "components.openCopyButtons.explorer": "View in explorer",
80
+ "components.poolAssetsTable.asset": "Name",
81
81
  "components.poolAssetsTable.rate": "Effective rate",
82
- "components.poolAssetsTable.limits": "Limits Usage",
82
+ "components.poolAssetsTable.exposure": "Exposure",
83
+ "components.poolAssetsTable.cap": "Cap",
84
+ "components.poolAssetsTable.capUtilization": "Cap utilization",
83
85
  "components.poolAssetsTable.usage": "{amount} of {total}",
84
86
  "components.poolAssetsTable.head.name": "Credit Manager",
85
87
  "components.poolAssetsTable.head.currentDebt": "Current Debt",
@@ -162,23 +164,26 @@ const e = {
162
164
  "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.",
163
165
  "components.historyChart.error": "Couldn't load chart data",
164
166
  "components.historyChart.empty": "No data",
165
- "components.positionTypeBadge.pool": "Lender",
167
+ "components.positionTypeBadge.pool": "LP",
166
168
  "components.positionTypeBadge.strategy": "Strategy",
167
169
  "components.positionTypeBadge.liquidation": "Liquidation",
170
+ "components.positionStatusBadge.active": "Active",
171
+ "components.positionStatusBadge.repaid": "Repaid",
168
172
  "components.titleMeta.unknownCurator": "Curator",
169
173
  "components.moreAccordion.more": "More details",
170
174
  "components.moreAccordion.less": "Less details",
171
175
  "components.poolApyBreakdownCard.title": "APY Breakdown",
172
- "components.poolApyBreakdownCard.apy1d": "APY 24H",
173
- "components.poolApyBreakdownCard.apy7d": "APY 7d",
174
- "components.poolApyBreakdownCard.apy30d": "APY 30d",
175
- "components.strategyApyBreakdownCard.title": "APY Breakdown",
176
- "components.strategyApyBreakdownCard.formula": "How strategy APY is calculated: Collateral APY x Leverage - Base borrow rate x (Leverage - 1) - Additional borrow rate x Leverage x 1.05",
176
+ "components.poolApyBreakdownCard.organicApy": "Pool organic APY",
177
+ "components.poolApyBreakdownCard.incentiveApy": "Incentive APY",
178
+ "components.strategyApyBreakdownCard.titleAtLeverage": "APY at {leverage}× Leverage",
177
179
  "components.strategyApyBreakdownCard.collateralApy": "Collateral APY",
178
- "components.strategyApyBreakdownCard.baseBorrowRate": "Base borrow rate",
179
- "components.strategyApyBreakdownCard.additionalBorrowRate": "Additional borrow rate",
180
+ "components.strategyApyBreakdownCard.incentiveApy": "Incentive APY",
181
+ "components.strategyApyBreakdownCard.borrowRate": "Borrow Rate",
182
+ "components.strategyApyBreakdownCard.quotaRate": "Quota Rate",
183
+ "components.strategyApyBreakdownCard.formula": "{leverage} × {base}",
184
+ "components.leveragePresetChips.label": "Leverage:",
180
185
  "components.liquidationParamsTable.lt": "Liquidation threshold",
181
- "components.liquidationParamsTable.penalty": "Liquidation penalty",
186
+ "components.liquidationParamsTable.penalty": "Liquidation discount",
182
187
  "components.liquidationParamsTable.premium": "Liquidation premium",
183
188
  "components.liquidationParamsTable.fee": "Liquidation fee",
184
189
  "components.borrowRateBlock.label": "Borrow rate",
@@ -186,7 +191,9 @@ const e = {
186
191
  "components.borrowRateBlock.description": "Your borrow rate consists of the Base Rate plus the Quota Rates for every asset separately.",
187
192
  "components.borrowRateBlock.baseRate": "Base Rate for Debt",
188
193
  "components.borrowRateBlock.normalization": "Rates normalization",
189
- "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."
194
+ "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.",
195
+ "components.transactionConfirm.previewLoading": "Parsing transaction…",
196
+ "components.transactionConfirm.previewErrorTitle": "Preview error"
190
197
  };
191
198
  export {
192
199
  e as default
@@ -0,0 +1,6 @@
1
+ function r(e) {
2
+ return (Math.round(e * 100) / 100).toFixed(2);
3
+ }
4
+ export {
5
+ r as formatLeverage
6
+ };
@@ -1,32 +1,49 @@
1
- import { formatBN as M, WAD_DECIMALS_POW as $, PERCENTAGE_FACTOR as A } from "@gearbox-protocol/sdk";
2
- import { BigIntMath as g } from "@gearbox-protocol/sdk/common-utils";
1
+ import { formatBN as b, WAD_DECIMALS_POW as g, PERCENTAGE_FACTOR as h } from "@gearbox-protocol/sdk";
2
+ import { BigIntMath as E } from "@gearbox-protocol/sdk/common-utils";
3
3
  import "react";
4
- import { bnToInputView as h } from "./bn-to-input-view.js";
4
+ import { bnToInputView as x } from "./bn-to-input-view.js";
5
5
  import "clsx";
6
6
  import "tailwind-merge";
7
7
  import "sonner";
8
8
  import "react/jsx-runtime";
9
9
  import "luxon";
10
10
  import "./z-index.js";
11
- const _ = 10000000000000000n;
11
+ const A = 10000000000000000n;
12
12
  function F(t) {
13
13
  return BigInt(t.toFixed(18).replace(".", ""));
14
14
  }
15
- function U(t, r) {
16
- const n = typeof t == "number" && t < 0 || typeof t == "bigint" && t < 0n ? "-" : "", s = typeof t == "number" ? F(Math.abs(t)) : g.abs(t), u = s < _ && s > 0n, f = u ? "0.01" : M(s, $, r), o = `${n}$${f}`;
15
+ function V(t, e) {
16
+ const r = typeof t == "number" && t < 0 || typeof t == "bigint" && t < 0n ? "-" : "", f = typeof t == "number" ? F(Math.abs(t)) : E.abs(t), u = f < A && f > 0n, a = u ? "0.01" : b(f, g, e), o = `${r}$${a}`;
17
17
  return u ? `< ${o}` : o;
18
18
  }
19
- const O = 1e4;
20
- function l(t, r, i = !0) {
21
- const n = typeof t == "number" ? t : Number(t);
22
- return Number.isNaN(n) || n === void 0 || n === null ? "0" : n === 0 ? 0 : i && n > O ? n.toExponential(r) : n.toFixed(r);
19
+ const C = 1e3, P = [
20
+ { div: 1e12, suffix: "T" },
21
+ { div: 1e9, suffix: "B" },
22
+ { div: 1e6, suffix: "M" },
23
+ { div: 1e3, suffix: "K" }
24
+ ];
25
+ function _(t) {
26
+ return t.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
23
27
  }
24
- function V(t, r = 2) {
25
- return `${l(t, r)}%`;
28
+ function d(t, e) {
29
+ for (const { div: i, suffix: r } of P)
30
+ if (t >= i)
31
+ return `${_((t / i).toFixed(e))}${r}`;
32
+ return t.toFixed(e);
26
33
  }
27
- function W(t, r = 2) {
28
- const i = Number(t) / Number(A);
29
- return `${l(i, r)}%`;
34
+ function B(t, e = 2) {
35
+ return !Number.isFinite(t) || t === 0 ? "0%" : `${t < 0 ? "-" : ""}${d(Math.abs(t), e)}%`;
36
+ }
37
+ function D(t, e, i = !0) {
38
+ const r = typeof t == "number" ? t : Number(t);
39
+ return Number.isNaN(r) || r === void 0 || r === null ? "0" : r === 0 ? 0 : i && Math.abs(r) >= C ? `${r < 0 ? "-" : ""}${d(Math.abs(r), e)}` : r.toFixed(e);
40
+ }
41
+ function W(t, e = 2) {
42
+ return B(t, e);
43
+ }
44
+ function w(t, e = 2) {
45
+ const i = Number(t) / Number(h);
46
+ return `${D(i, e)}%`;
30
47
  }
31
48
  const c = {
32
49
  minimumFractionDigits: 2,
@@ -36,42 +53,43 @@ const c = {
36
53
  minExponentialThreshold: 1e-4,
37
54
  maxExponentialThreshold: 1e6,
38
55
  locale: "en-US"
39
- }, X = ({
56
+ }, Y = ({
40
57
  amount: t,
41
- format: r = "full",
58
+ format: e = "full",
42
59
  maximumFractionDigits: i = c.maximumFractionDigits,
43
- minimumFractionDigits: n = c.minimumFractionDigits,
44
- decimalPrecision: s = c.decimalPrecision,
60
+ minimumFractionDigits: r = c.minimumFractionDigits,
61
+ decimalPrecision: f = c.decimalPrecision,
45
62
  minDecimalThreshold: u = c.minDecimalThreshold,
46
- minExponentialThreshold: f = c.minExponentialThreshold,
63
+ minExponentialThreshold: a = c.minExponentialThreshold,
47
64
  maxExponentialThreshold: o = c.maxExponentialThreshold,
48
- locale: N = c.locale
65
+ locale: l = c.locale
49
66
  }) => {
50
- const m = typeof t == "bigint" ? Number(h(t, 8)) : t, e = Math.abs(m);
51
- if (r === "short") {
52
- const T = m < 0 ? "-" : "", a = (p, d) => {
53
- const b = p >= 100 ? 0 : i, E = p.toFixed(b).replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
54
- return `${T}${E}${d}`;
67
+ const s = typeof t == "bigint" ? Number(x(t, 8)) : t, n = Math.abs(s);
68
+ if (e === "short") {
69
+ const T = s < 0 ? "-" : "", m = (p, N) => {
70
+ const $ = p >= 100 ? 0 : i, M = p.toFixed($).replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
71
+ return `${T}${M}${N}`;
55
72
  };
56
- if (e >= 1e9 && e <= o)
57
- return a(e / 1e9, "B");
58
- if (e >= 1e6 && e <= o)
59
- return a(e / 1e6, "M");
60
- if (e >= 1e3 && e <= o)
61
- return a(e / 1e3, "K");
62
- if (e > o)
63
- return a(e / o, "M+");
73
+ if (n >= 1e9 && n <= o)
74
+ return m(n / 1e9, "B");
75
+ if (n >= 1e6 && n <= o)
76
+ return m(n / 1e6, "M");
77
+ if (n >= 1e3 && n <= o)
78
+ return m(n / 1e3, "K");
79
+ if (n > o)
80
+ return m(n / o, "M+");
64
81
  }
65
- return e > o && r === "full" ? `${(m / c.maxExponentialThreshold).toFixed(n)}M` : e < f && e > 0 ? m.toFixed(Math.max(10, i)) : e < u && e > 0 ? m.toPrecision(s) : m.toLocaleString(N, {
66
- minimumFractionDigits: n,
82
+ return n > o && e === "full" ? `${(s / c.maxExponentialThreshold).toFixed(r)}M` : n < a && n > 0 ? s.toFixed(Math.max(10, i)) : n < u && n > 0 ? s.toPrecision(f) : s.toLocaleString(l, {
83
+ minimumFractionDigits: r,
67
84
  maximumFractionDigits: i
68
85
  });
69
86
  };
70
87
  export {
71
88
  c as DEFAULT_FORMAT_MONEY_CONSTANTS,
72
- U as formatMoney,
73
- X as formatMoneyAmount,
74
- l as formatPercentAmount,
75
- V as percentTemplate,
76
- W as percentageTemplate
89
+ B as formatCompactPercent,
90
+ V as formatMoney,
91
+ Y as formatMoneyAmount,
92
+ D as formatPercentAmount,
93
+ W as percentTemplate,
94
+ w as percentageTemplate
77
95
  };
@@ -1,107 +1,116 @@
1
1
  import { generateId as r, useFormFieldIds as t } from "./a11y.js";
2
- import { pointProgramsOf as m, positiveTokenRewardsOf as n, tokenRewardsOf as i, totalApyOf as p } from "./apy-breakdown.js";
3
- import { bnToInputView as l } from "./bn-to-input-view.js";
4
- import { bnToPrettyView as T } from "./bn-to-pretty-view.js";
5
- import { bpsToPercent as c } from "./bps.js";
2
+ import { pointProgramsOf as m, positiveTokenRewardsOf as n, tokenRewardsOf as p, totalApyOf as i } from "./apy-breakdown.js";
3
+ import { bnToInputView as s } from "./bn-to-input-view.js";
4
+ import { bnToPrettyView as x } from "./bn-to-pretty-view.js";
5
+ import { bpsToPercent as g } from "./bps.js";
6
6
  import { cn as S, cn as d } from "./cn.js";
7
- import { generateColorsFromBase as h, getCSSVariable as b, hexToRgba as A, hslToHex as I, resolveCSSColor as N } from "./colors.js";
8
- import { copyToClipboard as P } from "./copy.js";
9
- import { convertPercent as y, formatBytecodeSize as w, formatBytecodeVersion as L, formatTimestamp as C, shortenHash as F, significantTrunc as D } from "./format.js";
7
+ import { generateColorsFromBase as h, getCSSVariable as A, hexToRgba as v, hslToHex as y, resolveCSSColor as P } from "./colors.js";
8
+ import { copyToClipboard as N } from "./copy.js";
9
+ import { convertPercent as I, formatBytecodeSize as k, formatBytecodeVersion as C, formatTimestamp as w, shortenHash as F, significantTrunc as D } from "./format.js";
10
10
  import { formatAssetAmount as V } from "./format-asset-amount.js";
11
- import { formatMoney as M, formatMoneyAmount as R, formatPercentAmount as _, percentTemplate as E, percentageTemplate as H } from "./format-money.js";
12
- import { FORMAT_CONSTANTS as Z, formatNumberWithSuffix as z, formatPrice as U, getAdaptiveDecimals as X, isBelowDisplayThreshold as q, isEffectivelyZero as j, toSignificantDigits as G } from "./format-number.js";
13
- import { slippageTemplate as K } from "./format-slippage.js";
14
- import { allLoaded as Y, loadingProgress as $, round5 as ee } from "./loading.js";
15
- import { decimalsToStep as re, findClosestPoint as te, formatWithDecimals as ae, formatWithoutDecimals as me, splitInterval as ne, validateMinMax as ie } from "./math.js";
16
- import { getNetworkIcon as fe } from "./network-icons.js";
17
- import { bnToLiquidationPriceView as se, isPositiveFloat as Te, parseInputToBN as xe, parseSmallNumber as ce } from "./parse-input-to-bn.js";
18
- import { pluralize as Se, selectPluralString as de } from "./plural.js";
19
- import { getAvailableRanges as he } from "./ranges.js";
20
- import { extractTextFromLabel as Ae, serializeValue as Ie } from "./react.js";
21
- import { searchInString as ke } from "./search.js";
22
- import { createTokenSearchFilter as ve, searchInToken as ye } from "./search-in-token.js";
23
- import { shortSHA as Le } from "./short-sha.js";
24
- import { isLongString as Fe, shortenString as De } from "./shorten-string.js";
25
- import { negativeTokenTemplate as Ve, tokenTemplate as Be, tokenTemplateNumber as Me, tokenTemplateString as Re } from "./templates.js";
26
- import { getTokenIcon as Ee, parseShareTokenUnderlying as He } from "./token-icon-source.js";
27
- import { TTL_CONSTANTS as Ze, getTTLZones as ze, ttlFromTimestamp as Ue, ttlLeft as Xe, ttlLeftHuman as qe } from "./ttl.js";
28
- import { openInNewWindow as Ge } from "./window.js";
29
- import { Z_INDEX as Ke, Z_INDEX_VALUES as Qe } from "./z-index.js";
11
+ import { formatLeverage as M } from "./format-leverage.js";
12
+ import { formatCompactPercent as _, formatMoney as E, formatMoneyAmount as H, formatPercentAmount as W, percentTemplate as Z, percentageTemplate as z } from "./format-money.js";
13
+ import { FORMAT_CONSTANTS as X, formatNumberWithSuffix as q, formatPrice as j, getAdaptiveDecimals as G, isBelowDisplayThreshold as J, isEffectivelyZero as K, toSignificantDigits as Q } from "./format-number.js";
14
+ import { slippageTemplate as $ } from "./format-slippage.js";
15
+ import { formatChipLeverage as oe, leveragePresets as re } from "./leverage-presets.js";
16
+ import { allLoaded as ae, loadingProgress as me, round5 as ne } from "./loading.js";
17
+ import { decimalsToStep as ie, findClosestPoint as fe, formatWithDecimals as se, formatWithoutDecimals as le, splitInterval as xe, validateMinMax as Te } from "./math.js";
18
+ import { getNetworkIcon as ce } from "./network-icons.js";
19
+ import { bnToLiquidationPriceView as de, isPositiveFloat as ue, parseInputToBN as he, parseSmallNumber as Ae } from "./parse-input-to-bn.js";
20
+ import { pluralize as ye, selectPluralString as Pe } from "./plural.js";
21
+ import { getAvailableRanges as Ne } from "./ranges.js";
22
+ import { extractTextFromLabel as Ie, serializeValue as ke } from "./react.js";
23
+ import { searchInString as we } from "./search.js";
24
+ import { createTokenSearchFilter as De, searchInToken as Oe } from "./search-in-token.js";
25
+ import { shortSHA as Be } from "./short-sha.js";
26
+ import { isLongString as Re, shortenString as _e } from "./shorten-string.js";
27
+ import { strategyApyPartsAtLeverage as He, strategyNetApyAtLeverage as We } from "./strategy-apy.js";
28
+ import { negativeTokenTemplate as ze, tokenTemplate as Ue, tokenTemplateNumber as Xe, tokenTemplateString as qe } from "./templates.js";
29
+ import { getTokenIcon as Ge, parseShareTokenUnderlying as Je } from "./token-icon-source.js";
30
+ import { TTL_CONSTANTS as Qe, getTTLZones as Ye, ttlFromTimestamp as $e, ttlLeft as eo, ttlLeftHuman as oo } from "./ttl.js";
31
+ import { openInNewWindow as to } from "./window.js";
32
+ import { Z_INDEX as mo, Z_INDEX_VALUES as no } from "./z-index.js";
30
33
  export {
31
- Z as FORMAT_CONSTANTS,
32
- Ze as TTL_CONSTANTS,
33
- Ke as Z_INDEX,
34
- Qe as Z_INDEX_VALUES,
35
- Y as allLoaded,
36
- l as bnToInputView,
37
- se as bnToLiquidationPriceView,
38
- T as bnToPrettyView,
39
- c as bpsToPercent,
34
+ X as FORMAT_CONSTANTS,
35
+ Qe as TTL_CONSTANTS,
36
+ mo as Z_INDEX,
37
+ no as Z_INDEX_VALUES,
38
+ ae as allLoaded,
39
+ s as bnToInputView,
40
+ de as bnToLiquidationPriceView,
41
+ x as bnToPrettyView,
42
+ g as bpsToPercent,
40
43
  S as cn,
41
- y as convertPercent,
42
- P as copyToClipboard,
43
- ve as createTokenSearchFilter,
44
- re as decimalsToStep,
44
+ I as convertPercent,
45
+ N as copyToClipboard,
46
+ De as createTokenSearchFilter,
47
+ ie as decimalsToStep,
45
48
  d as default,
46
- Ae as extractTextFromLabel,
47
- te as findClosestPoint,
49
+ Ie as extractTextFromLabel,
50
+ fe as findClosestPoint,
48
51
  V as formatAssetAmount,
49
- w as formatBytecodeSize,
50
- L as formatBytecodeVersion,
51
- M as formatMoney,
52
- R as formatMoneyAmount,
53
- z as formatNumberWithSuffix,
54
- _ as formatPercentAmount,
55
- U as formatPrice,
56
- C as formatTimestamp,
57
- ae as formatWithDecimals,
58
- me as formatWithoutDecimals,
52
+ k as formatBytecodeSize,
53
+ C as formatBytecodeVersion,
54
+ oe as formatChipLeverage,
55
+ _ as formatCompactPercent,
56
+ M as formatLeverage,
57
+ E as formatMoney,
58
+ H as formatMoneyAmount,
59
+ q as formatNumberWithSuffix,
60
+ W as formatPercentAmount,
61
+ j as formatPrice,
62
+ w as formatTimestamp,
63
+ se as formatWithDecimals,
64
+ le as formatWithoutDecimals,
59
65
  h as generateColorsFromBase,
60
66
  r as generateId,
61
- X as getAdaptiveDecimals,
62
- he as getAvailableRanges,
63
- b as getCSSVariable,
64
- fe as getNetworkIcon,
65
- ze as getTTLZones,
66
- Ee as getTokenIcon,
67
- A as hexToRgba,
68
- I as hslToHex,
69
- q as isBelowDisplayThreshold,
70
- j as isEffectivelyZero,
71
- Fe as isLongString,
72
- Te as isPositiveFloat,
73
- $ as loadingProgress,
74
- Ve as negativeTokenTemplate,
75
- Ge as openInNewWindow,
76
- xe as parseInputToBN,
77
- He as parseShareTokenUnderlying,
78
- ce as parseSmallNumber,
79
- E as percentTemplate,
80
- H as percentageTemplate,
81
- Se as pluralize,
67
+ G as getAdaptiveDecimals,
68
+ Ne as getAvailableRanges,
69
+ A as getCSSVariable,
70
+ ce as getNetworkIcon,
71
+ Ye as getTTLZones,
72
+ Ge as getTokenIcon,
73
+ v as hexToRgba,
74
+ y as hslToHex,
75
+ J as isBelowDisplayThreshold,
76
+ K as isEffectivelyZero,
77
+ Re as isLongString,
78
+ ue as isPositiveFloat,
79
+ re as leveragePresets,
80
+ me as loadingProgress,
81
+ ze as negativeTokenTemplate,
82
+ to as openInNewWindow,
83
+ he as parseInputToBN,
84
+ Je as parseShareTokenUnderlying,
85
+ Ae as parseSmallNumber,
86
+ Z as percentTemplate,
87
+ z as percentageTemplate,
88
+ ye as pluralize,
82
89
  m as pointProgramsOf,
83
90
  n as positiveTokenRewardsOf,
84
- N as resolveCSSColor,
85
- ee as round5,
86
- ke as searchInString,
87
- ye as searchInToken,
88
- de as selectPluralString,
89
- Ie as serializeValue,
90
- Le as shortSHA,
91
+ P as resolveCSSColor,
92
+ ne as round5,
93
+ we as searchInString,
94
+ Oe as searchInToken,
95
+ Pe as selectPluralString,
96
+ ke as serializeValue,
97
+ Be as shortSHA,
91
98
  F as shortenHash,
92
- De as shortenString,
99
+ _e as shortenString,
93
100
  D as significantTrunc,
94
- K as slippageTemplate,
95
- ne as splitInterval,
96
- G as toSignificantDigits,
97
- i as tokenRewardsOf,
98
- Be as tokenTemplate,
99
- Me as tokenTemplateNumber,
100
- Re as tokenTemplateString,
101
- p as totalApyOf,
102
- Ue as ttlFromTimestamp,
103
- Xe as ttlLeft,
104
- qe as ttlLeftHuman,
101
+ $ as slippageTemplate,
102
+ xe as splitInterval,
103
+ He as strategyApyPartsAtLeverage,
104
+ We as strategyNetApyAtLeverage,
105
+ Q as toSignificantDigits,
106
+ p as tokenRewardsOf,
107
+ Ue as tokenTemplate,
108
+ Xe as tokenTemplateNumber,
109
+ qe as tokenTemplateString,
110
+ i as totalApyOf,
111
+ $e as ttlFromTimestamp,
112
+ eo as ttlLeft,
113
+ oo as ttlLeftHuman,
105
114
  t as useFormFieldIds,
106
- ie as validateMinMax
115
+ Te as validateMinMax
107
116
  };
@@ -0,0 +1,13 @@
1
+ function n(e) {
2
+ const r = (t) => Math.round(t * 2) / 2;
3
+ return [
4
+ .../* @__PURE__ */ new Set([r(1 + 0.3 * (e - 1)), r(1 + 0.7 * (e - 1)), e])
5
+ ];
6
+ }
7
+ function o(e) {
8
+ return e.toFixed(2).replace(/\.?0+$/, "");
9
+ }
10
+ export {
11
+ o as formatChipLeverage,
12
+ n as leveragePresets
13
+ };
@@ -0,0 +1,51 @@
1
+ import { calcEffectiveBorrowApy as o, calcNetStrategyApy as u } from "@gearbox-protocol/sdk";
2
+ function f(t, e, r) {
3
+ switch (r) {
4
+ case "min":
5
+ return Math.max(t - 1, 0);
6
+ case "aggressive":
7
+ return 1.05 * Math.max(t - 1, 0);
8
+ default:
9
+ return t * e / 1e4;
10
+ }
11
+ }
12
+ function m({
13
+ leverage: t,
14
+ borrowApy: e = 0,
15
+ quotaRate: r = 0,
16
+ liquidationThreshold: s = 0,
17
+ quotaMode: a = "safe"
18
+ }) {
19
+ const c = {
20
+ borrowApy: e,
21
+ quotaRate: r,
22
+ liquidationThreshold: s
23
+ }, n = Math.max(t - 1, 0), i = f(t, s, a);
24
+ return {
25
+ debtMultiplier: n,
26
+ quotaMultiplier: i,
27
+ borrowCost: e * n,
28
+ quotaRate: r,
29
+ quotaCost: r * i,
30
+ totalCost: o(c, t, a)
31
+ };
32
+ }
33
+ function l({
34
+ collateralApy: t,
35
+ leverage: e,
36
+ borrowApy: r = 0,
37
+ quotaRate: s = 0,
38
+ liquidationThreshold: a = 0,
39
+ quotaMode: c = "safe"
40
+ }) {
41
+ return u(
42
+ { borrowApy: r, quotaRate: s, liquidationThreshold: a },
43
+ t,
44
+ e,
45
+ c
46
+ );
47
+ }
48
+ export {
49
+ m as strategyApyPartsAtLeverage,
50
+ l as strategyNetApyAtLeverage
51
+ };