@gearbox-protocol/ui-kit 4.0.0-next.48 → 4.0.0-next.49
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/components/accordion/accordion.cjs +1 -1
- package/dist/cjs/components/alert-badge/alert-badge.cjs +1 -1
- package/dist/cjs/components/alert-dialog/alert-dialog.cjs +1 -1
- package/dist/cjs/components/alert-modal/alert-modal.cjs +1 -1
- package/dist/cjs/components/app-bar/app-bar.cjs +1 -1
- package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/badge/badge.cjs +1 -1
- package/dist/cjs/components/badge/chip.cjs +1 -1
- package/dist/cjs/components/base/amount-input/token-select-panel.cjs +1 -1
- package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
- package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/base/details-view/detail-aside/detail-aside-screen-layout.cjs +1 -1
- package/dist/cjs/components/base/details-view/index.cjs +1 -1
- package/dist/cjs/components/base/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
- package/dist/cjs/components/base/liquidation-params-table/liquidation-params-table.cjs +1 -1
- package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
- package/dist/cjs/components/base/more-accordion/more-accordion.cjs +1 -1
- package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/position-assets/index.cjs +1 -1
- package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -1
- package/dist/cjs/components/base/review-button/review-button.cjs +1 -1
- package/dist/cjs/components/base/section-heading/section-heading.cjs +1 -1
- package/dist/cjs/components/base/segmented-tabs/segmented-tabs.cjs +1 -1
- package/dist/cjs/components/base/stack/stack.cjs +1 -1
- package/dist/cjs/components/base/stat-badge/stat-badge.cjs +1 -1
- package/dist/cjs/components/base/sticky-bar/sticky-bar.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -1
- package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
- package/dist/cjs/components/base/token-pair-symbol/token-pair-symbol.cjs +1 -1
- package/dist/cjs/components/base/values/pnl-value.cjs +1 -1
- package/dist/cjs/components/base/values/position-status-badge.cjs +1 -1
- package/dist/cjs/components/base/values/position-type-badge.cjs +1 -1
- package/dist/cjs/components/base/values/price-impact-value.cjs +1 -1
- package/dist/cjs/components/base/values/scalars.cjs +1 -1
- package/dist/cjs/components/base-link/base-link.cjs +1 -1
- package/dist/cjs/components/base-table/base-table-line.cjs +1 -1
- package/dist/cjs/components/base-table/base-table.cjs +1 -1
- package/dist/cjs/components/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/cjs/components/buttons/back-button/back-button.cjs +1 -1
- package/dist/cjs/components/buttons/button/button.cjs +1 -1
- package/dist/cjs/components/buttons/copy-button/copy-button.cjs +1 -1
- package/dist/cjs/components/buttons/external-button/external-button.cjs +1 -1
- package/dist/cjs/components/buttons/index.cjs +1 -1
- package/dist/cjs/components/buttons/range-buttons/index.cjs +1 -1
- package/dist/cjs/components/buttons/range-buttons/range-buttons.cjs +1 -1
- package/dist/cjs/components/cards/card/card.cjs +1 -1
- package/dist/cjs/components/cards/expandable-card/expandable-card.cjs +1 -1
- package/dist/cjs/components/cards/index.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox.cjs +1 -1
- package/dist/cjs/components/client-adapters/index.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-button/styled-button.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-dialog-container/styled-dialog-container.cjs +1 -1
- package/dist/cjs/components/collateral-allocation-tooltip/allocation-wheel.cjs +1 -1
- package/dist/cjs/components/collateral-allocation-tooltip/collateral-allocation-tooltip.cjs +1 -1
- package/dist/cjs/components/composites/index.cjs +1 -1
- package/dist/cjs/components/composites/notification-center/notification-center.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/constants.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/ProgressStepper.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/transactionExecutionStepTypes.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/index.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/confirm-menu/confirm-menu.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title-copy-button.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title-explorer-dropdown.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-container.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-content.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-description.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-footer.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-form.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-header.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-modal-container.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-overlay.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-title.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-content.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-item.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-label.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/index.cjs +1 -1
- package/dist/cjs/components/edit-input/edit-input.cjs +1 -1
- package/dist/cjs/components/error-message/error-line-message.cjs +1 -1
- package/dist/cjs/components/error-message/index.cjs +1 -1
- package/dist/cjs/components/fadeout-loading/fadeout-loading.cjs +1 -1
- package/dist/cjs/components/formatted-number/formatted-number.cjs +1 -1
- package/dist/cjs/components/graph/default-config.cjs +1 -1
- package/dist/cjs/components/graph/formatters.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/graph/index.cjs +1 -1
- package/dist/cjs/components/head-cell/head-cell.cjs +1 -1
- package/dist/cjs/components/health-factor/health-factor.cjs +1 -1
- package/dist/cjs/components/help-tip/help-tip.cjs +1 -1
- package/dist/cjs/components/icon-button/icon-button.cjs +1 -1
- package/dist/cjs/components/icons/fa-icon.cjs +1 -1
- package/dist/cjs/components/icons/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/input/input.cjs +1 -1
- package/dist/cjs/components/label/label.cjs +1 -1
- package/dist/cjs/components/legal-agreement/legal-agreement-dialog.cjs +1 -1
- package/dist/cjs/components/legal-agreement/legal-agreement-panel.cjs +1 -1
- package/dist/cjs/components/link/link.cjs +1 -1
- package/dist/cjs/components/loader/loader.cjs +1 -1
- package/dist/cjs/components/loading-bar/loading-bar.cjs +1 -1
- package/dist/cjs/components/modal/modal.cjs +1 -1
- package/dist/cjs/components/navbar-logo/navbar-logo.cjs +1 -1
- package/dist/cjs/components/network-icon/index.cjs +1 -1
- package/dist/cjs/components/pool-points-indicator/pool-points-indicator.cjs +1 -1
- package/dist/cjs/components/radio-group/radio-group.cjs +1 -1
- package/dist/cjs/components/rounded-image/rounded-image.cjs +1 -1
- package/dist/cjs/components/rwa-styles/index.cjs +1 -1
- package/dist/cjs/components/search-line/search-line.cjs +1 -1
- package/dist/cjs/components/segmented-control/segmented-control.cjs +1 -1
- package/dist/cjs/components/select/select.cjs +1 -1
- package/dist/cjs/components/separate-line/separate-line.cjs +1 -1
- package/dist/cjs/components/short-string/short-string.cjs +1 -1
- package/dist/cjs/components/simple-accordion/simple-accordion.cjs +1 -1
- package/dist/cjs/components/simple-dropdown/simple-dropdown-menu-item.cjs +1 -1
- package/dist/cjs/components/simple-dropdown/simple-dropdown.cjs +1 -1
- package/dist/cjs/components/skeleton/skeleton-stack.cjs +1 -1
- package/dist/cjs/components/skeleton/skeleton.cjs +1 -1
- package/dist/cjs/components/slider/index.cjs +1 -1
- package/dist/cjs/components/slider/slider-utils.cjs +1 -1
- package/dist/cjs/components/slider/slider.cjs +1 -1
- package/dist/cjs/components/spinner/spinner.cjs +1 -1
- package/dist/cjs/components/spinner-loader/spinner-loader.cjs +1 -1
- package/dist/cjs/components/split-list/split-list.cjs +1 -1
- package/dist/cjs/components/status-dot/status-dot.cjs +1 -1
- package/dist/cjs/components/status-elements/status-elements.cjs +1 -1
- package/dist/cjs/components/tab-control/index.cjs +1 -1
- package/dist/cjs/components/tab-control/tab-control.cjs +1 -1
- package/dist/cjs/components/table/grid-loading-line.cjs +1 -1
- package/dist/cjs/components/table/grid-table.cjs +1 -1
- package/dist/cjs/components/table/index.cjs +1 -1
- package/dist/cjs/components/table/table-sm.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/cjs/components/tabs/tabs.cjs +1 -1
- package/dist/cjs/components/text-button/text-button.cjs +1 -1
- package/dist/cjs/components/textarea/textarea.cjs +1 -1
- package/dist/cjs/components/theme-provider.cjs +1 -1
- package/dist/cjs/components/tip-card/tip-card.cjs +1 -1
- package/dist/cjs/components/token-icon/index.cjs +1 -1
- package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
- package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
- package/dist/cjs/components/token-template/index.cjs +1 -1
- package/dist/cjs/components/token-template/token-template.cjs +1 -1
- package/dist/cjs/components/tooltip/simple-tooltip.cjs +1 -1
- package/dist/cjs/components/tooltip/tooltip.cjs +1 -1
- package/dist/cjs/components/typography/typography.cjs +1 -1
- package/dist/cjs/components/vertical-indicator/vertical-indicator.cjs +1 -1
- package/dist/cjs/components/vspace/vspace.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/components/with-title/with-title.cjs +1 -1
- package/dist/cjs/configs/index.cjs +1 -1
- package/dist/cjs/hooks/index.cjs +1 -1
- package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
- package/dist/cjs/hooks/use-filter.cjs +1 -1
- package/dist/cjs/hooks/use-media-query.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/utils/colors.cjs +1 -1
- package/dist/cjs/utils/format-money.cjs +1 -1
- package/dist/cjs/utils/format-number.cjs +1 -1
- package/dist/cjs/utils/format.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/loading.cjs +1 -1
- package/dist/cjs/utils/math.cjs +1 -1
- package/dist/cjs/utils/ranges.cjs +1 -1
- package/dist/cjs/utils/ranges.spec.cjs +1 -1
- package/dist/cjs/utils/templates.cjs +1 -1
- package/dist/cjs/utils/ttl.cjs +1 -1
- package/dist/esm/components/accordion/accordion.js +2 -3
- package/dist/esm/components/alert-badge/alert-badge.js +15 -16
- package/dist/esm/components/alert-dialog/alert-dialog.js +4 -7
- package/dist/esm/components/alert-modal/alert-modal.js +9 -12
- package/dist/esm/components/app-bar/app-bar.js +0 -1
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +22 -25
- package/dist/esm/components/badge/badge.js +2 -4
- package/dist/esm/components/badge/chip.js +9 -11
- package/dist/esm/components/base/amount-input/token-select-panel.js +4 -5
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +2 -4
- package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +6 -8
- package/dist/esm/components/base/details-view/detail-aside/detail-aside-scope.js +1 -1
- package/dist/esm/components/base/details-view/detail-aside/detail-aside-screen-layout.js +16 -18
- package/dist/esm/components/base/details-view/index.js +11 -9
- package/dist/esm/components/base/index.js +158 -164
- package/dist/esm/components/base/info-list/index.js +4 -5
- package/dist/esm/components/base/info-list/info-list.js +27 -47
- package/dist/esm/components/base/liquidation-params-table/liquidation-params-table.js +3 -4
- package/dist/esm/components/base/manage-pane/manage-pane.js +4 -5
- package/dist/esm/components/base/more-accordion/more-accordion.js +4 -4
- package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +29 -30
- package/dist/esm/components/base/position-assets/index.js +3 -2
- package/dist/esm/components/base/position-assets/position-assets.js +27 -28
- package/dist/esm/components/base/review-button/review-button.js +10 -12
- package/dist/esm/components/base/section-heading/section-heading.js +2 -4
- package/dist/esm/components/base/segmented-tabs/segmented-tabs.js +9 -11
- package/dist/esm/components/base/stack/stack.js +13 -14
- package/dist/esm/components/base/stat-badge/stat-badge.js +21 -22
- package/dist/esm/components/base/sticky-bar/sticky-bar.js +2 -4
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +37 -38
- package/dist/esm/components/base/title-meta/title-meta.js +2 -3
- package/dist/esm/components/base/token-amount/token-amount.js +3 -4
- package/dist/esm/components/base/token-pair-symbol/token-pair-symbol.js +9 -11
- package/dist/esm/components/base/values/pnl-value.js +14 -16
- package/dist/esm/components/base/values/position-status-badge.js +5 -7
- package/dist/esm/components/base/values/position-type-badge.js +6 -8
- package/dist/esm/components/base/values/price-impact-value.js +5 -7
- package/dist/esm/components/base/values/scalars.js +16 -18
- package/dist/esm/components/base-link/base-link.js +0 -1
- package/dist/esm/components/base-table/base-table-line.js +14 -13
- package/dist/esm/components/base-table/base-table.js +32 -31
- package/dist/esm/components/breadcrumbs/breadcrumbs.js +8 -10
- package/dist/esm/components/buttons/back-button/back-button.js +17 -19
- package/dist/esm/components/buttons/button/button.js +4 -5
- package/dist/esm/components/buttons/copy-button/copy-button.js +6 -7
- package/dist/esm/components/buttons/external-button/external-button.js +4 -5
- package/dist/esm/components/buttons/index.js +5 -11
- package/dist/esm/components/buttons/range-buttons/index.js +1 -4
- package/dist/esm/components/buttons/range-buttons/range-buttons.js +1 -35
- package/dist/esm/components/cards/card/card.js +6 -7
- package/dist/esm/components/cards/expandable-card/expandable-card.js +6 -7
- package/dist/esm/components/cards/index.js +2 -4
- package/dist/esm/components/checkbox/checkbox-labeled.js +3 -26
- package/dist/esm/components/checkbox/checkbox.js +7 -8
- package/dist/esm/components/client-adapters/index.js +4 -6
- package/dist/esm/components/client-adapters/styled-button/styled-button.js +12 -13
- package/dist/esm/components/client-adapters/styled-dialog-container/styled-dialog-container.js +4 -5
- package/dist/esm/components/collateral-allocation-tooltip/allocation-wheel.js +10 -12
- package/dist/esm/components/collateral-allocation-tooltip/collateral-allocation-tooltip.js +13 -15
- package/dist/esm/components/composites/index.js +17 -19
- package/dist/esm/components/composites/notification-center/notification-center.js +21 -23
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +15 -16
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +20 -21
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +3 -4
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +18 -20
- package/dist/esm/components/composites/tx-preview/confirm/amounts/constants.js +1 -5
- package/dist/esm/components/composites/tx-preview/confirm/amounts/index.js +4 -4
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +34 -39
- package/dist/esm/components/composites/tx-preview/confirm/index.js +18 -20
- package/dist/esm/components/composites/tx-preview/confirm/stepper/ProgressStepper.js +19 -21
- package/dist/esm/components/composites/tx-preview/confirm/stepper/index.js +1 -3
- package/dist/esm/components/composites/tx-preview/confirm/stepper/transactionExecutionStepTypes.js +1 -6
- package/dist/esm/components/composites/tx-preview/index.js +18 -20
- package/dist/esm/components/compound-apy/compound-apy.js +2 -3
- package/dist/esm/components/confirm-menu/confirm-menu.js +6 -7
- package/dist/esm/components/detailed-page-title/detailed-page-title-copy-button.js +6 -7
- package/dist/esm/components/detailed-page-title/detailed-page-title-explorer-dropdown.js +0 -1
- package/dist/esm/components/dialog/dialog-container.js +4 -5
- package/dist/esm/components/dialog/dialog-content.js +4 -5
- package/dist/esm/components/dialog/dialog-description.js +0 -1
- package/dist/esm/components/dialog/dialog-footer.js +9 -11
- package/dist/esm/components/dialog/dialog-form.js +2 -4
- package/dist/esm/components/dialog/dialog-header.js +0 -2
- package/dist/esm/components/dialog/dialog-modal-container.js +3 -4
- package/dist/esm/components/dialog/dialog-overlay.js +3 -4
- package/dist/esm/components/dialog/dialog-title.js +3 -4
- package/dist/esm/components/dropdown-menu/dropdown-menu-content.js +3 -4
- package/dist/esm/components/dropdown-menu/dropdown-menu-item.js +8 -9
- package/dist/esm/components/dropdown-menu/dropdown-menu-label.js +6 -7
- package/dist/esm/components/dropdown-menu/dropdown-menu.js +8 -11
- package/dist/esm/components/dropdown-menu/index.js +9 -24
- package/dist/esm/components/edit-input/edit-input.js +8 -9
- package/dist/esm/components/error-message/error-line-message.js +8 -10
- package/dist/esm/components/error-message/index.js +1 -3
- package/dist/esm/components/fadeout-loading/fadeout-loading.js +3 -4
- package/dist/esm/components/formatted-number/formatted-number.js +2 -4
- package/dist/esm/components/graph/default-config.js +24 -78
- package/dist/esm/components/graph/formatters.js +91 -135
- package/dist/esm/components/graph/graph-view.js +76 -91
- package/dist/esm/components/graph/graph.js +2 -2
- package/dist/esm/components/graph/index.js +28 -29
- package/dist/esm/components/head-cell/head-cell.js +13 -14
- package/dist/esm/components/health-factor/health-factor.js +4 -6
- package/dist/esm/components/help-tip/help-tip.js +7 -8
- package/dist/esm/components/icon-button/icon-button.js +8 -9
- package/dist/esm/components/icons/fa-icon.js +2 -4
- package/dist/esm/components/icons/index.js +2 -41
- package/dist/esm/components/index.js +632 -747
- package/dist/esm/components/input/input.js +2 -3
- package/dist/esm/components/label/label.js +0 -1
- package/dist/esm/components/legal-agreement/legal-agreement-dialog.js +12 -12
- package/dist/esm/components/legal-agreement/legal-agreement-panel.js +6 -6
- package/dist/esm/components/link/link.js +13 -15
- package/dist/esm/components/loader/loader.js +4 -5
- package/dist/esm/components/loading-bar/loading-bar.js +3 -4
- package/dist/esm/components/modal/modal.js +0 -1
- package/dist/esm/components/navbar-logo/navbar-logo.js +8 -10
- package/dist/esm/components/network-icon/index.js +2 -4
- package/dist/esm/components/pool-points-indicator/pool-points-indicator.js +19 -21
- package/dist/esm/components/radio-group/radio-group.js +5 -6
- package/dist/esm/components/rounded-image/rounded-image.js +4 -5
- package/dist/esm/components/rwa-styles/index.js +2 -3
- package/dist/esm/components/search-line/search-line.js +5 -6
- package/dist/esm/components/segmented-control/segmented-control.js +0 -1
- package/dist/esm/components/select/select.js +7 -8
- package/dist/esm/components/separate-line/separate-line.js +0 -1
- package/dist/esm/components/short-string/short-string.js +5 -7
- package/dist/esm/components/simple-accordion/simple-accordion.js +9 -11
- package/dist/esm/components/simple-dropdown/simple-dropdown-menu-item.js +4 -11
- package/dist/esm/components/simple-dropdown/simple-dropdown.js +6 -7
- package/dist/esm/components/skeleton/skeleton-stack.js +6 -7
- package/dist/esm/components/skeleton/skeleton.js +10 -12
- package/dist/esm/components/slider/index.js +10 -12
- package/dist/esm/components/slider/slider-utils.js +18 -20
- package/dist/esm/components/slider/slider.js +0 -1
- package/dist/esm/components/spinner/spinner.js +0 -1
- package/dist/esm/components/spinner-loader/spinner-loader.js +6 -7
- package/dist/esm/components/split-list/split-list.js +0 -1
- package/dist/esm/components/status-dot/status-dot.js +0 -1
- package/dist/esm/components/status-elements/status-elements.js +8 -10
- package/dist/esm/components/tab-control/index.js +3 -6
- package/dist/esm/components/tab-control/tab-control.js +53 -102
- package/dist/esm/components/table/grid-loading-line.js +6 -7
- package/dist/esm/components/table/grid-table.js +46 -49
- package/dist/esm/components/table/index.js +23 -28
- package/dist/esm/components/table/table-sm.js +16 -18
- package/dist/esm/components/table/table.js +1 -5
- package/dist/esm/components/tabs/tabs.js +8 -9
- package/dist/esm/components/text-button/text-button.js +0 -1
- package/dist/esm/components/textarea/textarea.js +0 -1
- package/dist/esm/components/theme-provider.js +19 -26
- package/dist/esm/components/tip-card/tip-card.js +0 -1
- package/dist/esm/components/token-icon/index.js +2 -3
- package/dist/esm/components/token-icon/token-icon.js +67 -79
- package/dist/esm/components/token-symbol/token-symbol.js +4 -5
- package/dist/esm/components/token-template/index.js +4 -2
- package/dist/esm/components/token-template/token-template.js +17 -20
- package/dist/esm/components/tooltip/simple-tooltip.js +0 -1
- package/dist/esm/components/tooltip/tooltip.js +4 -5
- package/dist/esm/components/typography/typography.js +4 -5
- package/dist/esm/components/vertical-indicator/vertical-indicator.js +9 -10
- package/dist/esm/components/vspace/vspace.js +6 -8
- package/dist/esm/components/with-copy/with-copy.js +11 -34
- package/dist/esm/components/with-title/with-title.js +10 -12
- package/dist/esm/configs/index.js +4 -11
- package/dist/esm/hooks/index.js +18 -32
- package/dist/esm/hooks/use-debounce-call.js +1 -1
- package/dist/esm/hooks/use-filter.js +25 -61
- package/dist/esm/hooks/use-media-query.js +27 -41
- package/dist/esm/index.js +746 -916
- package/dist/esm/utils/colors.js +22 -34
- package/dist/esm/utils/format-money.js +29 -68
- package/dist/esm/utils/format-number.js +26 -30
- package/dist/esm/utils/format.js +7 -28
- package/dist/esm/utils/index.js +77 -111
- package/dist/esm/utils/loading.js +6 -13
- package/dist/esm/utils/math.js +22 -31
- package/dist/esm/utils/ranges.js +1 -24
- package/dist/esm/utils/ranges.spec.js +1 -188
- package/dist/esm/utils/templates.js +5 -38
- package/dist/esm/utils/ttl.js +11 -36
- package/dist/globals.css +1 -1
- package/dist/types/components/alert-badge/alert-badge.d.ts +1 -1
- package/dist/types/components/badge/badge.d.ts +1 -1
- package/dist/types/components/base/apy-breakdown-body/index.d.ts +2 -2
- package/dist/types/components/base/details-view/index.d.ts +2 -2
- package/dist/types/components/base/index.d.ts +0 -2
- package/dist/types/components/base/info-list/info-list.d.ts +0 -5
- package/dist/types/components/base/position-assets/index.d.ts +2 -2
- package/dist/types/components/base/values/index.d.ts +9 -9
- package/dist/types/components/base-table/base-table-line.d.ts +1 -1
- package/dist/types/components/base-table/base-table.d.ts +2 -2
- package/dist/types/components/buttons/back-button/back-button.d.ts +1 -1
- package/dist/types/components/buttons/button/button.d.ts +2 -2
- package/dist/types/components/buttons/index.d.ts +0 -2
- package/dist/types/components/buttons/range-buttons/range-buttons.d.ts +0 -32
- package/dist/types/components/cards/card/card.d.ts +2 -2
- package/dist/types/components/cards/index.d.ts +0 -1
- package/dist/types/components/checkbox/checkbox.d.ts +2 -2
- package/dist/types/components/client-adapters/index.d.ts +0 -1
- package/dist/types/components/composites/pool-assets-table/types.d.ts +0 -3
- package/dist/types/components/composites/tx-preview/confirm/amounts/constants.d.ts +0 -3
- package/dist/types/components/composites/tx-preview/confirm/amounts/index.d.ts +1 -1
- package/dist/types/components/composites/tx-preview/confirm/stepper/transactionExecutionStepTypes.d.ts +0 -9
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -4
- package/dist/types/components/dropdown-menu/index.d.ts +0 -6
- package/dist/types/components/error-message/index.d.ts +0 -1
- package/dist/types/components/graph/default-config.d.ts +0 -2
- package/dist/types/components/graph/formatters.d.ts +0 -2
- package/dist/types/components/graph/graph-view.d.ts +0 -32
- package/dist/types/components/graph/index.d.ts +3 -3
- package/dist/types/components/head-cell/head-cell.d.ts +2 -1
- package/dist/types/components/head-cell/index.d.ts +1 -1
- package/dist/types/components/help-tip/help-tip.d.ts +4 -4
- package/dist/types/components/icon-button/icon-button.d.ts +0 -8
- package/dist/types/components/icons/index.d.ts +1 -2
- package/dist/types/components/index.d.ts +0 -3
- package/dist/types/components/label/label.d.ts +2 -2
- package/dist/types/components/legal-agreement/index.d.ts +5 -5
- package/dist/types/components/legal-agreement/legal-agreement-theme.d.ts +0 -2
- package/dist/types/components/navigation-context/index.d.ts +1 -1
- package/dist/types/components/navigation-context/navigation-context.d.ts +0 -8
- package/dist/types/components/network-icon/index.d.ts +0 -2
- package/dist/types/components/points-icon/index.d.ts +1 -1
- package/dist/types/components/points-icon/points-icon.d.ts +0 -5
- package/dist/types/components/radio-group/radio-group.d.ts +2 -2
- package/dist/types/components/rwa-styles/index.d.ts +0 -1
- package/dist/types/components/search-line/search-line.d.ts +1 -1
- package/dist/types/components/select/select.d.ts +3 -3
- package/dist/types/components/separate-line/index.d.ts +1 -1
- package/dist/types/components/slider/index.d.ts +1 -1
- package/dist/types/components/slider/slider-utils.d.ts +1 -3
- package/dist/types/components/spinner/spinner.d.ts +2 -2
- package/dist/types/components/status-dot/status-dot.d.ts +1 -1
- package/dist/types/components/tab-control/tab-control.d.ts +0 -12
- package/dist/types/components/table/grid-table.d.ts +5 -7
- package/dist/types/components/table/table.d.ts +1 -46
- package/dist/types/components/theme-provider.d.ts +0 -13
- package/dist/types/components/tip-card/index.d.ts +1 -1
- package/dist/types/components/tip-card/tip-card.d.ts +1 -1
- package/dist/types/components/token-icon/index.d.ts +1 -1
- package/dist/types/components/token-icon/token-icon.d.ts +0 -14
- package/dist/types/components/token-template/index.d.ts +1 -1
- package/dist/types/components/token-template/token-template.d.ts +2 -2
- package/dist/types/components/typography/typography.d.ts +3 -3
- package/dist/types/components/vertical-indicator/vertical-indicator.d.ts +3 -3
- package/dist/types/configs/index.d.ts +0 -2
- package/dist/types/hooks/index.d.ts +0 -4
- package/dist/types/hooks/use-filter.d.ts +1 -38
- package/dist/types/hooks/use-media-query.d.ts +0 -8
- package/dist/types/index.d.ts +2 -9
- package/dist/types/utils/colors.d.ts +0 -6
- package/dist/types/utils/format-money.d.ts +0 -1
- package/dist/types/utils/format-number.d.ts +2 -5
- package/dist/types/utils/format.d.ts +0 -4
- package/dist/types/utils/index.d.ts +3 -12
- package/dist/types/utils/loading.d.ts +0 -1
- package/dist/types/utils/math.d.ts +0 -3
- package/dist/types/utils/ranges.d.ts +0 -23
- package/dist/types/utils/templates.d.ts +0 -77
- package/dist/types/utils/ttl.d.ts +0 -37
- package/package.json +1 -1
- package/dist/cjs/components/base/side-card/constants.cjs +0 -1
- package/dist/cjs/components/base/side-card/index.cjs +0 -1
- package/dist/cjs/components/base/side-card/side-card.cjs +0 -1
- package/dist/cjs/components/base/token-pair-title/constants.cjs +0 -1
- package/dist/cjs/components/base/token-pair-title/index.cjs +0 -1
- package/dist/cjs/components/base/token-pair-title/token-pair-title.cjs +0 -1
- package/dist/cjs/components/buttons/filter-button/filter-button.cjs +0 -1
- package/dist/cjs/components/buttons/filter-button/index.cjs +0 -1
- package/dist/cjs/components/buttons/navigation-button/index.cjs +0 -1
- package/dist/cjs/components/buttons/navigation-button/navigation-button.cjs +0 -1
- package/dist/cjs/components/cards/expandable-call/expandable-call.cjs +0 -1
- package/dist/cjs/components/cards/expandable-call/index.cjs +0 -1
- package/dist/cjs/components/checkbox-item/checkbox-item.cjs +0 -1
- package/dist/cjs/components/checkbox-item/index.cjs +0 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/index.cjs +0 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +0 -1
- package/dist/cjs/components/detailed-apy/detailed-apy.cjs +0 -1
- package/dist/cjs/components/detailed-apy/index.cjs +0 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-checkbox-item.cjs +0 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-radio-item.cjs +0 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-separator.cjs +0 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-shortcut.cjs +0 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-sub-content.cjs +0 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-sub-trigger.cjs +0 -1
- package/dist/cjs/components/error-message/error-message.cjs +0 -1
- package/dist/cjs/components/filter/filter-block.cjs +0 -1
- package/dist/cjs/components/filter/filter-checkbox-item.cjs +0 -1
- package/dist/cjs/components/filter/filter-chip.cjs +0 -1
- package/dist/cjs/components/filter/filter-chips.cjs +0 -1
- package/dist/cjs/components/filter/filter-dropdown-item.cjs +0 -1
- package/dist/cjs/components/filter/filter-group.cjs +0 -1
- package/dist/cjs/components/filter/filter-label.cjs +0 -1
- package/dist/cjs/components/filter/filter-modal-item.cjs +0 -1
- package/dist/cjs/components/filter/filter-modal.cjs +0 -1
- package/dist/cjs/components/filter/filter-radio-item.cjs +0 -1
- package/dist/cjs/components/filter/filter-separator.cjs +0 -1
- package/dist/cjs/components/filter/index.cjs +0 -1
- package/dist/cjs/components/filter/interface.cjs +0 -1
- package/dist/cjs/components/filter/variants.cjs +0 -1
- package/dist/cjs/components/network-icon/network-indicator.cjs +0 -1
- package/dist/cjs/configs/design-tokens.cjs +0 -1
- package/dist/cjs/configs/variants.cjs +0 -1
- package/dist/cjs/hooks/use-checkbox-select.cjs +0 -1
- package/dist/cjs/hooks/use-controllable-state.cjs +0 -1
- package/dist/cjs/hooks/use-opened-state.cjs +0 -1
- package/dist/cjs/hooks/use-smart-number-input.cjs +0 -1
- package/dist/cjs/utils/a11y.cjs +0 -1
- package/dist/cjs/utils/copy.cjs +0 -1
- package/dist/cjs/utils/interface.cjs +0 -1
- package/dist/cjs/utils/plural.cjs +0 -1
- package/dist/cjs/utils/react.cjs +0 -1
- package/dist/cjs/utils/search-in-token.cjs +0 -1
- package/dist/cjs/utils/search.cjs +0 -1
- package/dist/cjs/utils/short-sha.cjs +0 -1
- package/dist/cjs/utils/sort.cjs +0 -1
- package/dist/esm/components/base/side-card/constants.js +0 -8
- package/dist/esm/components/base/side-card/index.js +0 -6
- package/dist/esm/components/base/side-card/side-card.js +0 -56
- package/dist/esm/components/base/token-pair-title/constants.js +0 -6
- package/dist/esm/components/base/token-pair-title/index.js +0 -6
- package/dist/esm/components/base/token-pair-title/token-pair-title.js +0 -20
- package/dist/esm/components/buttons/filter-button/filter-button.js +0 -32
- package/dist/esm/components/buttons/filter-button/index.js +0 -4
- package/dist/esm/components/buttons/navigation-button/index.js +0 -4
- package/dist/esm/components/buttons/navigation-button/navigation-button.js +0 -27
- package/dist/esm/components/cards/expandable-call/expandable-call.js +0 -50
- package/dist/esm/components/cards/expandable-call/index.js +0 -4
- package/dist/esm/components/checkbox-item/checkbox-item.js +0 -51
- package/dist/esm/components/checkbox-item/index.js +0 -4
- package/dist/esm/components/client-adapters/styled-rounded-image/index.js +0 -4
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +0 -150
- package/dist/esm/components/detailed-apy/detailed-apy.js +0 -73
- package/dist/esm/components/detailed-apy/index.js +0 -5
- package/dist/esm/components/dropdown-menu/dropdown-menu-checkbox-item.js +0 -34
- package/dist/esm/components/dropdown-menu/dropdown-menu-radio-item.js +0 -29
- package/dist/esm/components/dropdown-menu/dropdown-menu-separator.js +0 -20
- package/dist/esm/components/dropdown-menu/dropdown-menu-shortcut.js +0 -21
- package/dist/esm/components/dropdown-menu/dropdown-menu-sub-content.js +0 -24
- package/dist/esm/components/dropdown-menu/dropdown-menu-sub-trigger.js +0 -29
- package/dist/esm/components/error-message/error-message.js +0 -38
- package/dist/esm/components/filter/filter-block.js +0 -25
- package/dist/esm/components/filter/filter-checkbox-item.js +0 -30
- package/dist/esm/components/filter/filter-chip.js +0 -43
- package/dist/esm/components/filter/filter-chips.js +0 -49
- package/dist/esm/components/filter/filter-dropdown-item.js +0 -54
- package/dist/esm/components/filter/filter-group.js +0 -13
- package/dist/esm/components/filter/filter-label.js +0 -24
- package/dist/esm/components/filter/filter-modal-item.js +0 -60
- package/dist/esm/components/filter/filter-modal.js +0 -217
- package/dist/esm/components/filter/filter-radio-item.js +0 -29
- package/dist/esm/components/filter/filter-separator.js +0 -20
- package/dist/esm/components/filter/index.js +0 -26
- package/dist/esm/components/filter/interface.js +0 -1
- package/dist/esm/components/filter/variants.js +0 -17
- package/dist/esm/components/network-icon/network-indicator.js +0 -81
- package/dist/esm/configs/design-tokens.js +0 -85
- package/dist/esm/configs/variants.js +0 -28
- package/dist/esm/hooks/use-checkbox-select.js +0 -74
- package/dist/esm/hooks/use-controllable-state.js +0 -18
- package/dist/esm/hooks/use-opened-state.js +0 -20
- package/dist/esm/hooks/use-smart-number-input.js +0 -10
- package/dist/esm/utils/a11y.js +0 -12
- package/dist/esm/utils/copy.js +0 -10
- package/dist/esm/utils/interface.js +0 -1
- package/dist/esm/utils/plural.js +0 -11
- package/dist/esm/utils/react.js +0 -44
- package/dist/esm/utils/search-in-token.js +0 -14
- package/dist/esm/utils/search.js +0 -6
- package/dist/esm/utils/short-sha.js +0 -4
- package/dist/esm/utils/sort.js +0 -1
- package/dist/types/components/base/side-card/constants.d.ts +0 -5
- package/dist/types/components/base/side-card/index.d.ts +0 -2
- package/dist/types/components/base/side-card/side-card.d.ts +0 -16
- package/dist/types/components/base/token-pair-title/constants.d.ts +0 -3
- package/dist/types/components/base/token-pair-title/index.d.ts +0 -2
- package/dist/types/components/base/token-pair-title/token-pair-title.d.ts +0 -11
- package/dist/types/components/buttons/filter-button/filter-button.d.ts +0 -52
- package/dist/types/components/buttons/filter-button/index.d.ts +0 -1
- package/dist/types/components/buttons/navigation-button/index.d.ts +0 -1
- package/dist/types/components/buttons/navigation-button/navigation-button.d.ts +0 -26
- package/dist/types/components/cards/expandable-call/expandable-call.d.ts +0 -28
- package/dist/types/components/cards/expandable-call/index.d.ts +0 -1
- package/dist/types/components/checkbox-item/checkbox-item.d.ts +0 -56
- package/dist/types/components/checkbox-item/index.d.ts +0 -1
- package/dist/types/components/client-adapters/styled-rounded-image/index.d.ts +0 -1
- package/dist/types/components/client-adapters/styled-rounded-image/styled-rounded-image.d.ts +0 -9
- package/dist/types/components/detailed-apy/detailed-apy.d.ts +0 -40
- package/dist/types/components/detailed-apy/index.d.ts +0 -1
- package/dist/types/components/dropdown-menu/dropdown-menu-checkbox-item.d.ts +0 -22
- package/dist/types/components/dropdown-menu/dropdown-menu-radio-item.d.ts +0 -4
- package/dist/types/components/dropdown-menu/dropdown-menu-separator.d.ts +0 -4
- package/dist/types/components/dropdown-menu/dropdown-menu-shortcut.d.ts +0 -6
- package/dist/types/components/dropdown-menu/dropdown-menu-sub-content.d.ts +0 -4
- package/dist/types/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +0 -6
- package/dist/types/components/error-message/error-message.d.ts +0 -22
- package/dist/types/components/filter/filter-block.d.ts +0 -39
- package/dist/types/components/filter/filter-checkbox-item.d.ts +0 -23
- package/dist/types/components/filter/filter-chip.d.ts +0 -34
- package/dist/types/components/filter/filter-chips.d.ts +0 -42
- package/dist/types/components/filter/filter-dropdown-item.d.ts +0 -62
- package/dist/types/components/filter/filter-group.d.ts +0 -22
- package/dist/types/components/filter/filter-label.d.ts +0 -21
- package/dist/types/components/filter/filter-modal-item.d.ts +0 -55
- package/dist/types/components/filter/filter-modal.d.ts +0 -123
- package/dist/types/components/filter/filter-radio-item.d.ts +0 -19
- package/dist/types/components/filter/filter-separator.d.ts +0 -22
- package/dist/types/components/filter/index.d.ts +0 -109
- package/dist/types/components/filter/interface.d.ts +0 -24
- package/dist/types/components/filter/variants.d.ts +0 -3
- package/dist/types/components/network-icon/network-indicator.d.ts +0 -23
- package/dist/types/configs/design-tokens.d.ts +0 -73
- package/dist/types/configs/variants.d.ts +0 -28
- package/dist/types/hooks/use-checkbox-select.d.ts +0 -101
- package/dist/types/hooks/use-controllable-state.d.ts +0 -24
- package/dist/types/hooks/use-opened-state.d.ts +0 -71
- package/dist/types/hooks/use-smart-number-input.d.ts +0 -1
- package/dist/types/utils/a11y.d.ts +0 -24
- package/dist/types/utils/copy.d.ts +0 -4
- package/dist/types/utils/interface.d.ts +0 -24
- package/dist/types/utils/plural.d.ts +0 -36
- package/dist/types/utils/react.d.ts +0 -31
- package/dist/types/utils/search-in-token.d.ts +0 -43
- package/dist/types/utils/search.d.ts +0 -15
- package/dist/types/utils/short-sha.d.ts +0 -9
- package/dist/types/utils/sort.d.ts +0 -5
package/dist/esm/utils/colors.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function c(t, r = "#000000") {
|
|
2
2
|
if (!t.includes("var("))
|
|
3
3
|
return t;
|
|
4
4
|
try {
|
|
@@ -12,37 +12,26 @@ function g(t, r = "#000000") {
|
|
|
12
12
|
}
|
|
13
13
|
return r;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const n = t.
|
|
17
|
-
|
|
18
|
-
const e = getComputedStyle(document.documentElement).getPropertyValue(n).trim();
|
|
19
|
-
if (e)
|
|
20
|
-
return /^[\d\s.%]+$/.test(e) ? `hsl(${e})` : e;
|
|
21
|
-
} catch (e) {
|
|
22
|
-
console.warn(`Failed to get CSS variable: ${n}`, e);
|
|
23
|
-
}
|
|
24
|
-
return r;
|
|
25
|
-
}
|
|
26
|
-
function l(t, r) {
|
|
27
|
-
const n = parseInt(t.slice(1, 3), 16), e = parseInt(t.slice(3, 5), 16), o = parseInt(t.slice(5, 7), 16);
|
|
28
|
-
return `rgba(${n}, ${e}, ${o}, ${r})`;
|
|
15
|
+
function u(t, r) {
|
|
16
|
+
const n = parseInt(t.slice(1, 3), 16), e = parseInt(t.slice(3, 5), 16), s = parseInt(t.slice(5, 7), 16);
|
|
17
|
+
return `rgba(${n}, ${e}, ${s}, ${r})`;
|
|
29
18
|
}
|
|
30
|
-
function
|
|
19
|
+
function g(t) {
|
|
31
20
|
if (t.startsWith("rgba")) {
|
|
32
21
|
const r = t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
|
|
33
22
|
if (r) {
|
|
34
|
-
const [, n, e,
|
|
23
|
+
const [, n, e, s] = r;
|
|
35
24
|
return {
|
|
36
|
-
topColor: `rgba(${n}, ${e}, ${
|
|
37
|
-
bottomColor: `rgba(${n}, ${e}, ${
|
|
25
|
+
topColor: `rgba(${n}, ${e}, ${s}, 0.56)`,
|
|
26
|
+
bottomColor: `rgba(${n}, ${e}, ${s}, 0.04)`
|
|
38
27
|
};
|
|
39
28
|
}
|
|
40
29
|
}
|
|
41
30
|
if (t.startsWith("#") && (t.length === 7 || t.length === 4)) {
|
|
42
31
|
const r = t.length === 4 ? `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}` : t;
|
|
43
32
|
return {
|
|
44
|
-
topColor:
|
|
45
|
-
bottomColor:
|
|
33
|
+
topColor: u(r, 0.56),
|
|
34
|
+
bottomColor: u(r, 0.04)
|
|
46
35
|
};
|
|
47
36
|
}
|
|
48
37
|
return {
|
|
@@ -50,21 +39,20 @@ function b(t) {
|
|
|
50
39
|
bottomColor: t
|
|
51
40
|
};
|
|
52
41
|
}
|
|
53
|
-
function
|
|
42
|
+
function m(t, r, n) {
|
|
54
43
|
r /= 100, n /= 100;
|
|
55
|
-
const e = (1 - Math.abs(2 * n - 1)) * r,
|
|
56
|
-
let
|
|
57
|
-
t < 60 ? (
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
return Math.min(255, Math.max(0,
|
|
44
|
+
const e = (1 - Math.abs(2 * n - 1)) * r, s = e * (1 - Math.abs(t / 60 % 2 - 1)), d = n - e / 2;
|
|
45
|
+
let o = 0, a = 0, i = 0;
|
|
46
|
+
t < 60 ? (o = e, a = s) : t < 120 ? (o = s, a = e) : t < 180 ? (a = e, i = s) : t < 240 ? (a = s, i = e) : t < 300 ? (o = s, i = e) : (o = e, i = s);
|
|
47
|
+
const l = ($) => {
|
|
48
|
+
const b = Math.round(($ + d) * 255);
|
|
49
|
+
return Math.min(255, Math.max(0, b)).toString(16).padStart(2, "0");
|
|
61
50
|
};
|
|
62
|
-
return `#${
|
|
51
|
+
return `#${l(o)}${l(a)}${l(i)}`;
|
|
63
52
|
}
|
|
64
53
|
export {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
g as resolveCSSColor
|
|
54
|
+
g as generateColorsFromBase,
|
|
55
|
+
u as hexToRgba,
|
|
56
|
+
m as hslToHex,
|
|
57
|
+
c as resolveCSSColor
|
|
70
58
|
};
|
|
@@ -1,50 +1,42 @@
|
|
|
1
|
-
import { BigIntMath as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import "clsx";
|
|
5
|
-
import "tailwind-merge";
|
|
6
|
-
import "sonner";
|
|
7
|
-
import "react/jsx-runtime";
|
|
8
|
-
import "luxon";
|
|
9
|
-
import "./z-index.js";
|
|
10
|
-
const A = 10000000000000000n;
|
|
11
|
-
function F(t) {
|
|
1
|
+
import { BigIntMath as f, formatBN as a, WAD_DECIMALS_POW as m, PERCENTAGE_FACTOR as T } from "@gearbox-protocol/sdk/onchain";
|
|
2
|
+
const N = 10000000000000000n;
|
|
3
|
+
function p(t) {
|
|
12
4
|
return BigInt(t.toFixed(18).replace(".", ""));
|
|
13
5
|
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
return
|
|
6
|
+
function M(t, n) {
|
|
7
|
+
const e = typeof t == "number" && t < 0 || typeof t == "bigint" && t < 0n ? "-" : "", r = typeof t == "number" ? p(Math.abs(t)) : f.abs(t), o = r < N && r > 0n, u = o ? "0.01" : a(r, m, n), s = `${e}$${u}`;
|
|
8
|
+
return o ? `< ${s}` : s;
|
|
17
9
|
}
|
|
18
|
-
const
|
|
10
|
+
const d = 1e3, E = [
|
|
19
11
|
{ div: 1e12, suffix: "T" },
|
|
20
12
|
{ div: 1e9, suffix: "B" },
|
|
21
13
|
{ div: 1e6, suffix: "M" },
|
|
22
14
|
{ div: 1e3, suffix: "K" }
|
|
23
15
|
];
|
|
24
|
-
function
|
|
16
|
+
function g(t) {
|
|
25
17
|
return t.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
26
18
|
}
|
|
27
|
-
function
|
|
28
|
-
for (const { div: i, suffix:
|
|
19
|
+
function c(t, n) {
|
|
20
|
+
for (const { div: i, suffix: e } of E)
|
|
29
21
|
if (t >= i)
|
|
30
|
-
return `${
|
|
31
|
-
return t.toFixed(
|
|
22
|
+
return `${g((t / i).toFixed(n))}${e}`;
|
|
23
|
+
return t.toFixed(n);
|
|
32
24
|
}
|
|
33
|
-
function
|
|
34
|
-
return !Number.isFinite(t) || t === 0 ? "0%" : `${t < 0 ? "-" : ""}${
|
|
25
|
+
function x(t, n = 2) {
|
|
26
|
+
return !Number.isFinite(t) || t === 0 ? "0%" : `${t < 0 ? "-" : ""}${c(Math.abs(t), n)}%`;
|
|
35
27
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
return Number.isNaN(
|
|
28
|
+
function $(t, n, i = !0) {
|
|
29
|
+
const e = typeof t == "number" ? t : Number(t);
|
|
30
|
+
return Number.isNaN(e) || e === void 0 || e === null ? "0" : e === 0 ? 0 : i && Math.abs(e) >= d ? `${e < 0 ? "-" : ""}${c(Math.abs(e), n)}` : e.toFixed(n);
|
|
39
31
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
32
|
+
function b(t, n = 2) {
|
|
33
|
+
return x(t, n);
|
|
42
34
|
}
|
|
43
|
-
function
|
|
44
|
-
const i = Number(t) / Number(
|
|
45
|
-
return `${
|
|
35
|
+
function h(t, n = 2) {
|
|
36
|
+
const i = Number(t) / Number(T);
|
|
37
|
+
return `${$(i, n)}%`;
|
|
46
38
|
}
|
|
47
|
-
const
|
|
39
|
+
const C = {
|
|
48
40
|
minimumFractionDigits: 2,
|
|
49
41
|
maximumFractionDigits: 2,
|
|
50
42
|
decimalPrecision: 4,
|
|
@@ -52,43 +44,12 @@ const c = {
|
|
|
52
44
|
minExponentialThreshold: 1e-4,
|
|
53
45
|
maxExponentialThreshold: 1e6,
|
|
54
46
|
locale: "en-US"
|
|
55
|
-
}, w = ({
|
|
56
|
-
amount: t,
|
|
57
|
-
format: e = "full",
|
|
58
|
-
maximumFractionDigits: i = c.maximumFractionDigits,
|
|
59
|
-
minimumFractionDigits: r = c.minimumFractionDigits,
|
|
60
|
-
decimalPrecision: s = c.decimalPrecision,
|
|
61
|
-
minDecimalThreshold: u = c.minDecimalThreshold,
|
|
62
|
-
minExponentialThreshold: a = c.minExponentialThreshold,
|
|
63
|
-
maxExponentialThreshold: o = c.maxExponentialThreshold,
|
|
64
|
-
locale: l = c.locale
|
|
65
|
-
}) => {
|
|
66
|
-
const f = typeof t == "bigint" ? Number(x(t, 8)) : t, n = Math.abs(f);
|
|
67
|
-
if (e === "short") {
|
|
68
|
-
const T = f < 0 ? "-" : "", m = (p, N) => {
|
|
69
|
-
const $ = p >= 100 ? 0 : i, M = p.toFixed($).replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
70
|
-
return `${T}${M}${N}`;
|
|
71
|
-
};
|
|
72
|
-
if (n >= 1e9 && n <= o)
|
|
73
|
-
return m(n / 1e9, "B");
|
|
74
|
-
if (n >= 1e6 && n <= o)
|
|
75
|
-
return m(n / 1e6, "M");
|
|
76
|
-
if (n >= 1e3 && n <= o)
|
|
77
|
-
return m(n / 1e3, "K");
|
|
78
|
-
if (n > o)
|
|
79
|
-
return m(n / o, "M+");
|
|
80
|
-
}
|
|
81
|
-
return n > o && e === "full" ? `${(f / c.maxExponentialThreshold).toFixed(r)}M` : n < a && n > 0 ? f.toFixed(Math.max(10, i)) : n < u && n > 0 ? f.toPrecision(s) : f.toLocaleString(l, {
|
|
82
|
-
minimumFractionDigits: r,
|
|
83
|
-
maximumFractionDigits: i
|
|
84
|
-
});
|
|
85
47
|
};
|
|
86
48
|
export {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
W as percentageTemplate
|
|
49
|
+
C as DEFAULT_FORMAT_MONEY_CONSTANTS,
|
|
50
|
+
x as formatCompactPercent,
|
|
51
|
+
M as formatMoney,
|
|
52
|
+
$ as formatPercentAmount,
|
|
53
|
+
b as percentTemplate,
|
|
54
|
+
h as percentageTemplate
|
|
94
55
|
};
|
|
@@ -7,75 +7,71 @@ function l(t) {
|
|
|
7
7
|
}
|
|
8
8
|
function d(t, n = {}) {
|
|
9
9
|
const {
|
|
10
|
-
format:
|
|
11
|
-
minimumFractionDigits:
|
|
10
|
+
format: i = "full",
|
|
11
|
+
minimumFractionDigits: e = 0,
|
|
12
12
|
maximumFractionDigits: o,
|
|
13
|
-
maxExponentialThreshold:
|
|
13
|
+
maxExponentialThreshold: f = 1e11,
|
|
14
14
|
adaptiveDecimals: a = !1
|
|
15
|
-
} = n, s = o !== void 0 ? o :
|
|
16
|
-
if (
|
|
17
|
-
if (
|
|
15
|
+
} = n, s = o !== void 0 ? o : i === "short" ? 1 : 0, m = Math.abs(t);
|
|
16
|
+
if (i === "short") {
|
|
17
|
+
if (m >= 5e8) {
|
|
18
18
|
const r = t / 1e9, c = a ? u(r) : s;
|
|
19
19
|
return `${l(r.toFixed(c))}B`;
|
|
20
20
|
}
|
|
21
|
-
if (
|
|
21
|
+
if (m >= 1e6) {
|
|
22
22
|
const r = t / 1e6, c = a ? u(r) : s;
|
|
23
23
|
return `${l(r.toFixed(c))}M`;
|
|
24
24
|
}
|
|
25
|
-
if (
|
|
25
|
+
if (m >= 1e3) {
|
|
26
26
|
const r = t / 1e3, c = a ? u(r) : s;
|
|
27
27
|
return `${l(r.toFixed(c))}K`;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
return
|
|
31
|
-
minimumFractionDigits:
|
|
30
|
+
return f && m > f ? t.toExponential(2) : new Intl.NumberFormat("en-US", {
|
|
31
|
+
minimumFractionDigits: e,
|
|
32
32
|
maximumFractionDigits: s
|
|
33
33
|
}).format(t);
|
|
34
34
|
}
|
|
35
35
|
function S(t, n) {
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
return (Math.floor(t *
|
|
36
|
+
const i = Math.abs(t);
|
|
37
|
+
if (i >= 1) {
|
|
38
|
+
const e = 10 ** n;
|
|
39
|
+
return (Math.floor(t * e) / e).toFixed(n).replace(/\.?0+$/, "");
|
|
40
40
|
}
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
41
|
+
if (i > 0) {
|
|
42
|
+
const e = Math.floor(Math.log10(i)), o = Math.max(n, Math.abs(e) + n), a = Math.min(o, 10);
|
|
43
43
|
return t.toFixed(a).replace(/\.?0+$/, "");
|
|
44
44
|
}
|
|
45
45
|
return "0";
|
|
46
46
|
}
|
|
47
|
-
function E(t) {
|
|
48
|
-
return Math.abs(t) < 1e-10;
|
|
49
|
-
}
|
|
50
47
|
function D(t) {
|
|
51
48
|
const n = Math.abs(t);
|
|
52
49
|
return n < 1e-10 && n > 0;
|
|
53
50
|
}
|
|
54
|
-
function
|
|
51
|
+
function x(t, n) {
|
|
55
52
|
if (!D(t)) return null;
|
|
56
|
-
const
|
|
57
|
-
return n ? `${
|
|
53
|
+
const i = `<${1e-4}`;
|
|
54
|
+
return n ? `${i}${n}` : i;
|
|
58
55
|
}
|
|
59
|
-
const
|
|
56
|
+
const M = {
|
|
60
57
|
EPSILON: 1e-10,
|
|
61
58
|
MIN_DISPLAY_THRESHOLD: 1e-4,
|
|
62
59
|
MAX_EXPONENTIAL_THRESHOLD: 1e11
|
|
63
60
|
};
|
|
64
|
-
function
|
|
61
|
+
function N(t, n = 2, i = 6) {
|
|
65
62
|
if (!Number.isFinite(t)) return "∞";
|
|
66
|
-
const
|
|
67
|
-
return t <
|
|
63
|
+
const e = 1 / 10 ** n;
|
|
64
|
+
return t < e && t !== 0 ? t.toFixed(i).replace(/\.?0+$/, "") : t > 1 ? new Intl.NumberFormat("en-US", {
|
|
68
65
|
minimumFractionDigits: n,
|
|
69
66
|
maximumFractionDigits: n
|
|
70
67
|
}).format(t) : t.toFixed(n);
|
|
71
68
|
}
|
|
72
69
|
export {
|
|
73
|
-
|
|
70
|
+
M as FORMAT_CONSTANTS,
|
|
74
71
|
d as formatNumberWithSuffix,
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
N as formatPrice,
|
|
73
|
+
x as formatSmallValue,
|
|
77
74
|
u as getAdaptiveDecimals,
|
|
78
75
|
D as isBelowDisplayThreshold,
|
|
79
|
-
E as isEffectivelyZero,
|
|
80
76
|
S as toSignificantDigits
|
|
81
77
|
};
|
package/dist/esm/utils/format.js
CHANGED
|
@@ -1,38 +1,17 @@
|
|
|
1
|
-
const
|
|
2
|
-
function c(t) {
|
|
3
|
-
return `${(t / 1024).toFixed(2)} KB`;
|
|
4
|
-
}
|
|
1
|
+
const r = "≈";
|
|
5
2
|
function i(t) {
|
|
6
|
-
if (t === 0) return "-";
|
|
7
|
-
const e = Math.floor(t / 100), n = Math.floor(t % 100 / 10), r = t % 10;
|
|
8
|
-
return `v${e}.${n}.${r}`;
|
|
9
|
-
}
|
|
10
|
-
function u(t) {
|
|
11
3
|
return new Date(t * 1e3).toLocaleString("en-GB", {
|
|
12
4
|
dateStyle: "short",
|
|
13
5
|
timeStyle: "short"
|
|
14
6
|
});
|
|
15
7
|
}
|
|
16
|
-
function
|
|
8
|
+
function s(t, e = 4) {
|
|
17
9
|
if (!t) return "";
|
|
18
|
-
const n = t.slice(0, e + 2),
|
|
19
|
-
return `${n}...${
|
|
20
|
-
}
|
|
21
|
-
function a(t) {
|
|
22
|
-
return Math.floor(t * 100);
|
|
23
|
-
}
|
|
24
|
-
function s(t) {
|
|
25
|
-
if (t === 0) return "0";
|
|
26
|
-
if (t >= 1) return t.toFixed(0);
|
|
27
|
-
const e = t.toPrecision(2);
|
|
28
|
-
return e.includes("e") ? Number(e).toFixed(20).replace(/\.?0+$/, "") : e.replace(/\.?0+$/, "");
|
|
10
|
+
const n = t.slice(0, e + 2), o = t.slice(-e);
|
|
11
|
+
return `${n}...${o}`;
|
|
29
12
|
}
|
|
30
13
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
i as formatBytecodeVersion,
|
|
35
|
-
u as formatTimestamp,
|
|
36
|
-
f as shortenHash,
|
|
37
|
-
s as significantTrunc
|
|
14
|
+
r as APPROXIMATE_SYMBOL,
|
|
15
|
+
i as formatTimestamp,
|
|
16
|
+
s as shortenHash
|
|
38
17
|
};
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,114 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { createTokenSearchFilter as De, searchInToken as Me } from "./search-in-token.js";
|
|
25
|
-
import { shortSHA as Be } from "./short-sha.js";
|
|
26
|
-
import { isLongString as _e, shortenString as Ee } from "./shorten-string.js";
|
|
27
|
-
import { negativeTokenTemplate as We, tokenTemplate as Ze, tokenTemplateNumber as ze, tokenTemplateString as Xe } from "./templates.js";
|
|
28
|
-
import { getTokenIcon as qe, parseShareTokenUnderlying as Ye } from "./token-icon-source.js";
|
|
29
|
-
import { TTL_CONSTANTS as Ge, getTTLZones as Je, ttlFromTimestamp as Ke, ttlLeft as Qe, ttlLeftHuman as $e } from "./ttl.js";
|
|
30
|
-
import { openInNewWindow as oo } from "./window.js";
|
|
31
|
-
import { Z_INDEX as to, Z_INDEX_VALUES as ao } from "./z-index.js";
|
|
1
|
+
import { pointProgramsOf as r, positiveTokenRewardsOf as t, tokenRewardsOf as a, totalApyOf as m } from "./apy-breakdown.js";
|
|
2
|
+
import { bnToInputView as n } from "./bn-to-input-view.js";
|
|
3
|
+
import { bnToPrettyView as i } from "./bn-to-pretty-view.js";
|
|
4
|
+
import { bpsToPercent as l } from "./bps.js";
|
|
5
|
+
import { cn as T, cn as g } from "./cn.js";
|
|
6
|
+
import { generateColorsFromBase as c, hexToRgba as A, hslToHex as P, resolveCSSColor as d } from "./colors.js";
|
|
7
|
+
import { APPROXIMATE_SYMBOL as N, formatTimestamp as h, shortenHash as O } from "./format.js";
|
|
8
|
+
import { formatAssetAmount as w } from "./format-asset-amount.js";
|
|
9
|
+
import { formatLeverage as L } from "./format-leverage.js";
|
|
10
|
+
import { DEFAULT_FORMAT_MONEY_CONSTANTS as M, formatCompactPercent as _, formatMoney as b, formatPercentAmount as D, percentTemplate as k, percentageTemplate as E } from "./format-money.js";
|
|
11
|
+
import { FORMAT_CONSTANTS as y, formatNumberWithSuffix as F, formatPrice as V, formatSmallValue as B, getAdaptiveDecimals as U, isBelowDisplayThreshold as W, toSignificantDigits as X } from "./format-number.js";
|
|
12
|
+
import { slippageTemplate as H } from "./format-slippage.js";
|
|
13
|
+
import { formatChipLeverage as q, leveragePresets as j } from "./leverage-presets.js";
|
|
14
|
+
import { loadingProgress as G, round5 as J } from "./loading.js";
|
|
15
|
+
import { findClosestPoint as Q, formatWithoutDecimals as $, splitInterval as ee, validateMinMax as oe } from "./math.js";
|
|
16
|
+
import { getNetworkIcon as te } from "./network-icons.js";
|
|
17
|
+
import { bnToLiquidationPriceView as me, isPositiveFloat as pe, parseInputToBN as ne, parseSmallNumber as fe } from "./parse-input-to-bn.js";
|
|
18
|
+
import { isLongString as se, shortenString as le } from "./shorten-string.js";
|
|
19
|
+
import { tokenTemplateString as Te } from "./templates.js";
|
|
20
|
+
import { getTokenIcon as Se, parseShareTokenUnderlying as ce } from "./token-icon-source.js";
|
|
21
|
+
import { getTTLZones as Pe, ttlLeft as de } from "./ttl.js";
|
|
22
|
+
import { openInNewWindow as Ne } from "./window.js";
|
|
23
|
+
import { Z_INDEX as Oe, Z_INDEX_VALUES as ve } from "./z-index.js";
|
|
32
24
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
j as formatPrice,
|
|
62
|
-
O as formatTimestamp,
|
|
63
|
-
se as formatWithDecimals,
|
|
64
|
-
xe as formatWithoutDecimals,
|
|
65
|
-
h as generateColorsFromBase,
|
|
66
|
-
r as generateId,
|
|
67
|
-
G as getAdaptiveDecimals,
|
|
68
|
-
Ne as getAvailableRanges,
|
|
69
|
-
P as getCSSVariable,
|
|
70
|
-
Se as getNetworkIcon,
|
|
71
|
-
Je as getTTLZones,
|
|
72
|
-
qe as getTokenIcon,
|
|
25
|
+
N as APPROXIMATE_SYMBOL,
|
|
26
|
+
M as DEFAULT_FORMAT_MONEY_CONSTANTS,
|
|
27
|
+
y as FORMAT_CONSTANTS,
|
|
28
|
+
Oe as Z_INDEX,
|
|
29
|
+
ve as Z_INDEX_VALUES,
|
|
30
|
+
n as bnToInputView,
|
|
31
|
+
me as bnToLiquidationPriceView,
|
|
32
|
+
i as bnToPrettyView,
|
|
33
|
+
l as bpsToPercent,
|
|
34
|
+
T as cn,
|
|
35
|
+
g as default,
|
|
36
|
+
Q as findClosestPoint,
|
|
37
|
+
w as formatAssetAmount,
|
|
38
|
+
q as formatChipLeverage,
|
|
39
|
+
_ as formatCompactPercent,
|
|
40
|
+
L as formatLeverage,
|
|
41
|
+
b as formatMoney,
|
|
42
|
+
F as formatNumberWithSuffix,
|
|
43
|
+
D as formatPercentAmount,
|
|
44
|
+
V as formatPrice,
|
|
45
|
+
B as formatSmallValue,
|
|
46
|
+
h as formatTimestamp,
|
|
47
|
+
$ as formatWithoutDecimals,
|
|
48
|
+
c as generateColorsFromBase,
|
|
49
|
+
U as getAdaptiveDecimals,
|
|
50
|
+
te as getNetworkIcon,
|
|
51
|
+
Pe as getTTLZones,
|
|
52
|
+
Se as getTokenIcon,
|
|
73
53
|
A as hexToRgba,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
D as significantTrunc,
|
|
101
|
-
ee as slippageTemplate,
|
|
102
|
-
Te as splitInterval,
|
|
103
|
-
Q as toSignificantDigits,
|
|
104
|
-
i as tokenRewardsOf,
|
|
105
|
-
Ze as tokenTemplate,
|
|
106
|
-
ze as tokenTemplateNumber,
|
|
107
|
-
Xe as tokenTemplateString,
|
|
108
|
-
p as totalApyOf,
|
|
109
|
-
Ke as ttlFromTimestamp,
|
|
110
|
-
Qe as ttlLeft,
|
|
111
|
-
$e as ttlLeftHuman,
|
|
112
|
-
t as useFormFieldIds,
|
|
113
|
-
ce as validateMinMax
|
|
54
|
+
P as hslToHex,
|
|
55
|
+
W as isBelowDisplayThreshold,
|
|
56
|
+
se as isLongString,
|
|
57
|
+
pe as isPositiveFloat,
|
|
58
|
+
j as leveragePresets,
|
|
59
|
+
G as loadingProgress,
|
|
60
|
+
Ne as openInNewWindow,
|
|
61
|
+
ne as parseInputToBN,
|
|
62
|
+
ce as parseShareTokenUnderlying,
|
|
63
|
+
fe as parseSmallNumber,
|
|
64
|
+
k as percentTemplate,
|
|
65
|
+
E as percentageTemplate,
|
|
66
|
+
r as pointProgramsOf,
|
|
67
|
+
t as positiveTokenRewardsOf,
|
|
68
|
+
d as resolveCSSColor,
|
|
69
|
+
J as round5,
|
|
70
|
+
O as shortenHash,
|
|
71
|
+
le as shortenString,
|
|
72
|
+
H as slippageTemplate,
|
|
73
|
+
ee as splitInterval,
|
|
74
|
+
X as toSignificantDigits,
|
|
75
|
+
a as tokenRewardsOf,
|
|
76
|
+
Te as tokenTemplateString,
|
|
77
|
+
m as totalApyOf,
|
|
78
|
+
de as ttlLeft,
|
|
79
|
+
oe as validateMinMax
|
|
114
80
|
};
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
3
|
-
return n.reduce(
|
|
4
|
-
(r, o) => r && t(o),
|
|
5
|
-
!0
|
|
6
|
-
);
|
|
7
|
-
}
|
|
8
|
-
function d(n) {
|
|
1
|
+
const d = (n) => n != null;
|
|
2
|
+
function u(n) {
|
|
9
3
|
return Math.round(n / 5) * 5;
|
|
10
4
|
}
|
|
11
5
|
function s(n) {
|
|
12
6
|
const r = n.reduce(
|
|
13
|
-
(
|
|
7
|
+
(o, e) => d(e) ? o + 1 : o,
|
|
14
8
|
0
|
|
15
|
-
),
|
|
16
|
-
return
|
|
9
|
+
), t = Math.floor(r / n.length * 100);
|
|
10
|
+
return u(t);
|
|
17
11
|
}
|
|
18
12
|
export {
|
|
19
|
-
l as allLoaded,
|
|
20
13
|
s as loadingProgress,
|
|
21
|
-
|
|
14
|
+
u as round5
|
|
22
15
|
};
|
package/dist/esm/utils/math.js
CHANGED
|
@@ -1,45 +1,36 @@
|
|
|
1
|
-
function
|
|
2
|
-
const
|
|
1
|
+
function M(t, n, o) {
|
|
2
|
+
const s = t / n, a = Math.round(s * o);
|
|
3
3
|
return Math.round(a / o * n);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
const e = t / n;
|
|
7
|
-
return Math.round(e * o) / o;
|
|
8
|
-
}
|
|
9
|
-
function f(t, n) {
|
|
10
|
-
return t / n;
|
|
11
|
-
}
|
|
12
|
-
function b(t, n, o, e) {
|
|
5
|
+
function l(t, n, o, s) {
|
|
13
6
|
const a = /* @__PURE__ */ new Set([t]);
|
|
14
|
-
for (let
|
|
15
|
-
a.add(t + o *
|
|
16
|
-
return a.add(n),
|
|
17
|
-
a.add(
|
|
18
|
-
}), [...a].sort((
|
|
7
|
+
for (let e = 1; n >= t + o * e; e += 1)
|
|
8
|
+
a.add(t + o * e);
|
|
9
|
+
return a.add(n), s?.forEach((e) => {
|
|
10
|
+
a.add(e);
|
|
11
|
+
}), [...a].sort((e, c) => e - c);
|
|
19
12
|
}
|
|
20
|
-
function
|
|
13
|
+
function f(t, n, o) {
|
|
21
14
|
return Math.min(Math.max(t, n), o);
|
|
22
15
|
}
|
|
23
|
-
function
|
|
24
|
-
const
|
|
25
|
-
(
|
|
26
|
-
const
|
|
27
|
-
return
|
|
16
|
+
function b(t, n, o) {
|
|
17
|
+
const s = t, a = M(s, o, 1), e = Math.abs(a - s), c = n.reduce(
|
|
18
|
+
(i, r) => {
|
|
19
|
+
const m = r !== void 0 ? Math.abs(r - s) : Number.MAX_SAFE_INTEGER;
|
|
20
|
+
return i[m] = r || 0, i;
|
|
28
21
|
},
|
|
29
22
|
[]
|
|
30
|
-
),
|
|
31
|
-
[
|
|
23
|
+
), u = {
|
|
24
|
+
[e]: a,
|
|
32
25
|
...c
|
|
33
26
|
}, d = Math.min(
|
|
34
|
-
...Object.keys(
|
|
27
|
+
...Object.keys(u).map((i) => Number(i))
|
|
35
28
|
);
|
|
36
|
-
return { minPoint:
|
|
29
|
+
return { minPoint: u[d], minDistance: d };
|
|
37
30
|
}
|
|
38
31
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
b as splitInterval,
|
|
44
|
-
D as validateMinMax
|
|
32
|
+
b as findClosestPoint,
|
|
33
|
+
M as formatWithoutDecimals,
|
|
34
|
+
l as splitInterval,
|
|
35
|
+
f as validateMinMax
|
|
45
36
|
};
|