@placekit/autocomplete-react
Advanced tools
Comparing version 1.0.0-alpha.9 to 1.0.0-alpha.10
{ | ||
"name": "@placekit/autocomplete-react", | ||
"version": "1.0.0-alpha.9", | ||
"version": "1.0.0-alpha.10", | ||
"author": "PlaceKit <support@placekit.io>", | ||
@@ -15,10 +15,10 @@ "description": "PlaceKit Autocomplete React library", | ||
}, | ||
"types": "./dist/placekit-autocomplete.d.ts", | ||
"module": "./dist/placekit-autocomplete.esm.js", | ||
"main": "./dist/placekit-autocomplete.cjs.js", | ||
"types": "./dist/placekit-react.d.ts", | ||
"module": "./dist/placekit-react.esm.mjs", | ||
"main": "./dist/placekit-react.cjs.js", | ||
"exports": { | ||
".": { | ||
"types": "./dist/placekit-autocomplete.d.ts", | ||
"require": "./dist/placekit-autocomplete.cjs.js", | ||
"import": "./dist/placekit-autocomplete.esm.js" | ||
"types": "./dist/placekit-react.d.ts", | ||
"require": "./dist/placekit-react.cjs.js", | ||
"import": "./dist/placekit-react.esm.mjs" | ||
} | ||
@@ -44,17 +44,17 @@ }, | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/runtime": "^7.20.7", | ||
"@babel/runtime": "^7.20.13", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/plugin-commonjs": "^24.0.0", | ||
"@rollup/plugin-commonjs": "^24.0.1", | ||
"@rollup/plugin-node-resolve": "^15.0.1", | ||
"eslint": "^8.32.0", | ||
"eslint": "^8.33.0", | ||
"eslint-config-google": "^0.14.0", | ||
"eslint-plugin-react": "^7.32.0", | ||
"eslint-plugin-react": "^7.32.2", | ||
"npm-watch": "^0.11.0", | ||
"rimraf": "^4.0.7", | ||
"rollup": "^3.10.0", | ||
"rimraf": "^4.1.2", | ||
"rollup": "^3.15.0", | ||
"rollup-plugin-copy": "^3.4.0" | ||
}, | ||
"dependencies": { | ||
"@placekit/autocomplete-js": "^1.0.0-alpha.9", | ||
"@types/react": "^18.0.26", | ||
"@placekit/autocomplete-js": "^1.0.0-alpha.10", | ||
"@types/react": "^18.0.27", | ||
"prop-types": "^15.8.1" | ||
@@ -61,0 +61,0 @@ }, |
@@ -45,3 +45,8 @@ <h1 align="center"> | ||
return ( | ||
<PlaceKit apiKey="<your-api-key>" /> | ||
<PlaceKit | ||
apiKey="<your-api-key>" | ||
options={{ | ||
countries: ['fr'] | ||
}} | ||
/> | ||
); | ||
@@ -53,2 +58,4 @@ }; | ||
**Important**: the `countries` option is **required** at search time, but we like to keep it optional across all methods so developers remain free on when and how to define it. | ||
Also, import default style from `@placekit/autocomplete-js/dist/placekit-autocomplete.css` (`@placekit/autocomplete-js` is set as a dependency of this package and will automatically be installed). It will style the suggestions list and the input. | ||
@@ -79,2 +86,3 @@ If you have trouble importing CSS from `node_modules`, copy/paste [its content](https://github.com/placekit/autocomplete-js/blob/main/src/placekit.css) into your own CSS. | ||
language: 'fr', | ||
countryByIP: false, | ||
countries: ['fr'], | ||
@@ -118,3 +126,5 @@ coordinates: '48.86,2.29', | ||
const MyComponent = (props) => { | ||
const { target, client, state } = usePlaceKit('<your-api-key>', {}); | ||
const { target, client, state } = usePlaceKit('<your-api-key>', { | ||
countries: ['fr'], | ||
}); | ||
@@ -121,0 +131,0 @@ return ( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19325
146
1