@quantaroute/checkout 1.7.2 → 1.7.3
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/lib/index.d.ts +47 -9
- package/dist/lib/quantaroute-checkout.es.js +137 -132
- package/dist/lib/quantaroute-checkout.umd.js +127 -122
- package/dist/style.css +1 -1
- package/package.json +7 -3
- package/src/components/CheckoutWidget.tsx +3 -0
- package/src/components/MapPinSelector.native.tsx +2 -8
- package/src/components/MapPinSelector.tsx +20 -13
- package/src/core/map-runtime.ts +76 -3
- package/src/core/types.ts +20 -7
- package/src/index.ts +9 -0
- package/src/styles/checkout.css +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ Release dates are from git history where available; earlier versions are estimat
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.7.3](https://github.com/quantaroute/checkout/compare/v1.7.2...v1.7.3) — 2026-11-09
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Default web/native basemap is **QuantaRoute India** (`QUANTAROUTE_MAP_STYLE_URL` / `https://maps.quantaroute.com/styles/quantaroute.json`). The style hides OSM country borders and draws the Survey of India / Datameet outline. `CARTO_POSITRON_STYLE_URL` and `OPENFREEMAP_POSITRON_STYLE_URL` remain exported fallbacks. `QUANTAROUTE_INDIA_BOUNDARY_URL` is the hosted official GeoJSON.
|
|
15
|
+
|
|
10
16
|
## [1.7.2](https://github.com/quantaroute/checkout/compare/v1.7.1...v1.7.2) — 2026-07-06
|
|
11
17
|
|
|
12
18
|
### Added
|
package/README.md
CHANGED
|
@@ -715,7 +715,7 @@ function MyCheckout() {
|
|
|
715
715
|
```tsx
|
|
716
716
|
<CheckoutWidget
|
|
717
717
|
apiKey="..."
|
|
718
|
-
indiaBoundaryUrl="/geojson/india.geojson"
|
|
718
|
+
indiaBoundaryUrl="https://maps.quantaroute.com/geojson/india.geojson"
|
|
719
719
|
onComplete={...}
|
|
720
720
|
/>
|
|
721
721
|
```
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -174,6 +174,9 @@ export declare interface AutocompleteSuggestion {
|
|
|
174
174
|
/** Read UTM params from the current page URL (web). Returns {} on native or SSR. */
|
|
175
175
|
export declare function captureUtmFromUrl(href?: string): UtmParams;
|
|
176
176
|
|
|
177
|
+
/** Carto Positron — fallback if maps.quantaroute.com is unavailable. */
|
|
178
|
+
export declare const CARTO_POSITRON_STYLE_URL = "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json";
|
|
179
|
+
|
|
177
180
|
/**
|
|
178
181
|
* Check COD availability for a delivery pincode (Edge: `cod_eligibility`).
|
|
179
182
|
* Respects `checkout.merchants.enable_cod` (C4), `cod_blocked_pincodes` / `cod_max_cart_value_paise` (D1/D2).
|
|
@@ -296,14 +299,20 @@ export declare interface CheckoutWidgetProps {
|
|
|
296
299
|
* URL to an India boundary GeoJSON file (FeatureCollection).
|
|
297
300
|
* When provided, a thin grey outline is drawn on the map for legal compliance.
|
|
298
301
|
* Host the file in your app's public folder and pass its path here.
|
|
299
|
-
* Example: indiaBoundaryUrl="/geojson/india.geojson"
|
|
302
|
+
* Example: indiaBoundaryUrl="https://maps.quantaroute.com/geojson/india.geojson"
|
|
300
303
|
*/
|
|
301
304
|
indiaBoundaryUrl?: string;
|
|
302
305
|
/**
|
|
303
|
-
* MapLibre style URL for the map step. Defaults to
|
|
304
|
-
*
|
|
306
|
+
* MapLibre style URL for the map step. Defaults to QuantaRoute India.
|
|
307
|
+
* `CARTO_POSITRON_STYLE_URL` / `OPENFREEMAP_POSITRON_STYLE_URL` remain fallbacks.
|
|
308
|
+
* Wins over `mapTheme`.
|
|
305
309
|
*/
|
|
306
310
|
mapStyle?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Named QuantaRoute Atlas theme when `mapStyle` is omitted:
|
|
313
|
+
* `pro` (default), `light`, or `dark`.
|
|
314
|
+
*/
|
|
315
|
+
mapTheme?: QuantaRouteMapTheme;
|
|
307
316
|
/**
|
|
308
317
|
* How MapLibre GL JS is loaded on web. `external` waits for `window.maplibregl`
|
|
309
318
|
* when the host loads MapLibre from a CDN (e.g. Shopify theme extensions).
|
|
@@ -545,8 +554,8 @@ export declare interface CreatePaymentOrderResult {
|
|
|
545
554
|
currency: string;
|
|
546
555
|
}
|
|
547
556
|
|
|
548
|
-
/**
|
|
549
|
-
export declare const DEFAULT_MAP_STYLE_URL = "https://
|
|
557
|
+
/** Default basemap for web embeds (Atlas Pro). */
|
|
558
|
+
export declare const DEFAULT_MAP_STYLE_URL = "https://maps.quantaroute.com/styles/quantaroute.json";
|
|
550
559
|
|
|
551
560
|
/** Soft-delete a saved address. */
|
|
552
561
|
export declare function deleteAddress(config: CheckoutApiConfig, sessionToken: string, addressId: string): Promise<void>;
|
|
@@ -735,7 +744,7 @@ export declare interface MapPinSelectorProps {
|
|
|
735
744
|
* When provided, a thin grey outline of India's border is drawn on the map
|
|
736
745
|
* to satisfy Indian government map policy requirements.
|
|
737
746
|
* The file is fetched in parallel with map initialisation — no visible delay.
|
|
738
|
-
* Example: indiaBoundaryUrl="/geojson/india.geojson"
|
|
747
|
+
* Example: indiaBoundaryUrl="https://maps.quantaroute.com/geojson/india.geojson"
|
|
739
748
|
*/
|
|
740
749
|
indiaBoundaryUrl?: string;
|
|
741
750
|
/**
|
|
@@ -755,10 +764,17 @@ export declare interface MapPinSelectorProps {
|
|
|
755
764
|
*/
|
|
756
765
|
brandColor?: string;
|
|
757
766
|
/**
|
|
758
|
-
* MapLibre style URL for the basemap. Defaults to
|
|
759
|
-
*
|
|
767
|
+
* MapLibre style URL for the basemap. Defaults to QuantaRoute India
|
|
768
|
+
* (`QUANTAROUTE_MAP_STYLE_URL`). `CARTO_POSITRON_STYLE_URL` and
|
|
769
|
+
* `OPENFREEMAP_POSITRON_STYLE_URL` remain available as fallbacks.
|
|
770
|
+
* Wins over `mapTheme`.
|
|
760
771
|
*/
|
|
761
772
|
mapStyle?: string;
|
|
773
|
+
/**
|
|
774
|
+
* Named QuantaRoute Atlas theme when `mapStyle` is omitted:
|
|
775
|
+
* `pro` (default), `light`, or `dark`.
|
|
776
|
+
*/
|
|
777
|
+
mapTheme?: QuantaRouteMapTheme;
|
|
762
778
|
/**
|
|
763
779
|
* How MapLibre GL JS is loaded on web. `bundled` imports the peer dependency;
|
|
764
780
|
* `external` waits for `window.maplibregl` (CDN script loaded by the host).
|
|
@@ -796,7 +812,7 @@ export declare function notifyAddressCompleted(config: CheckoutApiConfig, sessio
|
|
|
796
812
|
/** Signal explicit session abandonment (page exit). */
|
|
797
813
|
export declare function notifySessionAbandoned(config: CheckoutApiConfig, sessionToken: string, lastStep: string): Promise<void>;
|
|
798
814
|
|
|
799
|
-
/** OpenFreeMap Positron —
|
|
815
|
+
/** OpenFreeMap Positron — fallback used by some Shopify embeds historically. */
|
|
800
816
|
export declare const OPENFREEMAP_POSITRON_STYLE_URL = "https://tiles.openfreemap.org/styles/positron";
|
|
801
817
|
|
|
802
818
|
export declare const OtpStep: default_2.FC<OtpStepProps>;
|
|
@@ -880,10 +896,32 @@ export declare interface PrepaidNudgeProps {
|
|
|
880
896
|
theme?: 'light' | 'dark';
|
|
881
897
|
}
|
|
882
898
|
|
|
899
|
+
/** Official India outline GeoJSON (Survey of India / Datameet). Same file as the style overlay. */
|
|
900
|
+
export declare const QUANTAROUTE_INDIA_BOUNDARY_URL = "https://maps.quantaroute.com/geojson/india.geojson";
|
|
901
|
+
|
|
902
|
+
export declare const QUANTAROUTE_MAP_STYLE_DARK_URL = "https://maps.quantaroute.com/styles/quantaroute-pro-dark.json";
|
|
903
|
+
|
|
904
|
+
export declare const QUANTAROUTE_MAP_STYLE_LIGHT_URL = "https://maps.quantaroute.com/styles/quantaroute-pro-light.json";
|
|
905
|
+
|
|
906
|
+
/** QuantaRoute India basemap (Geofabrik PBF, Survey of India outline). */
|
|
907
|
+
export declare const QUANTAROUTE_MAP_STYLE_URL = "https://maps.quantaroute.com/styles/quantaroute.json";
|
|
908
|
+
|
|
909
|
+
export declare const QUANTAROUTE_MAP_STYLES: {
|
|
910
|
+
readonly pro: "https://maps.quantaroute.com/styles/quantaroute.json";
|
|
911
|
+
readonly light: "https://maps.quantaroute.com/styles/quantaroute-pro-light.json";
|
|
912
|
+
readonly dark: "https://maps.quantaroute.com/styles/quantaroute-pro-dark.json";
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
export declare const QUANTAROUTE_MAP_STYLES_CATALOG_URL = "https://maps.quantaroute.com/styles.json";
|
|
916
|
+
|
|
917
|
+
export declare type QuantaRouteMapTheme = keyof typeof QUANTAROUTE_MAP_STYLES;
|
|
918
|
+
|
|
883
919
|
export declare function recordCodPayment(config: CheckoutApiConfig, sessionToken: string): Promise<{
|
|
884
920
|
payment_method: string;
|
|
885
921
|
}>;
|
|
886
922
|
|
|
923
|
+
export declare function resolveQuantaRouteMapStyle(mapStyle?: string, mapTheme?: QuantaRouteMapTheme): string;
|
|
924
|
+
|
|
887
925
|
/**
|
|
888
926
|
* Call QuantaRoute's Reverse Geocoding API.
|
|
889
927
|
* Converts DigiPin → address components from Nominatim/OpenStreetMap.
|