@pooflabs/web 0.0.81-rc2 → 0.0.81
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/auth/index.d.ts +10 -1
- package/dist/auth/providers/phantom-wallet-provider.d.ts +20 -21
- package/dist/global.d.ts +3 -1
- package/dist/{index-DHm4usay.js → index-B2WGCssJ.js} +347 -414
- package/dist/index-B2WGCssJ.js.map +1 -0
- package/dist/{index-CHqM9n4K.esm.js → index-CjHbp7Dq.esm.js} +3697 -562
- package/dist/index-CjHbp7Dq.esm.js.map +1 -0
- package/dist/{index-CL4JIAAR.js → index-DXPkkq81.js} +3698 -563
- package/dist/index-DXPkkq81.js.map +1 -0
- package/dist/{index-BjlCinic.js → index-D_DiP8XQ.js} +3698 -563
- package/dist/index-D_DiP8XQ.js.map +1 -0
- package/dist/{index-DCo85UGg.esm.js → index-dcJIjFrs.esm.js} +3697 -562
- package/dist/index-dcJIjFrs.esm.js.map +1 -0
- package/dist/{index-Bx_lLXRT.esm.js → index-nt_HQVrk.esm.js} +345 -414
- package/dist/index-nt_HQVrk.esm.js.map +1 -0
- package/dist/{index.browser-7dDfRU5G.esm.js → index.browser-BNdFfyIg.esm.js} +1571 -1368
- package/dist/index.browser-BNdFfyIg.esm.js.map +1 -0
- package/dist/{index.browser-CmlqbyPr.js → index.browser-CT6PUv9G.js} +1571 -1368
- package/dist/index.browser-CT6PUv9G.js.map +1 -0
- package/dist/index.browser-Cy21yaX0.esm.js +1096 -0
- package/dist/index.browser-Cy21yaX0.esm.js.map +1 -0
- package/dist/index.browser-OvGNsMPu.esm.js +1002 -0
- package/dist/index.browser-OvGNsMPu.esm.js.map +1 -0
- package/dist/index.browser-ZD7Tz2bn.js +1099 -0
- package/dist/index.browser-ZD7Tz2bn.js.map +1 -0
- package/dist/index.browser-d0PlOXpF.js +105 -0
- package/dist/index.browser-d0PlOXpF.js.map +1 -0
- package/dist/index.browser-pE1s68e9.esm.js +102 -0
- package/dist/index.browser-pE1s68e9.esm.js.map +1 -0
- package/dist/index.browser-vuTr40so.js +1008 -0
- package/dist/index.browser-vuTr40so.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-TLhfXfe6.esm.js → index.native-BqYr--vb.esm.js} +202 -178
- package/dist/index.native-BqYr--vb.esm.js.map +1 -0
- package/dist/{index.native-DJA9_K3i.js → index.native-CyA-RdvW.js} +204 -178
- package/dist/index.native-CyA-RdvW.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-BegJFoWW.js → phantom-wallet-provider-DWCaMkyz.js} +148 -192
- package/dist/phantom-wallet-provider-DWCaMkyz.js.map +1 -0
- package/dist/{phantom-wallet-provider-DzUAMhbm.esm.js → phantom-wallet-provider-K2V96G-G.esm.js} +148 -192
- package/dist/phantom-wallet-provider-K2V96G-G.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-Du-QHaaG.js → privy-wallet-provider-BMg_S_d0.js} +4 -4
- package/dist/privy-wallet-provider-BMg_S_d0.js.map +1 -0
- package/dist/{privy-wallet-provider-BspbiyOr.esm.js → privy-wallet-provider-DoX8q99w.esm.js} +4 -4
- package/dist/privy-wallet-provider-DoX8q99w.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-Bh7SBFpQ.esm.js → solana-mobile-wallet-provider-Cmphb3oB.esm.js} +3 -52
- package/dist/solana-mobile-wallet-provider-Cmphb3oB.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-DPp4SYem.js → solana-mobile-wallet-provider-t22Ie8lY.js} +3 -52
- package/dist/solana-mobile-wallet-provider-t22Ie8lY.js.map +1 -0
- package/package.json +3 -3
- package/dist/index-BjlCinic.js.map +0 -1
- package/dist/index-Bx_lLXRT.esm.js.map +0 -1
- package/dist/index-CHqM9n4K.esm.js.map +0 -1
- package/dist/index-CL4JIAAR.js.map +0 -1
- package/dist/index-DCo85UGg.esm.js.map +0 -1
- package/dist/index-DHm4usay.js.map +0 -1
- package/dist/index.browser-7dDfRU5G.esm.js.map +0 -1
- package/dist/index.browser-Bg_-PAgT.esm.js +0 -1250
- package/dist/index.browser-Bg_-PAgT.esm.js.map +0 -1
- package/dist/index.browser-C-_FEr5M.esm.js +0 -1134
- package/dist/index.browser-C-_FEr5M.esm.js.map +0 -1
- package/dist/index.browser-CmlqbyPr.js.map +0 -1
- package/dist/index.browser-CxXQ2RhF.js +0 -122
- package/dist/index.browser-CxXQ2RhF.js.map +0 -1
- package/dist/index.browser-DjEZSiqI.js +0 -1137
- package/dist/index.browser-DjEZSiqI.js.map +0 -1
- package/dist/index.browser-DuVkpEzB.js +0 -1253
- package/dist/index.browser-DuVkpEzB.js.map +0 -1
- package/dist/index.browser-xJkO73vw.esm.js +0 -119
- package/dist/index.browser-xJkO73vw.esm.js.map +0 -1
- package/dist/index.native-DJA9_K3i.js.map +0 -1
- package/dist/index.native-TLhfXfe6.esm.js.map +0 -1
- package/dist/phantom-wallet-provider-BegJFoWW.js.map +0 -1
- package/dist/phantom-wallet-provider-DzUAMhbm.esm.js.map +0 -1
- package/dist/privy-wallet-provider-BspbiyOr.esm.js.map +0 -1
- package/dist/privy-wallet-provider-Du-QHaaG.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-Bh7SBFpQ.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-DPp4SYem.js.map +0 -1
package/dist/auth/index.d.ts
CHANGED
|
@@ -12,6 +12,15 @@ export declare const SOLANA_DEVNET_RPC_URL = "https://idelle-8nxsep-fast-devnet.
|
|
|
12
12
|
export declare const SOLANA_MAINNET_RPC_URL = "https://celestia-cegncv-fast-mainnet.helius-rpc.com";
|
|
13
13
|
export declare const SURFNET_RPC_URL = "https://surfpool.fly.dev";
|
|
14
14
|
export declare function getAuthProvider(config?: Partial<ClientConfig>): Promise<AuthProvider>;
|
|
15
|
-
|
|
15
|
+
/** Per-call overrides forwarded to the active auth provider's modal. */
|
|
16
|
+
export interface LoginOptions {
|
|
17
|
+
/** Override the modal theme just for this login call: 'light' or 'dark'. */
|
|
18
|
+
theme?: 'light' | 'dark';
|
|
19
|
+
/** Override the modal title just for this login call. */
|
|
20
|
+
modalTitle?: string;
|
|
21
|
+
/** Override the modal subtitle just for this login call. */
|
|
22
|
+
modalSubtitle?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function login(options?: LoginOptions): Promise<User | null>;
|
|
16
25
|
export declare function getCurrentAuthMethod(): string | null;
|
|
17
26
|
export declare function logout(): Promise<void>;
|
|
@@ -6,7 +6,7 @@ export interface PhantomWalletConfig {
|
|
|
6
6
|
/** Providers to use for authentication. Accepts string[] for convenience (e.g., ["injected"]) */
|
|
7
7
|
providers?: PhantomProviderType[] | string[];
|
|
8
8
|
autoConnect?: boolean;
|
|
9
|
-
/** Theme for the connect modal: 'light' or 'dark' */
|
|
9
|
+
/** Theme for the connect modal: 'light' or 'dark'. Defaults to 'dark'. */
|
|
10
10
|
theme?: 'light' | 'dark';
|
|
11
11
|
/** App name displayed in the connect modal */
|
|
12
12
|
appName?: string;
|
|
@@ -14,6 +14,22 @@ export interface PhantomWalletConfig {
|
|
|
14
14
|
appIcon?: string;
|
|
15
15
|
/** Enable a "Log in with email" fallback button (via Privy) in the Phantom modal */
|
|
16
16
|
enablePrivyFallback?: boolean;
|
|
17
|
+
/** Custom title shown at the top of the login modal. Overrides the default "Log in to your account". */
|
|
18
|
+
modalTitle?: string;
|
|
19
|
+
/** Custom subtitle shown below the title in the login modal. */
|
|
20
|
+
modalSubtitle?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Per-call overrides for `login()`. All fields are optional and take precedence
|
|
24
|
+
* over the values set in `PhantomWalletConfig` during `init()`.
|
|
25
|
+
*/
|
|
26
|
+
export interface LoginOptions {
|
|
27
|
+
/** Override the modal theme just for this login call. */
|
|
28
|
+
theme?: 'light' | 'dark';
|
|
29
|
+
/** Override the modal title just for this login call. */
|
|
30
|
+
modalTitle?: string;
|
|
31
|
+
/** Override the modal subtitle just for this login call. */
|
|
32
|
+
modalSubtitle?: string;
|
|
17
33
|
}
|
|
18
34
|
export declare class PhantomWalletProvider implements AuthProvider {
|
|
19
35
|
private static instance;
|
|
@@ -27,6 +43,9 @@ export declare class PhantomWalletProvider implements AuthProvider {
|
|
|
27
43
|
private loginInProgress;
|
|
28
44
|
private autoLoginInProgress;
|
|
29
45
|
private initPromise;
|
|
46
|
+
private loginOverrides;
|
|
47
|
+
/** Temporarily override modal appearance for a single login() call. Cleared automatically after login settles. */
|
|
48
|
+
setLoginOverrides(opts: LoginOptions | null): void;
|
|
30
49
|
/** Callback to swap to a Privy provider when the user clicks "Log in with email" */
|
|
31
50
|
onSwitchToPrivy: (() => Promise<AuthProvider>) | null;
|
|
32
51
|
/** Callback to swap to a Mobile Wallet Adapter provider when the user clicks "Connect Mobile Wallet" */
|
|
@@ -37,26 +56,6 @@ export declare class PhantomWalletProvider implements AuthProvider {
|
|
|
37
56
|
* Check if social login providers are configured (non-injected providers).
|
|
38
57
|
*/
|
|
39
58
|
private hasSocialProviders;
|
|
40
|
-
/**
|
|
41
|
-
* Decide whether to mount the @phantom/react-sdk <PhantomProvider> tree
|
|
42
|
-
* eagerly during init() or defer until the first user-triggered call
|
|
43
|
-
* (login / sign / etc.) reaches ensureReady().
|
|
44
|
-
*
|
|
45
|
-
* Mounting the React tree synchronously constructs BrowserSDK, which runs
|
|
46
|
-
* wallet-standard discovery in its constructor and fires sdk.autoConnect()
|
|
47
|
-
* in a useEffect on mount. On Solana Seeker (Android Chrome PWA), both
|
|
48
|
-
* pathways probe the Android intent surface to discover the Phantom mobile
|
|
49
|
-
* app, which surfaces Chrome's system "wants to access other apps and
|
|
50
|
-
* services" permission dialog *before* the PWA activity has window focus.
|
|
51
|
-
* The dialog renders with grayed-out buttons until the user backgrounds
|
|
52
|
-
* and resumes the app.
|
|
53
|
-
*
|
|
54
|
-
* Returns true when eager mount is needed (callback to handle, prior
|
|
55
|
-
* session, in-page wallet present, or non-Android). Otherwise returns
|
|
56
|
-
* false — the React tree is mounted lazily inside ensureReady() once a
|
|
57
|
-
* user gesture brings us there.
|
|
58
|
-
*/
|
|
59
|
-
private shouldMountEagerly;
|
|
60
59
|
static getInstance(networkUrl: string | null, config: PhantomWalletConfig): PhantomWalletProvider;
|
|
61
60
|
private resolveProviders;
|
|
62
61
|
/**
|
package/dist/global.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AuthProvider, User, ClientConfig } from '@pooflabs/core';
|
|
2
|
+
import { LoginOptions } from './auth';
|
|
2
3
|
export declare function init(newConfig: Partial<ClientConfig>): Promise<void>;
|
|
3
4
|
export declare function onAuthStateChanged(callback: (user: User | null) => void): void;
|
|
4
5
|
export declare function onAuthLoadingChanged(callback: (loading: boolean) => void): void;
|
|
5
6
|
export declare function setAuthLoading(loading: boolean): void;
|
|
6
7
|
export declare function getAuthLoading(): boolean;
|
|
7
|
-
export declare function login(): Promise<User | null>;
|
|
8
|
+
export declare function login(options?: LoginOptions): Promise<User | null>;
|
|
9
|
+
export type { LoginOptions };
|
|
8
10
|
export declare function logout(): Promise<void>;
|
|
9
11
|
export declare function setCurrentUser(user: User | null): void;
|
|
10
12
|
export declare function getCurrentUser(): User | null;
|