@shopgate/engage 7.32.0-beta.1 → 7.32.0-beta.11

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 (623) hide show
  1. package/README.md +0 -1
  2. package/account/components/Profile/Profile.provider.d.ts +1 -1
  3. package/account/components/Profile/ProfileAddressBook.d.ts.map +1 -1
  4. package/account/components/Profile/ProfileAddressBook.js +13 -22
  5. package/account/components/Profile/ProfileAddressCard.d.ts.map +1 -1
  6. package/account/components/Profile/ProfileAddressCard.js +9 -18
  7. package/account/components/Profile/ProfileForm.d.ts.map +1 -1
  8. package/account/components/Profile/ProfileForm.js +15 -42
  9. package/account/components/ProfileContact/ProfileContact.js +13 -21
  10. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts +2 -1
  11. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts.map +1 -1
  12. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.js +61 -5
  13. package/admin-preview/components/FrontendSettingsPreviewBridge/helpers.d.ts +7 -1
  14. package/admin-preview/components/FrontendSettingsPreviewBridge/helpers.d.ts.map +1 -1
  15. package/admin-preview/components/FrontendSettingsPreviewBridge/helpers.js +14 -2
  16. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts +15 -2
  17. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts.map +1 -1
  18. package/admin-preview/constants/index.d.ts +0 -12
  19. package/admin-preview/constants/index.d.ts.map +1 -1
  20. package/admin-preview/constants/index.js +0 -16
  21. package/admin-preview/helpers/_internal/detection.d.ts +53 -0
  22. package/admin-preview/helpers/_internal/detection.d.ts.map +1 -0
  23. package/admin-preview/helpers/_internal/detection.js +93 -0
  24. package/admin-preview/helpers/index.d.ts +7 -0
  25. package/admin-preview/helpers/index.d.ts.map +1 -1
  26. package/admin-preview/helpers/index.js +12 -4
  27. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts +32 -0
  28. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts.map +1 -0
  29. package/admin-preview/initialization/_internal/initialFrontendSettings.js +43 -0
  30. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts +22 -0
  31. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts.map +1 -0
  32. package/admin-preview/initialization/awaitInitialFrontendSettings.js +84 -0
  33. package/back-in-stock/components/BackInStockButton/index.js +5 -5
  34. package/back-in-stock/components/Subscriptions/components/Subscription/index.js +2 -5
  35. package/cart/components/CartItem/CartItemProductLayout.js +2 -1
  36. package/cart/components/CartItem/CartItemProductLayoutWide.js +2 -2
  37. package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +7 -14
  38. package/cart/components/CartItem/CartItemProductProvider.connector.js +0 -2
  39. package/cart/components/CartItem/CartItemProductProvider.js +3 -30
  40. package/cart/components/CartItem/CartItemProductProvider.types.js +0 -1
  41. package/cart/components/CartItem/CartItemQuantityPicker.js +1 -0
  42. package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +6 -24
  43. package/cart/components/CartItems/CartItems.js +8 -10
  44. package/cart/components/CartItems/CartItemsSubstitution.js +3 -2
  45. package/cart/components/CartSummaryWide/CartSummaryWide.js +2 -2
  46. package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +9 -23
  47. package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +8 -30
  48. package/cart/components/PaymentBar/PaymentBarContent.js +1 -1
  49. package/cart/components/PaymentBar/testUtils/mockFactories.js +4 -11
  50. package/category/components/CategoryImage/index.js +24 -17
  51. package/checkout/components/AddressBook/AddressList.js +14 -23
  52. package/checkout/components/Checkout/CheckoutActions.js +4 -3
  53. package/checkout/components/Checkout/CheckoutAddress.js +8 -0
  54. package/checkout/components/Checkout/CheckoutSection.js +6 -2
  55. package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +6 -7
  56. package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +7 -17
  57. package/components/Badge/Badge.d.ts +30 -0
  58. package/components/Badge/Badge.d.ts.map +1 -0
  59. package/components/Badge/Badge.js +48 -0
  60. package/components/Badge/index.d.ts +3 -0
  61. package/components/Badge/index.d.ts.map +1 -0
  62. package/components/Badge/index.js +1 -0
  63. package/components/Card/Card.d.ts +27 -0
  64. package/components/Card/Card.d.ts.map +1 -0
  65. package/components/Card/Card.js +57 -0
  66. package/components/Card/index.d.ts +4 -0
  67. package/components/Card/index.d.ts.map +1 -0
  68. package/components/Card/index.js +2 -0
  69. package/components/Card/useCardAppearance.d.ts +11 -0
  70. package/components/Card/useCardAppearance.d.ts.map +1 -0
  71. package/components/Card/useCardAppearance.js +22 -0
  72. package/components/ChipLayout/index.js +2 -4
  73. package/components/Logo/index.d.ts.map +1 -1
  74. package/components/Logo/index.js +3 -6
  75. package/components/NavigationHandler/connector.js +1 -1
  76. package/components/NavigationHandler/index.d.ts +2 -2
  77. package/components/Paper/Paper.d.ts +48 -0
  78. package/components/Paper/Paper.d.ts.map +1 -0
  79. package/components/Paper/Paper.js +64 -0
  80. package/components/Paper/index.d.ts +3 -0
  81. package/components/Paper/index.d.ts.map +1 -0
  82. package/components/Paper/index.js +1 -0
  83. package/components/PickerUtilize/index.d.ts +2 -1
  84. package/components/PickerUtilize/index.d.ts.map +1 -1
  85. package/components/RadioCard/RadioCard.d.ts.map +1 -1
  86. package/components/RadioCard/RadioCard.js +2 -1
  87. package/components/SheetList/components/Item/index.js +8 -8
  88. package/components/Tabs/components/Tab.d.ts.map +1 -1
  89. package/components/Tabs/components/Tab.js +14 -16
  90. package/components/Typography/Typography.d.ts +1 -1
  91. package/components/View/components/Above/index.d.ts.map +1 -1
  92. package/components/View/components/Above/index.js +3 -1
  93. package/components/View/components/Below/index.d.ts.map +1 -1
  94. package/components/View/components/Below/index.js +3 -1
  95. package/components/View/components/Content/index.d.ts +2 -1
  96. package/components/View/components/Content/index.d.ts.map +1 -1
  97. package/components/View/components/Content/index.js +4 -1
  98. package/components/constants.d.ts +6 -0
  99. package/components/constants.d.ts.map +1 -0
  100. package/components/index.d.ts +5 -1
  101. package/components/index.d.ts.map +1 -1
  102. package/components/index.js +4 -2
  103. package/components/v2/Button/Button.d.ts +24 -13
  104. package/components/v2/Button/Button.d.ts.map +1 -1
  105. package/components/v2/Button/Button.js +139 -41
  106. package/components/v2/ButtonBase/ButtonBase.d.ts +50 -10
  107. package/components/v2/ButtonBase/ButtonBase.d.ts.map +1 -1
  108. package/components/v2/ButtonBase/ButtonBase.js +192 -17
  109. package/components/v2/ButtonBase/Ripple.d.ts +2 -1
  110. package/components/v2/ButtonBase/Ripple.d.ts.map +1 -1
  111. package/components/v2/ButtonBase/hooks.d.ts +0 -1
  112. package/components/v2/ButtonBase/hooks.d.ts.map +1 -1
  113. package/components/v2/ButtonBase/hooks.js +36 -12
  114. package/components/v2/ButtonGroup/ButtonGroup.d.ts +11 -5
  115. package/components/v2/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  116. package/components/v2/ButtonGroup/ButtonGroup.js +49 -26
  117. package/components/v2/CircularProgress/CircularProgress.d.ts.map +1 -1
  118. package/components/v2/CircularProgress/CircularProgress.js +10 -5
  119. package/core/helpers/getFullImageSource.d.ts +5 -1
  120. package/core/helpers/getFullImageSource.d.ts.map +1 -1
  121. package/core/helpers/getFullImageSource.js +30 -14
  122. package/core/helpers/i18n.d.ts +4 -0
  123. package/core/helpers/i18n.d.ts.map +1 -1
  124. package/core/helpers/i18n.js +3 -0
  125. package/core/hooks/events/appEvents.d.ts +31 -46
  126. package/core/hooks/events/appEvents.d.ts.map +1 -0
  127. package/core/hooks/events/appEvents.js +26 -29
  128. package/core/hooks/events/index.d.ts +4 -4
  129. package/core/hooks/events/index.d.ts.map +1 -1
  130. package/core/hooks/events/useLongPress.d.ts +55 -58
  131. package/core/hooks/events/useLongPress.d.ts.map +1 -0
  132. package/core/hooks/events/useLongPress.js +23 -16
  133. package/core/hooks/events/usePressHandler.d.ts +32 -21
  134. package/core/hooks/events/usePressHandler.d.ts.map +1 -1
  135. package/core/hooks/events/usePressHandler.js +12 -10
  136. package/core/hooks/events/useScrollDirectionChange.d.ts +72 -61
  137. package/core/hooks/events/useScrollDirectionChange.d.ts.map +1 -0
  138. package/core/hooks/events/useScrollDirectionChange.js +36 -43
  139. package/core/hooks/html/useLoadImage.d.ts +3 -3
  140. package/core/hooks/html/useLoadImage.d.ts.map +1 -1
  141. package/core/hooks/html/useLoadImage.js +2 -2
  142. package/core/hooks/useLocalStorage.d.ts +8 -0
  143. package/core/hooks/useLocalStorage.d.ts.map +1 -1
  144. package/core/hooks/useLocalStorage.js +22 -15
  145. package/core/hooks/useNavigation.d.ts +10 -2
  146. package/core/hooks/useNavigation.d.ts.map +1 -1
  147. package/core/hooks/useNavigation.js +1 -2
  148. package/core/initialization/fetchSettings.d.ts +12 -0
  149. package/core/initialization/fetchSettings.d.ts.map +1 -0
  150. package/core/initialization/fetchSettings.js +134 -0
  151. package/core/initialization/index.d.ts +33 -2
  152. package/core/initialization/index.d.ts.map +1 -1
  153. package/core/initialization/index.js +44 -103
  154. package/core/router/conductor.d.ts +9 -0
  155. package/core/router/helpers.d.ts +28 -15
  156. package/core/router/helpers.d.ts.map +1 -1
  157. package/core/router/helpers.js +8 -8
  158. package/development/action-creators/index.d.ts +3 -0
  159. package/development/action-creators/index.d.ts.map +1 -0
  160. package/development/action-creators/settings.d.ts +45 -0
  161. package/development/action-creators/settings.d.ts.map +1 -0
  162. package/development/action-creators/settings.js +21 -10
  163. package/development/action-creators/storage.d.ts +17 -0
  164. package/development/action-creators/storage.d.ts.map +1 -0
  165. package/development/action-creators/storage.js +7 -4
  166. package/development/components/ClientInformation/ClientInformation.d.ts +6 -0
  167. package/development/components/ClientInformation/ClientInformation.d.ts.map +1 -0
  168. package/development/components/ClientInformation/ClientInformation.js +7 -4
  169. package/development/components/ClientInformation/actions.d.ts +6 -0
  170. package/development/components/ClientInformation/actions.d.ts.map +1 -0
  171. package/development/components/ClientInformation/actions.js +1 -1
  172. package/development/components/ClientInformation/index.d.ts +2 -0
  173. package/development/components/ClientInformation/index.d.ts.map +1 -0
  174. package/development/components/DevelopmentSettings/DevelopmentSettings.d.ts +16 -0
  175. package/development/components/DevelopmentSettings/DevelopmentSettings.d.ts.map +1 -0
  176. package/development/components/DevelopmentSettings/DevelopmentSettings.js +43 -30
  177. package/development/components/DevelopmentSettings/index.d.ts +2 -0
  178. package/development/components/DevelopmentSettings/index.d.ts.map +1 -0
  179. package/development/components/DevelopmentTools/DevelopmentTools.d.ts +10 -0
  180. package/development/components/DevelopmentTools/DevelopmentTools.d.ts.map +1 -0
  181. package/development/components/DevelopmentTools/DevelopmentTools.js +8 -8
  182. package/development/components/DevelopmentTools/Shortcuts.d.ts +6 -0
  183. package/development/components/DevelopmentTools/Shortcuts.d.ts.map +1 -0
  184. package/development/components/DevelopmentTools/Shortcuts.js +0 -1
  185. package/development/components/DevelopmentTools/hooks.d.ts +8 -0
  186. package/development/components/DevelopmentTools/hooks.d.ts.map +1 -0
  187. package/development/components/DevelopmentTools/hooks.js +2 -3
  188. package/development/components/DevelopmentTools/index.d.ts +2 -0
  189. package/development/components/DevelopmentTools/index.d.ts.map +1 -0
  190. package/development/components/SimulatedInsets/SimulatedInsetBottom.d.ts +7 -0
  191. package/development/components/SimulatedInsets/SimulatedInsetBottom.d.ts.map +1 -0
  192. package/development/components/SimulatedInsets/SimulatedInsetBottom.js +4 -9
  193. package/development/components/SimulatedInsets/SimulatedInsetTop.d.ts +7 -0
  194. package/development/components/SimulatedInsets/SimulatedInsetTop.d.ts.map +1 -0
  195. package/development/components/SimulatedInsets/SimulatedInsetTop.js +4 -9
  196. package/development/components/SimulatedInsets/SimulatedInsets.d.ts +13 -0
  197. package/development/components/SimulatedInsets/SimulatedInsets.d.ts.map +1 -0
  198. package/development/components/SimulatedInsets/SimulatedInsets.js +2 -7
  199. package/development/components/SimulatedInsets/index.d.ts +2 -0
  200. package/development/components/SimulatedInsets/index.d.ts.map +1 -0
  201. package/development/components/SimulatedInsets/types.d.ts +15 -0
  202. package/development/components/SimulatedInsets/types.d.ts.map +1 -0
  203. package/development/components/SimulatedInsets/types.js +1 -0
  204. package/development/components/index.d.ts +3 -0
  205. package/development/components/index.d.ts.map +1 -0
  206. package/development/constants/actionTypes.d.ts +6 -0
  207. package/development/constants/actionTypes.d.ts.map +1 -0
  208. package/development/constants/actionTypes.js +2 -1
  209. package/development/constants/index.d.ts +2 -0
  210. package/development/constants/index.d.ts.map +1 -0
  211. package/development/reducers/index.d.ts +24 -0
  212. package/development/reducers/index.d.ts.map +1 -0
  213. package/development/reducers/settings.d.ts +17 -0
  214. package/development/reducers/settings.d.ts.map +1 -0
  215. package/development/reducers/settings.js +48 -35
  216. package/development/reducers/storage.d.ts +17 -0
  217. package/development/reducers/storage.d.ts.map +1 -0
  218. package/development/reducers/storage.js +24 -24
  219. package/development/selectors/index.d.ts +3 -0
  220. package/development/selectors/index.d.ts.map +1 -0
  221. package/development/selectors/settings.d.ts +52 -0
  222. package/development/selectors/settings.d.ts.map +1 -0
  223. package/development/selectors/settings.js +21 -11
  224. package/development/selectors/storage.d.ts +10 -0
  225. package/development/selectors/storage.d.ts.map +1 -0
  226. package/development/selectors/storage.js +6 -18
  227. package/development/streams/index.d.ts +2 -0
  228. package/development/streams/index.d.ts.map +1 -0
  229. package/development/streams/insets.d.ts +8 -0
  230. package/development/streams/insets.d.ts.map +1 -0
  231. package/development/streams/insets.js +1 -3
  232. package/development/subscriptions/index.d.ts +15 -0
  233. package/development/subscriptions/index.d.ts.map +1 -0
  234. package/development/subscriptions/index.js +6 -2
  235. package/development/types/development.d.ts +68 -0
  236. package/development/types/development.d.ts.map +1 -0
  237. package/development/types/development.js +1 -0
  238. package/development/types/index.d.ts +2 -0
  239. package/development/types/index.d.ts.map +1 -0
  240. package/development/types/index.js +1 -0
  241. package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +7 -17
  242. package/favorites/components/Item/Item.d.ts +1 -1
  243. package/favorites/components/Item/Item.d.ts.map +1 -1
  244. package/favorites/components/Item/Item.js +7 -7
  245. package/favorites/components/List/List.d.ts +1 -1
  246. package/favorites/components/List/List.d.ts.map +1 -1
  247. package/favorites/components/List/List.js +0 -1
  248. package/favorites/components/List/ListContent.js +4 -5
  249. package/favorites/components/Lists/Lists.js +17 -6
  250. package/filter/components/FilterPageContent/components/ApplyButton/index.js +8 -10
  251. package/filter/components/FilterPageContent/components/ResetButton/index.js +8 -6
  252. package/filter/components/PriceSlider/index.js +6 -1
  253. package/locations/components/ChangeLocationButton/ChangeLocationButton.js +10 -14
  254. package/locations/components/FulfillmentSheet/FulfillmentSheetContent.js +4 -8
  255. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +4 -8
  256. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +1 -1
  257. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +9 -18
  258. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +10 -10
  259. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +9 -19
  260. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +9 -10
  261. package/locations/components/ReserveForm/ReserveForm.js +6 -7
  262. package/locations/components/StoreDetails/components/GetDirectionsButton.js +2 -4
  263. package/locations/components/StoreDetails/components/StoreDetails.js +5 -10
  264. package/locations/components/StoreDetails/components/StoresNearbyListItem.js +13 -21
  265. package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +5 -11
  266. package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +5 -11
  267. package/locations/components/StoreList/StoreListProduct.js +2 -3
  268. package/locations/components/StoreList/StoreListSearch.js +1 -0
  269. package/locations/components/StoreList/StoreSelectLocationButton.js +5 -11
  270. package/login/components/ForgotPassword/ForgotPassword.js +11 -23
  271. package/mocks/date.js +31 -0
  272. package/mocks/index.js +3 -0
  273. package/mocks/pipelineRequest.js +1 -0
  274. package/mocks/subscriptions.js +1 -0
  275. package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +5 -7
  276. package/orders/components/OrderHistory/OrderHistoryList.d.ts.map +1 -1
  277. package/orders/components/OrderHistory/OrderHistoryList.js +8 -9
  278. package/orders/components/OrderHistory/OrderHistoryTable.d.ts.map +1 -1
  279. package/orders/components/OrderHistory/OrderHistoryTable.js +4 -0
  280. package/package.json +12 -12
  281. package/page/components/NotFound.d.ts +7 -0
  282. package/page/components/NotFound.d.ts.map +1 -0
  283. package/page/components/NotFound.js +8 -8
  284. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts +52 -0
  285. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts.map +1 -0
  286. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.js +4 -4
  287. package/page/components/ResponsiveWidgetImage/index.d.ts +2 -0
  288. package/page/components/ResponsiveWidgetImage/index.d.ts.map +1 -0
  289. package/page/components/WidgetRichText/WidgetRichText.d.ts +25 -0
  290. package/page/components/WidgetRichText/WidgetRichText.d.ts.map +1 -0
  291. package/page/components/WidgetRichText/index.d.ts +2 -0
  292. package/page/components/WidgetRichText/index.d.ts.map +1 -0
  293. package/page/components/WidgetVideo/WidgetVideo.d.ts +43 -0
  294. package/page/components/WidgetVideo/WidgetVideo.d.ts.map +1 -0
  295. package/page/components/WidgetVideo/WidgetVideo.js +33 -39
  296. package/page/components/WidgetVideo/index.d.ts +2 -0
  297. package/page/components/WidgetVideo/index.d.ts.map +1 -0
  298. package/page/components/Widgets/Overlay.d.ts +17 -0
  299. package/page/components/Widgets/Overlay.d.ts.map +1 -0
  300. package/page/components/Widgets/Overlay.js +24 -38
  301. package/page/components/Widgets/Tooltip.d.ts +20 -0
  302. package/page/components/Widgets/Tooltip.d.ts.map +1 -0
  303. package/page/components/Widgets/Tooltip.js +6 -10
  304. package/page/components/Widgets/Widget.d.ts +32 -0
  305. package/page/components/Widgets/Widget.d.ts.map +1 -0
  306. package/page/components/Widgets/Widget.js +7 -18
  307. package/page/components/Widgets/WidgetContext.d.ts +32 -38
  308. package/page/components/Widgets/WidgetContext.d.ts.map +1 -0
  309. package/page/components/Widgets/WidgetContext.js +2 -8
  310. package/page/components/Widgets/WidgetProvider.d.ts +25 -0
  311. package/page/components/Widgets/WidgetProvider.d.ts.map +1 -0
  312. package/page/components/Widgets/WidgetProvider.js +5 -12
  313. package/page/components/Widgets/Widgets.d.ts +16 -0
  314. package/page/components/Widgets/Widgets.d.ts.map +1 -0
  315. package/page/components/Widgets/Widgets.js +5 -12
  316. package/page/components/Widgets/WidgetsPreviewContext.d.ts +21 -0
  317. package/page/components/Widgets/WidgetsPreviewContext.d.ts.map +1 -0
  318. package/page/components/Widgets/WidgetsPreviewContext.js +5 -7
  319. package/page/components/Widgets/WidgetsPreviewProvider.d.ts +18 -0
  320. package/page/components/Widgets/WidgetsPreviewProvider.d.ts.map +1 -0
  321. package/page/components/Widgets/WidgetsPreviewProvider.js +5 -6
  322. package/page/components/Widgets/constants.d.ts +5 -0
  323. package/page/components/Widgets/constants.d.ts.map +1 -0
  324. package/page/components/Widgets/constants.js +3 -1
  325. package/page/components/Widgets/events.d.ts +38 -0
  326. package/page/components/Widgets/events.d.ts.map +1 -0
  327. package/page/components/Widgets/events.js +8 -12
  328. package/page/components/Widgets/helpers.d.ts +50 -0
  329. package/page/components/Widgets/helpers.d.ts.map +1 -0
  330. package/page/components/Widgets/helpers.js +8 -13
  331. package/page/components/Widgets/hooks.d.ts +13 -0
  332. package/page/components/Widgets/hooks.d.ts.map +1 -0
  333. package/page/components/Widgets/hooks.js +13 -11
  334. package/page/components/Widgets/index.d.ts +3 -0
  335. package/page/components/Widgets/index.d.ts.map +1 -0
  336. package/page/components/Widgets/types.d.ts +111 -113
  337. package/page/components/Widgets/types.d.ts.map +1 -0
  338. package/page/components/Widgets/types.js +1 -0
  339. package/page/components/index.d.ts +5 -0
  340. package/page/components/index.d.ts.map +1 -0
  341. package/page/constants/actionTypes.d.ts +4 -0
  342. package/page/constants/actionTypes.d.ts.map +1 -0
  343. package/page/constants/index.d.ts +25 -0
  344. package/page/constants/index.d.ts.map +1 -0
  345. package/page/constants/index.js +5 -3
  346. package/page/helpers/index.d.ts +70 -62
  347. package/page/helpers/index.d.ts.map +1 -0
  348. package/page/helpers/index.js +31 -29
  349. package/page/hooks/index.d.ts +54 -53
  350. package/page/hooks/index.d.ts.map +1 -0
  351. package/page/hooks/index.js +20 -15
  352. package/page/selectors/index.d.ts +32 -0
  353. package/page/selectors/index.d.ts.map +1 -0
  354. package/page/widgets/Button/Button.js +2 -3
  355. package/page/widgets/NestedCategoryFilter/NestedCategoryFilter.js +8 -8
  356. package/page/widgets/ProductList/ProductList.js +18 -14
  357. package/page/widgets/ProductSlider/ProductSlider.js +1 -15
  358. package/page/widgets/Video/Video.d.ts +6 -0
  359. package/page/widgets/Video/Video.d.ts.map +1 -0
  360. package/page/widgets/Video/Video.js +0 -2
  361. package/page/widgets/Video/hooks.d.ts +53 -0
  362. package/page/widgets/Video/hooks.d.ts.map +1 -0
  363. package/page/widgets/Video/hooks.js +4 -12
  364. package/page/widgets/Video/index.d.ts +2 -0
  365. package/page/widgets/Video/index.d.ts.map +1 -0
  366. package/product/components/Description/index.js +0 -2
  367. package/product/components/FilterBar/components/Content/components/FilterButton/index.js +2 -6
  368. package/product/components/FilterBar/components/Content/components/Sort/index.js +1 -5
  369. package/product/components/Media/FeaturedMedia.js +7 -1
  370. package/product/components/Media/MediaImage.js +24 -23
  371. package/product/components/Media/MediaPlaceholder.js +4 -7
  372. package/product/components/MediaSlider/components/MediaImage/index.js +6 -2
  373. package/product/components/MediaSlider/constants.js +1 -12
  374. package/product/components/OrderQuantityHint/index.js +16 -1
  375. package/product/components/ProductCard/index.js +36 -23
  376. package/product/components/ProductGrid/components/Item/components/ItemDetails/index.js +12 -4
  377. package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +3 -6
  378. package/product/components/ProductGrid/components/Item/components/ItemName/index.js +6 -1
  379. package/product/components/ProductGrid/components/Item/index.js +10 -2
  380. package/product/components/ProductGrid/components/Layout/index.js +19 -4
  381. package/product/components/ProductGrid/constants.d.ts +2 -0
  382. package/product/components/ProductGrid/constants.d.ts.map +1 -0
  383. package/product/components/ProductGrid/constants.js +1 -0
  384. package/product/components/ProductGrid/hooks.d.ts +11 -0
  385. package/product/components/ProductGrid/hooks.d.ts.map +1 -0
  386. package/product/components/ProductGrid/hooks.js +48 -0
  387. package/product/components/ProductGrid/index.js +3 -6
  388. package/product/components/ProductGridPrice/index.js +0 -1
  389. package/product/components/ProductImage/ProductImage.d.ts +42 -0
  390. package/product/components/ProductImage/ProductImage.d.ts.map +1 -0
  391. package/product/components/ProductImage/ProductImage.js +158 -0
  392. package/product/components/ProductImage/ProductImagePlaceholder.d.ts +23 -0
  393. package/product/components/ProductImage/ProductImagePlaceholder.d.ts.map +1 -0
  394. package/product/components/ProductImage/ProductImagePlaceholder.js +12 -17
  395. package/product/components/ProductImage/constants.d.ts +7 -0
  396. package/product/components/ProductImage/constants.d.ts.map +1 -0
  397. package/product/components/ProductImage/constants.js +6 -0
  398. package/product/components/ProductImage/hooks.d.ts +8 -0
  399. package/product/components/ProductImage/hooks.d.ts.map +1 -0
  400. package/product/components/ProductImage/hooks.js +32 -0
  401. package/product/components/ProductImage/index.d.ts +3 -0
  402. package/product/components/ProductImage/index.d.ts.map +1 -0
  403. package/product/components/ProductImage/index.js +1 -201
  404. package/product/components/ProductList/components/Item/index.js +5 -3
  405. package/product/components/ProductList/components/Layout/index.js +8 -20
  406. package/product/components/ProductName/ProductName.d.ts +1 -1
  407. package/product/components/ProductName/ProductName.d.ts.map +1 -1
  408. package/product/components/ProductName/ProductNameContent.d.ts +2 -1
  409. package/product/components/ProductName/ProductNameContent.d.ts.map +1 -1
  410. package/product/components/ProductRatingStars/ProductRatingStars.d.ts +1 -1
  411. package/product/components/ProductRatingStars/ProductRatingStars.js +2 -4
  412. package/product/components/ProductSlider/constants.d.ts +3 -0
  413. package/product/components/ProductSlider/constants.d.ts.map +1 -0
  414. package/product/components/ProductSlider/constants.js +2 -0
  415. package/product/components/ProductSlider/hooks.d.ts +7 -0
  416. package/product/components/ProductSlider/hooks.d.ts.map +1 -0
  417. package/product/components/ProductSlider/hooks.js +40 -0
  418. package/product/components/ProductSlider/index.js +8 -8
  419. package/product/components/Rating/index.js +2 -4
  420. package/product/components/RelationsSlider/RelationsSheet.js +1 -5
  421. package/product/components/RelationsSlider/RelationsSliderContent.js +3 -2
  422. package/product/components/RelationsSlider/constants.d.ts +3 -0
  423. package/product/components/RelationsSlider/constants.d.ts.map +1 -0
  424. package/product/components/RelationsSlider/constants.js +2 -1
  425. package/product/components/RelationsSlider/hooks.d.ts +6 -0
  426. package/product/components/RelationsSlider/hooks.d.ts.map +1 -0
  427. package/product/components/RelationsSlider/hooks.js +34 -0
  428. package/product/components/UnitQuantityPicker/UnitQuantityPicker.d.ts.map +1 -1
  429. package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +16 -34
  430. package/product/helpers/index.js +29 -11
  431. package/product/hooks/index.js +3 -1
  432. package/product/hooks/useLoadProductImage.js +4 -2
  433. package/product/hooks/useShowEmptyRatingStars.d.ts +7 -0
  434. package/product/hooks/useShowEmptyRatingStars.d.ts.map +1 -0
  435. package/product/hooks/useShowEmptyRatingStars.js +21 -0
  436. package/product/index.js +0 -1
  437. package/product/selectors/mocks/productProperties.mock.js +49 -0
  438. package/push-opt-in/components/PushOptInModal/index.js +4 -4
  439. package/registration/components/Registration/RegistrationFormActions.js +4 -4
  440. package/reviews/components/Reviews/components/AllReviewsLink/index.js +6 -6
  441. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +4 -3
  442. package/settings/action-creators/appSettings.d.ts +3 -3
  443. package/settings/action-creators/appSettings.d.ts.map +1 -1
  444. package/settings/constants/appSettings.d.ts +3 -0
  445. package/settings/constants/appSettings.d.ts.map +1 -1
  446. package/settings/constants/appSettings.js +6 -1
  447. package/settings/constants/imageSettings.d.ts +52 -0
  448. package/settings/constants/imageSettings.d.ts.map +1 -0
  449. package/settings/constants/imageSettings.js +69 -0
  450. package/settings/helpers/index.d.ts +3 -0
  451. package/settings/helpers/index.d.ts.map +1 -0
  452. package/settings/helpers/index.js +1 -0
  453. package/settings/helpers/resolveImageSettings.d.ts +70 -0
  454. package/settings/helpers/resolveImageSettings.d.ts.map +1 -0
  455. package/settings/helpers/resolveImageSettings.js +171 -0
  456. package/settings/helpers/toImageQuality.d.ts +7 -0
  457. package/settings/helpers/toImageQuality.d.ts.map +1 -0
  458. package/settings/helpers/toImageQuality.js +44 -0
  459. package/settings/helpers/toThumborColor.d.ts +15 -0
  460. package/settings/helpers/toThumborColor.d.ts.map +1 -0
  461. package/settings/helpers/toThumborColor.js +51 -0
  462. package/settings/hooks/index.d.ts +2 -0
  463. package/settings/hooks/index.d.ts.map +1 -0
  464. package/settings/hooks/index.js +1 -0
  465. package/settings/hooks/useImageSettings.d.ts +28 -0
  466. package/settings/hooks/useImageSettings.d.ts.map +1 -0
  467. package/settings/hooks/useImageSettings.js +39 -0
  468. package/settings/reducers/appSettings.d.ts.map +1 -1
  469. package/settings/reducers/appSettings.js +100 -8
  470. package/settings/reducers/index.d.ts +3 -3
  471. package/settings/selectors/appSettings.d.ts +114 -1
  472. package/settings/selectors/appSettings.d.ts.map +1 -1
  473. package/settings/selectors/appSettings.js +75 -1
  474. package/settings/types/appSettings.d.ts +244 -0
  475. package/settings/types/appSettings.d.ts.map +1 -1
  476. package/settings/types/appSettings.js +124 -1
  477. package/styles/helpers/index.d.ts +2 -0
  478. package/styles/helpers/index.js +2 -0
  479. package/styles/helpers/loadFontCss.d.ts +22 -0
  480. package/styles/helpers/loadFontCss.d.ts.map +1 -0
  481. package/styles/helpers/loadFontCss.js +138 -0
  482. package/styles/helpers/loadThemeCss.d.ts +14 -0
  483. package/styles/helpers/loadThemeCss.d.ts.map +1 -0
  484. package/styles/helpers/loadThemeCss.js +123 -0
  485. package/styles/index.d.ts +1 -1
  486. package/styles/index.d.ts.map +1 -1
  487. package/styles/index.js +1 -1
  488. package/styles/reset/root.js +23 -4
  489. package/styles/reset/typographyCustomProps.d.ts +12 -0
  490. package/styles/reset/typographyCustomProps.d.ts.map +1 -0
  491. package/styles/reset/typographyCustomProps.js +11 -0
  492. package/styles/theme/createDefaultThemeOptions/index.d.ts.map +1 -1
  493. package/styles/theme/createDefaultThemeOptions/index.js +112 -4
  494. package/styles/theme/createTheme/createComponents.d.ts +2 -2
  495. package/styles/theme/createTheme/createComponents.d.ts.map +1 -1
  496. package/styles/theme/createTheme/createComponents.js +0 -1
  497. package/styles/theme/createTheme/createComponents.types.d.ts +117 -0
  498. package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
  499. package/styles/theme/createTheme/createComponents.types.js +119 -2
  500. package/styles/theme/createTheme/createCssVarsForColorSchemeThemes.d.ts.map +1 -1
  501. package/styles/theme/createTheme/createCssVarsForColorSchemeThemes.js +13 -3
  502. package/styles/theme/createTheme/createPalette.types.d.ts +5 -0
  503. package/styles/theme/createTheme/createPalette.types.d.ts.map +1 -1
  504. package/styles/theme/createTheme/createPalette.types.js +7 -2
  505. package/styles/theme/createTheme/createShape.d.ts +3 -0
  506. package/styles/theme/createTheme/createShape.d.ts.map +1 -1
  507. package/styles/theme/createTheme/createSpacing.js +4 -1
  508. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts +4 -2
  509. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts.map +1 -1
  510. package/styles/theme/createTheme/createThemeFromColorScheme.js +6 -3
  511. package/styles/theme/createTheme/createTypography.d.ts +2 -1
  512. package/styles/theme/createTheme/createTypography.js +59 -18
  513. package/styles/theme/createTheme/helpers/cssVarsParser.d.ts.map +1 -1
  514. package/styles/theme/createTheme/helpers/cssVarsParser.js +10 -3
  515. package/styles/theme/createTheme/index.d.ts +2 -1
  516. package/styles/theme/createTheme/index.d.ts.map +1 -1
  517. package/styles/theme/createTheme/index.js +5 -2
  518. package/styles/theme/createTheme/layout.d.ts +23 -0
  519. package/styles/theme/createTheme/layout.d.ts.map +1 -0
  520. package/styles/theme/createTheme/layout.js +20 -0
  521. package/styles/theme/createTheme/shadows.d.ts +11 -1
  522. package/styles/theme/createTheme/shadows.d.ts.map +1 -1
  523. package/styles/theme/createTheme/shadows.js +41 -7
  524. package/styles/theme/createTheme/transitions.d.ts +4 -0
  525. package/styles/theme/createTheme/transitions.js +3 -1
  526. package/styles/theme/createTheme/types.d.ts +41 -9
  527. package/styles/theme/createTheme/types.d.ts.map +1 -1
  528. package/styles/theme/createTheme/types.js +16 -4
  529. package/styles/theme/hocs/index.d.ts +2 -0
  530. package/styles/theme/hocs/index.d.ts.map +1 -0
  531. package/styles/theme/hocs/index.js +1 -0
  532. package/styles/theme/hocs/withTheme.d.ts +21 -0
  533. package/styles/theme/hocs/withTheme.d.ts.map +1 -0
  534. package/styles/theme/hocs/withTheme.js +33 -0
  535. package/styles/theme/hooks/useColorScheme.d.ts +4 -3
  536. package/styles/theme/hooks/useColorScheme.d.ts.map +1 -1
  537. package/styles/theme/hooks/useColorScheme.js +4 -3
  538. package/styles/theme/hooks/useMediaQuery.d.ts +7 -0
  539. package/styles/theme/hooks/useMediaQuery.d.ts.map +1 -1
  540. package/styles/theme/hooks/useMediaQuery.js +5 -5
  541. package/styles/theme/hooks/useTheme.js +1 -1
  542. package/styles/theme/index.d.ts +5 -1
  543. package/styles/theme/index.d.ts.map +1 -1
  544. package/styles/theme/index.js +2 -1
  545. package/styles/theme/providers/ActiveBreakpointProvider.d.ts +1 -1
  546. package/styles/theme/providers/ColorSchemeContext.d.ts +40 -0
  547. package/styles/theme/providers/ColorSchemeContext.d.ts.map +1 -0
  548. package/styles/theme/providers/ColorSchemeContext.js +14 -0
  549. package/styles/theme/providers/ThemeContext.d.ts +3 -0
  550. package/styles/theme/providers/ThemeContext.d.ts.map +1 -0
  551. package/styles/theme/providers/ThemeContext.js +2 -0
  552. package/styles/theme/providers/ThemeProvider.d.ts +4 -14
  553. package/styles/theme/providers/ThemeProvider.d.ts.map +1 -1
  554. package/styles/theme/providers/ThemeProvider.js +95 -26
  555. package/styles/theme/utils/color.d.ts +12 -12
  556. package/styles/theme/utils/color.d.ts.map +1 -1
  557. package/tracking/components/CookieConsentModal/index.js +3 -4
  558. package/tracking/components/PrivacySettings/index.js +3 -3
  559. package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +0 -6
  560. package/cart/components/PaymentBar/PaymentBarReserveButton.js +0 -71
  561. package/components/ChipLayout/spec.js +0 -41
  562. package/components/Logo/spec.js +0 -12
  563. package/components/NavigationHandler/spec.js +0 -84
  564. package/components/Picker/spec.js +0 -94
  565. package/components/PickerUtilize/spec.js +0 -35
  566. package/components/RangeSlider/spec.js +0 -190
  567. package/components/SheetList/components/Item/spec.js +0 -101
  568. package/components/SheetList/spec.js +0 -43
  569. package/components/TimeBoundary/spec.js +0 -83
  570. package/filter/components/FilterItem/spec.js +0 -14
  571. package/filter/components/FilterPageContent/components/ApplyButton/spec.js +0 -46
  572. package/filter/components/FilterPageContent/components/ResetButton/spec.js +0 -29
  573. package/filter/components/FilterPageContent/components/Selector/components/Selected/spec.js +0 -26
  574. package/filter/components/FilterPageContent/components/Selector/components/Toggle/spec.js +0 -34
  575. package/filter/components/FilterPageContent/components/Selector/components/ValueButton/spec.js +0 -32
  576. package/filter/components/FilterPageContent/components/Selector/spec.js +0 -33
  577. package/filter/components/PriceSlider/components/Label/spec.js +0 -26
  578. package/filter/components/PriceSlider/spec.js +0 -30
  579. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +0 -16
  580. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +0 -52
  581. package/product/collections/index.js +0 -1
  582. package/product/components/EffectivityDates/constants.d.ts +0 -3
  583. package/product/components/EffectivityDates/constants.d.ts.map +0 -1
  584. package/product/components/EffectivityDates/helpers.d.ts +0 -6
  585. package/product/components/EffectivityDates/helpers.d.ts.map +0 -1
  586. package/product/components/FilterBar/components/Content/spec.js +0 -136
  587. package/product/components/Header/Shipping/spec.js +0 -36
  588. package/product/components/Header/Tiers/components/Tier/spec.js +0 -48
  589. package/product/components/Header/Tiers/spec.js +0 -64
  590. package/product/components/Media/helpers.d.ts +0 -2
  591. package/product/components/Media/helpers.d.ts.map +0 -1
  592. package/product/components/Options/components/Content/spec.js +0 -73
  593. package/product/components/Options/components/TextOption/components/OptionInfo/spec.js +0 -72
  594. package/product/components/ProductDiscountBadge/spec.js +0 -58
  595. package/product/components/ProductGrid/components/Item/components/ItemDetails/spec.js +0 -73
  596. package/product/components/ProductGrid/components/Item/components/ItemFavoritesButton/spec.js +0 -33
  597. package/product/components/ProductGrid/components/Item/components/ItemImage/spec.js +0 -16
  598. package/product/components/ProductGrid/components/Item/components/ItemName/spec.js +0 -21
  599. package/product/components/ProductGrid/components/Item/components/ItemPrice/spec.js +0 -37
  600. package/product/components/ProductGrid/spec.js +0 -52
  601. package/product/components/ProductImage/connector.js +0 -12
  602. package/product/components/ProductImage/spec.js +0 -87
  603. package/product/components/ProductSlider/spec.js +0 -37
  604. package/product/components/Rating/spec.js +0 -58
  605. package/product/helpers/index.d.ts +0 -13
  606. package/product/helpers/index.d.ts.map +0 -1
  607. package/product/helpers/redirects.d.ts +0 -2
  608. package/product/helpers/redirects.d.ts.map +0 -1
  609. package/product/selectors/helpers/filterProperties.d.ts +0 -8
  610. package/product/selectors/helpers/filterProperties.d.ts.map +0 -1
  611. package/product/selectors/helpers/index.d.ts +0 -3
  612. package/product/selectors/helpers/index.d.ts.map +0 -1
  613. package/product/selectors/helpers/wrapMemoizedSelector.d.ts +0 -2
  614. package/product/selectors/helpers/wrapMemoizedSelector.d.ts.map +0 -1
  615. package/product/selectors/product.d.ts +0 -112
  616. package/product/selectors/product.d.ts.map +0 -1
  617. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +0 -52
  618. package/reviews/components/Reviews/components/Header/spec.js +0 -78
  619. package/reviews/components/Reviews/components/List/spec.js +0 -108
  620. package/reviews/components/Reviews/components/RatingCount/spec.js +0 -38
  621. package/reviews/components/Reviews/spec.js +0 -101
  622. package/tsconfig.build.json +0 -26
  623. package/tsconfig.json +0 -19
@@ -1 +1 @@
1
- {"version":3,"file":"appSettings.d.ts","sourceRoot":"","sources":["../../../settings/types/appSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE;QACR,WAAW,EAAE,gBAAgB,CAAC;KAC/B,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE;QACV,MAAM,EAAE;YACN,OAAO,EAAE,OAAO,GAAG,UAAU,CAAA;YAC7B,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;YAC7B,UAAU,EAAE,OAAO,CAAC;YACpB,YAAY,EAAE,OAAO,CAAC;YACtB,KAAK,EAAE;gBACL,aAAa,EAAE,OAAO,CAAC;aACxB,CAAA;SACF,CAAA;KACF,CAAA;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB"}
1
+ {"version":3,"file":"appSettings.d.ts","sourceRoot":"","sources":["../../../settings/types/appSettings.ts"],"names":[],"mappings":"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"}
@@ -1 +1,124 @@
1
- export {};
1
+ // Re-exported so consumers of these settings do not have to reach into the styles layer, which
2
+ // owns the type because it owns the elevation scale the sizes map to. `TypographyVariant` and the
3
+ // color scheme types are reused for the same reason - the theme owns the variant and scheme lists.
4
+
5
+ export const COLOR_SCHEME_SELECTABLE = 'selectable';
6
+
7
+ /**
8
+ * What the app settings can configure: a color scheme that is binding, or `selectable` to let
9
+ * visitors pick one themselves. Distinct from the theme's `ColorSchemeMode`, which is what a
10
+ * visitor can pick - `selectable` is a permission rather than an appearance, and maps to the
11
+ * theme's `system` mode.
12
+ */
13
+
14
+ /**
15
+ * Recursively optional variant of `T`. The settings sources send only what a merchant configured,
16
+ * and the admin preview additionally prunes the fields its visibility conditions hide.
17
+ */
18
+
19
+ /**
20
+ * The merchant-facing screen sizes for the product list types. Each maps to a theme
21
+ * breakpoint inside the consuming hook (small → xs, medium → sm, large → md).
22
+ */
23
+
24
+ /**
25
+ * A value keyed by screen size. Partial: any unset size cascades down to the next smaller
26
+ * defined value (see useResponsiveValue).
27
+ */
28
+
29
+ /**
30
+ * Number of product columns to render, keyed by screen size.
31
+ */
32
+
33
+ /**
34
+ * Settings for the ProductGrid list type.
35
+ */
36
+
37
+ /**
38
+ * Name-clamping shared by the card and tile product surfaces.
39
+ */
40
+
41
+ /**
42
+ * Drop shadow of the card surface.
43
+ */
44
+
45
+ /**
46
+ * Number of slides to render side by side, keyed by screen size. Fractional values are allowed.
47
+ */
48
+
49
+ /**
50
+ * Settings for the ProductSlider list type.
51
+ */
52
+
53
+ /**
54
+ * Settings for the product rating stars.
55
+ */
56
+
57
+ /**
58
+ * Settings for product presentation across the app.
59
+ */
60
+
61
+ /**
62
+ * The visual style of the card surface.
63
+ */
64
+
65
+ /**
66
+ * Settings for the themed card surface (checkout sections, address cards, sliders).
67
+ */
68
+
69
+ /**
70
+ * An aspect ratio expressed as width and height parts. Only the proportion matters -
71
+ * { width: 4, height: 5 } and { width: 8, height: 10 } are equivalent.
72
+ */
73
+
74
+ /**
75
+ * A single image resolution requested from the image service.
76
+ */
77
+
78
+ /**
79
+ * The product image contexts. pdp drives the product detail page, gallery the fullscreen gallery,
80
+ * and list every grid, slider, list and row tile.
81
+ */
82
+
83
+ /**
84
+ * Settings for a single product image context. The pixel dimensions are not configurable - they
85
+ * are derived from the built-in base widths for the context (see PRODUCT_IMAGE_BASE_WIDTHS) so
86
+ * that image weight stays under the theme's control.
87
+ */
88
+
89
+ /**
90
+ * Settings for the product image contexts.
91
+ */
92
+
93
+ /**
94
+ * Settings for images that are served through the image service.
95
+ *
96
+ * quality, fillColor and fillTransparent sit here rather than under product because they are not
97
+ * product specific - getFullImageSource applies them to every image that goes through the image
98
+ * service, including category images, carrier logos and page builder widget images.
99
+ */
100
+
101
+ /**
102
+ * Settings for the app's overall appearance.
103
+ */
104
+
105
+ /**
106
+ * A font stylesheet to load. The file carries the `@font-face` rules and points its target at the
107
+ * new family itself, e.g. `:root { --sg-typography-h1-fontFamily: 'Recoleta'; }`.
108
+ */
109
+
110
+ /**
111
+ * Typography settings. The top level file applies to everything, a variant entry only to that
112
+ * variant. Variant files are loaded after the global one, so they win at equal specificity.
113
+ */
114
+
115
+ /**
116
+ * What a settings source actually sends. Every field is optional, so the reducer fills the gaps
117
+ * from its defaults instead of leaving consumers with undefined.
118
+ */
119
+
120
+ /**
121
+ * The stored app settings slice. Extends the raw {@link AppSettings} values
122
+ * with metadata that is derived by the reducer rather than supplied by a
123
+ * source (admin sync / jsonp).
124
+ */
@@ -4,6 +4,8 @@ export { setPageContentWidth } from "./setPageContentWidth";
4
4
  export { setViewportHeight } from "./setViewportHeight";
5
5
  export { toggleBodyScroll } from "./toggleBodyScroll";
6
6
  export { loadCustomStyles } from "./loadCustomStyles";
7
+ export { loadThemeCss } from "./loadThemeCss";
8
+ export { loadFontCss } from "./loadFontCss";
7
9
  export * from "./color";
8
10
  export { responsiveMediaQuery } from "../../components/ResponsiveContainer/mediaQuery";
9
11
  export { responsiveCondition } from "../../components/ResponsiveContainer/condition";
@@ -6,6 +6,8 @@ export { setViewportHeight } from "./setViewportHeight";
6
6
  export { toggleBodyScroll } from "./toggleBodyScroll";
7
7
  export { initCSSCustomProps, initCSSCustomPropsFallback } from "./initCSSCustomProperties";
8
8
  export { loadCustomStyles } from "./loadCustomStyles";
9
+ export { loadThemeCss } from "./loadThemeCss";
10
+ export { loadFontCss } from "./loadFontCss";
9
11
  export * from "./color";
10
12
  export { responsiveMediaQuery } from "../../components/ResponsiveContainer/mediaQuery";
11
13
  export { responsiveCondition } from "../../components/ResponsiveContainer/condition";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Syncs the font css links in the document with the passed urls. Tags for urls that are no longer
3
+ * configured are removed, and the remaining ones end up in the dom in the order they were passed -
4
+ * so the global file, passed first, stays above the per variant ones however they were ordered
5
+ * before.
6
+ *
7
+ * Idempotent by design: the admin preview re-sends the app settings while a merchant edits them, so
8
+ * this runs again on every settings update. A tag that is already in place is left untouched, and a
9
+ * tag for a url that is still configured is moved rather than recreated, which would re-request the
10
+ * file.
11
+ *
12
+ * A url is only ever loaded once. Configuring the same file globally and for a variant is normal,
13
+ * and a second link tag for it would apply the same `@font-face` rules twice.
14
+ *
15
+ * Resolves once every newly added file settled, and never rejects - a font file is not guaranteed
16
+ * to exist and must not be able to block app start.
17
+ * @param urls The font css urls to load, in cascade order. Duplicates are dropped, keeping the
18
+ * first occurrence so the cascade order is preserved.
19
+ * @returns A promise that resolves once the new files settled.
20
+ */
21
+ export declare const loadFontCss: (urls?: string[]) => Promise<void>;
22
+ //# sourceMappingURL=loadFontCss.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadFontCss.d.ts","sourceRoot":"","sources":["../../../styles/helpers/loadFontCss.ts"],"names":[],"mappings":"AAmGA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,WAAW,GAAU,OAAM,MAAM,EAAO,KAAG,OAAO,CAAC,IAAI,CAqCnE,CAAC"}
@@ -0,0 +1,138 @@
1
+ import { withScope, captureMessage, Severity as SentrySeverity } from '@sentry/browser';
2
+ const REQUEST_TIMEOUT = 3000;
3
+ const LINK_TAG_CLASS = 'font-css';
4
+ const URL_ATTRIBUTE = 'data-font-css-url';
5
+ const INSERTION_POINT_SELECTOR = 'meta[name="font-css-insertion-point"]';
6
+
7
+ /**
8
+ * Reads the font css links that are currently in the document, in document order.
9
+ * @returns The link tags.
10
+ */
11
+ const getExistingTags = () => Array.from(document.querySelectorAll(`link.${LINK_TAG_CLASS}`));
12
+
13
+ /**
14
+ * Inserts a tag after the passed sibling, or appends it when there is none.
15
+ * @param tag The tag to insert.
16
+ * @param sibling The node to insert after.
17
+ */
18
+ const insertAfter = (tag, sibling) => {
19
+ if (!sibling) {
20
+ document.head.appendChild(tag);
21
+ return;
22
+ }
23
+ sibling.parentNode?.insertBefore(tag, sibling.nextSibling);
24
+ };
25
+
26
+ /**
27
+ * Loads a single font css file and inserts its link after the passed sibling. The font css
28
+ * insertion point sits between the emotion one and the theme css one, so these files override the
29
+ * custom properties that theme initialization generates while the theme css file still overrides
30
+ * them in turn. Falls back to appending when the meta is absent.
31
+ *
32
+ * A link applies at its position in the dom rather than at the time it finished loading, so the
33
+ * timeout below only decides how long app start waits - never which styles win. The tag is left in
34
+ * place when it hits, so the file still applies once it eventually loads.
35
+ * @param href The url to load.
36
+ * @param sibling The node to insert after.
37
+ * @returns The inserted link tag and a promise that settles on load, error or timeout.
38
+ */
39
+ const loadOne = (href, sibling) => {
40
+ const linkTag = document.createElement('link');
41
+ linkTag.rel = 'stylesheet';
42
+ linkTag.type = 'text/css';
43
+ linkTag.href = href;
44
+ linkTag.className = LINK_TAG_CLASS;
45
+ linkTag.setAttribute(URL_ATTRIBUTE, href);
46
+ const settled = new Promise(resolve => {
47
+ let done = false;
48
+ let timeout;
49
+
50
+ /**
51
+ * Resolves the promise once, whichever of load / error / timeout comes first.
52
+ */
53
+ const settle = () => {
54
+ if (done) {
55
+ return;
56
+ }
57
+ done = true;
58
+ clearTimeout(timeout);
59
+ resolve();
60
+ };
61
+ linkTag.onload = settle;
62
+ linkTag.onerror = () => {
63
+ withScope(scope => {
64
+ scope.setLevel(SentrySeverity.Error);
65
+ scope.setExtra('fontCssUrl', href);
66
+ captureMessage('Fetching font css failed');
67
+ });
68
+ settle();
69
+ };
70
+ timeout = setTimeout(() => {
71
+ withScope(scope => {
72
+ scope.setLevel(SentrySeverity.Warning);
73
+ scope.setExtra('fontCssUrl', href);
74
+ scope.setExtra('timeout', REQUEST_TIMEOUT);
75
+ captureMessage('Fetching font css took too long');
76
+ });
77
+ settle();
78
+ }, REQUEST_TIMEOUT);
79
+ });
80
+ insertAfter(linkTag, sibling);
81
+ return {
82
+ linkTag,
83
+ settled
84
+ };
85
+ };
86
+
87
+ /**
88
+ * Syncs the font css links in the document with the passed urls. Tags for urls that are no longer
89
+ * configured are removed, and the remaining ones end up in the dom in the order they were passed -
90
+ * so the global file, passed first, stays above the per variant ones however they were ordered
91
+ * before.
92
+ *
93
+ * Idempotent by design: the admin preview re-sends the app settings while a merchant edits them, so
94
+ * this runs again on every settings update. A tag that is already in place is left untouched, and a
95
+ * tag for a url that is still configured is moved rather than recreated, which would re-request the
96
+ * file.
97
+ *
98
+ * A url is only ever loaded once. Configuring the same file globally and for a variant is normal,
99
+ * and a second link tag for it would apply the same `@font-face` rules twice.
100
+ *
101
+ * Resolves once every newly added file settled, and never rejects - a font file is not guaranteed
102
+ * to exist and must not be able to block app start.
103
+ * @param urls The font css urls to load, in cascade order. Duplicates are dropped, keeping the
104
+ * first occurrence so the cascade order is preserved.
105
+ * @returns A promise that resolves once the new files settled.
106
+ */
107
+ export const loadFontCss = async (urls = []) => {
108
+ const wanted = Array.from(new Set(urls));
109
+ const wantedUrls = new Set(wanted);
110
+ const kept = new Map();
111
+ getExistingTags().forEach(tag => {
112
+ const url = tag.getAttribute(URL_ATTRIBUTE) || '';
113
+ if (wantedUrls.has(url) && !kept.has(url)) {
114
+ kept.set(url, tag);
115
+ return;
116
+ }
117
+ tag.remove();
118
+ });
119
+ let sibling = document.querySelector(INSERTION_POINT_SELECTOR);
120
+ const pending = [];
121
+ wanted.forEach(url => {
122
+ const existing = kept.get(url);
123
+ if (existing) {
124
+ if (existing.previousElementSibling !== sibling) {
125
+ insertAfter(existing, sibling);
126
+ }
127
+ sibling = existing;
128
+ return;
129
+ }
130
+ const {
131
+ linkTag,
132
+ settled
133
+ } = loadOne(url, sibling);
134
+ sibling = linkTag;
135
+ pending.push(settled);
136
+ });
137
+ await Promise.all(pending);
138
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Loads the theme css file. It overrides the css custom properties that are generated during
3
+ * theme initialization, so it has to win the cascade against them - see `insertLinkTag` for how
4
+ * that order is established.
5
+ *
6
+ * A link applies at its position in the dom rather than at the time it finished loading, so the
7
+ * timeout below only decides how long app start waits - never which styles win.
8
+ *
9
+ * Resolves when the file loaded, when it failed, or when REQUEST_TIMEOUT elapsed - it never
10
+ * rejects, since the file is not guaranteed to exist and must not be able to block app start.
11
+ * @returns A promise that resolves once the file settled.
12
+ */
13
+ export declare const loadThemeCss: () => Promise<void>;
14
+ //# sourceMappingURL=loadThemeCss.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadThemeCss.d.ts","sourceRoot":"","sources":["../../../styles/helpers/loadThemeCss.ts"],"names":[],"mappings":"AAuCA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,QAAO,OAAO,CAAC,IAAI,CAqF1C,CAAC"}
@@ -0,0 +1,123 @@
1
+ import { withScope, captureMessage, Severity as SentrySeverity } from '@sentry/browser';
2
+ import { appConfig } from '@shopgate/engage';
3
+ import { isFrontendSettingsAdminPreviewActive } from '@shopgate/engage/admin-preview/helpers';
4
+ const REQUEST_TIMEOUT = 3000;
5
+ const LINK_TAG_ID = 'theme-css';
6
+ const INSERTION_POINT_SELECTOR = 'meta[name="theme-css-insertion-point"]';
7
+
8
+ /**
9
+ * Temporary switch. Set to false to load the theme css file in the frontend settings preview
10
+ * again, or remove it together with the guard in loadThemeCss and the import above.
11
+ */
12
+ const SKIP_IN_FRONTEND_SETTINGS_PREVIEW = true;
13
+
14
+ /**
15
+ * Inserts the link at the theme css insertion point, which the html template declares between the
16
+ * emotion insertion point and the preview one. That position is what makes the cascade order
17
+ * structural rather than incidental: every tss style is pinned above it, and the admin preview
18
+ * pins its style tag to the anchor below it.
19
+ *
20
+ * Falls back to appending when the meta is absent - a head without the anchor still yields the
21
+ * desired order for anything that was already inserted, it just no longer guarantees it.
22
+ * @param linkTag The link tag to insert.
23
+ */
24
+ const insertLinkTag = linkTag => {
25
+ const insertionPoint = document.querySelector(INSERTION_POINT_SELECTOR);
26
+ if (!insertionPoint) {
27
+ document.head.appendChild(linkTag);
28
+ return;
29
+ }
30
+ insertionPoint.parentNode?.insertBefore(linkTag, insertionPoint.nextSibling);
31
+ };
32
+
33
+ /**
34
+ * Loads the theme css file. It overrides the css custom properties that are generated during
35
+ * theme initialization, so it has to win the cascade against them - see `insertLinkTag` for how
36
+ * that order is established.
37
+ *
38
+ * A link applies at its position in the dom rather than at the time it finished loading, so the
39
+ * timeout below only decides how long app start waits - never which styles win.
40
+ *
41
+ * Resolves when the file loaded, when it failed, or when REQUEST_TIMEOUT elapsed - it never
42
+ * rejects, since the file is not guaranteed to exist and must not be able to block app start.
43
+ * @returns A promise that resolves once the file settled.
44
+ */
45
+ export const loadThemeCss = () => new Promise(resolve => {
46
+ if (SKIP_IN_FRONTEND_SETTINGS_PREVIEW && isFrontendSettingsAdminPreviewActive()) {
47
+ resolve();
48
+ return;
49
+ }
50
+ const {
51
+ themeCssUrl: href
52
+ } = appConfig;
53
+ if (!href) {
54
+ resolve();
55
+ return;
56
+ }
57
+ let settled = false;
58
+ let timeout;
59
+
60
+ /**
61
+ * Resolves the promise once, whichever of load / error / timeout comes first.
62
+ */
63
+ const settle = () => {
64
+ if (settled) {
65
+ return;
66
+ }
67
+ settled = true;
68
+ clearTimeout(timeout);
69
+ resolve();
70
+ };
71
+
72
+ /**
73
+ * Starts the fallback that keeps app start from waiting on a stalled request. The link is
74
+ * deliberately left in place when the timeout hits: it still applies once it eventually loads,
75
+ * it just no longer holds up app start.
76
+ */
77
+ const startTimeoutFallback = () => {
78
+ timeout = setTimeout(() => {
79
+ withScope(scope => {
80
+ scope.setLevel(SentrySeverity.Warning);
81
+ scope.setExtra('themeCssUrl', href);
82
+ scope.setExtra('timeout', REQUEST_TIMEOUT);
83
+ captureMessage('Fetching theme css took too long');
84
+ });
85
+ settle();
86
+ }, REQUEST_TIMEOUT);
87
+ };
88
+ const existingTag = document.querySelector(`#${LINK_TAG_ID}`);
89
+ if (existingTag) {
90
+ // Already loaded
91
+ if (existingTag.sheet) {
92
+ resolve();
93
+ return;
94
+ }
95
+
96
+ // Still loading - a stalled request must not leave the promise pending, so arm the timeout
97
+ // here too rather than relying on the load / error events alone.
98
+ existingTag.addEventListener('load', settle, {
99
+ once: true
100
+ });
101
+ existingTag.addEventListener('error', settle, {
102
+ once: true
103
+ });
104
+ startTimeoutFallback();
105
+ return;
106
+ }
107
+ const linkTag = document.createElement('link');
108
+ linkTag.rel = 'stylesheet';
109
+ linkTag.type = 'text/css';
110
+ linkTag.href = href;
111
+ linkTag.id = LINK_TAG_ID;
112
+ linkTag.onload = settle;
113
+ linkTag.onerror = () => {
114
+ withScope(scope => {
115
+ scope.setLevel(SentrySeverity.Error);
116
+ scope.setExtra('themeCssUrl', href);
117
+ captureMessage('Fetching theme css failed');
118
+ });
119
+ settle();
120
+ };
121
+ insertLinkTag(linkTag);
122
+ startTimeoutFallback();
123
+ });
package/styles/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './helpers';
2
- export { ThemeProvider, createTheme, useActiveBreakpoint, useMediaQuery, useResponsiveValue, useTheme, useColorScheme, type Theme, type PaletteColorsWithMain, } from './theme';
2
+ export { ThemeProvider, createTheme, useActiveBreakpoint, useMediaQuery, useResponsiveValue, useTheme, useColorScheme, withTheme, type Theme, type ShadowSize, type ColorSchemeName, type ColorSchemeMode, type ColorSchemeContextValue, type PaletteColorsWithMain, type WithThemeProps, } from './theme';
3
3
  export { makeStyles, withStyles, useStyles, css, cx, tss, GlobalStyles, injectGlobal, keyframes, } from './tss';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,KAAK,KAAK,EACV,KAAK,qBAAqB,GAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,GAAG,EACH,EAAE,EACF,GAAG,EACH,YAAY,EACZ,YAAY,EACZ,SAAS,GACV,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,SAAS,EACT,KAAK,KAAK,EACV,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,GAAG,EACH,EAAE,EACF,GAAG,EACH,YAAY,EACZ,YAAY,EACZ,SAAS,GACV,MAAM,OAAO,CAAC"}
package/styles/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from "./helpers";
2
- export { ThemeProvider, createTheme, useActiveBreakpoint, useMediaQuery, useResponsiveValue, useTheme, useColorScheme } from "./theme";
2
+ export { ThemeProvider, createTheme, useActiveBreakpoint, useMediaQuery, useResponsiveValue, useTheme, useColorScheme, withTheme } from "./theme";
3
3
  export { makeStyles, withStyles, useStyles, css, cx, tss, GlobalStyles, injectGlobal, keyframes } from "./tss";
@@ -1,11 +1,18 @@
1
1
  import "core-js/modules/es.array.includes.js";
2
2
  import { applyScrollContainer, hasWebBridge, isIOSTheme } from '@shopgate/engage/core/helpers';
3
+ import { configuration } from '@shopgate/engage/core/collections';
4
+ import { CONFIGURATION_COLLECTION_KEY_HAS_ROOT_TYPOGRAPHY } from '@shopgate/engage/core/constants';
3
5
  import { themeConfig } from '@shopgate/engage';
4
6
  import { injectGlobal } from '..';
7
+ import { CSS_ROOT_FONT_FAMILY, CSS_ROOT_FONT_SIZE } from "./typographyCustomProps";
5
8
  const {
6
9
  typography
7
10
  } = themeConfig;
8
11
  const iosThemeActive = isIOSTheme();
12
+
13
+ // Flag (for feature-detecting extensions) that base typography uses the `--sg-root-*` custom
14
+ // properties and the `body1` variant.
15
+ configuration.set(CONFIGURATION_COLLECTION_KEY_HAS_ROOT_TYPOGRAPHY, true);
9
16
  injectGlobal({
10
17
  '*, *:before, *:after': {
11
18
  boxSizing: 'border-box'
@@ -23,6 +30,14 @@ injectGlobal({
23
30
  backgroundColor: 'var(--page-background-color)'
24
31
  },
25
32
  html: {
33
+ // Publish the shared font family (used by every variant) and the rem anchor here. The base body
34
+ // text itself is the `body1` variant, applied to `<body>` below. A higher-specificity `:root`
35
+ // override (admin css / live preview / extension) wins. The family default is the property
36
+ // value, not a `var()` fallback (a comma list can't be a fallback). Roboto is an iOS fallback.
37
+ [CSS_ROOT_FONT_FAMILY]: `${typography.family}${iosThemeActive && !(typography.family || '').includes('Roboto') ? ', Roboto' : ''}`,
38
+ [CSS_ROOT_FONT_SIZE]: `${typography.rootSize}px`,
39
+ fontSize: `var(${CSS_ROOT_FONT_SIZE})`,
40
+ color: 'var(--sg-palette-text-primary, var(--color-text-high-emphasis))',
26
41
  overflow: applyScrollContainer() ? 'hidden' : 'inherit',
27
42
  MozOsxFontSmoothing: 'grayscale',
28
43
  WebkitFontSmoothing: 'antialiased',
@@ -31,14 +46,18 @@ injectGlobal({
31
46
  minHeight: '100%'
32
47
  },
33
48
  body: {
34
- // Include Roboto font as a fallback to the iOS theme when other fonts are not available
35
- font: `${typography.rootSize}px/${typography.lineHeight} ${typography.family}${iosThemeActive && !(typography.family || '').includes('Roboto') ? ', Roboto' : ''}`,
49
+ // Base body text = the `body1` variant. Family is the shared root var; weight/size/line-height
50
+ // come from the theme's `body1` css vars, with fallbacks so there is no flash before the theme
51
+ // injects them. Configuring `body1` drives both this base text and the variant.
52
+ fontFamily: `var(${CSS_ROOT_FONT_FAMILY})`,
53
+ fontWeight: 'var(--sg-typography-body1-fontWeight, 400)',
54
+ fontSize: 'var(--sg-typography-body1-fontSize, 1rem)',
55
+ lineHeight: 'var(--sg-typography-body1-lineHeight, 1.5)',
36
56
  overflow: 'auto',
37
57
  margin: 0,
38
58
  WebkitOverflowScrolling: 'touch',
39
59
  WebkitUserSelect: hasWebBridge() ? 'inherit' : 'none',
40
- userSelect: hasWebBridge() ? 'inherit' : 'none',
41
- color: 'var(--color-text-high-emphasis)'
60
+ userSelect: hasWebBridge() ? 'inherit' : 'none'
42
61
  },
43
62
  '[data-pattern]': {
44
63
  height: '100% !important'
@@ -0,0 +1,12 @@
1
+ /**
2
+ * CSS custom property names for the shared base typography. Internal to the styles layer: the css
3
+ * reset publishes them on `<html>` — `--sg-root-font-family` is the shared family used by every
4
+ * typography variant, `--sg-root-font-size` is the rem anchor. They're an optional override layer: a
5
+ * higher-specificity `:root` rule (admin css file / live preview / an extension) overrides the
6
+ * shipped default. The base body text itself is the `body1` variant, applied to `<body>` by the reset.
7
+ *
8
+ * Not re-exported from the styles barrel - import from this module directly where needed.
9
+ */
10
+ export declare const CSS_ROOT_FONT_FAMILY = "--sg-root-font-family";
11
+ export declare const CSS_ROOT_FONT_SIZE = "--sg-root-font-size";
12
+ //# sourceMappingURL=typographyCustomProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typographyCustomProps.d.ts","sourceRoot":"","sources":["../../../styles/reset/typographyCustomProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAC5D,eAAO,MAAM,kBAAkB,wBAAwB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * CSS custom property names for the shared base typography. Internal to the styles layer: the css
3
+ * reset publishes them on `<html>` — `--sg-root-font-family` is the shared family used by every
4
+ * typography variant, `--sg-root-font-size` is the rem anchor. They're an optional override layer: a
5
+ * higher-specificity `:root` rule (admin css file / live preview / an extension) overrides the
6
+ * shipped default. The base body text itself is the `body1` variant, applied to `<body>` by the reset.
7
+ *
8
+ * Not re-exported from the styles barrel - import from this module directly where needed.
9
+ */
10
+ export const CSS_ROOT_FONT_FAMILY = '--sg-root-font-family';
11
+ export const CSS_ROOT_FONT_SIZE = '--sg-root-font-size';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createDefaultThemeOptions/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAO,YA6G3C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createDefaultThemeOptions/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAO,YAwN3C,CAAC"}