@liquidcommerce/elements-sdk 2.6.0-beta.86 → 2.6.0-beta.88

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.
@@ -7,4 +7,9 @@ export interface IPrepareApiProductForStoreParams {
7
7
  retailers: IProductAvailabilityResponse['retailers'];
8
8
  enableShippingFulfillment: boolean;
9
9
  }
10
+ export declare function buildSizeLabel(size: {
11
+ size: string;
12
+ pack: boolean;
13
+ packDesc: string;
14
+ }): string;
10
15
  export declare function prepareApiProductForStore({ context, product, retailers, enableShippingFulfillment, }: IPrepareApiProductForStoreParams): IProductStore | IPLProductStore;
@@ -165,10 +165,18 @@ Use the `lce_size` query parameter to preselect a size when the product page loa
165
165
  https://yoursite.com/products/buffalo-trace?lce_size=750ml
166
166
  ```
167
167
 
168
- - The value is matched against each size's display value (e.g. `750ml`).
169
- - Matching is case-insensitive and ignores whitespace, so `750 ML`, `750ml`, and `750ML` all select a `750ml` size.
168
+ - The value is compared against each size's full label as shown on the page.
169
+ - Matching is case-insensitive and ignores spacing and punctuation — only letters, digits, and decimal points are compared — so `750 ML`, `750ml`, and `750ML` all select a `750ml` size, while decimals are kept so `1.0L` and `1.75L` stay distinct.
170
170
  - If the value matches no size, the default size selection is used.
171
171
 
172
+ **Pack sizes:** the label includes the pack description when present (e.g. `50 ML (12PK)`). To select that size, include the pack in the value:
173
+
174
+ ```
175
+ https://yoursite.com/products/mini-bottles?lce_size=50ml(12pk)
176
+ ```
177
+
178
+ Both `50ml(12pk)` and `50ml12pk` match `50 ML (12PK)` (punctuation is ignored). A value of just `50ml` only matches a size whose label is `50 ML` with no pack.
179
+
172
180
  `lce_size` is a fixed parameter name (not configured through a script attribute) and only applies to the product page.
173
181
 
174
182
  ### Fulfillment Types
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.6.0-beta.86",
6
+ "version": "2.6.0-beta.88",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",
@@ -53,6 +53,7 @@
53
53
  "build": "rollup -c",
54
54
  "build:checkout": "rollup -c rollup.config.checkout.mjs",
55
55
  "build:all": "pnpm build && pnpm build:checkout",
56
+ "build:demo-site": "pnpm build:all && mkdir -p demo-site/sdk && cp umd/elements.js umd/elements-checkout.js demo-site/sdk/",
56
57
  "dev": "rollup -c -w",
57
58
  "type-check": "tsc --noEmit",
58
59
  "lint": "pnpm biome lint --write",