cloudcommerce 0.22.2 → 0.22.3
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.
- package/CHANGELOG.md +12 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +92 -48
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +21 -13
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +7 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +10 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +1 -0
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +1 -1
- package/ecomplus-stores/iluminim/.ecomplus.cd.json +5 -0
- package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
- package/ecomplus-stores/iluminim/functions/ssr/package.json +6 -6
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +6 -2
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/iluminim/package.json +1 -1
- package/package.json +1 -1
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/storefront/dist/client/_astro/{ShopHeader.dbe9c1f1.js → ShopHeader.1c27e68e.js} +3 -3
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/{_...fac94758.mjs → _...75363048.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{account@_@astro.460623ee.mjs → account@_@astro.12fbe243.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{endpoint@_@js.35380ea5.mjs → endpoint@_@js.67b66d0a.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{fallback@_@astro.dbc26d2d.mjs → fallback@_@astro.0a6656b6.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{index@_@astro.fec107b9.mjs → index@_@astro.a4c9c84e.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{index@_@astro.c91e679e.mjs → index@_@astro.df499bf2.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.2e2d4770.mjs → _...slug_.astro.a71c9334.mjs} +37 -40
- package/packages/storefront/dist/server/chunks/pages/{endpoint.js.6f0f4ede.mjs → endpoint.js.085dadb5.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{fallback.astro.fc8bc7e7.mjs → fallback.astro.055cb7df.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{index.astro.03adcc55.mjs → index.astro.abc34f72.mjs} +1 -1
- package/packages/storefront/dist/server/entry.mjs +8 -8
- package/packages/storefront/dist/server/renderers.mjs +1 -1
- package/packages/storefront/package.json +1 -1
- package/packages/storefront/src/lib/components/SharedData.astro +7 -8
- package/packages/storefront/src/lib/composables/use-shared-data.ts +18 -0
- package/packages/storefront/src/lib/composables/use-shop-header.ts +8 -7
- package/packages/storefront/src/lib/composables/use-sticky-header.ts +1 -1
- package/packages/types/package.json +1 -1
|
@@ -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$
|
|
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$
|
|
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.
|
|
604
|
+
const { default: mod } = await import('./endpoint.js.085dadb5.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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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"])}
|
|
@@ -1096,20 +1096,13 @@ const usePageHeader = async ({ routeContext, listedCategoryFields }) => {
|
|
|
1096
1096
|
};
|
|
1097
1097
|
};
|
|
1098
1098
|
|
|
1099
|
-
|
|
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;
|
|
1099
|
+
const useSharedData = ({ field, value }) => {
|
|
1108
1100
|
global.$storefront.data[field] = value;
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
}
|
|
1101
|
+
return {
|
|
1102
|
+
inlineClientJS: `
|
|
1103
|
+
window.$storefront.data['${field}'] = ${JSON.stringify(value)};`
|
|
1104
|
+
};
|
|
1105
|
+
};
|
|
1113
1106
|
|
|
1114
1107
|
const carouselKey = Symbol("carousel");
|
|
1115
1108
|
|
|
@@ -1723,13 +1716,14 @@ const filterSubcategories = (categories, parentCategory, isAlphabeticalSort = fa
|
|
|
1723
1716
|
}
|
|
1724
1717
|
return subcategories;
|
|
1725
1718
|
};
|
|
1726
|
-
const useShopHeader = ({
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1719
|
+
const useShopHeader = (props) => {
|
|
1720
|
+
const {
|
|
1721
|
+
header,
|
|
1722
|
+
categories = globalThis.$storefront.data.categories || [],
|
|
1723
|
+
menuCategorySlugs,
|
|
1724
|
+
menuRandomCategories = 7,
|
|
1725
|
+
isAlphabeticalSortSubmenu
|
|
1726
|
+
} = props;
|
|
1733
1727
|
const {
|
|
1734
1728
|
isSticky,
|
|
1735
1729
|
staticHeight,
|
|
@@ -3574,6 +3568,10 @@ _sfc_main.setup = (props, ctx) => {
|
|
|
3574
3568
|
};
|
|
3575
3569
|
const ShopHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
3576
3570
|
|
|
3571
|
+
var __freeze = Object.freeze;
|
|
3572
|
+
var __defProp = Object.defineProperty;
|
|
3573
|
+
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
|
|
3574
|
+
var _a;
|
|
3577
3575
|
const $$Astro$2 = createAstro("https://ecom2-demo.web.app");
|
|
3578
3576
|
const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
3579
3577
|
const Astro2 = $$result.createAstro($$Astro$2, $$props, $$slots);
|
|
@@ -3585,16 +3583,15 @@ const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
3585
3583
|
pitchBar,
|
|
3586
3584
|
shopHeader: { categories, ...shopHeader }
|
|
3587
3585
|
} = await usePageHeader({ routeContext });
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
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`
|
|
3586
|
+
const { inlineClientJS } = useSharedData({
|
|
3587
|
+
field: "categories",
|
|
3588
|
+
value: categories?.map(({ _id, ...c }) => c)
|
|
3589
|
+
});
|
|
3590
|
+
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
3591
|
${maybeRenderHead()}<a href="/">
|
|
3595
3592
|
${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
3593
|
</a>
|
|
3597
|
-
` })}` })
|
|
3594
|
+
` })}` })))}`;
|
|
3598
3595
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageHeader.astro", void 0);
|
|
3599
3596
|
|
|
3600
3597
|
const $$Astro$1 = createAstro("https://ecom2-demo.web.app");
|
|
@@ -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.
|
|
3
|
+
import { B as BaseSSRService, i as isOutputFormatSupportsAlpha } from './_...slug_.astro.a71c9334.mjs';
|
|
4
4
|
|
|
5
5
|
class SharpService extends BaseSSRService {
|
|
6
6
|
async transform(inputBuffer, transform) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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.
|
|
2
|
+
import { l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.a71c9334.mjs';
|
|
3
3
|
import 'path-to-regexp';
|
|
4
4
|
import 'cookie';
|
|
5
5
|
import '@astrojs/internal-helpers/path';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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.
|
|
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.a71c9334.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';
|
|
@@ -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.
|
|
29
|
+
import './chunks/pages/_...slug_.astro.a71c9334.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.
|
|
2829
|
-
const _page1 = () => import('./chunks/index@_@astro.
|
|
2830
|
-
const _page2 = () => import('./chunks/fallback@_@astro.
|
|
2831
|
-
const _page3 = () => import('./chunks/index@_@astro.
|
|
2832
|
-
const _page4 = () => import('./chunks/account@_@astro.
|
|
2833
|
-
const _page5 = () => import('./chunks/_...
|
|
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.
|
|
2828
|
+
const _page0 = () => import('./chunks/endpoint@_@js.67b66d0a.mjs');
|
|
2829
|
+
const _page1 = () => import('./chunks/index@_@astro.a4c9c84e.mjs');
|
|
2830
|
+
const _page2 = () => import('./chunks/fallback@_@astro.0a6656b6.mjs');
|
|
2831
|
+
const _page3 = () => import('./chunks/index@_@astro.df499bf2.mjs');
|
|
2832
|
+
const _page4 = () => import('./chunks/account@_@astro.12fbe243.mjs');
|
|
2833
|
+
const _page5 = () => import('./chunks/_...75363048.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.055cb7df.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.67b66d0a.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.a4c9c84e.mjs","\u0000@astro-page:src/pages/fallback@_@astro":"chunks/fallback@_@astro.0a6656b6.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.df499bf2.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.12fbe243.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...75363048.mjs","~/components/PitchBar.vue":"_astro/PitchBar.ed85833a.js","/astro/hoisted.js?q=0":"_astro/hoisted.572313d6.js","~/components/HeroSlider.vue":"_astro/HeroSlider.cea1f361.js","@astrojs/vue/client.js":"_astro/client.0fb6b44e.js","~/components/ProductShelf.vue":"_astro/ProductShelf.35614736.js","~/components/ShopHeader.vue":"_astro/ShopHeader.1c27e68e.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.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.1c27e68e.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"]}), {
|
|
2835
2835
|
pageMap,
|
|
2836
2836
|
renderers,
|
|
2837
2837
|
});
|
|
@@ -2,7 +2,7 @@ import { h as server_default } from './chunks/astro.e0968ba7.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.
|
|
5
|
+
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.a71c9334.mjs';
|
|
6
6
|
import 'path-to-regexp';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import '@astrojs/internal-helpers/path';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
2
|
+
import {
|
|
3
|
+
type Props as UseSharedDataProps,
|
|
4
|
+
useSharedData,
|
|
5
|
+
} from '@@sf/composables/use-shared-data';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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.
|
|
66
|
+
+ window.scrollY + headerElm.getBoundingClientRect().top;
|
|
67
67
|
start();
|
|
68
68
|
};
|
|
69
69
|
const imgs = header.value.getElementsByTagName('IMG');
|