cloudcommerce 0.8.6 → 0.9.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 (160) hide show
  1. package/.github/renovate.json +1 -2
  2. package/CHANGELOG.md +51 -0
  3. package/ecomplus-stores/monocard/functions/core/package.json +1 -1
  4. package/ecomplus-stores/monocard/functions/events/package.json +2 -2
  5. package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
  6. package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
  7. package/ecomplus-stores/monocard/functions/ssr/content/layout.json +37 -0
  8. package/ecomplus-stores/monocard/functions/ssr/package.json +6 -6
  9. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/mockup-editar.png +0 -0
  10. package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.astro +7 -0
  11. package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +94 -27
  12. package/ecomplus-stores/monocard/functions/ssr/src/components/PitchBar.vue +2 -2
  13. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +11 -10
  14. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +2 -2
  15. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +28 -14
  16. package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +3 -3
  17. package/ecomplus-stores/monocard/functions/ssr/src/main/Wildcard.astro +9 -7
  18. package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +2 -2
  19. package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +1 -1
  20. package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +2 -2
  21. package/ecomplus-stores/monocard/package.json +1 -1
  22. package/package.json +10 -10
  23. package/packages/api/lib/api.d.ts +27 -11
  24. package/packages/api/package.json +1 -1
  25. package/packages/apps/correios/package.json +3 -3
  26. package/packages/apps/custom-payment/package.json +1 -1
  27. package/packages/apps/custom-shipping/package.json +1 -1
  28. package/packages/apps/datafrete/package.json +3 -3
  29. package/packages/apps/discounts/package.json +1 -1
  30. package/packages/apps/emails/lib/functios-lib/abandoned-carts.js +2 -1
  31. package/packages/apps/emails/lib/functios-lib/abandoned-carts.js.map +1 -1
  32. package/packages/apps/emails/package.json +2 -2
  33. package/packages/apps/emails/src/functios-lib/abandoned-carts.ts +2 -1
  34. package/packages/apps/fb-conversions/package.json +2 -2
  35. package/packages/apps/frenet/lib/functions-lib/tracking-codes.js +2 -1
  36. package/packages/apps/frenet/lib/functions-lib/tracking-codes.js.map +1 -1
  37. package/packages/apps/frenet/package.json +3 -3
  38. package/packages/apps/frenet/src/functions-lib/tracking-codes.ts +2 -1
  39. package/packages/apps/galaxpay/lib/functions-lib/ecom/events-to-galaxpay.js +1 -1
  40. package/packages/apps/galaxpay/lib/functions-lib/ecom/events-to-galaxpay.js.map +1 -1
  41. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.js +101 -37
  42. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.js.map +1 -1
  43. package/packages/apps/galaxpay/package.json +3 -3
  44. package/packages/apps/galaxpay/src/functions-lib/ecom/events-to-galaxpay.ts +1 -1
  45. package/packages/apps/galaxpay/src/functions-lib/galaxpay/webhook.ts +123 -39
  46. package/packages/apps/google-analytics/package.json +3 -3
  47. package/packages/apps/infinitepay/package.json +3 -3
  48. package/packages/apps/jadlog/package.json +2 -2
  49. package/packages/apps/loyalty-points/package.json +1 -1
  50. package/packages/apps/melhor-envio/lib/functions-lib/tracking-codes.js +1 -1
  51. package/packages/apps/melhor-envio/lib/functions-lib/tracking-codes.js.map +1 -1
  52. package/packages/apps/melhor-envio/package.json +3 -3
  53. package/packages/apps/melhor-envio/src/functions-lib/tracking-codes.ts +1 -1
  54. package/packages/apps/mercadopago/package.json +3 -3
  55. package/packages/apps/pagarme/package.json +3 -3
  56. package/packages/apps/paghiper/package.json +3 -3
  57. package/packages/apps/pix/package.json +3 -3
  58. package/packages/apps/tiny-erp/package.json +3 -3
  59. package/packages/apps/webhooks/package.json +3 -3
  60. package/packages/cli/package.json +1 -1
  61. package/packages/config/package.json +1 -1
  62. package/packages/emails/package.json +2 -2
  63. package/packages/events/package.json +2 -2
  64. package/packages/firebase/package.json +2 -2
  65. package/packages/i18n/package.json +1 -1
  66. package/packages/modules/package.json +3 -3
  67. package/packages/passport/package.json +2 -2
  68. package/packages/ssr/package.json +5 -5
  69. package/packages/storefront/client.d.ts +1 -1
  70. package/packages/storefront/config/storefront.cms.cjs +17 -12
  71. package/packages/storefront/config/storefront.cms.mjs +17 -12
  72. package/packages/storefront/dist/client/_astro/Carousel.dfb3f26a.js +1 -0
  73. package/packages/storefront/dist/client/_astro/HeroSlider.34436243.js +1 -0
  74. package/packages/storefront/dist/client/_astro/PitchBar.1c993792.js +1 -0
  75. package/packages/storefront/dist/client/_astro/Prices.70885f17.js +1 -0
  76. package/packages/storefront/dist/client/_astro/ShopHeader.e901fad5.js +4 -0
  77. package/packages/storefront/dist/client/_astro/_...slug_.9a31c59e.css +1 -0
  78. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.0c2b7f88.js +1 -0
  79. package/packages/storefront/dist/client/_astro/client.4e825332.js +1 -0
  80. package/packages/storefront/dist/client/_astro/{firebase-app.d090c84e.js → firebase-app.247497b8.js} +22 -22
  81. package/packages/storefront/dist/client/_astro/{format-money.ab6b71eb.js → format-money.f09b89ed.js} +1 -1
  82. package/packages/storefront/dist/client/_astro/{hoisted.541b5c05.js → hoisted.56fa2eff.js} +1 -1
  83. package/packages/storefront/dist/client/_astro/index.1eaf97c3.css +1 -0
  84. package/packages/storefront/dist/client/_astro/index.9018a8da.js +1 -0
  85. package/packages/storefront/dist/client/_astro/{modules-info.06ac0727.js → modules-info.2a72e536.js} +1 -1
  86. package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.1fd80976.js +1 -0
  87. package/packages/storefront/dist/client/_astro/session-utm.ac492493.js +1 -0
  88. package/packages/storefront/dist/client/img/uploads/ecom-icon.png +0 -0
  89. package/packages/storefront/dist/client/img/uploads/logo.png +0 -0
  90. package/packages/storefront/dist/client/manifest.webmanifest +1 -1
  91. package/packages/storefront/dist/client/sw.js +1 -1
  92. package/packages/storefront/dist/client/workbox-e0d788d4.js +1 -1
  93. package/packages/storefront/dist/server/chunks/{astro.9781c0a7.mjs → astro.39f7f387.mjs} +910 -295
  94. package/packages/storefront/dist/server/chunks/pages/{all.94de1b69.mjs → all.b15cad2d.mjs} +409 -246
  95. package/packages/storefront/dist/server/entry.mjs +32 -19
  96. package/packages/storefront/dist/server/manifest.webmanifest +1 -1
  97. package/packages/storefront/package.json +15 -15
  98. package/packages/storefront/server.d.ts +1 -1
  99. package/packages/storefront/src/images/use-ssr-picture.ts +31 -10
  100. package/packages/storefront/src/lib/assets/base.css +4 -2
  101. package/packages/storefront/src/lib/cms.d.ts +14 -18
  102. package/packages/storefront/src/lib/components/Carousel.vue +16 -10
  103. package/packages/storefront/src/lib/components/CarouselControl.vue +2 -2
  104. package/packages/storefront/src/lib/components/Drawer.vue +5 -5
  105. package/packages/storefront/src/lib/components/HeroPicture.astro +54 -0
  106. package/packages/storefront/src/lib/components/LoginForm.vue +3 -2
  107. package/packages/storefront/src/lib/components/SocialNetworkLink.vue +2 -2
  108. package/packages/storefront/src/lib/components/_injection-keys.ts +5 -3
  109. package/packages/storefront/src/lib/components/globals/AImg.vue +4 -5
  110. package/packages/storefront/src/lib/components/globals/ALink.vue +2 -2
  111. package/packages/storefront/src/lib/components/globals/Fade.vue +5 -5
  112. package/packages/storefront/src/lib/composables/use-hero-slider.ts +38 -0
  113. package/packages/storefront/src/lib/composables/use-prices.ts +6 -3
  114. package/packages/storefront/src/lib/composables/use-shop-header.ts +30 -14
  115. package/packages/storefront/src/lib/composables/use-sticky-header.ts +15 -12
  116. package/packages/storefront/src/lib/layouts/Base.astro +1 -1
  117. package/packages/storefront/src/lib/layouts/BaseBody.astro +2 -2
  118. package/packages/storefront/src/lib/layouts/BaseHead.astro +2 -2
  119. package/packages/storefront/src/lib/layouts/sections/use-hero-section.ts +48 -0
  120. package/packages/storefront/src/lib/layouts/use-home-main.ts +16 -0
  121. package/packages/storefront/src/lib/layouts/use-page-layout.ts +41 -0
  122. package/packages/storefront/src/lib/pages/_vue.ts +1 -1
  123. package/packages/storefront/src/lib/scripts/modules-info-preset.ts +5 -2
  124. package/packages/storefront/src/lib/scripts/session-utm.ts +6 -1
  125. package/packages/storefront/src/lib/ssr-context.ts +24 -15
  126. package/packages/storefront/src/lib/state/customer-session.ts +14 -2
  127. package/packages/storefront/src/lib/state/shopping-cart/add-cart-item.ts +8 -10
  128. package/packages/storefront/src/lib/state/shopping-cart.ts +4 -3
  129. package/packages/storefront/src/vue-globals.d.ts +3 -2
  130. package/packages/storefront/tailwind.config.cjs +10 -3
  131. package/packages/storefront/tsconfig.json +3 -1
  132. package/packages/storefront/uno.config.cjs +8 -4
  133. package/packages/types/package.json +1 -1
  134. package/store.renovate.json +27 -11
  135. package/ecomplus-stores/monocard/functions/ssr/content/code.json +0 -5
  136. package/ecomplus-stores/monocard/functions/ssr/content/footer.json +0 -46
  137. package/ecomplus-stores/monocard/functions/ssr/content/header.json +0 -23
  138. package/ecomplus-stores/monocard/functions/ssr/content/menu.json +0 -6
  139. package/ecomplus-stores/monocard/functions/ssr/content/metatags.json +0 -5
  140. package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderButtonLink.vue +0 -5
  141. package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderButtons.vue +0 -39
  142. package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderNav.vue +0 -61
  143. package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderNavLink.vue +0 -5
  144. package/packages/storefront/dist/client/_astro/PitchBar.5d55c359.js +0 -1
  145. package/packages/storefront/dist/client/_astro/Prices.55399c72.js +0 -1
  146. package/packages/storefront/dist/client/_astro/ProductCard.7e891c08.js +0 -1
  147. package/packages/storefront/dist/client/_astro/ShopHeader.6bbe1a17.js +0 -4
  148. package/packages/storefront/dist/client/_astro/_...slug_.45f0edaf.css +0 -1
  149. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.77ed7c18.js +0 -1
  150. package/packages/storefront/dist/client/_astro/client.0de2f274.js +0 -1
  151. package/packages/storefront/dist/client/_astro/index.ff4f0b30.js +0 -1
  152. package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.d2f39f33.js +0 -1
  153. package/packages/storefront/dist/client/_astro/session-utm.72684b84.js +0 -1
  154. package/packages/storefront/dist/client/img/uploads/icon.png +0 -0
  155. package/packages/storefront/dist/client/img/uploads/large-icon.png +0 -0
  156. package/packages/storefront/dist/client/img/uploads/logo.webp +0 -0
  157. package/packages/storefront/src/lib/components/ProductCard.vue +0 -36
  158. package/packages/storefront/src/lib/layouts/PagesHeader.astro +0 -51
  159. /package/packages/storefront/dist/client/_astro/{index.0c833781.css → index.e56fc6b3.css} +0 -0
  160. /package/packages/storefront/dist/client/_astro/{server.1bc2fa51.css → server.1dabec03.css} +0 -0
@@ -11,8 +11,7 @@
11
11
  "ignoreDeps": [
12
12
  "node",
13
13
  "pnpm",
14
- "turbo",
15
- "@vueuse/core"
14
+ "turbo"
16
15
  ],
17
16
  "packageRules": [
18
17
  {
package/CHANGELOG.md CHANGED
@@ -2,6 +2,57 @@
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.9.0](https://github.com/ecomplus/cloud-commerce/compare/v0.8.7...v0.9.0) (2023-04-17)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * **storefront:** `tsconfig.json` updated with `astro/tsconfigs/strict`, may have to fix null/undefined checks
11
+ * **storefront:** Import `@@sf/components/ProductCard.vue` throws error
12
+ * **storefront:** Import `@@sf/layouts/PagesLayout.astro` no more working
13
+ * **storefront:** Expecting new `content/layout.json` for layout base and header to work properly
14
+
15
+ ### Features
16
+
17
+ * **storefront:** Add `getContent` alias to `cms` function on SSR page context ([78b608a](https://github.com/ecomplus/cloud-commerce/commit/78b608a2487c9c1a9ec0f3f35889f0a450a4808e))
18
+ * **storefront:** Add tailwind new 950 colors ([124b85b](https://github.com/ecomplus/cloud-commerce/commit/124b85b8d778fa3b69b568364d7be0f3d5b492ee))
19
+ * **storefront:** Bump VueUse to v10 ([b5251dd](https://github.com/ecomplus/cloud-commerce/commit/b5251dda1afbc7ac9bb67c19a221f2a8468aa75a))
20
+ * **storefront:** New `HeroPicture.astro` component optimize hero images with common abstractions ([296b6a0](https://github.com/ecomplus/cloud-commerce/commit/296b6a0f4ac0954f4d3f3568d205fd9cd5c4263d))
21
+ * **storefront:** New `useHeroSlider` composable to abstract hero slider component common handlers ([1a7b7cb](https://github.com/ecomplus/cloud-commerce/commit/1a7b7cbe6aa2775467498b39fe55fd9ff8e698f2))
22
+ * **storefront:** New `useHomeMain` and `useHeroSection` layout composables ([f5f7633](https://github.com/ecomplus/cloud-commerce/commit/f5f76334c63c673a35ef8e601d438a07280485c0))
23
+ * **storefront:** Update custom <Picture> to also parse `.max-w-screen-*` classes to sizes attr ([78b9234](https://github.com/ecomplus/cloud-commerce/commit/78b92349b41188aaaed649d6d21b2a9caae3e9ba))
24
+ * **storefront:** Update Tailwind config adding new 950 tone to brands colors ([0f6ff72](https://github.com/ecomplus/cloud-commerce/commit/0f6ff724278065d6b613ba7ee181db20b19743d1))
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * **apps:** Properly using IDs from config to read apps data ([#144](https://github.com/ecomplus/cloud-commerce/issues/144)) ([d047561](https://github.com/ecomplus/cloud-commerce/commit/d0475613c0bc32855326b92ae50fd91eb28a3db8))
30
+ * **deps:** Update Astro to v2.2.0 ([97c810d](https://github.com/ecomplus/cloud-commerce/commit/97c810d1d62abb627fa78ac187f6de8f0503910d))
31
+ * **deps:** Update Astro to v2.3.0 ([#148](https://github.com/ecomplus/cloud-commerce/issues/148)) ([93d9624](https://github.com/ecomplus/cloud-commerce/commit/93d9624d365b1975ae749601bcead5a929b0f06c))
32
+ * **deps:** Update dependency astro to v2.2.1 ([#143](https://github.com/ecomplus/cloud-commerce/issues/143)) ([537f4eb](https://github.com/ecomplus/cloud-commerce/commit/537f4eb160e9287767e4e7a20b1b3ba49e289a49))
33
+ * **deps:** Update non-major dependencies ([#140](https://github.com/ecomplus/cloud-commerce/issues/140)) ([b826d54](https://github.com/ecomplus/cloud-commerce/commit/b826d54750181125ae34399023b25bc546c95e08))
34
+ * **deps:** Update non-major dependencies ([#142](https://github.com/ecomplus/cloud-commerce/issues/142)) ([6f687a8](https://github.com/ecomplus/cloud-commerce/commit/6f687a8b8a80e0bd6191c3a94d50380658bd8629))
35
+ * **galaxpay:** Double check transaction status and handle Galaxpay cancel webhooks ([#145](https://github.com/ecomplus/cloud-commerce/issues/145)) ([4ac1c92](https://github.com/ecomplus/cloud-commerce/commit/4ac1c923f0b34a94badeba268baba8e85673f28c))
36
+ * **storefront:** Fix UnoCSS config generating brand colors foregrounds (on-*) ([76e4b9d](https://github.com/ecomplus/cloud-commerce/commit/76e4b9dcc72a85025a1df72aa9fec9c5fe14ec96))
37
+ * **storefront:** Fix Vue global <Carousel> to work with Astro slots ([0a0dc70](https://github.com/ecomplus/cloud-commerce/commit/0a0dc7089c1802059ec5454ccc180018c45e216e))
38
+ * **storefront:** Fixing default Vue to teleport elements z-index (.z-10) ([ca8629a](https://github.com/ecomplus/cloud-commerce/commit/ca8629ae7c35aaa2d5d13c7cf728897ec5470be3))
39
+ * **storefront:** Fixing Vue global custom properties (`$settings` and `$context`) typedef ([e17e3e7](https://github.com/ecomplus/cloud-commerce/commit/e17e3e7e78a59cb8c7d78f5aedfa8db072a3911d))
40
+ * **storefront:** General null/undefined fixes using TS strict mode ([f06af89](https://github.com/ecomplus/cloud-commerce/commit/f06af89d6c75396970feba4a071f151697443bfe))
41
+ * **storefront:** Properly setting `cmsContent` on home page context ([feb78a4](https://github.com/ecomplus/cloud-commerce/commit/feb78a404a8cf17f770a24a87ee1756c54968082))
42
+ * **storefront:** Update Astro to v2.1.9 ([#141](https://github.com/ecomplus/cloud-commerce/issues/141)) ([6d61253](https://github.com/ecomplus/cloud-commerce/commit/6d612536a15f35ddbac87091af95d2b9b889a22d))
43
+
44
+
45
+ * **storefront:** Edit CMS function type to fixed expected filenames ([33ffcc3](https://github.com/ecomplus/cloud-commerce/commit/33ffcc36d113c278a8318c0a7d0a0fe43686d11a))
46
+ * **storefront:** Remove `PagesLayout.astro` in favor of `use-page-layout` composable ([7955a6f](https://github.com/ecomplus/cloud-commerce/commit/7955a6fec9d622188e05152a1c507e20c6996af3))
47
+ * **storefront:** Removing test-only (yet) `ProductCard` component ([c3181c4](https://github.com/ecomplus/cloud-commerce/commit/c3181c40a9b5fa3594602e9f9978592ba500b1de))
48
+
49
+ ### [0.8.7](https://github.com/ecomplus/cloud-commerce/compare/v0.8.6...v0.8.7) (2023-03-31)
50
+
51
+
52
+ ### Bug Fixes
53
+
54
+ * **storefront:** Ensure alt attr on <Picture> img ([d55c572](https://github.com/ecomplus/cloud-commerce/commit/d55c5724599d4494a4a5fa9859df101b5f2a26ac))
55
+
5
56
  ### [0.8.6](https://github.com/ecomplus/cloud-commerce/compare/v0.8.5...v0.8.6) (2023-03-24)
6
57
 
7
58
 
@@ -15,6 +15,6 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/firebase": "^0.8.5"
18
+ "@cloudcommerce/firebase": "^0.8.7"
19
19
  }
20
20
  }
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/events": "^0.8.5",
19
- "@cloudcommerce/firebase": "^0.8.5"
18
+ "@cloudcommerce/events": "^0.8.7",
19
+ "@cloudcommerce/firebase": "^0.8.7"
20
20
  }
21
21
  }
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/firebase": "^0.8.5",
19
- "@cloudcommerce/modules": "^0.8.5"
18
+ "@cloudcommerce/firebase": "^0.8.7",
19
+ "@cloudcommerce/modules": "^0.8.7"
20
20
  }
21
21
  }
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/firebase": "^0.8.5",
19
- "@cloudcommerce/passport": "^0.8.5"
18
+ "@cloudcommerce/firebase": "^0.8.7",
19
+ "@cloudcommerce/passport": "^0.8.7"
20
20
  }
21
21
  }
@@ -0,0 +1,37 @@
1
+ {
2
+ "metatags": {
3
+ "og_image": "",
4
+ "fb_app_id": "",
5
+ "twitter_username": ""
6
+ },
7
+ "custom_code": {
8
+ "css": "",
9
+ "html_head": "",
10
+ "html_body": ""
11
+ },
12
+ "header": {
13
+ "pitch_bar": [
14
+ {
15
+ "href": "",
16
+ "html": "<b>Frete grátis</b> para todo Brasil"
17
+ }
18
+ ],
19
+ "inline_menu_categories": {
20
+ "featured": [],
21
+ "random": 7
22
+ },
23
+ "alphabetical_sort_submenu": false
24
+ },
25
+ "service_links": [
26
+ {
27
+ "title": "Edite seu Monocard",
28
+ "href": "https://mono.direct/login"
29
+ },
30
+ {
31
+ "title": "Fale conosco",
32
+ "href": "https://ajuda.monocard.com.br/"
33
+ }
34
+ ],
35
+ "footer": {
36
+ }
37
+ }
@@ -17,15 +17,15 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "dependencies": {
20
- "@cloudcommerce/api": "^0.8.5",
21
- "@cloudcommerce/firebase": "^0.8.5",
22
- "@cloudcommerce/ssr": "^0.8.5",
20
+ "@cloudcommerce/api": "^0.8.7",
21
+ "@cloudcommerce/firebase": "^0.8.7",
22
+ "@cloudcommerce/ssr": "^0.8.7",
23
23
  "@vueuse/motion": "2.0.0-beta.22"
24
24
  },
25
25
  "devDependencies": {
26
- "@cloudcommerce/i18n": "^0.8.5",
27
- "@cloudcommerce/storefront": "^0.8.5",
28
- "@cloudcommerce/types": "^0.8.5",
26
+ "@cloudcommerce/i18n": "^0.8.7",
27
+ "@cloudcommerce/storefront": "^0.8.7",
28
+ "@cloudcommerce/types": "^0.8.7",
29
29
  "@fontsource/inter": "^4.5.15",
30
30
  "@iconify-json/ri": "^1.1.5",
31
31
  "@iconify-json/wpf": "^1.1.4",
@@ -18,4 +18,11 @@ import FeatureTabs from '~/components/FeatureTabs.vue';
18
18
  widths={[220, 262]}
19
19
  class="sm:h-72 pb-3 sm:pt-3 mx-auto max-w-[110px] sm:max-w-[131px]"
20
20
  />
21
+ <Picture
22
+ slot="picture-edit"
23
+ src={'/img/uploads/mockup-editar.png'}
24
+ alt="Edite seu perfil no painel do Monocard"
25
+ widths={[756]}
26
+ class="pt-3 mx-auto w-full max-w-[500px] lg:max-w-[525px] xl:max-w-[550px]"
27
+ />
21
28
  </FeatureTabs>
@@ -41,7 +41,8 @@
41
41
  </button>
42
42
  </Tab>
43
43
  </TabList>
44
- <TabPanels class="text-left w-72 mx-auto sm:w-auto sm:px-5 mt-4">
44
+ <TabPanels class="text-left w-72 mx-auto sm:w-auto sm:px-5 mt-4
45
+ md:min-h-[870px] lg:min-h-[880px] xl:min-h-[915px]">
45
46
  <TabPanel v-motion-fade-visible>
46
47
  <div class="prose mb-8">
47
48
  <h4 class="text-2xl xl:text-3xl leading-snug mb-5">
@@ -134,44 +135,109 @@
134
135
  <div class="mt-5 flex gap-3 lg:gap-4
135
136
  text-xl lg:text-2xl font-brand lowercase">
136
137
  <a
137
- :href="$settings.metafields.monocard_slug"
138
+ :href="$settings.metafields?.monocard_slug"
138
139
  class="primary border-4 border-primary
139
140
  hover:border-primary-bold active:primary-bold
140
141
  rounded-full px-4 py-1.5 lg:px-7 lg:py-3"
141
142
  >
142
- Monte seu cartão
143
+ Monte seu Monocard
143
144
  </a>
144
145
  <a
145
- :href="$settings.metafields.business_lp_url"
146
+ :href="$settings.metafields?.business_lp_url"
146
147
  class="hidden sm:block
147
148
  bg-transparent text-black border-4 border-primary
148
149
  hover:bg-primary-100 hover:border-primary-bold active:primary-bold
149
- rounded-full px-4 py-2 xl:px-6 xl:py-3"
150
+ rounded-full px-4 py-2 lg:px-6 lg:py-3"
150
151
  >
151
152
  Para empresas
152
153
  </a>
153
154
  </div>
154
155
  </TabPanel>
155
- <TabPanel
156
- class="flex flex-wrap md:flex-nowrap items-start justify-between"
157
- v-motion-fade-visible
158
- >
159
- <div class="md:order-last rounded-xl overflow-hidden shadow-lg
160
- mt-4 md:mt-5 mb-2 md:mb-0 mx-auto md:mx-0 h-44 md:h-auto">
161
- <slot name="picture-edit" />
156
+ <TabPanel v-motion-fade-visible>
157
+ <slot name="picture-edit" />
158
+ <div class="flex flex-wrap md:flex-nowrap gap-x-10">
159
+ <div class="md:basis-1/2 prose">
160
+ <h4 class="text-xl">
161
+ Editar o perfil é rápido e fácil
162
+ </h4>
163
+ <p>
164
+ Adicione sua foto ou o logo de sua empresa em seu perfil.
165
+ Disponibilize todos os contatos que desejar, WhatsApp,
166
+ LinkedIn, Instagram, TikTok, Twitter, loja, website
167
+ e até Pix.
168
+ </p>
169
+ <p class="grid grid-cols-4 max-w-[170px] lg:max-w-[200px] gap-5
170
+ text-2xl text-base-800">
171
+ <i class="i-pix my-0"></i>
172
+ <i class="i-whatsapp my-0"></i>
173
+ <i class="i-instagram my-0"></i>
174
+ <i class="i-tiktok my-0"></i>
175
+ <i class="i-linkedin my-0"></i>
176
+ <i class="i-facebook my-0"></i>
177
+ <i class="i-mail-send-line my-0"></i>
178
+ <i class="i-add-circle-fill my-0 text-secondary-700"></i>
179
+ </p>
180
+ <p class="font-medium">
181
+ Tudo em um único link apontado diretamente pelo
182
+ seu cartão de visitas inteligente.
183
+ </p>
184
+ </div>
185
+ <div class="md:basis-1/2 prose">
186
+ <h4 class="flex gap-3 items-center">
187
+ <i class="i-translate-2 text-4xl my-0"></i>
188
+ <span class="font-normal font-brand lowercase">
189
+ Multilingual
190
+ </span>
191
+ </h4>
192
+ <p>
193
+ Traduz automaticamente o perfil para inglês.
194
+ <small class="block text-base-500">
195
+ Tradução para outras línguas em breve.
196
+ </small>
197
+ </p>
198
+ <h4 class="flex gap-3 items-center md:mt-9">
199
+ <i class="i-menu-add-fill text-4xl my-0"></i>
200
+ <span class="font-normal font-brand lowercase">
201
+ Ilimitado
202
+ </span>
203
+ </h4>
204
+ <p>
205
+ Adicione e configure quantos módulos quiser ao seu perfil.
206
+ Sem limites ou custos extra.
207
+ </p>
208
+ </div>
162
209
  </div>
163
- <div class="md:basis-1/2 prose">
164
- <h4>Editar o perfil é rápido e fácil</h4>
165
- <p>
166
- Adicione sua foto ou o logo de sua empresa em seu perfil.
167
- Disponibilize todos os contatos que desejar, WhatsApp,
168
- LinkedIn, Instagram, TikTok, Twitter, loja, website
169
- e até mesmo Pix.
170
- </p>
171
- <p class="font-medium">
172
- Tudo em um único link apontado diretamente pelo
173
- seu cartão de visitas inteligente.
174
- </p>
210
+ <div class="mt-5 flex flex-wrap gap-3 lg:gap-4
211
+ text-lg lg:text-xl font-brand lowercase">
212
+ <a
213
+ href="#produtos"
214
+ class="grow sm:grow-0
215
+ primary border-4 border-primary
216
+ hover:border-primary-bold active:primary-bold
217
+ rounded-full px-6 py-1.5 lg:px-8 lg:py-3
218
+ flex items-center"
219
+ >
220
+ <span class="leading-tight block">
221
+ Compre agora
222
+ <small class="block text-sm text-base-700">
223
+ Seu Monocard ou Monodot
224
+ </small>
225
+ </span>
226
+ </a>
227
+ <a
228
+ :href="$settings.metafields?.business_lp_url"
229
+ class="grow sm:grow-0
230
+ bg-transparent text-black border-4 border-primary
231
+ hover:bg-primary-100 hover:border-primary-bold active:primary-bold
232
+ rounded-full px-6 py-1.5 lg:px-8 lg:py-3"
233
+ >
234
+ <span class="leading-tight block">
235
+ Para grandes times
236
+ <small class="block text-sm text-base-700">
237
+ Fale conosco
238
+ </small>
239
+ </span>
240
+ </a>
175
241
  </div>
176
242
  </TabPanel>
177
243
  </TabPanels>
@@ -196,15 +262,16 @@ import {
196
262
  } from '@headlessui/vue';
197
263
 
198
264
  const title = ref<null | HTMLHeadingElement>(null);
199
- const titleMinWidth = ref<null | string>(null);
200
- const titleMinHeight = ref<null | string>(null);
265
+ const titleMinWidth = ref<string | undefined>();
266
+ const titleMinHeight = ref<string | undefined>();
201
267
  const fixTitleSize = () => {
268
+ if (!title.value) return;
202
269
  titleMinWidth.value = `${title.value.offsetWidth}px`;
203
270
  titleMinHeight.value = `${title.value.offsetHeight}px`;
204
271
  };
205
272
  const onResize = useDebounceFn(() => fixTitleSize(), 400);
206
273
  const copyKeyword = ref<null | string>('networking');
207
- let keywordInterval: null | ReturnType<typeof setInterval> = null;
274
+ let keywordInterval: ReturnType<typeof setInterval> | undefined;
208
275
  onMounted(() => {
209
276
  keywordInterval = setInterval(() => {
210
277
  fixTitleSize();
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <div class="bg-black uppercase relative z-1">
2
+ <div class="bg-black uppercase relative z-20">
3
3
  <div class="bg-primary/20">
4
4
  <div class="container md:w-2/3 mx-auto px-3 py-1">
5
- <Carousel :autoplay="countValidSlides > 1 ? 7000 : null">
5
+ <Carousel :autoplay="countValidSlides > 1 ? 7000 : undefined">
6
6
  <li
7
7
  v-for="(slide, i) in slides"
8
8
  :key="i"
@@ -7,10 +7,11 @@
7
7
  isSticky ? 'backdrop-blur-md shadow py-2 md:py-3' : 'py-3 sm:py-4 md:py-5',
8
8
  ]"
9
9
  >
10
- <div class="container lg:max-w-7xl mx-auto px-1 lg:pl-3
11
- grid grid-flow-col grid-cols-3 justify-between items-center
12
- lg:grid-cols-none lg:auto-cols-max">
13
- <div class="lg:hidden">
10
+ <div class="container lg:max-w-4xl xl:max-w-6xl 2xl:max-w-7xl
11
+ mx-auto px-1 lg:pl-3
12
+ flex md:grid grid-flow-col grid-cols-3 lg:grid-cols-none lg:auto-cols-max
13
+ justify-between items-center">
14
+ <div class="basis-1/4 lg:hidden">
14
15
  <button
15
16
  class="px-2 my-1"
16
17
  :aria-label="$t.i19toggleMenu"
@@ -27,7 +28,7 @@
27
28
  class="hidden lg:block"
28
29
  v-bind="{ isSticky, ...headerNavLinks }"
29
30
  />
30
- <div class="px-2 flex justify-end items-center gap-3 lg:gap-4">
31
+ <div class="basis-1/4 px-2 flex justify-end items-center gap-3 lg:gap-4">
31
32
  <AccountMenu
32
33
  class="hidden sm:block"
33
34
  :aria-label="$t.i19myAccount"
@@ -87,11 +88,11 @@ const {
87
88
  } = useShopHeader({ ...props, header });
88
89
  const isSidenavOpen = ref(false);
89
90
  const vm = getCurrentInstance();
90
- const { metafields } = vm.appContext.app.config.globalProperties.$settings;
91
+ const metafields = vm?.appContext.app.config.globalProperties.$settings.metafields || {};
91
92
  const headerNavLinks = {
92
- supportUrl: metafields.support_url,
93
- businessLpUrl: metafields.business_lp_url,
94
- monocardSlug: metafields.monocard_slug,
95
- monodotSlug: metafields.monodot_slug,
93
+ supportUrl: metafields.support_url || '',
94
+ businessLpUrl: metafields.business_lp_url || '',
95
+ monocardSlug: metafields.monocard_slug || '',
96
+ monodotSlug: metafields.monodot_slug || '',
96
97
  };
97
98
  </script>
@@ -58,11 +58,11 @@
58
58
  </template>
59
59
 
60
60
  <script setup lang="ts">
61
- import type { CategoryTree } from '@@sf/composables/use-shop-header';
61
+ import type { CategoryTree, SubcategoryTree } from '@@sf/composables/use-shop-header';
62
62
  import { ref, watch } from 'vue';
63
63
 
64
64
  export interface Props {
65
- categoryTree: CategoryTree;
65
+ categoryTree: CategoryTree | SubcategoryTree;
66
66
  }
67
67
 
68
68
  defineProps<Props>();
@@ -1,7 +1,9 @@
1
1
  ---
2
2
  import type { PageContext } from '@@sf/ssr-context';
3
3
  import Base from '~/layouts/Base.astro';
4
- import Header from '@@sf/layouts/PagesHeader.astro';
4
+ import usePageLayout from '@@sf/layouts/use-page-layout';
5
+ import PitchBar from '~/components/PitchBar.vue';
6
+ import ShopHeader from '~/components/ShopHeader.vue';
5
7
 
6
8
  export interface Props {
7
9
  pageContext: PageContext;
@@ -9,23 +11,35 @@ export interface Props {
9
11
  }
10
12
 
11
13
  const { pageContext, title } = Astro.props as Props;
12
- const { settings } = pageContext;
14
+ const { settings, isHomepage } = pageContext;
15
+ const LogoHeading = isHomepage ? 'h1' : 'h2';
16
+ const { pitchBar, shopHeader } = await usePageLayout({ pageContext });
13
17
  ---
14
18
 
15
19
  <Base pageContext={pageContext} title={title}>
16
20
  <slot name="header">
17
- <Header pageContext={pageContext}>
18
- <img
19
- slot="logo-picture"
20
- src={settings.logo}
21
- alt={settings.name}
22
- width="150"
23
- height="24.5"
24
- fetchpriority="high"
25
- loading="eager"
26
- class="hover:drop-shadow-sm"
27
- />
28
- </Header>
21
+ <slot name="pitch-bar">
22
+ {pitchBar.slides.length > 1 && <PitchBar {...pitchBar} client:idle />}
23
+ {pitchBar.slides.length === 1 && <PitchBar {...pitchBar} />}
24
+ </slot>
25
+ <ShopHeader {...shopHeader} client:load>
26
+ <Fragment slot="logo">
27
+ <a href="/">
28
+ <LogoHeading>
29
+ <img
30
+ slot="logo-picture"
31
+ src={settings.logo}
32
+ alt={settings.name}
33
+ width="150"
34
+ height="24.5"
35
+ fetchpriority="high"
36
+ loading="eager"
37
+ class="hover:drop-shadow-sm mx-auto"
38
+ />
39
+ </LogoHeading>
40
+ </a>
41
+ </Fragment>
42
+ </ShopHeader>
29
43
  </slot>
30
44
  <slot />
31
45
  <script>
@@ -18,7 +18,7 @@ const products = (await api.get('products')).data.result;
18
18
  <article class="container mx-auto px-8">
19
19
  <div class="grid grid-cols-1 lg:grid-cols-7">
20
20
  <div class="lg:col-span-3 pt-5 lg:py-18 xl:py-20 lg:text-right prose">
21
- <h3 class="text-5xl lg:text-7xl 2xl:text-8xl font-bold mt-7">
21
+ <h3 class="text-5xl lg:text-6xl xl:text-7xl 2xl:text-8xl font-bold mt-7">
22
22
  A melhor forma de se
23
23
  <span class="text-transparent bg-clip-text bg-gradient-to-br
24
24
  from-base-900 to-secondary-500">
@@ -29,14 +29,14 @@ const products = (await api.get('products')).data.result;
29
29
  perfeito para pessoas e empresas
30
30
  </h2>
31
31
  <div class="not-prose mt-5 flex gap-3 lg:gap-4 text-center lg:justify-end
32
- text-lg sm:text-xl lg:text-3xl font-brand lowercase">
32
+ text-lg sm:text-xl lg:text-2xl xl:text-3xl font-brand lowercase">
33
33
  <a role="button" href="/#produtos"
34
34
  class="primary lg:border-4 border-primary
35
35
  hover:border-primary-bold active:primary-bold
36
36
  basis-1/2 lg:basis-auto rounded-full px-4 py-2.5 xl:px-7 xl:py-4">
37
37
  Compre agora
38
38
  </a>
39
- <a role="button" href={settings.metafields.business_lp_url}
39
+ <a role="button" href={settings.metafields?.business_lp_url}
40
40
  class="bg-primary/40 text-primary-900 lg:border-4 border-primary/20
41
41
  hover:primary hover:border-primary-bold active:primary-bold
42
42
  basis-1/2 lg:basis-auto rounded-full px-4 py-2.5 xl:px-7 xl:py-4">
@@ -11,11 +11,13 @@ const {
11
11
  ---
12
12
 
13
13
  <main>
14
- <h1>Hello <span class="text-gradient">{apiDoc.name}</span></h1>
15
- <hr>
16
- <div class="mt-3">
17
- <mark>{apiDoc._id}</mark> from <i>{apiResource}</i>
18
- <p>{Math.random()}</p>
19
- <em>Lorem ipsum dolor sit amet</em>
20
- </div>
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
+ }
21
23
  </main>
@@ -8,11 +8,11 @@ if (String(Astro.params.slug).endsWith('.css.map')) {
8
8
  return new Response(null, { status: 404 });
9
9
  }
10
10
 
11
- let pageContext: PageContext;
11
+ let pageContext: PageContext | undefined;
12
12
  let loadError: any;
13
13
  try {
14
14
  pageContext = await loadPageContext(Astro);
15
- } catch (err) {
15
+ } catch (err: any) {
16
16
  if (err.astroResponse) {
17
17
  return err.astroResponse;
18
18
  }
@@ -6,7 +6,7 @@ import FallbackMain from '~/main/Fallback.astro';
6
6
  let pageContext: PageContext;
7
7
  try {
8
8
  pageContext = await loadPageContext(Astro);
9
- } catch (err) {
9
+ } catch (err: any) {
10
10
  return err.astroResponse;
11
11
  }
12
12
 
@@ -3,7 +3,7 @@ import loadPageContext, { PageContext } from '@@sf/ssr-context';
3
3
  import PagesLayout from '~/layouts/Pages.astro';
4
4
  import HomeMain from '~/main/Home.astro';
5
5
 
6
- let pageContext: PageContext;
6
+ let pageContext: PageContext | undefined;
7
7
  let loadError: any;
8
8
  try {
9
9
  pageContext = await loadPageContext(Astro);
@@ -12,7 +12,7 @@ try {
12
12
  apiPrefetchEndpoints: [],
13
13
  });
14
14
  */
15
- } catch (err) {
15
+ } catch (err: any) {
16
16
  if (err.astroResponse) {
17
17
  return err.astroResponse;
18
18
  }
@@ -23,6 +23,6 @@
23
23
  "url": "https://github.com/ecomplus/cloud-commerce/issues"
24
24
  },
25
25
  "dependencies": {
26
- "@cloudcommerce/cli": "^0.8.5"
26
+ "@cloudcommerce/cli": "^0.8.7"
27
27
  }
28
28
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "0.8.6",
4
+ "version": "0.9.0",
5
5
  "description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
6
6
  "main": "packages/api/lib/index.js",
7
7
  "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
@@ -16,25 +16,25 @@
16
16
  }
17
17
  },
18
18
  "devDependencies": {
19
- "@commitlint/cli": "^17.5.0",
19
+ "@commitlint/cli": "^17.5.1",
20
20
  "@commitlint/config-conventional": "^17.4.4",
21
21
  "@commitlint/rules": "^17.4.4",
22
- "@types/node": "^18.15.5",
23
- "@typescript-eslint/eslint-plugin": "^5.56.0",
24
- "@typescript-eslint/parser": "^5.56.0",
25
- "esbuild": "^0.17.12",
26
- "eslint": "^8.36.0",
22
+ "@types/node": "^18.15.11",
23
+ "@typescript-eslint/eslint-plugin": "^5.57.1",
24
+ "@typescript-eslint/parser": "^5.57.1",
25
+ "esbuild": "^0.17.16",
26
+ "eslint": "^8.38.0",
27
27
  "eslint-config-airbnb-base": "^15.0.0",
28
28
  "eslint-plugin-import": "^2.27.5",
29
- "eslint-plugin-vue": "^9.9.0",
29
+ "eslint-plugin-vue": "^9.10.0",
30
30
  "husky": "^8.0.3",
31
31
  "standard-version": "^9.5.0",
32
32
  "ts-node": "^10.9.1",
33
33
  "turbo": "1.6.3",
34
- "typescript": "^4.9.5",
34
+ "typescript": "^5.0.4",
35
35
  "uglify-js": "^3.17.4",
36
36
  "vite": "^4.2.1",
37
- "vitest": "^0.29.7",
37
+ "vitest": "^0.30.0",
38
38
  "zx": "^7.2.1"
39
39
  },
40
40
  "scripts": {