cloudcommerce 0.22.2 → 0.22.4

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 (98) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/CHANGELOG.md +20 -0
  3. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  4. package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +1 -0
  5. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  6. package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +1 -1
  7. package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +1 -1
  8. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +1 -0
  9. package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +1 -1
  10. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +2 -1
  11. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +88 -48
  12. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +21 -13
  13. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +7 -5
  14. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +10 -6
  15. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +1 -0
  16. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  17. package/ecomplus-stores/barra-doce/package.json +1 -1
  18. package/ecomplus-stores/iluminim/.ecomplus.cd.json +5 -0
  19. package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
  20. package/ecomplus-stores/iluminim/functions/ssr/package.json +6 -6
  21. package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +1 -1
  22. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +1 -5
  23. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +6 -2
  24. package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
  25. package/ecomplus-stores/iluminim/package.json +1 -1
  26. package/package.json +7 -11
  27. package/packages/api/package.json +1 -1
  28. package/packages/apps/affilate-program/package.json +1 -1
  29. package/packages/apps/correios/package.json +2 -2
  30. package/packages/apps/custom-payment/package.json +1 -1
  31. package/packages/apps/custom-shipping/package.json +1 -1
  32. package/packages/apps/datafrete/package.json +1 -1
  33. package/packages/apps/discounts/package.json +1 -1
  34. package/packages/apps/emails/package.json +1 -1
  35. package/packages/apps/fb-conversions/package.json +1 -1
  36. package/packages/apps/flash-courier/package.json +1 -1
  37. package/packages/apps/frenet/package.json +1 -1
  38. package/packages/apps/galaxpay/package.json +1 -1
  39. package/packages/apps/google-analytics/package.json +1 -1
  40. package/packages/apps/jadlog/package.json +1 -1
  41. package/packages/apps/loyalty-points/package.json +1 -1
  42. package/packages/apps/melhor-envio/package.json +1 -1
  43. package/packages/apps/mercadopago/package.json +1 -1
  44. package/packages/apps/pagarme/package.json +1 -1
  45. package/packages/apps/paghiper/package.json +1 -1
  46. package/packages/apps/pix/package.json +1 -1
  47. package/packages/apps/tiny-erp/package.json +2 -2
  48. package/packages/apps/webhooks/package.json +1 -1
  49. package/packages/cli/package.json +1 -1
  50. package/packages/config/package.json +1 -1
  51. package/packages/emails/package.json +2 -2
  52. package/packages/eslint/CHANGELOG.md +1 -0
  53. package/packages/eslint/README.md +1 -0
  54. package/packages/eslint/package.json +29 -0
  55. package/packages/eslint/storefront.eslintrc.cjs +28 -0
  56. package/packages/events/package.json +1 -1
  57. package/packages/feeds/package.json +1 -1
  58. package/packages/firebase/package.json +2 -2
  59. package/packages/i18n/package.json +1 -1
  60. package/packages/modules/package.json +1 -1
  61. package/packages/passport/package.json +1 -1
  62. package/packages/ssr/lib/firebase/serve-storefront.js +3 -2
  63. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  64. package/packages/ssr/package.json +4 -5
  65. package/packages/ssr/src/firebase/serve-storefront.ts +3 -2
  66. package/packages/storefront/.eslintrc.cjs +1 -26
  67. package/packages/storefront/dist/client/_astro/{Carousel.62c97a79.js → Carousel.8af656b5.js} +1 -1
  68. package/packages/storefront/dist/client/_astro/{HeroSlider.cea1f361.js → HeroSlider.8a040a33.js} +1 -1
  69. package/packages/storefront/dist/client/_astro/{PitchBar.ed85833a.js → PitchBar.ab0c501e.js} +1 -1
  70. package/packages/storefront/dist/client/_astro/{ProductShelf.35614736.js → ProductShelf.6351b57b.js} +1 -1
  71. package/packages/storefront/dist/client/_astro/ShopHeader.cfab20c7.js +4 -0
  72. package/packages/storefront/dist/client/_astro/{firebase-app.84207480.js → firebase-app.1df8af9a.js} +5 -5
  73. package/packages/storefront/dist/client/_astro/index.7eac5494.js +1 -0
  74. package/packages/storefront/dist/client/sw.js +1 -1
  75. package/packages/storefront/dist/server/chunks/{_...fac94758.mjs → _...1b951f6c.mjs} +3 -3
  76. package/packages/storefront/dist/server/chunks/{account@_@astro.460623ee.mjs → account@_@astro.f6aec583.mjs} +3 -3
  77. package/packages/storefront/dist/server/chunks/{astro.e0968ba7.mjs → astro.b875de26.mjs} +1119 -1226
  78. package/packages/storefront/dist/server/chunks/{endpoint@_@js.35380ea5.mjs → endpoint@_@js.5834ad4e.mjs} +3 -3
  79. package/packages/storefront/dist/server/chunks/{fallback@_@astro.dbc26d2d.mjs → fallback@_@astro.069ddb54.mjs} +3 -3
  80. package/packages/storefront/dist/server/chunks/{index@_@astro.c91e679e.mjs → index@_@astro.37e61ebe.mjs} +3 -3
  81. package/packages/storefront/dist/server/chunks/{index@_@astro.fec107b9.mjs → index@_@astro.485287a1.mjs} +3 -3
  82. package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.2e2d4770.mjs → _...slug_.astro.95bf4c3b.mjs} +48 -47
  83. package/packages/storefront/dist/server/chunks/pages/{account.astro.0003ca94.mjs → account.astro.4b8c2471.mjs} +1 -1
  84. package/packages/storefront/dist/server/chunks/pages/{endpoint.js.6f0f4ede.mjs → endpoint.js.bd1232b7.mjs} +1 -1
  85. package/packages/storefront/dist/server/chunks/pages/{fallback.astro.fc8bc7e7.mjs → fallback.astro.b52164bc.mjs} +2 -2
  86. package/packages/storefront/dist/server/chunks/pages/{index.astro.03adcc55.mjs → index.astro.98167846.mjs} +2 -2
  87. package/packages/storefront/dist/server/entry.mjs +9 -9
  88. package/packages/storefront/dist/server/renderers.mjs +2 -2
  89. package/packages/storefront/package.json +8 -7
  90. package/packages/storefront/src/lib/components/SharedData.astro +7 -8
  91. package/packages/storefront/src/lib/composables/use-shared-data.ts +18 -0
  92. package/packages/storefront/src/lib/composables/use-shop-header.ts +8 -7
  93. package/packages/storefront/src/lib/composables/use-sticky-header.ts +1 -1
  94. package/packages/storefront/src/lib/layouts/use-page-header.ts +0 -1
  95. package/packages/types/package.json +1 -1
  96. package/packages/storefront/dist/client/_astro/ShopHeader.dbe9c1f1.js +0 -4
  97. package/packages/storefront/dist/client/_astro/index.b93f3d06.js +0 -1
  98. /package/packages/{storefront/.base.eslintrc.cjs → eslint/base.eslintrc.cjs} +0 -0
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
- import './astro.e0968ba7.mjs';
3
+ import './astro.b875de26.mjs';
4
4
  import 'path-to-regexp';
5
5
  import 'cookie';
6
6
  import '@astrojs/internal-helpers/path';
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.2e2d4770.mjs';
17
+ import './pages/_...slug_.astro.95bf4c3b.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
29
29
  /* empty css */import '@vueuse/core';
30
30
  import '@headlessui/vue';
31
31
 
32
- const page = () => import('./pages/endpoint.js.6f0f4ede.mjs').then(n => n.e);
32
+ const page = () => import('./pages/endpoint.js.bd1232b7.mjs').then(n => n.e);
33
33
 
34
34
  export { page };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
- import './astro.e0968ba7.mjs';
3
+ import './astro.b875de26.mjs';
4
4
  import 'path-to-regexp';
5
5
  import 'cookie';
6
6
  import '@astrojs/internal-helpers/path';
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.2e2d4770.mjs';
17
+ import './pages/_...slug_.astro.95bf4c3b.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
29
29
  /* empty css */import '@vueuse/core';
30
30
  import '@headlessui/vue';
31
31
 
32
- const page = () => import('./pages/fallback.astro.fc8bc7e7.mjs');
32
+ const page = () => import('./pages/fallback.astro.b52164bc.mjs');
33
33
 
34
34
  export { page };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
- import './astro.e0968ba7.mjs';
3
+ import './astro.b875de26.mjs';
4
4
  import 'path-to-regexp';
5
5
  import 'cookie';
6
6
  import '@astrojs/internal-helpers/path';
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.2e2d4770.mjs';
17
+ import './pages/_...slug_.astro.95bf4c3b.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
29
29
  /* empty css */import '@vueuse/core';
30
30
  import '@headlessui/vue';
31
31
 
32
- const page = () => import('./pages/index.astro.03adcc55.mjs').then(n => n.a);
32
+ const page = () => import('./pages/index.astro.98167846.mjs').then(n => n.a);
33
33
 
34
34
  export { page };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
- import './astro.e0968ba7.mjs';
3
+ import './astro.b875de26.mjs';
4
4
  import 'path-to-regexp';
5
5
  import 'cookie';
6
6
  import '@astrojs/internal-helpers/path';
@@ -14,7 +14,7 @@ import 'html-escaper';
14
14
  import 'vue';
15
15
  import 'vue/server-renderer';
16
16
  import '@ecomplus/utils';
17
- import './pages/_...slug_.astro.2e2d4770.mjs';
17
+ import './pages/_...slug_.astro.95bf4c3b.mjs';
18
18
  import 'node:fs/promises';
19
19
  import 'node:path';
20
20
  import 'node:url';
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
29
29
  /* empty css */import '@vueuse/core';
30
30
  import '@headlessui/vue';
31
31
 
32
- const page = () => import('./pages/index.astro.03adcc55.mjs').then(n => n.i);
32
+ const page = () => import('./pages/index.astro.98167846.mjs').then(n => n.i);
33
33
 
34
34
  export { page };
@@ -8,7 +8,7 @@ import sizeOf from 'image-size';
8
8
  import 'magic-string';
9
9
  import mime from 'mime';
10
10
  import 'node:stream';
11
- import { c as createAstro, a as createComponent, r as renderTemplate, u as unescapeHTML, b as renderComponent, d as addAttribute, F as Fragment, m as maybeRenderHead, s as spreadAttributes, e as renderSlot, f as renderHead } from '../astro.e0968ba7.mjs';
11
+ import { c as createAstro, a as createComponent, r as renderTemplate, u as unescapeHTML, b as renderComponent, d as addAttribute, F as Fragment, m as maybeRenderHead, s as spreadAttributes, e as renderSlot, f as renderHead } from '../astro.b875de26.mjs';
12
12
  import api from '@cloudcommerce/api';
13
13
  import { EventEmitter } from 'node:events';
14
14
  import fs from 'node:fs';
@@ -409,9 +409,9 @@ var __freeze$2 = Object.freeze;
409
409
  var __defProp$2 = Object.defineProperty;
410
410
  var __template$2 = (cooked, raw) => __freeze$2(__defProp$2(cooked, "raw", { value: __freeze$2(raw || cooked.slice()) }));
411
411
  var _a$2;
412
- const $$Astro$9 = createAstro("https://ecom2-demo.web.app");
412
+ const $$Astro$8 = createAstro("https://ecom2-demo.web.app");
413
413
  const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
414
- const Astro2 = $$result.createAstro($$Astro$9, $$props, $$slots);
414
+ const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
415
415
  Astro2.self = $$BaseHead;
416
416
  const deployRand = ({}).DEPLOY_RAND || "_";
417
417
  const getIconUrl = (size) => {
@@ -601,7 +601,7 @@ async function getImage(transform) {
601
601
  }
602
602
  let loader = (_a = globalThis.astroImage) == null ? void 0 : _a.loader;
603
603
  if (!loader) {
604
- const { default: mod } = await import('./endpoint.js.6f0f4ede.mjs').then(n => n.s).catch(() => {
604
+ const { default: mod } = await import('./endpoint.js.bd1232b7.mjs').then(n => n.s).catch(() => {
605
605
  throw new Error(
606
606
  "[@astrojs/image] Builtin image loader not found. (Did you remember to add the integration to your Astro config?)"
607
607
  );
@@ -829,9 +829,9 @@ const useSSRPicture = async (params) => {
829
829
  };
830
830
  };
831
831
 
832
- const $$Astro$8 = createAstro("https://ecom2-demo.web.app");
832
+ const $$Astro$7 = createAstro("https://ecom2-demo.web.app");
833
833
  const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
834
- const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
834
+ const Astro2 = $$result.createAstro($$Astro$7, $$props, $$slots);
835
835
  Astro2.self = $$Picture;
836
836
  const deployRand = ({}).DEPLOY_RAND;
837
837
  const versionSuffix = ({}).BUILD_OUTPUT !== "static" && deployRand ? `&V=${deployRand}` : "";
@@ -873,9 +873,9 @@ const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
873
873
  </picture>`;
874
874
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Picture.astro", void 0);
875
875
 
876
- const $$Astro$7 = createAstro("https://ecom2-demo.web.app");
876
+ const $$Astro$6 = createAstro("https://ecom2-demo.web.app");
877
877
  const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
878
- const Astro2 = $$result.createAstro($$Astro$7, $$props, $$slots);
878
+ const Astro2 = $$result.createAstro($$Astro$6, $$props, $$slots);
879
879
  Astro2.self = $$BaseBody;
880
880
  const { settings } = Astro2.locals.routeContext;
881
881
  return renderTemplate`${maybeRenderHead()}<body>
@@ -888,9 +888,9 @@ const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
888
888
  </body>`;
889
889
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro", void 0);
890
890
 
891
- const $$Astro$6 = createAstro("https://ecom2-demo.web.app");
891
+ const $$Astro$5 = createAstro("https://ecom2-demo.web.app");
892
892
  const $$Base$1 = createComponent(async ($$result, $$props, $$slots) => {
893
- const Astro2 = $$result.createAstro($$Astro$6, $$props, $$slots);
893
+ const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
894
894
  Astro2.self = $$Base$1;
895
895
  const { getContent } = Astro2.locals.routeContext;
896
896
  const { custom_code: customCodeContent } = await getContent("layout");
@@ -912,16 +912,16 @@ var __freeze$1 = Object.freeze;
912
912
  var __defProp$1 = Object.defineProperty;
913
913
  var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
914
914
  var _a$1;
915
- const $$Astro$5 = createAstro("https://ecom2-demo.web.app");
915
+ const $$Astro$4 = createAstro("https://ecom2-demo.web.app");
916
916
  const $$InlineScripts = createComponent(async ($$result, $$props, $$slots) => {
917
- const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
917
+ const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
918
918
  Astro2.self = $$InlineScripts;
919
919
  return renderTemplate(_a$1 || (_a$1 = __template$1(['<script>\n window.$firebaseConfig = {\n apiKey: "AIzaSyCnvm7QrPKzSBrUi09Z3zTgjDST0t4Yikg",\n authDomain: "ecom2-demo.firebaseapp.com",\n projectId: "ecom2-demo",\n storageBucket: "ecom2-demo.appspot.com",\n messagingSenderId: "70369627313",\n appId: "1:70369627313:web:06634033b9c6208fe7e690"\n };\n<\/script>'])));
920
920
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro", void 0);
921
921
 
922
- const $$Astro$4 = createAstro("https://ecom2-demo.web.app");
922
+ const $$Astro$3 = createAstro("https://ecom2-demo.web.app");
923
923
  const $$Base = createComponent(async ($$result, $$props, $$slots) => {
924
- const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
924
+ const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
925
925
  Astro2.self = $$Base;
926
926
  return renderTemplate`${renderComponent($$result, "SfBase", $$Base$1, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
927
927
  ${renderSlot($$result3, $$slots["base-head"])}
@@ -1070,7 +1070,6 @@ const usePageHeader = async ({ routeContext, listedCategoryFields }) => {
1070
1070
  fields: listedCategoryFields || [
1071
1071
  "name",
1072
1072
  "slug",
1073
- "parent.name",
1074
1073
  "parent.slug",
1075
1074
  "icon.url",
1076
1075
  "icon.size",
@@ -1096,20 +1095,13 @@ const usePageHeader = async ({ routeContext, listedCategoryFields }) => {
1096
1095
  };
1097
1096
  };
1098
1097
 
1099
- var __freeze = Object.freeze;
1100
- var __defProp = Object.defineProperty;
1101
- var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
1102
- var _a;
1103
- const $$Astro$3 = createAstro("https://ecom2-demo.web.app");
1104
- const $$SharedData = createComponent(async ($$result, $$props, $$slots) => {
1105
- const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
1106
- Astro2.self = $$SharedData;
1107
- const { field, value } = Astro2.props;
1098
+ const useSharedData = ({ field, value }) => {
1108
1099
  global.$storefront.data[field] = value;
1109
- let inlineClientJS = `
1110
- window.$storefront.data['${field}'] = ${JSON.stringify(value)};`;
1111
- return renderTemplate(_a || (_a = __template(["<script>", "<\/script>"])), unescapeHTML(inlineClientJS));
1112
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/SharedData.astro", void 0);
1100
+ return {
1101
+ inlineClientJS: `
1102
+ window.$storefront.data['${field}'] = ${JSON.stringify(value)};`
1103
+ };
1104
+ };
1113
1105
 
1114
1106
  const carouselKey = Symbol("carousel");
1115
1107
 
@@ -1723,13 +1715,14 @@ const filterSubcategories = (categories, parentCategory, isAlphabeticalSort = fa
1723
1715
  }
1724
1716
  return subcategories;
1725
1717
  };
1726
- const useShopHeader = ({
1727
- header,
1728
- categories = globalThis.$storefront.data.categories || [],
1729
- menuCategorySlugs,
1730
- menuRandomCategories = 7,
1731
- isAlphabeticalSortSubmenu
1732
- }) => {
1718
+ const useShopHeader = (props) => {
1719
+ const {
1720
+ header,
1721
+ categories = globalThis.$storefront.data.categories || [],
1722
+ menuCategorySlugs,
1723
+ menuRandomCategories = 7,
1724
+ isAlphabeticalSortSubmenu
1725
+ } = props;
1733
1726
  const {
1734
1727
  isSticky,
1735
1728
  staticHeight,
@@ -2810,7 +2803,10 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2810
2803
  } else {
2811
2804
  _push2(`<!---->`);
2812
2805
  }
2813
- _push2(ssrRenderComponent($setup["MenuButton"], { class: "outline-none" }, {
2806
+ _push2(ssrRenderComponent($setup["MenuButton"], {
2807
+ class: "outline-none",
2808
+ "aria-label": "Minha conta"
2809
+ }, {
2814
2810
  default: withCtx((_, _push3, _parent3, _scopeId2) => {
2815
2811
  if (_push3) {
2816
2812
  ssrRenderSlot(_ctx.$slots, "button", { open }, null, _push3, _parent3, _scopeId2);
@@ -3258,7 +3254,10 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3258
3254
  createTextVNode(toDisplayString($setup.initializeFirebaseAuth()), 1)
3259
3255
  ])
3260
3256
  ])) : createCommentVNode("", true),
3261
- createVNode($setup["MenuButton"], { class: "outline-none" }, {
3257
+ createVNode($setup["MenuButton"], {
3258
+ class: "outline-none",
3259
+ "aria-label": "Minha conta"
3260
+ }, {
3262
3261
  default: withCtx(() => [
3263
3262
  renderSlot$1(_ctx.$slots, "button", { open })
3264
3263
  ]),
@@ -3481,9 +3480,8 @@ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $op
3481
3480
  _push(ssrRenderComponent($setup["ShopHeaderMenu"], mergeProps({ class: "hidden lg:block" }, { inlineMenuTrees: $setup.inlineMenuTrees }), null, _parent));
3482
3481
  _push(`<div class="basis-1/4 px-2 flex justify-end items-center gap-3 lg:gap-4 text-base-800"><button${ssrRenderAttr("aria-label", "Buscar produtos")}><i class="i-magnifying-glass w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button>`);
3483
3482
  _push(ssrRenderComponent($setup["AccountMenu"], {
3484
- class: "hidden sm:block",
3485
- "aria-label": "Minha conta",
3486
- "service-links": $props.serviceLinks
3483
+ "service-links": $props.serviceLinks,
3484
+ class: "hidden sm:block"
3487
3485
  }, {
3488
3486
  button: withCtx(({ open }, _push2, _parent2, _scopeId) => {
3489
3487
  if (_push2) {
@@ -3574,6 +3572,10 @@ _sfc_main.setup = (props, ctx) => {
3574
3572
  };
3575
3573
  const ShopHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
3576
3574
 
3575
+ var __freeze = Object.freeze;
3576
+ var __defProp = Object.defineProperty;
3577
+ var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
3578
+ var _a;
3577
3579
  const $$Astro$2 = createAstro("https://ecom2-demo.web.app");
3578
3580
  const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
3579
3581
  const Astro2 = $$result.createAstro($$Astro$2, $$props, $$slots);
@@ -3585,16 +3587,15 @@ const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
3585
3587
  pitchBar,
3586
3588
  shopHeader: { categories, ...shopHeader }
3587
3589
  } = await usePageHeader({ routeContext });
3588
- return renderTemplate`${renderSlot($$result, $$slots["pitch-bar"], renderTemplate`
3589
- ${pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/PitchBar.vue", "client:component-export": "default" })}`}
3590
- ${pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar })}`}
3591
-
3592
- ${renderComponent($$result, "SharedData", $$SharedData, { "field": "categories", "value": categories?.map(({ _id, ...c }) => c) })}
3593
- ${renderComponent($$result, "ShopHeader", ShopHeader, { ...shopHeader, "client:load": true, "client:component-hydration": "load", "client:component-path": "~/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate`
3590
+ const { inlineClientJS } = useSharedData({
3591
+ field: "categories",
3592
+ value: categories?.map(({ _id, ...c }) => c)
3593
+ });
3594
+ return renderTemplate`${renderSlot($$result, $$slots["pitch-bar"], renderTemplate(_a || (_a = __template(["\n ", "\n ", "\n\n<script>", "<\/script>\n", ""])), pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/PitchBar.vue", "client:component-export": "default" })}`, pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar })}`, unescapeHTML(inlineClientJS), renderComponent($$result, "ShopHeader", ShopHeader, { ...shopHeader, "client:load": true, "client:component-hydration": "load", "client:component-path": "~/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate`
3594
3595
  ${maybeRenderHead()}<a href="/">
3595
3596
  ${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "logo-picture": ($$result4) => renderTemplate`${renderComponent($$result4, "Picture", $$Picture, { "slot": "logo-picture", "src": settings.logo, "alt": settings.name, "widths": [300], "fetchpriority": "high", "loading": "eager", "class": "hover:drop-shadow-sm max-w-[150px] mx-auto" })}` })}
3596
3597
  </a>
3597
- ` })}` })}`)}`;
3598
+ ` })}` })))}`;
3598
3599
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageHeader.astro", void 0);
3599
3600
 
3600
3601
  const $$Astro$1 = createAstro("https://ecom2-demo.web.app");
@@ -1,4 +1,4 @@
1
- import { c as createAstro, a as createComponent, r as renderTemplate } from '../astro.e0968ba7.mjs';
1
+ import { c as createAstro, a as createComponent, r as renderTemplate } from '../astro.b875de26.mjs';
2
2
  import 'path-to-regexp';
3
3
  import 'cookie';
4
4
  import '@astrojs/internal-helpers/path';
@@ -1,6 +1,6 @@
1
1
  import mime from 'mime';
2
2
  import sharp$1 from 'sharp';
3
- import { B as BaseSSRService, i as isOutputFormatSupportsAlpha } from './_...slug_.astro.2e2d4770.mjs';
3
+ import { B as BaseSSRService, i as isOutputFormatSupportsAlpha } from './_...slug_.astro.95bf4c3b.mjs';
4
4
 
5
5
  class SharpService extends BaseSSRService {
6
6
  async transform(inputBuffer, transform) {
@@ -1,5 +1,5 @@
1
- import { c as createAstro, a as createComponent, r as renderTemplate, m as maybeRenderHead, d as addAttribute, b as renderComponent } from '../astro.e0968ba7.mjs';
2
- import { l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.2e2d4770.mjs';
1
+ import { c as createAstro, a as createComponent, r as renderTemplate, m as maybeRenderHead, d as addAttribute, b as renderComponent } from '../astro.b875de26.mjs';
2
+ import { l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.95bf4c3b.mjs';
3
3
  import 'path-to-regexp';
4
4
  import 'cookie';
5
5
  import '@astrojs/internal-helpers/path';
@@ -1,5 +1,5 @@
1
- import { c as createAstro, a as createComponent, r as renderTemplate, b as renderComponent, m as maybeRenderHead, d as addAttribute, u as unescapeHTML, F as Fragment$1 } from '../astro.e0968ba7.mjs';
2
- import { c as $$Picture, p as parseShippingPhrase, _ as _export_sfc, C as Carousel, d as CarouselControl, e as availableExtraDiscount, f as installmentsOption, g as discountOption, h as loyaltyPointsPrograms, j as addProductToCart, l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.2e2d4770.mjs';
1
+ import { c as createAstro, a as createComponent, r as renderTemplate, b as renderComponent, m as maybeRenderHead, d as addAttribute, u as unescapeHTML, F as Fragment$1 } from '../astro.b875de26.mjs';
2
+ import { c as $$Picture, p as parseShippingPhrase, _ as _export_sfc, C as Carousel, d as CarouselControl, e as availableExtraDiscount, f as installmentsOption, g as discountOption, h as loyaltyPointsPrograms, j as addProductToCart, l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.95bf4c3b.mjs';
3
3
  import { ref, shallowReactive, computed, useSSRContext, defineComponent, mergeProps, createVNode, resolveDynamicComponent, withCtx, renderSlot, createTextVNode, toDisplayString, withDirectives, vShow, openBlock, createBlock, Fragment, renderList, resolveComponent, createCommentVNode, withModifiers, withAsyncContext } from 'vue';
4
4
  import api from '@cloudcommerce/api';
5
5
  import { inStock, price, name, img, onPromotion } from '@ecomplus/utils';
@@ -3,7 +3,7 @@ import { webcrypto } from 'node:crypto';
3
3
  import { ByteLengthQueuingStrategy, CountQueuingStrategy, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, TransformStream, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter } from 'node:stream/web';
4
4
  import { File, FormData, Headers, Request, Response, fetch } from 'undici';
5
5
  import { setTimeout as setTimeout$1, clearTimeout as clearTimeout$1 } from 'node:timers';
6
- import { N as NodeApp, g as deserializeManifest } from './chunks/astro.e0968ba7.mjs';
6
+ import { N as NodeApp, g as deserializeManifest } from './chunks/astro.b875de26.mjs';
7
7
  import { Readable } from 'stream';
8
8
  import https from 'https';
9
9
  import path from 'path';
@@ -26,7 +26,7 @@ import 'html-escaper';
26
26
  import 'vue';
27
27
  import 'vue/server-renderer';
28
28
  import '@ecomplus/utils';
29
- import './chunks/pages/_...slug_.astro.2e2d4770.mjs';
29
+ import './chunks/pages/_...slug_.astro.95bf4c3b.mjs';
30
30
  import 'node:fs/promises';
31
31
  import 'node:path';
32
32
  import 'node:url';
@@ -2825,13 +2825,13 @@ const adapter = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
2825
2825
  start
2826
2826
  }, Symbol.toStringTag, { value: 'Module' }));
2827
2827
 
2828
- const _page0 = () => import('./chunks/endpoint@_@js.35380ea5.mjs');
2829
- const _page1 = () => import('./chunks/index@_@astro.fec107b9.mjs');
2830
- const _page2 = () => import('./chunks/fallback@_@astro.dbc26d2d.mjs');
2831
- const _page3 = () => import('./chunks/index@_@astro.c91e679e.mjs');
2832
- const _page4 = () => import('./chunks/account@_@astro.460623ee.mjs');
2833
- const _page5 = () => import('./chunks/_...fac94758.mjs');const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.2_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js", _page0],["src/pages/index.astro", _page1],["src/pages/fallback.astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5]]);
2834
- const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.2_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c13e0486.css"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c13e0486.css"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c13e0486.css"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","prerender":false,"_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-demo.web.app","base":"/","compressHTML":false,"markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true},"componentMetadata":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000empty-middleware":"_empty-middleware.mjs","/src/pages/app/account.astro":"chunks/pages/account.astro.0003ca94.mjs","/src/pages/fallback.astro":"chunks/pages/fallback.astro.fc8bc7e7.mjs","\u0000@astro-page:../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.2_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint@_@js":"chunks/endpoint@_@js.35380ea5.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.fec107b9.mjs","\u0000@astro-page:src/pages/fallback@_@astro":"chunks/fallback@_@astro.dbc26d2d.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.c91e679e.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.460623ee.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...fac94758.mjs","~/components/PitchBar.vue":"_astro/PitchBar.ed85833a.js","@astrojs/vue/client.js":"_astro/client.0fb6b44e.js","~/components/ProductShelf.vue":"_astro/ProductShelf.35614736.js","~/components/HeroSlider.vue":"_astro/HeroSlider.cea1f361.js","/astro/hoisted.js?q=0":"_astro/hoisted.572313d6.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.js","~/components/ShopHeader.vue":"_astro/ShopHeader.dbe9c1f1.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.84207480.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_...slug_.c13e0486.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-5e0bf4e4.js","/_astro/Carousel.62c97a79.js","/_astro/HeroSlider.cea1f361.js","/_astro/PitchBar.ed85833a.js","/_astro/ProductShelf.35614736.js","/_astro/ShopHeader.dbe9c1f1.js","/_astro/_plugin-vue_export-helper.4cb7dd76.js","/_astro/api.4984c5be.js","/_astro/client.0fb6b44e.js","/_astro/firebase-app.84207480.js","/_astro/hoisted.572313d6.js","/_astro/img.abbe849f.js","/_astro/index.b93f3d06.js","/_astro/preload-helper.cf010ec4.js","/_astro/session-utm.744b0db3.js","/_astro/workbox-window.prod.es5.a7b12eab.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner2.webp","/img/uploads/ecom-icon.png","/img/uploads/headphone.webp","/img/uploads/logo.png","/img/uploads/og-image.png","/img/uploads/passion.webp","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.webp"]}), {
2828
+ const _page0 = () => import('./chunks/endpoint@_@js.5834ad4e.mjs');
2829
+ const _page1 = () => import('./chunks/index@_@astro.485287a1.mjs');
2830
+ const _page2 = () => import('./chunks/fallback@_@astro.069ddb54.mjs');
2831
+ const _page3 = () => import('./chunks/index@_@astro.37e61ebe.mjs');
2832
+ const _page4 = () => import('./chunks/account@_@astro.f6aec583.mjs');
2833
+ const _page5 = () => import('./chunks/_...1b951f6c.mjs');const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.6_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js", _page0],["src/pages/index.astro", _page1],["src/pages/fallback.astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5]]);
2834
+ const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.6_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c13e0486.css"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c13e0486.css"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c13e0486.css"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","prerender":false,"_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-demo.web.app","base":"/","compressHTML":false,"markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true},"componentMetadata":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000empty-middleware":"_empty-middleware.mjs","/src/pages/app/account.astro":"chunks/pages/account.astro.4b8c2471.mjs","/src/pages/fallback.astro":"chunks/pages/fallback.astro.b52164bc.mjs","\u0000@astro-page:../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.6_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint@_@js":"chunks/endpoint@_@js.5834ad4e.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.485287a1.mjs","\u0000@astro-page:src/pages/fallback@_@astro":"chunks/fallback@_@astro.069ddb54.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.37e61ebe.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.f6aec583.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...1b951f6c.mjs","~/components/PitchBar.vue":"_astro/PitchBar.ab0c501e.js","~/components/HeroSlider.vue":"_astro/HeroSlider.8a040a33.js","@astrojs/vue/client.js":"_astro/client.0fb6b44e.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.js","~/components/ProductShelf.vue":"_astro/ProductShelf.6351b57b.js","/astro/hoisted.js?q=0":"_astro/hoisted.572313d6.js","~/components/ShopHeader.vue":"_astro/ShopHeader.cfab20c7.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.1df8af9a.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_...slug_.c13e0486.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-5e0bf4e4.js","/_astro/Carousel.8af656b5.js","/_astro/HeroSlider.8a040a33.js","/_astro/PitchBar.ab0c501e.js","/_astro/ProductShelf.6351b57b.js","/_astro/ShopHeader.cfab20c7.js","/_astro/_plugin-vue_export-helper.4cb7dd76.js","/_astro/api.4984c5be.js","/_astro/client.0fb6b44e.js","/_astro/firebase-app.1df8af9a.js","/_astro/hoisted.572313d6.js","/_astro/img.abbe849f.js","/_astro/index.7eac5494.js","/_astro/preload-helper.cf010ec4.js","/_astro/session-utm.744b0db3.js","/_astro/workbox-window.prod.es5.a7b12eab.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner2.webp","/img/uploads/ecom-icon.png","/img/uploads/headphone.webp","/img/uploads/logo.png","/img/uploads/og-image.png","/img/uploads/passion.webp","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.webp"]}), {
2835
2835
  pageMap,
2836
2836
  renderers,
2837
2837
  });
@@ -1,8 +1,8 @@
1
- import { h as server_default } from './chunks/astro.e0968ba7.mjs';
1
+ import { h as server_default } from './chunks/astro.b875de26.mjs';
2
2
  import { useSSRContext, defineComponent, computed, mergeProps, h, createSSRApp } from 'vue';
3
3
  import { ssrRenderSlotInner, ssrRenderAttrs, ssrRenderSlot, renderToString } from 'vue/server-renderer';
4
4
  import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
5
- import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.2e2d4770.mjs';
5
+ import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.95bf4c3b.mjs';
6
6
  import 'path-to-regexp';
7
7
  import 'cookie';
8
8
  import '@astrojs/internal-helpers/path';
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "0.22.2",
4
+ "version": "0.22.4",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "bin": {
7
7
  "storefront": "./scripts/build-prod.sh"
@@ -37,27 +37,28 @@
37
37
  "@cloudcommerce/i18n": "workspace:*",
38
38
  "@ecomplus/utils": "1.5.0-rc.5",
39
39
  "@fastify/deepmerge": "^1.3.0",
40
- "@headlessui/vue": "^1.7.14",
40
+ "@headlessui/vue": "^1.7.15",
41
41
  "@iconify-json/fa6-brands": "^1.1.11",
42
42
  "@iconify-json/heroicons": "^1.1.11",
43
43
  "@iconify-json/logos": "^1.1.33",
44
44
  "@vite-pwa/astro": "^0.1.1",
45
- "@vueuse/core": "10.2.1",
46
- "astro": "2.9.2",
45
+ "@vueuse/core": "10.3.0",
46
+ "astro": "2.9.6",
47
47
  "chroma-js": "^2.4.2",
48
48
  "dotenv": "^16.3.1",
49
- "firebase": "^9.23.0",
49
+ "firebase": "^10.1.0",
50
50
  "image-size": "^1.0.2",
51
51
  "mime": "^3.0.0",
52
52
  "semver": "^7.5.4",
53
53
  "sharp": "^0.32.4",
54
54
  "tailwindcss": "^3.3.3",
55
- "unocss": "^0.53.6",
56
- "vite": "^4.4.6",
55
+ "unocss": "^0.54.1",
56
+ "vite": "^4.4.7",
57
57
  "vite-plugin-pwa": "^0.16.4",
58
58
  "vue": "^3.3.4"
59
59
  },
60
60
  "devDependencies": {
61
+ "@cloudcommerce/eslint": "workspace:^",
61
62
  "@cloudcommerce/types": "workspace:*"
62
63
  }
63
64
  }
@@ -1,13 +1,12 @@
1
1
  ---
2
- export interface Props {
3
- field: string;
4
- value: any;
5
- }
2
+ import {
3
+ type Props as UseSharedDataProps,
4
+ useSharedData,
5
+ } from '@@sf/composables/use-shared-data';
6
6
 
7
- const { field, value } = Astro.props;
8
- global.$storefront.data[field] = value;
9
- let inlineClientJS = `
10
- window.$storefront.data['${field}'] = ${JSON.stringify(value)};`;
7
+ export interface Props extends UseSharedDataProps {}
8
+
9
+ const { inlineClientJS } = useSharedData(Astro.props);
11
10
  ---
12
11
 
13
12
  <script is:inline set:html={inlineClientJS} />
@@ -0,0 +1,18 @@
1
+ export interface Props {
2
+ field: string;
3
+ value: any;
4
+ }
5
+
6
+ const useSharedData = ({ field, value }: Props) => {
7
+ global.$storefront.data[field] = value;
8
+ return {
9
+ inlineClientJS: `
10
+ window.$storefront.data['${field}'] = ${JSON.stringify(value)};`,
11
+ };
12
+ };
13
+
14
+ export default useSharedData;
15
+
16
+ export {
17
+ useSharedData,
18
+ };
@@ -75,13 +75,14 @@ const filterSubcategories = (
75
75
  return subcategories;
76
76
  };
77
77
 
78
- const useShopHeader = ({
79
- header,
80
- categories = (globalThis.$storefront.data.categories || []) as PartCategory[],
81
- menuCategorySlugs,
82
- menuRandomCategories = 7,
83
- isAlphabeticalSortSubmenu,
84
- }: Props) => {
78
+ const useShopHeader = (props: Props) => {
79
+ const {
80
+ header,
81
+ categories = (globalThis.$storefront.data.categories || []) as PartCategory[],
82
+ menuCategorySlugs,
83
+ menuRandomCategories = 7,
84
+ isAlphabeticalSortSubmenu,
85
+ } = props;
85
86
  const {
86
87
  isSticky,
87
88
  staticHeight,
@@ -63,7 +63,7 @@ const useStickyHeader = (props: Props) => {
63
63
  const headerElm = header.value as HTMLElement;
64
64
  staticHeight.value = headerElm.offsetHeight;
65
65
  staticY.value = staticHeight.value
66
- + window.pageYOffset + headerElm.getBoundingClientRect().top;
66
+ + window.scrollY + headerElm.getBoundingClientRect().top;
67
67
  start();
68
68
  };
69
69
  const imgs = header.value.getElementsByTagName('IMG');
@@ -28,7 +28,6 @@ const usePageHeader = async ({ routeContext, listedCategoryFields }: Props) => {
28
28
  fields: listedCategoryFields || ([
29
29
  'name',
30
30
  'slug',
31
- 'parent.name',
32
31
  'parent.slug',
33
32
  'icon.url',
34
33
  'icon.size',
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/types",
3
3
  "type": "module",
4
- "version": "0.22.2",
4
+ "version": "0.22.4",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {