├── packages ├── test-e2e │ ├── .eslintignore │ ├── .browserslistrc │ ├── cypress.json │ ├── src │ │ ├── views │ │ │ ├── Home.vue │ │ │ ├── Limit.vue │ │ │ ├── OmitKey.vue │ │ │ ├── InsertSpace.vue │ │ │ ├── MapInsert.vue │ │ │ ├── ItemSlot.vue │ │ │ ├── Defaults.vue │ │ │ ├── WrappedInput.vue │ │ │ ├── ContentEditable.vue │ │ │ ├── Events.vue │ │ │ └── MultipleCollections.vue │ │ ├── App.vue │ │ ├── main.js │ │ └── router.js │ ├── babel.config.js │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ ├── .editorconfig │ ├── tests │ │ └── e2e │ │ │ ├── .eslintrc.js │ │ │ ├── specs │ │ │ ├── item-slot.js │ │ │ ├── insert-options.js │ │ │ ├── wrapped-input.js │ │ │ ├── limit.js │ │ │ ├── multiple-collections.js │ │ │ ├── events.js │ │ │ ├── content-editable.js │ │ │ └── defaults.js │ │ │ ├── support │ │ │ ├── index.js │ │ │ └── commands.js │ │ │ └── plugins │ │ │ └── index.js │ ├── .gitignore │ ├── README.md │ ├── .eslintrc.js │ └── package.json ├── vue-mention │ ├── .npmignore │ ├── src │ │ ├── global-shim.d.ts │ │ ├── vue-shim.d.ts │ │ ├── index.ts │ │ └── Mentionable.vue │ ├── babel.config.js │ ├── tsconfig.json │ ├── vite.config.ts │ ├── .eslintrc.js │ ├── README.md │ └── package.json └── docs │ ├── package.json │ └── src │ ├── .vuepress │ ├── config.js │ ├── components │ │ ├── GettingStartedDemo.vue │ │ ├── AsyncItemsDemo.vue │ │ └── Demo.vue │ ├── styles │ │ └── index.styl │ └── public │ │ └── vue-mention.svg │ ├── guide │ ├── README.md │ └── async-items.md │ └── README.md ├── .github ├── FUNDING.yml └── workflows │ ├── changelog.yml │ └── ci.yml ├── lerna.json ├── package.json ├── LICENSE ├── .gitignore └── README.md /packages/test-e2e/.eslintignore: -------------------------------------------------------------------------------- 1 | vue-mention 2 | -------------------------------------------------------------------------------- /packages/vue-mention/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | docs-src/ 3 | .babelrc 4 | -------------------------------------------------------------------------------- /packages/test-e2e/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /packages/vue-mention/src/global-shim.d.ts: -------------------------------------------------------------------------------- 1 | declare const VERSION: string 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: Akryum 4 | -------------------------------------------------------------------------------- /packages/test-e2e/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "pluginsFile": "tests/e2e/plugins/index.js" 3 | } 4 | -------------------------------------------------------------------------------- /packages/test-e2e/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/test-e2e/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset', 4 | ], 5 | } 6 | -------------------------------------------------------------------------------- /packages/test-e2e/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Akryum/vue-mention/HEAD/packages/test-e2e/public/favicon.ico -------------------------------------------------------------------------------- /packages/vue-mention/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | [require('@babel/preset-env'), { modules: false }], 4 | ], 5 | } 6 | -------------------------------------------------------------------------------- /packages/vue-mention/src/vue-shim.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | const component: any 4 | export default component 5 | } 6 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "npmClient": "yarn", 3 | "useWorkspaces": true, 4 | "version": "2.0.0-alpha.3", 5 | "packages": [ 6 | "packages/*" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/test-e2e/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | trim_trailing_whitespace = true 5 | insert_final_newline = true 6 | -------------------------------------------------------------------------------- /packages/test-e2e/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /packages/test-e2e/tests/e2e/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | 'cypress', 4 | ], 5 | env: { 6 | mocha: true, 7 | 'cypress/globals': true, 8 | }, 9 | rules: { 10 | strict: 'off', 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /packages/test-e2e/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import VueMention from 'vue-mention' 3 | import App from './App.vue' 4 | import router from './router' 5 | import 'floating-vue/dist/style.css' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(VueMention) 10 | app.use(router) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /packages/test-e2e/tests/e2e/specs/item-slot.js: -------------------------------------------------------------------------------- 1 | describe('default item slot', () => { 2 | it('display custom item content', () => { 3 | cy.visit('/item-slot') 4 | cy.get('.input').type('@') 5 | cy.get('.mention-item') 6 | .should('contain', 'Guillaume') 7 | .should('contain', 'Eduardo') 8 | .should('contain', 'Sébastien') 9 | }) 10 | }) 11 | -------------------------------------------------------------------------------- /packages/docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-mention-docs", 3 | "version": "0.1.7", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vuepress dev src", 7 | "build": "vuepress build src" 8 | }, 9 | "dependencies": { 10 | "v-tooltip": "^2.0.3", 11 | "vue-mention": "^1.0.0" 12 | }, 13 | "devDependencies": { 14 | "vuepress": "^1.4.1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/test-e2e/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | /tests/e2e/videos/ 6 | /tests/e2e/screenshots/ 7 | 8 | # local env files 9 | .env.local 10 | .env.*.local 11 | 12 | # Log files 13 | npm-debug.log* 14 | yarn-debug.log* 15 | yarn-error.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-mention-monorepo", 3 | "version": "2.0.0-alpha.3", 4 | "private": true, 5 | "workspaces": [ 6 | "packages/*" 7 | ], 8 | "scripts": { 9 | "build": "lerna run build", 10 | "lint": "lerna run lint", 11 | "release": "yarn run lint && lerna publish --dist-tag next" 12 | }, 13 | "devDependencies": { 14 | "lerna": "^3.20.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/test-e2e/README.md: -------------------------------------------------------------------------------- 1 | # test-e2e 2 | 3 | ## Project setup 4 | ``` 5 | yarn install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | yarn serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | yarn build 16 | ``` 17 | 18 | ### Run your end-to-end tests 19 | ``` 20 | yarn test:e2e 21 | ``` 22 | 23 | ### Lints and fixes files 24 | ``` 25 | yarn lint 26 | ``` 27 | 28 | ### Customize configuration 29 | See [Configuration Reference](https://cli.vuejs.org/config/). 30 | -------------------------------------------------------------------------------- /packages/vue-mention/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2018", 4 | "module": "ESNext", 5 | "strict": true, 6 | "declaration": true, 7 | "lib": [ 8 | "ESNext", 9 | "DOM", 10 | "DOM.Iterable" 11 | ], 12 | "jsx": "preserve", 13 | "outDir": "dist", 14 | "moduleResolution": "node" 15 | }, 16 | "include": [ 17 | "src/**/*.ts", 18 | "src/**/*.vue" 19 | ], 20 | "exclude": [ 21 | "node_modules", 22 | "dist", 23 | "**/*.js" 24 | ] 25 | } -------------------------------------------------------------------------------- /packages/test-e2e/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: [ 7 | 'plugin:vue/essential', 8 | '@vue/standard', 9 | ], 10 | parserOptions: { 11 | parser: 'babel-eslint', 12 | }, 13 | rules: { 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 16 | // trailing comma 17 | 'comma-dangle': ['error', 'always-multiline'], 18 | 'vue/multi-word-component-names': 'off', 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /packages/test-e2e/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/test-e2e/src/views/Limit.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 |