btc-wallet 0.5.56-beta → 0.5.57-beta
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.js +39 -20
- package/dist/index.js.map +2 -2
- package/esm/index.js +39 -20
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/esm/index.js
CHANGED
@@ -4432,13 +4432,14 @@ function createFloatingButtonWithIframe({
|
|
4432
4432
|
position: "fixed",
|
4433
4433
|
bottom: `${bottom}px`,
|
4434
4434
|
right: `${right}px`,
|
4435
|
-
zIndex: "
|
4435
|
+
zIndex: "2147483647",
|
4436
4436
|
width: "60px",
|
4437
4437
|
height: "60px",
|
4438
4438
|
cursor: "grab",
|
4439
4439
|
transition: "transform 0.15s ease",
|
4440
4440
|
userSelect: "none",
|
4441
|
-
touchAction: "none"
|
4441
|
+
touchAction: "none",
|
4442
|
+
pointerEvents: "auto"
|
4442
4443
|
});
|
4443
4444
|
document.body.appendChild(button);
|
4444
4445
|
updateIframePosition(iframe, right, bottom, windowWidth, windowHeight);
|
@@ -4448,17 +4449,21 @@ function createFloatingButtonWithIframe({
|
|
4448
4449
|
let initialRight = 0;
|
4449
4450
|
let initialBottom = 0;
|
4450
4451
|
let dragStartTime = 0;
|
4451
|
-
|
4452
|
+
const handleMouseDown = (e) => {
|
4452
4453
|
startDrag(e.clientX, e.clientY);
|
4453
4454
|
e.preventDefault();
|
4454
|
-
|
4455
|
-
|
4455
|
+
e.stopPropagation();
|
4456
|
+
};
|
4457
|
+
const handleTouchStart = (e) => {
|
4456
4458
|
if (e.touches.length === 1) {
|
4457
4459
|
const touch = e.touches[0];
|
4458
4460
|
startDrag(touch.clientX, touch.clientY);
|
4459
4461
|
e.preventDefault();
|
4462
|
+
e.stopPropagation();
|
4460
4463
|
}
|
4461
|
-
}
|
4464
|
+
};
|
4465
|
+
button.addEventListener("mousedown", handleMouseDown, { capture: true });
|
4466
|
+
button.addEventListener("touchstart", handleTouchStart, { capture: true });
|
4462
4467
|
function startDrag(clientX, clientY) {
|
4463
4468
|
isDragging = true;
|
4464
4469
|
startX = clientX;
|
@@ -4469,18 +4474,23 @@ function createFloatingButtonWithIframe({
|
|
4469
4474
|
button.style.cursor = "grabbing";
|
4470
4475
|
button.style.transition = "none";
|
4471
4476
|
}
|
4472
|
-
|
4477
|
+
const handleMouseMove = (e) => {
|
4473
4478
|
if (!isDragging)
|
4474
4479
|
return;
|
4475
4480
|
moveButton(e.clientX, e.clientY);
|
4476
|
-
|
4477
|
-
|
4481
|
+
e.preventDefault();
|
4482
|
+
e.stopPropagation();
|
4483
|
+
};
|
4484
|
+
const handleTouchMove = (e) => {
|
4478
4485
|
if (!isDragging || e.touches.length !== 1)
|
4479
4486
|
return;
|
4480
4487
|
const touch = e.touches[0];
|
4481
4488
|
moveButton(touch.clientX, touch.clientY);
|
4482
4489
|
e.preventDefault();
|
4483
|
-
|
4490
|
+
e.stopPropagation();
|
4491
|
+
};
|
4492
|
+
document.addEventListener("mousemove", handleMouseMove, { capture: true });
|
4493
|
+
document.addEventListener("touchmove", handleTouchMove, { capture: true });
|
4484
4494
|
function moveButton(clientX, clientY) {
|
4485
4495
|
const deltaX = startX - clientX;
|
4486
4496
|
const deltaY = startY - clientY;
|
@@ -4504,15 +4514,23 @@ function createFloatingButtonWithIframe({
|
|
4504
4514
|
button.style.bottom = `${newBottom}px`;
|
4505
4515
|
updateIframePosition(iframe, newRight, newBottom, windowWidth, windowHeight);
|
4506
4516
|
}
|
4507
|
-
|
4508
|
-
|
4509
|
-
|
4510
|
-
|
4517
|
+
const handleMouseUp = (e) => {
|
4518
|
+
if (isDragging) {
|
4519
|
+
e.preventDefault();
|
4520
|
+
e.stopPropagation();
|
4521
|
+
}
|
4511
4522
|
endDrag();
|
4512
|
-
}
|
4513
|
-
|
4523
|
+
};
|
4524
|
+
const handleTouchEnd = (e) => {
|
4525
|
+
if (isDragging) {
|
4526
|
+
e.preventDefault();
|
4527
|
+
e.stopPropagation();
|
4528
|
+
}
|
4514
4529
|
endDrag();
|
4515
|
-
}
|
4530
|
+
};
|
4531
|
+
document.addEventListener("mouseup", handleMouseUp, { capture: true });
|
4532
|
+
document.addEventListener("touchend", handleTouchEnd, { capture: true });
|
4533
|
+
document.addEventListener("touchcancel", handleTouchEnd, { capture: true });
|
4516
4534
|
function endDrag() {
|
4517
4535
|
if (!isDragging)
|
4518
4536
|
return;
|
@@ -4562,11 +4580,12 @@ function createIframe({
|
|
4562
4580
|
position: "fixed",
|
4563
4581
|
bottom: "90px",
|
4564
4582
|
right: "20px",
|
4565
|
-
zIndex: "
|
4583
|
+
zIndex: "2147483646",
|
4566
4584
|
boxShadow: "0 0 10px rgba(0, 0, 0, 0.1)",
|
4567
4585
|
borderRadius: "10px",
|
4568
4586
|
display: isVisible ? "block" : "none",
|
4569
|
-
border: "none"
|
4587
|
+
border: "none",
|
4588
|
+
pointerEvents: "auto"
|
4570
4589
|
}, iframeStyle));
|
4571
4590
|
document.body.appendChild(iframe);
|
4572
4591
|
return iframe;
|
@@ -5080,7 +5099,7 @@ function getGroup(state) {
|
|
5080
5099
|
|
5081
5100
|
// src/index.ts
|
5082
5101
|
var getVersion = () => {
|
5083
|
-
return "0.5.
|
5102
|
+
return "0.5.57-beta";
|
5084
5103
|
};
|
5085
5104
|
if (typeof window !== "undefined") {
|
5086
5105
|
window.__BTC_WALLET_VERSION = getVersion();
|