@dubsdotapp/expo 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js +199 -68
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +210 -71
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/ui/game/ArcadeLeaderboardSheet.tsx +222 -0
- package/src/ui/game/EnterArcadePoolSheet.tsx +30 -82
- package/src/ui/game/index.ts +2 -0
- package/src/ui/index.ts +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -1266,12 +1266,20 @@ interface EnterArcadePoolSheetProps {
|
|
|
1266
1266
|
onDismiss: () => void;
|
|
1267
1267
|
pool: ArcadePool;
|
|
1268
1268
|
stats?: ArcadePoolStats | null;
|
|
1269
|
-
leaderboard?: ArcadeLeaderboardEntry[];
|
|
1270
1269
|
mode?: 'join' | 'rejoin';
|
|
1271
1270
|
onSuccess?: (result: EnterArcadePoolMutationResult) => void;
|
|
1272
1271
|
onError?: (error: Error) => void;
|
|
1273
1272
|
}
|
|
1274
|
-
declare function EnterArcadePoolSheet({ visible, onDismiss, pool, stats,
|
|
1273
|
+
declare function EnterArcadePoolSheet({ visible, onDismiss, pool, stats, mode, onSuccess, onError, }: EnterArcadePoolSheetProps): react_jsx_runtime.JSX.Element;
|
|
1274
|
+
|
|
1275
|
+
interface ArcadeLeaderboardSheetProps {
|
|
1276
|
+
visible: boolean;
|
|
1277
|
+
onDismiss: () => void;
|
|
1278
|
+
poolId: number;
|
|
1279
|
+
/** Highlighted wallet address (e.g. current user) */
|
|
1280
|
+
highlightWallet?: string;
|
|
1281
|
+
}
|
|
1282
|
+
declare function ArcadeLeaderboardSheet({ visible, onDismiss, poolId, highlightWallet, }: ArcadeLeaderboardSheetProps): react_jsx_runtime.JSX.Element;
|
|
1275
1283
|
|
|
1276
1284
|
/**
|
|
1277
1285
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
|
@@ -1288,4 +1296,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1288
1296
|
*/
|
|
1289
1297
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1290
1298
|
|
|
1291
|
-
export { type ArcadeAttempt, type ArcadeEntry, type ArcadeLeaderboardEntry, type ArcadePool, type ArcadePoolStats, AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildArcadeEntryResult, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, ClaimButton, type ClaimButtonProps, type ClaimMutationResult, ClaimPrizeSheet, type ClaimPrizeSheetProps, type ClaimStatus, type ConfirmClaimParams, type ConfirmClaimResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateCustomGameMutationResult, type CreateCustomGameParams, type CreateCustomGameResult, CreateCustomGameSheet, type CreateCustomGameSheetProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, type DeviceInfo, DubsApiError, type DubsAppUser, DubsClient, type DubsClientConfig, type DubsContextValue, type DubsNetwork, DubsProvider, type DubsProviderProps, type DubsPublicUser, type DubsTheme, type DubsUser, type EnterArcadePoolMutationResult, type EnterArcadePoolResult, EnterArcadePoolSheet, type EnterArcadePoolSheetProps, type EsportsMatchDetail, type EsportsMatchOpponent, type EsportsMatchResult, type EventMedia, type EventMeta, type EventStream, type GameDetail, type GameListItem, type GameListOpponent, type GameMedia, GamePoster, type GamePosterProps, type GetGamesParams, type GetNetworkGamesParams, type GetUpcomingEventsParams, JoinGameButton, type JoinGameButtonProps, type JoinGameMutationResult, type JoinGameParams, type JoinGameResult, JoinGameSheet, type JoinGameSheetProps, LivePoolsCard, type LivePoolsCardProps, type LiveScore, type LiveScoreCompetitor, type MutationResult, type MutationStatus, type MwaAdapterConfig, type MwaTransactFn, MwaWalletAdapter, NETWORK_CONFIG, type NonceResult, type Opponent, type Pagination, type ParsedError, PhantomDeeplinkAdapter, type PhantomDeeplinkAdapterConfig, type PhantomSession, PickWinnerCard, type PickWinnerCardProps, PlayersCard, type PlayersCardProps, type PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type StartAttemptResult, type SubmitScoreResult, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseArcadeGameResult, type UseArcadePoolResult, type UseArcadePoolsResult, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useArcadeGame, useArcadePool, useArcadePools, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEnterArcadePool, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
|
1299
|
+
export { type ArcadeAttempt, type ArcadeEntry, type ArcadeLeaderboardEntry, ArcadeLeaderboardSheet, type ArcadeLeaderboardSheetProps, type ArcadePool, type ArcadePoolStats, AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildArcadeEntryResult, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, ClaimButton, type ClaimButtonProps, type ClaimMutationResult, ClaimPrizeSheet, type ClaimPrizeSheetProps, type ClaimStatus, type ConfirmClaimParams, type ConfirmClaimResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateCustomGameMutationResult, type CreateCustomGameParams, type CreateCustomGameResult, CreateCustomGameSheet, type CreateCustomGameSheetProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, type DeviceInfo, DubsApiError, type DubsAppUser, DubsClient, type DubsClientConfig, type DubsContextValue, type DubsNetwork, DubsProvider, type DubsProviderProps, type DubsPublicUser, type DubsTheme, type DubsUser, type EnterArcadePoolMutationResult, type EnterArcadePoolResult, EnterArcadePoolSheet, type EnterArcadePoolSheetProps, type EsportsMatchDetail, type EsportsMatchOpponent, type EsportsMatchResult, type EventMedia, type EventMeta, type EventStream, type GameDetail, type GameListItem, type GameListOpponent, type GameMedia, GamePoster, type GamePosterProps, type GetGamesParams, type GetNetworkGamesParams, type GetUpcomingEventsParams, JoinGameButton, type JoinGameButtonProps, type JoinGameMutationResult, type JoinGameParams, type JoinGameResult, JoinGameSheet, type JoinGameSheetProps, LivePoolsCard, type LivePoolsCardProps, type LiveScore, type LiveScoreCompetitor, type MutationResult, type MutationStatus, type MwaAdapterConfig, type MwaTransactFn, MwaWalletAdapter, NETWORK_CONFIG, type NonceResult, type Opponent, type Pagination, type ParsedError, PhantomDeeplinkAdapter, type PhantomDeeplinkAdapterConfig, type PhantomSession, PickWinnerCard, type PickWinnerCardProps, PlayersCard, type PlayersCardProps, type PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type StartAttemptResult, type SubmitScoreResult, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseArcadeGameResult, type UseArcadePoolResult, type UseArcadePoolsResult, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useArcadeGame, useArcadePool, useArcadePools, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEnterArcadePool, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
package/dist/index.d.ts
CHANGED
|
@@ -1266,12 +1266,20 @@ interface EnterArcadePoolSheetProps {
|
|
|
1266
1266
|
onDismiss: () => void;
|
|
1267
1267
|
pool: ArcadePool;
|
|
1268
1268
|
stats?: ArcadePoolStats | null;
|
|
1269
|
-
leaderboard?: ArcadeLeaderboardEntry[];
|
|
1270
1269
|
mode?: 'join' | 'rejoin';
|
|
1271
1270
|
onSuccess?: (result: EnterArcadePoolMutationResult) => void;
|
|
1272
1271
|
onError?: (error: Error) => void;
|
|
1273
1272
|
}
|
|
1274
|
-
declare function EnterArcadePoolSheet({ visible, onDismiss, pool, stats,
|
|
1273
|
+
declare function EnterArcadePoolSheet({ visible, onDismiss, pool, stats, mode, onSuccess, onError, }: EnterArcadePoolSheetProps): react_jsx_runtime.JSX.Element;
|
|
1274
|
+
|
|
1275
|
+
interface ArcadeLeaderboardSheetProps {
|
|
1276
|
+
visible: boolean;
|
|
1277
|
+
onDismiss: () => void;
|
|
1278
|
+
poolId: number;
|
|
1279
|
+
/** Highlighted wallet address (e.g. current user) */
|
|
1280
|
+
highlightWallet?: string;
|
|
1281
|
+
}
|
|
1282
|
+
declare function ArcadeLeaderboardSheet({ visible, onDismiss, poolId, highlightWallet, }: ArcadeLeaderboardSheetProps): react_jsx_runtime.JSX.Element;
|
|
1275
1283
|
|
|
1276
1284
|
/**
|
|
1277
1285
|
* Deserialize a base64-encoded transaction, sign via wallet adapter, send to Solana.
|
|
@@ -1288,4 +1296,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1288
1296
|
*/
|
|
1289
1297
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1290
1298
|
|
|
1291
|
-
export { type ArcadeAttempt, type ArcadeEntry, type ArcadeLeaderboardEntry, type ArcadePool, type ArcadePoolStats, AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildArcadeEntryResult, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, ClaimButton, type ClaimButtonProps, type ClaimMutationResult, ClaimPrizeSheet, type ClaimPrizeSheetProps, type ClaimStatus, type ConfirmClaimParams, type ConfirmClaimResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateCustomGameMutationResult, type CreateCustomGameParams, type CreateCustomGameResult, CreateCustomGameSheet, type CreateCustomGameSheetProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, type DeviceInfo, DubsApiError, type DubsAppUser, DubsClient, type DubsClientConfig, type DubsContextValue, type DubsNetwork, DubsProvider, type DubsProviderProps, type DubsPublicUser, type DubsTheme, type DubsUser, type EnterArcadePoolMutationResult, type EnterArcadePoolResult, EnterArcadePoolSheet, type EnterArcadePoolSheetProps, type EsportsMatchDetail, type EsportsMatchOpponent, type EsportsMatchResult, type EventMedia, type EventMeta, type EventStream, type GameDetail, type GameListItem, type GameListOpponent, type GameMedia, GamePoster, type GamePosterProps, type GetGamesParams, type GetNetworkGamesParams, type GetUpcomingEventsParams, JoinGameButton, type JoinGameButtonProps, type JoinGameMutationResult, type JoinGameParams, type JoinGameResult, JoinGameSheet, type JoinGameSheetProps, LivePoolsCard, type LivePoolsCardProps, type LiveScore, type LiveScoreCompetitor, type MutationResult, type MutationStatus, type MwaAdapterConfig, type MwaTransactFn, MwaWalletAdapter, NETWORK_CONFIG, type NonceResult, type Opponent, type Pagination, type ParsedError, PhantomDeeplinkAdapter, type PhantomDeeplinkAdapterConfig, type PhantomSession, PickWinnerCard, type PickWinnerCardProps, PlayersCard, type PlayersCardProps, type PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type StartAttemptResult, type SubmitScoreResult, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseArcadeGameResult, type UseArcadePoolResult, type UseArcadePoolsResult, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useArcadeGame, useArcadePool, useArcadePools, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEnterArcadePool, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
|
1299
|
+
export { type ArcadeAttempt, type ArcadeEntry, type ArcadeLeaderboardEntry, ArcadeLeaderboardSheet, type ArcadeLeaderboardSheetProps, type ArcadePool, type ArcadePoolStats, AuthGate, type AuthGateProps, type AuthStatus, type AuthenticateParams, type AuthenticateResult, type Bettor, type BuildArcadeEntryResult, type BuildClaimParams, type BuildClaimResult, type CheckUsernameResult, ClaimButton, type ClaimButtonProps, type ClaimMutationResult, ClaimPrizeSheet, type ClaimPrizeSheetProps, type ClaimStatus, type ConfirmClaimParams, type ConfirmClaimResult, type ConfirmGameParams, type ConfirmGameResult, ConnectWalletScreen, type ConnectWalletScreenProps, type CreateCustomGameMutationResult, type CreateCustomGameParams, type CreateCustomGameResult, CreateCustomGameSheet, type CreateCustomGameSheetProps, type CreateGameMutationResult, type CreateGameParams, type CreateGameResult, DEFAULT_BASE_URL, DEFAULT_RPC_URL, type DeviceInfo, DubsApiError, type DubsAppUser, DubsClient, type DubsClientConfig, type DubsContextValue, type DubsNetwork, DubsProvider, type DubsProviderProps, type DubsPublicUser, type DubsTheme, type DubsUser, type EnterArcadePoolMutationResult, type EnterArcadePoolResult, EnterArcadePoolSheet, type EnterArcadePoolSheetProps, type EsportsMatchDetail, type EsportsMatchOpponent, type EsportsMatchResult, type EventMedia, type EventMeta, type EventStream, type GameDetail, type GameListItem, type GameListOpponent, type GameMedia, GamePoster, type GamePosterProps, type GetGamesParams, type GetNetworkGamesParams, type GetUpcomingEventsParams, JoinGameButton, type JoinGameButtonProps, type JoinGameMutationResult, type JoinGameParams, type JoinGameResult, JoinGameSheet, type JoinGameSheetProps, LivePoolsCard, type LivePoolsCardProps, type LiveScore, type LiveScoreCompetitor, type MutationResult, type MutationStatus, type MwaAdapterConfig, type MwaTransactFn, MwaWalletAdapter, NETWORK_CONFIG, type NonceResult, type Opponent, type Pagination, type ParsedError, PhantomDeeplinkAdapter, type PhantomDeeplinkAdapterConfig, type PhantomSession, PickWinnerCard, type PickWinnerCardProps, PlayersCard, type PlayersCardProps, type PushNotificationStatus, type QueryResult, type RegisterParams, type RegisterResult, type RegistrationScreenProps, SOLANA_PROGRAM_ERRORS, STORAGE_KEYS, SettingsSheet, type SettingsSheetProps, type SolanaErrorCode, type StartAttemptResult, type SubmitScoreResult, type TokenStorage, type UFCData, type UFCEvent, type UFCFight, type UFCFighter, type UFCFighterDetail, type UiConfig, type UnifiedEvent, type UseArcadeGameResult, type UseArcadePoolResult, type UseArcadePoolsResult, type UseAuthResult, UserProfileCard, type UserProfileCardProps, UserProfileSheet, type UserProfileSheetProps, type ValidateEventResult, type WalletAdapter, createSecureStoreStorage, ensurePngAvatar, getDeviceInfo, isSolanaSeeker, mergeTheme, parseSolanaError, signAndSendBase64Transaction, useAppConfig, useArcadeGame, useArcadePool, useArcadePools, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEnterArcadePool, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
ArcadeLeaderboardSheet: () => ArcadeLeaderboardSheet,
|
|
33
34
|
AuthGate: () => AuthGate,
|
|
34
35
|
ClaimButton: () => ClaimButton,
|
|
35
36
|
ClaimPrizeSheet: () => ClaimPrizeSheet,
|
|
@@ -5955,7 +5956,6 @@ function EnterArcadePoolSheet({
|
|
|
5955
5956
|
onDismiss,
|
|
5956
5957
|
pool,
|
|
5957
5958
|
stats,
|
|
5958
|
-
leaderboard,
|
|
5959
5959
|
mode = "join",
|
|
5960
5960
|
onSuccess,
|
|
5961
5961
|
onError
|
|
@@ -6029,66 +6029,38 @@ function EnterArcadePoolSheet({
|
|
|
6029
6029
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.closeButton, { color: t.textMuted }], children: "\u2715" }) })
|
|
6030
6030
|
] }),
|
|
6031
6031
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.poolName, { color: t.textSecondary }], children: pool.name }),
|
|
6032
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.
|
|
6033
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style:
|
|
6034
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6032
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: [styles15.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
|
|
6033
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
|
|
6034
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
|
|
6035
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.summaryValue, { color: t.text }], children: [
|
|
6036
|
+
buyInSol,
|
|
6037
|
+
" SOL"
|
|
6038
|
+
] })
|
|
6039
|
+
] }),
|
|
6040
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
|
|
6041
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
|
|
6042
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Players in" }),
|
|
6043
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryValue, { color: t.text }], children: totalPlayers })
|
|
6044
|
+
] }),
|
|
6045
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
|
|
6046
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
|
|
6047
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
|
|
6048
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.summaryValue, { color: t.success }], children: [
|
|
6049
|
+
potSol,
|
|
6050
|
+
" SOL"
|
|
6051
|
+
] })
|
|
6052
|
+
] }),
|
|
6053
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
|
|
6054
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
|
|
6055
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Lives" }),
|
|
6056
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryValue, { color: t.text }], children: pool.max_lives })
|
|
6057
|
+
] }),
|
|
6058
|
+
topScore > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
6054
6059
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
|
|
6055
6060
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
|
|
6056
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "
|
|
6057
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryValue, { color: t.text }], children:
|
|
6058
|
-
] }),
|
|
6059
|
-
topScore > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
6060
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
|
|
6061
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
|
|
6062
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Top score" }),
|
|
6063
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryValue, { color: t.text }], children: topScore })
|
|
6064
|
-
] })
|
|
6061
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Top score" }),
|
|
6062
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryValue, { color: t.text }], children: topScore })
|
|
6065
6063
|
] })
|
|
6066
|
-
] }),
|
|
6067
|
-
leaderboard && leaderboard.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.leaderboardSection, children: [
|
|
6068
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.leaderboardTitle, { color: t.text }], children: "Leaderboard" }),
|
|
6069
|
-
leaderboard.map((entry, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
6070
|
-
import_react_native21.View,
|
|
6071
|
-
{
|
|
6072
|
-
style: [
|
|
6073
|
-
styles15.lbRow,
|
|
6074
|
-
{ backgroundColor: i % 2 === 0 ? t.surface : "transparent" }
|
|
6075
|
-
],
|
|
6076
|
-
children: [
|
|
6077
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.lbRank, { color: t.textMuted }], children: i === 0 ? "\u{1F947}" : i === 1 ? "\u{1F948}" : i === 2 ? "\u{1F949}" : `${i + 1}` }),
|
|
6078
|
-
entry.avatar ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Image, { source: { uri: entry.avatar }, style: styles15.lbAvatar }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.lbAvatar, { backgroundColor: t.border }] }),
|
|
6079
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6080
|
-
import_react_native21.Text,
|
|
6081
|
-
{
|
|
6082
|
-
style: [styles15.lbName, { color: t.text }],
|
|
6083
|
-
numberOfLines: 1,
|
|
6084
|
-
children: entry.username || `${entry.wallet_address.slice(0, 4)}...${entry.wallet_address.slice(-4)}`
|
|
6085
|
-
}
|
|
6086
|
-
),
|
|
6087
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.lbScore, { color: t.accent }], children: entry.best_score })
|
|
6088
|
-
]
|
|
6089
|
-
},
|
|
6090
|
-
entry.id
|
|
6091
|
-
))
|
|
6092
6064
|
] })
|
|
6093
6065
|
] }),
|
|
6094
6066
|
mutation.error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.errorText, { color: t.errorText }], children: mutation.error.message }) }),
|
|
@@ -6171,24 +6143,183 @@ var styles15 = import_react_native21.StyleSheet.create({
|
|
|
6171
6143
|
alignItems: "center"
|
|
6172
6144
|
},
|
|
6173
6145
|
ctaText: { color: "#FFFFFF", fontSize: 16, fontWeight: "700" },
|
|
6174
|
-
ctaLoading: { flexDirection: "row", alignItems: "center", gap: 10 }
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6146
|
+
ctaLoading: { flexDirection: "row", alignItems: "center", gap: 10 }
|
|
6147
|
+
});
|
|
6148
|
+
|
|
6149
|
+
// src/ui/game/ArcadeLeaderboardSheet.tsx
|
|
6150
|
+
var import_react35 = require("react");
|
|
6151
|
+
var import_react_native22 = require("react-native");
|
|
6152
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
6153
|
+
function RankLabel({ index }) {
|
|
6154
|
+
if (index === 0) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: styles16.rankEmoji, children: "\u{1F947}" });
|
|
6155
|
+
if (index === 1) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: styles16.rankEmoji, children: "\u{1F948}" });
|
|
6156
|
+
if (index === 2) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: styles16.rankEmoji, children: "\u{1F949}" });
|
|
6157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: styles16.rankNum, children: index + 1 });
|
|
6158
|
+
}
|
|
6159
|
+
function ArcadeLeaderboardSheet({
|
|
6160
|
+
visible,
|
|
6161
|
+
onDismiss,
|
|
6162
|
+
poolId,
|
|
6163
|
+
highlightWallet
|
|
6164
|
+
}) {
|
|
6165
|
+
const t = useDubsTheme();
|
|
6166
|
+
const { pool, leaderboard, stats, loading, refetch } = useArcadePool(poolId);
|
|
6167
|
+
const overlayOpacity = (0, import_react35.useRef)(new import_react_native22.Animated.Value(0)).current;
|
|
6168
|
+
(0, import_react35.useEffect)(() => {
|
|
6169
|
+
import_react_native22.Animated.timing(overlayOpacity, {
|
|
6170
|
+
toValue: visible ? 1 : 0,
|
|
6171
|
+
duration: 250,
|
|
6172
|
+
useNativeDriver: true
|
|
6173
|
+
}).start();
|
|
6174
|
+
}, [visible, overlayOpacity]);
|
|
6175
|
+
(0, import_react35.useEffect)(() => {
|
|
6176
|
+
if (visible) refetch();
|
|
6177
|
+
}, [visible]);
|
|
6178
|
+
const renderItem = ({ item, index }) => {
|
|
6179
|
+
const isMe = highlightWallet && item.wallet_address === highlightWallet;
|
|
6180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6181
|
+
import_react_native22.View,
|
|
6182
|
+
{
|
|
6183
|
+
style: [
|
|
6184
|
+
styles16.row,
|
|
6185
|
+
{ backgroundColor: isMe ? `${t.accent}18` : index % 2 === 0 ? t.surface : "transparent" },
|
|
6186
|
+
isMe ? { borderWidth: 1, borderColor: t.accent } : void 0
|
|
6187
|
+
],
|
|
6188
|
+
children: [
|
|
6189
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: styles16.rankCol, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RankLabel, { index }) }),
|
|
6190
|
+
item.avatar ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Image, { source: { uri: item.avatar }, style: styles16.avatar }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.avatar, { backgroundColor: t.border }] }),
|
|
6191
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.nameCol, children: [
|
|
6192
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.name, { color: t.text }], numberOfLines: 1, children: item.username || `${item.wallet_address.slice(0, 4)}...${item.wallet_address.slice(-4)}` }),
|
|
6193
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.Text, { style: [styles16.lives, { color: t.textMuted }], children: [
|
|
6194
|
+
item.lives_used,
|
|
6195
|
+
" ",
|
|
6196
|
+
item.lives_used === 1 ? "life" : "lives",
|
|
6197
|
+
" used"
|
|
6198
|
+
] })
|
|
6199
|
+
] }),
|
|
6200
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.score, { color: t.accent }], children: item.best_score })
|
|
6201
|
+
]
|
|
6202
|
+
}
|
|
6203
|
+
);
|
|
6204
|
+
};
|
|
6205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6206
|
+
import_react_native22.Modal,
|
|
6207
|
+
{
|
|
6208
|
+
visible,
|
|
6209
|
+
animationType: "slide",
|
|
6210
|
+
transparent: true,
|
|
6211
|
+
onRequestClose: onDismiss,
|
|
6212
|
+
children: [
|
|
6213
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Animated.View, { style: [styles16.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.TouchableOpacity, { style: styles16.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
|
|
6214
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6215
|
+
import_react_native22.KeyboardAvoidingView,
|
|
6216
|
+
{
|
|
6217
|
+
style: styles16.keyboardView,
|
|
6218
|
+
behavior: import_react_native22.Platform.OS === "ios" ? "padding" : void 0,
|
|
6219
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: styles16.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: [styles16.sheet, { backgroundColor: t.background }], children: [
|
|
6220
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: styles16.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.handle, { backgroundColor: t.textMuted }] }) }),
|
|
6221
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.header, children: [
|
|
6222
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { children: [
|
|
6223
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.headerTitle, { color: t.text }], children: "Leaderboard" }),
|
|
6224
|
+
pool && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.poolName, { color: t.textMuted }], children: pool.name })
|
|
6225
|
+
] }),
|
|
6226
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.closeButton, { color: t.textMuted }], children: "\u2715" }) })
|
|
6227
|
+
] }),
|
|
6228
|
+
stats && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: [styles16.statsBar, { backgroundColor: t.surface, borderColor: t.border }], children: [
|
|
6229
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.statItem, children: [
|
|
6230
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.statValue, { color: t.text }], children: stats.total_entries }),
|
|
6231
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.statLabel, { color: t.textMuted }], children: "Players" })
|
|
6232
|
+
] }),
|
|
6233
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.statDivider, { backgroundColor: t.border }] }),
|
|
6234
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.statItem, children: [
|
|
6235
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.statValue, { color: t.accent }], children: stats.top_score }),
|
|
6236
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.statLabel, { color: t.textMuted }], children: "Top Score" })
|
|
6237
|
+
] }),
|
|
6238
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.statDivider, { backgroundColor: t.border }] }),
|
|
6239
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.statItem, children: [
|
|
6240
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.statValue, { color: t.text }], children: Math.round(stats.avg_score) }),
|
|
6241
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.statLabel, { color: t.textMuted }], children: "Avg Score" })
|
|
6242
|
+
] })
|
|
6243
|
+
] }),
|
|
6244
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6245
|
+
import_react_native22.FlatList,
|
|
6246
|
+
{
|
|
6247
|
+
data: leaderboard,
|
|
6248
|
+
renderItem,
|
|
6249
|
+
keyExtractor: (item) => String(item.id),
|
|
6250
|
+
style: styles16.list,
|
|
6251
|
+
contentContainerStyle: styles16.listContent,
|
|
6252
|
+
ListEmptyComponent: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: styles16.emptyState, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.emptyText, { color: t.textMuted }], children: loading ? "Loading..." : "No scores yet" }) })
|
|
6253
|
+
}
|
|
6254
|
+
)
|
|
6255
|
+
] }) })
|
|
6256
|
+
}
|
|
6257
|
+
)
|
|
6258
|
+
]
|
|
6259
|
+
}
|
|
6260
|
+
);
|
|
6261
|
+
}
|
|
6262
|
+
var styles16 = import_react_native22.StyleSheet.create({
|
|
6263
|
+
overlay: {
|
|
6264
|
+
...import_react_native22.StyleSheet.absoluteFillObject,
|
|
6265
|
+
backgroundColor: "rgba(0,0,0,0.5)"
|
|
6266
|
+
},
|
|
6267
|
+
overlayTap: { flex: 1 },
|
|
6268
|
+
keyboardView: { flex: 1, justifyContent: "flex-end" },
|
|
6269
|
+
sheetPositioner: { flex: 1, justifyContent: "flex-end" },
|
|
6270
|
+
sheet: {
|
|
6271
|
+
borderTopLeftRadius: 24,
|
|
6272
|
+
borderTopRightRadius: 24,
|
|
6273
|
+
paddingHorizontal: 20,
|
|
6274
|
+
paddingBottom: 40,
|
|
6275
|
+
maxHeight: "80%"
|
|
6276
|
+
},
|
|
6277
|
+
handleRow: { alignItems: "center", paddingTop: 10, paddingBottom: 8 },
|
|
6278
|
+
handle: { width: 36, height: 4, borderRadius: 2, opacity: 0.4 },
|
|
6279
|
+
header: {
|
|
6280
|
+
flexDirection: "row",
|
|
6281
|
+
alignItems: "flex-start",
|
|
6282
|
+
justifyContent: "space-between",
|
|
6283
|
+
paddingVertical: 12
|
|
6284
|
+
},
|
|
6285
|
+
headerTitle: { fontSize: 20, fontWeight: "700" },
|
|
6286
|
+
poolName: { fontSize: 13, fontWeight: "600", marginTop: 2 },
|
|
6287
|
+
closeButton: { fontSize: 20, padding: 4 },
|
|
6288
|
+
statsBar: {
|
|
6289
|
+
flexDirection: "row",
|
|
6290
|
+
borderRadius: 12,
|
|
6291
|
+
borderWidth: 1,
|
|
6292
|
+
marginBottom: 12,
|
|
6293
|
+
overflow: "hidden"
|
|
6294
|
+
},
|
|
6295
|
+
statItem: { flex: 1, alignItems: "center", paddingVertical: 10 },
|
|
6296
|
+
statValue: { fontSize: 18, fontWeight: "800" },
|
|
6297
|
+
statLabel: { fontSize: 11, fontWeight: "600", marginTop: 2 },
|
|
6298
|
+
statDivider: { width: 1, marginVertical: 8 },
|
|
6299
|
+
list: { flexGrow: 0 },
|
|
6300
|
+
listContent: { paddingBottom: 8 },
|
|
6301
|
+
row: {
|
|
6179
6302
|
flexDirection: "row",
|
|
6180
6303
|
alignItems: "center",
|
|
6181
6304
|
paddingVertical: 10,
|
|
6182
6305
|
paddingHorizontal: 12,
|
|
6183
|
-
borderRadius: 10
|
|
6306
|
+
borderRadius: 10,
|
|
6307
|
+
marginBottom: 2
|
|
6184
6308
|
},
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6309
|
+
rankCol: { width: 32, alignItems: "center" },
|
|
6310
|
+
rankEmoji: { fontSize: 18 },
|
|
6311
|
+
rankNum: { fontSize: 14, fontWeight: "700", color: "#888" },
|
|
6312
|
+
avatar: { width: 32, height: 32, borderRadius: 16, marginRight: 10 },
|
|
6313
|
+
nameCol: { flex: 1 },
|
|
6314
|
+
name: { fontSize: 14, fontWeight: "600" },
|
|
6315
|
+
lives: { fontSize: 11, marginTop: 1 },
|
|
6316
|
+
score: { fontSize: 18, fontWeight: "800" },
|
|
6317
|
+
emptyState: { paddingVertical: 40, alignItems: "center" },
|
|
6318
|
+
emptyText: { fontSize: 14, fontWeight: "600" }
|
|
6189
6319
|
});
|
|
6190
6320
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6191
6321
|
0 && (module.exports = {
|
|
6322
|
+
ArcadeLeaderboardSheet,
|
|
6192
6323
|
AuthGate,
|
|
6193
6324
|
ClaimButton,
|
|
6194
6325
|
ClaimPrizeSheet,
|