@agent-native/pinpoint 0.1.12 → 0.1.13

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.
@@ -845,6 +845,7 @@ var PinMarkerManager = class {
845
845
  opacity: 0.6;
846
846
  `;
847
847
  const badge = document.createElement("div");
848
+ badge.className = "pp-marker-badge";
848
849
  badge.style.cssText = `
849
850
  position: absolute;
850
851
  top: ${BADGE_OFFSET}px;
@@ -868,29 +869,44 @@ var PinMarkerManager = class {
868
869
  pointer-events: auto;
869
870
  user-select: none;
870
871
  z-index: 1;
871
- animation: pp-badge-appear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
872
872
  `;
873
873
  if (!document.getElementById("pp-marker-keyframes")) {
874
874
  const style2 = document.createElement("style");
875
875
  style2.id = "pp-marker-keyframes";
876
876
  style2.textContent = `
877
+ .pp-marker-badge {
878
+ animation: pp-badge-appear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
879
+ }
880
+
877
881
  @keyframes pp-badge-appear {
878
- from { transform: scale(0); opacity: 0; }
882
+ from { transform: scale(0.95); opacity: 0; }
879
883
  to { transform: scale(1); opacity: 1; }
880
884
  }
885
+
886
+ @keyframes pp-badge-appear-reduced {
887
+ from { opacity: 0; }
888
+ to { opacity: 1; }
889
+ }
890
+
891
+ @media (prefers-reduced-motion: reduce) {
892
+ .pp-marker-badge {
893
+ animation: pp-badge-appear-reduced 0.1s ease-out;
894
+ }
895
+ }
881
896
  `;
882
897
  document.head.appendChild(style2);
883
898
  }
899
+ const prefersReducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
884
900
  badge.addEventListener("click", (e) => {
885
901
  e.stopPropagation();
886
902
  e.preventDefault();
887
903
  this.onClick?.(pin);
888
904
  });
889
905
  badge.addEventListener("mouseenter", () => {
890
- badge.style.transform = "scale(1.15)";
906
+ if (!prefersReducedMotion) badge.style.transform = "scale(1.15)";
891
907
  });
892
908
  badge.addEventListener("mouseleave", () => {
893
- badge.style.transform = "scale(1)";
909
+ if (!prefersReducedMotion) badge.style.transform = "scale(1)";
894
910
  });
895
911
  const checkbox = document.createElement("div");
896
912
  checkbox.style.cssText = `
@@ -4924,4 +4940,4 @@ export {
4924
4940
  mountPinpoint,
4925
4941
  unmountPinpoint
4926
4942
  };
4927
- //# sourceMappingURL=chunk-HC724C43.js.map
4943
+ //# sourceMappingURL=chunk-P4AZ2AAL.js.map