orionplace-nuxt 0.1.2 → 0.2.0

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 (520) hide show
  1. package/README.md +711 -24
  2. package/bin/orionplace-nuxt.mjs +39 -11
  3. package/package.json +26 -6
  4. package/runtime/api.mjs +4 -1
  5. package/runtime/domain.mjs +4 -2
  6. package/runtime/marketplace.mjs +287 -211
  7. package/src/asset-loading-plugin.mjs +10 -0
  8. package/src/module.mjs +44 -14
  9. package/src/project-readme.mjs +507 -35
  10. package/src/setup.mjs +100 -51
  11. package/src/update.mjs +36 -0
  12. package/src/validation.mjs +6 -0
  13. package/templates/.vscode/settings.json +5 -0
  14. package/templates/app/app.vue +48 -0
  15. package/templates/app/assets/css/orionplace-tokens.css +21 -0
  16. package/templates/app/assets/css/orionplace.css +28 -0
  17. package/templates/app/components/orionplace/account/AccountActivity.README.md +31 -0
  18. package/templates/app/components/orionplace/account/AccountActivity.vue +61 -0
  19. package/templates/app/components/orionplace/account/AccountPromocodes.README.md +50 -0
  20. package/templates/app/components/orionplace/account/AccountPromocodes.vue +267 -0
  21. package/templates/app/components/orionplace/account/AccountSection.README.md +31 -0
  22. package/templates/app/components/orionplace/account/AccountSection.vue +132 -0
  23. package/templates/app/components/orionplace/account/ProfileAvatar.vue +139 -0
  24. package/templates/app/components/orionplace/account/ProfileDeleteAccount.vue +161 -0
  25. package/templates/app/components/orionplace/account/ProfileDetailsForm.vue +172 -0
  26. package/templates/app/components/orionplace/account/ProfileEmailSettings.vue +269 -0
  27. package/templates/app/components/orionplace/account/ProfilePasswordForm.vue +201 -0
  28. package/templates/app/components/orionplace/account/ProfileSignIn.vue +446 -0
  29. package/templates/app/components/orionplace/account/SignInHistory.README.md +27 -0
  30. package/templates/app/components/orionplace/account/SignInHistory.vue +218 -0
  31. package/templates/app/components/orionplace/account/StorefrontLogout.README.md +15 -0
  32. package/templates/app/components/orionplace/account/StorefrontLogout.vue +109 -0
  33. package/templates/app/components/orionplace/account/StorefrontProfile.README.md +145 -0
  34. package/templates/app/components/orionplace/account/StorefrontProfile.vue +168 -0
  35. package/templates/app/components/orionplace/account/account.css +1047 -0
  36. package/templates/app/components/orionplace/account/profile.css +696 -0
  37. package/templates/app/components/orionplace/address/AddressForm.README.md +67 -0
  38. package/templates/app/components/orionplace/address/AddressForm.vue +537 -0
  39. package/templates/app/components/orionplace/address/StorefrontAddresses.README.md +44 -0
  40. package/templates/app/components/orionplace/address/StorefrontAddresses.vue +438 -0
  41. package/templates/app/components/orionplace/banners/MainBanner.vue +171 -0
  42. package/templates/app/components/orionplace/banners/examples/BannerExample.vue +6 -0
  43. package/templates/app/components/orionplace/blog/BlogArticle.README.md +44 -0
  44. package/templates/app/components/orionplace/blog/BlogArticle.vue +829 -0
  45. package/templates/app/components/orionplace/blog/BlogCommentForm.README.md +28 -0
  46. package/templates/app/components/orionplace/blog/BlogCommentForm.vue +129 -0
  47. package/templates/app/components/orionplace/blog/BlogComments.README.md +36 -0
  48. package/templates/app/components/orionplace/blog/BlogComments.vue +373 -0
  49. package/templates/app/components/orionplace/blog/BlogPostCard.vue +307 -0
  50. package/templates/app/components/orionplace/blog/BlogPostGroup.vue +108 -0
  51. package/templates/app/components/orionplace/blog/StorefrontJournal.README.md +42 -0
  52. package/templates/app/components/orionplace/blog/StorefrontJournal.vue +669 -0
  53. package/templates/app/components/orionplace/branding/BrandLogos.vue +25 -0
  54. package/templates/app/components/orionplace/branding/examples/BrandLogosExample.vue +6 -0
  55. package/templates/app/components/orionplace/cart/CartCheckoutDetails.README.md +81 -0
  56. package/templates/app/components/orionplace/cart/CartCheckoutDetails.vue +367 -0
  57. package/templates/app/components/orionplace/cart/CartDeliverySelector.README.md +95 -0
  58. package/templates/app/components/orionplace/cart/CartDeliverySelector.vue +724 -0
  59. package/templates/app/components/orionplace/cart/CartItemOptions.README.md +98 -0
  60. package/templates/app/components/orionplace/cart/CartItemOptions.vue +693 -0
  61. package/templates/app/components/orionplace/cart/CartLineItem.README.md +70 -0
  62. package/templates/app/components/orionplace/cart/CartLineItem.vue +271 -0
  63. package/templates/app/components/orionplace/cart/CartPreview.README.md +43 -0
  64. package/templates/app/components/orionplace/cart/CartPreview.vue +263 -0
  65. package/templates/app/components/orionplace/cart/DeliveryMap.README.md +48 -0
  66. package/templates/app/components/orionplace/cart/DeliveryMap.vue +155 -0
  67. package/templates/app/components/orionplace/cart/StorefrontCart.README.md +89 -0
  68. package/templates/app/components/orionplace/cart/StorefrontCart.vue +689 -0
  69. package/templates/app/components/orionplace/catalog/CatalogHeader.vue +681 -0
  70. package/templates/app/components/orionplace/catalog/CatalogRepresentative.vue +59 -0
  71. package/templates/app/components/orionplace/catalog/StorefrontCatalog.README.md +35 -0
  72. package/templates/app/components/orionplace/catalog/StorefrontCatalog.vue +179 -0
  73. package/templates/app/components/orionplace/catalog/examples/CatalogHeaderExample.vue +6 -0
  74. package/templates/app/components/orionplace/categories/CategoryGroup.vue +125 -0
  75. package/templates/app/components/orionplace/categories/StorefrontCategory.README.md +60 -0
  76. package/templates/app/components/orionplace/categories/StorefrontCategory.vue +277 -0
  77. package/templates/app/components/orionplace/categories/examples/CategoryGroupExample.vue +7 -0
  78. package/templates/app/components/orionplace/contact/AboutPage.README.md +23 -0
  79. package/templates/app/components/orionplace/contact/AboutPage.vue +409 -0
  80. package/templates/app/components/orionplace/contact/ContactForm.README.md +29 -0
  81. package/templates/app/components/orionplace/contact/ContactForm.vue +289 -0
  82. package/templates/app/components/orionplace/contact/EmailUnsubscribe.README.md +27 -0
  83. package/templates/app/components/orionplace/contact/EmailUnsubscribe.vue +95 -0
  84. package/templates/app/components/orionplace/contact/StorefrontContact.README.md +18 -0
  85. package/templates/app/components/orionplace/contact/StorefrontContact.vue +89 -0
  86. package/templates/app/components/orionplace/contact/examples/ContactExample.vue +6 -0
  87. package/templates/app/components/orionplace/currencies/MainCurrencySwitcher.vue +80 -0
  88. package/templates/app/components/orionplace/currencies/examples/CurrencyExample.vue +6 -0
  89. package/templates/app/components/orionplace/events/EventEnrollmentDialog.README.md +58 -0
  90. package/templates/app/components/orionplace/events/EventEnrollmentDialog.vue +294 -0
  91. package/templates/app/components/orionplace/events/EventsBlock.vue +138 -0
  92. package/templates/app/components/orionplace/events/examples/EventsExample.vue +6 -0
  93. package/templates/app/components/orionplace/locale/MainLanguageSwitcher.vue +506 -0
  94. package/templates/app/components/orionplace/locale/examples/LocaleExample.vue +6 -0
  95. package/templates/app/components/orionplace/manufacturers/ManufacturerIndex.README.md +36 -0
  96. package/templates/app/components/orionplace/manufacturers/ManufacturerIndex.vue +495 -0
  97. package/templates/app/components/orionplace/manufacturers/StorefrontManufacturers.README.md +30 -0
  98. package/templates/app/components/orionplace/manufacturers/StorefrontManufacturers.vue +263 -0
  99. package/templates/app/components/orionplace/orders/OrderDetails.README.md +39 -0
  100. package/templates/app/components/orionplace/orders/OrderDetails.vue +1074 -0
  101. package/templates/app/components/orionplace/orders/OrderPaymentForm.README.md +59 -0
  102. package/templates/app/components/orionplace/orders/OrderPaymentForm.vue +73 -0
  103. package/templates/app/components/orionplace/orders/StorefrontOrders.README.md +39 -0
  104. package/templates/app/components/orionplace/orders/StorefrontOrders.vue +869 -0
  105. package/templates/app/components/orionplace/orders/orders.css +612 -0
  106. package/templates/app/components/orionplace/payments/PaymentPanel.README.md +76 -0
  107. package/templates/app/components/orionplace/payments/PaymentPanel.vue +108 -0
  108. package/templates/app/components/orionplace/products/HoverImageViewer.vue +190 -0
  109. package/templates/app/components/orionplace/products/ProductCard.README.md +63 -0
  110. package/templates/app/components/orionplace/products/ProductCard.vue +897 -0
  111. package/templates/app/components/orionplace/products/ProductCardActions.README.md +33 -0
  112. package/templates/app/components/orionplace/products/ProductCardActions.vue +412 -0
  113. package/templates/app/components/orionplace/products/ProductCardBadges.vue +83 -0
  114. package/templates/app/components/orionplace/products/ProductCardDescription.vue +46 -0
  115. package/templates/app/components/orionplace/products/ProductCardFavorite.vue +99 -0
  116. package/templates/app/components/orionplace/products/ProductCardPrice.vue +66 -0
  117. package/templates/app/components/orionplace/products/ProductCardRating.vue +65 -0
  118. package/templates/app/components/orionplace/products/ProductCardSeller.vue +66 -0
  119. package/templates/app/components/orionplace/products/ProductCardStockNotice.vue +43 -0
  120. package/templates/app/components/orionplace/products/ProductCardTitle.vue +46 -0
  121. package/templates/app/components/orionplace/products/ProductCardVariants.vue +388 -0
  122. package/templates/app/components/orionplace/products/ProductGroup.vue +257 -0
  123. package/templates/app/components/orionplace/products/ProductPreorderDialog.README.md +22 -0
  124. package/templates/app/components/orionplace/products/ProductPreorderDialog.vue +471 -0
  125. package/templates/app/components/orionplace/products/ProductReviewForm.README.md +39 -0
  126. package/templates/app/components/orionplace/products/ProductReviewForm.vue +312 -0
  127. package/templates/app/components/orionplace/products/ProductReviewGallery.README.md +28 -0
  128. package/templates/app/components/orionplace/products/ProductReviewGallery.vue +141 -0
  129. package/templates/app/components/orionplace/products/ProductReviewImageViewer.README.md +51 -0
  130. package/templates/app/components/orionplace/products/ProductReviewImageViewer.vue +351 -0
  131. package/templates/app/components/orionplace/products/ProductReviews.README.md +70 -0
  132. package/templates/app/components/orionplace/products/ProductReviews.vue +1025 -0
  133. package/templates/app/components/orionplace/products/ProductSecondaryVariantModal.vue +460 -0
  134. package/templates/app/components/orionplace/products/ProductSpecificationsDialog.README.md +65 -0
  135. package/templates/app/components/orionplace/products/ProductSpecificationsDialog.vue +174 -0
  136. package/templates/app/components/orionplace/products/StorefrontProduct.README.md +52 -0
  137. package/templates/app/components/orionplace/products/StorefrontProduct.vue +1466 -0
  138. package/templates/app/components/orionplace/products/StorefrontWishlist.README.md +33 -0
  139. package/templates/app/components/orionplace/products/StorefrontWishlist.vue +290 -0
  140. package/templates/app/components/orionplace/products/examples/FeaturedExample.vue +6 -0
  141. package/templates/app/components/orionplace/products/examples/FeaturedHoverImageViewerExample.vue +14 -0
  142. package/templates/app/components/orionplace/products/examples/FeaturedProductCardActionsExample.vue +14 -0
  143. package/templates/app/components/orionplace/products/examples/FeaturedProductCardBadgesExample.vue +14 -0
  144. package/templates/app/components/orionplace/products/examples/FeaturedProductCardDescriptionExample.vue +14 -0
  145. package/templates/app/components/orionplace/products/examples/FeaturedProductCardExample.vue +14 -0
  146. package/templates/app/components/orionplace/products/examples/FeaturedProductCardFavoriteExample.vue +14 -0
  147. package/templates/app/components/orionplace/products/examples/FeaturedProductCardPriceExample.vue +14 -0
  148. package/templates/app/components/orionplace/products/examples/FeaturedProductCardRatingExample.vue +14 -0
  149. package/templates/app/components/orionplace/products/examples/FeaturedProductCardSellerExample.vue +14 -0
  150. package/templates/app/components/orionplace/products/examples/FeaturedProductCardStockNoticeExample.vue +14 -0
  151. package/templates/app/components/orionplace/products/examples/FeaturedProductCardTitleExample.vue +14 -0
  152. package/templates/app/components/orionplace/products/examples/FeaturedProductCardVariantsExample.vue +14 -0
  153. package/templates/app/components/orionplace/products/examples/ProductsExample.vue +6 -0
  154. package/templates/app/components/orionplace/products/examples/ProductsHoverImageViewerExample.vue +13 -0
  155. package/templates/app/components/orionplace/products/examples/ProductsProductCardActionsExample.vue +13 -0
  156. package/templates/app/components/orionplace/products/examples/ProductsProductCardBadgesExample.vue +13 -0
  157. package/templates/app/components/orionplace/products/examples/ProductsProductCardDescriptionExample.vue +13 -0
  158. package/templates/app/components/orionplace/products/examples/ProductsProductCardExample.vue +13 -0
  159. package/templates/app/components/orionplace/products/examples/ProductsProductCardFavoriteExample.vue +13 -0
  160. package/templates/app/components/orionplace/products/examples/ProductsProductCardPriceExample.vue +13 -0
  161. package/templates/app/components/orionplace/products/examples/ProductsProductCardRatingExample.vue +13 -0
  162. package/templates/app/components/orionplace/products/examples/ProductsProductCardSellerExample.vue +13 -0
  163. package/templates/app/components/orionplace/products/examples/ProductsProductCardStockNoticeExample.vue +13 -0
  164. package/templates/app/components/orionplace/products/examples/ProductsProductCardTitleExample.vue +13 -0
  165. package/templates/app/components/orionplace/products/examples/ProductsProductCardVariantsExample.vue +13 -0
  166. package/templates/app/components/orionplace/promo/PromoProducts.README.md +45 -0
  167. package/templates/app/components/orionplace/promo/PromoProducts.vue +287 -0
  168. package/templates/app/components/orionplace/search/MainSearch.vue +342 -0
  169. package/templates/app/components/orionplace/search/ProductSearchResults.README.md +81 -0
  170. package/templates/app/components/orionplace/search/ProductSearchResults.vue +458 -0
  171. package/templates/app/components/orionplace/search/SearchFilters.vue +546 -0
  172. package/templates/app/components/orionplace/search/examples/MainSearchExample.vue +6 -0
  173. package/templates/app/components/orionplace/sellers/SellerFilters.README.md +32 -0
  174. package/templates/app/components/orionplace/sellers/SellerFilters.vue +317 -0
  175. package/templates/app/components/orionplace/sellers/SellerPhotoGallery.README.md +45 -0
  176. package/templates/app/components/orionplace/sellers/SellerPhotoGallery.vue +406 -0
  177. package/templates/app/components/orionplace/sellers/SellerSummary.README.md +33 -0
  178. package/templates/app/components/orionplace/sellers/SellerSummary.vue +162 -0
  179. package/templates/app/components/orionplace/sellers/StorefrontSellers.README.md +73 -0
  180. package/templates/app/components/orionplace/sellers/StorefrontSellers.vue +300 -0
  181. package/templates/app/components/orionplace/shared/OrionplaceAvatar.README.md +30 -0
  182. package/templates/app/components/orionplace/shared/OrionplaceAvatar.vue +83 -0
  183. package/templates/app/components/orionplace/shared/OrionplaceBreadcrumbs.README.md +65 -0
  184. package/templates/app/components/orionplace/shared/OrionplaceBreadcrumbs.vue +118 -0
  185. package/templates/app/components/orionplace/shared/OrionplaceEmptyState.README.md +38 -0
  186. package/templates/app/components/orionplace/shared/OrionplaceEmptyState.vue +143 -0
  187. package/templates/app/components/orionplace/shared/OrionplaceImage.vue +84 -0
  188. package/templates/app/components/orionplace/shared/OrionplaceInfoHint.README.md +32 -0
  189. package/templates/app/components/orionplace/shared/OrionplaceInfoHint.vue +158 -0
  190. package/templates/app/components/orionplace/shared/OrionplacePasswordInput.README.md +30 -0
  191. package/templates/app/components/orionplace/shared/OrionplacePasswordInput.vue +197 -0
  192. package/templates/app/components/orionplace/shared/OrionplaceSearchSelect.README.md +38 -0
  193. package/templates/app/components/orionplace/shared/OrionplaceSearchSelect.vue +411 -0
  194. package/templates/app/components/orionplace/shared/OrionplaceSelect.README.md +31 -0
  195. package/templates/app/components/orionplace/shared/OrionplaceSelect.vue +525 -0
  196. package/templates/app/components/orionplace/shared/StorefrontErrorPage.README.md +55 -0
  197. package/templates/app/components/orionplace/shared/StorefrontErrorPage.vue +151 -0
  198. package/templates/app/components/orionplace/shared/StorefrontPagination.README.md +45 -0
  199. package/templates/app/components/orionplace/shared/StorefrontPagination.vue +101 -0
  200. package/templates/app/components/orionplace/shared/dialogs.css +36 -0
  201. package/templates/app/components/orionplace/shared/features.css +364 -0
  202. package/templates/app/components/orionplace/social/SocialLinks.vue +72 -0
  203. package/templates/app/components/orionplace/social/examples/SocialLinksExample.vue +6 -0
  204. package/templates/app/components/orionplace/storefront/StorefrontAccount.README.md +47 -0
  205. package/templates/app/components/orionplace/storefront/StorefrontAccount.vue +332 -0
  206. package/templates/app/components/orionplace/storefront/StorefrontCartButton.vue +68 -0
  207. package/templates/app/components/orionplace/storefront/StorefrontFooter.README.md +26 -0
  208. package/templates/app/components/orionplace/storefront/StorefrontFooter.vue +222 -0
  209. package/templates/app/components/orionplace/storefront/StorefrontHeader.README.md +93 -0
  210. package/templates/app/components/orionplace/storefront/StorefrontHeader.vue +509 -0
  211. package/templates/app/components/orionplace/storefront/StorefrontHome.README.md +79 -0
  212. package/templates/app/components/orionplace/storefront/StorefrontHome.vue +315 -0
  213. package/templates/app/components/orionplace/storefront/StorefrontWishlistButton.vue +105 -0
  214. package/templates/app/components/orionplace/storefront/examples/StorefrontAccountExample.vue +7 -0
  215. package/templates/app/components/orionplace/stores/StorefrontStores.README.md +41 -0
  216. package/templates/app/components/orionplace/stores/StorefrontStores.vue +345 -0
  217. package/templates/app/components/orionplace/subscriptions/StorefrontSubscriptions.README.md +151 -0
  218. package/templates/app/components/orionplace/subscriptions/StorefrontSubscriptions.vue +851 -0
  219. package/templates/app/components/orionplace/subscriptions/StorefrontTariff.README.md +38 -0
  220. package/templates/app/components/orionplace/subscriptions/StorefrontTariff.vue +535 -0
  221. package/templates/app/components/orionplace/subscriptions/StorefrontTariffs.README.md +36 -0
  222. package/templates/app/components/orionplace/subscriptions/StorefrontTariffs.vue +395 -0
  223. package/templates/app/components/orionplace/subscriptions/SubscriptionCancelDialog.README.md +39 -0
  224. package/templates/app/components/orionplace/subscriptions/SubscriptionCancelDialog.vue +292 -0
  225. package/templates/app/components/orionplace/subscriptions/SubscriptionChangeDialog.README.md +85 -0
  226. package/templates/app/components/orionplace/subscriptions/SubscriptionChangeDialog.vue +874 -0
  227. package/templates/app/components/orionplace/subscriptions/SubscriptionExtendDialog.README.md +53 -0
  228. package/templates/app/components/orionplace/subscriptions/SubscriptionExtendDialog.vue +536 -0
  229. package/templates/app/components/orionplace/subscriptions/SubscriptionPlanSummary.README.md +101 -0
  230. package/templates/app/components/orionplace/subscriptions/SubscriptionPlanSummary.vue +286 -0
  231. package/templates/app/components/orionplace/subscriptions/SubscriptionRemoteDetails.README.md +138 -0
  232. package/templates/app/components/orionplace/subscriptions/SubscriptionRemoteDetails.vue +134 -0
  233. package/templates/app/components/orionplace/subscriptions/SubscriptionRenewalDialog.README.md +85 -0
  234. package/templates/app/components/orionplace/subscriptions/SubscriptionRenewalDialog.vue +364 -0
  235. package/templates/app/components/orionplace/support/StorefrontSupport.README.md +39 -0
  236. package/templates/app/components/orionplace/support/StorefrontSupport.vue +484 -0
  237. package/templates/app/components/orionplace/support/TicketConversation.README.md +38 -0
  238. package/templates/app/components/orionplace/support/TicketConversation.vue +524 -0
  239. package/templates/app/components/orionplace/support/TicketImage.README.md +27 -0
  240. package/templates/app/components/orionplace/support/TicketImage.vue +186 -0
  241. package/templates/app/components/orionplace/support/TicketItemCard.README.md +59 -0
  242. package/templates/app/components/orionplace/support/TicketItemCard.vue +177 -0
  243. package/templates/app/components/orionplace/support/TicketMessageForm.README.md +35 -0
  244. package/templates/app/components/orionplace/support/TicketMessageForm.vue +258 -0
  245. package/templates/app/components/orionplace/support/TicketSubscriptionCard.README.md +40 -0
  246. package/templates/app/components/orionplace/support/TicketSubscriptionCard.vue +154 -0
  247. package/templates/app/components/orionplace/tariffs/TariffCard.README.md +12 -0
  248. package/templates/app/components/orionplace/tariffs/TariffCard.vue +241 -0
  249. package/templates/app/components/orionplace/tariffs/TariffCardDescription.README.md +12 -0
  250. package/templates/app/components/orionplace/tariffs/TariffCardDescription.vue +97 -0
  251. package/templates/app/components/orionplace/tariffs/TariffCardFeatures.README.md +14 -0
  252. package/templates/app/components/orionplace/tariffs/TariffCardFeatures.vue +172 -0
  253. package/templates/app/components/orionplace/tariffs/TariffCardImage.README.md +12 -0
  254. package/templates/app/components/orionplace/tariffs/TariffCardImage.vue +33 -0
  255. package/templates/app/components/orionplace/tariffs/TariffCardPrices.README.md +12 -0
  256. package/templates/app/components/orionplace/tariffs/TariffCardPrices.vue +280 -0
  257. package/templates/app/components/orionplace/tariffs/TariffCardTitle.README.md +12 -0
  258. package/templates/app/components/orionplace/tariffs/TariffCardTitle.vue +30 -0
  259. package/templates/app/components/orionplace/tariffs/TariffCards.README.md +12 -0
  260. package/templates/app/components/orionplace/tariffs/TariffCards.vue +94 -0
  261. package/templates/app/components/orionplace/tariffs/TariffSubscriptionModal.README.md +31 -0
  262. package/templates/app/components/orionplace/tariffs/TariffSubscriptionModal.vue +411 -0
  263. package/templates/app/components/orionplace/tariffs/examples/TariffCardDescriptionExample.vue +13 -0
  264. package/templates/app/components/orionplace/tariffs/examples/TariffCardExample.vue +13 -0
  265. package/templates/app/components/orionplace/tariffs/examples/TariffCardFeaturesExample.vue +14 -0
  266. package/templates/app/components/orionplace/tariffs/examples/TariffCardImageExample.vue +13 -0
  267. package/templates/app/components/orionplace/tariffs/examples/TariffCardPricesExample.vue +13 -0
  268. package/templates/app/components/orionplace/tariffs/examples/TariffCardTitleExample.vue +13 -0
  269. package/templates/app/components/orionplace/tariffs/examples/TariffCardsExample.vue +6 -0
  270. package/templates/app/components/orionplace/theme/OrionplaceThemeProvider.vue +38 -0
  271. package/templates/app/components/orionplace/units/UnitSwitcher.vue +71 -0
  272. package/templates/app/components/orionplace/units/examples/LengthExample.vue +6 -0
  273. package/templates/app/components/orionplace/units/examples/WeightExample.vue +6 -0
  274. package/templates/app/components/orionplace/wallet/StorefrontWallet.README.md +117 -0
  275. package/templates/app/components/orionplace/wallet/StorefrontWallet.vue +863 -0
  276. package/templates/app/components/orionplace/wallet/WalletBalance.vue +47 -0
  277. package/templates/app/components/orionplace/wallet/WalletTopUpForm.README.md +32 -0
  278. package/templates/app/components/orionplace/wallet/WalletTopUpForm.vue +224 -0
  279. package/templates/app/components/orionplace/wallet/examples/WalletExample.vue +6 -0
  280. package/templates/app/composables/useOrionplaceActionMenu.ts +126 -0
  281. package/templates/app/composables/useOrionplaceAddressEditor.ts +343 -0
  282. package/templates/app/composables/useOrionplaceAddresses.ts +75 -0
  283. package/templates/app/composables/useOrionplaceApi.ts +174 -0
  284. package/templates/app/composables/useOrionplaceAppLoad.ts +74 -0
  285. package/templates/app/composables/useOrionplaceBlogComments.ts +325 -0
  286. package/templates/app/composables/useOrionplaceBlogReading.ts +270 -0
  287. package/templates/app/composables/useOrionplaceCart.ts +226 -0
  288. package/templates/app/composables/useOrionplaceCartPreview.ts +142 -0
  289. package/templates/app/composables/useOrionplaceCategoryLink.ts +24 -0
  290. package/templates/app/composables/useOrionplaceCategoryProducts.ts +16 -0
  291. package/templates/app/composables/useOrionplaceFeature.ts +100 -0
  292. package/templates/app/composables/useOrionplaceFeaturedProducts.ts +14 -0
  293. package/templates/app/composables/useOrionplaceGeolocation.ts +28 -0
  294. package/templates/app/composables/useOrionplaceHomeProducts.ts +90 -0
  295. package/templates/app/composables/useOrionplaceManufacturerIndex.ts +83 -0
  296. package/templates/app/composables/useOrionplaceMap.ts +240 -0
  297. package/templates/app/composables/useOrionplaceMediaFormat.ts +24 -0
  298. package/templates/app/composables/useOrionplaceMissingPage.ts +67 -0
  299. package/templates/app/composables/useOrionplaceOrders.ts +185 -0
  300. package/templates/app/composables/useOrionplacePageSeo.ts +38 -0
  301. package/templates/app/composables/useOrionplaceProductActions.ts +116 -0
  302. package/templates/app/composables/useOrionplaceProductLink.ts +24 -0
  303. package/templates/app/composables/useOrionplaceProductSearch.ts +259 -0
  304. package/templates/app/composables/useOrionplaceProductVariants.ts +176 -0
  305. package/templates/app/composables/useOrionplaceProfile.ts +309 -0
  306. package/templates/app/composables/useOrionplaceProgress.ts +89 -0
  307. package/templates/app/composables/useOrionplaceReviews.ts +242 -0
  308. package/templates/app/composables/useOrionplaceSearchHistory.ts +23 -0
  309. package/templates/app/composables/useOrionplaceSearchScopeNames.ts +99 -0
  310. package/templates/app/composables/useOrionplaceServerData.ts +72 -0
  311. package/templates/app/composables/useOrionplaceSignIn.ts +66 -0
  312. package/templates/app/composables/useOrionplaceStableHeight.ts +69 -0
  313. package/templates/app/composables/useOrionplaceStorefront.ts +29 -0
  314. package/templates/app/composables/useOrionplaceSubscriptions.ts +217 -0
  315. package/templates/app/composables/useOrionplaceTheme.ts +27 -0
  316. package/templates/app/composables/useOrionplaceTicketSubject.ts +180 -0
  317. package/templates/app/composables/useOrionplaceTickets.ts +335 -0
  318. package/templates/app/composables/useOrionplaceWallet.ts +166 -0
  319. package/templates/app/error.vue +108 -0
  320. package/templates/app/interfaces/orionplace/accounts/IContact.ts +21 -0
  321. package/templates/app/interfaces/orionplace/accounts/IEmailNotificationLocale.ts +17 -0
  322. package/templates/app/interfaces/orionplace/accounts/IEmailVerification.ts +59 -0
  323. package/templates/app/interfaces/orionplace/accounts/IProfileActions.ts +38 -0
  324. package/templates/app/interfaces/orionplace/accounts/IProfileData.ts +123 -0
  325. package/templates/app/interfaces/orionplace/accounts/IProfileMedia.ts +17 -0
  326. package/templates/app/interfaces/orionplace/accounts/IStorefrontProfile.ts +54 -0
  327. package/templates/app/interfaces/orionplace/address/IAddressCitySuggestion.ts +19 -0
  328. package/templates/app/interfaces/orionplace/address/IAddressEditor.ts +9 -0
  329. package/templates/app/interfaces/orionplace/address/IAddressLocationSuggestion.ts +22 -0
  330. package/templates/app/interfaces/orionplace/address/IAddressRegionSearch.ts +30 -0
  331. package/templates/app/interfaces/orionplace/address/IAddressSuggestion.ts +20 -0
  332. package/templates/app/interfaces/orionplace/address/IUserAddress.ts +87 -0
  333. package/templates/app/interfaces/orionplace/apiBase/TMethod.ts +1 -0
  334. package/templates/app/interfaces/orionplace/appBase/IAppLoad.ts +16 -0
  335. package/templates/app/interfaces/orionplace/appBase/IAppLoadCommon.ts +45 -0
  336. package/templates/app/interfaces/orionplace/appBase/IApploadUserProfile.ts +13 -0
  337. package/templates/app/interfaces/orionplace/appBase/IForm.ts +21 -0
  338. package/templates/app/interfaces/orionplace/appBase/ISEO.ts +21 -0
  339. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonBanner.ts +11 -0
  340. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonContact.ts +8 -0
  341. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonCurrency.ts +15 -0
  342. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonEvents.ts +18 -0
  343. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonLocale.ts +14 -0
  344. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonLogos.ts +6 -0
  345. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonPath.ts +22 -0
  346. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonSEO.ts +26 -0
  347. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonSocial.ts +15 -0
  348. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonTariff.ts +7 -0
  349. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonUnit.ts +12 -0
  350. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonVariables.ts +8 -0
  351. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonVisualSettings.ts +11 -0
  352. package/templates/app/interfaces/orionplace/appBase/appLoadCommon/IAppLoadCommonWalletValue.ts +3 -0
  353. package/templates/app/interfaces/orionplace/blog/IBlogApi.ts +247 -0
  354. package/templates/app/interfaces/orionplace/blog/IBlogPostPreview.ts +30 -0
  355. package/templates/app/interfaces/orionplace/cart/ICartActions.ts +67 -0
  356. package/templates/app/interfaces/orionplace/cart/ICartData.ts +382 -0
  357. package/templates/app/interfaces/orionplace/cart/ICartDeliveryActions.ts +68 -0
  358. package/templates/app/interfaces/orionplace/cart/ICartModal.ts +22 -0
  359. package/templates/app/interfaces/orionplace/cart/IDeliveryMap.ts +29 -0
  360. package/templates/app/interfaces/orionplace/catalog/ICatalogDirectory.ts +75 -0
  361. package/templates/app/interfaces/orionplace/category/ICategory.ts +41 -0
  362. package/templates/app/interfaces/orionplace/domains/IDomain.ts +13 -0
  363. package/templates/app/interfaces/orionplace/forms/ICustomerSubfilter.ts +19 -0
  364. package/templates/app/interfaces/orionplace/index.ts +57 -0
  365. package/templates/app/interfaces/orionplace/marketing/IPromoActions.ts +51 -0
  366. package/templates/app/interfaces/orionplace/orders/IOrderActions.ts +99 -0
  367. package/templates/app/interfaces/orionplace/orders/IOrderHistory.ts +259 -0
  368. package/templates/app/interfaces/orionplace/orders/IProductPreorder.ts +31 -0
  369. package/templates/app/interfaces/orionplace/payments/IInvoice.ts +147 -0
  370. package/templates/app/interfaces/orionplace/products/IProduct.ts +262 -0
  371. package/templates/app/interfaces/orionplace/products/IProductFeedbackApi.ts +218 -0
  372. package/templates/app/interfaces/orionplace/products/IProductSearchApi.ts +146 -0
  373. package/templates/app/interfaces/orionplace/products/IProductSearchFacets.ts +35 -0
  374. package/templates/app/interfaces/orionplace/products/IProductSecondaryVariantRequest.ts +15 -0
  375. package/templates/app/interfaces/orionplace/products/IProductSpecification.ts +14 -0
  376. package/templates/app/interfaces/orionplace/products/IWishlist.ts +22 -0
  377. package/templates/app/interfaces/orionplace/sellers/ISellerDirectory.ts +70 -0
  378. package/templates/app/interfaces/orionplace/shared/IBreadcrumb.ts +10 -0
  379. package/templates/app/interfaces/orionplace/shared/IGeoCoordinates.ts +4 -0
  380. package/templates/app/interfaces/orionplace/shared/IStorefrontControls.ts +13 -0
  381. package/templates/app/interfaces/orionplace/shared/ITransformValue.ts +3 -0
  382. package/templates/app/interfaces/orionplace/state.ts +4 -0
  383. package/templates/app/interfaces/orionplace/stores/IStoreDirectory.ts +63 -0
  384. package/templates/app/interfaces/orionplace/subscribeOptions/ISubscribeOption.ts +9 -0
  385. package/templates/app/interfaces/orionplace/subscribeTariff/ISubscribeTariff.ts +56 -0
  386. package/templates/app/interfaces/orionplace/subscribeTariff/ITariffSelection.ts +11 -0
  387. package/templates/app/interfaces/orionplace/subscribes/ISubscribe.ts +28 -0
  388. package/templates/app/interfaces/orionplace/subscribes/ISubscriptionApi.ts +125 -0
  389. package/templates/app/interfaces/orionplace/tickets/ICustomerTicketApi.ts +223 -0
  390. package/templates/app/interfaces/orionplace/transport.ts +34 -0
  391. package/templates/app/layouts/default.vue +376 -0
  392. package/templates/app/middleware/00.orionplace.global.ts +27 -0
  393. package/templates/app/middleware/01.orionplace-sellers.global.ts +15 -0
  394. package/templates/app/middleware/orionplace-account.ts +40 -0
  395. package/templates/app/pages/activity.vue +19 -0
  396. package/templates/app/pages/addresses.vue +23 -0
  397. package/templates/app/pages/browse.vue +246 -0
  398. package/templates/app/pages/cart.vue +20 -0
  399. package/templates/app/pages/catalog.vue +17 -0
  400. package/templates/app/pages/category/[id].vue +142 -0
  401. package/templates/app/pages/contact.vue +17 -0
  402. package/templates/app/pages/featured.vue +144 -0
  403. package/templates/app/pages/index.vue +194 -0
  404. package/templates/app/pages/journal/[id].vue +128 -0
  405. package/templates/app/pages/journal/index.vue +67 -0
  406. package/templates/app/pages/logout.vue +71 -0
  407. package/templates/app/pages/manufacturers.vue +33 -0
  408. package/templates/app/pages/orders.vue +40 -0
  409. package/templates/app/pages/product/[id].vue +126 -0
  410. package/templates/app/pages/profile.vue +118 -0
  411. package/templates/app/pages/promo/[id].vue +67 -0
  412. package/templates/app/pages/promocodes.vue +21 -0
  413. package/templates/app/pages/sellers.vue +203 -0
  414. package/templates/app/pages/stores.vue +36 -0
  415. package/templates/app/pages/subscriptions.vue +21 -0
  416. package/templates/app/pages/tariffs/[slug]/[id].vue +126 -0
  417. package/templates/app/pages/tariffs/index.vue +50 -0
  418. package/templates/app/pages/tickets.vue +56 -0
  419. package/templates/app/pages/unsubscribe.vue +32 -0
  420. package/templates/app/pages/wallet.vue +23 -0
  421. package/templates/app/pages/wishlist.vue +48 -0
  422. package/templates/app/stores/orionplace.ts +493 -0
  423. package/templates/app/stores/orionplaceBrowse.ts +79 -0
  424. package/templates/app/stores/orionplaceCatalog.ts +121 -0
  425. package/templates/app/stores/orionplaceDomainAccess.ts +55 -0
  426. package/templates/app/stores/orionplaceProducts.ts +249 -0
  427. package/templates/app/stores/orionplaceSelections.ts +132 -0
  428. package/templates/app/themes/orionplace.ts +108 -0
  429. package/templates/app/utils/orionplace/accountLabels.ts +22 -0
  430. package/templates/app/utils/orionplace/activityLabels.ts +65 -0
  431. package/templates/app/utils/orionplace/activityPresentation.ts +16 -0
  432. package/templates/app/utils/orionplace/addressChanges.ts +26 -0
  433. package/templates/app/utils/orionplace/addressRegions.ts +17 -0
  434. package/templates/app/utils/orionplace/api.ts +333 -0
  435. package/templates/app/utils/orionplace/blogArticleHtml.ts +318 -0
  436. package/templates/app/utils/orionplace/blogComments.ts +133 -0
  437. package/templates/app/utils/orionplace/blogLabels.ts +111 -0
  438. package/templates/app/utils/orionplace/blogLayout.ts +95 -0
  439. package/templates/app/utils/orionplace/breadcrumbLabels.ts +11 -0
  440. package/templates/app/utils/orionplace/browseLabels.ts +98 -0
  441. package/templates/app/utils/orionplace/cartAddress.ts +94 -0
  442. package/templates/app/utils/orionplace/cartLabels.ts +261 -0
  443. package/templates/app/utils/orionplace/cartOptions.ts +143 -0
  444. package/templates/app/utils/orionplace/cartPreview.ts +108 -0
  445. package/templates/app/utils/orionplace/cartPromo.ts +150 -0
  446. package/templates/app/utils/orionplace/cartShipment.ts +74 -0
  447. package/templates/app/utils/orionplace/cartSnapshot.ts +20 -0
  448. package/templates/app/utils/orionplace/catalog.ts +106 -0
  449. package/templates/app/utils/orionplace/category.ts +52 -0
  450. package/templates/app/utils/orionplace/categoryLabels.ts +31 -0
  451. package/templates/app/utils/orionplace/contactLabels.ts +102 -0
  452. package/templates/app/utils/orionplace/currency.ts +128 -0
  453. package/templates/app/utils/orionplace/deliveryMap.ts +89 -0
  454. package/templates/app/utils/orionplace/directoryLabels.ts +131 -0
  455. package/templates/app/utils/orionplace/emptyStateArt.ts +231 -0
  456. package/templates/app/utils/orionplace/errorPageLabels.ts +80 -0
  457. package/templates/app/utils/orionplace/featureData.ts +25 -0
  458. package/templates/app/utils/orionplace/featureLabels.ts +271 -0
  459. package/templates/app/utils/orionplace/featuredLabels.ts +28 -0
  460. package/templates/app/utils/orionplace/files.ts +71 -0
  461. package/templates/app/utils/orionplace/footerLabels.ts +35 -0
  462. package/templates/app/utils/orionplace/guestSession.ts +50 -0
  463. package/templates/app/utils/orionplace/headerLabels.ts +68 -0
  464. package/templates/app/utils/orionplace/homeContent.ts +129 -0
  465. package/templates/app/utils/orionplace/homeLabels.ts +52 -0
  466. package/templates/app/utils/orionplace/htmlText.ts +59 -0
  467. package/templates/app/utils/orionplace/links.ts +14 -0
  468. package/templates/app/utils/orionplace/manufacturerIndex.ts +91 -0
  469. package/templates/app/utils/orionplace/modalWindow.ts +109 -0
  470. package/templates/app/utils/orionplace/nativeApp.ts +361 -0
  471. package/templates/app/utils/orionplace/notice.ts +22 -0
  472. package/templates/app/utils/orionplace/orderLabels.ts +309 -0
  473. package/templates/app/utils/orionplace/orderPresentation.ts +586 -0
  474. package/templates/app/utils/orionplace/pageSeo.ts +274 -0
  475. package/templates/app/utils/orionplace/paginationScroll.ts +131 -0
  476. package/templates/app/utils/orionplace/phone.ts +22 -0
  477. package/templates/app/utils/orionplace/presentation.ts +72 -0
  478. package/templates/app/utils/orionplace/productActionLabels.ts +60 -0
  479. package/templates/app/utils/orionplace/productActions.ts +547 -0
  480. package/templates/app/utils/orionplace/productAvailability.ts +36 -0
  481. package/templates/app/utils/orionplace/productGallery.ts +72 -0
  482. package/templates/app/utils/orionplace/productLabels.ts +82 -0
  483. package/templates/app/utils/orionplace/productManufacturer.ts +30 -0
  484. package/templates/app/utils/orionplace/productPage.ts +46 -0
  485. package/templates/app/utils/orionplace/productPhotos.ts +67 -0
  486. package/templates/app/utils/orionplace/productSearchScope.ts +237 -0
  487. package/templates/app/utils/orionplace/productSeller.ts +51 -0
  488. package/templates/app/utils/orionplace/profile.ts +136 -0
  489. package/templates/app/utils/orionplace/profileLabels.ts +151 -0
  490. package/templates/app/utils/orionplace/promoLabels.ts +75 -0
  491. package/templates/app/utils/orionplace/promoPresentation.ts +381 -0
  492. package/templates/app/utils/orionplace/reviewLabels.ts +172 -0
  493. package/templates/app/utils/orionplace/reviewScope.ts +41 -0
  494. package/templates/app/utils/orionplace/richText.ts +13 -0
  495. package/templates/app/utils/orionplace/searchFilters.ts +99 -0
  496. package/templates/app/utils/orionplace/searchHistory.ts +144 -0
  497. package/templates/app/utils/orionplace/sellerDirectory.ts +134 -0
  498. package/templates/app/utils/orionplace/seo.ts +52 -0
  499. package/templates/app/utils/orionplace/serverCookies.ts +88 -0
  500. package/templates/app/utils/orionplace/sessionLabels.ts +27 -0
  501. package/templates/app/utils/orionplace/signInReturn.ts +89 -0
  502. package/templates/app/utils/orionplace/storeDirectory.ts +50 -0
  503. package/templates/app/utils/orionplace/subscriptionChanges.ts +167 -0
  504. package/templates/app/utils/orionplace/subscriptionLabels.ts +67 -0
  505. package/templates/app/utils/orionplace/subscriptionManageLabels.ts +307 -0
  506. package/templates/app/utils/orionplace/subscriptionPlans.ts +162 -0
  507. package/templates/app/utils/orionplace/subscriptionRemote.ts +110 -0
  508. package/templates/app/utils/orionplace/subscriptionUsage.ts +82 -0
  509. package/templates/app/utils/orionplace/tariffLabels.ts +130 -0
  510. package/templates/app/utils/orionplace/tariffPage.ts +77 -0
  511. package/templates/app/utils/orionplace/tariffVariables.ts +165 -0
  512. package/templates/app/utils/orionplace/tariffs.ts +284 -0
  513. package/templates/app/utils/orionplace/ticketItems.ts +87 -0
  514. package/templates/app/utils/orionplace/ticketLabels.ts +335 -0
  515. package/templates/app/utils/orionplace/ticketLocation.ts +79 -0
  516. package/templates/app/utils/orionplace/walletTransaction.ts +135 -0
  517. package/templates/app/utils/orionplaceAppLoad.ts +73 -0
  518. package/templates/orionplace/COMPONENT-DOWNLOAD.md +40 -0
  519. package/templates/orionplace/COMPONENTS.md +1983 -0
  520. package/templates/orionplace/THEMES.md +94 -0
@@ -0,0 +1,897 @@
1
+ <template>
2
+ <article
3
+ v-if="product"
4
+ ref="card"
5
+ :style="{ minHeight }"
6
+ class="
7
+ box-border grid min-w-0 content-start
8
+ font-orionplace text-orionplace-text
9
+ "
10
+ :class="layoutClass"
11
+ :data-product-id="product.id"
12
+ :data-product-layout="layout"
13
+ :aria-busy="variantLoading || undefined"
14
+ >
15
+ <div
16
+ v-if="!details"
17
+ ref="imageArea"
18
+ class="relative w-full min-w-0 self-start justify-self-start"
19
+ :class="{
20
+ 'col-span-full max-w-52 @min-[22rem]:col-span-1 @min-[22rem]:row-span-3 @min-[22rem]:max-w-44':
21
+ isCompact,
22
+ }"
23
+ :style="photoInsetStyle"
24
+ data-product-image
25
+ >
26
+ <component
27
+ :is="productHref ? 'a' : 'button'"
28
+ data-product-part="OrionplaceImage"
29
+ data-product-image-viewport
30
+ :data-product-photo-swipe="photos.length > 1 || undefined"
31
+ :href="productHref"
32
+ :type="productHref ? undefined : 'button'"
33
+ :disabled="productHref ? undefined : disabled"
34
+ :aria-disabled="productHref && disabled ? 'true' : undefined"
35
+ class="
36
+ relative block w-full overflow-hidden
37
+ cursor-pointer border-0 bg-transparent p-0
38
+ outline-none transition-opacity motion-reduce:transition-none
39
+ hover:opacity-85 focus-visible:opacity-70
40
+ "
41
+ :class="{ 'aspect-[3/4]': !isCompact }"
42
+ @click="selectProduct"
43
+ @pointerenter="photosPrimed = true"
44
+ @pointermove="pointAtPhoto"
45
+ @pointerleave="leavePhotos"
46
+ @touchstart.passive="startPhotoSwipe"
47
+ @touchend="endPhotoSwipe"
48
+ >
49
+ <template
50
+ v-for="(photo, index) in photoSources"
51
+ :key="`${index}:${photo}`"
52
+ >
53
+ <OrionplaceImage
54
+ v-if="index === 0 || photosPrimed || index === activePhoto"
55
+ :src="photo"
56
+ :alt="name"
57
+ :width="3"
58
+ :height="4"
59
+ :loading="index === 0 ? 'lazy' : 'eager'"
60
+ :aria-hidden="photos.length > 1 ? index !== activePhoto : undefined"
61
+ class="
62
+ box-border w-full object-contain
63
+ transition-opacity duration-200 motion-reduce:transition-none
64
+ "
65
+ :class="[
66
+ index > 0
67
+ ? 'absolute inset-0 h-full'
68
+ : isCompact
69
+ ? 'h-52 @min-[22rem]:h-44'
70
+ : 'h-full',
71
+ { 'opacity-0': index !== activePhoto },
72
+ ]"
73
+ @load="measurePhoto"
74
+ />
75
+ </template>
76
+ </component>
77
+ <span
78
+ v-if="photos.length > 1"
79
+ data-product-photo-bars
80
+ aria-hidden="true"
81
+ class="pointer-events-none absolute flex gap-1"
82
+ >
83
+ <span
84
+ v-for="(photo, index) in photos"
85
+ :key="`${index}:${photo}`"
86
+ class="
87
+ block h-0.5 flex-1 transition-colors
88
+ duration-150 motion-reduce:transition-none
89
+ "
90
+ :class="
91
+ index === activePhoto
92
+ ? 'bg-orionplace-accent'
93
+ : 'bg-orionplace-text/20'
94
+ "
95
+ />
96
+ </span>
97
+ <span
98
+ v-if="variantLoading"
99
+ data-product-variant-loading
100
+ aria-hidden="true"
101
+ class="
102
+ pointer-events-none absolute inset-0
103
+ flex items-center justify-center
104
+ bg-orionplace-surface/50
105
+ "
106
+ >
107
+ <span
108
+ class="
109
+ h-6 w-6 rounded-full
110
+ border-2 border-solid border-orionplace-text border-t-transparent
111
+ animate-spin motion-reduce:animate-none
112
+ "
113
+ />
114
+ </span>
115
+ <ProductCardBadges
116
+ data-product-part="ProductCardBadges"
117
+ v-if="!isCompact"
118
+ :product-id="displayedProductId"
119
+ :collection="collection"
120
+ low-stock-label=""
121
+ class="pointer-events-none absolute"
122
+ />
123
+ <ProductCardActions
124
+ data-product-part="ProductCardActions"
125
+ v-if="purchaseActions"
126
+ :product-id="displayedProductId"
127
+ :collection="collection"
128
+ :disabled="purchaseDisabled"
129
+ class="absolute max-w-full"
130
+ icon-only
131
+ @request-variants="variantControls?.openForPurchase()"
132
+ @add="emit('add', $event)"
133
+ @remove="emit('remove', $event)"
134
+ @subscribe="emit('subscribe', $event)"
135
+ @unsubscribe="emit('unsubscribe', $event)"
136
+ @preorder="emit('preorder', $event)"
137
+ />
138
+ <ProductCardFavorite
139
+ data-product-part="ProductCardFavorite"
140
+ v-if="purchaseActions"
141
+ :product-id="displayedProductId"
142
+ :collection="collection"
143
+ :disabled="purchaseDisabled"
144
+ class="absolute"
145
+ @toggle="
146
+ emit('toggleFavorite', {
147
+ product: displayedProductId,
148
+ selected: $event,
149
+ })
150
+ "
151
+ />
152
+ </div>
153
+ <div
154
+ data-product-heading
155
+ class="grid min-w-0 content-start gap-1 empty:hidden"
156
+ :class="{ 'col-span-full @min-[22rem]:col-start-2': isCompact }"
157
+ >
158
+ <ProductCardSeller
159
+ v-if="!details"
160
+ data-product-part="ProductCardSeller"
161
+ :product-id="displayedProductId"
162
+ :collection="collection"
163
+ :disabled="disabled"
164
+ @select="emit('selectSeller', $event)"
165
+ />
166
+ <component
167
+ :is="productHref ? 'a' : 'button'"
168
+ v-if="!details"
169
+ :href="productHref"
170
+ :type="productHref ? undefined : 'button'"
171
+ :disabled="productHref ? undefined : disabled"
172
+ :aria-disabled="productHref && disabled ? 'true' : undefined"
173
+ class="
174
+ block w-full
175
+ cursor-pointer border-0 bg-transparent p-0
176
+ text-left text-orionplace-text no-underline
177
+ outline-none transition-opacity motion-reduce:transition-none
178
+ hover:opacity-70 focus-visible:bg-orionplace-hover
179
+ "
180
+ @click="selectProduct"
181
+ >
182
+ <ProductCardTitle
183
+ data-product-part="ProductCardTitle"
184
+ :product-id="displayedProductId"
185
+ :collection="collection"
186
+ />
187
+ </component>
188
+ <p
189
+ v-if="variantFailed"
190
+ role="alert"
191
+ data-product-variant-error
192
+ class="m-0 text-xs leading-5 text-orionplace-danger"
193
+ >
194
+ {{ copy.variantFailed }}
195
+ </p>
196
+ <p
197
+ v-else-if="variantLoading"
198
+ role="status"
199
+ data-product-variant-status
200
+ class="sr-only"
201
+ >
202
+ {{ copy.variantLoading }}
203
+ </p>
204
+ </div>
205
+ <ProductCardBadges
206
+ data-product-part="ProductCardBadges"
207
+ v-if="details"
208
+ :product-id="displayedProductId"
209
+ :collection="collection"
210
+ low-stock-label=""
211
+ />
212
+ <ProductCardPrice
213
+ data-product-part="ProductCardPrice"
214
+ :class="{
215
+ 'col-span-full @min-[22rem]:col-start-2 @min-[22rem]:row-start-2':
216
+ isCompact,
217
+ }"
218
+ :product-id="displayedProductId"
219
+ :collection="collection"
220
+ />
221
+ <div
222
+ v-if="details && $slots.afterPrice"
223
+ data-product-after-price
224
+ class="min-w-0"
225
+ >
226
+ <slot
227
+ name="afterPrice"
228
+ :product="product"
229
+ />
230
+ </div>
231
+ <p
232
+ v-if="details && variantCaption"
233
+ class="m-0 -mb-2 text-xs text-orionplace-muted first-letter:uppercase"
234
+ data-product-variant-caption
235
+ >
236
+ {{ variantCaption.name }}:
237
+ <span class="text-orionplace-text">{{ variantCaption.value }}</span>
238
+ </p>
239
+ <ProductCardVariants
240
+ data-product-part="ProductCardVariants"
241
+ ref="variantControls"
242
+ :actions-disabled="purchaseDisabled"
243
+ @add="emit('add', $event)"
244
+ @remove="emit('remove', $event)"
245
+ @subscribe="emit('subscribe', $event)"
246
+ @unsubscribe="emit('unsubscribe', $event)"
247
+ @preorder="emit('preorder', $event)"
248
+ :class="{
249
+ 'col-span-full @min-[22rem]:col-start-2 @min-[22rem]:row-start-3':
250
+ isCompact,
251
+ }"
252
+ :product-id="displayedProductId"
253
+ :collection="collection"
254
+ :variant-product-ids="variantProductIds"
255
+ :disabled="disabled"
256
+ @select="selectVariant"
257
+ @select-secondary="selectSecondaryVariant"
258
+ @request-secondary="emit('requestSecondaryVariants', $event)"
259
+ />
260
+ <ProductCardRating
261
+ data-product-part="ProductCardRating"
262
+ v-if="!isCompact && !details"
263
+ :product-id="displayedProductId"
264
+ :collection="collection"
265
+ />
266
+ <ProductCardStockNotice
267
+ data-product-part="ProductCardStockNotice"
268
+ v-if="!isCompact"
269
+ :product-id="displayedProductId"
270
+ :collection="collection"
271
+ />
272
+ <ProductCardDescription
273
+ data-product-part="ProductCardDescription"
274
+ v-if="!isCompact && !details"
275
+ :product-id="displayedProductId"
276
+ :collection="collection"
277
+ class="line-clamp-2"
278
+ />
279
+ <div
280
+ v-if="details && purchaseActions"
281
+ class="flex items-start gap-2 pt-2"
282
+ >
283
+ <ProductCardActions
284
+ data-product-part="ProductCardActions"
285
+ :product-id="displayedProductId"
286
+ :collection="collection"
287
+ :disabled="purchaseDisabled"
288
+ class="min-w-0 flex-1"
289
+ variant-selection-resolved
290
+ @request-variants="variantControls?.openForPurchase()"
291
+ @add="emit('add', $event)"
292
+ @remove="emit('remove', $event)"
293
+ @subscribe="emit('subscribe', $event)"
294
+ @unsubscribe="emit('unsubscribe', $event)"
295
+ @preorder="emit('preorder', $event)"
296
+ />
297
+ <ProductCardFavorite
298
+ data-product-part="ProductCardFavorite"
299
+ :product-id="displayedProductId"
300
+ :collection="collection"
301
+ :disabled="purchaseDisabled"
302
+ @toggle="
303
+ emit('toggleFavorite', {
304
+ product: displayedProductId,
305
+ selected: $event,
306
+ })
307
+ "
308
+ />
309
+ </div>
310
+ <div
311
+ v-if="$slots.footer"
312
+ data-product-footer
313
+ class="min-w-0"
314
+ >
315
+ <slot
316
+ name="footer"
317
+ :product="product"
318
+ />
319
+ </div>
320
+ </article>
321
+ </template>
322
+
323
+ <script setup lang="ts">
324
+ import { useOrionplaceStableHeight } from '@/composables/useOrionplaceStableHeight';
325
+ import { useOrionplaceStore } from '@/stores/orionplace';
326
+ import { useOrionplaceProductsStore } from '@/stores/orionplaceProducts';
327
+ import { useOrionplaceSelectionsStore } from '@/stores/orionplaceSelections';
328
+ import { useOrionplaceProductLink } from '@/composables/useOrionplaceProductLink';
329
+ import { computed, nextTick, onMounted, onScopeDispose, ref, watch } from 'vue';
330
+ import OrionplaceImage from '@/components/orionplace/shared/OrionplaceImage.vue';
331
+ import {
332
+ getAvailableNestedValueFromObject,
333
+ getAvailableValueFromObject,
334
+ } from '@/utils/orionplace/presentation';
335
+ import { productLabels } from '@/utils/orionplace/productLabels';
336
+ import {
337
+ productPhotoAfterSwipe,
338
+ productPhotoAtPointer,
339
+ productPhotos,
340
+ } from '@/utils/orionplace/productPhotos';
341
+ import ProductCardSeller from '@/components/orionplace/products/ProductCardSeller.vue';
342
+ import ProductCardTitle from '@/components/orionplace/products/ProductCardTitle.vue';
343
+ import ProductCardBadges from '@/components/orionplace/products/ProductCardBadges.vue';
344
+ import ProductCardDescription from '@/components/orionplace/products/ProductCardDescription.vue';
345
+ import ProductCardPrice from '@/components/orionplace/products/ProductCardPrice.vue';
346
+ import ProductCardRating from '@/components/orionplace/products/ProductCardRating.vue';
347
+ import ProductCardVariants from '@/components/orionplace/products/ProductCardVariants.vue';
348
+ import ProductCardActions from '@/components/orionplace/products/ProductCardActions.vue';
349
+ import ProductCardFavorite from '@/components/orionplace/products/ProductCardFavorite.vue';
350
+ import ProductCardStockNotice from '@/components/orionplace/products/ProductCardStockNotice.vue';
351
+ import type { IProductSecondaryVariantRequest } from '@/interfaces/orionplace/products/IProductSecondaryVariantRequest';
352
+ import type {
353
+ IProduct,
354
+ IProductSeller,
355
+ IProductVariantValue,
356
+ IProductSecondaryVariant,
357
+ } from '@/interfaces/orionplace/products/IProduct';
358
+
359
+ const card = ref<HTMLElement>();
360
+ const { minHeight } = useOrionplaceStableHeight(card);
361
+
362
+ const props = withDefaults(
363
+ defineProps<{
364
+ productId: number;
365
+ collection?: 'products' | 'featured';
366
+ compact?: boolean;
367
+ details?: boolean;
368
+ disabled?: boolean;
369
+ actionsDisabled?: boolean;
370
+ purchaseActions?: boolean;
371
+ variantProductIds?: number[];
372
+ }>(),
373
+ {
374
+ collection: 'products',
375
+ compact: false,
376
+ details: false,
377
+ disabled: false,
378
+ actionsDisabled: false,
379
+ purchaseActions: true,
380
+ },
381
+ );
382
+
383
+ const store = useOrionplaceStore();
384
+ const productStore = useOrionplaceProductsStore();
385
+ const selectionStore = useOrionplaceSelectionsStore();
386
+ const isCompact = computed(() => props.compact && !props.details);
387
+ const layout = computed(() => {
388
+ if (props.details) {
389
+ return 'details';
390
+ }
391
+ return isCompact.value ? 'compact' : 'card';
392
+ });
393
+ const layoutClass = computed(() => {
394
+ if (props.details) {
395
+ return 'gap-5';
396
+ }
397
+ return isCompact.value
398
+ ? '@container grid-cols-[minmax(0,11rem)_minmax(0,1fr)] gap-x-5 gap-y-3'
399
+ : 'w-full max-w-72 gap-0';
400
+ });
401
+
402
+ const variantControls = ref<InstanceType<typeof ProductCardVariants>>();
403
+ const displayedProductId = ref(props.productId);
404
+ const requestedProductId = ref(props.productId);
405
+ const product = computed(() =>
406
+ productStore.getProduct(displayedProductId.value, props.collection),
407
+ );
408
+ const copy = computed(() => productLabels(selectionStore.localeCode));
409
+ // With a product page address from the host, the image and name are
410
+ // links: the page HTML then links to the product for search engines.
411
+ const productLink = useOrionplaceProductLink();
412
+ const productHref = computed(() =>
413
+ productLink && product.value ? productLink(product.value.id) : undefined,
414
+ );
415
+
416
+ // The host marks a missing target while it loads; see useOrionplaceProductVariants.
417
+ const variantRequest = computed(() =>
418
+ requestedProductId.value === displayedProductId.value
419
+ ? undefined
420
+ : productStore.getProductRequest(requestedProductId.value),
421
+ );
422
+ const variantLoading = computed(() => variantRequest.value === 'loading');
423
+ const variantFailed = ref(false);
424
+ // Actions wait for the chosen variant, so they never target the previous product.
425
+ const purchaseDisabled = computed(
426
+ () => props.disabled || props.actionsDisabled || variantLoading.value,
427
+ );
428
+
429
+ // The product page names the chosen main variant above its choices.
430
+ const variantCaption = computed(() => {
431
+ const group = product.value?.variants.main_variant;
432
+ const selected = group?.value.find(
433
+ (value) => value.reload_product === displayedProductId.value,
434
+ );
435
+
436
+ if (!group || !selected) {
437
+ return undefined;
438
+ }
439
+
440
+ return {
441
+ name: getAvailableValueFromObject(group.locale, selectionStore.localeCode) ?? '',
442
+ value: getAvailableValueFromObject(selected.locale, selectionStore.localeCode) ?? '',
443
+ };
444
+ });
445
+
446
+ const name = computed(
447
+ () =>
448
+ getAvailableNestedValueFromObject(
449
+ product.value?.locale,
450
+ selectionStore.localeCode,
451
+ 'product_name',
452
+ ) || '',
453
+ );
454
+
455
+ // A product with several photos switches them in the card: the mouse picks
456
+ // the photo of its zone (one equal zone per photo, left to right), a
457
+ // sideways swipe steps to the next or previous one, and the bars at the
458
+ // bottom show which photo is shown. Leaving the picture shows the first
459
+ // photo again. The other photos load once the visitor points at or
460
+ // touches the picture. A click on any photo selects the product.
461
+ const photos = computed(() =>
462
+ productPhotos(product.value?.images, isCompact.value),
463
+ );
464
+ // Without photos the image shows its placeholder.
465
+ const photoSources = computed(() =>
466
+ photos.value.length ? photos.value : [undefined],
467
+ );
468
+ const activePhoto = ref(0);
469
+ const photosPrimed = ref(false);
470
+ let photoSwipeStart: { x: number; y: number } | undefined;
471
+ let photoSwipedAt = 0;
472
+
473
+ watch(
474
+ () => photos.value.join('\n'),
475
+ () => {
476
+ activePhoto.value = 0;
477
+ photosPrimed.value = false;
478
+ },
479
+ );
480
+ watch(activePhoto, () => nextTick(measurePhoto));
481
+
482
+ function pointAtPhoto(event: PointerEvent) {
483
+ // A touch switches photos by swiping, not by where the finger rests.
484
+ if (event.pointerType === 'touch' || photos.value.length < 2) {
485
+ return;
486
+ }
487
+
488
+ photosPrimed.value = true;
489
+ activePhoto.value = productPhotoAtPointer(
490
+ event.clientX,
491
+ (event.currentTarget as HTMLElement).getBoundingClientRect(),
492
+ photos.value.length,
493
+ );
494
+ }
495
+
496
+ function leavePhotos(event: PointerEvent) {
497
+ if (event.pointerType !== 'touch') {
498
+ activePhoto.value = 0;
499
+ }
500
+ }
501
+
502
+ // A sideways swipe switches photos only where the picture keeps sideways
503
+ // moves for itself (`touch-action: pan-y`). A horizontal row of cards,
504
+ // such as a product group on a phone, turns that off so the row scrolls.
505
+ function startPhotoSwipe(event: TouchEvent) {
506
+ const touch = event.touches[0];
507
+ const viewport = event.currentTarget as HTMLElement;
508
+
509
+ photosPrimed.value = true;
510
+ photoSwipeStart =
511
+ touch &&
512
+ event.touches.length === 1 &&
513
+ getComputedStyle(viewport).touchAction === 'pan-y'
514
+ ? { x: touch.clientX, y: touch.clientY }
515
+ : undefined;
516
+ }
517
+
518
+ function endPhotoSwipe(event: TouchEvent) {
519
+ const touch = event.changedTouches[0];
520
+ const start = photoSwipeStart;
521
+
522
+ photoSwipeStart = undefined;
523
+ if (!start || !touch) {
524
+ return;
525
+ }
526
+
527
+ const next = productPhotoAfterSwipe(
528
+ activePhoto.value,
529
+ photos.value.length,
530
+ touch.clientX - start.x,
531
+ touch.clientY - start.y,
532
+ );
533
+
534
+ if (next !== activePhoto.value) {
535
+ activePhoto.value = next;
536
+ photoSwipedAt = Date.now();
537
+ }
538
+ }
539
+
540
+ // A photo keeps its own proportions inside the card's image area, so that
541
+ // area can show empty space beside or above the picture. These offsets are
542
+ // measured from the loaded image and keep the badges, the wishlist control
543
+ // and the purchase actions on the picture's own corners.
544
+ const imageArea = ref<HTMLElement>();
545
+ const photoInset = ref({ x: 0, y: 0 });
546
+ const photoInsetStyle = computed(() => ({
547
+ '--product-photo-inset-x': `${photoInset.value.x}px`,
548
+ '--product-photo-inset-y': `${photoInset.value.y}px`,
549
+ }));
550
+
551
+ let areaObserver: ResizeObserver | undefined;
552
+
553
+ function setPhotoInset(x: number, y: number) {
554
+ if (photoInset.value.x === x && photoInset.value.y === y) {
555
+ return;
556
+ }
557
+
558
+ photoInset.value = { x, y };
559
+ }
560
+
561
+ function clearPhotoInset() {
562
+ setPhotoInset(0, 0);
563
+ }
564
+
565
+ function measurePhoto() {
566
+ // A renderer without a browser layout, such as a test host, has
567
+ // nothing to measure.
568
+ const image =
569
+ imageArea.value?.querySelector?.<HTMLImageElement>('img[aria-hidden="false"]') ??
570
+ imageArea.value?.querySelector?.('img');
571
+
572
+ if (!image?.naturalWidth || !image.naturalHeight) {
573
+ clearPhotoInset();
574
+ return;
575
+ }
576
+
577
+ const area = image.getBoundingClientRect();
578
+ const scale = Math.min(
579
+ area.width / image.naturalWidth,
580
+ area.height / image.naturalHeight,
581
+ );
582
+
583
+ setPhotoInset(
584
+ Math.max(0, (area.width - image.naturalWidth * scale) / 2),
585
+ Math.max(0, (area.height - image.naturalHeight * scale) / 2),
586
+ );
587
+ }
588
+
589
+ onMounted(() => {
590
+ // A cached picture is already decoded before the load listener attaches.
591
+ measurePhoto();
592
+ // A failed picture is replaced by the placeholder, which fills the whole
593
+ // area. OrionplaceImage handles that failure itself, so the card listens
594
+ // for the event on its way down to the image instead of on the image.
595
+ imageArea.value?.addEventListener?.('error', clearPhotoInset, true);
596
+
597
+ if (typeof ResizeObserver === 'undefined') {
598
+ return;
599
+ }
600
+
601
+ areaObserver = new ResizeObserver(() => measurePhoto());
602
+
603
+ if (imageArea.value) {
604
+ areaObserver.observe(imageArea.value);
605
+ }
606
+ });
607
+
608
+ watch(imageArea, (node, previous) => {
609
+ if (previous) {
610
+ areaObserver?.unobserve(previous);
611
+ }
612
+
613
+ if (node) {
614
+ areaObserver?.observe(node);
615
+ measurePhoto();
616
+ }
617
+ });
618
+
619
+ onScopeDispose(() => {
620
+ imageArea.value?.removeEventListener?.('error', clearPhotoInset, true);
621
+ areaObserver?.disconnect();
622
+ });
623
+
624
+ defineSlots<{
625
+ footer?(props: { product: IProduct }): unknown;
626
+ afterPrice?(props: { product: IProduct }): unknown;
627
+ }>();
628
+
629
+ const emit = defineEmits<{
630
+ select: [product: IProduct];
631
+ selectSeller: [seller: IProductSeller];
632
+ toggleFavorite: [selection: { product: number; selected: boolean }];
633
+ requestSecondaryVariants: [selection: IProductSecondaryVariantRequest];
634
+ selectVariant: [
635
+ selection: { product: number; variant: IProductVariantValue },
636
+ ];
637
+ selectSecondaryVariant: [
638
+ selection: { product: number; variant: IProductSecondaryVariant },
639
+ ];
640
+ add: [selection: { product: number; quantity: number }];
641
+ remove: [selection: { product: number; cartItem: number }];
642
+ subscribe: [selection: { product: number }];
643
+ unsubscribe: [selection: { product: number }];
644
+ preorder: [selection: { product: number }];
645
+ }>();
646
+
647
+ watch(
648
+ [
649
+ () => props.productId,
650
+ () => props.collection,
651
+ () => store.init,
652
+ () => productStore.productUpdates,
653
+ ],
654
+ () => {
655
+ displayedProductId.value = props.productId;
656
+ requestedProductId.value = props.productId;
657
+ variantFailed.value = false;
658
+ },
659
+ { flush: 'sync' },
660
+ );
661
+
662
+ // A failed target leaves the current product and its selected choice in place.
663
+ watch(
664
+ variantRequest,
665
+ (state) => {
666
+ if (state === 'failed') {
667
+ requestedProductId.value = displayedProductId.value;
668
+ variantFailed.value = true;
669
+ }
670
+ },
671
+ { flush: 'sync' },
672
+ );
673
+
674
+ watch(
675
+ () => productStore.getProduct(requestedProductId.value, props.collection),
676
+ (target) => {
677
+ if (target) {
678
+ displayedProductId.value = target.id;
679
+ }
680
+ },
681
+ { flush: 'sync' },
682
+ );
683
+
684
+ // A plain click emits select and the host navigates; a click with a
685
+ // modifier key keeps the browser's own link behavior, such as a new tab.
686
+ function selectProduct(event: MouseEvent) {
687
+ // The click a browser may send after a photo swipe does not open the product.
688
+ if (Date.now() - photoSwipedAt < 500) {
689
+ event.preventDefault();
690
+ return;
691
+ }
692
+
693
+ const browserHandles =
694
+ Boolean(productHref.value) &&
695
+ !props.disabled &&
696
+ (event.button > 0 ||
697
+ event.metaKey ||
698
+ event.ctrlKey ||
699
+ event.shiftKey ||
700
+ event.altKey);
701
+
702
+ if (browserHandles) {
703
+ return;
704
+ }
705
+
706
+ event.preventDefault();
707
+
708
+ if (!props.disabled && product.value) {
709
+ emit('select', product.value);
710
+ }
711
+ }
712
+
713
+ function showVariant(id: number) {
714
+ const otherCollection =
715
+ props.collection === 'products' ? 'featured' : 'products';
716
+ const target =
717
+ productStore.getProduct(id, props.collection) ??
718
+ productStore.getProduct(id, otherCollection);
719
+ requestedProductId.value = id;
720
+ variantFailed.value = false;
721
+
722
+ if (target) {
723
+ productStore.setProduct(target, props.collection);
724
+ displayedProductId.value = target.id;
725
+ }
726
+ }
727
+
728
+ function selectVariant(variant: IProductVariantValue) {
729
+ if (!product.value || props.disabled || !variant.reload_product) {
730
+ return;
731
+ }
732
+
733
+ if (variant.reload_product === product.value.id) {
734
+ requestedProductId.value = product.value.id;
735
+ return;
736
+ }
737
+
738
+ const selection = { product: product.value.id, variant };
739
+ // Selecting a failed choice again is a retry.
740
+ if (productStore.getProductRequest(variant.reload_product) === 'failed') {
741
+ productStore.setProductRequest(variant.reload_product);
742
+ }
743
+ showVariant(variant.reload_product);
744
+ emit('selectVariant', selection);
745
+ }
746
+
747
+ function selectSecondaryVariant(variant: IProductSecondaryVariant) {
748
+ if (
749
+ !product.value ||
750
+ props.disabled ||
751
+ variant.product.id === product.value.id
752
+ ) {
753
+ return;
754
+ }
755
+
756
+ const selection = { product: product.value.id, variant };
757
+ const target =
758
+ productStore.productUpdates[props.collection][variant.product.id] ??
759
+ variant.product;
760
+ // The secondary response supplies this group separately from its products.
761
+ productStore.setProduct(
762
+ {
763
+ ...target,
764
+ secondary_variants:
765
+ target.secondary_variants ?? product.value.secondary_variants,
766
+ },
767
+ props.collection,
768
+ );
769
+ showVariant(variant.product.id);
770
+ emit('selectSecondaryVariant', selection);
771
+ }
772
+ </script>
773
+
774
+ <style scoped>
775
+ /*
776
+ * Labels and controls drawn over the picture follow its own edges. The card
777
+ * measures how much empty space the picture leaves inside the image area and
778
+ * publishes it as these offsets, so the purchase actions stay in the
779
+ * picture's bottom right corner whatever proportions the photo has.
780
+ */
781
+ [data-product-image] > [data-product-part='ProductCardActions'] {
782
+ right: calc(var(--product-photo-inset-x, 0px) + 0.5rem);
783
+ bottom: calc(var(--product-photo-inset-y, 0px) + 0.5rem);
784
+ }
785
+ [data-product-image] > [data-product-part='ProductCardFavorite'] {
786
+ right: calc(var(--product-photo-inset-x, 0px) + 0.25rem);
787
+ top: calc(var(--product-photo-inset-y, 0px) + 0.25rem);
788
+ }
789
+ [data-product-image] > [data-product-part='ProductCardBadges'] {
790
+ left: calc(var(--product-photo-inset-x, 0px) + 0.5rem);
791
+ top: calc(var(--product-photo-inset-y, 0px) + 0.5rem);
792
+ max-width: calc(100% - 3.5rem - 2 * var(--product-photo-inset-x, 0px));
793
+ }
794
+ /* One segment per photo zone along the picture's bottom edge, below the buttons. */
795
+ [data-product-image] > [data-product-photo-bars] {
796
+ right: calc(var(--product-photo-inset-x, 0px) + 0.5rem);
797
+ bottom: calc(var(--product-photo-inset-y, 0px) + 0.125rem);
798
+ left: calc(var(--product-photo-inset-x, 0px) + 0.5rem);
799
+ }
800
+
801
+ /* Sideways moves on a picture with several photos switch the photo. */
802
+ [data-product-photo-swipe] {
803
+ touch-action: pan-y;
804
+ }
805
+
806
+ /*
807
+ * Explicit rows keep every card part on the same line when a product group
808
+ * aligns neighbouring cards through a subgrid and some parts are absent.
809
+ */
810
+ [data-product-layout='card'] > [data-product-image] {
811
+ grid-row: 1;
812
+ }
813
+ [data-product-layout='card'] > [data-product-heading] {
814
+ grid-row: 2;
815
+ margin-top: 0.75rem;
816
+ }
817
+ [data-product-layout='card'] > [data-product-part='ProductCardVariants'] {
818
+ grid-row: 3;
819
+ margin-top: 0.625rem;
820
+ }
821
+ [data-product-layout='card'] > [data-product-part='ProductCardPrice'] {
822
+ grid-row: 4;
823
+ margin-top: 0.5rem;
824
+ }
825
+ [data-product-layout='card'] > [data-product-part='ProductCardRating'] {
826
+ grid-row: 5;
827
+ margin-top: 0.5rem;
828
+ }
829
+ [data-product-layout='card'] > [data-product-part='ProductCardStockNotice'] {
830
+ grid-row: 6;
831
+ margin-top: 0.25rem;
832
+ }
833
+ [data-product-layout='card'] > [data-product-part='ProductCardDescription'] {
834
+ grid-row: 7;
835
+ margin-top: 0.5rem;
836
+ }
837
+ [data-product-layout='card'] > [data-product-footer] {
838
+ grid-row: 8;
839
+ margin-top: 0.75rem;
840
+ }
841
+
842
+ /*
843
+ * A compact card puts the photo beside the text from 22rem of its own
844
+ * width (a measuring box for its parts, which take both columns below
845
+ * that); an added footer stays under the choices, beside the image.
846
+ */
847
+ [data-product-layout='compact'] > [data-product-footer] {
848
+ grid-column: 1 / -1;
849
+ }
850
+
851
+ @container (width >= 22rem) {
852
+ [data-product-layout='compact'] > [data-product-footer] {
853
+ grid-column: 2;
854
+ }
855
+ }
856
+
857
+ [data-product-layout='details'] :deep([data-product-favorite]) {
858
+ width: 2.75rem;
859
+ height: 2.75rem;
860
+ border-radius: 0;
861
+ border-color: var(--orionplace-text);
862
+ background: transparent;
863
+ backdrop-filter: none;
864
+ }
865
+
866
+ /* Grid cards keep every variant choice reachable on one scrollable row. */
867
+ [data-product-layout='card']
868
+ :deep([data-product-variants] [role='group'] > div) {
869
+ flex-wrap: nowrap;
870
+ overflow-x: auto;
871
+ /* Room for the swatches' 24px touch targets, without moving the row. */
872
+ margin: -2px -3px;
873
+ padding: 3px;
874
+ scrollbar-width: thin;
875
+ }
876
+
877
+ /* The product page shows the same variant choices at a slightly larger size. */
878
+ [data-product-layout='details'] :deep([data-product-variant].rounded-full),
879
+ [data-product-layout='details'] :deep([data-secondary-variant].rounded-full) {
880
+ width: 1.5rem;
881
+ height: 1.5rem;
882
+ }
883
+ [data-product-layout='details']
884
+ :deep([data-product-variant]:not(.rounded-full)),
885
+ [data-product-layout='details']
886
+ :deep([data-secondary-variant]:not(.rounded-full)) {
887
+ height: 2rem;
888
+ padding-inline: 0.75rem;
889
+ }
890
+
891
+ [data-product-layout='details']
892
+ > [data-product-part='ProductCardPrice']
893
+ :deep(span) {
894
+ font-size: 1.5rem;
895
+ line-height: 2rem;
896
+ }
897
+ </style>