@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.
Files changed (70) hide show
  1. package/.turbo/turbo-build.log +15 -15
  2. package/.turbo/turbo-test.log +42 -5
  3. package/AGENTS.md +1 -1
  4. package/README.md +94 -1
  5. package/dist/.tsbuildinfo +1 -1
  6. package/dist/contracts.d.mts +1266 -97
  7. package/dist/contracts.d.ts +1266 -97
  8. package/dist/contracts.js +225 -9
  9. package/dist/contracts.js.map +1 -1
  10. package/dist/contracts.mjs +207 -10
  11. package/dist/contracts.mjs.map +1 -1
  12. package/dist/index.d.mts +756 -96
  13. package/dist/index.d.ts +756 -96
  14. package/dist/index.js +5114 -3702
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.mjs +4939 -3551
  17. package/dist/index.mjs.map +1 -1
  18. package/docs/standards/theming.md +32 -5
  19. package/package.json +2 -2
  20. package/src/blocks/e-commerce/category-filters/category-filter-2-filter-panel.tsx +136 -93
  21. package/src/blocks/e-commerce/category-filters/category-filter-2.test.tsx +513 -0
  22. package/src/blocks/e-commerce/category-filters/category-filter-2.tsx +728 -148
  23. package/src/blocks/e-commerce/checkout-forms/checkout-confirmation-fulfilment-progress.tsx +14 -8
  24. package/src/blocks/e-commerce/checkout-forms/checkout-confirmation.test.tsx +136 -0
  25. package/src/blocks/e-commerce/checkout-forms/checkout-confirmation.tsx +145 -99
  26. package/src/blocks/e-commerce/checkout-forms/checkout-form-1-order-summary.tsx +215 -102
  27. package/src/blocks/e-commerce/checkout-forms/checkout-form-1-payment-step.tsx +6 -2
  28. package/src/blocks/e-commerce/checkout-forms/checkout-form-1-shipping-step.tsx +51 -2
  29. package/src/blocks/e-commerce/checkout-forms/checkout-form-1.test.tsx +216 -0
  30. package/src/blocks/e-commerce/checkout-forms/checkout-form-1.tsx +114 -11
  31. package/src/blocks/e-commerce/navigation/back-to-top.test.tsx +27 -0
  32. package/src/blocks/e-commerce/navigation/back-to-top.tsx +71 -0
  33. package/src/blocks/e-commerce/navigation/breadcrumb.test.tsx +174 -0
  34. package/src/blocks/e-commerce/navigation/breadcrumb.tsx +130 -0
  35. package/src/blocks/e-commerce/navigation/mobile-bottom-nav.test.tsx +74 -0
  36. package/src/blocks/e-commerce/navigation/mobile-bottom-nav.tsx +78 -0
  37. package/src/blocks/e-commerce/navigation/mobile-category-drawer.test.tsx +42 -2
  38. package/src/blocks/e-commerce/navigation/mobile-category-drawer.tsx +10 -8
  39. package/src/blocks/e-commerce/navigation/skip-to-content.test.tsx +35 -0
  40. package/src/blocks/e-commerce/navigation/skip-to-content.tsx +37 -0
  41. package/src/blocks/e-commerce/product-categories/product-category-2.test.tsx +51 -0
  42. package/src/blocks/e-commerce/product-categories/product-category-2.tsx +56 -36
  43. package/src/blocks/e-commerce/product-list/product-card-1.test.tsx +88 -0
  44. package/src/blocks/e-commerce/product-list/product-card-1.tsx +141 -80
  45. package/src/blocks/e-commerce/product-list/product-showcase-1.test.tsx +78 -0
  46. package/src/blocks/e-commerce/product-list/product-showcase-1.tsx +277 -0
  47. package/src/blocks/e-commerce/product-overview/product-overview-1.test.tsx +182 -0
  48. package/src/blocks/e-commerce/product-overview/product-overview-1.tsx +298 -129
  49. package/src/blocks/e-commerce/shopping-carts/shopping-cart-4.test.tsx +229 -0
  50. package/src/blocks/e-commerce/shopping-carts/shopping-cart-4.tsx +313 -110
  51. package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.test.tsx +72 -0
  52. package/src/blocks/e-commerce/storefront-hero/storefront-hero-1.tsx +20 -1
  53. package/src/blocks/marketing/footers/footer-section-1.test.tsx +117 -0
  54. package/src/blocks/marketing/footers/footer-section-1.tsx +46 -9
  55. package/src/blocks/marketing/navbars/navbar-4-account-menu.test.tsx +38 -0
  56. package/src/blocks/marketing/navbars/navbar-4-account-menu.tsx +30 -14
  57. package/src/blocks/marketing/navbars/navbar-4-cart-sheet.test.tsx +204 -0
  58. package/src/blocks/marketing/navbars/navbar-4-cart-sheet.tsx +144 -21
  59. package/src/blocks/marketing/navbars/navbar-4.test.tsx +233 -0
  60. package/src/blocks/marketing/navbars/navbar-4.tsx +235 -60
  61. package/src/index.ts +56 -0
  62. package/src/lib/cart.test.ts +15 -0
  63. package/src/lib/cart.ts +11 -0
  64. package/src/lib/contracts-curated.test.ts +207 -0
  65. package/src/lib/contracts-server-boundary.test.ts +52 -0
  66. package/src/lib/contracts.ts +234 -6
  67. package/src/lib/money.test.ts +64 -0
  68. package/src/lib/money.ts +65 -0
  69. package/tsup.config.ts +0 -1
  70. package/vitest.config.ts +9 -1
package/dist/contracts.js CHANGED
@@ -1,4 +1,3 @@
1
- 'use client';
2
1
  "use strict";
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -23,15 +22,33 @@ var contracts_exports = {};
23
22
  __export(contracts_exports, {
24
23
  PRODUCT_IMAGE_FALLBACK: () => PRODUCT_IMAGE_FALLBACK,
25
24
  accountMenuItemSchema: () => accountMenuItemSchema,
25
+ brandAccentSchema: () => brandAccentSchema,
26
26
  buttonPropsSchema: () => buttonPropsSchema,
27
27
  cardProductSchema: () => cardProductSchema,
28
28
  cartItemSchema: () => cartItemSchema,
29
+ cartTotalsSchema: () => cartTotalsSchema,
30
+ ctaSchema: () => ctaSchema,
31
+ ctaSection1PropsSchema: () => ctaSection1PropsSchema,
32
+ faqBlock1PropsSchema: () => faqBlock1PropsSchema,
33
+ faqItemSchema: () => faqItemSchema,
34
+ formatMoney: () => formatMoney,
35
+ heroImageSchema: () => heroImageSchema,
36
+ isAvailableMoney: () => isAvailableMoney,
37
+ isCompleteFiniteDecimal: () => isCompleteFiniteDecimal,
38
+ logoAccentSchema: () => logoAccentSchema,
39
+ moneySchema: () => moneySchema,
29
40
  navCartItemSchema: () => navCartItemSchema,
30
41
  navbar4PropsSchema: () => navbar4PropsSchema,
31
42
  paymentMethodSchema: () => paymentMethodSchema,
32
43
  productCard1PropsSchema: () => productCard1PropsSchema,
44
+ productDetailProductSchema: () => productDetailProductSchema,
45
+ productDetailVariantSchema: () => productDetailVariantSchema,
46
+ productOverview1PropsSchema: () => productOverview1PropsSchema,
47
+ productPresentationSchema: () => productPresentationSchema,
48
+ productShowcase1PropsSchema: () => productShowcase1PropsSchema,
33
49
  promotionSchema: () => promotionSchema,
34
50
  recentlyViewedItemSchema: () => recentlyViewedItemSchema,
51
+ resolveAbsoluteQuantity: () => resolveAbsoluteQuantity,
35
52
  shoppingCart4PropsSchema: () => shoppingCart4PropsSchema,
36
53
  storeCategorySchema: () => storeCategorySchema,
37
54
  storeContainer1PropsSchema: () => storeContainer1PropsSchema,
@@ -40,9 +57,91 @@ __export(contracts_exports, {
40
57
  });
41
58
  module.exports = __toCommonJS(contracts_exports);
42
59
  var import_zod = require("zod");
60
+
61
+ // src/lib/money.ts
62
+ var COMPLETE_FINITE_DECIMAL = /^-?(?:\d+)(?:\.\d+)?$/;
63
+ function isCompleteFiniteDecimal(value) {
64
+ if (typeof value !== "string") return false;
65
+ const trimmed = value.trim();
66
+ if (trimmed === "" || !COMPLETE_FINITE_DECIMAL.test(trimmed)) return false;
67
+ return Number.isFinite(Number(trimmed));
68
+ }
69
+ function isAvailableMoney(money) {
70
+ return !!money && typeof money.currencyCode === "string" && money.currencyCode.trim() !== "" && isCompleteFiniteDecimal(money.amount);
71
+ }
72
+ function formatMoney(money, formatter) {
73
+ if (!isAvailableMoney(money)) return null;
74
+ if (formatter) return formatter(money);
75
+ return new Intl.NumberFormat(void 0, {
76
+ style: "currency",
77
+ currency: money.currencyCode
78
+ }).format(Number(money.amount));
79
+ }
80
+
81
+ // src/lib/cart.ts
82
+ function resolveAbsoluteQuantity(currentQuantity, delta) {
83
+ return Math.max(1, currentQuantity + delta);
84
+ }
85
+
86
+ // src/lib/contracts.ts
43
87
  var PRODUCT_IMAGE_FALLBACK = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(
44
88
  `<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>`
45
89
  );
90
+ var moneySchema = import_zod.z.object({
91
+ amount: import_zod.z.string(),
92
+ currencyCode: import_zod.z.string()
93
+ });
94
+ var imageSchema = import_zod.z.object({
95
+ id: import_zod.z.string().optional(),
96
+ url: import_zod.z.string(),
97
+ altText: import_zod.z.string(),
98
+ width: import_zod.z.number().optional(),
99
+ height: import_zod.z.number().optional()
100
+ });
101
+ var selectedOptionSchema = import_zod.z.object({
102
+ name: import_zod.z.string(),
103
+ value: import_zod.z.string()
104
+ });
105
+ var productDetailVariantSchema = import_zod.z.object({
106
+ id: import_zod.z.string(),
107
+ title: import_zod.z.string(),
108
+ sku: import_zod.z.string().optional(),
109
+ availableForSale: import_zod.z.boolean(),
110
+ selectedOptions: import_zod.z.array(selectedOptionSchema),
111
+ /** Omit or null when the backend has no resolved price (purchase disabled). */
112
+ price: moneySchema.nullish(),
113
+ compareAtPrice: moneySchema.optional(),
114
+ image: imageSchema.optional()
115
+ });
116
+ var productDetailProductSchema = import_zod.z.object({
117
+ id: import_zod.z.string(),
118
+ handle: import_zod.z.string().optional(),
119
+ title: import_zod.z.string(),
120
+ description: import_zod.z.string().optional(),
121
+ vendor: import_zod.z.string().optional(),
122
+ options: import_zod.z.array(import_zod.z.object({ id: import_zod.z.string(), name: import_zod.z.string(), values: import_zod.z.array(import_zod.z.string()) })),
123
+ variants: import_zod.z.array(productDetailVariantSchema),
124
+ images: import_zod.z.array(imageSchema),
125
+ featuredImage: imageSchema.optional()
126
+ });
127
+ var productOverview1PropsSchema = import_zod.z.object({
128
+ product: productDetailProductSchema,
129
+ selectedVariantId: import_zod.z.string().nullable().optional(),
130
+ quantity: import_zod.z.number().optional(),
131
+ rating: import_zod.z.object({ value: import_zod.z.number(), count: import_zod.z.number() }).optional(),
132
+ deliveryEstimate: import_zod.z.string().optional(),
133
+ shipping: moneySchema.optional(),
134
+ sizesLabel: import_zod.z.string().optional(),
135
+ variantLabel: import_zod.z.string().optional(),
136
+ reviewsLabel: import_zod.z.string().optional(),
137
+ addToCartLabel: import_zod.z.string().optional(),
138
+ outOfStockLabel: import_zod.z.string().optional(),
139
+ unavailablePriceLabel: import_zod.z.string().optional(),
140
+ selectVariantLabel: import_zod.z.string().optional(),
141
+ quantityLabel: import_zod.z.string().optional(),
142
+ deliveryEstimateLabel: import_zod.z.string().optional(),
143
+ shippingLabel: import_zod.z.string().optional()
144
+ });
46
145
  var cardProductSchema = import_zod.z.object({
47
146
  id: import_zod.z.union([import_zod.z.string(), import_zod.z.number()]),
48
147
  title: import_zod.z.string(),
@@ -56,8 +155,20 @@ var cartItemSchema = import_zod.z.object({
56
155
  name: import_zod.z.string(),
57
156
  price: import_zod.z.number(),
58
157
  quantity: import_zod.z.number().int().min(0),
59
- image: import_zod.z.string(),
60
- variant: import_zod.z.string().optional()
158
+ /** Optional; absent images are omitted, never serialized as `""`. */
159
+ image: import_zod.z.string().optional(),
160
+ variant: import_zod.z.string().optional(),
161
+ /** Canonical backend per-unit price, preferred for display when present. */
162
+ unitPrice: moneySchema.optional(),
163
+ /** Canonical backend line total, preferred over `price * quantity`. */
164
+ lineTotal: moneySchema.optional()
165
+ });
166
+ var cartTotalsSchema = import_zod.z.object({
167
+ subtotal: moneySchema,
168
+ discount: moneySchema.optional(),
169
+ tax: moneySchema.optional(),
170
+ shipping: moneySchema.optional(),
171
+ total: moneySchema
61
172
  });
62
173
  var recentlyViewedItemSchema = import_zod.z.object({
63
174
  id: import_zod.z.string(),
@@ -88,15 +199,16 @@ var utilityLinkSchema = import_zod.z.object({
88
199
  var navCartItemSchema = import_zod.z.object({
89
200
  id: import_zod.z.string(),
90
201
  name: import_zod.z.string(),
91
- variant: import_zod.z.string(),
202
+ variant: import_zod.z.string().optional(),
92
203
  price: import_zod.z.number(),
93
204
  qty: import_zod.z.number().int().min(0),
94
- image: import_zod.z.string()
205
+ /** Optional; absent images are omitted, never serialized as `""`. */
206
+ image: import_zod.z.string().optional()
95
207
  });
96
208
  var storeUserSchema = import_zod.z.object({
97
209
  name: import_zod.z.string(),
98
210
  email: import_zod.z.string(),
99
- avatar: import_zod.z.string(),
211
+ avatar: import_zod.z.string().optional(),
100
212
  initials: import_zod.z.string()
101
213
  });
102
214
  var accountMenuItemSchema = import_zod.z.object({
@@ -147,17 +259,53 @@ var productCard1PropsSchema = import_zod.z.object({
147
259
  heading: import_zod.z.string().optional(),
148
260
  maxItems: import_zod.z.number().int().positive().optional()
149
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
+ });
150
289
  var shoppingCart4PropsSchema = import_zod.z.object({
151
290
  items: import_zod.z.array(cartItemSchema),
152
291
  promotions: import_zod.z.array(promotionSchema).default([]),
153
292
  recentlyViewed: import_zod.z.array(recentlyViewedItemSchema).optional(),
293
+ /** Backend-authoritative totals; rendered verbatim, never computed locally. */
294
+ totals: cartTotalsSchema.optional(),
295
+ totalsState: import_zod.z.enum(["idle", "pending", "error"]).optional(),
296
+ totalsErrorLabel: import_zod.z.string().optional(),
297
+ totalsUnavailableLabel: import_zod.z.string().optional(),
298
+ amountUnavailableLabel: import_zod.z.string().optional(),
299
+ retryLabel: import_zod.z.string().optional(),
154
300
  taxRate: import_zod.z.number().optional(),
155
301
  titleLabel: import_zod.z.string().optional(),
156
302
  subtotalLabel: import_zod.z.string().optional(),
303
+ discountLabel: import_zod.z.string().optional(),
157
304
  taxLabel: import_zod.z.string().optional(),
158
305
  shippingLabel: import_zod.z.string().optional(),
159
306
  shippingFreeLabel: import_zod.z.string().optional(),
160
307
  totalLabel: import_zod.z.string().optional(),
308
+ totalsPendingLabel: import_zod.z.string().optional(),
161
309
  awayFromLabel: import_zod.z.string().optional(),
162
310
  activatedLabel: import_zod.z.string().optional(),
163
311
  itemsLabel: import_zod.z.string().optional(),
@@ -171,33 +319,101 @@ var shoppingCart4PropsSchema = import_zod.z.object({
171
319
  expandLabel: import_zod.z.string().optional(),
172
320
  checkoutLabel: import_zod.z.string().optional(),
173
321
  quickCheckoutLabel: import_zod.z.string().optional(),
174
- checkoutNowLabel: import_zod.z.string().optional()
322
+ checkoutNowLabel: import_zod.z.string().optional(),
323
+ emptyLabel: import_zod.z.string().optional(),
324
+ removeLabel: import_zod.z.string().optional(),
325
+ decreaseLabel: import_zod.z.string().optional(),
326
+ increaseLabel: import_zod.z.string().optional()
327
+ });
328
+ var logoAccentSchema = import_zod.z.object({
329
+ text: import_zod.z.string(),
330
+ className: import_zod.z.string().optional()
331
+ });
332
+ var brandAccentSchema = import_zod.z.object({
333
+ text: import_zod.z.string(),
334
+ className: import_zod.z.string().optional()
335
+ });
336
+ var heroImageSchema = import_zod.z.object({
337
+ src: import_zod.z.string(),
338
+ alt: import_zod.z.string()
175
339
  });
176
340
  var navbar4PropsSchema = import_zod.z.object({
177
341
  storeCategories: import_zod.z.array(storeCategorySchema),
178
- shippingNote: import_zod.z.string(),
342
+ shippingNote: import_zod.z.string().optional(),
179
343
  utilityLinks: import_zod.z.array(utilityLinkSchema),
180
344
  logoText: import_zod.z.string(),
181
345
  logoHref: import_zod.z.string().optional(),
346
+ /** Optional accent for a trailing segment of `logoText`; omitted → unchanged. */
347
+ logoAccent: logoAccentSchema.optional(),
348
+ /**
349
+ * Consumer-supplied classes merged onto the block's outer surface as the
350
+ * final argument (e.g. a semantic surface token). Omitted → unchanged.
351
+ */
352
+ className: import_zod.z.string().optional(),
182
353
  accountHref: import_zod.z.string().optional(),
183
354
  searchQuery: import_zod.z.string().optional(),
184
355
  items: import_zod.z.array(navCartItemSchema).optional(),
356
+ /** Authoritative backend subtotal for the mini-cart. */
357
+ subtotal: moneySchema.optional(),
358
+ subtotalUnavailableLabel: import_zod.z.string().optional(),
185
359
  user: storeUserSchema.optional(),
186
- 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()
363
+ });
364
+ var ctaSchema = import_zod.z.object({
365
+ label: import_zod.z.string(),
366
+ href: import_zod.z.string().optional()
367
+ });
368
+ var faqItemSchema = import_zod.z.object({
369
+ value: import_zod.z.string(),
370
+ question: import_zod.z.string(),
371
+ answer: import_zod.z.string()
372
+ });
373
+ var faqBlock1PropsSchema = import_zod.z.object({
374
+ items: import_zod.z.array(faqItemSchema),
375
+ title: import_zod.z.string().optional(),
376
+ description: import_zod.z.string().optional(),
377
+ accordionType: import_zod.z.enum(["single", "multiple"]).optional()
378
+ });
379
+ var ctaSection1PropsSchema = import_zod.z.object({
380
+ badgeText: import_zod.z.string().optional(),
381
+ title: import_zod.z.string().optional(),
382
+ description: import_zod.z.string().optional(),
383
+ primaryCta: ctaSchema.optional(),
384
+ secondaryCta: ctaSchema.optional()
187
385
  });
188
386
  // Annotate the CommonJS export names for ESM import in node:
189
387
  0 && (module.exports = {
190
388
  PRODUCT_IMAGE_FALLBACK,
191
389
  accountMenuItemSchema,
390
+ brandAccentSchema,
192
391
  buttonPropsSchema,
193
392
  cardProductSchema,
194
393
  cartItemSchema,
394
+ cartTotalsSchema,
395
+ ctaSchema,
396
+ ctaSection1PropsSchema,
397
+ faqBlock1PropsSchema,
398
+ faqItemSchema,
399
+ formatMoney,
400
+ heroImageSchema,
401
+ isAvailableMoney,
402
+ isCompleteFiniteDecimal,
403
+ logoAccentSchema,
404
+ moneySchema,
195
405
  navCartItemSchema,
196
406
  navbar4PropsSchema,
197
407
  paymentMethodSchema,
198
408
  productCard1PropsSchema,
409
+ productDetailProductSchema,
410
+ productDetailVariantSchema,
411
+ productOverview1PropsSchema,
412
+ productPresentationSchema,
413
+ productShowcase1PropsSchema,
199
414
  promotionSchema,
200
415
  recentlyViewedItemSchema,
416
+ resolveAbsoluteQuantity,
201
417
  shoppingCart4PropsSchema,
202
418
  storeCategorySchema,
203
419
  storeContainer1PropsSchema,
@@ -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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAgCX,IAAM,yBACX,sCACA;AAAA,EACE;AACF;AAMK,IAAM,oBAAoB,aAAE,OAAO;AAAA,EACxC,IAAI,aAAE,MAAM,CAAC,aAAE,OAAO,GAAG,aAAE,OAAO,CAAC,CAAC;AAAA,EACpC,OAAO,aAAE,OAAO;AAAA,EAChB,OAAO,aAAE,OAAO;AAAA,EAChB,eAAe,aAAE,OAAO,EAAE,SAAS;AAAA,EACnC,OAAO,aAAE,OAAO;AAAA,EAChB,OAAO,aAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;AAGM,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACrC,IAAI,aAAE,OAAO;AAAA,EACb,MAAM,aAAE,OAAO;AAAA,EACf,OAAO,aAAE,OAAO;AAAA,EAChB,UAAU,aAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC;AAAA,EAChC,OAAO,aAAE,OAAO;AAAA,EAChB,SAAS,aAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAGM,IAAM,2BAA2B,aAAE,OAAO;AAAA,EAC/C,IAAI,aAAE,OAAO;AAAA,EACb,MAAM,aAAE,OAAO;AAAA,EACf,OAAO,aAAE,OAAO;AAAA,EAChB,OAAO,aAAE,OAAO;AAClB,CAAC;AAGM,IAAM,kBAAkB,aAAE,OAAO;AAAA,EACtC,WAAW,aAAE,OAAO;AAAA,EACpB,QAAQ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OAAO,EAAE,SAAS;AACxC,CAAC;AAGM,IAAM,qBAAqB,aAAE,OAAO;AAAA,EACzC,iBAAiB,aAAE,MAAM,mBAAmB;AAAA,EAC5C,cAAc,aAAE,OAAO;AAAA,EACvB,cAAc,aAAE,MAAM,iBAAiB;AAAA,EACvC,UAAU,aAAE,OAAO;AAAA,EACnB,UAAU,aAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,aAAa,aAAE,OAAO,EAAE,SAAS;AAAA,EACjC,aAAa,aAAE,OAAO,EAAE,SAAS;AAAA,EACjC,OAAO,aAAE,MAAM,iBAAiB,EAAE,SAAS;AAAA,EAC3C,MAAM,gBAAgB,SAAS;AAAA,EAC/B,kBAAkB,aAAE,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.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