cloudcommerce 0.0.115 → 0.0.117

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 (240) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/ecomplus-stores/monocard/functions/core/package.json +1 -1
  3. package/ecomplus-stores/monocard/functions/events/package.json +2 -2
  4. package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
  5. package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
  6. package/ecomplus-stores/monocard/functions/ssr/.eslintrc.cjs +6 -0
  7. package/ecomplus-stores/monocard/functions/ssr/content/contacts.json +3 -3
  8. package/ecomplus-stores/monocard/functions/ssr/content/settings.json +0 -7
  9. package/ecomplus-stores/monocard/functions/ssr/package.json +11 -5
  10. package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/FavoritPro-Regular.woff2 +0 -0
  11. package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/MyriadPro-Regular.woff2 +0 -0
  12. package/ecomplus-stores/monocard/functions/ssr/public/assets/lotties/img_1.png +0 -0
  13. package/ecomplus-stores/monocard/functions/ssr/public/assets/lotties/phone-nfc.json +1 -0
  14. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/fluxo.png +0 -0
  15. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/padronagem-tilada.png +0 -0
  16. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/sua-logo-aqui.png +0 -0
  17. package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +5 -0
  18. package/ecomplus-stores/monocard/functions/ssr/src/components/HowItWorksAccordion.vue +32 -0
  19. package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +19 -0
  20. package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +358 -0
  21. package/ecomplus-stores/monocard/functions/ssr/src/components/TheHeader.vue +40 -3
  22. package/ecomplus-stores/monocard/functions/ssr/src/components/TopBar.vue +10 -0
  23. package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderButtonLink.vue +5 -0
  24. package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderButtons.vue +59 -0
  25. package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderNav.vue +61 -0
  26. package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderNavLink.vue +5 -0
  27. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +58 -0
  28. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +18 -41
  29. package/ecomplus-stores/monocard/functions/ssr/src/layouts/PagesHeader.astro +51 -0
  30. package/{packages/storefront/src/lib → ecomplus-stores/monocard/functions/ssr/src}/main/Fallback.astro +0 -0
  31. package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +63 -0
  32. package/{packages/storefront/src/lib → ecomplus-stores/monocard/functions/ssr/src}/main/Wildcard.astro +0 -0
  33. package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +2 -2
  34. package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +45 -0
  35. package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +3 -3
  36. package/{packages/storefront/src/components/.gitkeep → ecomplus-stores/monocard/functions/ssr/src/pages/monocard.astro} +0 -0
  37. package/ecomplus-stores/monocard/functions/ssr/tsconfig.json +14 -1
  38. package/ecomplus-stores/monocard/package.json +1 -1
  39. package/package.json +8 -8
  40. package/packages/api/lib/types.d.ts +14 -3
  41. package/packages/api/package.json +1 -1
  42. package/packages/api/src/types.ts +35 -12
  43. package/packages/apps/correios/package.json +1 -1
  44. package/packages/apps/custom-shipping/package.json +1 -1
  45. package/packages/apps/discounts/package.json +1 -1
  46. package/packages/apps/frenet/package.json +1 -1
  47. package/packages/apps/mercadopago/package.json +1 -1
  48. package/packages/apps/tiny-erp/lib/event-to-tiny.js +115 -0
  49. package/packages/apps/tiny-erp/lib/event-to-tiny.js.map +1 -0
  50. package/packages/apps/tiny-erp/lib/index.js +2 -0
  51. package/packages/apps/tiny-erp/lib/index.js.map +1 -0
  52. package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js +79 -0
  53. package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js.map +1 -0
  54. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +84 -0
  55. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -0
  56. package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js +58 -0
  57. package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js.map +1 -0
  58. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +7 -0
  59. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js.map +1 -0
  60. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +92 -0
  61. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -0
  62. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +158 -0
  63. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -0
  64. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +46 -0
  65. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +1 -0
  66. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +193 -0
  67. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -0
  68. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +199 -0
  69. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -0
  70. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +129 -0
  71. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -0
  72. package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js +34 -0
  73. package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js.map +1 -0
  74. package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js +39 -0
  75. package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js.map +1 -0
  76. package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js +47 -0
  77. package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js.map +1 -0
  78. package/packages/apps/tiny-erp/lib/tiny-erp.js +18 -0
  79. package/packages/apps/tiny-erp/lib/tiny-erp.js.map +1 -0
  80. package/packages/apps/tiny-erp/lib/tiny-webhook.js +92 -0
  81. package/packages/apps/tiny-erp/lib/tiny-webhook.js.map +1 -0
  82. package/packages/apps/tiny-erp/package.json +1 -1
  83. package/packages/cli/package.json +1 -1
  84. package/packages/config/lib/config.js +12 -4
  85. package/packages/config/lib/config.js.map +1 -1
  86. package/packages/config/package.json +1 -1
  87. package/packages/config/src/config.ts +12 -4
  88. package/packages/events/package.json +2 -2
  89. package/packages/firebase/lib/config.js +34 -38
  90. package/packages/firebase/lib/const.js +2 -3
  91. package/packages/firebase/lib/env.js +1 -2
  92. package/packages/firebase/lib/handlers/check-store-events.js +145 -146
  93. package/packages/firebase/lib/helpers/pubsub.js +18 -20
  94. package/packages/firebase/lib/helpers/update-app-data.js +38 -38
  95. package/packages/firebase/lib/index.js +7 -9
  96. package/packages/firebase/lib/init.js +1 -2
  97. package/packages/firebase/package.json +1 -1
  98. package/packages/i18n/package.json +1 -1
  99. package/packages/modules/package.json +1 -1
  100. package/packages/modules/src/firebase/serve-modules-api.ts +1 -0
  101. package/packages/passport/package.json +1 -1
  102. package/packages/passport/src/firebase/authenticate-customer.ts +1 -1
  103. package/packages/passport/src/firebase/serve-passport-api.ts +2 -0
  104. package/packages/ssr/package.json +3 -3
  105. package/packages/storefront/astro.config.mjs +22 -17
  106. package/packages/storefront/package.json +6 -7
  107. package/packages/storefront/scripts/prepare-monorepo.sh +6 -0
  108. package/packages/storefront/src/env.d.ts +1 -1
  109. package/packages/storefront/src/lib/assets/pico.css +12 -11
  110. package/packages/storefront/src/lib/components/ADrawer.vue +33 -21
  111. package/packages/storefront/src/lib/components/LoginDrawer.vue +7 -13
  112. package/packages/storefront/src/lib/components/LoginForm.vue +3 -1
  113. package/packages/storefront/src/lib/layouts/Base.astro +3 -3
  114. package/packages/storefront/src/lib/layouts/BaseStateJson.astro +5 -0
  115. package/packages/storefront/src/lib/ssr-context.ts +6 -1
  116. package/packages/storefront/src/lib/state/customer-session.ts +1 -1
  117. package/packages/storefront/src/lib/types/cms-code.d.ts +1 -1
  118. package/packages/storefront/src/lib/types/cms-contacts.d.ts +1 -1
  119. package/packages/storefront/src/lib/types/cms-header.d.ts +1 -1
  120. package/packages/storefront/src/lib/types/cms-settings.d.ts +1 -1
  121. package/packages/storefront/src/lib/types/cms-social.d.ts +1 -1
  122. package/packages/storefront/tailwind.config.cjs +76 -1
  123. package/packages/storefront/tsconfig.json +4 -1
  124. package/packages/storefront/uno.config.ts +12 -31
  125. package/packages/types/package.json +1 -1
  126. package/turbo.json +0 -1
  127. package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
  128. package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
  129. package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
  130. package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
  131. package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
  132. package/ecomplus-stores/monocard/functions/ssr/public/assets/img-placeholder.png +0 -0
  133. package/ecomplus-stores/monocard/functions/ssr/public/assets/payments.png +0 -0
  134. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/banner1.png +0 -0
  135. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/banner2.png +0 -0
  136. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/banner2.webp +0 -0
  137. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/headless.png +0 -0
  138. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/headphone.png +0 -0
  139. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/headphone.webp +0 -0
  140. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/passion.png +0 -0
  141. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/passion.webp +0 -0
  142. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/pwa-reliable.png +0 -0
  143. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/rect8589.png +0 -0
  144. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/rect859.png +0 -0
  145. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/rect89.png +0 -0
  146. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/rect89.webp +0 -0
  147. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/ssl-safe.png +0 -0
  148. package/packages/storefront/content/blog.json +0 -18
  149. package/packages/storefront/content/brands.json +0 -24
  150. package/packages/storefront/content/categories.json +0 -24
  151. package/packages/storefront/content/code.json +0 -5
  152. package/packages/storefront/content/collections.json +0 -24
  153. package/packages/storefront/content/contacts.json +0 -13
  154. package/packages/storefront/content/footer.json +0 -46
  155. package/packages/storefront/content/header.json +0 -35
  156. package/packages/storefront/content/home.json +0 -45
  157. package/packages/storefront/content/info.json +0 -18
  158. package/packages/storefront/content/maintenance.json +0 -6
  159. package/packages/storefront/content/menu.json +0 -6
  160. package/packages/storefront/content/pages/contato.json +0 -6
  161. package/packages/storefront/content/pages/entrega.json +0 -6
  162. package/packages/storefront/content/pages/faq.json +0 -6
  163. package/packages/storefront/content/pages/pagamentos.json +0 -6
  164. package/packages/storefront/content/pages/privacidade.json +0 -6
  165. package/packages/storefront/content/pages/sobre-nos.json +0 -6
  166. package/packages/storefront/content/pages/termos.json +0 -6
  167. package/packages/storefront/content/pages/trocas.json +0 -6
  168. package/packages/storefront/content/posts/esta-loja-e-um-pwa.json +0 -9
  169. package/packages/storefront/content/products.json +0 -32
  170. package/packages/storefront/content/search.json +0 -8
  171. package/packages/storefront/content/settings.json +0 -21
  172. package/packages/storefront/content/social.json +0 -5
  173. package/packages/storefront/content/widgets/analytics.json +0 -11
  174. package/packages/storefront/content/widgets/compre-confie.json +0 -11
  175. package/packages/storefront/content/widgets/ebit.json +0 -11
  176. package/packages/storefront/content/widgets/fb-pixel.json +0 -12
  177. package/packages/storefront/content/widgets/gmc-ratings.json +0 -12
  178. package/packages/storefront/content/widgets/minicart.json +0 -6
  179. package/packages/storefront/content/widgets/offers-notification.json +0 -11
  180. package/packages/storefront/content/widgets/opinioes-verificadas.json +0 -18
  181. package/packages/storefront/content/widgets/product-card.json +0 -10
  182. package/packages/storefront/content/widgets/product.json +0 -13
  183. package/packages/storefront/content/widgets/search-engine.json +0 -8
  184. package/packages/storefront/content/widgets/search.json +0 -6
  185. package/packages/storefront/content/widgets/tag-manager.json +0 -12
  186. package/packages/storefront/content/widgets/tawkto.json +0 -12
  187. package/packages/storefront/content/widgets/trustvox.json +0 -15
  188. package/packages/storefront/content/widgets/user.json +0 -5
  189. package/packages/storefront/dist/server/assets/_...slug_.648f7d81.css +0 -4
  190. package/packages/storefront/dist/server/manifest.webmanifest +0 -1
  191. package/packages/storefront/dist/server/registerSW.js +0 -1
  192. package/packages/storefront/public/admin/config.json +0 -1
  193. package/packages/storefront/public/assets/cms-preview.css +0 -274
  194. package/packages/storefront/public/assets/cms.css +0 -114
  195. package/packages/storefront/public/assets/cvv.png +0 -0
  196. package/packages/storefront/public/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
  197. package/packages/storefront/public/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
  198. package/packages/storefront/public/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
  199. package/packages/storefront/public/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
  200. package/packages/storefront/public/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
  201. package/packages/storefront/public/assets/img-placeholder.png +0 -0
  202. package/packages/storefront/public/assets/payments.png +0 -0
  203. package/packages/storefront/public/assets/ssl-safe.png +0 -0
  204. package/packages/storefront/public/img/icon.png +0 -0
  205. package/packages/storefront/public/img/large-icon.png +0 -0
  206. package/packages/storefront/public/img/uploads/banner1.png +0 -0
  207. package/packages/storefront/public/img/uploads/banner2.png +0 -0
  208. package/packages/storefront/public/img/uploads/banner2.webp +0 -0
  209. package/packages/storefront/public/img/uploads/favicon.png +0 -0
  210. package/packages/storefront/public/img/uploads/headless.png +0 -0
  211. package/packages/storefront/public/img/uploads/headphone.png +0 -0
  212. package/packages/storefront/public/img/uploads/headphone.webp +0 -0
  213. package/packages/storefront/public/img/uploads/icon.png +0 -0
  214. package/packages/storefront/public/img/uploads/large-icon.png +0 -0
  215. package/packages/storefront/public/img/uploads/logo.png +0 -0
  216. package/packages/storefront/public/img/uploads/logo.webp +0 -0
  217. package/packages/storefront/public/img/uploads/og-image.png +0 -0
  218. package/packages/storefront/public/img/uploads/passion.png +0 -0
  219. package/packages/storefront/public/img/uploads/passion.webp +0 -0
  220. package/packages/storefront/public/img/uploads/pwa-reliable.png +0 -0
  221. package/packages/storefront/public/img/uploads/rect8589.png +0 -0
  222. package/packages/storefront/public/img/uploads/rect859.png +0 -0
  223. package/packages/storefront/public/img/uploads/rect89.png +0 -0
  224. package/packages/storefront/public/img/uploads/rect89.webp +0 -0
  225. package/packages/storefront/public/img/uploads/ssl-safe.png +0 -0
  226. package/packages/storefront/public/robots.txt +0 -8
  227. package/packages/storefront/scripts/prerelease.sh +0 -4
  228. package/packages/storefront/src/layouts/Pages.astro +0 -38
  229. package/packages/storefront/src/lib/components/TheHeader.vue +0 -49
  230. package/packages/storefront/src/lib/components/TopBar.vue +0 -133
  231. package/packages/storefront/src/lib/layouts/Checkout.astro +0 -0
  232. package/packages/storefront/src/lib/layouts/Pages.astro +0 -26
  233. package/packages/storefront/src/lib/layouts/PagesHeader.astro +0 -116
  234. package/packages/storefront/src/lib/main/Home.astro +0 -19
  235. package/packages/storefront/src/pages/[...slug].astro +0 -36
  236. package/packages/storefront/src/pages/app/account.astro +0 -0
  237. package/packages/storefront/src/pages/app/index.astro +0 -0
  238. package/packages/storefront/src/pages/fallback.astro +0 -19
  239. package/packages/storefront/src/pages/index.astro +0 -26
  240. package/packages/storefront/src/scripts/InlineScripts.astro +0 -11
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "0.0.115",
4
+ "version": "0.0.117",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "main": "src/index.js",
7
7
  "repository": {
@@ -22,8 +22,7 @@
22
22
  "build:static": "BUILD_OUTPUT=static astro build",
23
23
  "preview": "astro preview",
24
24
  "astro": "astro",
25
- "prepare-monorepo": "sh scripts/prepare-monorepo.sh",
26
- "prerelease": "sh scripts/prerelease.sh"
25
+ "prepare-monorepo": "sh scripts/prepare-monorepo.sh"
27
26
  },
28
27
  "dependencies": {
29
28
  "@astrojs/image": "^0.9.3",
@@ -40,17 +39,17 @@
40
39
  "@iconify-json/logos": "^1.1.17",
41
40
  "@nanostores/vue": "^0.6.0",
42
41
  "@unocss/preset-icons": "^0.45.29",
43
- "astro": "^1.4.7",
42
+ "astro": "^1.5.0",
44
43
  "color": "^4.2.3",
45
44
  "dotenv": "^16.0.3",
46
- "firebase": "^9.11.0",
45
+ "firebase": "^9.12.1",
47
46
  "image-size": "^1.0.2",
48
47
  "nanostores": "^0.7.0",
49
48
  "rollup": "^2.79.1",
50
49
  "unocss": "^0.45.29",
51
- "vite": "^3.1.7",
50
+ "vite": "^3.1.8",
52
51
  "vite-plugin-pwa": "^0.13.1",
53
- "vue": "^3.2.40"
52
+ "vue": "^3.2.41"
54
53
  },
55
54
  "devDependencies": {
56
55
  "@babel/core": "^7.19.3"
@@ -2,3 +2,9 @@
2
2
 
3
3
  rm -rf content && ln -s ../../store/functions/ssr/content content
4
4
  rm -rf public && ln -s ../../store/functions/ssr/public public
5
+ rm -rf src/pages && ln -s ../../../store/functions/ssr/src/pages src/pages
6
+ rm -rf src/layouts && ln -s ../../../store/functions/ssr/src/layouts src/layouts
7
+ rm -rf src/main && ln -s ../../../store/functions/ssr/src/main src/main
8
+ rm -rf src/components && ln -s ../../../store/functions/ssr/src/components src/components
9
+ rm -rf src/scripts && ln -s ../../../store/functions/ssr/src/scripts src/scripts
10
+ rm -rf src/assets && ln -s ../../../store/functions/ssr/src/assets src/assets
@@ -1,3 +1,3 @@
1
- /// <reference types="astro/client" />
1
+ /// <reference types="@astrojs/image/client" />
2
2
  /// <reference types="vite-plugin-pwa/client" />
3
3
  /// <reference types="../client" />
@@ -25,9 +25,9 @@
25
25
  --form-element-spacing-vertical: 0.75rem;
26
26
  --form-element-spacing-horizontal: 1rem;
27
27
  --nav-element-spacing-vertical: 1rem;
28
- --nav-element-spacing-horizontal: 0.5rem;
28
+ --nav-element-spacing-horizontal: 0.65rem;
29
29
  --nav-link-spacing-vertical: 0.5rem;
30
- --nav-link-spacing-horizontal: 0.5rem;
30
+ --nav-link-spacing-horizontal: 0.65rem;
31
31
  --form-label-font-weight: var(--font-weight);
32
32
  --transition: 0.15s ease-in-out;
33
33
  --icon-checkbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
@@ -40,22 +40,22 @@
40
40
  }
41
41
  @media (min-width: 576px) {
42
42
  :root {
43
- --font-size: 17px;
43
+ --font-size: 16.5px;
44
44
  }
45
45
  }
46
46
  @media (min-width: 768px) {
47
47
  :root {
48
- --font-size: 18px;
48
+ --font-size: 17px;
49
49
  }
50
50
  }
51
51
  @media (min-width: 992px) {
52
52
  :root {
53
- --font-size: 19px;
53
+ --font-size: 17.65px;
54
54
  }
55
55
  }
56
56
  @media (min-width: 1200px) {
57
57
  :root {
58
- --font-size: 20px;
58
+ --font-size: 18.5px;
59
59
  }
60
60
  }
61
61
 
@@ -749,13 +749,14 @@ button {
749
749
  [role=button] {
750
750
  display: inline-block;
751
751
  text-decoration: none;
752
+ cursor: pointer;
752
753
  }
753
754
 
754
755
  button,
755
756
  input[type=submit],
756
757
  input[type=button],
757
758
  input[type=reset],
758
- [role=button] {
759
+ :where(a)[role=button] {
759
760
  --background-color: var(--primary);
760
761
  --border-color: var(--primary);
761
762
  --color: var(--primary-inverse);
@@ -914,7 +915,7 @@ textarea {
914
915
  border-width: 0;
915
916
  }
916
917
 
917
- input:not([type=checkbox], [type=radio], [type=range]) {
918
+ :where(input):not([type=checkbox], [type=radio], [type=range]) {
918
919
  height: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2);
919
920
  }
920
921
 
@@ -932,13 +933,13 @@ fieldset legend {
932
933
  font-weight: var(--form-label-font-weight, var(--font-weight));
933
934
  }
934
935
 
935
- input:not([type=checkbox], [type=radio]),
936
+ :where(input):not([type=checkbox], [type=radio]),
936
937
  select,
937
938
  textarea {
938
939
  width: 100%;
939
940
  }
940
941
 
941
- input:not([type=checkbox], [type=radio], [type=range], [type=file]),
942
+ :where(input):not([type=checkbox], [type=radio], [type=range], [type=file]),
942
943
  select,
943
944
  textarea {
944
945
  -webkit-appearance: none;
@@ -1035,7 +1036,7 @@ select:invalid {
1035
1036
  opacity: 1;
1036
1037
  }
1037
1038
 
1038
- input:not([type=checkbox], [type=radio]),
1039
+ :where(input):not([type=checkbox], [type=radio]),
1039
1040
  select,
1040
1041
  textarea {
1041
1042
  margin-bottom: var(--spacing);
@@ -18,6 +18,7 @@ const props = withDefaults(defineProps<Props>(), {
18
18
  });
19
19
  const emit = defineEmits(['update:modelValue']);
20
20
  const close = () => emit('update:modelValue', false);
21
+ const container = ref(null);
21
22
  const article = ref(null);
22
23
  const outsideClickListener = (ev: MouseEvent) => {
23
24
  if (!article.value?.contains(ev.target)) {
@@ -30,14 +31,23 @@ const escClickListener = (ev: KeyboardEvent) => {
30
31
  }
31
32
  };
32
33
  watch(toRef(props, 'modelValue'), async (isOpen) => {
34
+ const header = container.value.closest('[class*="backdrop-"]');
33
35
  if (isOpen) {
34
36
  document.body.style.overflow = 'hidden';
37
+ if (header) {
38
+ header.style.backdropFilter = 'none';
39
+ }
35
40
  setTimeout(() => {
36
41
  document.addEventListener('click', outsideClickListener, { passive: true });
37
42
  document.addEventListener('keydown', escClickListener, { passive: true });
38
43
  }, 500);
39
44
  } else {
40
45
  document.body.style.overflow = null;
46
+ if (header) {
47
+ setTimeout(() => {
48
+ header.style.backdropFilter = null;
49
+ }, 500);
50
+ }
41
51
  document.removeEventListener('click', outsideClickListener);
42
52
  document.removeEventListener('keydown', escClickListener);
43
53
  }
@@ -48,28 +58,30 @@ const transition3dTx = computed(() => {
48
58
  </script>
49
59
 
50
60
  <template>
51
- <Transition>
52
- <dialog
53
- v-if="modelValue"
54
- class="offcanvas p-0"
55
- :class="placement === 'end' ? 'justify-end' : 'justify-start'"
56
- :open="modelValue"
57
- >
58
- <article
59
- ref="article"
60
- class="rounded-none h-full max-h-screen m-0"
61
+ <div ref="container">
62
+ <Transition>
63
+ <dialog
64
+ v-if="modelValue"
65
+ class="offcanvas p-0"
66
+ :class="placement === 'end' ? 'justify-end' : 'justify-start'"
67
+ :open="modelValue"
61
68
  >
62
- <a
63
- href="#close"
64
- :aria-label="i19close"
65
- class="close"
66
- data-target="modal-example"
67
- @click.prevent="close"
68
- ></a>
69
- <slot />
70
- </article>
71
- </dialog>
72
- </Transition>
69
+ <article
70
+ ref="article"
71
+ class="rounded-none h-full max-h-screen m-0"
72
+ >
73
+ <a
74
+ href="#close"
75
+ :aria-label="i19close"
76
+ class="close"
77
+ data-target="modal-example"
78
+ @click.prevent="close"
79
+ ></a>
80
+ <slot />
81
+ </article>
82
+ </dialog>
83
+ </Transition>
84
+ </div>
73
85
  </template>
74
86
 
75
87
  <style>
@@ -1,15 +1,10 @@
1
1
  <script lang="ts" setup>
2
2
  import { ref, defineAsyncComponent } from 'vue';
3
- import {
4
- i19myAccountAndOrders,
5
- i19myAccount,
6
- i19myOrders,
7
- } from '@@i18n';
3
+ import { i19myAccount, i19myOrders } from '@@i18n';
8
4
  import ADrawer from '@@components/ADrawer.vue';
9
5
 
10
6
  export interface Props {
11
7
  accountUrl?: string;
12
- accountIconClass?: string;
13
8
  additionalLinks?: Array<{
14
9
  href: string;
15
10
  isBlank?: boolean;
@@ -19,7 +14,6 @@ export interface Props {
19
14
 
20
15
  withDefaults(defineProps<Props>(), {
21
16
  accountUrl: '/app/account',
22
- accountIconClass: 'i-user-circle',
23
17
  additionalLinks: () => [],
24
18
  });
25
19
  const isVisible = ref(false);
@@ -39,16 +33,16 @@ const isLogged = ref(false);
39
33
  <template>
40
34
  <div class="login-offcanvas">
41
35
  <div @click="toggle">
42
- <slot name="toggle" v-bind="{ isVisible }">
43
- <a :href="accountUrl" :title="i19myAccountAndOrders">
44
- <div :class="accountIconClass"></div>
45
- </a>
46
- </slot>
36
+ <slot name="toggle" v-bind="{ isVisible }" />
47
37
  </div>
48
38
  <ADrawer v-model="isVisible">
49
39
  <slot name="form">
50
40
  <div class="w-80">
51
- <LoginForm @login="isLogged = true" @logout="isLogged = false" />
41
+ <LoginForm @login="isLogged = true" @logout="isLogged = false">
42
+ <template #button-content>
43
+ <slot name="form-button-content" />
44
+ </template>
45
+ </LoginForm>
52
46
  </div>
53
47
  </slot>
54
48
  <slot name="nav" v-bind="{ isLogged }">
@@ -104,7 +104,9 @@ const customerName = useStore($customerName);
104
104
  </a>
105
105
  </small>
106
106
  <button type="submit">
107
- {{ isSignUp ? i19signUp : i19accessMyAccount }}
107
+ <slot name="button-content" v-bind="{ isSignUp }">
108
+ {{ isSignUp ? i19signUp : i19accessMyAccount }}
109
+ </slot>
108
110
  </button>
109
111
  <a
110
112
  href="#"
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  import type CmsCode from '@@storefront/types/cms-code';
3
3
  import type { PageContext } from '@@storefront/ssr-context';
4
- import BaseHead from './BaseHead.astro';
5
- import BaseStateJson from './BaseStateJson.astro';
6
- import BaseBody from './BaseBody.astro';
4
+ import BaseHead from '@@storefront/layouts/BaseHead.astro';
5
+ import BaseStateJson from '@@storefront/layouts/BaseStateJson.astro';
6
+ import BaseBody from '@@storefront/layouts/BaseBody.astro';
7
7
 
8
8
  export interface Props {
9
9
  pageContext: PageContext;
@@ -21,6 +21,11 @@ const {
21
21
  } = Astro.props as Props;
22
22
 
23
23
  let inlineClientJS = `
24
+ window.ECOM_STORE_ID = ${storeId};
25
+ window.ECOM_LANG = '${lang}';
26
+ window.ECOM_CURRENCY = '${currency}';
27
+ window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
28
+ window.ECOM_COUNTRY_CODE = '${countryCode}';
24
29
  window.storefront = ${JSON.stringify({
25
30
  settings: {
26
31
  ...settings,
@@ -1,5 +1,6 @@
1
1
  import type { AstroGlobal } from 'astro';
2
2
  import type { BaseConfig } from '@cloudcommerce/config';
3
+ import type { CategoriesList, BrandsList } from '@cloudcommerce/api/types';
3
4
  import type CmsSettings from './types/cms-settings';
4
5
  import api, { ApiError, ApiEndpoint } from '@cloudcommerce/api';
5
6
  import _getConfig from '../../storefront.config.mjs';
@@ -55,7 +56,11 @@ const loadPageContext = async (Astro: AstroGlobal, {
55
56
  let cmsContent: Record<string, any> | undefined;
56
57
  let apiResource: string | undefined;
57
58
  let apiDoc: Record<string, any> | undefined;
58
- const apiState: { [k: string]: Record<string, any> } = {};
59
+ const apiState: {
60
+ categories?: CategoriesList,
61
+ brands?: BrandsList,
62
+ [k: string]: Record<string, any>,
63
+ } = {};
59
64
  const apiOptions = {
60
65
  fetch,
61
66
  isNoAuth: true,
@@ -43,7 +43,7 @@ const isAuthenticated = computed(session, ({ auth }) => {
43
43
  return auth && new Date(auth.expires).getTime() - Date.now() > 1000 * 10;
44
44
  });
45
45
  const customer = computed(session, (_session) => _session.customer);
46
- const customerName = computed(customer, (_customer) => getNickname(_customer));
46
+ const customerName = computed(customer, (_customer) => getNickname(_customer) as string);
47
47
  const customerEmail = computed(customer, (_customer) => _customer.main_email);
48
48
 
49
49
  const setCustomerEmail = (email: string) => session.setKey('customer', {
@@ -1,4 +1,4 @@
1
- type CmsCode = typeof import('../../../content/code.json');
1
+ type CmsCode = typeof import('content/code.json');
2
2
 
3
3
  export default CmsCode;
4
4
 
@@ -1,4 +1,4 @@
1
- type CmsContacts = typeof import('../../../content/contacts.json');
1
+ type CmsContacts = typeof import('content/contacts.json');
2
2
 
3
3
  export default CmsContacts;
4
4
 
@@ -1,4 +1,4 @@
1
- type CmsHeader = typeof import('../../../content/header.json');
1
+ type CmsHeader = typeof import('content/header.json');
2
2
 
3
3
  export default CmsHeader;
4
4
 
@@ -1,4 +1,4 @@
1
- type CmsSettings = typeof import('../../../content/settings.json');
1
+ type CmsSettings = typeof import('content/settings.json');
2
2
 
3
3
  export default CmsSettings;
4
4
 
@@ -1,4 +1,4 @@
1
- type CmsSocial = typeof import('../../../content/social.json');
1
+ type CmsSocial = typeof import('content/social.json');
2
2
 
3
3
  export default CmsSocial;
4
4
 
@@ -1,8 +1,44 @@
1
+ // IntelliSense for UnoCSS icons
2
+ const defaultIcons = {
3
+ brandIcons: 'bxl',
4
+ brandIconsShortcuts: [
5
+ 'facebook',
6
+ 'twitter',
7
+ 'instagram',
8
+ 'linkedin',
9
+ 'youtube',
10
+ 'google',
11
+ 'pinterest',
12
+ 'tiktok',
13
+ 'telegram',
14
+ 'whatsapp',
15
+ 'messenger',
16
+ ],
17
+ brandLogos: 'logos',
18
+ brandLogosShortcuts: [
19
+ 'visa',
20
+ 'mastercard',
21
+ 'paypal',
22
+ 'apple-pay',
23
+ 'google-pay',
24
+ 'amex',
25
+ 'elo',
26
+ 'hipercard',
27
+ 'dinersclub',
28
+ ],
29
+ generalIcons: 'heroicons',
30
+ };
31
+
1
32
  const genTailwindConfig = ({
2
33
  colorVariants = [
3
34
  '50',
4
35
  ...[...Array(9).keys()].map((i) => String((i + 1) * 100)),
5
36
  ],
37
+ brandIcons = defaultIcons.brandIcons,
38
+ brandIconsShortcuts = defaultIcons.brandIconsShortcuts,
39
+ brandLogos = defaultIcons.brandLogos,
40
+ brandLogosShortcuts = defaultIcons.brandLogosShortcuts,
41
+ generalIcons = defaultIcons.generalIcons,
6
42
  } = {}) => ({
7
43
  theme: {
8
44
  extend: {
@@ -28,6 +64,10 @@ const genTailwindConfig = ({
28
64
  },
29
65
  ...colors,
30
66
  }), {}),
67
+ gray: {
68
+ DEFAULT: 'var(--gray)',
69
+ accent: 'var(--gray-accent)',
70
+ },
31
71
  },
32
72
  },
33
73
  },
@@ -65,6 +105,40 @@ const genTailwindConfig = ({
65
105
  });
66
106
  return utilities;
67
107
  }, {}),
108
+ ...[{
109
+ iconset: generalIcons,
110
+ }, {
111
+ iconset: brandIcons,
112
+ shortcuts: brandIconsShortcuts,
113
+ }, {
114
+ iconset: brandLogos,
115
+ shortcuts: brandLogosShortcuts,
116
+ }].reduce((utilities, { iconset, shortcuts }) => {
117
+ if (iconset) {
118
+ if (!shortcuts) {
119
+ // eslint-disable-next-line
120
+ const { icons } = require(`@iconify-json/${iconset}`);
121
+ shortcuts = Object.keys(icons.icons);
122
+ if (!shortcuts.includes('shopping-cart')) {
123
+ shortcuts.push('shopping-cart');
124
+ }
125
+ }
126
+ shortcuts.forEach((shortcut) => {
127
+ if (typeof shortcut === 'string') {
128
+ utilities[`.i-${shortcut}`] = {
129
+ '--iconify': iconset,
130
+ '--icon': `"${shortcut}"`,
131
+ };
132
+ } else {
133
+ utilities[`.i-${shortcut[0]}`] = {
134
+ '--iconify': iconset,
135
+ '--icon': `"${shortcut[1]}"`,
136
+ };
137
+ }
138
+ });
139
+ }
140
+ return utilities;
141
+ }, {}),
68
142
  });
69
143
  },
70
144
  ],
@@ -72,7 +146,8 @@ const genTailwindConfig = ({
72
146
 
73
147
  const tailwindConfig = genTailwindConfig();
74
148
 
75
- module.exports = { ...tailwindConfig, genTailwindConfig };
149
+ module.exports = { ...tailwindConfig, genTailwindConfig, defaultIcons };
76
150
 
77
151
  exports.genTailwindConfig = genTailwindConfig;
78
152
  exports.tailwindConfig = tailwindConfig;
153
+ exports.defaultIcons = defaultIcons;
@@ -2,10 +2,13 @@
2
2
  "extends": "astro/tsconfigs/base",
3
3
  "compilerOptions": {
4
4
  "jsx": "preserve",
5
+ "baseUrl": ".",
5
6
  "paths": {
6
7
  "@@i18n": ["./node_modules/@cloudcommerce/i18n/src/pt_br.ts"],
7
8
  "@@storefront/*": ["./src/lib/*"],
8
- "@@components/*": ["./src/lib/components/*", "./src/lib/components/*.vue"],
9
+ "@@components/*": ["./src/components/*", "./src/lib/components/*"],
10
+ "~/*": ["./src/*"],
11
+ "content/*": ["./content/*"],
9
12
  }
10
13
  }
11
14
  }
@@ -8,7 +8,7 @@ import {
8
8
  } from 'unocss';
9
9
  import presetIcons from '@unocss/preset-icons';
10
10
  import Color from 'color';
11
- import { genTailwindConfig } from './tailwind.config.cjs';
11
+ import { genTailwindConfig, defaultIcons } from './tailwind.config.cjs';
12
12
  import getCMS from './storefront.cms.mjs';
13
13
 
14
14
  const { primaryColor, secondaryColor } = getCMS();
@@ -52,7 +52,7 @@ const _preflights: Preflight[] = [{
52
52
  ${Object.entries(colorCSSVars).map(([varName, value]) => `--${varName}:${value};`).join('')}
53
53
  --content-max-width: 80rem;
54
54
  --white: #fff;
55
- --gray-50: #f9fafb;
55
+ --gray-100: #f3f4f6;
56
56
  --gray-200: #e5e7eb;
57
57
  --gray-400: #94a3b8;
58
58
  --gray-600: #4b5563;
@@ -61,7 +61,7 @@ const _preflights: Preflight[] = [{
61
61
  --gray-900: #111827;
62
62
  --gray: var(--gray-600);
63
63
  --gray-accent: var(--gray-800);
64
- --surface-color: var(--gray-50);
64
+ --surface-color: var(--gray-100);
65
65
  --surface-border-color: var(--gray-200);
66
66
  --yiq-text-light: var(--white);
67
67
  --yiq-text-dark: var(--gray-900);
@@ -86,33 +86,11 @@ const _preflights: Preflight[] = [{
86
86
 
87
87
  const genUnoCSSConfig = ({
88
88
  colorVariants = _colorVariants,
89
- brandIcons = 'bxl',
90
- brandIconsShortcuts = [
91
- 'facebook',
92
- 'twitter',
93
- 'instagram',
94
- 'linkedin',
95
- 'youtube',
96
- 'google',
97
- 'pinterest',
98
- 'tiktok',
99
- 'telegram',
100
- 'whatsapp',
101
- 'messenger',
102
- ],
103
- brandLogos = 'logos',
104
- brandLogosShortcuts = [
105
- 'visa',
106
- 'mastercard',
107
- 'paypal',
108
- 'apple-pay',
109
- 'google-pay',
110
- 'amex',
111
- 'elo',
112
- 'hipercard',
113
- 'dinersclub',
114
- ],
115
- generalIcons = 'heroicons',
89
+ brandIcons = defaultIcons.brandIcons,
90
+ brandIconsShortcuts = defaultIcons.brandIconsShortcuts,
91
+ brandLogos = defaultIcons.brandLogos,
92
+ brandLogosShortcuts = defaultIcons.brandLogosShortcuts,
93
+ generalIcons = defaultIcons.generalIcons,
116
94
  shoppingCartIcon = 'shopping-bag',
117
95
  preflights = _preflights,
118
96
  }: {
@@ -131,7 +109,10 @@ const genUnoCSSConfig = ({
131
109
  plugin({
132
110
  addUtilities: (utilities: Record<string, { [k: string]: string | number }>) => {
133
111
  Object.keys(utilities).forEach((selector) => {
134
- rules.push([selector.replace('.', ''), utilities[selector]]);
112
+ // Skip icons selectors added on tailwind.config.cjs only for IntelliSense
113
+ if (!selector.startsWith('.i-')) {
114
+ rules.push([selector.replace('.', ''), utilities[selector]]);
115
+ }
135
116
  });
136
117
  },
137
118
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/types",
3
3
  "type": "module",
4
- "version": "0.0.115",
4
+ "version": "0.0.117",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {
package/turbo.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "$schema": "https://turborepo.org/schema.json",
3
- "baseBranch": "origin/main",
4
3
  "pipeline": {
5
4
  "build": {
6
5
  "dependsOn": [