cloudcommerce 0.26.6 → 0.26.7

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 (231) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  3. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  4. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +4 -1
  5. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  6. package/ecomplus-stores/barra-doce/package.json +2 -2
  7. package/ecomplus-stores/barra-doce/scripts/install.sh +12 -2
  8. package/ecomplus-stores/iluminim/scripts/install.sh +12 -2
  9. package/ecomplus-stores/monocard/.firebaserc +1 -1
  10. package/ecomplus-stores/monocard/.github/build-and-deploy +1 -0
  11. package/ecomplus-stores/monocard/.github/workflows/build-and-deploy.yml +1 -0
  12. package/ecomplus-stores/monocard/README.md +11 -82
  13. package/ecomplus-stores/monocard/SETUP.md +129 -0
  14. package/ecomplus-stores/monocard/{README.pt-BR.md → SETUP.pt-BR.md} +39 -12
  15. package/ecomplus-stores/monocard/functions/config.json +1 -1
  16. package/ecomplus-stores/monocard/functions/{passport → many}/index.js +5 -0
  17. package/ecomplus-stores/monocard/functions/{events → many}/package.json +4 -3
  18. package/ecomplus-stores/monocard/functions/ssr/.eslintrc.cjs +1 -1
  19. package/ecomplus-stores/monocard/functions/ssr/content/blog/.gitkeep +0 -0
  20. package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/contato.json +11 -0
  21. package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/terms.json +11 -0
  22. package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/trocas.json +11 -0
  23. package/ecomplus-stores/monocard/functions/ssr/content/layout.json +25 -10
  24. package/ecomplus-stores/monocard/functions/ssr/content/pages/home.json +63 -0
  25. package/ecomplus-stores/monocard/functions/ssr/content/pages/products.json +19 -0
  26. package/ecomplus-stores/monocard/functions/ssr/content/settings.json +22 -2
  27. package/ecomplus-stores/monocard/functions/ssr/package.json +8 -9
  28. package/ecomplus-stores/monocard/functions/ssr/public/admin/.gitkeep +0 -0
  29. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
  30. package/ecomplus-stores/monocard/functions/ssr/src/assets/card.css +99 -0
  31. package/ecomplus-stores/monocard/functions/ssr/src/assets/style.css +74 -0
  32. package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +5 -14
  33. package/ecomplus-stores/monocard/functions/ssr/src/components/Banner.vue +59 -0
  34. package/ecomplus-stores/monocard/functions/ssr/src/components/BannersGrid.astro +25 -0
  35. package/ecomplus-stores/monocard/functions/ssr/src/components/Breadcrumbs.astro +44 -0
  36. package/ecomplus-stores/monocard/functions/ssr/src/components/CartItem.vue +64 -0
  37. package/ecomplus-stores/monocard/functions/ssr/src/components/CartSidebar.vue +66 -0
  38. package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +8 -3
  39. package/ecomplus-stores/monocard/functions/ssr/src/components/DocDescription.astro +30 -0
  40. package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +2 -2
  41. package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +12 -9
  42. package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +8 -105
  43. package/ecomplus-stores/monocard/functions/ssr/src/components/Prices.vue +10 -27
  44. package/ecomplus-stores/monocard/functions/ssr/src/components/ProductCard.vue +117 -0
  45. package/ecomplus-stores/monocard/functions/ssr/src/components/ProductShelf.vue +57 -0
  46. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopFooter.vue +123 -0
  47. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +85 -32
  48. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +1 -1
  49. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenav.vue +3 -3
  50. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +2 -2
  51. package/ecomplus-stores/monocard/functions/ssr/src/env.d.ts +9 -1
  52. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +9 -44
  53. package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageFooter.astro +52 -0
  54. package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageHeader.astro +35 -0
  55. package/ecomplus-stores/monocard/functions/ssr/src/main/Fallback.astro +0 -5
  56. package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +6 -12
  57. package/ecomplus-stores/monocard/functions/ssr/src/main/Sections.astro +38 -0
  58. package/ecomplus-stores/monocard/functions/ssr/src/main/Wildcard.astro +4 -18
  59. package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +15 -9
  60. package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +19 -9
  61. package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +16 -10
  62. package/ecomplus-stores/monocard/functions/ssr/src/pages/~fallback.astro +25 -0
  63. package/ecomplus-stores/monocard/functions/ssr/src/scripts/InlineScripts.astro +6 -6
  64. package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +1 -11
  65. package/ecomplus-stores/monocard/functions/{modules → with-apps}/index.js +3 -0
  66. package/ecomplus-stores/monocard/functions/{modules → with-apps}/package.json +4 -3
  67. package/ecomplus-stores/monocard/package.json +4 -1
  68. package/ecomplus-stores/monocard/scripts/install.sh +12 -2
  69. package/ecomplus-stores/tia-sonia/scripts/install.sh +12 -2
  70. package/package.json +4 -4
  71. package/packages/api/package.json +1 -1
  72. package/packages/apps/affilate-program/package.json +1 -1
  73. package/packages/apps/correios/package.json +1 -1
  74. package/packages/apps/custom-payment/package.json +1 -1
  75. package/packages/apps/custom-shipping/package.json +1 -1
  76. package/packages/apps/datafrete/package.json +1 -1
  77. package/packages/apps/discounts/package.json +1 -1
  78. package/packages/apps/emails/package.json +1 -1
  79. package/packages/apps/fb-conversions/package.json +2 -2
  80. package/packages/apps/flash-courier/package.json +1 -1
  81. package/packages/apps/frenet/package.json +1 -1
  82. package/packages/apps/galaxpay/package.json +1 -1
  83. package/packages/apps/google-analytics/package.json +1 -1
  84. package/packages/apps/jadlog/package.json +1 -1
  85. package/packages/apps/loyalty-points/package.json +1 -1
  86. package/packages/apps/melhor-envio/package.json +1 -1
  87. package/packages/apps/mercadopago/package.json +1 -1
  88. package/packages/apps/pagarme/package.json +2 -2
  89. package/packages/apps/paghiper/package.json +1 -1
  90. package/packages/apps/pix/package.json +1 -1
  91. package/packages/apps/tiny-erp/package.json +1 -1
  92. package/packages/apps/webhooks/package.json +1 -1
  93. package/packages/cli/package.json +2 -2
  94. package/packages/config/package.json +1 -1
  95. package/packages/emails/package.json +1 -1
  96. package/packages/eslint/package.json +3 -3
  97. package/packages/events/package.json +1 -1
  98. package/packages/feeds/package.json +1 -1
  99. package/packages/firebase/package.json +2 -2
  100. package/packages/i18n/package.json +1 -1
  101. package/packages/modules/package.json +1 -1
  102. package/packages/passport/package.json +1 -1
  103. package/packages/ssr/lib/firebase/serve-storefront.js +23 -8
  104. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  105. package/packages/ssr/package.json +2 -2
  106. package/packages/ssr/src/firebase/serve-storefront.ts +24 -8
  107. package/packages/storefront/dist/client/_astro/{Carousel.9ad2e1dc.js → Carousel.4bf71bce.js} +1 -1
  108. package/packages/storefront/dist/client/_astro/{CartSidebar.a6c6a885.js → CartSidebar.05b12b39.js} +1 -1
  109. package/packages/storefront/dist/client/_astro/{HeroSlider.ee1e6200.js → HeroSlider.fe108a14.js} +1 -1
  110. package/packages/storefront/dist/client/_astro/{PitchBar.6111676e.js → PitchBar.2c821b77.js} +1 -1
  111. package/packages/storefront/dist/client/_astro/{Prices.04ff8fce.js → Prices.78eb0a61.js} +1 -1
  112. package/packages/storefront/dist/client/_astro/{ProductShelf.085721d6.js → ProductShelf.46d8a51c.js} +1 -1
  113. package/packages/storefront/dist/client/_astro/ShopHeader.3694a82b.js +4 -0
  114. package/packages/storefront/dist/client/_astro/_...slug_.a4a7a874.css +1 -0
  115. package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
  116. package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
  117. package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
  118. package/packages/storefront/dist/client/_astro/{firebase-app.8c541cce.js → firebase-app.3f59f3c7.js} +3 -3
  119. package/packages/storefront/dist/client/_astro/headphone_1Ekzdh.avif +0 -0
  120. package/packages/storefront/dist/client/_astro/headphone_Z1GbHcH.webp +0 -0
  121. package/packages/storefront/dist/client/_astro/{hoisted.85fdcf03.js → hoisted.648beb9d.js} +1 -1
  122. package/packages/storefront/dist/client/_astro/index.fadf28bd.js +1 -0
  123. package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
  124. package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
  125. package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
  126. package/packages/storefront/dist/client/_astro/{modules-info.e5d77bf3.js → modules-info.df822732.js} +1 -1
  127. package/packages/storefront/dist/client/_astro/passion_1LvKlp.webp +0 -0
  128. package/packages/storefront/dist/client/_astro/passion_2PSWs.avif +0 -0
  129. package/packages/storefront/dist/client/_astro/rect8589_1A8K2Q.webp +0 -0
  130. package/packages/storefront/dist/client/_astro/rect8589_1ND0he.png +0 -0
  131. package/packages/storefront/dist/client/_astro/rect8589_1mIaKd.png +0 -0
  132. package/packages/storefront/dist/client/_astro/rect8589_LhopI.avif +0 -0
  133. package/packages/storefront/dist/client/_astro/rect8589_Z1NFjiR.avif +0 -0
  134. package/packages/storefront/dist/client/_astro/rect8589_Z2a06Gx.png +0 -0
  135. package/packages/storefront/dist/client/_astro/rect8589_Z2nulUU.webp +0 -0
  136. package/packages/storefront/dist/client/_astro/rect8589_ZH7hsH.avif +0 -0
  137. package/packages/storefront/dist/client/_astro/rect8589_ZorpIx.webp +0 -0
  138. package/packages/storefront/dist/client/_astro/rect859_1CcLjM.avif +0 -0
  139. package/packages/storefront/dist/client/_astro/rect859_1IVKep.png +0 -0
  140. package/packages/storefront/dist/client/_astro/rect859_1zkdb4.webp +0 -0
  141. package/packages/storefront/dist/client/_astro/rect859_299fN7.avif +0 -0
  142. package/packages/storefront/dist/client/_astro/rect859_CnIof.png +0 -0
  143. package/packages/storefront/dist/client/_astro/rect859_Z1OtQaE.avif +0 -0
  144. package/packages/storefront/dist/client/_astro/rect859_flB3g.png +0 -0
  145. package/packages/storefront/dist/client/_astro/rect859_rsWaw.webp +0 -0
  146. package/packages/storefront/dist/client/_astro/rect859_sLbkT.webp +0 -0
  147. package/packages/storefront/dist/client/_astro/rect89_1yf5jS.avif +0 -0
  148. package/packages/storefront/dist/client/_astro/rect89_GQBli.webp +0 -0
  149. package/packages/storefront/dist/client/~fallback.html +67 -0
  150. package/packages/storefront/dist/client/~index.html +113 -0
  151. package/packages/storefront/dist/server/chunks/{CartSidebar.41b20543.mjs → CartSidebar.4179ad81.mjs} +4 -12
  152. package/packages/storefront/dist/server/chunks/{SearchModal.5f5e6a15.mjs → SearchModal.146ce2f7.mjs} +4 -11
  153. package/packages/storefront/dist/server/chunks/{endpoint@_@js.11be892a.mjs → _...05c626ea.mjs} +3 -10
  154. package/packages/storefront/dist/server/chunks/{account@_@astro.204fba92.mjs → account@_@astro.5eaddaf8.mjs} +2 -9
  155. package/packages/storefront/dist/server/chunks/{index@_@astro.19e0f502.mjs → index@_@astro.25a343cc.mjs} +3 -10
  156. package/packages/storefront/dist/server/chunks/{index@_@astro.b37a6ac9.mjs → index@_@astro.2d2f2e33.mjs} +3 -10
  157. package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.36e8882b.mjs → _...slug_.astro.0808946e.mjs} +1836 -450
  158. package/packages/storefront/dist/server/chunks/pages/index.astro.d4145872.mjs +186 -0
  159. package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.ba4c2475.mjs → ~fallback.astro.84d4765b.mjs} +6 -23
  160. package/packages/storefront/dist/server/chunks/{~fallback@_@astro.6bb4c4b4.mjs → ~fallback@_@astro.86d710c3.mjs} +3 -10
  161. package/packages/storefront/dist/server/entry.mjs +7 -14
  162. package/packages/storefront/dist/server/images.dist.csv +30 -0
  163. package/packages/storefront/dist/server/images.src.csv +11 -0
  164. package/packages/storefront/dist/server/renderers.mjs +2 -9
  165. package/packages/storefront/dist/server/static-builds.csv +51 -0
  166. package/packages/storefront/package.json +3 -3
  167. package/packages/storefront/scripts/build-prod.sh +3 -2
  168. package/packages/storefront/server.d.ts +1 -0
  169. package/packages/storefront/src/lib/assets/base.css +8 -0
  170. package/packages/storefront/src/lib/assets/reset.css +11 -2
  171. package/packages/storefront/src/lib/components/ContentClearfix.astro +4 -1
  172. package/packages/storefront/src/lib/components/Drawer.vue +1 -1
  173. package/packages/storefront/src/lib/layouts/BaseBody.astro +3 -1
  174. package/packages/storefront/src/lib/layouts/BaseHead.astro +8 -3
  175. package/packages/storefront/src/lib/layouts/use-page-header.ts +2 -2
  176. package/packages/test-base/package.json +1 -1
  177. package/packages/types/package.json +1 -1
  178. package/pnpm-workspace.yaml +2 -0
  179. package/ecomplus-stores/monocard/functions/core/index.js +0 -9
  180. package/ecomplus-stores/monocard/functions/core/package.json +0 -20
  181. package/ecomplus-stores/monocard/functions/events/index.js +0 -9
  182. package/ecomplus-stores/monocard/functions/passport/package.json +0 -21
  183. package/ecomplus-stores/monocard/functions/ssr/content/blog.json +0 -18
  184. package/ecomplus-stores/monocard/functions/ssr/content/brands.json +0 -24
  185. package/ecomplus-stores/monocard/functions/ssr/content/categories.json +0 -24
  186. package/ecomplus-stores/monocard/functions/ssr/content/collections.json +0 -24
  187. package/ecomplus-stores/monocard/functions/ssr/content/home.json +0 -45
  188. package/ecomplus-stores/monocard/functions/ssr/content/maintenance.json +0 -6
  189. package/ecomplus-stores/monocard/functions/ssr/content/pages/contato.json +0 -6
  190. package/ecomplus-stores/monocard/functions/ssr/content/pages/entrega.json +0 -6
  191. package/ecomplus-stores/monocard/functions/ssr/content/pages/faq.json +0 -6
  192. package/ecomplus-stores/monocard/functions/ssr/content/pages/pagamentos.json +0 -6
  193. package/ecomplus-stores/monocard/functions/ssr/content/pages/privacidade.json +0 -6
  194. package/ecomplus-stores/monocard/functions/ssr/content/pages/sobre-nos.json +0 -6
  195. package/ecomplus-stores/monocard/functions/ssr/content/pages/termos.json +0 -6
  196. package/ecomplus-stores/monocard/functions/ssr/content/pages/trocas.json +0 -6
  197. package/ecomplus-stores/monocard/functions/ssr/content/posts/esta-loja-e-um-pwa.json +0 -9
  198. package/ecomplus-stores/monocard/functions/ssr/content/products.json +0 -32
  199. package/ecomplus-stores/monocard/functions/ssr/content/search.json +0 -8
  200. package/ecomplus-stores/monocard/functions/ssr/content/widgets/analytics.json +0 -11
  201. package/ecomplus-stores/monocard/functions/ssr/content/widgets/compre-confie.json +0 -11
  202. package/ecomplus-stores/monocard/functions/ssr/content/widgets/ebit.json +0 -11
  203. package/ecomplus-stores/monocard/functions/ssr/content/widgets/fb-pixel.json +0 -12
  204. package/ecomplus-stores/monocard/functions/ssr/content/widgets/gmc-ratings.json +0 -12
  205. package/ecomplus-stores/monocard/functions/ssr/content/widgets/minicart.json +0 -6
  206. package/ecomplus-stores/monocard/functions/ssr/content/widgets/offers-notification.json +0 -11
  207. package/ecomplus-stores/monocard/functions/ssr/content/widgets/opinioes-verificadas.json +0 -18
  208. package/ecomplus-stores/monocard/functions/ssr/content/widgets/product-card.json +0 -10
  209. package/ecomplus-stores/monocard/functions/ssr/content/widgets/product.json +0 -13
  210. package/ecomplus-stores/monocard/functions/ssr/content/widgets/search-engine.json +0 -8
  211. package/ecomplus-stores/monocard/functions/ssr/content/widgets/search.json +0 -6
  212. package/ecomplus-stores/monocard/functions/ssr/content/widgets/tag-manager.json +0 -12
  213. package/ecomplus-stores/monocard/functions/ssr/content/widgets/tawkto.json +0 -12
  214. package/ecomplus-stores/monocard/functions/ssr/content/widgets/trustvox.json +0 -15
  215. package/ecomplus-stores/monocard/functions/ssr/content/widgets/user.json +0 -5
  216. package/ecomplus-stores/monocard/functions/ssr/public/admin/config.json +0 -1
  217. package/ecomplus-stores/monocard/functions/ssr/public/assets/cms-preview.css +0 -274
  218. package/ecomplus-stores/monocard/functions/ssr/public/assets/cms.css +0 -114
  219. package/ecomplus-stores/monocard/functions/ssr/public/assets/cvv.png +0 -0
  220. package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/FavoritPro-Regular.woff2 +0 -0
  221. package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/MyriadPro-Regular.woff2 +0 -0
  222. package/ecomplus-stores/monocard/functions/ssr/public/assets/ssl-safe.png +0 -0
  223. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +0 -50
  224. package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +0 -21
  225. package/packages/storefront/dist/client/_astro/ShopHeader.7e485e35.js +0 -4
  226. package/packages/storefront/dist/client/_astro/_...slug_.b693913e.css +0 -1
  227. package/packages/storefront/dist/client/_astro/index.ea57babe.js +0 -1
  228. package/packages/storefront/dist/server/chunks/_...4a2548d2.mjs +0 -35
  229. package/packages/storefront/dist/server/chunks/pages/endpoint.js.f7a896a1.mjs +0 -119
  230. package/packages/storefront/dist/server/chunks/pages/index.astro.3145bd93.mjs +0 -1649
  231. /package/ecomplus-stores/monocard/functions/ssr/src/components/{FeatureTabs.astro → FeaturesSection.astro} +0 -0
@@ -19,7 +19,7 @@
19
19
  >
20
20
  <i
21
21
  class="text-base-100 text-3xl"
22
- :class="isSidenavOpen ? 'i-close' : 'i-menu'"
22
+ :class="isSidenavOpen ? 'i-close' : 'i-menu-3-line'"
23
23
  ></i>
24
24
  </button>
25
25
  </div>
@@ -29,22 +29,28 @@
29
29
  v-bind="{ isSticky, ...headerNavLinks }"
30
30
  />
31
31
  <div class="basis-1/4 px-2 flex justify-end items-center gap-3 lg:gap-4">
32
- <AccountMenu
33
- class="hidden sm:block"
34
- :aria-label="$t.i19myAccount"
35
- :service-links="serviceLinks"
36
- >
32
+ <AccountMenu class="hidden sm:block">
37
33
  <template #button="{ open }">
38
34
  <i
39
- class="i-account w-7 h-7
35
+ class="i-account-pin-circle-line w-7 h-7
40
36
  hover:text-primary hover:scale-110 active:scale-125"
41
37
  :class="open ? 'text-white scale-110' : 'text-base-200'"
42
38
  ></i>
43
39
  </template>
44
40
  </AccountMenu>
45
- <button :aria-label="$t.i19openCart">
46
- <i class="i-shopping-cart w-7 h-7
41
+ <button
42
+ :aria-label="$t.i19openCart"
43
+ @click="isCartOpen = !isCartOpen"
44
+ class="relative group"
45
+ >
46
+ <i class="i-shopping-bag-3-line w-7 h-7
47
47
  text-base-200 hover:text-primary hover:scale-110 active:scale-125"></i>
48
+ <span
49
+ v-if="delayedTotalItems"
50
+ class="ui-badge-pill-sm absolute -top-1 -right-1.5"
51
+ >
52
+ {{ delayedTotalItems }}
53
+ </span>
48
54
  </button>
49
55
  </div>
50
56
  </div>
@@ -53,46 +59,93 @@
53
59
  :has-close-button="false"
54
60
  position="absolute"
55
61
  :class="isSticky ? 'mt-2 md:mt-3' : 'mt-3 sm:mt-4 md:mt-5'"
56
- :style="{ height: `calc(100vh - ${positionY}px + .5rem)` }"
62
+ :style="{
63
+ height: `calc(100vh - ${positionY}px + .5rem)`,
64
+ maxHeight: `calc(100dvh - ${positionY}px + .5rem)`,
65
+ }"
57
66
  >
58
67
  <ShopSidenav class="bg-white pt-6" />
59
68
  </Drawer>
69
+ <Teleport v-if="isMounted" to="#teleported-overlap">
70
+ <Drawer
71
+ v-model="isCartOpen"
72
+ placement="end"
73
+ backdrop-target="#teleported-overlap"
74
+ >
75
+ <Suspense>
76
+ <CartSidebar v-if="isCartOpenOnce" @close="isCartOpen = false" />
77
+ <template #fallback>
78
+ <Skeleton class="pt-16 px-6" is-bold />
79
+ </template>
80
+ </Suspense>
81
+ </Drawer>
82
+ </Teleport>
60
83
  </header>
61
84
  </template>
62
85
 
63
86
  <script setup lang="ts">
64
- import type { CategoriesList } from '@cloudcommerce/api/types';
65
- import { getCurrentInstance, ref } from 'vue';
66
- import useShopHeader from '@@sf/composables/use-shop-header';
87
+ import {
88
+ ref,
89
+ watch,
90
+ onMounted,
91
+ defineAsyncComponent,
92
+ getCurrentInstance,
93
+ } from 'vue';
94
+ import { watchOnce } from '@vueuse/core';
95
+ import { totalItems } from '@@sf/state/shopping-cart';
96
+ import {
97
+ type Props as UseShopHeaderProps,
98
+ useShopHeader,
99
+ } from '@@sf/composables/use-shop-header';
67
100
  import Drawer from '@@sf/components/Drawer.vue';
68
101
  import ShopSidenav from '~/components/ShopSidenav.vue';
69
102
  import ShopHeaderMenu from '~/components/ShopHeaderMenu.vue';
70
103
  import AccountMenu from '~/components/AccountMenu.vue';
71
104
 
72
- export interface Props {
73
- categories: CategoriesList;
74
- menuCategorySlugs?: string[];
75
- menuRandomCategories?: number;
76
- isAlphabeticalSortSubmenu?: boolean;
77
- serviceLinks?: Array<{
78
- title: string;
79
- href: string;
80
- }>;
81
- }
105
+ export interface Props extends Omit<UseShopHeaderProps, 'header'> {}
82
106
 
107
+ const CartSidebar = defineAsyncComponent(() => import('~/components/CartSidebar.vue'));
83
108
  const props = defineProps<Props>();
84
109
  const header = ref<HTMLElement | null>(null);
85
- const {
86
- isSticky,
87
- positionY,
88
- } = useShopHeader({ ...props, header });
110
+ const { isSticky, positionY } = useShopHeader({ ...props, header });
89
111
  const isSidenavOpen = ref(false);
112
+ const isSearchOpen = ref(false);
113
+ const isSearchOpenOnce = ref(false);
114
+ watchOnce(isSearchOpen, () => {
115
+ isSearchOpenOnce.value = true;
116
+ });
117
+ const isCartOpen = ref(false);
118
+ const isCartOpenOnce = ref(false);
119
+ watchOnce(isCartOpen, () => {
120
+ isCartOpenOnce.value = true;
121
+ });
122
+ const isMounted = ref(false);
123
+ const delayedTotalItems = ref(0);
124
+ onMounted(() => {
125
+ isMounted.value = true;
126
+ watch(totalItems, (newTotalItems, prevTotalItems) => {
127
+ if (typeof prevTotalItems === 'number') {
128
+ if (prevTotalItems < newTotalItems) {
129
+ isCartOpen.value = true;
130
+ } else if (prevTotalItems && !newTotalItems) {
131
+ isCartOpen.value = false;
132
+ }
133
+ }
134
+ delayedTotalItems.value = newTotalItems;
135
+ }, { immediate: true });
136
+ });
90
137
  const vm = getCurrentInstance();
91
- const metafields = vm?.appContext.app.config.globalProperties.$settings.metafields || {};
138
+ const metafields = {
139
+ support_url: '',
140
+ business_lp_url: '',
141
+ monocard_slug: '',
142
+ monodot_slug: '',
143
+ ...vm?.appContext.app.config.globalProperties.$settings.metafields,
144
+ };
92
145
  const headerNavLinks = {
93
- supportUrl: metafields.support_url || '',
94
- businessLpUrl: metafields.business_lp_url || '',
95
- monocardSlug: metafields.monocard_slug || '',
96
- monodotSlug: metafields.monodot_slug || '',
146
+ supportUrl: metafields.support_url,
147
+ businessLpUrl: metafields.business_lp_url,
148
+ monocardSlug: metafields.monocard_slug,
149
+ monodotSlug: metafields.monodot_slug,
97
150
  };
98
151
  </script>
@@ -29,7 +29,7 @@
29
29
  >
30
30
  <span>{{ $t.i19buy }}</span>
31
31
  <i
32
- class="i-chevron-down ml-1 transition-transform"
32
+ class="i-arrow-down-s-line ml-1 transition-transform"
33
33
  :class="open ? 'rotate-180' : 'opacity-50'"
34
34
  ></i>
35
35
  </MenuButton>
@@ -12,7 +12,7 @@
12
12
  <footer class="text-base">
13
13
  <div class="flex items-center px-2 py-4 bg-base-100">
14
14
  <AccountLink class="p-2 grow flex items-center gap-3">
15
- <i class="i-account text-4xl text-base-500 m-0"></i>
15
+ <i class="i-account-pin-circle-line text-4xl text-base-500 m-0"></i>
16
16
  <span class="leading-tight">
17
17
  {{ `${$t.i19hello} ${customerName || $t.i19visitor}` }}
18
18
  <small class="block lowercase font-semibold text-primary">
@@ -26,7 +26,7 @@
26
26
  class="p-2 text-right text-base-800"
27
27
  >
28
28
  <span class="text-base-600">{{ $t.i19logout }}</span>
29
- <i class="i-logout text-lg ml-1"></i>
29
+ <i class="i-logout-circle-r-line text-lg ml-1"></i>
30
30
  </button>
31
31
  </div>
32
32
  <ul class="flex gap-3 p-4 bg-base-200 text-xl text-base-700">
@@ -47,7 +47,7 @@ import {
47
47
  isLogged,
48
48
  logout,
49
49
  } from '@@sf/state/customer-session';
50
- import { socialNetworks } from '@@sf/server-data';
50
+ import { socialNetworks } from '@@sf/sf-lib';
51
51
  import AccountLink from '@@sf/components/AccountLink.vue';
52
52
  import SocialNetworkLink from '@@sf/components/SocialNetworkLink.vue';
53
53
  import ShopSidenavCategory from '~/components/ShopSidenavCategory.vue';
@@ -11,8 +11,8 @@
11
11
  :class="isOpen ? 'bg-base-100' : null"
12
12
  >
13
13
  <i :class="!isOpen
14
- ? 'i-arrow-right float-right mb-0 mt-1 text-xl text-base-500'
15
- : 'i-arrow-left text-lg'"></i>
14
+ ? 'i-arrow-right-line float-right mb-0 mt-1 text-xl text-base-500'
15
+ : 'i-arrow-left-line text-lg'"></i>
16
16
  <AImg
17
17
  v-if="!isOpen && categoryTree.icon"
18
18
  :picture="categoryTree.icon"
@@ -1,5 +1,13 @@
1
- /// <reference path="../.astro/types.d.ts" />
2
1
  /// <reference types="@astrojs/image/client" />
3
2
  /// <reference types="vite-plugin-pwa/client" />
3
+ /// <reference types="vue/ref-macros" />
4
4
  /// <reference types="@cloudcommerce/storefront/client" />
5
5
  /// <reference types="@cloudcommerce/storefront/server" />
6
+
7
+ /* eslint-disable import/newline-after-import */
8
+
9
+ declare module '*.vue' {
10
+ import { type DefineComponent } from 'vue';
11
+ const component: DefineComponent<{}, {}, any>;
12
+ export default component;
13
+ }
@@ -1,50 +1,15 @@
1
1
  ---
2
- import type { PageContext } from '@@sf/ssr-context';
3
- import Base from '@@sf/layouts/Base.astro';
2
+ import SfBase from '@@sf/layouts/Base.astro';
4
3
  import InlineScripts from '~/scripts/InlineScripts.astro';
5
- import '@fontsource/inter/variable-full.css';
6
-
7
- export interface Props {
8
- pageContext: PageContext;
9
- title?: string;
10
- }
11
-
12
- const { pageContext, title } = Astro.props as Props;
4
+ import '~/assets/style.css';
5
+ import 'uno.css';
6
+ import '@fontsource-variable/inter/index.css';
13
7
  ---
14
8
 
15
- <Base pageContext={pageContext} title={title}>
9
+ <SfBase>
10
+ <Fragment slot="base-head">
11
+ <slot name="base-head" />
12
+ </Fragment>
16
13
  <InlineScripts slot="before-head-end" />
17
14
  <slot />
18
- </Base>
19
-
20
- <style is:global>
21
- @font-face {
22
- font-family: 'Favorit';
23
- src: url('/assets/fonts/FavoritPro-Regular.woff2') format('woff2');
24
- font-weight: normal;
25
- font-style: normal;
26
- font-display: swap;
27
- }
28
- :root {
29
- --font-brand: "Favorit", sans-serif;
30
- --custom-font-sans: "Inter";
31
- --c-on-primary: rgb(0, 0, 0);
32
- --un-prose-links: rgb(var(--rgb-primary-700));
33
- }
34
- @supports (font-variation-settings: normal) {
35
- :root {
36
- --custom-font-sans: "InterVariable";
37
- }
38
- }
39
- html {
40
- scroll-behavior: smooth;
41
- }
42
- body {
43
- overflow-x: hidden;
44
- }
45
- a, button, button > * {
46
- transition: background-color var(--transition),
47
- color var(--transition), border-color var(--transition),
48
- opacity var(--transition), transform var(--transition-fast);
49
- }
50
- </style>
15
+ </SfBase>
@@ -0,0 +1,52 @@
1
+ ---
2
+ import {
3
+ type Props as ShopFooterProps,
4
+ default as ShopFooter,
5
+ } from '~/components/ShopFooter.vue';
6
+
7
+ const { routeContext } = Astro.locals;
8
+ const { settings, getContent, isHomepage } = routeContext;
9
+ const LogoHeading = isHomepage ? 'h2' : 'h3';
10
+ const layoutContent = await getContent('layout');
11
+ const {
12
+ footer: {
13
+ stamps,
14
+ pages_list: pagesList,
15
+ },
16
+ } = layoutContent;
17
+ let pageLinks: ShopFooterProps['pageLinks'];
18
+ if (pagesList?.enabled) {
19
+ if (pagesList.links?.length) {
20
+ pageLinks = pagesList.links;
21
+ } else {
22
+ pageLinks = [];
23
+ const pageSlugs = await getContent('extra-pages/');
24
+ for (let i = 0; i < pageSlugs.length; i++) {
25
+ const { title } = await getContent(`extra-pages/${pageSlugs[i]}`);
26
+ if (title) {
27
+ pageLinks.push({ title, href: `/p/${pageSlugs[i]}` });
28
+ }
29
+ }
30
+ }
31
+ }
32
+ ---
33
+
34
+ <ShopFooter
35
+ {stamps}
36
+ {pageLinks}
37
+ pagesColTitle={pagesList?.title}
38
+ >
39
+ <Fragment slot="logo">
40
+ <a href="/">
41
+ <LogoHeading>
42
+ <img
43
+ src={settings.logo}
44
+ alt={settings.name}
45
+ width="150"
46
+ height="24.5"
47
+ loading="lazy"
48
+ />
49
+ </LogoHeading>
50
+ </a>
51
+ </Fragment>
52
+ </ShopFooter>
@@ -0,0 +1,35 @@
1
+ ---
2
+ import usePageHeader from '@@sf/layouts/use-page-header';
3
+ import PitchBar from '~/components/PitchBar.vue';
4
+ import ShopHeader from '~/components/ShopHeader.vue';
5
+
6
+ const { routeContext } = Astro.locals;
7
+ const { settings, isHomepage } = routeContext;
8
+ const LogoHeading = isHomepage ? 'h1' : 'h2';
9
+ const { pitchBar, shopHeader } = await usePageHeader({
10
+ routeContext,
11
+ listedCategoryFields: null,
12
+ });
13
+ ---
14
+
15
+ <slot name="pitch-bar">
16
+ {pitchBar.slides.length > 1 && <PitchBar {...pitchBar} client:idle />}
17
+ {pitchBar.slides.length === 1 && <PitchBar {...pitchBar} />}
18
+ </slot>
19
+ <ShopHeader {...shopHeader} client:load>
20
+ <Fragment slot="logo">
21
+ <a href="/">
22
+ <LogoHeading>
23
+ <img
24
+ src={settings.logo}
25
+ alt={settings.name}
26
+ width="150"
27
+ height="24.5"
28
+ fetchpriority="high"
29
+ loading="eager"
30
+ class="hover:drop-shadow-sm mx-auto"
31
+ />
32
+ </LogoHeading>
33
+ </a>
34
+ </Fragment>
35
+ </ShopHeader>
@@ -1,9 +1,4 @@
1
1
  ---
2
- import type { PageContext } from '@@sf/ssr-context';
3
-
4
- export interface Props {
5
- pageContext?: PageContext;
6
- }
7
2
  ---
8
3
 
9
4
  <main>
@@ -1,16 +1,10 @@
1
1
  ---
2
- import type { PageContext } from '@@sf/ssr-context';
3
- import api from '@cloudcommerce/api';
4
2
  import LottiePhoneNFC from '~/components/LottiePhoneNFC.vue';
5
3
  import CasesGrid from '~/components/CasesGrid.astro';
6
- import FeatureTabs from '~/components/FeatureTabs.astro';
4
+ import FeaturesSection from '~/components/FeaturesSection.astro';
7
5
 
8
- export interface Props {
9
- pageContext: PageContext;
10
- }
11
-
12
- const { settings } = Astro.props.pageContext;
13
- const products = (await api.get('products')).data.result;
6
+ const { routeContext } = Astro.locals;
7
+ const { settings } = routeContext;
14
8
  ---
15
9
 
16
10
  <main>
@@ -70,7 +64,7 @@ const products = (await api.get('products')).data.result;
70
64
  </div>
71
65
  </div>
72
66
  <div class="lg:col-span-4 mt-5 lg:mt-7 h-96 sm:h-auto">
73
- <LottiePhoneNFC client:only />
67
+ <LottiePhoneNFC client:idle />
74
68
  </div>
75
69
  </div>
76
70
  </article>
@@ -80,7 +74,7 @@ const products = (await api.get('products')).data.result;
80
74
  <div class="max-w-lg mx-auto mt-7">
81
75
  <a href="/#avaliacoes" class="text-lg text-primary-600 hover:text-primary-800
82
76
  font-brand lowercase flex gap-1 sm:gap-2 items-center justify-center">
83
- <i class="i-chevron-down text-3xl animate-bounce -mb-1.5"></i>
77
+ <i class="i-arrow-down-s-line text-3xl animate-bounce -mb-1.5"></i>
84
78
  <span class="underline underline-offset-4 decoration-primary">
85
79
  O que profissionais e times dizem</span>
86
80
  <div class="hidden sm:flex gap-0.5 text-xs text-yellow-400">
@@ -94,7 +88,7 @@ const products = (await api.get('products')).data.result;
94
88
  </div>
95
89
  </section>
96
90
  <section class="bg-gradient-to-br from-white to-base-100 py-9">
97
- <FeatureTabs />
91
+ <FeaturesSection />
98
92
  </section>
99
93
  <section id="produtos"></section>
100
94
  </main>
@@ -0,0 +1,38 @@
1
+ ---
2
+ import { usePageSections } from '@@sf/layouts/use-page-main';
3
+ import BannersGrid from '~/components/BannersGrid.astro';
4
+ import ProductShelf from '~/components/ProductShelf.vue';
5
+ import Breadcrumbs from '~/components/Breadcrumbs.astro';
6
+ import DocDescription from '~/components/DocDescription.astro';
7
+
8
+ const { routeContext } = Astro.locals;
9
+ const { sections } = await usePageSections({
10
+ routeContext,
11
+ handleCustomSection: async (type, content) => {
12
+ if (type === 'c:foo') return { props: { ...content, foo: 'bar' } };
13
+ return { props: content };
14
+ },
15
+ });
16
+ /* `apiContext` is surelly set here (from Wildcard.astro)
17
+ cause route resource is required to define sections from content. */
18
+ const { apiContext: { doc: apiDoc } } = routeContext;
19
+ ---
20
+
21
+ <article class="my-9 md:my-12">
22
+ {sections.map(async ({ type, props }) => {
23
+ switch (type) {
24
+ case 'product-shelf':
25
+ return <ProductShelf {...props} client:visible />
26
+ case 'banners-grid':
27
+ return <BannersGrid {...props} />
28
+ case 'breadcrumbs':
29
+ return apiDoc && <Breadcrumbs {...props} apiDoc={apiDoc} />
30
+ case 'doc-description':
31
+ return apiDoc && <DocDescription apiDoc={apiDoc} />
32
+ case 'c:foo':
33
+ return <div data-foo={props.foo}></div>
34
+ default:
35
+ return <div data-section={type}></div>
36
+ }
37
+ })}
38
+ </article>
@@ -1,23 +1,9 @@
1
1
  ---
2
- import type { PageContext } from '@@sf/ssr-context';
3
-
4
- export interface Props {
5
- pageContext: PageContext;
6
- }
7
-
8
- const {
9
- pageContext: { apiResource, apiDoc },
10
- } = Astro.props as Props;
2
+ import Sections from '~/main/Sections.astro';
3
+ const { fetchingApiContext } = Astro.locals.routeContext;
4
+ await fetchingApiContext;
11
5
  ---
12
6
 
13
7
  <main>
14
- {apiDoc &&
15
- <h1>Hello <span class="text-gradient">{apiDoc.name}</span></h1>
16
- <hr>
17
- <div class="mt-3">
18
- <mark>{apiDoc._id}</mark> from <i>{apiResource}</i>
19
- <p>{Math.random()}</p>
20
- <em>Lorem ipsum dolor sit amet</em>
21
- </div>
22
- }
8
+ <Sections />
23
9
  </main>
@@ -1,17 +1,20 @@
1
1
  ---
2
2
  import api from '@cloudcommerce/api';
3
- import loadPageContext, { PageContext } from '@@sf/ssr-context';
4
- import PagesLayout from '~/layouts/Pages.astro';
3
+ import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
4
+ import BaseHead from '@@sf/layouts/BaseHead.astro';
5
+ import Base from '~/layouts/Base.astro';
6
+ import PageHeader from '~/layouts/PageHeader.astro';
7
+ import PageFooter from '~/layouts/PageFooter.astro';
5
8
  import WildcardMain from '~/main/Wildcard.astro';
6
9
 
7
10
  if (String(Astro.params.slug).endsWith('.css.map')) {
8
11
  return new Response(null, { status: 404 });
9
12
  }
10
13
 
11
- let pageContext: PageContext | undefined;
14
+ let routeContext: RouteContext | undefined;
12
15
  let loadError: any;
13
16
  try {
14
- pageContext = await loadPageContext(Astro);
17
+ routeContext = await loadRouteContext(Astro);
15
18
  } catch (err: any) {
16
19
  if (err.astroResponse) {
17
20
  return err.astroResponse;
@@ -26,11 +29,14 @@ export async function getStaticPaths() {
26
29
  ---
27
30
 
28
31
  <!DOCTYPE html>
29
- <html lang={pageContext?.lang.replace('_', '-')}>
30
- {pageContext &&
31
- <PagesLayout pageContext={pageContext}>
32
- <WildcardMain pageContext={pageContext} />
33
- </PagesLayout>
32
+ <html lang={routeContext?.lang.replace('_', '-')}>
33
+ {routeContext &&
34
+ <Base>
35
+ <BaseHead slot="base-head" />
36
+ <PageHeader />
37
+ <WildcardMain />
38
+ <PageFooter />
39
+ </Base>
34
40
  }
35
41
  {loadError && <Fragment set:html={loadError.responseHTML} />}
36
42
  </html>
@@ -1,14 +1,18 @@
1
1
  ---
2
- import loadPageContext, { PageContext } from '@@sf/ssr-context';
3
- import PagesLayout from '~/layouts/Pages.astro';
2
+ import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
3
+ import BaseHead from '@@sf/layouts/BaseHead.astro';
4
+ import Base from '~/layouts/Base.astro';
5
+ import PageHeader from '~/layouts/PageHeader.astro';
6
+ import PageFooter from '~/layouts/PageFooter.astro';
4
7
  import MonocardCustomizer from '~/components/MonocardCustomizer.vue';
5
8
  import DemoVideo from '~/components/DemoVideo.vue';
9
+ import cardCSS from '~/assets/card.css?raw';
6
10
 
7
- let pageContext: PageContext;
11
+ let routeContext: RouteContext | undefined;
8
12
  let loadError: any;
9
13
  try {
10
- pageContext = await loadPageContext(Astro);
11
- } catch (err) {
14
+ routeContext = await loadRouteContext(Astro);
15
+ } catch (err: any) {
12
16
  if (err.astroResponse) {
13
17
  return err.astroResponse;
14
18
  }
@@ -22,9 +26,14 @@ window.monocardWithLogo = ${JSON.stringify(monocardWithLogo)};`;
22
26
  ---
23
27
 
24
28
  <!DOCTYPE html>
25
- <html lang={pageContext?.lang.replace('_', '-')}>
26
- {pageContext &&
27
- <PagesLayout pageContext={pageContext}>
29
+ <html lang={routeContext?.lang.replace('_', '-')}>
30
+ {routeContext &&
31
+ <Base>
32
+ <Fragment slot="base-head">
33
+ <BaseHead />
34
+ <style is:inline set:html={cardCSS}></style>
35
+ </Fragment>
36
+ <PageHeader />
28
37
  <script is:inline set:html={inlineClientJS} />
29
38
  <MonocardCustomizer client:load {monocard} />
30
39
  <div class="max-w-3xl mx-auto mt-14">
@@ -36,7 +45,8 @@ window.monocardWithLogo = ${JSON.stringify(monocardWithLogo)};`;
36
45
  </a>
37
46
  </div>
38
47
  </div>
39
- </PagesLayout>
48
+ <PageFooter />
49
+ </Base>
40
50
  }
41
51
  {loadError && <Fragment set:html={loadError.responseHTML} />}
42
52
  </html>
@@ -1,14 +1,17 @@
1
1
  ---
2
- import loadPageContext, { PageContext } from '@@sf/ssr-context';
3
- import PagesLayout from '~/layouts/Pages.astro';
2
+ import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
3
+ import BaseHead from '@@sf/layouts/BaseHead.astro';
4
+ import Base from '~/layouts/Base.astro';
5
+ import PageHeader from '~/layouts/PageHeader.astro';
6
+ import PageFooter from '~/layouts/PageFooter.astro';
4
7
  import HomeMain from '~/main/Home.astro';
5
8
 
6
- let pageContext: PageContext | undefined;
9
+ let routeContext: RouteContext | undefined;
7
10
  let loadError: any;
8
11
  try {
9
- pageContext = await loadPageContext(Astro);
12
+ routeContext = await loadRouteContext(Astro);
10
13
  /* Faster SSR without store categories (default) prefetch:
11
- pageContext = await loadPageContext(Astro, {
14
+ routeContext = await loadRouteContext(Astro, {
12
15
  apiPrefetchEndpoints: [],
13
16
  });
14
17
  */
@@ -21,11 +24,14 @@ try {
21
24
  ---
22
25
 
23
26
  <!DOCTYPE html>
24
- <html lang={pageContext?.lang.replace('_', '-')}>
25
- {pageContext &&
26
- <PagesLayout pageContext={pageContext}>
27
- <HomeMain pageContext={pageContext} />
28
- </PagesLayout>
27
+ <html lang={routeContext?.lang.replace('_', '-')}>
28
+ {routeContext &&
29
+ <Base>
30
+ <BaseHead slot="base-head" />
31
+ <PageHeader />
32
+ <HomeMain />
33
+ <PageFooter />
34
+ </Base>
29
35
  }
30
36
  {loadError && <Fragment set:html={loadError.responseHTML} />}
31
37
  </html>
@@ -0,0 +1,25 @@
1
+ ---
2
+ import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
3
+ import BaseHead from '@@sf/layouts/BaseHead.astro';
4
+ import Base from '~/layouts/Base.astro';
5
+ import PageHeader from '~/layouts/PageHeader.astro';
6
+ import FallbackMain from '~/main/Fallback.astro';
7
+
8
+ let routeContext: RouteContext;
9
+ try {
10
+ routeContext = await loadRouteContext(Astro);
11
+ } catch (err: any) {
12
+ return err.astroResponse;
13
+ }
14
+
15
+ // export const prerender = true;
16
+ ---
17
+
18
+ <!DOCTYPE html>
19
+ <html lang={routeContext?.lang.replace('_', '-')}>
20
+ <Base>
21
+ <BaseHead slot="base-head" />
22
+ <PageHeader />
23
+ <FallbackMain />
24
+ </Base>
25
+ </html>