├── .commitlintrc.json ├── .editorconfig ├── .eslintrc.json ├── .github └── workflows │ └── node-ci.yml ├── .gitignore ├── .huskyrc ├── .lintstagedrc ├── CHANGELOG.md ├── LICENSE ├── README.md ├── babel.config.js ├── demo ├── .gitignore ├── components │ ├── page-links │ │ ├── PageLinks.js │ │ ├── PageLinks.module.css │ │ └── index.js │ └── page-transition │ │ ├── PageTransition.js │ │ ├── PageTransition.module.css │ │ └── index.js ├── next.config.js ├── package-lock.json ├── package.json └── pages │ ├── _app.js │ ├── another-page.js │ ├── another-page.module.css │ ├── async-page.js │ ├── async-page.module.css │ ├── index.js │ └── index.module.css ├── jest.config.js ├── jest.setup.js ├── package.json ├── postcss.config.js └── src ├── RouterScrollProvider.js ├── RouterScrollProvider.test.js ├── context.js ├── index.js ├── scroll-behavior ├── NextScrollBehavior.browser.js ├── NextScrollBehavior.browser.test.js ├── NextScrollBehavior.node.js ├── StateStorage.js ├── history.js ├── history.test.js └── index.js ├── use-router-scroll.js ├── use-router-scroll.test.js ├── with-router-scroll.js └── with-router-scroll.test.js /.commitlintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/.commitlintrc.json -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/.editorconfig -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.github/workflows/node-ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/.github/workflows/node-ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log* 3 | coverage 4 | lib/ 5 | es/ 6 | dist/ 7 | -------------------------------------------------------------------------------- /.huskyrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/.huskyrc -------------------------------------------------------------------------------- /.lintstagedrc: -------------------------------------------------------------------------------- 1 | { 2 | "*.js": "eslint" 3 | } 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/README.md -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/babel.config.js -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next/ 3 | out/ 4 | -------------------------------------------------------------------------------- /demo/components/page-links/PageLinks.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/components/page-links/PageLinks.js -------------------------------------------------------------------------------- /demo/components/page-links/PageLinks.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/components/page-links/PageLinks.module.css -------------------------------------------------------------------------------- /demo/components/page-links/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './PageLinks'; 2 | -------------------------------------------------------------------------------- /demo/components/page-transition/PageTransition.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/components/page-transition/PageTransition.js -------------------------------------------------------------------------------- /demo/components/page-transition/PageTransition.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/components/page-transition/PageTransition.module.css -------------------------------------------------------------------------------- /demo/components/page-transition/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './PageTransition'; 2 | -------------------------------------------------------------------------------- /demo/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/next.config.js -------------------------------------------------------------------------------- /demo/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/package-lock.json -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/package.json -------------------------------------------------------------------------------- /demo/pages/_app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/pages/_app.js -------------------------------------------------------------------------------- /demo/pages/another-page.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/pages/another-page.js -------------------------------------------------------------------------------- /demo/pages/another-page.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/pages/another-page.module.css -------------------------------------------------------------------------------- /demo/pages/async-page.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/pages/async-page.js -------------------------------------------------------------------------------- /demo/pages/async-page.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/pages/async-page.module.css -------------------------------------------------------------------------------- /demo/pages/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/pages/index.js -------------------------------------------------------------------------------- /demo/pages/index.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/demo/pages/index.module.css -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/jest.config.js -------------------------------------------------------------------------------- /jest.setup.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/jest.setup.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/package.json -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('@moxy/postcss-preset')(); 4 | -------------------------------------------------------------------------------- /src/RouterScrollProvider.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/RouterScrollProvider.js -------------------------------------------------------------------------------- /src/RouterScrollProvider.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/RouterScrollProvider.test.js -------------------------------------------------------------------------------- /src/context.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/context.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/index.js -------------------------------------------------------------------------------- /src/scroll-behavior/NextScrollBehavior.browser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/scroll-behavior/NextScrollBehavior.browser.js -------------------------------------------------------------------------------- /src/scroll-behavior/NextScrollBehavior.browser.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/scroll-behavior/NextScrollBehavior.browser.test.js -------------------------------------------------------------------------------- /src/scroll-behavior/NextScrollBehavior.node.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/scroll-behavior/NextScrollBehavior.node.js -------------------------------------------------------------------------------- /src/scroll-behavior/StateStorage.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/scroll-behavior/StateStorage.js -------------------------------------------------------------------------------- /src/scroll-behavior/history.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/scroll-behavior/history.js -------------------------------------------------------------------------------- /src/scroll-behavior/history.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/scroll-behavior/history.test.js -------------------------------------------------------------------------------- /src/scroll-behavior/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/scroll-behavior/index.js -------------------------------------------------------------------------------- /src/use-router-scroll.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/use-router-scroll.js -------------------------------------------------------------------------------- /src/use-router-scroll.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/use-router-scroll.test.js -------------------------------------------------------------------------------- /src/with-router-scroll.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/with-router-scroll.js -------------------------------------------------------------------------------- /src/with-router-scroll.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moxystudio/next-router-scroll/HEAD/src/with-router-scroll.test.js --------------------------------------------------------------------------------