cloudcommerce 0.6.7 → 0.6.8
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/renovate.json +1 -1
- package/CHANGELOG.md +16 -0
- package/ecomplus-stores/monocard/.devcontainer/devcontainer.json +3 -0
- package/ecomplus-stores/monocard/.github/workflows/build-and-deploy.yml +4 -9
- package/ecomplus-stores/monocard/.vscode/launch.json +11 -0
- 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/header.json +16 -28
- package/ecomplus-stores/monocard/functions/ssr/content/settings.json +39 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +14 -18
- package/ecomplus-stores/monocard/functions/ssr/public/assets/lotties/img_1.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/lotties/phone-nfc.json +1 -1
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-arcelor-mittal.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-azul.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-banco-pan.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-brinks.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-mastercard.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-pfizer.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-prudential.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-unimed.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +104 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/CasesGrid.astro +49 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +8 -8
- package/ecomplus-stores/monocard/functions/ssr/src/components/MotionFade.vue +17 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/PitchBar.vue +61 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/Prices.vue +112 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/SearchModal.vue +6 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +97 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +92 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenav.vue +65 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +78 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderButtons.vue +1 -21
- package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderNav.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/env.d.ts +2 -1
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +11 -20
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +15 -2
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +53 -32
- package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +2 -2
- package/ecomplus-stores/monocard/functions/ssr/src/pages/_vue.ts +8 -1
- package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +0 -2
- package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +4 -2
- package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +1 -1
- package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +29 -1
- package/ecomplus-stores/monocard/functions/ssr/tsconfig.json +0 -4
- package/ecomplus-stores/monocard/functions/ssr/uno.config.cjs +2 -1
- package/ecomplus-stores/monocard/package.json +1 -1
- package/ecomplus-stores/monocard/scripts/install.sh +1 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/package.json +0 -8
- package/package.json +9 -9
- package/packages/api/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/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/infinitepay/package.json +2 -2
- package/packages/apps/jadlog/package.json +2 -2
- package/packages/apps/loyalty-points/package.json +1 -1
- 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/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/package.json +2 -2
- 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 +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +3 -3
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +6 -6
- package/packages/storefront/dist/client/_astro/PitchBar.db7cd775.js +1 -0
- package/packages/storefront/dist/client/_astro/{Prices.7368883b.js → Prices.55399c72.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductCard.b9f8f3e7.js → ProductCard.7e891c08.js} +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.301e109b.js +4 -0
- package/packages/storefront/dist/client/_astro/_...slug_.0607a6ef.css +1 -0
- package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.3dfd3410.js → _plugin-vue_export-helper.77ed7c18.js} +1 -1
- package/packages/storefront/dist/client/_astro/client.0de2f274.js +1 -0
- package/packages/storefront/dist/client/_astro/{format-money.e75b6ce1.js → format-money.ab6b71eb.js} +1 -1
- package/packages/storefront/dist/client/_astro/index.16f33784.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.6e650119.js → modules-info.06ac0727.js} +1 -1
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.d2f39f33.js +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/client/workbox-e0d788d4.js +1 -0
- package/packages/storefront/dist/server/chunks/{astro.a9f695c0.mjs → astro.2e59789d.mjs} +7 -18
- package/packages/storefront/dist/server/chunks/pages/{all.571056bd.mjs → all.726ca7f4.mjs} +19 -14
- package/packages/storefront/dist/server/entry.mjs +10 -16
- package/packages/storefront/package.json +10 -10
- package/packages/storefront/src/lib/assets/base.css +5 -0
- package/packages/storefront/src/lib/pages/_vue.ts +6 -2
- package/packages/storefront/src/lib/ssr/Picture.astro +13 -4
- package/packages/storefront/src/lib/ssr-context.ts +1 -1
- package/packages/storefront/src/vue-globals.d.ts +2 -0
- package/packages/types/index.ts +1 -0
- package/packages/types/package.json +1 -1
- package/pnpm-workspace.yaml +3 -3
- package/ecomplus-stores/monocard/functions/ssr/content/contacts.json +0 -13
- package/ecomplus-stores/monocard/functions/ssr/content/info.json +0 -18
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/HowItWorksAccordion.vue +0 -32
- package/ecomplus-stores/monocard/functions/ssr/src/components/TheHeader.vue +0 -42
- package/ecomplus-stores/monocard/functions/ssr/src/components/TopBar.vue +0 -10
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/PagesHeader.astro +0 -51
- package/packages/storefront/dist/client/_astro/PitchBar.16431255.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.7967a383.js +0 -4
- package/packages/storefront/dist/client/_astro/_...slug_.61014c4c.css +0 -1
- package/packages/storefront/dist/client/_astro/client.3ab4cffd.js +0 -1
- package/packages/storefront/dist/client/_astro/index.140ec818.js +0 -1
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.b4764bdb.js +0 -1
- package/packages/storefront/dist/client/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/workbox-e2ee76b5.js +0 -1
- /package/ecomplus-stores/monocard/functions/ssr/content/{social.json → metatags.json} +0 -0
- /package/ecomplus-stores/monocard/functions/ssr/src/{pages/monocard.astro → layouts/Checkout.astro} +0 -0
|
@@ -9,7 +9,7 @@ import 'node:os';
|
|
|
9
9
|
import sizeOf from 'image-size';
|
|
10
10
|
import 'magic-string';
|
|
11
11
|
import 'node:stream';
|
|
12
|
-
import { c as createAstro, a as createComponent, r as renderTemplate, b as addAttribute, u as unescapeHTML,
|
|
12
|
+
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.2e59789d.mjs';
|
|
13
13
|
import api from '@cloudcommerce/api';
|
|
14
14
|
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';
|
|
15
15
|
import { img, price, formatMoney, nickname, onPromotion } from '@ecomplus/utils';
|
|
@@ -311,7 +311,7 @@ const getCMS = () => {
|
|
|
311
311
|
};
|
|
312
312
|
|
|
313
313
|
const _getConfig = () => {
|
|
314
|
-
const { VITE_ECOM_STORE_ID } = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true,"SITE":"\"https://ecom2-002.web.app\""
|
|
314
|
+
const { VITE_ECOM_STORE_ID } = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true,"SSR":true,"SITE":"\"https://ecom2-002.web.app\""},{ECOM_STORE_ID:process.env.ECOM_STORE_ID,})) || process.env;
|
|
315
315
|
if (VITE_ECOM_STORE_ID) {
|
|
316
316
|
config.set({ storeId: Number(VITE_ECOM_STORE_ID) });
|
|
317
317
|
}
|
|
@@ -470,7 +470,7 @@ const loadPageContext = async (Astro, {
|
|
|
470
470
|
return pageContext;
|
|
471
471
|
};
|
|
472
472
|
|
|
473
|
-
const pwaInfo =
|
|
473
|
+
const pwaInfo = {"pwaInDevEnvironment":false,"webManifest":{"href":"/manifest.webmanifest","useCredentials":false,"linkTag":"<link rel=\"manifest\" href=\"/manifest.webmanifest\">"}};
|
|
474
474
|
|
|
475
475
|
function isRemoteImage(src) {
|
|
476
476
|
return /^(https?:)?\/\//.test(src);
|
|
@@ -569,7 +569,7 @@ async function getImage$1(transform) {
|
|
|
569
569
|
}
|
|
570
570
|
const resolved = await resolveTransform(transform);
|
|
571
571
|
const attributes = await loader.getImageAttributes(resolved);
|
|
572
|
-
const isDev = (_b = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true,"SITE":"\"https://ecom2-002.web.app\""
|
|
572
|
+
const isDev = (_b = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true,"SSR":true,"SITE":"\"https://ecom2-002.web.app\""},{SSR:true,}))) == null ? void 0 : _b.DEV;
|
|
573
573
|
const isLocalImage = !isRemoteImage(resolved.src);
|
|
574
574
|
const _loader = isDev && isLocalImage ? globalThis.astroImage.defaultLoader : loader;
|
|
575
575
|
if (!_loader) {
|
|
@@ -661,7 +661,7 @@ async function getPicture(params) {
|
|
|
661
661
|
const tryImageSize = (src) => {
|
|
662
662
|
let dimensions = {};
|
|
663
663
|
if (typeof src === "string" && src.startsWith("/")) {
|
|
664
|
-
const { STOREFRONT_BASE_DIR } = Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true,"SITE":"\"https://ecom2-002.web.app\""
|
|
664
|
+
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 });
|
|
665
665
|
try {
|
|
666
666
|
dimensions = sizeOf(resolve$1(STOREFRONT_BASE_DIR, `public${src}`));
|
|
667
667
|
} catch (e) {
|
|
@@ -772,8 +772,8 @@ ${cmsMetatags?.fb_app_id && renderTemplate`<meta property="fb:app_id"${addAttrib
|
|
|
772
772
|
${cmsMetatags?.twitter_username && renderTemplate`<meta name="twitter:site"${addAttribute(cmsMetatags.twitter_username, "content")}>`}
|
|
773
773
|
<meta name="ecom-store-id"${addAttribute(String(storeId), "content")}>
|
|
774
774
|
|
|
775
|
-
${pwaInfo }
|
|
776
|
-
${renderTemplate`<link rel="manifest" href="/manifest.webmanifest">`}`;
|
|
775
|
+
${pwaInfo && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(pwaInfo.webManifest.linkTag)}` })}`}
|
|
776
|
+
${!pwaInfo && !false && renderTemplate`<link rel="manifest" href="/manifest.webmanifest">`}`;
|
|
777
777
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro");
|
|
778
778
|
|
|
779
779
|
var __freeze$1 = Object.freeze;
|
|
@@ -963,8 +963,13 @@ const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
963
963
|
const Astro2 = $$result.createAstro($$Astro$a, $$props, $$slots);
|
|
964
964
|
Astro2.self = $$Picture;
|
|
965
965
|
const props = Astro2.props;
|
|
966
|
-
if (!props.aspectRatio && typeof props.src === "string") {
|
|
967
|
-
|
|
966
|
+
if ((!props.width || !props.height) && !props.aspectRatio && typeof props.src === "string") {
|
|
967
|
+
const { width, height } = tryImageSize(props.src);
|
|
968
|
+
if (height) {
|
|
969
|
+
props.aspectRatio = getAspectRatio({ width, height });
|
|
970
|
+
props.width = width;
|
|
971
|
+
props.height = height;
|
|
972
|
+
}
|
|
968
973
|
}
|
|
969
974
|
return renderTemplate`${renderComponent($$result, "Picture", $$Picture$1, { ...props })}`;
|
|
970
975
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/ssr/Picture.astro");
|
|
@@ -2183,7 +2188,7 @@ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
2183
2188
|
default: withCtx((_, _push3, _parent3, _scopeId2) => {
|
|
2184
2189
|
if (_push3) {
|
|
2185
2190
|
_push3(ssrRenderComponent($setup["PopoverPanel"], {
|
|
2186
|
-
class: ["absolute z-20 top-3 left-1/2 -translate-x-1/2 !transform px-6 py-4 rounded-md shadow bg-white text-base text-base-700", $setup.countMenuCols === 1 ? "w-60" : $setup.countMenuCols === 2 ? `w-screen ${$setup.categoryPicture ? "max-w-lg" : "max-w-sm"}` : $setup.countMenuCols === 3 ? `w-screen ${$setup.categoryPicture ? "max-w-xl" : "max-w-md"}` : $setup.countMenuCols < 6 ? "w-screen max-w-3xl" : "w-screen max-w-5xl"]
|
|
2191
|
+
class: ["absolute z-20 top-3 left-1/2 -translate-x-1/2 !transform px-6 py-4 rounded-md backdrop-blur-md shadow bg-white/80 text-base text-base-700", $setup.countMenuCols === 1 ? "w-60" : $setup.countMenuCols === 2 ? `w-screen ${$setup.categoryPicture ? "max-w-lg" : "max-w-sm"}` : $setup.countMenuCols === 3 ? `w-screen ${$setup.categoryPicture ? "max-w-xl" : "max-w-md"}` : $setup.countMenuCols < 6 ? "w-screen max-w-3xl" : "w-screen max-w-5xl"]
|
|
2187
2192
|
}, {
|
|
2188
2193
|
default: withCtx((_2, _push4, _parent4, _scopeId3) => {
|
|
2189
2194
|
if (_push4) {
|
|
@@ -2288,7 +2293,7 @@ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
2288
2293
|
} else {
|
|
2289
2294
|
return [
|
|
2290
2295
|
createVNode($setup["PopoverPanel"], {
|
|
2291
|
-
class: ["absolute z-20 top-3 left-1/2 -translate-x-1/2 !transform px-6 py-4 rounded-md shadow bg-white text-base text-base-700", $setup.countMenuCols === 1 ? "w-60" : $setup.countMenuCols === 2 ? `w-screen ${$setup.categoryPicture ? "max-w-lg" : "max-w-sm"}` : $setup.countMenuCols === 3 ? `w-screen ${$setup.categoryPicture ? "max-w-xl" : "max-w-md"}` : $setup.countMenuCols < 6 ? "w-screen max-w-3xl" : "w-screen max-w-5xl"]
|
|
2296
|
+
class: ["absolute z-20 top-3 left-1/2 -translate-x-1/2 !transform px-6 py-4 rounded-md backdrop-blur-md shadow bg-white/80 text-base text-base-700", $setup.countMenuCols === 1 ? "w-60" : $setup.countMenuCols === 2 ? `w-screen ${$setup.categoryPicture ? "max-w-lg" : "max-w-sm"}` : $setup.countMenuCols === 3 ? `w-screen ${$setup.categoryPicture ? "max-w-xl" : "max-w-md"}` : $setup.countMenuCols < 6 ? "w-screen max-w-3xl" : "w-screen max-w-5xl"]
|
|
2292
2297
|
}, {
|
|
2293
2298
|
default: withCtx(() => [
|
|
2294
2299
|
createVNode("div", { class: "flex gap-6 w-full" }, [
|
|
@@ -2373,7 +2378,7 @@ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
2373
2378
|
createVNode(_component_Fade, null, {
|
|
2374
2379
|
default: withCtx(() => [
|
|
2375
2380
|
createVNode($setup["PopoverPanel"], {
|
|
2376
|
-
class: ["absolute z-20 top-3 left-1/2 -translate-x-1/2 !transform px-6 py-4 rounded-md shadow bg-white text-base text-base-700", $setup.countMenuCols === 1 ? "w-60" : $setup.countMenuCols === 2 ? `w-screen ${$setup.categoryPicture ? "max-w-lg" : "max-w-sm"}` : $setup.countMenuCols === 3 ? `w-screen ${$setup.categoryPicture ? "max-w-xl" : "max-w-md"}` : $setup.countMenuCols < 6 ? "w-screen max-w-3xl" : "w-screen max-w-5xl"]
|
|
2381
|
+
class: ["absolute z-20 top-3 left-1/2 -translate-x-1/2 !transform px-6 py-4 rounded-md backdrop-blur-md shadow bg-white/80 text-base text-base-700", $setup.countMenuCols === 1 ? "w-60" : $setup.countMenuCols === 2 ? `w-screen ${$setup.categoryPicture ? "max-w-lg" : "max-w-sm"}` : $setup.countMenuCols === 3 ? `w-screen ${$setup.categoryPicture ? "max-w-xl" : "max-w-md"}` : $setup.countMenuCols < 6 ? "w-screen max-w-3xl" : "w-screen max-w-5xl"]
|
|
2377
2382
|
}, {
|
|
2378
2383
|
default: withCtx(() => [
|
|
2379
2384
|
createVNode("div", { class: "flex gap-6 w-full" }, [
|
|
@@ -2512,7 +2517,7 @@ function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
2512
2517
|
_: 2
|
|
2513
2518
|
}, _parent));
|
|
2514
2519
|
} else {
|
|
2515
|
-
_push(`<a${ssrRenderAttr("href", `/${categoryTree.slug}`)} class="hover:text-primary hover:underline
|
|
2520
|
+
_push(`<a${ssrRenderAttr("href", `/${categoryTree.slug}`)} class="${ssrRenderClass([$props.inlineMenuTrees.length < 7 ? "decoration-2" : null, "hover:text-primary hover:underline"])}"><h3 class="inline">${ssrInterpolate(categoryTree.name)}</h3></a>`);
|
|
2516
2521
|
}
|
|
2517
2522
|
_push(`</li>`);
|
|
2518
2523
|
});
|
|
@@ -3180,7 +3185,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3180
3185
|
function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3181
3186
|
_push(`<header${ssrRenderAttrs(mergeProps({
|
|
3182
3187
|
ref: "header",
|
|
3183
|
-
class: ["top-0 z-50 transition-colors", [
|
|
3188
|
+
class: ["relative top-0 z-50 transition-colors", [
|
|
3184
3189
|
$setup.isSticky && !$setup.isSidenavOpen ? "bg-white/80" : "bg-white",
|
|
3185
3190
|
$setup.isSticky ? "backdrop-blur-md shadow py-2 md:py-3" : "py-3 sm:py-4 md:py-5"
|
|
3186
3191
|
]]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
2
|
import { ReadableStream, ByteLengthQueuingStrategy, CountQueuingStrategy, ReadableByteStreamController, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, TransformStream, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter } from 'node:stream/web';
|
|
3
|
-
import
|
|
3
|
+
import { File as File$1, Headers, Request, Response, fetch } from 'undici';
|
|
4
4
|
import { setTimeout as setTimeout$1, clearTimeout as clearTimeout$1 } from 'node:timers';
|
|
5
|
-
import { N as NodeApp, g as server_default, h as deserializeManifest } from './chunks/astro.
|
|
5
|
+
import { N as NodeApp, g as server_default, h as deserializeManifest } from './chunks/astro.2e59789d.mjs';
|
|
6
6
|
import { Readable } from 'stream';
|
|
7
7
|
import https from 'https';
|
|
8
8
|
import path from 'path';
|
|
@@ -14,7 +14,7 @@ import enableDestroy from 'server-destroy';
|
|
|
14
14
|
import { defineComponent, computed, useSSRContext, mergeProps, h as h$2, createSSRApp } from 'vue';
|
|
15
15
|
import { ssrRenderSlotInner, ssrRenderAttrs, ssrRenderSlot, renderToString } from 'vue/server-renderer';
|
|
16
16
|
import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
|
|
17
|
-
/* empty css */import { _ as _export_sfc, a as _page0, b as _page1, c as _page2, d as _page3, e as _page4, f as _page5 } from './chunks/pages/all.
|
|
17
|
+
/* empty css */import { _ as _export_sfc, a as _page0, b as _page1, c as _page2, d as _page3, e as _page4, f as _page5 } from './chunks/pages/all.726ca7f4.mjs';
|
|
18
18
|
import 'path-to-regexp';
|
|
19
19
|
import 'tls';
|
|
20
20
|
import 'mime';
|
|
@@ -188,7 +188,6 @@ const CanceledInPassiveListener = new Warning("W05", "Unable to preventDefault i
|
|
|
188
188
|
const EventListenerWasDuplicated = new Warning("W06", "An event listener wasn't added because it has been added already: %o, %o");
|
|
189
189
|
const OptionWasIgnored = new Warning("W07", "The %o option value was abandoned because the event listener wasn't added as duplicated.");
|
|
190
190
|
const InvalidEventListener = new Warning("W08", "The 'callback' argument must be a function or an object that has 'handleEvent' method: %o");
|
|
191
|
-
new Warning("W09", "Event attribute handler must be a function: %o");
|
|
192
191
|
|
|
193
192
|
/*eslint-disable class-methods-use-this */
|
|
194
193
|
/**
|
|
@@ -1348,13 +1347,13 @@ const _File = class File extends Blob$1 {
|
|
|
1348
1347
|
};
|
|
1349
1348
|
|
|
1350
1349
|
/** @type {typeof globalThis.File} */// @ts-ignore
|
|
1351
|
-
const File
|
|
1350
|
+
const File = _File;
|
|
1352
1351
|
|
|
1353
1352
|
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
|
1354
1353
|
|
|
1355
1354
|
var {toStringTag:t$1,iterator:i$1,hasInstance:h$1}=Symbol,
|
|
1356
1355
|
m$1='append,set,get,getAll,delete,keys,values,entries,forEach,constructor'.split(','),
|
|
1357
|
-
f$1=(a,b,c)=>(a+='',/^(Blob|File)$/.test(b && b[t$1])?[(c=c!==void 0?c+'':b[t$1]=='File'?b.name:'blob',a),b.name!==c||b[t$1]=='blob'?new File
|
|
1356
|
+
f$1=(a,b,c)=>(a+='',/^(Blob|File)$/.test(b && b[t$1])?[(c=c!==void 0?c+'':b[t$1]=='File'?b.name:'blob',a),b.name!==c||b[t$1]=='blob'?new File([b],c,b):b]:[a,b+'']),
|
|
1358
1357
|
x$1=(n, a, e)=>{if(a.length<e){throw new TypeError(`Failed to execute '${n}' on 'FormData': ${e} arguments required, but only ${a.length} present.`)}};
|
|
1359
1358
|
|
|
1360
1359
|
/** @type {typeof globalThis.FormData} */
|
|
@@ -2554,13 +2553,6 @@ function alert(...messages) {
|
|
|
2554
2553
|
console.log(...messages);
|
|
2555
2554
|
}
|
|
2556
2555
|
|
|
2557
|
-
// @ts-check
|
|
2558
|
-
const fetch = undici.fetch;
|
|
2559
|
-
const Headers = undici.Headers;
|
|
2560
|
-
const Response = undici.Response;
|
|
2561
|
-
const Request = undici.Request;
|
|
2562
|
-
const File = undici.File;
|
|
2563
|
-
|
|
2564
2556
|
const exclusionsForHTMLElement = [
|
|
2565
2557
|
'CustomElementsRegistry',
|
|
2566
2558
|
'HTMLElement',
|
|
@@ -2661,7 +2653,7 @@ const polyfill = (target, options) => {
|
|
|
2661
2653
|
Element,
|
|
2662
2654
|
Event,
|
|
2663
2655
|
EventTarget,
|
|
2664
|
-
File,
|
|
2656
|
+
File: File$1,
|
|
2665
2657
|
FormData,
|
|
2666
2658
|
HTMLDocument,
|
|
2667
2659
|
HTMLElement,
|
|
@@ -3368,6 +3360,8 @@ const createApp = (app) => {
|
|
|
3368
3360
|
};
|
|
3369
3361
|
app2.config.globalProperties.$money = formatMoney;
|
|
3370
3362
|
app2.config.globalProperties.$percentage = formatPercentage;
|
|
3363
|
+
app2.config.globalProperties.$settings = globalThis.storefront.settings;
|
|
3364
|
+
app2.config.globalProperties.$context = globalThis.storefront.context;
|
|
3371
3365
|
}
|
|
3372
3366
|
});
|
|
3373
3367
|
app.component("Fade", Fade);
|
|
@@ -3412,10 +3406,10 @@ const _renderer1 = {
|
|
|
3412
3406
|
renderToStaticMarkup,
|
|
3413
3407
|
};
|
|
3414
3408
|
|
|
3415
|
-
const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.15.
|
|
3409
|
+
const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.15.1_astro@2.0.16+sharp@0.31.3/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],]);
|
|
3416
3410
|
const renderers = [Object.assign({"name":"astro:jsx","serverEntrypoint":"astro/jsx/server.js","jsxImportSource":"astro"}, { ssr: server_default }),Object.assign({"name":"@astrojs/vue","clientEntrypoint":"@astrojs/vue/client.js","serverEntrypoint":"@astrojs/vue/server.js"}, { ssr: _renderer1 }),];
|
|
3417
3411
|
|
|
3418
|
-
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.15.
|
|
3412
|
+
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.15.1_astro@2.0.16+sharp@0.31.3/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["_astro/_...slug_.0607a6ef.css","_astro/index.0c833781.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["_astro/_...slug_.0607a6ef.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"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":[],"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":[],"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":["_astro/_...slug_.0607a6ef.css"],"scripts":[{"type":"external","value":"_astro/hoisted.721ad75d.js"}],"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-002.web.app","base":"/","markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true,"contentDir":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/content/"},"pageMap":null,"propagation":[],"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","@@sf/components/ProductCard.vue":"_astro/ProductCard.7e891c08.js","~/components/Prices.vue":"_astro/Prices.55399c72.js","~/components/PitchBar.vue":"_astro/PitchBar.db7cd775.js","@astrojs/vue/client.js":"_astro/client.0de2f274.js","/astro/hoisted.js?q=0":"_astro/hoisted.721ad75d.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.295a6886.js","~/components/ShopHeader.vue":"_astro/ShopHeader.301e109b.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.7ce2ebb1.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/index.0c833781.css","/_astro/server.1bc2fa51.css","/_astro/_...slug_.0607a6ef.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-e0d788d4.js","/_astro/PitchBar.db7cd775.js","/_astro/Prices.55399c72.js","/_astro/ProductCard.7e891c08.js","/_astro/ShopHeader.301e109b.js","/_astro/_plugin-vue_export-helper.77ed7c18.js","/_astro/client.0de2f274.js","/_astro/firebase-app.7ce2ebb1.js","/_astro/format-money.ab6b71eb.js","/_astro/hoisted.721ad75d.js","/_astro/idle-callback.889bf0ea.js","/_astro/index.16f33784.js","/_astro/modules-info.06ac0727.js","/_astro/preload-helper.101896b7.js","/_astro/runtime-dom.esm-bundler.d2f39f33.js","/_astro/session-utm.72684b84.js","/_astro/workbox-window.prod.es5.295a6886.js","/admin/config.json","/assets/cms-preview.css","/assets/cms.css","/assets/cvv.png","/assets/img-placeholder.png","/assets/payments.png","/assets/ssl-safe.png","/img/icon.png","/img/large-icon.png","/img/uploads/banner1.png","/img/uploads/banner2.png","/img/uploads/banner2.webp","/img/uploads/favicon.png","/img/uploads/headless.png","/img/uploads/headphone.png","/img/uploads/headphone.webp","/img/uploads/icon.png","/img/uploads/large-icon.png","/img/uploads/logo.png","/img/uploads/logo.webp","/img/uploads/og-image.png","/img/uploads/passion.png","/img/uploads/passion.webp","/img/uploads/pwa-reliable.png","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.png","/img/uploads/rect89.webp","/img/uploads/ssl-safe.png"]}), {
|
|
3419
3413
|
pageMap: pageMap,
|
|
3420
3414
|
renderers: renderers
|
|
3421
3415
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.8",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"prepare-monorepo": "sh scripts/prepare-monorepo.sh"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@astrojs/image": "^0.15.
|
|
29
|
-
"@astrojs/node": "^5.0.
|
|
28
|
+
"@astrojs/image": "^0.15.1",
|
|
29
|
+
"@astrojs/node": "^5.0.4",
|
|
30
30
|
"@astrojs/partytown": "^1.0.3",
|
|
31
31
|
"@astrojs/prefetch": "^0.1.2",
|
|
32
32
|
"@astrojs/vue": "^2.0.1",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"@cloudcommerce/i18n": "workspace:*",
|
|
36
36
|
"@ecomplus/utils": "1.5.0-rc.3",
|
|
37
37
|
"@fastify/deepmerge": "^1.3.0",
|
|
38
|
-
"@headlessui/vue": "^1.7.
|
|
38
|
+
"@headlessui/vue": "^1.7.11",
|
|
39
39
|
"@iconify-json/fa6-brands": "^1.1.10",
|
|
40
40
|
"@iconify-json/heroicons": "^1.1.10",
|
|
41
41
|
"@iconify-json/logos": "^1.1.23",
|
|
42
|
-
"@vite-pwa/astro": "^0.0.
|
|
43
|
-
"@vueuse/core": "9.12.0
|
|
44
|
-
"astro": "^2.0.
|
|
42
|
+
"@vite-pwa/astro": "^0.0.4",
|
|
43
|
+
"@vueuse/core": "9.12.0",
|
|
44
|
+
"astro": "^2.0.16",
|
|
45
45
|
"chroma-js": "^2.4.2",
|
|
46
46
|
"dotenv": "^16.0.3",
|
|
47
47
|
"firebase": "^9.17.1",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"semver": "^7.3.8",
|
|
50
50
|
"sharp": "^0.31.3",
|
|
51
51
|
"tailwindcss": "^3.2.7",
|
|
52
|
-
"unocss": "^0.50.
|
|
53
|
-
"vite": "^4.1.
|
|
52
|
+
"unocss": "^0.50.1",
|
|
53
|
+
"vite": "^4.1.4",
|
|
54
54
|
"vite-plugin-pwa": "^0.14.4",
|
|
55
55
|
"vue": "^3.2.47"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@babel/core": "^7.
|
|
58
|
+
"@babel/core": "^7.21.0",
|
|
59
59
|
"@cloudcommerce/types": "workspace:*"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -101,6 +101,11 @@ d-md {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/* Preset width auto for responsive images (for Astro <Picture/>) */
|
|
105
|
+
:where(img[sizes], source[sizes] + img) {
|
|
106
|
+
width: auto;
|
|
107
|
+
}
|
|
108
|
+
|
|
104
109
|
/* Fix Safari issue related to <summary> / <details> arrow */
|
|
105
110
|
details > summary.list-none::-webkit-details-marker,
|
|
106
111
|
details > summary.list-none::marker {
|
|
@@ -8,10 +8,10 @@ const formatPercentage = (value: number, digits = 1) => {
|
|
|
8
8
|
return Number.isInteger(value) ? `${value}%` : `${value.toFixed(digits)}%`;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const createApp = (app: App) => {
|
|
12
12
|
app.use({
|
|
13
13
|
// eslint-disable-next-line no-shadow
|
|
14
|
-
install: (app, options) => {
|
|
14
|
+
install: (app: App, options: Record<string, any>) => {
|
|
15
15
|
// @ts-ignore
|
|
16
16
|
app.config.globalProperties.$t = (dict, lang) => {
|
|
17
17
|
// @ts-ignore
|
|
@@ -19,6 +19,8 @@ export default (app: App) => {
|
|
|
19
19
|
};
|
|
20
20
|
app.config.globalProperties.$money = formatMoney;
|
|
21
21
|
app.config.globalProperties.$percentage = formatPercentage;
|
|
22
|
+
app.config.globalProperties.$settings = globalThis.storefront.settings;
|
|
23
|
+
app.config.globalProperties.$context = globalThis.storefront.context;
|
|
22
24
|
},
|
|
23
25
|
});
|
|
24
26
|
app.component('Fade', Fade);
|
|
@@ -26,4 +28,6 @@ export default (app: App) => {
|
|
|
26
28
|
app.component('AImg', AImg);
|
|
27
29
|
};
|
|
28
30
|
|
|
31
|
+
export default createApp;
|
|
32
|
+
|
|
29
33
|
export type FormatPercentage = typeof formatPercentage;
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { Picture } from '@astrojs/image/components';
|
|
3
|
-
import { getAspectRatio } from '@@sf/ssr/image';
|
|
3
|
+
import { tryImageSize, getAspectRatio } from '@@sf/ssr/image';
|
|
4
4
|
|
|
5
5
|
type PictureProps = Parameters<typeof Picture>[0];
|
|
6
6
|
|
|
7
7
|
export type Props = Omit<PictureProps, 'aspectRatio'> & {
|
|
8
8
|
aspectRatio?: PictureProps['aspectRatio'],
|
|
9
|
-
fetchpriority
|
|
9
|
+
fetchpriority?: 'high' | 'low' | 'auto',
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const props = Astro.props as PictureProps;
|
|
13
|
-
if (
|
|
14
|
-
props.
|
|
13
|
+
if (
|
|
14
|
+
(!props.width || !props.height)
|
|
15
|
+
&& !props.aspectRatio
|
|
16
|
+
&& typeof props.src === 'string'
|
|
17
|
+
) {
|
|
18
|
+
const { width, height } = tryImageSize(props.src);
|
|
19
|
+
if (height) {
|
|
20
|
+
props.aspectRatio = getAspectRatio({ width, height });
|
|
21
|
+
props.width = width;
|
|
22
|
+
props.height = height;
|
|
23
|
+
}
|
|
15
24
|
}
|
|
16
25
|
---
|
|
17
26
|
|
|
@@ -50,7 +50,7 @@ const setResponseCache = (Astro: AstroGlobal, maxAge: number, sMaxAge?: number)
|
|
|
50
50
|
Astro.response.headers.set(headerName, cacheControl);
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
const loadPageContext = async (Astro: AstroGlobal
|
|
53
|
+
const loadPageContext = async (Astro: Readonly<AstroGlobal>, {
|
|
54
54
|
cmsCollection,
|
|
55
55
|
apiPrefetchEndpoints = globalThis.api_prefetch_endpoints,
|
|
56
56
|
}: {
|
|
@@ -18,6 +18,8 @@ declare module '@vue/runtime-core' {
|
|
|
18
18
|
};
|
|
19
19
|
$money: typeof import('@ecomplus/utils')['formatMoney'];
|
|
20
20
|
$percentage: FormatPercentage;
|
|
21
|
+
$settings: typeof globalThis.storefront.settings;
|
|
22
|
+
$context: typeof globalThis.storefront.context;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export interface GlobalComponents {
|
package/packages/types/index.ts
CHANGED
package/pnpm-workspace.yaml
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"email": "atendimento@monocard.com.br",
|
|
3
|
-
"phone": "",
|
|
4
|
-
"whatsapp": "",
|
|
5
|
-
"address": "Endereço",
|
|
6
|
-
"doc_number": "123",
|
|
7
|
-
"facebook": "https://www.facebook.com/ecom.clubpage/",
|
|
8
|
-
"twitter": "",
|
|
9
|
-
"youtube": "https://www.youtube.com/channel/UCBlIxK5JAub0E1EX_qHdzmA",
|
|
10
|
-
"tiktok": "",
|
|
11
|
-
"instagram": "https://www.instagram.com/ecomclub/",
|
|
12
|
-
"pinterest": ""
|
|
13
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"shipping": {
|
|
3
|
-
"show": true,
|
|
4
|
-
"text": "Entregamos para todo o Brasil"
|
|
5
|
-
},
|
|
6
|
-
"installments": {
|
|
7
|
-
"show": true,
|
|
8
|
-
"text": "Parcele sem juros"
|
|
9
|
-
},
|
|
10
|
-
"exchange": {
|
|
11
|
-
"show": true,
|
|
12
|
-
"text": "Não gostou? A primeira troca é gratuita"
|
|
13
|
-
},
|
|
14
|
-
"promo": {
|
|
15
|
-
"show": true,
|
|
16
|
-
"text": "Diferentes promoções ao longo do ano!"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
Binary file
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
export interface Props {
|
|
3
|
-
isStartOpen?: boolean;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
defineProps<Props>();
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<details :open="isStartOpen">
|
|
11
|
-
<summary class="text-xl">
|
|
12
|
-
<i class="text-lg i-paint-brush-solid mr-1"></i>
|
|
13
|
-
Configure seu perfil
|
|
14
|
-
</summary>
|
|
15
|
-
<p>
|
|
16
|
-
Adicione sua foto ou a logo de sua empresa em seu perfil.
|
|
17
|
-
Disponibilize todos os contatos que desejar e links para que tenham
|
|
18
|
-
acesso ao seu cartão de visitas inteligente.
|
|
19
|
-
</p>
|
|
20
|
-
</details>
|
|
21
|
-
<details :open="isStartOpen">
|
|
22
|
-
<summary class="text-xl">
|
|
23
|
-
<i class="text-lg i-share-solid mr-1"></i>
|
|
24
|
-
Compartilhe onde quiser
|
|
25
|
-
</summary>
|
|
26
|
-
<p>
|
|
27
|
-
Sempre que precisar, use seu Monocard para compartilhar seu
|
|
28
|
-
cartão de visitas digital de forma fácil e segura,
|
|
29
|
-
sem perder tempo em seu dia a dia.
|
|
30
|
-
</p>
|
|
31
|
-
</details>
|
|
32
|
-
</template>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { toRefs, ImgHTMLAttributes } from 'vue';
|
|
3
|
-
|
|
4
|
-
export interface Props {
|
|
5
|
-
logo?: ImgHTMLAttributes;
|
|
6
|
-
logoAltHeading?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | null;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
10
|
-
logoAltHeading: 'h2',
|
|
11
|
-
});
|
|
12
|
-
const { logo } = toRefs(props);
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<header class="header bg-black bg-opacity-90 backdrop-blur-md
|
|
17
|
-
sticky top-0 z-50 py-1 sm:py-2">
|
|
18
|
-
<div class="container">
|
|
19
|
-
<div class="grid grid-flow-col auto-cols-max justify-between items-center">
|
|
20
|
-
<slot name="aside">
|
|
21
|
-
<div class="header__aside md:hidden">
|
|
22
|
-
<div class="i-bars-3-bottom-left"></div>
|
|
23
|
-
</div>
|
|
24
|
-
</slot>
|
|
25
|
-
<slot name="logo" v-bind="{ logo }">
|
|
26
|
-
<a href="/">
|
|
27
|
-
<component :is="(logo.alt && logoAltHeading) || 'span'" class="m-0">
|
|
28
|
-
<img v-bind="logo" />
|
|
29
|
-
</component>
|
|
30
|
-
</a>
|
|
31
|
-
</slot>
|
|
32
|
-
<div class="flex items-center">
|
|
33
|
-
<slot name="actions">
|
|
34
|
-
<slot name="nav" />
|
|
35
|
-
<slot name="search" />
|
|
36
|
-
<slot name="buttons" />
|
|
37
|
-
</slot>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</header>
|
|
42
|
-
</template>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="w-full bg-primary">
|
|
3
|
-
<div class="container">
|
|
4
|
-
<div class="py-1 uppercase text-secondary flex flex-nowrap justify-between lg:justify-around">
|
|
5
|
-
<div><b>Frete grátis</b> para todo o Brasil</div>
|
|
6
|
-
<div>Até <b>12x sem juros</b></div>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { PageContext } from '@@sf/ssr-context';
|
|
3
|
-
import { getImage } from '@@sf/ssr/image';
|
|
4
|
-
import TopBar from '@@components/TopBar.vue';
|
|
5
|
-
import TheHeader from '@@components/TheHeader.vue';
|
|
6
|
-
import HeaderNav from '@@components/header/HeaderNav.vue';
|
|
7
|
-
import HeaderButtons from '@@components/header/HeaderButtons.vue';
|
|
8
|
-
|
|
9
|
-
export interface Props {
|
|
10
|
-
pageContext: PageContext;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const {
|
|
14
|
-
pageContext: {
|
|
15
|
-
apiState,
|
|
16
|
-
settings,
|
|
17
|
-
},
|
|
18
|
-
} = Astro.props as Props;
|
|
19
|
-
const loginDrawerAdditionalLinks = [{
|
|
20
|
-
href: 'https://mono.direct/login',
|
|
21
|
-
innerHTML: '<i class="i-pencil-square mr-1"></i> Gerenciar conta Monocard',
|
|
22
|
-
}];
|
|
23
|
-
|
|
24
|
-
const logo = {
|
|
25
|
-
...await getImage({
|
|
26
|
-
src: settings.logo,
|
|
27
|
-
width: 150,
|
|
28
|
-
format: 'webp',
|
|
29
|
-
quality: 80,
|
|
30
|
-
}) as any,
|
|
31
|
-
alt: settings.name,
|
|
32
|
-
};
|
|
33
|
-
const logoAltHeading = Astro.url.pathname === '/' ? 'h1' : 'h2';
|
|
34
|
-
const { categories } = apiState;
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
<Fragment>
|
|
38
|
-
<slot name="top-bar">
|
|
39
|
-
<TopBar />
|
|
40
|
-
</slot>
|
|
41
|
-
<slot name="header">
|
|
42
|
-
<TheHeader { logo } logoAltHeading={logoAltHeading}>
|
|
43
|
-
<Fragment slot="nav">
|
|
44
|
-
<HeaderNav categories={categories} />
|
|
45
|
-
</Fragment>
|
|
46
|
-
<Fragment slot="buttons">
|
|
47
|
-
<HeaderButtons client:idle { loginDrawerAdditionalLinks } />
|
|
48
|
-
</Fragment>
|
|
49
|
-
</TheHeader>
|
|
50
|
-
</slot>
|
|
51
|
-
</Fragment>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v as G}from"./runtime-dom.esm-bundler.b4764bdb.js";import{p as J}from"./modules-info.6e650119.js";import{c as g,d as R,_ as j,m as Q,o as u,a as p,p as x,e as I,n as z,j as d,q as C,s as D,u as X,v as Y,x as Z,y as ee,k as $,w as v,l as q,g as b,z as te,A as ae,B as oe,F as re,C as se,b as ne}from"./_plugin-vue_export-helper.3dfd3410.js";import{u as le,a as ie,b as ue}from"./index.140ec818.js";/* empty css */import"./session-utm.72684b84.js";import"./idle-callback.889bf0ea.js";import"./format-money.e75b6ce1.js";const ce=r=>{const s=g(()=>r.slides.map(({html:e})=>J(e).value)),a=g(()=>s.value.filter(e=>e).length);return{parsedContents:s,countValidSlides:a}},K=Symbol("carousel"),de=R({__name:"CarouselControl",props:{direction:{default:1}},setup(r,{expose:s}){s();const{changeSlide:a}=Q(K),e={changeSlide:a};return Object.defineProperty(e,"__isScriptSetup",{enumerable:!1,value:!0}),e}}),fe=["aria-label","data-carousel-control"];function pe(r,s,a,e,n,o){return u(),p("button",{type:"button","aria-label":a.direction>0?"Próximo":"Anterior",onClick:s[0]||(s[0]=i=>e.changeSlide(a.direction)),class:z(["group absolute top-0",a.direction>0?"right-0":"left-0"]),"data-carousel-control":a.direction>0?"next":"previous"},[x(r.$slots,"default",{},()=>[I("i",{class:z(["m-0",a.direction>0?"i-chevron-right group-active:translate-x-1":"i-chevron-left group-active:-translate-x-1"])},null,2)])],10,fe)}const U=j(de,[["render",pe]]),ve=R({__name:"Carousel",props:{as:{default:"ul"},modelValue:{default:1},autoplay:null},emits:["update:modelValue"],setup(r,{expose:s,emit:a}){s();const e=r,n=d(e.modelValue-1);C(D(e,"modelValue"),t=>{n.value=t-1}),C(n,(t,l)=>{t!==l&&a("update:modelValue",t+1)});const o=d(null),{x:i,isScrolling:f,arrivedState:S}=le(o),y=g(()=>S.left),w=g(()=>S.right),h=d([]),B=d(0),L=d(0),P=d(0),A=()=>{B.value=o.value.scrollWidth,L.value=o.value.offsetWidth},E=()=>{const t=[...o.value.children];h.value=t.map(l=>({offsetLeft:l.offsetLeft,width:l.offsetWidth}))},N=t=>{const l=t>0?n.value:n.value+t,O=h.value[l]?.width||0;return O?O*t:0},V=()=>{const t=h.value.findIndex(l=>Math.abs(l.offsetLeft-i.value)<=5);t>-1&&(n.value=t||0)},k=()=>{const t=B.value-L.value;P.value=h.value.findIndex(({offsetLeft:l})=>l>=t-5)};let c=null;const m=()=>{e.autoplay&&(clearTimeout(c),c=setTimeout(()=>{_(1)},e.autoplay))},_=t=>{if(t<0){if(y.value){k(),n.value=P.value-1,_(1);return}}else if(w.value){n.value=1,_(-1);return}const l=N(t);l&&(o.value.scrollBy({left:l,behavior:"smooth"}),m())};C(f,t=>{t?clearTimeout(c):(V(),m())});const F=d(null),H=ie(F);C(H,t=>{t?clearTimeout(c):m()});const T=()=>{o.value&&(A(),E(),V(),k())},W=ue(()=>{o.value.scrollLeft=0,T()},400);X(()=>{T(),Y(()=>{[...o.value.children].forEach(t=>{t.setAttribute("tabindex","0")})}),m(),window.addEventListener("resize",W)}),Z(()=>{window.removeEventListener("resize",W),clearTimeout(c)}),ee(K,{autoplay:D(e,"autoplay"),changeSlide:_,isBoundLeft:y,isBoundRight:w});const M={props:e,emit:a,currentIndex:n,wrapper:o,currentPos:i,isScrolling:f,arrivedState:S,isBoundLeft:y,isBoundRight:w,slidesWidth:h,wrapperScrollWidth:B,wrapperVisibleWidth:L,indexCount:P,calcWrapperWidth:A,calcSlidesWidth:E,calcNextWidth:N,calcCurrentIndex:V,calcIndexCount:k,get autoplayTimer(){return c},set autoplayTimer(t){c=t},restartAutoplay:m,changeSlide:_,carousel:F,isHovered:H,calcOnInit:T,onResize:W,CarouselControl:U};return Object.defineProperty(M,"__isScriptSetup",{enumerable:!1,value:!0}),M}}),he={ref:"carousel",class:"relative","data-carousel":""};function me(r,s,a,e,n,o){return u(),p("div",he,[(u(),$(q(a.as),{ref:"wrapper",class:"flex overflow-x-scroll overflow-y-hidden list-none m-0 p-0","data-carousel-wrapper":""},{default:v(()=>[x(r.$slots,"default")]),_:3},512)),x(r.$slots,"controls",te(ae({changeSlide:e.changeSlide,isBoundLeft:e.isBoundLeft,isBoundRight:e.isBoundRight,currentPage:e.currentIndex+1,pageCount:e.indexCount+1})),()=>[b(e.CarouselControl,{direction:-1},{default:v(()=>[x(r.$slots,"previous")]),_:3}),b(e.CarouselControl,null,{default:v(()=>[x(r.$slots,"next")]),_:3})])],512)}const _e=j(ve,[["render",me]]),xe=R({__name:"PitchBar",props:{slides:null},setup(r,{expose:s}){s();const a=r,{parsedContents:e,countValidSlides:n}=ce(a),o={props:a,parsedContents:e,countValidSlides:n,Carousel:_e,CarouselControl:U};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),be={class:"bg-base-100 relative z-1"},Ce={class:"container md:w-2/3 mx-auto px-3 py-1"},ge=["innerHTML"],Se={class:"text-xl leading-none text-base-400"};function ye(r,s,a,e,n,o){return u(),p("div",be,[I("div",Ce,[b(e.Carousel,{autoplay:e.countValidSlides>1?7e3:null},{controls:v(()=>[oe(I("div",Se,[b(e.CarouselControl,{direction:-1,class:"pr-2 bg-base-100 hover:text-base-700"}),b(e.CarouselControl,{class:"pl-2 bg-base-100 hover:text-base-700"})],512),[[G,e.countValidSlides>1]])]),default:v(()=>[(u(!0),p(re,null,se(a.slides,(i,f)=>(u(),p("li",{key:f,class:"shrink-0 basis-full h-full text-center"},[(u(),$(q(i.href?"ALink":"span"),{href:i.href,target:i.target,class:z(["inline-block px-8",i.href?"hover:underline":null])},{default:v(()=>[e.parsedContents[f]?(u(),p("span",{key:0,innerHTML:e.parsedContents[f],class:"prose text-sm text-base-800"},null,8,ge)):ne("",!0)]),_:2},1032,["href","target","class"]))]))),128))]),_:1},8,["autoplay"])])])}const Ie=j(xe,[["render",ye]]);export{Ie as default};
|