@agg-market/ui 5.0.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -27
- package/dist/chunk-6I474QXG.mjs +2736 -0
- package/dist/chunk-AVHMI47G.mjs +2409 -0
- package/dist/chunk-BXW3VIKV.mjs +90 -0
- package/dist/{chunk-5K7VXAYM.mjs → chunk-EEQPPN7N.mjs} +2 -4
- package/dist/chunk-EERL6BZF.mjs +997 -0
- package/dist/chunk-KQKLLL4D.mjs +730 -0
- package/dist/chunk-KZOQW6NT.mjs +0 -0
- package/dist/chunk-L5U7RGJV.mjs +1211 -0
- package/dist/{connect-button.js → chunk-MUB7NYWZ.mjs} +1039 -876
- package/dist/chunk-OAJBTVZT.mjs +119 -0
- package/dist/{chunk-QDMHLRDY.mjs → chunk-OVQVAUAI.mjs} +167 -40
- package/dist/chunk-ZYUJ7YEJ.mjs +645 -0
- package/dist/events.d.mts +1 -0
- package/dist/events.d.ts +1 -0
- package/dist/{event-market-page.js → events.js} +5552 -5315
- package/dist/events.mjs +16 -0
- package/dist/index.d.mts +1 -79
- package/dist/index.d.ts +1 -79
- package/dist/index.js +9186 -8374
- package/dist/index.mjs +644 -170
- package/dist/modals.d.mts +1 -0
- package/dist/modals.d.ts +1 -0
- package/dist/{onboarding-modal.js → modals.js} +3472 -1335
- package/dist/modals.mjs +24 -0
- package/dist/pages.d.mts +1 -0
- package/dist/pages.d.ts +1 -0
- package/dist/pages.js +8590 -0
- package/dist/pages.mjs +16 -0
- package/dist/primitives.d.mts +1 -0
- package/dist/primitives.d.ts +1 -0
- package/dist/{market-details.js → primitives.js} +3914 -3741
- package/dist/{icon.mjs → primitives.mjs} +70 -9
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.d.mts +1 -0
- package/dist/trading.d.ts +1 -0
- package/dist/{place-order.js → trading.js} +2404 -1409
- package/dist/trading.mjs +65 -0
- package/dist/types/auth/connect-button-view/connect-button-view.constants.d.mts +31 -0
- package/dist/types/auth/connect-button-view/connect-button-view.constants.d.ts +31 -0
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.mts +83 -0
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.ts +83 -0
- package/dist/types/auth/connect-button-view/index.d.mts +7 -0
- package/dist/types/auth/connect-button-view/index.d.ts +7 -0
- package/dist/types/auth/index.d.mts +1 -0
- package/dist/types/auth/index.d.ts +1 -0
- package/dist/types/constants.d.mts +1 -0
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/deposit/deposit-modal.constants.d.mts +9 -0
- package/dist/types/deposit/deposit-modal.constants.d.ts +9 -0
- package/dist/{deposit-modal.d.mts → types/deposit/deposit-modal.types.d.mts} +3 -10
- package/dist/{deposit-modal.d.ts → types/deposit/deposit-modal.types.d.ts} +3 -10
- package/dist/types/deposit/index.d.mts +6 -0
- package/dist/types/deposit/index.d.ts +6 -0
- package/dist/types/deposit/steps/card-deposit.d.mts +7 -0
- package/dist/types/deposit/steps/card-deposit.d.ts +7 -0
- package/dist/types/deposit/steps/crypto-transfer.d.mts +7 -0
- package/dist/types/deposit/steps/crypto-transfer.d.ts +7 -0
- package/dist/types/deposit/steps/deposit-method.d.mts +7 -0
- package/dist/types/deposit/steps/deposit-method.d.ts +7 -0
- package/dist/types/deposit/steps/kalshi-deposit.d.mts +5 -0
- package/dist/types/deposit/steps/kalshi-deposit.d.ts +5 -0
- package/dist/types/deposit/steps/venue-selection.d.mts +7 -0
- package/dist/types/deposit/steps/venue-selection.d.ts +7 -0
- package/dist/types/events/index.d.mts +4 -0
- package/dist/types/events/index.d.ts +4 -0
- package/dist/types/events/item/event-list-item.constants.d.mts +1 -0
- package/dist/types/events/item/event-list-item.constants.d.ts +1 -0
- package/dist/types/events/item/event-list-item.types.d.mts +46 -0
- package/dist/types/events/item/event-list-item.types.d.ts +46 -0
- package/dist/types/events/item/event-list-item.utils.d.mts +23 -0
- package/dist/types/events/item/event-list-item.utils.d.ts +23 -0
- package/dist/types/events/item/index.d.mts +6 -0
- package/dist/types/events/item/index.d.ts +6 -0
- package/dist/types/events/item-details/event-list-item-details.constants.d.mts +10 -0
- package/dist/types/events/item-details/event-list-item-details.constants.d.ts +10 -0
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +53 -0
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +53 -0
- package/dist/types/events/item-details/event-list-item-details.utils.d.mts +26 -0
- package/dist/types/events/item-details/event-list-item-details.utils.d.ts +26 -0
- package/dist/types/events/item-details/index.d.mts +6 -0
- package/dist/types/events/item-details/index.d.ts +6 -0
- package/dist/types/events/list/event-list.constants.d.mts +3 -0
- package/dist/types/events/list/event-list.constants.d.ts +3 -0
- package/dist/types/events/list/event-list.types.d.mts +21 -0
- package/dist/types/events/list/event-list.types.d.ts +21 -0
- package/dist/types/events/list/event-list.utils.d.mts +6 -0
- package/dist/types/events/list/event-list.utils.d.ts +6 -0
- package/dist/types/events/list/index.d.mts +6 -0
- package/dist/types/events/list/index.d.ts +6 -0
- package/dist/types/events/market-details/index.d.mts +6 -0
- package/dist/types/events/market-details/index.d.ts +6 -0
- package/dist/types/events/market-details/market-details.constants.d.mts +9 -0
- package/dist/types/events/market-details/market-details.constants.d.ts +9 -0
- package/dist/types/events/market-details/market-details.types.d.mts +63 -0
- package/dist/types/events/market-details/market-details.types.d.ts +63 -0
- package/dist/types/events/market-details/market-details.utils.d.mts +46 -0
- package/dist/types/events/market-details/market-details.utils.d.ts +46 -0
- package/dist/types/index.d.mts +9 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/modals/index.d.mts +4 -0
- package/dist/types/modals/index.d.ts +4 -0
- package/dist/types/onboarding/index.d.mts +11 -0
- package/dist/types/onboarding/index.d.ts +11 -0
- package/dist/types/onboarding/onboarding-modal.constants.d.mts +10 -0
- package/dist/types/onboarding/onboarding-modal.constants.d.ts +10 -0
- package/dist/types/onboarding/onboarding-modal.types.d.mts +55 -0
- package/dist/types/onboarding/onboarding-modal.types.d.ts +55 -0
- package/dist/types/onboarding/steps/connect-accounts.d.mts +5 -0
- package/dist/types/onboarding/steps/connect-accounts.d.ts +5 -0
- package/dist/types/onboarding/steps/connect-kalshi-modal.d.mts +5 -0
- package/dist/types/onboarding/steps/connect-kalshi-modal.d.ts +5 -0
- package/dist/types/onboarding/steps/connect-onchain-modal.d.mts +5 -0
- package/dist/types/onboarding/steps/connect-onchain-modal.d.ts +5 -0
- package/dist/types/onboarding/steps/how-it-works.d.mts +5 -0
- package/dist/types/onboarding/steps/how-it-works.d.ts +5 -0
- package/dist/types/onboarding/steps/profile-setup.d.mts +5 -0
- package/dist/types/onboarding/steps/profile-setup.d.ts +5 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +42 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +42 -0
- package/dist/types/pages/event-market/index.d.mts +6 -0
- package/dist/types/pages/event-market/index.d.ts +6 -0
- package/dist/types/pages/home/home.constants.d.mts +8 -0
- package/dist/types/pages/home/home.constants.d.ts +8 -0
- package/dist/{home-page.d.ts → types/pages/home/home.types.d.mts} +8 -18
- package/dist/{home-page.d.mts → types/pages/home/home.types.d.ts} +8 -18
- package/dist/types/pages/home/home.utils.d.mts +3 -0
- package/dist/types/pages/home/home.utils.d.ts +3 -0
- package/dist/types/pages/home/index.d.mts +6 -0
- package/dist/types/pages/home/index.d.ts +6 -0
- package/dist/types/pages/index.d.mts +3 -0
- package/dist/types/pages/index.d.ts +3 -0
- package/dist/types/pages/user-profile/components/activity-row.d.mts +10 -0
- package/dist/types/pages/user-profile/components/activity-row.d.ts +10 -0
- package/dist/types/pages/user-profile/components/balance-display.d.mts +12 -0
- package/dist/types/pages/user-profile/components/balance-display.d.ts +12 -0
- package/dist/types/pages/user-profile/components/balances-card.d.mts +12 -0
- package/dist/types/pages/user-profile/components/balances-card.d.ts +12 -0
- package/dist/types/pages/user-profile/components/default-avatar.d.mts +8 -0
- package/dist/types/pages/user-profile/components/default-avatar.d.ts +8 -0
- package/dist/types/pages/user-profile/components/empty-state.d.mts +10 -0
- package/dist/types/pages/user-profile/components/empty-state.d.ts +10 -0
- package/dist/types/pages/user-profile/components/position-row.d.mts +10 -0
- package/dist/types/pages/user-profile/components/position-row.d.ts +10 -0
- package/dist/types/pages/user-profile/components/positions-activity.d.mts +14 -0
- package/dist/types/pages/user-profile/components/positions-activity.d.ts +14 -0
- package/dist/types/pages/user-profile/components/user-info-card.d.mts +11 -0
- package/dist/types/pages/user-profile/components/user-info-card.d.ts +11 -0
- package/dist/types/pages/user-profile/index.d.mts +6 -0
- package/dist/types/pages/user-profile/index.d.ts +6 -0
- package/dist/types/pages/user-profile/user-profile.constants.d.mts +9 -0
- package/dist/types/pages/user-profile/user-profile.constants.d.ts +9 -0
- package/dist/{user-profile-page.d.ts → types/pages/user-profile/user-profile.types.d.mts} +12 -22
- package/dist/{user-profile-page.d.mts → types/pages/user-profile/user-profile.types.d.ts} +12 -22
- package/dist/types/primitives/badge/badge.constants.d.mts +4 -0
- package/dist/types/primitives/badge/badge.constants.d.ts +4 -0
- package/dist/types/primitives/badge/badge.types.d.mts +18 -0
- package/dist/types/primitives/badge/badge.types.d.ts +18 -0
- package/dist/types/primitives/badge/index.d.mts +7 -0
- package/dist/types/primitives/badge/index.d.ts +7 -0
- package/dist/types/primitives/button/button.constants.d.mts +6 -0
- package/dist/types/primitives/button/button.constants.d.ts +6 -0
- package/dist/types/primitives/button/button.types.d.mts +12 -0
- package/dist/types/primitives/button/button.types.d.ts +12 -0
- package/dist/types/primitives/button/index.d.mts +6 -0
- package/dist/types/primitives/button/index.d.ts +6 -0
- package/dist/types/primitives/card/card.types.d.mts +3 -0
- package/dist/types/primitives/card/card.types.d.ts +3 -0
- package/dist/types/primitives/card/index.d.mts +6 -0
- package/dist/types/primitives/card/index.d.ts +6 -0
- package/dist/types/primitives/chart/chart-type-switch.d.mts +10 -0
- package/dist/types/primitives/chart/chart-type-switch.d.ts +10 -0
- package/dist/{chart.d.mts → types/primitives/chart/index.d.mts} +14 -11
- package/dist/{chart.d.ts → types/primitives/chart/index.d.ts} +14 -11
- package/dist/types/primitives/hello-world.d.mts +4 -0
- package/dist/types/primitives/hello-world.d.ts +4 -0
- package/dist/types/primitives/icon/icon.constants.d.mts +2 -0
- package/dist/types/primitives/icon/icon.constants.d.ts +2 -0
- package/dist/types/primitives/icon/icon.types.d.mts +9 -0
- package/dist/types/primitives/icon/icon.types.d.ts +9 -0
- package/dist/types/primitives/icon/icon.utils.d.mts +2 -0
- package/dist/types/primitives/icon/icon.utils.d.ts +2 -0
- package/dist/types/primitives/icon/index.d.mts +53 -0
- package/dist/types/primitives/icon/index.d.ts +53 -0
- package/dist/types/primitives/icon/registry.d.mts +194 -0
- package/dist/types/primitives/icon/registry.d.ts +194 -0
- package/dist/types/primitives/icon/svg/apple.d.mts +5 -0
- package/dist/types/primitives/icon/svg/apple.d.ts +5 -0
- package/dist/types/primitives/icon/svg/arrow-trend-up.d.mts +5 -0
- package/dist/types/primitives/icon/svg/arrow-trend-up.d.ts +5 -0
- package/dist/types/primitives/icon/svg/arrows-to-dot.d.mts +5 -0
- package/dist/types/primitives/icon/svg/arrows-to-dot.d.ts +5 -0
- package/dist/types/primitives/icon/svg/bank.d.mts +5 -0
- package/dist/types/primitives/icon/svg/bank.d.ts +5 -0
- package/dist/types/primitives/icon/svg/best-prices.d.mts +5 -0
- package/dist/types/primitives/icon/svg/best-prices.d.ts +5 -0
- package/dist/types/primitives/icon/svg/bolt.d.mts +5 -0
- package/dist/types/primitives/icon/svg/bolt.d.ts +5 -0
- package/dist/types/primitives/icon/svg/chart-candlestick.d.mts +5 -0
- package/dist/types/primitives/icon/svg/chart-candlestick.d.ts +5 -0
- package/dist/types/primitives/icon/svg/chart-line.d.mts +5 -0
- package/dist/types/primitives/icon/svg/chart-line.d.ts +5 -0
- package/dist/types/primitives/icon/svg/check-badge.d.mts +5 -0
- package/dist/types/primitives/icon/svg/check-badge.d.ts +5 -0
- package/dist/types/primitives/icon/svg/check-circle.d.mts +5 -0
- package/dist/types/primitives/icon/svg/check-circle.d.ts +5 -0
- package/dist/types/primitives/icon/svg/chevron-down.d.mts +5 -0
- package/dist/types/primitives/icon/svg/chevron-down.d.ts +5 -0
- package/dist/types/primitives/icon/svg/chevron-left.d.mts +5 -0
- package/dist/types/primitives/icon/svg/chevron-left.d.ts +5 -0
- package/dist/types/primitives/icon/svg/chevron-right.d.mts +5 -0
- package/dist/types/primitives/icon/svg/chevron-right.d.ts +5 -0
- package/dist/types/primitives/icon/svg/chevron-up.d.mts +5 -0
- package/dist/types/primitives/icon/svg/chevron-up.d.ts +5 -0
- package/dist/types/primitives/icon/svg/close.d.mts +5 -0
- package/dist/types/primitives/icon/svg/close.d.ts +5 -0
- package/dist/types/primitives/icon/svg/copy.d.mts +5 -0
- package/dist/types/primitives/icon/svg/copy.d.ts +5 -0
- package/dist/types/primitives/icon/svg/create-account.d.mts +5 -0
- package/dist/types/primitives/icon/svg/create-account.d.ts +5 -0
- package/dist/types/primitives/icon/svg/credit-card.d.mts +5 -0
- package/dist/types/primitives/icon/svg/credit-card.d.ts +5 -0
- package/dist/types/primitives/icon/svg/disconnect.d.mts +5 -0
- package/dist/types/primitives/icon/svg/disconnect.d.ts +5 -0
- package/dist/types/primitives/icon/svg/discord.d.mts +5 -0
- package/dist/types/primitives/icon/svg/discord.d.ts +5 -0
- package/dist/types/primitives/icon/svg/document.d.mts +5 -0
- package/dist/types/primitives/icon/svg/document.d.ts +5 -0
- package/dist/types/primitives/icon/svg/dots-horizontal.d.mts +5 -0
- package/dist/types/primitives/icon/svg/dots-horizontal.d.ts +5 -0
- package/dist/types/primitives/icon/svg/download.d.mts +5 -0
- package/dist/types/primitives/icon/svg/download.d.ts +5 -0
- package/dist/types/primitives/icon/svg/email.d.mts +5 -0
- package/dist/types/primitives/icon/svg/email.d.ts +5 -0
- package/dist/types/primitives/icon/svg/error-filled.d.mts +5 -0
- package/dist/types/primitives/icon/svg/error-filled.d.ts +5 -0
- package/dist/types/primitives/icon/svg/ethereum.d.mts +5 -0
- package/dist/types/primitives/icon/svg/ethereum.d.ts +5 -0
- package/dist/types/primitives/icon/svg/external-link.d.mts +5 -0
- package/dist/types/primitives/icon/svg/external-link.d.ts +5 -0
- package/dist/types/primitives/icon/svg/google.d.mts +5 -0
- package/dist/types/primitives/icon/svg/google.d.ts +5 -0
- package/dist/types/primitives/icon/svg/info.d.mts +5 -0
- package/dist/types/primitives/icon/svg/info.d.ts +5 -0
- package/dist/types/primitives/icon/svg/link-accounts.d.mts +5 -0
- package/dist/types/primitives/icon/svg/link-accounts.d.ts +5 -0
- package/dist/types/primitives/icon/svg/pencil.d.mts +5 -0
- package/dist/types/primitives/icon/svg/pencil.d.ts +5 -0
- package/dist/types/primitives/icon/svg/play-square.d.mts +5 -0
- package/dist/types/primitives/icon/svg/play-square.d.ts +5 -0
- package/dist/types/primitives/icon/svg/profile.d.mts +5 -0
- package/dist/types/primitives/icon/svg/profile.d.ts +5 -0
- package/dist/types/primitives/icon/svg/revenue-alt.d.mts +5 -0
- package/dist/types/primitives/icon/svg/revenue-alt.d.ts +5 -0
- package/dist/types/primitives/icon/svg/search.d.mts +5 -0
- package/dist/types/primitives/icon/svg/search.d.ts +5 -0
- package/dist/types/primitives/icon/svg/shield-trust.d.mts +5 -0
- package/dist/types/primitives/icon/svg/shield-trust.d.ts +5 -0
- package/dist/types/primitives/icon/svg/solana.d.mts +5 -0
- package/dist/types/primitives/icon/svg/solana.d.ts +5 -0
- package/dist/types/primitives/icon/svg/stay-in-control.d.mts +5 -0
- package/dist/types/primitives/icon/svg/stay-in-control.d.ts +5 -0
- package/dist/types/primitives/icon/svg/telegram.d.mts +5 -0
- package/dist/types/primitives/icon/svg/telegram.d.ts +5 -0
- package/dist/types/primitives/icon/svg/triangle-down.d.mts +5 -0
- package/dist/types/primitives/icon/svg/triangle-down.d.ts +5 -0
- package/dist/types/primitives/icon/svg/triangle-up-filled.d.mts +5 -0
- package/dist/types/primitives/icon/svg/triangle-up-filled.d.ts +5 -0
- package/dist/types/primitives/icon/svg/triangle-up.d.mts +5 -0
- package/dist/types/primitives/icon/svg/triangle-up.d.ts +5 -0
- package/dist/types/primitives/icon/svg/twitter.d.mts +5 -0
- package/dist/types/primitives/icon/svg/twitter.d.ts +5 -0
- package/dist/types/primitives/icon/svg/upload.d.mts +5 -0
- package/dist/types/primitives/icon/svg/upload.d.ts +5 -0
- package/dist/types/primitives/icon/svg/wallet-avatar.d.mts +5 -0
- package/dist/types/primitives/icon/svg/wallet-avatar.d.ts +5 -0
- package/dist/types/primitives/icon/svg/wallet.d.mts +5 -0
- package/dist/types/primitives/icon/svg/wallet.d.ts +5 -0
- package/dist/types/primitives/icon/svg/warning-filled.d.mts +5 -0
- package/dist/types/primitives/icon/svg/warning-filled.d.ts +5 -0
- package/dist/types/primitives/icon/svg/warning.d.mts +5 -0
- package/dist/types/primitives/icon/svg/warning.d.ts +5 -0
- package/dist/types/primitives/icon/types.d.mts +5 -0
- package/dist/types/primitives/icon/types.d.ts +5 -0
- package/dist/types/primitives/index.d.mts +18 -0
- package/dist/types/primitives/index.d.ts +18 -0
- package/dist/types/primitives/inline-alert/index.d.mts +16 -0
- package/dist/types/primitives/inline-alert/index.d.ts +16 -0
- package/dist/types/primitives/loading-icon/index.d.mts +11 -0
- package/dist/types/primitives/loading-icon/index.d.ts +11 -0
- package/dist/types/primitives/modal/index.d.mts +10 -0
- package/dist/types/primitives/modal/index.d.ts +10 -0
- package/dist/types/primitives/modal/modal.types.d.mts +54 -0
- package/dist/types/primitives/modal/modal.types.d.ts +54 -0
- package/dist/{number-value.d.mts → types/primitives/number-value.d.mts} +3 -5
- package/dist/{number-value.d.ts → types/primitives/number-value.d.ts} +3 -5
- package/dist/types/primitives/search/index.d.mts +6 -0
- package/dist/types/primitives/search/index.d.ts +6 -0
- package/dist/types/primitives/search/search-empty-icon.d.mts +5 -0
- package/dist/types/primitives/search/search-empty-icon.d.ts +5 -0
- package/dist/types/primitives/search/search.types.d.mts +96 -0
- package/dist/types/primitives/search/search.types.d.ts +96 -0
- package/dist/{select.d.mts → types/primitives/select/index.d.mts} +3 -5
- package/dist/{select.d.ts → types/primitives/select/index.d.ts} +3 -5
- package/dist/types/primitives/skeleton/index.d.mts +7 -0
- package/dist/types/primitives/skeleton/index.d.ts +7 -0
- package/dist/types/primitives/skeleton/skeleton-block.d.mts +8 -0
- package/dist/types/primitives/skeleton/skeleton-block.d.ts +8 -0
- package/dist/{skeleton.d.mts → types/primitives/skeleton/skeleton.types.d.mts} +6 -9
- package/dist/{skeleton.d.ts → types/primitives/skeleton/skeleton.types.d.ts} +6 -9
- package/dist/types/primitives/skeleton/views/event-list-item-details-skeleton-view.d.mts +5 -0
- package/dist/types/primitives/skeleton/views/event-list-item-details-skeleton-view.d.ts +5 -0
- package/dist/types/primitives/skeleton/views/event-list-item-skeleton-view.d.mts +9 -0
- package/dist/types/primitives/skeleton/views/event-list-item-skeleton-view.d.ts +9 -0
- package/dist/types/primitives/skeleton/views/event-list-skeleton-view.d.mts +5 -0
- package/dist/types/primitives/skeleton/views/event-list-skeleton-view.d.ts +5 -0
- package/dist/types/primitives/skeleton/views/market-details-skeleton-view.d.mts +12 -0
- package/dist/types/primitives/skeleton/views/market-details-skeleton-view.d.ts +12 -0
- package/dist/types/primitives/skeleton/views/place-order-skeleton-view.d.mts +5 -0
- package/dist/types/primitives/skeleton/views/place-order-skeleton-view.d.ts +5 -0
- package/dist/types/primitives/skeleton/views/settlement-skeleton-view.d.mts +5 -0
- package/dist/types/primitives/skeleton/views/settlement-skeleton-view.d.ts +5 -0
- package/dist/{state-message.d.mts → types/primitives/state-message/index.d.mts} +2 -3
- package/dist/{state-message.d.ts → types/primitives/state-message/index.d.ts} +2 -3
- package/dist/{switch-button.d.mts → types/primitives/switch-button/index.d.mts} +4 -7
- package/dist/{switch-button.d.ts → types/primitives/switch-button/index.d.ts} +4 -7
- package/dist/types/primitives/tabs/index.d.mts +6 -0
- package/dist/types/primitives/tabs/index.d.ts +6 -0
- package/dist/types/primitives/tabs/tabs.types.d.mts +24 -0
- package/dist/types/primitives/tabs/tabs.types.d.ts +24 -0
- package/dist/types/primitives/tabs/tabs.utils.d.mts +14 -0
- package/dist/types/primitives/tabs/tabs.utils.d.ts +14 -0
- package/dist/types/primitives/typography/index.d.mts +7 -0
- package/dist/types/primitives/typography/index.d.ts +7 -0
- package/dist/types/primitives/typography/typography.constants.d.mts +3 -0
- package/dist/types/primitives/typography/typography.constants.d.ts +3 -0
- package/dist/types/primitives/typography/typography.types.d.mts +8 -0
- package/dist/types/primitives/typography/typography.types.d.ts +8 -0
- package/dist/types/primitives/venue-logo/index.d.mts +8 -0
- package/dist/types/primitives/venue-logo/index.d.ts +8 -0
- package/dist/types/primitives/venue-logo/logo-props.d.mts +10 -0
- package/dist/types/primitives/venue-logo/logo-props.d.ts +10 -0
- package/dist/types/primitives/venue-logo/svg/logo-kalshi.d.mts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-kalshi.d.ts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-limitless.d.mts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-limitless.d.ts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-opinion.d.mts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-opinion.d.ts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-polymarket.d.mts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-polymarket.d.ts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-probable.d.mts +5 -0
- package/dist/types/primitives/venue-logo/svg/logo-probable.d.ts +5 -0
- package/dist/types/primitives/venue-logo/venue-logo.constants.d.mts +9 -0
- package/dist/types/primitives/venue-logo/venue-logo.constants.d.ts +9 -0
- package/dist/types/primitives/venue-logo/venue-logo.types.d.mts +17 -0
- package/dist/types/primitives/venue-logo/venue-logo.types.d.ts +17 -0
- package/dist/types/profile/index.d.mts +6 -0
- package/dist/types/profile/index.d.ts +6 -0
- package/dist/types/profile/profile-modal.constants.d.mts +17 -0
- package/dist/types/profile/profile-modal.constants.d.ts +17 -0
- package/dist/{profile-modal.d.mts → types/profile/profile-modal.types.d.mts} +4 -11
- package/dist/{profile-modal.d.ts → types/profile/profile-modal.types.d.ts} +4 -11
- package/dist/types/profile/tabs/about-tab.d.mts +16 -0
- package/dist/types/profile/tabs/about-tab.d.ts +16 -0
- package/dist/types/profile/tabs/accounts-wallets-tab.d.mts +18 -0
- package/dist/types/profile/tabs/accounts-wallets-tab.d.ts +18 -0
- package/dist/types/shared/constants.d.mts +23 -0
- package/dist/types/shared/constants.d.ts +23 -0
- package/dist/types/shared/query-error.d.mts +2 -0
- package/dist/types/shared/query-error.d.ts +2 -0
- package/dist/types/shared/types.d.mts +1 -0
- package/dist/types/shared/types.d.ts +1 -0
- package/dist/types/shared/utils.d.mts +15 -0
- package/dist/types/shared/utils.d.ts +15 -0
- package/dist/types/trading/index.d.mts +4 -0
- package/dist/types/trading/index.d.ts +4 -0
- package/dist/{place-order.d.ts → types/trading/place-order/index.d.mts} +3 -7
- package/dist/{place-order.d.mts → types/trading/place-order/index.d.ts} +3 -7
- package/dist/{settlement.d.ts → types/trading/settlement/index.d.mts} +3 -7
- package/dist/{settlement.d.mts → types/trading/settlement/index.d.ts} +3 -7
- package/dist/{types-BImwqY4o.d.ts → types/trading/types.d.mts} +61 -64
- package/dist/{types-BImwqY4o.d.mts → types/trading/types.d.ts} +61 -64
- package/dist/types/trading/utils.d.mts +16 -0
- package/dist/types/trading/utils.d.ts +16 -0
- package/dist/types/withdraw/index.d.mts +6 -0
- package/dist/types/withdraw/index.d.ts +6 -0
- package/dist/types/withdraw/steps/kalshi-withdraw.d.mts +5 -0
- package/dist/types/withdraw/steps/kalshi-withdraw.d.ts +5 -0
- package/dist/types/withdraw/steps/venue-selection.d.mts +6 -0
- package/dist/types/withdraw/steps/venue-selection.d.ts +6 -0
- package/dist/types/withdraw/steps/withdraw-amount.d.mts +8 -0
- package/dist/types/withdraw/steps/withdraw-amount.d.ts +8 -0
- package/dist/types/withdraw/steps/withdraw-method.d.mts +7 -0
- package/dist/types/withdraw/steps/withdraw-method.d.ts +7 -0
- package/dist/types/withdraw/withdraw-modal.constants.d.mts +9 -0
- package/dist/types/withdraw/withdraw-modal.constants.d.ts +9 -0
- package/dist/{withdraw-modal.d.mts → types/withdraw/withdraw-modal.types.d.mts} +3 -10
- package/dist/{withdraw-modal.d.ts → types/withdraw/withdraw-modal.types.d.ts} +3 -10
- package/package.json +29 -291
- package/dist/badge.d.mts +0 -28
- package/dist/badge.d.ts +0 -28
- package/dist/badge.js +0 -110
- package/dist/badge.mjs +0 -9
- package/dist/button.d.mts +0 -20
- package/dist/button.d.ts +0 -20
- package/dist/button.js +0 -183
- package/dist/button.mjs +0 -8
- package/dist/card.d.mts +0 -10
- package/dist/card.d.ts +0 -10
- package/dist/card.js +0 -88
- package/dist/card.mjs +0 -7
- package/dist/chart.js +0 -438
- package/dist/chart.mjs +0 -8
- package/dist/chunk-34IRJYSU.mjs +0 -146
- package/dist/chunk-3QLOUBDJ.mjs +0 -483
- package/dist/chunk-3W7NBJLU.mjs +0 -371
- package/dist/chunk-4343LYSH.mjs +0 -45
- package/dist/chunk-4S3I6X7F.mjs +0 -855
- package/dist/chunk-4VUDTWH7.mjs +0 -42
- package/dist/chunk-5ADMXO3Y.mjs +0 -456
- package/dist/chunk-6JG6I5AY.mjs +0 -654
- package/dist/chunk-BNDFQPHF.mjs +0 -9
- package/dist/chunk-CTYJVVHJ.mjs +0 -334
- package/dist/chunk-DHBHKIJR.mjs +0 -1049
- package/dist/chunk-ERGNR6UQ.mjs +0 -67
- package/dist/chunk-FO263M3V.mjs +0 -10
- package/dist/chunk-FO2QCB4Z.mjs +0 -35
- package/dist/chunk-GFBF2J3Y.mjs +0 -328
- package/dist/chunk-GJ4U5NCE.mjs +0 -134
- package/dist/chunk-IGPNIM2B.mjs +0 -83
- package/dist/chunk-K6IJ4WBM.mjs +0 -67
- package/dist/chunk-KAGYJ4XT.mjs +0 -126
- package/dist/chunk-KIYMVWL4.mjs +0 -280
- package/dist/chunk-LCZKSITC.mjs +0 -162
- package/dist/chunk-M4RJHRFT.mjs +0 -445
- package/dist/chunk-MJHKBCXQ.mjs +0 -379
- package/dist/chunk-MKVGQ7AS.mjs +0 -168
- package/dist/chunk-NDG43KGL.mjs +0 -44
- package/dist/chunk-NH2G3POM.mjs +0 -470
- package/dist/chunk-OBCHURW5.mjs +0 -64
- package/dist/chunk-OJVTGNIF.mjs +0 -230
- package/dist/chunk-PORVP72S.mjs +0 -277
- package/dist/chunk-PZTHM6WG.mjs +0 -1340
- package/dist/chunk-Q6DGDBPV.mjs +0 -774
- package/dist/chunk-QLMVKLNJ.mjs +0 -669
- package/dist/chunk-S3H63TQ5.mjs +0 -537
- package/dist/chunk-T7TATHPD.mjs +0 -313
- package/dist/chunk-XUCS575S.mjs +0 -65
- package/dist/chunk-YJA5VQW6.mjs +0 -167
- package/dist/chunk-ZFMCCBP6.mjs +0 -25
- package/dist/connect-button.d.mts +0 -40
- package/dist/connect-button.d.ts +0 -40
- package/dist/connect-button.mjs +0 -14
- package/dist/deposit-modal.js +0 -2801
- package/dist/deposit-modal.mjs +0 -15
- package/dist/event-list-item-details.d.mts +0 -11
- package/dist/event-list-item-details.d.ts +0 -11
- package/dist/event-list-item-details.js +0 -3711
- package/dist/event-list-item-details.mjs +0 -23
- package/dist/event-list-item-details.types-CMbXOrT-.d.ts +0 -53
- package/dist/event-list-item-details.types-DekJKeMD.d.mts +0 -53
- package/dist/event-list-item.d.mts +0 -10
- package/dist/event-list-item.d.ts +0 -10
- package/dist/event-list-item.js +0 -2821
- package/dist/event-list-item.mjs +0 -20
- package/dist/event-list-item.types-Y6IeJ4e4.d.mts +0 -46
- package/dist/event-list-item.types-Y6IeJ4e4.d.ts +0 -46
- package/dist/event-list.d.mts +0 -9
- package/dist/event-list.d.ts +0 -9
- package/dist/event-list.js +0 -3802
- package/dist/event-list.mjs +0 -23
- package/dist/event-list.types-CkAAUqwW.d.mts +0 -13
- package/dist/event-list.types-CkAAUqwW.d.ts +0 -13
- package/dist/event-market-page.d.mts +0 -52
- package/dist/event-market-page.d.ts +0 -52
- package/dist/event-market-page.mjs +0 -30
- package/dist/hello-world.d.mts +0 -8
- package/dist/hello-world.d.ts +0 -8
- package/dist/hello-world.js +0 -92
- package/dist/hello-world.mjs +0 -8
- package/dist/home-page.js +0 -4066
- package/dist/home-page.mjs +0 -24
- package/dist/icon.d.mts +0 -193
- package/dist/icon.d.ts +0 -193
- package/dist/icon.js +0 -1465
- package/dist/loading-icon.d.mts +0 -14
- package/dist/loading-icon.d.ts +0 -14
- package/dist/loading-icon.js +0 -112
- package/dist/loading-icon.mjs +0 -8
- package/dist/market-details.d.mts +0 -73
- package/dist/market-details.d.ts +0 -73
- package/dist/market-details.mjs +0 -24
- package/dist/modal.d.mts +0 -66
- package/dist/modal.d.ts +0 -66
- package/dist/modal.js +0 -321
- package/dist/modal.mjs +0 -9
- package/dist/number-value.js +0 -67
- package/dist/number-value.mjs +0 -7
- package/dist/onboarding-modal.d.mts +0 -88
- package/dist/onboarding-modal.d.ts +0 -88
- package/dist/onboarding-modal.mjs +0 -24
- package/dist/place-order.mjs +0 -18
- package/dist/profile-modal.js +0 -2447
- package/dist/profile-modal.mjs +0 -14
- package/dist/registry-DfSCFAdC.d.mts +0 -178
- package/dist/registry-DfSCFAdC.d.ts +0 -178
- package/dist/search.d.mts +0 -51
- package/dist/search.d.ts +0 -51
- package/dist/search.js +0 -1957
- package/dist/search.mjs +0 -13
- package/dist/select.js +0 -1552
- package/dist/select.mjs +0 -11
- package/dist/settlement.js +0 -2445
- package/dist/settlement.mjs +0 -15
- package/dist/skeleton.js +0 -490
- package/dist/skeleton.mjs +0 -10
- package/dist/state-message.js +0 -1629
- package/dist/state-message.mjs +0 -14
- package/dist/switch-button.js +0 -191
- package/dist/switch-button.mjs +0 -7
- package/dist/tabs.d.mts +0 -31
- package/dist/tabs.d.ts +0 -31
- package/dist/tabs.js +0 -2078
- package/dist/tabs.mjs +0 -12
- package/dist/types-BVj9ky9P.d.mts +0 -3
- package/dist/types-BVj9ky9P.d.ts +0 -3
- package/dist/typography.d.mts +0 -18
- package/dist/typography.d.ts +0 -18
- package/dist/typography.js +0 -93
- package/dist/typography.mjs +0 -9
- package/dist/user-profile-page.js +0 -3081
- package/dist/user-profile-page.mjs +0 -15
- package/dist/venue-logo.d.mts +0 -13
- package/dist/venue-logo.d.ts +0 -13
- package/dist/venue-logo.js +0 -323
- package/dist/venue-logo.mjs +0 -10
- package/dist/venue-logo.types-CGUc22ly.d.mts +0 -19
- package/dist/venue-logo.types-Dqr39S1-.d.ts +0 -19
- package/dist/withdraw-modal.js +0 -2449
- package/dist/withdraw-modal.mjs +0 -14
package/dist/chunk-MJHKBCXQ.mjs
DELETED
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defaultTradingDisclaimer,
|
|
3
|
-
getTradingDateLabel,
|
|
4
|
-
getTradingVenueLabel
|
|
5
|
-
} from "./chunk-OBCHURW5.mjs";
|
|
6
|
-
import {
|
|
7
|
-
Tabs
|
|
8
|
-
} from "./chunk-S3H63TQ5.mjs";
|
|
9
|
-
import {
|
|
10
|
-
Skeleton,
|
|
11
|
-
skeletonViews
|
|
12
|
-
} from "./chunk-M4RJHRFT.mjs";
|
|
13
|
-
import {
|
|
14
|
-
VenueLogo
|
|
15
|
-
} from "./chunk-PORVP72S.mjs";
|
|
16
|
-
import {
|
|
17
|
-
Icon
|
|
18
|
-
} from "./chunk-PZTHM6WG.mjs";
|
|
19
|
-
import {
|
|
20
|
-
Button
|
|
21
|
-
} from "./chunk-KAGYJ4XT.mjs";
|
|
22
|
-
import {
|
|
23
|
-
Card
|
|
24
|
-
} from "./chunk-FO2QCB4Z.mjs";
|
|
25
|
-
import {
|
|
26
|
-
cn,
|
|
27
|
-
getMotionClassName
|
|
28
|
-
} from "./chunk-GJ4U5NCE.mjs";
|
|
29
|
-
|
|
30
|
-
// src/trading/place-order/index.tsx
|
|
31
|
-
import { useEffect, useMemo, useState } from "react";
|
|
32
|
-
import { useLabels, useSdkUiConfig } from "@agg-market/hooks";
|
|
33
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
-
var WarningFilledIcon = ({ className }) => {
|
|
35
|
-
return /* @__PURE__ */ jsxs(
|
|
36
|
-
"svg",
|
|
37
|
-
{
|
|
38
|
-
viewBox: "0 0 16 16",
|
|
39
|
-
fill: "none",
|
|
40
|
-
className: cn("text-agg-warning", className),
|
|
41
|
-
"aria-hidden": "true",
|
|
42
|
-
children: [
|
|
43
|
-
/* @__PURE__ */ jsx("path", { d: "M8 1.33301L15.3333 14.6663H0.666656L8 1.33301Z", fill: "currentColor" }),
|
|
44
|
-
/* @__PURE__ */ jsx("path", { d: "M8 5.33301V8.66634", stroke: "white", strokeWidth: "1.4", strokeLinecap: "round" }),
|
|
45
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "11.1667", r: "0.833333", fill: "white" })
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
var ErrorFilledIcon = ({ className }) => {
|
|
51
|
-
return /* @__PURE__ */ jsxs(
|
|
52
|
-
"svg",
|
|
53
|
-
{
|
|
54
|
-
viewBox: "0 0 16 16",
|
|
55
|
-
fill: "none",
|
|
56
|
-
className: cn("text-agg-error", className),
|
|
57
|
-
"aria-hidden": "true",
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "8", fill: "currentColor" }),
|
|
60
|
-
/* @__PURE__ */ jsx("path", { d: "M8 4.16699V8.50033", stroke: "white", strokeWidth: "1.4", strokeLinecap: "round" }),
|
|
61
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "11.167", r: "0.833333", fill: "white" })
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
var getPlaceOrderContainerClassName = () => {
|
|
67
|
-
return "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
|
|
68
|
-
};
|
|
69
|
-
var getRoutingCardClassName = (isHighlighted) => {
|
|
70
|
-
if (!isHighlighted) {
|
|
71
|
-
return "border-agg-border bg-agg-secondary";
|
|
72
|
-
}
|
|
73
|
-
return "border-agg-trade-highlight-border bg-agg-trade-highlight-surface";
|
|
74
|
-
};
|
|
75
|
-
var getResultValueClassName = (tone) => {
|
|
76
|
-
if (tone === "default")
|
|
77
|
-
return "text-agg-foreground";
|
|
78
|
-
return "text-agg-success";
|
|
79
|
-
};
|
|
80
|
-
var negativeOutcomePattern = /\b(no|down|against|under|lose|false)\b/i;
|
|
81
|
-
var resolveIsPositiveOutcome = (outcome, index) => {
|
|
82
|
-
const outcomeText = `${outcome.id} ${outcome.label}`;
|
|
83
|
-
if (negativeOutcomePattern.test(outcomeText))
|
|
84
|
-
return false;
|
|
85
|
-
if (index === 1)
|
|
86
|
-
return false;
|
|
87
|
-
return true;
|
|
88
|
-
};
|
|
89
|
-
var getOutcomeButtonClassName = ({
|
|
90
|
-
enableAnimations,
|
|
91
|
-
isActive,
|
|
92
|
-
isPositive
|
|
93
|
-
}) => {
|
|
94
|
-
return cn(
|
|
95
|
-
"flex-1 cursor-pointer rounded-agg-full border px-6 py-2.5 text-agg-base leading-agg-6",
|
|
96
|
-
getMotionClassName(enableAnimations, "transition-all duration-300 ease-in-out"),
|
|
97
|
-
isActive ? isPositive ? "border-transparent bg-[#18c15c] font-agg-bold text-agg-on-primary" : "border-transparent bg-[#e5455f] font-agg-bold text-agg-on-primary" : "border-transparent bg-agg-secondary-hover font-agg-normal text-agg-foreground hover:bg-agg-tertiary"
|
|
98
|
-
);
|
|
99
|
-
};
|
|
100
|
-
var getStatusContent = ({
|
|
101
|
-
placement,
|
|
102
|
-
status,
|
|
103
|
-
onStatusAction
|
|
104
|
-
}) => {
|
|
105
|
-
if (!status || status.placement !== placement)
|
|
106
|
-
return null;
|
|
107
|
-
if (status.tone === "warning") {
|
|
108
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
109
|
-
/* @__PURE__ */ jsx(WarningFilledIcon, { className: "h-4 w-4 shrink-0" }),
|
|
110
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: status.message })
|
|
111
|
-
] });
|
|
112
|
-
}
|
|
113
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-agg-lg bg-agg-status-error-surface px-3 py-2.5", children: [
|
|
114
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
115
|
-
/* @__PURE__ */ jsx(ErrorFilledIcon, { className: "h-4 w-4 shrink-0" }),
|
|
116
|
-
/* @__PURE__ */ jsx("p", { className: "min-w-0 flex-1 text-agg-sm leading-agg-5 text-agg-foreground", children: status.message })
|
|
117
|
-
] }),
|
|
118
|
-
status.actionLabel ? /* @__PURE__ */ jsx(
|
|
119
|
-
"button",
|
|
120
|
-
{
|
|
121
|
-
type: "button",
|
|
122
|
-
className: "shrink-0 text-agg-sm font-agg-bold leading-agg-5 text-agg-primary",
|
|
123
|
-
"aria-label": status.actionLabel,
|
|
124
|
-
onClick: onStatusAction,
|
|
125
|
-
children: status.actionLabel
|
|
126
|
-
}
|
|
127
|
-
) : null
|
|
128
|
-
] });
|
|
129
|
-
};
|
|
130
|
-
var PlaceOrder = ({
|
|
131
|
-
title,
|
|
132
|
-
marketDate,
|
|
133
|
-
marketImageUrl,
|
|
134
|
-
activeTab,
|
|
135
|
-
buyLabel,
|
|
136
|
-
sellLabel,
|
|
137
|
-
outcomes,
|
|
138
|
-
selectedOutcomeId,
|
|
139
|
-
primaryMetric,
|
|
140
|
-
routing,
|
|
141
|
-
result,
|
|
142
|
-
actionLabel,
|
|
143
|
-
disclaimer = defaultTradingDisclaimer,
|
|
144
|
-
isDismissible = false,
|
|
145
|
-
isLoading = false,
|
|
146
|
-
status,
|
|
147
|
-
className,
|
|
148
|
-
isPrimaryActionDisabled = false,
|
|
149
|
-
isPrimaryActionLoading = false,
|
|
150
|
-
onClose,
|
|
151
|
-
onOutcomeChange,
|
|
152
|
-
onPrimaryAction,
|
|
153
|
-
onStatusAction,
|
|
154
|
-
onTabChange
|
|
155
|
-
}) => {
|
|
156
|
-
const { enableAnimations } = useSdkUiConfig();
|
|
157
|
-
const labels = useLabels();
|
|
158
|
-
const resolvedDisclaimer = disclaimer === defaultTradingDisclaimer ? labels.trading.disclaimer : disclaimer;
|
|
159
|
-
if (isLoading) {
|
|
160
|
-
return /* @__PURE__ */ jsx(
|
|
161
|
-
Skeleton,
|
|
162
|
-
{
|
|
163
|
-
ariaLabel: labels.common.loading,
|
|
164
|
-
className,
|
|
165
|
-
view: skeletonViews.placeOrder
|
|
166
|
-
}
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
const [internalTab, setInternalTab] = useState(activeTab);
|
|
170
|
-
const [internalOutcomeId, setInternalOutcomeId] = useState(selectedOutcomeId);
|
|
171
|
-
useEffect(() => {
|
|
172
|
-
setInternalTab(activeTab);
|
|
173
|
-
}, [activeTab]);
|
|
174
|
-
useEffect(() => {
|
|
175
|
-
setInternalOutcomeId(selectedOutcomeId);
|
|
176
|
-
}, [selectedOutcomeId]);
|
|
177
|
-
const resolvedTab = onTabChange ? activeTab : internalTab;
|
|
178
|
-
const resolvedOutcomeId = onOutcomeChange ? selectedOutcomeId : internalOutcomeId;
|
|
179
|
-
const hasHighlightedRouting = routing.tone === "highlighted";
|
|
180
|
-
const dateLabel = getTradingDateLabel(marketDate);
|
|
181
|
-
const tabItems = useMemo(() => {
|
|
182
|
-
return [
|
|
183
|
-
{ value: "buy", label: buyLabel },
|
|
184
|
-
{ value: "sell", label: sellLabel }
|
|
185
|
-
];
|
|
186
|
-
}, [buyLabel, sellLabel]);
|
|
187
|
-
const handleTabChange = (nextTab) => {
|
|
188
|
-
if (!onTabChange) {
|
|
189
|
-
setInternalTab(nextTab);
|
|
190
|
-
}
|
|
191
|
-
onTabChange == null ? void 0 : onTabChange(nextTab);
|
|
192
|
-
};
|
|
193
|
-
const handleOutcomeChange = (nextOutcomeId) => {
|
|
194
|
-
if (!onOutcomeChange) {
|
|
195
|
-
setInternalOutcomeId(nextOutcomeId);
|
|
196
|
-
}
|
|
197
|
-
onOutcomeChange == null ? void 0 : onOutcomeChange(nextOutcomeId);
|
|
198
|
-
};
|
|
199
|
-
const actionButton = /* @__PURE__ */ jsx(
|
|
200
|
-
Button,
|
|
201
|
-
{
|
|
202
|
-
size: "large",
|
|
203
|
-
className: "w-full",
|
|
204
|
-
disabled: isPrimaryActionDisabled,
|
|
205
|
-
isLoading: isPrimaryActionLoading,
|
|
206
|
-
"aria-label": actionLabel,
|
|
207
|
-
onClick: onPrimaryAction,
|
|
208
|
-
children: actionLabel
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
const contentBody = /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6 p-5", children: [
|
|
212
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
213
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-5", children: [
|
|
214
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
215
|
-
marketImageUrl ? /* @__PURE__ */ jsx(
|
|
216
|
-
"img",
|
|
217
|
-
{
|
|
218
|
-
src: marketImageUrl,
|
|
219
|
-
alt: "",
|
|
220
|
-
className: "h-12 w-12 shrink-0 rounded-agg-lg object-cover"
|
|
221
|
-
}
|
|
222
|
-
) : null,
|
|
223
|
-
/* @__PURE__ */ jsx("p", { className: "min-w-0 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: title })
|
|
224
|
-
] }),
|
|
225
|
-
isDismissible ? /* @__PURE__ */ jsx(
|
|
226
|
-
"button",
|
|
227
|
-
{
|
|
228
|
-
type: "button",
|
|
229
|
-
"aria-label": labels.common.close,
|
|
230
|
-
className: "shrink-0 text-agg-foreground",
|
|
231
|
-
onClick: onClose,
|
|
232
|
-
children: /* @__PURE__ */ jsx(
|
|
233
|
-
Icon,
|
|
234
|
-
{
|
|
235
|
-
name: "close",
|
|
236
|
-
size: "medium",
|
|
237
|
-
className: "h-6 w-6 text-agg-foreground",
|
|
238
|
-
color: "currentColor"
|
|
239
|
-
}
|
|
240
|
-
)
|
|
241
|
-
}
|
|
242
|
-
) : null
|
|
243
|
-
] }),
|
|
244
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: dateLabel })
|
|
245
|
-
] }),
|
|
246
|
-
/* @__PURE__ */ jsx(
|
|
247
|
-
Tabs,
|
|
248
|
-
{
|
|
249
|
-
ariaLabel: labels.common.tabsAria,
|
|
250
|
-
items: tabItems,
|
|
251
|
-
value: resolvedTab,
|
|
252
|
-
onChange: handleTabChange,
|
|
253
|
-
variant: "underline",
|
|
254
|
-
size: "s",
|
|
255
|
-
overflowBehavior: "scroll",
|
|
256
|
-
classNames: {
|
|
257
|
-
root: "w-full",
|
|
258
|
-
tabList: "w-full"
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
),
|
|
262
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
263
|
-
/* @__PURE__ */ jsx("div", { className: "flex w-full gap-2", children: outcomes.map((outcome, index) => {
|
|
264
|
-
const isActive = outcome.id === resolvedOutcomeId;
|
|
265
|
-
const isPositive = resolveIsPositiveOutcome(outcome, index);
|
|
266
|
-
return /* @__PURE__ */ jsx(
|
|
267
|
-
"button",
|
|
268
|
-
{
|
|
269
|
-
type: "button",
|
|
270
|
-
className: getOutcomeButtonClassName({
|
|
271
|
-
enableAnimations,
|
|
272
|
-
isActive,
|
|
273
|
-
isPositive
|
|
274
|
-
}),
|
|
275
|
-
"aria-pressed": isActive,
|
|
276
|
-
"aria-label": `${outcome.label} ${outcome.priceLabel}`,
|
|
277
|
-
onClick: () => handleOutcomeChange(outcome.id),
|
|
278
|
-
children: `${outcome.label} ${outcome.priceLabel}`
|
|
279
|
-
},
|
|
280
|
-
outcome.id
|
|
281
|
-
);
|
|
282
|
-
}) }),
|
|
283
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
284
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
285
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: primaryMetric.label }),
|
|
286
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: primaryMetric.hint })
|
|
287
|
-
] }),
|
|
288
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-3xl font-agg-bold leading-agg-9 text-agg-foreground", children: primaryMetric.value })
|
|
289
|
-
] })
|
|
290
|
-
] }),
|
|
291
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
292
|
-
/* @__PURE__ */ jsxs(
|
|
293
|
-
"div",
|
|
294
|
-
{
|
|
295
|
-
className: cn(
|
|
296
|
-
"relative overflow-hidden rounded-agg-lg border p-3",
|
|
297
|
-
getRoutingCardClassName(hasHighlightedRouting)
|
|
298
|
-
),
|
|
299
|
-
children: [
|
|
300
|
-
/* @__PURE__ */ jsx(
|
|
301
|
-
"div",
|
|
302
|
-
{
|
|
303
|
-
className: cn(
|
|
304
|
-
"pointer-events-none absolute inset-x-0 bottom-0 h-11 bg-linear-to-b from-transparent to-agg-trade-highlight-glow",
|
|
305
|
-
hasHighlightedRouting ? "opacity-100" : "opacity-0"
|
|
306
|
-
)
|
|
307
|
-
}
|
|
308
|
-
),
|
|
309
|
-
/* @__PURE__ */ jsxs("div", { className: "relative flex flex-col gap-3", children: [
|
|
310
|
-
routing.rows.map((row, index) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
311
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
312
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
313
|
-
/* @__PURE__ */ jsx(
|
|
314
|
-
VenueLogo,
|
|
315
|
-
{
|
|
316
|
-
venue: row.venue,
|
|
317
|
-
size: "small",
|
|
318
|
-
ariaLabel: getTradingVenueLabel(row.venue)
|
|
319
|
-
}
|
|
320
|
-
),
|
|
321
|
-
/* @__PURE__ */ jsx("p", { className: "truncate text-agg-base leading-agg-6 text-agg-foreground", children: row.label })
|
|
322
|
-
] }),
|
|
323
|
-
/* @__PURE__ */ jsx("p", { className: "shrink-0 text-agg-base leading-agg-6 text-agg-foreground", children: row.priceLabel })
|
|
324
|
-
] }),
|
|
325
|
-
index < routing.rows.length - 1 ? /* @__PURE__ */ jsx(
|
|
326
|
-
"div",
|
|
327
|
-
{
|
|
328
|
-
className: cn(
|
|
329
|
-
"h-px w-full",
|
|
330
|
-
hasHighlightedRouting ? "bg-agg-trade-highlight-border" : "bg-agg-separator"
|
|
331
|
-
)
|
|
332
|
-
}
|
|
333
|
-
) : null
|
|
334
|
-
] }, `${row.venue}-${row.label}`)),
|
|
335
|
-
routing.highlightLabel ? /* @__PURE__ */ jsx("p", { className: "text-center text-agg-sm font-agg-bold leading-agg-5 uppercase text-agg-trade-highlight-accent", children: routing.highlightLabel }) : null
|
|
336
|
-
] })
|
|
337
|
-
]
|
|
338
|
-
}
|
|
339
|
-
),
|
|
340
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: routing.helperLabel })
|
|
341
|
-
] }),
|
|
342
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
343
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
344
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: result.label }),
|
|
345
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: result.hint })
|
|
346
|
-
] }),
|
|
347
|
-
/* @__PURE__ */ jsx(
|
|
348
|
-
"p",
|
|
349
|
-
{
|
|
350
|
-
className: cn(
|
|
351
|
-
"text-agg-3xl font-agg-bold leading-agg-9",
|
|
352
|
-
getResultValueClassName(result.tone)
|
|
353
|
-
),
|
|
354
|
-
children: result.value
|
|
355
|
-
}
|
|
356
|
-
)
|
|
357
|
-
] }),
|
|
358
|
-
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
359
|
-
getStatusContent({
|
|
360
|
-
placement: "above-action",
|
|
361
|
-
status,
|
|
362
|
-
onStatusAction
|
|
363
|
-
}),
|
|
364
|
-
actionButton,
|
|
365
|
-
getStatusContent({
|
|
366
|
-
placement: "below-action",
|
|
367
|
-
status,
|
|
368
|
-
onStatusAction
|
|
369
|
-
})
|
|
370
|
-
] }),
|
|
371
|
-
/* @__PURE__ */ jsx("p", { className: "text-center text-agg-xs leading-agg-4 text-agg-muted-foreground", children: resolvedDisclaimer })
|
|
372
|
-
] });
|
|
373
|
-
return /* @__PURE__ */ jsx(Card, { className: cn(getPlaceOrderContainerClassName(), className), children: contentBody });
|
|
374
|
-
};
|
|
375
|
-
PlaceOrder.displayName = "PlaceOrder";
|
|
376
|
-
|
|
377
|
-
export {
|
|
378
|
-
PlaceOrder
|
|
379
|
-
};
|
package/dist/chunk-MKVGQ7AS.mjs
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
toDate
|
|
3
|
-
} from "./chunk-GJ4U5NCE.mjs";
|
|
4
|
-
|
|
5
|
-
// src/shared/query-error.ts
|
|
6
|
-
var getErrorStatus = (error) => {
|
|
7
|
-
if (!error || typeof error !== "object")
|
|
8
|
-
return null;
|
|
9
|
-
const status = error.status;
|
|
10
|
-
return typeof status === "number" ? status : null;
|
|
11
|
-
};
|
|
12
|
-
var isErrorWithStatus = (error, status) => {
|
|
13
|
-
return getErrorStatus(error) === status;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// src/events/item/event-list-item.utils.ts
|
|
17
|
-
var resolveEventListItemEvent = (fetchedEvent) => {
|
|
18
|
-
if (!fetchedEvent)
|
|
19
|
-
return void 0;
|
|
20
|
-
const mergedVenueMarkets = fetchedEvent.markets.flatMap(
|
|
21
|
-
(market) => market.venueMarkets
|
|
22
|
-
);
|
|
23
|
-
if (mergedVenueMarkets.length === 0)
|
|
24
|
-
return void 0;
|
|
25
|
-
return fetchedEvent;
|
|
26
|
-
};
|
|
27
|
-
var normalizeProbability = (value) => {
|
|
28
|
-
if (typeof value !== "number" || !Number.isFinite(value))
|
|
29
|
-
return void 0;
|
|
30
|
-
if (value < 0)
|
|
31
|
-
return 0;
|
|
32
|
-
if (value > 1)
|
|
33
|
-
return 1;
|
|
34
|
-
return value;
|
|
35
|
-
};
|
|
36
|
-
var hasDateLabel = (outcome) => {
|
|
37
|
-
return !!toDate(outcome.label);
|
|
38
|
-
};
|
|
39
|
-
var sortOutcomes = (outcomes) => {
|
|
40
|
-
if (outcomes.length <= 1)
|
|
41
|
-
return outcomes;
|
|
42
|
-
const now = Date.now();
|
|
43
|
-
if (outcomes.some(hasDateLabel)) {
|
|
44
|
-
return [...outcomes].sort((a, b) => {
|
|
45
|
-
var _a, _b, _c, _d;
|
|
46
|
-
const aDate = (_b = (_a = toDate(a.label)) == null ? void 0 : _a.getTime()) != null ? _b : 0;
|
|
47
|
-
const bDate = (_d = (_c = toDate(b.label)) == null ? void 0 : _c.getTime()) != null ? _d : 0;
|
|
48
|
-
return Math.abs(aDate - now) - Math.abs(bDate - now);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return [...outcomes].sort((a, b) => {
|
|
52
|
-
var _a, _b;
|
|
53
|
-
const aPrice = (_a = normalizeProbability(a.price)) != null ? _a : 0;
|
|
54
|
-
const bPrice = (_b = normalizeProbability(b.price)) != null ? _b : 0;
|
|
55
|
-
return bPrice - aPrice;
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
var compareVisibleOutcomeRows = (left, right) => {
|
|
59
|
-
var _a, _b;
|
|
60
|
-
const leftDate = toDate(resolveOutcomeTitle(left.outcome));
|
|
61
|
-
const rightDate = toDate(resolveOutcomeTitle(right.outcome));
|
|
62
|
-
if (leftDate && rightDate) {
|
|
63
|
-
return leftDate.getTime() - rightDate.getTime();
|
|
64
|
-
}
|
|
65
|
-
const leftProbability = (_a = normalizeProbability(left.outcome.price)) != null ? _a : -1;
|
|
66
|
-
const rightProbability = (_b = normalizeProbability(right.outcome.price)) != null ? _b : -1;
|
|
67
|
-
return rightProbability - leftProbability;
|
|
68
|
-
};
|
|
69
|
-
var shouldReplaceVisibleOutcome = (current, next) => {
|
|
70
|
-
var _a, _b;
|
|
71
|
-
const currentVolume = typeof current.market.volume === "number" ? current.market.volume : -1;
|
|
72
|
-
const nextVolume = typeof next.market.volume === "number" ? next.market.volume : -1;
|
|
73
|
-
if (currentVolume !== nextVolume) {
|
|
74
|
-
return nextVolume > currentVolume;
|
|
75
|
-
}
|
|
76
|
-
const currentProbability = (_a = normalizeProbability(current.outcome.price)) != null ? _a : -1;
|
|
77
|
-
const nextProbability = (_b = normalizeProbability(next.outcome.price)) != null ? _b : -1;
|
|
78
|
-
return nextProbability > currentProbability;
|
|
79
|
-
};
|
|
80
|
-
var resolveVisibleOutcomes = (venueMarkets, maxOutcomes) => {
|
|
81
|
-
const visibleOutcomesByLabel = /* @__PURE__ */ new Map();
|
|
82
|
-
venueMarkets.forEach((market) => {
|
|
83
|
-
sortOutcomes(market.venueMarketOutcomes).forEach((outcome) => {
|
|
84
|
-
const title = resolveOutcomeTitle(outcome);
|
|
85
|
-
const normalizedTitle = title.trim().toLowerCase();
|
|
86
|
-
const nextVisibleOutcome = {
|
|
87
|
-
venue: market.venue,
|
|
88
|
-
market,
|
|
89
|
-
outcome,
|
|
90
|
-
title
|
|
91
|
-
};
|
|
92
|
-
const currentVisibleOutcome = visibleOutcomesByLabel.get(normalizedTitle);
|
|
93
|
-
if (!currentVisibleOutcome || shouldReplaceVisibleOutcome(currentVisibleOutcome, nextVisibleOutcome)) {
|
|
94
|
-
visibleOutcomesByLabel.set(normalizedTitle, nextVisibleOutcome);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
return [...visibleOutcomesByLabel.values()].sort(compareVisibleOutcomeRows).slice(0, Math.max(1, maxOutcomes));
|
|
99
|
-
};
|
|
100
|
-
var resolveOutcomeTitle = (outcome) => {
|
|
101
|
-
if (outcome.title && outcome.title.trim())
|
|
102
|
-
return outcome.title;
|
|
103
|
-
return outcome.label;
|
|
104
|
-
};
|
|
105
|
-
var selectPrimaryVenueMarket = (venueMarkets) => {
|
|
106
|
-
if (venueMarkets.length === 0)
|
|
107
|
-
return void 0;
|
|
108
|
-
if (venueMarkets.length === 1)
|
|
109
|
-
return venueMarkets[0];
|
|
110
|
-
return [...venueMarkets].sort((a, b) => {
|
|
111
|
-
const aVolume = typeof a.volume === "number" ? a.volume : -1;
|
|
112
|
-
const bVolume = typeof b.volume === "number" ? b.volume : -1;
|
|
113
|
-
return bVolume - aVolume;
|
|
114
|
-
})[0];
|
|
115
|
-
};
|
|
116
|
-
var resolveTileTitle = (event, primaryVenueMarket, titleOverride) => {
|
|
117
|
-
if (typeof titleOverride === "string" && titleOverride.trim()) {
|
|
118
|
-
return titleOverride;
|
|
119
|
-
}
|
|
120
|
-
if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.question) === "string" && primaryVenueMarket.question.trim()) {
|
|
121
|
-
return primaryVenueMarket.question;
|
|
122
|
-
}
|
|
123
|
-
return event.title;
|
|
124
|
-
};
|
|
125
|
-
var resolveTileImage = (event, primaryVenueMarket, imageOverride) => {
|
|
126
|
-
if (typeof imageOverride === "string" && imageOverride.trim()) {
|
|
127
|
-
return imageOverride;
|
|
128
|
-
}
|
|
129
|
-
if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.image) === "string" && primaryVenueMarket.image.trim()) {
|
|
130
|
-
return primaryVenueMarket.image;
|
|
131
|
-
}
|
|
132
|
-
if (typeof event.image === "string" && event.image.trim()) {
|
|
133
|
-
return event.image;
|
|
134
|
-
}
|
|
135
|
-
return void 0;
|
|
136
|
-
};
|
|
137
|
-
var formatCountLabel = (count, singular, plural) => {
|
|
138
|
-
return `${count} ${count === 1 ? singular : plural}`;
|
|
139
|
-
};
|
|
140
|
-
var getVenueSummary = (venueMarkets) => {
|
|
141
|
-
const uniqueVenues = Array.from(new Set(venueMarkets.map((market) => market.venue)));
|
|
142
|
-
return {
|
|
143
|
-
marketCount: venueMarkets.length,
|
|
144
|
-
venueCount: uniqueVenues.length,
|
|
145
|
-
singleVenue: uniqueVenues.length === 1 ? uniqueVenues[0] : void 0
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
var resolveVenueLabel = (venue, venueInfo, labels) => {
|
|
149
|
-
var _a, _b;
|
|
150
|
-
if (!venue)
|
|
151
|
-
return labels.eventItem.venueSingular;
|
|
152
|
-
return (_b = (_a = venueInfo == null ? void 0 : venueInfo[venue]) == null ? void 0 : _a.label) != null ? _b : labels.venues[venue];
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export {
|
|
156
|
-
isErrorWithStatus,
|
|
157
|
-
resolveEventListItemEvent,
|
|
158
|
-
normalizeProbability,
|
|
159
|
-
sortOutcomes,
|
|
160
|
-
resolveVisibleOutcomes,
|
|
161
|
-
resolveOutcomeTitle,
|
|
162
|
-
selectPrimaryVenueMarket,
|
|
163
|
-
resolveTileTitle,
|
|
164
|
-
resolveTileImage,
|
|
165
|
-
formatCountLabel,
|
|
166
|
-
getVenueSummary,
|
|
167
|
-
resolveVenueLabel
|
|
168
|
-
};
|
package/dist/chunk-NDG43KGL.mjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getIconA11yProps
|
|
3
|
-
} from "./chunk-BNDFQPHF.mjs";
|
|
4
|
-
import {
|
|
5
|
-
__objRest,
|
|
6
|
-
__spreadProps,
|
|
7
|
-
__spreadValues
|
|
8
|
-
} from "./chunk-GJ4U5NCE.mjs";
|
|
9
|
-
|
|
10
|
-
// src/primitives/icon/svg/close.tsx
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
var CloseIcon = (_a) => {
|
|
13
|
-
var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
|
|
14
|
-
return /* @__PURE__ */ jsxs(
|
|
15
|
-
"svg",
|
|
16
|
-
__spreadProps(__spreadValues(__spreadValues({
|
|
17
|
-
width: "16",
|
|
18
|
-
height: "16",
|
|
19
|
-
viewBox: "0 0 16 16",
|
|
20
|
-
fill: "none",
|
|
21
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
-
className
|
|
23
|
-
}, getIconA11yProps(title)), props), {
|
|
24
|
-
children: [
|
|
25
|
-
title ? /* @__PURE__ */ jsx("title", { children: title }) : null,
|
|
26
|
-
/* @__PURE__ */ jsx(
|
|
27
|
-
"path",
|
|
28
|
-
{
|
|
29
|
-
d: "M12 4L4 12M4 4l8 8",
|
|
30
|
-
stroke: "currentColor",
|
|
31
|
-
strokeWidth: "2",
|
|
32
|
-
strokeLinecap: "round",
|
|
33
|
-
strokeLinejoin: "round"
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
]
|
|
37
|
-
})
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
CloseIcon.displayName = "CloseIcon";
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
CloseIcon
|
|
44
|
-
};
|