@liquidcommerce/elements-sdk 2.7.34 → 2.7.35

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.
@@ -30,6 +30,7 @@ export interface ICheckoutPaymentFormStore {
30
30
  isSaving: boolean;
31
31
  }
32
32
  export interface ICheckoutStore {
33
+ initialized: boolean;
33
34
  token: string;
34
35
  cartId: string;
35
36
  presale: ICheckoutPresale | null;
@@ -6,6 +6,11 @@ import type { AddItemParams } from '@/modules/cart/cart.commands';
6
6
  import type { PresaleExpiredReason } from '@/modules/checkout/components';
7
7
  export declare class CheckoutCommands extends BaseCommand {
8
8
  private readonly uiCommands;
9
+ private lastLoadParams;
10
+ private paymentGeneration;
11
+ private confirmedPayment;
12
+ assertPaymentReady(): void;
13
+ retryLoadCheckout(): Promise<void>;
9
14
  constructor();
10
15
  static getInstance(): CheckoutCommands;
11
16
  addPresaleItem(params: AddItemParams): Promise<void>;
@@ -14,6 +19,7 @@ export declare class CheckoutCommands extends BaseCommand {
14
19
  cartId?: string;
15
20
  isForPresale?: boolean;
16
21
  }): Promise<void>;
22
+ private showAlreadyCompletedCheckout;
17
23
  loadCheckoutFromResponse(response: ICheckoutPrepare): void;
18
24
  toggleIsGift(active?: boolean): Promise<void>;
19
25
  toggleBillingSameAsShipping(active?: boolean): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { BaseComponent } from '@/core/base-component.service';
1
+ import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
2
  import type { ICheckoutComponent } from '@/interfaces/configs';
3
3
  export interface ICheckoutComponentParams {
4
4
  checkoutId: string;
@@ -7,6 +7,9 @@ export interface ICheckoutComponentParams {
7
7
  }
8
8
  export declare class CheckoutComponent extends BaseComponent<ICheckoutComponentParams, ICheckoutComponent> {
9
9
  constructor();
10
+ onStoreWatch(_changes: IOnStoreChanged[]): void;
11
+ private updateInitializationState;
12
+ afterRender(): void;
10
13
  protected template(): HTMLElement[];
11
14
  private createHeader;
12
15
  }
@@ -26,12 +26,14 @@ export interface IStripeFormStatus {
26
26
  }
27
27
  export declare class CheckoutStripeFormComponent extends SafeHTMLElement {
28
28
  private _initialized;
29
+ private _lifecycleGeneration;
29
30
  private _stripe;
30
31
  private _stripeElements;
31
32
  private _paymentElement;
32
33
  private _isProcessing;
33
34
  private _isFormComplete;
34
35
  private _hasUsedCurrentSession;
36
+ private _pendingConfirmation;
35
37
  private _stripeConfig;
36
38
  private _sessionRefreshPromise;
37
39
  initialize({ data }: {
@@ -45,7 +47,6 @@ export declare class CheckoutStripeFormComponent extends SafeHTMLElement {
45
47
  private handleSubmit;
46
48
  private requestSessionRefresh;
47
49
  private refreshPaymentSession;
48
- private resetForm;
49
50
  private updateStripeFormStatus;
50
51
  private createConfirmationTokenId;
51
52
  disconnected(): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { SDKError } from '@/core/sdk-error-handler';
2
+ export declare class PaymentSessionRefreshError extends SDKError {
3
+ constructor(message: string);
4
+ }
@@ -206,3 +206,9 @@ for (const region of document.querySelectorAll('[data-lce-live-region]')) {
206
206
  - [Theming Guide](./theming.md) — the colour tokens to check for contrast
207
207
  - [Best Practices](./best-practices.md)
208
208
  - [Browser Support](../reference/browser-support.md)
209
+
210
+ ## Checkout initialization and payment recovery
211
+
212
+ Checkout announces loading or initialization failure in a status region. If initialization fails, payment fields are withheld and a keyboard-operable **Retry checkout** button retries the same checkout. The button is disabled while loading.
213
+
214
+ Save Payment Information remains disabled until checkout initializes. During payment save it stays busy until the server responds. Recoverable billing/prepare errors are announced while the mounted card fields and billing input remain available for correction and retry.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "LiquidCommerce Elements SDK",
4
4
  "license": "UNLICENSED",
5
5
  "author": "LiquidCommerce Team",
6
- "version": "2.7.34",
6
+ "version": "2.7.35",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",
@@ -64,7 +64,9 @@
64
64
  "clean": "rm -rf dist umd node_modules && pnpm install && pnpm build:all",
65
65
  "prepublishOnly": "pnpm run build",
66
66
  "deprecate:old": "npm deprecate @liquidcommerceteam/elements-sdk@\"*\" \"Package moved to @liquidcommerce/elements-sdk\"",
67
- "prepare": "husky"
67
+ "prepare": "husky",
68
+ "test": "vitest run",
69
+ "test:browser": "playwright test"
68
70
  },
69
71
  "keywords": [
70
72
  "liquidcommerce",
@@ -110,6 +112,7 @@
110
112
  "@biomejs/biome": "^2.5.11",
111
113
  "@commitlint/cli": "^21.2.2",
112
114
  "@commitlint/config-conventional": "^21.2.2",
115
+ "@playwright/test": "1.60.0",
113
116
  "@rollup/plugin-alias": "^6.0.0",
114
117
  "@rollup/plugin-commonjs": "^29.0.3",
115
118
  "@rollup/plugin-json": "^6.1.0",
@@ -126,13 +129,15 @@
126
129
  "@types/node": "^26.4.0",
127
130
  "conventional-changelog": "8.1.3",
128
131
  "husky": "^9.1.7",
132
+ "jsdom": "26.1.0",
129
133
  "process": "^0.11.10",
130
134
  "rollup": "^4.63.1",
131
135
  "rollup-obfuscator": "^4.1.1",
132
136
  "rollup-plugin-typescript2": "^0.37.0",
133
137
  "semantic-release": "^25.0.9",
134
138
  "ts-node": "^10.9.2",
135
- "typescript": "6.0.3"
139
+ "typescript": "6.0.3",
140
+ "vitest": "2.1.9"
136
141
  },
137
142
  "engines": {
138
143
  "node": ">=22"