{"_id":"@builtbygio/atom-select-list","name":"@builtbygio/atom-select-list","dist-tags":{"latest":"0.8.2"},"versions":{"0.8.2":{"name":"@builtbygio/atom-select-list","version":"0.8.2","description":"A general-purpose select list for use in Atom packages","main":"lib/select-list-view.js","scripts":{"dev":"npm run typescript -- --watch","typescript":"tsc -p ./tsconfig.json","build":"npm run typescript","test":"atom --test test","prepare":"node -e \"process.exit(0)\""},"author":"","license":"MIT","atomTestRunner":"atom-mocha-test-runner","devDependencies":{"atom-mocha-test-runner":"^1.2.0","sinon":"^2","typescript":"^4.1.3","@types/atom":"^1.40.5","@types/fuzzaldrin":"^2.1.3"},"dependencies":{"etch":"^0.14.0","fuzzaldrin":"^2.1.0"},"repository":{"type":"git","url":"git+https://github.com/builtbygio/atom-select-list.git"},"engines":{"chevron":"*"},"types":"./lib/select-list-view.d.ts","_id":"@builtbygio/atom-select-list@0.8.2","bugs":{"url":"https://github.com/builtbygio/atom-select-list/issues"},"homepage":"https://github.com/builtbygio/atom-select-list#readme","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-oVkq9Xgaw2VTnWmIkjuhsO3qpjEN1TyThkAdzswEtnC11Saf41jAQlFLopjQ1aFve8FUFoSyjV8jySr+wAA28A==","shasum":"03f882da7c222b2ac5a9fd887f176371d7a18025","tarball":"https://registry.npmjs.org/@builtbygio/atom-select-list/-/atom-select-list-0.8.2.tgz","fileCount":11,"unpackedSize":105546,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHuUhTBeVfm7WOyCAVwAML7A4Hox9wRUyTgz8e7BoNLdAiBgqDsR6CUTddif7DYEqW/f4JQikQEtE1Yp6NxAQHsw2g=="}]},"_npmUser":{"name":"giobuilds","email":"giova19@proton.me"},"directories":{},"maintainers":[{"name":"giobuilds","email":"giova19@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/atom-select-list_0.8.2_1787781630578_0.9646442978263883"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T22:00:30.474Z","0.8.2":"2026-08-26T22:00:30.739Z","modified":"2026-08-26T22:00:30.957Z"},"maintainers":[{"name":"giobuilds","email":"giova19@proton.me"}],"description":"A general-purpose select list for use in Atom packages","homepage":"https://github.com/builtbygio/atom-select-list#readme","repository":{"type":"git","url":"git+https://github.com/builtbygio/atom-select-list.git"},"bugs":{"url":"https://github.com/builtbygio/atom-select-list/issues"},"license":"MIT","readme":"# atom-select-list\n\nThis module is an [etch component](https://github.com/atom/etch) that can be used in Atom packages to show a select list with fuzzy filtering, keyboard/mouse navigation and other cool features.\n\n## Installation\n\n```bash\nnpm install --save atom-select-list\n```\n\n## Usage\n\nAfter installing the module, you can simply require it and use it as a standalone component:\n\n```js\nconst SelectList = require('atom-select-list')\n\nconst usersSelectList = new SelectList({\n  items: ['Alice', 'Bob', 'Carol']\n})\ndocument.body.appendChild(usersSelectList.element)\n```\n\nOr within another etch component:\n\n```jsx\nrender () {\n  return (\n    <SelectList items={this.items} />\n  )\n}\n```\n\n## API\n\nWhen creating a new instance of a select list, or when calling `update` on an existing one, you can supply a JavaScript object that can contain any of the following properties:\n\n* `items: [Object]`: an array containing the objects you want to show in the select list.\n* `elementForItem: (item: Object, options: Object) -> HTMLElement`: a function that is called whenever an item needs to be displayed.\n  * `options: Object`:\n    * `selected: Boolean`: indicating whether item is selected or not.\n    * `index: Number`: item's index.\n    * `visible: Boolean`: indicating whether item is visible in viewport or not. Unless `initiallyVisibleItemCount` was given, this value is always `true`.\n* (Optional) `maxResults: Number`: the number of maximum items that are shown.\n* (Optional) `filter: (items: [Object], query: String) -> [Object]`: a function that allows to decide which items to show whenever the query changes. By default, it uses [fuzzaldrin](https://github.com/atom/fuzzaldrin) to filter results.\n* (Optional) `filterKeyForItem: (item: Object) -> String`: when `filter` is not provided, this function will be called to retrieve a string property on each item and that will be used to filter them.\n* (Optional) `filterQuery: (query: String) -> String`: a function that allows to apply a transformation to the user query and whose return value will be used to filter items.\n* (Optional) `query: String`: a string that will replace the contents of the query editor.\n* (Optional) `selectQuery: Boolean`: a boolean indicating whether the query text should be selected or not.\n* (Optional) `order: (item1: Object, item2: Object) -> Number`: a function that allows to change the order in which items are shown.\n* (Optional) `emptyMessage: String`: a string shown when the list is empty.\n* (Optional) `errorMessage: String`: a string that needs to be set when you want to notify the user that an error occurred.\n* (Optional) `infoMessage: String`: a string that needs to be set when you want to provide some information to the user.\n* (Optional) `loadingMessage: String`: a string that needs to be set when you are loading items in the background.\n* (Optional) `loadingBadge: String/Number`: a string or number that needs to be set when the progress status changes (e.g. a percentage showing how many items have been loaded so far).\n* (Optional) `itemsClassList: [String]`: an array of strings that will be added as class names to the items element.\n* (Optional) `initialSelectionIndex: Number`: the index of the item to initially select and automatically select after query changes; defaults to `0`.\n* (Optional) `didChangeQuery: (query: String) -> Void`: a function that is called when the query changes.\n* (Optional) `didChangeSelection: (item: Object) -> Void`: a function that is called when the selected item changes.\n* (Optional) `didConfirmSelection: (item: Object) -> Void`: a function that is called when the user clicks or presses <kbd>Enter</kbd> on an item.\n* (Optional) `didConfirmEmptySelection: () -> Void`: a function that is called when the user presses <kbd>Enter</kbd> but the list is empty.\n* (Optional) `didCancelSelection: () -> Void`: a function that is called when the user presses <kbd>Esc</kbd> or the list loses focus.\n* (Optional) `initiallyVisibleItemCount: Number`: When this options was provided, `SelectList` observe visibility of items in viewport, visibility state is passed as `visible` option to `elementForItem`. This is mainly used to skip heavy computation for invisible items.\n","readmeFilename":"README.md","_rev":"1-f1285395eba5cbeceabf44cb349175c5"}