@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
package/dist/chunk-4S3I6X7F.mjs
DELETED
|
@@ -1,855 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Modal
|
|
3
|
-
} from "./chunk-5K7VXAYM.mjs";
|
|
4
|
-
import {
|
|
5
|
-
VenueLogo
|
|
6
|
-
} from "./chunk-PORVP72S.mjs";
|
|
7
|
-
import {
|
|
8
|
-
BestPricesIcon,
|
|
9
|
-
CheckCircleIcon,
|
|
10
|
-
ChevronRightIcon,
|
|
11
|
-
CreateAccountIcon,
|
|
12
|
-
DocumentIcon,
|
|
13
|
-
LinkAccountsIcon,
|
|
14
|
-
PlaySquareIcon,
|
|
15
|
-
ProfileIcon,
|
|
16
|
-
StayInControlIcon,
|
|
17
|
-
WarningIcon
|
|
18
|
-
} from "./chunk-PZTHM6WG.mjs";
|
|
19
|
-
import {
|
|
20
|
-
Button
|
|
21
|
-
} from "./chunk-KAGYJ4XT.mjs";
|
|
22
|
-
import {
|
|
23
|
-
__async,
|
|
24
|
-
cn
|
|
25
|
-
} from "./chunk-GJ4U5NCE.mjs";
|
|
26
|
-
|
|
27
|
-
// src/onboarding/index.tsx
|
|
28
|
-
import { useCallback as useCallback5, useEffect, useState as useState5 } from "react";
|
|
29
|
-
import { useLabels as useLabels6 } from "@agg-market/hooks";
|
|
30
|
-
import * as Dialog3 from "@radix-ui/react-dialog";
|
|
31
|
-
|
|
32
|
-
// src/onboarding/onboarding-modal.constants.ts
|
|
33
|
-
var HOW_IT_WORKS_FEATURE_KEYS = [
|
|
34
|
-
"createAccount",
|
|
35
|
-
"linkAccounts",
|
|
36
|
-
"bestPrices",
|
|
37
|
-
"stayInControl"
|
|
38
|
-
];
|
|
39
|
-
var ONBOARDING_STEPS = {
|
|
40
|
-
HOW_IT_WORKS: 0,
|
|
41
|
-
PROFILE_SETUP: 1,
|
|
42
|
-
CONNECT_ACCOUNTS: 2
|
|
43
|
-
};
|
|
44
|
-
var ONCHAIN_VENUES = [
|
|
45
|
-
"polymarket",
|
|
46
|
-
"opinion",
|
|
47
|
-
"probable"
|
|
48
|
-
];
|
|
49
|
-
|
|
50
|
-
// src/onboarding/steps/how-it-works.tsx
|
|
51
|
-
import { useCallback, useRef, useState } from "react";
|
|
52
|
-
import { useLabels } from "@agg-market/hooks";
|
|
53
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
54
|
-
var defaultIcons = {
|
|
55
|
-
createAccount: /* @__PURE__ */ jsx(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
56
|
-
linkAccounts: /* @__PURE__ */ jsx(LinkAccountsIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
57
|
-
bestPrices: /* @__PURE__ */ jsx(BestPricesIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
58
|
-
stayInControl: /* @__PURE__ */ jsx(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
|
|
59
|
-
};
|
|
60
|
-
var HowItWorksStep = ({ onContinue, icons }) => {
|
|
61
|
-
const labels = useLabels();
|
|
62
|
-
const scrollRef = useRef(null);
|
|
63
|
-
const [showTopGradient, setShowTopGradient] = useState(false);
|
|
64
|
-
const [showBottomGradient, setShowBottomGradient] = useState(true);
|
|
65
|
-
const handleScroll = useCallback(() => {
|
|
66
|
-
const el = scrollRef.current;
|
|
67
|
-
if (!el)
|
|
68
|
-
return;
|
|
69
|
-
setShowTopGradient(el.scrollTop > 0);
|
|
70
|
-
setShowBottomGradient(el.scrollTop + el.clientHeight < el.scrollHeight - 1);
|
|
71
|
-
}, []);
|
|
72
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6 h-[600px] sm:h-auto", children: [
|
|
73
|
-
/* @__PURE__ */ jsx("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.howItWorks.title }),
|
|
74
|
-
/* @__PURE__ */ jsxs("div", { className: "relative flex-1 min-h-0 sm:flex-initial", children: [
|
|
75
|
-
/* @__PURE__ */ jsx(
|
|
76
|
-
"div",
|
|
77
|
-
{
|
|
78
|
-
ref: scrollRef,
|
|
79
|
-
onScroll: handleScroll,
|
|
80
|
-
className: "flex flex-col gap-4 overflow-y-auto sm:overflow-visible h-full",
|
|
81
|
-
children: HOW_IT_WORKS_FEATURE_KEYS.map((featureKey) => {
|
|
82
|
-
var _a;
|
|
83
|
-
const icon = (_a = icons == null ? void 0 : icons[featureKey]) != null ? _a : defaultIcons[featureKey];
|
|
84
|
-
const feature = labels.onboarding.howItWorks.features[featureKey];
|
|
85
|
-
return /* @__PURE__ */ jsxs(
|
|
86
|
-
"div",
|
|
87
|
-
{
|
|
88
|
-
className: cn(
|
|
89
|
-
"flex items-center gap-4 py-4 px-5 sm:px-4",
|
|
90
|
-
"rounded-agg-md",
|
|
91
|
-
"bg-agg-secondary-hover"
|
|
92
|
-
),
|
|
93
|
-
children: [
|
|
94
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0 gap-[6px]", children: [
|
|
95
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: feature.title }),
|
|
96
|
-
/* @__PURE__ */ jsx("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: feature.description })
|
|
97
|
-
] }),
|
|
98
|
-
icon ? /* @__PURE__ */ jsx("div", { className: "hidden shrink-0 items-center justify-center text-agg-muted-foreground sm:flex", children: icon }) : null
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
featureKey
|
|
102
|
-
);
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
/* @__PURE__ */ jsx(
|
|
107
|
-
"div",
|
|
108
|
-
{
|
|
109
|
-
className: cn(
|
|
110
|
-
"pointer-events-none absolute inset-x-0 top-0 h-20",
|
|
111
|
-
"bg-gradient-to-b from-agg-secondary to-transparent",
|
|
112
|
-
"sm:hidden transition-opacity",
|
|
113
|
-
showTopGradient ? "opacity-100" : "opacity-0"
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
),
|
|
117
|
-
/* @__PURE__ */ jsx(
|
|
118
|
-
"div",
|
|
119
|
-
{
|
|
120
|
-
className: cn(
|
|
121
|
-
"pointer-events-none absolute inset-x-0 bottom-0 h-20",
|
|
122
|
-
"bg-gradient-to-t from-agg-secondary to-transparent",
|
|
123
|
-
"sm:hidden transition-opacity",
|
|
124
|
-
showBottomGradient ? "opacity-100" : "opacity-0"
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
] }),
|
|
129
|
-
/* @__PURE__ */ jsx(Button, { variant: "primary", size: "large", className: "w-full", onClick: onContinue, children: labels.onboarding.howItWorks.continue })
|
|
130
|
-
] });
|
|
131
|
-
};
|
|
132
|
-
HowItWorksStep.displayName = "HowItWorksStep";
|
|
133
|
-
|
|
134
|
-
// src/onboarding/steps/profile-setup.tsx
|
|
135
|
-
import { useCallback as useCallback2, useRef as useRef2, useState as useState2 } from "react";
|
|
136
|
-
import { useLabels as useLabels2 } from "@agg-market/hooks";
|
|
137
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
138
|
-
var ProfileSetupStep = ({ onContinue }) => {
|
|
139
|
-
const labels = useLabels2();
|
|
140
|
-
const [username, setUsername] = useState2("");
|
|
141
|
-
const [avatarFile, setAvatarFile] = useState2();
|
|
142
|
-
const [avatarPreview, setAvatarPreview] = useState2();
|
|
143
|
-
const fileInputRef = useRef2(null);
|
|
144
|
-
const handleAvatarClick = useCallback2(() => {
|
|
145
|
-
var _a;
|
|
146
|
-
(_a = fileInputRef.current) == null ? void 0 : _a.click();
|
|
147
|
-
}, []);
|
|
148
|
-
const handleFileChange = useCallback2((e) => {
|
|
149
|
-
var _a;
|
|
150
|
-
const file = (_a = e.target.files) == null ? void 0 : _a[0];
|
|
151
|
-
if (!file)
|
|
152
|
-
return;
|
|
153
|
-
setAvatarFile(file);
|
|
154
|
-
const reader = new FileReader();
|
|
155
|
-
reader.onload = (event) => {
|
|
156
|
-
var _a2;
|
|
157
|
-
setAvatarPreview((_a2 = event.target) == null ? void 0 : _a2.result);
|
|
158
|
-
};
|
|
159
|
-
reader.readAsDataURL(file);
|
|
160
|
-
}, []);
|
|
161
|
-
const handleContinue = useCallback2(() => {
|
|
162
|
-
onContinue({
|
|
163
|
-
username,
|
|
164
|
-
avatarFile,
|
|
165
|
-
avatarPreview
|
|
166
|
-
});
|
|
167
|
-
}, [username, avatarFile, avatarPreview, onContinue]);
|
|
168
|
-
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-7", children: [
|
|
169
|
-
/* @__PURE__ */ jsx2("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.profileSetup.title }),
|
|
170
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-5 items-center w-full", children: [
|
|
171
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex justify-center", children: [
|
|
172
|
-
/* @__PURE__ */ jsx2(
|
|
173
|
-
"button",
|
|
174
|
-
{
|
|
175
|
-
type: "button",
|
|
176
|
-
onClick: handleAvatarClick,
|
|
177
|
-
className: cn(
|
|
178
|
-
"relative flex items-center justify-center",
|
|
179
|
-
"h-[80px] w-[80px]",
|
|
180
|
-
"rounded-agg-full",
|
|
181
|
-
"border border-dashed border-agg-separator",
|
|
182
|
-
"bg-agg-secondary-hover",
|
|
183
|
-
"hover:bg-agg-tertiary",
|
|
184
|
-
"transition-colors cursor-pointer",
|
|
185
|
-
"overflow-hidden"
|
|
186
|
-
),
|
|
187
|
-
"aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
|
|
188
|
-
children: avatarPreview ? /* @__PURE__ */ jsx2(
|
|
189
|
-
"img",
|
|
190
|
-
{
|
|
191
|
-
src: avatarPreview,
|
|
192
|
-
alt: labels.onboarding.profileSetup.profilePreviewAlt,
|
|
193
|
-
className: "h-full w-full object-cover"
|
|
194
|
-
}
|
|
195
|
-
) : /* @__PURE__ */ jsx2(ProfileIcon, { className: "h-7 w-7 text-agg-muted-foreground" })
|
|
196
|
-
}
|
|
197
|
-
),
|
|
198
|
-
/* @__PURE__ */ jsx2(
|
|
199
|
-
"input",
|
|
200
|
-
{
|
|
201
|
-
ref: fileInputRef,
|
|
202
|
-
type: "file",
|
|
203
|
-
accept: "image/*",
|
|
204
|
-
onChange: handleFileChange,
|
|
205
|
-
className: "hidden",
|
|
206
|
-
"aria-hidden": "true"
|
|
207
|
-
}
|
|
208
|
-
)
|
|
209
|
-
] }),
|
|
210
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
211
|
-
/* @__PURE__ */ jsx2(
|
|
212
|
-
"label",
|
|
213
|
-
{
|
|
214
|
-
htmlFor: "onboarding-username",
|
|
215
|
-
className: "text-agg-sm font-agg-bold text-agg-foreground",
|
|
216
|
-
children: labels.onboarding.profileSetup.usernameLabel
|
|
217
|
-
}
|
|
218
|
-
),
|
|
219
|
-
/* @__PURE__ */ jsx2(
|
|
220
|
-
"input",
|
|
221
|
-
{
|
|
222
|
-
id: "onboarding-username",
|
|
223
|
-
type: "text",
|
|
224
|
-
value: username,
|
|
225
|
-
onChange: (e) => setUsername(e.target.value),
|
|
226
|
-
placeholder: labels.onboarding.profileSetup.usernamePlaceholder,
|
|
227
|
-
className: cn(
|
|
228
|
-
"w-full px-3 py-2.5",
|
|
229
|
-
"rounded-[4px]",
|
|
230
|
-
"border border-agg-separator",
|
|
231
|
-
"bg-agg-secondary text-agg-foreground",
|
|
232
|
-
"placeholder:text-agg-muted-foreground",
|
|
233
|
-
"outline-none",
|
|
234
|
-
"hover:bg-agg-secondary-hover",
|
|
235
|
-
"focus:border-agg-primary focus:ring-1 focus:ring-agg-primary",
|
|
236
|
-
"transition-colors",
|
|
237
|
-
"text-agg-sm sm:text-agg-base"
|
|
238
|
-
)
|
|
239
|
-
}
|
|
240
|
-
)
|
|
241
|
-
] })
|
|
242
|
-
] }),
|
|
243
|
-
/* @__PURE__ */ jsx2(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
|
|
244
|
-
] });
|
|
245
|
-
};
|
|
246
|
-
ProfileSetupStep.displayName = "ProfileSetupStep";
|
|
247
|
-
|
|
248
|
-
// src/onboarding/steps/connect-accounts.tsx
|
|
249
|
-
import { useLabels as useLabels3 } from "@agg-market/hooks";
|
|
250
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
251
|
-
var OnchainVenueLogos = () => {
|
|
252
|
-
return /* @__PURE__ */ jsx3("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ jsx3("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ jsx3(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
|
|
253
|
-
};
|
|
254
|
-
var VenueCard = ({
|
|
255
|
-
logos,
|
|
256
|
-
title,
|
|
257
|
-
mobileTitle,
|
|
258
|
-
description,
|
|
259
|
-
mobileDescription,
|
|
260
|
-
onConnect,
|
|
261
|
-
connected = false
|
|
262
|
-
}) => {
|
|
263
|
-
const labels = useLabels3();
|
|
264
|
-
const action = connected ? /* @__PURE__ */ jsx3(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ jsx3(
|
|
265
|
-
Button,
|
|
266
|
-
{
|
|
267
|
-
variant: "tertiary",
|
|
268
|
-
size: "large",
|
|
269
|
-
className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
|
|
270
|
-
onClick: onConnect,
|
|
271
|
-
children: labels.onboarding.connectAccounts.connect
|
|
272
|
-
}
|
|
273
|
-
);
|
|
274
|
-
const mobileAction = connected ? /* @__PURE__ */ jsx3(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ jsx3(
|
|
275
|
-
Button,
|
|
276
|
-
{
|
|
277
|
-
variant: "tertiary",
|
|
278
|
-
size: "medium",
|
|
279
|
-
className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
|
|
280
|
-
onClick: onConnect,
|
|
281
|
-
suffix: /* @__PURE__ */ jsx3(ChevronRightIcon, { className: "h-4 w-4" }),
|
|
282
|
-
children: labels.onboarding.connectAccounts.connectAccount
|
|
283
|
-
}
|
|
284
|
-
);
|
|
285
|
-
return /* @__PURE__ */ jsxs3(
|
|
286
|
-
"div",
|
|
287
|
-
{
|
|
288
|
-
className: cn(
|
|
289
|
-
"rounded-agg-md p-5 transition-colors",
|
|
290
|
-
connected ? "bg-agg-success/5" : "bg-agg-secondary-hover hover:bg-agg-tertiary"
|
|
291
|
-
),
|
|
292
|
-
children: [
|
|
293
|
-
/* @__PURE__ */ jsxs3("div", { className: "hidden sm:flex items-center justify-between", children: [
|
|
294
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-5", children: [
|
|
295
|
-
/* @__PURE__ */ jsx3("div", { className: "shrink-0", children: logos }),
|
|
296
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-[2px]", children: [
|
|
297
|
-
/* @__PURE__ */ jsx3("p", { className: "text-agg-base font-agg-bold text-agg-foreground", children: title }),
|
|
298
|
-
/* @__PURE__ */ jsx3("p", { className: "text-agg-sm text-agg-foreground", children: description })
|
|
299
|
-
] })
|
|
300
|
-
] }),
|
|
301
|
-
/* @__PURE__ */ jsx3("div", { className: "shrink-0", children: action })
|
|
302
|
-
] }),
|
|
303
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-3 sm:hidden", children: [
|
|
304
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-3", children: [
|
|
305
|
-
/* @__PURE__ */ jsx3("div", { className: "shrink-0", children: logos }),
|
|
306
|
-
/* @__PURE__ */ jsx3("p", { className: "text-agg-lg font-agg-bold text-agg-foreground", children: mobileTitle != null ? mobileTitle : title })
|
|
307
|
-
] }),
|
|
308
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-start gap-2", children: [
|
|
309
|
-
/* @__PURE__ */ jsx3("p", { className: "text-agg-base text-agg-foreground", children: mobileDescription != null ? mobileDescription : description }),
|
|
310
|
-
mobileAction
|
|
311
|
-
] })
|
|
312
|
-
] })
|
|
313
|
-
]
|
|
314
|
-
}
|
|
315
|
-
);
|
|
316
|
-
};
|
|
317
|
-
var ConnectAccountsStep = ({
|
|
318
|
-
onConnectOnchain,
|
|
319
|
-
onConnectKalshi,
|
|
320
|
-
onContinue,
|
|
321
|
-
connectedOnchain = false,
|
|
322
|
-
connectedKalshi = false
|
|
323
|
-
}) => {
|
|
324
|
-
const labels = useLabels3();
|
|
325
|
-
const canContinue = connectedOnchain || connectedKalshi;
|
|
326
|
-
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-6", children: [
|
|
327
|
-
/* @__PURE__ */ jsx3("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
|
|
328
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-4", children: [
|
|
329
|
-
/* @__PURE__ */ jsx3(
|
|
330
|
-
VenueCard,
|
|
331
|
-
{
|
|
332
|
-
logos: /* @__PURE__ */ jsx3(OnchainVenueLogos, {}),
|
|
333
|
-
title: labels.onboarding.connectAccounts.onchainTitle,
|
|
334
|
-
mobileTitle: labels.onboarding.connectAccounts.onchainMobileTitle(
|
|
335
|
-
ONCHAIN_VENUES.length - 1
|
|
336
|
-
),
|
|
337
|
-
description: labels.onboarding.connectAccounts.onchainDescription,
|
|
338
|
-
mobileDescription: labels.onboarding.connectAccounts.onchainMobileDescription,
|
|
339
|
-
onConnect: onConnectOnchain,
|
|
340
|
-
connected: connectedOnchain
|
|
341
|
-
}
|
|
342
|
-
),
|
|
343
|
-
/* @__PURE__ */ jsx3(
|
|
344
|
-
VenueCard,
|
|
345
|
-
{
|
|
346
|
-
logos: /* @__PURE__ */ jsx3("div", { className: "sm:flex sm:w-14 sm:items-center sm:justify-center", children: /* @__PURE__ */ jsx3(
|
|
347
|
-
VenueLogo,
|
|
348
|
-
{
|
|
349
|
-
venue: "kalshi",
|
|
350
|
-
variant: "logo",
|
|
351
|
-
size: "large",
|
|
352
|
-
className: "h-6 w-6 sm:h-9 sm:w-9"
|
|
353
|
-
}
|
|
354
|
-
) }),
|
|
355
|
-
title: labels.onboarding.connectAccounts.kalshiTitle,
|
|
356
|
-
mobileTitle: labels.onboarding.connectAccounts.kalshiMobileTitle,
|
|
357
|
-
description: labels.onboarding.connectAccounts.kalshiDescription,
|
|
358
|
-
mobileDescription: labels.onboarding.connectAccounts.kalshiMobileDescription,
|
|
359
|
-
onConnect: onConnectKalshi,
|
|
360
|
-
connected: connectedKalshi
|
|
361
|
-
}
|
|
362
|
-
)
|
|
363
|
-
] }),
|
|
364
|
-
/* @__PURE__ */ jsx3(
|
|
365
|
-
Button,
|
|
366
|
-
{
|
|
367
|
-
variant: "primary",
|
|
368
|
-
size: "large",
|
|
369
|
-
className: "w-full",
|
|
370
|
-
onClick: onContinue,
|
|
371
|
-
disabled: !canContinue,
|
|
372
|
-
children: labels.onboarding.connectAccounts.continue
|
|
373
|
-
}
|
|
374
|
-
)
|
|
375
|
-
] });
|
|
376
|
-
};
|
|
377
|
-
ConnectAccountsStep.displayName = "ConnectAccountsStep";
|
|
378
|
-
|
|
379
|
-
// src/onboarding/steps/connect-kalshi-modal.tsx
|
|
380
|
-
import { useCallback as useCallback3, useState as useState3 } from "react";
|
|
381
|
-
import { useLabels as useLabels4 } from "@agg-market/hooks";
|
|
382
|
-
import * as Dialog from "@radix-ui/react-dialog";
|
|
383
|
-
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
384
|
-
var ConnectKalshiModal = ({
|
|
385
|
-
open,
|
|
386
|
-
onOpenChange,
|
|
387
|
-
onVerify
|
|
388
|
-
}) => {
|
|
389
|
-
const labels = useLabels4();
|
|
390
|
-
const [apiKeyId, setApiKeyId] = useState3("");
|
|
391
|
-
const [privateKey, setPrivateKey] = useState3("");
|
|
392
|
-
const [verifying, setVerifying] = useState3(false);
|
|
393
|
-
const [error, setError] = useState3();
|
|
394
|
-
const canVerify = apiKeyId.trim().length > 0 && privateKey.trim().length > 0;
|
|
395
|
-
const handleCancel = useCallback3(() => {
|
|
396
|
-
onOpenChange(false);
|
|
397
|
-
}, [onOpenChange]);
|
|
398
|
-
const handleVerify = useCallback3(() => __async(void 0, null, function* () {
|
|
399
|
-
if (!canVerify || verifying)
|
|
400
|
-
return;
|
|
401
|
-
setVerifying(true);
|
|
402
|
-
setError(void 0);
|
|
403
|
-
try {
|
|
404
|
-
const credentials = {
|
|
405
|
-
apiKeyId: apiKeyId.trim(),
|
|
406
|
-
privateKey: privateKey.trim()
|
|
407
|
-
};
|
|
408
|
-
yield onVerify(credentials);
|
|
409
|
-
setApiKeyId("");
|
|
410
|
-
setPrivateKey("");
|
|
411
|
-
onOpenChange(false);
|
|
412
|
-
} catch (err) {
|
|
413
|
-
setError(
|
|
414
|
-
err instanceof Error ? err.message : labels.onboarding.connectKalshiModal.fallbackError
|
|
415
|
-
);
|
|
416
|
-
} finally {
|
|
417
|
-
setVerifying(false);
|
|
418
|
-
}
|
|
419
|
-
}), [
|
|
420
|
-
apiKeyId,
|
|
421
|
-
canVerify,
|
|
422
|
-
labels.onboarding.connectKalshiModal.fallbackError,
|
|
423
|
-
onOpenChange,
|
|
424
|
-
onVerify,
|
|
425
|
-
privateKey,
|
|
426
|
-
verifying
|
|
427
|
-
]);
|
|
428
|
-
const handleOpenChange = useCallback3(
|
|
429
|
-
(value) => {
|
|
430
|
-
if (value) {
|
|
431
|
-
setApiKeyId("");
|
|
432
|
-
setPrivateKey("");
|
|
433
|
-
setError(void 0);
|
|
434
|
-
setVerifying(false);
|
|
435
|
-
}
|
|
436
|
-
onOpenChange(value);
|
|
437
|
-
},
|
|
438
|
-
[onOpenChange]
|
|
439
|
-
);
|
|
440
|
-
return /* @__PURE__ */ jsx4(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs4(
|
|
441
|
-
Modal.Container,
|
|
442
|
-
{
|
|
443
|
-
maxWidth: "600px",
|
|
444
|
-
"aria-label": labels.onboarding.connectKalshiModal.ariaLabel,
|
|
445
|
-
classNames: { container: "!rounded-agg-lg" },
|
|
446
|
-
children: [
|
|
447
|
-
/* @__PURE__ */ jsx4(Dialog.Title, { className: "sr-only", children: labels.onboarding.connectKalshiModal.title }),
|
|
448
|
-
/* @__PURE__ */ jsx4(
|
|
449
|
-
Modal.Header,
|
|
450
|
-
{
|
|
451
|
-
hideClose: false,
|
|
452
|
-
hideBorder: true,
|
|
453
|
-
classNames: {
|
|
454
|
-
root: "!min-h-0",
|
|
455
|
-
container: "!py-[18px] !px-8"
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
),
|
|
459
|
-
/* @__PURE__ */ jsx4(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-8 items-center", children: [
|
|
460
|
-
/* @__PURE__ */ jsx4(
|
|
461
|
-
VenueLogo,
|
|
462
|
-
{
|
|
463
|
-
venue: "kalshi",
|
|
464
|
-
variant: "logo",
|
|
465
|
-
size: "large",
|
|
466
|
-
className: "h-[60px] w-[60px]"
|
|
467
|
-
}
|
|
468
|
-
),
|
|
469
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-4 items-center text-center", children: [
|
|
470
|
-
/* @__PURE__ */ jsx4("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
|
|
471
|
-
/* @__PURE__ */ jsx4("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
|
|
472
|
-
] }),
|
|
473
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
474
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-3 rounded-agg-lg bg-agg-secondary-hover p-4", children: [
|
|
475
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1", children: [
|
|
476
|
-
/* @__PURE__ */ jsx4("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
|
|
477
|
-
/* @__PURE__ */ jsx4("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
|
|
478
|
-
] }),
|
|
479
|
-
/* @__PURE__ */ jsxs4("div", { className: "space-y-0 text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
480
|
-
/* @__PURE__ */ jsx4("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
|
|
481
|
-
/* @__PURE__ */ jsxs4("p", { children: [
|
|
482
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
|
|
483
|
-
" ",
|
|
484
|
-
/* @__PURE__ */ jsx4("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
|
|
485
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
|
|
486
|
-
" ",
|
|
487
|
-
/* @__PURE__ */ jsx4("span", { className: "text-agg-foreground underline", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl })
|
|
488
|
-
] }),
|
|
489
|
-
/* @__PURE__ */ jsxs4("p", { children: [
|
|
490
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
|
|
491
|
-
" ",
|
|
492
|
-
/* @__PURE__ */ jsx4("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
|
|
493
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
|
|
494
|
-
] }),
|
|
495
|
-
/* @__PURE__ */ jsxs4("p", { children: [
|
|
496
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
|
|
497
|
-
" ",
|
|
498
|
-
/* @__PURE__ */ jsx4("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
|
|
499
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
|
|
500
|
-
] }),
|
|
501
|
-
/* @__PURE__ */ jsx4("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
|
|
502
|
-
] }),
|
|
503
|
-
/* @__PURE__ */ jsxs4("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
504
|
-
labels.onboarding.connectKalshiModal.stepOne.footerLineOne,
|
|
505
|
-
/* @__PURE__ */ jsx4("br", {}),
|
|
506
|
-
labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
|
|
507
|
-
] })
|
|
508
|
-
] }),
|
|
509
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-3 rounded-agg-lg bg-agg-secondary-hover p-4", children: [
|
|
510
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1", children: [
|
|
511
|
-
/* @__PURE__ */ jsx4("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
|
|
512
|
-
/* @__PURE__ */ jsx4("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
|
|
513
|
-
] }),
|
|
514
|
-
/* @__PURE__ */ jsx4("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
|
|
515
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
|
|
516
|
-
/* @__PURE__ */ jsx4(
|
|
517
|
-
"label",
|
|
518
|
-
{
|
|
519
|
-
htmlFor: "kalshi-api-key-id",
|
|
520
|
-
className: "text-agg-sm font-agg-bold text-agg-foreground",
|
|
521
|
-
children: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdLabel
|
|
522
|
-
}
|
|
523
|
-
),
|
|
524
|
-
/* @__PURE__ */ jsx4(
|
|
525
|
-
"input",
|
|
526
|
-
{
|
|
527
|
-
id: "kalshi-api-key-id",
|
|
528
|
-
type: "text",
|
|
529
|
-
value: apiKeyId,
|
|
530
|
-
onChange: (e) => setApiKeyId(e.target.value),
|
|
531
|
-
placeholder: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdPlaceholder,
|
|
532
|
-
className: cn(
|
|
533
|
-
"w-full px-3 py-2.5 h-10",
|
|
534
|
-
"rounded border border-agg-separator",
|
|
535
|
-
"bg-agg-secondary text-agg-base text-agg-foreground",
|
|
536
|
-
"placeholder:text-agg-muted-foreground",
|
|
537
|
-
"outline-none",
|
|
538
|
-
"focus:border-agg-primary focus:ring-1 focus:ring-agg-primary",
|
|
539
|
-
"transition-colors"
|
|
540
|
-
)
|
|
541
|
-
}
|
|
542
|
-
)
|
|
543
|
-
] }),
|
|
544
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
|
|
545
|
-
/* @__PURE__ */ jsx4(
|
|
546
|
-
"label",
|
|
547
|
-
{
|
|
548
|
-
htmlFor: "kalshi-private-key",
|
|
549
|
-
className: "text-agg-sm font-agg-bold text-agg-foreground",
|
|
550
|
-
children: labels.onboarding.connectKalshiModal.stepTwo.privateKeyLabel
|
|
551
|
-
}
|
|
552
|
-
),
|
|
553
|
-
/* @__PURE__ */ jsx4(
|
|
554
|
-
"textarea",
|
|
555
|
-
{
|
|
556
|
-
id: "kalshi-private-key",
|
|
557
|
-
value: privateKey,
|
|
558
|
-
onChange: (e) => setPrivateKey(e.target.value),
|
|
559
|
-
placeholder: labels.onboarding.connectKalshiModal.stepTwo.privateKeyPlaceholder,
|
|
560
|
-
rows: 3,
|
|
561
|
-
className: cn(
|
|
562
|
-
"w-full px-3 py-2.5",
|
|
563
|
-
"rounded border border-agg-separator",
|
|
564
|
-
"bg-agg-secondary text-agg-base text-agg-foreground",
|
|
565
|
-
"placeholder:text-agg-muted-foreground",
|
|
566
|
-
"outline-none resize-none",
|
|
567
|
-
"focus:border-agg-primary focus:ring-1 focus:ring-agg-primary",
|
|
568
|
-
"transition-colors"
|
|
569
|
-
)
|
|
570
|
-
}
|
|
571
|
-
)
|
|
572
|
-
] })
|
|
573
|
-
] })
|
|
574
|
-
] }),
|
|
575
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between w-full", children: [
|
|
576
|
-
/* @__PURE__ */ jsx4("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
|
|
577
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
|
|
578
|
-
/* @__PURE__ */ jsxs4(
|
|
579
|
-
"a",
|
|
580
|
-
{
|
|
581
|
-
href: "#",
|
|
582
|
-
className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary hover:text-agg-primary-hover",
|
|
583
|
-
children: [
|
|
584
|
-
/* @__PURE__ */ jsx4(DocumentIcon, { className: "h-4 w-4" }),
|
|
585
|
-
labels.onboarding.connectKalshiModal.help.docsLinkLabel
|
|
586
|
-
]
|
|
587
|
-
}
|
|
588
|
-
),
|
|
589
|
-
/* @__PURE__ */ jsx4("span", { className: "h-3 w-px bg-agg-separator" }),
|
|
590
|
-
/* @__PURE__ */ jsxs4(
|
|
591
|
-
"a",
|
|
592
|
-
{
|
|
593
|
-
href: "#",
|
|
594
|
-
className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary hover:text-agg-primary-hover",
|
|
595
|
-
children: [
|
|
596
|
-
/* @__PURE__ */ jsx4(PlaySquareIcon, { className: "h-4 w-4" }),
|
|
597
|
-
labels.onboarding.connectKalshiModal.help.tutorialLinkLabel
|
|
598
|
-
]
|
|
599
|
-
}
|
|
600
|
-
)
|
|
601
|
-
] })
|
|
602
|
-
] }),
|
|
603
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-5 items-center", children: [
|
|
604
|
-
error ? /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
|
|
605
|
-
/* @__PURE__ */ jsx4(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
|
|
606
|
-
/* @__PURE__ */ jsx4("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
|
|
607
|
-
] }) : null,
|
|
608
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3 justify-center", children: [
|
|
609
|
-
/* @__PURE__ */ jsx4(Button, { variant: "secondary", size: "large", onClick: handleCancel, children: labels.onboarding.connectKalshiModal.actions.cancel }),
|
|
610
|
-
/* @__PURE__ */ jsx4(
|
|
611
|
-
Button,
|
|
612
|
-
{
|
|
613
|
-
variant: "primary",
|
|
614
|
-
size: "large",
|
|
615
|
-
onClick: handleVerify,
|
|
616
|
-
disabled: !canVerify,
|
|
617
|
-
isLoading: verifying,
|
|
618
|
-
children: labels.onboarding.connectKalshiModal.actions.verifyConnection
|
|
619
|
-
}
|
|
620
|
-
)
|
|
621
|
-
] })
|
|
622
|
-
] })
|
|
623
|
-
] }) })
|
|
624
|
-
]
|
|
625
|
-
}
|
|
626
|
-
) });
|
|
627
|
-
};
|
|
628
|
-
ConnectKalshiModal.displayName = "ConnectKalshiModal";
|
|
629
|
-
|
|
630
|
-
// src/onboarding/steps/connect-onchain-modal.tsx
|
|
631
|
-
import { useCallback as useCallback4, useState as useState4 } from "react";
|
|
632
|
-
import { useLabels as useLabels5 } from "@agg-market/hooks";
|
|
633
|
-
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
634
|
-
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
635
|
-
var ConnectOnchainModal = ({
|
|
636
|
-
open,
|
|
637
|
-
onOpenChange,
|
|
638
|
-
onConnect
|
|
639
|
-
}) => {
|
|
640
|
-
const labels = useLabels5();
|
|
641
|
-
const [connecting, setConnecting] = useState4(false);
|
|
642
|
-
const [error, setError] = useState4();
|
|
643
|
-
const handleCancel = useCallback4(() => {
|
|
644
|
-
onOpenChange(false);
|
|
645
|
-
}, [onOpenChange]);
|
|
646
|
-
const handleConnect = useCallback4(() => __async(void 0, null, function* () {
|
|
647
|
-
if (connecting)
|
|
648
|
-
return;
|
|
649
|
-
setConnecting(true);
|
|
650
|
-
setError(void 0);
|
|
651
|
-
try {
|
|
652
|
-
yield onConnect();
|
|
653
|
-
onOpenChange(false);
|
|
654
|
-
} catch (err) {
|
|
655
|
-
setError(
|
|
656
|
-
err instanceof Error ? err.message : labels.onboarding.connectOnchainModal.fallbackError
|
|
657
|
-
);
|
|
658
|
-
} finally {
|
|
659
|
-
setConnecting(false);
|
|
660
|
-
}
|
|
661
|
-
}), [connecting, labels.onboarding.connectOnchainModal.fallbackError, onConnect, onOpenChange]);
|
|
662
|
-
const handleOpenChange = useCallback4(
|
|
663
|
-
(value) => {
|
|
664
|
-
if (value) {
|
|
665
|
-
setError(void 0);
|
|
666
|
-
setConnecting(false);
|
|
667
|
-
}
|
|
668
|
-
onOpenChange(value);
|
|
669
|
-
},
|
|
670
|
-
[onOpenChange]
|
|
671
|
-
);
|
|
672
|
-
return /* @__PURE__ */ jsx5(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs5(
|
|
673
|
-
Modal.Container,
|
|
674
|
-
{
|
|
675
|
-
maxWidth: "600px",
|
|
676
|
-
"aria-label": labels.onboarding.connectOnchainModal.ariaLabel,
|
|
677
|
-
classNames: { container: "!rounded-agg-lg" },
|
|
678
|
-
children: [
|
|
679
|
-
/* @__PURE__ */ jsx5(Dialog2.Title, { className: "sr-only", children: labels.onboarding.connectOnchainModal.title }),
|
|
680
|
-
/* @__PURE__ */ jsx5(
|
|
681
|
-
Modal.Header,
|
|
682
|
-
{
|
|
683
|
-
hideClose: false,
|
|
684
|
-
hideBorder: true,
|
|
685
|
-
classNames: {
|
|
686
|
-
root: "!min-h-0",
|
|
687
|
-
container: "!py-[18px] !px-8"
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
),
|
|
691
|
-
/* @__PURE__ */ jsx5(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-8 items-center", children: [
|
|
692
|
-
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-4 items-center text-center", children: [
|
|
693
|
-
/* @__PURE__ */ jsx5("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectOnchainModal.title }),
|
|
694
|
-
/* @__PURE__ */ jsx5("p", { className: "text-agg-base text-center leading-agg-6 text-agg-foreground whitespace-pre-line", children: labels.onboarding.connectOnchainModal.description })
|
|
695
|
-
] }),
|
|
696
|
-
/* @__PURE__ */ jsxs5("div", { className: "flex w-full flex-col items-center gap-4 rounded-agg-xl bg-agg-secondary-hover p-6", children: [
|
|
697
|
-
/* @__PURE__ */ jsx5("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
|
|
698
|
-
/* @__PURE__ */ jsx5("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-[6px]", children: [
|
|
699
|
-
index > 0 && /* @__PURE__ */ jsx5("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
|
|
700
|
-
/* @__PURE__ */ jsx5(VenueLogo, { venue, size: "medium" }),
|
|
701
|
-
/* @__PURE__ */ jsx5("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
|
|
702
|
-
] }, venue)) })
|
|
703
|
-
] }),
|
|
704
|
-
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-6 items-center", children: [
|
|
705
|
-
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-3 items-center", children: [
|
|
706
|
-
error ? /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
|
|
707
|
-
/* @__PURE__ */ jsx5(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
|
|
708
|
-
/* @__PURE__ */ jsx5("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
|
|
709
|
-
] }) : null,
|
|
710
|
-
/* @__PURE__ */ jsx5(
|
|
711
|
-
Button,
|
|
712
|
-
{
|
|
713
|
-
variant: "primary",
|
|
714
|
-
size: "large",
|
|
715
|
-
onClick: handleConnect,
|
|
716
|
-
isLoading: connecting,
|
|
717
|
-
children: labels.onboarding.connectOnchainModal.connect
|
|
718
|
-
}
|
|
719
|
-
)
|
|
720
|
-
] }),
|
|
721
|
-
/* @__PURE__ */ jsx5(
|
|
722
|
-
Button,
|
|
723
|
-
{
|
|
724
|
-
variant: "tertiary",
|
|
725
|
-
size: "medium",
|
|
726
|
-
className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
|
|
727
|
-
onClick: handleCancel,
|
|
728
|
-
children: labels.onboarding.connectOnchainModal.cancel
|
|
729
|
-
}
|
|
730
|
-
)
|
|
731
|
-
] })
|
|
732
|
-
] }) })
|
|
733
|
-
]
|
|
734
|
-
}
|
|
735
|
-
) });
|
|
736
|
-
};
|
|
737
|
-
ConnectOnchainModal.displayName = "ConnectOnchainModal";
|
|
738
|
-
|
|
739
|
-
// src/onboarding/index.tsx
|
|
740
|
-
import { Fragment, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
741
|
-
var OnboardingModal = ({
|
|
742
|
-
open,
|
|
743
|
-
onOpenChange,
|
|
744
|
-
onProfileSubmit,
|
|
745
|
-
onConnectOnchain,
|
|
746
|
-
onConnectKalshi,
|
|
747
|
-
onComplete,
|
|
748
|
-
howItWorksIcons,
|
|
749
|
-
connectedOnchain = false,
|
|
750
|
-
connectedKalshi = false
|
|
751
|
-
}) => {
|
|
752
|
-
var _a;
|
|
753
|
-
const labels = useLabels6();
|
|
754
|
-
const [step, setStep] = useState5(ONBOARDING_STEPS.HOW_IT_WORKS);
|
|
755
|
-
const stepLabels = {
|
|
756
|
-
[ONBOARDING_STEPS.HOW_IT_WORKS]: labels.onboarding.modal.stepHowItWorks,
|
|
757
|
-
[ONBOARDING_STEPS.PROFILE_SETUP]: labels.onboarding.modal.stepProfileSetup,
|
|
758
|
-
[ONBOARDING_STEPS.CONNECT_ACCOUNTS]: labels.onboarding.modal.stepConnectAccounts
|
|
759
|
-
};
|
|
760
|
-
const resolvedTitle = (_a = stepLabels[step]) != null ? _a : labels.onboarding.modal.title;
|
|
761
|
-
const [kalshiModalOpen, setKalshiModalOpen] = useState5(false);
|
|
762
|
-
const [kalshiConnected, setKalshiConnected] = useState5(false);
|
|
763
|
-
const [onchainModalOpen, setOnchainModalOpen] = useState5(false);
|
|
764
|
-
const [onchainConnected, setOnchainConnected] = useState5(false);
|
|
765
|
-
useEffect(() => {
|
|
766
|
-
if (open) {
|
|
767
|
-
setStep(ONBOARDING_STEPS.HOW_IT_WORKS);
|
|
768
|
-
setKalshiConnected(false);
|
|
769
|
-
setOnchainConnected(false);
|
|
770
|
-
}
|
|
771
|
-
}, [open]);
|
|
772
|
-
const handleHowItWorksContinue = useCallback5(() => {
|
|
773
|
-
setStep(ONBOARDING_STEPS.PROFILE_SETUP);
|
|
774
|
-
}, []);
|
|
775
|
-
const handleProfileContinue = useCallback5(
|
|
776
|
-
(data) => {
|
|
777
|
-
onProfileSubmit == null ? void 0 : onProfileSubmit(data);
|
|
778
|
-
setStep(ONBOARDING_STEPS.CONNECT_ACCOUNTS);
|
|
779
|
-
},
|
|
780
|
-
[onProfileSubmit]
|
|
781
|
-
);
|
|
782
|
-
const handleConnectContinue = useCallback5(() => {
|
|
783
|
-
onComplete == null ? void 0 : onComplete();
|
|
784
|
-
}, [onComplete]);
|
|
785
|
-
const handleOpenOnchainModal = useCallback5(() => {
|
|
786
|
-
setOnchainModalOpen(true);
|
|
787
|
-
}, []);
|
|
788
|
-
const handleOnchainConnect = useCallback5(() => __async(void 0, null, function* () {
|
|
789
|
-
yield onConnectOnchain == null ? void 0 : onConnectOnchain();
|
|
790
|
-
setOnchainConnected(true);
|
|
791
|
-
}), [onConnectOnchain]);
|
|
792
|
-
const handleOpenKalshiModal = useCallback5(() => {
|
|
793
|
-
setKalshiModalOpen(true);
|
|
794
|
-
}, []);
|
|
795
|
-
const handleKalshiVerify = useCallback5(
|
|
796
|
-
(credentials) => __async(void 0, null, function* () {
|
|
797
|
-
yield onConnectKalshi == null ? void 0 : onConnectKalshi(credentials);
|
|
798
|
-
setKalshiConnected(true);
|
|
799
|
-
}),
|
|
800
|
-
[onConnectKalshi]
|
|
801
|
-
);
|
|
802
|
-
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
803
|
-
/* @__PURE__ */ jsx6(Modal, { open, onOpenChange, children: /* @__PURE__ */ jsxs6(
|
|
804
|
-
Modal.Container,
|
|
805
|
-
{
|
|
806
|
-
maxWidth: "600px",
|
|
807
|
-
"aria-label": resolvedTitle,
|
|
808
|
-
classNames: { container: "!rounded-agg-lg" },
|
|
809
|
-
children: [
|
|
810
|
-
/* @__PURE__ */ jsx6(Dialog3.Title, { className: "sr-only", children: resolvedTitle }),
|
|
811
|
-
/* @__PURE__ */ jsxs6(Modal.Body, { classNames: { root: "px-5 py-6 sm:px-10 sm:py-8" }, children: [
|
|
812
|
-
step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ jsx6(HowItWorksStep, { onContinue: handleHowItWorksContinue, icons: howItWorksIcons }),
|
|
813
|
-
step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ jsx6(ProfileSetupStep, { onContinue: handleProfileContinue }),
|
|
814
|
-
step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ jsx6(
|
|
815
|
-
ConnectAccountsStep,
|
|
816
|
-
{
|
|
817
|
-
onConnectOnchain: handleOpenOnchainModal,
|
|
818
|
-
onConnectKalshi: handleOpenKalshiModal,
|
|
819
|
-
onContinue: handleConnectContinue,
|
|
820
|
-
connectedOnchain: connectedOnchain || onchainConnected,
|
|
821
|
-
connectedKalshi: connectedKalshi || kalshiConnected
|
|
822
|
-
}
|
|
823
|
-
)
|
|
824
|
-
] })
|
|
825
|
-
]
|
|
826
|
-
}
|
|
827
|
-
) }),
|
|
828
|
-
/* @__PURE__ */ jsx6(
|
|
829
|
-
ConnectOnchainModal,
|
|
830
|
-
{
|
|
831
|
-
open: onchainModalOpen,
|
|
832
|
-
onOpenChange: setOnchainModalOpen,
|
|
833
|
-
onConnect: handleOnchainConnect
|
|
834
|
-
}
|
|
835
|
-
),
|
|
836
|
-
/* @__PURE__ */ jsx6(
|
|
837
|
-
ConnectKalshiModal,
|
|
838
|
-
{
|
|
839
|
-
open: kalshiModalOpen,
|
|
840
|
-
onOpenChange: setKalshiModalOpen,
|
|
841
|
-
onVerify: handleKalshiVerify
|
|
842
|
-
}
|
|
843
|
-
)
|
|
844
|
-
] });
|
|
845
|
-
};
|
|
846
|
-
OnboardingModal.displayName = "OnboardingModal";
|
|
847
|
-
|
|
848
|
-
export {
|
|
849
|
-
HowItWorksStep,
|
|
850
|
-
ProfileSetupStep,
|
|
851
|
-
ConnectAccountsStep,
|
|
852
|
-
ConnectKalshiModal,
|
|
853
|
-
ConnectOnchainModal,
|
|
854
|
-
OnboardingModal
|
|
855
|
-
};
|