cloudcommerce 0.26.6 → 0.27.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-apps.yml +2 -2
- package/.gitmodules +0 -3
- package/.vscode/settings.json +3 -1
- package/CHANGELOG.md +50 -0
- package/action.yml +2 -2
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +4 -1
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/ecomplus-stores/barra-doce/scripts/install.sh +12 -2
- package/ecomplus-stores/monocard/.firebaserc +1 -1
- package/ecomplus-stores/monocard/.github/build-and-deploy +1 -0
- package/ecomplus-stores/monocard/.github/workflows/build-and-deploy.yml +1 -0
- package/ecomplus-stores/monocard/README.md +11 -82
- package/ecomplus-stores/{iluminim → monocard}/SETUP.md +12 -0
- package/ecomplus-stores/{iluminim → monocard}/SETUP.pt-BR.md +12 -0
- package/ecomplus-stores/monocard/functions/config.json +1 -1
- package/ecomplus-stores/monocard/functions/{core → many}/package.json +4 -2
- package/ecomplus-stores/monocard/functions/ssr/.eslintrc.cjs +1 -1
- package/ecomplus-stores/monocard/functions/ssr/content/layout.json +25 -10
- package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/pages/home.json +12 -19
- package/ecomplus-stores/monocard/functions/ssr/content/pages/products.json +19 -0
- package/ecomplus-stores/monocard/functions/ssr/content/settings.json +22 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +8 -9
- package/ecomplus-stores/monocard/functions/ssr/src/assets/card.css +99 -0
- package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/assets/style.css +16 -7
- package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +5 -14
- package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/Banner.vue +6 -4
- package/ecomplus-stores/monocard/functions/ssr/src/components/Breadcrumbs.astro +44 -0
- package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/CartSidebar.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +8 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/DocDescription.astro +30 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +2 -2
- package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +12 -9
- package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +8 -105
- package/ecomplus-stores/monocard/functions/ssr/src/components/Prices.vue +10 -27
- package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/ProductCard.vue +1 -1
- package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/ShopFooter.vue +9 -35
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +85 -32
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenav.vue +3 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +2 -2
- package/ecomplus-stores/monocard/functions/ssr/src/env.d.ts +9 -1
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +9 -44
- package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/layouts/PageFooter.astro +3 -19
- package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/layouts/PageHeader.astro +7 -14
- package/ecomplus-stores/monocard/functions/ssr/src/main/Fallback.astro +0 -5
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +6 -12
- package/ecomplus-stores/monocard/functions/ssr/src/main/Sections.astro +38 -0
- package/ecomplus-stores/monocard/functions/ssr/src/main/Wildcard.astro +4 -18
- package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +15 -9
- package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +19 -9
- package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +16 -10
- package/ecomplus-stores/monocard/functions/ssr/src/scripts/InlineScripts.astro +6 -6
- package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +1 -11
- package/ecomplus-stores/monocard/functions/{events → with-apps}/package.json +4 -3
- package/ecomplus-stores/monocard/package.json +4 -1
- package/ecomplus-stores/monocard/scripts/install.sh +12 -2
- package/ecomplus-stores/tia-sonia/scripts/install.sh +12 -2
- package/package.json +7 -7
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +2 -2
- package/packages/apps/correios/package.json +3 -4
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +3 -3
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +2 -2
- package/packages/apps/fb-conversions/package.json +3 -3
- package/packages/apps/flash-courier/package.json +2 -2
- package/packages/apps/frenet/package.json +3 -3
- package/packages/apps/galaxpay/package.json +3 -3
- package/packages/apps/google-analytics/package.json +3 -3
- package/packages/apps/jadlog/package.json +2 -2
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +3 -3
- package/packages/apps/mercadopago/package.json +3 -3
- package/packages/apps/pagarme/package.json +4 -4
- package/packages/apps/paghiper/package.json +3 -3
- package/packages/apps/pix/package.json +3 -3
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +22 -0
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +2 -2
- package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +7 -1
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +14 -5
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +9 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +8 -6
- package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +118 -38
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +8 -0
- package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/package.json +3 -3
- package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +24 -0
- package/packages/apps/tiny-erp/src/integration/helpers/format-tiny-date.ts +2 -2
- package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +8 -1
- package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +17 -5
- package/packages/apps/tiny-erp/src/integration/parsers/order-from-tiny.ts +13 -1
- package/packages/apps/tiny-erp/src/integration/parsers/order-to-tiny.ts +11 -6
- package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +144 -41
- package/packages/apps/tiny-erp/src/integration/parsers/product-to-tiny.ts +10 -0
- package/packages/apps/webhooks/package.json +3 -3
- package/packages/cli/package.json +2 -2
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +4 -4
- package/packages/eslint/base.eslintrc.cjs +3 -0
- package/packages/eslint/package.json +5 -4
- package/packages/eslint/storefront.eslintrc.cjs +8 -1
- package/packages/events/package.json +2 -2
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +3 -3
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +3 -3
- package/packages/passport/package.json +2 -2
- package/packages/ssr/lib/firebase/serve-storefront.js +23 -8
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +3 -3
- package/packages/ssr/src/firebase/serve-storefront.ts +24 -8
- package/packages/storefront/.auto-imports.d.ts +65 -0
- package/packages/storefront/astro.config.mjs +24 -1
- package/packages/storefront/client.d.ts +1 -0
- package/packages/storefront/config/astro/context-directive.mjs +21 -0
- package/packages/storefront/config/astro/index.d.ts +8 -0
- package/packages/storefront/config/storefront.tailwind.cjs +0 -1
- package/packages/storefront/dist/client/_astro/{Carousel.9ad2e1dc.js → Carousel.4bf71bce.js} +1 -1
- package/packages/storefront/dist/client/_astro/{CartSidebar.a6c6a885.js → CartSidebar.05b12b39.js} +1 -1
- package/packages/storefront/dist/client/_astro/{HeroSlider.ee1e6200.js → HeroSlider.fe108a14.js} +1 -1
- package/packages/storefront/dist/client/_astro/{PitchBar.6111676e.js → PitchBar.2c821b77.js} +1 -1
- package/packages/storefront/dist/client/_astro/{Prices.04ff8fce.js → Prices.78eb0a61.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductShelf.085721d6.js → ProductShelf.46d8a51c.js} +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.3694a82b.js +4 -0
- package/packages/storefront/dist/client/_astro/_...slug_.a4a7a874.css +1 -0
- 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/{firebase-app.8c541cce.js → firebase-app.3f59f3c7.js} +3 -3
- package/packages/storefront/dist/client/_astro/headphone_1Ekzdh.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1GbHcH.webp +0 -0
- package/packages/storefront/dist/client/_astro/{hoisted.85fdcf03.js → hoisted.648beb9d.js} +1 -1
- package/packages/storefront/dist/client/_astro/index.fadf28bd.js +1 -0
- 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/{modules-info.e5d77bf3.js → modules-info.df822732.js} +1 -1
- package/packages/storefront/dist/client/_astro/passion_1LvKlp.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_2PSWs.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1A8K2Q.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1ND0he.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1mIaKd.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_LhopI.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1NFjiR.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z2a06Gx.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z2nulUU.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_ZH7hsH.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_ZorpIx.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1CcLjM.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1IVKep.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1zkdb4.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_299fN7.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_CnIof.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z1OtQaE.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_flB3g.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_rsWaw.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_sLbkT.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_1yf5jS.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect89_GQBli.webp +0 -0
- package/packages/storefront/dist/client/~fallback.html +67 -0
- package/packages/storefront/dist/client/~index.html +113 -0
- package/packages/storefront/dist/server/chunks/{CartSidebar.41b20543.mjs → CartSidebar.4179ad81.mjs} +4 -12
- package/packages/storefront/dist/server/chunks/{SearchModal.5f5e6a15.mjs → SearchModal.146ce2f7.mjs} +4 -11
- package/packages/storefront/dist/server/chunks/_...05c626ea.mjs +28 -0
- package/packages/storefront/dist/server/chunks/{account@_@astro.204fba92.mjs → account@_@astro.5eaddaf8.mjs} +2 -9
- package/packages/storefront/dist/server/chunks/{index@_@astro.19e0f502.mjs → index@_@astro.25a343cc.mjs} +3 -10
- package/packages/storefront/dist/server/chunks/{index@_@astro.b37a6ac9.mjs → index@_@astro.2d2f2e33.mjs} +3 -10
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.36e8882b.mjs → _...slug_.astro.0808946e.mjs} +1836 -450
- package/packages/storefront/dist/server/chunks/pages/index.astro.d4145872.mjs +186 -0
- package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.ba4c2475.mjs → ~fallback.astro.84d4765b.mjs} +6 -23
- package/packages/storefront/dist/server/chunks/{~fallback@_@astro.6bb4c4b4.mjs → ~fallback@_@astro.86d710c3.mjs} +3 -10
- package/packages/storefront/dist/server/entry.mjs +7 -14
- package/packages/storefront/dist/server/images.dist.csv +30 -0
- package/packages/storefront/dist/server/images.src.csv +11 -0
- package/packages/storefront/dist/server/renderers.mjs +2 -9
- package/packages/storefront/dist/server/static-builds.csv +51 -0
- package/packages/storefront/package.json +6 -5
- package/packages/storefront/scripts/build-prod.sh +3 -2
- package/packages/storefront/server.d.ts +1 -0
- package/packages/storefront/src/lib/$storefront.d.ts +8 -8
- package/packages/storefront/src/lib/assets/base.css +13 -0
- package/packages/storefront/src/lib/assets/reset.css +11 -2
- package/packages/storefront/src/lib/components/Carousel.vue +93 -72
- package/packages/storefront/src/lib/components/CarouselControl.vue +13 -7
- package/packages/storefront/src/lib/components/ContentClearfix.vue +17 -0
- package/packages/storefront/src/lib/components/Drawer.vue +3 -3
- package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +1 -1
- package/packages/storefront/src/lib/components/QuantitySelector.vue +4 -4
- package/packages/storefront/src/lib/components/QuantitySelectorControl.vue +2 -2
- package/packages/storefront/src/lib/components/ViewTransitions.astro +409 -0
- package/packages/storefront/src/lib/components/globals/AImg.vue +2 -1
- package/packages/storefront/src/lib/layouts/BaseBody.astro +1 -1
- package/packages/storefront/src/lib/layouts/BaseHead.astro +28 -5
- package/packages/storefront/src/lib/layouts/use-page-header.ts +2 -2
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/pnpm-workspace.yaml +2 -0
- package/ecomplus-stores/iluminim/.devcontainer/devcontainer.json +0 -30
- package/ecomplus-stores/iluminim/.editorconfig +0 -13
- package/ecomplus-stores/iluminim/.eslintrc.cjs +0 -3
- package/ecomplus-stores/iluminim/.firebaserc +0 -5
- package/ecomplus-stores/iluminim/.github/renovate.json +0 -5
- package/ecomplus-stores/iluminim/.github/workflows/build-and-deploy.yml +0 -36
- package/ecomplus-stores/iluminim/.github/workflows/calibreapp-image-actions.yml +0 -23
- package/ecomplus-stores/iluminim/.gitpod.yml +0 -12
- package/ecomplus-stores/iluminim/.idx/dev.nix +0 -24
- package/ecomplus-stores/iluminim/.nvmrc +0 -1
- package/ecomplus-stores/iluminim/.vscode/extensions.json +0 -8
- package/ecomplus-stores/iluminim/.vscode/launch.json +0 -11
- package/ecomplus-stores/iluminim/.vscode/settings.json +0 -10
- package/ecomplus-stores/iluminim/README.md +0 -31
- package/ecomplus-stores/iluminim/functions/config.json +0 -3
- package/ecomplus-stores/iluminim/functions/example.env +0 -10
- package/ecomplus-stores/iluminim/functions/many/package.json +0 -22
- package/ecomplus-stores/iluminim/functions/ssr/.eslintrc.cjs +0 -6
- package/ecomplus-stores/iluminim/functions/ssr/astro.config.mjs +0 -4
- package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +0 -57
- package/ecomplus-stores/iluminim/functions/ssr/content/settings.json +0 -65
- package/ecomplus-stores/iluminim/functions/ssr/index.js +0 -18
- package/ecomplus-stores/iluminim/functions/ssr/package.json +0 -31
- package/ecomplus-stores/iluminim/functions/ssr/public/admin/.gitkeep +0 -2
- package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms-preview.css +0 -274
- package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms.css +0 -114
- package/ecomplus-stores/iluminim/functions/ssr/public/assets/cvv.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/assets/img-placeholder.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/assets/payments.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/assets/ssl-safe.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/icon.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/large-icon.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner-chamada-desktop-9x81zmd91q.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner2.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/chamada-mobile-q1c6om6jx4.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/headphone.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/logo.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/og-image.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/passion.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect8589.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect859.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect89.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/robots.txt +0 -6
- package/ecomplus-stores/iluminim/functions/ssr/scripts/build.sh +0 -14
- package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +0 -95
- package/ecomplus-stores/iluminim/functions/ssr/src/components/Countdown.vue +0 -79
- package/ecomplus-stores/iluminim/functions/ssr/src/components/HeroSlider.vue +0 -52
- package/ecomplus-stores/iluminim/functions/ssr/src/components/PitchBar.vue +0 -56
- package/ecomplus-stores/iluminim/functions/ssr/src/components/Prices.vue +0 -95
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductsCountdown.vue +0 -20
- package/ecomplus-stores/iluminim/functions/ssr/src/components/SearchModal.vue +0 -6
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +0 -158
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderMenu.vue +0 -58
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderSubmenu.vue +0 -88
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +0 -61
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenavCategory.vue +0 -80
- package/ecomplus-stores/iluminim/functions/ssr/src/env.d.ts +0 -13
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Base.astro +0 -16
- package/ecomplus-stores/iluminim/functions/ssr/src/main/Fallback.astro +0 -10
- package/ecomplus-stores/iluminim/functions/ssr/src/main/Home.astro +0 -49
- package/ecomplus-stores/iluminim/functions/ssr/src/main/Sections.astro +0 -42
- package/ecomplus-stores/iluminim/functions/ssr/src/main/Wildcard.astro +0 -18
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/[...slug].astro +0 -40
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/_vue.ts +0 -3
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/account.astro +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/index.astro +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +0 -37
- package/ecomplus-stores/iluminim/functions/ssr/src/scripts/InlineScripts.astro +0 -10
- package/ecomplus-stores/iluminim/functions/ssr/tailwind.config.cjs +0 -13
- package/ecomplus-stores/iluminim/functions/ssr/tsconfig.json +0 -12
- package/ecomplus-stores/iluminim/functions/ssr/uno.config.cjs +0 -5
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +0 -22
- package/ecomplus-stores/iluminim/package.json +0 -31
- package/ecomplus-stores/iluminim/scripts/install.sh +0 -14
- package/ecomplus-stores/monocard/README.pt-BR.md +0 -102
- package/ecomplus-stores/monocard/functions/core/index.js +0 -9
- package/ecomplus-stores/monocard/functions/events/index.js +0 -9
- package/ecomplus-stores/monocard/functions/modules/index.js +0 -9
- package/ecomplus-stores/monocard/functions/modules/package.json +0 -21
- package/ecomplus-stores/monocard/functions/passport/index.js +0 -9
- package/ecomplus-stores/monocard/functions/passport/package.json +0 -21
- package/ecomplus-stores/monocard/functions/ssr/content/blog.json +0 -18
- package/ecomplus-stores/monocard/functions/ssr/content/brands.json +0 -24
- package/ecomplus-stores/monocard/functions/ssr/content/categories.json +0 -24
- package/ecomplus-stores/monocard/functions/ssr/content/collections.json +0 -24
- package/ecomplus-stores/monocard/functions/ssr/content/home.json +0 -45
- package/ecomplus-stores/monocard/functions/ssr/content/maintenance.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/contato.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/entrega.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/faq.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/pagamentos.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/privacidade.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/sobre-nos.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/termos.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/trocas.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/posts/esta-loja-e-um-pwa.json +0 -9
- package/ecomplus-stores/monocard/functions/ssr/content/products.json +0 -32
- package/ecomplus-stores/monocard/functions/ssr/content/search.json +0 -8
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/analytics.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/compre-confie.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/ebit.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/fb-pixel.json +0 -12
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/gmc-ratings.json +0 -12
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/minicart.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/offers-notification.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/opinioes-verificadas.json +0 -18
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/product-card.json +0 -10
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/product.json +0 -13
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/search-engine.json +0 -8
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/search.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/tag-manager.json +0 -12
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/tawkto.json +0 -12
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/trustvox.json +0 -15
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/user.json +0 -5
- package/ecomplus-stores/monocard/functions/ssr/public/admin/config.json +0 -1
- package/ecomplus-stores/monocard/functions/ssr/public/assets/cms-preview.css +0 -274
- package/ecomplus-stores/monocard/functions/ssr/public/assets/cms.css +0 -114
- package/ecomplus-stores/monocard/functions/ssr/public/assets/cvv.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/FavoritPro-Regular.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/MyriadPro-Regular.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/ssl-safe.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +0 -50
- package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +0 -21
- package/packages/storefront/dist/client/_astro/ShopHeader.7e485e35.js +0 -4
- package/packages/storefront/dist/client/_astro/_...slug_.b693913e.css +0 -1
- package/packages/storefront/dist/client/_astro/index.ea57babe.js +0 -1
- package/packages/storefront/dist/server/chunks/_...4a2548d2.mjs +0 -35
- package/packages/storefront/dist/server/chunks/endpoint@_@js.11be892a.mjs +0 -35
- package/packages/storefront/dist/server/chunks/pages/endpoint.js.f7a896a1.mjs +0 -119
- package/packages/storefront/dist/server/chunks/pages/index.astro.3145bd93.mjs +0 -1649
- package/packages/storefront/src/lib/components/ContentClearfix.astro +0 -12
- /package/ecomplus-stores/{iluminim → monocard}/functions/many/index.js +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/blog/.gitkeep +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/extra-pages/contato.json +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/extra-pages/terms.json +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/extra-pages/trocas.json +0 -0
- /package/ecomplus-stores/{iluminim/functions/ssr/src/layouts/Checkout.astro → monocard/functions/ssr/public/admin/.gitkeep} +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/BannersGrid.astro +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/CartItem.vue +0 -0
- /package/ecomplus-stores/monocard/functions/ssr/src/components/{FeatureTabs.astro → FeaturesSection.astro} +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/ProductShelf.vue +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/pages/~fallback.astro +0 -0
- /package/ecomplus-stores/{iluminim → monocard}/functions/with-apps/index.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/firebase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce on Firebase",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@cloudcommerce/api": "workspace:*",
|
|
33
33
|
"@cloudcommerce/config": "workspace:*",
|
|
34
|
-
"@google-cloud/pubsub": "^4.0.
|
|
35
|
-
"firebase-admin": "^11.
|
|
34
|
+
"@google-cloud/pubsub": "^4.0.6",
|
|
35
|
+
"firebase-admin": "^11.11.0",
|
|
36
36
|
"firebase-functions": "^4.4.1",
|
|
37
37
|
"source-map-support": "^0.5.21"
|
|
38
38
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/modules",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce modules API",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
7
7
|
"exports": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"@ecomplus/utils": "1.5.0-rc.5",
|
|
46
46
|
"ajv": "^8.12.0",
|
|
47
47
|
"ajv-formats": "^2.1.1",
|
|
48
|
-
"axios": "^1.5.
|
|
49
|
-
"firebase-admin": "^11.
|
|
48
|
+
"axios": "^1.5.1",
|
|
49
|
+
"firebase-admin": "^11.11.0",
|
|
50
50
|
"firebase-functions": "^4.4.1",
|
|
51
51
|
"source-map-support": "^0.5.21"
|
|
52
52
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/passport",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"firebase-admin": "^11.
|
|
28
|
+
"firebase-admin": "^11.11.0",
|
|
29
29
|
"firebase-functions": "^4.4.1",
|
|
30
30
|
"source-map-support": "^0.5.21"
|
|
31
31
|
},
|
|
@@ -6,13 +6,15 @@ const { STOREFRONT_BASE_DIR } = process.env;
|
|
|
6
6
|
const baseDir = STOREFRONT_BASE_DIR || process.cwd();
|
|
7
7
|
let imagesManifest;
|
|
8
8
|
const builtImages = [];
|
|
9
|
+
const staticFilepaths = [];
|
|
9
10
|
let cssFilepath;
|
|
10
|
-
readFile(joinPath(baseDir, 'dist/server/
|
|
11
|
-
.then((
|
|
11
|
+
readFile(joinPath(baseDir, 'dist/server/static-builds.csv'), 'utf-8')
|
|
12
|
+
.then((staticBuildsManifest) => {
|
|
12
13
|
const cssFiles = [];
|
|
13
|
-
|
|
14
|
-
const [
|
|
15
|
-
|
|
14
|
+
staticBuildsManifest.split(/\n/).forEach((line) => {
|
|
15
|
+
const [filepath] = line.split(',');
|
|
16
|
+
staticFilepaths.push(filepath);
|
|
17
|
+
if (filepath.endsWith('.css')) cssFiles.push(filepath);
|
|
16
18
|
});
|
|
17
19
|
if (cssFiles.length === 1) {
|
|
18
20
|
cssFilepath = cssFiles[0]?.replace('./dist/client/', '/');
|
|
@@ -110,9 +112,22 @@ export default async (req, res) => {
|
|
|
110
112
|
proxy(req, res);
|
|
111
113
|
return;
|
|
112
114
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
const ext = req.path.split('.').pop();
|
|
116
|
+
if (ext === 'js' || ext === 'css' || ext === 'avif' || ext === 'webp') {
|
|
117
|
+
const baseFilepath = req.path.replace(new RegExp(`(\\.|_)[a-zA-Z0-9]+\\.${ext}$`), '');
|
|
118
|
+
if (baseFilepath !== req.path) {
|
|
119
|
+
const filepath = staticFilepaths.find((_filepath) => {
|
|
120
|
+
return _filepath.startsWith(baseFilepath) && _filepath.endsWith(`.${ext}`);
|
|
121
|
+
});
|
|
122
|
+
if (filepath) {
|
|
123
|
+
res.set('Cache-Control', 'max-age=21600').redirect(302, filepath);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (ext === 'css' && cssFilepath) {
|
|
128
|
+
res.set('Cache-Control', 'max-age=3600').redirect(302, cssFilepath);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
116
131
|
}
|
|
117
132
|
if (req.path === '/_image') {
|
|
118
133
|
const { href } = req.query;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-storefront.js","sourceRoot":"","sources":["../../src/firebase/serve-storefront.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAW/C,MAAM,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAC5C,MAAM,OAAO,GAAG,mBAAmB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AACrD,IAAI,cAAsB,CAAC;AAE3B,MAAM,WAAW,GAAiB,EAAE,CAAC;AAErC,IAAI,WAA+B,CAAC;AACpC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"serve-storefront.js","sourceRoot":"","sources":["../../src/firebase/serve-storefront.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAW/C,MAAM,EAAE,mBAAmB,EAAE,GAAG,OAAO,CA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,iBAAiB,CAAC,GAAG,EAAE,kCAAkC,CAAC;iBACvD,IAAI,CAAC,IAAI,CAAC,CAAC;SACf;QAAC,OAAO,CAAC,EAAE;YACV,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SAClB;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/ssr",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront SSR",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@vueuse/core": "10.4.1",
|
|
34
34
|
"astro": "2.10.15",
|
|
35
35
|
"astro-capo": "^0.0.1",
|
|
36
|
-
"firebase-admin": "^11.
|
|
36
|
+
"firebase-admin": "^11.11.0",
|
|
37
37
|
"firebase-functions": "^4.4.1",
|
|
38
38
|
"vue": "^3.3.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@cloudcommerce/types": "workspace:*",
|
|
42
|
-
"@cloudflare/workers-types": "^4.
|
|
42
|
+
"@cloudflare/workers-types": "^4.20230922.0",
|
|
43
43
|
"@firebase/app-types": "^0.9.0"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -19,13 +19,15 @@ let imagesManifest: string;
|
|
|
19
19
|
type BuiltImage = { filename: string, width: number, height: number };
|
|
20
20
|
const builtImages: BuiltImage[] = [];
|
|
21
21
|
|
|
22
|
+
const staticFilepaths: string[] = [];
|
|
22
23
|
let cssFilepath: string | undefined;
|
|
23
|
-
readFile(joinPath(baseDir, 'dist/server/
|
|
24
|
-
.then((
|
|
24
|
+
readFile(joinPath(baseDir, 'dist/server/static-builds.csv'), 'utf-8')
|
|
25
|
+
.then((staticBuildsManifest) => {
|
|
25
26
|
const cssFiles: string[] = [];
|
|
26
|
-
|
|
27
|
-
const [
|
|
28
|
-
|
|
27
|
+
staticBuildsManifest.split(/\n/).forEach((line) => {
|
|
28
|
+
const [filepath] = line.split(',');
|
|
29
|
+
staticFilepaths.push(filepath);
|
|
30
|
+
if (filepath.endsWith('.css')) cssFiles.push(filepath);
|
|
29
31
|
});
|
|
30
32
|
if (cssFiles.length === 1) {
|
|
31
33
|
cssFilepath = cssFiles[0]?.replace('./dist/client/', '/');
|
|
@@ -128,9 +130,23 @@ export default async (req: Request, res: Response) => {
|
|
|
128
130
|
proxy(req, res);
|
|
129
131
|
return;
|
|
130
132
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
|
|
134
|
+
const ext = req.path.split('.').pop();
|
|
135
|
+
if (ext === 'js' || ext === 'css' || ext === 'avif' || ext === 'webp') {
|
|
136
|
+
const baseFilepath = req.path.replace(new RegExp(`(\\.|_)[a-zA-Z0-9]+\\.${ext}$`), '');
|
|
137
|
+
if (baseFilepath !== req.path) {
|
|
138
|
+
const filepath = staticFilepaths.find((_filepath) => {
|
|
139
|
+
return _filepath.startsWith(baseFilepath) && _filepath.endsWith(`.${ext}`);
|
|
140
|
+
});
|
|
141
|
+
if (filepath) {
|
|
142
|
+
res.set('Cache-Control', 'max-age=21600').redirect(302, filepath);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (ext === 'css' && cssFilepath) {
|
|
147
|
+
res.set('Cache-Control', 'max-age=3600').redirect(302, cssFilepath);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
134
150
|
}
|
|
135
151
|
|
|
136
152
|
if (req.path === '/_image') {
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
// Generated by unplugin-auto-import
|
|
6
|
+
export {}
|
|
7
|
+
declare global {
|
|
8
|
+
const EffectScope: typeof import('vue')['EffectScope']
|
|
9
|
+
const computed: typeof import('vue')['computed']
|
|
10
|
+
const createApp: typeof import('vue')['createApp']
|
|
11
|
+
const customRef: typeof import('vue')['customRef']
|
|
12
|
+
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
|
13
|
+
const defineComponent: typeof import('vue')['defineComponent']
|
|
14
|
+
const effectScope: typeof import('vue')['effectScope']
|
|
15
|
+
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
|
16
|
+
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
|
17
|
+
const h: typeof import('vue')['h']
|
|
18
|
+
const inject: typeof import('vue')['inject']
|
|
19
|
+
const isProxy: typeof import('vue')['isProxy']
|
|
20
|
+
const isReactive: typeof import('vue')['isReactive']
|
|
21
|
+
const isReadonly: typeof import('vue')['isReadonly']
|
|
22
|
+
const isRef: typeof import('vue')['isRef']
|
|
23
|
+
const markRaw: typeof import('vue')['markRaw']
|
|
24
|
+
const nextTick: typeof import('vue')['nextTick']
|
|
25
|
+
const onActivated: typeof import('vue')['onActivated']
|
|
26
|
+
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
|
27
|
+
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
|
28
|
+
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
|
29
|
+
const onDeactivated: typeof import('vue')['onDeactivated']
|
|
30
|
+
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
|
31
|
+
const onMounted: typeof import('vue')['onMounted']
|
|
32
|
+
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
|
33
|
+
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
|
34
|
+
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
|
35
|
+
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
|
36
|
+
const onUnmounted: typeof import('vue')['onUnmounted']
|
|
37
|
+
const onUpdated: typeof import('vue')['onUpdated']
|
|
38
|
+
const provide: typeof import('vue')['provide']
|
|
39
|
+
const reactive: typeof import('vue')['reactive']
|
|
40
|
+
const readonly: typeof import('vue')['readonly']
|
|
41
|
+
const ref: typeof import('vue')['ref']
|
|
42
|
+
const resolveComponent: typeof import('vue')['resolveComponent']
|
|
43
|
+
const shallowReactive: typeof import('vue')['shallowReactive']
|
|
44
|
+
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
|
45
|
+
const shallowRef: typeof import('vue')['shallowRef']
|
|
46
|
+
const toRaw: typeof import('vue')['toRaw']
|
|
47
|
+
const toRef: typeof import('vue')['toRef']
|
|
48
|
+
const toRefs: typeof import('vue')['toRefs']
|
|
49
|
+
const toValue: typeof import('vue')['toValue']
|
|
50
|
+
const triggerRef: typeof import('vue')['triggerRef']
|
|
51
|
+
const unref: typeof import('vue')['unref']
|
|
52
|
+
const useAttrs: typeof import('vue')['useAttrs']
|
|
53
|
+
const useCssModule: typeof import('vue')['useCssModule']
|
|
54
|
+
const useCssVars: typeof import('vue')['useCssVars']
|
|
55
|
+
const useSlots: typeof import('vue')['useSlots']
|
|
56
|
+
const watch: typeof import('vue')['watch']
|
|
57
|
+
const watchEffect: typeof import('vue')['watchEffect']
|
|
58
|
+
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
|
59
|
+
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
|
60
|
+
}
|
|
61
|
+
// for type re-export
|
|
62
|
+
declare global {
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
|
65
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
2
|
import { lstatSync, readFileSync } from 'node:fs';
|
|
3
|
-
import { join as joinPath } from 'node:path';
|
|
3
|
+
import { join as joinPath, relative as relativePath } from 'node:path';
|
|
4
4
|
import * as dotenv from 'dotenv';
|
|
5
5
|
import { defineConfig } from 'astro/config';
|
|
6
6
|
import node from '@astrojs/node';
|
|
@@ -8,6 +8,7 @@ import vue from '@astrojs/vue';
|
|
|
8
8
|
import image from '@astrojs/image';
|
|
9
9
|
import UnoCSS from 'unocss/astro';
|
|
10
10
|
import AstroPWA from '@vite-pwa/astro';
|
|
11
|
+
import AutoImport from 'unplugin-auto-import/astro';
|
|
11
12
|
import dictionaryDir from '@cloudcommerce/i18n/lib/dirname';
|
|
12
13
|
import getConfig from './config/storefront.config.mjs';
|
|
13
14
|
|
|
@@ -18,6 +19,7 @@ const isSSG = process.env.BUILD_OUTPUT === 'static';
|
|
|
18
19
|
const outDir = process.env.BUILD_OUT_DIR || (isSSG ? './dist/client' : './dist');
|
|
19
20
|
const isToServerless = !isSSG && process.env.DEPLOY_RUNTIME === 'serverless';
|
|
20
21
|
const deployRand = process.env.DEPLOY_RAND || '_';
|
|
22
|
+
const isLibDev = !(relativePath(__dirname, process.cwd()));
|
|
21
23
|
|
|
22
24
|
const {
|
|
23
25
|
lang,
|
|
@@ -179,6 +181,27 @@ const genAstroConfig = ({
|
|
|
179
181
|
injectEntry: false,
|
|
180
182
|
}),
|
|
181
183
|
AstroPWA(vitePWAOptions),
|
|
184
|
+
AutoImport({
|
|
185
|
+
include: [
|
|
186
|
+
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
|
|
187
|
+
/\.vue$/, /\.vue\?vue/, // .vue
|
|
188
|
+
/\.mdx?$/, // .md, .mdx
|
|
189
|
+
/\.astro$/,
|
|
190
|
+
],
|
|
191
|
+
imports: ['vue'],
|
|
192
|
+
dts: isLibDev ? '.auto-imports.d.ts' : false,
|
|
193
|
+
}),
|
|
194
|
+
{
|
|
195
|
+
name: 'client:context',
|
|
196
|
+
hooks: {
|
|
197
|
+
'astro:config:setup': ({ addClientDirective }) => {
|
|
198
|
+
addClientDirective({
|
|
199
|
+
name: 'context',
|
|
200
|
+
entrypoint: joinPath(__dirname, 'config/astro/context-directive.mjs'),
|
|
201
|
+
});
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
},
|
|
182
205
|
];
|
|
183
206
|
if (!isToServerless) {
|
|
184
207
|
integrations.push(image({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hydrate on context script executed (`$storefront.apiContext` ready)
|
|
3
|
+
* Check event emits at BaseHead.astro
|
|
4
|
+
* @type {import('astro').ClientDirective}
|
|
5
|
+
*/
|
|
6
|
+
export default (load) => {
|
|
7
|
+
const hy = async () => {
|
|
8
|
+
const hydrate = await load();
|
|
9
|
+
await hydrate();
|
|
10
|
+
};
|
|
11
|
+
const id = window.$storefront?.apiContext?.doc._id || null;
|
|
12
|
+
if (window._firstLoadContextId === id && window._emitedContextId === id) {
|
|
13
|
+
console.log('[ctx] first load');
|
|
14
|
+
hy();
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
delete window._firstLoadContextId;
|
|
17
|
+
}, 49);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
window.addEventListener('storefront:apiContext', hy, { once: true });
|
|
21
|
+
};
|
package/packages/storefront/dist/client/_astro/{Carousel.9ad2e1dc.js → Carousel.4bf71bce.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as U,d as G,b as J}from"./index.
|
|
1
|
+
import{a as U,d as G,b as J}from"./index.fadf28bd.js";import{_ as q,d as K,B as X,o as B,a as Q,q as v,b as Y,n as $,i as c,j as h,t as D,c as F,k as Z,E as ee,Q as te,C as ae,l as oe,w as P,u as le,e as M,H as se,I as re}from"./_plugin-vue_export-helper.ee681fa8.js";const ne=K({__name:"CarouselControl",props:{isPrev:{type:Boolean,default:!1}},setup(r,{expose:u}){u();const{changeSlide:l}=X(L),t={changeSlide:l};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}}),ue=["aria-label","data-carousel-control"];function ie(r,u,l,t,n,o){return B(),Q("button",{type:"button","aria-label":l.isPrev?"Anterior":"Próximo",onClick:u[0]||(u[0]=m=>t.changeSlide(l.isPrev?-1:1)),class:$(["group absolute top-0 z-1",l.isPrev?"left-0":"right-0"]),"data-carousel-control":l.isPrev?"previous":"next"},[v(r.$slots,"default",{},()=>[Y("i",{class:$(["m-0",l.isPrev?"i-chevron-left group-active:-translate-x-1":"i-chevron-right group-active:translate-x-1"])},null,2)])],10,ue)}const ce=q(ne,[["render",ie]]),L=Symbol("carousel"),de=K({__name:"Carousel",props:{as:{default:"ul"},modelValue:{default:1},autoplay:{}},emits:["update:modelValue"],setup(r,{expose:u,emit:l}){u();const t=r,n=c(0);h(D(t,"modelValue"),e=>{n.value=e-1},{immediate:!0}),h(n,(e,a)=>{e!==a&&l("update:modelValue",e+1)});const o=c(null),{x:m,isScrolling:T,arrivedState:_}=U(o),W=F(()=>_.left),I=F(()=>_.right),s=c([]),g=c(0),p=c(0),k=c(0),V=()=>{o.value&&(g.value=o.value.scrollWidth,p.value=o.value.offsetWidth)},z=()=>{if(!o.value)return;let e=[...o.value.children];e.length===1&&e[0].tagName.endsWith("SLOT")&&(e=[...e[0].children]),s.value=e.map(a=>({offsetLeft:a.offsetLeft,width:a.offsetWidth}))},E=e=>{let a=n.value+e;if(a>=s.value.length)return 0;a<0&&(a=s.value.length+a);const{offsetLeft:y,width:d}=s.value[a]||{};return d?y:0},x=()=>{const e=s.value.findIndex(a=>Math.abs(a.offsetLeft-m.value)<=5);e>-1&&(n.value=e||0)},O=()=>{const e=g.value-p.value;k.value=s.value.findIndex(({offsetLeft:a})=>a>=e-5)};let i;const f=()=>{t.autoplay&&(clearTimeout(i),i=setTimeout(()=>{C(1)},t.autoplay))},C=(e,a=!0)=>{if(s.value.length<2)return;if(a&&(e===1||e===-1)){let d=0,A=0;for(let S=n.value;S<s.value.length;S++){const{width:H}=s.value[S]||{};if(H&&(d+=1,A+=H,A>=p.value))break}d&&(e=e>0?d:-d)}const y=E(e);o.value?.scrollTo({left:y,behavior:"smooth"}),f()};h(T,e=>{e?clearTimeout(i):(x(),f())});const R=c(null),N=G(R);h(N,e=>{e?clearTimeout(i):f()});const b=()=>{o.value&&(V(),z(),x(),O())},w=J(()=>{o.value&&(o.value.scrollLeft=0,b())},400);Z(()=>{b(),ee(()=>{o.value&&[...o.value.children].forEach(e=>{e.setAttribute("tabindex","0")})}),f(),window.addEventListener("resize",w)}),te(()=>{window.removeEventListener("resize",w),clearTimeout(i)}),ae(L,{autoplay:D(t,"autoplay"),changeSlide:C,isBoundLeft:W,isBoundRight:I});const j={carouselKey:L,props:t,emit:l,currentIndex:n,wrapper:o,currentPos:m,isScrolling:T,arrivedState:_,isBoundLeft:W,isBoundRight:I,slidesWidth:s,wrapperScrollWidth:g,wrapperVisibleWidth:p,indexCount:k,calcWrapperWidth:V,calcSlidesWidth:z,calcNextOffsetLeft:E,calcCurrentIndex:x,calcIndexCount:O,get autoplayTimer(){return i},set autoplayTimer(e){i=e},restartAutoplay:f,changeSlide:C,carousel:R,isHovered:N,calcOnInit:b,onResize:w,CarouselControl:ce};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),fe={ref:"carousel",class:"relative","data-carousel":""};function ve(r,u,l,t,n,o){return B(),Q("div",fe,[(B(),oe(le(l.as),{ref:"wrapper",class:"flex overflow-x-scroll overflow-y-hidden list-none m-0 p-0 snap-x snap-mandatory scroll-smooth [&>*]:snap-start [&>*]:outline-none",style:{"scrollbar-width":"none","-webkit-overflow-scrolling":"touch","-ms-overflow-style":"none"},"data-carousel-wrapper":""},{default:P(()=>[v(r.$slots,"default")]),_:3},512)),v(r.$slots,"controls",se(re({changeSlide:t.changeSlide,isBoundLeft:t.isBoundLeft,isBoundRight:t.isBoundRight,currentPage:t.currentIndex+1,pageCount:t.indexCount+1})),()=>[M(t.CarouselControl,{"is-prev":""},{default:P(()=>[v(r.$slots,"previous")]),_:3}),M(t.CarouselControl,null,{default:P(()=>[v(r.$slots,"next")]),_:3})])],512)}const me=q(de,[["render",ve]]);export{me as C,ce as a};
|
package/packages/storefront/dist/client/_astro/{CartSidebar.a6c6a885.js → CartSidebar.05b12b39.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as g,c as m,_ as x,o as i,a as c,q as b,B as P,F as v,y as h,p as C,i as F,C as j,b as a,x as d,H as w,I as M,f as q,$ as Q,e as _,w as y,r as B,l as z,h as k,g as L}from"./_plugin-vue_export-helper.ee681fa8.js";import{f as N}from"./modules-info.
|
|
1
|
+
import{d as g,c as m,_ as x,o as i,a as c,q as b,B as P,F as v,y as h,p as C,i as F,C as j,b as a,x as d,H as w,I as M,f as q,$ as Q,e as _,w as y,r as B,l as z,h as k,g as L}from"./_plugin-vue_export-helper.ee681fa8.js";import{f as N}from"./modules-info.df822732.js";import{p as U,r as A,s as O,t as $}from"./api.a2eda23e.js";import{g as T,P as V}from"./Prices.78eb0a61.js";import{g as E}from"./img.ec6ba316.js";import{e as D}from"./index.fadf28bd.js";import"./session-utm.744b0db3.js";import"./format-money.923559cc.js";const R=g({__name:"CheckoutLink",props:{to:{default:"cart"},cartUrl:{default:globalThis.$storefront.settings.cart_url||"/app/#/cart"},checkoutUrl:{default:globalThis.$storefront.settings.checkout_url||"/app/#/checkout"}},setup(r,{expose:s}){s();const t=r,e=m(()=>t.to==="cart"?t.cartUrl:t.checkoutUrl),n={props:t,href:e};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),H=["href"];function K(r,s,t,e,n,l){return i(),c("a",{href:e.href},[b(r.$slots,"default")],8,H)}const G=x(R,[["render",K]]),J=r=>{const s=m(()=>!r.item&&r.product?U(r.product):null),t=m(()=>r.item||s.value),e=m(()=>T(t.value)),n=m(()=>{const{slug:u}=t.value;return typeof u=="string"?`/${u}`:null}),l=m(()=>{if(t.value.picture)return E(t.value.picture,void 0,r.pictureSize||"small")}),o=m(()=>t.value.final_price||t.value.price);return{cartItem:t,title:e,link:n,image:l,finalPrice:o}},W=g({__name:"QuantitySelectorControl",props:{isMinus:{type:Boolean}},setup(r,{expose:s}){s();const{value:t,isBoundMin:e,isBoundMax:n}=P(S),l={value:t,isBoundMin:e,isBoundMax:n};return Object.defineProperty(l,"__isScriptSetup",{enumerable:!1,value:!0}),l}}),X=["data-quantity-selector-control","aria-label","disabled"];function Y(r,s,t,e,n,l){return i(),c("button",{type:"button",class:"w-10 h-12 text-xl leading-12 enabled:text-primary enabled:hover:bg-primary-100/70 disabled:opacity-40","data-quantity-selector-control":t.isMinus?"minus":"plus","aria-label":t.isMinus?"Menos":"Mais",disabled:t.isMinus?e.isBoundMin:e.isBoundMax,onClick:s[0]||(s[0]=C(o=>e.value+=t.isMinus?-1:1,["prevent"]))},[b(r.$slots,"default",{},()=>[t.isMinus?(i(),c(v,{key:0},[h("−")],64)):(i(),c(v,{key:1},[h("+")],64))])],8,X)}const Z=x(W,[["render",Y]]),S=Symbol("quantitySelector"),ee=g({__name:"QuantitySelector",props:{modelValue:{default:1},min:{default:1},max:{},step:{},disabled:{type:Boolean},readonly:{type:Boolean}},emits:["update:modelValue"],setup(r,{expose:s,emit:t}){s();const e=r,n=F(null),l=`NInput${D()}`,o=m({get(){return e.modelValue},set(f){f<e.min&&(f=e.min,n.value.value=`${f}`),e.max&&f>e.max&&(f=e.max,n.value.value=`${f}`),t("update:modelValue",f)}}),u=m(()=>e.min>=o.value),p=m(()=>e.max<=o.value);j(S,{value:o,isBoundMin:u,isBoundMax:p});const I={quantitySelectorKey:S,props:e,emit:t,input:n,inputId:l,value:o,isBoundMin:u,isBoundMax:p,QuantitySelectorControl:Z};return Object.defineProperty(I,"__isScriptSetup",{enumerable:!1,value:!0}),I}}),te={"data-quantity-selector":""},re={class:"flex items-center"},se=["min","max","step","disabled","readonly"];function ae(r,s,t,e,n,l){return i(),c("div",te,[b(r.$slots,"label",w(M({inputId:e.inputId,value:e.value})),()=>[a("label",{for:e.inputId,class:"sr-only"},d("Quantidade"))]),a("div",re,[q(a("input",{ref:"input",type:"number",id:e.inputId,"onUpdate:modelValue":s[0]||(s[0]=o=>e.value=o),min:t.min,max:t.max,step:t.step,disabled:t.disabled,readonly:t.readonly,class:"h-12 w-14 px-2 text-lg border-transparent text-center [-moz-appearance:_textfield] [&::-webkit-outer-spin-button]:m-0 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none"},null,8,se),[[Q,e.value]]),b(r.$slots,"controls",w(M({value:e.value,isBoundMin:e.isBoundMin,isBoundMax:e.isBoundMax})),()=>[_(e.QuantitySelectorControl,{"is-minus":"",class:"order-first"},{default:y(()=>[b(r.$slots,"minus")]),_:3}),_(e.QuantitySelectorControl,{class:"order-last"},{default:y(()=>[b(r.$slots,"plus")]),_:3})])])])}const ne=x(ee,[["render",ae]]),oe=g({__name:"CartItem",props:{item:{},product:{},pictureSize:{}},setup(r,{expose:s}){s();const t=r,{cartItem:e,title:n,link:l,image:o,finalPrice:u}=J(t),p={props:t,cartItem:e,title:n,link:l,image:o,finalPrice:u,get removeCartItem(){return A},QuantitySelector:ne,Prices:V};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}}),ie={class:"relative bg-white shadow-sm"},le={class:"py-2 flex-auto text-sm text-base-700 group-hover:text-base-900 group-hover:underline"},ce=a("span",{class:"w-5 h-5 text-sm leading-none flex flex-col justify-center rounded-full border-3 text-danger-800 border-danger-700/30"},[a("i",{class:"i-close my-0 mx-auto"})],-1),ue=[ce],de={class:"flex justify-between items-center border-t-2 border-base-100"},me={class:"border-r-2 border-base-100"};function pe(r,s,t,e,n,l){const o=B("AImg"),u=B("ALink");return i(),c("article",ie,[_(u,{href:e.link,class:"flex items-center gap-5 p-4 group"},{default:y(()=>[e.image?(i(),z(o,{key:0,picture:e.image,alt:e.title,class:"w-20 h-20 object-cover"},null,8,["picture","alt"])):k("",!0),a("p",le,d(e.title),1)]),_:1},8,["href"]),e.cartItem._id?(i(),c("button",{key:0,onClick:s[0]||(s[0]=C(p=>e.removeCartItem(e.cartItem._id),["stop"])),class:"absolute top-0 right-0 p-2 opacity-70 hover:opacity-100","aria-label":"Remover"},ue)):k("",!0),a("div",de,[a("div",me,[_(e.QuantitySelector,{modelValue:e.cartItem.quantity,"onUpdate:modelValue":s[1]||(s[1]=p=>e.cartItem.quantity=p),min:e.cartItem.min_quantity,max:e.cartItem.max_quantity},null,8,["modelValue","min","max"])]),_(e.Prices,{"base-price":e.cartItem.base_price,price:e.finalPrice,"has-cashback":!1,"has-price-options":!1,class:"px-4 py-2.5 text-[95%] text-right"},null,8,["base-price","price"])])])}const _e=x(oe,[["render",pe]]),fe=g({__name:"CartSidebar",emits:["close"],setup(r,{expose:s,emit:t}){s();const e={emit:t,get freeShippingFromValue(){return N},get shoppingCart(){return O},get totalItems(){return $},CheckoutLink:G,Prices:V,CartItem:_e};return Object.defineProperty(e,"__isScriptSetup",{enumerable:!1,value:!0}),e}}),be={class:"flex flex-col h-screen bg-white"},he={class:"px-6 py-4 flex justify-end items-center gap-3 shadow ring-1 ring-black/5 z-10"},ge=a("span",{class:"text-right text-base text-base-600 font-medium"},d("Meu carrinho de compras"),-1),xe={class:"min-w-[3rem] text-right"},ye={class:"ui-badge-pill-lg"},ve={class:"grow overflow-y-auto bg-base-50"},ke={key:0,class:"text-sm text-center"},Se={key:0,class:"p-3 secondary-subtle"},Ce=a("strong",{class:"lowercase"},d("Frete grátis"),-1),Ie={key:1,class:"p-3 bg-success-50 text-success-800"},we=a("i",{class:"text-success-900 i-check mr-1"},null,-1),Me={class:"px-4 pt-4 pb-2"},Be={class:"px-5 pt-4 pb-3 ring-2 ring-black/5 z-10"},Ve={class:"grid grid-cols-5 gap-3 items-center text-right"},Pe=a("div",{class:"col-span-2"},d("Subtotal"),-1),Fe=a("i",{class:"i-check mr-2"},null,-1),je=a("i",{class:"i-arrow-left mr-1"},null,-1);function qe(r,s,t,e,n,l){return i(),c("aside",be,[a("header",he,[ge,a("span",xe,[a("span",ye,d(e.totalItems),1)])]),a("article",ve,[e.freeShippingFromValue?(i(),c("div",ke,[e.freeShippingFromValue>e.shoppingCart.subtotal?(i(),c("div",Se,[h(d("Adicione $1 para ganhar".replace("$1",r.$money(e.freeShippingFromValue-e.shoppingCart.subtotal)))+" ",1),Ce])):(i(),c("div",Ie,[we,h(" "+d("Frete grátis a partir de")+" "+d(r.$money(e.freeShippingFromValue)),1)]))])):k("",!0),a("ul",Me,[(i(!0),c(v,null,L(e.shoppingCart.items,(o,u)=>(i(),c("li",{key:u},[_(e.CartItem,{item:o,class:"mb-3"},null,8,["item"])]))),128))])]),a("footer",Be,[a("div",Ve,[Pe,_(e.Prices,{price:e.shoppingCart.subtotal,class:"col-span-3 text-lg"},null,8,["price"])]),_(e.CheckoutLink,{class:"ui-btn-lg ui-btn-primary w-full text-right my-2.5"},{default:y(()=>[Fe,h(" "+d("Finalizar compra"))]),_:1}),a("a",{href:"#",onClick:s[0]||(s[0]=C(o=>e.emit("close"),["prevent"])),class:"ui-link text-base-500 hover:text-base-700 text-sm"},[je,h(" "+d("Continuar comprando"))])])])}const Te=x(fe,[["render",qe]]);export{Te as default};
|
package/packages/storefront/dist/client/_astro/{HeroSlider.ee1e6200.js → HeroSlider.fe108a14.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,_ as v,d as w,r as C,o as r,a as i,e as u,w as o,q as y,n as x,l as g,y as b,x as f,u as T,h as m,f as k,v as S,b as _,F as B,g as H,K as L}from"./_plugin-vue_export-helper.ee681fa8.js";import{C as j,a as N}from"./Carousel.
|
|
1
|
+
import{c as d,_ as v,d as w,r as C,o as r,a as i,e as u,w as o,q as y,n as x,l as g,y as b,x as f,u as T,h as m,f as k,v as S,b as _,F as B,g as H,K as L}from"./_plugin-vue_export-helper.ee681fa8.js";import{C as j,a as N}from"./Carousel.4bf71bce.js";import{p}from"./modules-info.df822732.js";import"./index.fadf28bd.js";import"./session-utm.744b0db3.js";import"./format-money.923559cc.js";const P=s=>{const a=d(()=>s.title?p(s.title).value:""),t=d(()=>s.subtitle?p(s.subtitle).value:""),e=d(()=>s.buttonText?p(s.buttonText).value:""),c=d(()=>!!(a.value||t.value||e.value));return{parsedTitle:a,parsedSubtitle:t,parsedButtonText:e,hasHeader:c}},V=w({__name:"Banner",props:{img:{},alt:{},mobileImg:{},href:{},title:{},subtitle:{},buttonLink:{},buttonText:{},headingTag:{default:"h3"}},setup(s,{expose:a}){a();const t=s,{hasHeader:e,parsedTitle:c,parsedSubtitle:h,parsedButtonText:l}=P(t),n={props:t,hasHeader:e,parsedTitle:c,parsedSubtitle:h,parsedButtonText:l};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),D={key:0,class:"p-12 xl:ps-32 mb-3 sm:mb-0"},z={key:1,class:"text-lg mt-4 md:mt-6"};function A(s,a,t,e,c,h){const l=C("ALink");return r(),i("div",{class:x(["mx-auto overflow-x-hidden",e.hasHeader?"grid grid-cols-1 sm:grid-cols-2 items-center":null])},[u(l,{href:t.href,class:x(e.hasHeader?"sm:order-last [&_img]:max-w-full sm:[&_img]:max-w-none [&_img]:aspect-video sm:[&_img]:aspect-[2.5] [&_img]:object-cover":"[&_img]:max-w-full")},{default:o(()=>[y(s.$slots,"picture")]),_:3},8,["href","class"]),e.hasHeader?(r(),i("div",D,[e.parsedTitle?(r(),g(T(t.headingTag),{key:0,class:"ui-title mt-1"},{default:o(()=>[b(f(e.parsedTitle),1)]),_:1})):m("",!0),e.parsedSubtitle?(r(),i("p",z,f(e.parsedSubtitle),1)):m("",!0),e.parsedButtonText?(r(),g(l,{key:2,href:t.buttonLink,class:"ui-btn-lg ui-btn-contrast min-w-[150px] mt-7 md:mt-10"},{default:o(()=>[b(f(e.parsedButtonText),1)]),_:1},8,["href"])):m("",!0)])):m("",!0)],2)}const F=v(V,[["render",A]]),O=w({__name:"HeroSlider",props:{autoplay:{},slides:{}},setup(s,{expose:a}){a();const t={Carousel:j,CarouselControl:N,Banner:F};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}}),q={class:"relative mx-auto"},E={class:"absolute z-10 bottom-5 flex justify-end items-center w-screen right-5 xl:right-auto xl:max-w-screen-xl xl:left-1/2 xl:-ms-[640px]"},I={class:"relative w-20 h-10 rounded-full bg-white/50 text-primary shadow-sm ring-1 ring-black/5"},K=_("i",{class:"i-arrow-left"},null,-1),G=_("i",{class:"i-arrow-right"},null,-1);function J(s,a,t,e,c,h){return r(),i("section",q,[u(e.Carousel,{autoplay:t.autoplay,class:"secondary [&>*]:items-center"},{controls:o(()=>[k(_("div",E,[_("div",I,[u(e.CarouselControl,{class:"w-10 h-10 rounded-full hover:bg-primary/10","is-prev":""},{default:o(()=>[K]),_:1}),u(e.CarouselControl,{class:"w-10 h-10 rounded-full hover:bg-primary/10"},{default:o(()=>[G]),_:1})])],512),[[S,t.slides.length>1]])]),default:o(()=>[(r(!0),i(B,null,H(t.slides,(l,n)=>(r(),i("li",{key:n,class:"shrink-0 basis-full"},[u(e.Banner,L({...l,headingTag:n===0?"h2":"h3"},{class:"w-screen max-w-screen-2xl"}),{picture:o(()=>[y(s.$slots,`picture-${n}`)]),_:2},1040)]))),128))]),_:3},8,["autoplay"])])}const Y=v(O,[["render",J]]);export{Y as default};
|
package/packages/storefront/dist/client/_astro/{PitchBar.6111676e.js → PitchBar.2c821b77.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as m,c as u,_ as f,d as v,r as C,a as o,b as _,e as i,w as p,o as l,f as g,v as b,F as w,g as x,n as S,h as y}from"./_plugin-vue_export-helper.ee681fa8.js";import{p as k}from"./modules-info.
|
|
1
|
+
import{s as m,c as u,_ as f,d as v,r as C,a as o,b as _,e as i,w as p,o as l,f as g,v as b,F as w,g as x,n as S,h as y}from"./_plugin-vue_export-helper.ee681fa8.js";import{p as k}from"./modules-info.df822732.js";import{C as B,a as L}from"./Carousel.4bf71bce.js";import"./session-utm.744b0db3.js";import"./index.fadf28bd.js";import"./format-money.923559cc.js";function P(t,s){{const a=btoa(JSON.stringify({filename:t}));window.parent.postMessage(JSON.parse(JSON.stringify({type:"open",filename:t,id:a})),window.location.origin),window.addEventListener("message",e=>{e.data.id===a&&s(e.data.data)})}}const V=t=>{const s=m(null);return window.$isCmsPreview&&P(t,a=>{s.value=a}),{liveContent:s}},N=t=>{const s={slides:[]};return t.header?.pitch_bar&&(s.slides=t.header.pitch_bar),s},O=t=>{const{liveContent:s}=V("layout"),a=u(()=>(s.value?N(s.value).slides:t.slides).map(({html:n})=>k(n).value.replace(/<\/?p>/g,"").replace(/<(\/?d-md)>/g,"<$1>"))),e=u(()=>a.value.filter(r=>r).length);return{parsedContents:a,countValidSlides:e}},J=v({__name:"PitchBar",props:{slides:{}},setup(t,{expose:s}){s();const a=t,{parsedContents:e,countValidSlides:r}=O(a),n={props:a,parsedContents:e,countValidSlides:r,Carousel:B,CarouselControl:L};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),M={class:"bg-base-100 relative z-20"},z={class:"container md:w-2/3 mx-auto px-3 py-1"},A=["innerHTML"],E={class:"text-xl leading-none text-base-400"};function F(t,s,a,e,r,n){const h=C("ALink");return l(),o("div",M,[_("div",z,[i(e.Carousel,{autoplay:e.countValidSlides>1?7e3:void 0},{controls:p(()=>[g(_("div",E,[i(e.CarouselControl,{class:"pr-2 bg-base-100 hover:text-base-700","is-prev":""}),i(e.CarouselControl,{class:"pl-2 bg-base-100 hover:text-base-700"})],512),[[b,e.countValidSlides>1]])]),default:p(()=>[(l(!0),o(w,null,x(a.slides,(c,d)=>(l(),o("li",{key:d,class:"shrink-0 basis-full h-full text-center"},[i(h,{href:c.href,target:c.target,class:S(["inline-block px-8",c.href?"hover:underline":null])},{default:p(()=>[e.parsedContents[d]?(l(),o("span",{key:0,innerHTML:e.parsedContents[d],class:"prose text-sm text-base-800"},null,8,A)):y("",!0)]),_:2},1032,["href","target","class"])]))),128))]),_:1},8,["autoplay"])])])}const q=f(J,[["render",F]]);export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a0 as W,c as r,N as g,O as A,_ as z,d as S,r as E,o,a as l,x as i,h as c,b as h,y as D,n as w,e as B,w as L}from"./_plugin-vue_export-helper.ee681fa8.js";import{i as M}from"./img.ec6ba316.js";import{a as T,i as F,d as R,l as q}from"./modules-info.
|
|
1
|
+
import{a0 as W,c as r,N as g,O as A,_ as z,d as S,r as E,o,a as l,x as i,h as c,b as h,y as D,n as w,e as B,w as L}from"./_plugin-vue_export-helper.ee681fa8.js";import{i as M}from"./img.ec6ba316.js";import{a as T,i as F,d as R,l as q}from"./modules-info.df822732.js";const G=(n,a=W.get("lang"))=>a&&n.i18n&&n.i18n[a]?n.i18n[a]:n.name||n.title||M(n.i18n,a)||"",de=G,C=(n,a)=>{const{type:s,value:e}=a;let _;return e?(s==="percentage"?_=n*((100-e)/100):_=n-e,_>0?_:0):n},H=n=>{const a=r(()=>n.product||{price:n.price||0,base_price:n.basePrice}),s=r(()=>{const{variations:t}=a.value;if(t){const u=g(a.value);for(let P=0;P<t.length;P++)if(g({...a.value,...t[P]})>u)return!0}return!1}),e=r(()=>{const t=g(a.value),u=T.value;return u&&(!u.min_amount||t>u.min_amount)?C(t,u):t}),_=r(()=>{if(A(a.value))return a.value.base_price;const t=g(a.value);return t>e.value?t:0}),d=r(()=>n.installmentsOption||F.value||{max_number:1}),m=r(()=>{if(d.value.max_number<=1)return 1;const t=d.value.min_installment||5,u=Math.floor(e.value/t);return Math.min(u,d.value.max_number)}),f=r(()=>d.value.monthly_interest||0),k=r(()=>{if(m.value>=2){if(!f.value)return e.value/m.value;const t=f.value/100;return e.value*t/(1-(1+t)**-m.value)}return 0}),b=r(()=>{const t=n.discountOption||R.value;return t&&(!t.min_amount||t.min_amount<=e.value)&&(!n.isAmountTotal||t.apply_at==="total")?t:{}}),O=r(()=>{const{label:t}=b.value;return t?t.includes(" ")?t:`via ${t}`:""}),x=r(()=>C(e.value,b.value)),v=r(()=>{if(n.loyaltyPointsProgram)return n.loyaltyPointsProgram;const t=q.value;if(t){const u=Object.keys(t);for(let P=0;P<u.length;P++){const p=t[u[P]];if(p?.earn_percentage&&p.earn_percentage>0)return p}}return{ratio:0}}),y=r(()=>v.value.min_subtotal_to_earn||0),j=r(()=>v.value.name||""),N=r(()=>v.value.earn_percentage||0),V=r(()=>N.value*v.value.ratio),I=r(()=>V.value>=1?e.value*(V.value/100):0);return{hasVariedPrices:s,salePrice:e,comparePrice:_,installmentsObject:d,installmentsNumber:m,monthlyInterest:f,installmentValue:k,discountObject:b,discountLabel:O,priceWithDiscount:x,pointsProgramObject:v,pointsMinPrice:y,pointsProgramName:j,earnPointsPercentage:N,cashbackPercentage:V,cashbackValue:I}},J=S({__name:"Prices",props:{isBig:{type:Boolean},isLiteral:{type:Boolean},hasCashback:{type:Boolean,default:!0},hasPriceOptions:{type:Boolean,default:!0},product:{},price:{},basePrice:{},isAmountTotal:{type:Boolean},installmentsOption:{},discountOption:{},loyaltyPointsProgram:{}},setup(n,{expose:a}){a();const s=n,{hasVariedPrices:e,salePrice:_,comparePrice:d,cashbackPercentage:m,cashbackValue:f,installmentsNumber:k,monthlyInterest:b,installmentValue:O,priceWithDiscount:x,discountLabel:v}=H(s),y={props:s,hasVariedPrices:e,salePrice:_,comparePrice:d,cashbackPercentage:m,cashbackValue:f,installmentsNumber:k,monthlyInterest:b,installmentValue:O,priceWithDiscount:x,discountLabel:v};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),K={key:0,class:"text-base-500 mr-1 text-[87%]"},Q={key:0},U={key:1},X={key:0},Y={key:0,class:"relative z-10"},Z=["data-tooltip"],$=h("i",{class:"i-arrow-uturn-left mr-1"},null,-1),ee={class:"font-medium"},te=h("small",null," cashback",-1),ne={key:0},ae={key:0},se={key:1},re={key:2},ie={key:0},oe={key:0},le={key:1};function ce(n,a,s,e,_,d){const m=E("Fade");return o(),l("div",{class:w(["text-base-600 [&>div]:[font-size:90%] [&_small]:[font-size:92%] [&_small]:lowercase",s.isBig?"text-lg":null])},[e.comparePrice?(o(),l("span",K,[s.isLiteral?(o(),l("small",Q,i("De "))):c("",!0),h("s",null,i(n.$money(e.comparePrice)),1),s.isLiteral?(o(),l("small",U,i(" Por"))):c("",!0)])):c("",!0),h("strong",{class:w(["inline-block text-base-800",s.isBig?"text-5xl block":null])},[e.hasVariedPrices?(o(),l("small",X,i("A partir de "))):c("",!0),D(" "+i(n.$money(e.salePrice)),1)],2),B(m,{slide:"down"},{default:L(()=>[e.cashbackValue&&s.hasCashback?(o(),l("div",Y,[h("span",{"data-tooltip":"Receba $1 de volta".replace("$1",n.$percentage(e.cashbackPercentage))},[$,h("span",ee,i(n.$money(e.cashbackValue)),1),te],8,Z)])):c("",!0)]),_:1}),B(m,{slide:"down"},{default:L(()=>[e.installmentValue&&s.hasPriceOptions?(o(),l("div",ne,[s.isLiteral?(o(),l("small",ae,i("Até "))):c("",!0),D(" "+i(e.installmentsNumber)+"x ",1),s.isLiteral?(o(),l("small",se,i(" De "))):c("",!0),h("span",null,i(n.$money(e.installmentValue)),1),!e.monthlyInterest&&s.isLiteral?(o(),l("small",re,i(" Sem juros"))):c("",!0)])):c("",!0)]),_:1}),B(m,{slide:"down"},{default:L(()=>[e.priceWithDiscount<e.salePrice&&s.hasPriceOptions?(o(),l("div",ie,[e.discountLabel?c("",!0):(o(),l("small",oe,i("A partir de "))),h("span",null,i(n.$money(e.priceWithDiscount)),1),e.discountLabel?(o(),l("small",le,i(` ${e.discountLabel}`),1)):c("",!0)])):c("",!0)]),_:1})],2)}const he=z(J,[["render",ce]]);export{he as P,de as g};
|
package/packages/storefront/dist/client/_astro/{ProductShelf.085721d6.js → ProductShelf.46d8a51c.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as p,M as j,N as L,c as b,O as Q,_ as V,d as B,r as A,o as l,a as d,e as m,w as C,b as _,l as O,h as S,y as x,x as w,u as T,n as E,p as q,f as M,v as F,F as H,g as z}from"./_plugin-vue_export-helper.ee681fa8.js";import{a as I,b as D}from"./api.a2eda23e.js";import{C as R,a as G}from"./Carousel.
|
|
1
|
+
import{i as p,M as j,N as L,c as b,O as Q,_ as V,d as B,r as A,o as l,a as d,e as m,w as C,b as _,l as O,h as S,y as x,x as w,u as T,n as E,p as q,f as M,v as F,F as H,g as z}from"./_plugin-vue_export-helper.ee681fa8.js";import{a as I,b as D}from"./api.a2eda23e.js";import{C as R,a as G}from"./Carousel.4bf71bce.js";import{d as J,c as K}from"./index.fadf28bd.js";import{g as U,P as W}from"./Prices.78eb0a61.js";import{g as X}from"./img.ec6ba316.js";import"./modules-info.df822732.js";import"./session-utm.744b0db3.js";import"./format-money.923559cc.js";const Y=e=>e&&e.min_quantity||1,Z=Y,$=e=>!e.hasOwnProperty("quantity")||e.quantity>=Z(e),N=$,tt=e=>{const a=p(e.title||""),i=p(e.titleLink||""),t=p(!1);let u=null;const r=p(null),c=j(e.products||[]);return e.products||(t.value=!0,u=(async()=>{let s=e.searchQuery||"",h;if(e.collectionId){try{const{data:o}=await I.get(`collections/${e.collectionId}`);h=o}catch(o){console.error(o),r.value=o}const n=h?.products;Array.isArray(n)&&n.length&&(s+=`&_id=${n.slice(0,60).join(",")}`),!a.value&&a.value!==null&&h?.name&&(a.value=h?.name)}const v=e.limit||24;let f=`offset=${e.page?(e.page-1)*v:0}&limit=${v}`;e.sort&&(f+=`&sort=${e.sort}`),f+=s;try{const{data:n}=await I.get(`search/v1?${f}`);if(e.isShuffle){let o=n.result.filter(k=>k.available&&N(k)).length,g,y;for(;o;)y=Math.floor(Math.random()*o--),g=n.result[o],n.result[o]=n.result[y],n.result[y]=g}n.result.forEach(o=>c.push(o))}catch(n){console.error(n),r.value=n}t.value=!1})()),{title:a,titleLink:i,isFetching:t,fetching:u,fetchError:r,products:c}},et=e=>{const a=p(!1);let i=null;const t=p(null),{productId:u}=e,r=j({...e.product,_id:e.product?._id||u,price:L(e.product||{})});!e.product&&u&&(a.value=!0,i=(async()=>{try{const{data:o}=await I.get(`products/${u}`);Object.assign(r,o)}catch(o){console.error(o),t.value=o}a.value=!1})());const c=b(()=>U(r)),s=b(()=>{const{slug:o}=r;return typeof o=="string"?`/${o}`:null}),h=b(()=>{const{pictures:o}=r,g=[];return o&&o.forEach(y=>{const k=X(y);k&&g.push(k)}),g}),v=b(()=>N(r)),P=b(()=>v.value&&r.available&&r.visible),f=b(()=>{if(Q(r)){const o=r.base_price;return Math.round((o-L(r))*100/o)}return 0}),n=b(()=>r.has_variations?!0:!!r.variations?.length);return{isFetching:a,fetching:i,fetchError:t,product:r,title:c,link:s,images:h,isInStock:v,isActive:P,discountPercentage:f,hasVariations:n}},ot=B({__name:"ProductCard",props:{product:{},productId:{},headingTag:{default:"h3"}},setup(e,{expose:a}){a();const i=e,{product:t,title:u,link:r,images:c,isInStock:s,isActive:h,discountPercentage:v,hasVariations:P}=et(i),f=p(null),n=J(f),o=p(!1);K(n,()=>{o.value=!0});const g={props:i,product:t,title:u,link:r,images:c,isInStock:s,isActive:h,discountPercentage:v,hasVariations:P,card:f,isHovered:n,wasHoveredOnce:o,get addProductToCart(){return D},Prices:W};return Object.defineProperty(g,"__isScriptSetup",{enumerable:!1,value:!0}),g}}),rt=["data-sku"],nt={class:"aspect-square p-2 motion-safe:group-hover:scale-110 transition-transform"},at={class:"relative w-full h-full bg-white rounded overflow-hidden group-hover:rounded-none"},st={key:0,class:"text-xs text-opacity-70"},it={key:1,class:"w-full h-full bg-gradient-to-br from-base-50/20 to-base-100"},ct={key:0,class:"uno-bm03rg"},lt={class:"relative flex flex-col grow justify-between p-4 group-hover:backdrop-blur-md bg-white/40 z-10"},ut={class:"pt-2"},dt={key:0},ht={key:1,class:"ui-badge bg-warning-100 text-warning-700"},ft=_("span",{class:"inline-block h-4 w-4 leading-none text-base text-center bg-on-primary text-primary opacity-80 rounded-full mr-1"}," + ",-1);function gt(e,a,i,t,u,r){const c=A("AImg"),s=A("ALink");return l(),d("article",{ref:"card","data-sku":t.product.sku,class:"relative h-full max-w-[350px] mx-auto py-3 group"},[m(s,{href:t.link,class:"flex flex-col h-full rounded overflow-hidden group-hover:shadow group-hover:ring-1 ring-black/5"},{default:C(()=>[_("div",nt,[_("div",at,[t.images?.length?(l(),d("span",st,[m(c,{picture:t.images[0],alt:t.title,class:"absolute top-0 left-0 block w-full h-full object-cover"},null,8,["picture","alt"]),t.images[1]&&t.wasHoveredOnce?(l(),O(c,{key:0,picture:t.images[1],alt:t.title,class:"absolute top-0 left-0 block w-full h-full object-cover opacity-0 group-hover:opacity-100 transition-opacity motion-safe:duration-300 text-transparent z-10"},null,8,["picture","alt"])):S("",!0)])):(l(),d("div",it))])]),t.discountPercentage?(l(),d("span",ct,[x(" -"),_("strong",null,w(t.discountPercentage),1),x("% ")])):S("",!0),_("div",lt,[(l(),O(T(i.headingTag),{class:E(["ui-link no-underline line-clamp-2",[t.isActive?"text-base-700":"text-base-500",t.link?"group-hover:underline group-hover:text-primary":null]])},{default:C(()=>[x(w(t.title),1)]),_:1},8,["class"])),_("div",ut,[t.isActive?(l(),d("div",dt,[m(t.Prices,{product:t.product},null,8,["product"])])):(l(),d("span",ht,w(t.isInStock?"Inativo":"Sem estoque"),1))]),t.isActive&&!t.hasVariations?(l(),d("button",{key:0,class:"uno-3suct9 ui-btn-sm ui-btn-primary",onClick:a[0]||(a[0]=q(h=>t.addProductToCart(t.product),["prevent"]))},[ft,x(" "+w("Adicionar ao carrinho"))])):S("",!0)])]),_:1},8,["href"])],8,rt)}const mt=V(ot,[["render",gt]]),_t=B({__name:"ProductShelf",props:{collectionId:{},searchQuery:{},sort:{},title:{},titleLink:{},isShuffle:{type:Boolean},limit:{},page:{},products:{}},async setup(e,{expose:a}){a();const i=e,{title:t,titleLink:u,fetching:r,products:c}=tt(i),s={props:i,title:t,titleLink:u,fetching:r,products:c,Carousel:R,CarouselControl:G,ProductCard:mt};return Object.defineProperty(s,"__isScriptSetup",{enumerable:!1,value:!0}),s}}),pt={class:"ui-section"},vt={key:0,class:"max-w-prose mx-auto text-center mb-2"},bt={class:"ui-text-brand text-3xl"},yt={class:"text-3xl lg:text-2xl leading-none text-primary lg:opacity-0 group-hover/shelf:opacity-90 transition-opacity"};function kt(e,a,i,t,u,r){const c=A("ALink");return l(),d("section",pt,[t.title?(l(),d("div",vt,[_("h2",bt,[m(c,{href:t.titleLink,class:E(t.titleLink?"ui-link":"text-base-700")},{default:C(()=>[x(w(t.title),1)]),_:1},8,["href","class"])])])):S("",!0),m(t.Carousel,{class:"group/shelf"},{controls:C(()=>[M(_("div",yt,[m(t.CarouselControl,{class:"!top-1/2 !-left-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5","is-prev":""}),m(t.CarouselControl,{class:"!top-1/2 !-right-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5"})],512),[[F,t.products.length>2]])]),default:C(()=>[(l(!0),d(H,null,z(t.products,s=>(l(),d("li",{key:s._id,class:"basis-1/2 md:basis-1/3 lg:basis-1/4 shrink-0"},[m(t.ProductCard,{product:s},null,8,["product"])]))),128))]),_:1})])}const jt=V(_t,[["render",kt]]);export{jt as default};
|