@quantaroute/checkout 1.4.2 → 1.4.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 CHANGED
@@ -5,6 +5,20 @@ 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
+ ## [1.4.3](https://github.com/quantaroute/checkout/compare/v1.4.2...v1.4.3) — 2026-06-16
9
+
10
+ ### Added
11
+
12
+ - `normalizeDigiPinInput`, `formatDigiPin`, and `isCompleteDigiPinInput` exports for flexible DigiPin parsing
13
+ - `CompleteAddress.addressId` — set when a buyer re-selects an existing saved address
14
+ - `CheckoutWidgetController` + `registerController` prop for host-page step navigation (e.g. Shopify pre-checkout shell)
15
+
16
+ ### Changed
17
+
18
+ - **Offline DigiPin search** accepts dashed, spaced, and compact input (`4P3-J68-637F`, `4P3 J68 637F`, `4P3J68637F`)
19
+ - `looksLikeDigiPin` and `isValidDigiPin` use normalised 10-character body instead of dashed-only regex
20
+ - `createAddress` skipped when re-selecting a saved row; new addresses no longer auto-set `is_default: true`
21
+
8
22
  ## [1.4.2](https://github.com/quantaroute/checkout/compare/v1.4.1...v1.4.2) — 2026-06-16
9
23
 
10
24
  ### Added
@@ -161,6 +161,13 @@ declare const CheckoutWidget: default_2.FC<CheckoutWidgetProps>;
161
161
  export { CheckoutWidget }
162
162
  export default CheckoutWidget;
163
163
 
164
+ /** Imperative hooks for host pages (e.g. Shopify pre-checkout shell). */
165
+ declare interface CheckoutWidgetController {
166
+ /** Navigate one step back within the widget. Returns true if handled. */
167
+ goBack: () => boolean;
168
+ getStep: () => string;
169
+ }
170
+
164
171
  export declare interface CheckoutWidgetProps {
165
172
  /**
166
173
  * Your QuantaRoute API key.
@@ -293,6 +300,11 @@ export declare interface CheckoutWidgetProps {
293
300
  prepaidNudgeCopy?: string;
294
301
  /** Override merchant prepaid nudge CTA URL. */
295
302
  prepaidNudgeCtaUrl?: string;
303
+ /**
304
+ * Called once on mount with imperative navigation helpers for host shells
305
+ * (step-aware back button, etc.).
306
+ */
307
+ registerController?: (controller: CheckoutWidgetController) => void;
296
308
  }
297
309
 
298
310
  /**
@@ -356,6 +368,8 @@ export declare interface CompleteAddress {
356
368
  formattedAddress: string;
357
369
  /** Buyer-chosen label for saved-address book (defaults to home) */
358
370
  label?: AddressLabel;
371
+ /** Set when the buyer re-selected an existing saved row (skip createAddress). */
372
+ addressId?: string;
359
373
  }
360
374
 
361
375
  export declare interface Coordinates {
@@ -437,6 +451,9 @@ export declare function fetchPrepaidNudgeConfig(functionBaseUrl: string, adminAp
437
451
  /** Fetch UTM-matched offer banner for the current session. */
438
452
  export declare function fetchSessionOffer(config: CheckoutApiConfig, sessionToken: string): Promise<SessionOffer | null>;
439
453
 
454
+ /** Canonical display format: XXX-XXX-XXXX */
455
+ export declare function formatDigiPin(input: string): string;
456
+
440
457
  export declare interface FunnelEventPayload {
441
458
  event_type: string;
442
459
  step?: string;
@@ -468,6 +485,9 @@ export declare function getWebDeviceContext(): DeviceContext;
468
485
  /** True when at least one UTM field is set. */
469
486
  export declare function hasUtmParams(utm: UtmParams): boolean;
470
487
 
488
+ /** True when input is a complete 10-character DigiPin (any common separator style). */
489
+ export declare function isCompleteDigiPinInput(input: string): boolean;
490
+
471
491
  /**
472
492
  * Validate a DigiPin string (format + character check).
473
493
  */
@@ -559,6 +579,12 @@ export declare interface MapPinSelectorProps {
559
579
  brandColor?: string;
560
580
  }
561
581
 
582
+ /**
583
+ * Normalise user input to a 10-character DigiPin body (no separators).
584
+ * Accepts dashed, spaced, or compact forms — e.g. `4P3-J68-637F`, `4P3 J68 637F`, `4P3J68637F`.
585
+ */
586
+ export declare function normalizeDigiPinInput(input: string): string;
587
+
562
588
  /**
563
589
  * Notify the server that the buyer has confirmed their delivery address.
564
590
  * Triggers `session.address_completed` webhook on the merchant's configured URL.