saltfish 0.3.82 → 0.3.83

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.
@@ -9669,6 +9669,9 @@ class TransitionManager {
9669
9669
  __publicField(this, "triggerManager", null);
9670
9670
  // beforeunload handler for cross-page URL transitions
9671
9671
  __publicField(this, "beforeUnloadHandler", null);
9672
+ // Store original history methods so they can be restored on destroy
9673
+ __publicField(this, "originalPushState", null);
9674
+ __publicField(this, "originalReplaceState", null);
9672
9675
  /**
9673
9676
  * Handles URL changes by checking active URL path transitions and playlist triggers
9674
9677
  */
@@ -9732,14 +9735,14 @@ class TransitionManager {
9732
9735
  * Monitors history pushState and replaceState methods to detect SPA navigation
9733
9736
  */
9734
9737
  monitorHistoryChanges() {
9735
- const originalPushState = history.pushState;
9736
- const originalReplaceState = history.replaceState;
9738
+ this.originalPushState = history.pushState;
9739
+ this.originalReplaceState = history.replaceState;
9737
9740
  history.pushState = (...args) => {
9738
- originalPushState.apply(history, args);
9741
+ this.originalPushState.apply(history, args);
9739
9742
  this.handleURLChange();
9740
9743
  };
9741
9744
  history.replaceState = (...args) => {
9742
- originalReplaceState.apply(history, args);
9745
+ this.originalReplaceState.apply(history, args);
9743
9746
  this.handleURLChange();
9744
9747
  };
9745
9748
  }
@@ -10142,6 +10145,14 @@ class TransitionManager {
10142
10145
  destroy() {
10143
10146
  this.cleanupTransitions();
10144
10147
  window.removeEventListener("popstate", this.handleURLChange);
10148
+ if (this.originalPushState) {
10149
+ history.pushState = this.originalPushState;
10150
+ this.originalPushState = null;
10151
+ }
10152
+ if (this.originalReplaceState) {
10153
+ history.replaceState = this.originalReplaceState;
10154
+ this.originalReplaceState = null;
10155
+ }
10145
10156
  }
10146
10157
  /**
10147
10158
  * Sets up DOM element visible transitions
@@ -12903,7 +12914,7 @@ const SaltfishPlayer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
12903
12914
  __proto__: null,
12904
12915
  SaltfishPlayer
12905
12916
  }, Symbol.toStringTag, { value: "Module" }));
12906
- const version = "0.3.82";
12917
+ const version = "0.3.83";
12907
12918
  const packageJson = {
12908
12919
  version
12909
12920
  };