{"_id":"@amraneze/osm-autocomplete","_rev":"4-38deb43413a5920a68e2bd66352752a8","name":"@amraneze/osm-autocomplete","dist-tags":{"latest":"0.0.7-beta"},"versions":{"0.0.1":{"name":"@amraneze/osm-autocomplete","version":"0.0.1","keywords":["osm","OpenStreetMap","autocomplete","react","maps"],"author":{"name":"Amrane Ait Zeouay","email":"a.zeouayamrane@gmail.com"},"license":"ISC","_id":"@amraneze/osm-autocomplete@0.0.1","maintainers":[{"name":"amraneze","email":"a.zeouayamran@gmail.com"}],"homepage":"https://github.com/Amraneze/osm-autocomplete#readme","bugs":{"url":"https://github.com/Amraneze/osm-autocomplete/issues"},"dist":{"shasum":"c05e9b2fd8f2fb8427bd563ec1f66a0de3d72b78","tarball":"https://registry.npmjs.org/@amraneze/osm-autocomplete/-/osm-autocomplete-0.0.1.tgz","fileCount":24,"integrity":"sha512-+5/uGI7Eo8zpg2ksQKaiEf/R4at8NxJ0jnEGWAPbH1/NX04UBSV2JK7PLm6wA9kiQ5zxLemNg+QAk6Zzl3S7JA==","signatures":[{"sig":"MEQCIESVopaOnvYsNui0BuWUYNIP9AAq7kANP4OgXZexvhFkAiBaUYuqNo51moACPp0ikXXAgzfhe5r6U6E5E/H3Dy7flg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":57201},"main":"dist/cjs/index.js","type":"module","email":"a.zeouayamrane@gmail.com","types":"dist/index.d.ts","module":"dist/esm/index.js","engines":{"node":">=14.0.0"},"gitHead":"0f75c5dea3593b456470969228621d3c949bceae","scripts":{"build":"rollup -c","build:watch":"rollup -c -w"},"_npmUser":{"name":"amraneze","email":"a.zeouayamran@gmail.com"},"repository":{"url":"git+https://github.com/Amraneze/osm-autocomplete.git","type":"git"},"_npmVersion":"8.12.1","description":"OpenStreetMap Autocomplete","directories":{},"_nodeVersion":"16.15.1","_hasShrinkwrap":false,"devDependencies":{"sass":"^1.63.6","tslib":"^2.5.3","rollup":"^3.25.1","postcss":"^8.4.24","typescript":"^5.1.3","@types/node":"^20.3.2","@types/react":"^18.2.12","autoprefixer":"^10.4.14","rollup-plugin-dts":"^5.3.0","rollup-plugin-uglify":"^6.0.4","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^25.0.2","@rollup/plugin-typescript":"^11.1.1","@rollup/plugin-node-resolve":"^15.1.0"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/osm-autocomplete_0.0.1_1687845759902_0.28406284054188435","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@amraneze/osm-autocomplete","version":"0.0.2","keywords":["osm","OpenStreetMap","autocomplete","react","maps"],"author":{"name":"Amrane Ait Zeouay","email":"a.zeouayamrane@gmail.com"},"license":"ISC","_id":"@amraneze/osm-autocomplete@0.0.2","maintainers":[{"name":"amraneze","email":"a.zeouayamran@gmail.com"}],"homepage":"https://github.com/Amraneze/osm-autocomplete#readme","bugs":{"url":"https://github.com/Amraneze/osm-autocomplete/issues"},"dist":{"shasum":"87ac4ff9d0354722c2af21ed3abdefd7941fa234","tarball":"https://registry.npmjs.org/@amraneze/osm-autocomplete/-/osm-autocomplete-0.0.2.tgz","fileCount":24,"integrity":"sha512-Id8nXBlhaoWtLRkHgt1FSax+iv9ruJVA+pSKSdwvTJKh3fqshWWb42Es1BW9FMVecWmNI8vWlB91zBln4nfjbw==","signatures":[{"sig":"MEQCIHHO3L8ywW/XRq2v7xHUE6TJUVyF4GitKsd2eULX7m0UAiBB75tcyuzp60ZpLTs6laErV4VnN7vhU3GBG1I1flNU5A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55434},"main":"dist/cjs/index.js","type":"module","email":"a.zeouayamrane@gmail.com","types":"dist/index.d.ts","module":"dist/esm/index.js","engines":{"node":">=14.0.0"},"gitHead":"08c5f2867aef1f088d01412168505eb676159d14","scripts":{"lint":"eslint ./src","build":"rollup -c","prepack":"pinst --disable","lint:fix":"eslint ./src --fix","postpack":"pinst --enable","build:watch":"rollup -c -w","check-types":"tsc","postinstall":"husky install","prettier:fix":"yarn prettier --write ."},"_npmUser":{"name":"amraneze","email":"a.zeouayamran@gmail.com"},"repository":{"url":"git+https://github.com/Amraneze/osm-autocomplete.git","type":"git"},"_npmVersion":"8.12.1","description":"OpenStreetMap Autocomplete","directories":{},"_nodeVersion":"16.15.1","_hasShrinkwrap":false,"devDependencies":{"sass":"^1.63.6","husky":"^8.0.0","pinst":"^3.0.0","tslib":"^2.5.3","rollup":"^3.25.1","postcss":"^8.4.24","typescript":"^5.1.3","@types/node":"^20.3.2","@types/react":"^18.2.12","autoprefixer":"^10.4.14","rollup-plugin-dts":"^5.3.0","rollup-plugin-uglify":"^6.0.4","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^25.0.2","@rollup/plugin-typescript":"^11.1.1","@rollup/plugin-node-resolve":"^15.1.0"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/osm-autocomplete_0.0.2_1687902857633_0.41189621147758926","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@amraneze/osm-autocomplete","version":"0.0.5","keywords":["osm","OpenStreetMap","autocomplete","react","maps"],"author":{"name":"Amrane Ait Zeouay","email":"a.zeouayamrane@gmail.com"},"license":"ISC","_id":"@amraneze/osm-autocomplete@0.0.5","maintainers":[{"name":"amraneze","email":"a.zeouayamran@gmail.com"}],"homepage":"https://github.com/Amraneze/osm-autocomplete#readme","bugs":{"url":"https://github.com/Amraneze/osm-autocomplete/issues"},"dist":{"shasum":"b7d0d9df93cc8368a14731e1e4c477e9387f6c75","tarball":"https://registry.npmjs.org/@amraneze/osm-autocomplete/-/osm-autocomplete-0.0.5.tgz","fileCount":34,"integrity":"sha512-zQO8hJTMm6NJj1Ny0mzJjneafbTOeEpnp5PBEVm4J42CJS8AAz/7yRylVv7drpE0Ad/JV2vL/I6NpXvAeZlmKg==","signatures":[{"sig":"MEUCIQC0Pezg4k6PAFFo51F8eYLrhFiuNoHcpWVs6YSIUpFmVQIgB1B73xD1bAUjtYQ6n7T/pBCccxoMYJZTN7sGZZmNmpk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56406},"main":"dist/cjs/index.js","type":"module","email":"a.zeouayamrane@gmail.com","types":"dist/index.d.ts","module":"dist/esm/index.js","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint --ext .ts,.tsx \"src/**/*\"","build":"rollup -c","prepack":"pinst --disable","lint:fix":"eslint --ext .ts,.tsx \"src/**/*\" --fix","postpack":"pinst --enable","build:watch":"rollup -c -w","check-types":"tsc","postinstall":"husky install","prettier:fix":"yarn prettier --write ."},"_npmUser":{"name":"amraneze","email":"a.zeouayamran@gmail.com"},"repository":{"url":"git+https://github.com/Amraneze/osm-autocomplete.git","type":"git"},"description":"OpenStreetMap Autocomplete","directories":{},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.63.6","husky":"^8.0.0","pinst":"^3.0.0","tslib":"^2.5.3","eslint":"^8.43.0","rollup":"^3.25.1","postcss":"^8.4.24","prettier":"^2.8.8","typescript":"^5.1.3","@types/node":"^20.3.2","@types/react":"^18.2.12","autoprefixer":"^10.4.14","rollup-plugin-dts":"^5.3.0","eslint-plugin-react":"^7.32.2","eslint-config-airbnb":"^19.0.4","eslint-plugin-import":"^2.27.5","eslint-plugin-risxss":"^2.1.0","rollup-plugin-uglify":"^6.0.4","rollup-plugin-postcss":"^4.0.2","eslint-config-prettier":"^8.8.0","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-no-loops":"^0.3.0","eslint-plugin-prettier":"^4.2.1","@rollup/plugin-commonjs":"^25.0.2","eslint-config-react-app":"^7.0.1","@rollup/plugin-typescript":"^11.1.1","@typescript-eslint/parser":"^5.60.1","@rollup/plugin-node-resolve":"^15.1.0","eslint-config-airbnb-typescript":"^17.0.0","@typescript-eslint/eslint-plugin":"^5.60.1"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/osm-autocomplete_0.0.5_1687981208153_0.5811796463138605","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@amraneze/osm-autocomplete","version":"0.0.6","keywords":["osm","OpenStreetMap","autocomplete","react","maps"],"author":{"name":"Amrane Ait Zeouay","email":"a.zeouayamrane@gmail.com"},"license":"ISC","_id":"@amraneze/osm-autocomplete@0.0.6","maintainers":[{"name":"amraneze","email":"a.zeouayamran@gmail.com"}],"homepage":"https://github.com/Amraneze/osm-autocomplete#readme","bugs":{"url":"https://github.com/Amraneze/osm-autocomplete/issues"},"dist":{"shasum":"817e9d87cc1034a24d207851391e614a915b256d","tarball":"https://registry.npmjs.org/@amraneze/osm-autocomplete/-/osm-autocomplete-0.0.6.tgz","fileCount":21,"integrity":"sha512-2jPWQNdw/D+z/7yVM8poSd5H6sDy3tIcf/n1XUGwXbadmcqUt+JCPQjuwvgdsn3IDVg1pFbrn8ofo8xKo6BqQA==","signatures":[{"sig":"MEYCIQCG4XGvCUlBEVXicNr4fIsnJusPl7iZ1ooiuvFsGyJlqQIhAI23XhrewYHHn5KipOO7ZQycemnEOhKxOqh4MJJspgQB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21250},"main":"dist/cjs/index.js","type":"module","email":"a.zeouayamrane@gmail.com","types":"dist/index.d.ts","module":"dist/esm/index.js","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint --ext .ts,.tsx \"src/**/*\"","build":"rollup -c","prepack":"pinst --disable","lint:fix":"eslint --ext .ts,.tsx \"src/**/*\" --fix","postpack":"pinst --enable","build:watch":"rollup -c -w","check-types":"tsc","postinstall":"husky install","prettier:fix":"yarn prettier --write ."},"_npmUser":{"name":"amraneze","email":"a.zeouayamran@gmail.com"},"repository":{"url":"git+https://github.com/Amraneze/osm-autocomplete.git","type":"git"},"description":"OpenStreetMap Autocomplete","directories":{},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.63.6","husky":"^8.0.0","pinst":"^3.0.0","tslib":"^2.5.3","eslint":"^8.43.0","rollup":"^3.25.1","postcss":"^8.4.24","prettier":"^2.8.8","typescript":"^5.1.3","@types/node":"^20.3.2","@types/react":"^18.2.12","autoprefixer":"^10.4.14","rollup-plugin-dts":"^5.3.0","eslint-plugin-react":"^7.32.2","eslint-config-airbnb":"^19.0.4","eslint-plugin-import":"^2.27.5","eslint-plugin-risxss":"^2.1.0","rollup-plugin-uglify":"^6.0.4","rollup-plugin-postcss":"^4.0.2","eslint-config-prettier":"^8.8.0","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-no-loops":"^0.3.0","eslint-plugin-prettier":"^4.2.1","@rollup/plugin-commonjs":"^25.0.2","eslint-config-react-app":"^7.0.1","@rollup/plugin-typescript":"^11.1.1","@typescript-eslint/parser":"^5.60.1","@rollup/plugin-node-resolve":"^15.1.0","eslint-config-airbnb-typescript":"^17.0.0","@typescript-eslint/eslint-plugin":"^5.60.1"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/osm-autocomplete_0.0.6_1687987260195_0.2799497264522417","host":"s3://npm-registry-packages"}},"0.0.7-beta":{"name":"@amraneze/osm-autocomplete","version":"0.0.7-beta","description":"OpenStreetMap Autocomplete","main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/index.d.ts","type":"module","scripts":{"build":"rollup -c","build:watch":"rollup -c -w","check-types":"tsc","lint":"eslint --ext .ts,.tsx \"src/**/*\"","lint:fix":"eslint --ext .ts,.tsx \"src/**/*\" --fix","prettier:fix":"yarn prettier --write .","postinstall":"husky install","prepack":"pinst --disable","postpack":"pinst --enable"},"repository":{"type":"git","url":"git+https://github.com/Amraneze/osm-autocomplete.git"},"keywords":["osm","OpenStreetMap","autocomplete","react","maps"],"email":"a.zeouayamrane@gmail.com","author":{"name":"Amrane Ait Zeouay","email":"a.zeouayamrane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/Amraneze/osm-autocomplete/issues"},"homepage":"https://github.com/Amraneze/osm-autocomplete#readme","devDependencies":{"@rollup/plugin-commonjs":"^25.0.2","@rollup/plugin-node-resolve":"^15.1.0","@rollup/plugin-typescript":"^11.1.1","@types/node":"^20.3.2","@types/react":"^18.2.12","@typescript-eslint/eslint-plugin":"^5.60.1","@typescript-eslint/parser":"^5.60.1","autoprefixer":"^10.4.14","eslint":"^8.43.0","eslint-config-airbnb":"^19.0.4","eslint-config-airbnb-typescript":"^17.0.0","eslint-config-prettier":"^8.8.0","eslint-config-react-app":"^7.0.1","eslint-plugin-import":"^2.27.5","eslint-plugin-jsx-a11y":"^6.7.1","eslint-plugin-no-loops":"^0.3.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.32.2","eslint-plugin-risxss":"^2.1.0","husky":"^8.0.0","pinst":"^3.0.0","postcss":"^8.4.24","prettier":"^2.8.8","rollup":"^3.25.1","rollup-plugin-dts":"^5.3.0","rollup-plugin-postcss":"^4.0.2","rollup-plugin-uglify":"^6.0.4","sass":"^1.63.6","tslib":"^2.5.3","typescript":"^5.1.3"},"engines":{"node":">=14.0.0"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"_id":"@amraneze/osm-autocomplete@0.0.7-beta","dist":{"shasum":"a7dafa26f2f5669cf3d7bce699730214aacbc991","integrity":"sha512-IHhlvDWyCteIL+CgAcsfnYReNJMR7L40tiLDM3KAV9aNPaHQb/UoqDnSvFYotDblcqxcPpBPk7d//pYEndPtGw==","tarball":"https://registry.npmjs.org/@amraneze/osm-autocomplete/-/osm-autocomplete-0.0.7-beta.tgz","fileCount":21,"unpackedSize":21928,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGbTwAYlU/NDqMmO8j2rlfA7RXFS7ytyI1DqAGrNTy/nAiAtwOkatHK5uXZFBxSbKhUpB/Hr8jX/0O5roZFEkyX67g=="}]},"_npmUser":{"name":"amraneze","email":"a.zeouayamran@gmail.com"},"directories":{},"maintainers":[{"name":"amraneze","email":"a.zeouayamran@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/osm-autocomplete_0.0.7-beta_1722592067531_0.8478371730215355"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-27T06:02:39.776Z","modified":"2024-08-02T09:47:47.875Z","0.0.1":"2023-06-27T06:02:40.112Z","0.0.2":"2023-06-27T21:54:17.875Z","0.0.5":"2023-06-28T19:40:08.339Z","0.0.6":"2023-06-28T21:21:00.356Z","0.0.7-beta":"2024-08-02T09:47:47.709Z"},"bugs":{"url":"https://github.com/Amraneze/osm-autocomplete/issues"},"author":{"name":"Amrane Ait Zeouay","email":"a.zeouayamrane@gmail.com"},"license":"ISC","homepage":"https://github.com/Amraneze/osm-autocomplete#readme","keywords":["osm","OpenStreetMap","autocomplete","react","maps"],"repository":{"type":"git","url":"git+https://github.com/Amraneze/osm-autocomplete.git"},"description":"OpenStreetMap Autocomplete","maintainers":[{"name":"amraneze","email":"a.zeouayamran@gmail.com"}],"readme":"![npm version](https://img.shields.io/npm/v/%40amraneze%2Fosm-autocomplete)\n![npm](https://img.shields.io/npm/dw/%40amraneze%2Fosm-autocomplete)\n![npm bundle size](https://img.shields.io/bundlephobia/min/%40amraneze%2Fosm-autocomplete)\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/%40amraneze%2Fosm-autocomplete)\n![GitHub release (release name instead of tag name)](https://img.shields.io/github/v/release/amraneze/osm-autocomplete)\n[![build](https://github.com/Amraneze/osm-autocomplete/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/Amraneze/osm-autocomplete/actions/workflows/build.yml)\n\n# React Autocomplete using OpenStreetMap\n\n> A React component to search for addresses using [OpenStreetMap](https://www.openstreetmap.org/)\n\n## Install\n\n```\nnpm install @amraneze/osm-autocomplete\n```\n\n```\nyarn add @amraneze/osm-autocomplete\n```\n\n## How to use\n```js\nimport ReactDOM from 'react-dom';\nimport { OpeenStreetMap, OpenStreetMapAutocomplete } from '@amraneze/osm-autocomplete';\n\nconst responseInstagram = (response) => {\n  console.log(response);\n};\n\nReactDOM.render(\n  <OpenStreetMapAutocomplete value={null} onChange={handleOnOptionSelected} />,\n  document.getElementById(\"root\")\n);\n```\n\n>Note: Here is a [sandbox](https://codesandbox.io/s/osm-autocomplete-yt5mn8) to play around.\n\n## Parameters\n\n|       params      |                     value                     |             default value             |\n| :---------------: | :-------------------------------------------: | :-----------------------------------: |\n| value             | OpeenStreetMap                                | REQUIRED                              |\n| onChange          | function                                      | REQUIRED                              |\n| debounce          | string                                        | 500                                   |\n| placeholder       | string                                        | 'Search'                              |\n| noOptionName      | string                                        | 'No locations found'                  |\n| openStreetMapUrl  | string                                        | 'https://nominatim.openstreetmap.org' |\n| classes           | OpenStreetMapAutocompleteStyle<string>        | -                                     |\n| styles            | OpenStreetMapAutocompleteStyle<CSSProperties> | -                                     |\n\nWhere `OpeenStreetMap` is \n````typescript\ninterface OpeenStreetMap {\n  lat: string;\n  lon: string;\n  type: string;\n  class: string;\n  osm_id: number;\n  licence: string;\n  osm_type: string;\n  place_id: number;\n  importance: number;\n  display_name: string;\n  boundingbox: string[];\n}\n````\n\nand\n\n````typescript\ninterface OpenStreetMapAutocompleteStyle<T> {\n  root: T;\n  form: T;\n  inputWrapper: T;\n  input: T;\n  divider: T;\n  button: T;\n  listWrapper: T;\n  options: T;\n}\n````\n\n```typescript\n<OpenStreetMapAutocomplete value={value} onChange={handleOnOptionSelected} />\n```\n\n## Running the project\n### Locally\nBefore you will run the example to test lively the component, you should run these following commands:\n\nOn the root directory\n```\nyarn link\n```\nor\n```\nnpm link\n```\n\nOn the `example` directory\n```\nyarn link osm-autocomplete\n```\nor\n```\nnpm link osm-autocomplete\n```\n\nAnd don't forget to build the project with:\n```\nyarn build\n```\nor\n```\nnpm build\n```\n\nor if you want to keep watching the changes on the file\n\n```\nyarn build:watch\n```\nor\n```\nnpm build:watch\n```\n\n>Note: If you don't build the project, you will get the error `Can't resolve osm-autocomplete`\n\n## Production Bundle\n```\nyarn build\n```\nor\n```\nnpm build\n```\n\n\n#### TODO\n\n- [ ] Add tests\n- [ ] Add templates for PR and Issues\n\n### Follow me on Twitter: [@Amraneze](https://twitter.com/amraneze)","readmeFilename":"README.md"}