├── .gitignore ├── screenshot.gif ├── public └── favicon.ico ├── example ├── assets │ └── logo.png ├── main.ts ├── App.vue └── components │ ├── HelloWorld.vue │ └── Tour.vue ├── .editorconfig ├── tsconfig.node.json ├── src ├── components │ ├── v-tour │ │ ├── _v-tour.scss │ │ └── VTour.vue │ └── v-step │ │ ├── _v-step.scss │ │ └── VStep.vue ├── lib.ts └── shared │ └── constants.ts ├── .eslintrc.js ├── index.html ├── vite.config.ts ├── tsconfig.json ├── LICENSE ├── package.json ├── .github └── workflows │ └── npm-publish.yml ├── README.md └── types └── vue3-tour.d.ts /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | node_modules 3 | .DS_Store 4 | dist 5 | dist-ssr 6 | *.local -------------------------------------------------------------------------------- /screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexandreDavid/vue3-tour/HEAD/screenshot.gif -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexandreDavid/vue3-tour/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /example/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexandreDavid/vue3-tour/HEAD/example/assets/logo.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | trim_trailing_whitespace = true 5 | insert_final_newlibe = true -------------------------------------------------------------------------------- /example/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import Lib from '../src/lib.ts' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(Lib) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /src/components/v-tour/_v-tour.scss: -------------------------------------------------------------------------------- 1 | body.v-tour--active { 2 | pointer-events: none; 3 | } 4 | .v-tour { 5 | pointer-events: auto; 6 | } 7 | .v-tour__target--highlighted { 8 | box-shadow: 0 0 0 4px rgba(0,0,0,.4); 9 | pointer-events: auto; 10 | z-index: 9999; 11 | } 12 | .v-tour__target--relative { 13 | position: relative; 14 | } 15 | -------------------------------------------------------------------------------- /src/lib.ts: -------------------------------------------------------------------------------- 1 | import VTour from './components/v-tour/VTour.vue' 2 | import VStep from './components/v-step/VStep.vue' 3 | 4 | import type { App } from 'vue' 5 | 6 | const install = (app: App) => { 7 | app.config.globalProperties.$tours = {} 8 | 9 | app.component('v-tour', VTour) 10 | app.component('v-step', VStep) 11 | } 12 | 13 | export default install 14 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | // add more generic rulesets here, such as: 4 | // 'eslint:recommended', 5 | 'plugin:vue/vue3-recommended', 6 | '@vue/standard' 7 | // 'plugin:vue/recommended' // Use this if you are using Vue.js 2.x. 8 | ], 9 | rules: { 10 | // override/add rules settings here, such as: 11 | // 'vue/no-unused-vars': 'error' 12 | } 13 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |
3 | 5 | Vite Documentation | 6 | Vue 3 Documentation 7 |
8 | 9 | 10 | 11 | 12 | 19 | 20 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "preserve", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Alexandre David 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue3-tour", 3 | "version": "1.0.3", 4 | "type": "module", 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vue-tsc && vite build", 8 | "serve": "vite preview" 9 | }, 10 | "dependencies": { 11 | "@popperjs/core": "^2.11.8", 12 | "jump.js": "^1.0.2", 13 | "vue": "^3.4.23" 14 | }, 15 | "devDependencies": { 16 | "@types/jump.js": "^1.0.6", 17 | "@types/node": "^20.12.7", 18 | "@vitejs/plugin-vue": "^5.0.4", 19 | "sass": "^1.75.0", 20 | "typescript": "^5.2.2", 21 | "vite": "^5.2.8", 22 | "vue-tsc": "^2.0.11" 23 | }, 24 | "files": [ 25 | "dist", 26 | "src", 27 | "types" 28 | ], 29 | "main": "dist/vue3-tour.umd.cjs", 30 | "browser": "dist/vue3-tour.umd.cjs", 31 | "module": "dist/vue3-tour.js", 32 | "types": "types/vue3-tour.d.ts", 33 | "repository": { 34 | "type": "git", 35 | "url": "git+https://github.com/alexandreDavid/vue3-tour.git" 36 | }, 37 | "keywords": [ 38 | "vue", 39 | "tour" 40 | ], 41 | "author": "Alexandre David", 42 | "license": "MIT", 43 | "bugs": { 44 | "url": "https://github.com/alexandreDavid/vue3-tour/issues" 45 | }, 46 | "homepage": "https://github.com/alexandreDavid/vue3-tour#readme" 47 | } 48 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-node@v1 16 | with: 17 | node-version: 16 18 | - run: npm ci 19 | - run: npm run build 20 | # - run: npm test 21 | 22 | publish-npm: 23 | needs: build 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: actions/checkout@v2 27 | - uses: actions/setup-node@v1 28 | with: 29 | node-version: 16 30 | registry-url: https://registry.npmjs.org/ 31 | - run: npm ci 32 | - run: npm run build 33 | - run: npm publish 34 | env: 35 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 36 | 37 | # publish-gpr: 38 | # needs: build 39 | # runs-on: ubuntu-latest 40 | # steps: 41 | # - uses: actions/checkout@v2 42 | # - uses: actions/setup-node@v1 43 | # with: 44 | # node-version: 12 45 | # registry-url: https://npm.pkg.github.com/ 46 | # - run: npm ci 47 | # - run: npm publish 48 | # env: 49 | # NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} 50 | -------------------------------------------------------------------------------- /example/components/Tour.vue: -------------------------------------------------------------------------------- 1 | 2 |