@quantaroute/checkout 1.4.3 → 1.4.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/CHANGELOG.md +17 -0
- package/README.md +2 -2
- package/dist/lib/index.d.ts +14 -0
- package/dist/lib/quantaroute-checkout.es.js +153 -140
- package/dist/lib/quantaroute-checkout.umd.js +151 -138
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/src/components/AddressForm.native.tsx +70 -14
- package/src/components/AddressForm.tsx +51 -11
- package/src/components/AddressLabelIcons.native.tsx +144 -0
- package/src/components/AddressLabelIcons.tsx +46 -0
- package/src/components/CheckoutWidget.tsx +3 -0
- package/src/components/MapPinSelector.native.tsx +8 -1
- package/src/components/MapPinSelector.tsx +9 -1
- package/src/components/SavedAddressStep.tsx +7 -1
- package/src/core/api.ts +9 -1
- package/src/core/checkout-api.ts +3 -0
- package/src/core/digipin.ts +10 -1
- package/src/core/types.ts +2 -0
- package/src/index.ts +2 -0
- package/src/styles/checkout.css +86 -20
- package/src/styles/checkout.native.ts +25 -15
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ All notable changes to `@quantaroute/checkout` are documented here.
|
|
|
5
5
|
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
Release dates are from git history where available; earlier versions are estimated from the first public commit.
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.4.4](https://github.com/quantaroute/checkout/compare/v1.4.3...v1.4.4) — 2026-06-16
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Custom "Other" address label** — text input when Other is selected; persisted as `label_text` while `label` stays `other`
|
|
15
|
+
- `CompleteAddress.labelText` — returned on completion and when re-selecting saved addresses
|
|
16
|
+
- `couldBeDigiPinInput` and `isPotentialDigiPinInput` — partial DigiPin typing no longer triggers address autocomplete
|
|
17
|
+
- `npm run verify:digipin` — regression script for dashed, spaced, and compact DigiPin input
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **Address label picker** — compact pill chips with stroke SVG icons (web) and View-drawn icons (native); selected state uses primary tint instead of heavy borders
|
|
22
|
+
- **Native address form** — vector map-pin section icon replaces emoji in "Your details" header
|
|
23
|
+
- Saved address cards show custom `label_text` (e.g. "Friend's home") instead of generic "Other"
|
|
24
|
+
|
|
8
25
|
## [1.4.3](https://github.com/quantaroute/checkout/compare/v1.4.2...v1.4.3) — 2026-06-16
|
|
9
26
|
|
|
10
27
|
### Added
|
package/README.md
CHANGED
|
@@ -845,7 +845,7 @@ When publishing a new version to npm (maintainers only):
|
|
|
845
845
|
2. Run `npm run type-check && npm run build:lib && npm pack --dry-run` — confirm tarball contents.
|
|
846
846
|
3. Confirm no `.env`, `.pem`, or `supabase/` paths in the pack list.
|
|
847
847
|
4. Publish from a **clean git tag** with provenance: `npm publish --provenance --access public`.
|
|
848
|
-
5. Do **not** bump version in the same change unless releasing; current version is `1.4.
|
|
848
|
+
5. Do **not** bump version in the same change unless releasing; current version is `1.4.4`.
|
|
849
849
|
|
|
850
850
|
---
|
|
851
851
|
|
|
@@ -881,7 +881,7 @@ npx expo run:android # requires Android Studio
|
|
|
881
881
|
|
|
882
882
|
## Changelog
|
|
883
883
|
|
|
884
|
-
See [CHANGELOG.md](./CHANGELOG.md) for version history. Current release: **v1.4.
|
|
884
|
+
See [CHANGELOG.md](./CHANGELOG.md) for version history. Current release: **v1.4.4**.
|
|
885
885
|
|
|
886
886
|
---
|
|
887
887
|
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -368,6 +368,8 @@ export declare interface CompleteAddress {
|
|
|
368
368
|
formattedAddress: string;
|
|
369
369
|
/** Buyer-chosen label for saved-address book (defaults to home) */
|
|
370
370
|
label?: AddressLabel;
|
|
371
|
+
/** Custom label text when `label` is `other` (e.g. "Friend's home") */
|
|
372
|
+
labelText?: string;
|
|
371
373
|
/** Set when the buyer re-selected an existing saved row (skip createAddress). */
|
|
372
374
|
addressId?: string;
|
|
373
375
|
}
|
|
@@ -377,6 +379,12 @@ export declare interface Coordinates {
|
|
|
377
379
|
lng: number;
|
|
378
380
|
}
|
|
379
381
|
|
|
382
|
+
/**
|
|
383
|
+
* Returns true while the user is typing a DigiPin (compact, dashed, or spaced).
|
|
384
|
+
* Used to suppress address autocomplete until the code is complete or abandoned.
|
|
385
|
+
*/
|
|
386
|
+
export declare function couldBeDigiPinInput(input: string): boolean;
|
|
387
|
+
|
|
380
388
|
/** Save a new address for the authenticated buyer. */
|
|
381
389
|
export declare function createAddress(config: CheckoutApiConfig, sessionToken: string, address: SavedAddressPayload): Promise<SavedAddress>;
|
|
382
390
|
|
|
@@ -488,6 +496,9 @@ export declare function hasUtmParams(utm: UtmParams): boolean;
|
|
|
488
496
|
/** True when input is a complete 10-character DigiPin (any common separator style). */
|
|
489
497
|
export declare function isCompleteDigiPinInput(input: string): boolean;
|
|
490
498
|
|
|
499
|
+
/** True when normalised input is a non-empty prefix of a DigiPin (still being typed). */
|
|
500
|
+
export declare function isPotentialDigiPinInput(input: string): boolean;
|
|
501
|
+
|
|
491
502
|
/**
|
|
492
503
|
* Validate a DigiPin string (format + character check).
|
|
493
504
|
*/
|
|
@@ -721,6 +732,8 @@ export declare interface SavedAddress {
|
|
|
721
732
|
building_name: string;
|
|
722
733
|
street_name: string;
|
|
723
734
|
label: string;
|
|
735
|
+
/** Custom display text when label is `other` */
|
|
736
|
+
label_text: string | null;
|
|
724
737
|
is_default: boolean;
|
|
725
738
|
created_at: string;
|
|
726
739
|
updated_at: string;
|
|
@@ -743,6 +756,7 @@ export declare interface SavedAddressPayload {
|
|
|
743
756
|
street_name?: string;
|
|
744
757
|
full_address_json?: Record<string, unknown>;
|
|
745
758
|
label?: string;
|
|
759
|
+
label_text?: string | null;
|
|
746
760
|
is_default?: boolean;
|
|
747
761
|
}
|
|
748
762
|
|