cloudcommerce 0.14.0 → 0.15.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/renovate.json +20 -3
- package/.github/workflows/{e2e-tests.yml → test-e2e.yml} +28 -19
- package/.vscode/settings.json +6 -0
- package/CHANGELOG.md +99 -0
- package/action.yml +74 -2
- package/ecomplus-stores/monocard/README.md +1 -1
- package/ecomplus-stores/monocard/README.pt-BR.md +1 -1
- package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +2 -3
- package/ecomplus-stores/monocard/functions/ssr/uno.config.cjs +3 -3
- package/ecomplus-stores/tia-sonia/README.md +1 -1
- package/ecomplus-stores/tia-sonia/README.pt-BR.md +1 -1
- package/ecomplus-stores/tia-sonia/functions/ssr/tailwind.config.cjs +2 -3
- package/ecomplus-stores/tia-sonia/functions/ssr/uno.config.cjs +3 -3
- package/package.json +14 -14
- package/packages/api/lib/api.d.ts +13 -12
- package/packages/api/lib/api.js +51 -29
- package/packages/api/lib/api.js.map +1 -1
- package/packages/api/package.json +3 -3
- package/packages/api/src/api.ts +52 -22
- package/packages/api/tests/index.test.ts +18 -3
- package/packages/api/{src/types → types}/brands.d.ts +1 -1
- package/packages/api/{lib/types → types}/carts.d.ts +5 -5
- package/packages/api/{src/types → types}/categories.d.ts +2 -2
- package/packages/api/{src/types → types}/collections.d.ts +2 -2
- package/packages/api/{src/types → types}/customers.d.ts +1 -1
- package/packages/api/{src/types → types}/grids.d.ts +1 -1
- package/packages/api/{lib/types → types}/orders.d.ts +13 -13
- package/packages/api/{lib/types → types}/products.d.ts +10 -10
- package/packages/api/{src/types.ts → types.d.ts} +254 -31
- package/packages/api/types.ts +1 -1
- package/packages/apps/affilate-program/CHANGELOG.md +1 -0
- package/packages/apps/affilate-program/README.md +1 -0
- package/packages/apps/affilate-program/lib/affilate-program.js +9 -0
- package/packages/apps/affilate-program/lib/affilate-program.js.map +1 -0
- package/packages/apps/affilate-program/lib/events-to-affilate-program.js +154 -0
- package/packages/apps/affilate-program/lib/events-to-affilate-program.js.map +1 -0
- package/packages/apps/affilate-program/lib/index.js +2 -0
- package/packages/apps/affilate-program/lib/index.js.map +1 -0
- package/packages/apps/affilate-program/package.json +30 -0
- package/packages/apps/affilate-program/src/affilate-program.ts +14 -0
- package/packages/apps/affilate-program/src/events-to-affilate-program.ts +184 -0
- package/packages/apps/affilate-program/src/index.ts +1 -0
- package/packages/apps/affilate-program/tsconfig.json +3 -0
- package/packages/apps/correios/package.json +2 -2
- package/packages/apps/custom-payment/lib/custom-payment-create-transaction.d.ts +4 -0
- package/packages/apps/custom-payment/lib/custom-payment.d.ts +4 -0
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +4 -4
- package/packages/apps/discounts/lib-mjs/apply-discount.mjs +27 -2
- package/packages/apps/discounts/lib-mjs/helpers.mjs +4 -2
- package/packages/apps/discounts/package.json +2 -2
- package/packages/apps/emails/lib/functios-lib/utils.js.map +1 -1
- package/packages/apps/emails/package.json +3 -3
- package/packages/apps/emails/src/functios-lib/utils.ts +2 -1
- package/packages/apps/fb-conversions/lib/fb-conversions-events.js +20 -6
- package/packages/apps/fb-conversions/lib/fb-conversions-events.js.map +1 -1
- package/packages/apps/fb-conversions/package.json +3 -3
- package/packages/apps/fb-conversions/src/fb-conversions-events.ts +21 -6
- package/packages/apps/flash-courier/CHANGELOG.md +1 -0
- package/packages/apps/flash-courier/README.md +1 -0
- package/packages/apps/flash-courier/events.js +1 -0
- package/packages/apps/flash-courier/lib/flash-courier-events.d.ts +5 -0
- package/packages/apps/flash-courier/lib/flash-courier-events.js +14 -0
- package/packages/apps/flash-courier/lib/flash-courier-events.js.map +1 -0
- package/packages/apps/flash-courier/lib/flash-courier.d.ts +2 -0
- package/packages/apps/flash-courier/lib/flash-courier.js +6 -0
- package/packages/apps/flash-courier/lib/flash-courier.js.map +1 -0
- package/packages/apps/flash-courier/lib/index.d.ts +1 -0
- package/packages/apps/flash-courier/lib/index.js +2 -0
- package/packages/apps/flash-courier/lib/index.js.map +1 -0
- package/packages/apps/flash-courier/lib-mjs/calculate-flash-courier.mjs +246 -0
- package/packages/apps/flash-courier/lib-mjs/update-tracking.mjs +176 -0
- package/packages/apps/flash-courier/package.json +34 -0
- package/packages/apps/flash-courier/src/flash-courier-events.ts +13 -0
- package/packages/apps/flash-courier/src/flash-courier.ts +7 -0
- package/packages/apps/flash-courier/src/index.ts +1 -0
- package/packages/apps/flash-courier/tsconfig.json +6 -0
- package/packages/apps/frenet/lib/functions-lib/database.d.ts +4 -3
- package/packages/apps/frenet/lib/functions-lib/database.js.map +1 -1
- package/packages/apps/frenet/lib/functions-lib/update-fulfillments.d.ts +3 -2
- package/packages/apps/frenet/lib/functions-lib/update-fulfillments.js.map +1 -1
- package/packages/apps/frenet/lib-mjs/calculate-frenet.mjs +13 -6
- package/packages/apps/frenet/package.json +3 -3
- package/packages/apps/frenet/src/functions-lib/database.ts +4 -3
- package/packages/apps/frenet/src/functions-lib/update-fulfillments.ts +2 -1
- package/packages/apps/galaxpay/lib/functions-lib/all-parses.js +1 -1
- package/packages/apps/galaxpay/lib/functions-lib/all-parses.js.map +1 -1
- package/packages/apps/galaxpay/lib/functions-lib/ecom/events-to-galaxpay.js +18 -2
- package/packages/apps/galaxpay/lib/functions-lib/ecom/events-to-galaxpay.js.map +1 -1
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-access.d.ts +2 -2
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/handle-plans.d.ts +1 -1
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/handle-plans.js.map +1 -1
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/update-subscription.js +19 -2
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/update-subscription.js.map +1 -1
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.js +18 -2
- package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.js.map +1 -1
- package/packages/apps/galaxpay/lib/functions-lib/utils.js +3 -3
- package/packages/apps/galaxpay/lib/functions-lib/utils.js.map +1 -1
- package/packages/apps/galaxpay/lib/galaxpay-create-transaction.d.ts +4 -0
- package/packages/apps/galaxpay/lib/galaxpay-create-transaction.js +19 -3
- package/packages/apps/galaxpay/lib/galaxpay-create-transaction.js.map +1 -1
- package/packages/apps/galaxpay/lib/galaxpay-list-payments.js +17 -1
- package/packages/apps/galaxpay/lib/galaxpay-list-payments.js.map +1 -1
- package/packages/apps/galaxpay/lib/galaxpay.d.ts +4 -0
- package/packages/apps/galaxpay/package.json +3 -3
- package/packages/apps/galaxpay/src/functions-lib/all-parses.ts +1 -1
- package/packages/apps/galaxpay/src/functions-lib/ecom/events-to-galaxpay.ts +21 -2
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/auth/create-access.ts +2 -2
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/handle-plans.ts +1 -2
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/update-subscription.ts +21 -2
- package/packages/apps/galaxpay/src/functions-lib/galaxpay/webhook.ts +23 -5
- package/packages/apps/galaxpay/src/functions-lib/utils.ts +3 -3
- package/packages/apps/galaxpay/src/galaxpay-create-transaction.ts +19 -2
- package/packages/apps/galaxpay/src/galaxpay-list-payments.ts +19 -1
- package/packages/apps/google-analytics/lib/google-analytics-events.js +20 -4
- package/packages/apps/google-analytics/lib/google-analytics-events.js.map +1 -1
- package/packages/apps/google-analytics/package.json +3 -3
- package/packages/apps/google-analytics/src/google-analytics-events.ts +21 -4
- package/packages/apps/infinitepay/lib/functions-lib/add-installments.d.ts +1 -1
- package/packages/apps/infinitepay/lib/functions-lib/ip-auth/create-access.d.ts +2 -2
- package/packages/apps/infinitepay/lib/functions-lib/ip-auth/create-access.js +12 -8
- package/packages/apps/infinitepay/lib/functions-lib/ip-auth/create-access.js.map +1 -1
- package/packages/apps/infinitepay/lib/functions-lib/utils.js +3 -3
- package/packages/apps/infinitepay/lib/functions-lib/utils.js.map +1 -1
- package/packages/apps/infinitepay/lib/infinitepay.d.ts +4 -0
- package/packages/apps/infinitepay/lib/ip-create-transaction.d.ts +4 -0
- package/packages/apps/infinitepay/lib/ip-create-transaction.js +18 -2
- package/packages/apps/infinitepay/lib/ip-create-transaction.js.map +1 -1
- package/packages/apps/infinitepay/lib/ip-list-payments.js +19 -3
- package/packages/apps/infinitepay/lib/ip-list-payments.js.map +1 -1
- package/packages/apps/infinitepay/lib/ip-webhook.js.map +1 -1
- package/packages/apps/infinitepay/package.json +3 -3
- package/packages/apps/infinitepay/src/functions-lib/add-installments.ts +1 -1
- package/packages/apps/infinitepay/src/functions-lib/ip-auth/create-access.ts +14 -10
- package/packages/apps/infinitepay/src/functions-lib/utils.ts +3 -3
- package/packages/apps/infinitepay/src/ip-create-transaction.ts +20 -2
- package/packages/apps/infinitepay/src/ip-list-payments.ts +21 -3
- package/packages/apps/infinitepay/src/ip-webhook.ts +4 -5
- package/packages/apps/jadlog/lib-mjs/calculate-jadlog.mjs +19 -6
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/lib/functions-lib/handle-loyalty-points-event.js.map +1 -1
- package/packages/apps/loyalty-points/lib/loyalty-create-transaction.d.ts +4 -0
- package/packages/apps/loyalty-points/lib/loyalty-create-transaction.js.map +1 -1
- package/packages/apps/loyalty-points/lib/loyalty-points.d.ts +4 -0
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/loyalty-points/src/functions-lib/handle-loyalty-points-event.ts +2 -2
- package/packages/apps/loyalty-points/src/loyalty-create-transaction.ts +4 -3
- package/packages/apps/melhor-envio/lib/functions-lib/events-to-melhor-envio.js +18 -14
- package/packages/apps/melhor-envio/lib/functions-lib/events-to-melhor-envio.js.map +1 -1
- package/packages/apps/melhor-envio/lib-mjs/calculate-melhor-envio.mjs +21 -15
- package/packages/apps/melhor-envio/package.json +3 -3
- package/packages/apps/melhor-envio/src/functions-lib/events-to-melhor-envio.ts +34 -22
- package/packages/apps/mercadopago/lib/mercadopago.d.ts +4 -0
- package/packages/apps/mercadopago/lib/mp-create-transaction.d.ts +4 -0
- package/packages/apps/mercadopago/lib/mp-create-transaction.js +14 -1
- package/packages/apps/mercadopago/lib/mp-create-transaction.js.map +1 -1
- package/packages/apps/mercadopago/lib/mp-list-payments.js +16 -7
- package/packages/apps/mercadopago/lib/mp-list-payments.js.map +1 -1
- package/packages/apps/mercadopago/lib/mp-webhook.js +10 -3
- package/packages/apps/mercadopago/lib/mp-webhook.js.map +1 -1
- package/packages/apps/mercadopago/package.json +3 -3
- package/packages/apps/mercadopago/src/mp-create-transaction.ts +15 -1
- package/packages/apps/mercadopago/src/mp-list-payments.ts +17 -7
- package/packages/apps/mercadopago/src/mp-webhook.ts +11 -3
- package/packages/apps/pagarme/assets/onload-expression.js +22 -8
- package/packages/apps/pagarme/assets/onload-expression.min.js +1 -1
- package/packages/apps/pagarme/lib/functions-lib/add-installments.d.ts +3 -3
- package/packages/apps/pagarme/lib/functions-lib/add-installments.js +5 -1
- package/packages/apps/pagarme/lib/functions-lib/add-installments.js.map +1 -1
- package/packages/apps/pagarme/lib/pagarme-create-transaction.d.ts +4 -0
- package/packages/apps/pagarme/lib/pagarme-create-transaction.js +27 -2
- package/packages/apps/pagarme/lib/pagarme-create-transaction.js.map +1 -1
- package/packages/apps/pagarme/lib/pagarme-list-payments.js +28 -6
- package/packages/apps/pagarme/lib/pagarme-list-payments.js.map +1 -1
- package/packages/apps/pagarme/lib/pagarme-webhook.js +10 -2
- package/packages/apps/pagarme/lib/pagarme-webhook.js.map +1 -1
- package/packages/apps/pagarme/lib/pagarme.d.ts +4 -0
- package/packages/apps/pagarme/package.json +3 -3
- package/packages/apps/pagarme/src/functions-lib/add-installments.ts +8 -2
- package/packages/apps/pagarme/src/pagarme-create-transaction.ts +28 -2
- package/packages/apps/pagarme/src/pagarme-list-payments.ts +37 -6
- package/packages/apps/pagarme/src/pagarme-webhook.ts +11 -2
- package/packages/apps/paghiper/lib/functions-lib/handle-webhook.js +11 -3
- package/packages/apps/paghiper/lib/functions-lib/handle-webhook.js.map +1 -1
- package/packages/apps/paghiper/lib/paghiper-create-transaction.d.ts +4 -0
- package/packages/apps/paghiper/lib/paghiper-create-transaction.js +9 -1
- package/packages/apps/paghiper/lib/paghiper-create-transaction.js.map +1 -1
- package/packages/apps/paghiper/lib/paghiper-list-payments.js +11 -4
- package/packages/apps/paghiper/lib/paghiper-list-payments.js.map +1 -1
- package/packages/apps/paghiper/lib/paghiper.d.ts +4 -0
- package/packages/apps/paghiper/package.json +3 -3
- package/packages/apps/paghiper/src/functions-lib/handle-webhook.ts +13 -4
- package/packages/apps/paghiper/src/paghiper-create-transaction.ts +9 -1
- package/packages/apps/paghiper/src/paghiper-list-payments.ts +15 -8
- package/packages/apps/pix/lib/functions-lib/get-certificate.js +3 -3
- package/packages/apps/pix/lib/functions-lib/get-certificate.js.map +1 -1
- package/packages/apps/pix/lib/pix-create-transaction.d.ts +4 -0
- package/packages/apps/pix/lib/pix-create-transaction.js +23 -3
- package/packages/apps/pix/lib/pix-create-transaction.js.map +1 -1
- package/packages/apps/pix/lib/pix-list-payments.js +23 -1
- package/packages/apps/pix/lib/pix-list-payments.js.map +1 -1
- package/packages/apps/pix/lib/pix.d.ts +4 -0
- package/packages/apps/pix/package.json +3 -3
- package/packages/apps/pix/src/functions-lib/get-certificate.ts +3 -3
- package/packages/apps/pix/src/pix-create-transaction.ts +26 -3
- package/packages/apps/pix/src/pix-list-payments.ts +26 -1
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +8 -7
- 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 +4 -2
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/package.json +4 -4
- package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +9 -9
- package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +4 -2
- package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +1 -1
- package/packages/apps/webhooks/lib/events-to-webhooks-app.js +12 -8
- package/packages/apps/webhooks/lib/events-to-webhooks-app.js.map +1 -1
- package/packages/apps/webhooks/package.json +3 -3
- package/packages/apps/webhooks/src/events-to-webhooks-app.ts +22 -12
- package/packages/cli/package.json +1 -1
- package/packages/config/lib/config.js +2 -4
- package/packages/config/lib/config.js.map +1 -1
- package/packages/config/lib/env.js +2 -4
- package/packages/config/lib/env.js.map +1 -1
- package/packages/config/package.json +1 -1
- package/packages/config/src/config.ts +4 -4
- package/packages/config/src/env.ts +4 -4
- package/packages/emails/package.json +3 -3
- package/packages/emails/tests/sendgrid.test.ts +2 -2
- package/packages/emails/tests/smtp.test.ts +2 -2
- package/packages/events/lib/firebase.js +4 -0
- package/packages/events/lib/firebase.js.map +1 -1
- package/packages/events/package.json +5 -3
- package/packages/events/src/firebase.ts +4 -0
- package/packages/feeds/lib/firebase.js +3 -3
- package/packages/feeds/lib/firebase.js.map +1 -1
- package/packages/feeds/package.json +2 -2
- package/packages/feeds/src/firebase.ts +5 -3
- package/packages/firebase/lib/config.d.ts +11 -1
- package/packages/firebase/lib/config.js +12 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/lib/helpers/update-app-data.d.ts +1 -1
- package/packages/firebase/package.json +4 -4
- package/packages/firebase/src/config.ts +14 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/lib/firebase/call-app-module.js +5 -0
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/lib/firebase/checkout.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/fix-items.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/new-order.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js +1 -1
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/utils.js +1 -1
- package/packages/modules/lib/firebase/functions-checkout/utils.js.map +1 -1
- package/packages/modules/package.json +6 -5
- package/packages/modules/schemas/@checkout.cjs +5 -0
- package/packages/modules/schemas/apply_discount.cjs +6 -0
- package/packages/modules/schemas/create_transaction.cjs +22 -0
- package/packages/modules/src/firebase/call-app-module.ts +5 -0
- package/packages/modules/src/firebase/checkout.ts +9 -9
- package/packages/modules/src/firebase/functions-checkout/fix-items.ts +3 -3
- package/packages/modules/src/firebase/functions-checkout/handle-order-transaction.ts +8 -8
- package/packages/modules/src/firebase/functions-checkout/new-order.ts +6 -7
- package/packages/modules/src/firebase/functions-checkout/request-to-module.ts +2 -4
- package/packages/modules/src/firebase/functions-checkout/utils.ts +23 -23
- package/packages/modules/src/types/index.d.ts +4 -8
- package/packages/modules/tests/modules.test.mjs +1 -1
- package/packages/passport/package.json +3 -3
- package/packages/ssr/lib/firebase/serve-storefront.js +2 -2
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +10 -10
- package/packages/ssr/src/firebase/serve-storefront.ts +2 -2
- package/packages/storefront/.base.eslintrc.cjs +4 -0
- package/packages/storefront/.eslintrc.cjs +4 -1
- package/packages/storefront/astro.config.mjs +6 -2
- package/packages/storefront/config/{storefront.cms.cjs → storefront.cms.js} +6 -5
- package/packages/storefront/{storefront.config.mjs → config/storefront.config.mjs} +5 -5
- package/packages/storefront/config/storefront.tailwind.cjs +266 -0
- package/packages/storefront/config/storefront.unocss.cjs +139 -0
- package/packages/storefront/dist/client/_astro/Carousel.93c2309b.js +1 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.c5b673b3.js +1 -0
- package/packages/storefront/dist/client/_astro/{PitchBar.94f525f9.js → PitchBar.d0e3362e.js} +1 -1
- package/packages/storefront/dist/client/_astro/Prices.51598206.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.5186c09f.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.d90bfc6e.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.06c4c46e.js +4 -0
- package/packages/storefront/dist/client/_astro/_...slug_.ab554647.css +1 -0
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.8870d8dc.js +1 -0
- package/packages/storefront/dist/client/_astro/api.7f62c1ff.js +1 -0
- package/packages/storefront/dist/client/_astro/client.06720904.js +1 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.d513d4b8.js → firebase-app.4381f424.js} +17 -4
- package/packages/storefront/dist/client/_astro/{format-money.1a95a3b5.js → format-money.3868f219.js} +1 -1
- package/packages/storefront/dist/client/_astro/{hoisted.be7b77c7.js → hoisted.6aebc438.js} +1 -1
- package/packages/storefront/dist/client/_astro/img.2ae78c70.js +1 -0
- package/packages/storefront/dist/client/_astro/index.3de006ba.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.bc2146d9.js → modules-info.c65d970c.js} +1 -1
- package/packages/storefront/dist/client/_astro/{runtime-dom.esm-bundler.e2053595.js → runtime-dom.esm-bundler.7a95af90.js} +1 -1
- package/packages/storefront/dist/client/_astro/{workbox-window.prod.es5.dc90f814.js → workbox-window.prod.es5.a7b12eab.js} +2 -2
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/client/{workbox-e0d788d4.js → workbox-5e0bf4e4.js} +1 -1
- package/packages/storefront/dist/server/_empty-middleware.mjs +3 -0
- package/packages/storefront/dist/server/chunks/_...51f243e0.mjs +35 -0
- package/packages/storefront/dist/server/chunks/account@_@astro.70d0a2b6.mjs +35 -0
- package/packages/storefront/dist/server/chunks/{astro.7ac24846.mjs → astro.c449fda8.mjs} +1479 -1217
- package/packages/storefront/dist/server/chunks/endpoint@_@js.58e19bda.mjs +35 -0
- package/packages/storefront/dist/server/chunks/fallback@_@astro.6c6e2bf9.mjs +35 -0
- package/packages/storefront/dist/server/chunks/index@_@astro.09a10813.mjs +35 -0
- package/packages/storefront/dist/server/chunks/index@_@astro.81422b02.mjs +35 -0
- package/packages/storefront/dist/server/chunks/pages/{all.a42f9fc6.mjs → _...slug_.astro.5667273a.mjs} +215 -1017
- package/packages/storefront/dist/server/chunks/pages/account.astro.72dc24f9.mjs +23 -0
- package/packages/storefront/dist/server/chunks/pages/endpoint.js.5d128d9d.mjs +119 -0
- package/packages/storefront/dist/server/chunks/pages/fallback.astro.72b8d520.mjs +64 -0
- package/packages/storefront/dist/server/chunks/pages/index.astro.e80eea52.mjs +1098 -0
- package/packages/storefront/dist/server/entry.mjs +57 -313
- package/packages/storefront/dist/server/renderers.mjs +333 -0
- package/packages/storefront/package.json +18 -21
- package/packages/storefront/scripts/prepare-monorepo.sh +0 -1
- package/packages/storefront/server.d.ts +8 -1
- package/packages/storefront/src/env.d.ts +0 -1
- package/packages/storefront/src/helpers/afetch.ts +2 -2
- package/packages/storefront/src/lib/assets/components.css +28 -0
- package/packages/storefront/src/lib/components/Carousel.vue +9 -23
- package/packages/storefront/src/lib/components/CarouselControl.vue +2 -2
- package/packages/storefront/src/lib/components/globals/AImg.vue +4 -7
- package/packages/storefront/src/lib/components/globals/ALink.vue +1 -1
- package/packages/storefront/src/lib/components/globals/Fade.vue +5 -30
- package/packages/storefront/src/lib/composables/use-hero-slider.ts +2 -0
- package/packages/storefront/src/lib/composables/use-prices.ts +4 -1
- package/packages/storefront/src/lib/composables/use-product-card.ts +104 -0
- package/packages/storefront/src/lib/composables/use-product-shelf.ts +91 -0
- package/packages/storefront/src/lib/composables/use-shop-header-submenu.ts +2 -0
- package/packages/storefront/src/lib/composables/use-sticky-header.ts +2 -0
- package/packages/storefront/src/lib/content.d.ts +3 -4
- package/packages/storefront/src/lib/layouts/Base.astro +5 -7
- package/packages/storefront/src/lib/layouts/BaseBody.astro +4 -8
- package/packages/storefront/src/lib/layouts/BaseHead.astro +1 -7
- package/packages/storefront/src/lib/layouts/BaseStateJson.astro +11 -18
- package/packages/storefront/src/lib/layouts/{sections/use-hero-section.ts → main/use-page-hero.ts} +7 -8
- package/packages/storefront/src/lib/layouts/main/use-page-sections.ts +98 -0
- package/packages/storefront/src/lib/layouts/use-page-layout.ts +4 -4
- package/packages/storefront/src/lib/ssr-context.ts +26 -19
- package/packages/storefront/src/lib/state/customer-session.ts +1 -1
- package/packages/storefront/tailwind.config.cjs +2 -225
- package/packages/storefront/uno.config.cjs +2 -141
- package/packages/types/index.ts +5 -1
- package/packages/types/modules/@checkout:params.d.ts +4 -0
- package/packages/types/modules/apply_discount:params.d.ts +4 -0
- package/packages/types/modules/create_transaction:response.d.ts +15 -0
- package/packages/types/package.json +1 -1
- package/packages/api/lib/types/brands.d.ts +0 -157
- package/packages/api/lib/types/categories.d.ts +0 -199
- package/packages/api/lib/types/collections.d.ts +0 -159
- package/packages/api/lib/types/customers.d.ts +0 -523
- package/packages/api/lib/types/grids.d.ts +0 -157
- package/packages/api/lib/types.d.ts +0 -132
- package/packages/api/lib/types.js +0 -2
- package/packages/api/lib/types.js.map +0 -1
- package/packages/api/src/types/applications.d.ts +0 -165
- package/packages/api/src/types/authentications.d.ts +0 -107
- package/packages/api/src/types/carts.d.ts +0 -360
- package/packages/api/src/types/orders.d.ts +0 -1720
- package/packages/api/src/types/products.d.ts +0 -1424
- package/packages/api/src/types/stores.d.ts +0 -123
- package/packages/storefront/.astro/types.d.ts +0 -117
- package/packages/storefront/config/storefront.cms.mjs +0 -72
- package/packages/storefront/dist/client/_astro/Carousel.e137cab2.js +0 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.d677b64a.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.b8d4b8e4.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.f12e72f6.js +0 -4
- package/packages/storefront/dist/client/_astro/_...slug_.48ea2ee1.css +0 -1
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.116fec5b.js +0 -1
- package/packages/storefront/dist/client/_astro/client.c2102734.js +0 -1
- package/packages/storefront/dist/client/_astro/index.1190ddf5.js +0 -1
- package/packages/storefront/dist/client/_astro/index.1eaf97c3.css +0 -1
- package/packages/storefront/dist/client/_astro/index.e56fc6b3.css +0 -1
- package/packages/storefront/dist/client/_astro/server.1dabec03.css +0 -1
- package/packages/storefront/src/lib/layouts/use-home-main.ts +0 -16
- /package/packages/api/{lib/types → types}/applications.d.ts +0 -0
- /package/packages/api/{lib/types → types}/authentications.d.ts +0 -0
- /package/packages/api/{lib/types → types}/stores.d.ts +0 -0
- /package/packages/storefront/src/lib/assets/{preflight.css → reset.css} +0 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { h as server_default } from './chunks/astro.c449fda8.mjs';
|
|
2
|
+
import { useSSRContext, defineComponent, computed, mergeProps, h, createSSRApp } from 'vue';
|
|
3
|
+
import { ssrRenderSlotInner, ssrRenderAttrs, ssrRenderSlot, renderToString } from 'vue/server-renderer';
|
|
4
|
+
import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
|
|
5
|
+
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.5667273a.mjs';
|
|
6
|
+
import 'path-to-regexp';
|
|
7
|
+
import 'cookie';
|
|
8
|
+
import '@astrojs/internal-helpers/path';
|
|
9
|
+
import 'kleur/colors';
|
|
10
|
+
import 'fs';
|
|
11
|
+
import 'http';
|
|
12
|
+
import 'tls';
|
|
13
|
+
import 'mime';
|
|
14
|
+
import 'html-escaper';
|
|
15
|
+
import 'string-width';
|
|
16
|
+
import 'node:fs/promises';
|
|
17
|
+
import 'node:path';
|
|
18
|
+
import 'node:url';
|
|
19
|
+
import 'http-cache-semantics';
|
|
20
|
+
import 'node:os';
|
|
21
|
+
import 'image-size';
|
|
22
|
+
import 'magic-string';
|
|
23
|
+
import 'node:stream';
|
|
24
|
+
import '@cloudcommerce/api';
|
|
25
|
+
import 'node:events';
|
|
26
|
+
import 'node:fs';
|
|
27
|
+
import '@cloudcommerce/config';
|
|
28
|
+
/* empty css */import '@vueuse/core';
|
|
29
|
+
import '@headlessui/vue';
|
|
30
|
+
|
|
31
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
32
|
+
__name: "Fade",
|
|
33
|
+
props: {
|
|
34
|
+
speed: { default: "default" },
|
|
35
|
+
slide: {},
|
|
36
|
+
isFloating: { type: Boolean, default: false },
|
|
37
|
+
isLeaveTo: { type: Boolean, default: true },
|
|
38
|
+
isEnterFrom: { type: Boolean, default: true }
|
|
39
|
+
},
|
|
40
|
+
setup(__props, { expose: __expose }) {
|
|
41
|
+
__expose();
|
|
42
|
+
const props = __props;
|
|
43
|
+
const duration = computed(() => {
|
|
44
|
+
if (props.speed === "default")
|
|
45
|
+
return "var(--transition, .2s linear)";
|
|
46
|
+
return `var(--transition-${props.speed}, .4s linear)`;
|
|
47
|
+
});
|
|
48
|
+
const transform = computed(() => {
|
|
49
|
+
switch (props.slide) {
|
|
50
|
+
case "down":
|
|
51
|
+
return "translate3d(0, -100%, 0)";
|
|
52
|
+
case "left":
|
|
53
|
+
return "translate3d(-100%, 0, 0)";
|
|
54
|
+
case "right":
|
|
55
|
+
return "translate3d(100%, 0, 0)";
|
|
56
|
+
case "up":
|
|
57
|
+
return "translate3d(0, 100%, 0)";
|
|
58
|
+
default:
|
|
59
|
+
return "none";
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const opacity = computed(() => {
|
|
63
|
+
return transform.value !== "none" ? 0.1 : 0;
|
|
64
|
+
});
|
|
65
|
+
const enterFromOpacity = computed(() => {
|
|
66
|
+
return props.isEnterFrom ? opacity.value : 1;
|
|
67
|
+
});
|
|
68
|
+
const leaveToOpacity = computed(() => {
|
|
69
|
+
return props.isLeaveTo ? opacity.value : 1;
|
|
70
|
+
});
|
|
71
|
+
const enterFromTransform = computed(() => {
|
|
72
|
+
return props.isEnterFrom ? transform.value : "none";
|
|
73
|
+
});
|
|
74
|
+
const leaveToTransform = computed(() => {
|
|
75
|
+
return props.isLeaveTo ? transform.value : "none";
|
|
76
|
+
});
|
|
77
|
+
const isSlideY = computed(() => {
|
|
78
|
+
return props.slide === "down" || props.slide === "up";
|
|
79
|
+
});
|
|
80
|
+
const height = computed(() => {
|
|
81
|
+
if (props.isFloating)
|
|
82
|
+
return null;
|
|
83
|
+
return isSlideY.value ? 0 : "auto";
|
|
84
|
+
});
|
|
85
|
+
const width = computed(() => {
|
|
86
|
+
if (props.isFloating)
|
|
87
|
+
return null;
|
|
88
|
+
return props.slide && !isSlideY.value ? 0 : "auto";
|
|
89
|
+
});
|
|
90
|
+
const enterFromHeight = computed(() => {
|
|
91
|
+
return props.isEnterFrom ? height.value : "auto";
|
|
92
|
+
});
|
|
93
|
+
const enterFromWidth = computed(() => {
|
|
94
|
+
return props.isEnterFrom ? width.value : "auto";
|
|
95
|
+
});
|
|
96
|
+
const willChange = computed(() => {
|
|
97
|
+
let properties = "opacity";
|
|
98
|
+
if (transform.value !== "none")
|
|
99
|
+
properties += ", transform";
|
|
100
|
+
if (height.value === 0)
|
|
101
|
+
properties += ", height";
|
|
102
|
+
if (width.value === 0)
|
|
103
|
+
properties += ", width";
|
|
104
|
+
return properties;
|
|
105
|
+
});
|
|
106
|
+
const setInitialStyles = (el) => {
|
|
107
|
+
el.style.setProperty("--fade-will-change", willChange.value);
|
|
108
|
+
el.style.setProperty("--fade-duration", duration.value);
|
|
109
|
+
el.style.setProperty("--fade-enter-opacity", String(enterFromOpacity.value));
|
|
110
|
+
el.style.setProperty("--fade-enter-transform", String(enterFromTransform.value));
|
|
111
|
+
el.style.setProperty("--fade-enter-height", String(enterFromHeight.value));
|
|
112
|
+
el.style.setProperty("--fade-enter-width", String(enterFromWidth.value));
|
|
113
|
+
el.style.setProperty("--fade-leave-opacity", String(leaveToOpacity.value));
|
|
114
|
+
el.style.setProperty("--fade-leave-transform", String(leaveToTransform.value));
|
|
115
|
+
};
|
|
116
|
+
const onEnter = (el) => {
|
|
117
|
+
if (props.slide && !props.isFloating && props.isEnterFrom) {
|
|
118
|
+
if (isSlideY.value) {
|
|
119
|
+
el.style.width = getComputedStyle(el).width;
|
|
120
|
+
el.style.height = "auto";
|
|
121
|
+
} else {
|
|
122
|
+
el.style.width = "auto";
|
|
123
|
+
el.style.height = getComputedStyle(el).height;
|
|
124
|
+
}
|
|
125
|
+
el.style.position = "absolute";
|
|
126
|
+
el.style.visibility = "hidden";
|
|
127
|
+
const { width: width2, height: height2 } = getComputedStyle(el);
|
|
128
|
+
el.style.width = isSlideY.value ? "" : "0";
|
|
129
|
+
el.style.height = isSlideY.value ? "0" : "";
|
|
130
|
+
el.style.position = "";
|
|
131
|
+
el.style.visibility = "";
|
|
132
|
+
getComputedStyle(el)[isSlideY.value ? "height" : "width"];
|
|
133
|
+
requestAnimationFrame(() => {
|
|
134
|
+
if (isSlideY.value) {
|
|
135
|
+
el.style.height = height2;
|
|
136
|
+
} else {
|
|
137
|
+
el.style.width = width2;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
const onAfterEnter = (el) => {
|
|
143
|
+
if (props.slide && !props.isFloating && props.isEnterFrom) {
|
|
144
|
+
el.style[isSlideY.value ? "height" : "width"] = "";
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const onLeave = (el) => {
|
|
148
|
+
if (props.slide && !props.isFloating && props.isLeaveTo) {
|
|
149
|
+
if (isSlideY.value) {
|
|
150
|
+
el.style.height = getComputedStyle(el).height;
|
|
151
|
+
} else {
|
|
152
|
+
el.style.width = getComputedStyle(el).width;
|
|
153
|
+
}
|
|
154
|
+
const sizeProp = isSlideY.value ? "height" : "width";
|
|
155
|
+
getComputedStyle(el)[sizeProp];
|
|
156
|
+
requestAnimationFrame(() => {
|
|
157
|
+
el.style[sizeProp] = "0";
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const __returned__ = { props, duration, transform, opacity, enterFromOpacity, leaveToOpacity, enterFromTransform, leaveToTransform, isSlideY, height, width, enterFromHeight, enterFromWidth, willChange, setInitialStyles, onEnter, onAfterEnter, onLeave };
|
|
162
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
163
|
+
return __returned__;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
167
|
+
ssrRenderSlotInner(_ctx.$slots, "default", {}, null, _push, _parent, null, true);
|
|
168
|
+
}
|
|
169
|
+
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
170
|
+
_sfc_main$2.setup = (props, ctx) => {
|
|
171
|
+
const ssrContext = useSSRContext();
|
|
172
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Fade.vue");
|
|
173
|
+
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
174
|
+
};
|
|
175
|
+
const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$2]]);
|
|
176
|
+
|
|
177
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
178
|
+
__name: "ALink",
|
|
179
|
+
props: {
|
|
180
|
+
href: {},
|
|
181
|
+
target: {}
|
|
182
|
+
},
|
|
183
|
+
setup(__props, { expose: __expose }) {
|
|
184
|
+
__expose();
|
|
185
|
+
const props = __props;
|
|
186
|
+
const linkTarget = computed(() => {
|
|
187
|
+
if (props.target)
|
|
188
|
+
return props.target;
|
|
189
|
+
if (props.href.startsWith("http")) {
|
|
190
|
+
const domain = globalThis.$storefront.settings.domain || window.location.host;
|
|
191
|
+
if (props.href.startsWith(`https://${domain}`))
|
|
192
|
+
return void 0;
|
|
193
|
+
}
|
|
194
|
+
return props.href.charAt(0) === "/" ? void 0 : "_blank";
|
|
195
|
+
});
|
|
196
|
+
const __returned__ = { props, linkTarget };
|
|
197
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
198
|
+
return __returned__;
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
202
|
+
_push(`<a${ssrRenderAttrs(mergeProps({
|
|
203
|
+
href: $props.href,
|
|
204
|
+
target: $setup.linkTarget,
|
|
205
|
+
rel: $setup.linkTarget === "_blank" ? "noopener" : void 0
|
|
206
|
+
}, _attrs))}>`);
|
|
207
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
208
|
+
_push(`</a>`);
|
|
209
|
+
}
|
|
210
|
+
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
211
|
+
_sfc_main$1.setup = (props, ctx) => {
|
|
212
|
+
const ssrContext = useSSRContext();
|
|
213
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/ALink.vue");
|
|
214
|
+
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
215
|
+
};
|
|
216
|
+
const ALink = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1]]);
|
|
217
|
+
|
|
218
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
219
|
+
__name: "AImg",
|
|
220
|
+
props: {
|
|
221
|
+
picture: {},
|
|
222
|
+
loading: { default: "lazy" },
|
|
223
|
+
decoding: {}
|
|
224
|
+
},
|
|
225
|
+
setup(__props, { expose: __expose }) {
|
|
226
|
+
__expose();
|
|
227
|
+
const props = __props;
|
|
228
|
+
const image = computed(() => {
|
|
229
|
+
if (props.picture.url) {
|
|
230
|
+
return props.picture;
|
|
231
|
+
}
|
|
232
|
+
return img(props.picture) || {};
|
|
233
|
+
});
|
|
234
|
+
const dimensions = computed(() => {
|
|
235
|
+
return imgSizes(image.value);
|
|
236
|
+
});
|
|
237
|
+
const attrs = computed(() => ({
|
|
238
|
+
src: image.value.url,
|
|
239
|
+
alt: image.value.alt,
|
|
240
|
+
width: dimensions.value.width || void 0,
|
|
241
|
+
height: dimensions.value.height || void 0,
|
|
242
|
+
loading: props.loading,
|
|
243
|
+
decoding: props.decoding || (dimensions.value.height ? "async" : void 0)
|
|
244
|
+
}));
|
|
245
|
+
const __returned__ = { props, image, dimensions, attrs };
|
|
246
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
247
|
+
return __returned__;
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
251
|
+
_push(`<img${ssrRenderAttrs(mergeProps($setup.attrs, _attrs))}>`);
|
|
252
|
+
}
|
|
253
|
+
const _sfc_setup = _sfc_main.setup;
|
|
254
|
+
_sfc_main.setup = (props, ctx) => {
|
|
255
|
+
const ssrContext = useSSRContext();
|
|
256
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/AImg.vue");
|
|
257
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
258
|
+
};
|
|
259
|
+
const AImg = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
260
|
+
|
|
261
|
+
const formatPercentage = (value, digits = 1) => {
|
|
262
|
+
return Number.isInteger(value) ? `${value}%` : `${value.toFixed(digits)}%`;
|
|
263
|
+
};
|
|
264
|
+
const createApp = (app) => {
|
|
265
|
+
app.use({
|
|
266
|
+
// eslint-disable-next-line no-shadow
|
|
267
|
+
install: (app2, options) => {
|
|
268
|
+
app2.config.globalProperties.$t = (dict, lang) => {
|
|
269
|
+
return i18n(dict, lang || options?.lang);
|
|
270
|
+
};
|
|
271
|
+
app2.config.globalProperties.$money = formatMoney;
|
|
272
|
+
app2.config.globalProperties.$percentage = formatPercentage;
|
|
273
|
+
app2.config.globalProperties.$settings = globalThis.$storefront.settings;
|
|
274
|
+
app2.config.globalProperties.$context = globalThis.$storefront.context;
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
app.component("Fade", Fade);
|
|
278
|
+
app.component("ALink", ALink);
|
|
279
|
+
app.component("AImg", AImg);
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Astro passes `children` as a string of HTML, so we need
|
|
284
|
+
* a wrapper `div` to render that content as VNodes.
|
|
285
|
+
*
|
|
286
|
+
* This is the Vue + JSX equivalent of using `<div v-html="value" />`
|
|
287
|
+
*/
|
|
288
|
+
const StaticHtml = defineComponent({
|
|
289
|
+
props: {
|
|
290
|
+
value: String,
|
|
291
|
+
name: String,
|
|
292
|
+
hydrate: {
|
|
293
|
+
type: Boolean,
|
|
294
|
+
default: true,
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
setup({ name, value, hydrate }) {
|
|
298
|
+
if (!value) return () => null;
|
|
299
|
+
let tagName = hydrate ? 'astro-slot' : 'astro-static-slot';
|
|
300
|
+
return () => h(tagName, { name, innerHTML: value });
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
function check(Component) {
|
|
305
|
+
return !!Component['ssrRender'] || !!Component['__ssrInlineRender'];
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
async function renderToStaticMarkup(Component, props, slotted, metadata) {
|
|
309
|
+
const slots = {};
|
|
310
|
+
for (const [key, value] of Object.entries(slotted)) {
|
|
311
|
+
slots[key] = () =>
|
|
312
|
+
h(StaticHtml, {
|
|
313
|
+
value,
|
|
314
|
+
name: key === 'default' ? undefined : key,
|
|
315
|
+
// Adjust how this is hydrated only when the version of Astro supports `astroStaticSlot`
|
|
316
|
+
hydrate: metadata.astroStaticSlot ? !!metadata.hydrate : true,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
const app = createSSRApp({ render: () => h(Component, props, slots) });
|
|
320
|
+
await createApp(app);
|
|
321
|
+
const html = await renderToString(app);
|
|
322
|
+
return { html };
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const _renderer1 = {
|
|
326
|
+
check,
|
|
327
|
+
renderToStaticMarkup,
|
|
328
|
+
supportsAstroStaticSlot: true,
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
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 }),];
|
|
332
|
+
|
|
333
|
+
export { renderers };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.15.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -29,38 +29,35 @@
|
|
|
29
29
|
"prepare-monorepo": "bash scripts/prepare-monorepo.sh"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@astrojs/image": "0.
|
|
33
|
-
"@astrojs/node": "5.
|
|
34
|
-
"@astrojs/vue": "2.
|
|
32
|
+
"@astrojs/image": "0.17.2",
|
|
33
|
+
"@astrojs/node": "5.3.0",
|
|
34
|
+
"@astrojs/vue": "2.2.1",
|
|
35
35
|
"@cloudcommerce/api": "workspace:*",
|
|
36
36
|
"@cloudcommerce/config": "workspace:*",
|
|
37
37
|
"@cloudcommerce/i18n": "workspace:*",
|
|
38
|
-
"@ecomplus/utils": "1.5.0-rc.
|
|
38
|
+
"@ecomplus/utils": "1.5.0-rc.5",
|
|
39
39
|
"@fastify/deepmerge": "^1.3.0",
|
|
40
|
-
"@headlessui/vue": "^1.7.
|
|
40
|
+
"@headlessui/vue": "^1.7.14",
|
|
41
41
|
"@iconify-json/fa6-brands": "^1.1.11",
|
|
42
|
-
"@iconify-json/heroicons": "^1.1.
|
|
43
|
-
"@iconify-json/logos": "^1.1.
|
|
44
|
-
"@vite-pwa/astro": "^0.
|
|
45
|
-
"@vueuse/core": "10.1
|
|
46
|
-
"astro": "2.
|
|
42
|
+
"@iconify-json/heroicons": "^1.1.11",
|
|
43
|
+
"@iconify-json/logos": "^1.1.33",
|
|
44
|
+
"@vite-pwa/astro": "^0.1.1",
|
|
45
|
+
"@vueuse/core": "10.2.1",
|
|
46
|
+
"astro": "2.7.3",
|
|
47
47
|
"chroma-js": "^2.4.2",
|
|
48
|
-
"dotenv": "^16.
|
|
49
|
-
"firebase": "^9.
|
|
48
|
+
"dotenv": "^16.3.1",
|
|
49
|
+
"firebase": "^9.23.0",
|
|
50
50
|
"image-size": "^1.0.2",
|
|
51
51
|
"mime": "^3.0.0",
|
|
52
|
-
"
|
|
53
|
-
"react-dom": "^18.2.0",
|
|
54
|
-
"semver": "^7.5.1",
|
|
52
|
+
"semver": "^7.5.3",
|
|
55
53
|
"sharp": "^0.32.1",
|
|
56
54
|
"tailwindcss": "^3.3.2",
|
|
57
|
-
"unocss": "^0.
|
|
58
|
-
"vite": "^4.3.
|
|
59
|
-
"vite-plugin-pwa": "^0.
|
|
60
|
-
"vue": "^3.3.
|
|
55
|
+
"unocss": "^0.53.4",
|
|
56
|
+
"vite": "^4.3.9",
|
|
57
|
+
"vite-plugin-pwa": "^0.16.4",
|
|
58
|
+
"vue": "^3.3.4"
|
|
61
59
|
},
|
|
62
60
|
"devDependencies": {
|
|
63
|
-
"@babel/core": "^7.21.8",
|
|
64
61
|
"@cloudcommerce/types": "workspace:*"
|
|
65
62
|
}
|
|
66
63
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
rm -rf content && ln -s ../../store/functions/ssr/content content
|
|
4
4
|
rm -rf public && ln -s ../../store/functions/ssr/public public
|
|
5
|
-
rm -rf src/content && ln -s ../../../store/functions/ssr/src/content src/content
|
|
6
5
|
rm -rf src/pages && ln -s ../../../store/functions/ssr/src/pages src/pages
|
|
7
6
|
rm -rf src/layouts && ln -s ../../../store/functions/ssr/src/layouts src/layouts
|
|
8
7
|
rm -rf src/main && ln -s ../../../store/functions/ssr/src/main src/main
|
|
@@ -7,9 +7,16 @@ import type {
|
|
|
7
7
|
BrandSet,
|
|
8
8
|
CollectionSet,
|
|
9
9
|
} from '@cloudcommerce/api/types';
|
|
10
|
-
import type {
|
|
10
|
+
import type { RouteContext } from '@@sf/ssr-context';
|
|
11
|
+
import type { SettingsContent } from '@@sf/content';
|
|
11
12
|
|
|
12
13
|
declare global {
|
|
14
|
+
namespace App {
|
|
15
|
+
interface Locals {
|
|
16
|
+
routeContext: RouteContext,
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
var $storefront: {
|
|
14
21
|
settings: Partial<SettingsContent>,
|
|
15
22
|
context?: {
|
|
@@ -2,11 +2,11 @@ type FetchParams = Parameters<typeof fetch>;
|
|
|
2
2
|
|
|
3
3
|
const afetch = (url: FetchParams[0], init?: FetchParams[1], timeout = 10000) => {
|
|
4
4
|
let abortController: AbortController | undefined;
|
|
5
|
-
let timer;
|
|
5
|
+
let timer: NodeJS.Timeout | undefined;
|
|
6
6
|
if (timeout) {
|
|
7
7
|
abortController = new AbortController();
|
|
8
8
|
timer = setTimeout(() => {
|
|
9
|
-
abortController.abort();
|
|
9
|
+
(abortController as AbortController).abort();
|
|
10
10
|
}, timeout);
|
|
11
11
|
}
|
|
12
12
|
if (init?.body && typeof init.body === 'object') {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* <Fade> */
|
|
2
|
+
[class*="sf-fade-"] {
|
|
3
|
+
will-change: var(--fade-will-change);
|
|
4
|
+
transform: translateZ(0);
|
|
5
|
+
backface-visibility: hidden;
|
|
6
|
+
perspective: 1000px;
|
|
7
|
+
}
|
|
8
|
+
.sf-fade-enter-active,
|
|
9
|
+
.sf-fade-leave-active {
|
|
10
|
+
transition: opacity var(--fade-duration), transform var(--fade-duration),
|
|
11
|
+
height var(--fade-duration), width var(--fade-duration);
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
}
|
|
14
|
+
.sf-fade-enter-from {
|
|
15
|
+
opacity: var(--fade-enter-opacity);
|
|
16
|
+
transform: var(--fade-enter-transform);
|
|
17
|
+
height: var(--fade-enter-height);
|
|
18
|
+
width: var(--fade-enter-width);
|
|
19
|
+
}
|
|
20
|
+
.sf-fade-leave-to {
|
|
21
|
+
opacity: var(--fade-leave-opacity);
|
|
22
|
+
transform: var(--fade-leave-transform);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* <Carousel> */
|
|
26
|
+
[data-carousel-wrapper]::-webkit-scrollbar {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
provide,
|
|
12
12
|
} from 'vue';
|
|
13
13
|
import { useDebounceFn, useElementHover, useScroll } from '@vueuse/core';
|
|
14
|
-
import { carouselKey } from '
|
|
15
|
-
import CarouselControl from '
|
|
14
|
+
import { carouselKey } from '@@sf/components/_injection-keys';
|
|
15
|
+
import CarouselControl from '@@sf/components/CarouselControl.vue';
|
|
16
16
|
|
|
17
17
|
export interface Props {
|
|
18
18
|
as?: string;
|
|
@@ -169,7 +169,13 @@ provide(carouselKey, {
|
|
|
169
169
|
<component
|
|
170
170
|
:is="as"
|
|
171
171
|
ref="wrapper"
|
|
172
|
-
class="flex overflow-x-scroll overflow-y-hidden list-none m-0 p-0
|
|
172
|
+
class="flex overflow-x-scroll overflow-y-hidden list-none m-0 p-0
|
|
173
|
+
snap-x snap-mandatory scroll-smooth
|
|
174
|
+
[&>*]:snap-start [&>*]:outline-none"
|
|
175
|
+
style="
|
|
176
|
+
scrollbar-width: none;
|
|
177
|
+
-webkit-overflow-scrolling: touch;
|
|
178
|
+
-ms-overflow-style: none;"
|
|
173
179
|
data-carousel-wrapper
|
|
174
180
|
>
|
|
175
181
|
<slot />
|
|
@@ -194,23 +200,3 @@ provide(carouselKey, {
|
|
|
194
200
|
</slot>
|
|
195
201
|
</div>
|
|
196
202
|
</template>
|
|
197
|
-
|
|
198
|
-
<style>
|
|
199
|
-
[data-carousel-wrapper] {
|
|
200
|
-
scroll-snap-type: x mandatory;
|
|
201
|
-
scroll-behavior: smooth;
|
|
202
|
-
scrollbar-width: none;
|
|
203
|
-
-webkit-overflow-scrolling: touch;
|
|
204
|
-
-ms-overflow-style: none;
|
|
205
|
-
}
|
|
206
|
-
[data-carousel-wrapper]::-webkit-scrollbar {
|
|
207
|
-
display: none;
|
|
208
|
-
}
|
|
209
|
-
[data-carousel-wrapper] > * {
|
|
210
|
-
scroll-snap-align: start;
|
|
211
|
-
outline: none;
|
|
212
|
-
}
|
|
213
|
-
[data-carousel-control] {
|
|
214
|
-
z-index: 1;
|
|
215
|
-
}
|
|
216
|
-
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject } from 'vue';
|
|
3
|
-
import { type CarouselInject, carouselKey } from '
|
|
3
|
+
import { type CarouselInject, carouselKey } from '@@sf/components/_injection-keys';
|
|
4
4
|
|
|
5
5
|
export interface Props {
|
|
6
6
|
direction?: number;
|
|
@@ -17,7 +17,7 @@ const { changeSlide } = inject(carouselKey) as CarouselInject;
|
|
|
17
17
|
type="button"
|
|
18
18
|
:aria-label="direction > 0 ? $t.i19next : $t.i19previous"
|
|
19
19
|
@click="changeSlide(direction)"
|
|
20
|
-
class="group absolute top-0"
|
|
20
|
+
class="group absolute top-0 z-1"
|
|
21
21
|
:class="direction > 0 ? 'right-0' : 'left-0'"
|
|
22
22
|
:data-carousel-control="direction > 0 ? 'next' : 'previous'"
|
|
23
23
|
>
|
|
@@ -12,10 +12,7 @@ export interface PictureSize {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface Props {
|
|
15
|
-
picture: {
|
|
16
|
-
url: string;
|
|
17
|
-
alt?: string;
|
|
18
|
-
size?: string;
|
|
15
|
+
picture: PictureSize | {
|
|
19
16
|
normal?: PictureSize;
|
|
20
17
|
big?: PictureSize;
|
|
21
18
|
zoom?: PictureSize;
|
|
@@ -30,11 +27,11 @@ export interface Props {
|
|
|
30
27
|
const props = withDefaults(defineProps<Props>(), {
|
|
31
28
|
loading: 'lazy',
|
|
32
29
|
});
|
|
33
|
-
const image = computed(() => {
|
|
30
|
+
const image = computed<Partial<PictureSize>>(() => {
|
|
34
31
|
if ((props.picture as PictureSize).url) {
|
|
35
|
-
return props.picture;
|
|
32
|
+
return props.picture as PictureSize;
|
|
36
33
|
}
|
|
37
|
-
return getImg(props.picture)
|
|
34
|
+
return getImg(props.picture) || {};
|
|
38
35
|
});
|
|
39
36
|
const dimensions = computed(() => {
|
|
40
37
|
return getImgSizes(image.value) as { width: number, height: number };
|
|
@@ -13,7 +13,7 @@ const linkTarget = computed(() => {
|
|
|
13
13
|
const domain = globalThis.$storefront.settings.domain || window.location.host;
|
|
14
14
|
if (props.href.startsWith(`https://${domain}`)) return undefined;
|
|
15
15
|
}
|
|
16
|
-
return '_blank';
|
|
16
|
+
return props.href.charAt(0) === '/' ? undefined : '_blank';
|
|
17
17
|
});
|
|
18
18
|
</script>
|
|
19
19
|
|
|
@@ -136,37 +136,12 @@ const onLeave = (el: HTMLElement) => {
|
|
|
136
136
|
<template>
|
|
137
137
|
<Transition
|
|
138
138
|
name="sf-fade"
|
|
139
|
-
@before-enter="setInitialStyles"
|
|
140
|
-
@enter="onEnter"
|
|
141
|
-
@before-leave="setInitialStyles"
|
|
142
|
-
@after-enter="onAfterEnter"
|
|
143
|
-
@leave="onLeave"
|
|
139
|
+
@before-enter="(setInitialStyles as any)"
|
|
140
|
+
@enter="(onEnter as any)"
|
|
141
|
+
@before-leave="(setInitialStyles as any)"
|
|
142
|
+
@after-enter="(onAfterEnter as any)"
|
|
143
|
+
@leave="(onLeave as any)"
|
|
144
144
|
>
|
|
145
145
|
<slot />
|
|
146
146
|
</Transition>
|
|
147
147
|
</template>
|
|
148
|
-
|
|
149
|
-
<style>
|
|
150
|
-
[class*="sf-fade-"] {
|
|
151
|
-
will-change: var(--fade-will-change);
|
|
152
|
-
transform: translateZ(0);
|
|
153
|
-
backface-visibility: hidden;
|
|
154
|
-
perspective: 1000px;
|
|
155
|
-
}
|
|
156
|
-
.sf-fade-enter-active,
|
|
157
|
-
.sf-fade-leave-active {
|
|
158
|
-
transition: opacity var(--fade-duration), transform var(--fade-duration),
|
|
159
|
-
height var(--fade-duration), width var(--fade-duration);
|
|
160
|
-
overflow: hidden;
|
|
161
|
-
}
|
|
162
|
-
.sf-fade-enter-from {
|
|
163
|
-
opacity: var(--fade-enter-opacity);
|
|
164
|
-
transform: var(--fade-enter-transform);
|
|
165
|
-
height: var(--fade-enter-height);
|
|
166
|
-
width: var(--fade-enter-width);
|
|
167
|
-
}
|
|
168
|
-
.sf-fade-leave-to {
|
|
169
|
-
opacity: var(--fade-leave-opacity);
|
|
170
|
-
transform: var(--fade-leave-transform);
|
|
171
|
-
}
|
|
172
|
-
</style>
|
|
@@ -4,7 +4,8 @@ import { price as getPrice, onPromotion as checkOnPromotion } from '@ecomplus/ut
|
|
|
4
4
|
import modulesInfo from '@@sf/state/modules-info';
|
|
5
5
|
|
|
6
6
|
export interface Props {
|
|
7
|
-
product?: Partial<Products> & {
|
|
7
|
+
product?: Partial<Products> & { final_price?: number } &
|
|
8
|
+
({ price: number } | { final_price: number });
|
|
8
9
|
price?: number;
|
|
9
10
|
basePrice?: number;
|
|
10
11
|
isAmountTotal?: boolean;
|
|
@@ -182,3 +183,5 @@ const usePrices = (props: Props) => {
|
|
|
182
183
|
};
|
|
183
184
|
|
|
184
185
|
export default usePrices;
|
|
186
|
+
|
|
187
|
+
export { usePrices };
|