page-transition 0.1.0-beta.17 → 0.1.0-beta.18

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.
@@ -110,9 +110,8 @@ export function CssTransitionProvider({ header, options, children }) {
110
110
  state.current = 'entering';
111
111
  }
112
112
  });
113
- console.log('pathname fired', pathname, 'state:' + state.current);
114
113
  if (state.current === 'navigating')
115
- currentPathname.current = pathname;
114
+ currentPathname.current = window.location.pathname;
116
115
  reverse.current.lock = false;
117
116
  }, [pathname]);
118
117
  const value = useMemo(() => ({ handleLinkClick, overlayWrapper, overlayItems }), []);
@@ -43,8 +43,6 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
43
43
  const pop = useTransitionEndObj({
44
44
  transitionEndData,
45
45
  fn: () => {
46
- console.log('pop transitionEnd called');
47
- console.log(checkTransitionFinish(transitionEndData.current, () => { }));
48
46
  state.current = 'navigating';
49
47
  window.scrollTo(0, window.history.state.scrollY ?? 0);
50
48
  resolveFn.current?.();
@@ -60,9 +58,7 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
60
58
  resolveUseFn.current = reject;
61
59
  new Promise((resolveNavigating) => {
62
60
  if (state.current === "navigating") {
63
- console.log('state.current === "navigating"');
64
61
  if (currentPathname.current !== window.location.pathname) {
65
- console.log('currentPathname.current !== window.location.pathname');
66
62
  if (checkTransitionFinish(transitionEndData.current, () => {
67
63
  resolveFn.current?.();
68
64
  setPromise(null);
@@ -70,7 +66,6 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
70
66
  return;
71
67
  }
72
68
  else if (currentPathname.current === window.location.pathname) {
73
- console.log('currentPathname.current === window.location.pathname');
74
69
  if (checkTransitionFinish(transitionEndData.current, afterExitFn.current)) {
75
70
  return;
76
71
  }
@@ -80,15 +75,10 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
80
75
  }
81
76
  }
82
77
  else {
83
- console.log('not navigating');
84
78
  resolveNavigating();
85
79
  }
86
80
  }).then(() => {
87
- console.log('after resolveNavigating', 'state:', state.current);
88
- console.log('after resolveNavigating', 'currentPathname.current:', currentPathname.current);
89
- console.log('window.location.pathname:', window.location.pathname);
90
81
  if (currentPathname.current === window.location.pathname) {
91
- console.log('currentPathname.current === window.location.pathname');
92
82
  transitionEnd({
93
83
  transitionEndObj: afterExit,
94
84
  transitionEndHandler,
@@ -103,8 +93,6 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
103
93
  reverse,
104
94
  delay
105
95
  });
106
- console.log('transitionEnd called Pop');
107
- console.log(checkTransitionFinish(transitionEndData.current, () => { }));
108
96
  container.current?.classList.remove('enter');
109
97
  container.current?.classList.add('exit');
110
98
  state.current = 'exiting';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "page-transition",
3
- "version": "0.1.0-beta.17",
3
+ "version": "0.1.0-beta.18",
4
4
  "description": "A page transition library for the Next.js App Router.",
5
5
  "license": "MIT",
6
6
  "files": [