@pooflabs/web 0.0.73 → 0.0.75

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.
Files changed (65) hide show
  1. package/dist/auth/index.d.ts +4 -5
  2. package/dist/auth/providers/mock-auth-provider.d.ts +3 -3
  3. package/dist/auth/providers/privy-expo-provider.d.ts +105 -0
  4. package/dist/{index-BFJJZKXQ.js → index-BHYrnHi6.js} +357 -7
  5. package/dist/index-BHYrnHi6.js.map +1 -0
  6. package/dist/index-BcDe_euX.js +15928 -0
  7. package/dist/index-BcDe_euX.js.map +1 -0
  8. package/dist/index-Bdcc5821.js +2375 -0
  9. package/dist/index-Bdcc5821.js.map +1 -0
  10. package/dist/{index-TfCOBCez.esm.js → index-BqDvUK9s.esm.js} +352 -2
  11. package/dist/index-BqDvUK9s.esm.js.map +1 -0
  12. package/dist/index-CMeewi-G.js +21553 -0
  13. package/dist/index-CMeewi-G.js.map +1 -0
  14. package/dist/index-CrOVJFX9.esm.js +2373 -0
  15. package/dist/index-CrOVJFX9.esm.js.map +1 -0
  16. package/dist/index-Dho2J3X6.esm.js +21477 -0
  17. package/dist/index-Dho2J3X6.esm.js.map +1 -0
  18. package/dist/index-_vhjpl1l.esm.js +15887 -0
  19. package/dist/index-_vhjpl1l.esm.js.map +1 -0
  20. package/dist/{index.browser-ChrwVq76.esm.js → index.browser-Br0p4bjw.esm.js} +2 -3
  21. package/dist/{index.browser-ChrwVq76.esm.js.map → index.browser-Br0p4bjw.esm.js.map} +1 -1
  22. package/dist/{index.browser-BuIgwfvv.esm.js → index.browser-Btm3sRKb.esm.js} +2 -3
  23. package/dist/{index.browser-BuIgwfvv.esm.js.map → index.browser-Btm3sRKb.esm.js.map} +1 -1
  24. package/dist/{index.browser-wsb8xknL.js → index.browser-BzHjnrpD.js} +2 -3
  25. package/dist/{index.browser-wsb8xknL.js.map → index.browser-BzHjnrpD.js.map} +1 -1
  26. package/dist/index.browser-CGfjPfzM.esm.js +1468 -0
  27. package/dist/index.browser-CGfjPfzM.esm.js.map +1 -0
  28. package/dist/{index.browser-BO1XxDi0.js → index.browser-Dapjfbl6.js} +2 -3
  29. package/dist/{index.browser-BO1XxDi0.js.map → index.browser-Dapjfbl6.js.map} +1 -1
  30. package/dist/index.browser-JX3F6oPV.js +1471 -0
  31. package/dist/index.browser-JX3F6oPV.js.map +1 -0
  32. package/dist/index.d.ts +4 -0
  33. package/dist/index.esm.js +1 -2
  34. package/dist/index.esm.js.map +1 -1
  35. package/dist/index.js +6 -2
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.native-BB7er4-z.esm.js +13269 -0
  38. package/dist/index.native-BB7er4-z.esm.js.map +1 -0
  39. package/dist/index.native-DcKDTqvq.js +13348 -0
  40. package/dist/index.native-DcKDTqvq.js.map +1 -0
  41. package/dist/index.native.d.ts +24 -0
  42. package/dist/index.native.esm.js +6 -0
  43. package/dist/index.native.esm.js.map +1 -0
  44. package/dist/index.native.js +59 -0
  45. package/dist/index.native.js.map +1 -0
  46. package/dist/phantom-wallet-provider-DHok8ui3.esm.js +1307 -0
  47. package/dist/phantom-wallet-provider-DHok8ui3.esm.js.map +1 -0
  48. package/dist/phantom-wallet-provider-DMxFAUC4.js +1328 -0
  49. package/dist/phantom-wallet-provider-DMxFAUC4.js.map +1 -0
  50. package/dist/platform.d.ts +81 -0
  51. package/dist/privy-wallet-provider-Bhvw0t1d.js +3942 -0
  52. package/dist/privy-wallet-provider-Bhvw0t1d.js.map +1 -0
  53. package/dist/privy-wallet-provider-CFuoQYuv.esm.js +3921 -0
  54. package/dist/privy-wallet-provider-CFuoQYuv.esm.js.map +1 -0
  55. package/dist/solana-mobile-wallet-provider-BpQghAgC.esm.js +558 -0
  56. package/dist/solana-mobile-wallet-provider-BpQghAgC.esm.js.map +1 -0
  57. package/dist/solana-mobile-wallet-provider-D8b5y-By.js +579 -0
  58. package/dist/solana-mobile-wallet-provider-D8b5y-By.js.map +1 -0
  59. package/package.json +19 -3
  60. package/dist/index-BFJJZKXQ.js.map +0 -1
  61. package/dist/index-BV8MOXXy.js +0 -36033
  62. package/dist/index-BV8MOXXy.js.map +0 -1
  63. package/dist/index-D0yz-P8G.esm.js +0 -35962
  64. package/dist/index-D0yz-P8G.esm.js.map +0 -1
  65. package/dist/index-TfCOBCez.esm.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phantom-wallet-provider-DMxFAUC4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Platform abstraction layer for React Native compatibility.
3
+ *
4
+ * This module provides interfaces and default (web) implementations for
5
+ * browser-specific APIs that are unavailable in React Native:
6
+ * - Storage (localStorage / sessionStorage)
7
+ * - TextEncoder
8
+ * - Base-64 (btoa / atob)
9
+ * - SubtleCrypto (crypto.subtle.digest)
10
+ * - DOM helpers (document.*, requestAnimationFrame)
11
+ * - Location (window.location.origin)
12
+ * - UserAgent (navigator.userAgent)
13
+ *
14
+ * React Native consumers call `setPlatform(adapter)` once at startup to
15
+ * supply their own implementations (e.g. AsyncStorage-backed storage,
16
+ * expo-crypto, react-native-get-random-values, etc.).
17
+ *
18
+ * Web consumers don't need to do anything — the defaults use the browser APIs.
19
+ */
20
+ export interface StorageAdapter {
21
+ getItem(key: string): string | null;
22
+ setItem(key: string, value: string): void;
23
+ removeItem(key: string): void;
24
+ }
25
+ export interface PlatformAdapter {
26
+ /** Persistent storage (replaces localStorage). */
27
+ storage: StorageAdapter;
28
+ /** Session-scoped storage (replaces sessionStorage). */
29
+ sessionStorage: StorageAdapter;
30
+ /** UTF-8 text → bytes. */
31
+ textEncode(input: string): Uint8Array;
32
+ /** Base-64 decode → string of char codes. */
33
+ atob(input: string): string;
34
+ /** String of char codes → base-64. */
35
+ btoa(input: string): string;
36
+ /** SHA-256 hash, returns ArrayBuffer. */
37
+ sha256(data: Uint8Array): Promise<ArrayBuffer>;
38
+ /** navigator.userAgent equivalent (empty string if unavailable). */
39
+ getUserAgent(): string;
40
+ /** window.location.origin equivalent (undefined if unavailable). */
41
+ getLocationOrigin(): string | undefined;
42
+ /** Whether the runtime has a DOM (i.e. we're in a browser, not RN). */
43
+ hasDOM: boolean;
44
+ }
45
+ /**
46
+ * Override the platform adapter (call once at app startup in React Native).
47
+ *
48
+ * Must be called **before** `init()`. Can only be called once — subsequent
49
+ * calls throw to prevent accidental mid-session storage swaps.
50
+ *
51
+ * ```ts
52
+ * import { setPlatform } from '@pooflabs/web';
53
+ * import AsyncStorage from '@react-native-async-storage/async-storage';
54
+ *
55
+ * // Create a synchronous wrapper around AsyncStorage for the adapter
56
+ * // (see docs for a full example).
57
+ * setPlatform({ storage: myStorage, ... });
58
+ * ```
59
+ */
60
+ export declare function setPlatform(adapter: Partial<PlatformAdapter>): void;
61
+ /** Get the current platform adapter. */
62
+ export declare function getPlatform(): PlatformAdapter;
63
+ /**
64
+ * Detect mobile device even when Chrome "Request Desktop Site" is active.
65
+ *
66
+ * Desktop mode on Android strips "Android" and "Mobile" from the UA, leaving
67
+ * something like "Linux x86_64 …". The fallback detects this by looking for
68
+ * touch capability + small viewport + a UA that doesn't belong to a known
69
+ * desktop OS (ChromeOS, Windows, macOS).
70
+ */
71
+ export declare function detectMobile(): boolean;
72
+ /**
73
+ * Detect Android, including desktop-mode Chrome and Seeker/Saga in-app browsers.
74
+ */
75
+ export declare function detectAndroid(): boolean;
76
+ /**
77
+ * Reset the platform to web defaults and clear the configured flag.
78
+ * **For testing only** — not exported from the public API.
79
+ * @internal
80
+ */
81
+ export declare function _resetPlatformForTesting(): void;