cloudcommerce 0.6.13 → 0.7.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/CHANGELOG.md +28 -0
- package/action.yml +2 -2
- package/ecomplus-stores/monocard/functions/core/package.json +1 -1
- package/ecomplus-stores/monocard/functions/events/package.json +2 -2
- package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
- package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
- package/ecomplus-stores/monocard/functions/ssr/content/settings.json +2 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +8 -8
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/card-phone.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/qrcode-camera.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/CasesGrid.astro +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.astro +23 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +225 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +2 -2
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +1 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +0 -1
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +3 -3
- package/ecomplus-stores/monocard/package.json +1 -1
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/PagesHeader.astro +0 -11
- package/package.json +6 -6
- package/packages/api/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/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/infinitepay/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 +2 -2
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js +2 -2
- package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +4 -3
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +19 -19
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +5 -3
- package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +11 -11
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +19 -10
- package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/tiny-erp/src/integration/after-tiny-queue.ts +2 -2
- package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +4 -3
- package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +18 -18
- package/packages/apps/tiny-erp/src/integration/parsers/order-to-tiny.ts +5 -3
- package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +11 -11
- package/packages/apps/tiny-erp/src/integration/parsers/product-to-tiny.ts +21 -11
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/config/firebase.json +24 -6
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/events/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- 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 +5 -5
- package/packages/storefront/.base.eslintrc.cjs +1 -1
- package/packages/storefront/astro.config.mjs +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.e93c8274.js +4 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.7ce2ebb1.js → firebase-app.72e91a3e.js} +72 -72
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/{astro.2e59789d.mjs → astro.9781c0a7.mjs} +217 -272
- package/packages/storefront/dist/server/chunks/{image-pool.78b6d784.mjs → image-pool.c24d15b2.mjs} +1202 -1202
- package/packages/storefront/dist/server/chunks/pages/{all.f49a350f.mjs → all.3a2f4354.mjs} +218 -289
- package/packages/storefront/dist/server/entry.mjs +16 -363
- package/packages/storefront/package.json +11 -11
- package/packages/storefront/scripts/build-prod.sh +7 -0
- package/packages/storefront/src/lib/components/Picture.astro +94 -0
- package/packages/storefront/src/lib/layouts/BaseHead.astro +2 -8
- package/packages/storefront/ssr-runtime/Picture.ssr.astro +0 -0
- package/packages/storefront/ssr-runtime/get-image.ts +4 -0
- package/packages/storefront/ssr-runtime/get-picture.ts +126 -0
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/UsageSteps.astro +0 -21
- package/ecomplus-stores/monocard/functions/ssr/src/components/UsageSteps.vue +0 -155
- package/packages/storefront/dist/client/_astro/ShopHeader.301e109b.js +0 -4
- package/packages/storefront/src/lib/ssr/Picture.astro +0 -27
- package/packages/storefront/src/lib/ssr/image.ts +0 -68
|
@@ -8,7 +8,7 @@ import 'http-cache-semantics';
|
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'magic-string';
|
|
10
10
|
import 'node:stream';
|
|
11
|
-
import { c as createAstro, a as createComponent, r as renderTemplate, b as addAttribute, d as renderComponent, u as unescapeHTML, F as Fragment, m as maybeRenderHead, e as renderSlot, f as renderHead, s as spreadAttributes } from '../astro.
|
|
11
|
+
import { c as createAstro, a as createComponent, r as renderTemplate, b as addAttribute, d as renderComponent, u as unescapeHTML, F as Fragment, m as maybeRenderHead, e as renderSlot, f as renderHead, s as spreadAttributes } from '../astro.9781c0a7.mjs';
|
|
12
12
|
import api from '@cloudcommerce/api';
|
|
13
13
|
import { reactive, computed, defineComponent, inject, useSSRContext, mergeProps, ref, watch, toRef, onMounted, onBeforeUnmount, provide, createVNode, resolveDynamicComponent, withCtx, renderSlot as renderSlot$1, withDirectives, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList, resolveComponent, withModifiers, Teleport, createTextVNode, toDisplayString, setBlockTracking } from 'vue';
|
|
14
14
|
import { img, price, formatMoney, nickname, onPromotion } from '@ecomplus/utils';
|
|
@@ -16,8 +16,8 @@ import { ssrRenderAttrs, ssrRenderSlot, ssrRenderClass, ssrRenderVNode, ssrRende
|
|
|
16
16
|
/* empty css */import { EventEmitter } from 'node:events';
|
|
17
17
|
import fs$1, { readFileSync } from 'node:fs';
|
|
18
18
|
import config from '@cloudcommerce/config';
|
|
19
|
-
import { resolve as resolve$1 } from 'path';
|
|
20
|
-
|
|
19
|
+
/* empty css */import { resolve as resolve$1 } from 'path';
|
|
20
|
+
import { useScroll, useElementHover, useDebounceFn, useTimeout, promiseTimeout } from '@vueuse/core';
|
|
21
21
|
import { Popover, PopoverButton, PopoverPanel, Menu, MenuButton, MenuItems, MenuItem } from '@headlessui/vue';
|
|
22
22
|
|
|
23
23
|
const _export_sfc = (sfc, props) => {
|
|
@@ -203,7 +203,7 @@ class BaseSSRService {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
const imagePoolModulePromise = import('../image-pool.
|
|
206
|
+
const imagePoolModulePromise = import('../image-pool.c24d15b2.mjs');
|
|
207
207
|
class SquooshService extends BaseSSRService {
|
|
208
208
|
async processAvif(image, transform) {
|
|
209
209
|
const encodeOptions = transform.quality ? { avif: { quality: transform.quality } } : { avif: {} };
|
|
@@ -605,6 +605,183 @@ const loadPageContext = async (Astro, {
|
|
|
605
605
|
|
|
606
606
|
const pwaInfo = {"pwaInDevEnvironment":false,"webManifest":{"href":"/manifest.webmanifest","useCredentials":false,"linkTag":"<link rel=\"manifest\" href=\"/manifest.webmanifest\">"}};
|
|
607
607
|
|
|
608
|
+
const $$Astro$g = createAstro("https://ecom2-002.web.app");
|
|
609
|
+
const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
610
|
+
const Astro2 = $$result.createAstro($$Astro$g, $$props, $$slots);
|
|
611
|
+
Astro2.self = $$BaseHead;
|
|
612
|
+
const {
|
|
613
|
+
storeId,
|
|
614
|
+
cmsContent,
|
|
615
|
+
apiDoc,
|
|
616
|
+
lang,
|
|
617
|
+
domain,
|
|
618
|
+
primaryColor,
|
|
619
|
+
settings,
|
|
620
|
+
cms
|
|
621
|
+
} = Astro2.props.pageContext;
|
|
622
|
+
const state = apiDoc || cmsContent || {};
|
|
623
|
+
const title = state.meta_title || state.name || state.title || Astro2.props.title || settings.name;
|
|
624
|
+
const description = state.meta_description || state.short_description || settings.description;
|
|
625
|
+
const favicon = settings.icon ? `/_image?f=png&w=32&h=32&format=png&href=${encodeURIComponent(settings.icon)}&V=${({}).DEPLOY_RAND}` : "/favicon.ico";
|
|
626
|
+
const canonicalUrl = new URL(Astro2.url.pathname, Astro2.site || `https://${domain}`);
|
|
627
|
+
const cmsMetatags = await cms("metatags");
|
|
628
|
+
const ogLocale = lang.length === 2 ? lang : lang.substring(0, 2) + lang.slice(3).toUpperCase();
|
|
629
|
+
let ogImage;
|
|
630
|
+
if (apiDoc) {
|
|
631
|
+
const picture = img(state, null, "zoom");
|
|
632
|
+
ogImage = picture && picture.url;
|
|
633
|
+
}
|
|
634
|
+
if (!ogImage) {
|
|
635
|
+
if (cmsMetatags?.og_image) {
|
|
636
|
+
ogImage = cmsMetatags.og_image.charAt(0) === "/" ? `https://${domain}${cmsMetatags.og_image}` : cmsMetatags.og_image;
|
|
637
|
+
}
|
|
638
|
+
} else {
|
|
639
|
+
ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
|
|
640
|
+
}
|
|
641
|
+
return renderTemplate`<meta charset="UTF-8">
|
|
642
|
+
<meta name="viewport" content="width=device-width">
|
|
643
|
+
<meta name="theme-color"${addAttribute(primaryColor, "content")}>
|
|
644
|
+
<link rel="icon"${addAttribute(favicon, "href")}>
|
|
645
|
+
<title>${title}</title>
|
|
646
|
+
<meta name="description"${addAttribute(description, "content")}>
|
|
647
|
+
<meta name="author"${addAttribute(settings.name, "content")}>
|
|
648
|
+
<meta name="generator"${addAttribute(Astro2.generator, "content")}>
|
|
649
|
+
<link rel="canonical"${addAttribute(canonicalUrl, "href")}>
|
|
650
|
+
<link rel="apple-touch-icon"${addAttribute(settings.icon, "href")}>
|
|
651
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
652
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
|
653
|
+
<meta property="og:site_name"${addAttribute(settings.name, "content")}>
|
|
654
|
+
<meta property="og:url"${addAttribute(canonicalUrl, "content")}>
|
|
655
|
+
<meta property="og:title"${addAttribute(title, "content")}>
|
|
656
|
+
<meta property="og:description"${addAttribute(description, "content")}>
|
|
657
|
+
<meta property="og:type" content="website">
|
|
658
|
+
<meta property="og:locale"${addAttribute(ogLocale, "content")}>
|
|
659
|
+
${ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`}
|
|
660
|
+
${cmsMetatags?.fb_app_id && renderTemplate`<meta property="fb:app_id"${addAttribute(cmsMetatags.fb_app_id, "content")}>`}
|
|
661
|
+
<meta name="twitter:card" content="summary">
|
|
662
|
+
${cmsMetatags?.twitter_username && renderTemplate`<meta name="twitter:site"${addAttribute(cmsMetatags.twitter_username, "content")}>`}
|
|
663
|
+
<meta name="ecom-store-id"${addAttribute(String(storeId), "content")}>
|
|
664
|
+
|
|
665
|
+
${pwaInfo && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(pwaInfo.webManifest.linkTag)}` })}`}
|
|
666
|
+
${!pwaInfo && !false && renderTemplate`<link rel="manifest" href="/manifest.webmanifest">`}`;
|
|
667
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro");
|
|
668
|
+
|
|
669
|
+
var __freeze$1 = Object.freeze;
|
|
670
|
+
var __defProp$1 = Object.defineProperty;
|
|
671
|
+
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
|
|
672
|
+
var _a$1;
|
|
673
|
+
const $$Astro$f = createAstro("https://ecom2-002.web.app");
|
|
674
|
+
const $$BaseStateJson = createComponent(async ($$result, $$props, $$slots) => {
|
|
675
|
+
const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
|
|
676
|
+
Astro2.self = $$BaseStateJson;
|
|
677
|
+
const {
|
|
678
|
+
pageContext: {
|
|
679
|
+
storeId,
|
|
680
|
+
apiResource,
|
|
681
|
+
apiDoc,
|
|
682
|
+
lang,
|
|
683
|
+
countryCode,
|
|
684
|
+
currency,
|
|
685
|
+
currencySymbol,
|
|
686
|
+
domain,
|
|
687
|
+
settings
|
|
688
|
+
}
|
|
689
|
+
} = Astro2.props;
|
|
690
|
+
let inlineClientJS = `
|
|
691
|
+
window.ECOM_STORE_ID = ${storeId};
|
|
692
|
+
window.ECOM_LANG = '${lang}';
|
|
693
|
+
window.ECOM_CURRENCY = '${currency}';
|
|
694
|
+
window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
|
|
695
|
+
window.ECOM_COUNTRY_CODE = '${countryCode}';
|
|
696
|
+
window.storefront = ${JSON.stringify({ settings })};`;
|
|
697
|
+
if (apiDoc) {
|
|
698
|
+
if (typeof apiDoc.price === "number") {
|
|
699
|
+
apiDoc.price = price(apiDoc);
|
|
700
|
+
}
|
|
701
|
+
const slimDocRegex = globalThis.storefront_slim_doc_regex || /body_|meta_|metafields|_records|i18n/;
|
|
702
|
+
const minifyApiDoc = (nestedDoc) => {
|
|
703
|
+
if (typeof nestedDoc === "object" && nestedDoc) {
|
|
704
|
+
if (Array.isArray(nestedDoc)) {
|
|
705
|
+
nestedDoc.forEach((item) => minifyApiDoc(item));
|
|
706
|
+
} else {
|
|
707
|
+
Object.keys(nestedDoc).forEach((field) => {
|
|
708
|
+
if (slimDocRegex.test(field)) {
|
|
709
|
+
delete nestedDoc[field];
|
|
710
|
+
} else {
|
|
711
|
+
minifyApiDoc(nestedDoc[field]);
|
|
712
|
+
}
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
return nestedDoc;
|
|
717
|
+
};
|
|
718
|
+
inlineClientJS += `
|
|
719
|
+
window.storefront.context = ${JSON.stringify({
|
|
720
|
+
resource: apiResource,
|
|
721
|
+
doc: minifyApiDoc({ ...apiDoc }),
|
|
722
|
+
timestamp: Date.now()
|
|
723
|
+
})};`;
|
|
724
|
+
}
|
|
725
|
+
const inlineJSONLd = JSON.stringify({
|
|
726
|
+
"@context": "http://schema.org",
|
|
727
|
+
"@type": "Organization",
|
|
728
|
+
name: settings.name,
|
|
729
|
+
url: `https://${domain}/`,
|
|
730
|
+
logo: `https://${domain}${settings.logo}`
|
|
731
|
+
});
|
|
732
|
+
return renderTemplate(_a$1 || (_a$1 = __template$1(["<script>", '<\/script>\n<script type="application/ld+json">', "<\/script>"])), unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd));
|
|
733
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseStateJson.astro");
|
|
734
|
+
|
|
735
|
+
const $$Astro$e = createAstro("https://ecom2-002.web.app");
|
|
736
|
+
const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
|
|
737
|
+
const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
|
|
738
|
+
Astro2.self = $$BaseBody;
|
|
739
|
+
return renderTemplate`${maybeRenderHead($$result)}<body>
|
|
740
|
+
<div id="teleported-overlap" class="relative z-50"></div>
|
|
741
|
+
<div id="teleported-top" class="relative z-0"></div>
|
|
742
|
+
${renderSlot($$result, $$slots["default"])}
|
|
743
|
+
${renderSlot($$result, $$slots["before-body-end"])}
|
|
744
|
+
<div id="teleported-bottom" class="relative z-0"></div>
|
|
745
|
+
</body>`;
|
|
746
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro");
|
|
747
|
+
|
|
748
|
+
const $$Astro$d = createAstro("https://ecom2-002.web.app");
|
|
749
|
+
const $$Base$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
750
|
+
const Astro2 = $$result.createAstro($$Astro$d, $$props, $$slots);
|
|
751
|
+
Astro2.self = $$Base$1;
|
|
752
|
+
const { pageContext, title } = Astro2.props;
|
|
753
|
+
const { cms } = pageContext;
|
|
754
|
+
const cmsCustomCode = await cms("code");
|
|
755
|
+
return renderTemplate`<head>
|
|
756
|
+
${renderComponent($$result, "BaseHead", $$BaseHead, { "pageContext": pageContext, "title": title })}
|
|
757
|
+
${renderComponent($$result, "BaseStateJson", $$BaseStateJson, { "pageContext": pageContext })}
|
|
758
|
+
${cmsCustomCode?.css && renderTemplate`<style>{cmsCustomCode.css}</style>`}
|
|
759
|
+
${cmsCustomCode?.html_head && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(cmsCustomCode.html_head)}` })}`}
|
|
760
|
+
${renderSlot($$result, $$slots["base-head-scripts"])}
|
|
761
|
+
${renderSlot($$result, $$slots["before-head-end"])}
|
|
762
|
+
${renderHead($$result)}</head>
|
|
763
|
+
${renderComponent($$result, "BaseBody", $$BaseBody, { "pageContext": pageContext }, { "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["default"])}${cmsCustomCode?.html_body && renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate`${unescapeHTML(cmsCustomCode.html_body)}` })}`}${renderSlot($$result2, $$slots["base-body-scripts"])}${renderSlot($$result2, $$slots["before-body-end"])}` })}`;
|
|
764
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro");
|
|
765
|
+
|
|
766
|
+
var __freeze = Object.freeze;
|
|
767
|
+
var __defProp = Object.defineProperty;
|
|
768
|
+
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
|
|
769
|
+
var _a;
|
|
770
|
+
const $$Astro$c = createAstro("https://ecom2-002.web.app");
|
|
771
|
+
const $$InlineScripts = createComponent(async ($$result, $$props, $$slots) => {
|
|
772
|
+
const Astro2 = $$result.createAstro($$Astro$c, $$props, $$slots);
|
|
773
|
+
Astro2.self = $$InlineScripts;
|
|
774
|
+
return renderTemplate(_a || (_a = __template(["<script>\n window.firebaseConfig = {\n apiKey: 'AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0',\n authDomain: 'ecom2-002.firebaseapp.com',\n projectId: 'ecom2-002',\n storageBucket: 'ecom2-002.appspot.com',\n messagingSenderId: '402807248219',\n appId: '1:402807248219:web:cf7d57759751e74776367e',\n measurementId: 'G-SC592CE0GB',\n };\n<\/script>"])));
|
|
775
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro");
|
|
776
|
+
|
|
777
|
+
const $$Astro$b = createAstro("https://ecom2-002.web.app");
|
|
778
|
+
const $$Base = createComponent(async ($$result, $$props, $$slots) => {
|
|
779
|
+
const Astro2 = $$result.createAstro($$Astro$b, $$props, $$slots);
|
|
780
|
+
Astro2.self = $$Base;
|
|
781
|
+
const { pageContext, title } = Astro2.props;
|
|
782
|
+
return renderTemplate`${renderComponent($$result, "Base", $$Base$1, { "pageContext": pageContext, "title": title }, { "before-head-end": ($$result2) => renderTemplate`${renderComponent($$result2, "InlineScripts", $$InlineScripts, { "slot": "before-head-end" })}`, "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["default"])}` })}`;
|
|
783
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro");
|
|
784
|
+
|
|
608
785
|
function resolveSize(transform) {
|
|
609
786
|
if (transform.width && transform.height) {
|
|
610
787
|
return transform;
|
|
@@ -665,7 +842,7 @@ async function resolveTransform(input) {
|
|
|
665
842
|
background
|
|
666
843
|
};
|
|
667
844
|
}
|
|
668
|
-
async function getImage
|
|
845
|
+
async function getImage(transform) {
|
|
669
846
|
var _a, _b, _c;
|
|
670
847
|
if (!transform.src) {
|
|
671
848
|
throw new Error("[@astrojs/image] `src` is required");
|
|
@@ -744,7 +921,7 @@ async function getPicture(params) {
|
|
|
744
921
|
async function getSource(format) {
|
|
745
922
|
const imgs = await Promise.all(
|
|
746
923
|
widths.map(async (width) => {
|
|
747
|
-
const img = await getImage
|
|
924
|
+
const img = await getImage({
|
|
748
925
|
src,
|
|
749
926
|
alt,
|
|
750
927
|
format,
|
|
@@ -772,262 +949,37 @@ async function getPicture(params) {
|
|
|
772
949
|
};
|
|
773
950
|
}
|
|
774
951
|
|
|
775
|
-
const
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
};
|
|
787
|
-
const getAspectRatio = (src) => {
|
|
788
|
-
if (typeof src === "string") {
|
|
789
|
-
src = tryImageSize(src);
|
|
790
|
-
}
|
|
791
|
-
if (src.width) {
|
|
792
|
-
return src.height ? src.width / src.height : 1;
|
|
793
|
-
}
|
|
794
|
-
return 0;
|
|
795
|
-
};
|
|
796
|
-
const getImage = async (options) => {
|
|
797
|
-
if (!options.isLowResolution) {
|
|
798
|
-
if (options.width) {
|
|
799
|
-
options.width *= 2;
|
|
800
|
-
}
|
|
801
|
-
if (options.height) {
|
|
802
|
-
options.height *= 2;
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
if (typeof options.src === "string" && !options.aspectRatio && (!options.width || !options.height)) {
|
|
806
|
-
const { width, height } = tryImageSize(options.src);
|
|
807
|
-
if (width) {
|
|
808
|
-
if (!options.width) {
|
|
809
|
-
options.width = width;
|
|
952
|
+
const $$Astro$a = createAstro("https://ecom2-002.web.app");
|
|
953
|
+
const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
954
|
+
const Astro2 = $$result.createAstro($$Astro$a, $$props, $$slots);
|
|
955
|
+
Astro2.self = $$Picture;
|
|
956
|
+
const tryImageSize = (src2) => {
|
|
957
|
+
let dimensions = {};
|
|
958
|
+
if (typeof src2 === "string" && src2.startsWith("/")) {
|
|
959
|
+
const { STOREFRONT_BASE_DIR } = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true,"SSR":true,"SITE":"\"https://ecom2-002.web.app\""},{STOREFRONT_BASE_DIR:process.env.STOREFRONT_BASE_DIR,}));
|
|
960
|
+
try {
|
|
961
|
+
dimensions = sizeOf(resolve$1(STOREFRONT_BASE_DIR, `public${src2}`));
|
|
962
|
+
} catch (e) {
|
|
963
|
+
dimensions = {};
|
|
810
964
|
}
|
|
811
|
-
options.aspectRatio = getAspectRatio({ width, height });
|
|
812
965
|
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
imgAttrs.width /= 2;
|
|
819
|
-
}
|
|
820
|
-
if (typeof imgAttrs.height === "number") {
|
|
821
|
-
imgAttrs.height /= 2;
|
|
822
|
-
}
|
|
823
|
-
return imgAttrs;
|
|
824
|
-
};
|
|
825
|
-
|
|
826
|
-
const $$Astro$i = createAstro("https://ecom2-002.web.app");
|
|
827
|
-
const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
828
|
-
const Astro2 = $$result.createAstro($$Astro$i, $$props, $$slots);
|
|
829
|
-
Astro2.self = $$BaseHead;
|
|
830
|
-
const {
|
|
831
|
-
storeId,
|
|
832
|
-
cmsContent,
|
|
833
|
-
apiDoc,
|
|
834
|
-
lang,
|
|
835
|
-
domain,
|
|
836
|
-
primaryColor,
|
|
837
|
-
settings,
|
|
838
|
-
cms
|
|
839
|
-
} = Astro2.props.pageContext;
|
|
840
|
-
const state = apiDoc || cmsContent || {};
|
|
841
|
-
const title = state.meta_title || state.name || state.title || Astro2.props.title || settings.name;
|
|
842
|
-
const description = state.meta_description || state.short_description || settings.description;
|
|
843
|
-
const favicon = settings.icon ? (await getImage({
|
|
844
|
-
src: settings.icon,
|
|
845
|
-
width: 32,
|
|
846
|
-
height: 32,
|
|
847
|
-
format: "png",
|
|
848
|
-
isLowResolution: true
|
|
849
|
-
})).src : "/favicon.ico";
|
|
850
|
-
const canonicalUrl = new URL(Astro2.url.pathname, Astro2.site || `https://${domain}`);
|
|
851
|
-
const cmsMetatags = await cms("metatags");
|
|
852
|
-
const ogLocale = lang.length === 2 ? lang : lang.substring(0, 2) + lang.slice(3).toUpperCase();
|
|
853
|
-
let ogImage;
|
|
854
|
-
if (apiDoc) {
|
|
855
|
-
const picture = img(state, null, "zoom");
|
|
856
|
-
ogImage = picture && picture.url;
|
|
857
|
-
}
|
|
858
|
-
if (!ogImage) {
|
|
859
|
-
if (cmsMetatags?.og_image) {
|
|
860
|
-
ogImage = cmsMetatags.og_image.charAt(0) === "/" ? `https://${domain}${cmsMetatags.og_image}` : cmsMetatags.og_image;
|
|
861
|
-
}
|
|
862
|
-
} else {
|
|
863
|
-
ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
|
|
864
|
-
}
|
|
865
|
-
return renderTemplate`<meta charset="UTF-8">
|
|
866
|
-
<meta name="viewport" content="width=device-width">
|
|
867
|
-
<meta name="theme-color"${addAttribute(primaryColor, "content")}>
|
|
868
|
-
<link rel="icon"${addAttribute(favicon, "href")}>
|
|
869
|
-
<title>${title}</title>
|
|
870
|
-
<meta name="description"${addAttribute(description, "content")}>
|
|
871
|
-
<meta name="author"${addAttribute(settings.name, "content")}>
|
|
872
|
-
<meta name="generator"${addAttribute(Astro2.generator, "content")}>
|
|
873
|
-
<link rel="canonical"${addAttribute(canonicalUrl, "href")}>
|
|
874
|
-
<link rel="apple-touch-icon"${addAttribute(settings.icon, "href")}>
|
|
875
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
876
|
-
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
|
877
|
-
<meta property="og:site_name"${addAttribute(settings.name, "content")}>
|
|
878
|
-
<meta property="og:url"${addAttribute(canonicalUrl, "content")}>
|
|
879
|
-
<meta property="og:title"${addAttribute(title, "content")}>
|
|
880
|
-
<meta property="og:description"${addAttribute(description, "content")}>
|
|
881
|
-
<meta property="og:type" content="website">
|
|
882
|
-
<meta property="og:locale"${addAttribute(ogLocale, "content")}>
|
|
883
|
-
${ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`}
|
|
884
|
-
${cmsMetatags?.fb_app_id && renderTemplate`<meta property="fb:app_id"${addAttribute(cmsMetatags.fb_app_id, "content")}>`}
|
|
885
|
-
<meta name="twitter:card" content="summary">
|
|
886
|
-
${cmsMetatags?.twitter_username && renderTemplate`<meta name="twitter:site"${addAttribute(cmsMetatags.twitter_username, "content")}>`}
|
|
887
|
-
<meta name="ecom-store-id"${addAttribute(String(storeId), "content")}>
|
|
888
|
-
|
|
889
|
-
${pwaInfo && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(pwaInfo.webManifest.linkTag)}` })}`}
|
|
890
|
-
${!pwaInfo && !false && renderTemplate`<link rel="manifest" href="/manifest.webmanifest">`}`;
|
|
891
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro");
|
|
892
|
-
|
|
893
|
-
var __freeze$1 = Object.freeze;
|
|
894
|
-
var __defProp$1 = Object.defineProperty;
|
|
895
|
-
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
|
|
896
|
-
var _a$1;
|
|
897
|
-
const $$Astro$h = createAstro("https://ecom2-002.web.app");
|
|
898
|
-
const $$BaseStateJson = createComponent(async ($$result, $$props, $$slots) => {
|
|
899
|
-
const Astro2 = $$result.createAstro($$Astro$h, $$props, $$slots);
|
|
900
|
-
Astro2.self = $$BaseStateJson;
|
|
901
|
-
const {
|
|
902
|
-
pageContext: {
|
|
903
|
-
storeId,
|
|
904
|
-
apiResource,
|
|
905
|
-
apiDoc,
|
|
906
|
-
lang,
|
|
907
|
-
countryCode,
|
|
908
|
-
currency,
|
|
909
|
-
currencySymbol,
|
|
910
|
-
domain,
|
|
911
|
-
settings
|
|
966
|
+
return dimensions;
|
|
967
|
+
};
|
|
968
|
+
const getAspectRatio = (src2) => {
|
|
969
|
+
if (typeof src2 === "string") {
|
|
970
|
+
src2 = tryImageSize(src2);
|
|
912
971
|
}
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
window.ECOM_STORE_ID = ${storeId};
|
|
916
|
-
window.ECOM_LANG = '${lang}';
|
|
917
|
-
window.ECOM_CURRENCY = '${currency}';
|
|
918
|
-
window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
|
|
919
|
-
window.ECOM_COUNTRY_CODE = '${countryCode}';
|
|
920
|
-
window.storefront = ${JSON.stringify({ settings })};`;
|
|
921
|
-
if (apiDoc) {
|
|
922
|
-
if (typeof apiDoc.price === "number") {
|
|
923
|
-
apiDoc.price = price(apiDoc);
|
|
972
|
+
if (src2.width) {
|
|
973
|
+
return src2.height ? src2.width / src2.height : 1;
|
|
924
974
|
}
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
if (typeof nestedDoc === "object" && nestedDoc) {
|
|
928
|
-
if (Array.isArray(nestedDoc)) {
|
|
929
|
-
nestedDoc.forEach((item) => minifyApiDoc(item));
|
|
930
|
-
} else {
|
|
931
|
-
Object.keys(nestedDoc).forEach((field) => {
|
|
932
|
-
if (slimDocRegex.test(field)) {
|
|
933
|
-
delete nestedDoc[field];
|
|
934
|
-
} else {
|
|
935
|
-
minifyApiDoc(nestedDoc[field]);
|
|
936
|
-
}
|
|
937
|
-
});
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
return nestedDoc;
|
|
941
|
-
};
|
|
942
|
-
inlineClientJS += `
|
|
943
|
-
window.storefront.context = ${JSON.stringify({
|
|
944
|
-
resource: apiResource,
|
|
945
|
-
doc: minifyApiDoc({ ...apiDoc }),
|
|
946
|
-
timestamp: Date.now()
|
|
947
|
-
})};`;
|
|
948
|
-
}
|
|
949
|
-
const inlineJSONLd = JSON.stringify({
|
|
950
|
-
"@context": "http://schema.org",
|
|
951
|
-
"@type": "Organization",
|
|
952
|
-
name: settings.name,
|
|
953
|
-
url: `https://${domain}/`,
|
|
954
|
-
logo: `https://${domain}${settings.logo}`
|
|
955
|
-
});
|
|
956
|
-
return renderTemplate(_a$1 || (_a$1 = __template$1(["<script>", '<\/script>\n<script type="application/ld+json">', "<\/script>"])), unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd));
|
|
957
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseStateJson.astro");
|
|
958
|
-
|
|
959
|
-
const $$Astro$g = createAstro("https://ecom2-002.web.app");
|
|
960
|
-
const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
|
|
961
|
-
const Astro2 = $$result.createAstro($$Astro$g, $$props, $$slots);
|
|
962
|
-
Astro2.self = $$BaseBody;
|
|
963
|
-
return renderTemplate`${maybeRenderHead($$result)}<body>
|
|
964
|
-
<div id="teleported-overlap" class="relative z-50"></div>
|
|
965
|
-
<div id="teleported-top" class="relative z-0"></div>
|
|
966
|
-
${renderSlot($$result, $$slots["default"])}
|
|
967
|
-
${renderSlot($$result, $$slots["before-body-end"])}
|
|
968
|
-
<div id="teleported-bottom" class="relative z-0"></div>
|
|
969
|
-
</body>`;
|
|
970
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro");
|
|
971
|
-
|
|
972
|
-
const $$Astro$f = createAstro("https://ecom2-002.web.app");
|
|
973
|
-
const $$Base$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
974
|
-
const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
|
|
975
|
-
Astro2.self = $$Base$1;
|
|
976
|
-
const { pageContext, title } = Astro2.props;
|
|
977
|
-
const { cms } = pageContext;
|
|
978
|
-
const cmsCustomCode = await cms("code");
|
|
979
|
-
return renderTemplate`<head>
|
|
980
|
-
${renderComponent($$result, "BaseHead", $$BaseHead, { "pageContext": pageContext, "title": title })}
|
|
981
|
-
${renderComponent($$result, "BaseStateJson", $$BaseStateJson, { "pageContext": pageContext })}
|
|
982
|
-
${cmsCustomCode?.css && renderTemplate`<style>{cmsCustomCode.css}</style>`}
|
|
983
|
-
${cmsCustomCode?.html_head && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(cmsCustomCode.html_head)}` })}`}
|
|
984
|
-
${renderSlot($$result, $$slots["base-head-scripts"])}
|
|
985
|
-
${renderSlot($$result, $$slots["before-head-end"])}
|
|
986
|
-
${renderHead($$result)}</head>
|
|
987
|
-
${renderComponent($$result, "BaseBody", $$BaseBody, { "pageContext": pageContext }, { "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["default"])}${cmsCustomCode?.html_body && renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate`${unescapeHTML(cmsCustomCode.html_body)}` })}`}${renderSlot($$result2, $$slots["base-body-scripts"])}${renderSlot($$result2, $$slots["before-body-end"])}` })}`;
|
|
988
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro");
|
|
989
|
-
|
|
990
|
-
var __freeze = Object.freeze;
|
|
991
|
-
var __defProp = Object.defineProperty;
|
|
992
|
-
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
|
|
993
|
-
var _a;
|
|
994
|
-
const $$Astro$e = createAstro("https://ecom2-002.web.app");
|
|
995
|
-
const $$InlineScripts = createComponent(async ($$result, $$props, $$slots) => {
|
|
996
|
-
const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
|
|
997
|
-
Astro2.self = $$InlineScripts;
|
|
998
|
-
return renderTemplate(_a || (_a = __template(["<script>\n window.firebaseConfig = {\n apiKey: 'AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0',\n authDomain: 'ecom2-002.firebaseapp.com',\n projectId: 'ecom2-002',\n storageBucket: 'ecom2-002.appspot.com',\n messagingSenderId: '402807248219',\n appId: '1:402807248219:web:cf7d57759751e74776367e',\n measurementId: 'G-SC592CE0GB',\n };\n<\/script>"])));
|
|
999
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro");
|
|
1000
|
-
|
|
1001
|
-
const $$Astro$d = createAstro("https://ecom2-002.web.app");
|
|
1002
|
-
const $$Base = createComponent(async ($$result, $$props, $$slots) => {
|
|
1003
|
-
const Astro2 = $$result.createAstro($$Astro$d, $$props, $$slots);
|
|
1004
|
-
Astro2.self = $$Base;
|
|
1005
|
-
const { pageContext, title } = Astro2.props;
|
|
1006
|
-
return renderTemplate`${renderComponent($$result, "Base", $$Base$1, { "pageContext": pageContext, "title": title }, { "before-head-end": ($$result2) => renderTemplate`${renderComponent($$result2, "InlineScripts", $$InlineScripts, { "slot": "before-head-end" })}`, "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["default"])}` })}`;
|
|
1007
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro");
|
|
1008
|
-
|
|
1009
|
-
const $$Astro$c = createAstro("https://ecom2-002.web.app");
|
|
1010
|
-
const $$Image = createComponent(async ($$result, $$props, $$slots) => {
|
|
1011
|
-
const Astro2 = $$result.createAstro($$Astro$c, $$props, $$slots);
|
|
1012
|
-
Astro2.self = $$Image;
|
|
1013
|
-
const { loading = "lazy", decoding = "async", ...props } = Astro2.props;
|
|
1014
|
-
if (props.alt === void 0 || props.alt === null) {
|
|
1015
|
-
warnForMissingAlt();
|
|
1016
|
-
}
|
|
1017
|
-
const attrs = await getImage$1(props);
|
|
1018
|
-
return renderTemplate`${maybeRenderHead($$result)}<img${spreadAttributes(attrs)}${addAttribute(loading, "loading")}${addAttribute(decoding, "decoding")}>`;
|
|
1019
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Image.astro");
|
|
1020
|
-
|
|
1021
|
-
const $$Astro$b = createAstro("https://ecom2-002.web.app");
|
|
1022
|
-
const $$Picture$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
1023
|
-
const Astro2 = $$result.createAstro($$Astro$b, $$props, $$slots);
|
|
1024
|
-
Astro2.self = $$Picture$1;
|
|
975
|
+
return 0;
|
|
976
|
+
};
|
|
1025
977
|
const {
|
|
1026
978
|
src,
|
|
1027
979
|
alt,
|
|
1028
980
|
sizes,
|
|
1029
981
|
widths,
|
|
1030
|
-
aspectRatio,
|
|
982
|
+
aspectRatio: propAspectRatio,
|
|
1031
983
|
fit,
|
|
1032
984
|
background,
|
|
1033
985
|
position,
|
|
@@ -1036,8 +988,14 @@ const $$Picture$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1036
988
|
decoding = "async",
|
|
1037
989
|
...attrs
|
|
1038
990
|
} = Astro2.props;
|
|
1039
|
-
|
|
1040
|
-
|
|
991
|
+
let aspectRatio = propAspectRatio;
|
|
992
|
+
if ((!attrs.width || !attrs.height) && !aspectRatio && typeof src === "string") {
|
|
993
|
+
const { width, height } = tryImageSize(src);
|
|
994
|
+
if (height) {
|
|
995
|
+
aspectRatio = getAspectRatio({ width, height });
|
|
996
|
+
attrs.width = width;
|
|
997
|
+
attrs.height = height;
|
|
998
|
+
}
|
|
1041
999
|
}
|
|
1042
1000
|
const { image, sources } = await getPicture({
|
|
1043
1001
|
src,
|
|
@@ -1049,44 +1007,15 @@ const $$Picture$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1049
1007
|
position,
|
|
1050
1008
|
alt
|
|
1051
1009
|
});
|
|
1010
|
+
const imgSrc = `${image.src}&V=${process.env.DEPLOY_RAND}`;
|
|
1011
|
+
delete image.src;
|
|
1052
1012
|
delete image.width;
|
|
1053
1013
|
delete image.height;
|
|
1054
1014
|
return renderTemplate`${maybeRenderHead($$result)}<picture>
|
|
1055
|
-
|
|
1056
|
-
|
|
1015
|
+
${sources.map((attrs2) => renderTemplate`<source${addAttribute(attrs2.type, "type")}${addAttribute(attrs2.srcset.replace(/\s(\w+)$/, `&V=${process.env.DEPLOY_RAND} $1`), "srcset")}${addAttribute(sizes, "sizes")}>`)}
|
|
1016
|
+
<img${spreadAttributes(image)}${addAttribute(loading, "loading")}${addAttribute(decoding, "decoding")}${addAttribute(imgSrc, "src")}${spreadAttributes(attrs)}>
|
|
1057
1017
|
</picture>`;
|
|
1058
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/
|
|
1059
|
-
|
|
1060
|
-
let altWarningShown = false;
|
|
1061
|
-
function warnForMissingAlt() {
|
|
1062
|
-
if (altWarningShown === true) {
|
|
1063
|
-
return;
|
|
1064
|
-
}
|
|
1065
|
-
altWarningShown = true;
|
|
1066
|
-
console.warn(`
|
|
1067
|
-
[@astrojs/image] "alt" text was not provided for an <Image> or <Picture> component.
|
|
1068
|
-
|
|
1069
|
-
A future release of @astrojs/image may throw a build error when "alt" text is missing.
|
|
1070
|
-
|
|
1071
|
-
The "alt" attribute holds a text description of the image, which isn't mandatory but is incredibly useful for accessibility. Set to an empty string (alt="") if the image is not a key part of the content (it's decoration or a tracking pixel).
|
|
1072
|
-
`);
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
const $$Astro$a = createAstro("https://ecom2-002.web.app");
|
|
1076
|
-
const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
1077
|
-
const Astro2 = $$result.createAstro($$Astro$a, $$props, $$slots);
|
|
1078
|
-
Astro2.self = $$Picture;
|
|
1079
|
-
const props = Astro2.props;
|
|
1080
|
-
if ((!props.width || !props.height) && !props.aspectRatio && typeof props.src === "string") {
|
|
1081
|
-
const { width, height } = tryImageSize(props.src);
|
|
1082
|
-
if (height) {
|
|
1083
|
-
props.aspectRatio = getAspectRatio({ width, height });
|
|
1084
|
-
props.width = width;
|
|
1085
|
-
props.height = height;
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
return renderTemplate`${renderComponent($$result, "Picture", $$Picture$1, { ...props })}`;
|
|
1089
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/ssr/Picture.astro");
|
|
1018
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Picture.astro");
|
|
1090
1019
|
|
|
1091
1020
|
const checkObjNotNull = (obj) => {
|
|
1092
1021
|
return Object.values(obj).filter((val) => val).length;
|