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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/dist/cjs/components/base/amount-input/amount-input.cjs +1 -1
  2. package/dist/cjs/components/base/amount-input/constants.cjs +1 -1
  3. package/dist/cjs/components/base/amount-input/index.cjs +1 -1
  4. package/dist/cjs/components/base/amount-input/token-button.cjs +1 -1
  5. package/dist/cjs/components/base/amount-input/token-select-panel.cjs +1 -0
  6. package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -0
  7. package/dist/cjs/components/base/borrow-rate-block/constants.cjs +1 -0
  8. package/dist/cjs/components/base/borrow-rate-block/index.cjs +1 -0
  9. package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.cjs +1 -0
  10. package/dist/cjs/components/base/chart-with-side-card/constants.cjs +1 -0
  11. package/dist/cjs/components/base/chart-with-side-card/index.cjs +1 -0
  12. package/dist/cjs/components/base/details-view/details-view.cjs +1 -1
  13. package/dist/cjs/components/base/history-chart/history-chart.cjs +1 -1
  14. package/dist/cjs/components/base/index.cjs +1 -1
  15. package/dist/cjs/components/base/info-list/constants.cjs +1 -1
  16. package/dist/cjs/components/base/info-list/index.cjs +1 -1
  17. package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
  18. package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
  19. package/dist/cjs/components/base/liquidation-params-table/constants.cjs +1 -0
  20. package/dist/cjs/components/base/liquidation-params-table/index.cjs +1 -0
  21. package/dist/cjs/components/base/liquidation-params-table/liquidation-params-table.cjs +1 -0
  22. package/dist/cjs/components/base/manage-pane/index.cjs +1 -1
  23. package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
  24. package/dist/cjs/components/base/more-accordion/constants.cjs +1 -0
  25. package/dist/cjs/components/base/more-accordion/index.cjs +1 -0
  26. package/dist/cjs/components/base/more-accordion/more-accordion.cjs +1 -0
  27. package/dist/cjs/components/base/nested-info-stack/constants.cjs +1 -0
  28. package/dist/cjs/components/base/nested-info-stack/index.cjs +1 -0
  29. package/dist/cjs/components/base/nested-info-stack/nested-info-stack.cjs +1 -0
  30. package/dist/cjs/components/base/page-title/page-title.cjs +1 -1
  31. package/dist/cjs/components/base/pool-apy-breakdown-card/constants.cjs +1 -0
  32. package/dist/cjs/components/base/pool-apy-breakdown-card/index.cjs +1 -0
  33. package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -0
  34. package/dist/cjs/components/base/side-card/constants.cjs +1 -0
  35. package/dist/cjs/components/base/side-card/index.cjs +1 -0
  36. package/dist/cjs/components/base/side-card/side-card.cjs +1 -0
  37. package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -0
  38. package/dist/cjs/components/base/strategy-apy-breakdown-card/index.cjs +1 -0
  39. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -0
  40. package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
  41. package/dist/cjs/components/base/title-meta/constants.cjs +1 -0
  42. package/dist/cjs/components/base/title-meta/index.cjs +1 -0
  43. package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -0
  44. package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
  45. package/dist/cjs/components/base/token-pair-symbol/constants.cjs +1 -0
  46. package/dist/cjs/components/base/token-pair-symbol/index.cjs +1 -0
  47. package/dist/cjs/components/base/token-pair-symbol/token-pair-symbol.cjs +1 -0
  48. package/dist/cjs/components/base/token-pair-title/constants.cjs +1 -0
  49. package/dist/cjs/components/base/token-pair-title/index.cjs +1 -0
  50. package/dist/cjs/components/base/token-pair-title/token-pair-title.cjs +1 -0
  51. package/dist/cjs/components/base/values/pnl-value.cjs +1 -1
  52. package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
  53. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  54. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  55. package/dist/cjs/components/composites/notification-center/notification-center.cjs +1 -1
  56. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
  57. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
  58. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
  59. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -1
  60. package/dist/cjs/components/explorer-links-dropdown/explorer-links-dropdown.cjs +1 -1
  61. package/dist/cjs/components/explorer-links-dropdown/index.cjs +1 -1
  62. package/dist/cjs/components/graph/graph-view.cjs +1 -1
  63. package/dist/cjs/components/graph/graph.cjs +1 -1
  64. package/dist/cjs/components/icons/index.cjs +1 -1
  65. package/dist/cjs/components/index.cjs +1 -1
  66. package/dist/cjs/components/layout/index.cjs +1 -1
  67. package/dist/cjs/components/modal/modal.cjs +1 -1
  68. package/dist/cjs/components/table/index.cjs +1 -1
  69. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  70. package/dist/cjs/hooks/index.cjs +1 -1
  71. package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
  72. package/dist/cjs/index.cjs +1 -1
  73. package/dist/cjs/locale/en.json.cjs +1 -1
  74. package/dist/esm/components/base/amount-input/amount-input.js +179 -147
  75. package/dist/esm/components/base/amount-input/constants.js +2 -0
  76. package/dist/esm/components/base/amount-input/index.js +5 -3
  77. package/dist/esm/components/base/amount-input/token-button.js +65 -35
  78. package/dist/esm/components/base/amount-input/token-select-panel.js +85 -0
  79. package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +83 -0
  80. package/dist/esm/components/base/borrow-rate-block/constants.js +8 -0
  81. package/dist/esm/components/base/borrow-rate-block/index.js +6 -0
  82. package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +36 -0
  83. package/dist/esm/components/base/chart-with-side-card/constants.js +8 -0
  84. package/dist/esm/components/base/chart-with-side-card/index.js +6 -0
  85. package/dist/esm/components/base/details-view/details-view.js +37 -32
  86. package/dist/esm/components/base/history-chart/history-chart.js +25 -21
  87. package/dist/esm/components/base/index.js +164 -116
  88. package/dist/esm/components/base/info-list/constants.js +1 -0
  89. package/dist/esm/components/base/info-list/index.js +5 -4
  90. package/dist/esm/components/base/info-list/info-list.js +44 -23
  91. package/dist/esm/components/base/leverage-input/leverage-input.js +53 -50
  92. package/dist/esm/components/base/liquidation-params-table/constants.js +6 -0
  93. package/dist/esm/components/base/liquidation-params-table/index.js +6 -0
  94. package/dist/esm/components/base/liquidation-params-table/liquidation-params-table.js +62 -0
  95. package/dist/esm/components/base/manage-pane/index.js +7 -6
  96. package/dist/esm/components/base/manage-pane/manage-pane.js +88 -67
  97. package/dist/esm/components/base/more-accordion/constants.js +7 -0
  98. package/dist/esm/components/base/more-accordion/index.js +6 -0
  99. package/dist/esm/components/base/more-accordion/more-accordion.js +51 -0
  100. package/dist/esm/components/base/nested-info-stack/constants.js +6 -0
  101. package/dist/esm/components/base/nested-info-stack/index.js +6 -0
  102. package/dist/esm/components/base/nested-info-stack/nested-info-stack.js +20 -0
  103. package/dist/esm/components/base/page-title/page-title.js +28 -22
  104. package/dist/esm/components/base/pool-apy-breakdown-card/constants.js +7 -0
  105. package/dist/esm/components/base/pool-apy-breakdown-card/index.js +6 -0
  106. package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +65 -0
  107. package/dist/esm/components/base/side-card/constants.js +8 -0
  108. package/dist/esm/components/base/side-card/index.js +6 -0
  109. package/dist/esm/components/base/side-card/side-card.js +57 -0
  110. package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +7 -0
  111. package/dist/esm/components/base/strategy-apy-breakdown-card/index.js +6 -0
  112. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +51 -0
  113. package/dist/esm/components/base/tabber/tabber.js +83 -75
  114. package/dist/esm/components/base/title-meta/constants.js +8 -0
  115. package/dist/esm/components/base/title-meta/index.js +6 -0
  116. package/dist/esm/components/base/title-meta/title-meta.js +68 -0
  117. package/dist/esm/components/base/token-amount/token-amount.js +12 -12
  118. package/dist/esm/components/base/token-pair-symbol/constants.js +6 -0
  119. package/dist/esm/components/base/token-pair-symbol/index.js +6 -0
  120. package/dist/esm/components/base/token-pair-symbol/token-pair-symbol.js +33 -0
  121. package/dist/esm/components/base/token-pair-title/constants.js +6 -0
  122. package/dist/esm/components/base/token-pair-title/index.js +6 -0
  123. package/dist/esm/components/base/token-pair-title/token-pair-title.js +20 -0
  124. package/dist/esm/components/base/values/pnl-value.js +8 -8
  125. package/dist/esm/components/block-sync-pill/block-sync-pill.js +19 -29
  126. package/dist/esm/components/checkbox/checkbox-labeled.js +16 -26
  127. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +16 -26
  128. package/dist/esm/components/composites/notification-center/notification-center.js +1 -1
  129. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +2 -3
  130. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +1 -1
  131. package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +6 -7
  132. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +25 -35
  133. package/dist/esm/components/explorer-links-dropdown/explorer-links-dropdown.js +1 -83
  134. package/dist/esm/components/explorer-links-dropdown/index.js +1 -4
  135. package/dist/esm/components/graph/graph-view.js +74 -74
  136. package/dist/esm/components/graph/graph.js +309 -308
  137. package/dist/esm/components/icons/index.js +29 -28
  138. package/dist/esm/components/index.js +701 -712
  139. package/dist/esm/components/layout/index.js +14 -33
  140. package/dist/esm/components/modal/modal.js +1 -1
  141. package/dist/esm/components/table/index.js +38 -52
  142. package/dist/esm/components/with-copy/with-copy.js +16 -26
  143. package/dist/esm/hooks/index.js +29 -54
  144. package/dist/esm/hooks/use-debounce-call.js +2 -3
  145. package/dist/esm/index.js +863 -900
  146. package/dist/esm/locale/en.json.js +24 -1
  147. package/dist/globals.css +1 -1
  148. package/dist/types/components/base/amount-input/amount-input.d.ts +13 -2
  149. package/dist/types/components/base/amount-input/constants.d.ts +2 -0
  150. package/dist/types/components/base/amount-input/index.d.ts +1 -0
  151. package/dist/types/components/base/amount-input/token-button.d.ts +14 -2
  152. package/dist/types/components/base/amount-input/token-select-panel.d.ts +17 -0
  153. package/dist/types/components/base/borrow-rate-block/borrow-rate-block.d.ts +16 -0
  154. package/dist/types/components/base/borrow-rate-block/constants.d.ts +5 -0
  155. package/dist/types/components/base/borrow-rate-block/index.d.ts +2 -0
  156. package/dist/types/components/base/chart-with-side-card/chart-with-side-card.d.ts +13 -0
  157. package/dist/types/components/base/chart-with-side-card/constants.d.ts +5 -0
  158. package/dist/types/components/base/chart-with-side-card/index.d.ts +2 -0
  159. package/dist/types/components/base/detailed-page-title/detailed-page-title.d.ts +2 -1
  160. package/dist/types/components/base/history-chart/history-chart.d.ts +8 -1
  161. package/dist/types/components/base/index.d.ts +11 -0
  162. package/dist/types/components/base/info-list/constants.d.ts +1 -0
  163. package/dist/types/components/base/info-list/info-list.d.ts +8 -1
  164. package/dist/types/components/base/leverage-input/leverage-input.d.ts +1 -1
  165. package/dist/types/components/base/liquidation-params-table/constants.d.ts +3 -0
  166. package/dist/types/components/base/liquidation-params-table/index.d.ts +2 -0
  167. package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +12 -0
  168. package/dist/types/components/base/manage-pane/manage-pane.d.ts +7 -0
  169. package/dist/types/components/base/more-accordion/constants.d.ts +4 -0
  170. package/dist/types/components/base/more-accordion/index.d.ts +2 -0
  171. package/dist/types/components/base/more-accordion/more-accordion.d.ts +11 -0
  172. package/dist/types/components/base/nested-info-stack/constants.d.ts +3 -0
  173. package/dist/types/components/base/nested-info-stack/index.d.ts +2 -0
  174. package/dist/types/components/base/nested-info-stack/nested-info-stack.d.ts +10 -0
  175. package/dist/types/components/base/page-title/page-title.d.ts +6 -2
  176. package/dist/types/components/base/pool-apy-breakdown-card/constants.d.ts +4 -0
  177. package/dist/types/components/base/pool-apy-breakdown-card/index.d.ts +2 -0
  178. package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +14 -0
  179. package/dist/types/components/base/side-card/constants.d.ts +5 -0
  180. package/dist/types/components/base/side-card/index.d.ts +2 -0
  181. package/dist/types/components/base/side-card/side-card.d.ts +16 -0
  182. package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +4 -0
  183. package/dist/types/components/base/strategy-apy-breakdown-card/index.d.ts +2 -0
  184. package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +9 -0
  185. package/dist/types/components/base/tabber/tabber.d.ts +11 -2
  186. package/dist/types/components/base/title-meta/constants.d.ts +5 -0
  187. package/dist/types/components/base/title-meta/index.d.ts +2 -0
  188. package/dist/types/components/base/title-meta/title-meta.d.ts +15 -0
  189. package/dist/types/components/base/token-pair-symbol/constants.d.ts +3 -0
  190. package/dist/types/components/base/token-pair-symbol/index.d.ts +2 -0
  191. package/dist/types/components/base/token-pair-symbol/token-pair-symbol.d.ts +15 -0
  192. package/dist/types/components/base/token-pair-title/constants.d.ts +3 -0
  193. package/dist/types/components/base/token-pair-title/index.d.ts +2 -0
  194. package/dist/types/components/base/token-pair-title/token-pair-title.d.ts +11 -0
  195. package/dist/types/components/base/values/position-type-badge.d.ts +1 -1
  196. package/dist/types/components/base-link/base-link.d.ts +1 -1
  197. package/dist/types/components/buttons/button/button.d.ts +2 -2
  198. package/dist/types/components/checkbox/checkbox.d.ts +2 -2
  199. package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +4 -1
  200. package/dist/types/components/dialog/dialog-container.d.ts +3 -3
  201. package/dist/types/components/edit-input/edit-input.d.ts +1 -1
  202. package/dist/types/components/explorer-links-dropdown/explorer-links-dropdown.d.ts +6 -75
  203. package/dist/types/components/filter/variants.d.ts +1 -1
  204. package/dist/types/components/graph/graph-view.d.ts +1 -1
  205. package/dist/types/components/health-factor/health-factor.d.ts +2 -1
  206. package/dist/types/components/icons/index.d.ts +1 -1
  207. package/dist/types/components/index.d.ts +0 -6
  208. package/dist/types/components/input/input.d.ts +1 -1
  209. package/dist/types/components/layout/index.d.ts +0 -7
  210. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  211. package/dist/types/components/status-dot/status-dot.d.ts +1 -1
  212. package/dist/types/components/table/index.d.ts +0 -5
  213. package/dist/types/components/text-button/text-button.d.ts +1 -1
  214. package/dist/types/components/tip-card/tip-card.d.ts +2 -2
  215. package/dist/types/components/token-symbol/token-symbol.d.ts +1 -1
  216. package/dist/types/components/vertical-indicator/vertical-indicator.d.ts +2 -2
  217. package/dist/types/components/with-title/with-title.d.ts +1 -1
  218. package/dist/types/hooks/index.d.ts +0 -1
  219. package/dist/types/index.d.ts +0 -6
  220. package/dist/types/locale/en.json.d.ts +30 -1
  221. package/dist/types/types/index.d.ts +0 -2
  222. package/package.json +3 -15
  223. package/dist/cjs/components/auth/connect-required.cjs +0 -1
  224. package/dist/cjs/components/auth/index.cjs +0 -1
  225. package/dist/cjs/components/auth/signin-required.cjs +0 -1
  226. package/dist/cjs/components/auth/wallet-ui-context.cjs +0 -1
  227. package/dist/cjs/components/block-sync/block-sync.cjs +0 -1
  228. package/dist/cjs/components/block-sync/index.cjs +0 -1
  229. package/dist/cjs/components/image/image.cjs +0 -1
  230. package/dist/cjs/components/image/index.cjs +0 -1
  231. package/dist/cjs/components/layout/app-logo/app-logo.cjs +0 -1
  232. package/dist/cjs/components/layout/app-logo/index.cjs +0 -1
  233. package/dist/cjs/components/layout/block/block.cjs +0 -1
  234. package/dist/cjs/components/layout/block/index.cjs +0 -1
  235. package/dist/cjs/components/layout/footer/footer.cjs +0 -1
  236. package/dist/cjs/components/layout/footer/index.cjs +0 -1
  237. package/dist/cjs/components/layout/header/header.cjs +0 -1
  238. package/dist/cjs/components/layout/header/index.cjs +0 -1
  239. package/dist/cjs/components/layout/legal-disclaimer/index.cjs +0 -1
  240. package/dist/cjs/components/layout/legal-disclaimer/legal-disclaimer.cjs +0 -1
  241. package/dist/cjs/components/layout/page-layout/index.cjs +0 -1
  242. package/dist/cjs/components/layout/page-layout/page-layout.cjs +0 -1
  243. package/dist/cjs/components/layout/social-icons/index.cjs +0 -1
  244. package/dist/cjs/components/layout/social-icons/social-icons.cjs +0 -1
  245. package/dist/cjs/components/navbar/index.cjs +0 -1
  246. package/dist/cjs/components/navbar/navbar-indicator-context.cjs +0 -1
  247. package/dist/cjs/components/navbar/navbar-with-overflow.cjs +0 -1
  248. package/dist/cjs/components/navbar/navbar.cjs +0 -1
  249. package/dist/cjs/components/navitem/index.cjs +0 -1
  250. package/dist/cjs/components/navitem/navitem.cjs +0 -1
  251. package/dist/cjs/components/page-title/index.cjs +0 -1
  252. package/dist/cjs/components/page-title/page-title.cjs +0 -1
  253. package/dist/cjs/components/pool-apy-tooltip/apy-tooltip.cjs +0 -1
  254. package/dist/cjs/components/pool-apy-tooltip/index.cjs +0 -1
  255. package/dist/cjs/components/table/edit-button.cjs +0 -1
  256. package/dist/cjs/components/table/editable-grid-table.cjs +0 -1
  257. package/dist/cjs/components/table/editable-table.cjs +0 -1
  258. package/dist/cjs/components/table/grid-table-loader.cjs +0 -1
  259. package/dist/cjs/components/table/updated-value.cjs +0 -1
  260. package/dist/cjs/hooks/use-liquidation/index.cjs +0 -1
  261. package/dist/cjs/hooks/use-liquidation/types.cjs +0 -1
  262. package/dist/cjs/hooks/use-liquidation/utils.cjs +0 -1
  263. package/dist/cjs/test-ids/base.cjs +0 -1
  264. package/dist/cjs/test-ids/index.cjs +0 -1
  265. package/dist/cjs/types/component-props.cjs +0 -1
  266. package/dist/cjs/types/help.cjs +0 -1
  267. package/dist/cjs/utils/reactochart-compat.cjs +0 -1
  268. package/dist/esm/components/auth/connect-required.js +0 -37
  269. package/dist/esm/components/auth/index.js +0 -9
  270. package/dist/esm/components/auth/signin-required.js +0 -55
  271. package/dist/esm/components/auth/wallet-ui-context.js +0 -13
  272. package/dist/esm/components/block-sync/block-sync.js +0 -208
  273. package/dist/esm/components/block-sync/index.js +0 -4
  274. package/dist/esm/components/image/image.js +0 -32
  275. package/dist/esm/components/image/index.js +0 -4
  276. package/dist/esm/components/layout/app-logo/app-logo.js +0 -99
  277. package/dist/esm/components/layout/app-logo/index.js +0 -5
  278. package/dist/esm/components/layout/block/block.js +0 -50
  279. package/dist/esm/components/layout/block/index.js +0 -4
  280. package/dist/esm/components/layout/footer/footer.js +0 -237
  281. package/dist/esm/components/layout/footer/index.js +0 -7
  282. package/dist/esm/components/layout/header/header.js +0 -93
  283. package/dist/esm/components/layout/header/index.js +0 -5
  284. package/dist/esm/components/layout/legal-disclaimer/index.js +0 -4
  285. package/dist/esm/components/layout/legal-disclaimer/legal-disclaimer.js +0 -46
  286. package/dist/esm/components/layout/page-layout/index.js +0 -4
  287. package/dist/esm/components/layout/page-layout/page-layout.js +0 -39
  288. package/dist/esm/components/layout/social-icons/index.js +0 -4
  289. package/dist/esm/components/layout/social-icons/social-icons.js +0 -61
  290. package/dist/esm/components/navbar/index.js +0 -11
  291. package/dist/esm/components/navbar/navbar-indicator-context.js +0 -46
  292. package/dist/esm/components/navbar/navbar-with-overflow.js +0 -181
  293. package/dist/esm/components/navbar/navbar.js +0 -99
  294. package/dist/esm/components/navitem/index.js +0 -5
  295. package/dist/esm/components/navitem/navitem.js +0 -124
  296. package/dist/esm/components/page-title/index.js +0 -6
  297. package/dist/esm/components/page-title/page-title.js +0 -120
  298. package/dist/esm/components/pool-apy-tooltip/apy-tooltip.js +0 -154
  299. package/dist/esm/components/pool-apy-tooltip/index.js +0 -4
  300. package/dist/esm/components/table/edit-button.js +0 -48
  301. package/dist/esm/components/table/editable-grid-table.js +0 -121
  302. package/dist/esm/components/table/editable-table.js +0 -108
  303. package/dist/esm/components/table/grid-table-loader.js +0 -22
  304. package/dist/esm/components/table/updated-value.js +0 -49
  305. package/dist/esm/hooks/use-liquidation/index.js +0 -138
  306. package/dist/esm/hooks/use-liquidation/types.js +0 -1
  307. package/dist/esm/hooks/use-liquidation/utils.js +0 -144
  308. package/dist/esm/test-ids/base.js +0 -44
  309. package/dist/esm/test-ids/index.js +0 -46
  310. package/dist/esm/types/component-props.js +0 -1
  311. package/dist/esm/types/help.js +0 -1
  312. package/dist/esm/utils/reactochart-compat.js +0 -18
  313. package/dist/types/components/auth/connect-required.d.ts +0 -32
  314. package/dist/types/components/auth/index.d.ts +0 -3
  315. package/dist/types/components/auth/signin-required.d.ts +0 -37
  316. package/dist/types/components/auth/wallet-ui-context.d.ts +0 -36
  317. package/dist/types/components/block-sync/block-sync.d.ts +0 -8
  318. package/dist/types/components/block-sync/index.d.ts +0 -1
  319. package/dist/types/components/image/image.d.ts +0 -35
  320. package/dist/types/components/image/index.d.ts +0 -1
  321. package/dist/types/components/layout/app-logo/app-logo.d.ts +0 -26
  322. package/dist/types/components/layout/app-logo/index.d.ts +0 -1
  323. package/dist/types/components/layout/block/block.d.ts +0 -23
  324. package/dist/types/components/layout/block/index.d.ts +0 -1
  325. package/dist/types/components/layout/footer/footer.d.ts +0 -53
  326. package/dist/types/components/layout/footer/index.d.ts +0 -1
  327. package/dist/types/components/layout/header/header.d.ts +0 -123
  328. package/dist/types/components/layout/header/index.d.ts +0 -1
  329. package/dist/types/components/layout/legal-disclaimer/index.d.ts +0 -1
  330. package/dist/types/components/layout/legal-disclaimer/legal-disclaimer.d.ts +0 -32
  331. package/dist/types/components/layout/page-layout/index.d.ts +0 -1
  332. package/dist/types/components/layout/page-layout/page-layout.d.ts +0 -41
  333. package/dist/types/components/layout/social-icons/index.d.ts +0 -1
  334. package/dist/types/components/layout/social-icons/social-icons.d.ts +0 -7
  335. package/dist/types/components/navbar/index.d.ts +0 -3
  336. package/dist/types/components/navbar/navbar-indicator-context.d.ts +0 -13
  337. package/dist/types/components/navbar/navbar-with-overflow.d.ts +0 -20
  338. package/dist/types/components/navbar/navbar.d.ts +0 -25
  339. package/dist/types/components/navitem/index.d.ts +0 -1
  340. package/dist/types/components/navitem/navitem.d.ts +0 -67
  341. package/dist/types/components/page-title/index.d.ts +0 -1
  342. package/dist/types/components/page-title/page-title.d.ts +0 -77
  343. package/dist/types/components/pool-apy-tooltip/apy-tooltip.d.ts +0 -20
  344. package/dist/types/components/pool-apy-tooltip/index.d.ts +0 -1
  345. package/dist/types/components/table/edit-button.d.ts +0 -51
  346. package/dist/types/components/table/editable-grid-table.d.ts +0 -120
  347. package/dist/types/components/table/editable-table.d.ts +0 -101
  348. package/dist/types/components/table/grid-table-loader.d.ts +0 -25
  349. package/dist/types/components/table/updated-value.d.ts +0 -34
  350. package/dist/types/hooks/use-liquidation/index.d.ts +0 -53
  351. package/dist/types/hooks/use-liquidation/types.d.ts +0 -16
  352. package/dist/types/hooks/use-liquidation/utils.d.ts +0 -71
  353. package/dist/types/test-ids/base.d.ts +0 -20
  354. package/dist/types/test-ids/index.d.ts +0 -9
  355. package/dist/types/types/component-props.d.ts +0 -16
  356. package/dist/types/types/help.d.ts +0 -4
  357. package/dist/types/types/reactochart.d.ts +0 -145
  358. package/dist/types/utils/reactochart-compat.d.ts +0 -12
  359. /package/dist/cjs/{test-ids/notification-center.cjs → components/composites/notification-center/constants.cjs} +0 -0
  360. /package/dist/esm/{test-ids/notification-center.js → components/composites/notification-center/constants.js} +0 -0
  361. /package/dist/types/{test-ids/notification-center.d.ts → components/composites/notification-center/constants.d.ts} +0 -0
@@ -1,48 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { IconEditPen as d } from "@gearbox-protocol/static";
3
- import "../buttons/back-button/back-button.js";
4
- import { Button as h } from "../buttons/button/button.js";
5
- import "../buttons/copy-button/copy-button.js";
6
- import "../buttons/external-button/external-button.js";
7
- import "../buttons/filter-button/filter-button.js";
8
- import "../buttons/navigation-button/navigation-button.js";
9
- import "react";
10
- import "@gearbox-protocol/sdk";
11
- import { cn as r } from "../../utils/cn.js";
12
- import "sonner";
13
- import "@gearbox-protocol/sdk/common-utils";
14
- import "luxon";
15
- import "../../utils/z-index.js";
16
- import "../buttons/tab-button/tab-button.js";
17
- function q({
18
- onClick: m,
19
- customButton: p,
20
- children: e,
21
- disabled: n,
22
- width: c,
23
- $width: s,
24
- className: a,
25
- style: f,
26
- ...l
27
- }) {
28
- const t = e || p, o = c === "wide" || s === "wide";
29
- return /* @__PURE__ */ i("div", { className: r(t ? "px-4 py-2" : "px-2", o && "w-full"), children: /* @__PURE__ */ i(
30
- h,
31
- {
32
- className: r(
33
- t ? "p-0 h-fit hover:bg-accent/0" : "p-2 h-fit",
34
- o && "w-full",
35
- a
36
- ),
37
- variant: "ghost",
38
- onClick: m,
39
- disabled: n,
40
- style: f,
41
- ...l,
42
- children: t ?? /* @__PURE__ */ i(d, { size: 16, className: "size-4" })
43
- }
44
- ) });
45
- }
46
- export {
47
- q as EditButton
48
- };
@@ -1,121 +0,0 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { IconExternal as x } from "@gearbox-protocol/static";
3
- import "wagmi";
4
- import "../auth/wallet-ui-context.js";
5
- import "../buttons/back-button/back-button.js";
6
- import { Button as g } from "../buttons/button/button.js";
7
- import "../buttons/copy-button/copy-button.js";
8
- import "../buttons/external-button/external-button.js";
9
- import "../buttons/filter-button/filter-button.js";
10
- import "../buttons/navigation-button/navigation-button.js";
11
- import "react";
12
- import "@gearbox-protocol/sdk";
13
- import "clsx";
14
- import "tailwind-merge";
15
- import "sonner";
16
- import "@gearbox-protocol/sdk/common-utils";
17
- import "luxon";
18
- import "../../utils/z-index.js";
19
- import { TabButton as u } from "../buttons/tab-button/tab-button.js";
20
- import { SignInRequired as b } from "../auth/signin-required.js";
21
- import { TokenIcon as v } from "../token-icon/token-icon.js";
22
- import { GridTableCell as h, GridTable as N } from "./grid-table.js";
23
- import { UpdatedValue as C } from "./updated-value.js";
24
- function K({
25
- assetAddress: o,
26
- symbol: i,
27
- iconSymbol: s,
28
- comment: l,
29
- explorerUrl: r,
30
- span: d = 1
31
- }) {
32
- return /* @__PURE__ */ e(h, { span: d, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
33
- /* @__PURE__ */ e(v, { symbol: s ?? i, size: 24 }),
34
- /* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
35
- /* @__PURE__ */ e("div", { className: "font-medium", children: i }),
36
- l && /* @__PURE__ */ n("div", { className: "text-md text-muted-foreground", children: [
37
- "(",
38
- l,
39
- ")"
40
- ] }),
41
- r && /* @__PURE__ */ e(
42
- g,
43
- {
44
- variant: "ghost",
45
- size: "sm",
46
- className: "text-muted-foreground hover:text-foreground p-0 h-auto",
47
- onClick: () => window.open(`${r}/address/${o}`, "_blank"),
48
- children: /* @__PURE__ */ e(x, { size: 12, className: "size-3" })
49
- }
50
- )
51
- ] })
52
- ] }) });
53
- }
54
- function M({
55
- oldValue: o,
56
- newValue: i,
57
- onEdit: s,
58
- isEditable: l = !0,
59
- className: r,
60
- align: d = "right",
61
- customButton: a,
62
- postfix: m,
63
- disabled: c,
64
- nowrap: p,
65
- span: t = 1
66
- }) {
67
- const f = {
68
- left: "justify-start",
69
- right: "justify-end",
70
- center: "justify-center"
71
- }[d];
72
- return /* @__PURE__ */ e(h, { span: t, className: r, children: /* @__PURE__ */ e("div", { className: `flex ${f} w-full text-${d}`, children: /* @__PURE__ */ e(
73
- C,
74
- {
75
- oldValue: o,
76
- newValue: i,
77
- onEdit: s,
78
- isEditable: l,
79
- customButton: a,
80
- postfix: m,
81
- disabled: c,
82
- nowrap: p
83
- }
84
- ) }) });
85
- }
86
- function O({
87
- title: o,
88
- onNew: i,
89
- newButtonText: s = "New",
90
- buttonLoadingText: l = "Adding...",
91
- isLoading: r,
92
- actions: d,
93
- children: a,
94
- disabled: m = !1,
95
- skipSignIn: c = !0,
96
- cols: p = 12
97
- }) {
98
- return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
99
- /* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
100
- /* @__PURE__ */ e("h2", { className: "text-2xl font-bold", children: o }),
101
- /* @__PURE__ */ e(b, { skipSignIn: c, variant: "pink", size: "sm", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
102
- i && /* @__PURE__ */ e(u, { onClick: i, disabled: r || m, children: r ? l : s }),
103
- d?.map((t, f) => /* @__PURE__ */ e(
104
- u,
105
- {
106
- onClick: t.onClick,
107
- disabled: t.isLoading || m,
108
- children: t.isLoading ? t.loadingText || "Loading..." : t.text
109
- },
110
- f
111
- ))
112
- ] }) })
113
- ] }),
114
- /* @__PURE__ */ e("div", { className: "rounded-lg border", children: /* @__PURE__ */ e(N, { cols: p, children: a }) })
115
- ] });
116
- }
117
- export {
118
- K as GridTableCellAsset,
119
- M as GridTableCellUpdatable,
120
- O as GridTableEditable
121
- };
@@ -1,108 +0,0 @@
1
- import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
- import "wagmi";
3
- import "../auth/wallet-ui-context.js";
4
- import "../buttons/back-button/back-button.js";
5
- import "../buttons/button/button.js";
6
- import "../buttons/copy-button/copy-button.js";
7
- import { ExternalButton as h } from "../buttons/external-button/external-button.js";
8
- import "../buttons/filter-button/filter-button.js";
9
- import "../buttons/navigation-button/navigation-button.js";
10
- import "react";
11
- import "@gearbox-protocol/sdk";
12
- import "clsx";
13
- import "tailwind-merge";
14
- import "sonner";
15
- import "@gearbox-protocol/sdk/common-utils";
16
- import "luxon";
17
- import "../../utils/z-index.js";
18
- import { TabButton as f } from "../buttons/tab-button/tab-button.js";
19
- import { SignInRequired as x } from "../auth/signin-required.js";
20
- import { TokenIcon as b } from "../token-icon/token-icon.js";
21
- import { TableCell as u, Table as g } from "./table.js";
22
- import { UpdatedValue as v } from "./updated-value.js";
23
- function H({
24
- assetAddress: n,
25
- symbol: t,
26
- iconSymbol: s,
27
- comment: l,
28
- explorerUrl: i
29
- }) {
30
- return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ m("div", { className: "flex items-center gap-3", children: [
31
- /* @__PURE__ */ e(b, { symbol: s ?? t, size: 24 }),
32
- /* @__PURE__ */ m("div", { className: "flex items-center gap-1", children: [
33
- /* @__PURE__ */ e("div", { className: "font-medium", children: t }),
34
- l && /* @__PURE__ */ m("div", { className: "text-md text-muted-foreground", children: [
35
- "(",
36
- l,
37
- ")"
38
- ] }),
39
- i && /* @__PURE__ */ e(h, { url: `${i}/address/${n}` })
40
- ] })
41
- ] }) });
42
- }
43
- function J({
44
- oldValue: n,
45
- newValue: t,
46
- onEdit: s,
47
- isEditable: l = !0,
48
- className: i,
49
- align: d = "right",
50
- customButton: a,
51
- postfix: o,
52
- disabled: c,
53
- nowrap: r
54
- }) {
55
- const p = {
56
- left: "justify-start",
57
- right: "justify-end",
58
- center: "justify-center"
59
- }[d];
60
- return /* @__PURE__ */ e(u, { className: i, children: /* @__PURE__ */ e("div", { className: `flex ${p} w-full text-${d}`, children: /* @__PURE__ */ e(
61
- v,
62
- {
63
- oldValue: n,
64
- newValue: t,
65
- onEdit: s,
66
- isEditable: l,
67
- customButton: a,
68
- postfix: o,
69
- disabled: c,
70
- nowrap: r
71
- }
72
- ) }) });
73
- }
74
- function K({
75
- title: n,
76
- onNew: t,
77
- newButtonText: s = "New",
78
- buttonLoadingText: l = "Adding...",
79
- isLoading: i,
80
- actions: d,
81
- children: a,
82
- disabled: o = !1,
83
- skipSignIn: c = !0
84
- }) {
85
- return /* @__PURE__ */ m("div", { className: "space-y-4", children: [
86
- /* @__PURE__ */ m("div", { className: "flex justify-between items-center", children: [
87
- /* @__PURE__ */ e("h2", { className: "text-2xl font-bold", children: n }),
88
- /* @__PURE__ */ e(x, { skipSignIn: c, variant: "pink", size: "sm", children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
89
- t && /* @__PURE__ */ e(f, { onClick: t, disabled: i || o, children: i ? l : s }),
90
- d?.map((r, p) => /* @__PURE__ */ e(
91
- f,
92
- {
93
- onClick: r.onClick,
94
- disabled: r.isLoading || o,
95
- children: r.isLoading ? r.loadingText || "Loading..." : r.text
96
- },
97
- p
98
- ))
99
- ] }) })
100
- ] }),
101
- /* @__PURE__ */ e(g, { children: a })
102
- ] });
103
- }
104
- export {
105
- H as TableCellAsset,
106
- J as TableCellUpdatable,
107
- K as TableEditable
108
- };
@@ -1,22 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import { cn as s } from "../../utils/cn.js";
4
- const i = o.forwardRef(
5
- ({ className: a, colSpan: r, ...t }, d) => /* @__PURE__ */ e(
6
- "div",
7
- {
8
- ref: d,
9
- className: s(
10
- "flex items-center justify-center py-8",
11
- r ? `col-span-${r}` : "col-span-full",
12
- a
13
- ),
14
- ...t,
15
- children: /* @__PURE__ */ e("div", { className: "flex items-center gap-3 text-muted-foreground", children: /* @__PURE__ */ e("div", { className: "h-5 w-5 animate-spin rounded-full border-2 border-current border-t-transparent" }) })
16
- }
17
- )
18
- );
19
- i.displayName = "GridTableLoader";
20
- export {
21
- i as GridTableLoader
22
- };
@@ -1,49 +0,0 @@
1
- import { jsxs as e, jsx as r, Fragment as m } from "react/jsx-runtime";
2
- import { EditButton as h } from "./edit-button.js";
3
- function f({
4
- oldValue: a,
5
- newValue: n,
6
- onEdit: c,
7
- isEditable: i = !0,
8
- customButton: d,
9
- postfix: s,
10
- disabled: l = !1,
11
- nowrap: t = !1
12
- }) {
13
- return /* @__PURE__ */ e("div", { className: "flex items-center ", children: [
14
- /* @__PURE__ */ r("span", { className: "flex items-center gap-2", children: a !== void 0 && a !== n ? /* @__PURE__ */ e(m, { children: [
15
- /* @__PURE__ */ r(
16
- "span",
17
- {
18
- className: `line-through text-muted-foreground ${t ? "whitespace-nowrap" : ""}`,
19
- children: a
20
- }
21
- ),
22
- " → ",
23
- /* @__PURE__ */ e("span", { className: t ? "whitespace-nowrap" : "", children: [
24
- n,
25
- s && /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: [
26
- " ",
27
- s
28
- ] })
29
- ] })
30
- ] }) : /* @__PURE__ */ e("span", { className: t ? "whitespace-nowrap" : "", children: [
31
- n,
32
- s && /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: [
33
- " ",
34
- s
35
- ] })
36
- ] }) }),
37
- i && /* @__PURE__ */ r("div", { className: "flex-shrink-0", children: /* @__PURE__ */ r(
38
- h,
39
- {
40
- onClick: c,
41
- customButton: d,
42
- disabled: l
43
- }
44
- ) })
45
- ] });
46
- }
47
- export {
48
- f as UpdatedValue
49
- };
@@ -1,138 +0,0 @@
1
- import { toBN as v, PRICE_DECIMALS_POW as R } from "@gearbox-protocol/sdk";
2
- import { calcHealthFactor as U } from "@gearbox-protocol/sdk/common-utils";
3
- import { useMemo as G, useState as F, useCallback as Y } from "react";
4
- import { useFixedAssets as g, usePriceInNumber as S, useAxis as X, DEFAULT_AXIS_MAX as x } from "./utils.js";
5
- import { CELL_BAD as Z, CELL_CURRENT as $, CELL_GOOD as b, CELL_HOVERED as j, CELL_LIQUIDATION as M, CELL_OK as tt, DEFAULT_AXIS_MIN as et, formatAxisLabel as rt, formatAxisTipLabel as it, formatAxisTipPrice as st, getCellClass as nt, isPointInCell as ct, useIsAxisInRelativeUnits as ot, useLiquidationGraphActivePrice as at, useLiquidationGraphCurrentActiveValue as ut, useWithLiquidationGraphActivePrices as pt } from "./utils.js";
6
- const L = 35;
7
- function K({
8
- xMin: t,
9
- xMax: e,
10
- yMin: r,
11
- yMax: c,
12
- xLabel: i,
13
- yLabel: s,
14
- assets: n,
15
- quotas: o,
16
- prices: u,
17
- liquidationThresholds: a,
18
- quotasInfo: p,
19
- underlyingTokenAddress: m,
20
- debt: A,
21
- tokensList: l
22
- }) {
23
- return G(() => {
24
- const N = e - t, T = c - r, P = N / L, d = T / L, f = Array.from(Array(L)), E = { ...u };
25
- return f.flatMap((B, C) => {
26
- const _ = t + C * P, I = t + (C + 1) * P;
27
- return i && (E[i.address] = v(
28
- String((_ + I) / 2),
29
- R
30
- )), f.map((H, D) => {
31
- const O = r + D * d, h = r + (D + 1) * d;
32
- return s && (E[s.address] = v(
33
- String((O + h) / 2),
34
- R
35
- )), {
36
- x: _,
37
- xEnd: I,
38
- y: O,
39
- yEnd: h,
40
- value: U({
41
- assets: n,
42
- quotas: o,
43
- prices: E,
44
- liquidationThresholds: a,
45
- underlyingToken: m,
46
- debt: A,
47
- quotasInfo: p,
48
- tokensList: l
49
- })
50
- };
51
- });
52
- });
53
- }, [
54
- t,
55
- e,
56
- r,
57
- c,
58
- i,
59
- s,
60
- n,
61
- o,
62
- u,
63
- a,
64
- m,
65
- A,
66
- p,
67
- l
68
- ]);
69
- }
70
- function Q({ prices: t }) {
71
- const [e, r] = F({}), c = G(
72
- () => ({ ...t, ...e }),
73
- [t, e]
74
- ), i = Y(
75
- (s, n) => {
76
- r({ ...e, [n]: s });
77
- },
78
- [e]
79
- );
80
- return [c, i];
81
- }
82
- function w({
83
- assets: t,
84
- liquidationThresholds: e,
85
- quotas: r,
86
- quotasInfo: c,
87
- tokensList: i,
88
- prices: s
89
- }) {
90
- const [n] = g({
91
- assets: t,
92
- liquidationThresholds: e,
93
- quotas: r,
94
- quotasInfo: c
95
- }), [o, u] = S({
96
- asset: n[0],
97
- tokensList: i,
98
- prices: s
99
- }), [a, p] = S({
100
- asset: n[1],
101
- tokensList: i,
102
- prices: s
103
- }), m = X({ currentPrice: o, token: u }), A = X({ currentPrice: a, token: p });
104
- return {
105
- xAxis: m,
106
- yAxis: A,
107
- currentPoint: [
108
- o || x / 2,
109
- a || x / 2
110
- ],
111
- fixedBalances: n
112
- };
113
- }
114
- export {
115
- Z as CELL_BAD,
116
- $ as CELL_CURRENT,
117
- b as CELL_GOOD,
118
- j as CELL_HOVERED,
119
- M as CELL_LIQUIDATION,
120
- tt as CELL_OK,
121
- x as DEFAULT_AXIS_MAX,
122
- et as DEFAULT_AXIS_MIN,
123
- rt as formatAxisLabel,
124
- it as formatAxisTipLabel,
125
- st as formatAxisTipPrice,
126
- nt as getCellClass,
127
- ct as isPointInCell,
128
- X as useAxis,
129
- Q as useEditPriceManually,
130
- g as useFixedAssets,
131
- ot as useIsAxisInRelativeUnits,
132
- at as useLiquidationGraphActivePrice,
133
- ut as useLiquidationGraphCurrentActiveValue,
134
- w as useLiquidationGraphParams,
135
- K as useLiquidationHeatmap,
136
- S as usePriceInNumber,
137
- pt as useWithLiquidationGraphActivePrices
138
- };
@@ -1,144 +0,0 @@
1
- import { formatBN as E, toBN as f, PRICE_DECIMALS_POW as c, PERCENTAGE_FACTOR as C } from "@gearbox-protocol/sdk";
2
- import { useState as p, useCallback as I, useMemo as i } from "react";
3
- import { bnToInputView as m } from "../../utils/bn-to-input-view.js";
4
- import { formatPrice as M } from "../../utils/format-number.js";
5
- const b = "rct-chart__heatmap-cell--hovered", D = "rct-chart__heatmap-cell--current", N = "rct-chart__heatmap-cell--good", S = "rct-chart__heatmap-cell--ok", O = "rct-chart__heatmap-cell--bad", g = "rct-chart__heatmap-cell--liquidation", k = 0, W = 1;
6
- function $({
7
- token: t,
8
- currentPrice: r
9
- }) {
10
- const [n, o] = p("straight"), e = I(() => {
11
- o(n === "straight" ? "reverse" : "straight");
12
- }, [n]), s = i(() => r !== void 0 ? {
13
- min: 0,
14
- max: r * 1.5,
15
- minHf: Number(C)
16
- } : void 0, [r]);
17
- return i(() => s !== void 0 && t !== void 0 ? {
18
- ...s,
19
- label: t,
20
- nextOrder: e,
21
- order: n
22
- } : void 0, [s, t, e, n]);
23
- }
24
- function w({
25
- assets: t,
26
- liquidationThresholds: r,
27
- quotas: n,
28
- quotasInfo: o,
29
- at: e = 0,
30
- length: s = 2
31
- }) {
32
- return i(() => {
33
- const l = [...t].filter((d) => {
34
- const _ = r[d.token] || 0n, h = o[d.token], L = n[d.token]?.balance || 0n;
35
- return h ? h.isActive ? _ > 0 && L > 0 : !1 : _ > 0;
36
- });
37
- return [l.splice(e, s), l];
38
- }, [t, r, n, o, e, s]);
39
- }
40
- const A = "0x0000000000000000000000000000000000000000";
41
- function z({
42
- asset: t,
43
- tokensList: r,
44
- prices: n
45
- }) {
46
- return i(() => {
47
- const e = n[t?.token || A], s = r[t?.token || A];
48
- return [e ? Number(m(e, 8)) : void 0, s];
49
- }, [t, r, n]);
50
- }
51
- function K(t, r) {
52
- return i(() => !!t && !!r && t.address !== r.address, [t, r]);
53
- }
54
- const x = 2, T = 6;
55
- function F(t) {
56
- return M(t, x, T);
57
- }
58
- function Q(t, r, n) {
59
- const [o, e] = n === "straight" ? [t, r] : [r, t];
60
- return t ? [
61
- ...o ? [o.title] : [],
62
- ...e && o && e.address !== o.address ? [e.title] : []
63
- ].join("/") : "";
64
- }
65
- function V(t, r, n = "straight") {
66
- return (o = 0) => r && t ? F(
67
- n === "straight" ? a(o, t) : a(t, o)
68
- ) : `$${E(
69
- f(String(o), c),
70
- c,
71
- 1
72
- )}`;
73
- }
74
- function a(t, r) {
75
- const n = typeof t == "bigint" ? Number(m(t, c)) : t, o = typeof r == "bigint" ? Number(m(r, c)) : r;
76
- return n / o;
77
- }
78
- function Y(t, r, n, o = "straight") {
79
- return i(() => r && n ? o === "straight" ? a(t, r) : a(r, t) : t, [t, r, o, n]);
80
- }
81
- function Z() {
82
- const [t, r] = p(null);
83
- return {
84
- activePoint: t,
85
- handleMouseMove: ({
86
- xValue: e,
87
- yValue: s
88
- }) => {
89
- r([
90
- e === null ? void 0 : e,
91
- s === null ? void 0 : s
92
- ]);
93
- },
94
- handleMouseLeave: () => {
95
- r(null);
96
- }
97
- };
98
- }
99
- function J({
100
- xLabel: t,
101
- yLabel: r,
102
- activePoint: n,
103
- prices: o
104
- }) {
105
- const [e, s] = n || [];
106
- return i(() => ({
107
- ...o,
108
- ...t && e ? { [t.address]: f(String(e), c) } : {},
109
- ...r && s ? { [r.address]: f(String(s), c) } : {}
110
- }), [o, t, r, e, s]);
111
- }
112
- function v(t, r) {
113
- return t[0] >= r.x && t[0] <= r.xEnd && t[1] >= r.y && t[1] <= r.yEnd;
114
- }
115
- const H = 15e3, R = 11e3, G = 10500;
116
- function B(t) {
117
- return t >= H ? "good" : t > R ? "medium" : t > G ? "bad" : t > C ? "critical" : "liquidation";
118
- }
119
- function y(t, r, n, o) {
120
- const e = [], s = B(t.value), u = v(r, t);
121
- return (n !== void 0 && o !== void 0 ? v([n, o], t) : !1) && e.push(b), u ? e.push(D) : s === "good" ? e.push(N) : s === "medium" ? e.push(S) : s === "bad" || s === "critical" ? e.push(O) : e.push(g), e.join(" ");
122
- }
123
- export {
124
- O as CELL_BAD,
125
- D as CELL_CURRENT,
126
- N as CELL_GOOD,
127
- b as CELL_HOVERED,
128
- g as CELL_LIQUIDATION,
129
- S as CELL_OK,
130
- W as DEFAULT_AXIS_MAX,
131
- k as DEFAULT_AXIS_MIN,
132
- V as formatAxisLabel,
133
- Q as formatAxisTipLabel,
134
- F as formatAxisTipPrice,
135
- y as getCellClass,
136
- v as isPointInCell,
137
- $ as useAxis,
138
- w as useFixedAssets,
139
- K as useIsAxisInRelativeUnits,
140
- Y as useLiquidationGraphActivePrice,
141
- Z as useLiquidationGraphCurrentActiveValue,
142
- z as usePriceInNumber,
143
- J as useWithLiquidationGraphActivePrices
144
- };
@@ -1,44 +0,0 @@
1
- import { AmountInputTest as o } from "../components/base/amount-input/constants.js";
2
- import { DetailedPageTitleTest as T } from "../components/base/detailed-page-title/constants.js";
3
- import { DetailAsideWrapperTest as a, DetailsViewTest as m } from "../components/base/details-view/constants.js";
4
- import { HealthFactorBlockTest as i } from "../components/base/health-factor-block/constants.js";
5
- import { HistoryChartTest as x } from "../components/base/history-chart/constants.js";
6
- import { InfoListTest as l } from "../components/base/info-list/constants.js";
7
- import { LeverageInputTest as u } from "../components/base/leverage-input/constants.js";
8
- import { LiquidationPriceBlockTest as g } from "../components/base/liquidation-price-block/constants.js";
9
- import { ManagePaneTest as B } from "../components/base/manage-pane/constants.js";
10
- import { PageTitleTest as L } from "../components/base/page-title/constants.js";
11
- import { ReviewButtonTest as b } from "../components/base/review-button/constants.js";
12
- import { SectionHeadingTest as A } from "../components/base/section-heading/constants.js";
13
- import { SegmentedTabsTest as H } from "../components/base/segmented-tabs/constants.js";
14
- import { StackTest as q } from "../components/base/stack/constants.js";
15
- import { StatBadgeTest as w } from "../components/base/stat-badge/constants.js";
16
- import { StickyBarTest as V } from "../components/base/sticky-bar/constants.js";
17
- import { TabberTest as F } from "../components/base/tabber/constants.js";
18
- import { TimeToLiquidationBlockTest as R } from "../components/base/time-to-liquidation-block/constants.js";
19
- import { TokenAmountTest as j } from "../components/base/token-amount/constants.js";
20
- import { PositionShortLabelTest as E, ValueTest as G } from "../components/base/values/constants.js";
21
- export {
22
- o as AmountInputTest,
23
- a as DetailAsideWrapperTest,
24
- T as DetailedPageTitleTest,
25
- m as DetailsViewTest,
26
- i as HealthFactorBlockTest,
27
- x as HistoryChartTest,
28
- l as InfoListTest,
29
- u as LeverageInputTest,
30
- g as LiquidationPriceBlockTest,
31
- B as ManagePaneTest,
32
- L as PageTitleTest,
33
- E as PositionShortLabelTest,
34
- b as ReviewButtonTest,
35
- A as SectionHeadingTest,
36
- H as SegmentedTabsTest,
37
- q as StackTest,
38
- w as StatBadgeTest,
39
- V as StickyBarTest,
40
- F as TabberTest,
41
- R as TimeToLiquidationBlockTest,
42
- j as TokenAmountTest,
43
- G as ValueTest
44
- };