@dubsdotapp/expo 0.4.2 → 0.5.1
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 +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +519 -456
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +509 -441
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useArcadeBridge.ts +4 -9
- package/src/index.ts +2 -2
- package/src/ui/ConnectWalletButton.tsx +112 -0
- package/src/ui/index.ts +2 -0
package/dist/index.d.mts
CHANGED
|
@@ -1150,6 +1150,42 @@ interface UseArcadeBridgeResult {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
declare function useArcadeBridge({ canPlay, startAttempt, submitScore, onScoreSubmitted, onError, }: UseArcadeBridgeOptions): UseArcadeBridgeResult;
|
|
1152
1152
|
|
|
1153
|
+
interface ConnectWalletButtonProps {
|
|
1154
|
+
/** Called when the user taps the button */
|
|
1155
|
+
onConnect: () => void | Promise<void>;
|
|
1156
|
+
/** Show a loading spinner while connecting */
|
|
1157
|
+
connecting?: boolean;
|
|
1158
|
+
/** Error message to display below the button */
|
|
1159
|
+
error?: string | null;
|
|
1160
|
+
/** Override accent color (e.g. from developer UI config) */
|
|
1161
|
+
accentColor?: string;
|
|
1162
|
+
/** Override button label. Defaults to "Connect Wallet" */
|
|
1163
|
+
label?: string;
|
|
1164
|
+
/** Additional style applied to the outer container */
|
|
1165
|
+
style?: ViewStyle;
|
|
1166
|
+
/** Additional style applied to the button itself */
|
|
1167
|
+
buttonStyle?: ViewStyle;
|
|
1168
|
+
}
|
|
1169
|
+
/**
|
|
1170
|
+
* Drop-in wallet connect button that triggers the same MWA / Phantom
|
|
1171
|
+
* connection flow as ConnectWalletScreen, but renders as a single button
|
|
1172
|
+
* instead of a full-screen layout.
|
|
1173
|
+
*
|
|
1174
|
+
* Use with `renderConnectScreen` on DubsProvider to embed the button
|
|
1175
|
+
* inside your own custom onboarding or home screen:
|
|
1176
|
+
*
|
|
1177
|
+
* ```tsx
|
|
1178
|
+
* <DubsProvider
|
|
1179
|
+
* renderConnectScreen={({ onConnect, connecting, error }) => (
|
|
1180
|
+
* <MyScreen>
|
|
1181
|
+
* <ConnectWalletButton onConnect={onConnect} connecting={connecting} error={error} />
|
|
1182
|
+
* </MyScreen>
|
|
1183
|
+
* )}
|
|
1184
|
+
* >
|
|
1185
|
+
* ```
|
|
1186
|
+
*/
|
|
1187
|
+
declare function ConnectWalletButton({ onConnect, connecting, error, accentColor, label, style, buttonStyle, }: ConnectWalletButtonProps): react_jsx_runtime.JSX.Element;
|
|
1188
|
+
|
|
1153
1189
|
interface UserProfileCardProps {
|
|
1154
1190
|
walletAddress: string;
|
|
1155
1191
|
username?: string;
|
|
@@ -1374,4 +1410,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1374
1410
|
*/
|
|
1375
1411
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1376
1412
|
|
|
1377
|
-
export { type ArcadeAttempt, type ArcadeCountdown, 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 UseArcadeBridgeOptions, type UseArcadeBridgeResult, 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, useArcadeBridge, useArcadeCountdown, useArcadeGame, useArcadePool, useArcadePools, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEnterArcadePool, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
|
1413
|
+
export { type ArcadeAttempt, type ArcadeCountdown, 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, ConnectWalletButton, type ConnectWalletButtonProps, 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 UseArcadeBridgeOptions, type UseArcadeBridgeResult, 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, useArcadeBridge, useArcadeCountdown, 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
|
@@ -1150,6 +1150,42 @@ interface UseArcadeBridgeResult {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
declare function useArcadeBridge({ canPlay, startAttempt, submitScore, onScoreSubmitted, onError, }: UseArcadeBridgeOptions): UseArcadeBridgeResult;
|
|
1152
1152
|
|
|
1153
|
+
interface ConnectWalletButtonProps {
|
|
1154
|
+
/** Called when the user taps the button */
|
|
1155
|
+
onConnect: () => void | Promise<void>;
|
|
1156
|
+
/** Show a loading spinner while connecting */
|
|
1157
|
+
connecting?: boolean;
|
|
1158
|
+
/** Error message to display below the button */
|
|
1159
|
+
error?: string | null;
|
|
1160
|
+
/** Override accent color (e.g. from developer UI config) */
|
|
1161
|
+
accentColor?: string;
|
|
1162
|
+
/** Override button label. Defaults to "Connect Wallet" */
|
|
1163
|
+
label?: string;
|
|
1164
|
+
/** Additional style applied to the outer container */
|
|
1165
|
+
style?: ViewStyle;
|
|
1166
|
+
/** Additional style applied to the button itself */
|
|
1167
|
+
buttonStyle?: ViewStyle;
|
|
1168
|
+
}
|
|
1169
|
+
/**
|
|
1170
|
+
* Drop-in wallet connect button that triggers the same MWA / Phantom
|
|
1171
|
+
* connection flow as ConnectWalletScreen, but renders as a single button
|
|
1172
|
+
* instead of a full-screen layout.
|
|
1173
|
+
*
|
|
1174
|
+
* Use with `renderConnectScreen` on DubsProvider to embed the button
|
|
1175
|
+
* inside your own custom onboarding or home screen:
|
|
1176
|
+
*
|
|
1177
|
+
* ```tsx
|
|
1178
|
+
* <DubsProvider
|
|
1179
|
+
* renderConnectScreen={({ onConnect, connecting, error }) => (
|
|
1180
|
+
* <MyScreen>
|
|
1181
|
+
* <ConnectWalletButton onConnect={onConnect} connecting={connecting} error={error} />
|
|
1182
|
+
* </MyScreen>
|
|
1183
|
+
* )}
|
|
1184
|
+
* >
|
|
1185
|
+
* ```
|
|
1186
|
+
*/
|
|
1187
|
+
declare function ConnectWalletButton({ onConnect, connecting, error, accentColor, label, style, buttonStyle, }: ConnectWalletButtonProps): react_jsx_runtime.JSX.Element;
|
|
1188
|
+
|
|
1153
1189
|
interface UserProfileCardProps {
|
|
1154
1190
|
walletAddress: string;
|
|
1155
1191
|
username?: string;
|
|
@@ -1374,4 +1410,4 @@ declare function signAndSendBase64Transaction(base64Tx: string, wallet: WalletAd
|
|
|
1374
1410
|
*/
|
|
1375
1411
|
declare function ensurePngAvatar(url: string | null | undefined): string | undefined;
|
|
1376
1412
|
|
|
1377
|
-
export { type ArcadeAttempt, type ArcadeCountdown, 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 UseArcadeBridgeOptions, type UseArcadeBridgeResult, 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, useArcadeBridge, useArcadeCountdown, useArcadeGame, useArcadePool, useArcadePools, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEnterArcadePool, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|
|
1413
|
+
export { type ArcadeAttempt, type ArcadeCountdown, 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, ConnectWalletButton, type ConnectWalletButtonProps, 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 UseArcadeBridgeOptions, type UseArcadeBridgeResult, 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, useArcadeBridge, useArcadeCountdown, useArcadeGame, useArcadePool, useArcadePools, useAuth, useClaim, useCreateCustomGame, useCreateGame, useDubs, useDubsTheme, useEnterArcadePool, useEvents, useGame, useGames, useHasClaimed, useJoinGame, useNetworkGames, usePushNotifications, useUFCFightCard, useUFCFighterDetail };
|