{"id":19821346,"url":"https://github.com/lucasmenendez/selection-area","last_synced_at":"2026-06-01T19:55:51.601Z","repository":{"id":24653107,"uuid":"28063134","full_name":"lucasmenendez/selection-area","owner":"lucasmenendez","description":"Simple JavaScript mouse \u0026 touch seletion area to any DOM container element","archived":false,"fork":false,"pushed_at":"2020-01-04T13:31:43.000Z","size":37,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-16T02:24:24.359Z","etag":null,"topics":["javascript","selection","selection-area","ui"],"latest_commit_sha":null,"homepage":"http://lucasmenendez.github.io/selection-area/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucasmenendez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-16T00:36:18.000Z","updated_at":"2025-09-13T19:51:23.000Z","dependencies_parsed_at":"2022-08-23T01:51:06.854Z","dependency_job_id":null,"html_url":"https://github.com/lucasmenendez/selection-area","commit_stats":null,"previous_names":["lucasmenendez/selectable"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lucasmenendez/selection-area","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasmenendez%2Fselection-area","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasmenendez%2Fselection-area/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasmenendez%2Fselection-area/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasmenendez%2Fselection-area/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasmenendez","download_url":"https://codeload.github.com/lucasmenendez/selection-area/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasmenendez%2Fselection-area/sbom","scorecard":{"id":602103,"data":{"date":"2025-08-11","repo":{"name":"github.com/lucasmenendez/selection-area","commit":"703bc77bebd6a168f19ec8ccbde66f8c93d1ddc6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 1.1 not signed: https://api.github.com/repos/lucasmenendez/selection-area/releases/15542850","Warn: release artifact v1.0.4 not signed: https://api.github.com/repos/lucasmenendez/selection-area/releases/15437113","Warn: release artifact 1.1 does not have provenance: https://api.github.com/repos/lucasmenendez/selection-area/releases/15542850","Warn: release artifact v1.0.4 does not have provenance: https://api.github.com/repos/lucasmenendez/selection-area/releases/15437113"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T00:42:36.340Z","repository_id":24653107,"created_at":"2025-08-21T00:42:36.360Z","updated_at":"2025-08-21T00:42:36.360Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33790933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","selection","selection-area","ui"],"created_at":"2024-11-12T10:26:53.443Z","updated_at":"2026-06-01T19:55:51.571Z","avatar_url":"https://github.com/lucasmenendez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ccenter\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/lucasmenendez/selection-area/master/assets/images/logo.svg?sanitize=true\" width=\"80\"\u003e\n\n# Selection Area\n\n\n[![npm version](https://img.shields.io/badge/npm%20package-1.1.0-green.svg)](https://www.npmjs.com/package/selection-area) [![documentation](https://img.shields.io/badge/docs-link-blue.svg)](docs/README.md)\n\n\u003cbr/\u003e\n\nSimple JavaScript mouse \u0026 touch seletion area to any DOM container element.\n\n\u003cbr/\u003e\n\n[How to use](#how-to-use) | [API Reference](docs/README.md) | [Demo](http://lucasmenendez.github.io/selection-area/)\n\n\u003cbr/\u003e\n\n\u003c/center\u003e\n\n## How to use\n\n### Download\n\n#### Install with `npm`\n\n```sh\nnpm install selection-area\n```\n\n#### Install with `yarn`\n\n```sh\nyarn add selection-area\n```\n\n#### From Source Code\n\nClone or download zipped source code into `node_modules` project folder.\n\n```sh\ngit clone https://github.com/lucasmenendez/selection-area.git \u003cproject\u003e/node_modules/selection-area\n```\n\n### Import\n\n#### Local dist version\nImport using `script` html tags with vendor path:\n\n```html\n\u003cscript src=\"/node_modules/selection-area/dist/selection-area.js\"\u003e\u003c/script\u003e\n```\n\nOr import using ES6 `import`:\n\n```javascript\nimport { SelectionArea } from 'selection-area';\n```\n\n#### CDN version\nImporting with [unpkg.com](https://unpkg.com):\n\n```html\n\u003cscript src=\"https://unpkg.com/selection-area\"\u003e\u003c/script\u003e\n```\n\n### Example\nDefine container for selection area and selectable childs.\n\n```html\n\u003cdiv class=\"parent\"\u003e\n    \u003cdiv class=\"child\"\u003e0\u003c/div\u003e\n    \u003cdiv class=\"child\"\u003e1\u003c/div\u003e\n    \u003cdiv class=\"child\"\u003e2\u003c/div\u003e\n    \u003cdiv class=\"child\"\u003e3\u003c/div\u003e\n    \u003cdiv class=\"child\"\u003e4\u003c/div\u003e\n    \u003cdiv class=\"child\"\u003e5\u003c/div\u003e\n    \u003cdiv class=\"child\"\u003e6\u003c/div\u003e\n    \u003cdiv class=\"child\"\u003e7\u003c/div\u003e\n    \u003cdiv class=\"child\"\u003e8\u003c/div\u003e\n    \u003cdiv class=\"child\"\u003e9\u003c/div\u003e\n\u003c/div\u003e\n```\n\nDefine `SelectionArea` behaviour with `configuration` object, check available parameters [here](docs/README.md#parameters). \n\n```js\nlet config = {\n    container: document.querySelector('.parent'),\n    area: {\n        class: 'custom-area'\n    },\n    targets: '.child',\n    touchable: true,\n    autostart: true,\n    callback: selection =\u003e {\n        if (selection.length == 0) alert(\"empty selection\");\n        else alert(`${ selection.length } items selected`);\n    }\n}\n\nlet selectable = new SelectionArea(config);\n```\n\nAlso you can stylize the selection area element adding style yo defined class.\n\n```css\n.custom-area {\n    background: rgba(52, 152, 219, 0.2);\n    border: 2px dotted #2980b9;\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasmenendez%2Fselection-area","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasmenendez%2Fselection-area","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasmenendez%2Fselection-area/lists"}