cloudcommerce 0.6.3 → 0.6.5

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 (81) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/action.yml +57 -1
  3. package/package.json +1 -1
  4. package/packages/api/lib/types/carts.d.ts +72 -20
  5. package/packages/api/lib/types/orders.d.ts +72 -20
  6. package/packages/api/lib/types/products.d.ts +82 -11
  7. package/packages/api/package.json +1 -1
  8. package/packages/api/src/types/carts.d.ts +72 -20
  9. package/packages/api/src/types/orders.d.ts +72 -20
  10. package/packages/api/src/types/products.d.ts +82 -11
  11. package/packages/apps/correios/package.json +1 -1
  12. package/packages/apps/custom-payment/package.json +1 -1
  13. package/packages/apps/custom-shipping/package.json +1 -1
  14. package/packages/apps/datafrete/package.json +1 -1
  15. package/packages/apps/discounts/package.json +1 -1
  16. package/packages/apps/emails/package.json +1 -1
  17. package/packages/apps/fb-conversions/package.json +1 -1
  18. package/packages/apps/frenet/package.json +1 -1
  19. package/packages/apps/galaxpay/package.json +1 -1
  20. package/packages/apps/google-analytics/package.json +1 -1
  21. package/packages/apps/infinitepay/package.json +1 -1
  22. package/packages/apps/jadlog/package.json +1 -1
  23. package/packages/apps/loyalty-points/package.json +1 -1
  24. package/packages/apps/melhor-envio/package.json +1 -1
  25. package/packages/apps/mercadopago/package.json +1 -1
  26. package/packages/apps/pagarme/package.json +1 -1
  27. package/packages/apps/paghiper/package.json +1 -1
  28. package/packages/apps/pix/package.json +1 -1
  29. package/packages/apps/tiny-erp/package.json +1 -1
  30. package/packages/apps/webhooks/package.json +1 -1
  31. package/packages/cli/lib/cli.js +1 -1
  32. package/packages/cli/package.json +1 -1
  33. package/packages/cli/src/cli.ts +1 -1
  34. package/packages/config/package.json +1 -1
  35. package/packages/emails/package.json +1 -1
  36. package/packages/events/package.json +1 -1
  37. package/packages/firebase/lib/config.d.ts +1 -1
  38. package/packages/firebase/lib/config.js +1 -1
  39. package/packages/firebase/lib/config.js.map +1 -1
  40. package/packages/firebase/package.json +1 -1
  41. package/packages/firebase/src/config.ts +1 -1
  42. package/packages/i18n/package.json +1 -1
  43. package/packages/modules/package.json +1 -1
  44. package/packages/passport/package.json +1 -1
  45. package/packages/ssr/lib/firebase/serve-storefront.js +3 -2
  46. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  47. package/packages/ssr/package.json +1 -1
  48. package/packages/ssr/src/firebase/serve-storefront.ts +3 -2
  49. package/packages/storefront/dist/client/_astro/PitchBar.96fed383.js +1 -0
  50. package/packages/storefront/dist/client/_astro/{Prices.2bd87845.js → Prices.036ad2b4.js} +1 -1
  51. package/packages/storefront/dist/client/_astro/{ProductCard.48f0f5ba.js → ProductCard.69751e12.js} +1 -1
  52. package/packages/storefront/dist/client/_astro/ShopHeader.4a8ce417.js +4 -0
  53. package/packages/storefront/dist/client/_astro/{_...slug_.a594715c.css → _...slug_.25a09a96.css} +1 -1
  54. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.be244611.js +1 -0
  55. package/packages/storefront/dist/client/_astro/client.bc16bf93.js +1 -0
  56. package/packages/storefront/dist/client/_astro/{format-money.060d67ef.js → format-money.e57ae2ab.js} +1 -1
  57. package/packages/storefront/dist/client/_astro/index.248ccd97.js +1 -0
  58. package/packages/storefront/dist/client/_astro/{modules-info.01f8d523.js → modules-info.8540ba60.js} +1 -1
  59. package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.be3a98cd.js +1 -0
  60. package/packages/storefront/dist/client/_astro/server.1bc2fa51.css +1 -0
  61. package/packages/storefront/dist/client/sw.js +1 -1
  62. package/packages/storefront/dist/server/chunks/pages/{all.f15e2c35.mjs → all.9ad006f8.mjs} +125 -59
  63. package/packages/storefront/dist/server/entry.mjs +70 -36
  64. package/packages/storefront/package.json +2 -2
  65. package/packages/storefront/src/lib/components/Carousel.vue +11 -26
  66. package/packages/storefront/src/lib/components/CarouselControl.vue +5 -1
  67. package/packages/storefront/src/lib/components/globals/AImg.vue +55 -0
  68. package/packages/storefront/src/lib/components/globals/Fade.vue +23 -18
  69. package/packages/storefront/src/lib/layouts/BaseHead.astro +3 -1
  70. package/packages/storefront/src/lib/pages/_vue.ts +2 -0
  71. package/packages/storefront/src/vue-globals.d.ts +1 -0
  72. package/packages/types/package.json +1 -1
  73. package/packages/storefront/dist/client/_astro/PitchBar.5ced676e.js +0 -1
  74. package/packages/storefront/dist/client/_astro/ShopHeader.05d64cc8.js +0 -4
  75. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.43eaff51.js +0 -1
  76. package/packages/storefront/dist/client/_astro/client.79615b8a.js +0 -1
  77. package/packages/storefront/dist/client/_astro/index.3243538d.js +0 -1
  78. package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.cb4db78a.js +0 -1
  79. package/packages/storefront/dist/client/_astro/server.60de185d.css +0 -1
  80. package/packages/storefront/dist/client/fallback/index.html +0 -79
  81. package/packages/storefront/dist/server/chunks/prerender.2527d85d.mjs +0 -2
@@ -1 +1 @@
1
- if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let l={};const a=e=>r(e,o),u={module:{uri:o},exports:l,require:a};s[o]=Promise.all(n.map((e=>u[e]||a(e)))).then((e=>(i(...e),l)))}}define(["./workbox-e2ee76b5"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.a594715c.css",revision:null},{url:"_astro/_plugin-vue_export-helper.43eaff51.js",revision:null},{url:"_astro/client.79615b8a.js",revision:null},{url:"_astro/firebase-app.7ce2ebb1.js",revision:null},{url:"_astro/format-money.060d67ef.js",revision:null},{url:"_astro/hoisted.721ad75d.js",revision:null},{url:"_astro/idle-callback.889bf0ea.js",revision:null},{url:"_astro/index.0c833781.css",revision:null},{url:"_astro/index.3243538d.js",revision:null},{url:"_astro/modules-info.01f8d523.js",revision:null},{url:"_astro/PitchBar.5ced676e.js",revision:null},{url:"_astro/preload-helper.101896b7.js",revision:null},{url:"_astro/Prices.2bd87845.js",revision:null},{url:"_astro/ProductCard.48f0f5ba.js",revision:null},{url:"_astro/runtime-dom.esm-bundler.cb4db78a.js",revision:null},{url:"_astro/server.60de185d.css",revision:null},{url:"_astro/session-utm.72684b84.js",revision:null},{url:"_astro/ShopHeader.05d64cc8.js",revision:null},{url:"_astro/workbox-window.prod.es5.295a6886.js",revision:null},{url:"img/uploads/large-icon.png",revision:"0b35db516cfa7475b1c2f8c081e8d54d"},{url:"manifest.webmanifest",revision:"6a858866b0560997f368e27ab5418e15"}],{ignoreURLParametersMatching:[/.*/]}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/404"))),e.registerRoute(/^\/$/,new e.NetworkFirst,"GET"),e.registerRoute(/\/((?!(?:admin|assets|img)(\/|$))[^.]+)(\.(?!js|css|xml|txt|png|jpg|jpeg|webp|avif|svg|gif)[^.]+)*$/,new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/assets\//,new e.StaleWhileRevalidate({cacheName:"assets",plugins:[]}),"GET"),e.registerRoute(/^\/_image$/,new e.StaleWhileRevalidate({cacheName:"sharp-images",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/img\/uploads\/.*\.(?:png|jpg|jpeg|webp|avif|svg|gif)$/,new e.StaleWhileRevalidate({cacheName:"cms-images",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/ecomplus\.io/,new e.NetworkFirst({cacheName:"store-api",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/normal\//,new e.CacheFirst({cacheName:"product-thumbnails",plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/big\//,new e.CacheFirst({cacheName:"product-pictures",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET")}));
1
+ if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let a={};const l=e=>r(e,o),u={module:{uri:o},exports:a,require:l};s[o]=Promise.all(n.map((e=>u[e]||l(e)))).then((e=>(i(...e),a)))}}define(["./workbox-e2ee76b5"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.25a09a96.css",revision:null},{url:"_astro/_plugin-vue_export-helper.be244611.js",revision:null},{url:"_astro/client.bc16bf93.js",revision:null},{url:"_astro/firebase-app.7ce2ebb1.js",revision:null},{url:"_astro/format-money.e57ae2ab.js",revision:null},{url:"_astro/hoisted.721ad75d.js",revision:null},{url:"_astro/idle-callback.889bf0ea.js",revision:null},{url:"_astro/index.0c833781.css",revision:null},{url:"_astro/index.248ccd97.js",revision:null},{url:"_astro/modules-info.8540ba60.js",revision:null},{url:"_astro/PitchBar.96fed383.js",revision:null},{url:"_astro/preload-helper.101896b7.js",revision:null},{url:"_astro/Prices.036ad2b4.js",revision:null},{url:"_astro/ProductCard.69751e12.js",revision:null},{url:"_astro/runtime-dom.esm-bundler.be3a98cd.js",revision:null},{url:"_astro/server.1bc2fa51.css",revision:null},{url:"_astro/session-utm.72684b84.js",revision:null},{url:"_astro/ShopHeader.4a8ce417.js",revision:null},{url:"_astro/workbox-window.prod.es5.295a6886.js",revision:null},{url:"img/uploads/large-icon.png",revision:"0b35db516cfa7475b1c2f8c081e8d54d"},{url:"manifest.webmanifest",revision:"6a858866b0560997f368e27ab5418e15"}],{ignoreURLParametersMatching:[/.*/]}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/404"))),e.registerRoute(/^\/$/,new e.NetworkFirst,"GET"),e.registerRoute(/\/((?!(?:admin|assets|img)(\/|$))[^.]+)(\.(?!js|css|xml|txt|png|jpg|jpeg|webp|avif|svg|gif)[^.]+)*$/,new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/assets\//,new e.StaleWhileRevalidate({cacheName:"assets",plugins:[]}),"GET"),e.registerRoute(/^\/_image$/,new e.StaleWhileRevalidate({cacheName:"sharp-images",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/img\/uploads\/.*\.(?:png|jpg|jpeg|webp|avif|svg|gif)$/,new e.StaleWhileRevalidate({cacheName:"cms-images",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/ecomplus\.io/,new e.NetworkFirst({cacheName:"store-api",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/normal\//,new e.CacheFirst({cacheName:"product-thumbnails",plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/big\//,new e.CacheFirst({cacheName:"product-pictures",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET")}));
@@ -709,9 +709,9 @@ const getImage = async (options) => {
709
709
  return imgAttrs;
710
710
  };
711
711
 
712
- const $$Astro$g = createAstro("https://ecom2-002.web.app");
712
+ const $$Astro$i = createAstro("https://ecom2-002.web.app");
713
713
  const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
714
- const Astro2 = $$result.createAstro($$Astro$g, $$props, $$slots);
714
+ const Astro2 = $$result.createAstro($$Astro$i, $$props, $$slots);
715
715
  Astro2.self = $$BaseHead;
716
716
  const {
717
717
  storeId,
@@ -771,17 +771,18 @@ ${cmsMetatags?.fb_app_id && renderTemplate`<meta property="fb:app_id"${addAttrib
771
771
  <meta name="twitter:card" content="summary">
772
772
  ${cmsMetatags?.twitter_username && renderTemplate`<meta name="twitter:site"${addAttribute(cmsMetatags.twitter_username, "content")}>`}
773
773
  <meta name="ecom-store-id"${addAttribute(String(storeId), "content")}>
774
+
774
775
  ${pwaInfo }
775
- `;
776
+ ${renderTemplate`<link rel="manifest" href="/manifest.webmanifest">`}`;
776
777
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro");
777
778
 
778
779
  var __freeze$1 = Object.freeze;
779
780
  var __defProp$1 = Object.defineProperty;
780
781
  var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
781
782
  var _a$1;
782
- const $$Astro$f = createAstro("https://ecom2-002.web.app");
783
+ const $$Astro$h = createAstro("https://ecom2-002.web.app");
783
784
  const $$BaseStateJson = createComponent(async ($$result, $$props, $$slots) => {
784
- const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
785
+ const Astro2 = $$result.createAstro($$Astro$h, $$props, $$slots);
785
786
  Astro2.self = $$BaseStateJson;
786
787
  const {
787
788
  pageContext: {
@@ -841,9 +842,9 @@ window.storefront.context = ${JSON.stringify({
841
842
  return renderTemplate(_a$1 || (_a$1 = __template$1(["<script>", '<\/script>\n<script type="application/ld+json">', "<\/script>"])), unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd));
842
843
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseStateJson.astro");
843
844
 
844
- const $$Astro$e = createAstro("https://ecom2-002.web.app");
845
+ const $$Astro$g = createAstro("https://ecom2-002.web.app");
845
846
  const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
846
- const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
847
+ const Astro2 = $$result.createAstro($$Astro$g, $$props, $$slots);
847
848
  Astro2.self = $$BaseBody;
848
849
  return renderTemplate`${maybeRenderHead($$result)}<body>
849
850
  <div id="teleported-overlap" class="relative z-50"></div>
@@ -854,9 +855,9 @@ const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
854
855
  </body>`;
855
856
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro");
856
857
 
857
- const $$Astro$d = createAstro("https://ecom2-002.web.app");
858
+ const $$Astro$f = createAstro("https://ecom2-002.web.app");
858
859
  const $$Base$1 = createComponent(async ($$result, $$props, $$slots) => {
859
- const Astro2 = $$result.createAstro($$Astro$d, $$props, $$slots);
860
+ const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
860
861
  Astro2.self = $$Base$1;
861
862
  const { pageContext, title } = Astro2.props;
862
863
  const { cms } = pageContext;
@@ -876,24 +877,24 @@ var __freeze = Object.freeze;
876
877
  var __defProp = Object.defineProperty;
877
878
  var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
878
879
  var _a;
879
- const $$Astro$c = createAstro("https://ecom2-002.web.app");
880
+ const $$Astro$e = createAstro("https://ecom2-002.web.app");
880
881
  const $$InlineScripts = createComponent(async ($$result, $$props, $$slots) => {
881
- const Astro2 = $$result.createAstro($$Astro$c, $$props, $$slots);
882
+ const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
882
883
  Astro2.self = $$InlineScripts;
883
884
  return renderTemplate(_a || (_a = __template(["<script>\n window.firebaseConfig = {\n apiKey: 'AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0',\n authDomain: 'ecom2-002.firebaseapp.com',\n projectId: 'ecom2-002',\n storageBucket: 'ecom2-002.appspot.com',\n messagingSenderId: '402807248219',\n appId: '1:402807248219:web:cf7d57759751e74776367e',\n measurementId: 'G-SC592CE0GB',\n };\n<\/script>"])));
884
885
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro");
885
886
 
886
- const $$Astro$b = createAstro("https://ecom2-002.web.app");
887
+ const $$Astro$d = createAstro("https://ecom2-002.web.app");
887
888
  const $$Base = createComponent(async ($$result, $$props, $$slots) => {
888
- const Astro2 = $$result.createAstro($$Astro$b, $$props, $$slots);
889
+ const Astro2 = $$result.createAstro($$Astro$d, $$props, $$slots);
889
890
  Astro2.self = $$Base;
890
891
  const { pageContext, title } = Astro2.props;
891
892
  return renderTemplate`${renderComponent($$result, "Base", $$Base$1, { "pageContext": pageContext, "title": title }, { "before-head-end": ($$result2) => renderTemplate`${renderComponent($$result2, "InlineScripts", $$InlineScripts, { "slot": "before-head-end" })}`, "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["default"])}` })}`;
892
893
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro");
893
894
 
894
- const $$Astro$a = createAstro("https://ecom2-002.web.app");
895
+ const $$Astro$c = createAstro("https://ecom2-002.web.app");
895
896
  const $$Image = createComponent(async ($$result, $$props, $$slots) => {
896
- const Astro2 = $$result.createAstro($$Astro$a, $$props, $$slots);
897
+ const Astro2 = $$result.createAstro($$Astro$c, $$props, $$slots);
897
898
  Astro2.self = $$Image;
898
899
  const { loading = "lazy", decoding = "async", ...props } = Astro2.props;
899
900
  if (props.alt === void 0 || props.alt === null) {
@@ -903,9 +904,9 @@ const $$Image = createComponent(async ($$result, $$props, $$slots) => {
903
904
  return renderTemplate`${maybeRenderHead($$result)}<img${spreadAttributes(attrs)}${addAttribute(loading, "loading")}${addAttribute(decoding, "decoding")}>`;
904
905
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Image.astro");
905
906
 
906
- const $$Astro$9 = createAstro("https://ecom2-002.web.app");
907
+ const $$Astro$b = createAstro("https://ecom2-002.web.app");
907
908
  const $$Picture$1 = createComponent(async ($$result, $$props, $$slots) => {
908
- const Astro2 = $$result.createAstro($$Astro$9, $$props, $$slots);
909
+ const Astro2 = $$result.createAstro($$Astro$b, $$props, $$slots);
909
910
  Astro2.self = $$Picture$1;
910
911
  const {
911
912
  src,
@@ -957,9 +958,9 @@ The "alt" attribute holds a text description of the image, which isn't mandatory
957
958
  `);
958
959
  }
959
960
 
960
- const $$Astro$8 = createAstro("https://ecom2-002.web.app");
961
+ const $$Astro$a = createAstro("https://ecom2-002.web.app");
961
962
  const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
962
- const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
963
+ const Astro2 = $$result.createAstro($$Astro$a, $$props, $$slots);
963
964
  Astro2.self = $$Picture;
964
965
  const props = Astro2.props;
965
966
  if (!props.aspectRatio && typeof props.src === "string") {
@@ -1078,10 +1079,11 @@ function _sfc_ssrRender$c(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1078
1079
  _push(`<button${ssrRenderAttrs(mergeProps({
1079
1080
  type: "button",
1080
1081
  "aria-label": $props.direction > 0 ? "Pr\xF3ximo" : "Anterior",
1082
+ class: ["group absolute top-0", $props.direction > 0 ? "right-0" : "left-0"],
1081
1083
  "data-carousel-control": $props.direction > 0 ? "next" : "previous"
1082
1084
  }, _attrs))}>`);
1083
1085
  ssrRenderSlot(_ctx.$slots, "default", {}, () => {
1084
- _push(`<i class="${ssrRenderClass([$props.direction > 0 ? "i-chevron-right" : "i-chevron-left", "m-0"])}"></i>`);
1086
+ _push(`<i class="${ssrRenderClass([$props.direction > 0 ? "i-chevron-right group-active:translate-x-1" : "i-chevron-left group-active:-translate-x-1", "m-0"])}"></i>`);
1085
1087
  }, _push, _parent);
1086
1088
  _push(`</button>`);
1087
1089
  }
@@ -1208,7 +1210,10 @@ const _sfc_main$b = defineComponent({
1208
1210
  calcCurrentIndex();
1209
1211
  calcIndexCount();
1210
1212
  };
1211
- const onResize = useDebounceFn(calcOnInit, 400);
1213
+ const onResize = useDebounceFn(() => {
1214
+ wrapper.value.scrollLeft = 0;
1215
+ calcOnInit();
1216
+ }, 400);
1212
1217
  onMounted(() => {
1213
1218
  calcOnInit();
1214
1219
  });
@@ -1233,10 +1238,12 @@ const _sfc_main$b = defineComponent({
1233
1238
  function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1234
1239
  _push(`<div${ssrRenderAttrs(mergeProps({
1235
1240
  ref: "carousel",
1241
+ class: "relative",
1236
1242
  "data-carousel": ""
1237
1243
  }, _attrs))}>`);
1238
1244
  ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), {
1239
1245
  ref: "wrapper",
1246
+ class: "flex overflow-x-scroll overflow-y-hidden list-none m-0 p-0",
1240
1247
  "data-carousel-wrapper": ""
1241
1248
  }, {
1242
1249
  default: withCtx((_, _push2, _parent2, _scopeId) => {
@@ -1341,7 +1348,7 @@ function _sfc_ssrRender$a(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1341
1348
  if (_push2) {
1342
1349
  _push2(`<!--[-->`);
1343
1350
  ssrRenderList($props.slides, (slide, i) => {
1344
- _push2(`<li${_scopeId}>`);
1351
+ _push2(`<li class="shrink-0 basis-full h-full text-center"${_scopeId}>`);
1345
1352
  ssrRenderVNode(_push2, createVNode(resolveDynamicComponent(slide.href ? "ALink" : "span"), {
1346
1353
  href: slide.href,
1347
1354
  target: slide.target,
@@ -1372,7 +1379,10 @@ function _sfc_ssrRender$a(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1372
1379
  } else {
1373
1380
  return [
1374
1381
  (openBlock(true), createBlock(Fragment$1, null, renderList($props.slides, (slide, i) => {
1375
- return openBlock(), createBlock("li", { key: i }, [
1382
+ return openBlock(), createBlock("li", {
1383
+ key: i,
1384
+ class: "shrink-0 basis-full h-full text-center"
1385
+ }, [
1376
1386
  (openBlock(), createBlock(resolveDynamicComponent(slide.href ? "ALink" : "span"), {
1377
1387
  href: slide.href,
1378
1388
  target: slide.target,
@@ -1917,12 +1927,16 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1917
1927
  }
1918
1928
  });
1919
1929
  function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1930
+ const _component_AImg = resolveComponent("AImg");
1920
1931
  const _component_ShopSidenavCategory = resolveComponent("ShopSidenavCategory", true);
1921
1932
  _push(`<li${ssrRenderAttrs(mergeProps({ class: "text-lg text-base-800" }, _attrs))}>`);
1922
1933
  if ($props.categoryTree.subcategories.length) {
1923
1934
  _push(`<details class="bg-white overflow-y-auto overflow-x-hidden z-10 open:absolute open:top-0 open:left-0 open:w-full open:h-full"><summary class="${ssrRenderClass([$setup.isOpen ? "bg-base-100" : null, "cursor-pointer list-none px-6 py-3 active:bg-base-100 transition-colors"])}"><i class="${ssrRenderClass(!$setup.isOpen ? "i-arrow-right float-right mb-0 mt-1 text-xl text-base-500" : "i-arrow-left text-lg")}"></i>`);
1924
1935
  if (!$setup.isOpen && $props.categoryTree.icon) {
1925
- _push(`<img loading="lazy"${ssrRenderAttr("src", $props.categoryTree.icon.url)}${ssrRenderAttr("alt", $props.categoryTree.icon.alt)} class="w-auto h-5 inline mr-3">`);
1936
+ _push(ssrRenderComponent(_component_AImg, {
1937
+ picture: $props.categoryTree.icon,
1938
+ class: "w-auto h-5 inline mr-3"
1939
+ }, null, _parent));
1926
1940
  } else {
1927
1941
  _push(`<!---->`);
1928
1942
  }
@@ -1937,7 +1951,10 @@ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1937
1951
  } else {
1938
1952
  _push(`<a${ssrRenderAttr("href", `/${$props.categoryTree.slug}`)} class="block px-6 py-3 active:bg-base-200">`);
1939
1953
  if (!$setup.isOpen && $props.categoryTree.icon) {
1940
- _push(`<img loading="lazy"${ssrRenderAttr("src", $props.categoryTree.icon.url)} class="w-auto h-5 inline mr-3">`);
1954
+ _push(ssrRenderComponent(_component_AImg, {
1955
+ picture: $props.categoryTree.icon,
1956
+ class: "w-auto h-5 inline mr-3"
1957
+ }, null, _parent));
1941
1958
  } else {
1942
1959
  _push(`<!---->`);
1943
1960
  }
@@ -2072,6 +2089,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2072
2089
  });
2073
2090
  function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2074
2091
  const _component_Fade = resolveComponent("Fade");
2092
+ const _component_AImg = resolveComponent("AImg");
2075
2093
  _push(ssrRenderComponent($setup["Popover"], _attrs, {
2076
2094
  default: withCtx(({ open }, _push2, _parent2, _scopeId) => {
2077
2095
  if (_push2) {
@@ -2116,7 +2134,12 @@ function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2116
2134
  });
2117
2135
  _push4(`<!--]-->`);
2118
2136
  if ($setup.categoryPicture) {
2119
- _push4(`<div class="${ssrRenderClass($setup.countMenuCols === 2 ? "basis-1/2" : $setup.countMenuCols < 5 ? "basis-2/5" : "basis-1/3")}"${_scopeId3}><img loading="lazy"${ssrRenderAttr("src", $setup.categoryPicture.url)}${ssrRenderAttr("alt", $setup.categoryPicture.alt || $props.categoryTree.name)} class="ml-auto rounded"${_scopeId3}></div>`);
2137
+ _push4(`<div class="${ssrRenderClass($setup.countMenuCols === 2 ? "basis-1/2" : $setup.countMenuCols < 5 ? "basis-2/5" : "basis-1/3")}"${_scopeId3}>`);
2138
+ _push4(ssrRenderComponent(_component_AImg, {
2139
+ picture: $setup.categoryPicture,
2140
+ class: "ml-auto rounded"
2141
+ }, null, _parent4, _scopeId3));
2142
+ _push4(`</div>`);
2120
2143
  } else {
2121
2144
  _push4(`<!---->`);
2122
2145
  }
@@ -2174,12 +2197,10 @@ function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2174
2197
  key: 1,
2175
2198
  class: $setup.countMenuCols === 2 ? "basis-1/2" : $setup.countMenuCols < 5 ? "basis-2/5" : "basis-1/3"
2176
2199
  }, [
2177
- createVNode("img", {
2178
- loading: "lazy",
2179
- src: $setup.categoryPicture.url,
2180
- alt: $setup.categoryPicture.alt || $props.categoryTree.name,
2200
+ createVNode(_component_AImg, {
2201
+ picture: $setup.categoryPicture,
2181
2202
  class: "ml-auto rounded"
2182
- }, null, 8, ["src", "alt"])
2203
+ }, null, 8, ["picture"])
2183
2204
  ], 2)) : createCommentVNode("", true)
2184
2205
  ]),
2185
2206
  createVNode("a", {
@@ -2248,12 +2269,10 @@ function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2248
2269
  key: 1,
2249
2270
  class: $setup.countMenuCols === 2 ? "basis-1/2" : $setup.countMenuCols < 5 ? "basis-2/5" : "basis-1/3"
2250
2271
  }, [
2251
- createVNode("img", {
2252
- loading: "lazy",
2253
- src: $setup.categoryPicture.url,
2254
- alt: $setup.categoryPicture.alt || $props.categoryTree.name,
2272
+ createVNode(_component_AImg, {
2273
+ picture: $setup.categoryPicture,
2255
2274
  class: "ml-auto rounded"
2256
- }, null, 8, ["src", "alt"])
2275
+ }, null, 8, ["picture"])
2257
2276
  ], 2)) : createCommentVNode("", true)
2258
2277
  ]),
2259
2278
  createVNode("a", {
@@ -2335,12 +2354,10 @@ function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2335
2354
  key: 1,
2336
2355
  class: $setup.countMenuCols === 2 ? "basis-1/2" : $setup.countMenuCols < 5 ? "basis-2/5" : "basis-1/3"
2337
2356
  }, [
2338
- createVNode("img", {
2339
- loading: "lazy",
2340
- src: $setup.categoryPicture.url,
2341
- alt: $setup.categoryPicture.alt || $props.categoryTree.name,
2357
+ createVNode(_component_AImg, {
2358
+ picture: $setup.categoryPicture,
2342
2359
  class: "ml-auto rounded"
2343
- }, null, 8, ["src", "alt"])
2360
+ }, null, 8, ["picture"])
2344
2361
  ], 2)) : createCommentVNode("", true)
2345
2362
  ]),
2346
2363
  createVNode("a", {
@@ -2375,7 +2392,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2375
2392
  },
2376
2393
  setup(__props, { expose }) {
2377
2394
  expose();
2378
- const __returned__ = { ShopHeaderSubmenu };
2395
+ const props = __props;
2396
+ const hasOneLevelSubcategories = computed(() => {
2397
+ return !!props.inlineMenuTrees.find(({ subcategories }) => !subcategories.length);
2398
+ });
2399
+ const __returned__ = { props, hasOneLevelSubcategories, ShopHeaderSubmenu };
2379
2400
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2380
2401
  return __returned__;
2381
2402
  }
@@ -2391,7 +2412,13 @@ function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2391
2412
  _push2(`<span class="hover:text-primary group"${_scopeId}><h3 class="${ssrRenderClass([[
2392
2413
  $props.inlineMenuTrees.length < 7 ? "decoration-2" : null,
2393
2414
  open ? "underline" : null
2394
- ], "group-hover:underline inline"])}"${_scopeId}>${ssrInterpolate(categoryTree.name)}</h3><i class="${ssrRenderClass([open ? "i-chevron-up" : "i-chevron-down", "text-base-400 group-hover:text-primary-subtle ml-1"])}"${_scopeId}></i></span>`);
2415
+ ], "group-hover:underline inline"])}"${_scopeId}>${ssrInterpolate(categoryTree.name)}</h3>`);
2416
+ if ($setup.hasOneLevelSubcategories) {
2417
+ _push2(`<i class="${ssrRenderClass([open ? "rotate-180" : null, "i-chevron-down ml-1 transition-transform text-base-400 group-hover:text-primary-subtle"])}"${_scopeId}></i>`);
2418
+ } else {
2419
+ _push2(`<!---->`);
2420
+ }
2421
+ _push2(`</span>`);
2395
2422
  } else {
2396
2423
  return [
2397
2424
  createVNode("span", { class: "hover:text-primary group" }, [
@@ -2401,9 +2428,10 @@ function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2401
2428
  open ? "underline" : null
2402
2429
  ]]
2403
2430
  }, toDisplayString(categoryTree.name), 3),
2404
- createVNode("i", {
2405
- class: ["text-base-400 group-hover:text-primary-subtle ml-1", open ? "i-chevron-up" : "i-chevron-down"]
2406
- }, null, 2)
2431
+ $setup.hasOneLevelSubcategories ? (openBlock(), createBlock("i", {
2432
+ key: 0,
2433
+ class: ["i-chevron-down ml-1 transition-transform text-base-400 group-hover:text-primary-subtle", open ? "rotate-180" : null]
2434
+ }, null, 2)) : createCommentVNode("", true)
2407
2435
  ])
2408
2436
  ];
2409
2437
  }
@@ -2465,7 +2493,7 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2465
2493
  "onUpdate:modelValue": ($event) => $setup.isSidenavOpen = $event,
2466
2494
  "has-close-button": false,
2467
2495
  position: "absolute",
2468
- class: "mt-3 -z-1",
2496
+ class: ["-z-1", $setup.isSticky ? "mt-2 md:mt-3" : "mt-3 sm:mt-4 md:mt-5"],
2469
2497
  style: { height: `calc(100vh - ${$setup.positionY}px + .5rem)` }
2470
2498
  }, {
2471
2499
  default: withCtx((_, _push2, _parent2, _scopeId) => {
@@ -2489,9 +2517,9 @@ _sfc_main$2.setup = (props, ctx) => {
2489
2517
  };
2490
2518
  const ShopHeader = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$2]]);
2491
2519
 
2492
- const $$Astro$7 = createAstro("https://ecom2-002.web.app");
2520
+ const $$Astro$9 = createAstro("https://ecom2-002.web.app");
2493
2521
  const $$PagesHeader = createComponent(async ($$result, $$props, $$slots) => {
2494
- const Astro2 = $$result.createAstro($$Astro$7, $$props, $$slots);
2522
+ const Astro2 = $$result.createAstro($$Astro$9, $$props, $$slots);
2495
2523
  Astro2.self = $$PagesHeader;
2496
2524
  const {
2497
2525
  pageContext: {
@@ -2524,14 +2552,14 @@ const $$PagesHeader = createComponent(async ($$result, $$props, $$slots) => {
2524
2552
  `)}` })}`;
2525
2553
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/PagesHeader.astro");
2526
2554
 
2527
- const $$Astro$6 = createAstro("https://ecom2-002.web.app");
2555
+ const $$Astro$8 = createAstro("https://ecom2-002.web.app");
2528
2556
  const $$Pages = createComponent(async ($$result, $$props, $$slots) => {
2529
- const Astro2 = $$result.createAstro($$Astro$6, $$props, $$slots);
2557
+ const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
2530
2558
  Astro2.self = $$Pages;
2531
2559
  const { pageContext, title } = Astro2.props;
2532
2560
  const { settings } = pageContext;
2533
2561
  return renderTemplate`${renderComponent($$result, "Base", $$Base, { "pageContext": pageContext, "title": title }, { "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["header"], renderTemplate`
2534
- ${renderComponent($$result2, "Header", $$PagesHeader, { "pageContext": pageContext }, { "logo-picture": ($$result3) => renderTemplate`${renderComponent($$result3, "Picture", $$Picture, { "slot": "logo-picture", "src": settings.logo, "alt": settings.name, "widths": [300], "sizes": "150px", "fetchpriority": "high", "class": "hover:drop-shadow-sm" })}` })}
2562
+ ${renderComponent($$result2, "Header", $$PagesHeader, { "pageContext": pageContext }, { "logo-picture": ($$result3) => renderTemplate`${renderComponent($$result3, "Picture", $$Picture, { "slot": "logo-picture", "src": settings.logo, "alt": settings.name, "widths": [300], "sizes": "150px", "fetchpriority": "high", "loading": "eager", "class": "hover:drop-shadow-sm" })}` })}
2535
2563
  `)}${renderSlot($$result2, $$slots["default"])}` })}`;
2536
2564
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Pages.astro");
2537
2565
 
@@ -2984,9 +3012,9 @@ _sfc_main.setup = (props, ctx) => {
2984
3012
  };
2985
3013
  const ProductCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
2986
3014
 
2987
- const $$Astro$5 = createAstro("https://ecom2-002.web.app");
3015
+ const $$Astro$7 = createAstro("https://ecom2-002.web.app");
2988
3016
  const $$Home = createComponent(async ($$result, $$props, $$slots) => {
2989
- const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
3017
+ const Astro2 = $$result.createAstro($$Astro$7, $$props, $$slots);
2990
3018
  Astro2.self = $$Home;
2991
3019
  const products = (await api.get("products")).data.result;
2992
3020
  return renderTemplate`${maybeRenderHead($$result)}<main>
@@ -3034,9 +3062,9 @@ const $$Home = createComponent(async ($$result, $$props, $$slots) => {
3034
3062
  </main>`;
3035
3063
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Home.astro");
3036
3064
 
3037
- const $$Astro$4 = createAstro("https://ecom2-002.web.app");
3065
+ const $$Astro$6 = createAstro("https://ecom2-002.web.app");
3038
3066
  const $$Index$1 = createComponent(async ($$result, $$props, $$slots) => {
3039
- const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
3067
+ const Astro2 = $$result.createAstro($$Astro$6, $$props, $$slots);
3040
3068
  Astro2.self = $$Index$1;
3041
3069
  let pageContext;
3042
3070
  let loadError;
@@ -3054,12 +3082,50 @@ ${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment,
3054
3082
  </html>`;
3055
3083
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro");
3056
3084
 
3057
- const $$file$3 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro";
3058
- const $$url$3 = "";
3085
+ const $$file$4 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro";
3086
+ const $$url$4 = "";
3059
3087
 
3060
3088
  const _page1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
3061
3089
  __proto__: null,
3062
3090
  default: $$Index$1,
3091
+ file: $$file$4,
3092
+ url: $$url$4
3093
+ }, Symbol.toStringTag, { value: 'Module' }));
3094
+
3095
+ const $$Astro$5 = createAstro("https://ecom2-002.web.app");
3096
+ const $$Fallback$1 = createComponent(async ($$result, $$props, $$slots) => {
3097
+ const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
3098
+ Astro2.self = $$Fallback$1;
3099
+ return renderTemplate`${maybeRenderHead($$result)}<main>
3100
+ <h1>Error :/</h1>
3101
+ <p class="instructions">
3102
+ Check out the <code>src/pages</code> directory to get started.<br>
3103
+ <strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
3104
+ </p>
3105
+ </main>`;
3106
+ }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Fallback.astro");
3107
+
3108
+ const $$Astro$4 = createAstro("https://ecom2-002.web.app");
3109
+ const $$Fallback = createComponent(async ($$result, $$props, $$slots) => {
3110
+ const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
3111
+ Astro2.self = $$Fallback;
3112
+ let pageContext;
3113
+ try {
3114
+ pageContext = await loadPageContext(Astro2);
3115
+ } catch (err) {
3116
+ return err.astroResponse;
3117
+ }
3118
+ return renderTemplate`<html${addAttribute(pageContext?.lang.replace("_", "-"), "lang")}>
3119
+ ${renderComponent($$result, "PagesLayout", $$Pages, { "pageContext": pageContext }, { "default": ($$result2) => renderTemplate`${renderComponent($$result2, "FallbackMain", $$Fallback$1, { "pageContext": pageContext })}` })}
3120
+ </html>`;
3121
+ }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro");
3122
+
3123
+ const $$file$3 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro";
3124
+ const $$url$3 = "/fallback";
3125
+
3126
+ const _page2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
3127
+ __proto__: null,
3128
+ default: $$Fallback,
3063
3129
  file: $$file$3,
3064
3130
  url: $$url$3
3065
3131
  }, Symbol.toStringTag, { value: 'Module' }));
@@ -3153,4 +3219,4 @@ const _page5 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
3153
3219
  url: $$url
3154
3220
  }, Symbol.toStringTag, { value: 'Module' }));
3155
3221
 
3156
- export { $$Pages as $, _export_sfc as _, _page0 as a, _page1 as b, _page3 as c, _page4 as d, _page5 as e, loadPageContext as l };
3222
+ export { _export_sfc as _, _page0 as a, _page1 as b, _page2 as c, _page3 as d, _page4 as e, _page5 as f };