@thorprovider/blocks 0.1.2 → 0.1.3
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/.turbo/turbo-build.log +15 -15
- package/.turbo/turbo-test.log +37 -27
- package/README.md +42 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/contracts.d.mts +162 -14
- package/dist/contracts.d.ts +162 -14
- package/dist/contracts.js +36 -3
- package/dist/contracts.js.map +1 -1
- package/dist/contracts.mjs +34 -3
- package/dist/contracts.mjs.map +1 -1
- package/dist/index.d.mts +294 -12
- package/dist/index.d.ts +294 -12
- package/dist/index.js +3577 -2882
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3431 -2750
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/blocks/e-commerce/navigation/back-to-top.test.tsx +27 -0
- package/src/blocks/e-commerce/navigation/back-to-top.tsx +71 -0
- package/src/blocks/e-commerce/navigation/breadcrumb.test.tsx +174 -0
- package/src/blocks/e-commerce/navigation/breadcrumb.tsx +130 -0
- package/src/blocks/e-commerce/navigation/mobile-bottom-nav.test.tsx +74 -0
- package/src/blocks/e-commerce/navigation/mobile-bottom-nav.tsx +78 -0
- package/src/blocks/e-commerce/navigation/skip-to-content.test.tsx +35 -0
- package/src/blocks/e-commerce/navigation/skip-to-content.tsx +37 -0
- package/src/blocks/e-commerce/product-list/product-card-1.test.tsx +88 -0
- package/src/blocks/e-commerce/product-list/product-card-1.tsx +141 -80
- package/src/blocks/e-commerce/product-list/product-showcase-1.test.tsx +78 -0
- package/src/blocks/e-commerce/product-list/product-showcase-1.tsx +277 -0
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-4.test.tsx +92 -0
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-4.tsx +86 -25
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.test.tsx +7 -0
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.tsx +1 -1
- package/src/blocks/marketing/navbars/navbar-4-account-menu.test.tsx +38 -0
- package/src/blocks/marketing/navbars/navbar-4-account-menu.tsx +30 -14
- package/src/blocks/marketing/navbars/navbar-4-cart-sheet.test.tsx +150 -0
- package/src/blocks/marketing/navbars/navbar-4-cart-sheet.tsx +102 -9
- package/src/blocks/marketing/navbars/navbar-4.test.tsx +121 -0
- package/src/blocks/marketing/navbars/navbar-4.tsx +134 -32
- package/src/index.ts +18 -0
- package/src/lib/contracts.ts +53 -3
package/dist/contracts.d.mts
CHANGED
|
@@ -901,18 +901,18 @@ type NavCartItem = z.infer<typeof navCartItemSchema>;
|
|
|
901
901
|
declare const storeUserSchema: z.ZodObject<{
|
|
902
902
|
name: z.ZodString;
|
|
903
903
|
email: z.ZodString;
|
|
904
|
-
avatar: z.ZodString
|
|
904
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
905
905
|
initials: z.ZodString;
|
|
906
906
|
}, "strip", z.ZodTypeAny, {
|
|
907
907
|
name: string;
|
|
908
908
|
email: string;
|
|
909
|
-
avatar: string;
|
|
910
909
|
initials: string;
|
|
910
|
+
avatar?: string | undefined;
|
|
911
911
|
}, {
|
|
912
912
|
name: string;
|
|
913
913
|
email: string;
|
|
914
|
-
avatar: string;
|
|
915
914
|
initials: string;
|
|
915
|
+
avatar?: string | undefined;
|
|
916
916
|
}>;
|
|
917
917
|
type StoreUser = z.infer<typeof storeUserSchema>;
|
|
918
918
|
declare const accountMenuItemSchema: z.ZodObject<{
|
|
@@ -1017,6 +1017,148 @@ declare const productCard1PropsSchema: z.ZodObject<{
|
|
|
1017
1017
|
maxItems?: number | undefined;
|
|
1018
1018
|
}>;
|
|
1019
1019
|
type ProductCard1SpecProps = z.infer<typeof productCard1PropsSchema>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Canonical product presentation — the serializable projection a storefront host
|
|
1022
|
+
* produces from a canonical `Product` for the merchandising sections. Unlike
|
|
1023
|
+
* `cardProductSchema` (legacy, numeric `price`), `price`/`compareAtPrice` carry
|
|
1024
|
+
* canonical `Money` (decimal major-unit string + currency code), so the block
|
|
1025
|
+
* formats in the shopper's currency and locale and renders a truthful
|
|
1026
|
+
* unavailable state instead of `$0`. Optional fields are omitted, never `""`.
|
|
1027
|
+
*
|
|
1028
|
+
* This contract is additive: `cardProductSchema` and its consumers are
|
|
1029
|
+
* unchanged, and a legacy numeric `price` still renders the legacy output.
|
|
1030
|
+
*/
|
|
1031
|
+
declare const productPresentationSchema: z.ZodObject<{
|
|
1032
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
1033
|
+
title: z.ZodString;
|
|
1034
|
+
/** Omitted (never `""`) when the backend has no image. */
|
|
1035
|
+
image: z.ZodOptional<z.ZodString>;
|
|
1036
|
+
imageAlt: z.ZodOptional<z.ZodString>;
|
|
1037
|
+
/** Product destination; omitted when unknown. */
|
|
1038
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1039
|
+
price: z.ZodType<Money, z.ZodTypeDef, Money>;
|
|
1040
|
+
/** Comparison ("was") price; rendered only when valid and higher than `price`. */
|
|
1041
|
+
compareAtPrice: z.ZodOptional<z.ZodType<Money, z.ZodTypeDef, Money>>;
|
|
1042
|
+
/** Only from real evidence; omitted otherwise (never fabricated). */
|
|
1043
|
+
rating: z.ZodOptional<z.ZodNumber>;
|
|
1044
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
1045
|
+
}, "strip", z.ZodTypeAny, {
|
|
1046
|
+
id: string | number;
|
|
1047
|
+
title: string;
|
|
1048
|
+
price: Money;
|
|
1049
|
+
compareAtPrice?: Money | undefined;
|
|
1050
|
+
image?: string | undefined;
|
|
1051
|
+
rating?: number | undefined;
|
|
1052
|
+
badge?: string | undefined;
|
|
1053
|
+
href?: string | undefined;
|
|
1054
|
+
imageAlt?: string | undefined;
|
|
1055
|
+
}, {
|
|
1056
|
+
id: string | number;
|
|
1057
|
+
title: string;
|
|
1058
|
+
price: Money;
|
|
1059
|
+
compareAtPrice?: Money | undefined;
|
|
1060
|
+
image?: string | undefined;
|
|
1061
|
+
rating?: number | undefined;
|
|
1062
|
+
badge?: string | undefined;
|
|
1063
|
+
href?: string | undefined;
|
|
1064
|
+
imageAlt?: string | undefined;
|
|
1065
|
+
}>;
|
|
1066
|
+
type ProductPresentation = z.infer<typeof productPresentationSchema>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Serializable contract for the combined grid-and-carousel product
|
|
1069
|
+
* presentation (`ProductShowcase1`). The grid pages are fixed-size, navigated
|
|
1070
|
+
* manually (prev/next) with a visible current-page indication; there is no
|
|
1071
|
+
* autoplay and no infinite loop. React-only callbacks are excluded.
|
|
1072
|
+
*/
|
|
1073
|
+
declare const productShowcase1PropsSchema: z.ZodObject<{
|
|
1074
|
+
products: z.ZodArray<z.ZodObject<{
|
|
1075
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
1076
|
+
title: z.ZodString;
|
|
1077
|
+
/** Omitted (never `""`) when the backend has no image. */
|
|
1078
|
+
image: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
imageAlt: z.ZodOptional<z.ZodString>;
|
|
1080
|
+
/** Product destination; omitted when unknown. */
|
|
1081
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
price: z.ZodType<Money, z.ZodTypeDef, Money>;
|
|
1083
|
+
/** Comparison ("was") price; rendered only when valid and higher than `price`. */
|
|
1084
|
+
compareAtPrice: z.ZodOptional<z.ZodType<Money, z.ZodTypeDef, Money>>;
|
|
1085
|
+
/** Only from real evidence; omitted otherwise (never fabricated). */
|
|
1086
|
+
rating: z.ZodOptional<z.ZodNumber>;
|
|
1087
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
1088
|
+
}, "strip", z.ZodTypeAny, {
|
|
1089
|
+
id: string | number;
|
|
1090
|
+
title: string;
|
|
1091
|
+
price: Money;
|
|
1092
|
+
compareAtPrice?: Money | undefined;
|
|
1093
|
+
image?: string | undefined;
|
|
1094
|
+
rating?: number | undefined;
|
|
1095
|
+
badge?: string | undefined;
|
|
1096
|
+
href?: string | undefined;
|
|
1097
|
+
imageAlt?: string | undefined;
|
|
1098
|
+
}, {
|
|
1099
|
+
id: string | number;
|
|
1100
|
+
title: string;
|
|
1101
|
+
price: Money;
|
|
1102
|
+
compareAtPrice?: Money | undefined;
|
|
1103
|
+
image?: string | undefined;
|
|
1104
|
+
rating?: number | undefined;
|
|
1105
|
+
badge?: string | undefined;
|
|
1106
|
+
href?: string | undefined;
|
|
1107
|
+
imageAlt?: string | undefined;
|
|
1108
|
+
}>, "many">;
|
|
1109
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
1110
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1111
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
1112
|
+
prevLabel: z.ZodOptional<z.ZodString>;
|
|
1113
|
+
nextLabel: z.ZodOptional<z.ZodString>;
|
|
1114
|
+
pageLabel: z.ZodOptional<z.ZodString>;
|
|
1115
|
+
unavailablePriceLabel: z.ZodOptional<z.ZodString>;
|
|
1116
|
+
emptyLabel: z.ZodOptional<z.ZodString>;
|
|
1117
|
+
addToCartLabel: z.ZodOptional<z.ZodString>;
|
|
1118
|
+
}, "strip", z.ZodTypeAny, {
|
|
1119
|
+
products: {
|
|
1120
|
+
id: string | number;
|
|
1121
|
+
title: string;
|
|
1122
|
+
price: Money;
|
|
1123
|
+
compareAtPrice?: Money | undefined;
|
|
1124
|
+
image?: string | undefined;
|
|
1125
|
+
rating?: number | undefined;
|
|
1126
|
+
badge?: string | undefined;
|
|
1127
|
+
href?: string | undefined;
|
|
1128
|
+
imageAlt?: string | undefined;
|
|
1129
|
+
}[];
|
|
1130
|
+
description?: string | undefined;
|
|
1131
|
+
addToCartLabel?: string | undefined;
|
|
1132
|
+
unavailablePriceLabel?: string | undefined;
|
|
1133
|
+
heading?: string | undefined;
|
|
1134
|
+
pageSize?: number | undefined;
|
|
1135
|
+
prevLabel?: string | undefined;
|
|
1136
|
+
nextLabel?: string | undefined;
|
|
1137
|
+
pageLabel?: string | undefined;
|
|
1138
|
+
emptyLabel?: string | undefined;
|
|
1139
|
+
}, {
|
|
1140
|
+
products: {
|
|
1141
|
+
id: string | number;
|
|
1142
|
+
title: string;
|
|
1143
|
+
price: Money;
|
|
1144
|
+
compareAtPrice?: Money | undefined;
|
|
1145
|
+
image?: string | undefined;
|
|
1146
|
+
rating?: number | undefined;
|
|
1147
|
+
badge?: string | undefined;
|
|
1148
|
+
href?: string | undefined;
|
|
1149
|
+
imageAlt?: string | undefined;
|
|
1150
|
+
}[];
|
|
1151
|
+
description?: string | undefined;
|
|
1152
|
+
addToCartLabel?: string | undefined;
|
|
1153
|
+
unavailablePriceLabel?: string | undefined;
|
|
1154
|
+
heading?: string | undefined;
|
|
1155
|
+
pageSize?: number | undefined;
|
|
1156
|
+
prevLabel?: string | undefined;
|
|
1157
|
+
nextLabel?: string | undefined;
|
|
1158
|
+
pageLabel?: string | undefined;
|
|
1159
|
+
emptyLabel?: string | undefined;
|
|
1160
|
+
}>;
|
|
1161
|
+
type ProductShowcase1SpecProps = z.infer<typeof productShowcase1PropsSchema>;
|
|
1020
1162
|
declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
1021
1163
|
items: z.ZodArray<z.ZodObject<{
|
|
1022
1164
|
id: z.ZodString;
|
|
@@ -1147,6 +1289,7 @@ declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
|
1147
1289
|
icon: string;
|
|
1148
1290
|
}[];
|
|
1149
1291
|
shippingLabel?: string | undefined;
|
|
1292
|
+
emptyLabel?: string | undefined;
|
|
1150
1293
|
recentlyViewed?: {
|
|
1151
1294
|
id: string;
|
|
1152
1295
|
name: string;
|
|
@@ -1187,7 +1330,6 @@ declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
|
1187
1330
|
checkoutLabel?: string | undefined;
|
|
1188
1331
|
quickCheckoutLabel?: string | undefined;
|
|
1189
1332
|
checkoutNowLabel?: string | undefined;
|
|
1190
|
-
emptyLabel?: string | undefined;
|
|
1191
1333
|
removeLabel?: string | undefined;
|
|
1192
1334
|
decreaseLabel?: string | undefined;
|
|
1193
1335
|
increaseLabel?: string | undefined;
|
|
@@ -1203,6 +1345,7 @@ declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
|
1203
1345
|
lineTotal?: Money | undefined;
|
|
1204
1346
|
}[];
|
|
1205
1347
|
shippingLabel?: string | undefined;
|
|
1348
|
+
emptyLabel?: string | undefined;
|
|
1206
1349
|
promotions?: {
|
|
1207
1350
|
threshold: number;
|
|
1208
1351
|
reward: string;
|
|
@@ -1248,7 +1391,6 @@ declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
|
1248
1391
|
checkoutLabel?: string | undefined;
|
|
1249
1392
|
quickCheckoutLabel?: string | undefined;
|
|
1250
1393
|
checkoutNowLabel?: string | undefined;
|
|
1251
|
-
emptyLabel?: string | undefined;
|
|
1252
1394
|
removeLabel?: string | undefined;
|
|
1253
1395
|
decreaseLabel?: string | undefined;
|
|
1254
1396
|
increaseLabel?: string | undefined;
|
|
@@ -1295,7 +1437,7 @@ declare const heroImageSchema: z.ZodObject<{
|
|
|
1295
1437
|
type HeroImage = z.infer<typeof heroImageSchema>;
|
|
1296
1438
|
declare const navbar4PropsSchema: z.ZodObject<{
|
|
1297
1439
|
storeCategories: z.ZodArray<z.ZodType<StoreCategory, z.ZodTypeDef, StoreCategory>, "many">;
|
|
1298
|
-
shippingNote: z.ZodString
|
|
1440
|
+
shippingNote: z.ZodOptional<z.ZodString>;
|
|
1299
1441
|
utilityLinks: z.ZodArray<z.ZodObject<{
|
|
1300
1442
|
label: z.ZodString;
|
|
1301
1443
|
href: z.ZodString;
|
|
@@ -1355,18 +1497,18 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1355
1497
|
user: z.ZodOptional<z.ZodObject<{
|
|
1356
1498
|
name: z.ZodString;
|
|
1357
1499
|
email: z.ZodString;
|
|
1358
|
-
avatar: z.ZodString
|
|
1500
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
1359
1501
|
initials: z.ZodString;
|
|
1360
1502
|
}, "strip", z.ZodTypeAny, {
|
|
1361
1503
|
name: string;
|
|
1362
1504
|
email: string;
|
|
1363
|
-
avatar: string;
|
|
1364
1505
|
initials: string;
|
|
1506
|
+
avatar?: string | undefined;
|
|
1365
1507
|
}, {
|
|
1366
1508
|
name: string;
|
|
1367
1509
|
email: string;
|
|
1368
|
-
avatar: string;
|
|
1369
1510
|
initials: string;
|
|
1511
|
+
avatar?: string | undefined;
|
|
1370
1512
|
}>>;
|
|
1371
1513
|
accountMenuItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1372
1514
|
label: z.ZodString;
|
|
@@ -1384,9 +1526,10 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1384
1526
|
description?: string | undefined;
|
|
1385
1527
|
icon?: "orders" | "wishlist" | "addresses" | "settings" | undefined;
|
|
1386
1528
|
}>, "many">>;
|
|
1529
|
+
accountPending: z.ZodOptional<z.ZodBoolean>;
|
|
1530
|
+
accountUnavailable: z.ZodOptional<z.ZodBoolean>;
|
|
1387
1531
|
}, "strip", z.ZodTypeAny, {
|
|
1388
1532
|
storeCategories: StoreCategory[];
|
|
1389
|
-
shippingNote: string;
|
|
1390
1533
|
utilityLinks: {
|
|
1391
1534
|
label: string;
|
|
1392
1535
|
href: string;
|
|
@@ -1402,6 +1545,7 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1402
1545
|
image?: string | undefined;
|
|
1403
1546
|
variant?: string | undefined;
|
|
1404
1547
|
}[] | undefined;
|
|
1548
|
+
shippingNote?: string | undefined;
|
|
1405
1549
|
logoHref?: string | undefined;
|
|
1406
1550
|
logoAccent?: {
|
|
1407
1551
|
text: string;
|
|
@@ -1413,8 +1557,8 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1413
1557
|
user?: {
|
|
1414
1558
|
name: string;
|
|
1415
1559
|
email: string;
|
|
1416
|
-
avatar: string;
|
|
1417
1560
|
initials: string;
|
|
1561
|
+
avatar?: string | undefined;
|
|
1418
1562
|
} | undefined;
|
|
1419
1563
|
accountMenuItems?: {
|
|
1420
1564
|
label: string;
|
|
@@ -1422,9 +1566,10 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1422
1566
|
description?: string | undefined;
|
|
1423
1567
|
icon?: "orders" | "wishlist" | "addresses" | "settings" | undefined;
|
|
1424
1568
|
}[] | undefined;
|
|
1569
|
+
accountPending?: boolean | undefined;
|
|
1570
|
+
accountUnavailable?: boolean | undefined;
|
|
1425
1571
|
}, {
|
|
1426
1572
|
storeCategories: StoreCategory[];
|
|
1427
|
-
shippingNote: string;
|
|
1428
1573
|
utilityLinks: {
|
|
1429
1574
|
label: string;
|
|
1430
1575
|
href: string;
|
|
@@ -1440,6 +1585,7 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1440
1585
|
image?: string | undefined;
|
|
1441
1586
|
variant?: string | undefined;
|
|
1442
1587
|
}[] | undefined;
|
|
1588
|
+
shippingNote?: string | undefined;
|
|
1443
1589
|
logoHref?: string | undefined;
|
|
1444
1590
|
logoAccent?: {
|
|
1445
1591
|
text: string;
|
|
@@ -1451,8 +1597,8 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1451
1597
|
user?: {
|
|
1452
1598
|
name: string;
|
|
1453
1599
|
email: string;
|
|
1454
|
-
avatar: string;
|
|
1455
1600
|
initials: string;
|
|
1601
|
+
avatar?: string | undefined;
|
|
1456
1602
|
} | undefined;
|
|
1457
1603
|
accountMenuItems?: {
|
|
1458
1604
|
label: string;
|
|
@@ -1460,6 +1606,8 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1460
1606
|
description?: string | undefined;
|
|
1461
1607
|
icon?: "orders" | "wishlist" | "addresses" | "settings" | undefined;
|
|
1462
1608
|
}[] | undefined;
|
|
1609
|
+
accountPending?: boolean | undefined;
|
|
1610
|
+
accountUnavailable?: boolean | undefined;
|
|
1463
1611
|
}>;
|
|
1464
1612
|
type Navbar4SpecProps = z.infer<typeof navbar4PropsSchema>;
|
|
1465
1613
|
/**
|
|
@@ -1581,4 +1729,4 @@ declare const ctaSection1PropsSchema: z.ZodObject<{
|
|
|
1581
1729
|
}>;
|
|
1582
1730
|
type CtaSection1SpecProps = z.infer<typeof ctaSection1PropsSchema>;
|
|
1583
1731
|
|
|
1584
|
-
export { type AccountMenuItem, type BrandAccent, type ButtonSpecProps, type CanonMoney, type CanonProduct, type CardProduct, type CartItem, type CartTotals, type CtaSection1SpecProps, type CtaSpec, type FaqBlock1SpecProps, type FaqItemSpec, type HeroImage, type LogoAccent, type NavCartItem, type Navbar4SpecProps, PRODUCT_IMAGE_FALLBACK, type ProductCard1SpecProps, type ProductDetailProductSpec, type ProductDetailVariantSpec, type ProductOverview1SpecProps, type Promotion, type RecentlyViewedItem, type ShoppingCart4SpecProps, type StoreCategory, type StoreContainer1SpecProps, type StoreUser, type UtilityLink, accountMenuItemSchema, brandAccentSchema, buttonPropsSchema, cardProductSchema, cartItemSchema, cartTotalsSchema, ctaSchema, ctaSection1PropsSchema, faqBlock1PropsSchema, faqItemSchema, formatMoney, heroImageSchema, isAvailableMoney, isCompleteFiniteDecimal, logoAccentSchema, moneySchema, navCartItemSchema, navbar4PropsSchema, paymentMethodSchema, productCard1PropsSchema, productDetailProductSchema, productDetailVariantSchema, productOverview1PropsSchema, promotionSchema, recentlyViewedItemSchema, resolveAbsoluteQuantity, shoppingCart4PropsSchema, storeCategorySchema, storeContainer1PropsSchema, storeUserSchema, utilityLinkSchema };
|
|
1732
|
+
export { type AccountMenuItem, type BrandAccent, type ButtonSpecProps, type CanonMoney, type CanonProduct, type CardProduct, type CartItem, type CartTotals, type CtaSection1SpecProps, type CtaSpec, type FaqBlock1SpecProps, type FaqItemSpec, type HeroImage, type LogoAccent, type NavCartItem, type Navbar4SpecProps, PRODUCT_IMAGE_FALLBACK, type ProductCard1SpecProps, type ProductDetailProductSpec, type ProductDetailVariantSpec, type ProductOverview1SpecProps, type ProductPresentation, type ProductShowcase1SpecProps, type Promotion, type RecentlyViewedItem, type ShoppingCart4SpecProps, type StoreCategory, type StoreContainer1SpecProps, type StoreUser, type UtilityLink, accountMenuItemSchema, brandAccentSchema, buttonPropsSchema, cardProductSchema, cartItemSchema, cartTotalsSchema, ctaSchema, ctaSection1PropsSchema, faqBlock1PropsSchema, faqItemSchema, formatMoney, heroImageSchema, isAvailableMoney, isCompleteFiniteDecimal, logoAccentSchema, moneySchema, navCartItemSchema, navbar4PropsSchema, paymentMethodSchema, productCard1PropsSchema, productDetailProductSchema, productDetailVariantSchema, productOverview1PropsSchema, productPresentationSchema, productShowcase1PropsSchema, promotionSchema, recentlyViewedItemSchema, resolveAbsoluteQuantity, shoppingCart4PropsSchema, storeCategorySchema, storeContainer1PropsSchema, storeUserSchema, utilityLinkSchema };
|
package/dist/contracts.d.ts
CHANGED
|
@@ -901,18 +901,18 @@ type NavCartItem = z.infer<typeof navCartItemSchema>;
|
|
|
901
901
|
declare const storeUserSchema: z.ZodObject<{
|
|
902
902
|
name: z.ZodString;
|
|
903
903
|
email: z.ZodString;
|
|
904
|
-
avatar: z.ZodString
|
|
904
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
905
905
|
initials: z.ZodString;
|
|
906
906
|
}, "strip", z.ZodTypeAny, {
|
|
907
907
|
name: string;
|
|
908
908
|
email: string;
|
|
909
|
-
avatar: string;
|
|
910
909
|
initials: string;
|
|
910
|
+
avatar?: string | undefined;
|
|
911
911
|
}, {
|
|
912
912
|
name: string;
|
|
913
913
|
email: string;
|
|
914
|
-
avatar: string;
|
|
915
914
|
initials: string;
|
|
915
|
+
avatar?: string | undefined;
|
|
916
916
|
}>;
|
|
917
917
|
type StoreUser = z.infer<typeof storeUserSchema>;
|
|
918
918
|
declare const accountMenuItemSchema: z.ZodObject<{
|
|
@@ -1017,6 +1017,148 @@ declare const productCard1PropsSchema: z.ZodObject<{
|
|
|
1017
1017
|
maxItems?: number | undefined;
|
|
1018
1018
|
}>;
|
|
1019
1019
|
type ProductCard1SpecProps = z.infer<typeof productCard1PropsSchema>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Canonical product presentation — the serializable projection a storefront host
|
|
1022
|
+
* produces from a canonical `Product` for the merchandising sections. Unlike
|
|
1023
|
+
* `cardProductSchema` (legacy, numeric `price`), `price`/`compareAtPrice` carry
|
|
1024
|
+
* canonical `Money` (decimal major-unit string + currency code), so the block
|
|
1025
|
+
* formats in the shopper's currency and locale and renders a truthful
|
|
1026
|
+
* unavailable state instead of `$0`. Optional fields are omitted, never `""`.
|
|
1027
|
+
*
|
|
1028
|
+
* This contract is additive: `cardProductSchema` and its consumers are
|
|
1029
|
+
* unchanged, and a legacy numeric `price` still renders the legacy output.
|
|
1030
|
+
*/
|
|
1031
|
+
declare const productPresentationSchema: z.ZodObject<{
|
|
1032
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
1033
|
+
title: z.ZodString;
|
|
1034
|
+
/** Omitted (never `""`) when the backend has no image. */
|
|
1035
|
+
image: z.ZodOptional<z.ZodString>;
|
|
1036
|
+
imageAlt: z.ZodOptional<z.ZodString>;
|
|
1037
|
+
/** Product destination; omitted when unknown. */
|
|
1038
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1039
|
+
price: z.ZodType<Money, z.ZodTypeDef, Money>;
|
|
1040
|
+
/** Comparison ("was") price; rendered only when valid and higher than `price`. */
|
|
1041
|
+
compareAtPrice: z.ZodOptional<z.ZodType<Money, z.ZodTypeDef, Money>>;
|
|
1042
|
+
/** Only from real evidence; omitted otherwise (never fabricated). */
|
|
1043
|
+
rating: z.ZodOptional<z.ZodNumber>;
|
|
1044
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
1045
|
+
}, "strip", z.ZodTypeAny, {
|
|
1046
|
+
id: string | number;
|
|
1047
|
+
title: string;
|
|
1048
|
+
price: Money;
|
|
1049
|
+
compareAtPrice?: Money | undefined;
|
|
1050
|
+
image?: string | undefined;
|
|
1051
|
+
rating?: number | undefined;
|
|
1052
|
+
badge?: string | undefined;
|
|
1053
|
+
href?: string | undefined;
|
|
1054
|
+
imageAlt?: string | undefined;
|
|
1055
|
+
}, {
|
|
1056
|
+
id: string | number;
|
|
1057
|
+
title: string;
|
|
1058
|
+
price: Money;
|
|
1059
|
+
compareAtPrice?: Money | undefined;
|
|
1060
|
+
image?: string | undefined;
|
|
1061
|
+
rating?: number | undefined;
|
|
1062
|
+
badge?: string | undefined;
|
|
1063
|
+
href?: string | undefined;
|
|
1064
|
+
imageAlt?: string | undefined;
|
|
1065
|
+
}>;
|
|
1066
|
+
type ProductPresentation = z.infer<typeof productPresentationSchema>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Serializable contract for the combined grid-and-carousel product
|
|
1069
|
+
* presentation (`ProductShowcase1`). The grid pages are fixed-size, navigated
|
|
1070
|
+
* manually (prev/next) with a visible current-page indication; there is no
|
|
1071
|
+
* autoplay and no infinite loop. React-only callbacks are excluded.
|
|
1072
|
+
*/
|
|
1073
|
+
declare const productShowcase1PropsSchema: z.ZodObject<{
|
|
1074
|
+
products: z.ZodArray<z.ZodObject<{
|
|
1075
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
1076
|
+
title: z.ZodString;
|
|
1077
|
+
/** Omitted (never `""`) when the backend has no image. */
|
|
1078
|
+
image: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
imageAlt: z.ZodOptional<z.ZodString>;
|
|
1080
|
+
/** Product destination; omitted when unknown. */
|
|
1081
|
+
href: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
price: z.ZodType<Money, z.ZodTypeDef, Money>;
|
|
1083
|
+
/** Comparison ("was") price; rendered only when valid and higher than `price`. */
|
|
1084
|
+
compareAtPrice: z.ZodOptional<z.ZodType<Money, z.ZodTypeDef, Money>>;
|
|
1085
|
+
/** Only from real evidence; omitted otherwise (never fabricated). */
|
|
1086
|
+
rating: z.ZodOptional<z.ZodNumber>;
|
|
1087
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
1088
|
+
}, "strip", z.ZodTypeAny, {
|
|
1089
|
+
id: string | number;
|
|
1090
|
+
title: string;
|
|
1091
|
+
price: Money;
|
|
1092
|
+
compareAtPrice?: Money | undefined;
|
|
1093
|
+
image?: string | undefined;
|
|
1094
|
+
rating?: number | undefined;
|
|
1095
|
+
badge?: string | undefined;
|
|
1096
|
+
href?: string | undefined;
|
|
1097
|
+
imageAlt?: string | undefined;
|
|
1098
|
+
}, {
|
|
1099
|
+
id: string | number;
|
|
1100
|
+
title: string;
|
|
1101
|
+
price: Money;
|
|
1102
|
+
compareAtPrice?: Money | undefined;
|
|
1103
|
+
image?: string | undefined;
|
|
1104
|
+
rating?: number | undefined;
|
|
1105
|
+
badge?: string | undefined;
|
|
1106
|
+
href?: string | undefined;
|
|
1107
|
+
imageAlt?: string | undefined;
|
|
1108
|
+
}>, "many">;
|
|
1109
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
1110
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1111
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
1112
|
+
prevLabel: z.ZodOptional<z.ZodString>;
|
|
1113
|
+
nextLabel: z.ZodOptional<z.ZodString>;
|
|
1114
|
+
pageLabel: z.ZodOptional<z.ZodString>;
|
|
1115
|
+
unavailablePriceLabel: z.ZodOptional<z.ZodString>;
|
|
1116
|
+
emptyLabel: z.ZodOptional<z.ZodString>;
|
|
1117
|
+
addToCartLabel: z.ZodOptional<z.ZodString>;
|
|
1118
|
+
}, "strip", z.ZodTypeAny, {
|
|
1119
|
+
products: {
|
|
1120
|
+
id: string | number;
|
|
1121
|
+
title: string;
|
|
1122
|
+
price: Money;
|
|
1123
|
+
compareAtPrice?: Money | undefined;
|
|
1124
|
+
image?: string | undefined;
|
|
1125
|
+
rating?: number | undefined;
|
|
1126
|
+
badge?: string | undefined;
|
|
1127
|
+
href?: string | undefined;
|
|
1128
|
+
imageAlt?: string | undefined;
|
|
1129
|
+
}[];
|
|
1130
|
+
description?: string | undefined;
|
|
1131
|
+
addToCartLabel?: string | undefined;
|
|
1132
|
+
unavailablePriceLabel?: string | undefined;
|
|
1133
|
+
heading?: string | undefined;
|
|
1134
|
+
pageSize?: number | undefined;
|
|
1135
|
+
prevLabel?: string | undefined;
|
|
1136
|
+
nextLabel?: string | undefined;
|
|
1137
|
+
pageLabel?: string | undefined;
|
|
1138
|
+
emptyLabel?: string | undefined;
|
|
1139
|
+
}, {
|
|
1140
|
+
products: {
|
|
1141
|
+
id: string | number;
|
|
1142
|
+
title: string;
|
|
1143
|
+
price: Money;
|
|
1144
|
+
compareAtPrice?: Money | undefined;
|
|
1145
|
+
image?: string | undefined;
|
|
1146
|
+
rating?: number | undefined;
|
|
1147
|
+
badge?: string | undefined;
|
|
1148
|
+
href?: string | undefined;
|
|
1149
|
+
imageAlt?: string | undefined;
|
|
1150
|
+
}[];
|
|
1151
|
+
description?: string | undefined;
|
|
1152
|
+
addToCartLabel?: string | undefined;
|
|
1153
|
+
unavailablePriceLabel?: string | undefined;
|
|
1154
|
+
heading?: string | undefined;
|
|
1155
|
+
pageSize?: number | undefined;
|
|
1156
|
+
prevLabel?: string | undefined;
|
|
1157
|
+
nextLabel?: string | undefined;
|
|
1158
|
+
pageLabel?: string | undefined;
|
|
1159
|
+
emptyLabel?: string | undefined;
|
|
1160
|
+
}>;
|
|
1161
|
+
type ProductShowcase1SpecProps = z.infer<typeof productShowcase1PropsSchema>;
|
|
1020
1162
|
declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
1021
1163
|
items: z.ZodArray<z.ZodObject<{
|
|
1022
1164
|
id: z.ZodString;
|
|
@@ -1147,6 +1289,7 @@ declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
|
1147
1289
|
icon: string;
|
|
1148
1290
|
}[];
|
|
1149
1291
|
shippingLabel?: string | undefined;
|
|
1292
|
+
emptyLabel?: string | undefined;
|
|
1150
1293
|
recentlyViewed?: {
|
|
1151
1294
|
id: string;
|
|
1152
1295
|
name: string;
|
|
@@ -1187,7 +1330,6 @@ declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
|
1187
1330
|
checkoutLabel?: string | undefined;
|
|
1188
1331
|
quickCheckoutLabel?: string | undefined;
|
|
1189
1332
|
checkoutNowLabel?: string | undefined;
|
|
1190
|
-
emptyLabel?: string | undefined;
|
|
1191
1333
|
removeLabel?: string | undefined;
|
|
1192
1334
|
decreaseLabel?: string | undefined;
|
|
1193
1335
|
increaseLabel?: string | undefined;
|
|
@@ -1203,6 +1345,7 @@ declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
|
1203
1345
|
lineTotal?: Money | undefined;
|
|
1204
1346
|
}[];
|
|
1205
1347
|
shippingLabel?: string | undefined;
|
|
1348
|
+
emptyLabel?: string | undefined;
|
|
1206
1349
|
promotions?: {
|
|
1207
1350
|
threshold: number;
|
|
1208
1351
|
reward: string;
|
|
@@ -1248,7 +1391,6 @@ declare const shoppingCart4PropsSchema: z.ZodObject<{
|
|
|
1248
1391
|
checkoutLabel?: string | undefined;
|
|
1249
1392
|
quickCheckoutLabel?: string | undefined;
|
|
1250
1393
|
checkoutNowLabel?: string | undefined;
|
|
1251
|
-
emptyLabel?: string | undefined;
|
|
1252
1394
|
removeLabel?: string | undefined;
|
|
1253
1395
|
decreaseLabel?: string | undefined;
|
|
1254
1396
|
increaseLabel?: string | undefined;
|
|
@@ -1295,7 +1437,7 @@ declare const heroImageSchema: z.ZodObject<{
|
|
|
1295
1437
|
type HeroImage = z.infer<typeof heroImageSchema>;
|
|
1296
1438
|
declare const navbar4PropsSchema: z.ZodObject<{
|
|
1297
1439
|
storeCategories: z.ZodArray<z.ZodType<StoreCategory, z.ZodTypeDef, StoreCategory>, "many">;
|
|
1298
|
-
shippingNote: z.ZodString
|
|
1440
|
+
shippingNote: z.ZodOptional<z.ZodString>;
|
|
1299
1441
|
utilityLinks: z.ZodArray<z.ZodObject<{
|
|
1300
1442
|
label: z.ZodString;
|
|
1301
1443
|
href: z.ZodString;
|
|
@@ -1355,18 +1497,18 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1355
1497
|
user: z.ZodOptional<z.ZodObject<{
|
|
1356
1498
|
name: z.ZodString;
|
|
1357
1499
|
email: z.ZodString;
|
|
1358
|
-
avatar: z.ZodString
|
|
1500
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
1359
1501
|
initials: z.ZodString;
|
|
1360
1502
|
}, "strip", z.ZodTypeAny, {
|
|
1361
1503
|
name: string;
|
|
1362
1504
|
email: string;
|
|
1363
|
-
avatar: string;
|
|
1364
1505
|
initials: string;
|
|
1506
|
+
avatar?: string | undefined;
|
|
1365
1507
|
}, {
|
|
1366
1508
|
name: string;
|
|
1367
1509
|
email: string;
|
|
1368
|
-
avatar: string;
|
|
1369
1510
|
initials: string;
|
|
1511
|
+
avatar?: string | undefined;
|
|
1370
1512
|
}>>;
|
|
1371
1513
|
accountMenuItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1372
1514
|
label: z.ZodString;
|
|
@@ -1384,9 +1526,10 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1384
1526
|
description?: string | undefined;
|
|
1385
1527
|
icon?: "orders" | "wishlist" | "addresses" | "settings" | undefined;
|
|
1386
1528
|
}>, "many">>;
|
|
1529
|
+
accountPending: z.ZodOptional<z.ZodBoolean>;
|
|
1530
|
+
accountUnavailable: z.ZodOptional<z.ZodBoolean>;
|
|
1387
1531
|
}, "strip", z.ZodTypeAny, {
|
|
1388
1532
|
storeCategories: StoreCategory[];
|
|
1389
|
-
shippingNote: string;
|
|
1390
1533
|
utilityLinks: {
|
|
1391
1534
|
label: string;
|
|
1392
1535
|
href: string;
|
|
@@ -1402,6 +1545,7 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1402
1545
|
image?: string | undefined;
|
|
1403
1546
|
variant?: string | undefined;
|
|
1404
1547
|
}[] | undefined;
|
|
1548
|
+
shippingNote?: string | undefined;
|
|
1405
1549
|
logoHref?: string | undefined;
|
|
1406
1550
|
logoAccent?: {
|
|
1407
1551
|
text: string;
|
|
@@ -1413,8 +1557,8 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1413
1557
|
user?: {
|
|
1414
1558
|
name: string;
|
|
1415
1559
|
email: string;
|
|
1416
|
-
avatar: string;
|
|
1417
1560
|
initials: string;
|
|
1561
|
+
avatar?: string | undefined;
|
|
1418
1562
|
} | undefined;
|
|
1419
1563
|
accountMenuItems?: {
|
|
1420
1564
|
label: string;
|
|
@@ -1422,9 +1566,10 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1422
1566
|
description?: string | undefined;
|
|
1423
1567
|
icon?: "orders" | "wishlist" | "addresses" | "settings" | undefined;
|
|
1424
1568
|
}[] | undefined;
|
|
1569
|
+
accountPending?: boolean | undefined;
|
|
1570
|
+
accountUnavailable?: boolean | undefined;
|
|
1425
1571
|
}, {
|
|
1426
1572
|
storeCategories: StoreCategory[];
|
|
1427
|
-
shippingNote: string;
|
|
1428
1573
|
utilityLinks: {
|
|
1429
1574
|
label: string;
|
|
1430
1575
|
href: string;
|
|
@@ -1440,6 +1585,7 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1440
1585
|
image?: string | undefined;
|
|
1441
1586
|
variant?: string | undefined;
|
|
1442
1587
|
}[] | undefined;
|
|
1588
|
+
shippingNote?: string | undefined;
|
|
1443
1589
|
logoHref?: string | undefined;
|
|
1444
1590
|
logoAccent?: {
|
|
1445
1591
|
text: string;
|
|
@@ -1451,8 +1597,8 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1451
1597
|
user?: {
|
|
1452
1598
|
name: string;
|
|
1453
1599
|
email: string;
|
|
1454
|
-
avatar: string;
|
|
1455
1600
|
initials: string;
|
|
1601
|
+
avatar?: string | undefined;
|
|
1456
1602
|
} | undefined;
|
|
1457
1603
|
accountMenuItems?: {
|
|
1458
1604
|
label: string;
|
|
@@ -1460,6 +1606,8 @@ declare const navbar4PropsSchema: z.ZodObject<{
|
|
|
1460
1606
|
description?: string | undefined;
|
|
1461
1607
|
icon?: "orders" | "wishlist" | "addresses" | "settings" | undefined;
|
|
1462
1608
|
}[] | undefined;
|
|
1609
|
+
accountPending?: boolean | undefined;
|
|
1610
|
+
accountUnavailable?: boolean | undefined;
|
|
1463
1611
|
}>;
|
|
1464
1612
|
type Navbar4SpecProps = z.infer<typeof navbar4PropsSchema>;
|
|
1465
1613
|
/**
|
|
@@ -1581,4 +1729,4 @@ declare const ctaSection1PropsSchema: z.ZodObject<{
|
|
|
1581
1729
|
}>;
|
|
1582
1730
|
type CtaSection1SpecProps = z.infer<typeof ctaSection1PropsSchema>;
|
|
1583
1731
|
|
|
1584
|
-
export { type AccountMenuItem, type BrandAccent, type ButtonSpecProps, type CanonMoney, type CanonProduct, type CardProduct, type CartItem, type CartTotals, type CtaSection1SpecProps, type CtaSpec, type FaqBlock1SpecProps, type FaqItemSpec, type HeroImage, type LogoAccent, type NavCartItem, type Navbar4SpecProps, PRODUCT_IMAGE_FALLBACK, type ProductCard1SpecProps, type ProductDetailProductSpec, type ProductDetailVariantSpec, type ProductOverview1SpecProps, type Promotion, type RecentlyViewedItem, type ShoppingCart4SpecProps, type StoreCategory, type StoreContainer1SpecProps, type StoreUser, type UtilityLink, accountMenuItemSchema, brandAccentSchema, buttonPropsSchema, cardProductSchema, cartItemSchema, cartTotalsSchema, ctaSchema, ctaSection1PropsSchema, faqBlock1PropsSchema, faqItemSchema, formatMoney, heroImageSchema, isAvailableMoney, isCompleteFiniteDecimal, logoAccentSchema, moneySchema, navCartItemSchema, navbar4PropsSchema, paymentMethodSchema, productCard1PropsSchema, productDetailProductSchema, productDetailVariantSchema, productOverview1PropsSchema, promotionSchema, recentlyViewedItemSchema, resolveAbsoluteQuantity, shoppingCart4PropsSchema, storeCategorySchema, storeContainer1PropsSchema, storeUserSchema, utilityLinkSchema };
|
|
1732
|
+
export { type AccountMenuItem, type BrandAccent, type ButtonSpecProps, type CanonMoney, type CanonProduct, type CardProduct, type CartItem, type CartTotals, type CtaSection1SpecProps, type CtaSpec, type FaqBlock1SpecProps, type FaqItemSpec, type HeroImage, type LogoAccent, type NavCartItem, type Navbar4SpecProps, PRODUCT_IMAGE_FALLBACK, type ProductCard1SpecProps, type ProductDetailProductSpec, type ProductDetailVariantSpec, type ProductOverview1SpecProps, type ProductPresentation, type ProductShowcase1SpecProps, type Promotion, type RecentlyViewedItem, type ShoppingCart4SpecProps, type StoreCategory, type StoreContainer1SpecProps, type StoreUser, type UtilityLink, accountMenuItemSchema, brandAccentSchema, buttonPropsSchema, cardProductSchema, cartItemSchema, cartTotalsSchema, ctaSchema, ctaSection1PropsSchema, faqBlock1PropsSchema, faqItemSchema, formatMoney, heroImageSchema, isAvailableMoney, isCompleteFiniteDecimal, logoAccentSchema, moneySchema, navCartItemSchema, navbar4PropsSchema, paymentMethodSchema, productCard1PropsSchema, productDetailProductSchema, productDetailVariantSchema, productOverview1PropsSchema, productPresentationSchema, productShowcase1PropsSchema, promotionSchema, recentlyViewedItemSchema, resolveAbsoluteQuantity, shoppingCart4PropsSchema, storeCategorySchema, storeContainer1PropsSchema, storeUserSchema, utilityLinkSchema };
|
package/dist/contracts.js
CHANGED
|
@@ -44,6 +44,8 @@ __export(contracts_exports, {
|
|
|
44
44
|
productDetailProductSchema: () => productDetailProductSchema,
|
|
45
45
|
productDetailVariantSchema: () => productDetailVariantSchema,
|
|
46
46
|
productOverview1PropsSchema: () => productOverview1PropsSchema,
|
|
47
|
+
productPresentationSchema: () => productPresentationSchema,
|
|
48
|
+
productShowcase1PropsSchema: () => productShowcase1PropsSchema,
|
|
47
49
|
promotionSchema: () => promotionSchema,
|
|
48
50
|
recentlyViewedItemSchema: () => recentlyViewedItemSchema,
|
|
49
51
|
resolveAbsoluteQuantity: () => resolveAbsoluteQuantity,
|
|
@@ -206,7 +208,7 @@ var navCartItemSchema = import_zod.z.object({
|
|
|
206
208
|
var storeUserSchema = import_zod.z.object({
|
|
207
209
|
name: import_zod.z.string(),
|
|
208
210
|
email: import_zod.z.string(),
|
|
209
|
-
avatar: import_zod.z.string(),
|
|
211
|
+
avatar: import_zod.z.string().optional(),
|
|
210
212
|
initials: import_zod.z.string()
|
|
211
213
|
});
|
|
212
214
|
var accountMenuItemSchema = import_zod.z.object({
|
|
@@ -257,6 +259,33 @@ var productCard1PropsSchema = import_zod.z.object({
|
|
|
257
259
|
heading: import_zod.z.string().optional(),
|
|
258
260
|
maxItems: import_zod.z.number().int().positive().optional()
|
|
259
261
|
});
|
|
262
|
+
var productPresentationSchema = import_zod.z.object({
|
|
263
|
+
id: import_zod.z.union([import_zod.z.string(), import_zod.z.number()]),
|
|
264
|
+
title: import_zod.z.string(),
|
|
265
|
+
/** Omitted (never `""`) when the backend has no image. */
|
|
266
|
+
image: import_zod.z.string().optional(),
|
|
267
|
+
imageAlt: import_zod.z.string().optional(),
|
|
268
|
+
/** Product destination; omitted when unknown. */
|
|
269
|
+
href: import_zod.z.string().optional(),
|
|
270
|
+
price: moneySchema,
|
|
271
|
+
/** Comparison ("was") price; rendered only when valid and higher than `price`. */
|
|
272
|
+
compareAtPrice: moneySchema.optional(),
|
|
273
|
+
/** Only from real evidence; omitted otherwise (never fabricated). */
|
|
274
|
+
rating: import_zod.z.number().optional(),
|
|
275
|
+
badge: import_zod.z.string().optional()
|
|
276
|
+
});
|
|
277
|
+
var productShowcase1PropsSchema = import_zod.z.object({
|
|
278
|
+
products: import_zod.z.array(productPresentationSchema),
|
|
279
|
+
heading: import_zod.z.string().optional(),
|
|
280
|
+
description: import_zod.z.string().optional(),
|
|
281
|
+
pageSize: import_zod.z.number().int().positive().optional(),
|
|
282
|
+
prevLabel: import_zod.z.string().optional(),
|
|
283
|
+
nextLabel: import_zod.z.string().optional(),
|
|
284
|
+
pageLabel: import_zod.z.string().optional(),
|
|
285
|
+
unavailablePriceLabel: import_zod.z.string().optional(),
|
|
286
|
+
emptyLabel: import_zod.z.string().optional(),
|
|
287
|
+
addToCartLabel: import_zod.z.string().optional()
|
|
288
|
+
});
|
|
260
289
|
var shoppingCart4PropsSchema = import_zod.z.object({
|
|
261
290
|
items: import_zod.z.array(cartItemSchema),
|
|
262
291
|
promotions: import_zod.z.array(promotionSchema).default([]),
|
|
@@ -310,7 +339,7 @@ var heroImageSchema = import_zod.z.object({
|
|
|
310
339
|
});
|
|
311
340
|
var navbar4PropsSchema = import_zod.z.object({
|
|
312
341
|
storeCategories: import_zod.z.array(storeCategorySchema),
|
|
313
|
-
shippingNote: import_zod.z.string(),
|
|
342
|
+
shippingNote: import_zod.z.string().optional(),
|
|
314
343
|
utilityLinks: import_zod.z.array(utilityLinkSchema),
|
|
315
344
|
logoText: import_zod.z.string(),
|
|
316
345
|
logoHref: import_zod.z.string().optional(),
|
|
@@ -328,7 +357,9 @@ var navbar4PropsSchema = import_zod.z.object({
|
|
|
328
357
|
subtotal: moneySchema.optional(),
|
|
329
358
|
subtotalUnavailableLabel: import_zod.z.string().optional(),
|
|
330
359
|
user: storeUserSchema.optional(),
|
|
331
|
-
accountMenuItems: import_zod.z.array(accountMenuItemSchema).optional()
|
|
360
|
+
accountMenuItems: import_zod.z.array(accountMenuItemSchema).optional(),
|
|
361
|
+
accountPending: import_zod.z.boolean().optional(),
|
|
362
|
+
accountUnavailable: import_zod.z.boolean().optional()
|
|
332
363
|
});
|
|
333
364
|
var ctaSchema = import_zod.z.object({
|
|
334
365
|
label: import_zod.z.string(),
|
|
@@ -378,6 +409,8 @@ var ctaSection1PropsSchema = import_zod.z.object({
|
|
|
378
409
|
productDetailProductSchema,
|
|
379
410
|
productDetailVariantSchema,
|
|
380
411
|
productOverview1PropsSchema,
|
|
412
|
+
productPresentationSchema,
|
|
413
|
+
productShowcase1PropsSchema,
|
|
381
414
|
promotionSchema,
|
|
382
415
|
recentlyViewedItemSchema,
|
|
383
416
|
resolveAbsoluteQuantity,
|