page-transition 0.1.0-beta.13 → 0.1.0-beta.14

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.
@@ -55,8 +55,10 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
55
55
  resolveFn.current = resolve;
56
56
  resolveUseFn.current = reject;
57
57
  new Promise((resolveNavigating) => {
58
- if (state.current === "navigating" || state.current === "exiting") {
58
+ if (state.current === "navigating") {
59
+ console.log('state.current === "navigating"');
59
60
  if (currentPathname.current !== window.location.pathname) {
61
+ console.log('currentPathname.current !== window.location.pathname');
60
62
  if (checkTransitionFinish(transitionEndData.current, () => {
61
63
  resolveFn.current?.();
62
64
  setPromise(null);
@@ -64,6 +66,7 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
64
66
  return;
65
67
  }
66
68
  else if (currentPathname.current === window.location.pathname) {
69
+ console.log('currentPathname.current === window.location.pathname');
67
70
  if (checkTransitionFinish(transitionEndData.current, afterExitFn.current)) {
68
71
  return;
69
72
  }
@@ -73,10 +76,13 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
73
76
  }
74
77
  }
75
78
  else {
79
+ console.log('not navigating');
76
80
  resolveNavigating();
77
81
  }
78
82
  }).then(() => {
83
+ console.log('after resolveNavigating', 'state:', state.current);
79
84
  if (currentPathname.current === window.location.pathname) {
85
+ console.log('currentPathname.current === window.location.pathname');
80
86
  transitionEnd({
81
87
  transitionEndObj: afterExit,
82
88
  transitionEndHandler,
@@ -91,6 +97,8 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
91
97
  reverse,
92
98
  delay
93
99
  });
100
+ console.log('transitionEnd called Pop');
101
+ console.log(checkTransitionFinish(transitionEndData.current, () => { }));
94
102
  container.current?.classList.remove('enter');
95
103
  container.current?.classList.add('exit');
96
104
  state.current = 'exiting';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "page-transition",
3
- "version": "0.1.0-beta.13",
3
+ "version": "0.1.0-beta.14",
4
4
  "description": "A page transition library for the Next.js App Router.",
5
5
  "license": "MIT",
6
6
  "files": [