saltfish 0.3.4 → 0.3.6

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.
@@ -2958,7 +2958,7 @@ class StateMachineActionHandler {
2958
2958
  return true;
2959
2959
  }
2960
2960
  const checkUrl = () => {
2961
- const currentUrl = window.location.href.split("#")[0];
2961
+ const currentUrl = window.location.href;
2962
2962
  const currentPath = window.location.pathname;
2963
2963
  let matches = false;
2964
2964
  if (matchType === "regex") {
@@ -7012,6 +7012,13 @@ class CursorManager {
7012
7012
  this.lastCursorY = this.targetY;
7013
7013
  this.dragPhase = "dragging";
7014
7014
  this.dragAnimationStartTime = performance.now();
7015
+ const dragDistance = this.calculateDistance(
7016
+ this.dragStartX + this.SELECTION_HORIZONTAL_OFFSET,
7017
+ this.dragStartY + this.SELECTION_VERTICAL_OFFSET,
7018
+ this.dragEndX + this.SELECTION_HORIZONTAL_OFFSET,
7019
+ this.dragEndY + this.SELECTION_VERTICAL_OFFSET
7020
+ );
7021
+ this.animationDuration = this.calculateAnimationDuration(dragDistance);
7015
7022
  if (this.cursor) {
7016
7023
  const x = this.lastCursorX;
7017
7024
  const y = this.lastCursorY;
@@ -7092,7 +7099,7 @@ class CursorManager {
7092
7099
  this.updateDragCoordinatesFromElement();
7093
7100
  }
7094
7101
  const elapsed = timestamp - this.dragAnimationStartTime;
7095
- const progress = Math.min(elapsed / 1e3, 1);
7102
+ const progress = Math.min(elapsed / this.animationDuration, 1);
7096
7103
  const easedProgress = 0.5 - 0.5 * Math.cos(progress * Math.PI);
7097
7104
  const currentX = this.dragStartX + (this.dragEndX - this.dragStartX) * easedProgress + this.SELECTION_HORIZONTAL_OFFSET;
7098
7105
  const currentY = this.dragStartY + (this.dragEndY - this.dragStartY) * easedProgress + this.SELECTION_VERTICAL_OFFSET;
@@ -8653,7 +8660,7 @@ class TransitionManager {
8653
8660
  if (!pattern) {
8654
8661
  return false;
8655
8662
  }
8656
- const currentUrl = window.location.href.split("#")[0];
8663
+ const currentUrl = window.location.href;
8657
8664
  const currentPath = window.location.pathname;
8658
8665
  const escapedPattern = pattern.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
8659
8666
  const regexPattern = escapedPattern.replace(/\\\*/g, ".*");
@@ -8672,7 +8679,7 @@ class TransitionManager {
8672
8679
  if (!pattern) {
8673
8680
  return true;
8674
8681
  }
8675
- const currentUrl = window.location.href.split("#")[0];
8682
+ const currentUrl = window.location.href;
8676
8683
  const currentPath = window.location.pathname;
8677
8684
  if (matchType === "regex") {
8678
8685
  try {
@@ -11244,7 +11251,7 @@ const SaltfishPlayer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
11244
11251
  __proto__: null,
11245
11252
  SaltfishPlayer
11246
11253
  }, Symbol.toStringTag, { value: "Module" }));
11247
- const version = "0.3.4";
11254
+ const version = "0.3.6";
11248
11255
  const packageJson = {
11249
11256
  version
11250
11257
  };