{"_id":"click-outside-vue3","_rev":"4-f775d3ce1b83add63a50a01e11853863","name":"click-outside-vue3","dist-tags":{"latest":"4.1.0"},"versions":{"4.0.0":{"name":"click-outside-vue3","version":"4.0.0","author":{"name":"ndelvalle","email":"nicolas.delvalle@gmail.com"},"license":"MIT","_id":"click-outside-vue3@4.0.0","maintainers":[{"name":"andymark","email":"andymark.pl@gmail.com"}],"homepage":"https://github.com/andymark-by/vue3-click-outside#readme","bugs":{"url":"https://github.com/andymark-by/vue3-click-outside/issues"},"dist":{"shasum":"a582ea231a1f4127f15554288fe08c3411d768f1","tarball":"https://registry.npmjs.org/click-outside-vue3/-/click-outside-vue3-4.0.0.tgz","fileCount":20,"integrity":"sha512-sETaO8dxBjEzA5V1PUS9KuOAvtmyGdyd6RyblxRVwkG2I+Jqo+WwZP9CoFURNW2+8YR/zqzmTT2h/MxFOTiU4A==","signatures":[{"sig":"MEUCIQDhBMaA5oVrIbCrQ9CNUiuF7lDt9fGJxOv1lzrZtDwsDwIgNqiQ5SCODZdlwZQq8ZD26Pr38yQzbCUAON6pdrVSlAs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfC29CRA9TVsSAnZWagAA2CgP/15WFhPMCmkoI7XxqHrY\nxS6Uq65ZyUpXuYBwzhy/CeYN/NsTt3IxGD0kd5nEgbxOCOeU6WpTke4Bb+Si\n93jIjEYchci/kQs/3u8QKuZijoZ+6dlWapz9uoQiOy70Y+ZkyqRIKKfOOoii\nvcIrL6bPkd+mGHE9iBGwb86r6Zo5G4hz2s1nuzJXy2I+tHG/qZJQrKxGSHOW\np2LcxVWlJ2vCLZwwch04GlcSlGcANN5hEyKpu1C2c923M7myf8LHIL+4qf9Y\nhaar2Z35nLPkW4xytp+7IQQt9CG2FefNQRCc+aSLltmb6Ll5o50Jf5666gOO\n1jjXJTdzKv1abRjbX62ZGaxpCRDOUYEQxS0tHr3f/6LTBfqleNL5Zb4d/cWv\nQv5PMUeOPiI1LMVHDRN2LNDc52nxqa3zn6qLmkkwiABxnf1Pgmw+6c3QgcJS\nDJmd/2h0J1m4dzyYWTNkyMuluHIA4Z+bz65NtFYN6QUGA25fAWpLoorLfdZW\nqCHdUnWOztiZjLguWoyy8pEd3v8kfdZHumcRcP+byyVEtQKUwEldNhLW5pTD\nSmMf84QCyZgGEIEiXFamoxXFjJMnKD/TlkphTLK0t95spxu4oruW0WMXKMRg\nSYXdl9CFGwnkZxkcip15RbYLZHdsj0vQmoGAy4q7ZPhSWBvgOcZFXdlbZ23R\n+tXL\r\n=8LEg\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"roots":["test/"],"collectCoverage":true,"collectCoverageFrom":["src/**"]},"main":"dist/v-click-outside.umd.js","source":"src/index.js","engines":{"node":">=6"},"gitHead":"1bebec37dd1de4204d37aea743824e8f1c36a2e4","scripts":{"lint":"eslint . --ext .js","test":"jest --coverage","build":"microbundle --entry src/index.js --target browser --format umd --name v-click-outside","format":"prettier --write '**/*.{js,json,md}'","release":"np","version":"npm run build","coverage":"open coverage/lcov-report/index.html","test:watch":"jest --colors --watch","format:staged":"pretty-quick --staged","format:changed":"pretty-quick"},"_npmUser":{"name":"andymark","email":"andymark.pl@gmail.com"},"umd:main":"dist/v-click-outside.umd.js","repository":{"url":"git+https://github.com/andymark-by/vue3-click-outside.git","type":"git"},"_npmVersion":"6.14.8","description":"Vue 3 directive to react on clicks outside an element","directories":{},"_nodeVersion":"14.9.0","_hasShrinkwrap":false,"devDependencies":{"np":"^7.2.0","jest":"^26.4.2","husky":"^4.2.5","eslint":"^7.7.0","lodash":"^4.17.20","jest-cli":"^26.4.2","prettier":"^2.1.1","babel-core":"^6.26.3","babel-jest":"^26.3.0","microbundle":"^0.13.0","pretty-quick":"^3.0.0","@babel/preset-env":"^7.11.0","babel-preset-es2015":"^6.24.1","eslint-plugin-import":"^2.22.0","eslint-config-prettier":"^7.1.0","eslint-plugin-prettier":"^3.1.4","eslint-config-airbnb-base":"^14.2.0"},"_npmOperationalInternal":{"tmp":"tmp/click-outside-vue3_4.0.0_1618750908755_0.6081740530469073","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"click-outside-vue3","version":"4.0.1","keywords":["vue3","click outside","click"],"author":{"name":"ndelvalle","email":"nicolas.delvalle@gmail.com"},"license":"MIT","_id":"click-outside-vue3@4.0.1","maintainers":[{"name":"andymark","email":"andymark.pl@gmail.com"}],"homepage":"https://github.com/andymark-by/click-outside-vue3#readme","bugs":{"url":"https://github.com/andymark-by/click-outside-vue3/issues"},"dist":{"shasum":"81a6ac01696b301764b42db6fdbdf28e7cd8ef95","tarball":"https://registry.npmjs.org/click-outside-vue3/-/click-outside-vue3-4.0.1.tgz","fileCount":20,"integrity":"sha512-sbplNecrup5oGqA3o4bo8XmvHRT6q9fvw21Z67aDbTqB9M6LF7CuYLTlLvNtOgKU6W3zst5H5zJuEh4auqA34g==","signatures":[{"sig":"MEYCIQDd21lpV/iUSsG3KgcmGaAELUGTsFLluZ+WXvGhqSd6NAIhAOQkvzbU9tJxylqm6oBWniflT+Qvw0mBVG03b3NZGSv2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfC82CRA9TVsSAnZWagAARQoP/2NnGNljSn0I3Zj9jfnQ\n/ox2zj7pXPGxInUV5G0C2ClnySto3xTX2CgnJlo4vW3gHt1AK6SPQE8PfQCZ\nuGRUd5urxdXZ2MmTg6bSK54o6ARVckhZDbFvurEsl1+wOgeEInqoLnTlkA/9\nq6LTRkV02kFTTOifd3VHrNMYHbyXPCOcWpMVzDIFWpm+r+ugoq1iIFYzNcU3\nXagPYvp3r2tErHl8ExrnNhRog1W7+R4kRvbshb4j4eXIqaLcIfXPFzCqLaFA\nS8VmkCWGcBFbXDS+Y2livPVGkejRmXewQ2FljbaMM4SHr6jvEsyoousf9lqO\ndyAlm9rgSm40zQbqps8MWZ/4KZ2s27ziPDKNfOPml79veNxu8I8wdFLaYq0o\nkQkN0YQskXCEH5pSqKvu4mKJCLaWa27qOjD33gUEtlM9J9IJweZRlM52ON8P\nko4CQd7UaMrDBFl+tTNMru0CLuDIzhoC12TqDnkqVF3jxJdRVUyCn1DfyMXY\nM1oZ6syTDhBNfvCEMO10yrCIMttdcid5On9+K+KT20GHa+2rm+YfQtTaw3Wg\n+lyDkxoWtQHWm/fxABqYK/RTvSe66GZWIFVYSee0QBL+401uRFnmFM+U+3f3\ndiLPb0yzgotm5zxXiiTFfO1kNyXQvnjNk2ks+TAKuQiIjiLv8OK4RkXtfQKE\nQkvr\r\n=ghSI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"roots":["test/"],"collectCoverage":true,"collectCoverageFrom":["src/**"]},"main":"dist/v-click-outside.umd.js","source":"src/index.js","engines":{"node":">=6"},"gitHead":"570ee4f2b2d1169838ab9071d8f2417d3f1b12f7","scripts":{"lint":"eslint . --ext .js","test":"jest --coverage","build":"microbundle --entry src/index.js --target browser --format umd --name v-click-outside","format":"prettier --write '**/*.{js,json,md}'","release":"np","version":"npm run build","coverage":"open coverage/lcov-report/index.html","test:watch":"jest --colors --watch","format:staged":"pretty-quick --staged","format:changed":"pretty-quick"},"_npmUser":{"name":"andymark","email":"andymark.pl@gmail.com"},"umd:main":"dist/v-click-outside.umd.js","repository":{"url":"git+https://github.com/andymark-by/click-outside-vue3.git","type":"git"},"_npmVersion":"6.14.8","description":"Vue 3 directive to react on clicks outside an element","directories":{},"_nodeVersion":"14.9.0","_hasShrinkwrap":false,"devDependencies":{"np":"^7.2.0","jest":"^26.4.2","husky":"^4.2.5","eslint":"^7.7.0","lodash":"^4.17.20","jest-cli":"^26.4.2","prettier":"^2.1.1","babel-core":"^6.26.3","babel-jest":"^26.3.0","microbundle":"^0.13.0","pretty-quick":"^3.0.0","@babel/preset-env":"^7.11.0","babel-preset-es2015":"^6.24.1","eslint-plugin-import":"^2.22.0","eslint-config-prettier":"^7.1.0","eslint-plugin-prettier":"^3.1.4","eslint-config-airbnb-base":"^14.2.0"},"_npmOperationalInternal":{"tmp":"tmp/click-outside-vue3_4.0.1_1618751286373_0.8161450309493683","host":"s3://npm-registry-packages"}},"4.1.0":{"_id":"click-outside-vue3@4.1.0","bugs":{"url":"https://github.com/andymark-by/click-outside-vue3/issues"},"dist":{"shasum":"ae020410a8d442e737a27d8fbda28028a135c3d9","tarball":"https://registry.npmjs.org/click-outside-vue3/-/click-outside-vue3-4.1.0.tgz","fileCount":13,"integrity":"sha512-v6AqMy07W7jcOXy3o1cYVlW2+FTg1mtGiXCEUR7fgHK9E0BY3Ba1x1j/zMbg4rC5w8qCyU+TVkGPXbU3ige9PQ==","signatures":[{"sig":"MEYCIQC5HqOGnffdQ6E7WZEV+gK1hQePEj5CoByLaO90CGmeEQIhAKK0s3jpCoGcuKTHIo9KKh+utEIr3o1sJ/xKD8hRrDEd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDiFlkgyYN0PahG7r5IkVA6RcbY05/wUKt4D7F2MGi+XAIgNCdZ9QFO4/0zVbRsQs+OzGhiKtjVEsl61zQQ4GfV/XU="}],"unpackedSize":37475},"jest":{"roots":["test/"],"collectCoverage":true,"coverageThreshold":{"global":{"lines":100,"branches":100,"functions":100,"statements":100}},"collectCoverageFrom":["src/**/*.js"]},"main":"dist/v-click-outside.umd.js","name":"click-outside-vue3","types":"src/index.d.ts","author":{"name":"ndelvalle","email":"nicolas.delvalle@gmail.com"},"source":"src/index.js","engines":{"node":">=6"},"license":"MIT","scripts":{"lint":"eslint . --ext .js,.mjs,.vue","test":"jest --coverage","build":"microbundle --entry src/index.js --target browser --format umd --name v-click-outside --tsconfig tsconfig.build.json","format":"prettier --write '**/*.{js,json,md}'","release":"np","version":"npm run build","coverage":"open coverage/lcov-report/index.html","test:types":"tsc -p test/types","test:watch":"jest --colors --watch","example:dev":"vite example","test:compat":"node scripts/compat/run.mjs","example:build":"vite build example","format:staged":"pretty-quick --staged","format:changed":"pretty-quick"},"version":"4.1.0","_npmUser":{"name":"andymark","email":"andymark.pl@gmail.com"},"homepage":"https://github.com/andymark-by/click-outside-vue3#readme","keywords":["vue3","click outside","click"],"umd:main":"dist/v-click-outside.umd.js","devEngines":{"runtime":{"name":"node","version":">=20.19.0"}},"repository":{"url":"git+https://github.com/andymark-by/click-outside-vue3.git","type":"git"},"_npmVersion":"11.16.0","description":"Vue 3 directive to react on clicks outside an element","directories":{},"maintainers":[{"name":"andymark","email":"andymark.pl@gmail.com"}],"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"np":"^7.2.0","vue":"^3.5.43","jest":"^26.4.2","vite":"^8.3.1","husky":"^4.2.5","eslint":"^7.7.0","lodash":"^4.17.20","jest-cli":"^26.4.2","prettier":"^2.1.1","babel-core":"^6.26.3","babel-jest":"^26.3.0","typescript":"^5.9.3","vue-router":"^5.3.1","microbundle":"^0.13.0","pretty-quick":"^3.0.0","@babel/preset-env":"^7.11.0","eslint-plugin-vue":"^7.20.0","@vitejs/plugin-vue":"^6.0.9","babel-preset-es2015":"^6.24.1","eslint-plugin-import":"^2.22.0","eslint-config-prettier":"^7.1.0","eslint-plugin-prettier":"^3.1.4","eslint-config-airbnb-base":"^14.2.0"},"peerDependencies":{"vue":"^3.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/click-outside-vue3_4.1.0_1791302342495_0.36992417887019413"}}},"time":{"created":"2021-04-18T13:01:48.755Z","modified":"2026-10-06T15:59:02.784Z","4.0.0":"2021-04-18T13:01:48.910Z","4.0.1":"2021-04-18T13:08:06.553Z","4.1.0":"2026-10-06T15:59:02.588Z"},"bugs":{"url":"https://github.com/andymark-by/click-outside-vue3/issues"},"author":{"name":"ndelvalle","email":"nicolas.delvalle@gmail.com"},"license":"MIT","homepage":"https://github.com/andymark-by/click-outside-vue3#readme","keywords":["vue3","click outside","click"],"repository":{"url":"git+https://github.com/andymark-by/click-outside-vue3.git","type":"git"},"description":"Vue 3 directive to react on clicks outside an element","maintainers":[{"name":"andymark","email":"andymark.pl@gmail.com"}],"readme":"# click-outside-vue3\n\nVue 3 directive for handling clicks outside an element without stopping event propagation.\n\n## Installation\n\n```bash\n$ npm install --save click-outside-vue3\n```\n\n```bash\n$ yarn add click-outside-vue3\n```\n\n## Usage\n\n### Global Registration\n\n```js\nimport { createApp } from 'vue'\nimport App from './App.vue'\nimport vClickOutside from 'click-outside-vue3'\n\nconst app = createApp(App)\napp.use(vClickOutside)\n```\n\n### Options API\n\n```vue\n<script>\nexport default {\n  data() {\n    return {\n      vcoConfig: {\n        handler: this.onClickOutside,\n        middleware: this.middleware,\n        events: ['dblclick', 'click'],\n        isActive: true,\n        detectIframe: true,\n        capture: false\n      }\n    }\n  },\n  methods: {\n    onClickOutside(event) {\n      console.log('Clicked outside. Event:', event)\n    },\n    middleware(event) {\n      return event.target.className !== 'modal'\n    }\n  }\n}\n</script>\n\n<template>\n  <div v-click-outside=\"onClickOutside\"></div>\n  <div v-click-outside=\"vcoConfig\"></div>\n</template>\n```\n\n### Composition API (Vue 3)\n\n```vue\n<script setup>\nimport { ref } from 'vue'\n\nconst isModalVisible = ref(false)\n\nconst onClickOutside = (event) => {\n  console.log('Clicked outside. Event:', event)\n  isModalVisible.value = false\n}\n\nconst vcoConfig = {\n  handler: (event) => {\n    console.log('Clicked outside using config')\n    isModalVisible.value = false\n  },\n  middleware: (event) => event.target.className !== 'modal',\n  events: ['click'],\n  isActive: true,\n  detectIframe: true,\n  capture: false\n}\n</script>\n\n<template>\n  <div v-click-outside=\"onClickOutside\">Basic usage</div>\n  <div v-click-outside=\"vcoConfig\">Usage with config</div>\n</template>\n```\n\n### Local Registration\n\n```vue\n<script>\nimport vClickOutside from 'click-outside-vue3'\n\nexport default {\n  directives: {\n    clickOutside: vClickOutside.directive\n  },\n  methods: {\n    onClickOutside(event) {\n      console.log('Clicked outside. Event:', event)\n    }\n  }\n}\n</script>\n\n<template>\n  <div v-click-outside=\"onClickOutside\"></div>\n</template>\n```\n\n### Local Registration with Composition API\n\n```vue\n<script setup>\nimport clickOutside from 'click-outside-vue3'\n\nconst vClickOutside = clickOutside.directive\n\nconst onClickOutside = (event) => {\n  console.log('Clicked outside. Event:', event)\n}\n</script>\n\n<template>\n  <div v-click-outside=\"onClickOutside\"></div>\n</template>\n```\n\nDon't import the package as `vClickOutside` inside `<script setup>`. Vue treats any `vSomething` variable as a local directive, so it would shadow the global one with the plugin object, which isn't a directive. Use `clickOutside.directive` like above.\n\n### Options\n\n`null`, `undefined` and `false` turn the directive off, so `v-click-outside=\"isOpen && close\"` works when `isOpen` is a boolean (`0` or `''` still throw). Same for an options object without a `handler`, handy when the handler is an optional prop: `v-click-outside=\"{ handler: onClose }\"`.\n\n| Option | Description |\n| --- | --- |\n| `handler` | `(event) => void`. Without it the directive does nothing. |\n| `middleware` | `(event) => boolean`, synchronous. Runs only for outside events; return a falsy value to skip the handler. |\n| `events` | Array of events to listen for. Defaults to `['touchstart']` on touch devices (`'ontouchstart' in window`), and `['click']` otherwise. |\n| `isActive` | Defaults to `true`. Can be toggled at runtime. Mutating a reactive config object in place works on Vue 3.1.5+; on older 3.x replace the object (or use a computed). |\n| `detectIframe` | Detects clicks on iframes. Defaults to `true`; see [Detecting Iframe Clicks](#detecting-iframe-clicks). |\n| `capture` | Listen in the capture phase. Defaults to `false`. Useful when something else calls `stopPropagation`. |\n\n### Behavior\n\n- A click that starts inside the element and ends outside doesn't count as an outside click. So selecting text in a modal and letting go past its edge won't close it. Keyboard clicks (Enter/Space on a button outside) work as usual.\n- You can swap `handler` or `middleware` at any time, the latest one is used.\n- Changing `events`, `isActive`, `detectIframe` or `capture` re-creates the listeners.\n- A component can use `v-click-outside` on its own root element and still get another one from its parent. Both work independently.\n\n### Recipes\n\n#### Handle right clicks\n\nAdd `contextmenu` to the event list:\n\n```js\nconst vcoConfig = {\n  handler: onClickOutside,\n  events: ['click', 'contextmenu']\n}\n```\n\n#### Prevent the default action for an outside click\n\nUse capture mode and call `preventDefault` in the handler. Call `stopPropagation` as well if needed.\n\n```js\nconst vcoConfig = {\n  capture: true,\n  handler: (event) => {\n    event.preventDefault()\n  }\n}\n```\n\n#### Touch devices\n\nBy default, devices with touch events (`'ontouchstart' in window`) listen for `touchstart`. It fires on contact before `click`, so `@click.stop` on an outside element cannot stop it. To make `@click.stop` work on mobile and touchscreen laptops, and to detect mouse clicks on those laptops, set `events: ['click']`.\n\nWith `events: ['click']`, iOS Safari does not emit `click` for taps on a non-interactive element unless that element or an ancestor below `<body>` has a click handler or `cursor: pointer`. For an app root such as `.app-root`, limit `cursor: pointer` to devices without a precise pointer:\n\n```css\n@media (hover: none) and (pointer: coarse) {\n  .app-root {\n    cursor: pointer;\n  }\n}\n```\n\nBrowsers treat document-level `touchstart` listeners as passive, so `event.preventDefault()` in a `touchstart` handler has no effect.\n\n## TypeScript\n\nThe package includes TypeScript declarations and exports `ClickOutsideOptions`, `ClickOutsideBinding`, `ClickOutsideHandler`, `ClickOutsideMiddleware`, and `ClickOutsideDirective`. Handlers can accept a narrower event type, such as `MouseEvent`.\n\nThe types work with `moduleResolution` set to `node`, `bundler`, or `nodenext` (including ESM projects). Use a default import. The package is published as UMD, so named imports like `import { directive }` work with bundlers but fail in plain Node ESM, for example in SSR with external dependencies. If TypeScript compiles your code to CommonJS, turn on `esModuleInterop`.\n\nThe example below assumes the directive is registered globally with `app.use`.\n\n```vue\n<script setup lang=\"ts\">\nimport type { ClickOutsideOptions } from 'click-outside-vue3'\n\nconst vcoConfig: ClickOutsideOptions = {\n  handler: (event: MouseEvent) => {\n    console.log('Clicked outside. Event:', event)\n  },\n  events: ['click'],\n  isActive: true\n}\n</script>\n\n<template>\n  <div v-click-outside=\"vcoConfig\"></div>\n</template>\n```\n\nOn Vue 3.5+, when registered globally with `app.use`, `v-click-outside` is typed in templates through the package's augmentation of Vue's `GlobalDirectives` interface. Earlier Vue 3 versions do not provide `GlobalDirectives`; the option types work with any Vue 3 version. If you added your own `vClickOutside` entry to `GlobalDirectives` for 4.0, remove it, otherwise TypeScript may report a conflicting declaration.\n\n## Detecting Iframe Clicks\n\nThere is no idiomatic way to detect a click on an `<iframe>` (`HTMLIFrameElement`). A click inside an iframe moves focus to its content window and does not bubble to the main window, so the directive's `document.documentElement` listeners do not receive it. The iframe focus change triggers a `blur` event on the main window. The directive uses that event with `document.activeElement` to detect whether focus moved to an iframe and then calls the handler.\n\nThis workaround has two caveats:\n\n- The handler runs once when focus moves to an iframe. Further clicks inside it do not run the handler until focus returns to the main window, for example by clicking outside the iframe. Calling `window.focus()` at the end of the handler could change normal tab and focus behavior.\n- Keyboard navigation that moves focus to an iframe also triggers the main window's `blur` event and runs the handler.\n\nIframe detection is enabled by default. Set `detectIframe` to `false` if it conflicts with your use case.\n\n## Upgrading from 4.0\n\n- A click that starts inside and ends outside no longer calls the handler.\n- A new `handler` or `middleware` passed after mount is now used. In 4.0 the first one stayed until another option changed. Changes made to the options object in place are picked up too (Vue 3.1.5+).\n- `null`, `undefined`, `false` and an options object without `handler` now just disable the directive. In 4.0 they threw (or failed on the first outside click). A `handler` that isn't a function now throws when the directive is bound instead of on the first click. `true`, strings and numbers still throw, and so does an `events` value that is truthy but not an array.\n- The non-standard `event.path` is no longer read, only `event.composedPath()`.\n- TypeScript types are included, and `vue` is now a peer dependency. Remove any `GlobalDirectives` declaration you wrote for `vClickOutside` yourself.\n\n## Development\n\nDevelopment needs Node 20.19+ (the example and `test:compat` use Vite 8). Run `npm test`, `npm run test:types` and `npm run lint` from the repo root. `npm run example:dev` starts the Vite example, which uses the code from `src/`.\n\n`npm run test:compat` runs the bigger compatibility check: several Vue versions, SSR with hydration, bundlers, TypeScript/vue-tsc, Chromium/Firefox/WebKit, Node and a comparison with 4.0.1. It needs network access and GNU `timeout` (`brew install coreutils` on macOS), and the browser part needs Docker (or Playwright browsers installed locally). Options go after `--`, e.g. `npm run test:compat -- --only browsers`. `--list` shows the suites, and `--max-minutes <n>` sets a rough time limit for the whole run.\n\n## License\n\n[MIT License](https://github.com/andymark-by/click-outside-vue3/blob/master/LICENSE)\n","readmeFilename":"README.md"}