@gearbox-protocol/ui-kit 4.0.0-next.4 → 4.0.0-next.41
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/index.cjs +1 -1
- 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 -0
- package/dist/cjs/components/badge/index.cjs +1 -1
- package/dist/cjs/components/base/amount-input/amount-input.cjs +1 -1
- package/dist/cjs/components/base/amount-input/token-select-panel.cjs +1 -1
- package/dist/cjs/components/base/apy-breakdown-body/apy-breakdown-body.cjs +1 -0
- package/dist/cjs/components/base/apy-breakdown-body/index.cjs +1 -0
- package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
- package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.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/history-chart/history-chart.cjs +1 -1
- package/dist/cjs/components/base/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
- package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
- package/dist/cjs/components/base/leverage-preset-chips/constants.cjs +1 -0
- package/dist/cjs/components/base/leverage-preset-chips/index.cjs +1 -0
- package/dist/cjs/components/base/leverage-preset-chips/leverage-preset-chips.cjs +1 -0
- 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/pool-apy-breakdown-card/constants.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/constants.cjs +1 -0
- package/dist/cjs/components/base/position-assets/index.cjs +1 -0
- package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -0
- package/dist/cjs/components/base/review-button/constants.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/side-card/side-card.cjs +1 -1
- package/dist/cjs/components/base/stack/stack.cjs +1 -1
- package/dist/cjs/components/base/stat-badge/constants.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/constants.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
- package/dist/cjs/components/base/title-meta/constants.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/constants.cjs +1 -1
- package/dist/cjs/components/base/values/index.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 -0
- package/dist/cjs/components/base/values/position-type-badge.cjs +1 -1
- package/dist/cjs/components/base/values/price-impact-value.cjs +1 -0
- 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 -0
- package/dist/cjs/components/base-table/base-table.cjs +1 -0
- package/dist/cjs/components/base-table/constants.cjs +1 -0
- package/dist/cjs/components/base-table/index.cjs +1 -0
- 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/navigation-button/navigation-button.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-call/expandable-call.cjs +1 -1
- package/dist/cjs/components/cards/expandable-card/expandable-card.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/checkbox-item/checkbox-item.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/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/collateral-allocation-tooltip/allocation-wheel.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/collateral-allocation-tooltip.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/constants.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/index.cjs +1 -0
- 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/constants.cjs +1 -0
- package/dist/cjs/components/composites/pool-assets-table/index.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/dialog/TransactionConfirmShell.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/constants.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.cjs +1 -0
- 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/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-apy/detailed-apy.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-checkbox-item.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-radio-item.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-separator.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-shortcut.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-sub-content.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-sub-trigger.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/error-message.cjs +1 -1
- package/dist/cjs/components/fadeout-loading/fadeout-loading.cjs +1 -1
- package/dist/cjs/components/filter/filter-block.cjs +1 -1
- package/dist/cjs/components/filter/filter-checkbox-item.cjs +1 -1
- package/dist/cjs/components/filter/filter-chip.cjs +1 -1
- package/dist/cjs/components/filter/filter-chips.cjs +1 -1
- package/dist/cjs/components/filter/filter-dropdown-item.cjs +1 -1
- package/dist/cjs/components/filter/filter-group.cjs +1 -1
- package/dist/cjs/components/filter/filter-label.cjs +1 -1
- package/dist/cjs/components/filter/filter-modal-item.cjs +1 -1
- package/dist/cjs/components/filter/filter-modal.cjs +1 -1
- package/dist/cjs/components/filter/filter-radio-item.cjs +1 -1
- package/dist/cjs/components/filter/filter-separator.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-current-value.cjs +1 -1
- package/dist/cjs/components/graph/graph-tooltip.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/graph/index.cjs +1 -1
- package/dist/cjs/components/graph/y-axis-scale.cjs +1 -0
- 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/hf-indicator/hf-indicator.cjs +1 -0
- package/dist/cjs/components/hf-indicator/index.cjs +1 -0
- 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/index.cjs +1 -1
- package/dist/cjs/components/infinite-scroll/index.cjs +1 -0
- package/dist/cjs/components/infinite-scroll/infinite-scroll-wrapper.cjs +1 -0
- package/dist/cjs/components/input/input.cjs +1 -1
- package/dist/cjs/components/label/label.cjs +1 -1
- package/dist/cjs/components/layout/app-footer/app-footer.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/name-cell/index.cjs +1 -0
- package/dist/cjs/components/name-cell/name-cell.cjs +1 -0
- 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/network-icon/network-indicator.cjs +1 -0
- package/dist/cjs/components/pool-points-indicator/pool-points-indicator.cjs +1 -1
- package/dist/cjs/components/radio-group/index.cjs +1 -0
- package/dist/cjs/components/radio-group/radio-group.cjs +1 -0
- package/dist/cjs/components/rounded-image/rounded-image.cjs +1 -1
- package/dist/cjs/components/sdk-status-pill/constants.cjs +1 -0
- package/dist/cjs/components/sdk-status-pill/index.cjs +1 -0
- package/dist/cjs/components/sdk-status-pill/sdk-status-pill.cjs +1 -0
- package/dist/cjs/components/sdk-status-pill/sdk-status.cjs +1 -0
- 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/constants.cjs +1 -0
- package/dist/cjs/components/slider/index.cjs +1 -1
- package/dist/cjs/components/slider/slider-track.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/tab-control.cjs +1 -1
- package/dist/cjs/components/table/grid-loading-line.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/tip-card/tip-card.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/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/trading-view/trading-view.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/components/yield-breakdown-tooltip/index.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
- package/dist/cjs/configs/tailwind-preset.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-observed-width-key.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.8_tailwindcss@4.3.3/node_modules/tailwind-scrollbar/src/index.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.8_tailwindcss@4.3.3/node_modules/tailwind-scrollbar/src/utilities.cjs +1 -0
- package/dist/cjs/node_modules/.pnpm/tailwindcss@4.3.3/node_modules/tailwindcss/dist/flatten-color-palette.cjs +1 -0
- package/dist/cjs/utils/bn-to-pretty-view.cjs +1 -1
- package/dist/cjs/utils/format-asset-amount.cjs +1 -1
- package/dist/cjs/utils/format-money.cjs +1 -1
- package/dist/cjs/utils/format-slippage.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/leverage-presets.cjs +1 -0
- package/dist/cjs/utils/parse-input-to-bn.cjs +1 -1
- package/dist/cjs/utils/templates.cjs +1 -1
- package/dist/esm/_virtual/index.js +1 -1
- package/dist/esm/components/accordion/accordion.js +8 -9
- package/dist/esm/components/alert-badge/alert-badge.js +1 -2
- package/dist/esm/components/alert-dialog/alert-dialog.js +8 -9
- package/dist/esm/components/alert-modal/alert-modal.js +1 -2
- package/dist/esm/components/app-bar/app-bar.js +1 -2
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +162 -161
- package/dist/esm/components/badge/badge.js +15 -10
- package/dist/esm/components/badge/chip.js +46 -0
- package/dist/esm/components/badge/index.js +8 -3
- package/dist/esm/components/base/amount-input/amount-input.js +13 -14
- package/dist/esm/components/base/amount-input/token-select-panel.js +34 -39
- package/dist/esm/components/base/apy-breakdown-body/apy-breakdown-body.js +106 -0
- package/dist/esm/components/base/apy-breakdown-body/index.js +10 -0
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +2 -2
- package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +6 -6
- package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +20 -21
- package/dist/esm/components/base/details-view/detail-aside/detail-aside-screen-layout.js +11 -12
- package/dist/esm/components/base/history-chart/history-chart.js +84 -42
- package/dist/esm/components/base/index.js +155 -142
- package/dist/esm/components/base/info-list/info-list.js +10 -11
- package/dist/esm/components/base/leverage-input/leverage-input.js +11 -13
- package/dist/esm/components/base/leverage-preset-chips/constants.js +7 -0
- package/dist/esm/components/base/leverage-preset-chips/index.js +6 -0
- package/dist/esm/components/base/leverage-preset-chips/leverage-preset-chips.js +39 -0
- package/dist/esm/components/base/liquidation-params-table/liquidation-params-table.js +3 -4
- package/dist/esm/components/base/manage-pane/manage-pane.js +5 -6
- package/dist/esm/components/base/pool-apy-breakdown-card/constants.js +5 -2
- package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +110 -47
- package/dist/esm/components/base/position-assets/constants.js +8 -0
- package/dist/esm/components/base/position-assets/index.js +6 -0
- package/dist/esm/components/base/position-assets/position-assets.js +95 -0
- package/dist/esm/components/base/review-button/constants.js +3 -2
- package/dist/esm/components/base/review-button/review-button.js +31 -19
- package/dist/esm/components/base/section-heading/section-heading.js +3 -4
- package/dist/esm/components/base/segmented-tabs/segmented-tabs.js +12 -13
- package/dist/esm/components/base/side-card/side-card.js +16 -17
- package/dist/esm/components/base/stack/stack.js +9 -10
- package/dist/esm/components/base/stat-badge/constants.js +1 -0
- package/dist/esm/components/base/stat-badge/stat-badge.js +88 -54
- package/dist/esm/components/base/sticky-bar/sticky-bar.js +3 -4
- package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +8 -3
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +198 -42
- package/dist/esm/components/base/tabber/tabber.js +67 -64
- package/dist/esm/components/base/title-meta/constants.js +1 -0
- package/dist/esm/components/base/title-meta/title-meta.js +48 -28
- package/dist/esm/components/base/token-amount/token-amount.js +11 -11
- package/dist/esm/components/base/token-pair-symbol/token-pair-symbol.js +7 -8
- package/dist/esm/components/base/values/constants.js +1 -0
- package/dist/esm/components/base/values/index.js +17 -12
- package/dist/esm/components/base/values/pnl-value.js +14 -14
- package/dist/esm/components/base/values/position-status-badge.js +25 -0
- package/dist/esm/components/base/values/position-type-badge.js +2 -2
- package/dist/esm/components/base/values/price-impact-value.js +22 -0
- package/dist/esm/components/base/values/scalars.js +60 -36
- package/dist/esm/components/base-link/base-link.js +8 -9
- package/dist/esm/components/base-table/base-table-line.js +116 -0
- package/dist/esm/components/base-table/base-table.js +109 -0
- package/dist/esm/components/base-table/constants.js +12 -0
- package/dist/esm/components/base-table/index.js +9 -0
- package/dist/esm/components/breadcrumbs/breadcrumbs.js +3 -4
- package/dist/esm/components/buttons/back-button/back-button.js +7 -8
- package/dist/esm/components/buttons/button/button.js +1 -2
- package/dist/esm/components/buttons/copy-button/copy-button.js +8 -9
- package/dist/esm/components/buttons/external-button/external-button.js +8 -9
- package/dist/esm/components/buttons/navigation-button/navigation-button.js +4 -5
- package/dist/esm/components/buttons/range-buttons/range-buttons.js +3 -4
- package/dist/esm/components/cards/card/card.js +1 -2
- package/dist/esm/components/cards/expandable-call/expandable-call.js +20 -21
- package/dist/esm/components/cards/expandable-card/expandable-card.js +12 -13
- package/dist/esm/components/checkbox/checkbox-labeled.js +13 -9
- package/dist/esm/components/checkbox/checkbox.js +1 -2
- package/dist/esm/components/checkbox-item/checkbox-item.js +10 -11
- package/dist/esm/components/client-adapters/styled-button/styled-button.js +8 -9
- package/dist/esm/components/client-adapters/styled-dialog-container/styled-dialog-container.js +1 -2
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +13 -9
- package/dist/esm/components/collateral-allocation-tooltip/allocation-wheel.js +70 -0
- package/dist/esm/components/collateral-allocation-tooltip/collateral-allocation-tooltip.js +101 -0
- package/dist/esm/components/collateral-allocation-tooltip/constants.js +12 -0
- package/dist/esm/components/collateral-allocation-tooltip/index.js +9 -0
- package/dist/esm/components/composites/index.js +31 -31
- package/dist/esm/components/composites/notification-center/notification-center.js +3 -4
- package/dist/esm/components/composites/pool-assets-table/constants.js +9 -0
- package/dist/esm/components/composites/pool-assets-table/index.js +8 -6
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +52 -31
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +110 -79
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +44 -27
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +51 -41
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +115 -61
- package/dist/esm/components/composites/tx-preview/confirm/dialog/constants.js +10 -7
- package/dist/esm/components/composites/tx-preview/confirm/dialog/index.js +8 -10
- package/dist/esm/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.js +1 -0
- package/dist/esm/components/composites/tx-preview/confirm/index.js +24 -26
- package/dist/esm/components/composites/tx-preview/confirm/stepper/ProgressStepper.js +3 -4
- package/dist/esm/components/composites/tx-preview/index.js +24 -26
- package/dist/esm/components/compound-apy/compound-apy.js +88 -81
- package/dist/esm/components/confirm-menu/confirm-menu.js +6 -7
- package/dist/esm/components/detailed-apy/detailed-apy.js +9 -10
- package/dist/esm/components/detailed-page-title/detailed-page-title-copy-button.js +1 -2
- package/dist/esm/components/detailed-page-title/detailed-page-title-explorer-dropdown.js +51 -43
- package/dist/esm/components/dialog/dialog-container.js +7 -8
- package/dist/esm/components/dialog/dialog-content.js +1 -2
- package/dist/esm/components/dialog/dialog-description.js +5 -6
- package/dist/esm/components/dialog/dialog-footer.js +1 -2
- package/dist/esm/components/dialog/dialog-form.js +12 -13
- package/dist/esm/components/dialog/dialog-header.js +5 -6
- package/dist/esm/components/dialog/dialog-modal-container.js +1 -2
- package/dist/esm/components/dialog/dialog-overlay.js +4 -5
- package/dist/esm/components/dialog/dialog-title.js +1 -2
- package/dist/esm/components/dropdown-menu/dropdown-menu-checkbox-item.js +1 -2
- package/dist/esm/components/dropdown-menu/dropdown-menu-content.js +5 -6
- package/dist/esm/components/dropdown-menu/dropdown-menu-item.js +4 -5
- package/dist/esm/components/dropdown-menu/dropdown-menu-label.js +4 -5
- package/dist/esm/components/dropdown-menu/dropdown-menu-radio-item.js +4 -5
- package/dist/esm/components/dropdown-menu/dropdown-menu-separator.js +8 -9
- package/dist/esm/components/dropdown-menu/dropdown-menu-shortcut.js +1 -2
- package/dist/esm/components/dropdown-menu/dropdown-menu-sub-content.js +1 -2
- package/dist/esm/components/dropdown-menu/dropdown-menu-sub-trigger.js +8 -9
- package/dist/esm/components/edit-input/edit-input.js +7 -8
- package/dist/esm/components/error-message/error-line-message.js +6 -7
- package/dist/esm/components/error-message/error-message.js +3 -4
- package/dist/esm/components/fadeout-loading/fadeout-loading.js +1 -2
- package/dist/esm/components/filter/filter-block.js +1 -2
- package/dist/esm/components/filter/filter-checkbox-item.js +4 -5
- package/dist/esm/components/filter/filter-chip.js +2 -2
- package/dist/esm/components/filter/filter-chips.js +6 -7
- package/dist/esm/components/filter/filter-dropdown-item.js +12 -13
- package/dist/esm/components/filter/filter-group.js +1 -2
- package/dist/esm/components/filter/filter-label.js +1 -2
- package/dist/esm/components/filter/filter-modal-item.js +5 -6
- package/dist/esm/components/filter/filter-modal.js +3 -4
- package/dist/esm/components/filter/filter-radio-item.js +5 -6
- package/dist/esm/components/filter/filter-separator.js +4 -5
- package/dist/esm/components/formatted-number/formatted-number.js +3 -4
- package/dist/esm/components/graph/default-config.js +47 -25
- package/dist/esm/components/graph/formatters.js +127 -122
- package/dist/esm/components/graph/graph-current-value.js +11 -11
- package/dist/esm/components/graph/graph-tooltip.js +6 -6
- package/dist/esm/components/graph/graph-view.js +32 -31
- package/dist/esm/components/graph/graph.js +646 -555
- package/dist/esm/components/graph/index.js +32 -27
- package/dist/esm/components/graph/y-axis-scale.js +112 -0
- package/dist/esm/components/head-cell/head-cell.js +13 -14
- package/dist/esm/components/health-factor/health-factor.js +3 -4
- package/dist/esm/components/help-tip/help-tip.js +5 -6
- package/dist/esm/components/hf-indicator/hf-indicator.js +59 -0
- package/dist/esm/components/hf-indicator/index.js +4 -0
- package/dist/esm/components/icon-button/icon-button.js +7 -8
- package/dist/esm/components/icons/fa-icon.js +3 -4
- package/dist/esm/components/index.js +757 -703
- package/dist/esm/components/infinite-scroll/index.js +4 -0
- package/dist/esm/components/infinite-scroll/infinite-scroll-wrapper.js +30 -0
- package/dist/esm/components/input/input.js +3 -4
- package/dist/esm/components/label/label.js +1 -2
- package/dist/esm/components/layout/app-footer/app-footer.js +20 -23
- package/dist/esm/components/link/link.js +12 -13
- package/dist/esm/components/loader/loader.js +1 -2
- package/dist/esm/components/loading-bar/loading-bar.js +1 -2
- package/dist/esm/components/modal/modal.js +8 -9
- package/dist/esm/components/name-cell/index.js +4 -0
- package/dist/esm/components/name-cell/name-cell.js +35 -0
- package/dist/esm/components/navbar-logo/navbar-logo.js +3 -4
- package/dist/esm/components/network-icon/index.js +4 -2
- package/dist/esm/components/network-icon/network-indicator.js +81 -0
- package/dist/esm/components/pool-points-indicator/pool-points-indicator.js +3 -4
- package/dist/esm/components/radio-group/index.js +5 -0
- package/dist/esm/components/radio-group/radio-group.js +56 -0
- package/dist/esm/components/rounded-image/rounded-image.js +1 -2
- package/dist/esm/components/sdk-status-pill/constants.js +8 -0
- package/dist/esm/components/sdk-status-pill/index.js +8 -0
- package/dist/esm/components/sdk-status-pill/sdk-status-pill.js +58 -0
- package/dist/esm/components/sdk-status-pill/sdk-status.js +6 -0
- package/dist/esm/components/search-line/search-line.js +1 -2
- package/dist/esm/components/segmented-control/segmented-control.js +7 -8
- package/dist/esm/components/select/select.js +4 -5
- package/dist/esm/components/separate-line/separate-line.js +1 -2
- package/dist/esm/components/short-string/short-string.js +4 -5
- package/dist/esm/components/simple-accordion/simple-accordion.js +1 -2
- package/dist/esm/components/simple-dropdown/simple-dropdown-menu-item.js +1 -2
- package/dist/esm/components/simple-dropdown/simple-dropdown.js +5 -6
- package/dist/esm/components/skeleton/skeleton-stack.js +7 -8
- package/dist/esm/components/skeleton/skeleton.js +3 -4
- package/dist/esm/components/slider/constants.js +6 -0
- package/dist/esm/components/slider/index.js +29 -26
- package/dist/esm/components/slider/slider-track.js +19 -17
- package/dist/esm/components/slider/slider-utils.js +37 -20
- package/dist/esm/components/slider/slider.js +54 -53
- package/dist/esm/components/spinner/spinner.js +1 -2
- package/dist/esm/components/spinner-loader/spinner-loader.js +8 -9
- package/dist/esm/components/split-list/split-list.js +5 -6
- package/dist/esm/components/status-dot/status-dot.js +4 -5
- package/dist/esm/components/status-elements/status-elements.js +7 -8
- package/dist/esm/components/tab-control/tab-control.js +40 -35
- package/dist/esm/components/table/grid-loading-line.js +14 -15
- package/dist/esm/components/table/table-sm.js +21 -22
- package/dist/esm/components/table/table.js +1 -2
- package/dist/esm/components/tabs/tabs.js +7 -8
- package/dist/esm/components/text-button/text-button.js +10 -11
- package/dist/esm/components/textarea/textarea.js +1 -2
- package/dist/esm/components/tip-card/tip-card.js +5 -6
- package/dist/esm/components/token-icon/token-icon.js +12 -13
- package/dist/esm/components/token-symbol/token-symbol.js +1 -2
- package/dist/esm/components/token-template/token-template.js +9 -10
- package/dist/esm/components/tooltip/simple-tooltip.js +52 -51
- package/dist/esm/components/tooltip/tooltip.js +7 -8
- package/dist/esm/components/trading-view/trading-view.js +219 -179
- package/dist/esm/components/typography/typography.js +5 -6
- package/dist/esm/components/vertical-indicator/vertical-indicator.js +7 -8
- package/dist/esm/components/vspace/vspace.js +8 -9
- package/dist/esm/components/with-copy/with-copy.js +13 -9
- package/dist/esm/components/with-title/with-title.js +8 -9
- package/dist/esm/components/yield-breakdown-tooltip/index.js +2 -1
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +154 -192
- package/dist/esm/configs/tailwind-preset.js +13 -1
- package/dist/esm/hooks/index.js +23 -23
- package/dist/esm/hooks/use-debounce-call.js +5 -6
- package/dist/esm/hooks/use-observed-width-key.js +24 -0
- package/dist/esm/index.js +909 -849
- package/dist/esm/locale/en.json.js +62 -47
- package/dist/esm/node_modules/.pnpm/{tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17 → tailwind-scrollbar@4.0.2_react@19.2.8_tailwindcss@4.3.3}/node_modules/tailwind-scrollbar/src/index.js +1 -1
- package/dist/esm/node_modules/.pnpm/{tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17 → tailwind-scrollbar@4.0.2_react@19.2.8_tailwindcss@4.3.3}/node_modules/tailwind-scrollbar/src/utilities.js +1 -1
- package/dist/esm/node_modules/.pnpm/tailwindcss@4.3.3/node_modules/tailwindcss/dist/flatten-color-palette.js +16 -0
- package/dist/esm/utils/bn-to-pretty-view.js +1 -1
- package/dist/esm/utils/format-asset-amount.js +1 -1
- package/dist/esm/utils/format-money.js +55 -38
- package/dist/esm/utils/format-slippage.js +1 -1
- package/dist/esm/utils/index.js +87 -83
- package/dist/esm/utils/leverage-presets.js +13 -0
- package/dist/esm/utils/parse-input-to-bn.js +1 -1
- package/dist/esm/utils/templates.js +20 -21
- package/dist/globals.css +2 -2
- package/dist/types/components/alert-dialog/alert-dialog.d.ts +2 -2
- package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +4 -1
- package/dist/types/components/badge/badge.d.ts +3 -2
- package/dist/types/components/badge/chip.d.ts +22 -0
- package/dist/types/components/badge/index.d.ts +1 -0
- package/dist/types/components/base/amount-input/amount-input.d.ts +3 -2
- package/dist/types/components/base/amount-input/token-select-panel.d.ts +4 -3
- package/dist/types/components/base/apy-breakdown-body/apy-breakdown-body.d.ts +42 -0
- package/dist/types/components/base/apy-breakdown-body/index.d.ts +2 -0
- package/dist/types/components/base/history-chart/history-chart.d.ts +33 -8
- package/dist/types/components/base/index.d.ts +2 -0
- package/dist/types/components/base/info-portal/info-portal.d.ts +1 -1
- package/dist/types/components/base/leverage-input/leverage-input.d.ts +5 -3
- package/dist/types/components/base/leverage-preset-chips/constants.d.ts +4 -0
- package/dist/types/components/base/leverage-preset-chips/index.d.ts +2 -0
- package/dist/types/components/base/leverage-preset-chips/leverage-preset-chips.d.ts +13 -0
- package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +2 -2
- package/dist/types/components/base/pool-apy-breakdown-card/constants.d.ts +3 -0
- package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +12 -9
- package/dist/types/components/base/position-assets/constants.d.ts +5 -0
- package/dist/types/components/base/position-assets/index.d.ts +2 -0
- package/dist/types/components/base/position-assets/position-assets.d.ts +55 -0
- package/dist/types/components/base/review-button/constants.d.ts +1 -0
- package/dist/types/components/base/review-button/review-button.d.ts +17 -3
- package/dist/types/components/base/stat-badge/constants.d.ts +1 -0
- package/dist/types/components/base/stat-badge/stat-badge.d.ts +11 -1
- package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +6 -1
- package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +40 -4
- package/dist/types/components/base/tabber/tabber.d.ts +2 -2
- package/dist/types/components/base/title-meta/constants.d.ts +1 -0
- package/dist/types/components/base/title-meta/title-meta.d.ts +9 -1
- package/dist/types/components/base/token-amount/token-amount.d.ts +6 -1
- package/dist/types/components/base/values/constants.d.ts +1 -0
- package/dist/types/components/base/values/index.d.ts +2 -0
- package/dist/types/components/base/values/pnl-value.d.ts +8 -2
- package/dist/types/components/base/values/position-status-badge.d.ts +7 -0
- package/dist/types/components/base/values/position-type-badge.d.ts +1 -1
- package/dist/types/components/base/values/price-impact-value.d.ts +25 -0
- package/dist/types/components/base/values/scalars.d.ts +23 -2
- package/dist/types/components/base-table/base-table-line.d.ts +21 -0
- package/dist/types/components/base-table/base-table.d.ts +19 -0
- package/dist/types/components/base-table/constants.d.ts +8 -0
- package/dist/types/components/base-table/index.d.ts +3 -0
- package/dist/types/components/base-table/types.d.ts +37 -0
- package/dist/types/components/buttons/back-button/back-button.d.ts +1 -1
- package/dist/types/components/buttons/range-buttons/range-buttons.d.ts +1 -1
- package/dist/types/components/cards/danger-zone/danger-zone.d.ts +1 -1
- package/dist/types/components/cards/expandable-call/expandable-call.d.ts +1 -1
- package/dist/types/components/cards/expandable-card/expandable-card.d.ts +1 -1
- package/dist/types/components/collateral-allocation-tooltip/allocation-wheel.d.ts +10 -0
- package/dist/types/components/collateral-allocation-tooltip/collateral-allocation-tooltip.d.ts +23 -0
- package/dist/types/components/collateral-allocation-tooltip/constants.d.ts +8 -0
- package/dist/types/components/collateral-allocation-tooltip/index.d.ts +3 -0
- package/dist/types/components/composites/pool-assets-table/constants.d.ts +6 -0
- package/dist/types/components/composites/pool-assets-table/index.d.ts +1 -0
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-head.d.ts +1 -2
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +10 -9
- package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +12 -21
- package/dist/types/components/composites/pool-assets-table/types.d.ts +4 -12
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +47 -14
- package/dist/types/components/composites/tx-preview/confirm/amounts/index.d.ts +1 -1
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts +23 -19
- package/dist/types/components/composites/tx-preview/confirm/dialog/index.d.ts +2 -2
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.d.ts +0 -3
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.d.ts +98 -0
- package/dist/types/components/compound-apy/compound-apy.d.ts +14 -2
- package/dist/types/components/dialog/dialog-footer.d.ts +1 -1
- package/dist/types/components/dialog/dialog-header.d.ts +1 -1
- package/dist/types/components/dropdown-menu/dropdown-menu-shortcut.d.ts +1 -1
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/types/components/edit-input/edit-input.d.ts +1 -1
- package/dist/types/components/filter/filter-modal.d.ts +1 -1
- package/dist/types/components/formatted-number/formatted-number.d.ts +1 -1
- package/dist/types/components/graph/default-config.d.ts +23 -0
- package/dist/types/components/graph/formatters.d.ts +11 -2
- package/dist/types/components/graph/graph-view.d.ts +1 -1
- package/dist/types/components/graph/graph.d.ts +30 -5
- package/dist/types/components/graph/index.d.ts +1 -1
- package/dist/types/components/graph/y-axis-scale.d.ts +48 -0
- package/dist/types/components/health-factor/health-factor.d.ts +1 -1
- package/dist/types/components/hf-indicator/hf-indicator.d.ts +17 -0
- package/dist/types/components/hf-indicator/index.d.ts +1 -0
- package/dist/types/components/icons/fa-icon.d.ts +1 -1
- package/dist/types/components/index.d.ts +7 -1
- package/dist/types/components/infinite-scroll/index.d.ts +1 -0
- package/dist/types/components/infinite-scroll/infinite-scroll-wrapper.d.ts +11 -0
- package/dist/types/components/layout/app-footer/app-footer.d.ts +9 -15
- package/dist/types/components/legal-agreement/legal-agreement-dialog.d.ts +2 -2
- package/dist/types/components/loading/loading.d.ts +1 -1
- package/dist/types/components/name-cell/index.d.ts +1 -0
- package/dist/types/components/name-cell/name-cell.d.ts +13 -0
- package/dist/types/components/navbar-logo/navbar-logo.d.ts +1 -1
- package/dist/types/components/navigation-context/navigation-context.d.ts +1 -1
- package/dist/types/components/network-icon/index.d.ts +1 -0
- package/dist/types/components/network-icon/network-icon.d.ts +1 -1
- package/dist/types/components/network-icon/network-indicator.d.ts +23 -0
- package/dist/types/components/pool-points-indicator/pool-points-indicator.d.ts +1 -1
- package/dist/types/components/radio-group/index.d.ts +1 -0
- package/dist/types/components/radio-group/radio-group.d.ts +39 -0
- package/dist/types/components/sdk-status-pill/constants.d.ts +5 -0
- package/dist/types/components/sdk-status-pill/index.d.ts +3 -0
- package/dist/types/components/sdk-status-pill/sdk-status-pill.d.ts +27 -0
- package/dist/types/components/sdk-status-pill/sdk-status.d.ts +11 -0
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components/short-string/short-string.d.ts +1 -1
- package/dist/types/components/simple-accordion/simple-accordion.d.ts +2 -2
- package/dist/types/components/simple-dropdown/simple-dropdown.d.ts +1 -1
- package/dist/types/components/skeleton/skeleton.d.ts +1 -1
- package/dist/types/components/slider/constants.d.ts +3 -0
- package/dist/types/components/slider/index.d.ts +1 -0
- package/dist/types/components/slider/slider-context.d.ts +1 -1
- package/dist/types/components/slider/slider-mark.d.ts +1 -1
- package/dist/types/components/slider/slider-track.d.ts +1 -1
- package/dist/types/components/slider/slider-utils.d.ts +27 -0
- package/dist/types/components/status-elements/status-elements.d.ts +2 -2
- package/dist/types/components/tab-control/tab-control.d.ts +2 -2
- package/dist/types/components/table/grid-loading-line.d.ts +1 -1
- package/dist/types/components/table/table-loader.d.ts +1 -1
- package/dist/types/components/table/table-sm.d.ts +2 -2
- package/dist/types/components/theme-provider.d.ts +1 -1
- package/dist/types/components/token-icon/token-icon.d.ts +1 -2
- package/dist/types/components/token-symbol/token-symbol.d.ts +1 -1
- package/dist/types/components/token-template/token-template.d.ts +1 -1
- package/dist/types/components/tooltip/simple-tooltip.d.ts +1 -1
- package/dist/types/components/trading-view/trading-view.d.ts +26 -8
- package/dist/types/components/typed-intl/index.d.ts +1 -1
- package/dist/types/components/with-title/with-title.d.ts +1 -1
- package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +30 -10
- package/dist/types/configs/tailwind-preset.d.ts +12 -0
- package/dist/types/hooks/index.d.ts +1 -1
- package/dist/types/hooks/use-observed-width-key.d.ts +8 -0
- package/dist/types/index.d.ts +8 -3
- package/dist/types/locale/en.json.d.ts +64 -47
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/utils/format-money.d.ts +11 -5
- package/dist/types/utils/index.d.ts +3 -2
- package/dist/types/utils/leverage-presets.d.ts +7 -0
- package/dist/types/utils/network-icons.d.ts +1 -1
- package/dist/types/utils/token-icon-source.d.ts +25 -1
- package/package.json +23 -23
- package/src/styles/base.css +30 -0
- package/src/styles/theme.css +16 -0
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +0 -1
- package/dist/cjs/components/block-sync-pill/block-sync-status.cjs +0 -1
- package/dist/cjs/components/block-sync-pill/index.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.cjs +0 -1
- package/dist/cjs/hooks/use-hf.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/index.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17/node_modules/tailwind-scrollbar/src/utilities.cjs +0 -1
- package/dist/cjs/node_modules/.pnpm/tailwindcss@4.1.17/node_modules/tailwindcss/dist/flatten-color-palette.cjs +0 -3
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +0 -207
- package/dist/esm/components/block-sync-pill/block-sync-status.js +0 -12
- package/dist/esm/components/block-sync-pill/index.js +0 -4
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +0 -177
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +0 -54
- package/dist/esm/hooks/use-hf.js +0 -43
- package/dist/esm/node_modules/.pnpm/tailwindcss@4.1.17/node_modules/tailwindcss/dist/flatten-color-palette.js +0 -363
- package/dist/types/components/block-sync-pill/block-sync-pill.d.ts +0 -35
- package/dist/types/components/block-sync-pill/block-sync-status.d.ts +0 -29
- package/dist/types/components/block-sync-pill/index.d.ts +0 -1
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.d.ts +0 -17
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts +0 -16
- package/dist/types/hooks/use-hf.d.ts +0 -17
- package/dist/types/types/footer.d.ts +0 -51
- /package/dist/cjs/{types/footer.cjs → components/base-table/types.cjs} +0 -0
- /package/dist/cjs/node_modules/.pnpm/{tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17 → tailwind-scrollbar@4.0.2_react@19.2.8_tailwindcss@4.3.3}/node_modules/tailwind-scrollbar/src/helpers.cjs +0 -0
- /package/dist/cjs/node_modules/.pnpm/{tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17 → tailwind-scrollbar@4.0.2_react@19.2.8_tailwindcss@4.3.3}/node_modules/tailwind-scrollbar/src/variants.cjs +0 -0
- /package/dist/cjs/node_modules/.pnpm/{tailwindcss@4.1.17 → tailwindcss@4.3.3}/node_modules/tailwindcss/dist/plugin.cjs +0 -0
- /package/dist/esm/{types/footer.js → components/base-table/types.js} +0 -0
- /package/dist/esm/node_modules/.pnpm/{tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17 → tailwind-scrollbar@4.0.2_react@19.2.8_tailwindcss@4.3.3}/node_modules/tailwind-scrollbar/src/helpers.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{tailwind-scrollbar@4.0.2_react@19.2.0_tailwindcss@4.1.17 → tailwind-scrollbar@4.0.2_react@19.2.8_tailwindcss@4.3.3}/node_modules/tailwind-scrollbar/src/variants.js +0 -0
- /package/dist/esm/node_modules/.pnpm/{tailwindcss@4.1.17 → tailwindcss@4.3.3}/node_modules/tailwindcss/dist/plugin.js +0 -0
|
@@ -1,99 +1,111 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createChart as
|
|
3
|
-
import * as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { useIsMobile as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { resolveCSSColor as
|
|
8
|
-
import { getDefaultOptions as
|
|
9
|
-
import { getXFormatters as
|
|
10
|
-
import { GraphCurrentValue as
|
|
11
|
-
import { GraphTooltip as
|
|
12
|
-
import { VertLine as
|
|
13
|
-
|
|
1
|
+
import { jsxs as te, jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { createChart as ht, CrosshairMode as dt, LineStyle as le, LineSeries as mt, AreaSeries as gt } from "lightweight-charts";
|
|
3
|
+
import * as Ve from "react";
|
|
4
|
+
import { useRef as K, useState as ne, useEffect as G, useLayoutEffect as pt } from "react";
|
|
5
|
+
import { useIsMobile as bt } from "../../hooks/use-media-query.js";
|
|
6
|
+
import { cn as Z } from "../../utils/cn.js";
|
|
7
|
+
import { resolveCSSColor as ie, generateColorsFromBase as Ce, hslToHex as St } from "../../utils/colors.js";
|
|
8
|
+
import { getDefaultOptions as Je, getDefaultSeries as vt, AXIS_TICK_MARK_DENSITY as ve, getDefaultVerticalLine as Ct, AXIS_FONT_SIZE as xt, AXIS_EDGE_LABEL_PADDING_PX as Qe, AXIS_TOP_LABEL_PADDING_PX as Ye, AXIS_TIME_EDGE_PADDING_PX as yt } from "./default-config.js";
|
|
9
|
+
import { getXFormatters as Ue, formatExactValue as Le, isRatioUnit as _t, createAdaptiveYAxisFormatter as wt } from "./formatters.js";
|
|
10
|
+
import { GraphCurrentValue as Pt } from "./graph-current-value.js";
|
|
11
|
+
import { GraphTooltip as Nt } from "./graph-tooltip.js";
|
|
12
|
+
import { VertLine as Rt } from "./plugins/vertical-line.js";
|
|
13
|
+
import { pickMinMove as Tt, niceAxisRange as Vt } from "./y-axis-scale.js";
|
|
14
|
+
function ae(e) {
|
|
15
|
+
return e.id ?? e.label;
|
|
16
|
+
}
|
|
17
|
+
function et(e, i, c) {
|
|
18
|
+
if (!c)
|
|
19
|
+
return e.values().next().value;
|
|
20
|
+
const u = e.get(c);
|
|
21
|
+
if (u) return u;
|
|
22
|
+
const h = i.find((f) => f.id === c || f.label === c);
|
|
23
|
+
return h ? e.get(ae(h)) : void 0;
|
|
24
|
+
}
|
|
25
|
+
class Lt {
|
|
14
26
|
_yTop;
|
|
15
27
|
_yBottom;
|
|
16
28
|
_color;
|
|
17
|
-
constructor(
|
|
18
|
-
this._yTop =
|
|
29
|
+
constructor(i, c, u) {
|
|
30
|
+
this._yTop = i, this._yBottom = c, this._color = u;
|
|
19
31
|
}
|
|
20
|
-
draw(
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
32
|
+
draw(i) {
|
|
33
|
+
i.useBitmapCoordinateSpace((c) => {
|
|
34
|
+
const u = c.context, h = c.verticalPixelRatio, f = this._yTop === null ? 0 : this._yTop * h, S = this._yBottom === null ? c.bitmapSize.height : this._yBottom * h, P = Math.min(f, S), I = Math.max(f, S);
|
|
35
|
+
u.fillStyle = this._color, u.fillRect(0, P, c.bitmapSize.width, I - P);
|
|
24
36
|
});
|
|
25
37
|
}
|
|
26
38
|
}
|
|
27
|
-
class
|
|
39
|
+
class Mt {
|
|
28
40
|
_source;
|
|
29
41
|
_yTop = null;
|
|
30
42
|
_yBottom = null;
|
|
31
|
-
constructor(
|
|
32
|
-
this._source =
|
|
43
|
+
constructor(i) {
|
|
44
|
+
this._source = i;
|
|
33
45
|
}
|
|
34
46
|
update() {
|
|
35
|
-
const
|
|
36
|
-
this._yTop = this._source.priceTop === void 0 ? null :
|
|
47
|
+
const i = this._source.series;
|
|
48
|
+
this._yTop = this._source.priceTop === void 0 ? null : i.priceToCoordinate(this._source.priceTop), this._yBottom = this._source.priceBottom === void 0 ? null : i.priceToCoordinate(this._source.priceBottom);
|
|
37
49
|
}
|
|
38
50
|
/** Draw beneath the series line/area so the data stays readable. */
|
|
39
51
|
zOrder() {
|
|
40
52
|
return "bottom";
|
|
41
53
|
}
|
|
42
54
|
renderer() {
|
|
43
|
-
return new
|
|
55
|
+
return new Lt(this._yTop, this._yBottom, this._source.color);
|
|
44
56
|
}
|
|
45
57
|
}
|
|
46
|
-
class
|
|
58
|
+
class kt {
|
|
47
59
|
series;
|
|
48
60
|
priceTop;
|
|
49
61
|
priceBottom;
|
|
50
62
|
color;
|
|
51
63
|
_paneViews;
|
|
52
|
-
constructor(
|
|
53
|
-
this.series =
|
|
64
|
+
constructor(i, c, u, h) {
|
|
65
|
+
this.series = i, this.priceTop = c, this.priceBottom = u, this.color = h, this._paneViews = [new Mt(this)];
|
|
54
66
|
}
|
|
55
67
|
updateAllViews() {
|
|
56
|
-
for (const
|
|
68
|
+
for (const i of this._paneViews) i.update();
|
|
57
69
|
}
|
|
58
70
|
paneViews() {
|
|
59
71
|
return this._paneViews;
|
|
60
72
|
}
|
|
61
73
|
}
|
|
62
|
-
function
|
|
74
|
+
function It(e, i) {
|
|
63
75
|
switch (e) {
|
|
64
|
-
case
|
|
65
|
-
return [
|
|
66
|
-
case
|
|
67
|
-
return [2 *
|
|
68
|
-
case
|
|
69
|
-
return [6 *
|
|
70
|
-
case
|
|
71
|
-
return [
|
|
76
|
+
case le.Dotted:
|
|
77
|
+
return [i, i];
|
|
78
|
+
case le.Dashed:
|
|
79
|
+
return [2 * i, 2 * i];
|
|
80
|
+
case le.LargeDashed:
|
|
81
|
+
return [6 * i, 6 * i];
|
|
82
|
+
case le.SparseDotted:
|
|
83
|
+
return [i, 4 * i];
|
|
72
84
|
default:
|
|
73
85
|
return [];
|
|
74
86
|
}
|
|
75
87
|
}
|
|
76
|
-
class
|
|
88
|
+
class Dt {
|
|
77
89
|
_y;
|
|
78
90
|
_color;
|
|
79
91
|
_lineWidth;
|
|
80
92
|
_lineStyle;
|
|
81
|
-
constructor(
|
|
82
|
-
this._y =
|
|
93
|
+
constructor(i, c, u, h) {
|
|
94
|
+
this._y = i, this._color = c, this._lineWidth = u, this._lineStyle = h;
|
|
83
95
|
}
|
|
84
|
-
draw(
|
|
85
|
-
|
|
96
|
+
draw(i) {
|
|
97
|
+
i.useBitmapCoordinateSpace((c) => {
|
|
86
98
|
if (this._y === null) return;
|
|
87
|
-
const
|
|
88
|
-
|
|
99
|
+
const u = c.context, h = c.verticalPixelRatio, f = Math.max(1, Math.round(this._lineWidth * h)), S = Math.round(this._y * h);
|
|
100
|
+
u.save(), u.strokeStyle = this._color, u.lineWidth = f, u.setLineDash(It(this._lineStyle, f)), u.beginPath(), u.moveTo(0, S), u.lineTo(c.bitmapSize.width, S), u.stroke(), u.restore();
|
|
89
101
|
});
|
|
90
102
|
}
|
|
91
103
|
}
|
|
92
|
-
class
|
|
104
|
+
class Et {
|
|
93
105
|
_source;
|
|
94
106
|
_y = null;
|
|
95
|
-
constructor(
|
|
96
|
-
this._source =
|
|
107
|
+
constructor(i) {
|
|
108
|
+
this._source = i;
|
|
97
109
|
}
|
|
98
110
|
update() {
|
|
99
111
|
this._y = this._source.series.priceToCoordinate(this._source.price);
|
|
@@ -108,7 +120,7 @@ class Nt {
|
|
|
108
120
|
return "top";
|
|
109
121
|
}
|
|
110
122
|
renderer() {
|
|
111
|
-
return new
|
|
123
|
+
return new Dt(
|
|
112
124
|
this._y,
|
|
113
125
|
this._source.color,
|
|
114
126
|
this._source.lineWidth,
|
|
@@ -116,46 +128,46 @@ class Nt {
|
|
|
116
128
|
);
|
|
117
129
|
}
|
|
118
130
|
}
|
|
119
|
-
class
|
|
131
|
+
class Bt {
|
|
120
132
|
series;
|
|
121
133
|
price;
|
|
122
134
|
color;
|
|
123
135
|
lineWidth;
|
|
124
136
|
lineStyle;
|
|
125
137
|
_paneViews;
|
|
126
|
-
constructor(
|
|
127
|
-
this.series =
|
|
138
|
+
constructor(i, c, u, h, f) {
|
|
139
|
+
this.series = i, this.price = c, this.color = u, this.lineWidth = h, this.lineStyle = f, this._paneViews = [new Et(this)];
|
|
128
140
|
}
|
|
129
141
|
updateAllViews() {
|
|
130
|
-
for (const
|
|
142
|
+
for (const i of this._paneViews) i.update();
|
|
131
143
|
}
|
|
132
144
|
paneViews() {
|
|
133
145
|
return this._paneViews;
|
|
134
146
|
}
|
|
135
147
|
}
|
|
136
|
-
function
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
) : String(
|
|
142
|
-
return { labelText:
|
|
148
|
+
function Ft(e, i, c) {
|
|
149
|
+
const u = e.labelText ?? "", h = e.value, f = h === void 0 ? "" : typeof h == "number" ? i === "$" ? `$${Le(h, void 0, c)}` : i === "%" ? `${Le(h, void 0, c)}%` : Le(
|
|
150
|
+
h,
|
|
151
|
+
i !== "none" && i !== "%" && i !== "$" && !_t(i) ? i : void 0,
|
|
152
|
+
c
|
|
153
|
+
) : String(h);
|
|
154
|
+
return { labelText: u, valueStr: f };
|
|
143
155
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
return
|
|
149
|
-
const
|
|
150
|
-
return
|
|
156
|
+
const tt = 4;
|
|
157
|
+
function zt(e, i, c) {
|
|
158
|
+
const u = { left: e, transform: "translateX(-50%)" };
|
|
159
|
+
if (i <= 0 || !c || c <= 0)
|
|
160
|
+
return u;
|
|
161
|
+
const h = c / 2, f = tt + h, S = i - tt - h;
|
|
162
|
+
return S < f ? { left: i / 2, transform: "translateX(-50%)" } : { left: Math.min(Math.max(e, f), S), transform: "translateX(-50%)" };
|
|
151
163
|
}
|
|
152
|
-
function
|
|
153
|
-
for (let
|
|
154
|
-
if (Number(e[
|
|
155
|
-
return e[
|
|
164
|
+
function At(e, i) {
|
|
165
|
+
for (let c = e.length - 1; c >= 0; c--)
|
|
166
|
+
if (Number(e[c].time) <= i)
|
|
167
|
+
return e[c].value;
|
|
156
168
|
return 0;
|
|
157
169
|
}
|
|
158
|
-
const
|
|
170
|
+
const Me = [
|
|
159
171
|
// 0 green (emerald)
|
|
160
172
|
{
|
|
161
173
|
line: "#02c39a",
|
|
@@ -270,110 +282,105 @@ const _e = [
|
|
|
270
282
|
top: "rgba(71, 85, 105, 0.56)",
|
|
271
283
|
bottom: "rgba(71, 85, 105, 0.04)"
|
|
272
284
|
}
|
|
273
|
-
],
|
|
274
|
-
function
|
|
275
|
-
if (e <
|
|
276
|
-
return
|
|
277
|
-
const
|
|
278
|
-
return { line:
|
|
285
|
+
], Gt = 137.5;
|
|
286
|
+
function ot(e) {
|
|
287
|
+
if (e < Me.length)
|
|
288
|
+
return Me[e];
|
|
289
|
+
const c = (e - Me.length) * Gt % 360, u = St(c, 70, 50), { topColor: h, bottomColor: f } = Ce(u);
|
|
290
|
+
return { line: u, top: h, bottom: f };
|
|
279
291
|
}
|
|
280
|
-
function
|
|
292
|
+
function oo({
|
|
281
293
|
series: e,
|
|
282
|
-
className:
|
|
283
|
-
showLegend:
|
|
284
|
-
onUnselectSeries:
|
|
285
|
-
xMeasureUnit:
|
|
286
|
-
yMeasureUnit:
|
|
287
|
-
optionsOverrides:
|
|
288
|
-
verticalLineOptions:
|
|
289
|
-
priceLineOptions:
|
|
290
|
-
zoneOptions:
|
|
291
|
-
currentValueDecimals:
|
|
292
|
-
useSharedPriceScale:
|
|
293
|
-
dualYAxis:
|
|
294
|
-
defaultVisiblePriceScaleId:
|
|
295
|
-
leftPriceScaleTitle:
|
|
296
|
-
rightPriceScaleTitle:
|
|
297
|
-
showCurrentValue:
|
|
298
|
-
graphTitle:
|
|
299
|
-
yScaleMin:
|
|
300
|
-
yScaleMinMultiple:
|
|
301
|
-
visibleTimeFrom:
|
|
302
|
-
disableZoom:
|
|
303
|
-
hideDefaultTooltip:
|
|
294
|
+
className: i,
|
|
295
|
+
showLegend: c = !1,
|
|
296
|
+
onUnselectSeries: u,
|
|
297
|
+
xMeasureUnit: h = "time",
|
|
298
|
+
yMeasureUnit: f = "token",
|
|
299
|
+
optionsOverrides: S,
|
|
300
|
+
verticalLineOptions: P,
|
|
301
|
+
priceLineOptions: I,
|
|
302
|
+
zoneOptions: F,
|
|
303
|
+
currentValueDecimals: se,
|
|
304
|
+
useSharedPriceScale: q = !1,
|
|
305
|
+
dualYAxis: D = !1,
|
|
306
|
+
defaultVisiblePriceScaleId: ke = "right",
|
|
307
|
+
leftPriceScaleTitle: Ie,
|
|
308
|
+
rightPriceScaleTitle: Xt,
|
|
309
|
+
showCurrentValue: rt = !0,
|
|
310
|
+
graphTitle: xe,
|
|
311
|
+
yScaleMin: De,
|
|
312
|
+
yScaleMinMultiple: Ee,
|
|
313
|
+
visibleTimeFrom: Y,
|
|
314
|
+
disableZoom: Be = !1,
|
|
315
|
+
hideDefaultTooltip: ye = !1
|
|
304
316
|
}) {
|
|
305
|
-
const
|
|
317
|
+
const E = K(null), L = K(/* @__PURE__ */ new Map()), _e = K(!1), Fe = K(!0), ze = K([]), ce = K(0), B = K(null), we = K(null), Ae = K(null), N = bt(), ue = Ve.useMemo(() => e.flatMap((t) => t.data), [e]), nt = Ve.useMemo(() => {
|
|
306
318
|
if (e.length > 0) {
|
|
307
319
|
const t = e[e.length - 1];
|
|
308
320
|
if (t.data.length > 0)
|
|
309
321
|
return t.data[t.data.length - 1];
|
|
310
322
|
}
|
|
311
|
-
}, [e]), [
|
|
312
|
-
if (!
|
|
323
|
+
}, [e]), [Ge, Pe] = ne(() => {
|
|
324
|
+
if (!nt) return;
|
|
313
325
|
const t = /* @__PURE__ */ new Map();
|
|
314
|
-
for (const
|
|
315
|
-
|
|
326
|
+
for (const l of e)
|
|
327
|
+
l.data.length > 0 && t.set(l.label, l.data[l.data.length - 1]);
|
|
316
328
|
return t;
|
|
317
|
-
}), [
|
|
329
|
+
}), [We, J] = ne(null), [Xe, $e] = ne([]), [it, He] = ne(0), je = K(/* @__PURE__ */ new Map()), [at, lt] = ne({}), [U, st] = ne(0);
|
|
318
330
|
G(() => {
|
|
319
331
|
const t = () => {
|
|
320
332
|
try {
|
|
321
|
-
if (B.current &&
|
|
322
|
-
const
|
|
323
|
-
|
|
333
|
+
if (B.current && He(B.current.clientWidth), E.current && B.current) {
|
|
334
|
+
const a = B.current.clientWidth, s = B.current.clientHeight;
|
|
335
|
+
E.current.resize(a, s);
|
|
336
|
+
try {
|
|
337
|
+
ce.current = E.current.paneSize().height;
|
|
338
|
+
} catch {
|
|
339
|
+
}
|
|
324
340
|
}
|
|
325
341
|
} catch {
|
|
326
342
|
}
|
|
327
|
-
},
|
|
328
|
-
return
|
|
329
|
-
|
|
343
|
+
}, l = B.current, n = l ? new ResizeObserver(t) : null;
|
|
344
|
+
return Ae.current = n, l && n?.observe(l), () => {
|
|
345
|
+
l && n?.unobserve(l), n?.disconnect(), Ae.current = null;
|
|
330
346
|
};
|
|
331
347
|
}, []), G(() => {
|
|
332
|
-
if (!
|
|
333
|
-
const t =
|
|
334
|
-
"hsl(var(--foreground))",
|
|
335
|
-
"rgb(
|
|
336
|
-
), n =
|
|
337
|
-
handleScale: {
|
|
338
|
-
mouseWheel: !1,
|
|
339
|
-
pinch: !1,
|
|
340
|
-
axisPressedMouseMove: !1,
|
|
341
|
-
axisDoubleClickReset: !1
|
|
342
|
-
},
|
|
343
|
-
handleScroll: {
|
|
344
|
-
mouseWheel: !1,
|
|
345
|
-
pressedMouseMove: !1,
|
|
346
|
-
horzTouchDrag: !1,
|
|
347
|
-
vertTouchDrag: !1
|
|
348
|
-
}
|
|
349
|
-
} : {}, s = it(ge.current, {
|
|
348
|
+
if (!we.current || _e.current) return;
|
|
349
|
+
const t = Je(), l = ie(
|
|
350
|
+
"hsl(var(--muted-foreground))",
|
|
351
|
+
"rgb(163, 163, 163)"
|
|
352
|
+
), n = ht(we.current, {
|
|
350
353
|
...t,
|
|
351
354
|
leftPriceScale: {
|
|
352
355
|
...t.leftPriceScale || {},
|
|
353
356
|
visible: !1,
|
|
354
|
-
textColor:
|
|
357
|
+
textColor: l
|
|
355
358
|
},
|
|
356
359
|
rightPriceScale: {
|
|
357
360
|
...t.rightPriceScale || {},
|
|
358
|
-
visible: !
|
|
359
|
-
textColor:
|
|
361
|
+
visible: !N,
|
|
362
|
+
textColor: l
|
|
360
363
|
},
|
|
361
|
-
...
|
|
364
|
+
...N && {
|
|
362
365
|
crosshair: {
|
|
363
366
|
...t.crosshair,
|
|
364
|
-
mode:
|
|
367
|
+
mode: dt.Magnet
|
|
365
368
|
}
|
|
366
|
-
}
|
|
367
|
-
...n,
|
|
368
|
-
...L
|
|
369
|
+
}
|
|
369
370
|
});
|
|
370
|
-
|
|
371
|
-
|
|
371
|
+
E.current = n, _e.current = !0;
|
|
372
|
+
try {
|
|
373
|
+
ce.current = n.paneSize().height;
|
|
374
|
+
} catch {
|
|
375
|
+
ce.current = 0;
|
|
376
|
+
}
|
|
377
|
+
return st((a) => a + 1), () => {
|
|
378
|
+
n.remove(), E.current = null, _e.current = !1, L.current.clear();
|
|
372
379
|
};
|
|
373
|
-
}, [
|
|
374
|
-
const t =
|
|
380
|
+
}, [N]), G(() => {
|
|
381
|
+
const t = E.current;
|
|
375
382
|
t && t.applyOptions(
|
|
376
|
-
|
|
383
|
+
Be ? {
|
|
377
384
|
handleScale: {
|
|
378
385
|
mouseWheel: !1,
|
|
379
386
|
pinch: !1,
|
|
@@ -401,228 +408,236 @@ function Ot({
|
|
|
401
408
|
}
|
|
402
409
|
}
|
|
403
410
|
);
|
|
404
|
-
}, [
|
|
405
|
-
const t =
|
|
411
|
+
}, [U, Be]), G(() => {
|
|
412
|
+
const t = E.current;
|
|
413
|
+
!t || !S || t.applyOptions(S);
|
|
414
|
+
}, [U, S]), G(() => {
|
|
415
|
+
const t = E.current;
|
|
406
416
|
if (!t || e.length === 0) return;
|
|
407
|
-
const n = e.filter((r) => r.data.length > 0).length <= 1 ?
|
|
417
|
+
const n = e.filter((r) => r.data.length > 0).length <= 1 ? De : Ee, a = h === "time" ? Ue(h, ue) : Ue(h), s = /* @__PURE__ */ new Map();
|
|
408
418
|
{
|
|
409
419
|
let r = 0;
|
|
410
420
|
for (const o of e)
|
|
411
|
-
o.data.length !== 0 && (
|
|
421
|
+
o.data.length !== 0 && (s.set(
|
|
412
422
|
o.label,
|
|
413
423
|
o.priceScaleId ?? (r === 0 ? "left" : "right")
|
|
414
424
|
), r++);
|
|
415
425
|
}
|
|
416
|
-
const
|
|
417
|
-
const {
|
|
418
|
-
formatter: D,
|
|
419
|
-
tickmarksFormatter: T,
|
|
420
|
-
updateVisibleRange: $,
|
|
421
|
-
updateLastValues: We
|
|
422
|
-
} = gt(r, o, {
|
|
426
|
+
const d = (r, o, m) => {
|
|
427
|
+
const { formatter: z, tickmarksFormatter: T, updateVisibleRange: V } = wt(r, o, {
|
|
423
428
|
yScaleMin: n
|
|
424
|
-
})
|
|
425
|
-
return
|
|
426
|
-
},
|
|
427
|
-
if (
|
|
429
|
+
});
|
|
430
|
+
return { formatter: z, tickmarksFormatter: T, updateVisibleRange: V, labels: m };
|
|
431
|
+
}, g = [];
|
|
432
|
+
if (D)
|
|
428
433
|
for (const r of ["left", "right"]) {
|
|
429
434
|
const o = /* @__PURE__ */ new Set(), m = [];
|
|
430
|
-
let
|
|
435
|
+
let z = f;
|
|
431
436
|
for (const T of e)
|
|
432
|
-
if (T.data.length !== 0 &&
|
|
433
|
-
o.size === 0 && T.yMeasureUnit && (
|
|
434
|
-
for (const
|
|
437
|
+
if (T.data.length !== 0 && s.get(T.label) === r) {
|
|
438
|
+
o.size === 0 && T.yMeasureUnit && (z = T.yMeasureUnit), o.add(T.label);
|
|
439
|
+
for (const V of T.data) m.push(V.value);
|
|
435
440
|
}
|
|
436
|
-
o.size > 0 &&
|
|
441
|
+
o.size > 0 && g.push(d(m, z, o));
|
|
437
442
|
}
|
|
438
443
|
else {
|
|
439
|
-
const r =
|
|
444
|
+
const r = ue.map((m) => m.value), o = new Set(
|
|
440
445
|
e.filter((m) => m.data.length > 0).map((m) => m.label)
|
|
441
446
|
);
|
|
442
|
-
|
|
447
|
+
g.push(d(r, f, o));
|
|
443
448
|
}
|
|
444
|
-
|
|
445
|
-
const
|
|
446
|
-
for (const r of
|
|
449
|
+
ze.current = g;
|
|
450
|
+
const x = /* @__PURE__ */ new Map();
|
|
451
|
+
for (const r of g)
|
|
447
452
|
for (const o of r.labels)
|
|
448
|
-
|
|
449
|
-
const
|
|
453
|
+
x.set(o, r);
|
|
454
|
+
const y = Je();
|
|
450
455
|
t.applyOptions({
|
|
451
456
|
localization: {
|
|
452
|
-
...
|
|
457
|
+
...y.localization || {},
|
|
453
458
|
// biome-ignore lint/suspicious/noExplicitAny: External library type compatibility
|
|
454
459
|
timeFormatter: (r) => (
|
|
455
460
|
// biome-ignore lint/suspicious/noExplicitAny: External library type compatibility
|
|
456
|
-
|
|
461
|
+
a.timeFormatter(parseFloat(r), void 0)
|
|
457
462
|
)
|
|
458
463
|
},
|
|
459
464
|
timeScale: {
|
|
460
|
-
...
|
|
465
|
+
...y.timeScale || {},
|
|
466
|
+
...S?.timeScale,
|
|
461
467
|
// biome-ignore lint/suspicious/noExplicitAny: External library type compatibility
|
|
462
|
-
tickMarkFormatter:
|
|
468
|
+
tickMarkFormatter: a.tickMarkFormatter,
|
|
463
469
|
minBarSpacing: 0
|
|
464
470
|
}
|
|
465
471
|
});
|
|
466
|
-
const
|
|
467
|
-
"hsl(var(--foreground))",
|
|
468
|
-
"rgb(
|
|
472
|
+
const v = !D && e.length > 1 && !q, W = D ? N : e.length > 1 && !q || N, M = ie(
|
|
473
|
+
"hsl(var(--muted-foreground))",
|
|
474
|
+
"rgb(163, 163, 163)"
|
|
469
475
|
);
|
|
470
476
|
t.applyOptions({
|
|
471
|
-
...
|
|
472
|
-
defaultVisiblePriceScaleId:
|
|
477
|
+
...D && {
|
|
478
|
+
defaultVisiblePriceScaleId: ke
|
|
473
479
|
},
|
|
474
480
|
leftPriceScale: {
|
|
475
|
-
...
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
481
|
+
...y.leftPriceScale || {},
|
|
482
|
+
...S?.leftPriceScale,
|
|
483
|
+
visible: D && !N,
|
|
484
|
+
textColor: M,
|
|
485
|
+
...D && Ie && {
|
|
479
486
|
// lightweight-charts uses scale margins; title shown via localization if needed
|
|
480
487
|
}
|
|
481
488
|
},
|
|
482
489
|
rightPriceScale: {
|
|
483
|
-
...
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
scaleMargins: {
|
|
488
|
-
top: 0.3,
|
|
489
|
-
bottom: 0
|
|
490
|
-
}
|
|
491
|
-
}
|
|
490
|
+
...y.rightPriceScale || {},
|
|
491
|
+
...S?.rightPriceScale,
|
|
492
|
+
visible: D ? !N : !W,
|
|
493
|
+
textColor: M
|
|
492
494
|
}
|
|
493
495
|
});
|
|
494
|
-
const
|
|
495
|
-
for (const r of
|
|
496
|
-
if (!
|
|
497
|
-
const o =
|
|
498
|
-
o && (t.removeSeries(o),
|
|
496
|
+
const ee = new Set(L.current.keys()), X = new Set(e.map(ae));
|
|
497
|
+
for (const r of ee)
|
|
498
|
+
if (!X.has(r)) {
|
|
499
|
+
const o = L.current.get(r);
|
|
500
|
+
o && (t.removeSeries(o), L.current.delete(r));
|
|
499
501
|
}
|
|
500
|
-
const
|
|
501
|
-
let
|
|
502
|
-
const
|
|
503
|
-
if (
|
|
504
|
-
for (const r of
|
|
502
|
+
const p = vt(), k = [];
|
|
503
|
+
let R = 0;
|
|
504
|
+
const $ = e.find((r) => r.data.length > 0), C = /* @__PURE__ */ new Map();
|
|
505
|
+
if (I && I.length > 0)
|
|
506
|
+
for (const r of I) {
|
|
505
507
|
if (!Number.isFinite(r.price)) continue;
|
|
506
|
-
const o = r.seriesLabel ??
|
|
508
|
+
const o = r.seriesLabel ?? $?.label;
|
|
507
509
|
if (!o) continue;
|
|
508
|
-
const m =
|
|
509
|
-
m.push(r.price),
|
|
510
|
+
const m = C.get(o) ?? [];
|
|
511
|
+
m.push(r.price), C.set(o, m);
|
|
510
512
|
}
|
|
511
|
-
if (
|
|
512
|
-
for (const r of
|
|
513
|
-
const o = r.seriesLabel ??
|
|
513
|
+
if (F && F.length > 0)
|
|
514
|
+
for (const r of F) {
|
|
515
|
+
const o = r.seriesLabel ?? $?.label;
|
|
514
516
|
if (!o) continue;
|
|
515
|
-
const m =
|
|
516
|
-
Number.isFinite(r.priceTop) && m.push(r.priceTop), Number.isFinite(r.priceBottom) && m.push(r.priceBottom),
|
|
517
|
+
const m = C.get(o) ?? [];
|
|
518
|
+
Number.isFinite(r.priceTop) && m.push(r.priceTop), Number.isFinite(r.priceBottom) && m.push(r.priceBottom), C.set(o, m);
|
|
517
519
|
}
|
|
518
520
|
for (let r = 0; r < e.length; r++) {
|
|
519
|
-
const o = e[r], m =
|
|
520
|
-
let
|
|
521
|
+
const o = e[r], m = ae(o), z = ot(r), T = o.lineColor ?? o.color ?? z.line;
|
|
522
|
+
let V, Q;
|
|
521
523
|
if (o.lineColor ?? o.color)
|
|
522
524
|
if (o.topColor && o.bottomColor)
|
|
523
|
-
|
|
525
|
+
V = o.topColor, Q = o.bottomColor;
|
|
524
526
|
else if (o.topColor) {
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
+
const b = Ce(T);
|
|
528
|
+
V = o.topColor, Q = b.bottomColor;
|
|
527
529
|
} else if (o.bottomColor)
|
|
528
|
-
|
|
530
|
+
V = Ce(T).topColor, Q = o.bottomColor;
|
|
529
531
|
else {
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
+
const b = Ce(T);
|
|
533
|
+
V = b.topColor, Q = b.bottomColor;
|
|
532
534
|
}
|
|
533
535
|
else
|
|
534
|
-
|
|
536
|
+
V = o.topColor || z.top, Q = o.bottomColor || z.bottom;
|
|
535
537
|
if (o.data.length === 0) {
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
+
const b = L.current.get(m);
|
|
539
|
+
b && (t.removeSeries(b), L.current.delete(m));
|
|
538
540
|
continue;
|
|
539
541
|
}
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
priceScaleId:
|
|
543
|
-
|
|
544
|
-
seriesIndex: re
|
|
542
|
+
const pe = o.data.length > 0 ? Math.min(...o.data.map((b) => b.value)) : 0, fe = o.data.length > 0 ? Math.max(...o.data.map((b) => b.value)) : 0, he = pe < 0, O = o.data.some((b) => b.value === 0), be = !he && O, de = Tt(fe - pe), me = D ? o.priceScaleId ?? (R === 0 ? "left" : "right") : q || !v || R === 0 ? "right" : `scale-${R}`;
|
|
543
|
+
v && k.push({
|
|
544
|
+
priceScaleId: me || "right",
|
|
545
|
+
seriesIndex: R
|
|
545
546
|
});
|
|
546
|
-
const
|
|
547
|
-
const
|
|
548
|
-
if (
|
|
549
|
-
|
|
550
|
-
for (const
|
|
551
|
-
|
|
547
|
+
const Ne = (q || !v) && n !== void 0 && typeof n == "number", ct = C.get(o.label) ?? [], ut = (b) => {
|
|
548
|
+
const _ = b();
|
|
549
|
+
if (_?.priceRange) {
|
|
550
|
+
Ne && (_.priceRange.minValue = n);
|
|
551
|
+
for (const j of ct)
|
|
552
|
+
j < _.priceRange.minValue && (_.priceRange.minValue = j), j > _.priceRange.maxValue && (_.priceRange.maxValue = j);
|
|
553
|
+
const re = Ne ? n : be && _.priceRange.minValue >= 0 ? 0 : void 0, Se = ce.current > 0 ? ce.current : B.current?.clientHeight ?? 0;
|
|
554
|
+
if (Se > 0) {
|
|
555
|
+
const j = Vt({
|
|
556
|
+
min: _.priceRange.minValue,
|
|
557
|
+
max: _.priceRange.maxValue,
|
|
558
|
+
floor: re,
|
|
559
|
+
scaleHeightPx: Se,
|
|
560
|
+
fontSizePx: xt,
|
|
561
|
+
tickMarkDensity: ve,
|
|
562
|
+
minMove: de,
|
|
563
|
+
edgePaddingPx: Qe,
|
|
564
|
+
edgePaddingTopPx: Ye
|
|
565
|
+
});
|
|
566
|
+
_.priceRange.minValue = j.min, _.priceRange.maxValue = j.max;
|
|
567
|
+
}
|
|
568
|
+
_.margins = {
|
|
569
|
+
above: Ye,
|
|
570
|
+
below: Qe
|
|
571
|
+
};
|
|
552
572
|
}
|
|
553
|
-
return
|
|
554
|
-
},
|
|
555
|
-
lineColor:
|
|
556
|
-
topColor:
|
|
557
|
-
bottomColor:
|
|
558
|
-
priceScaleId:
|
|
573
|
+
return _;
|
|
574
|
+
}, Ze = x.get(o.label) ?? g[0], qe = Ze.formatter, ft = Ze.tickmarksFormatter, Re = {
|
|
575
|
+
lineColor: T,
|
|
576
|
+
topColor: V,
|
|
577
|
+
bottomColor: Q,
|
|
578
|
+
priceScaleId: me,
|
|
559
579
|
...o.seriesType === "line" && {
|
|
560
|
-
lineStyle: o.lineStyle ??
|
|
580
|
+
lineStyle: o.lineStyle ?? le.Solid
|
|
561
581
|
},
|
|
562
582
|
priceFormat: {
|
|
563
583
|
type: "custom",
|
|
564
|
-
minMove:
|
|
565
|
-
formatter:
|
|
566
|
-
|
|
567
|
-
) :
|
|
568
|
-
tickmarksFormatter:
|
|
584
|
+
minMove: de,
|
|
585
|
+
formatter: Ne && typeof n == "number" ? (b) => qe(
|
|
586
|
+
b < n ? n : b
|
|
587
|
+
) : qe,
|
|
588
|
+
tickmarksFormatter: ft
|
|
569
589
|
},
|
|
570
|
-
autoscaleInfoProvider:
|
|
571
|
-
},
|
|
572
|
-
let
|
|
573
|
-
const
|
|
574
|
-
...
|
|
575
|
-
time:
|
|
590
|
+
autoscaleInfoProvider: ut
|
|
591
|
+
}, Oe = o.seriesType === "line";
|
|
592
|
+
let A = L.current.get(m);
|
|
593
|
+
const oe = o.data.map((b) => ({
|
|
594
|
+
...b,
|
|
595
|
+
time: b.time
|
|
576
596
|
}));
|
|
577
|
-
if (
|
|
578
|
-
const
|
|
579
|
-
for (let
|
|
580
|
-
|
|
581
|
-
|
|
597
|
+
if (Y !== void 0 && oe.length > 0 && Number(oe[0].time) > Y) {
|
|
598
|
+
const b = Number(oe[0].time), _ = b - Y, re = 86400, Se = _ > 180 * re ? 7 * re : _ > 30 * re ? re : 6 * 3600, j = [];
|
|
599
|
+
for (let Te = Y; Te < b; Te += Se)
|
|
600
|
+
j.push({ time: Te });
|
|
601
|
+
oe.unshift(...j);
|
|
582
602
|
}
|
|
583
|
-
|
|
584
|
-
...
|
|
585
|
-
...
|
|
586
|
-
}) :
|
|
587
|
-
...
|
|
588
|
-
...
|
|
589
|
-
}),
|
|
603
|
+
A && A.seriesType() !== (Oe ? "Line" : "Area") && (t.removeSeries(A), L.current.delete(m), A = void 0), A ? (A.applyOptions(Re), A.setData(oe)) : (Oe ? A = t.addSeries(mt, {
|
|
604
|
+
...p,
|
|
605
|
+
...Re
|
|
606
|
+
}) : A = t.addSeries(gt, {
|
|
607
|
+
...p,
|
|
608
|
+
...Re
|
|
609
|
+
}), A.setData(oe), L.current.set(m, A)), R++;
|
|
590
610
|
}
|
|
591
|
-
if (
|
|
611
|
+
if (D)
|
|
592
612
|
try {
|
|
593
613
|
const r = t.priceScale("left"), o = t.priceScale("right"), m = {
|
|
594
|
-
visible: !
|
|
614
|
+
visible: !N,
|
|
595
615
|
autoScale: !0,
|
|
596
|
-
scaleMargins: { top: 0
|
|
616
|
+
scaleMargins: { top: 0, bottom: 0 },
|
|
597
617
|
alignLabels: !0,
|
|
598
|
-
borderVisible: !0,
|
|
599
|
-
borderColor: "rgba(224, 227, 235, 0.1)",
|
|
600
618
|
entireTextOnly: !1,
|
|
601
|
-
|
|
619
|
+
tickMarkDensity: ve,
|
|
620
|
+
textColor: M,
|
|
621
|
+
...S?.rightPriceScale
|
|
602
622
|
};
|
|
603
623
|
r?.applyOptions(m), o?.applyOptions(m);
|
|
604
624
|
} catch {
|
|
605
625
|
}
|
|
606
|
-
else if (
|
|
607
|
-
for (const r of
|
|
626
|
+
else if (v && k.length > 0)
|
|
627
|
+
for (const r of k)
|
|
608
628
|
try {
|
|
609
629
|
const o = t.priceScale(r.priceScaleId);
|
|
610
630
|
o && o.applyOptions({
|
|
611
631
|
visible: !1,
|
|
612
632
|
autoScale: !0,
|
|
613
633
|
scaleMargins: {
|
|
614
|
-
top: 0
|
|
615
|
-
bottom: 0
|
|
616
|
-
...r.shouldPreventNegativeAxis && {
|
|
617
|
-
top: 0.3,
|
|
618
|
-
bottom: 0
|
|
619
|
-
}
|
|
634
|
+
top: 0,
|
|
635
|
+
bottom: 0
|
|
620
636
|
},
|
|
621
637
|
alignLabels: !0,
|
|
622
|
-
borderVisible: !0,
|
|
623
|
-
borderColor: "rgba(224, 227, 235, 0.1)",
|
|
624
638
|
entireTextOnly: !1,
|
|
625
|
-
|
|
639
|
+
tickMarkDensity: ve,
|
|
640
|
+
textColor: M
|
|
626
641
|
});
|
|
627
642
|
} catch (o) {
|
|
628
643
|
console.warn(
|
|
@@ -630,372 +645,403 @@ function Ot({
|
|
|
630
645
|
o
|
|
631
646
|
);
|
|
632
647
|
}
|
|
633
|
-
else if (!
|
|
648
|
+
else if (!v)
|
|
634
649
|
try {
|
|
635
650
|
const r = t.priceScale("right");
|
|
636
651
|
r && r.applyOptions({
|
|
637
|
-
visible: !
|
|
652
|
+
visible: !N,
|
|
638
653
|
autoScale: !0,
|
|
639
654
|
scaleMargins: {
|
|
640
|
-
top: 0
|
|
641
|
-
|
|
642
|
-
bottom: n !== void 0 || p ? 0 : 0.1,
|
|
643
|
-
...p && {
|
|
644
|
-
top: 0.3
|
|
645
|
-
}
|
|
655
|
+
top: 0,
|
|
656
|
+
bottom: 0
|
|
646
657
|
},
|
|
647
658
|
alignLabels: !0,
|
|
648
|
-
borderVisible: !0,
|
|
649
|
-
borderColor: "rgba(224, 227, 235, 0.1)",
|
|
650
659
|
entireTextOnly: !1,
|
|
651
|
-
|
|
660
|
+
tickMarkDensity: ve,
|
|
661
|
+
textColor: M,
|
|
662
|
+
...S?.rightPriceScale
|
|
652
663
|
});
|
|
653
664
|
} catch {
|
|
654
665
|
}
|
|
655
|
-
if (n !== void 0 && !
|
|
666
|
+
if (n !== void 0 && !N && (q || !v) && t.applyOptions({
|
|
656
667
|
handleScroll: {
|
|
657
668
|
vertTouchDrag: !1
|
|
658
669
|
}
|
|
659
|
-
}),
|
|
660
|
-
const r =
|
|
670
|
+
}), ue.length > 0) {
|
|
671
|
+
const r = ue.map((o) => Number(o.time)).filter((o) => Number.isFinite(o));
|
|
661
672
|
if (r.length > 0) {
|
|
662
|
-
const o = Math.min(...r), m =
|
|
663
|
-
if (Number(m) <= Number(
|
|
673
|
+
const o = Math.min(...r), m = Y !== void 0 ? Math.min(Y, o) : o, z = Math.max(...r);
|
|
674
|
+
if (Number(m) <= Number(z)) {
|
|
675
|
+
const T = () => {
|
|
676
|
+
const V = t.timeScale();
|
|
677
|
+
if (h !== "time") {
|
|
678
|
+
V.applyOptions({
|
|
679
|
+
fixLeftEdge: !0,
|
|
680
|
+
fixRightEdge: !0
|
|
681
|
+
});
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
const Q = D && !N, pe = D ? !N : !W, fe = !Q, he = !pe;
|
|
685
|
+
if (V.applyOptions({
|
|
686
|
+
fixLeftEdge: !fe,
|
|
687
|
+
fixRightEdge: !he
|
|
688
|
+
}), !fe && !he) return;
|
|
689
|
+
const O = V.getVisibleLogicalRange(), be = V.width();
|
|
690
|
+
if (!O || !(be > 0)) return;
|
|
691
|
+
const de = O.to - O.from;
|
|
692
|
+
if (!(de > 0)) return;
|
|
693
|
+
const me = yt * de / be;
|
|
694
|
+
V.setVisibleLogicalRange({
|
|
695
|
+
from: fe ? O.from - me : O.from,
|
|
696
|
+
to: he ? O.to + me : O.to
|
|
697
|
+
});
|
|
698
|
+
};
|
|
664
699
|
try {
|
|
665
|
-
t.timeScale().setVisibleRange({ from: m, to:
|
|
700
|
+
t.timeScale().setVisibleRange({ from: m, to: z }), T();
|
|
666
701
|
} catch {
|
|
667
702
|
try {
|
|
668
|
-
t.timeScale().fitContent();
|
|
703
|
+
t.timeScale().fitContent(), T();
|
|
669
704
|
} catch {
|
|
670
705
|
}
|
|
671
706
|
}
|
|
707
|
+
}
|
|
672
708
|
}
|
|
673
709
|
}
|
|
674
|
-
|
|
675
|
-
const
|
|
710
|
+
Fe.current && (Fe.current = !1), S && t.applyOptions(S);
|
|
711
|
+
const H = /* @__PURE__ */ new Map();
|
|
676
712
|
for (const r of e)
|
|
677
|
-
r.data.length > 0 &&
|
|
678
|
-
|
|
713
|
+
r.data.length > 0 && H.set(r.label, r.data[r.data.length - 1]);
|
|
714
|
+
Pe(H.size > 0 ? H : void 0);
|
|
679
715
|
}, [
|
|
716
|
+
U,
|
|
680
717
|
e,
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
718
|
+
ue,
|
|
719
|
+
h,
|
|
720
|
+
f,
|
|
721
|
+
N,
|
|
722
|
+
q,
|
|
723
|
+
D,
|
|
724
|
+
ke,
|
|
725
|
+
Ie,
|
|
726
|
+
De,
|
|
727
|
+
Ee,
|
|
728
|
+
Y,
|
|
686
729
|
I,
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
Ve,
|
|
690
|
-
Pe,
|
|
691
|
-
K,
|
|
692
|
-
R,
|
|
693
|
-
E
|
|
730
|
+
F,
|
|
731
|
+
S
|
|
694
732
|
]), G(() => {
|
|
695
|
-
const t =
|
|
733
|
+
const t = E.current;
|
|
696
734
|
if (!t || e.length === 0) return;
|
|
697
|
-
const
|
|
735
|
+
const l = e.length === 1;
|
|
698
736
|
let n;
|
|
699
|
-
for (const
|
|
700
|
-
if (
|
|
701
|
-
n =
|
|
737
|
+
for (const s of e)
|
|
738
|
+
if (s.data.length > 0) {
|
|
739
|
+
n = s.data[s.data.length - 1].time;
|
|
702
740
|
break;
|
|
703
741
|
}
|
|
704
742
|
if (!n) return;
|
|
705
|
-
const
|
|
706
|
-
const { time:
|
|
707
|
-
if (!
|
|
708
|
-
const
|
|
743
|
+
const a = (s) => {
|
|
744
|
+
const { time: d = n, seriesData: g, point: x } = s || {}, y = e[0], v = y ? L.current.get(ae(y)) : void 0;
|
|
745
|
+
if (!x || !d) {
|
|
746
|
+
const X = /* @__PURE__ */ new Map();
|
|
709
747
|
for (const p of e)
|
|
710
|
-
p.data.length > 0 &&
|
|
711
|
-
if (
|
|
712
|
-
|
|
713
|
-
else if (
|
|
714
|
-
const
|
|
715
|
-
if (
|
|
716
|
-
const
|
|
717
|
-
|
|
748
|
+
p.data.length > 0 && X.set(p.label, p.data[p.data.length - 1]);
|
|
749
|
+
if (Pe(X.size > 0 ? X : void 0), l || q || ye)
|
|
750
|
+
J(null);
|
|
751
|
+
else if (v && n) {
|
|
752
|
+
const p = e[0];
|
|
753
|
+
if (p && p.data.length > 0) {
|
|
754
|
+
const R = t.timeScale().timeToCoordinate(n), $ = p.data[p.data.length - 1].value, C = v.priceToCoordinate($);
|
|
755
|
+
R !== null && C !== null && J({ x: R, y: C });
|
|
718
756
|
}
|
|
719
757
|
}
|
|
720
758
|
return;
|
|
721
759
|
}
|
|
722
|
-
const
|
|
723
|
-
let
|
|
724
|
-
for (let
|
|
725
|
-
const p = e[
|
|
726
|
-
if (!
|
|
727
|
-
const
|
|
728
|
-
let
|
|
729
|
-
if (
|
|
730
|
-
|
|
731
|
-
else if (
|
|
732
|
-
const
|
|
733
|
-
|
|
760
|
+
const W = /* @__PURE__ */ new Map();
|
|
761
|
+
let M, ee = v;
|
|
762
|
+
for (let X = 0; X < e.length; X++) {
|
|
763
|
+
const p = e[X], k = L.current.get(ae(p));
|
|
764
|
+
if (!k) continue;
|
|
765
|
+
const R = g?.get(k), $ = R && "value" in R ? R.value : void 0;
|
|
766
|
+
let C;
|
|
767
|
+
if ($ !== void 0)
|
|
768
|
+
C = $;
|
|
769
|
+
else if (l) {
|
|
770
|
+
const H = Number(d), r = p.data.length > 0 ? Number(p.data[0].time) : Number.POSITIVE_INFINITY;
|
|
771
|
+
H < r ? C = Number.NaN : C = p.data[p.data.length - 1]?.value ?? 0;
|
|
734
772
|
} else {
|
|
735
|
-
const
|
|
736
|
-
if (Number(
|
|
737
|
-
|
|
773
|
+
const H = p.data.length > 0 ? Number(p.data[0].time) : Number.POSITIVE_INFINITY;
|
|
774
|
+
if (Number(d) < H) continue;
|
|
775
|
+
C = At(p.data, Number(d));
|
|
738
776
|
}
|
|
739
|
-
Number.isNaN(
|
|
777
|
+
Number.isNaN(C) || (M === void 0 && (M = C, ee = k), W.set(p.label, { value: C, time: d }));
|
|
740
778
|
}
|
|
741
|
-
if (
|
|
742
|
-
const p = t.timeScale().timeToCoordinate(
|
|
743
|
-
if (p !== null &&
|
|
744
|
-
const
|
|
745
|
-
if (
|
|
746
|
-
const
|
|
779
|
+
if (Pe(W), M !== void 0 && ee) {
|
|
780
|
+
const p = t.timeScale().timeToCoordinate(d), k = ee.priceToCoordinate(M);
|
|
781
|
+
if (p !== null && k !== null) {
|
|
782
|
+
const R = B.current;
|
|
783
|
+
if (R) {
|
|
784
|
+
const $ = R.querySelector(
|
|
747
785
|
".LightweightChart"
|
|
748
786
|
);
|
|
749
|
-
if (
|
|
750
|
-
const
|
|
751
|
-
|
|
787
|
+
if ($) {
|
|
788
|
+
const C = $.getBoundingClientRect(), H = R.getBoundingClientRect(), r = p + (C.left - H.left), o = k + (C.top - H.top);
|
|
789
|
+
J({ x: r, y: o });
|
|
752
790
|
} else
|
|
753
|
-
|
|
791
|
+
J({ x: p, y: k });
|
|
754
792
|
} else
|
|
755
|
-
|
|
793
|
+
J({ x: p, y: k });
|
|
756
794
|
} else
|
|
757
|
-
|
|
795
|
+
J(null);
|
|
758
796
|
} else
|
|
759
|
-
|
|
797
|
+
J(null);
|
|
760
798
|
};
|
|
761
|
-
return t.subscribeCrosshairMove(
|
|
762
|
-
const
|
|
763
|
-
if (
|
|
764
|
-
const
|
|
765
|
-
|
|
799
|
+
return t.subscribeCrosshairMove(a), N && t.subscribeClick(a), !l && !q && !ye && requestAnimationFrame(() => {
|
|
800
|
+
const s = e[0], d = s ? L.current.get(ae(s)) : void 0;
|
|
801
|
+
if (d && n && s.data.length > 0) {
|
|
802
|
+
const x = t.timeScale().timeToCoordinate(n), y = s.data[s.data.length - 1].value, v = d.priceToCoordinate(y);
|
|
803
|
+
x !== null && v !== null && J({ x, y: v });
|
|
766
804
|
}
|
|
767
805
|
}), () => {
|
|
768
|
-
t.unsubscribeCrosshairMove(
|
|
806
|
+
t.unsubscribeCrosshairMove(a), N && t.unsubscribeClick(a);
|
|
769
807
|
};
|
|
770
|
-
}, [e,
|
|
771
|
-
const t =
|
|
808
|
+
}, [e, q, N, ye]), G(() => {
|
|
809
|
+
const t = E.current;
|
|
772
810
|
if (!t || e.length === 0) return;
|
|
773
|
-
const
|
|
774
|
-
const
|
|
775
|
-
if (
|
|
776
|
-
const
|
|
777
|
-
if (!
|
|
778
|
-
const
|
|
779
|
-
for (const
|
|
780
|
-
const
|
|
781
|
-
for (const
|
|
782
|
-
if (
|
|
783
|
-
for (const
|
|
784
|
-
const
|
|
785
|
-
|
|
811
|
+
const l = t.timeScale(), n = () => {
|
|
812
|
+
const a = ze.current;
|
|
813
|
+
if (a.length === 0) return;
|
|
814
|
+
const s = l.getVisibleRange();
|
|
815
|
+
if (!s) return;
|
|
816
|
+
const d = Number(s.from), g = Number(s.to);
|
|
817
|
+
for (const x of a) {
|
|
818
|
+
const y = [];
|
|
819
|
+
for (const v of e)
|
|
820
|
+
if (x.labels.has(v.label))
|
|
821
|
+
for (const W of v.data) {
|
|
822
|
+
const M = Number(W.time);
|
|
823
|
+
M >= d && M <= g && y.push(W.value);
|
|
786
824
|
}
|
|
787
|
-
|
|
825
|
+
y.length > 0 && x.updateVisibleRange(y);
|
|
788
826
|
}
|
|
789
827
|
};
|
|
790
|
-
return
|
|
791
|
-
|
|
828
|
+
return l.subscribeVisibleLogicalRangeChange(n), () => {
|
|
829
|
+
l.unsubscribeVisibleLogicalRangeChange(
|
|
792
830
|
n
|
|
793
831
|
);
|
|
794
832
|
};
|
|
795
833
|
}, [e]), G(() => {
|
|
796
|
-
const t =
|
|
797
|
-
if (t &&
|
|
798
|
-
const
|
|
799
|
-
for (const
|
|
800
|
-
const
|
|
801
|
-
...
|
|
802
|
-
...
|
|
834
|
+
const t = E.current, l = Array.from(L.current.values()), n = [];
|
|
835
|
+
if (t && l.length > 0 && P) {
|
|
836
|
+
const a = Ct(), s = l[0];
|
|
837
|
+
for (const d of P) {
|
|
838
|
+
const g = {
|
|
839
|
+
...a,
|
|
840
|
+
...d.options || {}
|
|
803
841
|
};
|
|
804
|
-
|
|
805
|
-
const
|
|
806
|
-
|
|
842
|
+
g.color && (g.color = ie(g.color, g.color));
|
|
843
|
+
const x = new Rt(t, s, d.xCoordinate, g);
|
|
844
|
+
s.attachPrimitive(x), n.push(x);
|
|
807
845
|
}
|
|
808
846
|
}
|
|
809
847
|
return () => {
|
|
810
|
-
if (
|
|
811
|
-
const
|
|
812
|
-
for (const
|
|
848
|
+
if (l.length > 0) {
|
|
849
|
+
const a = l[0];
|
|
850
|
+
for (const s of n)
|
|
813
851
|
try {
|
|
814
|
-
|
|
852
|
+
a.detachPrimitive(s);
|
|
815
853
|
} catch {
|
|
816
854
|
}
|
|
817
855
|
}
|
|
818
856
|
};
|
|
819
|
-
}, [
|
|
820
|
-
const t = [],
|
|
821
|
-
if (
|
|
822
|
-
const n =
|
|
857
|
+
}, [P, e, U]), G(() => {
|
|
858
|
+
const t = [], l = [];
|
|
859
|
+
if (I && I.length > 0) {
|
|
860
|
+
const n = ie(
|
|
823
861
|
"hsl(var(--destructive))",
|
|
824
862
|
"rgb(239, 68, 68)"
|
|
825
863
|
);
|
|
826
|
-
for (const a of
|
|
864
|
+
for (const a of I) {
|
|
827
865
|
if (!Number.isFinite(a.price)) continue;
|
|
828
|
-
const
|
|
829
|
-
|
|
830
|
-
|
|
866
|
+
const s = et(
|
|
867
|
+
L.current,
|
|
868
|
+
e,
|
|
869
|
+
a.seriesLabel
|
|
870
|
+
);
|
|
871
|
+
if (!s) continue;
|
|
872
|
+
const d = a.color ? ie(a.color, a.color) : n, g = a.lineWidth ?? 1, x = a.lineStyle ?? le.Dashed, y = s.createPriceLine({
|
|
831
873
|
price: a.price,
|
|
832
874
|
color: d,
|
|
833
|
-
lineWidth:
|
|
834
|
-
lineStyle:
|
|
875
|
+
lineWidth: g,
|
|
876
|
+
lineStyle: x,
|
|
835
877
|
axisLabelVisible: a.axisLabelVisible ?? !0,
|
|
836
878
|
title: a.title ?? ""
|
|
837
879
|
});
|
|
838
|
-
t.push({ series:
|
|
839
|
-
const
|
|
840
|
-
|
|
880
|
+
t.push({ series: s, line: y });
|
|
881
|
+
const v = new Bt(
|
|
882
|
+
s,
|
|
841
883
|
a.price,
|
|
842
884
|
d,
|
|
843
|
-
|
|
844
|
-
|
|
885
|
+
g,
|
|
886
|
+
x
|
|
845
887
|
);
|
|
846
|
-
|
|
888
|
+
s.attachPrimitive(v), l.push({ series: s, primitive: v });
|
|
847
889
|
}
|
|
848
890
|
}
|
|
849
891
|
return () => {
|
|
850
|
-
for (const { series: n, primitive:
|
|
892
|
+
for (const { series: n, primitive: a } of l)
|
|
851
893
|
try {
|
|
852
|
-
n.detachPrimitive(
|
|
894
|
+
n.detachPrimitive(a);
|
|
853
895
|
} catch {
|
|
854
896
|
}
|
|
855
|
-
for (const { series: n, line:
|
|
897
|
+
for (const { series: n, line: a } of t)
|
|
856
898
|
try {
|
|
857
|
-
n.removePriceLine(
|
|
899
|
+
n.removePriceLine(a);
|
|
858
900
|
} catch {
|
|
859
901
|
}
|
|
860
902
|
};
|
|
861
|
-
}, [
|
|
903
|
+
}, [I, e, U]), G(() => {
|
|
862
904
|
const t = [];
|
|
863
|
-
if (
|
|
864
|
-
const
|
|
865
|
-
for (const
|
|
866
|
-
const a =
|
|
905
|
+
if (F && F.length > 0) {
|
|
906
|
+
const l = "rgba(239, 68, 68, 0.12)";
|
|
907
|
+
for (const n of F) {
|
|
908
|
+
const a = et(
|
|
909
|
+
L.current,
|
|
910
|
+
e,
|
|
911
|
+
n.seriesLabel
|
|
912
|
+
);
|
|
867
913
|
if (!a) continue;
|
|
868
|
-
const
|
|
914
|
+
const s = n.color ? ie(n.color, l) : l, d = new kt(
|
|
869
915
|
a,
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
916
|
+
n.priceTop,
|
|
917
|
+
n.priceBottom,
|
|
918
|
+
s
|
|
873
919
|
);
|
|
874
920
|
a.attachPrimitive(d), t.push({ series: a, zone: d });
|
|
875
921
|
}
|
|
876
922
|
}
|
|
877
923
|
return () => {
|
|
878
|
-
for (const { series:
|
|
924
|
+
for (const { series: l, zone: n } of t)
|
|
879
925
|
try {
|
|
880
|
-
|
|
926
|
+
l.detachPrimitive(n);
|
|
881
927
|
} catch {
|
|
882
928
|
}
|
|
883
929
|
};
|
|
884
|
-
}, [
|
|
885
|
-
const t =
|
|
886
|
-
if (!t || !
|
|
887
|
-
|
|
930
|
+
}, [F, e, U]), G(() => {
|
|
931
|
+
const t = E.current;
|
|
932
|
+
if (!t || !P?.length) {
|
|
933
|
+
$e([]);
|
|
888
934
|
return;
|
|
889
935
|
}
|
|
890
|
-
const
|
|
891
|
-
const
|
|
892
|
-
|
|
936
|
+
const l = () => {
|
|
937
|
+
const s = t.timeScale(), d = P.map((g) => s.timeToCoordinate(g.xCoordinate) ?? null);
|
|
938
|
+
$e(d), B.current && He(B.current.clientWidth);
|
|
893
939
|
};
|
|
894
|
-
|
|
895
|
-
const n = t.timeScale(),
|
|
896
|
-
|
|
940
|
+
l();
|
|
941
|
+
const n = t.timeScale(), a = () => {
|
|
942
|
+
l();
|
|
897
943
|
};
|
|
898
|
-
return n.subscribeVisibleLogicalRangeChange(
|
|
899
|
-
n.unsubscribeVisibleLogicalRangeChange(
|
|
944
|
+
return n.subscribeVisibleLogicalRangeChange(a), () => {
|
|
945
|
+
n.unsubscribeVisibleLogicalRangeChange(a);
|
|
900
946
|
};
|
|
901
|
-
}, [
|
|
902
|
-
|
|
903
|
-
const
|
|
947
|
+
}, [P, e, U]), pt(() => {
|
|
948
|
+
lt((t) => {
|
|
949
|
+
const l = {};
|
|
904
950
|
let n = !1;
|
|
905
|
-
for (const [
|
|
906
|
-
if (!
|
|
907
|
-
const
|
|
908
|
-
|
|
951
|
+
for (const [a, s] of je.current) {
|
|
952
|
+
if (!s) continue;
|
|
953
|
+
const d = s.offsetWidth;
|
|
954
|
+
l[a] = d, t[a] !== d && (n = !0);
|
|
909
955
|
}
|
|
910
|
-
return Object.keys(t).length !== Object.keys(
|
|
956
|
+
return Object.keys(t).length !== Object.keys(l).length && (n = !0), n ? l : t;
|
|
911
957
|
});
|
|
912
958
|
});
|
|
913
|
-
const
|
|
914
|
-
if (
|
|
959
|
+
const ge = e.length === 1, Ke = Ve.useMemo(() => {
|
|
960
|
+
if (ge && e.length > 0) {
|
|
915
961
|
const t = e[0];
|
|
916
962
|
if (t.data.length > 0)
|
|
917
963
|
return t.data[t.data.length - 1];
|
|
918
964
|
}
|
|
919
|
-
}, [
|
|
920
|
-
return /* @__PURE__ */
|
|
965
|
+
}, [ge, e]);
|
|
966
|
+
return /* @__PURE__ */ te(
|
|
921
967
|
"div",
|
|
922
968
|
{
|
|
923
969
|
ref: B,
|
|
924
|
-
className:
|
|
970
|
+
className: Z(
|
|
925
971
|
"relative z-[1] w-full h-full overflow-hidden p-0",
|
|
926
|
-
|
|
972
|
+
i
|
|
927
973
|
),
|
|
928
974
|
children: [
|
|
929
|
-
|
|
930
|
-
|
|
975
|
+
xe != null && xe !== !1 && ge ? /* @__PURE__ */ w("div", { className: "absolute top-2 left-2 right-2 z-[100] pointer-events-none", children: /* @__PURE__ */ w("div", { className: "text-xl sm:text-2xl font-semibold text-foreground whitespace-nowrap overflow-hidden text-ellipsis", children: xe }) }) : rt && ge && Ke && /* @__PURE__ */ w(
|
|
976
|
+
Pt,
|
|
931
977
|
{
|
|
932
|
-
point:
|
|
933
|
-
xMeasureUnit:
|
|
934
|
-
yMeasureUnit:
|
|
935
|
-
decimals:
|
|
978
|
+
point: Ke,
|
|
979
|
+
xMeasureUnit: h,
|
|
980
|
+
yMeasureUnit: f,
|
|
981
|
+
decimals: se
|
|
936
982
|
}
|
|
937
983
|
),
|
|
938
|
-
|
|
939
|
-
|
|
984
|
+
Ge && We && /* @__PURE__ */ w(
|
|
985
|
+
Nt,
|
|
940
986
|
{
|
|
941
|
-
points:
|
|
942
|
-
xMeasureUnit:
|
|
943
|
-
yMeasureUnit:
|
|
987
|
+
points: Ge,
|
|
988
|
+
xMeasureUnit: h,
|
|
989
|
+
yMeasureUnit: f,
|
|
944
990
|
series: e,
|
|
945
|
-
position:
|
|
991
|
+
position: We,
|
|
946
992
|
containerRef: B,
|
|
947
|
-
decimals:
|
|
993
|
+
decimals: se
|
|
948
994
|
}
|
|
949
995
|
),
|
|
950
|
-
|
|
951
|
-
|
|
996
|
+
c && /* @__PURE__ */ w(Wt, { series: e, onUnselect: u }),
|
|
997
|
+
P && P.length > 0 && Xe.length === P.length && /* @__PURE__ */ w(
|
|
952
998
|
"div",
|
|
953
999
|
{
|
|
954
1000
|
className: "absolute inset-0 z-[5] pointer-events-none",
|
|
955
1001
|
"aria-hidden": !0,
|
|
956
|
-
children:
|
|
957
|
-
const n =
|
|
958
|
-
if (n === null
|
|
959
|
-
const { labelText:
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
),
|
|
964
|
-
if (!(
|
|
965
|
-
const
|
|
1002
|
+
children: P.map((t, l) => {
|
|
1003
|
+
const n = Xe[l], a = t.options ?? {};
|
|
1004
|
+
if (n === null) return null;
|
|
1005
|
+
const { labelText: s, valueStr: d } = Ft(
|
|
1006
|
+
a,
|
|
1007
|
+
f,
|
|
1008
|
+
se
|
|
1009
|
+
), g = a.tooltipText ?? "";
|
|
1010
|
+
if (!(s || d || g)) return null;
|
|
1011
|
+
const y = a.labelBackgroundColor ?? a.color ?? "hsl(var(--background))", v = a.labelTextColor ?? "hsl(var(--foreground))", W = `${String(t.xCoordinate)}-${s}-${g}`, M = zt(
|
|
966
1012
|
n,
|
|
967
|
-
|
|
968
|
-
|
|
1013
|
+
it,
|
|
1014
|
+
at[l]
|
|
969
1015
|
);
|
|
970
|
-
return /* @__PURE__ */
|
|
1016
|
+
return /* @__PURE__ */ te(
|
|
971
1017
|
"div",
|
|
972
1018
|
{
|
|
973
|
-
ref: (
|
|
974
|
-
|
|
1019
|
+
ref: (ee) => {
|
|
1020
|
+
je.current.set(l, ee);
|
|
975
1021
|
},
|
|
976
|
-
className:
|
|
1022
|
+
className: Z(
|
|
977
1023
|
"group absolute top-2 px-2 py-1 rounded text-xs font-medium whitespace-nowrap shadow-sm border border-border",
|
|
978
|
-
|
|
1024
|
+
g && "pointer-events-auto cursor-default"
|
|
979
1025
|
),
|
|
980
1026
|
style: {
|
|
981
|
-
...
|
|
982
|
-
backgroundColor:
|
|
983
|
-
color:
|
|
1027
|
+
...M,
|
|
1028
|
+
backgroundColor: y,
|
|
1029
|
+
color: v
|
|
984
1030
|
},
|
|
985
1031
|
children: [
|
|
986
|
-
|
|
987
|
-
d && /* @__PURE__ */ w("span", { className:
|
|
988
|
-
|
|
1032
|
+
s && /* @__PURE__ */ w("span", { className: "block", children: s }),
|
|
1033
|
+
d && /* @__PURE__ */ w("span", { className: Z("block", s && "mt-0.5"), children: d }),
|
|
1034
|
+
g && /* @__PURE__ */ w(
|
|
989
1035
|
"span",
|
|
990
1036
|
{
|
|
991
1037
|
className: "pointer-events-none absolute right-0 top-full z-10 mt-1 hidden w-[280px] whitespace-normal rounded border border-border bg-popover px-2.5 py-1.5 text-left leading-snug text-popover-foreground shadow-md group-hover:block",
|
|
992
1038
|
role: "tooltip",
|
|
993
|
-
children:
|
|
1039
|
+
children: g
|
|
994
1040
|
}
|
|
995
1041
|
)
|
|
996
1042
|
]
|
|
997
1043
|
},
|
|
998
|
-
|
|
1044
|
+
W
|
|
999
1045
|
);
|
|
1000
1046
|
})
|
|
1001
1047
|
}
|
|
@@ -1003,7 +1049,7 @@ function Ot({
|
|
|
1003
1049
|
/* @__PURE__ */ w(
|
|
1004
1050
|
"div",
|
|
1005
1051
|
{
|
|
1006
|
-
ref:
|
|
1052
|
+
ref: we,
|
|
1007
1053
|
className: "LightweightChart w-full h-full overflow-hidden"
|
|
1008
1054
|
}
|
|
1009
1055
|
)
|
|
@@ -1011,87 +1057,132 @@ function Ot({
|
|
|
1011
1057
|
}
|
|
1012
1058
|
);
|
|
1013
1059
|
}
|
|
1014
|
-
function
|
|
1060
|
+
function Wt({
|
|
1015
1061
|
series: e,
|
|
1016
|
-
|
|
1062
|
+
markers: i,
|
|
1063
|
+
onUnselect: c,
|
|
1017
1064
|
inline: u = !1
|
|
1018
1065
|
}) {
|
|
1019
|
-
const h = e.every((
|
|
1020
|
-
return /* @__PURE__ */
|
|
1066
|
+
const h = e.every((f) => f.data.length === 0);
|
|
1067
|
+
return /* @__PURE__ */ te(
|
|
1021
1068
|
"div",
|
|
1022
1069
|
{
|
|
1023
|
-
className:
|
|
1024
|
-
"flex flex-wrap
|
|
1025
|
-
u ? "items-center" : "absolute top-0 left-2 z-[10]"
|
|
1070
|
+
className: Z(
|
|
1071
|
+
"flex flex-wrap",
|
|
1072
|
+
u ? "items-center justify-center gap-6" : "absolute top-0 left-2 z-[10] gap-2"
|
|
1026
1073
|
),
|
|
1027
|
-
children:
|
|
1028
|
-
|
|
1029
|
-
|
|
1074
|
+
children: [
|
|
1075
|
+
e.map((f, S) => {
|
|
1076
|
+
const P = ot(S), I = (f.lineColor ?? f.color) || P.line, F = !h && f.data.length === 0;
|
|
1077
|
+
return /* @__PURE__ */ te(
|
|
1078
|
+
"div",
|
|
1079
|
+
{
|
|
1080
|
+
className: Z(
|
|
1081
|
+
"flex items-center gap-1.5",
|
|
1082
|
+
!u && "px-2 py-1 bg-background/80 backdrop-blur-sm rounded border border-border",
|
|
1083
|
+
F && "opacity-50"
|
|
1084
|
+
),
|
|
1085
|
+
children: [
|
|
1086
|
+
/* @__PURE__ */ w(
|
|
1087
|
+
"div",
|
|
1088
|
+
{
|
|
1089
|
+
className: Z(
|
|
1090
|
+
u ? "size-2 rounded-full" : "h-3 w-3 rounded-sm"
|
|
1091
|
+
),
|
|
1092
|
+
style: { backgroundColor: I }
|
|
1093
|
+
}
|
|
1094
|
+
),
|
|
1095
|
+
/* @__PURE__ */ te(
|
|
1096
|
+
"span",
|
|
1097
|
+
{
|
|
1098
|
+
className: Z(
|
|
1099
|
+
"font-medium text-foreground",
|
|
1100
|
+
u ? "text-sm" : "text-[10px] sm:text-xs"
|
|
1101
|
+
),
|
|
1102
|
+
children: [
|
|
1103
|
+
f.label,
|
|
1104
|
+
F && " (no data)"
|
|
1105
|
+
]
|
|
1106
|
+
}
|
|
1107
|
+
),
|
|
1108
|
+
c && /* @__PURE__ */ w(
|
|
1109
|
+
"button",
|
|
1110
|
+
{
|
|
1111
|
+
type: "button",
|
|
1112
|
+
onClick: (se) => {
|
|
1113
|
+
se.stopPropagation(), c(f.label);
|
|
1114
|
+
},
|
|
1115
|
+
className: "ml-1 flex items-center justify-center w-4 h-4 rounded-sm hover:bg-muted transition-colors cursor-pointer",
|
|
1116
|
+
"aria-label": `Remove ${f.label}`,
|
|
1117
|
+
children: /* @__PURE__ */ te(
|
|
1118
|
+
"svg",
|
|
1119
|
+
{
|
|
1120
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1121
|
+
width: "12",
|
|
1122
|
+
height: "12",
|
|
1123
|
+
viewBox: "0 0 24 24",
|
|
1124
|
+
fill: "none",
|
|
1125
|
+
stroke: "currentColor",
|
|
1126
|
+
strokeWidth: "2",
|
|
1127
|
+
strokeLinecap: "round",
|
|
1128
|
+
strokeLinejoin: "round",
|
|
1129
|
+
className: "text-muted-foreground hover:text-foreground",
|
|
1130
|
+
"aria-hidden": "true",
|
|
1131
|
+
children: [
|
|
1132
|
+
/* @__PURE__ */ w("title", { children: "Close" }),
|
|
1133
|
+
/* @__PURE__ */ w("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1134
|
+
/* @__PURE__ */ w("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1135
|
+
]
|
|
1136
|
+
}
|
|
1137
|
+
)
|
|
1138
|
+
}
|
|
1139
|
+
)
|
|
1140
|
+
]
|
|
1141
|
+
},
|
|
1142
|
+
f.id ?? f.label
|
|
1143
|
+
);
|
|
1144
|
+
}),
|
|
1145
|
+
i?.map((f) => /* @__PURE__ */ te(
|
|
1030
1146
|
"div",
|
|
1031
1147
|
{
|
|
1032
|
-
className:
|
|
1033
|
-
"flex items-center gap-1.5
|
|
1034
|
-
|
|
1148
|
+
className: Z(
|
|
1149
|
+
"flex items-center gap-1.5",
|
|
1150
|
+
!u && "px-2 py-1 bg-background/80 backdrop-blur-sm rounded border border-border"
|
|
1035
1151
|
),
|
|
1036
1152
|
children: [
|
|
1037
1153
|
/* @__PURE__ */ w(
|
|
1038
1154
|
"div",
|
|
1039
1155
|
{
|
|
1040
|
-
className: "w-
|
|
1041
|
-
style: { backgroundColor:
|
|
1156
|
+
className: Z("w-0.5", "h-3"),
|
|
1157
|
+
style: { backgroundColor: f.color }
|
|
1042
1158
|
}
|
|
1043
1159
|
),
|
|
1044
|
-
/* @__PURE__ */
|
|
1045
|
-
|
|
1046
|
-
R && " (no data)"
|
|
1047
|
-
] }),
|
|
1048
|
-
l && /* @__PURE__ */ w(
|
|
1049
|
-
"button",
|
|
1160
|
+
/* @__PURE__ */ w(
|
|
1161
|
+
"span",
|
|
1050
1162
|
{
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
"aria-label": `Remove ${c.label}`,
|
|
1057
|
-
children: /* @__PURE__ */ le(
|
|
1058
|
-
"svg",
|
|
1059
|
-
{
|
|
1060
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1061
|
-
width: "12",
|
|
1062
|
-
height: "12",
|
|
1063
|
-
viewBox: "0 0 24 24",
|
|
1064
|
-
fill: "none",
|
|
1065
|
-
stroke: "currentColor",
|
|
1066
|
-
strokeWidth: "2",
|
|
1067
|
-
strokeLinecap: "round",
|
|
1068
|
-
strokeLinejoin: "round",
|
|
1069
|
-
className: "text-muted-foreground hover:text-foreground",
|
|
1070
|
-
"aria-hidden": "true",
|
|
1071
|
-
children: [
|
|
1072
|
-
/* @__PURE__ */ w("title", { children: "Close" }),
|
|
1073
|
-
/* @__PURE__ */ w("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1074
|
-
/* @__PURE__ */ w("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1075
|
-
]
|
|
1076
|
-
}
|
|
1077
|
-
)
|
|
1163
|
+
className: Z(
|
|
1164
|
+
"font-medium text-foreground",
|
|
1165
|
+
u ? "text-sm" : "text-[10px] sm:text-xs"
|
|
1166
|
+
),
|
|
1167
|
+
children: f.label
|
|
1078
1168
|
}
|
|
1079
1169
|
)
|
|
1080
1170
|
]
|
|
1081
1171
|
},
|
|
1082
|
-
|
|
1083
|
-
)
|
|
1084
|
-
|
|
1172
|
+
f.id
|
|
1173
|
+
))
|
|
1174
|
+
]
|
|
1085
1175
|
}
|
|
1086
1176
|
);
|
|
1087
1177
|
}
|
|
1088
1178
|
export {
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1179
|
+
Me as DEFAULT_SERIES_COLORS,
|
|
1180
|
+
oo as Graph,
|
|
1181
|
+
Wt as GraphLegend,
|
|
1182
|
+
tt as VERTICAL_LINE_LABEL_EDGE_PADDING,
|
|
1183
|
+
ot as getSeriesColorPalette,
|
|
1184
|
+
At as getStepForwardValue,
|
|
1185
|
+
zt as getVerticalLineLabelStyle,
|
|
1186
|
+
Ft as getVerticalLineTooltipContent,
|
|
1187
|
+
ae as seriesIdentity
|
|
1097
1188
|
};
|