cloudcommerce 0.24.1 → 0.26.0
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-e2e.yml +2 -2
- package/CHANGELOG.md +43 -0
- package/action.yml +2 -2
- package/ecomplus-stores/barra-doce/.idx/dev.nix +24 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/contato.json +11 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.json +11 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/trocas.json +11 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/layout.json +30 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +7 -7
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +149 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +68 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +2 -0
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/ecomplus-stores/iluminim/.idx/dev.nix +24 -0
- package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/contato.json +11 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/terms.json +11 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/trocas.json +11 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +30 -0
- package/ecomplus-stores/iluminim/functions/ssr/package.json +7 -7
- package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +2 -2
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopFooter.vue +149 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +2 -2
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageFooter.astro +68 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +1 -1
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +2 -0
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/iluminim/package.json +2 -2
- package/ecomplus-stores/monocard/.idx/dev.nix +24 -0
- package/ecomplus-stores/monocard/functions/ssr/package.json +1 -1
- package/ecomplus-stores/tia-sonia/.idx/dev.nix +24 -0
- package/package.json +6 -6
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +5 -3
- package/packages/apps/correios/tests/calculate-shipping.test.mjs +45 -0
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +4 -2
- package/packages/apps/custom-shipping/tests/calculate-shipping.test.mjs +37 -0
- 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 +2 -2
- 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 +4 -2
- package/packages/apps/loyalty-points/tests/1-list-payments.test.mjs +37 -0
- package/packages/apps/loyalty-points/tests/2-create-transaction.test.mjs +41 -0
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +5 -3
- package/packages/apps/mercadopago/tests/1-list-payments.test.mjs +37 -0
- package/packages/apps/mercadopago/tests/2-create-transaction.test.mjs +42 -0
- package/packages/apps/pagarme/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/lib/cli.js +5 -1
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/cli.ts +5 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/eslint/package.json +5 -5
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/i18n/lib/en_us/i19allProducts.txt +1 -0
- package/packages/i18n/lib/en_us/i19institutional.txt +1 -0
- package/packages/i18n/lib/en_us.d.ts +2 -0
- package/packages/i18n/lib/en_us.js +2 -0
- package/packages/i18n/lib/en_us.js.map +1 -1
- package/packages/i18n/lib/pt_br/i19allProducts.txt +1 -0
- package/packages/i18n/lib/pt_br/i19institutional.txt +1 -0
- package/packages/i18n/lib/pt_br.d.ts +2 -0
- package/packages/i18n/lib/pt_br.js +2 -0
- package/packages/i18n/lib/pt_br.js.map +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/i18n/src/en_us.ts +2 -0
- package/packages/i18n/src/pt_br.ts +2 -0
- package/packages/modules/package.json +4 -3
- package/packages/modules/tests/modules.test.mjs +7 -8
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +44 -33
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +6 -6
- package/packages/ssr/src/firebase/serve-storefront.ts +45 -34
- package/packages/storefront/config/storefront.cms.js +3 -1
- package/packages/storefront/config/storefront.config.mjs +8 -2
- package/packages/storefront/dist/client/_astro/{Carousel.63d511ab.js → Carousel.926668f2.js} +1 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.eadba34f.js +1 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.1f0524aa.js +1 -0
- package/packages/storefront/dist/client/_astro/PitchBar.7407eeaf.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.562a32ab.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.763cd2ca.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.cffd4c2d.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.126900a6.js +4 -0
- package/packages/storefront/dist/client/_astro/_...slug_.36cd433d.css +1 -0
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.ee681fa8.js +1 -0
- package/packages/storefront/dist/client/_astro/api.a2eda23e.js +1 -0
- package/packages/storefront/dist/client/_astro/client.e6d9439a.js +1 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.1df8af9a.js → firebase-app.93857bfb.js} +121 -91
- package/packages/storefront/dist/client/_astro/format-money.923559cc.js +1 -0
- package/packages/storefront/dist/client/_astro/img.ec6ba316.js +1 -0
- package/packages/storefront/dist/client/_astro/index.709ac149.js +1 -0
- package/packages/storefront/dist/client/_astro/modules-info.48980668.js +1 -0
- package/packages/storefront/dist/client/manifest.webmanifest +1 -1
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/CartSidebar.2b555408.mjs +393 -0
- package/packages/storefront/dist/server/chunks/SearchModal.f418e188.mjs +44 -0
- package/packages/storefront/dist/server/chunks/_...d32bcc0c.mjs +35 -0
- package/packages/storefront/dist/server/chunks/{account@_@astro.a02ffb0b.mjs → account@_@astro.0106855f.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/{astro.a7611b51.mjs → astro.bb5b7191.mjs} +141 -91
- package/packages/storefront/dist/server/chunks/{_...5323ec5a.mjs → endpoint@_@js.35807882.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/{index@_@astro.d898498a.mjs → index@_@astro.477f5af1.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/{index@_@astro.42c693b9.mjs → index@_@astro.e5a61d6e.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.0f33557e.mjs → _...slug_.astro.fd8a229f.mjs} +673 -937
- package/packages/storefront/dist/server/chunks/pages/{account.astro.9325adb2.mjs → account.astro.3b21bff8.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/endpoint.js.247079ba.mjs +119 -0
- package/packages/storefront/dist/server/chunks/pages/{index.astro.0f31fa39.mjs → index.astro.dab642f5.mjs} +605 -58
- package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.bd93f01e.mjs → ~fallback.astro.7630c0d6.mjs} +25 -7
- package/packages/storefront/dist/server/chunks/{~fallback@_@astro.d17419ae.mjs → ~fallback@_@astro.65227dd7.mjs} +12 -4
- package/packages/storefront/dist/server/entry.mjs +28 -11
- package/packages/storefront/dist/server/manifest.webmanifest +1 -1
- package/packages/storefront/dist/server/renderers.mjs +80 -25
- package/packages/storefront/package.json +9 -8
- package/packages/storefront/src/helpers/server-data.ts +14 -17
- package/packages/storefront/src/images/use-ssr-picture.ts +18 -3
- package/packages/storefront/src/lib/components/BannerPictures.astro +4 -4
- package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +2 -2
- package/packages/storefront/src/lib/components/SharedData.astro +1 -1
- package/packages/storefront/src/lib/composables/use-shared-data.ts +18 -3
- package/packages/storefront/src/lib/content.d.ts +36 -2
- package/packages/storefront/src/lib/layouts/Base.astro +3 -2
- package/packages/storefront/src/lib/layouts/use-page-main.ts +2 -2
- package/packages/storefront/src/lib/ssr-context.ts +1 -1
- package/packages/test-base/CHANGELOG.md +1 -0
- package/packages/test-base/README.md +7 -0
- package/packages/test-base/lib/endpoints.js +23 -0
- package/packages/test-base/lib/endpoints.js.map +1 -0
- package/packages/test-base/lib/index.js +4 -0
- package/packages/test-base/lib/index.js.map +1 -0
- package/packages/test-base/lib/playloads.js +14 -0
- package/packages/test-base/lib/playloads.js.map +1 -0
- package/packages/test-base/package.json +28 -0
- package/packages/test-base/payloads/calculate-shipping.json +37 -0
- package/packages/test-base/payloads/create-transaction.json +116 -0
- package/packages/test-base/payloads/list-payments.json +125 -0
- package/packages/test-base/src/endpoints.ts +37 -0
- package/packages/test-base/src/index.ts +3 -0
- package/packages/test-base/src/playloads.ts +24 -0
- package/packages/test-base/tsconfig.json +3 -0
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/.gitkeep +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/.gitkeep +0 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.8d2ea532.js +0 -1
- package/packages/storefront/dist/client/_astro/PitchBar.c2a2ad79.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.8572765c.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.4a105932.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.2400b065.js +0 -4
- package/packages/storefront/dist/client/_astro/_...slug_.a786e016.css +0 -1
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.48e557ba.js +0 -1
- package/packages/storefront/dist/client/_astro/client.9dbf6b61.js +0 -1
- package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
- package/packages/storefront/dist/client/_astro/headphone_22qtrt.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_247ud8.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1hoMcQ.webp +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1j5MXv.webp +0 -0
- package/packages/storefront/dist/client/_astro/img.7def76a1.js +0 -1
- package/packages/storefront/dist/client/_astro/index.c0c35ead.js +0 -1
- package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
- package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_29BEzB.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_2sykkb.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_HYj6i.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_Z18ANwS.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_ZK2FPz.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_pVNbE.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1EUYOa.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1Sqf3x.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1VeSii.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_2wFECM.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_7mg8W.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Kv492.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1DNkkN.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1IS4wy.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Zt4vbx.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1Bqr36.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1pj5UP.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_2dVuzq.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_HaXay.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z100iy0.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z2i1RBz.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_ZMRWqJ.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_mPQHw.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_xyq7d.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_1DkX0O.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_2uIqYp.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect89_Z1rGPGT.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_ZAjmIj.avif +0 -0
- package/packages/storefront/dist/client/~fallback.html +0 -98
- package/packages/storefront/dist/client/~index.html +0 -134
- package/packages/storefront/dist/server/images.dist.csv +0 -38
- package/packages/storefront/dist/server/images.src.csv +0 -11
- package/packages/storefront/dist/server/stylesheets.csv +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createAstro, a as createComponent, r as renderTemplate, m as maybeRenderHead, d as addAttribute, b as renderComponent } from '../astro.
|
|
2
|
-
import {
|
|
1
|
+
import { c as createAstro, a as createComponent, r as renderTemplate, m as maybeRenderHead, d as addAttribute, b as renderComponent } from '../astro.bb5b7191.mjs';
|
|
2
|
+
import { f as loadRouteContext, g as $$BaseHead, h as $$PageHeader, j as $$Base } from './_...slug_.astro.fd8a229f.mjs';
|
|
3
3
|
import 'path-to-regexp';
|
|
4
4
|
import 'cookie';
|
|
5
5
|
import '@astrojs/internal-helpers/path';
|
|
@@ -10,11 +10,19 @@ import 'node:tls';
|
|
|
10
10
|
import 'mime';
|
|
11
11
|
import 'string-width';
|
|
12
12
|
import 'html-escaper';
|
|
13
|
+
import 'node:fs/promises';
|
|
14
|
+
import 'node:path';
|
|
15
|
+
import 'node:url';
|
|
16
|
+
import 'http-cache-semantics';
|
|
17
|
+
import 'node:os';
|
|
18
|
+
import 'image-size';
|
|
19
|
+
import 'magic-string';
|
|
20
|
+
import 'node:stream';
|
|
13
21
|
import '@cloudcommerce/api';
|
|
14
22
|
import 'node:events';
|
|
15
|
-
import 'node:path';
|
|
16
23
|
import '@cloudcommerce/config';
|
|
17
24
|
import '@ecomplus/utils';
|
|
25
|
+
import 'ultrahtml';
|
|
18
26
|
/* empty css */import 'vue';
|
|
19
27
|
import '@vueuse/core';
|
|
20
28
|
import 'vue/server-renderer';
|
|
@@ -24,9 +32,13 @@ const $$Astro$1 = createAstro("https://ecom2-demo.web.app");
|
|
|
24
32
|
const $$Fallback = createComponent(async ($$result, $$props, $$slots) => {
|
|
25
33
|
const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
|
|
26
34
|
Astro2.self = $$Fallback;
|
|
27
|
-
return renderTemplate`${maybeRenderHead()}<main
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
return renderTemplate`${maybeRenderHead()}<main>
|
|
36
|
+
<h1>Error :/</h1>
|
|
37
|
+
<p class="instructions">
|
|
38
|
+
Check out the <code>src/pages</code> directory to get started.<br>
|
|
39
|
+
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
40
|
+
</p>
|
|
41
|
+
</main>`;
|
|
30
42
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Fallback.astro", void 0);
|
|
31
43
|
|
|
32
44
|
const $$Astro = createAstro("https://ecom2-demo.web.app");
|
|
@@ -39,7 +51,13 @@ const $$fallback = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
39
51
|
} catch (err) {
|
|
40
52
|
return err.astroResponse;
|
|
41
53
|
}
|
|
42
|
-
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}
|
|
54
|
+
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}>
|
|
55
|
+
${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "BaseHead", $$BaseHead, { "slot": "base-head" })}`, "default": ($$result2) => renderTemplate`
|
|
56
|
+
|
|
57
|
+
${renderComponent($$result2, "PageHeader", $$PageHeader, {})}
|
|
58
|
+
${renderComponent($$result2, "FallbackMain", $$Fallback, {})}
|
|
59
|
+
` })}
|
|
60
|
+
</html>`;
|
|
43
61
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/~fallback.astro", void 0);
|
|
44
62
|
|
|
45
63
|
const $$file = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/~fallback.astro";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
-
import './astro.
|
|
3
|
+
import './astro.bb5b7191.mjs';
|
|
4
4
|
import 'path-to-regexp';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import '@astrojs/internal-helpers/path';
|
|
@@ -14,14 +14,22 @@ import 'html-escaper';
|
|
|
14
14
|
import 'vue';
|
|
15
15
|
import 'vue/server-renderer';
|
|
16
16
|
import '@ecomplus/utils';
|
|
17
|
-
import './pages/_...slug_.astro.
|
|
17
|
+
import './pages/_...slug_.astro.fd8a229f.mjs';
|
|
18
|
+
import 'node:fs/promises';
|
|
19
|
+
import 'node:path';
|
|
20
|
+
import 'node:url';
|
|
21
|
+
import 'http-cache-semantics';
|
|
22
|
+
import 'node:os';
|
|
23
|
+
import 'image-size';
|
|
24
|
+
import 'magic-string';
|
|
25
|
+
import 'node:stream';
|
|
18
26
|
import '@cloudcommerce/api';
|
|
19
27
|
import 'node:events';
|
|
20
|
-
import 'node:path';
|
|
21
28
|
import '@cloudcommerce/config';
|
|
29
|
+
import 'ultrahtml';
|
|
22
30
|
/* empty css */import '@vueuse/core';
|
|
23
31
|
import '@headlessui/vue';
|
|
24
32
|
|
|
25
|
-
const page = () => import('./pages/~fallback.astro.
|
|
33
|
+
const page = () => import('./pages/~fallback.astro.7630c0d6.mjs');
|
|
26
34
|
|
|
27
35
|
export { page };
|
|
@@ -3,7 +3,7 @@ import { webcrypto } from 'node:crypto';
|
|
|
3
3
|
import { ByteLengthQueuingStrategy, CountQueuingStrategy, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, TransformStream, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter } from 'node:stream/web';
|
|
4
4
|
import { File, FormData, Headers, Request, Response, fetch } from 'undici';
|
|
5
5
|
import { setTimeout as setTimeout$1, clearTimeout as clearTimeout$1 } from 'node:timers';
|
|
6
|
-
import { N as NodeApp,
|
|
6
|
+
import { N as NodeApp, h as deserializeManifest } from './chunks/astro.bb5b7191.mjs';
|
|
7
7
|
import { Readable } from 'stream';
|
|
8
8
|
import https from 'https';
|
|
9
9
|
import path from 'node:path';
|
|
@@ -25,10 +25,17 @@ import 'html-escaper';
|
|
|
25
25
|
import 'vue';
|
|
26
26
|
import 'vue/server-renderer';
|
|
27
27
|
import '@ecomplus/utils';
|
|
28
|
-
import './chunks/pages/_...slug_.astro.
|
|
28
|
+
import './chunks/pages/_...slug_.astro.fd8a229f.mjs';
|
|
29
|
+
import 'node:fs/promises';
|
|
30
|
+
import 'http-cache-semantics';
|
|
31
|
+
import 'node:os';
|
|
32
|
+
import 'image-size';
|
|
33
|
+
import 'magic-string';
|
|
34
|
+
import 'node:stream';
|
|
29
35
|
import '@cloudcommerce/api';
|
|
30
36
|
import 'node:events';
|
|
31
37
|
import '@cloudcommerce/config';
|
|
38
|
+
import 'ultrahtml';
|
|
32
39
|
/* empty css */import '@vueuse/core';
|
|
33
40
|
import '@headlessui/vue';
|
|
34
41
|
|
|
@@ -2606,12 +2613,21 @@ function responseIterator(response) {
|
|
|
2606
2613
|
throw new Error("Unknown body type for responseIterator. Please pass a streamable response.");
|
|
2607
2614
|
}
|
|
2608
2615
|
|
|
2609
|
-
function nodeMiddleware_default(app,
|
|
2616
|
+
function nodeMiddleware_default(app, mode) {
|
|
2610
2617
|
return async function(...args) {
|
|
2611
2618
|
let error = null;
|
|
2612
|
-
let
|
|
2619
|
+
let locals;
|
|
2620
|
+
let [req, res, next] = args;
|
|
2621
|
+
if (mode === "middleware") {
|
|
2622
|
+
let { [3]: _locals } = args;
|
|
2623
|
+
locals = _locals;
|
|
2624
|
+
}
|
|
2613
2625
|
if (args[0] instanceof Error) {
|
|
2614
|
-
[error, req, res, next
|
|
2626
|
+
[error, req, res, next] = args;
|
|
2627
|
+
if (mode === "middleware") {
|
|
2628
|
+
let { [4]: _locals } = args;
|
|
2629
|
+
locals = _locals;
|
|
2630
|
+
}
|
|
2615
2631
|
if (error) {
|
|
2616
2632
|
if (next) {
|
|
2617
2633
|
return next(error);
|
|
@@ -2865,12 +2881,13 @@ const adapter = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
2865
2881
|
start
|
|
2866
2882
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
2867
2883
|
|
|
2868
|
-
const _page0 = () => import('./chunks/
|
|
2869
|
-
const _page1 = () => import('./chunks
|
|
2870
|
-
const _page2 = () => import('./chunks
|
|
2871
|
-
const _page3 = () => import('./chunks/
|
|
2872
|
-
const _page4 = () => import('./chunks/_
|
|
2873
|
-
const
|
|
2884
|
+
const _page0 = () => import('./chunks/endpoint@_@js.35807882.mjs');
|
|
2885
|
+
const _page1 = () => import('./chunks/index@_@astro.e5a61d6e.mjs');
|
|
2886
|
+
const _page2 = () => import('./chunks/~fallback@_@astro.65227dd7.mjs');
|
|
2887
|
+
const _page3 = () => import('./chunks/index@_@astro.477f5af1.mjs');
|
|
2888
|
+
const _page4 = () => import('./chunks/account@_@astro.0106855f.mjs');
|
|
2889
|
+
const _page5 = () => import('./chunks/_...d32bcc0c.mjs');const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.17.3_astro@2.10.14_sharp@0.32.5/node_modules/@astrojs/image/dist/endpoint.js", _page0],["src/pages/index.astro", _page1],["src/pages/~fallback.astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5]]);
|
|
2890
|
+
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.17.3_astro@2.10.14_sharp@0.32.5/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.36cd433d.css"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.36cd433d.css"}],"routeData":{"route":"/~fallback","type":"page","pattern":"^\\/~fallback\\/?$","segments":[[{"content":"~fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/~fallback.astro","pathname":"/~fallback","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.36cd433d.css"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","prerender":false,"_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-demo.web.app","base":"/","compressHTML":false,"markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true},"componentMetadata":[],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000empty-middleware":"_empty-middleware.mjs","/src/pages/app/account.astro":"chunks/pages/account.astro.3b21bff8.mjs","/src/pages/~fallback.astro":"chunks/pages/~fallback.astro.7630c0d6.mjs","\u0000@astro-page:../../node_modules/.pnpm/@astrojs+image@0.17.3_astro@2.10.14_sharp@0.32.5/node_modules/@astrojs/image/dist/endpoint@_@js":"chunks/endpoint@_@js.35807882.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.e5a61d6e.mjs","\u0000@astro-page:src/pages/~fallback@_@astro":"chunks/~fallback@_@astro.65227dd7.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.477f5af1.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.0106855f.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...d32bcc0c.mjs","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/SearchModal.vue":"_astro/SearchModal.cffd4c2d.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/CartSidebar.vue":"_astro/CartSidebar.eadba34f.js","~/components/PitchBar.vue":"_astro/PitchBar.7407eeaf.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.js","/astro/hoisted.js?q=0":"_astro/hoisted.572313d6.js","~/components/HeroSlider.vue":"_astro/HeroSlider.1f0524aa.js","~/components/ProductShelf.vue":"_astro/ProductShelf.763cd2ca.js","@astrojs/vue/client.js":"_astro/client.e6d9439a.js","~/components/ShopHeader.vue":"_astro/ShopHeader.126900a6.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.93857bfb.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_...slug_.36cd433d.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-5e0bf4e4.js","/_astro/Carousel.926668f2.js","/_astro/CartSidebar.eadba34f.js","/_astro/HeroSlider.1f0524aa.js","/_astro/PitchBar.7407eeaf.js","/_astro/Prices.562a32ab.js","/_astro/ProductShelf.763cd2ca.js","/_astro/SearchModal.cffd4c2d.js","/_astro/ShopHeader.126900a6.js","/_astro/_plugin-vue_export-helper.ee681fa8.js","/_astro/api.a2eda23e.js","/_astro/client.e6d9439a.js","/_astro/firebase-app.93857bfb.js","/_astro/format-money.923559cc.js","/_astro/hoisted.572313d6.js","/_astro/img.ec6ba316.js","/_astro/index.709ac149.js","/_astro/modules-info.48980668.js","/_astro/preload-helper.cf010ec4.js","/_astro/session-utm.744b0db3.js","/_astro/workbox-window.prod.es5.a7b12eab.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner2.webp","/img/uploads/ecom-icon.png","/img/uploads/headphone.webp","/img/uploads/logo.png","/img/uploads/og-image.png","/img/uploads/passion.webp","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.webp"]}), {
|
|
2874
2891
|
pageMap,
|
|
2875
2892
|
renderers,
|
|
2876
2893
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"E-Com Plus demoStore","short_name":"E-Com Plus demoStore","start_url":"/","display":"standalone","background_color":"#f5f6fa","lang":"en","scope":"/","description":"
|
|
1
|
+
{"name":"E-Com Plus demoStore","short_name":"E-Com Plus demoStore","start_url":"/","display":"standalone","background_color":"#f5f6fa","lang":"en","scope":"/","description":"E-Com Plus é a plataforma de e-commerce API-first desenhada para modelos de negócio e experiências de compra únicas. Flexibilidade do código aberto com facilidade de SaaS para que você comece rápido, venda do seu jeito e escale sem limitações.","theme_color":"#37003c","crossorigin":"use-credentials","icons":[{"src":"/_image?f=png&w=192&h=192&href=%2Fimg%2Fuploads%2Fecom-icon.png&V=_","sizes":"192x192","type":"image/png"},{"src":"/_image?f=png&w=512&h=512&href=%2Fimg%2Fuploads%2Fecom-icon.png&V=_","sizes":"512x512","type":"image/png"},{"src":"/img/uploads/ecom-icon.png","sizes":"512x512","type":"image/png","purpose":"any maskable"}]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useSSRContext, defineComponent, computed, mergeProps, h, createSSRApp } from 'vue';
|
|
3
|
-
import { ssrRenderSlotInner,
|
|
1
|
+
import { i as server_default } from './chunks/astro.bb5b7191.mjs';
|
|
2
|
+
import { useSSRContext, defineComponent, computed, createVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, h, createSSRApp } from 'vue';
|
|
3
|
+
import { ssrRenderSlotInner, ssrRenderVNode, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, renderToString } from 'vue/server-renderer';
|
|
4
4
|
import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
|
|
5
|
-
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.
|
|
5
|
+
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.fd8a229f.mjs';
|
|
6
6
|
import 'path-to-regexp';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import '@astrojs/internal-helpers/path';
|
|
@@ -13,14 +13,22 @@ import 'node:tls';
|
|
|
13
13
|
import 'mime';
|
|
14
14
|
import 'string-width';
|
|
15
15
|
import 'html-escaper';
|
|
16
|
+
import 'node:fs/promises';
|
|
17
|
+
import 'node:path';
|
|
18
|
+
import 'node:url';
|
|
19
|
+
import 'http-cache-semantics';
|
|
20
|
+
import 'node:os';
|
|
21
|
+
import 'image-size';
|
|
22
|
+
import 'magic-string';
|
|
23
|
+
import 'node:stream';
|
|
16
24
|
import '@cloudcommerce/api';
|
|
17
25
|
import 'node:events';
|
|
18
|
-
import 'node:path';
|
|
19
26
|
import '@cloudcommerce/config';
|
|
27
|
+
import 'ultrahtml';
|
|
20
28
|
/* empty css */import '@vueuse/core';
|
|
21
29
|
import '@headlessui/vue';
|
|
22
30
|
|
|
23
|
-
const _sfc_main$
|
|
31
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
24
32
|
__name: "Fade",
|
|
25
33
|
props: {
|
|
26
34
|
speed: { default: "default" },
|
|
@@ -155,18 +163,18 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
155
163
|
return __returned__;
|
|
156
164
|
}
|
|
157
165
|
});
|
|
158
|
-
function _sfc_ssrRender$
|
|
166
|
+
function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
159
167
|
ssrRenderSlotInner(_ctx.$slots, "default", {}, null, _push, _parent, null, true);
|
|
160
168
|
}
|
|
161
|
-
const _sfc_setup$
|
|
162
|
-
_sfc_main$
|
|
169
|
+
const _sfc_setup$3 = _sfc_main$3.setup;
|
|
170
|
+
_sfc_main$3.setup = (props, ctx) => {
|
|
163
171
|
const ssrContext = useSSRContext();
|
|
164
172
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Fade.vue");
|
|
165
|
-
return _sfc_setup$
|
|
173
|
+
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
166
174
|
};
|
|
167
|
-
const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
175
|
+
const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["ssrRender", _sfc_ssrRender$3]]);
|
|
168
176
|
|
|
169
|
-
const _sfc_main$
|
|
177
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
170
178
|
__name: "ALink",
|
|
171
179
|
props: {
|
|
172
180
|
href: {},
|
|
@@ -176,6 +184,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
176
184
|
__expose();
|
|
177
185
|
const props = __props;
|
|
178
186
|
const linkTarget = computed(() => {
|
|
187
|
+
if (!props.href)
|
|
188
|
+
return void 0;
|
|
179
189
|
if (props.target)
|
|
180
190
|
return props.target;
|
|
181
191
|
if (props.href.startsWith("http")) {
|
|
@@ -190,24 +200,33 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
190
200
|
return __returned__;
|
|
191
201
|
}
|
|
192
202
|
});
|
|
193
|
-
function _sfc_ssrRender$
|
|
194
|
-
_push(
|
|
203
|
+
function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
204
|
+
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.href ? "a" : "span"), mergeProps({
|
|
195
205
|
href: $props.href,
|
|
196
206
|
target: $setup.linkTarget,
|
|
197
207
|
rel: $setup.linkTarget === "_blank" ? "noopener" : void 0
|
|
198
|
-
}, _attrs)
|
|
199
|
-
|
|
200
|
-
|
|
208
|
+
}, _attrs), {
|
|
209
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
210
|
+
if (_push2) {
|
|
211
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
|
|
212
|
+
} else {
|
|
213
|
+
return [
|
|
214
|
+
renderSlot(_ctx.$slots, "default")
|
|
215
|
+
];
|
|
216
|
+
}
|
|
217
|
+
}),
|
|
218
|
+
_: 3
|
|
219
|
+
}), _parent);
|
|
201
220
|
}
|
|
202
|
-
const _sfc_setup$
|
|
203
|
-
_sfc_main$
|
|
221
|
+
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
222
|
+
_sfc_main$2.setup = (props, ctx) => {
|
|
204
223
|
const ssrContext = useSSRContext();
|
|
205
224
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/ALink.vue");
|
|
206
|
-
return _sfc_setup$
|
|
225
|
+
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
207
226
|
};
|
|
208
|
-
const ALink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
227
|
+
const ALink = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$2]]);
|
|
209
228
|
|
|
210
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
229
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
211
230
|
__name: "AImg",
|
|
212
231
|
props: {
|
|
213
232
|
picture: {},
|
|
@@ -240,16 +259,51 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
240
259
|
return __returned__;
|
|
241
260
|
}
|
|
242
261
|
});
|
|
243
|
-
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
262
|
+
function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
244
263
|
_push(`<img${ssrRenderAttrs(mergeProps($setup.attrs, _attrs))}>`);
|
|
245
264
|
}
|
|
265
|
+
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
266
|
+
_sfc_main$1.setup = (props, ctx) => {
|
|
267
|
+
const ssrContext = useSSRContext();
|
|
268
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/AImg.vue");
|
|
269
|
+
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
270
|
+
};
|
|
271
|
+
const AImg = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1]]);
|
|
272
|
+
|
|
273
|
+
const rowClassName = "bg-gray-200 rounded-md dark:bg-gray-700";
|
|
274
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
275
|
+
__name: "Skeleton",
|
|
276
|
+
props: {
|
|
277
|
+
isBold: { type: Boolean },
|
|
278
|
+
isLarge: { type: Boolean }
|
|
279
|
+
},
|
|
280
|
+
setup(__props, { expose: __expose }) {
|
|
281
|
+
__expose();
|
|
282
|
+
const props = __props;
|
|
283
|
+
const firstRowClassName = computed(() => {
|
|
284
|
+
return `${rowClassName} ${props.isBold ? "h-8 mb-6" : "h-2.5 mb-4"}`;
|
|
285
|
+
});
|
|
286
|
+
const nextRowsClassName = computed(() => {
|
|
287
|
+
return `${rowClassName} ${props.isBold ? "h-5 mb-4" : "h-2 mb-2.5"}`;
|
|
288
|
+
});
|
|
289
|
+
const __returned__ = { props, rowClassName, firstRowClassName, nextRowsClassName };
|
|
290
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
291
|
+
return __returned__;
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
295
|
+
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
296
|
+
role: "status",
|
|
297
|
+
class: ["animate-pulse", $props.isLarge ? "max-w-4xl" : "max-w-sm"]
|
|
298
|
+
}, _attrs))}><div class="${ssrRenderClass([$setup.firstRowClassName, $props.isLarge ? "w-96" : "w-48"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[680px]" : "max-w-[340px]"])}"></div><div class="${ssrRenderClass($setup.nextRowsClassName)}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[660px]" : "max-w-[330px]"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[600px]" : "max-w-[300px]"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[720px]" : "max-w-[360px]"])}"></div><span class="sr-only">Loading...</span></div>`);
|
|
299
|
+
}
|
|
246
300
|
const _sfc_setup = _sfc_main.setup;
|
|
247
301
|
_sfc_main.setup = (props, ctx) => {
|
|
248
302
|
const ssrContext = useSSRContext();
|
|
249
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/
|
|
303
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Skeleton.vue");
|
|
250
304
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
251
305
|
};
|
|
252
|
-
const
|
|
306
|
+
const Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
253
307
|
|
|
254
308
|
const formatPercentage = (value, digits = 1) => {
|
|
255
309
|
return Number.isInteger(value) ? `${value}%` : `${value.toFixed(digits)}%`;
|
|
@@ -270,6 +324,7 @@ const createApp = (app) => {
|
|
|
270
324
|
app.component("Fade", Fade);
|
|
271
325
|
app.component("ALink", ALink);
|
|
272
326
|
app.component("AImg", AImg);
|
|
327
|
+
app.component("Skeleton", Skeleton);
|
|
273
328
|
};
|
|
274
329
|
|
|
275
330
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.26.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -30,29 +30,30 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@astrojs/image": "0.17.3",
|
|
33
|
-
"@astrojs/node": "5.3.
|
|
33
|
+
"@astrojs/node": "5.3.6",
|
|
34
34
|
"@astrojs/vue": "2.2.1",
|
|
35
35
|
"@cloudcommerce/api": "workspace:*",
|
|
36
36
|
"@cloudcommerce/config": "workspace:*",
|
|
37
37
|
"@cloudcommerce/i18n": "workspace:*",
|
|
38
38
|
"@ecomplus/utils": "1.5.0-rc.5",
|
|
39
39
|
"@fastify/deepmerge": "^1.3.0",
|
|
40
|
-
"@headlessui/vue": "^1.7.
|
|
40
|
+
"@headlessui/vue": "^1.7.16",
|
|
41
41
|
"@iconify-json/fa6-brands": "^1.1.13",
|
|
42
42
|
"@iconify-json/heroicons": "^1.1.12",
|
|
43
43
|
"@iconify-json/logos": "^1.1.34",
|
|
44
44
|
"@vite-pwa/astro": "^0.1.1",
|
|
45
|
-
"@vueuse/core": "10.
|
|
46
|
-
"astro": "2.10.
|
|
45
|
+
"@vueuse/core": "10.4.1",
|
|
46
|
+
"astro": "2.10.14",
|
|
47
|
+
"astro-capo": "^0.0.1",
|
|
47
48
|
"chroma-js": "^2.4.2",
|
|
48
49
|
"dotenv": "^16.3.1",
|
|
49
|
-
"firebase": "^10.
|
|
50
|
+
"firebase": "^10.3.0",
|
|
50
51
|
"image-size": "^1.0.2",
|
|
51
52
|
"mime": "^3.0.0",
|
|
52
53
|
"semver": "^7.5.4",
|
|
53
|
-
"sharp": "^0.32.
|
|
54
|
+
"sharp": "^0.32.5",
|
|
54
55
|
"tailwindcss": "^3.3.3",
|
|
55
|
-
"unocss": "^0.55.
|
|
56
|
+
"unocss": "^0.55.3",
|
|
56
57
|
"vite": "^4.4.9",
|
|
57
58
|
"vite-plugin-pwa": "^0.16.4",
|
|
58
59
|
"vue": "^3.3.4"
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
const {
|
|
2
|
-
settings,
|
|
3
|
-
apiContext,
|
|
4
|
-
} = globalThis.$storefront;
|
|
5
|
-
|
|
6
1
|
const networkNames = [
|
|
7
2
|
'whatsapp',
|
|
8
3
|
'instagram',
|
|
@@ -17,16 +12,18 @@ const networkNames = [
|
|
|
17
12
|
export type NetworkName = typeof networkNames[number];
|
|
18
13
|
|
|
19
14
|
const socialNetworks: Partial<Record<NetworkName, string>> = {};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
const setSocialNetworks = () => {
|
|
16
|
+
const { settings } = globalThis.$storefront;
|
|
17
|
+
networkNames.forEach((network: NetworkName) => {
|
|
18
|
+
if (settings[network]) {
|
|
19
|
+
socialNetworks[network] = settings[network];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
if (import.meta.env.SSR) {
|
|
24
|
+
global.$storefront.onLoad(() => setSocialNetworks());
|
|
25
|
+
} else {
|
|
26
|
+
setSocialNetworks();
|
|
27
|
+
}
|
|
31
28
|
|
|
32
|
-
export
|
|
29
|
+
export { socialNetworks };
|
|
@@ -63,10 +63,25 @@ const useSSRPicture = async (params: UsePictureParams) => {
|
|
|
63
63
|
}
|
|
64
64
|
} else if ((!attrs.width || !attrs.height) && typeof src === 'string') {
|
|
65
65
|
const { width, height } = tryImageSize(src);
|
|
66
|
-
if (height) {
|
|
66
|
+
if (width && height) {
|
|
67
67
|
aspectRatio = getAspectRatio({ width, height }, tryImageSize);
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
let hasSplicedWidths = false;
|
|
69
|
+
for (let i = widths.length - 1; i >= 0; i--) {
|
|
70
|
+
if (widths[i] > width) {
|
|
71
|
+
widths.splice(i, 1);
|
|
72
|
+
hasSplicedWidths = true;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (hasSplicedWidths) {
|
|
76
|
+
attrs.width = width;
|
|
77
|
+
attrs.height = height;
|
|
78
|
+
if (!widths.find((w) => w === width)) {
|
|
79
|
+
widths.push(width);
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
attrs.width = Math.max(...widths);
|
|
83
|
+
attrs.height = Math.round(attrs.width / aspectRatio);
|
|
84
|
+
}
|
|
70
85
|
}
|
|
71
86
|
}
|
|
72
87
|
let sizes: string = propSizes || '';
|
|
@@ -18,8 +18,8 @@ const {
|
|
|
18
18
|
subtitle,
|
|
19
19
|
buttonText,
|
|
20
20
|
index,
|
|
21
|
-
class: className = 'max-w-screen-2xl',
|
|
22
|
-
mobileClass = 'max-w-screen-sm',
|
|
21
|
+
class: className = 'max-w-screen-sm sm:max-w-[828px] md:max-w-screen-2xl',
|
|
22
|
+
mobileClass = 'max-w-screen-sm sm:max-w-screen-lg',
|
|
23
23
|
} = Astro.props as Props;
|
|
24
24
|
const hasHeader = title || subtitle || buttonText;
|
|
25
25
|
let { widths, mobileWidths } = Astro.props;
|
|
@@ -27,14 +27,14 @@ if (!widths?.length) {
|
|
|
27
27
|
if (mobileImg) {
|
|
28
28
|
widths = [1536, 2048];
|
|
29
29
|
} else {
|
|
30
|
-
widths = [
|
|
30
|
+
widths = [640, 828, 1536, 2048];
|
|
31
31
|
if (hasHeader) {
|
|
32
32
|
widths = widths.map((w) => (w / 2));
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
if (!mobileWidths?.length) {
|
|
37
|
-
mobileWidths = [
|
|
37
|
+
mobileWidths = [640, 1024];
|
|
38
38
|
}
|
|
39
39
|
---
|
|
40
40
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { SettingsContent } from '@@sf/content';
|
|
3
3
|
import { computed } from 'vue';
|
|
4
4
|
|
|
5
5
|
export interface Props {
|
|
6
6
|
as?: string;
|
|
7
|
-
flag:
|
|
7
|
+
flag: Exclude<SettingsContent['payment_methods'], undefined>[number];
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
2
|
+
|
|
1
3
|
export interface Props {
|
|
2
4
|
field: string;
|
|
3
|
-
value
|
|
5
|
+
value?: any;
|
|
4
6
|
}
|
|
5
7
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
+
const emitter = new EventEmitter();
|
|
9
|
+
|
|
10
|
+
const useSharedData = async ({ field, value }: Props) => {
|
|
11
|
+
const $data = global.$storefront.data;
|
|
12
|
+
if (value) {
|
|
13
|
+
$data[field] = value;
|
|
14
|
+
emitter.emit(field, value);
|
|
15
|
+
} else if ($data[field]) {
|
|
16
|
+
value = $data[field];
|
|
17
|
+
} else {
|
|
18
|
+
value = await new Promise((resolve) => {
|
|
19
|
+
emitter.once(field, resolve);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
8
22
|
return {
|
|
23
|
+
value,
|
|
9
24
|
inlineClientJS: `
|
|
10
25
|
window.$storefront.data['${field}'] = ${JSON.stringify(value)};`,
|
|
11
26
|
};
|