@geophrase/react 1.3.6 → 1.3.7
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 +4 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The official React and Next.js hook for Geophrase Connect. Drop the Geophrase address selector into any React checkout in minutes and capture perfectly structured Indian addresses and coordinates to reduce Return to Origin (RTO) costs.
|
|
4
4
|
|
|
5
|
-
👉 **[Full documentation and integration guide](https://
|
|
5
|
+
👉 **[Full documentation and integration guide](https://geophrase.com/docs)**
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -52,7 +52,7 @@ The SDK supports two modes. Pick whichever fits your architecture:
|
|
|
52
52
|
- **`server`**: the widget returns `{ token }`. Your backend exchanges it for the full address using your API key, which never touches the frontend.
|
|
53
53
|
- **`client`**: the widget resolves the address in the browser and passes it straight to `onSuccess`. Requires `key` in the SDK options.
|
|
54
54
|
|
|
55
|
-
> Both modes require a Geophrase API key. See [creating and securing an API key](https://
|
|
55
|
+
> Both modes require a Geophrase API key. See [creating and securing an API key](https://geophrase.com/docs/api-keys).
|
|
56
56
|
>
|
|
57
57
|
> If your app has a backend, `server` mode keeps your API key entirely off the frontend, which is the most secure option. If you don't have a backend (or want the fastest possible integration), `client` mode with a domain-restricted key is fine.
|
|
58
58
|
|
|
@@ -70,7 +70,7 @@ const { open } = useGeophrase({
|
|
|
70
70
|
| Parameter | Type | Required | Description |
|
|
71
71
|
| :--- | :--- | :--- | :--- |
|
|
72
72
|
| `mode` | `string` | Optional | `'client'` (default) or `'server'`. Determines the architectural flow of the SDK. |
|
|
73
|
-
| `key` | `string` | **Conditional** | Your [Geophrase API key](https://
|
|
73
|
+
| `key` | `string` | **Conditional** | Your [Geophrase API key](https://geophrase.com/docs/api-keys). **Required if `mode` is `'client'`.** Omit if using server mode. |
|
|
74
74
|
| `theme` | `string` | Optional | `'light'`, `'dark'`, or `'system'`. Defaults to `'system'`. |
|
|
75
75
|
| `orderId` | `string` | Optional | Your internal reference ID for this checkout session. |
|
|
76
76
|
| `phone` | `string` | Optional | The customer's 10-digit phone number (pre-fills the widget). |
|
|
@@ -101,4 +101,4 @@ const [result, setResult] = useState<GeophraseAddress | GeophraseToken | null>(n
|
|
|
101
101
|
|
|
102
102
|
The underlying `Geophrase` instance is created on mount and destroyed on unmount automatically, so you do not need to call `destroy()` manually.
|
|
103
103
|
|
|
104
|
-
See the [full docs](https://
|
|
104
|
+
See the [full docs](https://geophrase.com/docs) for the complete configuration reference, security guidance, and response schemas.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geophrase/react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "React & Next.js hook for the Geophrase address picker. Drop-in widget that captures structured Indian addresses with coordinates to reduce RTO.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Geophrase",
|
|
7
|
-
"homepage": "https://
|
|
7
|
+
"homepage": "https://geophrase.com/docs",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/geophrase/geophrase-js.git"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react": ">=16.8.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@geophrase/core": "^1.3.
|
|
47
|
+
"@geophrase/core": "^1.3.7"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|