@gearbox-protocol/permissionless-ui 1.17.9 → 1.19.0
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.
- package/dist/cjs/_virtual/ResizeObserver.es.cjs +1 -0
- package/dist/cjs/_virtual/_commonjsHelpers.cjs +1 -1
- package/dist/cjs/_virtual/arrows.cjs +1 -0
- package/dist/cjs/_virtual/default-props.cjs +1 -0
- package/dist/cjs/_virtual/dots.cjs +1 -0
- package/dist/cjs/_virtual/index2.cjs +1 -0
- package/dist/cjs/_virtual/index3.cjs +1 -0
- package/dist/cjs/_virtual/index4.cjs +1 -0
- package/dist/cjs/_virtual/initial-state.cjs +1 -0
- package/dist/cjs/_virtual/inner-slider.cjs +1 -0
- package/dist/cjs/_virtual/innerSliderUtils.cjs +1 -0
- package/dist/cjs/_virtual/slider.cjs +1 -0
- package/dist/cjs/_virtual/track.cjs +1 -0
- package/dist/cjs/components/address/address.cjs +1 -0
- package/dist/cjs/components/address/index.cjs +1 -0
- package/dist/cjs/components/alert-modal/alert-modal.cjs +1 -0
- package/dist/cjs/components/alert-modal/index.cjs +1 -0
- package/dist/cjs/components/apy/apy.cjs +1 -0
- package/dist/cjs/components/apy/index.cjs +1 -0
- package/dist/cjs/components/arc-loader/arc-loader.cjs +1 -0
- package/dist/cjs/components/arc-loader/index.cjs +1 -0
- package/dist/cjs/components/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/cjs/components/button-checkbox/button-checkbox.cjs +1 -0
- package/dist/cjs/components/button-checkbox/index.cjs +1 -0
- package/dist/cjs/components/carousel/carousel.cjs +5 -0
- package/dist/cjs/components/carousel/index.cjs +1 -0
- package/dist/cjs/components/complex-input/complex-input.cjs +1 -0
- package/dist/cjs/components/complex-input/index.cjs +1 -0
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/confirm-menu/confirm-menu.cjs +1 -0
- package/dist/cjs/components/confirm-menu/index.cjs +1 -0
- package/dist/cjs/components/currency-button/currency-button.cjs +1 -0
- package/dist/cjs/components/currency-button/index.cjs +1 -0
- package/dist/cjs/components/detailed-apy/detailed-apy.cjs +1 -0
- package/dist/cjs/components/detailed-apy/index.cjs +1 -0
- package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/dropdown-label/dropdown-label.cjs +1 -0
- package/dist/cjs/components/dropdown-label/index.cjs +1 -0
- package/dist/cjs/components/edit-input/edit-input.cjs +1 -0
- package/dist/cjs/components/edit-input/index.cjs +1 -0
- package/dist/cjs/components/explorer-links-dropdown/explorer-links-dropdown.cjs +1 -0
- package/dist/cjs/components/explorer-links-dropdown/index.cjs +1 -0
- package/dist/cjs/components/filter/filter-block.cjs +1 -1
- package/dist/cjs/components/filter/filter-dropdown-item.cjs +1 -1
- package/dist/cjs/components/filter/filter-modal-item.cjs +1 -1
- package/dist/cjs/components/formatted-number/formatted-number.cjs +1 -0
- package/dist/cjs/components/formatted-number/index.cjs +1 -0
- package/dist/cjs/components/general-asset-list/general-asset-list.cjs +1 -0
- package/dist/cjs/components/general-asset-list/index.cjs +1 -0
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/grid-td-cell/grid-td-cell.cjs +1 -0
- package/dist/cjs/components/grid-td-cell/index.cjs +1 -0
- package/dist/cjs/components/help-sections/help-sections.cjs +1 -0
- package/dist/cjs/components/help-sections/index.cjs +1 -0
- package/dist/cjs/components/hide-on/hide-on.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/layout/col/col.cjs +1 -1
- package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/navbar-logo/index.cjs +1 -0
- package/dist/cjs/components/navbar-logo/navbar-logo.cjs +1 -0
- package/dist/cjs/components/network-icon/index.cjs +1 -0
- package/dist/cjs/components/network-icon/network-icon.cjs +1 -0
- package/dist/cjs/components/overflow/index.cjs +1 -0
- package/dist/cjs/components/overflow/overflow.cjs +1 -0
- package/dist/cjs/components/overflow-container/index.cjs +1 -0
- package/dist/cjs/components/overflow-container/overflow-container.cjs +1 -0
- package/dist/cjs/components/page-title/page-title.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/index.cjs +1 -0
- package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -0
- package/dist/cjs/components/pool-indicator-icon/index.cjs +1 -0
- package/dist/cjs/components/pool-indicator-icon/pool-indicator-icon.cjs +1 -0
- package/dist/cjs/components/rounded-image/index.cjs +1 -0
- package/dist/cjs/components/rounded-image/rounded-image.cjs +1 -0
- package/dist/cjs/components/row/index.cjs +1 -0
- package/dist/cjs/components/row/row.cjs +1 -0
- package/dist/cjs/components/segmented-control/segmented-control.cjs +1 -1
- package/dist/cjs/components/slider/slider.cjs +1 -1
- package/dist/cjs/components/slider-token/index.cjs +1 -0
- package/dist/cjs/components/slider-token/slider-token.cjs +1 -0
- package/dist/cjs/components/smart-number-input/smart-number-input.cjs +1 -1
- package/dist/cjs/components/split-list/index.cjs +1 -0
- package/dist/cjs/components/split-list/split-list.cjs +1 -0
- package/dist/cjs/components/stat-badge/stat-badge.cjs +1 -1
- package/dist/cjs/components/status-triangle/status-triangle.cjs +1 -1
- package/dist/cjs/components/styled-dropdown/index.cjs +1 -0
- package/dist/cjs/components/styled-dropdown/styled-dropdown.cjs +1 -0
- package/dist/cjs/components/table/grid-table.cjs +1 -1
- package/dist/cjs/components/text-button/index.cjs +1 -0
- package/dist/cjs/components/text-button/text-button.cjs +1 -0
- package/dist/cjs/components/time-to-liquidation/index.cjs +1 -0
- package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -0
- package/dist/cjs/components/tokens-list-cell/index.cjs +1 -0
- package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -0
- package/dist/cjs/components/with-filter-button/with-filter-button.cjs +1 -1
- package/dist/cjs/components/with-title/index.cjs +1 -0
- package/dist/cjs/components/with-title/with-title.cjs +1 -0
- package/dist/cjs/hooks/index.cjs +1 -1
- package/dist/cjs/hooks/use-debounce-call.cjs +1 -0
- package/dist/cjs/hooks/use-debounce.cjs +1 -1
- package/dist/cjs/hooks/use-pool-points-tips.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs +5 -0
- package/dist/cjs/node_modules/.pnpm/json2mq@0.2.0/node_modules/json2mq/index.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/lodash.debounce@4.0.8/node_modules/lodash.debounce/index.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/arrows.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/default-props.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/dots.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/index.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/initial-state.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/inner-slider.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/slider.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/track.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/utils/innerSliderUtils.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/string-convert@0.2.1/node_modules/string-convert/camel2hyphen.cjs +1 -0
- package/dist/cjs/utils/bn-to-pretty-view.cjs +1 -0
- package/dist/cjs/utils/format-money.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/network-icons.cjs +1 -0
- package/dist/cjs/utils/parse-input-to-bn.cjs +1 -0
- package/dist/cjs/utils/plural.cjs +1 -0
- package/dist/cjs/utils/ranges.cjs +1 -0
- package/dist/cjs/utils/search.cjs +1 -0
- package/dist/cjs/utils/shorten-string.cjs +1 -0
- package/dist/cjs/utils/ttl.cjs +1 -1
- package/dist/cjs/utils/window.cjs +1 -0
- package/dist/esm/_virtual/ResizeObserver.es.js +6 -0
- package/dist/esm/_virtual/_commonjsHelpers.js +25 -3
- package/dist/esm/_virtual/arrows.js +4 -0
- package/dist/esm/_virtual/default-props.js +4 -0
- package/dist/esm/_virtual/dots.js +4 -0
- package/dist/esm/_virtual/index2.js +7 -0
- package/dist/esm/_virtual/index3.js +4 -0
- package/dist/esm/_virtual/index4.js +4 -0
- package/dist/esm/_virtual/initial-state.js +4 -0
- package/dist/esm/_virtual/inner-slider.js +4 -0
- package/dist/esm/_virtual/innerSliderUtils.js +4 -0
- package/dist/esm/_virtual/slider.js +4 -0
- package/dist/esm/_virtual/track.js +4 -0
- package/dist/esm/components/address/address.js +21 -0
- package/dist/esm/components/address/index.js +4 -0
- package/dist/esm/components/alert-modal/alert-modal.js +32 -0
- package/dist/esm/components/alert-modal/index.js +4 -0
- package/dist/esm/components/apy/apy.js +32 -0
- package/dist/esm/components/apy/index.js +4 -0
- package/dist/esm/components/arc-loader/arc-loader.js +45 -0
- package/dist/esm/components/arc-loader/index.js +4 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.js +60 -30
- package/dist/esm/components/button-checkbox/button-checkbox.js +53 -0
- package/dist/esm/components/button-checkbox/index.js +4 -0
- package/dist/esm/components/carousel/carousel.js +65 -0
- package/dist/esm/components/carousel/index.js +4 -0
- package/dist/esm/components/complex-input/complex-input.js +85 -0
- package/dist/esm/components/complex-input/index.js +4 -0
- package/dist/esm/components/compound-apy/compound-apy.js +91 -74
- package/dist/esm/components/confirm-menu/confirm-menu.js +31 -0
- package/dist/esm/components/confirm-menu/index.js +4 -0
- package/dist/esm/components/currency-button/currency-button.js +84 -0
- package/dist/esm/components/currency-button/index.js +4 -0
- package/dist/esm/components/detailed-apy/detailed-apy.js +73 -0
- package/dist/esm/components/detailed-apy/index.js +4 -0
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +11 -11
- package/dist/esm/components/dropdown-label/dropdown-label.js +44 -0
- package/dist/esm/components/dropdown-label/index.js +4 -0
- package/dist/esm/components/edit-input/edit-input.js +96 -0
- package/dist/esm/components/edit-input/index.js +4 -0
- package/dist/esm/components/explorer-links-dropdown/explorer-links-dropdown.js +80 -0
- package/dist/esm/components/explorer-links-dropdown/index.js +4 -0
- package/dist/esm/components/filter/filter-block.js +14 -11
- package/dist/esm/components/filter/filter-dropdown-item.js +47 -17
- package/dist/esm/components/filter/filter-modal-item.js +53 -18
- package/dist/esm/components/formatted-number/formatted-number.js +15 -0
- package/dist/esm/components/formatted-number/index.js +4 -0
- package/dist/esm/components/general-asset-list/general-asset-list.js +42 -0
- package/dist/esm/components/general-asset-list/index.js +4 -0
- package/dist/esm/components/graph/graph-view.js +97 -84
- package/dist/esm/components/graph/graph.js +80 -70
- package/dist/esm/components/grid-td-cell/grid-td-cell.js +11 -0
- package/dist/esm/components/grid-td-cell/index.js +4 -0
- package/dist/esm/components/help-sections/help-sections.js +18 -0
- package/dist/esm/components/help-sections/index.js +5 -0
- package/dist/esm/components/hide-on/hide-on.js +50 -26
- package/dist/esm/components/index.js +530 -468
- package/dist/esm/components/layout/col/col.js +4 -4
- package/dist/esm/components/markdown-viewer/markdown-viewer.js +71 -68
- package/dist/esm/components/navbar-logo/index.js +4 -0
- package/dist/esm/components/navbar-logo/navbar-logo.js +30 -0
- package/dist/esm/components/network-icon/index.js +4 -0
- package/dist/esm/components/network-icon/network-icon.js +48 -0
- package/dist/esm/components/overflow/index.js +5 -0
- package/dist/esm/components/overflow/overflow.js +20 -0
- package/dist/esm/components/overflow-container/index.js +4 -0
- package/dist/esm/components/overflow-container/overflow-container.js +38 -0
- package/dist/esm/components/page-title/page-title.js +49 -36
- package/dist/esm/components/pool-apy-tooltip/index.js +4 -0
- package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +83 -0
- package/dist/esm/components/pool-indicator-icon/index.js +4 -0
- package/dist/esm/components/pool-indicator-icon/pool-indicator-icon.js +25 -0
- package/dist/esm/components/rounded-image/index.js +4 -0
- package/dist/esm/components/rounded-image/rounded-image.js +32 -0
- package/dist/esm/components/row/index.js +4 -0
- package/dist/esm/components/row/row.js +55 -0
- package/dist/esm/components/segmented-control/segmented-control.js +64 -63
- package/dist/esm/components/slider/slider.js +123 -41
- package/dist/esm/components/slider-token/index.js +4 -0
- package/dist/esm/components/slider-token/slider-token.js +68 -0
- package/dist/esm/components/smart-number-input/smart-number-input.js +113 -67
- package/dist/esm/components/split-list/index.js +4 -0
- package/dist/esm/components/split-list/split-list.js +39 -0
- package/dist/esm/components/stat-badge/stat-badge.js +63 -53
- package/dist/esm/components/status-triangle/status-triangle.js +20 -13
- package/dist/esm/components/styled-dropdown/index.js +4 -0
- package/dist/esm/components/styled-dropdown/styled-dropdown.js +106 -0
- package/dist/esm/components/table/grid-table.js +132 -92
- package/dist/esm/components/text-button/index.js +4 -0
- package/dist/esm/components/text-button/text-button.js +55 -0
- package/dist/esm/components/time-to-liquidation/index.js +4 -0
- package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +45 -0
- package/dist/esm/components/tokens-list-cell/index.js +4 -0
- package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +72 -0
- package/dist/esm/components/with-filter-button/with-filter-button.js +53 -44
- package/dist/esm/components/with-title/index.js +4 -0
- package/dist/esm/components/with-title/with-title.js +30 -0
- package/dist/esm/hooks/index.js +42 -39
- package/dist/esm/hooks/use-debounce-call.js +17 -0
- package/dist/esm/hooks/use-debounce.js +14 -25
- package/dist/esm/hooks/use-pool-points-tips.js +17 -0
- package/dist/esm/index.js +660 -575
- package/dist/esm/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +42 -0
- package/dist/esm/node_modules/.pnpm/json2mq@0.2.0/node_modules/json2mq/index.js +25 -0
- package/dist/esm/node_modules/.pnpm/lodash.debounce@4.0.8/node_modules/lodash.debounce/index.js +85 -0
- package/dist/esm/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/arrows.js +210 -0
- package/dist/esm/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/default-props.js +81 -0
- package/dist/esm/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/dots.js +170 -0
- package/dist/esm/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/index.js +18 -0
- package/dist/esm/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/initial-state.js +44 -0
- package/dist/esm/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/inner-slider.js +547 -0
- package/dist/esm/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/slider.js +258 -0
- package/dist/esm/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/track.js +234 -0
- package/dist/esm/node_modules/.pnpm/react-slick@0.31.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-slick/lib/utils/innerSliderUtils.js +390 -0
- package/dist/esm/node_modules/.pnpm/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +290 -0
- package/dist/esm/node_modules/.pnpm/string-convert@0.2.1/node_modules/string-convert/camel2hyphen.js +14 -0
- package/dist/esm/utils/bn-to-pretty-view.js +6 -0
- package/dist/esm/utils/format-money.js +41 -24
- package/dist/esm/utils/index.js +73 -51
- package/dist/esm/utils/network-icons.js +56 -0
- package/dist/esm/utils/parse-input-to-bn.js +20 -0
- package/dist/esm/utils/plural.js +11 -0
- package/dist/esm/utils/ranges.js +24 -0
- package/dist/esm/utils/search.js +6 -0
- package/dist/esm/utils/shorten-string.js +6 -0
- package/dist/esm/utils/ttl.js +13 -3
- package/dist/esm/utils/window.js +6 -0
- package/dist/globals.css +1 -1
- package/dist/permissionless-ui.css +1 -0
- package/dist/types/components/address/address.d.ts +56 -0
- package/dist/types/components/address/index.d.ts +1 -0
- package/dist/types/components/alert-modal/alert-modal.d.ts +78 -0
- package/dist/types/components/alert-modal/index.d.ts +1 -0
- package/dist/types/components/apy/apy.d.ts +35 -0
- package/dist/types/components/apy/index.d.ts +1 -0
- package/dist/types/components/arc-loader/arc-loader.d.ts +31 -0
- package/dist/types/components/arc-loader/index.d.ts +1 -0
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +40 -3
- package/dist/types/components/button-checkbox/button-checkbox.d.ts +39 -0
- package/dist/types/components/button-checkbox/index.d.ts +1 -0
- package/dist/types/components/card-grid/card-grid.d.ts +1 -1
- package/dist/types/components/carousel/carousel.d.ts +30 -0
- package/dist/types/components/carousel/index.d.ts +2 -0
- package/dist/types/components/colored-text/colored-text.d.ts +1 -1
- package/dist/types/components/complex-input/complex-input.d.ts +78 -0
- package/dist/types/components/complex-input/index.d.ts +1 -0
- package/dist/types/components/compound-apy/compound-apy.d.ts +38 -2
- package/dist/types/components/confirm-menu/confirm-menu.d.ts +27 -0
- package/dist/types/components/confirm-menu/index.d.ts +1 -0
- package/dist/types/components/currency-button/currency-button.d.ts +79 -0
- package/dist/types/components/currency-button/index.d.ts +1 -0
- package/dist/types/components/detailed-apy/detailed-apy.d.ts +54 -0
- package/dist/types/components/detailed-apy/index.d.ts +1 -0
- package/dist/types/components/detailed-page-title/detailed-page-title.d.ts +3 -5
- package/dist/types/components/dropdown-label/dropdown-label.d.ts +47 -0
- package/dist/types/components/dropdown-label/index.d.ts +1 -0
- package/dist/types/components/edit-input/edit-input.d.ts +55 -0
- package/dist/types/components/edit-input/index.d.ts +1 -0
- package/dist/types/components/explorer-links-dropdown/explorer-links-dropdown.d.ts +82 -0
- package/dist/types/components/explorer-links-dropdown/index.d.ts +1 -0
- package/dist/types/components/filter/filter-block.d.ts +22 -0
- package/dist/types/components/filter/filter-dropdown-item.d.ts +40 -2
- package/dist/types/components/filter/filter-modal-item.d.ts +26 -2
- package/dist/types/components/formatted-number/formatted-number.d.ts +11 -0
- package/dist/types/components/formatted-number/index.d.ts +1 -0
- package/dist/types/components/general-asset-list/general-asset-list.d.ts +59 -0
- package/dist/types/components/general-asset-list/index.d.ts +1 -0
- package/dist/types/components/graph/formatters.d.ts +1 -1
- package/dist/types/components/graph/graph-view.d.ts +19 -3
- package/dist/types/components/grid-td-cell/grid-td-cell.d.ts +8 -0
- package/dist/types/components/grid-td-cell/index.d.ts +1 -0
- package/dist/types/components/help-sections/help-sections.d.ts +33 -0
- package/dist/types/components/help-sections/index.d.ts +1 -0
- package/dist/types/components/hide-on/hide-on.d.ts +61 -12
- package/dist/types/components/index.d.ts +30 -0
- package/dist/types/components/layout/col/col.d.ts +1 -1
- package/dist/types/components/markdown-viewer/markdown-viewer.d.ts +4 -1
- package/dist/types/components/navbar-logo/index.d.ts +1 -0
- package/dist/types/components/navbar-logo/navbar-logo.d.ts +11 -0
- package/dist/types/components/network-icon/index.d.ts +2 -0
- package/dist/types/components/network-icon/network-icon.d.ts +21 -0
- package/dist/types/components/overflow/index.d.ts +1 -0
- package/dist/types/components/overflow/overflow.d.ts +19 -0
- package/dist/types/components/overflow-container/index.d.ts +1 -0
- package/dist/types/components/overflow-container/overflow-container.d.ts +47 -0
- package/dist/types/components/page-title/page-title.d.ts +4 -0
- package/dist/types/components/pool-apy-tooltip/index.d.ts +1 -0
- package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +59 -0
- package/dist/types/components/pool-indicator-icon/index.d.ts +1 -0
- package/dist/types/components/pool-indicator-icon/pool-indicator-icon.d.ts +20 -0
- package/dist/types/components/rounded-image/index.d.ts +1 -0
- package/dist/types/components/rounded-image/rounded-image.d.ts +11 -0
- package/dist/types/components/row/index.d.ts +1 -0
- package/dist/types/components/row/row.d.ts +59 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +49 -32
- package/dist/types/components/skeleton/skeleton.d.ts +1 -1
- package/dist/types/components/slider/slider.d.ts +66 -2
- package/dist/types/components/slider-token/index.d.ts +1 -0
- package/dist/types/components/slider-token/slider-token.d.ts +70 -0
- package/dist/types/components/smart-number-input/smart-number-input.d.ts +70 -8
- package/dist/types/components/split-list/index.d.ts +1 -0
- package/dist/types/components/split-list/split-list.d.ts +37 -0
- package/dist/types/components/stat-badge/stat-badge.d.ts +17 -3
- package/dist/types/components/status-triangle/status-triangle.d.ts +11 -4
- package/dist/types/components/styled-dropdown/index.d.ts +1 -0
- package/dist/types/components/styled-dropdown/styled-dropdown.d.ts +95 -0
- package/dist/types/components/table/grid-table.d.ts +13 -1
- package/dist/types/components/text-button/index.d.ts +1 -0
- package/dist/types/components/text-button/text-button.d.ts +48 -0
- package/dist/types/components/time-to-liquidation/index.d.ts +1 -0
- package/dist/types/components/time-to-liquidation/time-to-liquidation.d.ts +20 -0
- package/dist/types/components/tokens-list-cell/index.d.ts +1 -0
- package/dist/types/components/tokens-list-cell/tokens-list-cell.d.ts +92 -0
- package/dist/types/components/typed-intl/index.d.ts +2 -0
- package/dist/types/components/vertical-indicator/vertical-indicator.d.ts +1 -1
- package/dist/types/components/with-filter-button/with-filter-button.d.ts +30 -1
- package/dist/types/components/with-title/index.d.ts +1 -0
- package/dist/types/components/with-title/with-title.d.ts +31 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/use-debounce-call.d.ts +19 -0
- package/dist/types/hooks/use-debounce.d.ts +0 -14
- package/dist/types/hooks/use-pool-points-tips.d.ts +40 -0
- package/dist/types/index.d.ts +29 -0
- package/dist/types/types/graph.d.ts +3 -1
- package/dist/types/utils/bn-to-pretty-view.d.ts +15 -0
- package/dist/types/utils/format-money.d.ts +16 -0
- package/dist/types/utils/index.d.ts +9 -1
- package/dist/types/utils/network-icons.d.ts +47 -0
- package/dist/types/utils/parse-input-to-bn.d.ts +16 -0
- package/dist/types/utils/plural.d.ts +36 -0
- package/dist/types/utils/ranges.d.ts +17 -0
- package/dist/types/utils/search.d.ts +15 -0
- package/dist/types/utils/shorten-string.d.ts +15 -0
- package/dist/types/utils/ttl.d.ts +24 -0
- package/dist/types/utils/window.d.ts +15 -0
- package/package.json +8 -3
- package/src/styles/theme.css +85 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as n, Fragment as p, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { TokenSymbol as i } from "../token-symbol/token-symbol.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { cn as r } from "../../utils/cn.js";
|
|
5
|
+
import "sonner";
|
|
6
|
+
import "@gearbox-protocol/sdk";
|
|
7
|
+
function h({
|
|
8
|
+
assets: m,
|
|
9
|
+
onSelect: l,
|
|
10
|
+
children: o,
|
|
11
|
+
className: c,
|
|
12
|
+
lineProps: d,
|
|
13
|
+
...a
|
|
14
|
+
}) {
|
|
15
|
+
return o ? /* @__PURE__ */ n(p, { children: o }) : /* @__PURE__ */ n("div", { className: r("space-y-1", c), ...a, children: m.map((e) => /* @__PURE__ */ t(
|
|
16
|
+
"button",
|
|
17
|
+
{
|
|
18
|
+
type: "button",
|
|
19
|
+
onClick: () => l?.(e.tokenAddress, e.item),
|
|
20
|
+
className: r(
|
|
21
|
+
"w-full flex items-center gap-3 px-3 py-2 rounded-md",
|
|
22
|
+
"hover:bg-accent transition-colors text-left",
|
|
23
|
+
d?.className
|
|
24
|
+
),
|
|
25
|
+
children: [
|
|
26
|
+
e.token && (typeof e.token == "object" && "symbol" in e.token ? e.token.symbol && /* @__PURE__ */ n(i, { token: e.token.symbol, size: 24 }) : typeof e.token == "string" && /* @__PURE__ */ n(i, { token: e.token, size: 24 })),
|
|
27
|
+
/* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
|
|
28
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
29
|
+
/* @__PURE__ */ n("span", { className: "font-medium truncate", children: e.tokenLabel || e.token?.symbol || "Unknown" }),
|
|
30
|
+
e.tokenDescription && /* @__PURE__ */ n("span", { className: "text-xs text-muted-foreground truncate", children: e.tokenDescription })
|
|
31
|
+
] }),
|
|
32
|
+
e.valueDescription && /* @__PURE__ */ n("div", { className: "text-xs text-muted-foreground truncate", children: e.valueDescription })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ n("div", { className: "text-right", children: /* @__PURE__ */ n("div", { className: "font-medium tabular-nums", children: e.value }) })
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
e.id
|
|
38
|
+
)) });
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
h as GeneralAssetList
|
|
42
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { cva as
|
|
3
|
-
import * as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Graph as
|
|
7
|
-
const
|
|
2
|
+
import { cva as W } from "class-variance-authority";
|
|
3
|
+
import * as G from "react";
|
|
4
|
+
import { useMemo as z, useRef as N, useState as L, useEffect as H } from "react";
|
|
5
|
+
import { cn as k } from "../../utils/cn.js";
|
|
6
|
+
import { Graph as S } from "./graph.js";
|
|
7
|
+
const A = W(
|
|
8
8
|
"relative w-full overflow-hidden rounded-lg border-border border bg-card text-card-foreground",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
@@ -34,45 +34,45 @@ const W = k(
|
|
|
34
34
|
padding: "default"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
),
|
|
37
|
+
), y = G.forwardRef(
|
|
38
38
|
({
|
|
39
|
-
className:
|
|
40
|
-
variant:
|
|
41
|
-
size:
|
|
42
|
-
padding:
|
|
43
|
-
title:
|
|
39
|
+
className: s,
|
|
40
|
+
variant: r,
|
|
41
|
+
size: i,
|
|
42
|
+
padding: o,
|
|
43
|
+
title: a,
|
|
44
44
|
description: l,
|
|
45
|
-
toolbar:
|
|
46
|
-
loading:
|
|
47
|
-
emptyMessage:
|
|
48
|
-
error:
|
|
49
|
-
children:
|
|
50
|
-
...
|
|
51
|
-
},
|
|
52
|
-
const
|
|
45
|
+
toolbar: t,
|
|
46
|
+
loading: d = !1,
|
|
47
|
+
emptyMessage: m,
|
|
48
|
+
error: n,
|
|
49
|
+
children: f,
|
|
50
|
+
...x
|
|
51
|
+
}, p) => {
|
|
52
|
+
const v = a || l || t;
|
|
53
53
|
return /* @__PURE__ */ c(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
ref:
|
|
57
|
-
className:
|
|
56
|
+
ref: p,
|
|
57
|
+
className: k(
|
|
58
58
|
"flex flex-col",
|
|
59
|
-
|
|
59
|
+
A({ variant: r, size: i, padding: o, className: s })
|
|
60
60
|
),
|
|
61
|
-
...
|
|
61
|
+
...x,
|
|
62
62
|
children: [
|
|
63
|
-
|
|
64
|
-
(
|
|
65
|
-
|
|
63
|
+
v && /* @__PURE__ */ c("div", { className: "mb-4 flex items-start justify-between gap-4 flex-shrink-0", children: [
|
|
64
|
+
(a || l) && /* @__PURE__ */ c("div", { className: "flex-1", children: [
|
|
65
|
+
a && /* @__PURE__ */ e("h3", { className: "text-base sm:text-lg font-semibold leading-none tracking-tight", children: a }),
|
|
66
66
|
l && /* @__PURE__ */ e("p", { className: "mt-1 text-xs sm:text-sm text-muted-foreground", children: l })
|
|
67
67
|
] }),
|
|
68
|
-
|
|
68
|
+
t && /* @__PURE__ */ e("div", { className: "flex-shrink-0 w-full", children: t })
|
|
69
69
|
] }),
|
|
70
70
|
/* @__PURE__ */ c("div", { className: "relative flex-1 w-full min-h-0", children: [
|
|
71
|
-
|
|
71
|
+
d && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-10 flex items-center justify-center opacity-0 animate-delayed-fade-in", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2", children: [
|
|
72
72
|
/* @__PURE__ */ e("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }),
|
|
73
73
|
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm text-muted-foreground", children: "Loading..." })
|
|
74
74
|
] }) }),
|
|
75
|
-
|
|
75
|
+
n && /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2 text-destructive", children: [
|
|
76
76
|
/* @__PURE__ */ e(
|
|
77
77
|
"svg",
|
|
78
78
|
{
|
|
@@ -92,9 +92,9 @@ const W = k(
|
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children:
|
|
95
|
+
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: n })
|
|
96
96
|
] }) }),
|
|
97
|
-
!
|
|
97
|
+
!n && !f && m && /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2 text-muted-foreground", children: [
|
|
98
98
|
/* @__PURE__ */ e(
|
|
99
99
|
"svg",
|
|
100
100
|
{
|
|
@@ -114,16 +114,16 @@ const W = k(
|
|
|
114
114
|
)
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
|
-
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm", children:
|
|
117
|
+
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm", children: m })
|
|
118
118
|
] }) }),
|
|
119
119
|
/* @__PURE__ */ e(
|
|
120
120
|
"div",
|
|
121
121
|
{
|
|
122
|
-
className:
|
|
122
|
+
className: k(
|
|
123
123
|
"w-full h-full transition-[filter] duration-300 delay-300",
|
|
124
|
-
|
|
124
|
+
d && "blur-sm pointer-events-none"
|
|
125
125
|
),
|
|
126
|
-
children: !
|
|
126
|
+
children: !n && f
|
|
127
127
|
}
|
|
128
128
|
)
|
|
129
129
|
] })
|
|
@@ -132,66 +132,79 @@ const W = k(
|
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
|
-
|
|
136
|
-
function
|
|
137
|
-
series:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
135
|
+
y.displayName = "GraphView";
|
|
136
|
+
function I({
|
|
137
|
+
series: s,
|
|
138
|
+
data: r,
|
|
139
|
+
graphId: i,
|
|
140
|
+
onUnselectSeries: o,
|
|
141
|
+
loading: a,
|
|
142
|
+
title: l,
|
|
143
|
+
description: t,
|
|
144
|
+
toolbar: d,
|
|
145
|
+
emptyMessage: m = "No data available",
|
|
146
|
+
error: n,
|
|
147
|
+
containerClassName: f,
|
|
148
|
+
variant: x,
|
|
149
|
+
size: p,
|
|
150
|
+
padding: v,
|
|
151
|
+
yMeasureUnit: g,
|
|
152
|
+
...V
|
|
150
153
|
}) {
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
const h = z(() => s && s.length > 0 ? s : r && r.length > 0 ? [
|
|
155
|
+
{
|
|
156
|
+
data: r.map((u) => ({
|
|
157
|
+
time: typeof u.time == "number" ? u.time : Number(u.time),
|
|
158
|
+
value: u.value
|
|
159
|
+
})),
|
|
160
|
+
label: "Value",
|
|
161
|
+
yMeasureUnit: g
|
|
162
|
+
}
|
|
163
|
+
] : [], [s, r, g]), j = !a && h.length === 0, b = N(h);
|
|
164
|
+
h.length > 0 && (b.current = h);
|
|
165
|
+
const w = a && h.length === 0 ? b.current : h, R = w.length > 0;
|
|
154
166
|
return /* @__PURE__ */ e(
|
|
155
|
-
|
|
167
|
+
y,
|
|
156
168
|
{
|
|
157
|
-
className:
|
|
158
|
-
variant:
|
|
159
|
-
size:
|
|
160
|
-
padding:
|
|
161
|
-
title:
|
|
162
|
-
description:
|
|
163
|
-
toolbar:
|
|
164
|
-
loading:
|
|
165
|
-
error:
|
|
166
|
-
emptyMessage:
|
|
167
|
-
children:
|
|
168
|
-
|
|
169
|
+
className: f,
|
|
170
|
+
variant: x,
|
|
171
|
+
size: p,
|
|
172
|
+
padding: v,
|
|
173
|
+
title: l,
|
|
174
|
+
description: t,
|
|
175
|
+
toolbar: d,
|
|
176
|
+
loading: a,
|
|
177
|
+
error: n,
|
|
178
|
+
emptyMessage: j ? m : void 0,
|
|
179
|
+
children: R && !n && /* @__PURE__ */ e(
|
|
180
|
+
S,
|
|
169
181
|
{
|
|
170
|
-
series:
|
|
171
|
-
|
|
172
|
-
...
|
|
182
|
+
series: w,
|
|
183
|
+
yMeasureUnit: g,
|
|
184
|
+
...o ? { onUnselectSeries: o } : {},
|
|
185
|
+
...V
|
|
173
186
|
}
|
|
174
187
|
)
|
|
175
188
|
}
|
|
176
189
|
);
|
|
177
190
|
}
|
|
178
|
-
function
|
|
179
|
-
const
|
|
180
|
-
return
|
|
191
|
+
function O(s = 0) {
|
|
192
|
+
const r = N(null), i = N(null), [o, a] = L(null);
|
|
193
|
+
return H(() => {
|
|
181
194
|
const l = () => {
|
|
182
|
-
if (
|
|
183
|
-
const
|
|
184
|
-
|
|
195
|
+
if (r.current && i.current) {
|
|
196
|
+
const m = i.current.clientWidth, n = r.current.clientWidth;
|
|
197
|
+
a(m - n - s);
|
|
185
198
|
}
|
|
186
|
-
},
|
|
187
|
-
return
|
|
188
|
-
|
|
199
|
+
}, t = i.current, d = t ? new ResizeObserver(l) : null;
|
|
200
|
+
return t && d?.observe(t), () => {
|
|
201
|
+
t && d?.unobserve(t);
|
|
189
202
|
};
|
|
190
|
-
}, [
|
|
203
|
+
}, [s]), { graphWidth: o, parentRef: i, asideRef: r };
|
|
191
204
|
}
|
|
192
205
|
export {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
206
|
+
y as GraphView,
|
|
207
|
+
I as GraphViewWithData,
|
|
208
|
+
A as graphViewVariants,
|
|
209
|
+
O as useGraphAside
|
|
197
210
|
};
|
|
@@ -81,8 +81,8 @@ function Yt({
|
|
|
81
81
|
O(() => {
|
|
82
82
|
const e = () => {
|
|
83
83
|
if (x.current && A.current) {
|
|
84
|
-
const
|
|
85
|
-
x.current.resize(
|
|
84
|
+
const g = A.current.clientWidth, a = A.current.clientHeight;
|
|
85
|
+
x.current.resize(g, a), x.current.timeScale().fitContent();
|
|
86
86
|
}
|
|
87
87
|
}, r = A.current, l = r ? new ResizeObserver(e) : null;
|
|
88
88
|
return r && l?.observe(r), () => {
|
|
@@ -109,13 +109,13 @@ function Yt({
|
|
|
109
109
|
const e = x.current;
|
|
110
110
|
if (!e || o.length === 0) return;
|
|
111
111
|
const r = V === "time" ? gt(V, L) : gt(V), l = L.map((t) => t.value), {
|
|
112
|
-
formatter:
|
|
112
|
+
formatter: g,
|
|
113
113
|
updateVisibleRange: a,
|
|
114
|
-
updateLastValues:
|
|
114
|
+
updateLastValues: f
|
|
115
115
|
} = Lt(l);
|
|
116
|
-
Z.current = a, ht.current =
|
|
117
|
-
const
|
|
118
|
-
|
|
116
|
+
Z.current = a, ht.current = f;
|
|
117
|
+
const h = o.filter((t) => t.data.length > 0).map((t) => t.data[t.data.length - 1].value);
|
|
118
|
+
f(h);
|
|
119
119
|
const v = dt();
|
|
120
120
|
e.applyOptions({
|
|
121
121
|
localization: {
|
|
@@ -134,16 +134,16 @@ function Yt({
|
|
|
134
134
|
minBarSpacing: 0
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
|
-
const M = (L.length > 0 ? Math.min(...L.map((t) => t.value)) : 0) < 0, y = L.some((t) => t.value === 0),
|
|
137
|
+
const M = (L.length > 0 ? Math.min(...L.map((t) => t.value)) : 0) < 0, y = L.some((t) => t.value === 0), d = !M && y, i = o.length > 1, u = i || k, s = ft(
|
|
138
138
|
"hsl(var(--foreground))",
|
|
139
139
|
"rgb(0, 0, 0)"
|
|
140
140
|
);
|
|
141
141
|
e.applyOptions({
|
|
142
142
|
rightPriceScale: {
|
|
143
143
|
...v.rightPriceScale || {},
|
|
144
|
-
visible: !
|
|
144
|
+
visible: !u,
|
|
145
145
|
textColor: s,
|
|
146
|
-
...
|
|
146
|
+
...d && {
|
|
147
147
|
scaleMargins: {
|
|
148
148
|
top: 0.3,
|
|
149
149
|
bottom: 0
|
|
@@ -151,8 +151,8 @@ function Yt({
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
-
const
|
|
155
|
-
for (const t of
|
|
154
|
+
const m = new Set(b.current.keys()), R = new Set(o.map((t) => t.label));
|
|
155
|
+
for (const t of m)
|
|
156
156
|
if (!R.has(t)) {
|
|
157
157
|
const n = b.current.get(t);
|
|
158
158
|
n && (e.removeSeries(n), b.current.delete(t));
|
|
@@ -166,22 +166,22 @@ function Yt({
|
|
|
166
166
|
if (n.topColor && n.bottomColor)
|
|
167
167
|
N = n.topColor, T = n.bottomColor;
|
|
168
168
|
else if (n.topColor) {
|
|
169
|
-
const
|
|
170
|
-
N = n.topColor, T =
|
|
169
|
+
const c = rt(G);
|
|
170
|
+
N = n.topColor, T = c.bottomColor;
|
|
171
171
|
} else if (n.bottomColor)
|
|
172
172
|
N = rt(G).topColor, T = n.bottomColor;
|
|
173
173
|
else {
|
|
174
|
-
const
|
|
175
|
-
N =
|
|
174
|
+
const c = rt(G);
|
|
175
|
+
N = c.topColor, T = c.bottomColor;
|
|
176
176
|
}
|
|
177
177
|
else
|
|
178
178
|
N = n.topColor || tt.top, T = n.bottomColor || tt.bottom;
|
|
179
179
|
if (n.data.length === 0) {
|
|
180
|
-
const
|
|
181
|
-
|
|
180
|
+
const c = b.current.get(n.label);
|
|
181
|
+
c && (e.removeSeries(c), b.current.delete(n.label));
|
|
182
182
|
continue;
|
|
183
183
|
}
|
|
184
|
-
const Ct = (n.data.length > 0 ? Math.min(...n.data.map((
|
|
184
|
+
const Ct = (n.data.length > 0 ? Math.min(...n.data.map((c) => c.value)) : 0) < 0, St = n.data.some((c) => c.value === 0), xt = !Ct && St, et = i ? I === 0 ? "right" : `scale-${I}` : "right";
|
|
185
185
|
i && B.push({
|
|
186
186
|
priceScaleId: et || "right",
|
|
187
187
|
shouldPreventNegativeAxis: xt,
|
|
@@ -195,9 +195,14 @@ function Yt({
|
|
|
195
195
|
priceScaleId: et,
|
|
196
196
|
priceFormat: {
|
|
197
197
|
type: "custom",
|
|
198
|
-
formatter:
|
|
198
|
+
formatter: g
|
|
199
199
|
}
|
|
200
|
-
}), z.setData(
|
|
200
|
+
}), z.setData(
|
|
201
|
+
n.data.map((c) => ({
|
|
202
|
+
...c,
|
|
203
|
+
time: c.time
|
|
204
|
+
}))
|
|
205
|
+
)) : (z = e.addAreaSeries({
|
|
201
206
|
...F,
|
|
202
207
|
lineColor: G,
|
|
203
208
|
topColor: N,
|
|
@@ -205,9 +210,14 @@ function Yt({
|
|
|
205
210
|
priceScaleId: et,
|
|
206
211
|
priceFormat: {
|
|
207
212
|
type: "custom",
|
|
208
|
-
formatter:
|
|
213
|
+
formatter: g
|
|
209
214
|
}
|
|
210
|
-
}), z.setData(
|
|
215
|
+
}), z.setData(
|
|
216
|
+
n.data.map((c) => ({
|
|
217
|
+
...c,
|
|
218
|
+
time: c.time
|
|
219
|
+
}))
|
|
220
|
+
), b.current.set(n.label, z)), I++;
|
|
211
221
|
}
|
|
212
222
|
if (i && B.length > 0)
|
|
213
223
|
for (const t of B)
|
|
@@ -245,7 +255,7 @@ function Yt({
|
|
|
245
255
|
scaleMargins: {
|
|
246
256
|
top: 0.1,
|
|
247
257
|
bottom: 0.1,
|
|
248
|
-
...
|
|
258
|
+
...d && {
|
|
249
259
|
top: 0.3,
|
|
250
260
|
bottom: 0
|
|
251
261
|
}
|
|
@@ -275,105 +285,105 @@ function Yt({
|
|
|
275
285
|
break;
|
|
276
286
|
}
|
|
277
287
|
if (!l) return;
|
|
278
|
-
const
|
|
279
|
-
const { time:
|
|
280
|
-
if (!v || !
|
|
281
|
-
const
|
|
288
|
+
const g = (a) => {
|
|
289
|
+
const { time: f = l, seriesData: h, point: v } = a || {}, p = Array.from(b.current.values());
|
|
290
|
+
if (!v || !f) {
|
|
291
|
+
const d = /* @__PURE__ */ new Map();
|
|
282
292
|
for (const i of o)
|
|
283
|
-
i.data.length > 0 &&
|
|
284
|
-
if (J(
|
|
293
|
+
i.data.length > 0 && d.set(i.label, i.data[i.data.length - 1]);
|
|
294
|
+
if (J(d.size > 0 ? d : void 0), r)
|
|
285
295
|
P(null);
|
|
286
|
-
else if (
|
|
287
|
-
const
|
|
296
|
+
else if (p[0] && l) {
|
|
297
|
+
const u = e.timeScale().timeToCoordinate(l), s = o[0];
|
|
288
298
|
if (s.data.length > 0) {
|
|
289
|
-
const
|
|
290
|
-
|
|
299
|
+
const m = s.data[s.data.length - 1].value, R = p[0].priceToCoordinate(m);
|
|
300
|
+
u !== null && R !== null && P({ x: u, y: R });
|
|
291
301
|
}
|
|
292
302
|
}
|
|
293
303
|
return;
|
|
294
304
|
}
|
|
295
305
|
const M = /* @__PURE__ */ new Map();
|
|
296
306
|
let y;
|
|
297
|
-
for (let
|
|
298
|
-
const i = o[
|
|
299
|
-
if (!
|
|
300
|
-
const s =
|
|
301
|
-
|
|
307
|
+
for (let d = 0; d < o.length; d++) {
|
|
308
|
+
const i = o[d], u = p[d];
|
|
309
|
+
if (!u) continue;
|
|
310
|
+
const s = h?.get(u), m = s && "value" in s ? s.value : void 0, R = i.data[i.data.length - 1], F = m !== void 0 ? m : R?.value ?? 0;
|
|
311
|
+
d === 0 && (y = F), M.set(i.label, { value: F, time: f });
|
|
302
312
|
}
|
|
303
|
-
if (J(M), y !== void 0 &&
|
|
304
|
-
const i = e.timeScale().timeToCoordinate(
|
|
305
|
-
if (i !== null &&
|
|
313
|
+
if (J(M), y !== void 0 && p[0]) {
|
|
314
|
+
const i = e.timeScale().timeToCoordinate(f), u = p[0].priceToCoordinate(y);
|
|
315
|
+
if (i !== null && u !== null) {
|
|
306
316
|
const s = A.current;
|
|
307
317
|
if (s) {
|
|
308
|
-
const
|
|
318
|
+
const m = s.querySelector(
|
|
309
319
|
".LightweightChart"
|
|
310
320
|
);
|
|
311
|
-
if (
|
|
312
|
-
const R =
|
|
321
|
+
if (m) {
|
|
322
|
+
const R = m.getBoundingClientRect(), F = s.getBoundingClientRect(), B = i + (R.left - F.left), I = u + (R.top - F.top);
|
|
313
323
|
P({ x: B, y: I });
|
|
314
324
|
} else
|
|
315
|
-
P({ x: i, y:
|
|
325
|
+
P({ x: i, y: u });
|
|
316
326
|
} else
|
|
317
|
-
P({ x: i, y:
|
|
327
|
+
P({ x: i, y: u });
|
|
318
328
|
} else
|
|
319
329
|
P(null);
|
|
320
330
|
} else
|
|
321
331
|
P(null);
|
|
322
332
|
};
|
|
323
|
-
return e.subscribeCrosshairMove(
|
|
333
|
+
return e.subscribeCrosshairMove(g), r || requestAnimationFrame(() => {
|
|
324
334
|
const a = Array.from(b.current.values());
|
|
325
335
|
if (a[0] && l && o[0]?.data.length > 0) {
|
|
326
|
-
const
|
|
327
|
-
|
|
336
|
+
const h = e.timeScale().timeToCoordinate(l), v = o[0].data[o[0].data.length - 1].value, p = a[0].priceToCoordinate(v);
|
|
337
|
+
h !== null && p !== null && P({ x: h, y: p });
|
|
328
338
|
}
|
|
329
339
|
}), () => {
|
|
330
|
-
e.unsubscribeCrosshairMove(
|
|
340
|
+
e.unsubscribeCrosshairMove(g);
|
|
331
341
|
};
|
|
332
342
|
}, [o]), O(() => {
|
|
333
343
|
const e = x.current;
|
|
334
344
|
if (!e || o.length === 0) return;
|
|
335
|
-
const r = e.timeScale(), l = Math.max(...o.map((a) => a.data.length)),
|
|
345
|
+
const r = e.timeScale(), l = Math.max(...o.map((a) => a.data.length)), g = () => {
|
|
336
346
|
if (l === 0) return;
|
|
337
347
|
const a = r.getVisibleLogicalRange();
|
|
338
348
|
if (!a) return;
|
|
339
|
-
const
|
|
349
|
+
const f = {
|
|
340
350
|
from: 0,
|
|
341
351
|
to: l - 1
|
|
342
|
-
},
|
|
352
|
+
}, h = typeof a.from == "number" ? a.from : 0, v = typeof a.to == "number" ? a.to : l - 1;
|
|
343
353
|
if (Z.current) {
|
|
344
|
-
const
|
|
354
|
+
const d = Math.max(0, Math.floor(h)), i = Math.min(l - 1, Math.ceil(v)), u = [];
|
|
345
355
|
for (const s of o)
|
|
346
|
-
for (let
|
|
347
|
-
|
|
348
|
-
|
|
356
|
+
for (let m = d; m <= i && m < s.data.length; m++)
|
|
357
|
+
u.push(s.data[m].value);
|
|
358
|
+
u.length > 0 && Z.current(u);
|
|
349
359
|
}
|
|
350
|
-
const
|
|
360
|
+
const p = 0.01;
|
|
351
361
|
let M = !1;
|
|
352
362
|
const y = { ...a };
|
|
353
|
-
|
|
363
|
+
h < f.from - p && (y.from = f.from, M = !0), v > f.to + p && (y.to = f.to, M = !0), M && r.setVisibleLogicalRange(y);
|
|
354
364
|
};
|
|
355
|
-
return r.subscribeVisibleLogicalRangeChange(
|
|
365
|
+
return r.subscribeVisibleLogicalRangeChange(g), () => {
|
|
356
366
|
r.unsubscribeVisibleLogicalRangeChange(
|
|
357
|
-
|
|
367
|
+
g
|
|
358
368
|
);
|
|
359
369
|
};
|
|
360
370
|
}, [o]), O(() => {
|
|
361
371
|
const e = x.current, r = Array.from(b.current.values()), l = [];
|
|
362
372
|
if (e && r.length > 0 && j) {
|
|
363
|
-
const
|
|
364
|
-
for (const
|
|
365
|
-
const
|
|
366
|
-
...
|
|
367
|
-
...
|
|
373
|
+
const g = Vt(), a = r[0];
|
|
374
|
+
for (const f of j) {
|
|
375
|
+
const h = new At(e, a, f.xCoordinate, {
|
|
376
|
+
...g,
|
|
377
|
+
...f.options || {}
|
|
368
378
|
});
|
|
369
|
-
a.attachPrimitive(
|
|
379
|
+
a.attachPrimitive(h), l.push(h);
|
|
370
380
|
}
|
|
371
381
|
}
|
|
372
382
|
return () => {
|
|
373
383
|
if (r.length > 0) {
|
|
374
|
-
const
|
|
384
|
+
const g = r[0];
|
|
375
385
|
for (const a of l)
|
|
376
|
-
|
|
386
|
+
g.detachPrimitive(a);
|
|
377
387
|
}
|
|
378
388
|
};
|
|
379
389
|
}, [j]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as p } from "../../utils/cn.js";
|
|
4
|
+
import "sonner";
|
|
5
|
+
import "@gearbox-protocol/sdk";
|
|
6
|
+
function l({ children: r, className: o, ...t }) {
|
|
7
|
+
return /* @__PURE__ */ m("td", { className: p("px-3 py-2", o), ...t, children: r });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
l as GridTDCell
|
|
11
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as o } from "../../utils/cn.js";
|
|
4
|
+
import "sonner";
|
|
5
|
+
import "@gearbox-protocol/sdk";
|
|
6
|
+
function d({ children: e, className: t }) {
|
|
7
|
+
return /* @__PURE__ */ r("div", { className: o("space-y-4", t), children: e });
|
|
8
|
+
}
|
|
9
|
+
function u({ title: e, children: t, className: m }) {
|
|
10
|
+
return /* @__PURE__ */ s("div", { className: o("space-y-2", m), children: [
|
|
11
|
+
e && /* @__PURE__ */ r("h3", { className: "text-sm font-medium text-foreground", children: e }),
|
|
12
|
+
/* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground", children: t })
|
|
13
|
+
] });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
u as HelpSection,
|
|
17
|
+
d as HelpSections
|
|
18
|
+
};
|