@fayz-ai/storefront 0.12.1 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-OYKFJ6FG.js → chunk-6DWZAAIW.js} +74 -24
- package/dist/chunk-6DWZAAIW.js.map +1 -0
- package/dist/components/SmoothImage.d.ts +17 -1
- package/dist/components/SmoothImage.d.ts.map +1 -1
- package/dist/components/collection/CategoryShowcase.d.ts.map +1 -1
- package/dist/components/product/ProductCard.d.ts.map +1 -1
- package/dist/components/product/ProductGallery.d.ts.map +1 -1
- package/dist/data/facets.d.ts +9 -0
- package/dist/data/facets.d.ts.map +1 -1
- package/dist/document/config.d.ts +12 -0
- package/dist/document/config.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/seo.d.ts.map +1 -1
- package/dist/render.js +1 -1
- package/dist/views/CatalogPage.d.ts.map +1 -1
- package/dist/views/MyPurchasesPage.d.ts.map +1 -1
- package/dist/views/ProductDetailPage.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/chunk-OYKFJ6FG.js.map +0 -1
|
@@ -6,9 +6,9 @@ import { setShopCarrierQuotesResolver, setShopAccessTokenResolver, setShopShippi
|
|
|
6
6
|
import { normalizePostalCode, lookupPostalCode, defaultRouterAdapter, defineLoader, staticRouterAdapter, isLoaderParamRef, isLoaderPropRef, resolveLoader, dataNeedKey, getBlockMeta, defaultPropsFromSettings, getBlockErrorVisibility, isBlockEnabledOn, checkBlockConstraints, checkBlockContext, repairBlockTree, renderBlocks, clearExtensionPoints, defineExtensionPoint, runExtensionPoint, runEscapeValve, breadcrumbJsonLd, hasEntityDeclaration, resolveEntityDeclaration, defineBlock, formatPostalCode, defineEntity, listEntityDeclarations, resolveHandle, seoOrigin, RESERVED_ENTITY_FIELDS, ENTITY_FIELD_TYPES, handleNameFor, registerHandle, hasHandle, listHandles, blockRegistry, loaderRegistry, listLoaders } from '@fayz-ai/core';
|
|
7
7
|
import React4, { createContext, useContext, useEffect, useRef, useState, useSyncExternalStore, useMemo, useCallback } from 'react';
|
|
8
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
import { isStorageImageUrl, imageVariantUrl, imageSrcSet, IMAGE_SRCSET_WIDTHS, validateDiscount, documentDigits, isChargeableProvider, formatDocument, isValidDocument } from '@fayz-ai/shop';
|
|
9
10
|
import { ChevronLeft, ChevronRight, ShoppingBag, X, Minus, Plus, Send, MessageCircle, Mail, Truck, RefreshCcw, ShieldCheck, ChevronDown, Check, Search, Trash2, Lock, CreditCard, Star, MapPin, Phone, User, UserCircle, Package, LogOut, Menu, QrCode, Copy, XCircle, RotateCcw, Clock, PackageCheck, Info, AlertCircle } from 'lucide-react';
|
|
10
11
|
import { getLucideIcon } from '@fayz-ai/ui/icons';
|
|
11
|
-
import { validateDiscount, documentDigits, isChargeableProvider, formatDocument, isValidDocument } from '@fayz-ai/shop';
|
|
12
12
|
import { storefrontDiscountToPromotion, previewCouponPercent, discountToPromotion, PROMOTION_TYPES, PROMOTION_STATUSES, APPLICATION_METHOD_TYPES, APPLICATION_METHOD_TARGET_TYPES, APPLICATION_METHOD_ALLOCATIONS, hasRuleAttribute, listRuleAttributeKeys, RULE_OPERATORS, resolveRuleAttribute } from '@fayz-ai/shop/rules';
|
|
13
13
|
import { createMockShopProvider } from '@fayz-ai/shop/mock';
|
|
14
14
|
|
|
@@ -445,6 +445,17 @@ function toFacetMap(input) {
|
|
|
445
445
|
}
|
|
446
446
|
return out;
|
|
447
447
|
}
|
|
448
|
+
var TRACKING_PARAM = /^(utm_[a-z0-9_]+|fbclid|gclid|gbraid|wbraid|dclid|msclkid|ttclid|twclid|li_fat_id|igshid|igsh|mc_cid|mc_eid|_ga|_gl|_hs[a-z]+|hsa_[a-z]+|yclid|srsltid|ref|ref_src)$/i;
|
|
449
|
+
function isTrackingParam(key) {
|
|
450
|
+
return TRACKING_PARAM.test(key);
|
|
451
|
+
}
|
|
452
|
+
function facetsFromQuery(params, reserved) {
|
|
453
|
+
const out = {};
|
|
454
|
+
for (const [key, value] of params.entries()) {
|
|
455
|
+
if (value && !reserved.has(key) && !isTrackingParam(key)) out[key] = value;
|
|
456
|
+
}
|
|
457
|
+
return out;
|
|
458
|
+
}
|
|
448
459
|
function withFacet(facets, key, value) {
|
|
449
460
|
if (value == null || value === "") {
|
|
450
461
|
if (!(key in facets)) return facets;
|
|
@@ -760,7 +771,8 @@ function resolveConfig(config) {
|
|
|
760
771
|
mode: config.imageLoading?.mode ?? "fade",
|
|
761
772
|
durationMs: config.imageLoading?.durationMs ?? 420,
|
|
762
773
|
easing: config.imageLoading?.easing ?? "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
763
|
-
blur: config.imageLoading?.blur ?? true
|
|
774
|
+
blur: config.imageLoading?.blur ?? true,
|
|
775
|
+
transform: config.imageLoading?.transform ?? "none"
|
|
764
776
|
},
|
|
765
777
|
catalogPath,
|
|
766
778
|
search: {
|
|
@@ -1107,10 +1119,14 @@ var TID = {
|
|
|
1107
1119
|
};
|
|
1108
1120
|
function SmoothImage({
|
|
1109
1121
|
imageLoading,
|
|
1122
|
+
variant,
|
|
1110
1123
|
loading = "lazy",
|
|
1111
1124
|
decoding = "async",
|
|
1112
1125
|
onLoad,
|
|
1113
1126
|
style,
|
|
1127
|
+
src,
|
|
1128
|
+
srcSet,
|
|
1129
|
+
sizes,
|
|
1114
1130
|
...props
|
|
1115
1131
|
}) {
|
|
1116
1132
|
const config = useStorefrontConfigOptional();
|
|
@@ -1122,15 +1138,34 @@ function SmoothImage({
|
|
|
1122
1138
|
const durationMs = resolved.durationMs ?? 420;
|
|
1123
1139
|
const easing = resolved.easing ?? "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
1124
1140
|
const blur = resolved.blur ?? true;
|
|
1141
|
+
const transform = resolved.transform ?? "none";
|
|
1125
1142
|
const ref = React4.useRef(null);
|
|
1126
1143
|
const [loaded, setLoaded] = React4.useState(mode === "none");
|
|
1144
|
+
const delivered = React4.useMemo(() => {
|
|
1145
|
+
if (transform !== "supabase" || !src || srcSet || !isStorageImageUrl(src)) return { src, srcSet, sizes };
|
|
1146
|
+
if (variant?.width) {
|
|
1147
|
+
const w = variant.width;
|
|
1148
|
+
const q = variant.quality;
|
|
1149
|
+
return {
|
|
1150
|
+
src: imageVariantUrl(src, { width: w, quality: q }),
|
|
1151
|
+
srcSet: `${imageVariantUrl(src, { width: w, quality: q })} 1x, ${imageVariantUrl(src, { width: w * 2, quality: q })} 2x`,
|
|
1152
|
+
sizes
|
|
1153
|
+
};
|
|
1154
|
+
}
|
|
1155
|
+
return {
|
|
1156
|
+
// A middle rung as the fallback `src`, for a browser without srcset.
|
|
1157
|
+
src: imageVariantUrl(src, { width: 960, quality: variant?.quality }),
|
|
1158
|
+
srcSet: imageSrcSet(src, variant?.widths ?? IMAGE_SRCSET_WIDTHS, { quality: variant?.quality }),
|
|
1159
|
+
sizes: variant?.sizes ?? sizes ?? "100vw"
|
|
1160
|
+
};
|
|
1161
|
+
}, [transform, src, srcSet, sizes, variant?.width, variant?.sizes, variant?.widths, variant?.quality]);
|
|
1127
1162
|
React4.useEffect(() => {
|
|
1128
1163
|
if (mode === "none") {
|
|
1129
1164
|
setLoaded(true);
|
|
1130
1165
|
return;
|
|
1131
1166
|
}
|
|
1132
1167
|
if (ref.current?.complete && ref.current.naturalWidth > 0) setLoaded(true);
|
|
1133
|
-
}, [mode,
|
|
1168
|
+
}, [mode, delivered.src]);
|
|
1134
1169
|
const revealStyle = mode === "none" ? {} : {
|
|
1135
1170
|
opacity: loaded ? 1 : 0,
|
|
1136
1171
|
filter: blur && !loaded ? "blur(10px)" : "blur(0px)",
|
|
@@ -1140,6 +1175,9 @@ function SmoothImage({
|
|
|
1140
1175
|
"img",
|
|
1141
1176
|
{
|
|
1142
1177
|
...props,
|
|
1178
|
+
src: delivered.src,
|
|
1179
|
+
srcSet: delivered.srcSet,
|
|
1180
|
+
sizes: delivered.sizes,
|
|
1143
1181
|
ref,
|
|
1144
1182
|
loading,
|
|
1145
1183
|
decoding,
|
|
@@ -1641,7 +1679,8 @@ function CategoryShowcase({
|
|
|
1641
1679
|
{
|
|
1642
1680
|
src: c.imageUrl ?? bannerPlaceholder(c.name, 30 + i * 70, 70 + i * 70, 200, 200),
|
|
1643
1681
|
alt: c.name,
|
|
1644
|
-
className: "h-full w-full object-cover"
|
|
1682
|
+
className: "h-full w-full object-cover",
|
|
1683
|
+
variant: { width: 96 }
|
|
1645
1684
|
}
|
|
1646
1685
|
) }),
|
|
1647
1686
|
/* @__PURE__ */ jsx("span", { className: "text-center text-xs font-medium leading-tight", children: c.name })
|
|
@@ -1656,7 +1695,8 @@ function CategoryShowcase({
|
|
|
1656
1695
|
{
|
|
1657
1696
|
src: c.imageUrl ?? bannerPlaceholder(c.name, 30 + i * 70, 70 + i * 70, 480, 600),
|
|
1658
1697
|
alt: c.name,
|
|
1659
|
-
className: "h-full w-full object-cover transition-transform duration-700 ease-out group-hover:scale-110"
|
|
1698
|
+
className: "h-full w-full object-cover transition-transform duration-700 ease-out group-hover:scale-110",
|
|
1699
|
+
variant: { sizes: "(min-width: 1024px) 33vw, 100vw" }
|
|
1660
1700
|
}
|
|
1661
1701
|
),
|
|
1662
1702
|
/* @__PURE__ */ jsxs("span", { className: "absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 via-black/30 to-transparent p-5 pt-12 text-left", children: [
|
|
@@ -2444,7 +2484,8 @@ function ProductCard({ product, config: providedConfig, actions: providedActions
|
|
|
2444
2484
|
src: image?.url ?? productPlaceholder(product.name),
|
|
2445
2485
|
alt: image?.altText ?? product.name,
|
|
2446
2486
|
className: "h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",
|
|
2447
|
-
loading: "lazy"
|
|
2487
|
+
loading: "lazy",
|
|
2488
|
+
variant: { sizes: "(min-width: 1024px) 25vw, (min-width: 640px) 33vw, 50vw" }
|
|
2448
2489
|
}
|
|
2449
2490
|
),
|
|
2450
2491
|
/* @__PURE__ */ jsxs("div", { className: "absolute left-3 top-3 flex gap-2", children: [
|
|
@@ -3284,9 +3325,7 @@ function useCatalogUrlSync(searchParam) {
|
|
|
3284
3325
|
if (p.has("q")) s2.setSearch(p.get("q") ?? "");
|
|
3285
3326
|
else if (p.has("search")) s2.setSearch(p.get("search") ?? "");
|
|
3286
3327
|
if (p.get("category")) s2.setCategoryId(p.get("category"));
|
|
3287
|
-
for (const [key, value] of
|
|
3288
|
-
if (!RESERVED_PARAMS.has(key) && value) s2.setFacet(key, value);
|
|
3289
|
-
}
|
|
3328
|
+
for (const [key, value] of Object.entries(facetsFromQuery(p, RESERVED_PARAMS))) s2.setFacet(key, value);
|
|
3290
3329
|
const sort = p.get("sort");
|
|
3291
3330
|
if (sort && SORTS.includes(sort)) s2.setSort(sort);
|
|
3292
3331
|
if (p.get("stock") === "1") s2.setInStockOnly(true);
|
|
@@ -3294,7 +3333,11 @@ function useCatalogUrlSync(searchParam) {
|
|
|
3294
3333
|
if (p.has("max")) s2.setPriceMax(Number(p.get("max")) || null);
|
|
3295
3334
|
}, []);
|
|
3296
3335
|
useEffect(() => {
|
|
3336
|
+
const current = adapter.getCurrentPath();
|
|
3297
3337
|
const p = new URLSearchParams();
|
|
3338
|
+
for (const [key, value] of new URLSearchParams(current.split("?")[1] ?? "").entries()) {
|
|
3339
|
+
if (isTrackingParam(key)) p.set(key, value);
|
|
3340
|
+
}
|
|
3298
3341
|
if (catalog.search) p.set(searchParam, catalog.search);
|
|
3299
3342
|
if (catalog.categoryId) p.set("category", catalog.categoryId);
|
|
3300
3343
|
for (const [key, value] of Object.entries(catalog.facets)) p.set(key, value);
|
|
@@ -3302,10 +3345,10 @@ function useCatalogUrlSync(searchParam) {
|
|
|
3302
3345
|
if (catalog.inStockOnly) p.set("stock", "1");
|
|
3303
3346
|
if (catalog.priceMin != null) p.set("min", String(catalog.priceMin));
|
|
3304
3347
|
if (catalog.priceMax != null) p.set("max", String(catalog.priceMax));
|
|
3305
|
-
const base =
|
|
3348
|
+
const base = current.split("?")[0] || "/catalog";
|
|
3306
3349
|
const qs = p.toString();
|
|
3307
3350
|
const next = qs ? `${base}?${qs}` : base;
|
|
3308
|
-
if (next !==
|
|
3351
|
+
if (next !== current) adapter.replace(next);
|
|
3309
3352
|
}, [
|
|
3310
3353
|
catalog.search,
|
|
3311
3354
|
catalog.categoryId,
|
|
@@ -3408,9 +3451,14 @@ function absolute(ctx, path = ctx.path) {
|
|
|
3408
3451
|
function primaryImageUrl(product) {
|
|
3409
3452
|
return (product.images?.find((i) => i.isPrimary) ?? product.images?.[0])?.url;
|
|
3410
3453
|
}
|
|
3454
|
+
function shareImageUrl(product, ctx) {
|
|
3455
|
+
const url = primaryImageUrl(product);
|
|
3456
|
+
if (!url) return void 0;
|
|
3457
|
+
return ctx.config.imageLoading.transform === "supabase" ? imageVariantUrl(url, { width: 1200, quality: 82 }) : url;
|
|
3458
|
+
}
|
|
3411
3459
|
function productJsonLd(product, ctx) {
|
|
3412
3460
|
const url = absolute(ctx);
|
|
3413
|
-
const image =
|
|
3461
|
+
const image = shareImageUrl(product, ctx);
|
|
3414
3462
|
return {
|
|
3415
3463
|
"@context": "https://schema.org",
|
|
3416
3464
|
"@type": "Product",
|
|
@@ -3435,7 +3483,7 @@ function productSeo(product, ctx) {
|
|
|
3435
3483
|
title: `${product.name} \u2014 ${ctx.config.name}`,
|
|
3436
3484
|
description: product.description?.slice(0, 160),
|
|
3437
3485
|
canonical: url,
|
|
3438
|
-
image:
|
|
3486
|
+
image: shareImageUrl(product, ctx),
|
|
3439
3487
|
type: "product",
|
|
3440
3488
|
jsonLd: [
|
|
3441
3489
|
productJsonLd(product, ctx),
|
|
@@ -3926,7 +3974,8 @@ function ProductGallery({ product, images, primaryImage, order = "primary" }) {
|
|
|
3926
3974
|
src: current?.url ?? productPlaceholder(product.name),
|
|
3927
3975
|
alt: current?.altText ?? product.name,
|
|
3928
3976
|
"data-testid": TID.pdpGalleryImage,
|
|
3929
|
-
className: "h-full w-full object-cover"
|
|
3977
|
+
className: "h-full w-full object-cover",
|
|
3978
|
+
variant: { sizes: "(min-width: 1024px) 50vw, 100vw" }
|
|
3930
3979
|
},
|
|
3931
3980
|
current?.id ?? "placeholder"
|
|
3932
3981
|
)
|
|
@@ -3957,7 +4006,7 @@ function ProductGallery({ product, images, primaryImage, order = "primary" }) {
|
|
|
3957
4006
|
setZoom(null);
|
|
3958
4007
|
},
|
|
3959
4008
|
className: `h-16 w-16 shrink-0 overflow-hidden rounded-lg border transition ${position === index ? "border-primary ring-2 ring-primary/20" : "border-border opacity-70 hover:opacity-100"}`,
|
|
3960
|
-
children: /* @__PURE__ */ jsx(
|
|
4009
|
+
children: /* @__PURE__ */ jsx(SmoothImage, { src: image.url, alt: "", className: "h-full w-full object-cover", loading: "lazy", variant: { width: 64 } })
|
|
3961
4010
|
}
|
|
3962
4011
|
) }, image.id)) })
|
|
3963
4012
|
] });
|
|
@@ -4216,7 +4265,7 @@ function ProductDetailPage({ slug }) {
|
|
|
4216
4265
|
);
|
|
4217
4266
|
}
|
|
4218
4267
|
return /* @__PURE__ */ jsxs("div", { ...storefrontComponentContracts.productDetail.root, className: "mx-auto max-w-5xl px-4 py-8 sm:px-6", children: [
|
|
4219
|
-
/* @__PURE__ */ jsxs(Link, { to:
|
|
4268
|
+
/* @__PURE__ */ jsxs(Link, { to: config.catalogPath, className: "mb-6 inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground", children: [
|
|
4220
4269
|
/* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
|
|
4221
4270
|
" Continuar comprando"
|
|
4222
4271
|
] }),
|
|
@@ -7038,7 +7087,7 @@ function CartDrawer() {
|
|
|
7038
7087
|
"data-line-id": line.lineId ?? line.productId,
|
|
7039
7088
|
className: `flex animate-fade-up gap-3 rounded-lg p-1.5 transition-all hover:bg-muted/40 ${(line.lineId ?? line.productId) === cart.justAddedLineId ? "bg-primary/5 ring-1 ring-primary/30" : ""}`,
|
|
7040
7089
|
children: [
|
|
7041
|
-
line.imageUrl && /* @__PURE__ */ jsx(SmoothImage, { src: line.imageUrl, alt: line.name, className: "h-20 w-20 shrink-0 rounded-lg border object-cover" }),
|
|
7090
|
+
line.imageUrl && /* @__PURE__ */ jsx(SmoothImage, { src: line.imageUrl, alt: line.name, className: "h-20 w-20 shrink-0 rounded-lg border object-cover", variant: { width: 80 } }),
|
|
7042
7091
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col", children: [
|
|
7043
7092
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
7044
7093
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-snug", children: line.name }),
|
|
@@ -8524,7 +8573,7 @@ function CheckoutPage() {
|
|
|
8524
8573
|
/* @__PURE__ */ jsx("h2", { className: "sr-only", children: "Resumo do pedido" }),
|
|
8525
8574
|
/* @__PURE__ */ jsx("ul", { className: "space-y-4", children: cart.lines.map((line) => /* @__PURE__ */ jsxs("li", { className: "flex gap-3 text-sm", children: [
|
|
8526
8575
|
/* @__PURE__ */ jsxs("div", { className: "relative h-16 w-16 flex-none overflow-hidden rounded-lg border bg-background", children: [
|
|
8527
|
-
line.imageUrl && /* @__PURE__ */ jsx(SmoothImage, { src: line.imageUrl, alt: line.name, className: "h-full w-full object-cover" }),
|
|
8576
|
+
line.imageUrl && /* @__PURE__ */ jsx(SmoothImage, { src: line.imageUrl, alt: line.name, className: "h-full w-full object-cover", variant: { width: 96 } }),
|
|
8528
8577
|
/* @__PURE__ */ jsx("span", { className: "absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-muted-foreground px-1.5 text-[10px] font-bold text-background", children: line.quantity })
|
|
8529
8578
|
] }),
|
|
8530
8579
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -9001,7 +9050,7 @@ function OrderConfirmationPage({ orderId }) {
|
|
|
9001
9050
|
))
|
|
9002
9051
|
] }),
|
|
9003
9052
|
/* @__PURE__ */ jsx("ul", { className: "mt-8 space-y-3 text-left", children: order.items.map((item) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-3 text-sm", children: [
|
|
9004
|
-
item.imageUrl && /* @__PURE__ */ jsx(SmoothImage, { src: item.imageUrl, alt: item.name, className: "h-12 w-12 rounded-lg border object-cover" }),
|
|
9053
|
+
item.imageUrl && /* @__PURE__ */ jsx(SmoothImage, { src: item.imageUrl, alt: item.name, className: "h-12 w-12 rounded-lg border object-cover", variant: { width: 48 } }),
|
|
9005
9054
|
/* @__PURE__ */ jsxs("span", { className: "flex-1", children: [
|
|
9006
9055
|
item.name,
|
|
9007
9056
|
" ",
|
|
@@ -9046,7 +9095,7 @@ function OrderConfirmationPage({ orderId }) {
|
|
|
9046
9095
|
children: "Minhas compras"
|
|
9047
9096
|
}
|
|
9048
9097
|
),
|
|
9049
|
-
/* @__PURE__ */ jsx(Link, { to:
|
|
9098
|
+
/* @__PURE__ */ jsx(Link, { to: config.catalogPath, className: "rounded-xl border px-5 py-2.5 font-semibold hover:bg-muted", children: "Continuar comprando" })
|
|
9050
9099
|
] })
|
|
9051
9100
|
] })
|
|
9052
9101
|
}
|
|
@@ -9244,7 +9293,7 @@ function OrdersPanel() {
|
|
|
9244
9293
|
/* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: new Date(order.createdAt).toLocaleDateString(config.locale) }),
|
|
9245
9294
|
/* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(OrderTrackingTimeline, { order, compact: true }) }),
|
|
9246
9295
|
/* @__PURE__ */ jsx("ul", { className: "mt-3 flex flex-wrap gap-2", children: order.items.map((item) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2 rounded-lg border px-2 py-1 text-xs", children: [
|
|
9247
|
-
item.imageUrl && /* @__PURE__ */ jsx(SmoothImage, { src: item.imageUrl, alt: item.name, className: "h-6 w-6 rounded object-cover" }),
|
|
9296
|
+
item.imageUrl && /* @__PURE__ */ jsx(SmoothImage, { src: item.imageUrl, alt: item.name, className: "h-6 w-6 rounded object-cover", variant: { width: 24 } }),
|
|
9248
9297
|
item.name,
|
|
9249
9298
|
" \xD7 ",
|
|
9250
9299
|
item.quantity
|
|
@@ -9335,13 +9384,14 @@ function ProfilePanel() {
|
|
|
9335
9384
|
] });
|
|
9336
9385
|
}
|
|
9337
9386
|
function AddressesPanel() {
|
|
9387
|
+
const config = useStorefrontConfig();
|
|
9338
9388
|
return /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border bg-card p-6", children: [
|
|
9339
9389
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9340
9390
|
/* @__PURE__ */ jsx(MapPin, { className: "h-5 w-5 text-primary" }),
|
|
9341
9391
|
/* @__PURE__ */ jsx("h2", { className: "sf-heading text-lg font-semibold", children: "Endere\xE7os" })
|
|
9342
9392
|
] }),
|
|
9343
9393
|
/* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: "Voc\xEA informa o endere\xE7o de entrega no checkout. Em breve ser\xE1 poss\xEDvel salvar endere\xE7os para reutilizar nas pr\xF3ximas compras." }),
|
|
9344
|
-
/* @__PURE__ */ jsx(Link, { to:
|
|
9394
|
+
/* @__PURE__ */ jsx(Link, { to: config.catalogPath, className: "mt-4 inline-block text-sm font-semibold text-primary underline", children: "Continuar comprando" })
|
|
9345
9395
|
] });
|
|
9346
9396
|
}
|
|
9347
9397
|
function PaymentsPanel() {
|
|
@@ -11041,5 +11091,5 @@ ${formatErrors(report.errors)}`;
|
|
|
11041
11091
|
}
|
|
11042
11092
|
|
|
11043
11093
|
export { BEFORE_PLACE_ORDER_VALVE, BLOCK_STRUCTURAL_KEYS, BenefitsRow, BlockDataError, CART_LINE_ANNOTATION_POINT, CATALOG_BODY_BLOCK, CHECKOUT_FIELD_POINT, CartDrawer, CatalogPage, CategoryShowcase, CheckoutPage, CollectionCta, CollectionHero, ContentPage, CountdownBand, EmailConfirmationRequiredError, EntityListBlock, FaqSection, FiltersPanel, FormBlock, HeroSection, ImageTiles, Link, ManifestoBlock, MediaCarousel, MotifStrip, MyPurchasesPage, NewsletterBand, ORDER_METADATA_POINT, OrderConfirmationPage, OrderTrackingTimeline, PAGE_DATA_SCRIPT_ID, PLACEHOLDER_ASPECTS, PRODUCT_BODY_BLOCK, PRODUCT_CARD_BADGE_POINT, PageDataScope, PaymentTerms, Price, ProductCard, ProductDetailPage, ProductEnquiryForm, ProductGallery, ProductGrid, ProductOptionSelector, ProductRail, ProductReviews, ProductSlider, ProductSpecs, ProductSpotlight, PromoBanner, QuantityInput, Reveal, STOREFRONT_COMPONENT_KEYS, STOREFRONT_PAGE_KINDS, STOREFRONT_SLOTS, STORE_BACKEND_PROVIDERS, STORE_COMMERCE_MODES, STORE_DOCUMENT_KIND, STORE_PAYMENT_METHOD_KINDS, STORE_PAYMENT_MODES, STORE_ROUTE_CHROMES, STORE_ROUTE_KINDS, STORE_SECTIONS, STORE_SECTION_NAMES, SealsBand, SearchOverlay, Slot, SmoothImage, StepsSection, StorefrontConfigHost, StorefrontConfigProvider, StorefrontFooter, StorefrontHeader, StorefrontPage, StorefrontRouterProvider, StorefrontShell, StorefrontThemeStyle, StoryQuote, THEME_SCALE_FIELDS, THEME_SCALE_VAR_PREFIX, TID, Testimonials, TierCards, applyStoreSettings, bannerPlaceholder, blockInstanceId, buildEnquiryFromForm, checkPageBlocks, collectDataNeeds, collectOrderMetadata, contentPagePath, createStorefront, createStorefrontApp, currentStaticRenderPass, defaultPageBlocks, entityListBlockMeta, establishCustomerSession, exportStore, formatMoney, formatProductOptionSelection, getCartLineAnnotations, getCheckoutFieldContributions, getCustomerAuthAdapter, getProductCardBadges, getProductOptionGroups, hydrateStoreDocument, hydratedEntriesFor, initStorefrontRuntime, isJsonValue, isKnownPath, isNestedBlockRef, isPublicPath, isRecord, listSlots, matchContentPage, matchPath, matchesFacets, mergeCollectionFacet, mergePageTheme, navigateTo, nextMilestone, normalizeProductOptionSelection, orderGalleryImages, overrideComponent, overrideProps, pageSeo, pageThemeSelector, pickProductCardImage, placeStorefrontOrder, prefersReducedMotion, primaryImageUrl, productCardComponentContract, productJsonLd, productOptionSelectionKey, productPlaceholder, productSeo, readHydratedPageData, registerStorefrontBlocks, registerStorefrontEntities, registerStorefrontExtensionPoints, registerStorefrontLoaders, resetPageDiagnostics, resetProductOptionsDeprecationWarnings, resetStorefrontExtensionPoints, resolveAuthAdapter, resolveConfig, resolveDataParams, resolveOverride, resolvePageData, resolvePageDataNeed, resolvePaymentTerms, resolveStorefrontProvider, resolveStorefrontRoute, resolveVariantForSelection, roundCents, routePathParams, runBeforePlaceOrderValve, sectionToJsonSchema, sectionsToBlocks, selectCount, selectDiscountTotal, selectRequiresShipping, selectShipping, selectSubtotal, selectTotal, selectionPrice, serializePageData, shellRouterAdapter, signInByEmail, signOutCustomer, signUpCustomer, slugifyStoreName, storefrontComponentContracts, storefrontPaths, themeToCss, toBlockNodes, toFacetMap, useBlockData, useCartStore, useCatalogStore, useCategories, useDeliveryStore, useDiscountValidator, useEnquiry, useHashPath, useInView, useLoader, useMyOrders, useNavigate, usePopOnChange, useProduct, useProducts, useRoutePath, useRouterAdapter, useScrollToTopOnNavigate, useScrolled, useSessionStore, useSlotContext, useStorefrontActions, useStorefrontConfig, useStorefrontConfigOptional, useStorefrontHead, useStorefrontPage, useStorefrontPageOptional, usedSlots, validateStore, withFacet, withStaticRenderPass };
|
|
11044
|
-
//# sourceMappingURL=chunk-
|
|
11045
|
-
//# sourceMappingURL=chunk-
|
|
11094
|
+
//# sourceMappingURL=chunk-6DWZAAIW.js.map
|
|
11095
|
+
//# sourceMappingURL=chunk-6DWZAAIW.js.map
|