saltfish 0.3.4 → 0.3.5

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.
@@ -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;
@@ -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.5";
11248
11255
  const packageJson = {
11249
11256
  version
11250
11257
  };