@liquidcommerce/elements-sdk 2.6.0-beta.13 → 2.6.0-beta.130

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.
Files changed (304) hide show
  1. package/README.md +102 -2518
  2. package/dist/index.checkout.esm.js +22267 -0
  3. package/dist/index.esm.js +30400 -20620
  4. package/dist/ssr-stub.checkout.esm.js +17 -0
  5. package/dist/ssr-stub.esm.js +281 -0
  6. package/dist/types/auto-initialize/checkout.d.ts +2 -0
  7. package/dist/types/auto-initialize/shared-utils.d.ts +51 -0
  8. package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +16 -2
  9. package/dist/types/clients/builder.d.ts +3 -0
  10. package/dist/types/clients/checkout.d.ts +6 -0
  11. package/dist/types/clients/helpers.d.ts +8 -0
  12. package/dist/types/clients/main.d.ts +3 -0
  13. package/dist/types/constants/core.constant.d.ts +13 -18
  14. package/dist/types/constants/index.d.ts +1 -0
  15. package/dist/types/constants/prop65.constant.d.ts +8 -0
  16. package/dist/types/core/a11y/announcer.service.d.ts +16 -0
  17. package/dist/types/core/a11y/focus-manager.service.d.ts +21 -0
  18. package/dist/types/core/a11y/focusable.d.ts +5 -0
  19. package/dist/types/core/a11y/glyph-button.d.ts +8 -0
  20. package/dist/types/core/a11y/index.d.ts +6 -0
  21. package/dist/types/core/a11y/required.d.ts +1 -0
  22. package/dist/types/core/a11y/single-select.d.ts +20 -0
  23. package/dist/types/core/api/api-client.service.d.ts +23 -18
  24. package/dist/types/core/api/api-result.d.ts +19 -0
  25. package/dist/types/core/api/auth-client.service.d.ts +37 -13
  26. package/dist/types/core/api/http-client.service.d.ts +0 -8
  27. package/dist/types/core/base-component.service.d.ts +4 -1
  28. package/dist/types/core/client/actions/base-action.service.d.ts +22 -0
  29. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  30. package/dist/types/core/client/actions/client-analytics-action.service.d.ts +35 -0
  31. package/dist/types/core/client/actions/client-cart-action.service.d.ts +38 -0
  32. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +81 -0
  33. package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
  34. package/dist/types/core/client/client-action.service.d.ts +7 -74
  35. package/dist/types/core/client/client-config.service.d.ts +12 -5
  36. package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -1
  37. package/dist/types/core/google-tag-manager.service.d.ts +13 -3
  38. package/dist/types/core/logger/logger.service.d.ts +1 -1
  39. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -0
  40. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +6 -1
  41. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +54 -48
  42. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +18 -7
  43. package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
  44. package/dist/types/core/singleton-manager.service.d.ts +12 -8
  45. package/dist/types/core/store/interfaces/cart.interface.d.ts +2 -3
  46. package/dist/types/core/store/interfaces/checkout.interface.d.ts +39 -107
  47. package/dist/types/core/store/interfaces/core.interface.d.ts +12 -2
  48. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  49. package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
  50. package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
  51. package/dist/types/core/store/store.constant.d.ts +5 -0
  52. package/dist/types/core/store/store.service.d.ts +1 -0
  53. package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
  54. package/dist/types/enums/core.enum.d.ts +51 -2
  55. package/dist/types/enums/index.d.ts +0 -1
  56. package/dist/types/index.checkout.d.ts +11 -0
  57. package/dist/types/index.checkout.umd.d.ts +4 -0
  58. package/dist/types/index.d.ts +9 -3
  59. package/dist/types/interfaces/analytics.interface.d.ts +41 -0
  60. package/dist/types/interfaces/api/cart.interface.d.ts +12 -7
  61. package/dist/types/interfaces/api/checkout.interface.d.ts +275 -0
  62. package/dist/types/interfaces/api/delivery.interface.d.ts +24 -0
  63. package/dist/types/interfaces/api/index.d.ts +6 -0
  64. package/dist/types/interfaces/api/product-list.interface.d.ts +15 -6
  65. package/dist/types/interfaces/api/product.interface.d.ts +10 -4
  66. package/dist/types/interfaces/client.interface.d.ts +79 -0
  67. package/dist/types/interfaces/component.interface.d.ts +7 -0
  68. package/dist/types/interfaces/config.interface.d.ts +45 -0
  69. package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
  70. package/dist/types/interfaces/configs/cart.interface.d.ts +2 -1
  71. package/dist/types/interfaces/configs/checkout.interface.d.ts +3 -1
  72. package/dist/types/interfaces/configs/global.interface.d.ts +9 -3
  73. package/dist/types/interfaces/configs/index.d.ts +1 -0
  74. package/dist/types/interfaces/configs/product-list.interface.d.ts +49 -0
  75. package/dist/types/interfaces/configs/product.interface.d.ts +7 -1
  76. package/dist/types/interfaces/injection.interface.d.ts +56 -0
  77. package/dist/types/modules/address/address-display.component.d.ts +3 -1
  78. package/dist/types/modules/address/address-input.component.d.ts +11 -1
  79. package/dist/types/modules/address/address.command.d.ts +3 -2
  80. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  81. package/dist/types/modules/cart/cart.commands.d.ts +11 -5
  82. package/dist/types/modules/cart/components/cart-body.component.d.ts +1 -0
  83. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +1 -1
  84. package/dist/types/modules/cart/components/cart-item-quantity-price.component.d.ts +5 -0
  85. package/dist/types/modules/cart/components/cart-item.component.d.ts +6 -0
  86. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  87. package/dist/types/modules/checkout/checkout.commands.d.ts +128 -12
  88. package/dist/types/modules/checkout/checkout.component.d.ts +7 -1
  89. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +5 -2
  90. package/dist/types/modules/checkout/components/checkout-buyer.component.d.ts +1 -0
  91. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +7 -0
  92. package/dist/types/modules/checkout/components/checkout-deliver-to.component.d.ts +1 -0
  93. package/dist/types/modules/checkout/components/checkout-delivery-method.component.d.ts +22 -0
  94. package/dist/types/modules/checkout/components/checkout-delivery-scheduling.component.d.ts +51 -0
  95. package/dist/types/modules/checkout/components/checkout-express-checkout.component.d.ts +63 -0
  96. package/dist/types/modules/checkout/components/checkout-express-completion.component.d.ts +21 -0
  97. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  98. package/dist/types/modules/checkout/components/checkout-item-quantity.component.d.ts +4 -0
  99. package/dist/types/modules/checkout/components/checkout-item.component.d.ts +2 -0
  100. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  101. package/dist/types/modules/checkout/components/checkout-order-summary.component.d.ts +3 -0
  102. package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +8 -1
  103. package/dist/types/modules/checkout/components/checkout-place-order-button.component.d.ts +1 -5
  104. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +15 -1
  105. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  106. package/dist/types/modules/checkout/components/checkout-prop65-warning.component.d.ts +8 -0
  107. package/dist/types/modules/checkout/components/checkout-send-as-gift.component.d.ts +3 -0
  108. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +7 -3
  109. package/dist/types/modules/checkout/components/checkout-stripe-handler.component.d.ts +4 -0
  110. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +4 -2
  111. package/dist/types/modules/checkout/components/index.d.ts +5 -0
  112. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  113. package/dist/types/modules/checkout/components/required-fields-legend.d.ts +1 -0
  114. package/dist/types/modules/checkout/constant.d.ts +15 -0
  115. package/dist/types/modules/checkout/customer-prefill.d.ts +5 -0
  116. package/dist/types/modules/checkout/express-wallet.d.ts +12 -0
  117. package/dist/types/modules/checkout/payment-session-error.d.ts +4 -0
  118. package/dist/types/modules/checkout/stripe-js.d.ts +2 -0
  119. package/dist/types/modules/checkout/styles/delivery-method.style.d.ts +1 -0
  120. package/dist/types/modules/checkout/styles/express-checkout.style.d.ts +1 -0
  121. package/dist/types/modules/checkout/styles/express-completion.style.d.ts +1 -0
  122. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  123. package/dist/types/modules/product/components/components.d.ts +26 -2
  124. package/dist/types/modules/product/components/index.d.ts +1 -0
  125. package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +8 -1
  126. package/dist/types/modules/product/components/product-delivery-estimate.component.d.ts +11 -0
  127. package/dist/types/modules/product/components/product-description.component.d.ts +1 -0
  128. package/dist/types/modules/product/components/product-drawer.component.d.ts +6 -0
  129. package/dist/types/modules/product/components/product-image-carousel.component.d.ts +5 -0
  130. package/dist/types/modules/product/components/product-options.component.d.ts +2 -1
  131. package/dist/types/modules/product/components/product-prop65-warning.d.ts +1 -0
  132. package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +6 -0
  133. package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +12 -2
  134. package/dist/types/modules/product/components/product-retailers-popup.component.d.ts +1 -0
  135. package/dist/types/modules/product/components/product-retailers.component.d.ts +1 -0
  136. package/dist/types/modules/product/product.commands.d.ts +5 -5
  137. package/dist/types/modules/product/product.component.d.ts +3 -0
  138. package/dist/types/modules/product/styles/prop65-warning.style.d.ts +1 -0
  139. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  140. package/dist/types/modules/product-list/components/card-components/index.d.ts +6 -0
  141. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
  142. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  143. package/dist/types/modules/product-list/components/card-components/product-fulfillment-text.d.ts +2 -0
  144. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +14 -0
  145. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +11 -0
  146. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +14 -0
  147. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  148. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  149. package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts → filter-components/product-list-checkbox-filter.d.ts} +1 -0
  150. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  151. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  152. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +15 -0
  153. package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-price-filter.components.d.ts → filter-components/product-list-price-filter.d.ts} +2 -1
  154. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
  155. package/dist/types/modules/product-list/components/index.d.ts +6 -2
  156. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +3 -1
  157. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +39 -31
  158. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
  159. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +58 -36
  160. package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
  161. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +54 -0
  162. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +25 -0
  163. package/dist/types/modules/product-list/product-list-filter.registry.d.ts +42 -0
  164. package/dist/types/modules/product-list/product-list-filter.utils.d.ts +7 -0
  165. package/dist/types/modules/product-list/product-list-order.utils.d.ts +3 -0
  166. package/dist/types/modules/product-list/product-list-query-params.utils.d.ts +3 -0
  167. package/dist/types/modules/product-list/product-list.commands.d.ts +27 -7
  168. package/dist/types/modules/product-list/product-list.component.d.ts +23 -47
  169. package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
  170. package/dist/types/modules/product-list/product-list.interface.d.ts +17 -28
  171. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  172. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  173. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  174. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  175. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  176. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  177. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  178. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  179. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
  180. package/dist/types/modules/ui-components/alert/alert.component.d.ts +10 -10
  181. package/dist/types/modules/ui-components/buttons/buttons-open-cart.component.d.ts +5 -0
  182. package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +15 -0
  183. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +9 -1
  184. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +7 -1
  185. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  186. package/dist/types/modules/ui-components/input/input.component.d.ts +15 -2
  187. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  188. package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
  189. package/dist/types/modules/ui-components/ui.commands.d.ts +7 -1
  190. package/dist/types/ssr/stub.checkout.d.ts +8 -0
  191. package/dist/types/ssr/stub.d.ts +12 -0
  192. package/dist/types/static/icon/arrow-right.icon.d.ts +1 -1
  193. package/dist/types/static/icon/bag.icon.d.ts +1 -1
  194. package/dist/types/static/icon/check.icon.d.ts +2 -0
  195. package/dist/types/static/icon/checkbox.icon.d.ts +1 -1
  196. package/dist/types/static/icon/chevron-down.icon.d.ts +1 -1
  197. package/dist/types/static/icon/chevron-left.icon.d.ts +1 -1
  198. package/dist/types/static/icon/chevron-up.icon.d.ts +1 -1
  199. package/dist/types/static/icon/close.icon.d.ts +1 -1
  200. package/dist/types/static/icon/error-info.icon.d.ts +1 -1
  201. package/dist/types/static/icon/filter.icon.d.ts +1 -1
  202. package/dist/types/static/icon/icon.a11y.d.ts +1 -0
  203. package/dist/types/static/icon/icon.types.d.ts +1 -0
  204. package/dist/types/static/icon/index.d.ts +2 -0
  205. package/dist/types/static/icon/info.icon.d.ts +1 -1
  206. package/dist/types/static/icon/loading-spinner.icon.d.ts +1 -1
  207. package/dist/types/static/icon/search.icon.d.ts +1 -1
  208. package/dist/types/static/icon/success.icon.d.ts +1 -1
  209. package/dist/types/static/icon/trash.icon.d.ts +1 -1
  210. package/dist/types/static/icon/warning.icon.d.ts +1 -1
  211. package/dist/types/utils/delivery-scheduling.d.ts +43 -0
  212. package/dist/types/utils/dom-compat.d.ts +2 -0
  213. package/dist/types/utils/format.d.ts +9 -14
  214. package/dist/types/utils/image-bg-removal.d.ts +3 -0
  215. package/dist/types/utils/places-session-token.d.ts +1 -0
  216. package/dist/types/utils/product-selection.d.ts +16 -0
  217. package/dist/types/utils/product.d.ts +21 -0
  218. package/dist/types/utils/timezone.d.ts +6 -0
  219. package/docs/v1/README.md +214 -0
  220. package/docs/v1/api/actions/address-actions.md +290 -0
  221. package/docs/v1/api/actions/analytics-actions.md +326 -0
  222. package/docs/v1/api/actions/cart-actions.md +364 -0
  223. package/docs/v1/api/actions/checkout-actions.md +629 -0
  224. package/docs/v1/api/actions/product-actions.md +204 -0
  225. package/docs/v1/api/client.md +671 -0
  226. package/docs/v1/api/configuration.md +587 -0
  227. package/docs/v1/api/injection-methods.md +331 -0
  228. package/docs/v1/api/typescript-types.md +610 -0
  229. package/docs/v1/api/ui-helpers.md +200 -0
  230. package/docs/v1/examples/advanced-patterns.md +199 -0
  231. package/docs/v1/examples/checkout-flow.md +90 -0
  232. package/docs/v1/examples/custom-theming.md +76 -0
  233. package/docs/v1/examples/multi-product-page.md +90 -0
  234. package/docs/v1/examples/simple-product-page.md +89 -0
  235. package/docs/v1/getting-started/concepts.md +521 -0
  236. package/docs/v1/getting-started/installation.md +351 -0
  237. package/docs/v1/getting-started/quick-start.md +410 -0
  238. package/docs/v1/guides/accessibility.md +295 -0
  239. package/docs/v1/guides/address-component.md +441 -0
  240. package/docs/v1/guides/best-practices.md +365 -0
  241. package/docs/v1/guides/cart-component.md +800 -0
  242. package/docs/v1/guides/checkout-component.md +916 -0
  243. package/docs/v1/guides/events.md +1061 -0
  244. package/docs/v1/guides/product-component.md +761 -0
  245. package/docs/v1/guides/product-list-component.md +730 -0
  246. package/docs/v1/guides/theming.md +243 -0
  247. package/docs/v1/integration/angular.md +39 -0
  248. package/docs/v1/integration/laravel.md +41 -0
  249. package/docs/v1/integration/nextjs.md +69 -0
  250. package/docs/v1/integration/proxy-setup.md +106 -0
  251. package/docs/v1/integration/react.md +64 -0
  252. package/docs/v1/integration/vanilla-js.md +84 -0
  253. package/docs/v1/integration/vue.md +58 -0
  254. package/docs/v1/reference/analytics.md +176 -0
  255. package/docs/v1/reference/browser-support.md +47 -0
  256. package/docs/v1/reference/error-handling.md +83 -0
  257. package/docs/v1/reference/performance.md +52 -0
  258. package/docs/v1/reference/telemetry.md +85 -0
  259. package/docs/v1/reference/troubleshooting.md +135 -0
  260. package/package.json +75 -45
  261. package/dist/types/elements-builder-client.d.ts +0 -2
  262. package/dist/types/elements-client-helper.d.ts +0 -4
  263. package/dist/types/elements-client.d.ts +0 -2
  264. package/dist/types/enums/cloud.enum.d.ts +0 -97
  265. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -218
  266. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  267. package/dist/types/interfaces/cloud/index.d.ts +0 -3
  268. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  269. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  270. package/dist/types/interfaces/core.interface.d.ts +0 -111
  271. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  272. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  273. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  274. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  275. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
  276. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
  277. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  278. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  279. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  280. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  281. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  282. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  283. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  284. package/dist/types/utils/helper.d.ts +0 -28
  285. package/docs/ACTIONS.md +0 -1300
  286. package/docs/BROWSER_SUPPORT.md +0 -279
  287. package/docs/CONFIGURATION.md +0 -853
  288. package/docs/DOCUMENTATION_INDEX.md +0 -311
  289. package/docs/EVENTS.md +0 -798
  290. package/docs/PROXY.md +0 -228
  291. package/docs/THEMING.md +0 -592
  292. package/docs/TROUBLESHOOTING.md +0 -793
  293. package/umd/elements.js +0 -1
  294. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  295. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  296. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  297. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  298. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  299. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  300. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  301. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  302. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  303. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  304. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
@@ -0,0 +1,176 @@
1
+ # Analytics & Google Tag Manager
2
+
3
+ The SDK ships with a built-in Google Tag Manager (GTM) / Google Analytics 4 (GA4) integration. It automatically pushes GA4 ecommerce events for the interactions your shoppers perform in Elements components — product views, cart changes, checkout steps, purchases, and more.
4
+
5
+ This runs entirely inside the SDK. In most cases you do not need to configure or code anything.
6
+
7
+ ## What You Need To Do
8
+
9
+ **Typically nothing.** The integration is automatic in production and staging. The SDK receives its GTM container configuration from the LiquidCommerce platform (per partner) and initializes itself after the DOM is ready.
10
+
11
+ It coexists with a host site's own GTM — see [Coexisting With Your Own GTM](#coexisting-with-your-own-gtm) below.
12
+
13
+ The one case that needs code: if **your own UI** renders a step Elements would otherwise render — a
14
+ product page, an address picker, a cart, or a "Proceed to checkout" in front of the checkout-only
15
+ client — Elements never sees it. Report it with `actions.analytics` — see
16
+ [Reporting Steps Your Own UI Renders](#reporting-steps-your-own-ui-renders).
17
+
18
+ ## Supported Environments
19
+
20
+ GTM initialization and every event push are enabled in production and staging. When the SDK is running in Builder mode, no container is loaded and no events are sent.
21
+
22
+ Events are suppressed when any of the following is true:
23
+
24
+ - `window` is undefined (server-side rendering).
25
+ - The SDK is running in Builder mode.
26
+
27
+ The environment defaults to `production` when none is provided, so a standard production embed is analytics-enabled out of the box; a staging embed is also analytics-enabled when server GTM config is enabled for the partner.
28
+
29
+ ## How It Works
30
+
31
+ ### Container injection
32
+
33
+ When enabled, the SDK injects the GTM container script:
34
+
35
+ ```
36
+ https://www.googletagmanager.com/gtm.js?id=<containerId>
37
+ ```
38
+
39
+ The script is appended to `<head>` with `async` and `crossorigin="anonymous"`, and the SDK waits for GTM to initialize before flushing events.
40
+
41
+ ### dataLayer and gtag
42
+
43
+ The SDK initializes the standard GTM globals **without clobbering an existing setup**:
44
+
45
+ - `window.dataLayer` is created only if it does not already exist.
46
+ - `window.gtag` is defined only if it is not already present.
47
+
48
+ Events are delivered using Google's recommended `window.dataLayer.push()` pattern.
49
+
50
+ ### Event queueing
51
+
52
+ Events fired before GTM finishes initializing are queued (up to 100, oldest dropped first) and flushed once the container is ready. Queued events older than 30 seconds at flush time are discarded.
53
+
54
+ ## Coexisting With Your Own GTM
55
+
56
+ The SDK detects an already-present partner/host GTM container rather than replacing it. When a host GTM install (an existing `gtag` function, an existing `googletagmanager.com/gtm.js` script tag, or a script served from your configured Google tag gateway) is detected, the SDK integrates with it. A container that has booted is also recognized through GTM's own `window.google_tag_manager[containerId]` registry, whichever host served it.
57
+
58
+ ### Google tag gateway
59
+
60
+ [Google tag gateway for advertisers](https://developers.google.com/tag-platform/tag-manager/gateway/get-started) serves your Google tags from your own domain instead of Google's. Your GTM container loads from a first-party path such as `https://www.yoursite.com/metrics/` instead of `https://www.googletagmanager.com/gtm.js?id=GTM-XXXX`, and its measurement requests (e.g. GA4 `/g/collect` hits) go out through that same path. Your CDN or load balancer forwards them to Google, so they are less likely to be blocked than requests to Google's domains.
61
+
62
+ #### How the SDK works with it
63
+
64
+ - The SDK pushes every event to the page's `window.dataLayer`. Your container reads that same `dataLayer`, so it receives SDK events whether it loads from Google or from your gateway. Keep the default `dataLayer` name: a container renamed with `&l=` never sees them.
65
+ - The SDK never loads your container and proxies nothing. The LiquidCommerce container still loads from `googletagmanager.com`.
66
+ - To send SDK events to your own GA4 property, add a Custom Event trigger in your container on the [event names](#events) below and a GA4 Event tag that fires on it. The SDK puts `items`, `value` and `currency` at the top level of each event, not inside an `ecommerce` object, so map them with Data Layer Variables rather than the GA4 tag's "Send Ecommerce data" option.
67
+
68
+ #### `gatewayUrl`
69
+
70
+ Tell the SDK your gateway path so it can recognize your container:
71
+
72
+ ```javascript
73
+ const client = await Elements('YOUR_API_KEY', {
74
+ gtm: { gatewayUrl: 'https://www.yoursite.com/metrics/' }, // or '/metrics/'
75
+ });
76
+ ```
77
+
78
+ Or declaratively, on the script tag: `data-gtm-gateway-url="/metrics/"`.
79
+
80
+ A gateway script URL usually carries no container ID, so until GTM has booted your container this setting is the only way the SDK can match the script tag to it. Once matched, your container ID is added to each event's `send_to` targets. The setting is optional: events reach your container through `dataLayer` without it.
81
+
82
+ A script with the same origin whose path starts with that value is matched to your partner container by container ID: an `id=` query parameter must equal your partner container ID, and a script without one counts only once GTM's `window.google_tag_manager` registry lists your container ID (or while no container has booted yet). A gateway serving a different container or a GA4/Ads tag is therefore never taken for yours. Relative values resolve against the current page.
83
+
84
+ When both the LiquidCommerce container and a partner container are initialized, events are sent to both using GA4's `send_to` targeting (a dual-container send). Only containers that are actually initialized are added to `send_to`, so events are never routed to a container that failed to load.
85
+
86
+ If the LiquidCommerce container can't be loaded, the SDK falls back — in order — to the partner container, any initialized GTM container on the page, or the basic `dataLayer` — so event tracking degrades gracefully instead of failing.
87
+
88
+ ## Source Tracking (`tenant_*`)
89
+
90
+ Every event automatically carries source-tracking fields identifying the tenant and the SDK build:
91
+
92
+ | Field | Value |
93
+ | --- | --- |
94
+ | `tenant_name` | Partner name |
95
+ | `tenant_code` | Partner code |
96
+ | `tenant_env` | SDK environment |
97
+ | `tenant_source` | SDK package description and version |
98
+
99
+ ## Events
100
+
101
+ All events are GA4-shaped and follow the standard ecommerce schema (`items[]`, `value`, `currency` — the SDK uses `USD`, `coupon`, etc.). `search` is the exception: it carries only `search_term`.
102
+
103
+ ### Standard GA4 ecommerce events
104
+
105
+ | Event | Fired when |
106
+ | --- | --- |
107
+ | `view_item` | A shopper views a product, and again on each size they switch to |
108
+ | `view_item_list` | A product list loads products: its first load, a filtered or searched list, each "load more" |
109
+ | `select_item` | A shopper opens a product from a product list card |
110
+ | `add_to_cart` | A shopper adds an item: from the product component or a list card, `actions.cart.addProduct()` / `actions.checkout.addProduct()`, a cart or checkout quantity increase, or a presale added straight to checkout |
111
+ | `view_cart` | The cart drawer opens with items in it — the cart button, `openCart()` / `toggleCart()`, the checkout's back button — or an add that opens it lands |
112
+ | `remove_from_cart` | A shopper lowers an item's quantity or removes it, in the cart or in the checkout |
113
+ | `begin_checkout` | A shopper begins checkout: the cart's Checkout button (also before its redirect to `checkout.pageUrl`), `actions.checkout.addProduct()`, `openCheckout()` / `toggleCheckout()` opening the drawer, a presale added straight to checkout, or the first wallet tap on express buttons placed on their own |
114
+ | `add_shipping_info` | Shipping info is added during checkout: the customer or gift recipient form is saved, or a wallet (Apple Pay / Google Pay) order hands over the wallet's contact details |
115
+ | `add_payment_info` | Payment info is added during checkout |
116
+ | `purchase` | A purchase completes |
117
+ | `search` | A search typed into the product list's search box runs |
118
+
119
+ ### Custom events
120
+
121
+ | Event | Fired when |
122
+ | --- | --- |
123
+ | `promo_code_attempt` | A promo code is submitted |
124
+ | `promo_code_applied` | A promo code is successfully applied |
125
+ | `promo_code_failed` | A promo code fails to apply |
126
+ | `gift_card_attempt` | A gift card is submitted |
127
+ | `gift_card_applied` | A gift card is successfully applied |
128
+ | `gift_card_failed` | A gift card fails to apply |
129
+ | `address_updated` | An address is successfully updated |
130
+ | `address_failed` | An address operation fails |
131
+ | `product_no_availability` | A product has no availability for any size/fulfillment |
132
+ | `product_size_no_availability` | A selected size has no availability |
133
+ | `product_fulfillment_no_availability` | A selected fulfillment type has no availability |
134
+
135
+ ## Reporting Steps Your Own UI Renders
136
+
137
+ Elements reports the steps its components render. A host that renders some steps itself reports
138
+ them through `actions.analytics`, on the full client and on the checkout-only client:
139
+
140
+ | Action | Event |
141
+ | --- | --- |
142
+ | `search(searchTerm)` | `search` |
143
+ | `viewItem(item)` | `view_item` |
144
+ | `viewItemList(items, list?)` | `view_item_list` |
145
+ | `selectItem(item, list?)` | `select_item` |
146
+ | `addToCart(item)` | `add_to_cart` |
147
+ | `removeFromCart(item)` | `remove_from_cart` |
148
+ | `viewCart(items)` | `view_cart` |
149
+ | `beginCheckout(items, { coupon? })` | `begin_checkout` |
150
+ | `addressUpdated(address)` | `address_updated` |
151
+ | `addressFailed(failure)` | `address_failed` |
152
+ | `productNoAvailability(details)` | `product_no_availability` |
153
+ | `productSizeNoAvailability(details)` | `product_size_no_availability` |
154
+ | `productFulfillmentNoAvailability(details)` | `product_fulfillment_no_availability` |
155
+
156
+ They go through the same pipeline as the SDK's own events — same shape, `tenant_*` fields,
157
+ `send_to` targets, environment gating and queueing — so a report built on Elements events covers
158
+ both. There are no actions for `add_shipping_info`, `add_payment_info`, `purchase` or the promo code
159
+ and gift card events: the Elements checkout reports those itself, and a host reporting them too
160
+ would count every order twice. For the same reason, don't report a step an Elements component
161
+ renders — including `begin_checkout`, which Elements reports from the cart's Checkout button,
162
+ `actions.checkout.addProduct()`, `openCheckout()` / `toggleCheckout()`, a presale, and the first
163
+ wallet tap on express buttons placed on their own.
164
+
165
+ Malformed input never throws: the event is skipped and a warning logged, so reporting can't break
166
+ the host's page.
167
+
168
+ Items take prices in cents, as product responses carry them, and send them in dollars. Full
169
+ signatures and examples: [Analytics Actions](../api/actions/analytics-actions.md).
170
+
171
+ ## Related Docs
172
+
173
+ - [Events Guide](../guides/events.md)
174
+ - [Analytics Actions](../api/actions/analytics-actions.md)
175
+ - [Client API](../api/client.md)
176
+ - [Troubleshooting](./troubleshooting.md)
@@ -0,0 +1,47 @@
1
+ # Browser Support
2
+
3
+ The Elements SDK requires modern browser features (Web Components + Shadow DOM). If you need to support older browsers, include polyfills.
4
+
5
+ ## Minimum Versions
6
+
7
+ - Chrome 66+
8
+ - Firefox 60+
9
+ - Safari 12+
10
+ - Edge 79+
11
+
12
+ ## Required Features
13
+
14
+ - Custom Elements (Web Components)
15
+ - Shadow DOM
16
+ - ES2018 JavaScript
17
+ - Fetch API
18
+
19
+ **LocalStorage (optional, recommended):** used as a fast path for session persistence (cart/address). When unavailable (incognito, Safari/Firefox private mode, in-app webviews, cross-origin iframes), the SDK falls back to a generated device fingerprint plus server-side session persistence, so functionality is preserved.
20
+
21
+ ## Server-Side Rendering (SSR)
22
+
23
+ The SDK is browser-only, but it is safe to import in SSR frameworks (Next.js, Remix, Nuxt).
24
+ In non-browser environments, initialization is skipped. If you call the SDK on the server,
25
+ it returns `null` and logs a warning instead of throwing.
26
+
27
+ Call `Elements`, `ElementsCheckout`, or `ElementsBuilder` from client-only code (e.g., after mount)
28
+ to render components. `Elements` and `ElementsBuilder` resolve to no-op stubs from the main SSR
29
+ entry; `ElementsCheckout` ships in its own tree-shaken entry with a separate stub, so it is safe to
30
+ import even if you never use the other two.
31
+
32
+ ## Polyfills (Legacy Browsers)
33
+
34
+ ```html
35
+ <script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2/webcomponents-bundle.js"></script>
36
+ <script defer data-liquid-commerce-elements ...></script>
37
+ ```
38
+
39
+ ## Notes
40
+
41
+ - Always load the SDK script with `defer` to avoid blocking page render.
42
+ - If you see Web Components errors in the console, add the polyfill before the SDK.
43
+
44
+ ## Related Docs
45
+
46
+ - [Installation](../getting-started/installation.md)
47
+ - [Troubleshooting](./troubleshooting.md)
@@ -0,0 +1,83 @@
1
+ # Error Handling
2
+
3
+ The SDK emits errors as events and (when applicable) throws a custom `SDKError`. Your app should handle both.
4
+
5
+ ## SDKError
6
+
7
+ All SDK errors use a custom error class:
8
+
9
+ ```typescript
10
+ class SDKError extends Error {
11
+ constructor(message: string, reThrow?: boolean);
12
+ name: 'SDKError';
13
+ isSdk: boolean;
14
+ reThrow: boolean;
15
+ }
16
+ ```
17
+
18
+ ## Catching Errors
19
+
20
+ ```javascript
21
+ try {
22
+ // Structural input errors throw a catchable SDKError — e.g. a non-array
23
+ // argument or an empty array:
24
+ await window.LiquidCommerce.elements.injectProductElement([]);
25
+ } catch (error) {
26
+ if (error.name === 'SDKError') {
27
+ console.error('SDK Error:', error);
28
+ }
29
+ }
30
+ ```
31
+
32
+ > A well-formed entry with an invalid product identifier does **not** throw — it renders an error view inside the component and sets an error in the store. `try/catch` here only catches malformed input: a missing or non-string `identifier`, a `fulfillmentType` other than `shipping`/`onDemand`, or a `quantity` below 1. An **empty array logs a warning and resolves** — it does not throw and emits no event.
33
+
34
+ ## Error Isolation
35
+
36
+ Component failures are contained — a component that fails to load renders an error view and logs to the console without crashing your page. Action methods (like `cart.addProduct`) emit a `*_FAILED` event on failure, and re-throw only on an unexpected error; several soft-failure paths (e.g. no product found, no items added) emit the failure event but still resolve. Wrap calls in try/catch **and** listen for the corresponding `*_failed` event to reliably detect failures:
37
+
38
+ ```javascript
39
+ try {
40
+ await window.LiquidCommerce.elements.actions.cart.addProduct([/* invalid */]);
41
+ } catch (error) {
42
+ console.log('Handled add-to-cart failure');
43
+ }
44
+ ```
45
+
46
+ ## Error Events
47
+
48
+ Listen for failure events to show user-friendly messages or trigger retries:
49
+
50
+ ```javascript
51
+ // Cart add failed
52
+ window.addEventListener('lce:actions.cart_product_add_failed', (event) => {
53
+ console.error('Failed to add:', event.detail.data.error);
54
+ });
55
+
56
+ // Address failed
57
+ window.addEventListener('lce:actions.address_failed', (event) => {
58
+ console.error('Address error:', event.detail.data.error);
59
+ });
60
+
61
+ // Checkout submit failed
62
+ window.addEventListener('lce:actions.checkout_submit_failed', (event) => {
63
+ console.error('Checkout failed:', event.detail.data.message);
64
+ });
65
+ ```
66
+
67
+ ## UI Errors
68
+
69
+ When a component fails to load, the SDK renders an error view inside the container and logs details to the console.
70
+
71
+ ## Global Error Interception
72
+
73
+ On load, the SDK installs its own global handlers by reassigning `window.onerror` and `window.onunhandledrejection`. Each incoming error or rejection is classified by an `isSDKError` heuristic that inspects the error's message, stack, and source — matching a script `src` ending in `/elements.js`, known SDK class and directory patterns, and an `isSdk` flag on `SDKError` instances.
74
+
75
+ When an error is classified as SDK-originated, the handler logs it to the console and returns `true` (for `onerror`) or calls `event.preventDefault()` (for `onunhandledrejection`), so the error is swallowed and never reaches your app. Errors that are not classified as SDK-originated are chained to any handler that was already installed before the SDK loaded.
76
+
77
+ > **Implications:** SDK-originated errors are intentionally suppressed and will **not** surface in your host error monitoring (e.g. Sentry). Conversely, the heuristic is pattern-based and can occasionally match a non-SDK error, causing it to be swallowed too. If you rely on catching failures, use the `*_failed` events and `try/catch` described above rather than global error monitoring.
78
+
79
+ ## Related Docs
80
+
81
+ - [Events Guide](../guides/events.md)
82
+ - [Client API](../api/client.md)
83
+ - [Troubleshooting](./troubleshooting.md)
@@ -0,0 +1,52 @@
1
+ # Performance Guide
2
+
3
+ The SDK is optimized out of the box. These tweaks help reduce load time and layout shift.
4
+
5
+ ## 1) Load Non-Blocking
6
+
7
+ ```html
8
+ <script defer data-liquid-commerce-elements ...></script>
9
+ ```
10
+
11
+ ## 2) Use the Checkout-Only Build When Appropriate
12
+
13
+ If you only need checkout, use the tree-shaken build:
14
+
15
+ ```javascript
16
+ import { ElementsCheckout } from '@liquidcommerce/elements-sdk/checkout';
17
+ ```
18
+
19
+ ## 3) Inject Components When Needed
20
+
21
+ Inject above-the-fold products first, then load the rest:
22
+
23
+ ```javascript
24
+ await client.injectProductElement([
25
+ { containerId: 'hero-product', identifier: '001' }
26
+ ]);
27
+
28
+ setTimeout(async () => {
29
+ await client.injectProductElement([
30
+ { containerId: 'related-1', identifier: '002' },
31
+ { containerId: 'related-2', identifier: '003' }
32
+ ]);
33
+ }, 1000);
34
+ ```
35
+
36
+ ## 4) Reserve Space to Prevent Layout Shift
37
+
38
+ ```css
39
+ #product {
40
+ min-height: 600px;
41
+ }
42
+ ```
43
+
44
+ ## 5) Let the SDK Handle Media Optimization
45
+
46
+ The SDK automatically:
47
+ - Lazy loads carousel/thumbnail images (native `loading="lazy"`)
48
+
49
+ ## Related Docs
50
+
51
+ - [Best Practices](../guides/best-practices.md)
52
+ - [Product Component](../guides/product-component.md)
@@ -0,0 +1,85 @@
1
+ # Telemetry & Privacy
2
+
3
+ The SDK includes lightweight, privacy-conscious telemetry that reports errors and warnings back to LiquidCommerce so the platform can detect and fix production issues. This page is a full disclosure of **what** is collected, **when**, **where** it is sent, and **how to turn it off**.
4
+
5
+ Telemetry never blocks or breaks your page — capture and sending are wrapped so internal failures are swallowed silently.
6
+
7
+ ## When It Is Enabled
8
+
9
+ Telemetry is enabled **only** when both conditions are true:
10
+
11
+ - The SDK is running in the **production** environment (`env === 'production'`), and
12
+ - **No custom API URL is configured** (`hasCustomApiUrl` is `false`).
13
+
14
+ In every other case it is **disabled** and no events are queued or sent:
15
+
16
+ - Non-production environments (i.e. staging).
17
+ - A custom API URL / proxy is configured via `development.customApiUrl`.
18
+ - Internal telemetry errors are only logged to the console in non-production or when debugging is enabled — never sent.
19
+
20
+ ## What Is Collected
21
+
22
+ Each event carries the message, severity level, and timestamp, plus three context blocks.
23
+
24
+ **Browser context**
25
+
26
+ - `userAgent` — the browser user-agent string
27
+ - `url` — the full current page URL (`window.location.href`)
28
+ - `referrer` — the referring URL, if any
29
+ - `timezone` — the resolved IANA timezone (e.g. `America/New_York`)
30
+ - `deviceType` — device classification (desktop/mobile/tablet)
31
+
32
+ **User context**
33
+
34
+ - `deviceId` — the SDK-generated device id (falls back to `not_defined`)
35
+ - `isLocalStorageAvailable` — whether localStorage is usable
36
+ - `selectedAddress` — the user's currently selected **formatted address string**, if one is set
37
+
38
+ **SDK context**
39
+
40
+ - `version`, `env`, `isBuilder`, and `partnerCode`
41
+
42
+ **Errors** (when the event represents one) include the error `name`, `message`, `code`, and a stack trace **truncated to the first 10 lines**.
43
+
44
+ Only **warnings** and **errors/fatal** events are captured. Debug/log/info events are excluded by default (`includeDebugLogs: false`).
45
+
46
+ ## Where It Is Sent
47
+
48
+ Events are **batched** and sent to:
49
+
50
+ ```
51
+ <baseUrl>/api/telemetry
52
+ ```
53
+
54
+ `baseUrl` is the SDK's configured API host. Because telemetry is disabled whenever a custom API URL is set, events are only ever sent to LiquidCommerce's own endpoint — never to a partner proxy.
55
+
56
+ Batches are delivered with `navigator.sendBeacon`, falling back to a **synchronous `XMLHttpRequest`** if sendBeacon is unavailable or fails. Payloads are sent as `text/plain`.
57
+
58
+ Batches flush:
59
+
60
+ - When the queue reaches the batch size (5 events in production),
61
+ - On a periodic timer (every 5s in production), and
62
+ - On page teardown (`beforeunload` / `pagehide`), so pending events are not lost.
63
+
64
+ The queue is capped (max 50 events); oldest events are dropped first if it overflows.
65
+
66
+ ## Disabling Telemetry
67
+
68
+ There is no separate opt-out flag — telemetry follows the two conditions above. To ensure it never runs, do either of the following:
69
+
70
+ - Run the SDK in a **non-production** environment, or
71
+ - Configure a **custom API URL** so events are routed through your own infrastructure and SDK telemetry is switched off:
72
+
73
+ ```javascript
74
+ const client = await Elements('YOUR_API_KEY', {
75
+ development: {
76
+ customApiUrl: 'https://your-proxy.example.com'
77
+ }
78
+ });
79
+ ```
80
+
81
+ ## Related Docs
82
+
83
+ - [Error Handling](./error-handling.md)
84
+ - [Client API](../api/client.md)
85
+ - [Troubleshooting](./troubleshooting.md)
@@ -0,0 +1,135 @@
1
+ # Troubleshooting
2
+
3
+ Common setup issues and how to resolve them.
4
+
5
+ ## SDK Script Not Loading
6
+
7
+ **Symptoms:** 404/CORS in Network tab, `window.LiquidCommerce.elements` is undefined.
8
+
9
+ **Fixes:**
10
+ - Verify the script URL and that the tag includes `data-liquid-commerce-elements`.
11
+ - Check ad blockers; proxy the API if needed.
12
+ - Confirm `data-env` is set correctly.
13
+
14
+ ## Web Components Error
15
+
16
+ **Symptoms:** Console logs about Custom Elements or Shadow DOM.
17
+
18
+ **Fix:** Add the Web Components polyfill before the SDK:
19
+
20
+ ```html
21
+ <script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2/webcomponents-bundle.js"></script>
22
+ <script defer data-liquid-commerce-elements ...></script>
23
+ ```
24
+
25
+ ## Product Not Showing
26
+
27
+ **Symptoms:** Empty container or error view.
28
+
29
+ **Fixes:**
30
+ - Confirm the container ID matches your HTML.
31
+ - Verify the product identifier exists.
32
+ - Check for errors in the console or network tab.
33
+
34
+ ## Cart Drawer Not Opening
35
+
36
+ **Symptoms:** Add to cart works but cart stays closed.
37
+
38
+ **Fixes:**
39
+ - Ensure a cart button is configured or call `window.LiquidCommerce.elements.actions.cart.openCart()`.
40
+ - Check for JavaScript errors in the console.
41
+
42
+ ## Checkout Issues
43
+
44
+ **Symptoms:** Checkout fails to load or submit.
45
+
46
+ **Fixes:**
47
+ - Verify you are on a supported browser.
48
+ - Look for `checkout_*_failed` events in the console.
49
+ - Check for Stripe-related errors in the browser console.
50
+
51
+ ## Address/Availability Problems
52
+
53
+ **Symptoms:** Products show unavailable or address prompts fail.
54
+
55
+ **Fixes:**
56
+ - Make sure the address is set and valid.
57
+ - Listen for `lce:actions.address_failed` to surface errors.
58
+
59
+ ## SSR / Server-Side Rendering
60
+
61
+ **Symptoms:** Console warning "This SDK is designed for the browser. Calls made during SSR return null."
62
+
63
+ This is expected behavior. The SDK ships SSR stubs that are automatically resolved when bundled for Node.js (via the `node` export condition in `package.json`). There are two: the main build's stub (the `.` export) provides `Elements` and `ElementsBuilder` and warns with the `[LiquidCommerce Elements]` prefix; the checkout build's stub (the `./checkout` export) provides `ElementsCheckout` and warns with the `[LiquidCommerce Checkout]` prefix. Both re-export their types and enums for TypeScript compatibility and return `null` from the factory functions.
64
+
65
+ **No action required** — initialize the SDK in a client-only lifecycle hook (`useEffect`, `onMounted`, etc.) and the real client will activate in the browser.
66
+
67
+ ## Styling Not Applied / CSS Not Working
68
+
69
+ **Symptoms:** Components render but custom styles are ignored, or host page styles leak into components.
70
+
71
+ **Cause:** Components use Shadow DOM for style isolation.
72
+
73
+ **Fixes:**
74
+ - Use `customTheme` in the client configuration to style components -- external CSS cannot penetrate Shadow DOM.
75
+ - For debugging, enable `development.openShadowDom: true` to make the shadow root open (`mode: 'open'`) so you can inspect component internals in DevTools (via `element.shadowRoot`). This does **not** disable style isolation — external CSS still cannot reach the components; use `customTheme` to style them. (Forced off in production.)
76
+ - Use the debug panel (`debugMode: 'panel'`) to inspect SDK logs, events, and GTM activity in real time — it surfaces a live stream of logger output and pubsub/GTM events (not component internal state), and auto-enables only in non-production environments.
77
+
78
+ ## Component Not Updating After Data Changes
79
+
80
+ **Symptoms:** Component shows stale data after an action completes.
81
+
82
+ **Fixes:**
83
+ - Call `.rerender()` on the injected component to force a refresh:
84
+ ```javascript
85
+ const components = client.getInjectedComponents();
86
+ components.get('product-1')?.rerender();
87
+ ```
88
+ - Ensure you're not holding a stale reference -- call `getInjectedComponents()` again after injection.
89
+
90
+ ## Cleanup / Memory Leaks
91
+
92
+ **Symptoms:** Components persist after navigating away in SPA, or duplicate components appear.
93
+
94
+ **Fixes:**
95
+ - Call `destroy()` on individual injected components when removing them:
96
+ ```javascript
97
+ const component = client.getInjectedComponents().get('product-1');
98
+ component?.destroy();
99
+ ```
100
+ - Call `client.destroy()` when tearing down the entire SDK (e.g., on SPA route change).
101
+
102
+ ## Promo Ticker Not Showing
103
+
104
+ **Symptoms:** Promo ticker is configured but not visible.
105
+
106
+ **Fixes:**
107
+ - Verify all 5 required fields are set: `promoCode`, `text`, `separator`, `activeFrom`, `activeUntil`.
108
+ - Check that the current time falls between `activeFrom` and `activeUntil` (ISO 8601 UTC format). The ticker only renders when at least one configured ticker is currently active — the active window is evaluated against the shopper's timezone (derived from the current address state, falling back to the browser timezone), so a ticker with a valid but out-of-window range will not appear.
109
+
110
+ ## Ad Blockers Blocking SDK Requests
111
+
112
+ **Symptoms:** Network requests fail, products don't load, but no code errors.
113
+
114
+ **Fixes:**
115
+ - Set up a proxy to route API requests through your own domain:
116
+ ```javascript
117
+ proxy: { baseUrl: 'https://yoursite.com/api/elements-proxy' }
118
+ ```
119
+ - See [Proxy Setup Guide](../integration/proxy-setup.md) for server-side implementation.
120
+
121
+ ## Performance Issues on Large Product Lists
122
+
123
+ **Symptoms:** Slow rendering or high memory usage with many products.
124
+
125
+ **Fixes:**
126
+ - Reduce `rows` and `columns` to load fewer products per page.
127
+ - Limit the number of active filters.
128
+ - Use the checkout-only build on checkout pages to reduce bundle size.
129
+
130
+ ## Related Docs
131
+
132
+ - [Installation](../getting-started/installation.md)
133
+ - [Browser Support](./browser-support.md)
134
+ - [Error Handling](./error-handling.md)
135
+ - [Proxy Setup](../integration/proxy-setup.md)