cloudcommerce 0.23.3 → 0.24.1

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 (170) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  3. package/ecomplus-stores/barra-doce/functions/ssr/content/layout.json +0 -6
  4. package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +17 -0
  5. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  6. package/ecomplus-stores/barra-doce/functions/ssr/public/robots.txt +2 -4
  7. package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +1 -10
  8. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +4 -6
  9. package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +2 -3
  10. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +4 -5
  11. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductShelf.vue +1 -4
  12. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +33 -12
  13. package/ecomplus-stores/barra-doce/functions/ssr/tailwind.config.cjs +1 -1
  14. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  15. package/ecomplus-stores/barra-doce/package.json +2 -2
  16. package/ecomplus-stores/iluminim/.ecomplus.cd.json +3 -3
  17. package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
  18. package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +0 -6
  19. package/ecomplus-stores/iluminim/functions/ssr/content/settings.json +16 -0
  20. package/ecomplus-stores/iluminim/functions/ssr/package.json +6 -6
  21. package/ecomplus-stores/iluminim/functions/ssr/public/robots.txt +2 -4
  22. package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +1 -10
  23. package/ecomplus-stores/iluminim/functions/ssr/src/components/Banner.vue +4 -6
  24. package/ecomplus-stores/iluminim/functions/ssr/src/components/PitchBar.vue +2 -3
  25. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductCard.vue +4 -5
  26. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductShelf.vue +1 -4
  27. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +33 -12
  28. package/ecomplus-stores/iluminim/functions/ssr/tailwind.config.cjs +1 -1
  29. package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
  30. package/ecomplus-stores/iluminim/package.json +2 -2
  31. package/package.json +8 -8
  32. package/packages/api/package.json +1 -1
  33. package/packages/api/tests/index.test.ts +0 -2
  34. package/packages/apps/affilate-program/package.json +1 -1
  35. package/packages/apps/correios/package.json +1 -1
  36. package/packages/apps/custom-payment/lib/custom-payment-create-transaction.js +1 -1
  37. package/packages/apps/custom-payment/lib/custom-payment-list-payments.js +1 -1
  38. package/packages/apps/custom-payment/package.json +1 -1
  39. package/packages/apps/custom-shipping/package.json +1 -1
  40. package/packages/apps/datafrete/package.json +1 -1
  41. package/packages/apps/discounts/package.json +1 -1
  42. package/packages/apps/emails/package.json +1 -1
  43. package/packages/apps/fb-conversions/package.json +2 -2
  44. package/packages/apps/flash-courier/package.json +1 -1
  45. package/packages/apps/frenet/package.json +1 -1
  46. package/packages/apps/galaxpay/lib/galaxpay-create-transaction.js +1 -1
  47. package/packages/apps/galaxpay/lib/galaxpay-list-payments.js +1 -1
  48. package/packages/apps/galaxpay/package.json +1 -1
  49. package/packages/apps/google-analytics/package.json +1 -1
  50. package/packages/apps/jadlog/package.json +1 -1
  51. package/packages/apps/loyalty-points/lib/loyalty-create-transaction.js +1 -1
  52. package/packages/apps/loyalty-points/lib/loyalty-list-payments.js +1 -1
  53. package/packages/apps/loyalty-points/package.json +1 -1
  54. package/packages/apps/melhor-envio/package.json +1 -1
  55. package/packages/apps/mercadopago/lib/mp-create-transaction.js +1 -1
  56. package/packages/apps/mercadopago/lib/mp-list-payments.js +1 -1
  57. package/packages/apps/mercadopago/package.json +1 -1
  58. package/packages/apps/pagarme/lib/pagarme-create-transaction.js +1 -1
  59. package/packages/apps/pagarme/lib/pagarme-list-payments.js +1 -1
  60. package/packages/apps/pagarme/package.json +1 -1
  61. package/packages/apps/paghiper/lib/paghiper-create-transaction.js +1 -1
  62. package/packages/apps/paghiper/lib/paghiper-list-payments.js +1 -1
  63. package/packages/apps/paghiper/package.json +1 -1
  64. package/packages/apps/pix/lib/pix-create-transaction.js +1 -1
  65. package/packages/apps/pix/lib/pix-list-payments.js +1 -1
  66. package/packages/apps/pix/package.json +1 -1
  67. package/packages/apps/tiny-erp/package.json +1 -1
  68. package/packages/apps/webhooks/package.json +1 -1
  69. package/packages/cli/package.json +1 -1
  70. package/packages/config/package.json +1 -1
  71. package/packages/emails/package.json +1 -1
  72. package/packages/emails/tests/sendgrid.test.ts +0 -1
  73. package/packages/emails/tests/smtp.test.ts +0 -1
  74. package/packages/eslint/base.eslintrc.cjs +23 -0
  75. package/packages/eslint/package.json +5 -5
  76. package/packages/eslint/storefront.eslintrc.cjs +1 -0
  77. package/packages/events/package.json +1 -1
  78. package/packages/feeds/package.json +1 -1
  79. package/packages/firebase/package.json +1 -1
  80. package/packages/i18n/package.json +1 -1
  81. package/packages/modules/package.json +1 -1
  82. package/packages/passport/package.json +1 -1
  83. package/packages/ssr/cloudflare/swr-worker.js +92 -16
  84. package/packages/ssr/lib/firebase/serve-storefront.js +2 -2
  85. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  86. package/packages/ssr/package.json +4 -4
  87. package/packages/ssr/src/cloudflare/swr-worker.ts +97 -16
  88. package/packages/ssr/src/firebase/serve-storefront.ts +2 -2
  89. package/packages/storefront/config/storefront.tailwind.cjs +41 -27
  90. package/packages/storefront/config/storefront.unocss.cjs +9 -23
  91. package/packages/storefront/dist/client/_astro/{_...slug_.07c1fa58.css → _...slug_.a786e016.css} +1 -1
  92. package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
  93. package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
  94. package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
  95. package/packages/storefront/dist/client/_astro/headphone_22qtrt.avif +0 -0
  96. package/packages/storefront/dist/client/_astro/headphone_247ud8.avif +0 -0
  97. package/packages/storefront/dist/client/_astro/headphone_Z1hoMcQ.webp +0 -0
  98. package/packages/storefront/dist/client/_astro/headphone_Z1j5MXv.webp +0 -0
  99. package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
  100. package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
  101. package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
  102. package/packages/storefront/dist/client/_astro/passion_29BEzB.webp +0 -0
  103. package/packages/storefront/dist/client/_astro/passion_2sykkb.avif +0 -0
  104. package/packages/storefront/dist/client/_astro/passion_HYj6i.webp +0 -0
  105. package/packages/storefront/dist/client/_astro/passion_Z18ANwS.avif +0 -0
  106. package/packages/storefront/dist/client/_astro/passion_ZK2FPz.webp +0 -0
  107. package/packages/storefront/dist/client/_astro/passion_pVNbE.avif +0 -0
  108. package/packages/storefront/dist/client/_astro/rect8589_1EUYOa.webp +0 -0
  109. package/packages/storefront/dist/client/_astro/rect8589_1Sqf3x.png +0 -0
  110. package/packages/storefront/dist/client/_astro/rect8589_1VeSii.avif +0 -0
  111. package/packages/storefront/dist/client/_astro/rect8589_2wFECM.png +0 -0
  112. package/packages/storefront/dist/client/_astro/rect8589_7mg8W.png +0 -0
  113. package/packages/storefront/dist/client/_astro/rect8589_Kv492.webp +0 -0
  114. package/packages/storefront/dist/client/_astro/rect8589_Z1DNkkN.webp +0 -0
  115. package/packages/storefront/dist/client/_astro/rect8589_Z1IS4wy.avif +0 -0
  116. package/packages/storefront/dist/client/_astro/rect8589_Zt4vbx.avif +0 -0
  117. package/packages/storefront/dist/client/_astro/rect859_1Bqr36.webp +0 -0
  118. package/packages/storefront/dist/client/_astro/rect859_1pj5UP.png +0 -0
  119. package/packages/storefront/dist/client/_astro/rect859_2dVuzq.avif +0 -0
  120. package/packages/storefront/dist/client/_astro/rect859_HaXay.png +0 -0
  121. package/packages/storefront/dist/client/_astro/rect859_Z100iy0.png +0 -0
  122. package/packages/storefront/dist/client/_astro/rect859_Z2i1RBz.avif +0 -0
  123. package/packages/storefront/dist/client/_astro/rect859_ZMRWqJ.webp +0 -0
  124. package/packages/storefront/dist/client/_astro/rect859_mPQHw.avif +0 -0
  125. package/packages/storefront/dist/client/_astro/rect859_xyq7d.webp +0 -0
  126. package/packages/storefront/dist/client/_astro/rect89_1DkX0O.webp +0 -0
  127. package/packages/storefront/dist/client/_astro/rect89_2uIqYp.avif +0 -0
  128. package/packages/storefront/dist/client/_astro/rect89_Z1rGPGT.webp +0 -0
  129. package/packages/storefront/dist/client/_astro/rect89_ZAjmIj.avif +0 -0
  130. package/packages/storefront/dist/client/robots.txt +2 -4
  131. package/packages/storefront/dist/client/sw.js +1 -1
  132. package/packages/storefront/dist/client/~fallback.html +98 -0
  133. package/packages/storefront/dist/client/~index.html +134 -0
  134. package/packages/storefront/dist/server/chunks/{_...c5a36021.mjs → _...5323ec5a.mjs} +4 -11
  135. package/packages/storefront/dist/server/chunks/{account@_@astro.3e90f29a.mjs → account@_@astro.a02ffb0b.mjs} +4 -11
  136. package/packages/storefront/dist/server/chunks/{astro.6adaff02.mjs → astro.a7611b51.mjs} +11 -18
  137. package/packages/storefront/dist/server/chunks/{index@_@astro.66b84ac2.mjs → index@_@astro.42c693b9.mjs} +4 -11
  138. package/packages/storefront/dist/server/chunks/{index@_@astro.0221a7bd.mjs → index@_@astro.d898498a.mjs} +4 -11
  139. package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.501582b9.mjs → _...slug_.astro.0f33557e.mjs} +103 -309
  140. package/packages/storefront/dist/server/chunks/pages/{account.astro.53400a42.mjs → account.astro.9325adb2.mjs} +1 -1
  141. package/packages/storefront/dist/server/chunks/pages/{index.astro.f1104ab2.mjs → index.astro.0f31fa39.mjs} +8 -27
  142. package/packages/storefront/dist/server/chunks/pages/{fallback.astro.8d1c6076.mjs → ~fallback.astro.bd93f01e.mjs} +15 -32
  143. package/packages/storefront/dist/server/chunks/{fallback@_@astro.9f73db0f.mjs → ~fallback@_@astro.d17419ae.mjs} +4 -11
  144. package/packages/storefront/dist/server/entry.mjs +47 -16
  145. package/packages/storefront/dist/server/images.dist.csv +38 -0
  146. package/packages/storefront/dist/server/images.src.csv +11 -0
  147. package/packages/storefront/dist/server/renderers.mjs +3 -10
  148. package/packages/storefront/dist/server/stylesheets.csv +1 -0
  149. package/packages/storefront/package.json +7 -6
  150. package/packages/storefront/scripts/build-prod.sh +2 -0
  151. package/packages/storefront/src/env.d.ts +0 -2
  152. package/packages/storefront/src/helpers/server-data.ts +9 -2
  153. package/packages/storefront/src/lib/components/BannerPictures.astro +2 -2
  154. package/packages/storefront/src/lib/components/Drawer.vue +1 -1
  155. package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +36 -0
  156. package/packages/storefront/src/lib/components/SocialNetworkIcon.vue +1 -0
  157. package/packages/storefront/src/lib/components/globals/ALink.vue +5 -3
  158. package/packages/storefront/src/lib/components/globals/Skeleton.vue +29 -0
  159. package/packages/storefront/src/lib/composables/use-sticky-header.ts +1 -1
  160. package/packages/storefront/src/lib/layouts/BaseHead.astro +1 -1
  161. package/packages/storefront/src/lib/layouts/use-page-header.ts +2 -9
  162. package/packages/storefront/src/lib/pages/_vue.ts +2 -0
  163. package/packages/storefront/src/lib/ssr-context.ts +31 -25
  164. package/packages/storefront/src/vue-globals.d.ts +1 -1
  165. package/packages/types/index.ts +16 -0
  166. package/packages/types/package.json +1 -1
  167. package/packages/storefront/dist/server/chunks/endpoint@_@js.b79eed3b.mjs +0 -34
  168. package/packages/storefront/dist/server/chunks/pages/endpoint.js.4c130895.mjs +0 -119
  169. /package/ecomplus-stores/barra-doce/functions/ssr/src/pages/{fallback.astro → ~fallback.astro} +0 -0
  170. /package/ecomplus-stores/iluminim/functions/ssr/src/pages/{fallback.astro → ~fallback.astro} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.24.1](https://github.com/ecomplus/cloud-commerce/compare/v0.24.0...v0.24.1) (2023-08-19)
6
+
7
+
8
+ ### Features
9
+
10
+ * **storefront:** Add new global <Skeleton> component ([83c42b1](https://github.com/ecomplus/cloud-commerce/commit/83c42b113200c28dd56b77f80df393f911194957))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **storefront:** Fix regression with icons aliases selectors on UnoCSS config ([37f7c8e](https://github.com/ecomplus/cloud-commerce/commit/37f7c8efaa63273cf3c0eb575d174cb9e2358fdc))
16
+
17
+ ## [0.24.0](https://github.com/ecomplus/cloud-commerce/compare/v0.23.3...v0.24.0) (2023-08-18)
18
+
19
+
20
+ ### ⚠ BREAKING CHANGES
21
+
22
+ * **storefront:** Icons related theme config fields replaced by `generalIconSets`, `brandIconSets`, `brandIconShortcuts`, `logoIconSets`, `logoIconShortcuts`
23
+
24
+ IntelliSense only field for icons no more needed and removed
25
+ * **storefront:** Global component <ALink> API changed
26
+ * **storefront:** `usePageHeader` composable props changed (simplified)
27
+ * **ssr:** Previous /fallback.astro page must be changed to /~fallback.astro
28
+ * **storefront:** Route context `fetchingApiContext` now always resolve with null, error only at `apiContext.error` if any
29
+
30
+ ### Features
31
+
32
+ * **ssr:** Edit Cloudflare SWR worker to also store SSRed HTML on KV PERMA_CACHE namespace ([1f3b188](https://github.com/ecomplus/cloud-commerce/commit/1f3b188b583a8bfa656c7a7469510fadc10081f4))
33
+ * **ssr:** Edit Cloudflare SWR worker to support host override from env vars ([b2fc99b](https://github.com/ecomplus/cloud-commerce/commit/b2fc99bb2310dc9986569beb89a8251c65af85a8))
34
+ * **storefront:** Add new `intellisenseIconSets` theme option for Tailwind config ([75ce9c9](https://github.com/ecomplus/cloud-commerce/commit/75ce9c9b64f997dd9bbc86b6f178137745acc40b))
35
+ * **storefront:** Add support for multiple icon sets with arrays on theme config ([5d5c0a3](https://github.com/ecomplus/cloud-commerce/commit/5d5c0a3a806cac5ecf15462b2add22804d3d6c0d))
36
+ * **storefront:** New <PaymentMethodFlag> component ([2ba386f](https://github.com/ecomplus/cloud-commerce/commit/2ba386fb26dcb72a5c91f4740403302cb4e4a157))
37
+ * **types:** Add `service_links` and `payment_methods` (flags) to settings content type ([390be9d](https://github.com/ecomplus/cloud-commerce/commit/390be9d7ec65996bbef1b1431c50de5b195ce8f0))
38
+
39
+
40
+ ### Bug Fixes
41
+
42
+ * **deps:** Update Astro to v2.10.7 ([#210](https://github.com/ecomplus/cloud-commerce/issues/210)) ([fab598f](https://github.com/ecomplus/cloud-commerce/commit/fab598febeb9d2b2d7979497dba08f17b921dcde))
43
+ * **deps:** Update dependency unocss to ^0.55.0 ([#213](https://github.com/ecomplus/cloud-commerce/issues/213)) ([55b9626](https://github.com/ecomplus/cloud-commerce/commit/55b96263e141ef5abd340f2146215a0141a02ceb))
44
+ * **storefront:** Fix <Drawer> close button z-index ([4ff06db](https://github.com/ecomplus/cloud-commerce/commit/4ff06dbadce0c3261444ea5dcbe57ec294ffa549))
45
+ * **storefront:** Increasing sticky header debounce max wait to prevent wrong header final place ([d04b808](https://github.com/ecomplus/cloud-commerce/commit/d04b808ff55a7457d78bc5965d43e5276299a780))
46
+ * **storefront:** Minor fix BannerPicture.astro default alt text styles ([6d0aed5](https://github.com/ecomplus/cloud-commerce/commit/6d0aed5ba849af6a0aa8e11da916f7c204e04564))
47
+ * **storefront:** Prevent errors with not founds by slug on SSR context load ([eeb3232](https://github.com/ecomplus/cloud-commerce/commit/eeb3232fb79f6440234a257b915f9c9d2de0e7b4))
48
+ * **storefront:** Update Astro to v2.10.9 ([3555906](https://github.com/ecomplus/cloud-commerce/commit/35559061843a1c8ba7618c255080289677640b10))
49
+
50
+
51
+ * **ssr:** Expecting fallback static HTML at /~fallback route ([922c9c9](https://github.com/ecomplus/cloud-commerce/commit/922c9c9ddeda661861cf1c80204ebd9adf0bf47e))
52
+ * **storefront:** Set href optional on <ALink> to handle common optional link case ([1573c65](https://github.com/ecomplus/cloud-commerce/commit/1573c653126975b3fac1e3291fa01976e98a8052))
53
+ * **storefront:** Update `usePageHeader` composable removing `serviceLinks` prop ([e566038](https://github.com/ecomplus/cloud-commerce/commit/e56603848af4013eb29b7604d0fb936238e85d7c))
54
+
5
55
  ### [0.23.3](https://github.com/ecomplus/cloud-commerce/compare/v0.23.2...v0.23.3) (2023-08-08)
6
56
 
7
57
 
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^0.23.2",
19
- "@cloudcommerce/firebase": "^0.23.2",
20
- "@cloudcommerce/passport": "^0.23.2"
18
+ "@cloudcommerce/feeds": "^0.24.0",
19
+ "@cloudcommerce/firebase": "^0.24.0",
20
+ "@cloudcommerce/passport": "^0.24.0"
21
21
  }
22
22
  }
@@ -26,12 +26,6 @@
26
26
  },
27
27
  "alphabetical_sort_submenu": false
28
28
  },
29
- "service_links": [
30
- {
31
- "title": "Fale conosco",
32
- "href": "/pages/contato"
33
- }
34
- ],
35
29
  "footer": {
36
30
  }
37
31
  }
@@ -22,6 +22,23 @@
22
22
  "youtube": "https://www.youtube.com/channel/UCBlIxK5JAub0E1EX_qHdzmA",
23
23
  "tiktok": "",
24
24
  "pinterest": "",
25
+ "threads": "",
26
+ "service_links": [
27
+ {
28
+ "title": "Fale conosco",
29
+ "href": "/pages/contato"
30
+ }
31
+ ],
32
+ "payment_methods": [
33
+ "pix",
34
+ "visa",
35
+ "mastercard",
36
+ "elo",
37
+ "amex",
38
+ "hipercard",
39
+ "diners",
40
+ "boleto"
41
+ ],
25
42
  "modules": {
26
43
  "list_payments": {
27
44
  "installments_option": {
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "dependencies": {
20
- "@cloudcommerce/api": "^0.23.2",
21
- "@cloudcommerce/firebase": "^0.23.2",
22
- "@cloudcommerce/ssr": "^0.23.2"
20
+ "@cloudcommerce/api": "^0.24.0",
21
+ "@cloudcommerce/firebase": "^0.24.0",
22
+ "@cloudcommerce/ssr": "^0.24.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@cloudcommerce/i18n": "^0.23.2",
26
- "@cloudcommerce/storefront": "^0.23.2",
27
- "@cloudcommerce/types": "^0.23.2",
25
+ "@cloudcommerce/i18n": "^0.24.0",
26
+ "@cloudcommerce/storefront": "^0.24.0",
27
+ "@cloudcommerce/types": "^0.24.0",
28
28
  "@fontsource/croissant-one": "^5.0.5",
29
29
  "@iconify-json/mingcute": "^1.1.7"
30
30
  }
@@ -1,8 +1,6 @@
1
1
  User-agent: *
2
2
  Allow: /
3
3
  Disallow: /app/
4
- Disallow: /search$
5
- Disallow: /search?
6
- Disallow: /search.html$
7
- Disallow: /search.html?
8
4
  Disallow: /admin/
5
+ Disallow: /api/
6
+ Disallow: /~*
@@ -46,7 +46,7 @@
46
46
  <MenuItem
47
47
  as="li"
48
48
  v-slot="{ active }"
49
- v-for="({ title, href }, i) in serviceLinks"
49
+ v-for="({ title, href }, i) in $settings.service_links"
50
50
  :key="`s-${i}`"
51
51
  >
52
52
  <ALink
@@ -92,13 +92,4 @@ import {
92
92
  } from '@@sf/state/customer-session';
93
93
  import AccountLink from '@@sf/components/AccountLink.vue';
94
94
  import SocialNetworkLink from '@@sf/components/SocialNetworkLink.vue';
95
-
96
- export interface Props {
97
- serviceLinks?: Array<{
98
- title: string;
99
- href: string;
100
- }>;
101
- }
102
-
103
- defineProps<Props>();
104
95
  </script>
@@ -5,8 +5,7 @@
5
5
  ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 items-center'
6
6
  : null"
7
7
  >
8
- <component
9
- :is="href ? 'a-link' : 'span'"
8
+ <ALink
10
9
  :href="href"
11
10
  :class="hasHeader
12
11
  ? 'lg:col-span-3 sm:order-last [&_img]:max-w-full sm:[&_img]:max-w-none'
@@ -15,7 +14,7 @@
15
14
  class="md:[clip-path:polygon(6%_0,100%_0,100%_100%,0_100%)]"
16
15
  >
17
16
  <slot name="picture" />
18
- </component>
17
+ </ALink>
19
18
  <div v-if="hasHeader" class="lg:col-span-2 p-8 lg:p-12 xl:ps-32 mb-3 md:mb-0">
20
19
  <Component
21
20
  v-if="parsedTitle"
@@ -30,15 +29,14 @@
30
29
  >
31
30
  {{ parsedSubtitle }}
32
31
  </p>
33
- <component
32
+ <ALink
34
33
  v-if="parsedButtonText"
35
- :is="buttonLink ? 'a-link' : 'span'"
36
34
  :href="buttonLink"
37
35
  class="ui-btn-lg ui-btn-contrast min-w-[150px] mt-7 md:mt-10"
38
36
  >
39
37
  <i class="i-tag-chevron-fill mr-1"></i>
40
38
  {{ parsedButtonText }}
41
- </component>
39
+ </ALink>
42
40
  </div>
43
41
  </div>
44
42
  </template>
@@ -7,8 +7,7 @@
7
7
  :key="i"
8
8
  class="shrink-0 basis-full h-full text-center"
9
9
  >
10
- <component
11
- :is="slide.href ? 'ALink' : 'span'"
10
+ <ALink
12
11
  :href="slide.href"
13
12
  :target="slide.target"
14
13
  class="inline-block px-8"
@@ -19,7 +18,7 @@
19
18
  v-html="parsedContents[i]"
20
19
  class="prose text-sm text-base-800"
21
20
  ></span>
22
- </component>
21
+ </ALink>
23
22
  </li>
24
23
  <template #controls>
25
24
  <div
@@ -4,8 +4,7 @@
4
4
  :data-sku="product.sku"
5
5
  class="relative h-full max-w-[350px] mx-auto py-3 group"
6
6
  >
7
- <component
8
- :is="link ? 'ALink' : 'span'"
7
+ <ALink
9
8
  :href="link"
10
9
  class="flex flex-col h-full rounded overflow-hidden
11
10
  group-hover:shadow group-hover:ring-1 ring-black/5"
@@ -14,7 +13,7 @@
14
13
  motion-safe:group-hover:scale-110 transition-transform">
15
14
  <div class="relative w-full h-full bg-white rounded overflow-hidden
16
15
  group-hover:rounded-none">
17
- <template v-if="images?.length">
16
+ <span v-if="images?.length" class="text-xs text-opacity-70">
18
17
  <AImg
19
18
  :picture="images[0]"
20
19
  :alt="title"
@@ -28,7 +27,7 @@
28
27
  opacity-0 group-hover:opacity-100 transition-opacity
29
28
  motion-safe:duration-300 text-transparent z-10"
30
29
  />
31
- </template>
30
+ </span>
32
31
  <div
33
32
  v-else
34
33
  class="w-full h-full bg-gradient-to-br from-base-50/20 to-base-100"
@@ -75,7 +74,7 @@
75
74
  <i class="i-shopping-bag-3-line"></i>
76
75
  </button>
77
76
  </div>
78
- </component>
77
+ </ALink>
79
78
  </article>
80
79
  </template>
81
80
 
@@ -2,12 +2,9 @@
2
2
  <section class="ui-section">
3
3
  <div v-if="title" class="max-w-prose mx-auto text-center mb-2">
4
4
  <h2 class="ui-text-brand text-3xl">
5
- <ALink v-if="titleLink" :href="titleLink" class="ui-link">
5
+ <ALink :href="titleLink" :class="titleLink ? 'ui-link' : 'text-base-700'">
6
6
  {{ title }}
7
7
  </ALink>
8
- <span v-else class="text-base-700">
9
- {{ title }}
10
- </span>
11
8
  </h2>
12
9
  </div>
13
10
  <Carousel class="group/shelf">
@@ -69,7 +69,7 @@
69
69
  <i class="i-search-3-line w-7 h-7
70
70
  text-base-700 hover:text-primary hover:scale-110 active:scale-125"></i>
71
71
  </button>
72
- <AccountMenu :service-links="serviceLinks" class="hidden sm:block">
72
+ <AccountMenu class="hidden sm:block">
73
73
  <template #button="{ open }">
74
74
  <i
75
75
  class="i-user-2-line w-7 h-7
@@ -114,7 +114,14 @@
114
114
  :has-close-button="false"
115
115
  placement="top"
116
116
  >
117
- <SearchModal />
117
+ <Suspense>
118
+ <SearchModal v-if="isSearchOpenOnce" />
119
+ <template #fallback>
120
+ <div class="container mx-auto">
121
+ <Skeleton class="p-6" is-large />
122
+ </div>
123
+ </template>
124
+ </Suspense>
118
125
  </Drawer>
119
126
  <Teleport v-if="isMounted" to="#teleported-overlap">
120
127
  <Drawer
@@ -122,14 +129,25 @@
122
129
  placement="end"
123
130
  backdrop-target="#teleported-overlap"
124
131
  >
125
- <CartSidebar />
132
+ <Suspense>
133
+ <CartSidebar v-if="isCartOpenOnce" @close="isCartOpen = false" />
134
+ <template #fallback>
135
+ <Skeleton class="pt-16 px-6" is-bold />
136
+ </template>
137
+ </Suspense>
126
138
  </Drawer>
127
139
  </Teleport>
128
140
  </header>
129
141
  </template>
130
142
 
131
143
  <script setup lang="ts">
132
- import { ref, watch, onMounted } from 'vue';
144
+ import {
145
+ ref,
146
+ watch,
147
+ onMounted,
148
+ defineAsyncComponent,
149
+ } from 'vue';
150
+ import { watchOnce } from '@vueuse/core';
133
151
  import { totalItems } from '@@sf/state/shopping-cart';
134
152
  import {
135
153
  type Props as UseShopHeaderProps,
@@ -138,17 +156,12 @@ import {
138
156
  import Drawer from '@@sf/components/Drawer.vue';
139
157
  import ShopSidenav from '~/components/ShopSidenav.vue';
140
158
  import ShopHeaderMenu from '~/components/ShopHeaderMenu.vue';
141
- import SearchModal from '~/components/SearchModal.vue';
142
159
  import AccountMenu from '~/components/AccountMenu.vue';
143
- import CartSidebar from '~/components/CartSidebar.vue';
144
160
 
145
- export interface Props extends Omit<UseShopHeaderProps, 'header'> {
146
- serviceLinks?: Array<{
147
- title: string;
148
- href: string;
149
- }>;
150
- }
161
+ export interface Props extends Omit<UseShopHeaderProps, 'header'> {}
151
162
 
163
+ const SearchModal = defineAsyncComponent(() => import('~/components/SearchModal.vue'));
164
+ const CartSidebar = defineAsyncComponent(() => import('~/components/CartSidebar.vue'));
152
165
  const props = defineProps<Props>();
153
166
  const header = ref<HTMLElement | null>(null);
154
167
  const {
@@ -159,7 +172,15 @@ const {
159
172
  } = useShopHeader({ ...props, header });
160
173
  const isSidenavOpen = ref(false);
161
174
  const isSearchOpen = ref(false);
175
+ const isSearchOpenOnce = ref(false);
176
+ watchOnce(isSearchOpen, () => {
177
+ isSearchOpenOnce.value = true;
178
+ });
162
179
  const isCartOpen = ref(false);
180
+ const isCartOpenOnce = ref(false);
181
+ watchOnce(isCartOpen, () => {
182
+ isCartOpenOnce.value = true;
183
+ });
163
184
  const isMounted = ref(false);
164
185
  const delayedTotalItems = ref(0);
165
186
  const searchTerm = ref('');
@@ -4,8 +4,8 @@ process.env.STOREFRONT_BASE_DIR = __dirname;
4
4
  const { genTailwindConfig } = require('@cloudcommerce/storefront/config/storefront.tailwind.cjs');
5
5
 
6
6
  const themeOptions = {
7
- generalIcons: 'mingcute',
8
7
  baseColor: 'zinc',
8
+ generalIconSets: ['mingcute'],
9
9
  iconAliases: {
10
10
  close: 'close-line',
11
11
  'chevron-right': 'right-fill',
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/events": "^0.23.2",
19
- "@cloudcommerce/firebase": "^0.23.2",
20
- "@cloudcommerce/modules": "^0.23.2"
18
+ "@cloudcommerce/events": "^0.24.0",
19
+ "@cloudcommerce/firebase": "^0.24.0",
20
+ "@cloudcommerce/modules": "^0.24.0"
21
21
  }
22
22
  }
@@ -23,9 +23,9 @@
23
23
  "url": "https://github.com/ecomplus/cloud-commerce/issues"
24
24
  },
25
25
  "dependencies": {
26
- "@cloudcommerce/cli": "^0.23.2"
26
+ "@cloudcommerce/cli": "^0.24.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@cloudcommerce/eslint": "^0.23.2"
29
+ "@cloudcommerce/eslint": "^0.24.0"
30
30
  }
31
31
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "trigger": "64c290035e60690370759966",
3
- "resource": "collections",
4
- "slug": "luminarias-led"
2
+ "trigger": "64dd2f382cd6b659591a3cfc",
3
+ "resource": "products",
4
+ "slug": "refletor-holofote-microled-slim-100w-branco-frio,refletor-holofote-microled-slim-200w-branco-frio"
5
5
  }
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^0.23.2",
19
- "@cloudcommerce/firebase": "^0.23.2",
20
- "@cloudcommerce/passport": "^0.23.2"
18
+ "@cloudcommerce/feeds": "^0.24.0",
19
+ "@cloudcommerce/firebase": "^0.24.0",
20
+ "@cloudcommerce/passport": "^0.24.0"
21
21
  }
22
22
  }
@@ -22,12 +22,6 @@
22
22
  },
23
23
  "alphabetical_sort_submenu": false
24
24
  },
25
- "service_links": [
26
- {
27
- "title": "Fale conosco",
28
- "href": "/pages/contato"
29
- }
30
- ],
31
25
  "footer": {
32
26
  }
33
27
  }
@@ -22,6 +22,22 @@
22
22
  "youtube": "https://www.youtube.com/channel/UCBlIxK5JAub0E1EX_qHdzmA",
23
23
  "tiktok": "",
24
24
  "pinterest": "",
25
+ "threads": "",
26
+ "service_links": [
27
+ {
28
+ "title": "Fale conosco",
29
+ "href": "/pages/contato"
30
+ }
31
+ ],
32
+ "payment_methods": [
33
+ "pix",
34
+ "visa",
35
+ "mastercard",
36
+ "elo",
37
+ "amex",
38
+ "hipercard",
39
+ "boleto"
40
+ ],
25
41
  "modules": {
26
42
  "list_payments": {
27
43
  "installments_option": {
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "dependencies": {
20
- "@cloudcommerce/api": "^0.23.2",
21
- "@cloudcommerce/firebase": "^0.23.2",
22
- "@cloudcommerce/ssr": "^0.23.2"
20
+ "@cloudcommerce/api": "^0.24.0",
21
+ "@cloudcommerce/firebase": "^0.24.0",
22
+ "@cloudcommerce/ssr": "^0.24.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@cloudcommerce/i18n": "^0.23.2",
26
- "@cloudcommerce/storefront": "^0.23.2",
27
- "@cloudcommerce/types": "^0.23.2",
25
+ "@cloudcommerce/i18n": "^0.24.0",
26
+ "@cloudcommerce/storefront": "^0.24.0",
27
+ "@cloudcommerce/types": "^0.24.0",
28
28
  "@fontsource-variable/heebo": "^5.0.5",
29
29
  "@iconify-json/carbon": "^1.1.18"
30
30
  }
@@ -1,8 +1,6 @@
1
1
  User-agent: *
2
2
  Allow: /
3
3
  Disallow: /app/
4
- Disallow: /search$
5
- Disallow: /search?
6
- Disallow: /search.html$
7
- Disallow: /search.html?
8
4
  Disallow: /admin/
5
+ Disallow: /api/
6
+ Disallow: /~*
@@ -46,7 +46,7 @@
46
46
  <MenuItem
47
47
  as="li"
48
48
  v-slot="{ active }"
49
- v-for="({ title, href }, i) in serviceLinks"
49
+ v-for="({ title, href }, i) in $settings.service_links"
50
50
  :key="`s-${i}`"
51
51
  >
52
52
  <ALink
@@ -92,13 +92,4 @@ import {
92
92
  } from '@@sf/state/customer-session';
93
93
  import AccountLink from '@@sf/components/AccountLink.vue';
94
94
  import SocialNetworkLink from '@@sf/components/SocialNetworkLink.vue';
95
-
96
- export interface Props {
97
- serviceLinks?: Array<{
98
- title: string;
99
- href: string;
100
- }>;
101
- }
102
-
103
- defineProps<Props>();
104
95
  </script>
@@ -3,14 +3,13 @@
3
3
  class="mx-auto overflow-x-hidden"
4
4
  :class="hasHeader ? 'grid grid-cols-1 md:grid-cols-2 items-center' : null"
5
5
  >
6
- <component
7
- :is="href ? 'a-link' : 'span'"
6
+ <ALink
8
7
  :href="href"
9
8
  class="[&_img]:rounded-lg"
10
9
  :class="hasHeader ? 'basis-1/2 grow-0 md:order-last' : '[&_img]:w-full'"
11
10
  >
12
11
  <slot name="picture" />
13
- </component>
12
+ </ALink>
14
13
  <div
15
14
  v-if="hasHeader"
16
15
  class="basis-1/2 grow-0 p-12 xl:ps-32 mb-3 md:mb-0"
@@ -25,14 +24,13 @@
25
24
  <p v-if="parsedSubtitle" class="text-lg mt-4 md:mt-6">
26
25
  {{ parsedSubtitle }}
27
26
  </p>
28
- <component
27
+ <ALink
29
28
  v-if="parsedButtonText"
30
- :is="buttonLink ? 'a-link' : 'span'"
31
29
  :href="buttonLink"
32
30
  class="ui-btn-lg ui-btn-contrast min-w-[150px] mt-7 md:mt-10"
33
31
  >
34
32
  {{ parsedButtonText }}
35
- </component>
33
+ </ALink>
36
34
  </div>
37
35
  </div>
38
36
  </template>
@@ -7,8 +7,7 @@
7
7
  :key="i"
8
8
  class="shrink-0 basis-full h-full text-center"
9
9
  >
10
- <component
11
- :is="slide.href ? 'ALink' : 'span'"
10
+ <ALink
12
11
  :href="slide.href"
13
12
  :target="slide.target"
14
13
  class="inline-block px-8"
@@ -23,7 +22,7 @@
23
22
  [&_strong]:text-transparent [&_strong]:bg-clip-text [&_strong]:bg-gradient-to-r
24
23
  [&_strong]:from-yellow-200 [&_strong]:to-yellow-400"
25
24
  ></span>
26
- </component>
25
+ </ALink>
27
26
  </li>
28
27
  <template #controls>
29
28
  <div
@@ -4,8 +4,7 @@
4
4
  :data-sku="product.sku"
5
5
  class="relative h-full max-w-[350px] mx-auto py-3 group"
6
6
  >
7
- <component
8
- :is="link ? 'ALink' : 'span'"
7
+ <ALink
9
8
  :href="link"
10
9
  class="flex flex-col h-full rounded overflow-hidden
11
10
  group-hover:shadow group-hover:ring-1 ring-black/5"
@@ -14,7 +13,7 @@
14
13
  motion-safe:group-hover:scale-110 transition-transform">
15
14
  <div class="relative w-full h-full bg-white rounded overflow-hidden
16
15
  group-hover:rounded-none">
17
- <template v-if="images?.length">
16
+ <span v-if="images?.length" class="text-xs text-opacity-70">
18
17
  <AImg
19
18
  :picture="images[0]"
20
19
  :alt="title"
@@ -28,7 +27,7 @@
28
27
  opacity-0 group-hover:opacity-100 transition-opacity
29
28
  motion-safe:duration-300 text-transparent z-10"
30
29
  />
31
- </template>
30
+ </span>
32
31
  <div
33
32
  v-else
34
33
  class="w-full h-full bg-gradient-to-br from-base-50/20 to-base-100"
@@ -78,7 +77,7 @@
78
77
  {{ $t.i19addToCart }}
79
78
  </button>
80
79
  </div>
81
- </component>
80
+ </ALink>
82
81
  </article>
83
82
  </template>
84
83
 
@@ -2,12 +2,9 @@
2
2
  <section class="ui-section">
3
3
  <div v-if="title" class="max-w-prose mx-auto text-center mb-2">
4
4
  <h2 class="ui-text-brand text-3xl">
5
- <ALink v-if="titleLink" :href="titleLink" class="ui-link">
5
+ <ALink :href="titleLink" :class="titleLink ? 'ui-link' : 'text-base-700'">
6
6
  {{ title }}
7
7
  </ALink>
8
- <span v-else class="text-base-700">
9
- {{ title }}
10
- </span>
11
8
  </h2>
12
9
  </div>
13
10
  <Carousel class="group/shelf">