@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,214 @@
1
+ # Elements SDK v1 Documentation
2
+
3
+ Welcome to the comprehensive documentation for the LiquidCommerce Elements SDK v1.
4
+
5
+ ## What is Elements SDK?
6
+
7
+ The Elements SDK is a Web Components-based e-commerce SDK that allows you to add product displays, shopping carts, and checkout flows to any website with minimal code.
8
+
9
+ ## Quick Links
10
+
11
+ - **[Installation](./getting-started/installation.md)** - Get started in minutes
12
+ - **[Quick Start](./getting-started/quick-start.md)** - Build your first product page
13
+ - **[API Reference](./api/client.md)** - Complete API documentation
14
+
15
+ ## Documentation Sections
16
+
17
+ ### Getting Started
18
+
19
+ Essential guides for new users:
20
+
21
+ - **[Installation](./getting-started/installation.md)** - CDN, NPM, and framework integration
22
+ - **[Quick Start](./getting-started/quick-start.md)** - Your first product page in 5 minutes
23
+ - **[Core Concepts](./getting-started/concepts.md)** - Understand how the SDK works
24
+
25
+ ### Component Guides
26
+
27
+ In-depth guides for each major component:
28
+
29
+ - **[Product Component](./guides/product-component.md)** - Display products with add-to-cart functionality
30
+ - **[Cart Component](./guides/cart-component.md)** - Shopping cart and item management
31
+ - **[Checkout Component](./guides/checkout-component.md)** - Complete purchase flow
32
+ - **[Address Component](./guides/address-component.md)** - Delivery location management
33
+ - **[Product List Component](./guides/product-list-component.md)** - Filterable product catalogs
34
+ - **[Theming](./guides/theming.md)** - Customize appearance and branding
35
+ - **[Accessibility](./guides/accessibility.md)** - Keyboard, screen reader, contrast and focus behaviour
36
+ - **[Events](./guides/events.md)** - Event system and subscriptions
37
+ - **[Best Practices](./guides/best-practices.md)** - Patterns, tips, and recommendations
38
+
39
+ ### API Reference
40
+
41
+ Complete API documentation:
42
+
43
+ **Core API:**
44
+ - **[Client API](./api/client.md)** - Main SDK client interface
45
+ - **[Injection Methods](./api/injection-methods.md)** - Component injection
46
+ - **[UI Helpers](./api/ui-helpers.md)** - Cart buttons and UI elements
47
+ - **[Configuration](./api/configuration.md)** - All configuration options
48
+ - **[TypeScript Types](./api/typescript-types.md)** - Type definitions
49
+
50
+ **Actions API:**
51
+ - **[Product Actions](./api/actions/product-actions.md)** - `actions.product.*`
52
+ - **[Address Actions](./api/actions/address-actions.md)** - `actions.address.*`
53
+ - **[Cart Actions](./api/actions/cart-actions.md)** - `actions.cart.*`
54
+ - **[Checkout Actions](./api/actions/checkout-actions.md)** - `actions.checkout.*`
55
+ - **[Analytics Actions](./api/actions/analytics-actions.md)** - `actions.analytics.*`
56
+
57
+ ### Architecture (To Be Done In Future Versions)
58
+
59
+ Deep dive into SDK internals:
60
+
61
+ - **[Overview](./architecture/overview.md)** - System architecture
62
+ - **[Initialization](./architecture/initialization.md)** - Phased initialization process
63
+ - **[State Management](./architecture/state-management.md)** - Store service and persistence
64
+ - **[Event System](./architecture/event-system.md)** - PubSub architecture
65
+ - **[Web Components](./architecture/web-components.md)** - Component factory and Shadow DOM
66
+ - **[Build System](./architecture/build-system.md)** - Bundles and tree-shaking
67
+
68
+ ### Framework Integration
69
+
70
+ Integration guides for popular frameworks:
71
+
72
+ - **[React](./integration/react.md)** - React integration patterns and hooks
73
+ - **[Next.js](./integration/nextjs.md)** - Next.js setup with SSR considerations
74
+ - **[Vue](./integration/vue.md)** - Vue component integration
75
+ - **[Angular](./integration/angular.md)** - Angular client-only setup
76
+ - **[Laravel](./integration/laravel.md)** - Blade + CDN integration
77
+ - **[Vanilla JavaScript](./integration/vanilla-js.md)** - Pure JavaScript integration
78
+ - **[Proxy Setup](./integration/proxy-setup.md)** - Ad blocker avoidance
79
+
80
+ ### Reference
81
+
82
+ Technical reference and troubleshooting:
83
+
84
+ - **[Browser Support](./reference/browser-support.md)** - Compatibility matrix
85
+ - **[Troubleshooting](./reference/troubleshooting.md)** - Common issues and solutions
86
+ - **[Error Handling](./reference/error-handling.md)** - Error types and debugging
87
+ - **[Performance](./reference/performance.md)** - Optimization tips and best practices
88
+ - **[Analytics](./reference/analytics.md)** - Google Tag Manager / GA4 integration
89
+ - **[Telemetry](./reference/telemetry.md)** - What the SDK reports and how to control it
90
+
91
+ ### Examples
92
+
93
+ Practical examples with working code:
94
+
95
+ - **[Simple Product Page](./examples/simple-product-page.md)** - Basic PDP implementation
96
+ - **[Multi-Product Page](./examples/multi-product-page.md)** - Multiple products on one page
97
+ - **[Complete Checkout Flow](./examples/checkout-flow.md)** - Full e-commerce flow
98
+ - **[Custom Theming](./examples/custom-theming.md)** - Brand customization examples
99
+ - **[Advanced Patterns](./examples/advanced-patterns.md)** - Complex integration scenarios
100
+
101
+ ## Common Tasks
102
+
103
+ ### Adding a Product
104
+
105
+ **Declarative (HTML):**
106
+ ```html
107
+ <script
108
+ defer
109
+ data-liquid-commerce-elements
110
+ data-token="YOUR_API_KEY"
111
+ data-env="production"
112
+ data-container-1="product"
113
+ data-product-1="00619947000020"
114
+ type="text/javascript"
115
+ src="https://elements.reservebar-worker.workers.dev/all/elements.js"
116
+ ></script>
117
+
118
+ <div id="product"></div>
119
+ ```
120
+
121
+ **Programmatic (JavaScript):**
122
+ ```javascript
123
+ const client = await Elements('YOUR_API_KEY', { env: 'production' });
124
+ await client.injectProductElement([
125
+ { containerId: 'product', identifier: '00619947000020' }
126
+ ]);
127
+ ```
128
+
129
+ ### Opening the Cart
130
+
131
+ ```javascript
132
+ window.LiquidCommerce.elements.actions.cart.openCart();
133
+ ```
134
+
135
+ ### Adding to Cart Programmatically
136
+
137
+ ```javascript
138
+ await window.LiquidCommerce.elements.actions.cart.addProduct([
139
+ {
140
+ identifier: '00619947000020',
141
+ fulfillmentType: 'shipping',
142
+ quantity: 1
143
+ }
144
+ ], true); // true = open cart after adding
145
+ ```
146
+
147
+ ### Listening for Events
148
+
149
+ ```javascript
150
+ window.addEventListener('lce:actions.cart_item_added', (event) => {
151
+ console.log('Item added to cart:', event.detail.data);
152
+ });
153
+ ```
154
+
155
+ ### Customizing Theme
156
+
157
+ ```javascript
158
+ const client = await Elements('YOUR_API_KEY', {
159
+ env: 'production',
160
+ customTheme: {
161
+ global: {
162
+ theme: {
163
+ primaryColor: '#007bff',
164
+ buttonCornerRadius: '8px'
165
+ }
166
+ }
167
+ }
168
+ });
169
+ ```
170
+
171
+ ## Key Concepts
172
+
173
+ ### Web Components
174
+ The SDK uses native Web Components for framework-agnostic integration and style encapsulation.
175
+
176
+ ### Shadow DOM
177
+ Components use Shadow DOM to prevent CSS conflicts and ensure consistent styling.
178
+
179
+ ### Auto-Initialization
180
+ When using the CDN, the SDK automatically initializes based on HTML data attributes.
181
+
182
+ ### Event-Driven
183
+ The SDK publishes events for all user interactions, allowing you to react to changes.
184
+
185
+ ### State Persistence
186
+ Cart and address data persist across sessions using localStorage with API fallback.
187
+
188
+ ## Browser Requirements
189
+
190
+ - Chrome 66+ (March 2018)
191
+ - Firefox 60+ (May 2018)
192
+ - Safari 12+ (September 2018)
193
+ - Edge 79+ (January 2020)
194
+
195
+ Requires Web Components and Shadow DOM support.
196
+
197
+ ## Support
198
+
199
+ For assistance, contact your LiquidCommerce representative.
200
+
201
+ ## Version History
202
+
203
+ This is the v1 documentation. Future versions will be documented in separate directories (`v2/`, `v3/`, etc.).
204
+
205
+ ## Contributing
206
+
207
+ Found an issue in the documentation? Contact your LiquidCommerce representative with suggestions.
208
+
209
+ ---
210
+
211
+ ## Navigation
212
+
213
+ - [← Back to Repository](../)
214
+ - [Getting Started →](./getting-started/installation.md)
@@ -0,0 +1,290 @@
1
+ # Address Actions API
2
+
3
+ Address actions allow you to programmatically manage the delivery location.
4
+
5
+ ## actions.address.setAddressByPlacesId()
6
+
7
+ Set address using a Google Places ID.
8
+
9
+ ### Signature
10
+
11
+ ```typescript
12
+ setAddressByPlacesId(placesId: string, sessionToken?: string): Promise<void>
13
+ ```
14
+
15
+ ### Parameters
16
+
17
+ | Parameter | Type | Required | Description |
18
+ |-----------|------|----------|-------------|
19
+ | `placesId` | string | Yes | Google Places ID |
20
+ | `sessionToken` | string | No | Google Places session token of the autocomplete requests that returned `placesId`. The details request ends that session, so Google bills the autocomplete requests as one session instead of per request. Applies only when the autocomplete requests used an API key in the same Google Cloud project as LiquidCommerce's address service. |
21
+
22
+ ### Example
23
+
24
+ ```javascript
25
+ await window.LiquidCommerce.elements.actions.address.setAddressByPlacesId(
26
+ 'ChIJOwg_06VPwokRYv534QaPC8g'
27
+ );
28
+
29
+ // With the session token your own Places Autocomplete requests used
30
+ await window.LiquidCommerce.elements.actions.address.setAddressByPlacesId(placesId, sessionToken);
31
+ ```
32
+
33
+ ### How to Get Places ID
34
+
35
+ Visit [Google Place IDs](https://developers.google.com/maps/documentation/places/web-service/place-id#find-id) for details on obtaining a Places ID.
36
+
37
+ ---
38
+
39
+ ## actions.address.setAddressManually()
40
+
41
+ Set address manually without Google Places.
42
+
43
+ ### Signature
44
+
45
+ ```typescript
46
+ setAddressManually(
47
+ address: IAddressAddress,
48
+ coordinates: IAddressCoordinates
49
+ ): Promise<void>
50
+ ```
51
+
52
+ ### Parameters
53
+
54
+ ```typescript
55
+ interface IAddressAddress {
56
+ one: string; // Street address
57
+ two: string; // Apt, suite, etc.
58
+ city: string; // City name
59
+ state: string; // Two-letter state code
60
+ zip: string; // ZIP/postal code
61
+ country: string; // Country
62
+ }
63
+
64
+ interface IAddressCoordinates {
65
+ latitude: number; // -90 to 90
66
+ longitude: number; // -180 to 180
67
+ }
68
+ ```
69
+
70
+ ### Example
71
+
72
+ ```javascript
73
+ await window.LiquidCommerce.elements.actions.address.setAddressManually(
74
+ {
75
+ one: '123 Main Street',
76
+ two: 'Apt 4',
77
+ city: 'New York',
78
+ state: 'NY',
79
+ zip: '10001',
80
+ country: 'US'
81
+ },
82
+ {
83
+ latitude: 40.7128,
84
+ longitude: -74.0060
85
+ }
86
+ );
87
+ ```
88
+
89
+ ### Validation
90
+
91
+ The SDK validates:
92
+ - All required fields are present (street, city, state, zip)
93
+ - Latitude is between -90 and 90
94
+ - Longitude is between -180 and 180
95
+
96
+ > Note: the `state` field is expected to be a 2-letter code by convention, but the SDK does **not** enforce its format.
97
+
98
+ ### Errors
99
+
100
+ **Throws `SDKError` if:**
101
+ - `address` or `coordinates` is missing
102
+ - A required field is missing (street, city, state, zip)
103
+ - Latitude or longitude is non-numeric
104
+ - Coordinates are out of range (latitude outside -90..90, longitude outside -180..180)
105
+
106
+ ---
107
+
108
+ ## actions.address.clear()
109
+
110
+ Remove the current address.
111
+
112
+ ### Signature
113
+
114
+ ```typescript
115
+ clear(): Promise<void>
116
+ ```
117
+
118
+ ### Example
119
+
120
+ ```javascript
121
+ await window.LiquidCommerce.elements.actions.address.clear();
122
+ ```
123
+
124
+ ### Effects
125
+
126
+ - Clears stored address
127
+ - Products will prompt for address on next add-to-cart
128
+ - Cart/checkout require re-entering address
129
+
130
+ ---
131
+
132
+ ## actions.address.getDetails()
133
+
134
+ Retrieve the current address.
135
+
136
+ ### Signature
137
+
138
+ ```typescript
139
+ getDetails(): IAddressData | null
140
+ ```
141
+
142
+ ### Returns
143
+
144
+ ```typescript
145
+ interface IAddressData {
146
+ id: string; // Google Places ID (always populated when an object is returned)
147
+ address: {
148
+ one: string;
149
+ two: string;
150
+ city: string;
151
+ state: string;
152
+ zip: string;
153
+ country: string;
154
+ };
155
+ coordinates: {
156
+ latitude: number;
157
+ longitude: number;
158
+ };
159
+ formattedAddress: string;
160
+ }
161
+ ```
162
+
163
+ Returns `null` if no address is set. Manually-entered addresses (set via `setAddressManually`) are stored without a Google Places ID, so `getDetails()` also returns `null` for them.
164
+
165
+ ### Example
166
+
167
+ ```javascript
168
+ const address = window.LiquidCommerce.elements.actions.address.getDetails();
169
+
170
+ if (address) {
171
+ console.log('Current address:', address.formattedAddress);
172
+ console.log('Coordinates:', address.coordinates);
173
+ } else {
174
+ console.log('No address set');
175
+ }
176
+ ```
177
+
178
+ ### Use Cases
179
+
180
+ #### Check if Address is Set
181
+
182
+ ```javascript
183
+ if (!window.LiquidCommerce.elements.actions.address.getDetails()) {
184
+ // Prompt user to set address
185
+ showAddressPrompt();
186
+ }
187
+ ```
188
+
189
+ #### Display Current Address
190
+
191
+ ```javascript
192
+ const address = window.LiquidCommerce.elements.actions.address.getDetails();
193
+
194
+ if (address) {
195
+ document.getElementById('current-address').textContent =
196
+ address.formattedAddress;
197
+ }
198
+ ```
199
+ ## Events
200
+
201
+ Address actions trigger events:
202
+
203
+ ```javascript
204
+ // Address updated
205
+ window.addEventListener('lce:actions.address_updated', (event) => {
206
+ const { googlePlacesId, address, coordinates, formattedAddress } = event.detail.data;
207
+ console.log('Address set:', formattedAddress);
208
+ });
209
+
210
+ // Address cleared
211
+ window.addEventListener('lce:actions.address_cleared', () => {
212
+ console.log('Address cleared');
213
+ });
214
+
215
+ // Address failed
216
+ window.addEventListener('lce:actions.address_failed', (event) => {
217
+ console.error('Address error:', event.detail.data.error);
218
+ });
219
+ ```
220
+
221
+ ## Best Practices
222
+
223
+ ### Use Places ID When Available
224
+
225
+ Google Places provides accurate geocoding:
226
+
227
+ ```javascript
228
+ // Good - accurate and validated
229
+ await window.LiquidCommerce.elements.actions.address.setAddressByPlacesId(placesId);
230
+
231
+ // Less ideal - requires manual geocoding
232
+ await window.LiquidCommerce.elements.actions.address.setAddressManually(address, coords);
233
+ ```
234
+
235
+ ### Validate Manual Addresses
236
+
237
+ When using manual address entry:
238
+
239
+ ```javascript
240
+ async function setManualAddress(address, coords) {
241
+ // Validate format
242
+ if (!address.one || !address.city || !address.state || !address.zip) {
243
+ throw new Error('Missing required fields');
244
+ }
245
+
246
+ // Validate state
247
+ if (!/^[A-Z]{2}$/.test(address.state)) {
248
+ throw new Error('State must be 2-letter code');
249
+ }
250
+
251
+ // Validate ZIP
252
+ if (!/^\d{5}(-\d{4})?$/.test(address.zip)) {
253
+ throw new Error('Invalid ZIP code');
254
+ }
255
+
256
+ await window.LiquidCommerce.elements.actions.address.setAddressManually(address, coords);
257
+ }
258
+ ```
259
+
260
+ ### Handle Errors
261
+
262
+ ```javascript
263
+ try {
264
+ await window.LiquidCommerce.elements.actions.address.setAddressByPlacesId(placesId);
265
+ showSuccess('Address saved!');
266
+ } catch (error) {
267
+ console.error('Failed to set address:', error);
268
+ showError('Unable to set that address. Please try again.');
269
+ }
270
+ ```
271
+
272
+ ### Set Address Early
273
+
274
+ Set address as soon as possible in user flow:
275
+
276
+ ```javascript
277
+ window.addEventListener('lce:actions.client_ready', () => {
278
+ if (!window.LiquidCommerce.elements.actions.address.getDetails()) {
279
+ // Prompt for address on first visit
280
+ showAddressModal();
281
+ }
282
+ }, { once: true });
283
+ ```
284
+
285
+ ## See Also
286
+
287
+ - [Address Component Guide](../../guides/address-component.md)
288
+ - [Address Events](../../guides/events.md#address-events)
289
+ - [Product Component](../../guides/product-component.md#address-requirement)
290
+ - [Cart Component](../../guides/cart-component.md#address-requirement)