@agg-market/ui 4.0.0 → 6.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 +26 -26
- package/dist/auth.d.mts +1 -0
- package/dist/auth.d.ts +1 -0
- package/dist/{connect-button.js → auth.js} +6 -4
- package/dist/auth.mjs +8 -0
- package/dist/chunk-2ICOSP7N.mjs +1211 -0
- package/dist/chunk-5ZKPBMRK.mjs +2411 -0
- package/dist/{chunk-5K7VXAYM.mjs → chunk-ADGL6RFX.mjs} +2 -4
- package/dist/chunk-BXW3VIKV.mjs +90 -0
- package/dist/{chart.js → chunk-CN7GI2RJ.mjs} +250 -103
- package/dist/chunk-G6YKGVQR.mjs +769 -0
- package/dist/{chunk-PZTHM6WG.mjs → chunk-HI4EEDN5.mjs} +897 -357
- package/dist/{chunk-5ADMXO3Y.mjs → chunk-INRG3D4M.mjs} +5 -11
- package/dist/{chunk-DCORNTCY.mjs → chunk-JE3Z52FD.mjs} +85 -64
- package/dist/chunk-KZOQW6NT.mjs +0 -0
- package/dist/chunk-LMOJKJOY.mjs +2616 -0
- package/dist/{chunk-YJA5VQW6.mjs → chunk-MHCHR65A.mjs} +2 -4
- package/dist/{chunk-IGPNIM2B.mjs → chunk-PASXFYKQ.mjs} +2 -4
- package/dist/chunk-UBBOLLOS.mjs +999 -0
- package/dist/events.d.mts +1 -0
- package/dist/events.d.ts +1 -0
- package/dist/{event-market-page.js → events.js} +5128 -5274
- package/dist/events.mjs +17 -0
- package/dist/index.d.mts +1 -78
- package/dist/index.d.ts +1 -78
- package/dist/index.js +8738 -8534
- package/dist/index.mjs +68 -167
- package/dist/modals.d.mts +1 -0
- package/dist/modals.d.ts +1 -0
- package/dist/{deposit-modal.js → modals.js} +1771 -6
- package/dist/modals.mjs +25 -0
- package/dist/pages.d.mts +1 -0
- package/dist/pages.d.ts +1 -0
- package/dist/pages.js +7928 -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} +2980 -3153
- package/dist/{icon.mjs → primitives.mjs} +56 -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} +1907 -1394
- package/dist/trading.mjs +65 -0
- package/dist/types/auth/connect-button/connect-button.constants.d.mts +10 -0
- package/dist/types/auth/connect-button/connect-button.constants.d.ts +10 -0
- package/dist/{connect-button.d.mts → types/auth/connect-button/connect-button.types.d.mts} +5 -12
- package/dist/{connect-button.d.ts → types/auth/connect-button/connect-button.types.d.ts} +5 -12
- package/dist/types/auth/connect-button/index.d.mts +7 -0
- package/dist/types/auth/connect-button/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/{chart.d.mts → types/primitives/chart/index.d.mts} +7 -10
- package/dist/{chart.d.ts → types/primitives/chart/index.d.ts} +7 -10
- 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 +46 -0
- package/dist/types/primitives/icon/index.d.ts +46 -0
- package/dist/types/primitives/icon/registry.d.mts +166 -0
- package/dist/types/primitives/icon/registry.d.ts +166 -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/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/external-link.d.mts +5 -0
- package/dist/types/primitives/icon/svg/external-link.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/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 +17 -0
- package/dist/types/primitives/index.d.ts +17 -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/types/primitives/state-message/index.d.mts +15 -0
- package/dist/types/primitives/state-message/index.d.ts +15 -0
- 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-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-DkGlbmXq.d.ts → types/trading/types.d.mts} +35 -38
- package/dist/{types-DkGlbmXq.d.mts → types/trading/types.d.ts} +35 -38
- 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 +35 -273
- 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.mjs +0 -8
- package/dist/chunk-3QLOUBDJ.mjs +0 -483
- package/dist/chunk-3W7NBJLU.mjs +0 -371
- package/dist/chunk-4S3I6X7F.mjs +0 -855
- package/dist/chunk-4VUDTWH7.mjs +0 -42
- package/dist/chunk-6JG6I5AY.mjs +0 -654
- package/dist/chunk-BNDFQPHF.mjs +0 -9
- package/dist/chunk-ERGNR6UQ.mjs +0 -67
- package/dist/chunk-FO263M3V.mjs +0 -10
- package/dist/chunk-FO2QCB4Z.mjs +0 -35
- package/dist/chunk-GJ4U5NCE.mjs +0 -134
- package/dist/chunk-GNSPZ53C.mjs +0 -991
- package/dist/chunk-HOXTJ742.mjs +0 -146
- package/dist/chunk-JNH64AKR.mjs +0 -720
- package/dist/chunk-K6IJ4WBM.mjs +0 -67
- package/dist/chunk-KAGYJ4XT.mjs +0 -126
- package/dist/chunk-LA3FBBSJ.mjs +0 -311
- package/dist/chunk-LCZKSITC.mjs +0 -162
- package/dist/chunk-M4RJHRFT.mjs +0 -445
- package/dist/chunk-MBHTXNHX.mjs +0 -289
- package/dist/chunk-MJHKBCXQ.mjs +0 -379
- package/dist/chunk-NDG43KGL.mjs +0 -44
- package/dist/chunk-NH2G3POM.mjs +0 -470
- package/dist/chunk-OBCHURW5.mjs +0 -64
- package/dist/chunk-OH56VUYK.mjs +0 -321
- package/dist/chunk-OJVTGNIF.mjs +0 -230
- package/dist/chunk-P2PJBO5C.mjs +0 -280
- package/dist/chunk-PORVP72S.mjs +0 -277
- package/dist/chunk-QLMVKLNJ.mjs +0 -669
- package/dist/chunk-QM7CGMFG.mjs +0 -156
- package/dist/chunk-S3H63TQ5.mjs +0 -537
- package/dist/chunk-ZFMCCBP6.mjs +0 -25
- package/dist/connect-button.mjs +0 -14
- 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 -2254
- package/dist/event-list-item-details.mjs +0 -19
- 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 -2600
- package/dist/event-list-item.mjs +0 -17
- 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 -3578
- package/dist/event-list.mjs +0 -20
- 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 -28
- 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 -3842
- package/dist/home-page.mjs +0 -21
- 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 -21
- 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.js +0 -2836
- 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 -1954
- package/dist/search.mjs +0 -12
- 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/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
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CloseIcon
|
|
3
|
-
} from "./chunk-NDG43KGL.mjs";
|
|
4
1
|
import {
|
|
5
2
|
AGG_ROOT_CLASS_NAME,
|
|
3
|
+
CloseIcon,
|
|
6
4
|
cn,
|
|
7
5
|
getMotionClassName
|
|
8
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HI4EEDN5.mjs";
|
|
9
7
|
|
|
10
8
|
// src/primitives/modal/index.tsx
|
|
11
9
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// src/trading/types.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var tradingVenueSchema = z.enum(["polymarket", "kalshi", "opinion", "probable"]);
|
|
4
|
+
var settlementVenueSchema = z.object({
|
|
5
|
+
venue: tradingVenueSchema,
|
|
6
|
+
label: z.string().optional(),
|
|
7
|
+
description: z.string().min(1),
|
|
8
|
+
showMoreLabel: z.string().optional()
|
|
9
|
+
});
|
|
10
|
+
var settlementViewModelSchema = z.object({
|
|
11
|
+
sectionLabel: z.string().min(1),
|
|
12
|
+
question: z.string().min(1),
|
|
13
|
+
differencesTitle: z.string().min(1),
|
|
14
|
+
differences: z.array(z.string().min(1)).min(1),
|
|
15
|
+
venues: z.array(settlementVenueSchema).min(1),
|
|
16
|
+
defaultExpandedVenue: tradingVenueSchema.nullable().optional()
|
|
17
|
+
});
|
|
18
|
+
var placeOrderTabSchema = z.enum(["buy", "sell"]);
|
|
19
|
+
var placeOrderStatusToneSchema = z.enum(["warning", "error"]);
|
|
20
|
+
var placeOrderStatusPlacementSchema = z.enum(["above-action", "below-action"]);
|
|
21
|
+
var placeOrderRoutingToneSchema = z.enum(["default", "highlighted"]);
|
|
22
|
+
var placeOrderResultToneSchema = z.enum(["default", "success"]);
|
|
23
|
+
var placeOrderOutcomeSchema = z.object({
|
|
24
|
+
id: z.string().min(1),
|
|
25
|
+
label: z.string().min(1),
|
|
26
|
+
priceLabel: z.string().min(1)
|
|
27
|
+
});
|
|
28
|
+
var placeOrderMetricSchema = z.object({
|
|
29
|
+
label: z.string().min(1),
|
|
30
|
+
hint: z.string().min(1),
|
|
31
|
+
value: z.string().min(1)
|
|
32
|
+
});
|
|
33
|
+
var placeOrderRoutingRowSchema = z.object({
|
|
34
|
+
venue: tradingVenueSchema,
|
|
35
|
+
label: z.string().min(1),
|
|
36
|
+
priceLabel: z.string().min(1)
|
|
37
|
+
});
|
|
38
|
+
var placeOrderRoutingSchema = z.object({
|
|
39
|
+
tone: placeOrderRoutingToneSchema,
|
|
40
|
+
rows: z.array(placeOrderRoutingRowSchema).min(1),
|
|
41
|
+
helperLabel: z.string().min(1),
|
|
42
|
+
highlightLabel: z.string().optional()
|
|
43
|
+
});
|
|
44
|
+
var placeOrderResultSchema = z.object({
|
|
45
|
+
label: z.string().min(1),
|
|
46
|
+
hint: z.string().min(1),
|
|
47
|
+
value: z.string().min(1),
|
|
48
|
+
tone: placeOrderResultToneSchema
|
|
49
|
+
});
|
|
50
|
+
var placeOrderStatusSchema = z.object({
|
|
51
|
+
tone: placeOrderStatusToneSchema,
|
|
52
|
+
message: z.string().min(1),
|
|
53
|
+
actionLabel: z.string().optional(),
|
|
54
|
+
placement: placeOrderStatusPlacementSchema
|
|
55
|
+
});
|
|
56
|
+
var placeOrderViewModelSchema = z.object({
|
|
57
|
+
title: z.string().min(1),
|
|
58
|
+
marketDate: z.union([z.string(), z.date()]),
|
|
59
|
+
marketImageUrl: z.string().url().optional(),
|
|
60
|
+
activeTab: placeOrderTabSchema,
|
|
61
|
+
buyLabel: z.string().min(1),
|
|
62
|
+
sellLabel: z.string().min(1),
|
|
63
|
+
outcomes: z.array(placeOrderOutcomeSchema).min(2),
|
|
64
|
+
selectedOutcomeId: z.string().min(1),
|
|
65
|
+
primaryMetric: placeOrderMetricSchema,
|
|
66
|
+
routing: placeOrderRoutingSchema,
|
|
67
|
+
result: placeOrderResultSchema,
|
|
68
|
+
actionLabel: z.string().min(1),
|
|
69
|
+
disclaimer: z.string().min(1),
|
|
70
|
+
isDismissible: z.boolean().optional(),
|
|
71
|
+
status: placeOrderStatusSchema.optional()
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export {
|
|
75
|
+
tradingVenueSchema,
|
|
76
|
+
settlementVenueSchema,
|
|
77
|
+
settlementViewModelSchema,
|
|
78
|
+
placeOrderTabSchema,
|
|
79
|
+
placeOrderStatusToneSchema,
|
|
80
|
+
placeOrderStatusPlacementSchema,
|
|
81
|
+
placeOrderRoutingToneSchema,
|
|
82
|
+
placeOrderResultToneSchema,
|
|
83
|
+
placeOrderOutcomeSchema,
|
|
84
|
+
placeOrderMetricSchema,
|
|
85
|
+
placeOrderRoutingRowSchema,
|
|
86
|
+
placeOrderRoutingSchema,
|
|
87
|
+
placeOrderResultSchema,
|
|
88
|
+
placeOrderStatusSchema,
|
|
89
|
+
placeOrderViewModelSchema
|
|
90
|
+
};
|
|
@@ -1,74 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __export = (target, all) => {
|
|
26
|
-
for (var name in all)
|
|
27
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
-
};
|
|
29
|
-
var __copyProps = (to, from, except, desc) => {
|
|
30
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
31
|
-
for (let key of __getOwnPropNames(from))
|
|
32
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
33
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
|
-
}
|
|
35
|
-
return to;
|
|
36
|
-
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
38
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
39
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
40
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
41
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
42
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
43
|
-
mod
|
|
44
|
-
));
|
|
45
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
46
|
-
|
|
47
|
-
// src/primitives/chart/index.tsx
|
|
48
|
-
var chart_exports = {};
|
|
49
|
-
__export(chart_exports, {
|
|
50
|
-
LineChart: () => LineChart
|
|
51
|
-
});
|
|
52
|
-
module.exports = __toCommonJS(chart_exports);
|
|
53
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
54
|
-
var import_hooks2 = require("@agg-market/hooks");
|
|
55
|
-
var import_react2 = require("react");
|
|
56
|
-
var import_liveline = require("liveline");
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
WarningIcon,
|
|
4
|
+
__objRest,
|
|
5
|
+
__spreadProps,
|
|
6
|
+
__spreadValues,
|
|
7
|
+
cn,
|
|
8
|
+
getIconA11yProps,
|
|
9
|
+
getMotionClassName
|
|
10
|
+
} from "./chunk-HI4EEDN5.mjs";
|
|
57
11
|
|
|
58
12
|
// src/primitives/switch-button/index.tsx
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// src/shared/utils.ts
|
|
63
|
-
var cn = (...values) => values.filter(Boolean).join(" ");
|
|
64
|
-
var getMotionClassName = (enabled, ...values) => {
|
|
65
|
-
if (!enabled)
|
|
66
|
-
return void 0;
|
|
67
|
-
return cn(...values);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
// src/primitives/switch-button/index.tsx
|
|
71
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
+
import { useEffect, useMemo, useState } from "react";
|
|
14
|
+
import { useSdkUiConfig } from "@agg-market/hooks";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
72
16
|
var resolveActiveIndex = (options, value) => {
|
|
73
17
|
const activeIndex = options.findIndex((option) => option.value === value);
|
|
74
18
|
if (activeIndex >= 0)
|
|
@@ -95,13 +39,13 @@ var SwitchButton = ({
|
|
|
95
39
|
ariaLabel,
|
|
96
40
|
className
|
|
97
41
|
}) => {
|
|
98
|
-
const { enableAnimations } =
|
|
99
|
-
const activeIndex =
|
|
42
|
+
const { enableAnimations } = useSdkUiConfig();
|
|
43
|
+
const activeIndex = useMemo(() => {
|
|
100
44
|
return resolveActiveIndex(options, value);
|
|
101
45
|
}, [options, value]);
|
|
102
|
-
const [isAnimating, setIsAnimating] =
|
|
103
|
-
const [lastAnimatedIndex, setLastAnimatedIndex] =
|
|
104
|
-
|
|
46
|
+
const [isAnimating, setIsAnimating] = useState(false);
|
|
47
|
+
const [lastAnimatedIndex, setLastAnimatedIndex] = useState(activeIndex);
|
|
48
|
+
useEffect(() => {
|
|
105
49
|
if (lastAnimatedIndex === activeIndex) {
|
|
106
50
|
return;
|
|
107
51
|
}
|
|
@@ -137,7 +81,7 @@ var SwitchButton = ({
|
|
|
137
81
|
}
|
|
138
82
|
onValueChange(nextOption.value);
|
|
139
83
|
};
|
|
140
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ jsx(
|
|
141
85
|
"div",
|
|
142
86
|
{
|
|
143
87
|
className: cn(
|
|
@@ -147,7 +91,7 @@ var SwitchButton = ({
|
|
|
147
91
|
"cursor-pointer hover:bg-agg-tertiary",
|
|
148
92
|
className
|
|
149
93
|
),
|
|
150
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ jsxs(
|
|
151
95
|
"div",
|
|
152
96
|
{
|
|
153
97
|
className: "relative grid min-w-0 flex-1 items-center",
|
|
@@ -157,7 +101,7 @@ var SwitchButton = ({
|
|
|
157
101
|
role: "tablist",
|
|
158
102
|
"aria-label": ariaLabel,
|
|
159
103
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ jsx(
|
|
161
105
|
"span",
|
|
162
106
|
{
|
|
163
107
|
className: cn(
|
|
@@ -177,7 +121,7 @@ var SwitchButton = ({
|
|
|
177
121
|
options.map((option, optionIndex) => {
|
|
178
122
|
var _a;
|
|
179
123
|
const isActive = optionIndex === activeIndex;
|
|
180
|
-
return /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ jsx(
|
|
181
125
|
"button",
|
|
182
126
|
{
|
|
183
127
|
type: "button",
|
|
@@ -219,8 +163,71 @@ var SwitchButton = ({
|
|
|
219
163
|
};
|
|
220
164
|
SwitchButton.displayName = "SwitchButton";
|
|
221
165
|
|
|
166
|
+
// src/primitives/typography/typography.constants.ts
|
|
167
|
+
var typographyVariants = [
|
|
168
|
+
"display",
|
|
169
|
+
"heading",
|
|
170
|
+
"title",
|
|
171
|
+
"title-strong",
|
|
172
|
+
"body-large",
|
|
173
|
+
"body-large-strong",
|
|
174
|
+
"body",
|
|
175
|
+
"body-strong",
|
|
176
|
+
"label",
|
|
177
|
+
"label-strong",
|
|
178
|
+
"label-caps",
|
|
179
|
+
"caption",
|
|
180
|
+
"caption-strong",
|
|
181
|
+
"caption-caps",
|
|
182
|
+
"overline"
|
|
183
|
+
];
|
|
184
|
+
var typographyVariantClasses = {
|
|
185
|
+
display: cn("agg-type-display"),
|
|
186
|
+
heading: cn("agg-type-heading"),
|
|
187
|
+
title: cn("agg-type-title"),
|
|
188
|
+
"title-strong": cn("agg-type-title-strong"),
|
|
189
|
+
"body-large": cn("agg-type-body-large"),
|
|
190
|
+
"body-large-strong": cn("agg-type-body-large-strong"),
|
|
191
|
+
body: cn("agg-type-body"),
|
|
192
|
+
"body-strong": cn("agg-type-body-strong"),
|
|
193
|
+
label: cn("agg-type-label"),
|
|
194
|
+
"label-strong": cn("agg-type-label-strong"),
|
|
195
|
+
"label-caps": cn("agg-type-label-caps"),
|
|
196
|
+
caption: cn("agg-type-caption"),
|
|
197
|
+
"caption-strong": cn("agg-type-caption-strong"),
|
|
198
|
+
"caption-caps": cn("agg-type-caption-caps"),
|
|
199
|
+
overline: cn("agg-type-overline")
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// src/primitives/typography/index.tsx
|
|
203
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
204
|
+
var Typography = ({
|
|
205
|
+
as: Component = "p",
|
|
206
|
+
variant = "body",
|
|
207
|
+
className,
|
|
208
|
+
children
|
|
209
|
+
}) => {
|
|
210
|
+
return /* @__PURE__ */ jsx2(
|
|
211
|
+
Component,
|
|
212
|
+
{
|
|
213
|
+
className: cn(
|
|
214
|
+
"group/agg-typography",
|
|
215
|
+
"text-agg-foreground",
|
|
216
|
+
typographyVariantClasses[variant],
|
|
217
|
+
className
|
|
218
|
+
),
|
|
219
|
+
children
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
};
|
|
223
|
+
Typography.displayName = "Typography";
|
|
224
|
+
|
|
222
225
|
// src/primitives/chart/index.tsx
|
|
223
|
-
|
|
226
|
+
import dayjs from "dayjs";
|
|
227
|
+
import { useLabels, useSdkUiConfig as useSdkUiConfig2 } from "@agg-market/hooks";
|
|
228
|
+
import { useEffect as useEffect2, useMemo as useMemo2, useState as useState2 } from "react";
|
|
229
|
+
import { Liveline } from "liveline";
|
|
230
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
224
231
|
var normalizeSeries = (series) => {
|
|
225
232
|
return series.map((seriesItem) => {
|
|
226
233
|
const pointsByTime = /* @__PURE__ */ new Map();
|
|
@@ -247,12 +254,12 @@ var resolveTimeFormatter = (windowSeconds) => {
|
|
|
247
254
|
if (!Number.isFinite(timestamp))
|
|
248
255
|
return "";
|
|
249
256
|
if (windowSeconds <= 48 * 60 * 60) {
|
|
250
|
-
return
|
|
257
|
+
return dayjs.unix(timestamp).format("HH:mm");
|
|
251
258
|
}
|
|
252
259
|
if (windowSeconds <= 14 * 24 * 60 * 60) {
|
|
253
|
-
return
|
|
260
|
+
return dayjs.unix(timestamp).format("MMM D HH:mm");
|
|
254
261
|
}
|
|
255
|
-
return
|
|
262
|
+
return dayjs.unix(timestamp).format("MMM D");
|
|
256
263
|
};
|
|
257
264
|
};
|
|
258
265
|
var toLivelinePoints = (points) => {
|
|
@@ -301,7 +308,7 @@ var renderDefaultSeriesControls = ({
|
|
|
301
308
|
seriesSwitchAriaLabel,
|
|
302
309
|
formatSeriesOptionAriaLabel
|
|
303
310
|
}) => {
|
|
304
|
-
return /* @__PURE__ */ (
|
|
311
|
+
return /* @__PURE__ */ jsx3(
|
|
305
312
|
SwitchButton,
|
|
306
313
|
{
|
|
307
314
|
ariaLabel: seriesSwitchAriaLabel,
|
|
@@ -333,15 +340,15 @@ var LineChart = ({
|
|
|
333
340
|
renderSeriesControls
|
|
334
341
|
}) => {
|
|
335
342
|
var _a, _b;
|
|
336
|
-
const labels =
|
|
337
|
-
const { theme } = (
|
|
338
|
-
const normalizedSeries = (
|
|
343
|
+
const labels = useLabels();
|
|
344
|
+
const { theme } = useSdkUiConfig2();
|
|
345
|
+
const normalizedSeries = useMemo2(() => {
|
|
339
346
|
return normalizeSeries(series);
|
|
340
347
|
}, [series]);
|
|
341
|
-
const [activeSeriesId, setActiveSeriesId] = (
|
|
348
|
+
const [activeSeriesId, setActiveSeriesId] = useState2(
|
|
342
349
|
() => resolveActiveSeriesId(normalizedSeries, null)
|
|
343
350
|
);
|
|
344
|
-
(
|
|
351
|
+
useEffect2(() => {
|
|
345
352
|
setActiveSeriesId(
|
|
346
353
|
(currentActiveSeriesId) => resolveActiveSeriesId(normalizedSeries, currentActiveSeriesId)
|
|
347
354
|
);
|
|
@@ -350,22 +357,22 @@ var LineChart = ({
|
|
|
350
357
|
const handleSeriesChange = (seriesId) => {
|
|
351
358
|
setActiveSeriesId(seriesId);
|
|
352
359
|
};
|
|
353
|
-
const primarySeries = (
|
|
360
|
+
const primarySeries = useMemo2(() => {
|
|
354
361
|
return resolveSelectedSeries(normalizedSeries, activeSeriesId);
|
|
355
362
|
}, [activeSeriesId, normalizedSeries]);
|
|
356
|
-
const primaryData = (
|
|
363
|
+
const primaryData = useMemo2(() => {
|
|
357
364
|
if (!primarySeries) {
|
|
358
365
|
return [];
|
|
359
366
|
}
|
|
360
367
|
return toLivelinePoints(primarySeries.points);
|
|
361
368
|
}, [primarySeries]);
|
|
362
|
-
const primaryValue = (
|
|
369
|
+
const primaryValue = useMemo2(() => {
|
|
363
370
|
if (!primarySeries) {
|
|
364
371
|
return 0;
|
|
365
372
|
}
|
|
366
373
|
return resolveLatestValue(primarySeries.points);
|
|
367
374
|
}, [primarySeries]);
|
|
368
|
-
const livelineSeries = (
|
|
375
|
+
const livelineSeries = useMemo2(() => {
|
|
369
376
|
return normalizedSeries.map((seriesItem) => ({
|
|
370
377
|
id: seriesItem.id,
|
|
371
378
|
color: seriesItem.color,
|
|
@@ -373,10 +380,10 @@ var LineChart = ({
|
|
|
373
380
|
value: resolveLatestValue(seriesItem.points)
|
|
374
381
|
}));
|
|
375
382
|
}, [normalizedSeries]);
|
|
376
|
-
const windowSeconds = (
|
|
383
|
+
const windowSeconds = useMemo2(() => {
|
|
377
384
|
return resolveWindowSeconds(normalizedSeries);
|
|
378
385
|
}, [normalizedSeries]);
|
|
379
|
-
const timeFormatter = (
|
|
386
|
+
const timeFormatter = useMemo2(() => {
|
|
380
387
|
return resolveTimeFormatter(windowSeconds);
|
|
381
388
|
}, [windowSeconds]);
|
|
382
389
|
const seriesControls = showSeriesControls && normalizedSeries.length > 0 ? (_a = renderSeriesControls == null ? void 0 : renderSeriesControls({
|
|
@@ -391,9 +398,9 @@ var LineChart = ({
|
|
|
391
398
|
seriesSwitchAriaLabel: labels.common.lineChartSeriesSwitchAria,
|
|
392
399
|
formatSeriesOptionAriaLabel: labels.common.lineChartSeriesOptionAria
|
|
393
400
|
}) : null : null;
|
|
394
|
-
return /* @__PURE__ */ (
|
|
395
|
-
!isLoading && seriesControls ? /* @__PURE__ */ (
|
|
396
|
-
/* @__PURE__ */ (
|
|
401
|
+
return /* @__PURE__ */ jsxs2("div", { className: cn("group/agg-chart", "w-full", classNames == null ? void 0 : classNames.root), style: { width }, children: [
|
|
402
|
+
!isLoading && seriesControls ? /* @__PURE__ */ jsx3("div", { className: cn("mb-3", classNames == null ? void 0 : classNames.controls), children: seriesControls }) : null,
|
|
403
|
+
/* @__PURE__ */ jsx3(
|
|
397
404
|
"div",
|
|
398
405
|
{
|
|
399
406
|
className: cn(
|
|
@@ -403,8 +410,8 @@ var LineChart = ({
|
|
|
403
410
|
style: { height },
|
|
404
411
|
role: "img",
|
|
405
412
|
"aria-label": labels.common.lineChartAria,
|
|
406
|
-
children: /* @__PURE__ */ (
|
|
407
|
-
|
|
413
|
+
children: /* @__PURE__ */ jsx3(
|
|
414
|
+
Liveline,
|
|
408
415
|
{
|
|
409
416
|
className: cn("h-full w-full agg-livechart", classNames == null ? void 0 : classNames.liveline),
|
|
410
417
|
data: primaryData,
|
|
@@ -432,7 +439,147 @@ var LineChart = ({
|
|
|
432
439
|
] });
|
|
433
440
|
};
|
|
434
441
|
LineChart.displayName = "LineChart";
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
442
|
+
|
|
443
|
+
// src/primitives/badge/badge.constants.ts
|
|
444
|
+
var badgeSizes = ["small", "medium", "large"];
|
|
445
|
+
var badgeSizeClasses = {
|
|
446
|
+
small: cn("py-1.5 px-4 gap-1.5", "agg-type-label"),
|
|
447
|
+
medium: cn("py-1.5 px-4 gap-2", "agg-type-body"),
|
|
448
|
+
large: cn("py-2.5 px-6 gap-2", "agg-type-body")
|
|
449
|
+
};
|
|
450
|
+
var baseBadgeClasses = cn(
|
|
451
|
+
"inline-flex items-center justify-center rounded-agg-full font-agg-sans",
|
|
452
|
+
"bg-agg-secondary-hover text-agg-foreground whitespace-nowrap font-agg-normal"
|
|
453
|
+
);
|
|
454
|
+
|
|
455
|
+
// src/primitives/badge/index.tsx
|
|
456
|
+
import { useSdkUiConfig as useSdkUiConfig3 } from "@agg-market/hooks";
|
|
457
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
458
|
+
function Badge({
|
|
459
|
+
text,
|
|
460
|
+
prefix,
|
|
461
|
+
suffix,
|
|
462
|
+
size = "medium",
|
|
463
|
+
classNames,
|
|
464
|
+
onClick,
|
|
465
|
+
isActive = false
|
|
466
|
+
}) {
|
|
467
|
+
const { enableAnimations } = useSdkUiConfig3();
|
|
468
|
+
const resolvedText = `${text}`;
|
|
469
|
+
const resolvedAriaLabel = resolvedText.length > 0 ? resolvedText : void 0;
|
|
470
|
+
return /* @__PURE__ */ jsxs3(
|
|
471
|
+
"span",
|
|
472
|
+
__spreadProps(__spreadValues({
|
|
473
|
+
"aria-label": resolvedAriaLabel,
|
|
474
|
+
className: cn(
|
|
475
|
+
"group/agg-badge",
|
|
476
|
+
baseBadgeClasses,
|
|
477
|
+
badgeSizeClasses[size],
|
|
478
|
+
onClick ? "cursor-pointer hover:bg-agg-tertiary disabled:cursor-not-allowed" : "",
|
|
479
|
+
getMotionClassName(
|
|
480
|
+
enableAnimations,
|
|
481
|
+
"transition-[border-color,background-color] duration-200 ease-in-out"
|
|
482
|
+
),
|
|
483
|
+
isActive ? "border-agg-primary bg-agg-secondary! font-agg-bold!" : "border-transparent font-agg-normal",
|
|
484
|
+
classNames == null ? void 0 : classNames.root
|
|
485
|
+
)
|
|
486
|
+
}, onClick && { onClick }), {
|
|
487
|
+
children: [
|
|
488
|
+
prefix ? /* @__PURE__ */ jsx4("span", { className: classNames == null ? void 0 : classNames.prefix, children: prefix }) : null,
|
|
489
|
+
/* @__PURE__ */ jsx4("span", { className: cn("truncate", classNames == null ? void 0 : classNames.text), children: text }),
|
|
490
|
+
suffix ? /* @__PURE__ */ jsx4("span", { className: classNames == null ? void 0 : classNames.suffix, children: suffix }) : null
|
|
491
|
+
]
|
|
492
|
+
})
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
Badge.displayName = "Badge";
|
|
496
|
+
|
|
497
|
+
// src/primitives/search/search-empty-icon.tsx
|
|
498
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
499
|
+
var SearchEmptyIcon = (_a) => {
|
|
500
|
+
var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
|
|
501
|
+
return /* @__PURE__ */ jsxs4(
|
|
502
|
+
"svg",
|
|
503
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
504
|
+
viewBox: "0 0 40 40",
|
|
505
|
+
fill: "none",
|
|
506
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
507
|
+
className
|
|
508
|
+
}, getIconA11yProps(title)), props), {
|
|
509
|
+
children: [
|
|
510
|
+
title ? /* @__PURE__ */ jsx5("title", { children: title }) : null,
|
|
511
|
+
/* @__PURE__ */ jsx5("circle", { cx: "19.9987", cy: "20.0013", r: "9.2", stroke: "currentColor", strokeWidth: "1.6" }),
|
|
512
|
+
/* @__PURE__ */ jsx5(
|
|
513
|
+
"ellipse",
|
|
514
|
+
{
|
|
515
|
+
cx: "19.9987",
|
|
516
|
+
cy: "20.0012",
|
|
517
|
+
rx: "17.2",
|
|
518
|
+
ry: "6.6",
|
|
519
|
+
transform: "rotate(-35 19.9987 20.0012)",
|
|
520
|
+
stroke: "currentColor",
|
|
521
|
+
strokeWidth: "1.6"
|
|
522
|
+
}
|
|
523
|
+
)
|
|
524
|
+
]
|
|
525
|
+
})
|
|
526
|
+
);
|
|
527
|
+
};
|
|
528
|
+
SearchEmptyIcon.displayName = "SearchEmptyIcon";
|
|
529
|
+
|
|
530
|
+
// src/primitives/state-message/index.tsx
|
|
531
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
532
|
+
var iconClassName = "h-9 w-9 text-agg-muted-foreground";
|
|
533
|
+
var StateMessage = ({
|
|
534
|
+
ariaLabel,
|
|
535
|
+
tone = "empty",
|
|
536
|
+
title,
|
|
537
|
+
description,
|
|
538
|
+
actionLabel,
|
|
539
|
+
onAction,
|
|
540
|
+
className
|
|
541
|
+
}) => {
|
|
542
|
+
const icon = tone === "warning" ? /* @__PURE__ */ jsx6(WarningIcon, { className: iconClassName, "aria-hidden": true }) : /* @__PURE__ */ jsx6(SearchEmptyIcon, { className: iconClassName, "aria-hidden": true });
|
|
543
|
+
return /* @__PURE__ */ jsx6(
|
|
544
|
+
"div",
|
|
545
|
+
{
|
|
546
|
+
className: cn(
|
|
547
|
+
"flex min-h-[240px] w-full flex-col items-center justify-center px-5 py-10 text-center md:px-10",
|
|
548
|
+
className
|
|
549
|
+
),
|
|
550
|
+
role: "status",
|
|
551
|
+
"aria-live": "polite",
|
|
552
|
+
"aria-label": ariaLabel,
|
|
553
|
+
children: /* @__PURE__ */ jsxs5("div", { className: "flex max-w-[360px] flex-col items-center gap-6", children: [
|
|
554
|
+
icon,
|
|
555
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col items-center gap-2", children: [
|
|
556
|
+
/* @__PURE__ */ jsx6(Typography, { variant: "body-large-strong", children: title }),
|
|
557
|
+
description ? /* @__PURE__ */ jsx6(Typography, { variant: "body", className: "whitespace-pre-line text-agg-muted-foreground", children: description }) : null
|
|
558
|
+
] }),
|
|
559
|
+
actionLabel && onAction ? /* @__PURE__ */ jsx6(
|
|
560
|
+
Button,
|
|
561
|
+
{
|
|
562
|
+
variant: "tertiary",
|
|
563
|
+
size: "large",
|
|
564
|
+
className: "text-agg-base leading-agg-6",
|
|
565
|
+
"aria-label": actionLabel,
|
|
566
|
+
onClick: onAction,
|
|
567
|
+
children: actionLabel
|
|
568
|
+
}
|
|
569
|
+
) : null
|
|
570
|
+
] })
|
|
571
|
+
}
|
|
572
|
+
);
|
|
573
|
+
};
|
|
574
|
+
StateMessage.displayName = "StateMessage";
|
|
575
|
+
|
|
576
|
+
export {
|
|
577
|
+
SwitchButton,
|
|
578
|
+
typographyVariants,
|
|
579
|
+
Typography,
|
|
580
|
+
LineChart,
|
|
581
|
+
badgeSizes,
|
|
582
|
+
Badge,
|
|
583
|
+
SearchEmptyIcon,
|
|
584
|
+
StateMessage
|
|
585
|
+
};
|