@thorprovider/storefront 0.6.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/README.md +22 -2
  2. package/assets/templates/AGENTS.md +14 -2
  3. package/assets/templates/app/app/[[...slug]]/page.tsx +9 -2
  4. package/assets/templates/app/lib/__STOREFRONT__/account-address.ts +129 -0
  5. package/assets/templates/app/lib/__STOREFRONT__/account-lifecycle.client.tsx +2 -2
  6. package/assets/templates/app/lib/__STOREFRONT__/account-private.core.ts +143 -0
  7. package/assets/templates/app/lib/__STOREFRONT__/account-profile.ts +220 -0
  8. package/assets/templates/app/lib/__STOREFRONT__/actions.ts +1234 -75
  9. package/assets/templates/app/lib/__STOREFRONT__/addresses-port.ts +107 -0
  10. package/assets/templates/app/lib/__STOREFRONT__/checkout-shipping.core.ts +37 -0
  11. package/assets/templates/app/lib/__STOREFRONT__/commerce.ts +460 -35
  12. package/assets/templates/app/lib/__STOREFRONT__/confirmation.core.ts +240 -0
  13. package/assets/templates/app/lib/__STOREFRONT__/customer-profile-port.ts +103 -0
  14. package/assets/templates/app/lib/__STOREFRONT__/order-detail-port.ts +26 -0
  15. package/assets/templates/app/lib/__STOREFRONT__/orders-port.ts +30 -0
  16. package/assets/templates/app/lib/__STOREFRONT__/ports.ts +18 -0
  17. package/assets/templates/app/lib/__STOREFRONT__/projection-ownership.client.tsx +4 -4
  18. package/assets/templates/app/lib/__STOREFRONT__/session.ts +24 -6
  19. package/assets/templates/app/lib/__STOREFRONT__/state.core.ts +28 -1
  20. package/assets/templates/app/lib/__STOREFRONT__/views/sections/address-book-advanced.client.tsx +29 -0
  21. package/assets/templates/app/lib/__STOREFRONT__/views/sections/checkout-commerce-v1.client.tsx +19 -0
  22. package/assets/templates/app/lib/__STOREFRONT__/views/sections/checkout-commerce-v1.tsx +16 -0
  23. package/assets/templates/app/lib/__STOREFRONT__/views/sections/customer-profile.client.tsx +27 -0
  24. package/assets/templates/app/lib/__STOREFRONT__/views/sections/index.ts +5 -1
  25. package/assets/templates/app/lib/__STOREFRONT__/views/sections/marketplace-product-card.client.tsx +19 -0
  26. package/assets/templates/app/lib/__STOREFRONT__/views/sections/marketplace-product-card.tsx +16 -0
  27. package/assets/templates/app/lib/__STOREFRONT__/views/sections/mega-menu-universal.client.tsx +19 -0
  28. package/assets/templates/app/lib/__STOREFRONT__/views/sections/mega-menu-universal.tsx +16 -0
  29. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.address-book-advanced.ts +437 -0
  30. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.checkout-commerce-v1.ts +398 -0
  31. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.customer-profile.ts +138 -0
  32. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.marketplace-product-card.ts +67 -0
  33. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.mega-menu-universal.ts +76 -0
  34. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.universal-banner.ts +217 -0
  35. package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-banner.client.tsx +24 -0
  36. package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-banner.tsx +16 -0
  37. package/assets/templates/features/checkout/handlers.ts +348 -33
  38. package/assets/templates/features/checkout/state.ts +79 -3
  39. package/assets/templates/features/customer-addresses/handlers.ts +11 -0
  40. package/assets/templates/features/customer-addresses/state.ts +33 -0
  41. package/assets/templates/features/customer-auth/state.ts +10 -0
  42. package/assets/templates/features/customer-profile/handlers.ts +11 -0
  43. package/assets/templates/features/customer-profile/state.ts +18 -0
  44. package/assets/templates/views/account/address-book-advanced.defaults.ts +534 -0
  45. package/assets/templates/views/account/assembly/assembly.json +41 -0
  46. package/assets/templates/views/account/assembly/index.skeleton.tsx +229 -0
  47. package/assets/templates/views/account/assembly/registry.skeleton.tsx +1116 -0
  48. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/binding.json +5 -0
  49. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/catalog.part +4 -0
  50. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/element.part +5 -0
  51. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/registry.part +1 -0
  52. package/assets/templates/views/account/assembly/slots/addresses/cards/catalog.part +5 -0
  53. package/assets/templates/views/account/assembly/slots/addresses/cards/element.part +10 -0
  54. package/assets/templates/views/account/assembly/slots/addresses/cards/registry.part +1 -0
  55. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/catalog.part +5 -0
  56. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/element.part +5 -0
  57. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/registry.part +1 -0
  58. package/assets/templates/views/account/assembly/slots/login/card/catalog.part +4 -0
  59. package/assets/templates/views/account/assembly/slots/login/card/element.part +13 -0
  60. package/assets/templates/views/account/assembly/slots/login/card/registry.part +1 -0
  61. package/assets/templates/views/account/assembly/slots/orders/OrderHistory/catalog.part +5 -0
  62. package/assets/templates/views/account/assembly/slots/orders/OrderHistory/element.part +5 -0
  63. package/assets/templates/views/account/assembly/slots/orders/OrderHistory/registry.part +2 -0
  64. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/binding.json +5 -0
  65. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/catalog.part +5 -0
  66. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/element.part +5 -0
  67. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/registry.part +1 -0
  68. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/binding.json +5 -0
  69. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/catalog.part +4 -0
  70. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/element.part +5 -0
  71. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/registry.part +1 -0
  72. package/assets/templates/views/account/assembly/slots/profile/form/catalog.part +5 -0
  73. package/assets/templates/views/account/assembly/slots/profile/form/element.part +10 -0
  74. package/assets/templates/views/account/assembly/slots/profile/form/registry.part +1 -0
  75. package/assets/templates/views/account/assembly/slots/register/SignUpPage1/catalog.part +4 -0
  76. package/assets/templates/views/account/assembly/slots/register/SignUpPage1/element.part +13 -0
  77. package/assets/templates/views/account/assembly/slots/register/SignUpPage1/registry.part +1 -0
  78. package/assets/templates/views/account/assembly/slots/summary/stack/catalog.part +5 -0
  79. package/assets/templates/views/account/assembly/slots/summary/stack/element.part +5 -0
  80. package/assets/templates/views/account/assembly/slots/summary/stack/registry.part +1 -0
  81. package/assets/templates/views/account/assembly/slots/summary/tabs/catalog.part +5 -0
  82. package/assets/templates/views/account/assembly/slots/summary/tabs/element.part +5 -0
  83. package/assets/templates/views/account/assembly/slots/summary/tabs/registry.part +1 -0
  84. package/assets/templates/views/account/content.ts +326 -0
  85. package/assets/templates/views/account/customer-profile.defaults.ts +136 -0
  86. package/assets/templates/views/account/index.tsx +218 -35
  87. package/assets/templates/views/account/order-detail.client.tsx +35 -0
  88. package/assets/templates/views/account/order-detail.defaults.ts +457 -0
  89. package/assets/templates/views/account/orders-advanced.client.tsx +166 -0
  90. package/assets/templates/views/account/orders-advanced.defaults.ts +230 -0
  91. package/assets/templates/views/account/registry.tsx +944 -369
  92. package/assets/templates/views/account/schema.ts +50 -0
  93. package/assets/templates/views/account/sections-data.ts +2 -0
  94. package/assets/templates/views/cart/content.ts +1 -0
  95. package/assets/templates/views/category/assembly/index.skeleton.tsx +1 -0
  96. package/assets/templates/views/category/assembly/slots/filter/CategoryListing/element.part +1 -0
  97. package/assets/templates/views/category/content.ts +2 -0
  98. package/assets/templates/views/category/index.tsx +2 -0
  99. package/assets/templates/views/category/sections-data.ts +2 -0
  100. package/assets/templates/views/checkout/checkout-commerce-hosted.tsx +1089 -0
  101. package/assets/templates/views/checkout/content.ts +114 -2
  102. package/assets/templates/views/checkout/index.tsx +7 -1
  103. package/assets/templates/views/checkout/props.ts +70 -22
  104. package/assets/templates/views/checkout/registry.tsx +400 -71
  105. package/assets/templates/views/checkout/schema.ts +260 -9
  106. package/assets/templates/views/home/assembly/assembly.json +28 -0
  107. package/assets/templates/views/home/assembly/index.skeleton.tsx +1 -0
  108. package/assets/templates/views/home/content.ts +2 -0
  109. package/assets/templates/views/home/index.tsx +1 -0
  110. package/assets/templates/views/home/sections-data.ts +2 -0
  111. package/assets/templates/views/product/content.ts +1 -0
  112. package/assets/templates/views/static/content.ts +1 -0
  113. package/bin/storefront.js +343 -13
  114. package/package.json +2 -1
  115. package/recipes/adapter-surface.json +158 -0
  116. package/recipes/archetypes.json +38 -3
  117. package/recipes/catalog.json +138 -1
  118. package/recipes/feature.schema.json +9 -0
  119. package/recipes/features.json +72 -1
  120. package/recipes/manifest.schema.json +5 -0
  121. package/recipes/recipe.schema.json +14 -2
  122. package/recipes/recipes.json +35 -5
  123. package/recipes/section.schema.json +112 -0
  124. package/recipes/sections.json +289 -3
  125. package/recipes/validate.mjs +83 -1
  126. package/scripts/adapter-surface.mjs +41 -0
  127. package/scripts/agent-blocks.mjs +700 -0
  128. package/scripts/block-validator.mjs +45 -0
  129. package/scripts/candidate.mjs +5 -4
  130. package/scripts/composers.mjs +7 -2
  131. package/scripts/default-sections.mjs +78 -0
  132. package/scripts/file-classes.mjs +15 -0
  133. package/scripts/generate-adapter-surface.mjs +148 -0
  134. package/scripts/operations.mjs +100 -0
  135. package/scripts/reconcile.mjs +67 -39
  136. package/scripts/section-configure.mjs +316 -0
  137. package/scripts/sync-assets.mjs +1 -0
  138. package/scripts/view-assembly.mjs +101 -14
  139. package/skills/sf-feature/SKILL.md +19 -0
  140. package/skills/sf-view-gen/SKILL.md +79 -7
  141. package/skills/sf-view-gen/assets/recipes/archetypes.json +38 -3
  142. package/skills/sf-view-gen/assets/recipes/catalog.json +138 -1
  143. package/skills/sf-view-gen/assets/recipes/features.json +72 -1
  144. package/skills/sf-view-gen/assets/recipes/recipes.json +35 -5
  145. package/skills/sf-view-gen/assets/recipes/section.schema.json +112 -0
  146. package/skills/sf-view-gen/assets/recipes/sections.json +289 -3
  147. package/skills/sf-view-gen/assets/templates/views/sections/checkout-commerce-v1.client.tsx +19 -0
  148. package/skills/sf-view-gen/assets/templates/views/sections/checkout-commerce-v1.tsx +16 -0
  149. package/skills/sf-view-gen/assets/templates/views/sections/marketplace-product-card.client.tsx +19 -0
  150. package/skills/sf-view-gen/assets/templates/views/sections/marketplace-product-card.tsx +16 -0
  151. package/skills/sf-view-gen/assets/templates/views/sections/mega-menu-universal.client.tsx +19 -0
  152. package/skills/sf-view-gen/assets/templates/views/sections/mega-menu-universal.tsx +16 -0
  153. package/skills/sf-view-gen/assets/templates/views/sections/schema.checkout-commerce-v1.ts +398 -0
  154. package/skills/sf-view-gen/assets/templates/views/sections/schema.marketplace-product-card.ts +67 -0
  155. package/skills/sf-view-gen/assets/templates/views/sections/schema.mega-menu-universal.ts +76 -0
  156. package/skills/sf-view-gen/assets/templates/views/sections/schema.universal-banner.ts +217 -0
  157. package/skills/sf-view-gen/assets/templates/views/sections/universal-banner.client.tsx +24 -0
  158. package/skills/sf-view-gen/assets/templates/views/sections/universal-banner.tsx +16 -0
  159. package/skills/sf-view-gen/scripts/validate.mjs +83 -1
  160. package/skills/storefront-workflow/SKILL.md +5 -0
  161. package/skills/storefront-workflow/references/mobile-responsiveness.md +1 -1
@@ -47,7 +47,17 @@
47
47
  "allowedSections": [
48
48
  "faq",
49
49
  "cta",
50
- "products"
50
+ "products",
51
+ "marketplace-product-card",
52
+ "checkout-commerce-v1",
53
+ "mega-menu-universal",
54
+ "universal-banner"
55
+ ],
56
+ "defaultSections": [
57
+ {
58
+ "type": "universal-banner",
59
+ "after": "hero"
60
+ }
51
61
  ],
52
62
  "maxSections": 4
53
63
  },
@@ -190,7 +200,7 @@
190
200
  {
191
201
  "name": "account",
192
202
  "mvp": true,
193
- "description": "Customer account area with sign-in, registration, and a minimal signed-in state",
203
+ "description": "Customer account area with sign-in, registration, a shaped signed-in area, and installable profile and address modules",
194
204
  "route": "/account",
195
205
  "loader": "account",
196
206
  "requiredDataKeys": [
@@ -198,7 +208,11 @@
198
208
  ],
199
209
  "defaultVariants": {
200
210
  "login": "card",
201
- "register": "SignUpPage1"
211
+ "register": "SignUpPage1",
212
+ "summary": "stack",
213
+ "orders": "OrderHistoryAdvanced",
214
+ "profile": "CustomerProfileAdvanced",
215
+ "addresses": "AddressBookAdvanced"
202
216
  },
203
217
  "allowedVariants": {
204
218
  "login": [
@@ -209,14 +223,30 @@
209
223
  "SignUpPage1"
210
224
  ],
211
225
  "orders": [
212
- "OrderHistory"
226
+ "OrderHistory",
227
+ "OrderHistoryAdvanced"
228
+ ],
229
+ "summary": [
230
+ "stack",
231
+ "tabs"
232
+ ],
233
+ "profile": [
234
+ "form",
235
+ "CustomerProfileAdvanced"
236
+ ],
237
+ "addresses": [
238
+ "cards",
239
+ "AddressBookAdvanced"
213
240
  ]
214
241
  },
215
242
  "optionalSections": [],
216
243
  "registeredSlots": [
217
244
  "login",
218
245
  "register",
219
- "orders"
246
+ "summary",
247
+ "orders",
248
+ "profile",
249
+ "addresses"
220
250
  ],
221
251
  "allowedSections": [],
222
252
  "maxSections": 4
@@ -0,0 +1,112 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Storefront section registry",
4
+ "description": "Structural contract for the complete section registry and its optional agent cards. Status-specific completeness is checked by the storefront semantic validator.",
5
+ "type": "object",
6
+ "required": ["version", "description", "sections"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "$schema": { "type": "string" },
10
+ "version": { "type": "string", "minLength": 1 },
11
+ "description": { "type": "string", "minLength": 1 },
12
+ "sections": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "required": ["name", "description", "elementType", "variants", "defaultVariant", "propsHint", "status"],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "name": { "type": "string", "minLength": 1 },
20
+ "description": { "type": "string", "minLength": 1 },
21
+ "elementType": { "type": "string", "minLength": 1 },
22
+ "variants": { "type": "array", "items": { "type": "string", "minLength": 1 } },
23
+ "defaultVariant": { "type": "string", "minLength": 1 },
24
+ "propsHint": { "type": "string", "minLength": 1 },
25
+ "status": { "type": "string", "enum": ["executable", "held"] },
26
+ "dataBound": { "type": "boolean" },
27
+ "reason": { "type": "string", "minLength": 1 },
28
+ "agent": {
29
+ "type": "object",
30
+ "required": ["status", "section", "elementType", "variants"],
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "status": { "type": "string", "enum": ["ready", "pending", "exempt"] },
34
+ "section": { "type": "string", "minLength": 1 },
35
+ "elementType": { "type": "string", "minLength": 1 },
36
+ "variants": { "type": "array", "items": { "type": "string", "minLength": 1 } },
37
+ "label": { "type": "string", "minLength": 1 },
38
+ "purpose": { "type": "string", "minLength": 1 },
39
+ "useWhen": { "type": "array", "items": { "type": "string", "minLength": 1 } },
40
+ "avoidWhen": { "type": "array", "items": { "type": "string", "minLength": 1 } },
41
+ "surfaces": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "object",
45
+ "required": ["kind", "hosts"],
46
+ "additionalProperties": false,
47
+ "properties": {
48
+ "kind": { "type": "string", "enum": ["section", "shell", "route", "feature"] },
49
+ "hosts": { "type": "array", "items": { "type": "string", "minLength": 1 } }
50
+ }
51
+ }
52
+ },
53
+ "editable": { "type": "boolean" },
54
+ "fields": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "object",
58
+ "required": ["path", "type", "required", "description"],
59
+ "additionalProperties": false,
60
+ "properties": {
61
+ "path": { "type": "string", "minLength": 1 },
62
+ "type": { "type": "string", "enum": ["string", "number", "boolean", "object", "array", "enum"] },
63
+ "required": { "type": "boolean" },
64
+ "description": { "type": "string", "minLength": 1 }
65
+ }
66
+ }
67
+ },
68
+ "hostOnly": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "object",
72
+ "required": ["path", "reason"],
73
+ "additionalProperties": false,
74
+ "properties": {
75
+ "path": { "type": "string", "minLength": 1 },
76
+ "reason": { "type": "string", "minLength": 1 }
77
+ }
78
+ }
79
+ },
80
+ "examples": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "object",
84
+ "required": ["name", "description", "data"],
85
+ "additionalProperties": false,
86
+ "properties": {
87
+ "name": { "type": "string", "minLength": 1 },
88
+ "description": { "type": "string", "minLength": 1 },
89
+ "data": { "type": "object" }
90
+ }
91
+ }
92
+ },
93
+ "validator": {
94
+ "description": "Required for ready cards with section surfaces; route-only ready cards do not use a section-data validator.",
95
+ "type": "object",
96
+ "required": ["export"],
97
+ "additionalProperties": false,
98
+ "properties": {
99
+ "export": { "type": "string", "minLength": 1 }
100
+ }
101
+ },
102
+ "kind": { "type": "string", "enum": ["pending-card", "host-only", "requiresPort", "not-user-configurable", "internal"] },
103
+ "reason": { "type": "string", "minLength": 1 },
104
+ "owner": { "type": "string", "minLength": 1 },
105
+ "expires": { "type": "string", "minLength": 1 }
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
@@ -20,7 +20,16 @@
20
20
  "variants": ["FaqBlock1"],
21
21
  "defaultVariant": "FaqBlock1",
22
22
  "propsHint": "title, description, items[] (question, answer)",
23
- "status": "executable"
23
+ "status": "executable",
24
+ "agent": {
25
+ "status": "pending",
26
+ "section": "faq",
27
+ "elementType": "Faq",
28
+ "variants": ["FaqBlock1"],
29
+ "kind": "pending-card",
30
+ "reason": "FAQ content is executable, but its question and answer authoring contract has not yet been reviewed for agent-guided configuration.",
31
+ "owner": "Wave 1 — editorial cards"
32
+ }
24
33
  },
25
34
  {
26
35
  "name": "cta",
@@ -29,7 +38,16 @@
29
38
  "variants": ["CtaSection1"],
30
39
  "defaultVariant": "CtaSection1",
31
40
  "propsHint": "badgeText, title, description, primaryCta/secondaryCta (label, href)",
32
- "status": "executable"
41
+ "status": "executable",
42
+ "agent": {
43
+ "status": "pending",
44
+ "section": "cta",
45
+ "elementType": "Cta",
46
+ "variants": ["CtaSection1"],
47
+ "kind": "pending-card",
48
+ "reason": "CTA section fields and safe destination guidance need a dedicated editorial card before agent configuration is enabled.",
49
+ "owner": "Wave 1 — editorial cards"
50
+ }
33
51
  },
34
52
  {
35
53
  "name": "products",
@@ -39,7 +57,16 @@
39
57
  "defaultVariant": "ProductGrid",
40
58
  "dataBound": true,
41
59
  "propsHint": "per-instance selection configured in views/<view>/data.ts sectionSources[id] (canonical category/collection/search/ordering query); heading, description, objective, ctaLabel/ctaHref are editorial content",
42
- "status": "executable"
60
+ "status": "executable",
61
+ "agent": {
62
+ "status": "pending",
63
+ "section": "products",
64
+ "elementType": "Products",
65
+ "variants": ["ProductGrid", "ProductShowcase1"],
66
+ "kind": "pending-card",
67
+ "reason": "Product sections require coordinated editorial copy and host-owned catalog query configuration; that combined card is deferred.",
68
+ "owner": "Wave 1 — editorial cards"
69
+ }
43
70
  },
44
71
  {
45
72
  "name": "statistics",
@@ -70,6 +97,265 @@
70
97
  "propsHint": "title, description, tiers[] (name, price, features, cta)",
71
98
  "status": "held",
72
99
  "reason": "bounded curation: no verified backend/data source for pricing tiers and no verified presentation bridge/provenance in the current composition"
100
+ },
101
+ {
102
+ "name": "marketplace-product-card",
103
+ "description": "MarketplaceProductCard presentation section (delivery marketplace-product-card).",
104
+ "elementType": "MarketplaceProductCard",
105
+ "variants": ["MarketplaceProductCard"],
106
+ "defaultVariant": "MarketplaceProductCard",
107
+ "propsHint": "data (product, labels, glyphs)",
108
+ "status": "executable",
109
+ "agent": {
110
+ "status": "pending",
111
+ "section": "marketplace-product-card",
112
+ "elementType": "MarketplaceProductCard",
113
+ "variants": ["MarketplaceProductCard"],
114
+ "kind": "pending-card",
115
+ "reason": "Marketplace product data, merchandising labels, and action bindings need a commerce-specific authoring card before selection.",
116
+ "owner": "Wave 2 — commerce surfaces"
117
+ }
118
+ },
119
+ {
120
+ "name": "checkout-commerce-v1",
121
+ "description": "CheckoutCommerceV1 presentation section (delivery checkout-commerce-v1).",
122
+ "elementType": "CheckoutCommerceV1",
123
+ "variants": ["CheckoutCommerceV1"],
124
+ "defaultVariant": "CheckoutCommerceV1",
125
+ "propsHint": "data (meta, labels, coupons[], paymentMethods[], countries[], scenarios[])",
126
+ "status": "executable",
127
+ "agent": {
128
+ "status": "ready",
129
+ "section": "checkout-commerce-v1",
130
+ "elementType": "CheckoutCommerceV1",
131
+ "variants": ["CheckoutCommerceV1"],
132
+ "label": "Hosted checkout route",
133
+ "purpose": "Explain the host-driven shopper checkout route at /checkout without moving transactional state into editorial content.",
134
+ "useWhen": [
135
+ "Use this route when grouped delivery choices must reflect the backend state for each fulfillment group.",
136
+ "Use this checkout route when customizing the host-driven checkout experience owned by the checkout feature.",
137
+ "Use this route when the designer order confirmation must follow backend-confirmed state."
138
+ ],
139
+ "avoidWhen": [
140
+ "Do not use this route card to add an editorial hero or banner section.",
141
+ "Do not use this route card to configure a product card or product section.",
142
+ "Do not configure checkout as a per-view editorial section; the checkout feature owns the route.",
143
+ "Do not add a second checkout page or route."
144
+ ],
145
+ "surfaces": [
146
+ { "kind": "route", "hosts": ["/checkout"] }
147
+ ],
148
+ "editable": false,
149
+ "fields": [
150
+ { "path": "cart", "type": "array", "required": true, "description": "Backend-authoritative cart lines and totals displayed by the route; do not serialize or edit them as agent-authored section data." },
151
+ { "path": "contact", "type": "object", "required": true, "description": "Host-owned shopper contact state displayed by checkout." },
152
+ { "path": "addresses", "type": "array", "required": true, "description": "Host-owned shipping and billing addresses displayed by checkout." },
153
+ { "path": "shippingGroups", "type": "array", "required": true, "description": "Backend grouped delivery options and selections, preserving each fulfillment group." },
154
+ { "path": "paymentMethods", "type": "array", "required": true, "description": "Host-provided payment methods and current selection; no payment data is authored by the agent." }
155
+ ],
156
+ "hostOnly": [
157
+ { "path": "cart.linesAndTotals", "reason": "Transactional cart contents and totals come from canonical host state and must never be serialized by the agent." },
158
+ { "path": "contactAndAddresses", "reason": "Shopper identity and address state are host-owned; the agent may discuss the user-owned checkout presentation files only." },
159
+ { "path": "shippingGroupsAndSelection", "reason": "Fulfillment groups, delivery options, and selections come from backend state and are not editorial configuration." },
160
+ { "path": "paymentMethodsAndSelection", "reason": "Payment methods and selection are host-owned transactional state; no payment data is serialized by the agent." },
161
+ { "path": "checkoutActionsAndConfirmation", "reason": "Actions and confirmation are bound to host handlers and backend-confirmed order state; never invent or serialize them." }
162
+ ],
163
+ "examples": [
164
+ {
165
+ "name": "Grouped delivery checkout route",
166
+ "description": "A prompt about grouped fulfillment routes to the existing host-driven checkout feature rather than a section configuration.",
167
+ "data": {
168
+ "prompt": "Make sure the checkout route shows grouped delivery from backend state.",
169
+ "agentAction": "Explain that /checkout is owned by the checkout feature, inspect the route card, and discuss only user-owned checkout files; do not serialize cart, address, fulfillment, payment, action, or confirmation state."
170
+ }
171
+ },
172
+ {
173
+ "name": "Designer checkout confirmation",
174
+ "description": "A request about the order confirmation remains in the checkout route and follows host-confirmed state.",
175
+ "data": {
176
+ "prompt": "Keep the checkout route's order confirmation on the designer screen.",
177
+ "agentAction": "Explain that the designer confirmation follows the backend-confirmed order, including reload/reconcile; do not create an editorial section or a second checkout page."
178
+ }
179
+ }
180
+ ]
181
+ }
182
+ },
183
+ {
184
+ "name": "mega-menu-universal",
185
+ "description": "MegaMenuUniversal presentation section (delivery mega-menu-universal).",
186
+ "elementType": "MegaMenuUniversal",
187
+ "variants": ["MegaMenuUniversal"],
188
+ "defaultVariant": "MegaMenuUniversal",
189
+ "propsHint": "data (categories[], labels, config, promotions[])",
190
+ "status": "executable",
191
+ "agent": {
192
+ "status": "exempt",
193
+ "section": "mega-menu-universal",
194
+ "elementType": "MegaMenuUniversal",
195
+ "variants": ["MegaMenuUniversal"],
196
+ "kind": "host-only",
197
+ "reason": "Mega-menu data and placement are storefront-shell concerns, so this section must be configured by the host rather than selected as page content.",
198
+ "owner": "Wave 1 — storefront shell"
199
+ }
200
+ },
201
+ {
202
+ "name": "universal-banner",
203
+ "description": "UniversalBanner presentation section (delivery universal-banner).",
204
+ "elementType": "UniversalBanner",
205
+ "variants": ["UniversalBanner"],
206
+ "defaultVariant": "UniversalBanner",
207
+ "propsHint": "data (campaign, config, now, banner)",
208
+ "status": "executable",
209
+ "agent": {
210
+ "status": "ready",
211
+ "section": "universal-banner",
212
+ "elementType": "UniversalBanner",
213
+ "variants": ["UniversalBanner"],
214
+ "label": "Campaign banner",
215
+ "purpose": "Announce a time-bounded campaign such as Black Friday with focused copy and clear calls to action.",
216
+ "useWhen": [
217
+ "Announce a seasonal campaign or promotion on the home page.",
218
+ "Run a Black Friday campaign with an explicit schedule and destination.",
219
+ "Present one campaign message with calls to action that lead to its offer."
220
+ ],
221
+ "avoidWhen": [
222
+ "Do not use this for a product listing or product catalog grid.",
223
+ "Do not use this for the site header or navigation.",
224
+ "Do not use this for checkout steps, payment, or order completion.",
225
+ "Do not use this for account, sign-in, or profile content."
226
+ ],
227
+ "surfaces": [
228
+ { "kind": "section", "hosts": ["home"] }
229
+ ],
230
+ "editable": true,
231
+ "fields": [
232
+ { "path": "campaign.campaignId", "type": "string", "required": true, "description": "Stable identity for this campaign." },
233
+ { "path": "campaign.banners", "type": "array", "required": true, "description": "Campaign banners; keep one banner for a focused announcement." },
234
+ { "path": "campaign.banners[].content.title", "type": "string", "required": false, "description": "Short campaign headline." },
235
+ { "path": "campaign.banners[].content.ctas", "type": "array", "required": true, "description": "Calls to action with labels, destinations, and visual tones." },
236
+ { "path": "campaign.banners[].media", "type": "object", "required": true, "description": "Non-empty responsive image URLs for the campaign banner." },
237
+ { "path": "campaign.banners[].schedule", "type": "object", "required": true, "description": "Campaign start and end in the declared timezone." },
238
+ { "path": "config.presentation", "type": "enum", "required": true, "description": "Banner collection presentation." },
239
+ { "path": "now", "type": "string", "required": true, "description": "Required serializable ISO timestamp fallback for the initial render; the generated view refreshes it at mount. It remains required for deterministic validation and preview." },
240
+ { "path": "banner", "type": "object", "required": true, "description": "Localized accessible labels for banner controls." }
241
+ ],
242
+ "hostOnly": [
243
+ { "path": "onBannerClick", "reason": "The host binds this analytics callback; agents configure serializable campaign data instead." },
244
+ { "path": "onCtaClick", "reason": "The host binds this analytics callback; agents configure serializable campaign data instead." }
245
+ ],
246
+ "examples": [
247
+ {
248
+ "name": "Black Friday home campaign",
249
+ "description": "A single scheduled Black Friday banner with two explicit campaign calls to action.",
250
+ "data": {
251
+ "campaign": {
252
+ "schemaVersion": 1,
253
+ "campaignId": "black-friday-2026",
254
+ "banners": [
255
+ {
256
+ "id": "black-friday-home",
257
+ "campaignId": "black-friday-2026",
258
+ "content": {
259
+ "name": "Black Friday home campaign",
260
+ "alt": "Black Friday offers across a selection of products",
261
+ "title": "Black Friday starts now",
262
+ "subtitle": "Save on selected favorites",
263
+ "description": "Discover this week’s limited-time offers.",
264
+ "badge": "Limited time",
265
+ "target": { "kind": "collection", "id": "black-friday" },
266
+ "ctas": [
267
+ {
268
+ "id": "shop-black-friday",
269
+ "label": "Shop Black Friday deals",
270
+ "target": { "kind": "collection", "id": "black-friday" },
271
+ "tone": "primary"
272
+ },
273
+ {
274
+ "id": "view-offers",
275
+ "label": "View all offers",
276
+ "target": { "kind": "page", "slug": "offers" },
277
+ "tone": "secondary"
278
+ }
279
+ ]
280
+ },
281
+ "media": {
282
+ "desktop": "data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221600%22%20height%3D%22600%22%20viewBox%3D%220%200%201600%20600%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22banner-gradient%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%22100%25%22%20y2%3D%220%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23111827%22%2F%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23b45309%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%23banner-gradient)%22%2F%3E%3C%2Fsvg%3E",
283
+ "tablet": "data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221024%22%20height%3D%22768%22%20viewBox%3D%220%200%201024%20768%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22banner-gradient%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%22100%25%22%20y2%3D%220%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23111827%22%2F%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23b45309%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%23banner-gradient)%22%2F%3E%3C%2Fsvg%3E",
284
+ "mobile": "data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22640%22%20height%3D%22800%22%20viewBox%3D%220%200%20640%20800%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22banner-gradient%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%22100%25%22%20y2%3D%220%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23111827%22%2F%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23b45309%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%23banner-gradient)%22%2F%3E%3C%2Fsvg%3E"
285
+ },
286
+ "presentation": {
287
+ "mode": "overlay",
288
+ "width": "full",
289
+ "height": "auto",
290
+ "aspect": "wide",
291
+ "fit": "cover",
292
+ "focal": "center",
293
+ "align": "start",
294
+ "radius": "lg",
295
+ "surface": "card",
296
+ "overlay": "gradient",
297
+ "overlayOpacity": "medium",
298
+ "padding": "lg",
299
+ "textScale": "lg"
300
+ },
301
+ "schedule": {
302
+ "from": "2026-11-01T00:00:00.000Z",
303
+ "to": "2026-11-30T23:59:59.000Z",
304
+ "timezone": "UTC"
305
+ },
306
+ "visible": true
307
+ }
308
+ ]
309
+ },
310
+ "config": {
311
+ "schemaVersion": 1,
312
+ "blockId": "home-black-friday",
313
+ "name": "Black Friday home campaign",
314
+ "visible": true,
315
+ "scheduleAware": true,
316
+ "responsiveEnabled": true,
317
+ "presentation": "single",
318
+ "preset": "one",
319
+ "refs": [{ "bannerId": "black-friday-home" }],
320
+ "layout": {
321
+ "gapX": "md",
322
+ "gapY": "md",
323
+ "maxWidth": "full",
324
+ "maxHeight": "lg",
325
+ "align": "center",
326
+ "radius": "lg"
327
+ },
328
+ "carousel": {
329
+ "visible": { "base": 1, "md": 1, "2xl": 1 },
330
+ "autoplay": false,
331
+ "intervalMs": 6000,
332
+ "loop": false,
333
+ "indicators": false,
334
+ "carouselOnMobile": false,
335
+ "peek": false,
336
+ "story": false
337
+ },
338
+ "rules": {
339
+ "emptyLabel": "No banners available",
340
+ "inactiveLabel": "This campaign is not active",
341
+ "danglingLabel": "This banner is unavailable"
342
+ }
343
+ },
344
+ "now": "2026-11-06T12:00:00.000Z",
345
+ "banner": {
346
+ "carouselPrevious": "Previous banner",
347
+ "carouselNext": "Next banner",
348
+ "carouselStatus": "Banner {current} of {total}",
349
+ "carouselRole": "carousel",
350
+ "storyPrevious": "Previous story",
351
+ "storyNext": "Next story",
352
+ "storyRole": "stories"
353
+ }
354
+ }
355
+ }
356
+ ],
357
+ "validator": { "export": "validateUniversalBannerData" }
358
+ }
73
359
  }
74
360
  ]
75
361
  }
@@ -0,0 +1,19 @@
1
+ 'use client'
2
+
3
+ // Optional section fragment: checkout-commerce-v1 (mirrors recipes/sections.json) — client registry.
4
+ // The matching server-side catalog lives in checkout-commerce-v1.tsx. @thorprovider/blocks ships a
5
+ // 'use client' boundary, but this fragment keeps the explicit client boundary so
6
+ // the section composes identically in any consumer graph.
7
+
8
+ import { CheckoutCommerceV1 } from '@thorprovider/blocks'
9
+ import { checkoutCommerceV1PropsSchema } from './schema.checkout-commerce-v1'
10
+ import type { ViewRegistry } from '../types'
11
+
12
+ export const checkoutCommerceV1Registry: ViewRegistry = {
13
+ CheckoutCommerceV1: ({ props }) => {
14
+ const parsed = checkoutCommerceV1PropsSchema.parse(props)
15
+ return (
16
+ <CheckoutCommerceV1 data={parsed.data} />
17
+ )
18
+ },
19
+ }
@@ -0,0 +1,16 @@
1
+ // Optional section fragment: checkout-commerce-v1 (mirrors recipes/sections.json)
2
+ // Server-side part: element type + zod catalog entry. The component mappings
3
+ // live in checkout-commerce-v1.client.tsx ('use client') and are composed via composeSections.
4
+
5
+ import { checkoutCommerceV1PropsSchema } from './schema.checkout-commerce-v1'
6
+
7
+ export const checkoutCommerceV1Section = {
8
+ elementType: 'CheckoutCommerceV1',
9
+ catalog: {
10
+ CheckoutCommerceV1: {
11
+ props: checkoutCommerceV1PropsSchema,
12
+ description: 'CheckoutCommerceV1 presentation section (delivery checkout-commerce-v1).',
13
+ },
14
+ },
15
+ registryModule: './checkout-commerce-v1.client',
16
+ }
@@ -0,0 +1,19 @@
1
+ 'use client'
2
+
3
+ // Optional section fragment: marketplace-product-card (mirrors recipes/sections.json) — client registry.
4
+ // The matching server-side catalog lives in marketplace-product-card.tsx. @thorprovider/blocks ships a
5
+ // 'use client' boundary, but this fragment keeps the explicit client boundary so
6
+ // the section composes identically in any consumer graph.
7
+
8
+ import { MarketplaceProductCard } from '@thorprovider/blocks'
9
+ import { marketplaceProductCardPropsSchema } from './schema.marketplace-product-card'
10
+ import type { ViewRegistry } from '../types'
11
+
12
+ export const marketplaceProductCardRegistry: ViewRegistry = {
13
+ MarketplaceProductCard: ({ props }) => {
14
+ const parsed = marketplaceProductCardPropsSchema.parse(props)
15
+ return (
16
+ <MarketplaceProductCard data={parsed.data} />
17
+ )
18
+ },
19
+ }
@@ -0,0 +1,16 @@
1
+ // Optional section fragment: marketplace-product-card (mirrors recipes/sections.json)
2
+ // Server-side part: element type + zod catalog entry. The component mappings
3
+ // live in marketplace-product-card.client.tsx ('use client') and are composed via composeSections.
4
+
5
+ import { marketplaceProductCardPropsSchema } from './schema.marketplace-product-card'
6
+
7
+ export const marketplaceProductCardSection = {
8
+ elementType: 'MarketplaceProductCard',
9
+ catalog: {
10
+ MarketplaceProductCard: {
11
+ props: marketplaceProductCardPropsSchema,
12
+ description: 'MarketplaceProductCard presentation section (delivery marketplace-product-card).',
13
+ },
14
+ },
15
+ registryModule: './marketplace-product-card.client',
16
+ }
@@ -0,0 +1,19 @@
1
+ 'use client'
2
+
3
+ // Optional section fragment: mega-menu-universal (mirrors recipes/sections.json) — client registry.
4
+ // The matching server-side catalog lives in mega-menu-universal.tsx. @thorprovider/blocks ships a
5
+ // 'use client' boundary, but this fragment keeps the explicit client boundary so
6
+ // the section composes identically in any consumer graph.
7
+
8
+ import { MegaMenuUniversal } from '@thorprovider/blocks'
9
+ import { megaMenuUniversalPropsSchema } from './schema.mega-menu-universal'
10
+ import type { ViewRegistry } from '../types'
11
+
12
+ export const megaMenuUniversalRegistry: ViewRegistry = {
13
+ MegaMenuUniversal: ({ props }) => {
14
+ const parsed = megaMenuUniversalPropsSchema.parse(props)
15
+ return (
16
+ <MegaMenuUniversal data={parsed.data} />
17
+ )
18
+ },
19
+ }
@@ -0,0 +1,16 @@
1
+ // Optional section fragment: mega-menu-universal (mirrors recipes/sections.json)
2
+ // Server-side part: element type + zod catalog entry. The component mappings
3
+ // live in mega-menu-universal.client.tsx ('use client') and are composed via composeSections.
4
+
5
+ import { megaMenuUniversalPropsSchema } from './schema.mega-menu-universal'
6
+
7
+ export const megaMenuUniversalSection = {
8
+ elementType: 'MegaMenuUniversal',
9
+ catalog: {
10
+ MegaMenuUniversal: {
11
+ props: megaMenuUniversalPropsSchema,
12
+ description: 'MegaMenuUniversal presentation section (delivery mega-menu-universal).',
13
+ },
14
+ },
15
+ registryModule: './mega-menu-universal.client',
16
+ }