places-autocomplete-svelte 2.2.3 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -5
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
This Svelte component provides a user-friendly way to search for and retrieve detailed address information within your [SvelteKit](https://kit.svelte.dev) applications, leveraging the power of the [Google Maps Places (New) Autocomplete API](https://developers.google.com/maps/documentation/javascript/place-autocomplete-overview). It comes with default styling using [Tailwind CSS](https://tailwindcss.com/), which you can fully customise.
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
## Places (New) Autocomplete – JavaScript Integration
|
|
7
|
+
|
|
8
|
+
Simply include a single script tag and handle the response in your JavaScript code.
|
|
9
|
+
[View Details](https://pacservice.pages.dev/)
|
|
10
|
+
|
|
6
11
|
|
|
7
12
|
## Features
|
|
8
13
|
|
|
@@ -29,6 +34,10 @@ See a live demo of the component in action: [Basic Example](https://places-autoc
|
|
|
29
34
|
|
|
30
35
|
|
|
31
36
|
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
32
41
|
## Requirements
|
|
33
42
|
|
|
34
43
|
- **Google Maps API Key** with the Places API (New) enabled. Refer to [Use API Keys](https://developers.google.com/maps/documentation/javascript/get-api-key) for detailed instructions.
|
|
@@ -39,11 +48,7 @@ See a live demo of the component in action: [Basic Example](https://places-autoc
|
|
|
39
48
|
npm i places-autocomplete-svelte
|
|
40
49
|
```
|
|
41
50
|
|
|
42
|
-
## Installation Svelte 4
|
|
43
51
|
|
|
44
|
-
```bash
|
|
45
|
-
npm i places-autocomplete-svelte@1.0.1
|
|
46
|
-
```
|
|
47
52
|
|
|
48
53
|
|
|
49
54
|
## Basic Usage
|
|
@@ -79,7 +84,7 @@ let onResponse = (response) => {
|
|
|
79
84
|
| `onResponse` | `CustomEvent` | Dispatched when a place is selected, containing the place details in `event.detail`. | Yes | |
|
|
80
85
|
| `onError` | `CustomEvent` | Dispatched when an error occurs, with the error message in `event.detail`. | No | |
|
|
81
86
|
| `requestParams` | `Object` | Object for additional request parameters (e.g., `types`, `bounds`, `origin`, `region`, `language`). See [AutocompleteRequest](https://developers.google.com/maps/documentation/javascript/reference/autocomplete-data#AutocompleteRequest). | No | `{}` |
|
|
82
|
-
| `fetchFields` | `Array` | Array of place data fields to return. See [Supported Fields](https://developers.google.com/maps/documentation/javascript/place-class-data-fields) documentation for a comprehensive list of available fields. Note that the Places Autocomplete service does not support the following fields, even if they are available in the Place Details API: `geometry`, `icon`, `name`, `permanentlyClosed`, `photo`, `placeId`, `url`, `utcOffset`, `vicinity`, `openingHours`, `icon`, and `name`. If you need these fields,
|
|
87
|
+
| `fetchFields` | `Array` | Array of place data fields to return. See [Supported Fields](https://developers.google.com/maps/documentation/javascript/place-class-data-fields) documentation for a comprehensive list of available fields. Note that the Places Autocomplete service does not support the following fields, even if they are available in the Place Details API: `geometry`, `icon`, `name`, `permanentlyClosed`, `photo`, `placeId`, `url`, `utcOffset`, `vicinity`, `openingHours`, `icon`, and `name`. If you need these fields, make a separate call to the Place Details API using the returned `place_id`. | No | `['formattedAddress', 'addressComponents']` |
|
|
83
88
|
| `options` | `Object` | Options for customizing the component's behavior and appearance. See "Customization" below. | No | See default values in "Customization" |
|
|
84
89
|
|
|
85
90
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "places-autocomplete-svelte",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.4",
|
|
5
5
|
"description": "A lightweight and customizable Svelte component for easy integration of Google Maps Places (New) Autocomplete in your Svelte/SvelteKit applications. Provides accessible autocomplete suggestions and detailed address retrieval.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"svelte",
|
|
@@ -67,31 +67,31 @@
|
|
|
67
67
|
"svelte": "^5.1.4"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@sveltejs/adapter-auto": "^
|
|
71
|
-
"@sveltejs/adapter-cloudflare": "^
|
|
72
|
-
"@sveltejs/kit": "^2.
|
|
70
|
+
"@sveltejs/adapter-auto": "^5.0.0",
|
|
71
|
+
"@sveltejs/adapter-cloudflare": "^6.0.1",
|
|
72
|
+
"@sveltejs/kit": "^2.20.2",
|
|
73
73
|
"@sveltejs/package": "^2.3.10",
|
|
74
74
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
75
|
-
"@tailwindcss/postcss": "^4.0.
|
|
75
|
+
"@tailwindcss/postcss": "^4.0.15",
|
|
76
76
|
"@tailwindcss/typography": "^0.5.16",
|
|
77
|
-
"@tailwindcss/vite": "^4.0.
|
|
77
|
+
"@tailwindcss/vite": "^4.0.15",
|
|
78
78
|
"@types/eslint": "^9.6.1",
|
|
79
|
-
"autoprefixer": "^10.4.
|
|
80
|
-
"eslint": "^9.
|
|
81
|
-
"eslint-config-prettier": "^10.
|
|
82
|
-
"eslint-plugin-svelte": "^
|
|
79
|
+
"autoprefixer": "^10.4.21",
|
|
80
|
+
"eslint": "^9.23.0",
|
|
81
|
+
"eslint-config-prettier": "^10.1.1",
|
|
82
|
+
"eslint-plugin-svelte": "^3.3.3",
|
|
83
83
|
"globals": "^16.0.0",
|
|
84
84
|
"postcss": "^8.5.3",
|
|
85
|
-
"prettier": "^3.5.
|
|
85
|
+
"prettier": "^3.5.3",
|
|
86
86
|
"prettier-plugin-svelte": "^3.3.3",
|
|
87
|
-
"publint": "^0.3.
|
|
88
|
-
"svelte": "^5.
|
|
89
|
-
"svelte-check": "^4.1.
|
|
90
|
-
"tailwindcss": "^4.0.
|
|
87
|
+
"publint": "^0.3.9",
|
|
88
|
+
"svelte": "^5.25.2",
|
|
89
|
+
"svelte-check": "^4.1.5",
|
|
90
|
+
"tailwindcss": "^4.0.15",
|
|
91
91
|
"tslib": "^2.8.1",
|
|
92
|
-
"typescript": "^5.
|
|
93
|
-
"typescript-eslint": "^8.
|
|
94
|
-
"vite": "^6.
|
|
92
|
+
"typescript": "^5.8.2",
|
|
93
|
+
"typescript-eslint": "^8.27.0",
|
|
94
|
+
"vite": "^6.2.2"
|
|
95
95
|
},
|
|
96
96
|
"svelte": "./dist/index.js",
|
|
97
97
|
"types": "./dist/PlaceAutocomplete.svelte.d.ts",
|