@pooflabs/web 0.0.55 → 0.0.57
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-CGy9iELS.js → index-DFi8Tb9p.js} +49 -3
- package/dist/{index-CGy9iELS.js.map → index-DFi8Tb9p.js.map} +1 -1
- package/dist/{index-7m0-SKUA.js → index-OppCl1Ve.js} +2 -2
- package/dist/{index-7m0-SKUA.js.map → index-OppCl1Ve.js.map} +1 -1
- package/dist/{index-BuNLAf52.esm.js → index-iG3iHW2H.esm.js} +2 -2
- package/dist/{index-BuNLAf52.esm.js.map → index-iG3iHW2H.esm.js.map} +1 -1
- package/dist/{index-DxhpTEeo.esm.js → index-ipxXG26r.esm.js} +49 -3
- package/dist/{index-DxhpTEeo.esm.js.map → index-ipxXG26r.esm.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -13086,7 +13086,7 @@ async function loadDependencies() {
|
|
|
13086
13086
|
const [reactModule, reactDomModule, phantomModule] = await Promise.all([
|
|
13087
13087
|
import('react'),
|
|
13088
13088
|
import('react-dom/client'),
|
|
13089
|
-
Promise.resolve().then(function () { return require('./index-
|
|
13089
|
+
Promise.resolve().then(function () { return require('./index-OppCl1Ve.js'); })
|
|
13090
13090
|
]);
|
|
13091
13091
|
// Extract default export from ESM module namespace
|
|
13092
13092
|
// Dynamic import() returns { default: Module, ...exports }, not the module directly
|
|
@@ -13196,6 +13196,11 @@ class PhantomWalletProvider {
|
|
|
13196
13196
|
existingProviders.forEach(el => el.remove());
|
|
13197
13197
|
this.containerElement = document.createElement('div');
|
|
13198
13198
|
this.containerElement.setAttribute('data-phantom-provider', 'true');
|
|
13199
|
+
// Keep the provider root above host app overlays/modals and clickable.
|
|
13200
|
+
this.containerElement.style.position = 'fixed';
|
|
13201
|
+
this.containerElement.style.inset = '0';
|
|
13202
|
+
this.containerElement.style.zIndex = '2147483647';
|
|
13203
|
+
this.containerElement.style.pointerEvents = 'none';
|
|
13199
13204
|
document.body.appendChild(this.containerElement);
|
|
13200
13205
|
const that = this;
|
|
13201
13206
|
const { PhantomProvider: ReactPhantomProvider, usePhantom, useConnect, useDisconnect, useModal, useSolana, useDiscoveredWallets, AddressType, darkTheme, lightTheme } = phantomReactSdk;
|
|
@@ -13342,6 +13347,33 @@ class PhantomWalletProvider {
|
|
|
13342
13347
|
}
|
|
13343
13348
|
prevModalOpen.current = showWalletModal || modal.isOpened;
|
|
13344
13349
|
}, [showWalletModal, modal.isOpened, phantom === null || phantom === void 0 ? void 0 : phantom.isConnected]);
|
|
13350
|
+
// While any modal is open, block pointer events on everything behind it.
|
|
13351
|
+
// This guarantees host app modals (e.g. z-50 stacks) can't steal clicks.
|
|
13352
|
+
React$1.useEffect(() => {
|
|
13353
|
+
const isModalOpen = showWalletModal || modal.isOpened;
|
|
13354
|
+
if (!isModalOpen)
|
|
13355
|
+
return;
|
|
13356
|
+
const container = that.containerElement;
|
|
13357
|
+
if (!container || typeof document === 'undefined')
|
|
13358
|
+
return;
|
|
13359
|
+
// Enable clicks on the Phantom container while a modal is open
|
|
13360
|
+
container.style.pointerEvents = 'auto';
|
|
13361
|
+
const restored = new Map();
|
|
13362
|
+
const bodyChildren = Array.from(document.body.children);
|
|
13363
|
+
for (const el of bodyChildren) {
|
|
13364
|
+
if (el === container)
|
|
13365
|
+
continue;
|
|
13366
|
+
restored.set(el, el.style.pointerEvents);
|
|
13367
|
+
el.style.pointerEvents = 'none';
|
|
13368
|
+
}
|
|
13369
|
+
return () => {
|
|
13370
|
+
// Restore pass-through on the container when modal closes
|
|
13371
|
+
container.style.pointerEvents = 'none';
|
|
13372
|
+
for (const [el, prev] of restored.entries()) {
|
|
13373
|
+
el.style.pointerEvents = prev;
|
|
13374
|
+
}
|
|
13375
|
+
};
|
|
13376
|
+
}, [showWalletModal, modal.isOpened]);
|
|
13345
13377
|
// Handle connection errors
|
|
13346
13378
|
React$1.useEffect(() => {
|
|
13347
13379
|
if (connectError && that.pendingLogin) {
|
|
@@ -13572,12 +13604,19 @@ class PhantomWalletProvider {
|
|
|
13572
13604
|
display: 'flex',
|
|
13573
13605
|
alignItems: 'center',
|
|
13574
13606
|
justifyContent: 'center',
|
|
13575
|
-
zIndex:
|
|
13607
|
+
zIndex: 2147483647,
|
|
13608
|
+
pointerEvents: 'auto',
|
|
13576
13609
|
},
|
|
13577
13610
|
onClick: (e) => {
|
|
13578
13611
|
if (e.target === e.currentTarget)
|
|
13579
13612
|
handleCloseModal();
|
|
13580
13613
|
},
|
|
13614
|
+
onMouseDown: (e) => {
|
|
13615
|
+
e.stopPropagation();
|
|
13616
|
+
},
|
|
13617
|
+
onPointerDown: (e) => {
|
|
13618
|
+
e.stopPropagation();
|
|
13619
|
+
},
|
|
13581
13620
|
},
|
|
13582
13621
|
// Card
|
|
13583
13622
|
React$1.createElement('div', {
|
|
@@ -13589,6 +13628,13 @@ class PhantomWalletProvider {
|
|
|
13589
13628
|
padding: '24px',
|
|
13590
13629
|
position: 'relative',
|
|
13591
13630
|
boxShadow: '0 20px 60px rgba(0,0,0,0.3)',
|
|
13631
|
+
pointerEvents: 'auto',
|
|
13632
|
+
},
|
|
13633
|
+
onMouseDown: (e) => {
|
|
13634
|
+
e.stopPropagation();
|
|
13635
|
+
},
|
|
13636
|
+
onPointerDown: (e) => {
|
|
13637
|
+
e.stopPropagation();
|
|
13592
13638
|
},
|
|
13593
13639
|
},
|
|
13594
13640
|
// Close button (X)
|
|
@@ -34682,4 +34728,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
|
|
|
34682
34728
|
exports.signTransaction = signTransaction;
|
|
34683
34729
|
exports.subscribe = subscribe;
|
|
34684
34730
|
exports.useAuth = useAuth;
|
|
34685
|
-
//# sourceMappingURL=index-
|
|
34731
|
+
//# sourceMappingURL=index-DFi8Tb9p.js.map
|