@bounded-sh/client 0.0.112-ux-audit.1 → 0.0.112
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/bounded-widget-modal.d.ts +24 -2
- package/dist/auth/oidc-auth.d.ts +1 -1
- package/dist/{email-auth-provider-eyi3Wpnx.mjs → email-auth-provider-BV1Iea4A.mjs} +2 -2
- package/dist/{email-auth-provider-BfCH7K6N.mjs.map → email-auth-provider-BV1Iea4A.mjs.map} +1 -1
- package/dist/{email-auth-provider-CG5cxOj0.js → email-auth-provider-CyFsnSzx.js} +2 -2
- package/dist/{email-auth-provider-CG5cxOj0.js.map → email-auth-provider-CyFsnSzx.js.map} +1 -1
- package/dist/{email-auth-provider-BfCH7K6N.mjs → email-auth-provider-D0_iXVYk.mjs} +2 -2
- package/dist/{email-auth-provider-eyi3Wpnx.mjs.map → email-auth-provider-D0_iXVYk.mjs.map} +1 -1
- package/dist/{email-auth-provider-DTrCfOJd.js → email-auth-provider-OVzQ63dn.js} +2 -2
- package/dist/{email-auth-provider-DTrCfOJd.js.map → email-auth-provider-OVzQ63dn.js.map} +1 -1
- package/dist/{guest-auth-provider-Tndt6tzJ.js → guest-auth-provider-0WlOutqU.js} +2 -2
- package/dist/{guest-auth-provider-Tndt6tzJ.js.map → guest-auth-provider-0WlOutqU.js.map} +1 -1
- package/dist/{guest-auth-provider-DjOFjtnk.mjs → guest-auth-provider-AP80a700.mjs} +2 -2
- package/dist/{guest-auth-provider-BsW56oJg.mjs.map → guest-auth-provider-AP80a700.mjs.map} +1 -1
- package/dist/{guest-auth-provider-Dtl1J-2F.js → guest-auth-provider-B4WIWOjV.js} +2 -2
- package/dist/{guest-auth-provider-Dtl1J-2F.js.map → guest-auth-provider-B4WIWOjV.js.map} +1 -1
- package/dist/{guest-auth-provider-BsW56oJg.mjs → guest-auth-provider-Cqx1zH23.mjs} +2 -2
- package/dist/{guest-auth-provider-DjOFjtnk.mjs.map → guest-auth-provider-Cqx1zH23.mjs.map} +1 -1
- package/dist/{index-Brdwqgqs.js → index-BmNNZlTl.js} +226 -67
- package/dist/index-BmNNZlTl.js.map +1 -0
- package/dist/{index-CRxls8Qc.mjs → index-D76-cZcD.mjs} +226 -67
- package/dist/index-D76-cZcD.mjs.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{index.native-ingNhWPw.js → index.native-C5glqiTU.js} +59 -14
- package/dist/index.native-C5glqiTU.js.map +1 -0
- package/dist/{index.native-CAH_ks0s.mjs → index.native-DyR93n8K.mjs} +59 -14
- package/dist/index.native-DyR93n8K.mjs.map +1 -0
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{injected-evm-wallet-provider-Cao1U0NZ.js → injected-evm-wallet-provider-4ICYUEU4.js} +2 -2
- package/dist/{injected-evm-wallet-provider-Cao1U0NZ.js.map → injected-evm-wallet-provider-4ICYUEU4.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-CwOGXCDt.js → injected-evm-wallet-provider-C8YItSiB.js} +2 -2
- package/dist/{injected-evm-wallet-provider-CwOGXCDt.js.map → injected-evm-wallet-provider-C8YItSiB.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-DXjwPjLW.mjs → injected-evm-wallet-provider-CS4R8c51.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-DXjwPjLW.mjs.map → injected-evm-wallet-provider-CS4R8c51.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-BjkCeRBL.mjs → injected-evm-wallet-provider-WxUbyMZL.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-BjkCeRBL.mjs.map → injected-evm-wallet-provider-WxUbyMZL.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-CfYNIIHd.mjs → injected-wallet-provider-D1ygndjX.mjs} +2 -2
- package/dist/{injected-wallet-provider-CfYNIIHd.mjs.map → injected-wallet-provider-D1ygndjX.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-LTnqoaYD.js → injected-wallet-provider-D8vIsUHf.js} +2 -2
- package/dist/{injected-wallet-provider-LTnqoaYD.js.map → injected-wallet-provider-D8vIsUHf.js.map} +1 -1
- package/dist/{injected-wallet-provider-BG6gGNch.mjs → injected-wallet-provider-UuGrzdNW.mjs} +2 -2
- package/dist/{injected-wallet-provider-BG6gGNch.mjs.map → injected-wallet-provider-UuGrzdNW.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-DSlHfgMU.js → injected-wallet-provider-nwd3ialR.js} +2 -2
- package/dist/{injected-wallet-provider-DSlHfgMU.js.map → injected-wallet-provider-nwd3ialR.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-Brdwqgqs.js.map +0 -1
- package/dist/index-CRxls8Qc.mjs.map +0 -1
- package/dist/index.native-CAH_ks0s.mjs.map +0 -1
- package/dist/index.native-ingNhWPw.js.map +0 -1
|
@@ -3819,9 +3819,13 @@ async function ensureSolanaMobileWalletRegistered(config, network) {
|
|
|
3819
3819
|
}
|
|
3820
3820
|
catch (_e) {
|
|
3821
3821
|
throw new WalletConfigError(`Bounded: Solana Mobile wallet support needs the optional peer dependency ` +
|
|
3822
|
-
`'@solana-mobile/wallet-standard-mobile', which is not installed.
|
|
3823
|
-
`
|
|
3824
|
-
`
|
|
3822
|
+
`'@solana-mobile/wallet-standard-mobile', which is not installed. Until it is, ` +
|
|
3823
|
+
`Android users (Seeker, Saga, any phone browser) get NO wallet to connect: ` +
|
|
3824
|
+
`installed wallet apps are never injected into a page there, the mobile adapter ` +
|
|
3825
|
+
`is the only route. Fix: npm install @solana-mobile/wallet-standard-mobile ` +
|
|
3826
|
+
`(a web app also needs legacy-peer-deps=true in its .npmrc, because the adapter's ` +
|
|
3827
|
+
`protocol package declares react-native as a peer). Or leave the Solana Mobile ` +
|
|
3828
|
+
`wallet out of this app's wallet configuration on purpose.`);
|
|
3825
3829
|
}
|
|
3826
3830
|
const { registerMwa, createDefaultChainSelector, SolanaMobileWalletAdapterWalletName, SolanaMobileWalletAdapterRemoteWalletName, } = mwa;
|
|
3827
3831
|
const before = new Set(getWallets().get());
|
|
@@ -3908,7 +3912,7 @@ const OVERLAY_CSS = `
|
|
|
3908
3912
|
:host{all:initial}
|
|
3909
3913
|
*{box-sizing:border-box}
|
|
3910
3914
|
.bw-ov{position:fixed;inset:0;z-index:2147483647;display:none;
|
|
3911
|
-
font-family:"Schibsted Grotesk","Helvetica Neue",Arial,sans-serif}
|
|
3915
|
+
font-family:"Bounded Schibsted Grotesk","Schibsted Grotesk","Helvetica Neue",Arial,sans-serif}
|
|
3912
3916
|
.bw-ov.mounted{display:block}
|
|
3913
3917
|
.bw-back{position:fixed;inset:0;background:rgba(4,4,5,.62);opacity:0;
|
|
3914
3918
|
transition:opacity .24s ease;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
|
|
@@ -3941,6 +3945,29 @@ const OVERLAY_CSS = `
|
|
|
3941
3945
|
}
|
|
3942
3946
|
@media(prefers-reduced-motion:reduce){.bw-back,.bw-panel{transition:opacity .12s linear!important}}
|
|
3943
3947
|
`;
|
|
3948
|
+
/**
|
|
3949
|
+
* Style the shadow tree with `css` as constructed stylesheets, and say whether it could. A host
|
|
3950
|
+
* CSP whose style-src lacks 'unsafe-inline' refuses an inline <style> even inside a shadow root,
|
|
3951
|
+
* which left the widget unstyled (the Bounded router compiles exactly `style-src 'self'` for an
|
|
3952
|
+
* app that declares browser boundaries and names no style sources); CSP does not govern
|
|
3953
|
+
* constructed sheets. A browser without them (they shipped with adoptedStyleSheets everywhere)
|
|
3954
|
+
* gets <style> elements instead (styleTag).
|
|
3955
|
+
*/
|
|
3956
|
+
function adoptStyles(shadow, css) {
|
|
3957
|
+
if (!("adoptedStyleSheets" in shadow))
|
|
3958
|
+
return false;
|
|
3959
|
+
shadow.adoptedStyleSheets = css.map((text) => {
|
|
3960
|
+
const sheet = new CSSStyleSheet();
|
|
3961
|
+
sheet.replaceSync(text);
|
|
3962
|
+
return sheet;
|
|
3963
|
+
});
|
|
3964
|
+
return true;
|
|
3965
|
+
}
|
|
3966
|
+
function styleTag(css) {
|
|
3967
|
+
const style = document.createElement("style");
|
|
3968
|
+
style.textContent = css;
|
|
3969
|
+
return style;
|
|
3970
|
+
}
|
|
3944
3971
|
let modal = null;
|
|
3945
3972
|
function getModal() {
|
|
3946
3973
|
if (modal)
|
|
@@ -3948,9 +3975,8 @@ function getModal() {
|
|
|
3948
3975
|
const root = document.createElement("div");
|
|
3949
3976
|
root.setAttribute("data-bounded-widget", "");
|
|
3950
3977
|
const shadow = root.attachShadow({ mode: "open" });
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
shadow.appendChild(style);
|
|
3978
|
+
if (!adoptStyles(shadow, [OVERLAY_CSS]))
|
|
3979
|
+
shadow.appendChild(styleTag(OVERLAY_CSS));
|
|
3954
3980
|
const overlay = document.createElement("div");
|
|
3955
3981
|
overlay.className = "bw-ov";
|
|
3956
3982
|
const back = document.createElement("div");
|
|
@@ -5949,7 +5975,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
5949
5975
|
// manager as legacy email sessions. Human login should be started
|
|
5950
5976
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
5951
5977
|
// logout surface for those sessions.
|
|
5952
|
-
currentAuthProvider = new (await import('./email-auth-provider-
|
|
5978
|
+
currentAuthProvider = new (await import('./email-auth-provider-D0_iXVYk.mjs')).EmailAuthProvider();
|
|
5953
5979
|
break;
|
|
5954
5980
|
case "phantom": {
|
|
5955
5981
|
// First-class Solana WALLET LOGIN (the poof/TaroBase-style "connect
|
|
@@ -5991,7 +6017,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
5991
6017
|
// (bounded-login-widget.ts), so registration never counts as
|
|
5992
6018
|
// evidence the user has a wallet.
|
|
5993
6019
|
await ensureSolanaMobileWalletRegistered(config, configuredNetwork);
|
|
5994
|
-
const { InjectedWalletProvider } = await import('./injected-wallet-provider-
|
|
6020
|
+
const { InjectedWalletProvider } = await import('./injected-wallet-provider-D1ygndjX.mjs');
|
|
5995
6021
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
5996
6022
|
break;
|
|
5997
6023
|
}
|
|
@@ -6004,7 +6030,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
6004
6030
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
6005
6031
|
// to point at a specific wallet or set chainId/domain.
|
|
6006
6032
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
6007
|
-
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-
|
|
6033
|
+
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-CS4R8c51.mjs');
|
|
6008
6034
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
6009
6035
|
break;
|
|
6010
6036
|
}
|
|
@@ -6029,7 +6055,7 @@ async function getAuthProvider(config, fromStorage = false) {
|
|
|
6029
6055
|
break;
|
|
6030
6056
|
case "guest":
|
|
6031
6057
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
6032
|
-
currentAuthProvider = new (await import('./guest-auth-provider-
|
|
6058
|
+
currentAuthProvider = new (await import('./guest-auth-provider-AP80a700.mjs')).GuestAuthProvider();
|
|
6033
6059
|
break;
|
|
6034
6060
|
}
|
|
6035
6061
|
if (!currentAuthProvider) {
|
|
@@ -6091,7 +6117,7 @@ async function signInAnonymously() {
|
|
|
6091
6117
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
6092
6118
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
6093
6119
|
// so bundle-splitting can see it.
|
|
6094
|
-
const provider = new (await import('./guest-auth-provider-
|
|
6120
|
+
const provider = new (await import('./guest-auth-provider-AP80a700.mjs')).GuestAuthProvider();
|
|
6095
6121
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
6096
6122
|
// adoptSessionProvider awaits only getConfig() (already resolved here) and then
|
|
6097
6123
|
// runs every write - provider/method/config/marker/user - in one synchronous
|
|
@@ -6262,7 +6288,7 @@ function ensureSharedWalletLoginReady() {
|
|
|
6262
6288
|
if (!sharedWalletReady) {
|
|
6263
6289
|
sharedWalletReady = (async () => {
|
|
6264
6290
|
await getConfig();
|
|
6265
|
-
await import('./injected-wallet-provider-
|
|
6291
|
+
await import('./injected-wallet-provider-D1ygndjX.mjs');
|
|
6266
6292
|
})().catch((error) => {
|
|
6267
6293
|
sharedWalletReady = null;
|
|
6268
6294
|
throw error;
|
|
@@ -6574,6 +6600,13 @@ function registerStorageBridge() {
|
|
|
6574
6600
|
void syncStoredSession().catch((error) => console.warn('Bounded session synchronization failed:', error));
|
|
6575
6601
|
});
|
|
6576
6602
|
}
|
|
6603
|
+
function sameSessionIdentity(next, previous) {
|
|
6604
|
+
if (!next || !previous)
|
|
6605
|
+
return false;
|
|
6606
|
+
const a = deriveUserIdentityFromIdToken(next);
|
|
6607
|
+
const b = deriveUserIdentityFromIdToken(previous);
|
|
6608
|
+
return !!a.id && a.id === b.id && a.address === b.address && a.email === b.email && a.evmAddress === b.evmAddress;
|
|
6609
|
+
}
|
|
6577
6610
|
async function syncStoredSession() {
|
|
6578
6611
|
const config = initializedConfig;
|
|
6579
6612
|
if (!config)
|
|
@@ -6582,6 +6615,18 @@ async function syncStoredSession() {
|
|
|
6582
6615
|
const issuer = WebSessionManager.getIssuer();
|
|
6583
6616
|
if (token === observedIdToken && issuer === observedIssuer)
|
|
6584
6617
|
return;
|
|
6618
|
+
// Another tab refreshed this same session (tokens rotate every few minutes):
|
|
6619
|
+
// who is signed in did not change, so keep the user and its live reads, whose
|
|
6620
|
+
// sockets take the new token on their own, instead of hiding and restoring it.
|
|
6621
|
+
if (currentUser && issuer === observedIssuer && sameSessionIdentity(token, observedIdToken)) {
|
|
6622
|
+
const record = await WebSessionManager.readSessionWithGeneration();
|
|
6623
|
+
if (config !== initializedConfig || WebSessionManager.getIdToken() !== token)
|
|
6624
|
+
return;
|
|
6625
|
+
if ((record === null || record === void 0 ? void 0 : record.idToken) === token && (!record.appId || record.appId === config.appId)) {
|
|
6626
|
+
observedIdToken = token;
|
|
6627
|
+
return;
|
|
6628
|
+
}
|
|
6629
|
+
}
|
|
6585
6630
|
observedIdToken = token;
|
|
6586
6631
|
observedIssuer = issuer;
|
|
6587
6632
|
const generation = ++initializationGeneration;
|
|
@@ -8742,4 +8787,4 @@ class PrivyExpoProvider {
|
|
|
8742
8787
|
}
|
|
8743
8788
|
|
|
8744
8789
|
export { BUILD_REVIEW_CAPABILITY_SCHEMA as $, logout as A, getAuthProvider as B, signInAnonymously as C, loginWithPrivy as D, loginWithRedirect as E, completeLoginFromRedirect as F, getLoginReturnError as G, loginWithPopup as H, useAuth as I, useQuery as J, useBuildRun as K, apps as L, getIdToken as M, onramp as N, onrampQuote as O, onrampStatus as P, setPlatform as Q, OffchainAuthProvider as R, PrivyExpoProvider as S, builds as T, BuildsApiError as U, mediaAgentTools as V, NON_TERMINAL_STATES as W, TERMINAL_STATES as X, RUN_STATES as Y, PARK_REASONS as Z, FAILURE_REASONS as _, signMessageWithTurnkey as a, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as a0, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as a1, signTransactionWithTurnkey as b, signTransactionV1WithTurnkey as c, signAndSubmitTransactionWithTurnkey as d, bs58 as e, getWallets as f, getPlatform as g, hasTurnkeyWallet as h, isSolanaMobileWallet as i, solanaMobileWalletLeavesPage as j, setAuthLoading as k, bufferExports as l, setStoredAuthMethod as m, normalizeSolanaRpcUrl as n, confirmAndCheckTransaction as o, resolveSolanaRpcUrl as p, init as q, resolveSolanaWalletStandardChain as r, setCurrentUser as s, transactionHasSignature as t, getCurrentUser as u, onAuthStateChanged as v, onAuthLoadingChanged as w, getAuthLoading as x, waitForAuthReady as y, login as z };
|
|
8745
|
-
//# sourceMappingURL=index.native-
|
|
8790
|
+
//# sourceMappingURL=index.native-DyR93n8K.mjs.map
|