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 CHANGED
@@ -4502,13 +4502,14 @@ function createFloatingButtonWithIframe({
4502
4502
  position: "fixed",
4503
4503
  bottom: `${bottom}px`,
4504
4504
  right: `${right}px`,
4505
- zIndex: "100000",
4505
+ zIndex: "2147483647",
4506
4506
  width: "60px",
4507
4507
  height: "60px",
4508
4508
  cursor: "grab",
4509
4509
  transition: "transform 0.15s ease",
4510
4510
  userSelect: "none",
4511
- touchAction: "none"
4511
+ touchAction: "none",
4512
+ pointerEvents: "auto"
4512
4513
  });
4513
4514
  document.body.appendChild(button);
4514
4515
  updateIframePosition(iframe, right, bottom, windowWidth, windowHeight);
@@ -4518,17 +4519,21 @@ function createFloatingButtonWithIframe({
4518
4519
  let initialRight = 0;
4519
4520
  let initialBottom = 0;
4520
4521
  let dragStartTime = 0;
4521
- button.addEventListener("mousedown", (e) => {
4522
+ const handleMouseDown = (e) => {
4522
4523
  startDrag(e.clientX, e.clientY);
4523
4524
  e.preventDefault();
4524
- });
4525
- button.addEventListener("touchstart", (e) => {
4525
+ e.stopPropagation();
4526
+ };
4527
+ const handleTouchStart = (e) => {
4526
4528
  if (e.touches.length === 1) {
4527
4529
  const touch = e.touches[0];
4528
4530
  startDrag(touch.clientX, touch.clientY);
4529
4531
  e.preventDefault();
4532
+ e.stopPropagation();
4530
4533
  }
4531
- });
4534
+ };
4535
+ button.addEventListener("mousedown", handleMouseDown, { capture: true });
4536
+ button.addEventListener("touchstart", handleTouchStart, { capture: true });
4532
4537
  function startDrag(clientX, clientY) {
4533
4538
  isDragging = true;
4534
4539
  startX = clientX;
@@ -4539,18 +4544,23 @@ function createFloatingButtonWithIframe({
4539
4544
  button.style.cursor = "grabbing";
4540
4545
  button.style.transition = "none";
4541
4546
  }
4542
- document.addEventListener("mousemove", (e) => {
4547
+ const handleMouseMove = (e) => {
4543
4548
  if (!isDragging)
4544
4549
  return;
4545
4550
  moveButton(e.clientX, e.clientY);
4546
- });
4547
- document.addEventListener("touchmove", (e) => {
4551
+ e.preventDefault();
4552
+ e.stopPropagation();
4553
+ };
4554
+ const handleTouchMove = (e) => {
4548
4555
  if (!isDragging || e.touches.length !== 1)
4549
4556
  return;
4550
4557
  const touch = e.touches[0];
4551
4558
  moveButton(touch.clientX, touch.clientY);
4552
4559
  e.preventDefault();
4553
- });
4560
+ e.stopPropagation();
4561
+ };
4562
+ document.addEventListener("mousemove", handleMouseMove, { capture: true });
4563
+ document.addEventListener("touchmove", handleTouchMove, { capture: true });
4554
4564
  function moveButton(clientX, clientY) {
4555
4565
  const deltaX = startX - clientX;
4556
4566
  const deltaY = startY - clientY;
@@ -4574,15 +4584,23 @@ function createFloatingButtonWithIframe({
4574
4584
  button.style.bottom = `${newBottom}px`;
4575
4585
  updateIframePosition(iframe, newRight, newBottom, windowWidth, windowHeight);
4576
4586
  }
4577
- document.addEventListener("mouseup", () => {
4578
- endDrag();
4579
- });
4580
- document.addEventListener("touchend", () => {
4587
+ const handleMouseUp = (e) => {
4588
+ if (isDragging) {
4589
+ e.preventDefault();
4590
+ e.stopPropagation();
4591
+ }
4581
4592
  endDrag();
4582
- });
4583
- document.addEventListener("touchcancel", () => {
4593
+ };
4594
+ const handleTouchEnd = (e) => {
4595
+ if (isDragging) {
4596
+ e.preventDefault();
4597
+ e.stopPropagation();
4598
+ }
4584
4599
  endDrag();
4585
- });
4600
+ };
4601
+ document.addEventListener("mouseup", handleMouseUp, { capture: true });
4602
+ document.addEventListener("touchend", handleTouchEnd, { capture: true });
4603
+ document.addEventListener("touchcancel", handleTouchEnd, { capture: true });
4586
4604
  function endDrag() {
4587
4605
  if (!isDragging)
4588
4606
  return;
@@ -4632,11 +4650,12 @@ function createIframe({
4632
4650
  position: "fixed",
4633
4651
  bottom: "90px",
4634
4652
  right: "20px",
4635
- zIndex: "100000",
4653
+ zIndex: "2147483646",
4636
4654
  boxShadow: "0 0 10px rgba(0, 0, 0, 0.1)",
4637
4655
  borderRadius: "10px",
4638
4656
  display: isVisible ? "block" : "none",
4639
- border: "none"
4657
+ border: "none",
4658
+ pointerEvents: "auto"
4640
4659
  }, iframeStyle));
4641
4660
  document.body.appendChild(iframe);
4642
4661
  return iframe;
@@ -5148,7 +5167,7 @@ function getGroup(state) {
5148
5167
 
5149
5168
  // src/index.ts
5150
5169
  var getVersion = () => {
5151
- return "0.5.56-beta";
5170
+ return "0.5.57-beta";
5152
5171
  };
5153
5172
  if (typeof window !== "undefined") {
5154
5173
  window.__BTC_WALLET_VERSION = getVersion();