cloudcommerce 2.1.0 → 2.2.1
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/.github/workflows/test-apps.yml +2 -2
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -3
- package/CHANGELOG.md +24 -0
- package/README.md +3 -7
- package/action.yml +40 -16
- package/ecomplus-stores/barra-doce/.github/workflows/build-and-deploy.yml +3 -2
- package/ecomplus-stores/barra-doce/.husky/pre-commit +0 -3
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/brands.json +2 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/categories.json +2 -1
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/PageTitle.vue +26 -17
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +4 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductDetails.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchShowcase.vue +2 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/blog/[page].astro +6 -5
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +4 -6
- package/ecomplus-stores/tia-sonia/.github/workflows/build-and-deploy.yml +4 -2
- package/ecomplus-stores/tia-sonia/package.json +0 -2
- package/package.json +10 -10
- package/packages/api/package.json +1 -1
- package/packages/apps/affiliate-program/package.json +1 -1
- package/packages/apps/correios/package.json +2 -2
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +2 -2
- 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 +2 -2
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/galaxpay/package.json +2 -2
- package/packages/apps/google-analytics/package.json +2 -2
- package/packages/apps/jadlog/package.json +2 -2
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +2 -2
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +2 -2
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/pagarme-v5/package.json +2 -2
- package/packages/apps/paghiper/package.json +2 -2
- package/packages/apps/pix/package.json +2 -2
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/apps/webhooks/package.json +2 -2
- package/packages/cli/ci/bunny-config-base.sh +68 -12
- package/packages/cli/ci/bunny-prepare-ab.sh +35 -26
- package/packages/cli/ci/bunny-remove-ab.sh +54 -0
- package/packages/cli/ci/bunny-setup.sh +103 -0
- package/packages/cli/config/firebase.json +0 -13
- package/packages/cli/lib/cli.js +4 -12
- package/packages/cli/package.json +2 -2
- package/packages/cli/src/cli.ts +8 -12
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/eslint/package.json +2 -2
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +2 -2
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/lib/cron-ssr-save-views.js +76 -4
- package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
- package/packages/ssr/package.json +4 -4
- package/packages/ssr/src/lib/cron-ssr-save-views.ts +78 -4
- package/packages/storefront/client.d.ts +2 -0
- package/packages/storefront/dist/client/_astro/{AccountPage.9BlGHXT3.js → AccountPage.89hLh9p2.js} +1 -1
- package/packages/storefront/dist/client/_astro/{CartSidebar.55UgTcV0.js → CartSidebar.G25ZUnKP.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductDetails.ENLKdSz_.js → ProductDetails.ntFWLjla.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductShelf.lCBJky3e.js → ProductShelf.PPitdYxI.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductShelf.CNf5JDrU.js → ProductShelf.xSxmHkTe.js} +1 -1
- package/packages/storefront/dist/client/_astro/{SearchModal.4osqtafp.js → SearchModal.R55jFaBZ.js} +1 -1
- package/packages/storefront/dist/client/_astro/{SearchShowcase.hg6TWrz3.js → SearchShowcase.I1PPFu_n.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ShopHeader.xLMeJpqV.js → ShopHeader.OLf0l4Ot.js} +2 -2
- package/packages/storefront/dist/client/_astro/{_slug_.r344YGqG.css → _slug_.Hc-dqhcW.css} +1 -1
- package/packages/storefront/dist/client/_astro/customer-session.AcETMuhI.js +7 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.cPMfoOsn.js → firebase-app.VduCDgof.js} +1 -1
- package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
- package/packages/storefront/dist/client/_astro/{hoisted.J15ErMtK.js → hoisted.PxLuJZKI.js} +1 -1
- package/packages/storefront/dist/client/_astro/{hoisted.KYhwGfsv.js → hoisted.WBjTfX6e.js} +1 -1
- package/packages/storefront/dist/client/_astro/{hoisted.HGTzAuTI.js → hoisted.Wi6YpdWJ.js} +1 -1
- package/packages/storefront/dist/client/_astro/{index-dd468b12.D5s8VdAL.js → index-dd468b12.fl8bpn8l.js} +3 -3
- package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
- package/packages/storefront/dist/client/_astro/{shopping-cart.ZdSCrjS6.js → shopping-cart.dJsZkyuD.js} +1 -1
- package/packages/storefront/dist/client/_astro/use-analytics.uqK_2k_k.js +1 -0
- package/packages/storefront/dist/client/_astro/{use-product-card.-9TsgDDW.js → use-product-card.WRVLjenR.js} +1 -1
- package/packages/storefront/dist/client/~fallback.html +98 -0
- package/packages/storefront/dist/client/~index.html +128 -0
- package/packages/storefront/dist/server/chunks/{CartSidebar_7UWmGIF6.mjs → CartSidebar_yYIzwp_R.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{SearchModal_MNdcYMws.mjs → SearchModal_GvRUZ6ce.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{_.._h5R83hoK.mjs → _.._Lq3r7hpv.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{_page__lWVlZyRe.mjs → _page__LqbeNfr1.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{account_jmelxnlw.mjs → account_4n4rpirV.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/astro/{assets-service_xNulQtBO.mjs → assets-service_yXRChsFH.mjs} +11 -66
- package/packages/storefront/dist/server/chunks/{astro_tggR3S_9.mjs → astro_F4pl3toV.mjs} +1 -7
- package/packages/storefront/dist/server/chunks/{index_e3ytAL8v.mjs → index_SwXtE1IM.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{node_kUJIRL0c.mjs → node_Nzz44v5l.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{__wihn0dYD.mjs → __z8Igc_-f.mjs} +102 -298
- package/packages/storefront/dist/server/chunks/pages/{_page__Sb1eYhpz.mjs → _page__-V1Q-Ymk.mjs} +3 -17
- package/packages/storefront/dist/server/chunks/pages/account_frSUn7gD.mjs +22 -0
- package/packages/storefront/dist/server/chunks/pages/{index_mQXYNYRg.mjs → index_QqJiJpFy.mjs} +4 -15
- package/packages/storefront/dist/server/chunks/pages/node_FoDIj_f7.mjs +257 -0
- package/packages/storefront/dist/server/chunks/pages/~fallback_t0lNhRm9.mjs +33 -0
- package/packages/storefront/dist/server/chunks/~fallback_EWqi0UyU.mjs +6 -0
- package/packages/storefront/dist/server/entry.mjs +8 -8
- package/packages/storefront/dist/server/images.dist.csv +30 -0
- package/packages/storefront/dist/server/images.src.csv +11 -0
- package/packages/storefront/dist/server/manifest_ZHJUD8_m.mjs +196 -0
- package/packages/storefront/dist/server/renderers.mjs +1 -1
- package/packages/storefront/dist/server/static-builds.csv +71 -0
- package/packages/storefront/package.json +7 -7
- package/packages/storefront/src/lib/composables/use-search-showcase.ts +34 -8
- package/packages/storefront/src/lib/layouts/BaseHead.astro +1 -0
- package/packages/storefront/src/lib/state/search-engine.ts +7 -2
- package/packages/storefront/src/lib/state/use-analytics.ts +24 -6
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/barra-doce/LICENSE.md +0 -230
- package/ecomplus-stores/tia-sonia/LICENSE.md +0 -230
- package/packages/storefront/dist/client/_astro/customer-session.hXdZh5Ii.js +0 -7
- package/packages/storefront/dist/client/_astro/use-analytics.tCrQbW8O.js +0 -1
- package/packages/storefront/dist/server/chunks/pages/account_-mULVQUB.mjs +0 -32
- package/packages/storefront/dist/server/chunks/pages/node_-qe5LuQh.mjs +0 -112
- package/packages/storefront/dist/server/chunks/pages/~fallback_ad_xyGHU.mjs +0 -58
- package/packages/storefront/dist/server/chunks/~fallback_EZqiEAFE.mjs +0 -6
- package/packages/storefront/dist/server/manifest_RrmXPEuL.mjs +0 -196
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { img, imgSizes, i18n, formatMoney, price, randomObjectId, nickname, inStock, gridTitle, categoriesList, name, onPromotion, variationsGrids, specTextValue, specValueByText } from '@ecomplus/utils';
|
|
2
|
-
import '
|
|
3
|
-
import { A as AstroError, c as ExpectedImageOptions, E as ExpectedImage, d as InvalidImageService, e as createAstro, f as createComponent, g as ImageMissingAlt, r as renderTemplate, m as maybeRenderHead, h as addAttribute, s as spreadAttributes, u as unescapeHTML, i as renderComponent, j as createTransitionScope, k as renderSlotToString, l as renderAllHeadContent, n as renderSlot$1, F as Fragment } from '../astro_tggR3S_9.mjs';
|
|
2
|
+
import { c as createAstro, b as createComponent, r as renderTemplate, m as maybeRenderHead, s as spreadAttributes, d as addAttribute, u as unescapeHTML, e as renderComponent, f as createTransitionScope, g as renderSlotToString, h as renderAllHeadContent, i as renderSlot$1, F as Fragment } from '../astro_F4pl3toV.mjs';
|
|
4
3
|
import 'kleur/colors';
|
|
5
4
|
import api from '@cloudcommerce/api';
|
|
6
5
|
import { EventEmitter } from 'node:events';
|
|
7
|
-
import fs, {
|
|
8
|
-
import { resolve, join
|
|
6
|
+
import fs, { readFileSync } from 'node:fs';
|
|
7
|
+
import { resolve, join } from 'node:path';
|
|
9
8
|
import { parse } from 'yaml';
|
|
10
9
|
import config from '@cloudcommerce/config';
|
|
11
10
|
import 'clsx';
|
|
12
11
|
/* empty css */
|
|
13
12
|
import { renderSync, parse as parse$1, ELEMENT_NODE, walkSync } from 'ultrahtml';
|
|
14
13
|
import mime from 'mime/lite.js';
|
|
15
|
-
import { i as isESMImportedImage, a as isLocalService, b as isRemoteImage, D as DEFAULT_HASH_PROPS } from '../astro/assets-service_xNulQtBO.mjs';
|
|
16
|
-
import imageSize from 'image-size';
|
|
17
14
|
import { useSSRContext, defineComponent, computed, createVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, inject, ref, watch, toRef, onMounted, onBeforeUnmount, provide, resolveComponent, openBlock, createBlock, createCommentVNode, createTextVNode, toDisplayString, reactive, shallowRef, withDirectives, vShow, Fragment as Fragment$1, renderList, nextTick, withModifiers, Teleport, defineAsyncComponent, vModelText, Suspense, createSlots, shallowReactive, withAsyncContext, vModelRadio } from 'vue';
|
|
18
15
|
import { ssrRenderSlotInner, ssrRenderVNode, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderStyle, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderTeleport, ssrRenderSuspense, ssrLooseEqual } from 'vue/server-renderer';
|
|
19
16
|
import { useScroll, useElementHover, useDebounceFn, watchDebounced, useTimeout, promiseTimeout, watchOnce, onClickOutside, useUrlSearchParams, createReusableTemplate } from '@vueuse/core';
|
|
@@ -636,153 +633,6 @@ const mod = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
636
633
|
default: createApp
|
|
637
634
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
638
635
|
|
|
639
|
-
async function getConfiguredImageService() {
|
|
640
|
-
if (!globalThis?.astroAsset?.imageService) {
|
|
641
|
-
const { default: service } = await import(
|
|
642
|
-
// @ts-expect-error
|
|
643
|
-
'../astro/assets-service_xNulQtBO.mjs'
|
|
644
|
-
).then(n => n.s).catch((e) => {
|
|
645
|
-
const error = new AstroError(InvalidImageService);
|
|
646
|
-
error.cause = e;
|
|
647
|
-
throw error;
|
|
648
|
-
});
|
|
649
|
-
if (!globalThis.astroAsset)
|
|
650
|
-
globalThis.astroAsset = {};
|
|
651
|
-
globalThis.astroAsset.imageService = service;
|
|
652
|
-
return service;
|
|
653
|
-
}
|
|
654
|
-
return globalThis.astroAsset.imageService;
|
|
655
|
-
}
|
|
656
|
-
async function getImage$1(options, imageConfig) {
|
|
657
|
-
if (!options || typeof options !== "object") {
|
|
658
|
-
throw new AstroError({
|
|
659
|
-
...ExpectedImageOptions,
|
|
660
|
-
message: ExpectedImageOptions.message(JSON.stringify(options))
|
|
661
|
-
});
|
|
662
|
-
}
|
|
663
|
-
if (typeof options.src === "undefined") {
|
|
664
|
-
throw new AstroError({
|
|
665
|
-
...ExpectedImage,
|
|
666
|
-
message: ExpectedImage.message(
|
|
667
|
-
options.src,
|
|
668
|
-
"undefined",
|
|
669
|
-
JSON.stringify(options)
|
|
670
|
-
)
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
const service = await getConfiguredImageService();
|
|
674
|
-
const resolvedOptions = {
|
|
675
|
-
...options,
|
|
676
|
-
src: typeof options.src === "object" && "then" in options.src ? (await options.src).default ?? await options.src : options.src
|
|
677
|
-
};
|
|
678
|
-
const originalPath = isESMImportedImage(resolvedOptions.src) ? resolvedOptions.src.fsPath : resolvedOptions.src;
|
|
679
|
-
const clonedSrc = isESMImportedImage(resolvedOptions.src) ? (
|
|
680
|
-
// @ts-expect-error - clone is a private, hidden prop
|
|
681
|
-
resolvedOptions.src.clone ?? resolvedOptions.src
|
|
682
|
-
) : resolvedOptions.src;
|
|
683
|
-
resolvedOptions.src = clonedSrc;
|
|
684
|
-
const validatedOptions = service.validateOptions ? await service.validateOptions(resolvedOptions, imageConfig) : resolvedOptions;
|
|
685
|
-
const srcSetTransforms = service.getSrcSet ? await service.getSrcSet(validatedOptions, imageConfig) : [];
|
|
686
|
-
let imageURL = await service.getURL(validatedOptions, imageConfig);
|
|
687
|
-
let srcSets = await Promise.all(
|
|
688
|
-
srcSetTransforms.map(async (srcSet) => ({
|
|
689
|
-
transform: srcSet.transform,
|
|
690
|
-
url: await service.getURL(srcSet.transform, imageConfig),
|
|
691
|
-
descriptor: srcSet.descriptor,
|
|
692
|
-
attributes: srcSet.attributes
|
|
693
|
-
}))
|
|
694
|
-
);
|
|
695
|
-
if (isLocalService(service) && globalThis.astroAsset.addStaticImage && !(isRemoteImage(validatedOptions.src) && imageURL === validatedOptions.src)) {
|
|
696
|
-
const propsToHash = service.propertiesToHash ?? DEFAULT_HASH_PROPS;
|
|
697
|
-
imageURL = globalThis.astroAsset.addStaticImage(validatedOptions, propsToHash, originalPath);
|
|
698
|
-
srcSets = srcSetTransforms.map((srcSet) => ({
|
|
699
|
-
transform: srcSet.transform,
|
|
700
|
-
url: globalThis.astroAsset.addStaticImage(srcSet.transform, propsToHash, originalPath),
|
|
701
|
-
descriptor: srcSet.descriptor,
|
|
702
|
-
attributes: srcSet.attributes
|
|
703
|
-
}));
|
|
704
|
-
}
|
|
705
|
-
return {
|
|
706
|
-
rawOptions: resolvedOptions,
|
|
707
|
-
options: validatedOptions,
|
|
708
|
-
src: imageURL,
|
|
709
|
-
srcSet: {
|
|
710
|
-
values: srcSets,
|
|
711
|
-
attribute: srcSets.map((srcSet) => `${srcSet.url} ${srcSet.descriptor}`).join(", ")
|
|
712
|
-
},
|
|
713
|
-
attributes: service.getHTMLAttributes !== void 0 ? await service.getHTMLAttributes(validatedOptions, imageConfig) : {}
|
|
714
|
-
};
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
const $$Astro$h = createAstro("https://demo.ecomplus.app");
|
|
718
|
-
const $$Image = createComponent(async ($$result, $$props, $$slots) => {
|
|
719
|
-
const Astro2 = $$result.createAstro($$Astro$h, $$props, $$slots);
|
|
720
|
-
Astro2.self = $$Image;
|
|
721
|
-
const props = Astro2.props;
|
|
722
|
-
if (props.alt === void 0 || props.alt === null) {
|
|
723
|
-
throw new AstroError(ImageMissingAlt);
|
|
724
|
-
}
|
|
725
|
-
if (typeof props.width === "string") {
|
|
726
|
-
props.width = parseInt(props.width);
|
|
727
|
-
}
|
|
728
|
-
if (typeof props.height === "string") {
|
|
729
|
-
props.height = parseInt(props.height);
|
|
730
|
-
}
|
|
731
|
-
const image = await getImage(props);
|
|
732
|
-
const additionalAttributes = {};
|
|
733
|
-
if (image.srcSet.values.length > 0) {
|
|
734
|
-
additionalAttributes.srcset = image.srcSet.attribute;
|
|
735
|
-
}
|
|
736
|
-
return renderTemplate`${maybeRenderHead()}<img${addAttribute(image.src, "src")}${spreadAttributes(additionalAttributes)}${spreadAttributes(image.attributes)}>`;
|
|
737
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/astro/components/Image.astro", void 0);
|
|
738
|
-
|
|
739
|
-
const $$Astro$g = createAstro("https://demo.ecomplus.app");
|
|
740
|
-
const $$Picture$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
741
|
-
const Astro2 = $$result.createAstro($$Astro$g, $$props, $$slots);
|
|
742
|
-
Astro2.self = $$Picture$1;
|
|
743
|
-
const defaultFormats = ["webp"];
|
|
744
|
-
const defaultFallbackFormat = "png";
|
|
745
|
-
const specialFormatsFallback = ["gif", "svg", "jpg", "jpeg"];
|
|
746
|
-
const { formats = defaultFormats, pictureAttributes = {}, fallbackFormat, ...props } = Astro2.props;
|
|
747
|
-
if (props.alt === void 0 || props.alt === null) {
|
|
748
|
-
throw new AstroError(ImageMissingAlt);
|
|
749
|
-
}
|
|
750
|
-
const optimizedImages = await Promise.all(
|
|
751
|
-
formats.map(
|
|
752
|
-
async (format) => await getImage({ ...props, format, widths: props.widths, densities: props.densities })
|
|
753
|
-
)
|
|
754
|
-
);
|
|
755
|
-
let resultFallbackFormat = fallbackFormat ?? defaultFallbackFormat;
|
|
756
|
-
if (!fallbackFormat && isESMImportedImage(props.src) && specialFormatsFallback.includes(props.src.format)) {
|
|
757
|
-
resultFallbackFormat = props.src.format;
|
|
758
|
-
}
|
|
759
|
-
const fallbackImage = await getImage({
|
|
760
|
-
...props,
|
|
761
|
-
format: resultFallbackFormat,
|
|
762
|
-
widths: props.widths,
|
|
763
|
-
densities: props.densities
|
|
764
|
-
});
|
|
765
|
-
const imgAdditionalAttributes = {};
|
|
766
|
-
const sourceAdditionaAttributes = {};
|
|
767
|
-
if (props.sizes) {
|
|
768
|
-
sourceAdditionaAttributes.sizes = props.sizes;
|
|
769
|
-
}
|
|
770
|
-
if (fallbackImage.srcSet.values.length > 0) {
|
|
771
|
-
imgAdditionalAttributes.srcset = fallbackImage.srcSet.attribute;
|
|
772
|
-
}
|
|
773
|
-
return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttributes)}>
|
|
774
|
-
${Object.entries(optimizedImages).map(([_, image]) => {
|
|
775
|
-
const srcsetAttribute = props.densities || !props.densities && !props.widths ? `${image.src}${image.srcSet.values.length > 0 ? ", " + image.srcSet.attribute : ""}` : image.srcSet.attribute;
|
|
776
|
-
return renderTemplate`<source${addAttribute(srcsetAttribute, "srcset")}${addAttribute("image/" + image.options.format, "type")}${spreadAttributes(sourceAdditionaAttributes)}>`;
|
|
777
|
-
})}
|
|
778
|
-
<img${addAttribute(fallbackImage.src, "src")}${spreadAttributes(imgAdditionalAttributes)}${spreadAttributes(fallbackImage.attributes)}>
|
|
779
|
-
</picture>`;
|
|
780
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/astro/components/Picture.astro", void 0);
|
|
781
|
-
|
|
782
|
-
const imageConfig = {"service":{"entrypoint":"astro/assets/services/sharp","config":{}},"domains":[],"remotePatterns":[],"endpoint":"astro/assets/endpoint/node"};
|
|
783
|
-
const assetsDir = new URL("file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/client/");
|
|
784
|
-
const getImage = async (options) => await getImage$1(options, imageConfig);
|
|
785
|
-
|
|
786
636
|
const i19aboveOf = "Acima de";
|
|
787
637
|
const i19brands = "Marcas";
|
|
788
638
|
const i19categories = "Categorias";
|
|
@@ -1266,6 +1116,54 @@ const createPictureGetter = (getImage) => {
|
|
|
1266
1116
|
};
|
|
1267
1117
|
};
|
|
1268
1118
|
|
|
1119
|
+
const { STOREFRONT_BASE_DIR } = process.env;
|
|
1120
|
+
const baseDir = STOREFRONT_BASE_DIR || process.cwd();
|
|
1121
|
+
const builtImages = [];
|
|
1122
|
+
const manifestFilepath = join(baseDir, "dist/server/images.dist.csv");
|
|
1123
|
+
try {
|
|
1124
|
+
readFileSync(manifestFilepath, "utf-8").split(/\n/).forEach((line) => {
|
|
1125
|
+
const [filename, width, height] = line.split(",");
|
|
1126
|
+
builtImages.push({
|
|
1127
|
+
filename,
|
|
1128
|
+
width: Number(width),
|
|
1129
|
+
height: Number(height)
|
|
1130
|
+
});
|
|
1131
|
+
});
|
|
1132
|
+
} catch (err) {
|
|
1133
|
+
if (global.$renderStorefront) {
|
|
1134
|
+
console.error(err);
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
builtImages.sort((a, b) => {
|
|
1138
|
+
if (a.width < b.width)
|
|
1139
|
+
return -1;
|
|
1140
|
+
return 1;
|
|
1141
|
+
});
|
|
1142
|
+
const getBuiltImage = async ({ src, width, format }) => {
|
|
1143
|
+
const filename = src.replace(/^.*\//, "").replace(/.\w+(\?.*)?$/, "");
|
|
1144
|
+
const filenameRegExp = new RegExp(`[_.][a-z0-9]+\\.${format}$`, "i");
|
|
1145
|
+
const matchFilename = (_builtImage) => {
|
|
1146
|
+
return filename === _builtImage.filename.replace(filenameRegExp, "");
|
|
1147
|
+
};
|
|
1148
|
+
let builtImage = builtImages.find((_builtImage) => {
|
|
1149
|
+
return _builtImage.width >= width && matchFilename(_builtImage);
|
|
1150
|
+
});
|
|
1151
|
+
if (!builtImage) {
|
|
1152
|
+
builtImage = builtImages.find(matchFilename);
|
|
1153
|
+
}
|
|
1154
|
+
if (builtImage) {
|
|
1155
|
+
return {
|
|
1156
|
+
src: `/_astro/${builtImage.filename}`,
|
|
1157
|
+
width: builtImage.width,
|
|
1158
|
+
height: builtImage.height
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
console.warn(`Could not match built ${format} image for ${src} ${width}px`);
|
|
1162
|
+
return { src, width };
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
const getBuiltPicture = createPictureGetter(getBuiltImage);
|
|
1166
|
+
|
|
1269
1167
|
const getAspectRatio = (src, tryImageSize) => {
|
|
1270
1168
|
if (typeof src === "string") {
|
|
1271
1169
|
src = tryImageSize(src);
|
|
@@ -1418,31 +1316,27 @@ const $$Astro$f = createAstro("https://demo.ecomplus.app");
|
|
|
1418
1316
|
const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
1419
1317
|
const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
|
|
1420
1318
|
Astro2.self = $$Picture;
|
|
1421
|
-
const
|
|
1422
|
-
const
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
} catch (err) {
|
|
1434
|
-
console.error(err);
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
return filepath;
|
|
1438
|
-
};
|
|
1319
|
+
const { STOREFRONT_BASE_DIR } = process.env;
|
|
1320
|
+
const baseDir = STOREFRONT_BASE_DIR || process.cwd();
|
|
1321
|
+
const originalImages = [];
|
|
1322
|
+
const manifestFilepath = join(baseDir, "dist/server/images.src.csv");
|
|
1323
|
+
readFileSync(manifestFilepath, "utf-8").split(/\n/).forEach((line) => {
|
|
1324
|
+
const [filepath, width, height] = line.split(",");
|
|
1325
|
+
originalImages.push({
|
|
1326
|
+
filepath,
|
|
1327
|
+
width: Number(width),
|
|
1328
|
+
height: Number(height)
|
|
1329
|
+
});
|
|
1330
|
+
});
|
|
1439
1331
|
const tryImageSize = (src) => {
|
|
1440
1332
|
let dimensions = {};
|
|
1441
1333
|
if (typeof src === "string" && src.startsWith("/")) {
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1334
|
+
const originalImage = originalImages.find(({ filepath }) => {
|
|
1335
|
+
return new RegExp(`^/${filepath}\\??.*`).test(src);
|
|
1336
|
+
});
|
|
1337
|
+
if (originalImage) {
|
|
1338
|
+
const { width, height } = originalImage;
|
|
1339
|
+
dimensions = { width, height };
|
|
1446
1340
|
}
|
|
1447
1341
|
}
|
|
1448
1342
|
return dimensions;
|
|
@@ -1455,48 +1349,11 @@ const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1455
1349
|
} = await useSSRPicture({
|
|
1456
1350
|
...Astro2.props,
|
|
1457
1351
|
tryImageSize,
|
|
1458
|
-
getPicture:
|
|
1459
|
-
let imageMetadata;
|
|
1460
|
-
if (imageOptions.src.startsWith("/")) {
|
|
1461
|
-
const imageFilepath = getImageFilepath(imageOptions.src);
|
|
1462
|
-
const { width: width2, height: height2 } = tryImageSize(imageOptions.src);
|
|
1463
|
-
if (width2 && height2) {
|
|
1464
|
-
const mimeType = mime.getType(imageFilepath);
|
|
1465
|
-
if (mimeType?.startsWith("image/")) {
|
|
1466
|
-
imageMetadata = {
|
|
1467
|
-
src: imageFilepath,
|
|
1468
|
-
width: width2,
|
|
1469
|
-
height: height2,
|
|
1470
|
-
// @ts-ignore
|
|
1471
|
-
format: mimeType.replace("image/", "")
|
|
1472
|
-
};
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
const {
|
|
1477
|
-
src,
|
|
1478
|
-
attributes: { width, height }
|
|
1479
|
-
} = await getImage({
|
|
1480
|
-
...imageOptions,
|
|
1481
|
-
src: imageMetadata || imageOptions.src
|
|
1482
|
-
});
|
|
1483
|
-
return { src, width, height };
|
|
1484
|
-
}),
|
|
1352
|
+
getPicture: getBuiltPicture,
|
|
1485
1353
|
assetsPrefix: Astro2.locals.assetsPrefix
|
|
1486
1354
|
});
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
}
|
|
1490
|
-
return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttrs)}>
|
|
1491
|
-
${sources.map((attrs) => {
|
|
1492
|
-
if (versionSuffix) {
|
|
1493
|
-
attrs.srcset = attrs.srcset.replace(/\s(\w+)$/, `${versionSuffix} $1`);
|
|
1494
|
-
}
|
|
1495
|
-
return renderTemplate`<source${spreadAttributes(attrs)}${addAttribute(sizes, "sizes")}>`;
|
|
1496
|
-
})}
|
|
1497
|
-
${imgAttrs && renderTemplate`<img${spreadAttributes(imgAttrs)}>`}
|
|
1498
|
-
</picture>`;
|
|
1499
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Picture.astro", void 0);
|
|
1355
|
+
return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttrs)}> ${sources.map((attrs) => renderTemplate`<source${spreadAttributes(attrs)}${addAttribute(sizes, "sizes")}>`)} ${imgAttrs && renderTemplate`<img${spreadAttributes(imgAttrs)}>`} </picture>`;
|
|
1356
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/images/Picture.runtime.astro", void 0);
|
|
1500
1357
|
|
|
1501
1358
|
/* eslint-disable */
|
|
1502
1359
|
|
|
@@ -1507,9 +1364,7 @@ const $$ViewTransitions = createComponent(async ($$result, $$props, $$slots) =>
|
|
|
1507
1364
|
const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
|
|
1508
1365
|
Astro2.self = $$ViewTransitions;
|
|
1509
1366
|
const { fallback = "animate" } = Astro2.props;
|
|
1510
|
-
return renderTemplate`<meta name="astro-view-transitions-enabled" content="true"
|
|
1511
|
-
<meta name="astro-view-transitions-fallback"${addAttribute(fallback, "content")}>
|
|
1512
|
-
`;
|
|
1367
|
+
return renderTemplate`<meta name="astro-view-transitions-enabled" content="true"><meta name="astro-view-transitions-fallback"${addAttribute(fallback, "content")}>`;
|
|
1513
1368
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/ViewTransitions.astro", void 0);
|
|
1514
1369
|
|
|
1515
1370
|
var __freeze$3 = Object.freeze;
|
|
@@ -1597,6 +1452,7 @@ window.ECOM_LANG = '${lang}';
|
|
|
1597
1452
|
window.ECOM_CURRENCY = '${currency}';
|
|
1598
1453
|
window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
|
|
1599
1454
|
window.ECOM_COUNTRY_CODE = '${countryCode}';
|
|
1455
|
+
window.GIT_BRANCH = '${{"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.GIT_BRANCH || ""}';
|
|
1600
1456
|
window.$storefront = ${JSON.stringify({ settings, data: {} })};`;
|
|
1601
1457
|
if (apiContext.error) {
|
|
1602
1458
|
const { message, statusCode } = apiContext.error;
|
|
@@ -1659,7 +1515,7 @@ window.$isCmsPreview = true;`;
|
|
|
1659
1515
|
url: `https://${domain}/`,
|
|
1660
1516
|
logo: `https://${domain}${settings.logo}`
|
|
1661
1517
|
});
|
|
1662
|
-
return renderTemplate(_c || (_c = __template$3(['<meta charset="UTF-8"
|
|
1518
|
+
return renderTemplate(_c || (_c = __template$3(['<meta charset="UTF-8"><meta name="viewport" content="width=device-width"><meta name="theme-color"', '><link rel="icon" type="image/png"', ' sizes="32x32">', "", "", '<meta name="author"', '><meta name="generator"', '><link rel="canonical"', ">", '<meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta property="og:site_name"', '><meta property="og:url"', '><meta property="og:title"', '><meta property="og:description"', '><meta property="og:type" content="website"><meta property="og:locale"', ">", "", '<meta name="twitter:card" content="summary">', '<meta name="ecom-store-id"', ">", "<script", ">", '</script><script type="application/ld+json">', "</script>", "", ""])), addAttribute(primaryColor, "content"), addAttribute(favicon, "href"), shortcutIcon && renderTemplate`<link rel="icon" type="image/png"${addAttribute(shortcutIcon, "href")} sizes="192x192">`, title && renderTemplate`<title>${title}</title>`, description && renderTemplate`<meta name="description"${addAttribute(description, "content")}>`, addAttribute(settings.name, "content"), addAttribute(Astro2.generator, "content"), addAttribute(canonicalUrl, "href"), shortcutIcon && renderTemplate`<link rel="apple-touch-icon"${addAttribute(shortcutIcon, "href")}>`, addAttribute(settings.name, "content"), addAttribute(canonicalUrl, "content"), addAttribute(title, "content"), addAttribute(description, "content"), addAttribute(ogLocale, "content"), ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`, metatagsContent?.fbAppId && renderTemplate`<meta property="fb:app_id"${addAttribute(metatagsContent.fbAppId, "content")}>`, metatagsContent?.twitterUsername && renderTemplate`<meta name="twitter:site"${addAttribute(metatagsContent.twitterUsername, "content")}>`, addAttribute(String(storeId), "content"), isPWA , addAttribute(createTransitionScope($$result, "kvdive2p"), "data-astro-transition-persist"), unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd), hasViewTransitions && renderTemplate`${renderComponent($$result, "ViewTransitions", $$ViewTransitions, { "fallback": "none" })}`, contextInlineClientJS && renderTemplate(_b || (_b = __template$3(["<script>", "</script>"])), unescapeHTML(contextInlineClientJS)));
|
|
1663
1519
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro", "self");
|
|
1664
1520
|
|
|
1665
1521
|
function has(value) {
|
|
@@ -1803,14 +1659,7 @@ const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1803
1659
|
const Astro2 = $$result.createAstro($$Astro$c, $$props, $$slots);
|
|
1804
1660
|
Astro2.self = $$BaseBody;
|
|
1805
1661
|
const { settings } = Astro2.locals.routeContext;
|
|
1806
|
-
return renderTemplate`${maybeRenderHead()}<body style="visibility:hidden" class="!visible"> <!-- Prevent FOUC -->
|
|
1807
|
-
<div id="teleported-overlap" class="relative z-[59]"></div>
|
|
1808
|
-
<div id="teleported-top" class="relative z-[19]"></div>
|
|
1809
|
-
${renderSlot$1($$result, $$slots["default"])}
|
|
1810
|
-
${renderSlot$1($$result, $$slots["before-body-end"])}
|
|
1811
|
-
<div id="teleported-bottom" class="relative z-[19]"></div>
|
|
1812
|
-
${settings.icon && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": settings.icon, "alt": "Icon", "formats": ["png"], "widths": [32, 192, 512], "sizes": "32px", "class": "absolute hidden", "style": "bottom: -1000px", "hasImg": false })}`}
|
|
1813
|
-
</body>`;
|
|
1662
|
+
return renderTemplate`${maybeRenderHead()}<body style="visibility:hidden" class="!visible"> <!-- Prevent FOUC --> <div id="teleported-overlap" class="relative z-[59]"></div> <div id="teleported-top" class="relative z-[19]"></div> ${renderSlot$1($$result, $$slots["default"])} ${renderSlot$1($$result, $$slots["before-body-end"])} <div id="teleported-bottom" class="relative z-[19]"></div> ${settings.icon && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": settings.icon, "alt": "Icon", "formats": ["png"], "widths": [32, 192, 512], "sizes": "32px", "class": "absolute hidden", "style": "bottom: -1000px", "hasImg": false })}`} </body>`;
|
|
1814
1663
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro", void 0);
|
|
1815
1664
|
|
|
1816
1665
|
const $$Astro$b = createAstro("https://demo.ecomplus.app");
|
|
@@ -1819,16 +1668,7 @@ const $$Base$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1819
1668
|
Astro2.self = $$Base$1;
|
|
1820
1669
|
const { getContent } = Astro2.locals.routeContext;
|
|
1821
1670
|
const { customCode } = await getContent("layout");
|
|
1822
|
-
return renderTemplate`${renderComponent($$result, "Head", Head, {}, { "default": ($$result2) => renderTemplate`
|
|
1823
|
-
${renderSlot$1($$result2, $$slots["base-head"])}
|
|
1824
|
-
${customCode?.css && renderTemplate`<style>{customCode.css}</style>`}${customCode?.htmlHead && renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate`${unescapeHTML(customCode.htmlHead)}` })}`}${renderSlot$1($$result2, $$slots["base-head-scripts"])}
|
|
1825
|
-
${renderSlot$1($$result2, $$slots["before-head-end"])}
|
|
1826
|
-
` })}
|
|
1827
|
-
${renderComponent($$result, "BaseBody", $$BaseBody, {}, { "default": ($$result2) => renderTemplate`
|
|
1828
|
-
${renderSlot$1($$result2, $$slots["default"])}
|
|
1829
|
-
${customCode?.htmlBody && renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate`${unescapeHTML(customCode.htmlBody)}` })}`}${renderSlot$1($$result2, $$slots["base-body-scripts"])}
|
|
1830
|
-
${renderSlot$1($$result2, $$slots["before-body-end"])}
|
|
1831
|
-
` })}`;
|
|
1671
|
+
return renderTemplate`${renderComponent($$result, "Head", Head, {}, { "default": ($$result2) => renderTemplate` ${renderSlot$1($$result2, $$slots["base-head"])} ${customCode?.css && renderTemplate`<style>{customCode.css}</style>`}${customCode?.htmlHead && renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate`${unescapeHTML(customCode.htmlHead)}` })}`}${renderSlot$1($$result2, $$slots["base-head-scripts"])} ${renderSlot$1($$result2, $$slots["before-head-end"])} ` })} ${renderComponent($$result, "BaseBody", $$BaseBody, {}, { "default": ($$result2) => renderTemplate` ${renderSlot$1($$result2, $$slots["default"])} ${customCode?.htmlBody && renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate`${unescapeHTML(customCode.htmlBody)}` })}`}${renderSlot$1($$result2, $$slots["base-body-scripts"])} ${renderSlot$1($$result2, $$slots["before-body-end"])} ` })}`;
|
|
1832
1672
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro", void 0);
|
|
1833
1673
|
|
|
1834
1674
|
var __freeze$2 = Object.freeze;
|
|
@@ -1846,13 +1686,7 @@ const $$Astro$9 = createAstro("https://demo.ecomplus.app");
|
|
|
1846
1686
|
const $$Base = createComponent(async ($$result, $$props, $$slots) => {
|
|
1847
1687
|
const Astro2 = $$result.createAstro($$Astro$9, $$props, $$slots);
|
|
1848
1688
|
Astro2.self = $$Base;
|
|
1849
|
-
return renderTemplate`${renderComponent($$result, "SfBase", $$Base$1, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
|
|
1850
|
-
${renderSlot$1($$result3, $$slots["base-head"])}
|
|
1851
|
-
` })}`, "before-head-end": ($$result2) => renderTemplate`${renderComponent($$result2, "InlineScripts", $$InlineScripts, { "slot": "before-head-end" })}`, "default": ($$result2) => renderTemplate`
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
${renderSlot$1($$result2, $$slots["default"])}
|
|
1855
|
-
` })}`;
|
|
1689
|
+
return renderTemplate`${renderComponent($$result, "SfBase", $$Base$1, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate` ${renderSlot$1($$result3, $$slots["base-head"])} ` })}`, "before-head-end": ($$result2) => renderTemplate`${renderComponent($$result2, "InlineScripts", $$InlineScripts, { "slot": "before-head-end" })}`, "default": ($$result2) => renderTemplate` ${renderSlot$1($$result2, $$slots["default"])} ` })}`;
|
|
1856
1690
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro", void 0);
|
|
1857
1691
|
|
|
1858
1692
|
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
@@ -4465,8 +4299,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4465
4299
|
},
|
|
4466
4300
|
setup(__props, { expose: __expose }) {
|
|
4467
4301
|
__expose();
|
|
4468
|
-
const SearchModal = defineAsyncComponent(() => import('../
|
|
4469
|
-
const CartSidebar = defineAsyncComponent(() => import('../
|
|
4302
|
+
const SearchModal = defineAsyncComponent(() => import('../SearchModal_GvRUZ6ce.mjs'));
|
|
4303
|
+
const CartSidebar = defineAsyncComponent(() => import('../CartSidebar_yYIzwp_R.mjs'));
|
|
4470
4304
|
const props = __props;
|
|
4471
4305
|
const header = ref(null);
|
|
4472
4306
|
const searchInput = ref(null);
|
|
@@ -4741,13 +4575,7 @@ const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
4741
4575
|
shopHeader
|
|
4742
4576
|
} = await usePageHeader({ routeContext });
|
|
4743
4577
|
const { getInlineClientJS } = await useSharedData({ field: "categories" });
|
|
4744
|
-
return renderTemplate`${renderSlot$1($$result, $$slots["pitch-bar"], renderTemplate(_a$1 || (_a$1 = __template$1(["
|
|
4745
|
-
${maybeRenderHead()}<a href="/">
|
|
4746
|
-
${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate`
|
|
4747
|
-
${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "fetchpriority": "high", "loading": "eager", "class": "mx-auto max-w-[150px] hover:drop-shadow-sm" })}
|
|
4748
|
-
` })}
|
|
4749
|
-
</a>
|
|
4750
|
-
` })}` })))}`;
|
|
4578
|
+
return renderTemplate`${renderSlot$1($$result, $$slots["pitch-bar"], renderTemplate(_a$1 || (_a$1 = __template$1([" ", "", " <script async>", "<\/script> ", ""])), 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(getInlineClientJS()), renderComponent($$result, "ShopHeader", ShopHeader, { ...shopHeader, "client:context": "data:categories", "client:component-hydration": "context", "client:component-path": "~/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate` ${maybeRenderHead()}<a href="/"> ${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate` ${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "fetchpriority": "high", "loading": "eager", "class": "mx-auto max-w-[150px] hover:drop-shadow-sm" })} ` })} </a> ` })}` })))}`;
|
|
4751
4579
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageHeader.astro", void 0);
|
|
4752
4580
|
|
|
4753
4581
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
@@ -4918,13 +4746,7 @@ const $$PageFooter = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
4918
4746
|
}
|
|
4919
4747
|
}
|
|
4920
4748
|
}
|
|
4921
|
-
return renderTemplate`${renderComponent($$result, "ShopFooter", ShopFooter, { "stamps": stamps, "categories": mainCategories, "categoriesColTitle": categoriesList?.title, "pageLinks": pageLinks, "pagesColTitle": pagesList?.title }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate`
|
|
4922
|
-
${maybeRenderHead()}<a href="/">
|
|
4923
|
-
${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate`
|
|
4924
|
-
${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "loading": "lazy", "class": "max-w-[150px]" })}
|
|
4925
|
-
` })}
|
|
4926
|
-
</a>
|
|
4927
|
-
` })}` })}`;
|
|
4749
|
+
return renderTemplate`${renderComponent($$result, "ShopFooter", ShopFooter, { "stamps": stamps, "categories": mainCategories, "categoriesColTitle": categoriesList?.title, "pageLinks": pageLinks, "pagesColTitle": pagesList?.title }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate` ${maybeRenderHead()}<a href="/"> ${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate` ${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "loading": "lazy", "class": "max-w-[150px]" })} ` })} </a> ` })}` })}`;
|
|
4928
4750
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageFooter.astro", void 0);
|
|
4929
4751
|
|
|
4930
4752
|
const usePagination = (props) => {
|
|
@@ -5984,8 +5806,7 @@ const $$BannerPictures = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
5984
5806
|
mobileWidths = [640, 1024];
|
|
5985
5807
|
}
|
|
5986
5808
|
return renderTemplate`${img && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": img, "alt": alt || "", "widths": widths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `${mobileImg ? "hidden md:block " : ""}mx-auto
|
|
5987
|
-
text-sm text-opacity-70 ${className}` })}`}
|
|
5988
|
-
${mobileImg && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": mobileImg, "alt": alt || "", "widths": mobileWidths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `mx-auto text-sm text-opacity-70 md:hidden ${mobileClass}` })}`}`;
|
|
5809
|
+
text-sm text-opacity-70 ${className}` })}`}${mobileImg && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": mobileImg, "alt": alt || "", "widths": mobileWidths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `mx-auto text-sm text-opacity-70 md:hidden ${mobileClass}` })}`}`;
|
|
5989
5810
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/BannerPictures.astro", void 0);
|
|
5990
5811
|
|
|
5991
5812
|
const useBanner = (props) => {
|
|
@@ -6286,13 +6107,7 @@ const $$BannersGrid = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
6286
6107
|
const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
|
|
6287
6108
|
Astro2.self = $$BannersGrid;
|
|
6288
6109
|
const { banners } = Astro2.props;
|
|
6289
|
-
return renderTemplate`${maybeRenderHead()}<section class="ui-section">
|
|
6290
|
-
<ul class="flex flex-wrap gap-4 lg:flex-nowrap">
|
|
6291
|
-
${banners.map((banner) => renderTemplate`<li class="lg:flex-1 [&_img]:w-full [&_img]:object-cover">
|
|
6292
|
-
${renderComponent($$result, "Banner", Banner, { ...banner }, { "picture": ($$result2) => renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { ...banner, "slot": "picture" })}` })}
|
|
6293
|
-
</li>`)}
|
|
6294
|
-
</ul>
|
|
6295
|
-
</section>`;
|
|
6110
|
+
return renderTemplate`${maybeRenderHead()}<section class="ui-section"> <ul class="flex flex-wrap gap-4 lg:flex-nowrap"> ${banners.map((banner) => renderTemplate`<li class="lg:flex-1 [&_img]:w-full [&_img]:object-cover"> ${renderComponent($$result, "Banner", Banner, { ...banner }, { "picture": ($$result2) => renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { ...banner, "slot": "picture" })}` })} </li>`)} </ul> </section>`;
|
|
6296
6111
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/BannersGrid.astro", void 0);
|
|
6297
6112
|
|
|
6298
6113
|
const useBreadcrumbs = async (props = {}) => {
|
|
@@ -8900,8 +8715,7 @@ const $$Sections = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8900
8715
|
}
|
|
8901
8716
|
});
|
|
8902
8717
|
const { cmsContent } = routeContext;
|
|
8903
|
-
return renderTemplate`${maybeRenderHead()}<article class="mb-9 mt-6 md:mb-12 md:mt-8">
|
|
8904
|
-
${sections.map(async ({ type, props }, index) => {
|
|
8718
|
+
return renderTemplate`${maybeRenderHead()}<article class="mb-9 mt-6 md:mb-12 md:mt-8"> ${sections.map(async ({ type, props }, index) => {
|
|
8905
8719
|
switch (type) {
|
|
8906
8720
|
case "product-shelf":
|
|
8907
8721
|
return index === 0 || index < 2 && !cmsContent?.hero?.slides.length ? renderTemplate`${renderComponent($$result, "ProductShelf", ProductShelf, { ...props, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/ProductShelf.vue", "client:component-export": "default" })}` : renderTemplate`${renderComponent($$result, "ProductShelf", ProductShelf, { ...props, "client:visible": true, "client:component-hydration": "visible", "client:component-path": "~/components/ProductShelf.vue", "client:component-export": "default" })}`;
|
|
@@ -8918,16 +8732,10 @@ const $$Sections = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8918
8732
|
return renderTemplate`${renderComponent($$result, "DocBanners", DocBanners, {})}`;
|
|
8919
8733
|
case "product-details":
|
|
8920
8734
|
const { hasDescription, hasSpecifications, ...detailsProps } = props;
|
|
8921
|
-
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`
|
|
8922
|
-
${renderComponent($$result2, "ProductDetails", ProductDetails, { ...detailsProps, "client:context": true, "client:component-hydration": "context", "client:component-path": "~/components/ProductDetails.vue", "client:component-export": "default" }, { "description": ($$result3) => renderTemplate`${renderComponent($$result3, "Fragment", Fragment, { "slot": "description" }, { "default": ($$result4) => renderTemplate`${hasDescription && renderTemplate`${renderComponent($$result4, "DocDescription", DocDescription, {})}`}${hasSpecifications && renderTemplate`${renderComponent($$result4, "ProductSpecifications", ProductSpecifications, {})}`}` })}` })}
|
|
8923
|
-
` })}`;
|
|
8735
|
+
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate` ${renderComponent($$result2, "ProductDetails", ProductDetails, { ...detailsProps, "client:context": true, "client:component-hydration": "context", "client:component-path": "~/components/ProductDetails.vue", "client:component-export": "default" }, { "description": ($$result3) => renderTemplate`${renderComponent($$result3, "Fragment", Fragment, { "slot": "description" }, { "default": ($$result4) => renderTemplate`${hasDescription && renderTemplate`${renderComponent($$result4, "DocDescription", DocDescription, {})}`}${hasSpecifications && renderTemplate`${renderComponent($$result4, "ProductSpecifications", ProductSpecifications, {})}`}` })}` })} ` })}`;
|
|
8924
8736
|
case "search-showcase":
|
|
8925
8737
|
case "context-showcase":
|
|
8926
|
-
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`
|
|
8927
|
-
<article class="min-h-[500px]">
|
|
8928
|
-
${renderComponent($$result2, "SearchShowcase", SearchShowcase, { ...props, "client:context": true, "client:component-hydration": "context", "client:component-path": "~/components/SearchShowcase.vue", "client:component-export": "default" })}
|
|
8929
|
-
</article>
|
|
8930
|
-
` })}`;
|
|
8738
|
+
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate` <article class="min-h-[500px]"> ${renderComponent($$result2, "SearchShowcase", SearchShowcase, { ...props, "client:context": true, "client:component-hydration": "context", "client:component-path": "~/components/SearchShowcase.vue", "client:component-export": "default" })} </article> ` })}`;
|
|
8931
8739
|
case "page-title":
|
|
8932
8740
|
return renderTemplate`${renderComponent($$result, "PageTitle", PageTitle, { ...props })}`;
|
|
8933
8741
|
case "content-entry":
|
|
@@ -8939,8 +8747,7 @@ const $$Sections = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8939
8747
|
default:
|
|
8940
8748
|
return renderTemplate`<div${addAttribute(type, "data-section")}></div>`;
|
|
8941
8749
|
}
|
|
8942
|
-
})}
|
|
8943
|
-
</article>`;
|
|
8750
|
+
})} </article>`;
|
|
8944
8751
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/content/Sections.astro", void 0);
|
|
8945
8752
|
|
|
8946
8753
|
const $$Astro$1 = createAstro("https://demo.ecomplus.app");
|
|
@@ -8959,11 +8766,7 @@ const $$Main = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8959
8766
|
]);
|
|
8960
8767
|
sharedData.grids = grids;
|
|
8961
8768
|
}
|
|
8962
|
-
return renderTemplate`${maybeRenderHead()}<main>
|
|
8963
|
-
${Object.entries(sharedData).map(([field, value]) => renderTemplate`${renderComponent($$result, "SharedData", $$SharedData, { "field": field, "value": value })}`)}
|
|
8964
|
-
${renderComponent($$result, "Hero", $$Hero, {})}
|
|
8965
|
-
${renderComponent($$result, "Sections", $$Sections, {})}
|
|
8966
|
-
</main>`;
|
|
8769
|
+
return renderTemplate`${maybeRenderHead()}<main> ${Object.entries(sharedData).map(([field, value]) => renderTemplate`${renderComponent($$result, "SharedData", $$SharedData, { "field": field, "value": value })}`)} ${renderComponent($$result, "Hero", $$Hero, {})} ${renderComponent($$result, "Sections", $$Sections, {})} </main>`;
|
|
8967
8770
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Main.astro", void 0);
|
|
8968
8771
|
|
|
8969
8772
|
const $$Astro = createAstro("https://demo.ecomplus.app");
|
|
@@ -8972,8 +8775,17 @@ async function getStaticPaths() {
|
|
|
8972
8775
|
params: { slug: void 0 }
|
|
8973
8776
|
}];
|
|
8974
8777
|
if (!{"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.BUILD_MINIMAL) {
|
|
8975
|
-
const {
|
|
8976
|
-
|
|
8778
|
+
const {
|
|
8779
|
+
data: { result: products }
|
|
8780
|
+
} = await api.get("products?fields=slug&sort=-sales&limit=2");
|
|
8781
|
+
products.forEach(({ slug }) => {
|
|
8782
|
+
if (slug)
|
|
8783
|
+
paths.push({ params: { slug } });
|
|
8784
|
+
});
|
|
8785
|
+
const {
|
|
8786
|
+
data: { result: categories }
|
|
8787
|
+
} = await api.get("categories?fields=slug&sort=created_at&limit=1");
|
|
8788
|
+
categories.forEach(({ slug }) => {
|
|
8977
8789
|
if (slug)
|
|
8978
8790
|
paths.push({ params: { slug } });
|
|
8979
8791
|
});
|
|
@@ -9010,15 +8822,7 @@ const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
9010
8822
|
}
|
|
9011
8823
|
loadError = err;
|
|
9012
8824
|
}
|
|
9013
|
-
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}>
|
|
9014
|
-
${routeContext && renderTemplate`${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "BaseHead", $$BaseHead, { "slot": "base-head" })}`, "default": ($$result2) => renderTemplate`
|
|
9015
|
-
|
|
9016
|
-
${renderComponent($$result2, "PageHeader", $$PageHeader, {})}
|
|
9017
|
-
${renderComponent($$result2, "Main", $$Main, {})}
|
|
9018
|
-
${renderComponent($$result2, "PageFooter", $$PageFooter, {})}
|
|
9019
|
-
` })}`}
|
|
9020
|
-
${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}
|
|
9021
|
-
</html>`;
|
|
8825
|
+
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}> ${routeContext && renderTemplate`${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "BaseHead", $$BaseHead, { "slot": "base-head" })}`, "default": ($$result2) => renderTemplate`${renderComponent($$result2, "PageHeader", $$PageHeader, {})}${renderComponent($$result2, "Main", $$Main, {})}${renderComponent($$result2, "PageFooter", $$PageFooter, {})}` })}`}${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}</html>`;
|
|
9022
8826
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro", void 0);
|
|
9023
8827
|
const $$file = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro";
|
|
9024
8828
|
const $$url = "/[...slug]";
|
|
@@ -9031,4 +8835,4 @@ const ____slug_ = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
|
|
|
9031
8835
|
url: $$url
|
|
9032
8836
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
9033
8837
|
|
|
9034
|
-
export { $$BaseHead as $,
|
|
8838
|
+
export { $$BaseHead as $, CheckoutLink as C, FooterStamps as F, Pagination as P, QuantitySelector as Q, SearchEngine as S, _export_sfc as _, $$PageHeader as a, $$PageFooter as b, $$Base as c, $$Picture as d, i19shoppingCart as e, i19error as f, getConfig as g, i19errorMsg as h, i19myAccount as i, i19notFound as j, i19home as k, loadRouteContext as l, mod as m, createApp as n, clearAccents as o, getSearchUrl as p, ProductShelf as q, parseProduct as r, searchHistory as s, removeCartItem as t, Prices as u, freeShippingFromValue as v, shoppingCart as w, totalItems as x, ____slug_ as y };
|