├── .babelrc ├── .circleci └── config.yml ├── .eslintignore ├── .eslintrc.js ├── .github ├── CODE_OF_CONDUCT.md ├── COMMIT_CONVENTION.md └── CONTRIBUTING.md ├── .gitignore ├── .prettierrc.js ├── CHANGELOG.MD ├── LICENSE ├── README.md ├── dist ├── vuescroll-esm.js ├── vuescroll-native.d.ts ├── vuescroll-native.js ├── vuescroll-native.min.js ├── vuescroll-slide.d.ts ├── vuescroll-slide.js ├── vuescroll-slide.min.js ├── vuescroll.css ├── vuescroll.esm.js ├── vuescroll.js └── vuescroll.min.js ├── examples ├── base-scroll.html └── vue.js ├── jsconfig.json ├── package.json ├── scripts ├── alias.js ├── build.js ├── config.js └── debug-build.js ├── src ├── core │ ├── components │ │ ├── bar.js │ │ └── panel.js │ ├── index.js │ ├── mixins │ │ ├── api.js │ │ ├── config.js │ │ ├── core.js │ │ ├── index.js │ │ └── mix-panel.js │ └── third-party │ │ ├── README.MD │ │ ├── easingPattern │ │ ├── README.MD │ │ └── index.js │ │ ├── resize-detector │ │ ├── README.MD │ │ └── index.js │ │ └── scroller │ │ ├── README.MD │ │ ├── animate.js │ │ ├── index.js │ │ ├── listener.js │ │ ├── render.js │ │ └── requestAnimationFrame.js ├── entry-mix-mode.js ├── entry-native-mode.js ├── entry-slide-mode.js ├── mode │ ├── mix │ │ ├── config.js │ │ ├── core.js │ │ ├── index.js │ │ ├── mix-panel.js │ │ └── mixins │ │ │ ├── api.js │ │ │ ├── index.js │ │ │ └── update-mix.js │ ├── native │ │ ├── config.js │ │ ├── core.js │ │ ├── index.js │ │ ├── mixins │ │ │ ├── api.js │ │ │ ├── index.js │ │ │ ├── scrollAnimate.js │ │ │ └── update-native.js │ │ └── native-panel.js │ └── slide │ │ ├── config.js │ │ ├── core.js │ │ ├── index.js │ │ ├── mixins │ │ ├── api.js │ │ ├── index.js │ │ └── update-slide.js │ │ └── slide-panel.js └── shared │ ├── base-config.js │ ├── constants.js │ ├── index.js │ ├── log.js │ ├── runtime.js │ ├── scroll-map.js │ ├── touchManager.js │ ├── utils.js │ └── zoomManager.js ├── test └── unit │ ├── index.js │ ├── karma.conf.js │ ├── specs │ ├── api.spec.js │ ├── assert-warn-info.spec.js │ ├── bar.spec.js │ ├── class-hooks.spec.js │ ├── event.spec.js │ ├── mode.spec.js │ ├── scroll-panel.spec.js │ ├── slot.spec.js │ ├── util.spec.js │ └── vuescroll.spec.js │ └── util.js ├── types ├── Config.d.ts ├── index.d.ts ├── vue.d.ts ├── vuescroll-native.d.ts ├── vuescroll-slide.d.ts └── vuescroll.d.ts └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { "modules": false }], 4 | ], 5 | "plugins": ["@vue/babel-plugin-jsx"] 6 | // "env": { 7 | // "build": { 8 | // "plugins": ["external-helpers"] 9 | // } 10 | // } 11 | } 12 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Javascript Node CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-javascript/ for more details 4 | # 5 | defaults: &defaults 6 | working_directory: ~/project/vuescroll 7 | docker: 8 | - image: circleci/node:10-browsers 9 | version: 2 10 | jobs: 11 | install: 12 | <<: *defaults 13 | steps: 14 | - checkout 15 | # Download and cache dependencies 16 | - restore_cache: 17 | keys: 18 | - v1-dependencies-{{ checksum "package.json" }} 19 | # fallback to using the latest cache if no exact match is found 20 | - v1-dependencies- 21 | - run: sudo npm install 22 | - save_cache: 23 | paths: 24 | - node_modules 25 | key: v1-dependencies-{{ checksum "package.json" }} 26 | - persist_to_workspace: 27 | root: ~/project 28 | paths: 29 | - vuescroll 30 | test-cover: 31 | <<: *defaults 32 | steps: 33 | - attach_workspace: 34 | at: ~/project 35 | # run tests! 36 | - run: npm run test 37 | - run: 38 | name: report coverage stats for non-PRs 39 | command: | 40 | if [[ -z $CI_PULL_REQUEST ]]; then 41 | cat ./test/coverage/lcov.info | ./node_modules/.bin/codecov 42 | fi 43 | lint: 44 | <<: *defaults 45 | steps: 46 | - attach_workspace: 47 | at: ~/project 48 | # run tests! 49 | - run: npm run lint 50 | workflows: 51 | version: 2 52 | install-and-parallel-test: 53 | jobs: 54 | - install 55 | - test-cover: 56 | requires: 57 | - install 58 | - lint: 59 | requires: 60 | - install 61 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | coverage 3 | node_modules 4 | examples -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: 'eslint:recommended', 4 | parser: 'babel-eslint', 5 | rules: { 6 | semi: ['error', 'always'], 7 | 'no-undef': 0, 8 | 'no-unused-vars': [ 9 | 'error', 10 | { 11 | argsIgnorePattern: '^h$', 12 | varsIgnorePattern: '^h$' 13 | } 14 | ], 15 | quotes: ['error', 'single'], 16 | excludedFiles: 'dist/*.js'.anchor, 17 | 'no-console': [0], 18 | indent: 0 19 | }, 20 | parserOptions: { 21 | ecmaVersion: 6, 22 | sourceType: 'module', 23 | ecmaFeatures: { 24 | jsx: true, 25 | experimentalObjectRestSpread: true 26 | } 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. 4 | 5 | We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion. 6 | 7 | Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. 8 | 9 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. 10 | 11 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. 12 | 13 | This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/) 14 | -------------------------------------------------------------------------------- /.github/COMMIT_CONVENTION.md: -------------------------------------------------------------------------------- 1 | ## Git Commit Message Convention 2 | 3 | > This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). 4 | 5 | #### TL;DR: 6 | 7 | Messages must be matched by the following regex: 8 | 9 | ``` js 10 | /^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/ 11 | ``` 12 | 13 | #### Examples 14 | 15 | Appears under "Features" header, `compiler` subheader: 16 | 17 | ``` 18 | feat(compiler): add 'comments' option 19 | ``` 20 | 21 | Appears under "Bug Fixes" header, `v-model` subheader, with a link to issue #28: 22 | 23 | ``` 24 | fix(v-model): handle events on blur 25 | 26 | close #28 27 | ``` 28 | 29 | Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: 30 | 31 | ``` 32 | perf(core): improve vdom diffing by removing 'foo' option 33 | 34 | BREAKING CHANGE: The 'foo' option has been removed. 35 | ``` 36 | 37 | The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. 38 | 39 | ``` 40 | revert: feat(compiler): add 'comments' option 41 | 42 | This reverts commit 667ecc1654a317a13331b17617d973392f415f02. 43 | ``` 44 | 45 | ### Full Message Format 46 | 47 | A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: 48 | 49 | ``` 50 | (): 51 | 52 | 53 | 54 |