@thorprovider/blocks 0.1.1 → 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 +42 -5
- package/AGENTS.md +1 -1
- package/README.md +94 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/contracts.d.mts +1266 -97
- package/dist/contracts.d.ts +1266 -97
- package/dist/contracts.js +225 -9
- package/dist/contracts.js.map +1 -1
- package/dist/contracts.mjs +207 -10
- package/dist/contracts.mjs.map +1 -1
- package/dist/index.d.mts +756 -96
- package/dist/index.d.ts +756 -96
- package/dist/index.js +5114 -3702
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4939 -3551
- package/dist/index.mjs.map +1 -1
- package/docs/standards/theming.md +32 -5
- package/package.json +2 -2
- package/src/blocks/e-commerce/category-filters/category-filter-2-filter-panel.tsx +136 -93
- package/src/blocks/e-commerce/category-filters/category-filter-2.test.tsx +513 -0
- package/src/blocks/e-commerce/category-filters/category-filter-2.tsx +728 -148
- package/src/blocks/e-commerce/checkout-forms/checkout-confirmation-fulfilment-progress.tsx +14 -8
- package/src/blocks/e-commerce/checkout-forms/checkout-confirmation.test.tsx +136 -0
- package/src/blocks/e-commerce/checkout-forms/checkout-confirmation.tsx +145 -99
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1-order-summary.tsx +215 -102
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1-payment-step.tsx +6 -2
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1-shipping-step.tsx +51 -2
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1.test.tsx +216 -0
- package/src/blocks/e-commerce/checkout-forms/checkout-form-1.tsx +114 -11
- 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/mobile-category-drawer.test.tsx +42 -2
- package/src/blocks/e-commerce/navigation/mobile-category-drawer.tsx +10 -8
- 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-categories/product-category-2.test.tsx +51 -0
- package/src/blocks/e-commerce/product-categories/product-category-2.tsx +56 -36
- 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/product-overview/product-overview-1.test.tsx +182 -0
- package/src/blocks/e-commerce/product-overview/product-overview-1.tsx +298 -129
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-4.test.tsx +229 -0
- package/src/blocks/e-commerce/shopping-carts/shopping-cart-4.tsx +313 -110
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.test.tsx +72 -0
- package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.tsx +20 -1
- package/src/blocks/marketing/footers/footer-section-1.test.tsx +117 -0
- package/src/blocks/marketing/footers/footer-section-1.tsx +46 -9
- 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 +204 -0
- package/src/blocks/marketing/navbars/navbar-4-cart-sheet.tsx +144 -21
- package/src/blocks/marketing/navbars/navbar-4.test.tsx +233 -0
- package/src/blocks/marketing/navbars/navbar-4.tsx +235 -60
- package/src/index.ts +56 -0
- package/src/lib/cart.test.ts +15 -0
- package/src/lib/cart.ts +11 -0
- package/src/lib/contracts-curated.test.ts +207 -0
- package/src/lib/contracts-server-boundary.test.ts +52 -0
- package/src/lib/contracts.ts +234 -6
- package/src/lib/money.test.ts +64 -0
- package/src/lib/money.ts +65 -0
- package/tsup.config.ts +0 -1
- package/vitest.config.ts +9 -1
package/dist/contracts.mjs
CHANGED
|
@@ -1,10 +1,90 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
1
|
// src/lib/contracts.ts
|
|
4
2
|
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
// src/lib/money.ts
|
|
5
|
+
var COMPLETE_FINITE_DECIMAL = /^-?(?:\d+)(?:\.\d+)?$/;
|
|
6
|
+
function isCompleteFiniteDecimal(value) {
|
|
7
|
+
if (typeof value !== "string") return false;
|
|
8
|
+
const trimmed = value.trim();
|
|
9
|
+
if (trimmed === "" || !COMPLETE_FINITE_DECIMAL.test(trimmed)) return false;
|
|
10
|
+
return Number.isFinite(Number(trimmed));
|
|
11
|
+
}
|
|
12
|
+
function isAvailableMoney(money) {
|
|
13
|
+
return !!money && typeof money.currencyCode === "string" && money.currencyCode.trim() !== "" && isCompleteFiniteDecimal(money.amount);
|
|
14
|
+
}
|
|
15
|
+
function formatMoney(money, formatter) {
|
|
16
|
+
if (!isAvailableMoney(money)) return null;
|
|
17
|
+
if (formatter) return formatter(money);
|
|
18
|
+
return new Intl.NumberFormat(void 0, {
|
|
19
|
+
style: "currency",
|
|
20
|
+
currency: money.currencyCode
|
|
21
|
+
}).format(Number(money.amount));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// src/lib/cart.ts
|
|
25
|
+
function resolveAbsoluteQuantity(currentQuantity, delta) {
|
|
26
|
+
return Math.max(1, currentQuantity + delta);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// src/lib/contracts.ts
|
|
5
30
|
var PRODUCT_IMAGE_FALLBACK = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(
|
|
6
31
|
`<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><rect width='100%' height='100%' fill='#e2e8f0'/><g fill='none' stroke='#94a3b8' stroke-width='12' stroke-linecap='round'><path d='M150 300h300M300 150v300'/><path d='M220 230h50M220 300h50M220 370h50'/><path d='M330 230h50M330 300h50M330 370h50'/></g></svg>`
|
|
7
32
|
);
|
|
33
|
+
var moneySchema = z.object({
|
|
34
|
+
amount: z.string(),
|
|
35
|
+
currencyCode: z.string()
|
|
36
|
+
});
|
|
37
|
+
var imageSchema = z.object({
|
|
38
|
+
id: z.string().optional(),
|
|
39
|
+
url: z.string(),
|
|
40
|
+
altText: z.string(),
|
|
41
|
+
width: z.number().optional(),
|
|
42
|
+
height: z.number().optional()
|
|
43
|
+
});
|
|
44
|
+
var selectedOptionSchema = z.object({
|
|
45
|
+
name: z.string(),
|
|
46
|
+
value: z.string()
|
|
47
|
+
});
|
|
48
|
+
var productDetailVariantSchema = z.object({
|
|
49
|
+
id: z.string(),
|
|
50
|
+
title: z.string(),
|
|
51
|
+
sku: z.string().optional(),
|
|
52
|
+
availableForSale: z.boolean(),
|
|
53
|
+
selectedOptions: z.array(selectedOptionSchema),
|
|
54
|
+
/** Omit or null when the backend has no resolved price (purchase disabled). */
|
|
55
|
+
price: moneySchema.nullish(),
|
|
56
|
+
compareAtPrice: moneySchema.optional(),
|
|
57
|
+
image: imageSchema.optional()
|
|
58
|
+
});
|
|
59
|
+
var productDetailProductSchema = z.object({
|
|
60
|
+
id: z.string(),
|
|
61
|
+
handle: z.string().optional(),
|
|
62
|
+
title: z.string(),
|
|
63
|
+
description: z.string().optional(),
|
|
64
|
+
vendor: z.string().optional(),
|
|
65
|
+
options: z.array(z.object({ id: z.string(), name: z.string(), values: z.array(z.string()) })),
|
|
66
|
+
variants: z.array(productDetailVariantSchema),
|
|
67
|
+
images: z.array(imageSchema),
|
|
68
|
+
featuredImage: imageSchema.optional()
|
|
69
|
+
});
|
|
70
|
+
var productOverview1PropsSchema = z.object({
|
|
71
|
+
product: productDetailProductSchema,
|
|
72
|
+
selectedVariantId: z.string().nullable().optional(),
|
|
73
|
+
quantity: z.number().optional(),
|
|
74
|
+
rating: z.object({ value: z.number(), count: z.number() }).optional(),
|
|
75
|
+
deliveryEstimate: z.string().optional(),
|
|
76
|
+
shipping: moneySchema.optional(),
|
|
77
|
+
sizesLabel: z.string().optional(),
|
|
78
|
+
variantLabel: z.string().optional(),
|
|
79
|
+
reviewsLabel: z.string().optional(),
|
|
80
|
+
addToCartLabel: z.string().optional(),
|
|
81
|
+
outOfStockLabel: z.string().optional(),
|
|
82
|
+
unavailablePriceLabel: z.string().optional(),
|
|
83
|
+
selectVariantLabel: z.string().optional(),
|
|
84
|
+
quantityLabel: z.string().optional(),
|
|
85
|
+
deliveryEstimateLabel: z.string().optional(),
|
|
86
|
+
shippingLabel: z.string().optional()
|
|
87
|
+
});
|
|
8
88
|
var cardProductSchema = z.object({
|
|
9
89
|
id: z.union([z.string(), z.number()]),
|
|
10
90
|
title: z.string(),
|
|
@@ -18,8 +98,20 @@ var cartItemSchema = z.object({
|
|
|
18
98
|
name: z.string(),
|
|
19
99
|
price: z.number(),
|
|
20
100
|
quantity: z.number().int().min(0),
|
|
21
|
-
|
|
22
|
-
|
|
101
|
+
/** Optional; absent images are omitted, never serialized as `""`. */
|
|
102
|
+
image: z.string().optional(),
|
|
103
|
+
variant: z.string().optional(),
|
|
104
|
+
/** Canonical backend per-unit price, preferred for display when present. */
|
|
105
|
+
unitPrice: moneySchema.optional(),
|
|
106
|
+
/** Canonical backend line total, preferred over `price * quantity`. */
|
|
107
|
+
lineTotal: moneySchema.optional()
|
|
108
|
+
});
|
|
109
|
+
var cartTotalsSchema = z.object({
|
|
110
|
+
subtotal: moneySchema,
|
|
111
|
+
discount: moneySchema.optional(),
|
|
112
|
+
tax: moneySchema.optional(),
|
|
113
|
+
shipping: moneySchema.optional(),
|
|
114
|
+
total: moneySchema
|
|
23
115
|
});
|
|
24
116
|
var recentlyViewedItemSchema = z.object({
|
|
25
117
|
id: z.string(),
|
|
@@ -50,15 +142,16 @@ var utilityLinkSchema = z.object({
|
|
|
50
142
|
var navCartItemSchema = z.object({
|
|
51
143
|
id: z.string(),
|
|
52
144
|
name: z.string(),
|
|
53
|
-
variant: z.string(),
|
|
145
|
+
variant: z.string().optional(),
|
|
54
146
|
price: z.number(),
|
|
55
147
|
qty: z.number().int().min(0),
|
|
56
|
-
|
|
148
|
+
/** Optional; absent images are omitted, never serialized as `""`. */
|
|
149
|
+
image: z.string().optional()
|
|
57
150
|
});
|
|
58
151
|
var storeUserSchema = z.object({
|
|
59
152
|
name: z.string(),
|
|
60
153
|
email: z.string(),
|
|
61
|
-
avatar: z.string(),
|
|
154
|
+
avatar: z.string().optional(),
|
|
62
155
|
initials: z.string()
|
|
63
156
|
});
|
|
64
157
|
var accountMenuItemSchema = z.object({
|
|
@@ -109,17 +202,53 @@ var productCard1PropsSchema = z.object({
|
|
|
109
202
|
heading: z.string().optional(),
|
|
110
203
|
maxItems: z.number().int().positive().optional()
|
|
111
204
|
});
|
|
205
|
+
var productPresentationSchema = z.object({
|
|
206
|
+
id: z.union([z.string(), z.number()]),
|
|
207
|
+
title: z.string(),
|
|
208
|
+
/** Omitted (never `""`) when the backend has no image. */
|
|
209
|
+
image: z.string().optional(),
|
|
210
|
+
imageAlt: z.string().optional(),
|
|
211
|
+
/** Product destination; omitted when unknown. */
|
|
212
|
+
href: z.string().optional(),
|
|
213
|
+
price: moneySchema,
|
|
214
|
+
/** Comparison ("was") price; rendered only when valid and higher than `price`. */
|
|
215
|
+
compareAtPrice: moneySchema.optional(),
|
|
216
|
+
/** Only from real evidence; omitted otherwise (never fabricated). */
|
|
217
|
+
rating: z.number().optional(),
|
|
218
|
+
badge: z.string().optional()
|
|
219
|
+
});
|
|
220
|
+
var productShowcase1PropsSchema = z.object({
|
|
221
|
+
products: z.array(productPresentationSchema),
|
|
222
|
+
heading: z.string().optional(),
|
|
223
|
+
description: z.string().optional(),
|
|
224
|
+
pageSize: z.number().int().positive().optional(),
|
|
225
|
+
prevLabel: z.string().optional(),
|
|
226
|
+
nextLabel: z.string().optional(),
|
|
227
|
+
pageLabel: z.string().optional(),
|
|
228
|
+
unavailablePriceLabel: z.string().optional(),
|
|
229
|
+
emptyLabel: z.string().optional(),
|
|
230
|
+
addToCartLabel: z.string().optional()
|
|
231
|
+
});
|
|
112
232
|
var shoppingCart4PropsSchema = z.object({
|
|
113
233
|
items: z.array(cartItemSchema),
|
|
114
234
|
promotions: z.array(promotionSchema).default([]),
|
|
115
235
|
recentlyViewed: z.array(recentlyViewedItemSchema).optional(),
|
|
236
|
+
/** Backend-authoritative totals; rendered verbatim, never computed locally. */
|
|
237
|
+
totals: cartTotalsSchema.optional(),
|
|
238
|
+
totalsState: z.enum(["idle", "pending", "error"]).optional(),
|
|
239
|
+
totalsErrorLabel: z.string().optional(),
|
|
240
|
+
totalsUnavailableLabel: z.string().optional(),
|
|
241
|
+
amountUnavailableLabel: z.string().optional(),
|
|
242
|
+
retryLabel: z.string().optional(),
|
|
116
243
|
taxRate: z.number().optional(),
|
|
117
244
|
titleLabel: z.string().optional(),
|
|
118
245
|
subtotalLabel: z.string().optional(),
|
|
246
|
+
discountLabel: z.string().optional(),
|
|
119
247
|
taxLabel: z.string().optional(),
|
|
120
248
|
shippingLabel: z.string().optional(),
|
|
121
249
|
shippingFreeLabel: z.string().optional(),
|
|
122
250
|
totalLabel: z.string().optional(),
|
|
251
|
+
totalsPendingLabel: z.string().optional(),
|
|
123
252
|
awayFromLabel: z.string().optional(),
|
|
124
253
|
activatedLabel: z.string().optional(),
|
|
125
254
|
itemsLabel: z.string().optional(),
|
|
@@ -133,32 +262,100 @@ var shoppingCart4PropsSchema = z.object({
|
|
|
133
262
|
expandLabel: z.string().optional(),
|
|
134
263
|
checkoutLabel: z.string().optional(),
|
|
135
264
|
quickCheckoutLabel: z.string().optional(),
|
|
136
|
-
checkoutNowLabel: z.string().optional()
|
|
265
|
+
checkoutNowLabel: z.string().optional(),
|
|
266
|
+
emptyLabel: z.string().optional(),
|
|
267
|
+
removeLabel: z.string().optional(),
|
|
268
|
+
decreaseLabel: z.string().optional(),
|
|
269
|
+
increaseLabel: z.string().optional()
|
|
270
|
+
});
|
|
271
|
+
var logoAccentSchema = z.object({
|
|
272
|
+
text: z.string(),
|
|
273
|
+
className: z.string().optional()
|
|
274
|
+
});
|
|
275
|
+
var brandAccentSchema = z.object({
|
|
276
|
+
text: z.string(),
|
|
277
|
+
className: z.string().optional()
|
|
278
|
+
});
|
|
279
|
+
var heroImageSchema = z.object({
|
|
280
|
+
src: z.string(),
|
|
281
|
+
alt: z.string()
|
|
137
282
|
});
|
|
138
283
|
var navbar4PropsSchema = z.object({
|
|
139
284
|
storeCategories: z.array(storeCategorySchema),
|
|
140
|
-
shippingNote: z.string(),
|
|
285
|
+
shippingNote: z.string().optional(),
|
|
141
286
|
utilityLinks: z.array(utilityLinkSchema),
|
|
142
287
|
logoText: z.string(),
|
|
143
288
|
logoHref: z.string().optional(),
|
|
289
|
+
/** Optional accent for a trailing segment of `logoText`; omitted → unchanged. */
|
|
290
|
+
logoAccent: logoAccentSchema.optional(),
|
|
291
|
+
/**
|
|
292
|
+
* Consumer-supplied classes merged onto the block's outer surface as the
|
|
293
|
+
* final argument (e.g. a semantic surface token). Omitted → unchanged.
|
|
294
|
+
*/
|
|
295
|
+
className: z.string().optional(),
|
|
144
296
|
accountHref: z.string().optional(),
|
|
145
297
|
searchQuery: z.string().optional(),
|
|
146
298
|
items: z.array(navCartItemSchema).optional(),
|
|
299
|
+
/** Authoritative backend subtotal for the mini-cart. */
|
|
300
|
+
subtotal: moneySchema.optional(),
|
|
301
|
+
subtotalUnavailableLabel: z.string().optional(),
|
|
147
302
|
user: storeUserSchema.optional(),
|
|
148
|
-
accountMenuItems: z.array(accountMenuItemSchema).optional()
|
|
303
|
+
accountMenuItems: z.array(accountMenuItemSchema).optional(),
|
|
304
|
+
accountPending: z.boolean().optional(),
|
|
305
|
+
accountUnavailable: z.boolean().optional()
|
|
306
|
+
});
|
|
307
|
+
var ctaSchema = z.object({
|
|
308
|
+
label: z.string(),
|
|
309
|
+
href: z.string().optional()
|
|
310
|
+
});
|
|
311
|
+
var faqItemSchema = z.object({
|
|
312
|
+
value: z.string(),
|
|
313
|
+
question: z.string(),
|
|
314
|
+
answer: z.string()
|
|
315
|
+
});
|
|
316
|
+
var faqBlock1PropsSchema = z.object({
|
|
317
|
+
items: z.array(faqItemSchema),
|
|
318
|
+
title: z.string().optional(),
|
|
319
|
+
description: z.string().optional(),
|
|
320
|
+
accordionType: z.enum(["single", "multiple"]).optional()
|
|
321
|
+
});
|
|
322
|
+
var ctaSection1PropsSchema = z.object({
|
|
323
|
+
badgeText: z.string().optional(),
|
|
324
|
+
title: z.string().optional(),
|
|
325
|
+
description: z.string().optional(),
|
|
326
|
+
primaryCta: ctaSchema.optional(),
|
|
327
|
+
secondaryCta: ctaSchema.optional()
|
|
149
328
|
});
|
|
150
329
|
export {
|
|
151
330
|
PRODUCT_IMAGE_FALLBACK,
|
|
152
331
|
accountMenuItemSchema,
|
|
332
|
+
brandAccentSchema,
|
|
153
333
|
buttonPropsSchema,
|
|
154
334
|
cardProductSchema,
|
|
155
335
|
cartItemSchema,
|
|
336
|
+
cartTotalsSchema,
|
|
337
|
+
ctaSchema,
|
|
338
|
+
ctaSection1PropsSchema,
|
|
339
|
+
faqBlock1PropsSchema,
|
|
340
|
+
faqItemSchema,
|
|
341
|
+
formatMoney,
|
|
342
|
+
heroImageSchema,
|
|
343
|
+
isAvailableMoney,
|
|
344
|
+
isCompleteFiniteDecimal,
|
|
345
|
+
logoAccentSchema,
|
|
346
|
+
moneySchema,
|
|
156
347
|
navCartItemSchema,
|
|
157
348
|
navbar4PropsSchema,
|
|
158
349
|
paymentMethodSchema,
|
|
159
350
|
productCard1PropsSchema,
|
|
351
|
+
productDetailProductSchema,
|
|
352
|
+
productDetailVariantSchema,
|
|
353
|
+
productOverview1PropsSchema,
|
|
354
|
+
productPresentationSchema,
|
|
355
|
+
productShowcase1PropsSchema,
|
|
160
356
|
promotionSchema,
|
|
161
357
|
recentlyViewedItemSchema,
|
|
358
|
+
resolveAbsoluteQuantity,
|
|
162
359
|
shoppingCart4PropsSchema,
|
|
163
360
|
storeCategorySchema,
|
|
164
361
|
storeContainer1PropsSchema,
|
package/dist/contracts.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/contracts.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { Money, PaymentMethod, ProductPreview } from '@thorprovider/types'\n\n/**\n * Serialization contracts for spec-driven storefronts.\n *\n * These Zod schemas are the *serializable subset* of what a spec may write for\n * a block. The component keeps its rich React interface; the catalog/registry\n * is the adapter that maps these props to real component props and binds\n * callbacks (see storefronts-on-blocks design D3). `z.infer` is the typed\n * boundary between spec and catalog — a prop outside the schema is a compile\n * error, not a runtime surprise.\n *\n * Data shapes are projections of the @thorprovider/types canon so that\n * @thorprovider/adapters output validates without conflict:\n * - Prices are plain numbers here while the canon `Money` is a decimal string\n * ({ amount: \"45.00\", currencyCode }). The projection happens at the\n * loader boundary.\n * - Blocks use `title` while the canon `ProductPreview` uses `name`. Reconcile\n * via the canonical aliases below or the catalog/loader adapter.\n */\nexport type CanonMoney = Money\nexport type CanonProduct = ProductPreview\n\n/**\n * Fallback data-URI for required image fields when the data source has no\n * image. Image fields are non-optional `z.string()` in these contracts, so the\n * boundary must never emit `\"\"` (React warns about `src=\"\"`); it must emit a\n * real, renderable value. Hosts may override with their own branded fallback\n * (e.g. electrostore's `CATEGORY_IMAGE_FALLBACK`), but blocks ship a neutral\n * one so direct consumers are safe by default.\n */\nexport const PRODUCT_IMAGE_FALLBACK =\n 'data:image/svg+xml;charset=utf-8,' +\n encodeURIComponent(\n `<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><rect width='100%' height='100%' fill='#e2e8f0'/><g fill='none' stroke='#94a3b8' stroke-width='12' stroke-linecap='round'><path d='M150 300h300M300 150v300'/><path d='M220 230h50M220 300h50M220 370h50'/><path d='M330 230h50M330 300h50M330 370h50'/></g></svg>`,\n )\n\n// ---------------------------------------------------------------------------\n// Data contracts\n// ---------------------------------------------------------------------------\n\nexport const cardProductSchema = z.object({\n id: z.union([z.string(), z.number()]),\n title: z.string(),\n price: z.number(),\n originalPrice: z.number().optional(),\n image: z.string(),\n badge: z.string().optional(),\n})\nexport type CardProduct = z.infer<typeof cardProductSchema>\n\nexport const cartItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n quantity: z.number().int().min(0),\n image: z.string(),\n variant: z.string().optional(),\n})\nexport type CartItem = z.infer<typeof cartItemSchema>\n\nexport const recentlyViewedItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n image: z.string(),\n})\nexport type RecentlyViewedItem = z.infer<typeof recentlyViewedItemSchema>\n\nexport const promotionSchema = z.object({\n threshold: z.number(),\n reward: z.string(),\n icon: z.string().default('gift'),\n})\nexport type Promotion = z.infer<typeof promotionSchema>\n\nconst storeCategoryBase = {\n label: z.string(),\n href: z.string(),\n emphasis: z.boolean().optional(),\n}\n\nexport const storeCategorySchema: z.ZodType<StoreCategory> = z.lazy(() =>\n z.object({\n ...storeCategoryBase,\n children: z.array(storeCategorySchema).optional(),\n }),\n)\nexport type StoreCategory = {\n label: string\n href: string\n children?: StoreCategory[]\n emphasis?: boolean\n}\n\nexport const utilityLinkSchema = z.object({\n label: z.string(),\n href: z.string(),\n})\nexport type UtilityLink = z.infer<typeof utilityLinkSchema>\n\nexport const navCartItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n variant: z.string(),\n price: z.number(),\n qty: z.number().int().min(0),\n image: z.string(),\n})\nexport type NavCartItem = z.infer<typeof navCartItemSchema>\n\nexport const storeUserSchema = z.object({\n name: z.string(),\n email: z.string(),\n avatar: z.string(),\n initials: z.string(),\n})\nexport type StoreUser = z.infer<typeof storeUserSchema>\n\nexport const accountMenuItemSchema = z.object({\n label: z.string(),\n href: z.string(),\n description: z.string().optional(),\n icon: z.enum(['orders', 'wishlist', 'addresses', 'settings']).optional(),\n})\nexport type AccountMenuItem = z.infer<typeof accountMenuItemSchema>\n\n/**\n * Serialization contract for a payment method offered at checkout.\n *\n * A projection of `@thorprovider/types` `PaymentMethod` — the storefront-facing\n * shape produced by the adapters transform. Checkout blocks render the method\n * list from this data instead of hardcoding providers.\n */\nexport const paymentMethodSchema: z.ZodType<PaymentMethod> = z.object({\n id: z.string(),\n name: z.string(),\n type: z.enum([\n 'card',\n 'wallet',\n 'bank_transfer',\n 'buy_now_pay_later',\n 'cash_on_delivery',\n 'crypto',\n 'other',\n ]),\n isEnabled: z.boolean(),\n requiresSetup: z.boolean(),\n description: z.string().optional(),\n metadata: z.record(z.string(), z.unknown()).optional(),\n features: z\n .object({\n saveForLater: z.boolean().optional(),\n requires3DS: z.boolean().optional(),\n supportsRefunds: z.boolean().optional(),\n minAmount: z.number().optional(),\n maxAmount: z.number().optional(),\n supportedCurrencies: z.array(z.string()).optional(),\n requiresVerification: z.boolean().optional(),\n })\n .optional(),\n logo: z.string().optional(),\n})\n\n// ---------------------------------------------------------------------------\n// Block prop schemas\n// ---------------------------------------------------------------------------\n\nexport const buttonPropsSchema = z.object({\n variant: z\n .enum(['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'])\n .optional(),\n size: z\n .enum(['default', 'xs', 'sm', 'lg', 'icon', 'icon-xs', 'icon-sm', 'icon-lg'])\n .optional(),\n disabled: z.boolean().optional(),\n className: z.string().optional(),\n})\nexport type ButtonSpecProps = z.infer<typeof buttonPropsSchema>\n\nexport const storeContainer1PropsSchema = z.object({\n size: z.enum(['default', 'narrow', 'wide', 'full']).optional(),\n className: z.string().optional(),\n})\nexport type StoreContainer1SpecProps = z.infer<typeof storeContainer1PropsSchema>\n\nexport const productCard1PropsSchema = z.object({\n products: z.array(cardProductSchema),\n heading: z.string().optional(),\n maxItems: z.number().int().positive().optional(),\n})\nexport type ProductCard1SpecProps = z.infer<typeof productCard1PropsSchema>\n\nexport const shoppingCart4PropsSchema = z.object({\n items: z.array(cartItemSchema),\n promotions: z.array(promotionSchema).default([]),\n recentlyViewed: z.array(recentlyViewedItemSchema).optional(),\n taxRate: z.number().optional(),\n titleLabel: z.string().optional(),\n subtotalLabel: z.string().optional(),\n taxLabel: z.string().optional(),\n shippingLabel: z.string().optional(),\n shippingFreeLabel: z.string().optional(),\n totalLabel: z.string().optional(),\n awayFromLabel: z.string().optional(),\n activatedLabel: z.string().optional(),\n itemsLabel: z.string().optional(),\n expressCheckoutLabel: z.string().optional(),\n expressLabel: z.string().optional(),\n standardLabel: z.string().optional(),\n estimatedDeliveryLabel: z.string().optional(),\n secureCheckoutLabel: z.string().optional(),\n recentlyViewedLabel: z.string().optional(),\n collapseLabel: z.string().optional(),\n expandLabel: z.string().optional(),\n checkoutLabel: z.string().optional(),\n quickCheckoutLabel: z.string().optional(),\n checkoutNowLabel: z.string().optional(),\n})\nexport type ShoppingCart4SpecProps = z.infer<typeof shoppingCart4PropsSchema>\n\nexport const navbar4PropsSchema = z.object({\n storeCategories: z.array(storeCategorySchema),\n shippingNote: z.string(),\n utilityLinks: z.array(utilityLinkSchema),\n logoText: z.string(),\n logoHref: z.string().optional(),\n accountHref: z.string().optional(),\n searchQuery: z.string().optional(),\n items: z.array(navCartItemSchema).optional(),\n user: storeUserSchema.optional(),\n accountMenuItems: z.array(accountMenuItemSchema).optional(),\n})\nexport type Navbar4SpecProps = z.infer<typeof navbar4PropsSchema>"],"mappings":";;;AAAA,SAAS,SAAS;AAgCX,IAAM,yBACX,sCACA;AAAA,EACE;AACF;AAMK,IAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,IAAI,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC;AAAA,EACpC,OAAO,EAAE,OAAO;AAAA,EAChB,OAAO,EAAE,OAAO;AAAA,EAChB,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,OA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C,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,gBAAgB,EAAE,OAAO,EAAE,SAAS;AAAA,EACpC,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,sBAAsB,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1C,cAAc,EAAE,OAAO,EAAE,SAAS;AAAA,EAClC,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,wBAAwB,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5C,qBAAqB,EAAE,OAAO,EAAE,SAAS;AAAA,EACzC,qBAAqB,EAAE,OAAO,EAAE,SAAS;AAAA,EACzC,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAAA,EACxC,kBAAkB,EAAE,OAAO,EAAE,SAAS;AACxC,CAAC;AAGM,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,iBAAiB,EAAE,MAAM,mBAAmB;AAAA,EAC5C,cAAc,EAAE,OAAO;AAAA,EACvB,cAAc,EAAE,MAAM,iBAAiB;AAAA,EACvC,UAAU,EAAE,OAAO;AAAA,EACnB,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,OAAO,EAAE,MAAM,iBAAiB,EAAE,SAAS;AAAA,EAC3C,MAAM,gBAAgB,SAAS;AAAA,EAC/B,kBAAkB,EAAE,MAAM,qBAAqB,EAAE,SAAS;AAC5D,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/lib/contracts.ts","../src/lib/money.ts","../src/lib/cart.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { Money, PaymentMethod, ProductPreview } from '@thorprovider/types'\n\n/**\n * Serialization contracts for spec-driven storefronts.\n *\n * These Zod schemas are the *serializable subset* of what a spec may write for\n * a block. The component keeps its rich React interface; the catalog/registry\n * is the adapter that maps these props to real component props and binds\n * callbacks (see storefronts-on-blocks design D3). `z.infer` is the typed\n * boundary between spec and catalog — a prop outside the schema is a compile\n * error, not a runtime surprise.\n *\n * Data shapes are projections of the @thorprovider/types canon so that\n * @thorprovider/adapters output validates without conflict:\n * - Prices are plain numbers here while the canon `Money` is a decimal string\n * ({ amount: \"45.00\", currencyCode }). The projection happens at the\n * loader boundary.\n * - Blocks use `title` while the canon `ProductPreview` uses `name`. Reconcile\n * via the canonical aliases below or the catalog/loader adapter.\n */\nexport type CanonMoney = Money\nexport type CanonProduct = ProductPreview\n\n/**\n * Fallback data-URI for required image fields when the data source has no\n * image. Image fields are non-optional `z.string()` in these contracts, so the\n * boundary must never emit `\"\"` (React warns about `src=\"\"`); it must emit a\n * real, renderable value. Hosts may override with their own branded fallback\n * (e.g. electrostore's `CATEGORY_IMAGE_FALLBACK`), but blocks ship a neutral\n * one so direct consumers are safe by default.\n */\nexport const PRODUCT_IMAGE_FALLBACK =\n 'data:image/svg+xml;charset=utf-8,' +\n encodeURIComponent(\n `<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><rect width='100%' height='100%' fill='#e2e8f0'/><g fill='none' stroke='#94a3b8' stroke-width='12' stroke-linecap='round'><path d='M150 300h300M300 150v300'/><path d='M220 230h50M220 300h50M220 370h50'/><path d='M330 230h50M330 300h50M330 370h50'/></g></svg>`,\n )\n\n// ---------------------------------------------------------------------------\n// Data contracts\n// ---------------------------------------------------------------------------\n\n/**\n * Canonical `Money` (`@thorprovider/types`): a decimal string in major units\n * (`\"69.99\"`), never cents. A missing price is represented by omitting the\n * field (or `null` on a nullable field), not by an empty string.\n *\n * The amount stays a permissive `z.string()` on purpose: an unresolved backend\n * price may arrive as the canonical sentinel `\"\"`, and tightening the schema\n * would reject the whole view instead of letting the presentation layer render\n * an unavailable state. Validity is enforced at render time by\n * `isAvailableMoney`/`formatMoney` (a `\"\"`/malformed amount never becomes `$0`).\n */\nexport const moneySchema: z.ZodType<Money> = z.object({\n amount: z.string(),\n currencyCode: z.string(),\n})\n\nconst imageSchema = z.object({\n id: z.string().optional(),\n url: z.string(),\n altText: z.string(),\n width: z.number().optional(),\n height: z.number().optional(),\n})\n\nconst selectedOptionSchema = z.object({\n name: z.string(),\n value: z.string(),\n})\n\nexport const productDetailVariantSchema = z.object({\n id: z.string(),\n title: z.string(),\n sku: z.string().optional(),\n availableForSale: z.boolean(),\n selectedOptions: z.array(selectedOptionSchema),\n /** Omit or null when the backend has no resolved price (purchase disabled). */\n price: moneySchema.nullish(),\n compareAtPrice: moneySchema.optional(),\n image: imageSchema.optional(),\n})\nexport type ProductDetailVariantSpec = z.infer<typeof productDetailVariantSchema>\n\nexport const productDetailProductSchema = z.object({\n id: z.string(),\n handle: z.string().optional(),\n title: z.string(),\n description: z.string().optional(),\n vendor: z.string().optional(),\n options: z.array(z.object({ id: z.string(), name: z.string(), values: z.array(z.string()) })),\n variants: z.array(productDetailVariantSchema),\n images: z.array(imageSchema),\n featuredImage: imageSchema.optional(),\n})\nexport type ProductDetailProductSpec = z.infer<typeof productDetailProductSchema>\n\nexport const productOverview1PropsSchema = z.object({\n product: productDetailProductSchema,\n selectedVariantId: z.string().nullable().optional(),\n quantity: z.number().optional(),\n rating: z.object({ value: z.number(), count: z.number() }).optional(),\n deliveryEstimate: z.string().optional(),\n shipping: moneySchema.optional(),\n sizesLabel: z.string().optional(),\n variantLabel: z.string().optional(),\n reviewsLabel: z.string().optional(),\n addToCartLabel: z.string().optional(),\n outOfStockLabel: z.string().optional(),\n unavailablePriceLabel: z.string().optional(),\n selectVariantLabel: z.string().optional(),\n quantityLabel: z.string().optional(),\n deliveryEstimateLabel: z.string().optional(),\n shippingLabel: z.string().optional(),\n})\nexport type ProductOverview1SpecProps = z.infer<typeof productOverview1PropsSchema>\n\nexport const cardProductSchema = z.object({\n id: z.union([z.string(), z.number()]),\n title: z.string(),\n price: z.number(),\n originalPrice: z.number().optional(),\n image: z.string(),\n badge: z.string().optional(),\n})\nexport type CardProduct = z.infer<typeof cardProductSchema>\n\nexport const cartItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n quantity: z.number().int().min(0),\n /** Optional; absent images are omitted, never serialized as `\"\"`. */\n image: z.string().optional(),\n variant: z.string().optional(),\n /** Canonical backend per-unit price, preferred for display when present. */\n unitPrice: moneySchema.optional(),\n /** Canonical backend line total, preferred over `price * quantity`. */\n lineTotal: moneySchema.optional(),\n})\nexport type CartItem = z.infer<typeof cartItemSchema>\n\nexport const cartTotalsSchema = z.object({\n subtotal: moneySchema,\n discount: moneySchema.optional(),\n tax: moneySchema.optional(),\n shipping: moneySchema.optional(),\n total: moneySchema,\n})\nexport type CartTotals = z.infer<typeof cartTotalsSchema>\n\nexport const recentlyViewedItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n price: z.number(),\n image: z.string(),\n})\nexport type RecentlyViewedItem = z.infer<typeof recentlyViewedItemSchema>\n\nexport const promotionSchema = z.object({\n threshold: z.number(),\n reward: z.string(),\n icon: z.string().default('gift'),\n})\nexport type Promotion = z.infer<typeof promotionSchema>\n\nconst storeCategoryBase = {\n label: z.string(),\n href: z.string(),\n emphasis: z.boolean().optional(),\n}\n\nexport const storeCategorySchema: z.ZodType<StoreCategory> = z.lazy(() =>\n z.object({\n ...storeCategoryBase,\n children: z.array(storeCategorySchema).optional(),\n }),\n)\nexport type StoreCategory = {\n label: string\n href: string\n children?: StoreCategory[]\n emphasis?: boolean\n}\n\nexport const utilityLinkSchema = z.object({\n label: z.string(),\n href: z.string(),\n})\nexport type UtilityLink = z.infer<typeof utilityLinkSchema>\n\nexport const navCartItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n variant: z.string().optional(),\n price: z.number(),\n qty: z.number().int().min(0),\n /** Optional; absent images are omitted, never serialized as `\"\"`. */\n image: z.string().optional(),\n})\nexport type NavCartItem = z.infer<typeof navCartItemSchema>\n\nexport const storeUserSchema = z.object({\n name: z.string(),\n email: z.string(),\n avatar: z.string().optional(),\n initials: z.string(),\n})\nexport type StoreUser = z.infer<typeof storeUserSchema>\n\nexport const accountMenuItemSchema = z.object({\n label: z.string(),\n href: z.string(),\n description: z.string().optional(),\n icon: z.enum(['orders', 'wishlist', 'addresses', 'settings']).optional(),\n})\nexport type AccountMenuItem = z.infer<typeof accountMenuItemSchema>\n\n/**\n * Serialization contract for a payment method offered at checkout.\n *\n * A projection of `@thorprovider/types` `PaymentMethod` — the storefront-facing\n * shape produced by the adapters transform. Checkout blocks render the method\n * list from this data instead of hardcoding providers.\n */\nexport const paymentMethodSchema: z.ZodType<PaymentMethod> = z.object({\n id: z.string(),\n name: z.string(),\n type: z.enum([\n 'card',\n 'wallet',\n 'bank_transfer',\n 'buy_now_pay_later',\n 'cash_on_delivery',\n 'crypto',\n 'other',\n ]),\n isEnabled: z.boolean(),\n requiresSetup: z.boolean(),\n description: z.string().optional(),\n metadata: z.record(z.string(), z.unknown()).optional(),\n features: z\n .object({\n saveForLater: z.boolean().optional(),\n requires3DS: z.boolean().optional(),\n supportsRefunds: z.boolean().optional(),\n minAmount: z.number().optional(),\n maxAmount: z.number().optional(),\n supportedCurrencies: z.array(z.string()).optional(),\n requiresVerification: z.boolean().optional(),\n })\n .optional(),\n logo: z.string().optional(),\n})\n\n// ---------------------------------------------------------------------------\n// Block prop schemas\n// ---------------------------------------------------------------------------\n\nexport const buttonPropsSchema = z.object({\n variant: z\n .enum(['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'])\n .optional(),\n size: z\n .enum(['default', 'xs', 'sm', 'lg', 'icon', 'icon-xs', 'icon-sm', 'icon-lg'])\n .optional(),\n disabled: z.boolean().optional(),\n className: z.string().optional(),\n})\nexport type ButtonSpecProps = z.infer<typeof buttonPropsSchema>\n\nexport const storeContainer1PropsSchema = z.object({\n size: z.enum(['default', 'narrow', 'wide', 'full']).optional(),\n className: z.string().optional(),\n})\nexport type StoreContainer1SpecProps = z.infer<typeof storeContainer1PropsSchema>\n\nexport const productCard1PropsSchema = z.object({\n products: z.array(cardProductSchema),\n heading: z.string().optional(),\n maxItems: z.number().int().positive().optional(),\n})\nexport type ProductCard1SpecProps = z.infer<typeof productCard1PropsSchema>\n\n/**\n * Canonical product presentation — the serializable projection a storefront host\n * produces from a canonical `Product` for the merchandising sections. Unlike\n * `cardProductSchema` (legacy, numeric `price`), `price`/`compareAtPrice` carry\n * canonical `Money` (decimal major-unit string + currency code), so the block\n * formats in the shopper's currency and locale and renders a truthful\n * unavailable state instead of `$0`. Optional fields are omitted, never `\"\"`.\n *\n * This contract is additive: `cardProductSchema` and its consumers are\n * unchanged, and a legacy numeric `price` still renders the legacy output.\n */\nexport const productPresentationSchema = z.object({\n id: z.union([z.string(), z.number()]),\n title: z.string(),\n /** Omitted (never `\"\"`) when the backend has no image. */\n image: z.string().optional(),\n imageAlt: z.string().optional(),\n /** Product destination; omitted when unknown. */\n href: z.string().optional(),\n price: moneySchema,\n /** Comparison (\"was\") price; rendered only when valid and higher than `price`. */\n compareAtPrice: moneySchema.optional(),\n /** Only from real evidence; omitted otherwise (never fabricated). */\n rating: z.number().optional(),\n badge: z.string().optional(),\n})\nexport type ProductPresentation = z.infer<typeof productPresentationSchema>\n\n/**\n * Serializable contract for the combined grid-and-carousel product\n * presentation (`ProductShowcase1`). The grid pages are fixed-size, navigated\n * manually (prev/next) with a visible current-page indication; there is no\n * autoplay and no infinite loop. React-only callbacks are excluded.\n */\nexport const productShowcase1PropsSchema = z.object({\n products: z.array(productPresentationSchema),\n heading: z.string().optional(),\n description: z.string().optional(),\n pageSize: z.number().int().positive().optional(),\n prevLabel: z.string().optional(),\n nextLabel: z.string().optional(),\n pageLabel: z.string().optional(),\n unavailablePriceLabel: z.string().optional(),\n emptyLabel: z.string().optional(),\n addToCartLabel: z.string().optional(),\n})\nexport type ProductShowcase1SpecProps = z.infer<typeof productShowcase1PropsSchema>\n\nexport const shoppingCart4PropsSchema = z.object({\n items: z.array(cartItemSchema),\n promotions: z.array(promotionSchema).default([]),\n recentlyViewed: z.array(recentlyViewedItemSchema).optional(),\n /** Backend-authoritative totals; rendered verbatim, never computed locally. */\n totals: cartTotalsSchema.optional(),\n totalsState: z.enum(['idle', 'pending', 'error']).optional(),\n totalsErrorLabel: z.string().optional(),\n totalsUnavailableLabel: z.string().optional(),\n amountUnavailableLabel: z.string().optional(),\n retryLabel: z.string().optional(),\n taxRate: z.number().optional(),\n titleLabel: z.string().optional(),\n subtotalLabel: z.string().optional(),\n discountLabel: z.string().optional(),\n taxLabel: z.string().optional(),\n shippingLabel: z.string().optional(),\n shippingFreeLabel: z.string().optional(),\n totalLabel: z.string().optional(),\n totalsPendingLabel: z.string().optional(),\n awayFromLabel: z.string().optional(),\n activatedLabel: z.string().optional(),\n itemsLabel: z.string().optional(),\n expressCheckoutLabel: z.string().optional(),\n expressLabel: z.string().optional(),\n standardLabel: z.string().optional(),\n estimatedDeliveryLabel: z.string().optional(),\n secureCheckoutLabel: z.string().optional(),\n recentlyViewedLabel: z.string().optional(),\n collapseLabel: z.string().optional(),\n expandLabel: z.string().optional(),\n checkoutLabel: z.string().optional(),\n quickCheckoutLabel: z.string().optional(),\n checkoutNowLabel: z.string().optional(),\n emptyLabel: z.string().optional(),\n removeLabel: z.string().optional(),\n decreaseLabel: z.string().optional(),\n increaseLabel: z.string().optional(),\n})\nexport type ShoppingCart4SpecProps = z.infer<typeof shoppingCart4PropsSchema>\n\n/**\n * Optional brand seams shared by the existing blocks. These mirror the\n * components' optional props as a serializable subset (no React): an accent\n * marks a trailing segment of the wordmark/brand name, and an editorial image\n * is a native `<img>` source. Omitting each keeps the block's current output.\n */\nexport const logoAccentSchema = z.object({\n text: z.string(),\n className: z.string().optional(),\n})\nexport type LogoAccent = z.infer<typeof logoAccentSchema>\n\nexport const brandAccentSchema = z.object({\n text: z.string(),\n className: z.string().optional(),\n})\nexport type BrandAccent = z.infer<typeof brandAccentSchema>\n\nexport const heroImageSchema = z.object({\n src: z.string(),\n alt: z.string(),\n})\nexport type HeroImage = z.infer<typeof heroImageSchema>\n\nexport const navbar4PropsSchema = z.object({\n storeCategories: z.array(storeCategorySchema),\n shippingNote: z.string().optional(),\n utilityLinks: z.array(utilityLinkSchema),\n logoText: z.string(),\n logoHref: z.string().optional(),\n /** Optional accent for a trailing segment of `logoText`; omitted → unchanged. */\n logoAccent: logoAccentSchema.optional(),\n /**\n * Consumer-supplied classes merged onto the block's outer surface as the\n * final argument (e.g. a semantic surface token). Omitted → unchanged.\n */\n className: z.string().optional(),\n accountHref: z.string().optional(),\n searchQuery: z.string().optional(),\n items: z.array(navCartItemSchema).optional(),\n /** Authoritative backend subtotal for the mini-cart. */\n subtotal: moneySchema.optional(),\n subtotalUnavailableLabel: z.string().optional(),\n user: storeUserSchema.optional(),\n accountMenuItems: z.array(accountMenuItemSchema).optional(),\n accountPending: z.boolean().optional(),\n accountUnavailable: z.boolean().optional(),\n})\nexport type Navbar4SpecProps = z.infer<typeof navbar4PropsSchema>\n\n/**\n * Serializable contracts for the two bounded editorial sections (`faq`, `cta`).\n * These are the serializable subset of `FaqBlock1Props`/`CtaSection1Props`: the\n * React-only callbacks (`onPrimaryClick`/`onSecondaryClick`) are intentionally\n * excluded — the catalog adapter binds them (see design D3).\n */\nexport const ctaSchema = z.object({\n label: z.string(),\n href: z.string().optional(),\n})\nexport type CtaSpec = z.infer<typeof ctaSchema>\n\nexport const faqItemSchema = z.object({\n value: z.string(),\n question: z.string(),\n answer: z.string(),\n})\nexport type FaqItemSpec = z.infer<typeof faqItemSchema>\n\nexport const faqBlock1PropsSchema = z.object({\n items: z.array(faqItemSchema),\n title: z.string().optional(),\n description: z.string().optional(),\n accordionType: z.enum(['single', 'multiple']).optional(),\n})\nexport type FaqBlock1SpecProps = z.infer<typeof faqBlock1PropsSchema>\n\nexport const ctaSection1PropsSchema = z.object({\n badgeText: z.string().optional(),\n title: z.string().optional(),\n description: z.string().optional(),\n primaryCta: ctaSchema.optional(),\n secondaryCta: ctaSchema.optional(),\n})\nexport type CtaSection1SpecProps = z.infer<typeof ctaSection1PropsSchema>\n\n// Pure monetary helpers, re-exported from the server-safe contracts entry so a\n// host boundary can validate/format `Money` without importing the React entry.\nexport { isCompleteFiniteDecimal, isAvailableMoney, formatMoney } from './money'\nexport { resolveAbsoluteQuantity } from './cart'\n","import type { Money } from '@thorprovider/types'\n\n/**\n * Pure monetary helpers shared by the curated commerce blocks.\n *\n * Canonical `Money` (`@thorprovider/types`) carries a decimal string in major\n * units (e.g. `\"69.99\"`) — never cents. A missing, invalid, or unresolved\n * amount is *unavailable*, which is a different state from a legitimate `\"0\"`.\n * These helpers keep that distinction in the presentation layer: they validate\n * a complete finite decimal before any display conversion, and they never\n * invent a currency.\n */\n\nconst COMPLETE_FINITE_DECIMAL = /^-?(?:\\d+)(?:\\.\\d+)?$/\n\n/**\n * True only for a complete, finite decimal string (`\"0\"`, `\"69.99\"`, `\"-3.5\"`).\n * Rejects `\"\"`, `\" \"`, `\"1.\"`, `\".5\"`, `\"1e3\"`, `\"abc\"`, and non-strings.\n */\nexport function isCompleteFiniteDecimal(value: unknown): value is string {\n if (typeof value !== 'string') return false\n const trimmed = value.trim()\n if (trimmed === '' || !COMPLETE_FINITE_DECIMAL.test(trimmed)) return false\n return Number.isFinite(Number(trimmed))\n}\n\n/**\n * True when a `Money` value is safe to display and price a purchase with: a\n * complete finite decimal amount and a non-empty currency code. A valid zero\n * (`{ amount: '0', currencyCode: 'USD' }`) is available — zero alone does not\n * make a price unavailable.\n */\nexport function isAvailableMoney(money: Money | null | undefined): money is Money {\n return (\n !!money &&\n typeof money.currencyCode === 'string' &&\n money.currencyCode.trim() !== '' &&\n isCompleteFiniteDecimal(money.amount)\n )\n}\n\n/**\n * Formats a `Money` for display, or `null` when the value is unavailable.\n *\n * This is the safety gate the whole curated surface relies on: an absent or\n * malformed amount (`\"\"`, `\" \"`, `\"abc\"`, a non-string, a missing currency)\n * MUST NOT reach `Intl.NumberFormat`, because `Number(\"\")` is `0` and would\n * render a fake `$0.00` for missing data. A backend-resolved valid zero\n * (`{ amount: \"0\", currencyCode: \"USD\" }`) is available and formats as zero.\n *\n * When no `formatter` is supplied the currency comes from\n * `money.currencyCode`, so no currency is hardcoded. Callers render their own\n * unavailable/pending/recovery state when this returns `null`.\n */\nexport function formatMoney(\n money: Money | null | undefined,\n formatter?: (money: Money) => string,\n): string | null {\n if (!isAvailableMoney(money)) return null\n if (formatter) return formatter(money)\n return new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency: money.currencyCode,\n }).format(Number(money.amount))\n}\n","/**\n * Cart line quantity normalization shared by the curated cart surfaces.\n *\n * The Navbar mini-cart expresses a quantity DELTA while the cart page reports\n * an ABSOLUTE quantity. The boundary normalizes the delta against the\n * authoritative current line quantity (from the backend cart) before mutating;\n * it must never reinterpret one as the other.\n */\nexport function resolveAbsoluteQuantity(currentQuantity: number, delta: number): number {\n return Math.max(1, currentQuantity + delta)\n}\n"],"mappings":";AAAA,SAAS,SAAS;;;ACalB,IAAM,0BAA0B;AAMzB,SAAS,wBAAwB,OAAiC;AACvE,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,QAAM,UAAU,MAAM,KAAK;AAC3B,MAAI,YAAY,MAAM,CAAC,wBAAwB,KAAK,OAAO,EAAG,QAAO;AACrE,SAAO,OAAO,SAAS,OAAO,OAAO,CAAC;AACxC;AAQO,SAAS,iBAAiB,OAAiD;AAChF,SACE,CAAC,CAAC,SACF,OAAO,MAAM,iBAAiB,YAC9B,MAAM,aAAa,KAAK,MAAM,MAC9B,wBAAwB,MAAM,MAAM;AAExC;AAeO,SAAS,YACd,OACA,WACe;AACf,MAAI,CAAC,iBAAiB,KAAK,EAAG,QAAO;AACrC,MAAI,UAAW,QAAO,UAAU,KAAK;AACrC,SAAO,IAAI,KAAK,aAAa,QAAW;AAAA,IACtC,OAAO;AAAA,IACP,UAAU,MAAM;AAAA,EAClB,CAAC,EAAE,OAAO,OAAO,MAA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