@liquidcommerce/elements-sdk 2.6.0-beta.1 → 2.6.0-beta.100

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 (274) hide show
  1. package/README.md +99 -2517
  2. package/dist/index.checkout.esm.js +17794 -0
  3. package/dist/index.esm.js +26010 -20601
  4. package/dist/ssr-stub.checkout.esm.js +18 -0
  5. package/dist/ssr-stub.esm.js +270 -0
  6. package/dist/types/auto-initialize/checkout.d.ts +2 -0
  7. package/dist/types/auto-initialize/shared-utils.d.ts +50 -0
  8. package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +15 -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/{elements-client-helper.d.ts → clients/helpers.d.ts} +2 -1
  12. package/dist/types/clients/main.d.ts +3 -0
  13. package/dist/types/constants/core.constant.d.ts +13 -6
  14. package/dist/types/core/a11y/announcer.service.d.ts +16 -0
  15. package/dist/types/core/a11y/focus-manager.service.d.ts +21 -0
  16. package/dist/types/core/a11y/focusable.d.ts +5 -0
  17. package/dist/types/core/a11y/glyph-button.d.ts +8 -0
  18. package/dist/types/core/a11y/index.d.ts +5 -0
  19. package/dist/types/core/a11y/single-select.d.ts +16 -0
  20. package/dist/types/core/api/api-client.service.d.ts +23 -22
  21. package/dist/types/core/api/api-result.d.ts +19 -0
  22. package/dist/types/core/api/auth-client.service.d.ts +39 -26
  23. package/dist/types/core/api/http-client.service.d.ts +0 -8
  24. package/dist/types/core/base-component.service.d.ts +4 -1
  25. package/dist/types/core/client/actions/base-action.service.d.ts +22 -0
  26. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  27. package/dist/types/core/client/actions/client-cart-action.service.d.ts +38 -0
  28. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +69 -0
  29. package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
  30. package/dist/types/core/client/client-action.service.d.ts +6 -67
  31. package/dist/types/core/client/client-config.service.d.ts +9 -5
  32. package/dist/types/core/command/base-command.service.d.ts +2 -2
  33. package/dist/types/core/command/common-command.service.d.ts +2 -1
  34. package/dist/types/core/google-tag-manager.service.d.ts +15 -11
  35. package/dist/types/core/logger/logger.service.d.ts +1 -1
  36. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +6 -12
  37. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  38. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +45 -50
  39. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +11 -6
  40. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
  41. package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
  42. package/dist/types/core/singleton-manager.service.d.ts +12 -8
  43. package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
  44. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -55
  45. package/dist/types/core/store/interfaces/checkout.interface.d.ts +18 -108
  46. package/dist/types/core/store/interfaces/core.interface.d.ts +16 -5
  47. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  48. package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
  49. package/dist/types/core/store/interfaces/product.interface.d.ts +13 -66
  50. package/dist/types/core/store/store.constant.d.ts +6 -1
  51. package/dist/types/core/store/store.service.d.ts +1 -0
  52. package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
  53. package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
  54. package/dist/types/enums/core.enum.d.ts +40 -1
  55. package/dist/types/enums/index.d.ts +0 -1
  56. package/dist/types/index.checkout.d.ts +8 -0
  57. package/dist/types/index.checkout.umd.d.ts +4 -0
  58. package/dist/types/index.d.ts +8 -3
  59. package/dist/types/interfaces/api/address.interface.d.ts +28 -0
  60. package/dist/types/interfaces/api/cart.interface.d.ts +96 -0
  61. package/dist/types/interfaces/api/checkout.interface.d.ts +239 -0
  62. package/dist/types/interfaces/{cloud → api}/index.d.ts +1 -3
  63. package/dist/types/interfaces/api/product-list.interface.d.ts +39 -0
  64. package/dist/types/interfaces/api/product.interface.d.ts +112 -0
  65. package/dist/types/interfaces/client.interface.d.ts +72 -0
  66. package/dist/types/interfaces/component.interface.d.ts +7 -0
  67. package/dist/types/interfaces/config.interface.d.ts +40 -0
  68. package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
  69. package/dist/types/interfaces/configs/cart.interface.d.ts +1 -1
  70. package/dist/types/interfaces/configs/checkout.interface.d.ts +2 -1
  71. package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
  72. package/dist/types/interfaces/configs/global.interface.d.ts +10 -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 +4 -1
  76. package/dist/types/interfaces/injection.interface.d.ts +49 -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 +10 -1
  79. package/dist/types/modules/address/address.command.d.ts +4 -4
  80. package/dist/types/modules/address/address.interface.d.ts +0 -7
  81. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  82. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  83. package/dist/types/modules/cart/components/cart-body.component.d.ts +3 -1
  84. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  85. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  86. package/dist/types/modules/cart/components/cart-item-quantity-price.component.d.ts +5 -0
  87. package/dist/types/modules/cart/components/cart-item.component.d.ts +6 -0
  88. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  89. package/dist/types/modules/checkout/checkout.commands.d.ts +27 -10
  90. package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
  91. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  92. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +5 -0
  93. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  94. package/dist/types/modules/checkout/components/checkout-item-quantity.component.d.ts +4 -0
  95. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  96. package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +2 -1
  97. package/dist/types/modules/checkout/components/checkout-place-order-button.component.d.ts +2 -0
  98. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  99. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  100. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
  101. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  102. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  103. package/dist/types/modules/checkout/constant.d.ts +3 -0
  104. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  105. package/dist/types/modules/product/components/components.d.ts +7 -4
  106. package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +7 -1
  107. package/dist/types/modules/product/components/product-description.component.d.ts +1 -0
  108. package/dist/types/modules/product/components/product-drawer.component.d.ts +6 -0
  109. package/dist/types/modules/product/components/product-image-carousel.component.d.ts +5 -0
  110. package/dist/types/modules/product/components/product-options.component.d.ts +2 -1
  111. package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +4 -0
  112. package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +10 -2
  113. package/dist/types/modules/product/product.commands.d.ts +7 -7
  114. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  115. package/dist/types/modules/product-list/components/card-components/index.d.ts +5 -0
  116. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
  117. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  118. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +14 -0
  119. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +11 -0
  120. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +14 -0
  121. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  122. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  123. package/dist/types/modules/product-list/components/filter-components/product-list-checkbox-filter.d.ts +7 -0
  124. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  125. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  126. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +15 -0
  127. package/dist/types/modules/product-list/components/filter-components/product-list-price-filter.d.ts +22 -0
  128. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
  129. package/dist/types/modules/product-list/components/index.d.ts +6 -0
  130. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +3 -1
  131. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +36 -30
  132. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
  133. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +56 -14
  134. package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
  135. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +53 -0
  136. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +25 -0
  137. package/dist/types/modules/product-list/product-list-filter.utils.d.ts +8 -0
  138. package/dist/types/modules/product-list/product-list-query-params.utils.d.ts +3 -0
  139. package/dist/types/modules/product-list/product-list.commands.d.ts +23 -7
  140. package/dist/types/modules/product-list/product-list.component.d.ts +17 -39
  141. package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
  142. package/dist/types/modules/product-list/product-list.interface.d.ts +65 -0
  143. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  144. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  145. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  146. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  147. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  148. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  149. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  150. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  151. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
  152. package/dist/types/modules/ui-components/alert/alert.component.d.ts +1 -1
  153. package/dist/types/modules/ui-components/buttons/buttons-open-cart.component.d.ts +5 -0
  154. package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +15 -0
  155. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +8 -1
  156. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +7 -1
  157. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  158. package/dist/types/modules/ui-components/input/input.component.d.ts +14 -1
  159. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  160. package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
  161. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  162. package/dist/types/modules/ui-components/ui.commands.d.ts +7 -1
  163. package/dist/types/ssr/stub.checkout.d.ts +6 -0
  164. package/dist/types/ssr/stub.d.ts +10 -0
  165. package/dist/types/static/icon/arrow-right.icon.d.ts +1 -1
  166. package/dist/types/static/icon/bag.icon.d.ts +1 -1
  167. package/dist/types/static/icon/check.icon.d.ts +2 -0
  168. package/dist/types/static/icon/checkbox.icon.d.ts +1 -1
  169. package/dist/types/static/icon/chevron-down.icon.d.ts +1 -1
  170. package/dist/types/static/icon/chevron-left.icon.d.ts +1 -1
  171. package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
  172. package/dist/types/static/icon/close.icon.d.ts +1 -1
  173. package/dist/types/static/icon/error-info.icon.d.ts +1 -1
  174. package/dist/types/static/icon/filter.icon.d.ts +2 -0
  175. package/dist/types/static/icon/icon.a11y.d.ts +1 -0
  176. package/dist/types/static/icon/icon.types.d.ts +1 -0
  177. package/dist/types/static/icon/index.d.ts +3 -0
  178. package/dist/types/static/icon/info.icon.d.ts +1 -1
  179. package/dist/types/static/icon/loading-spinner.icon.d.ts +1 -1
  180. package/dist/types/static/icon/search.icon.d.ts +1 -1
  181. package/dist/types/static/icon/success.icon.d.ts +1 -1
  182. package/dist/types/static/icon/trash.icon.d.ts +1 -1
  183. package/dist/types/static/icon/warning.icon.d.ts +1 -1
  184. package/dist/types/utils/dom-compat.d.ts +2 -0
  185. package/dist/types/utils/format.d.ts +4 -14
  186. package/dist/types/utils/image-bg-removal.d.ts +3 -0
  187. package/dist/types/utils/product-selection.d.ts +16 -0
  188. package/dist/types/utils/product.d.ts +15 -0
  189. package/docs/v1/README.md +213 -0
  190. package/docs/v1/api/actions/address-actions.md +286 -0
  191. package/docs/v1/api/actions/cart-actions.md +364 -0
  192. package/docs/v1/api/actions/checkout-actions.md +527 -0
  193. package/docs/v1/api/actions/product-actions.md +204 -0
  194. package/docs/v1/api/client.md +596 -0
  195. package/docs/v1/api/configuration.md +555 -0
  196. package/docs/v1/api/injection-methods.md +292 -0
  197. package/docs/v1/api/typescript-types.md +423 -0
  198. package/docs/v1/api/ui-helpers.md +200 -0
  199. package/docs/v1/examples/advanced-patterns.md +199 -0
  200. package/docs/v1/examples/checkout-flow.md +90 -0
  201. package/docs/v1/examples/custom-theming.md +63 -0
  202. package/docs/v1/examples/multi-product-page.md +90 -0
  203. package/docs/v1/examples/simple-product-page.md +89 -0
  204. package/docs/v1/getting-started/concepts.md +521 -0
  205. package/docs/v1/getting-started/installation.md +349 -0
  206. package/docs/v1/getting-started/quick-start.md +410 -0
  207. package/docs/v1/guides/accessibility.md +173 -0
  208. package/docs/v1/guides/address-component.md +435 -0
  209. package/docs/v1/guides/best-practices.md +365 -0
  210. package/docs/v1/guides/cart-component.md +757 -0
  211. package/docs/v1/guides/checkout-component.md +670 -0
  212. package/docs/v1/guides/events.md +939 -0
  213. package/docs/v1/guides/product-component.md +735 -0
  214. package/docs/v1/guides/product-list-component.md +630 -0
  215. package/docs/v1/guides/theming.md +228 -0
  216. package/docs/v1/integration/angular.md +39 -0
  217. package/docs/v1/integration/laravel.md +41 -0
  218. package/docs/v1/integration/nextjs.md +69 -0
  219. package/docs/v1/integration/proxy-setup.md +106 -0
  220. package/docs/v1/integration/react.md +64 -0
  221. package/docs/v1/integration/vanilla-js.md +84 -0
  222. package/docs/v1/integration/vue.md +58 -0
  223. package/docs/v1/reference/analytics.md +108 -0
  224. package/docs/v1/reference/browser-support.md +47 -0
  225. package/docs/v1/reference/error-handling.md +83 -0
  226. package/docs/v1/reference/performance.md +52 -0
  227. package/docs/v1/reference/telemetry.md +85 -0
  228. package/docs/v1/reference/troubleshooting.md +135 -0
  229. package/package.json +69 -45
  230. package/dist/types/elements-builder-client.d.ts +0 -2
  231. package/dist/types/elements-client.d.ts +0 -2
  232. package/dist/types/enums/cloud.enum.d.ts +0 -77
  233. package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
  234. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  235. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  236. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -214
  237. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  238. package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
  239. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  240. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  241. package/dist/types/interfaces/core.interface.d.ts +0 -111
  242. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  243. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  244. package/dist/types/modules/product/utils/helpers.d.ts +0 -3
  245. package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
  246. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  247. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  248. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  249. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  250. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  251. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  252. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  253. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  254. package/dist/types/utils/helper.d.ts +0 -27
  255. package/docs/ACTIONS.md +0 -1300
  256. package/docs/BROWSER_SUPPORT.md +0 -279
  257. package/docs/CONFIGURATION.md +0 -853
  258. package/docs/DOCUMENTATION_INDEX.md +0 -311
  259. package/docs/EVENTS.md +0 -798
  260. package/docs/PROXY.md +0 -228
  261. package/docs/THEMING.md +0 -589
  262. package/docs/TROUBLESHOOTING.md +0 -793
  263. package/umd/elements.js +0 -1
  264. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  265. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  266. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  267. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  268. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  269. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  270. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  271. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  272. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  273. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  274. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
package/docs/THEMING.md DELETED
@@ -1,589 +0,0 @@
1
- # Theming Guide
2
-
3
- Complete reference for customizing the appearance of LiquidCommerce Elements SDK components based on actual SDK interfaces.
4
-
5
- ## Overview
6
-
7
- The SDK provides theme customization through the `customTheme` configuration option. Theme configuration uses a hierarchical structure with global and component-specific settings.
8
-
9
- ## Basic Usage
10
-
11
- ```javascript
12
- const client = await Elements('YOUR_API_KEY', {
13
- customTheme: {
14
- global: {
15
- theme: { /* global theme */ },
16
- layout: { /* global layout */ }
17
- },
18
- product: { /* product theme */ },
19
- cart: { /* cart theme */ },
20
- checkout: { /* checkout theme */ },
21
- address: { /* address theme */ }
22
- }
23
- });
24
- ```
25
-
26
- ## Global Configuration
27
-
28
- ### Global Theme
29
-
30
- ```typescript
31
- interface IGlobalTheme {
32
- buttonCornerRadius: string;
33
- cardCornerRadius: string;
34
- headingFont: IFontFamily;
35
- paragraphFont: IFontFamily;
36
- primaryColor: string;
37
- accentColor: string;
38
- defaultTextColor: string;
39
- selectedTextColor: string;
40
- errorColor: string;
41
- warningColor: string;
42
- successColor: string;
43
- drawerBackgroundColor: string;
44
- }
45
-
46
- interface IFontFamily {
47
- name: string;
48
- weights: number[];
49
- }
50
- ```
51
-
52
- **Example:**
53
- ```javascript
54
- customTheme: {
55
- global: {
56
- theme: {
57
- buttonCornerRadius: '8px',
58
- cardCornerRadius: '12px',
59
- headingFont: {
60
- name: 'Inter',
61
- weights: [600, 700]
62
- },
63
- paragraphFont: {
64
- name: 'Inter',
65
- weights: [400, 500]
66
- },
67
- primaryColor: '#007bff',
68
- accentColor: '#6c757d',
69
- defaultTextColor: '#212529',
70
- selectedTextColor: '#ffffff',
71
- errorColor: '#dc3545',
72
- warningColor: '#ffc107',
73
- successColor: '#28a745',
74
- drawerBackgroundColor: '#ffffff'
75
- }
76
- }
77
- }
78
- ```
79
-
80
- ### Global Layout
81
-
82
- ```typescript
83
- interface IGlobalLayout {
84
- enablePersonalization: boolean;
85
- personalizationText: string;
86
- personalizationCardStyle: 'outlined' | 'filled';
87
- allowPromoCodes: boolean;
88
- inputFieldStyle: 'outlined' | 'filled';
89
- showPoweredBy: boolean; // ⚠️ READ-ONLY: Cannot be customized (paid feature)
90
- poweredByMode: 'light' | 'dark'; // Can be customized
91
- }
92
- ```
93
-
94
- **⚠️ Protected Field**: `showPoweredBy` is controlled by LiquidCommerce and cannot be overridden through custom theme configuration. This is a paid feature managed through your LiquidCommerce dashboard. However, `poweredByMode` can be customized to match your site's theme (light or dark).
95
-
96
- **Example:**
97
- ```javascript
98
- customTheme: {
99
- global: {
100
- layout: {
101
- enablePersonalization: true,
102
- personalizationText: 'Personalize your product',
103
- personalizationCardStyle: 'outlined',
104
- allowPromoCodes: true,
105
- inputFieldStyle: 'filled',
106
- poweredByMode: 'dark' // Can be customized (light or dark)
107
- // Note: showPoweredBy is read-only and cannot be customized here
108
- }
109
- }
110
- }
111
- ```
112
-
113
- ### Personalization (Engraving) Configuration
114
-
115
- The personalization feature is controlled globally and affects how engraving appears across all contexts (product, cart, and checkout).
116
-
117
- **Configuration Options:**
118
-
119
- - **`enablePersonalization`** (boolean): Master switch to enable/disable personalization feature globally. When `false`, engraving options won't appear even for engravable products.
120
-
121
- - **`personalizationText`** (string): The text shown on the "Add Personalization" button in product views. This is the call-to-action that customers see before adding engraving.
122
-
123
- - **`personalizationCardStyle`** ('outlined' | 'filled'): Controls the visual style of personalization cards displayed in cart and checkout:
124
- - `'outlined'`: Border-based style with transparent background
125
- - `'filled'`: Filled background style
126
-
127
- **Context-Specific Behavior:**
128
-
129
- The SDK intelligently displays personalization differently based on context:
130
-
131
- 1. **Product View:** Shows button with `personalizationText` and engraving fee (e.g., "Personalize your product +$5.00")
132
-
133
- 2. **Cart View:** Displays engraving details in a card with edit/remove buttons using the `personalizationCardStyle`
134
-
135
- 3. **Checkout View:** Shows engraving details in a card (read-only) with only remove button using the `personalizationCardStyle`
136
-
137
- **Example Configurations:**
138
-
139
- ```javascript
140
- // Minimal personalization (use defaults)
141
- customTheme: {
142
- global: {
143
- layout: {
144
- enablePersonalization: true
145
- }
146
- }
147
- }
148
-
149
- // Custom personalization styling
150
- customTheme: {
151
- global: {
152
- layout: {
153
- enablePersonalization: true,
154
- personalizationText: 'Make it yours',
155
- personalizationCardStyle: 'filled'
156
- }
157
- }
158
- }
159
-
160
- // Disable personalization globally
161
- customTheme: {
162
- global: {
163
- layout: {
164
- enablePersonalization: false
165
- }
166
- }
167
- }
168
- ```
169
-
170
- **Note:** Individual products determine if they support engraving based on product metadata. The global setting only controls whether the feature is available when products support it.
171
-
172
- ## Product Component
173
-
174
- ```typescript
175
- interface IProductComponent {
176
- theme: {
177
- backgroundColor: string;
178
- };
179
- layout: {
180
- showImages: boolean;
181
- showTitle: boolean;
182
- showDescription: boolean;
183
- showQuantityCounter: boolean;
184
- showOffHours: boolean;
185
- quantityCounterStyle: 'outlined' | 'ghost';
186
- fulfillmentDisplay: 'carousel' | 'popup';
187
- enableShippingFulfillment: boolean;
188
- enableOnDemandFulfillment: boolean;
189
- addToCartButtonText: string;
190
- addToCartButtonShowTotalPrice: boolean;
191
- buyNowButtonText: string;
192
- preSaleButtonText: string;
193
- };
194
- }
195
- ```
196
-
197
- **Example:**
198
- ```javascript
199
- customTheme: {
200
- product: {
201
- theme: {
202
- backgroundColor: '#ffffff'
203
- },
204
- layout: {
205
- showImages: true,
206
- showTitle: true,
207
- showDescription: true,
208
- showQuantityCounter: true,
209
- showOffHours: false,
210
- quantityCounterStyle: 'outlined',
211
- fulfillmentDisplay: 'carousel',
212
- enableShippingFulfillment: true,
213
- enableOnDemandFulfillment: true,
214
- addToCartButtonText: 'Add to Cart',
215
- addToCartButtonShowTotalPrice: true,
216
- buyNowButtonText: 'Buy Now',
217
- preSaleButtonText: 'Pre-Order'
218
- }
219
- }
220
- }
221
- ```
222
-
223
- ## Cart Component
224
-
225
- ```typescript
226
- interface ICartComponent {
227
- theme: {
228
- backgroundColor: string;
229
- };
230
- layout: {
231
- showQuantityCounter: boolean;
232
- quantityCounterStyle: 'outlined' | 'ghost';
233
- drawerHeaderText: string;
234
- goToCheckoutButtonText: string;
235
- };
236
- }
237
- ```
238
-
239
- **Example:**
240
- ```javascript
241
- customTheme: {
242
- cart: {
243
- theme: {
244
- backgroundColor: '#ffffff'
245
- },
246
- layout: {
247
- showQuantityCounter: true,
248
- quantityCounterStyle: 'outlined',
249
- drawerHeaderText: 'Your Cart',
250
- goToCheckoutButtonText: 'Proceed to Checkout'
251
- }
252
- }
253
- }
254
- ```
255
-
256
- ## Checkout Component
257
-
258
- ```typescript
259
- interface ICheckoutComponent {
260
- theme: {
261
- backgroundColor: string;
262
- checkoutCompleted: {
263
- customLogo: string;
264
- customText: string | null;
265
- };
266
- };
267
- layout: {
268
- emailOptIn: {
269
- show: boolean;
270
- checked: boolean;
271
- text: string;
272
- };
273
- smsOptIn: {
274
- show: boolean;
275
- checked: boolean;
276
- text: string;
277
- };
278
- allowGiftCards: boolean;
279
- legalMessage: {
280
- show: boolean;
281
- text: string;
282
- };
283
- exitUrl: string;
284
- thankYouButtonText: string;
285
- drawerHeaderText: string;
286
- placeOrderButtonText: string;
287
- };
288
- }
289
- ```
290
-
291
- **Example:**
292
- ```javascript
293
- customTheme: {
294
- checkout: {
295
- theme: {
296
- backgroundColor: '#ffffff',
297
- checkoutCompleted: {
298
- customLogo: 'https://yourdomain.com/logo.png',
299
- customText: 'Thank you for your order!'
300
- }
301
- },
302
- layout: {
303
- emailOptIn: {
304
- show: true,
305
- checked: false,
306
- text: 'Send me marketing emails'
307
- },
308
- smsOptIn: {
309
- show: true,
310
- checked: false,
311
- text: 'Send me SMS updates'
312
- },
313
- allowGiftCards: true,
314
- legalMessage: {
315
- show: true,
316
- text: 'By placing this order, you agree to our terms and conditions.'
317
- },
318
- exitUrl: '/',
319
- thankYouButtonText: 'Continue Shopping',
320
- drawerHeaderText: 'Checkout',
321
- placeOrderButtonText: 'Place Order'
322
- }
323
- }
324
- }
325
- ```
326
-
327
- ## Address Component
328
-
329
- ```typescript
330
- interface IAddressComponent {
331
- theme: {
332
- backgroundColor: string;
333
- };
334
- }
335
- ```
336
-
337
- **Example:**
338
- ```javascript
339
- customTheme: {
340
- address: {
341
- theme: {
342
- backgroundColor: '#ffffff'
343
- }
344
- }
345
- }
346
- ```
347
-
348
- ## Complete Configuration Example
349
-
350
- ```javascript
351
- const client = await Elements('YOUR_API_KEY', {
352
- env: 'production',
353
- customTheme: {
354
- global: {
355
- theme: {
356
- buttonCornerRadius: '8px',
357
- cardCornerRadius: '12px',
358
- headingFont: {
359
- name: 'Inter',
360
- weights: [600, 700]
361
- },
362
- paragraphFont: {
363
- name: 'Inter',
364
- weights: [400, 500]
365
- },
366
- primaryColor: '#007bff',
367
- accentColor: '#6c757d',
368
- defaultTextColor: '#212529',
369
- selectedTextColor: '#ffffff',
370
- errorColor: '#dc3545',
371
- warningColor: '#ffc107',
372
- successColor: '#28a745',
373
- drawerBackgroundColor: '#ffffff'
374
- },
375
- layout: {
376
- enablePersonalization: true,
377
- personalizationText: 'Make it yours',
378
- personalizationCardStyle: 'outlined',
379
- allowPromoCodes: true,
380
- inputFieldStyle: 'filled',
381
- poweredByMode: 'light'
382
- }
383
- },
384
- product: {
385
- theme: {
386
- backgroundColor: '#ffffff'
387
- },
388
- layout: {
389
- showImages: true,
390
- showTitle: true,
391
- showDescription: true,
392
- showQuantityCounter: true,
393
- showOffHours: false,
394
- quantityCounterStyle: 'outlined',
395
- fulfillmentDisplay: 'carousel',
396
- enableShippingFulfillment: true,
397
- enableOnDemandFulfillment: true,
398
- addToCartButtonText: 'Add to Cart',
399
- addToCartButtonShowTotalPrice: true,
400
- buyNowButtonText: 'Buy Now',
401
- preSaleButtonText: 'Pre-Order'
402
- }
403
- },
404
- cart: {
405
- theme: {
406
- backgroundColor: '#ffffff'
407
- },
408
- layout: {
409
- showQuantityCounter: true,
410
- quantityCounterStyle: 'outlined',
411
- drawerHeaderText: 'Your Cart',
412
- goToCheckoutButtonText: 'Checkout'
413
- }
414
- },
415
- checkout: {
416
- theme: {
417
- backgroundColor: '#ffffff',
418
- checkoutCompleted: {
419
- customLogo: 'https://yourdomain.com/logo.png',
420
- customText: null
421
- }
422
- },
423
- layout: {
424
- emailOptIn: {
425
- show: true,
426
- checked: false,
427
- text: 'Email me with news and offers'
428
- },
429
- smsOptIn: {
430
- show: true,
431
- checked: false,
432
- text: 'Text me with updates'
433
- },
434
- allowGiftCards: true,
435
- legalMessage: {
436
- show: false,
437
- text: ''
438
- },
439
- exitUrl: '/',
440
- thankYouButtonText: 'Continue Shopping',
441
- drawerHeaderText: 'Checkout',
442
- placeOrderButtonText: 'Place Order'
443
- }
444
- },
445
- address: {
446
- theme: {
447
- backgroundColor: '#ffffff'
448
- }
449
- }
450
- }
451
- });
452
- ```
453
-
454
- ## Dynamic Theme Updates (Builder Mode)
455
-
456
- When `isBuilder: true`, update themes dynamically:
457
-
458
- ```javascript
459
- const client = await Elements('YOUR_API_KEY', {
460
- env: 'development',
461
- isBuilder: true
462
- });
463
-
464
- // Update global theme
465
- await client.builder.updateComponentGlobalConfigs({
466
- theme: {
467
- primaryColor: '#ff6b6b'
468
- }
469
- });
470
-
471
- // Update product component
472
- await client.builder.updateProductComponent({
473
- layout: {
474
- addToCartButtonText: 'Add to Bag'
475
- }
476
- });
477
-
478
- // Update cart component
479
- client.builder.updateCartComponent({
480
- layout: {
481
- drawerHeaderText: 'Shopping Bag'
482
- }
483
- });
484
-
485
- // Update checkout component
486
- client.builder.updateCheckoutComponent({
487
- layout: {
488
- placeOrderButtonText: 'Complete Purchase'
489
- }
490
- });
491
-
492
- // Update address component
493
- client.builder.updateAddressComponent({
494
- theme: {
495
- backgroundColor: '#f8f9fa'
496
- }
497
- });
498
- ```
499
-
500
- ## TypeScript Support
501
-
502
- The SDK includes full TypeScript definitions:
503
-
504
- ```typescript
505
- import type {
506
- IClientCustomThemeConfig,
507
- UpdateComponentGlobalConfigs,
508
- UpdateProductComponent,
509
- UpdateCartComponent,
510
- UpdateCheckoutComponent,
511
- UpdateAddressComponent
512
- } from '@liquidcommerce/elements-sdk';
513
-
514
- const customTheme: IClientCustomThemeConfig = {
515
- global: {
516
- theme: {
517
- primaryColor: '#007bff'
518
- }
519
- }
520
- };
521
- ```
522
-
523
- ## Theme Presets
524
-
525
- ### Minimal
526
-
527
- ```javascript
528
- customTheme: {
529
- global: {
530
- theme: {
531
- buttonCornerRadius: '4px',
532
- cardCornerRadius: '4px',
533
- primaryColor: '#000000',
534
- accentColor: '#666666'
535
- }
536
- }
537
- }
538
- ```
539
-
540
- ### Rounded
541
-
542
- ```javascript
543
- customTheme: {
544
- global: {
545
- theme: {
546
- buttonCornerRadius: '24px',
547
- cardCornerRadius: '16px'
548
- }
549
- }
550
- }
551
- ```
552
-
553
- ### Bold Colors
554
-
555
- ```javascript
556
- customTheme: {
557
- global: {
558
- theme: {
559
- primaryColor: '#ff4757',
560
- accentColor: '#5f27cd',
561
- successColor: '#1dd1a1',
562
- errorColor: '#ee5a6f'
563
- }
564
- }
565
- }
566
- ```
567
-
568
- ## Best Practices
569
-
570
- 1. **Start minimal** - Only override what you need
571
- 2. **Maintain consistency** - Use consistent corner radius and colors across components
572
- 3. **Test accessibility** - Ensure sufficient color contrast
573
- 4. **Use web fonts** - Load fonts before initializing SDK for smooth rendering
574
- 5. **Match your brand** - Use your existing brand colors and typography
575
- 6. **Test on mobile** - Verify appearance on different screen sizes
576
- 7. **Use TypeScript** - Leverage type checking to avoid errors
577
- 8. **Document your theme** - Keep a reference of your theme customizations
578
-
579
- ## Limitations
580
-
581
- - Theme configuration is deep-merged with default theme
582
- - Some UI elements may not be customizable (core functionality)
583
- - Font loading is your responsibility (load fonts before SDK init)
584
- - Background colors apply to drawer containers, not individual elements
585
-
586
- ## Related Documentation
587
-
588
- - [Configuration Reference](./CONFIGURATION.md) - All SDK configuration options
589
- - [Troubleshooting Guide](./TROUBLESHOOTING.md) - Common theming issues