@quantaroute/checkout 1.0.1 → 1.1.1
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/dist/lib/index.d.ts +15 -0
- package/dist/lib/quantaroute-checkout.es.js +40 -17528
- package/dist/lib/quantaroute-checkout.umd.js +77 -5024
- package/package.json +13 -7
- /package/dist/{lib/style.css → style.css} +0 -0
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
## What it does
|
|
14
14
|
|
|
15
|
-
Replaces your broken Indian address form with a two-step
|
|
15
|
+
Replaces your broken Indian address form with a two-step Map-style flow:
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
Step 1 – Map Pin Step 2 – Auto-fill + Details
|
|
@@ -72,7 +72,7 @@ yarn add @quantaroute/checkout maplibre-gl
|
|
|
72
72
|
```ts
|
|
73
73
|
// In your app's entry file (main.tsx / _app.tsx / nuxt.config.ts, etc.)
|
|
74
74
|
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
75
|
-
import '@quantaroute/checkout/
|
|
75
|
+
import '@quantaroute/checkout/style.css';
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
### 3 · Drop it in
|
|
@@ -179,7 +179,7 @@ export default function CheckoutPage() {
|
|
|
179
179
|
Add CSS imports to `app/layout.tsx`:
|
|
180
180
|
```tsx
|
|
181
181
|
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
182
|
-
import '@quantaroute/checkout/
|
|
182
|
+
import '@quantaroute/checkout/style.css';
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
---
|
|
@@ -243,7 +243,7 @@ function handleComplete(address) {
|
|
|
243
243
|
```tsx
|
|
244
244
|
// src/App.tsx
|
|
245
245
|
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
246
|
-
import '@quantaroute/checkout/
|
|
246
|
+
import '@quantaroute/checkout/style.css';
|
|
247
247
|
import { CheckoutWidget } from '@quantaroute/checkout';
|
|
248
248
|
|
|
249
249
|
function App() {
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -89,6 +89,13 @@ export declare interface CheckoutWidgetProps {
|
|
|
89
89
|
mapHeight?: string;
|
|
90
90
|
/** Widget header title. Defaults to 'Add Delivery Address'. */
|
|
91
91
|
title?: string;
|
|
92
|
+
/**
|
|
93
|
+
* URL to an India boundary GeoJSON file (FeatureCollection).
|
|
94
|
+
* When provided, a thin grey outline is drawn on the map for legal compliance.
|
|
95
|
+
* Host the file in your app's public folder and pass its path here.
|
|
96
|
+
* Example: indiaBoundaryUrl="/geojson/india.geojson"
|
|
97
|
+
*/
|
|
98
|
+
indiaBoundaryUrl?: string;
|
|
92
99
|
}
|
|
93
100
|
|
|
94
101
|
export declare interface CompleteAddress {
|
|
@@ -206,6 +213,14 @@ export declare interface MapPinSelectorProps {
|
|
|
206
213
|
defaultLng?: number;
|
|
207
214
|
mapHeight?: string;
|
|
208
215
|
theme?: 'light' | 'dark';
|
|
216
|
+
/**
|
|
217
|
+
* URL to an India boundary GeoJSON file (FeatureCollection).
|
|
218
|
+
* When provided, a thin grey outline of India's border is drawn on the map
|
|
219
|
+
* to satisfy Indian government map policy requirements.
|
|
220
|
+
* The file is fetched in parallel with map initialisation — no visible delay.
|
|
221
|
+
* Example: indiaBoundaryUrl="/geojson/india.geojson"
|
|
222
|
+
*/
|
|
223
|
+
indiaBoundaryUrl?: string;
|
|
209
224
|
}
|
|
210
225
|
|
|
211
226
|
/**
|