@thorprovider/storefront 0.4.0 → 0.5.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.
- package/README.md +3 -1
- package/assets/templates/app/app/[[...slug]]/page.tsx +19 -1
- package/assets/templates/app/lib/__STOREFRONT__/composition.ts +1 -1
- package/assets/templates/app/lib/__STOREFRONT__/registry.tsx +15 -13
- package/assets/templates/app/lib/__STOREFRONT__/schema.ts +34 -4
- package/assets/templates/app/lib/__STOREFRONT__/shell/props.ts +1 -1
- package/assets/templates/app/lib/__STOREFRONT__/state.core.ts +3 -8
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/testimonials.tsx +26 -19
- package/assets/templates/features/checkout/state.ts +0 -5
- package/assets/templates/views/account/registry.tsx +72 -43
- package/assets/templates/views/account/schema.ts +1 -1
- package/assets/templates/views/category/assembly/assembly.json +1 -1
- package/assets/templates/views/category/assembly/index.skeleton.tsx +11 -7
- package/assets/templates/views/category/assembly/registry.skeleton.tsx +8 -8
- package/assets/templates/views/category/assembly/slots/filter/CategoryListing/catalog.part +5 -0
- package/assets/templates/views/category/assembly/slots/filter/{CategoryFilter2 → CategoryListing}/element.part +5 -3
- package/assets/templates/views/category/assembly/slots/filter/{CategoryFilter2 → CategoryListing}/registry.part +9 -5
- package/assets/templates/views/category/content.ts +2 -1
- package/assets/templates/views/category/index.tsx +19 -13
- package/assets/templates/views/category/props.ts +1 -1
- package/assets/templates/views/category/registry.tsx +17 -13
- package/assets/templates/views/category/schema.ts +48 -21
- package/assets/templates/views/checkout/content.ts +60 -0
- package/assets/templates/views/checkout/props.ts +4 -5
- package/assets/templates/views/checkout/registry.tsx +10 -6
- package/assets/templates/views/checkout/schema.ts +10 -16
- package/assets/templates/views/home/assembly/index.skeleton.tsx +0 -2
- package/assets/templates/views/home/index.tsx +0 -2
- package/examples/merchandising/category-led.json +1 -1
- package/examples/merchandising/collection-led.json +1 -1
- package/package.json +1 -1
- package/recipes/archetypes.json +14 -18
- package/recipes/catalog.json +27 -70
- package/recipes/features.json +2 -2
- package/recipes/recipes.json +7 -11
- package/recipes/sections.json +2 -2
- package/scripts/composers.mjs +2 -2
- package/scripts/logical-controls.mjs +4 -4
- package/scripts/operation-registry.mjs +1 -1
- package/scripts/view-assembly.mjs +2 -2
- package/skills/sf-view-gen/assets/recipes/archetypes.json +14 -18
- package/skills/sf-view-gen/assets/recipes/catalog.json +27 -70
- package/skills/sf-view-gen/assets/recipes/features.json +2 -2
- package/skills/sf-view-gen/assets/recipes/recipes.json +7 -11
- package/skills/sf-view-gen/assets/recipes/sections.json +2 -2
- package/skills/sf-view-gen/assets/templates/views/sections/schema.testimonials.ts +21 -11
- package/skills/sf-view-gen/assets/templates/views/sections/testimonials.client.tsx +2 -8
- package/assets/templates/views/category/assembly/slots/filter/CategoryFilter2/catalog.part +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thorprovider/storefront",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Deterministic storefront scaffolder and installable OpenCode skill suite for Thor Commerce (Next.js, @thorprovider/blocks, @thorprovider/adapters, Medusa)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "bin/storefront.js",
|
package/recipes/archetypes.json
CHANGED
|
@@ -100,34 +100,30 @@
|
|
|
100
100
|
"category.filter": {
|
|
101
101
|
"default": "sidebar",
|
|
102
102
|
"intents": {
|
|
103
|
-
"inline": {
|
|
104
|
-
"variant": "CategoryFilter1",
|
|
105
|
-
"when": "A compact inline filter bar above the product grid."
|
|
106
|
-
},
|
|
107
103
|
"sidebar": {
|
|
108
|
-
"variant": "
|
|
109
|
-
"when": "A left sidebar with
|
|
104
|
+
"variant": "CategoryListing",
|
|
105
|
+
"when": "A persistent left sidebar with filters, price range, and sort controls."
|
|
110
106
|
},
|
|
111
|
-
"
|
|
112
|
-
"variant": "
|
|
113
|
-
"when": "
|
|
107
|
+
"toolbar": {
|
|
108
|
+
"variant": "CategoryListing",
|
|
109
|
+
"when": "A sticky toolbar with a filter drawer, active-filter chips, and a sort sheet."
|
|
114
110
|
}
|
|
115
111
|
}
|
|
116
112
|
},
|
|
117
113
|
"checkout.checkout": {
|
|
118
|
-
"default": "
|
|
114
|
+
"default": "multiStep",
|
|
119
115
|
"intents": {
|
|
120
116
|
"singlePage": {
|
|
121
|
-
"variant": "
|
|
122
|
-
"when": "A single-page checkout
|
|
117
|
+
"variant": "Checkout",
|
|
118
|
+
"when": "A single-page checkout with contact, shipping, and payment sections visible at once (canonical `presentation: 'single-page'`)."
|
|
123
119
|
},
|
|
124
120
|
"multiStep": {
|
|
125
|
-
"variant": "
|
|
126
|
-
"when": "A
|
|
121
|
+
"variant": "Checkout",
|
|
122
|
+
"when": "A step-by-step checkout that shows one step at a time (canonical `presentation: 'stepper'`)."
|
|
127
123
|
},
|
|
128
|
-
"
|
|
129
|
-
"variant": "
|
|
130
|
-
"when": "A
|
|
124
|
+
"reviewStep": {
|
|
125
|
+
"variant": "Checkout",
|
|
126
|
+
"when": "A step-by-step checkout that appends a confirmation review before submission (canonical `presentation: 'stepper'` with `showReviewStep`)."
|
|
131
127
|
}
|
|
132
128
|
}
|
|
133
129
|
},
|
|
@@ -135,7 +131,7 @@
|
|
|
135
131
|
"default": "signIn",
|
|
136
132
|
"intents": {
|
|
137
133
|
"signIn": {
|
|
138
|
-
"variant": "
|
|
134
|
+
"variant": "card",
|
|
139
135
|
"when": "A full sign-in page with email and password and a link to create an account."
|
|
140
136
|
}
|
|
141
137
|
}
|
package/recipes/catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./catalog.schema.json",
|
|
3
3
|
"catalogVersion": 1,
|
|
4
|
-
"description": "Initial semantic executable catalog (E1 tasks 1.2-1.3), classified by source-shape inspection of the @thorprovider/blocks prop contracts and the view templates. Scope: every slot the curated MVP views (home, product, category, checkout, account) render by default, covering both the selectable archetype slots declared by recipes/archetypes.json and the nested default slots that have no archetype (category.productCard, checkout.confirmation) so no legacy default support is dropped. The account view
|
|
4
|
+
"description": "Initial semantic executable catalog (E1 tasks 1.2-1.3), classified by source-shape inspection of the @thorprovider/blocks prop contracts and the view templates. Scope: every slot the curated MVP views (home, product, category, checkout, account) render by default, covering both the selectable archetype slots declared by recipes/archetypes.json and the nested default slots that have no archetype (category.productCard, checkout.confirmation) so no legacy default support is dropped. The account view declares canonical LoginPage card/social presentations and SignUpPage1; legacy LoginPage1/LoginPage2 names resolve to card/social through legacyAliases, with social remaining held pending verified account lifecycle wiring. A variant is `executable` only when the slot's canonical data shape can feed its block props without a prop bridge and without inventing data; every other non-default variant is `held` with the specific reason. The one non-default structural choice is home.benefits, which selects between the two bounded presentations (`cards`, `split`) of the single canonical `Feature` block (identical item contract, no bridge); the retired numbered names `Feature1`/`Feature2` resolve through the slot's `legacyAliases`. E2 task 6.1 declares the base listing slot category.filter CategoryFilter2 as the single controlled listing (dataShape `CatalogQuery & CatalogResults`, state controlled) with the search/filter controls contributed by the logical mounts category.search / category.filters (no second block). Source-shape compatibility is not end-to-end backend behavior proof: the render is executable, but the category.search.apply / category.filter.apply actions remain held under the capability catalog (owner: storefront-catalog-search-filters, E2) until a real runtime proof. The `capabilities` map declares those operational capabilities with their requirements and verification state; E1 declares the held category.filter.apply action, E2 adds the held category.search.apply action and the held category.price.range capability that gates the category-filters showPrice option; no capability is claimed verified. The home.hero variants of the retired numbered family (StorefrontHero1/2/5/6) resolve through the slot's `legacyAliases` to the single canonical `StorefrontHero`, whose bounded presentation options (`compact`, `showcase`, `editorial`, `promotional`) preserve the four structural identities; the extended editorial/promotional sections render only from host-supplied data and are omitted otherwise. The category.productCard slot's retired numbered family (ProductCard1/2/3/5) and the previous `ProductCard` variant resolve through the slot's `legacyAliases` to the single canonical `ProductGrid` listing, which renders `ProductCard` item cells with bounded presentation options (`classic`, `minimal`, `rich`) that preserve the three structural identities; the rich presentation's wishlist and view-similar affordances are host-owned and optional, evidence (rating, badge, compare-at) renders only from host-supplied data, and the comparison-table variant `ProductCard5` was discarded as a listing controller, not a card presentation.",
|
|
5
5
|
"slots": {
|
|
6
6
|
"home.hero": {
|
|
7
7
|
"default": "StorefrontHero",
|
|
@@ -181,11 +181,14 @@
|
|
|
181
181
|
}
|
|
182
182
|
},
|
|
183
183
|
"category.filter": {
|
|
184
|
-
"default": "
|
|
184
|
+
"default": "CategoryListing",
|
|
185
|
+
"legacyAliases": {
|
|
186
|
+
"CategoryFilter2": "CategoryListing"
|
|
187
|
+
},
|
|
185
188
|
"variants": {
|
|
186
|
-
"
|
|
189
|
+
"CategoryListing": {
|
|
187
190
|
"status": "executable",
|
|
188
|
-
"block": "
|
|
191
|
+
"block": "CategoryListing",
|
|
189
192
|
"dataShape": "CatalogQuery & CatalogResults",
|
|
190
193
|
"events": [
|
|
191
194
|
"productClick",
|
|
@@ -205,32 +208,6 @@
|
|
|
205
208
|
"categoryQuery",
|
|
206
209
|
"facetSupport"
|
|
207
210
|
]
|
|
208
|
-
},
|
|
209
|
-
"CategoryFilter1": {
|
|
210
|
-
"status": "held",
|
|
211
|
-
"reason": "block requires categories/priceRanges/sortOptions with counts the canonical CardProduct[] listing does not supply; no verified prop bridge exists",
|
|
212
|
-
"block": "CategoryFilter",
|
|
213
|
-
"dataShape": "CategoryFilter1Filters",
|
|
214
|
-
"events": [
|
|
215
|
-
"filterChange"
|
|
216
|
-
],
|
|
217
|
-
"state": "uncontrolled",
|
|
218
|
-
"requirements": [
|
|
219
|
-
"categoryProducts"
|
|
220
|
-
]
|
|
221
|
-
},
|
|
222
|
-
"CategoryFilter4": {
|
|
223
|
-
"status": "held",
|
|
224
|
-
"reason": "block requires an advanced facets contract (modelTypes/rangeBands/frameSizes/colourways/features) the canonical listing does not supply; no verified prop bridge exists",
|
|
225
|
-
"block": "CategoryFilter",
|
|
226
|
-
"dataShape": "CategoryFilter4Facets",
|
|
227
|
-
"events": [
|
|
228
|
-
"filterChange"
|
|
229
|
-
],
|
|
230
|
-
"state": "uncontrolled",
|
|
231
|
-
"requirements": [
|
|
232
|
-
"categoryProducts"
|
|
233
|
-
]
|
|
234
211
|
}
|
|
235
212
|
}
|
|
236
213
|
},
|
|
@@ -262,45 +239,21 @@
|
|
|
262
239
|
}
|
|
263
240
|
},
|
|
264
241
|
"checkout.checkout": {
|
|
265
|
-
"default": "
|
|
242
|
+
"default": "Checkout",
|
|
243
|
+
"legacyAliases": {
|
|
244
|
+
"CheckoutForm1": "Checkout"
|
|
245
|
+
},
|
|
266
246
|
"variants": {
|
|
267
|
-
"
|
|
247
|
+
"Checkout": {
|
|
268
248
|
"status": "executable",
|
|
269
249
|
"block": "Checkout",
|
|
270
|
-
"dataShape": "
|
|
250
|
+
"dataShape": "CheckoutValues & CheckoutOrderSummary & PaymentMethod[]",
|
|
271
251
|
"events": [
|
|
272
252
|
"retryTotals",
|
|
273
253
|
"selectShippingOption",
|
|
274
254
|
"applyPromo",
|
|
275
|
-
"submit"
|
|
276
|
-
|
|
277
|
-
"state": "controlled",
|
|
278
|
-
"requirements": [
|
|
279
|
-
"checkoutCountries",
|
|
280
|
-
"checkoutPaymentMethods"
|
|
281
|
-
]
|
|
282
|
-
},
|
|
283
|
-
"CheckoutForm2": {
|
|
284
|
-
"status": "held",
|
|
285
|
-
"reason": "unproven checkout variant: E1 keeps only the default CheckoutForm1, whose behavior is unchanged; no verified prop bridge exists",
|
|
286
|
-
"block": "Checkout",
|
|
287
|
-
"dataShape": "CheckoutForm2Data",
|
|
288
|
-
"events": [
|
|
289
|
-
"submit"
|
|
290
|
-
],
|
|
291
|
-
"state": "controlled",
|
|
292
|
-
"requirements": [
|
|
293
|
-
"checkoutCountries",
|
|
294
|
-
"checkoutPaymentMethods"
|
|
295
|
-
]
|
|
296
|
-
},
|
|
297
|
-
"CheckoutForm3": {
|
|
298
|
-
"status": "held",
|
|
299
|
-
"reason": "unproven checkout variant: E1 keeps only the default CheckoutForm1, whose behavior is unchanged; no verified prop bridge exists",
|
|
300
|
-
"block": "Checkout",
|
|
301
|
-
"dataShape": "CheckoutForm3FormData",
|
|
302
|
-
"events": [
|
|
303
|
-
"submit"
|
|
255
|
+
"submit",
|
|
256
|
+
"stepChange"
|
|
304
257
|
],
|
|
305
258
|
"state": "controlled",
|
|
306
259
|
"requirements": [
|
|
@@ -328,12 +281,16 @@
|
|
|
328
281
|
}
|
|
329
282
|
},
|
|
330
283
|
"account.login": {
|
|
331
|
-
"default": "
|
|
284
|
+
"default": "card",
|
|
285
|
+
"legacyAliases": {
|
|
286
|
+
"LoginPage1": "card",
|
|
287
|
+
"LoginPage2": "social"
|
|
288
|
+
},
|
|
332
289
|
"variants": {
|
|
333
|
-
"
|
|
290
|
+
"card": {
|
|
334
291
|
"status": "executable",
|
|
335
|
-
"block": "
|
|
336
|
-
"dataShape": "
|
|
292
|
+
"block": "LoginPage",
|
|
293
|
+
"dataShape": "LoginPageFormData & AccountAuthResult",
|
|
337
294
|
"events": [
|
|
338
295
|
"submit",
|
|
339
296
|
"createAccount"
|
|
@@ -344,11 +301,11 @@
|
|
|
344
301
|
"accountAuthenticated"
|
|
345
302
|
]
|
|
346
303
|
},
|
|
347
|
-
"
|
|
304
|
+
"social": {
|
|
348
305
|
"status": "held",
|
|
349
|
-
"reason": "
|
|
350
|
-
"block": "
|
|
351
|
-
"dataShape": "
|
|
306
|
+
"reason": "The social presentation remains held for the Storefront account slot until social-auth lifecycle wiring is verified.",
|
|
307
|
+
"block": "LoginPage",
|
|
308
|
+
"dataShape": "LoginPageFormData & AccountAuthResult",
|
|
352
309
|
"events": [
|
|
353
310
|
"submit",
|
|
354
311
|
"forgotPassword",
|
package/recipes/features.json
CHANGED
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
{
|
|
79
79
|
"name": "catalog-search",
|
|
80
80
|
"mvp": true,
|
|
81
|
-
"description": "Optional category-listing search control (E2). Installation is presence, not an enabled flag; the config only supplies an optional placeholder. The search input contributes to the single controlled
|
|
81
|
+
"description": "Optional category-listing search control (E2). Installation is presence, not an enabled flag; the config only supplies an optional placeholder. The search input contributes to the single controlled CategoryListing at the category.search logical slot and never adds a block.",
|
|
82
82
|
"views": [],
|
|
83
83
|
"state": [],
|
|
84
84
|
"handlers": [],
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
{
|
|
97
97
|
"name": "category-filters",
|
|
98
98
|
"mvp": true,
|
|
99
|
-
"description": "Optional category-listing filter controls (E2). Installation is presence, not an enabled flag; the config selects which demonstrated basic filters show (filterSet) and whether the price control is shown (showPrice). The controls contribute to the single controlled
|
|
99
|
+
"description": "Optional category-listing filter controls (E2). Installation is presence, not an enabled flag; the config selects which demonstrated basic filters show (filterSet) and whether the price control is shown (showPrice). The controls contribute to the single controlled CategoryListing at the category.filters logical slot and never add a block.",
|
|
100
100
|
"views": [],
|
|
101
101
|
"state": [],
|
|
102
102
|
"handlers": [],
|
package/recipes/recipes.json
CHANGED
|
@@ -128,15 +128,13 @@
|
|
|
128
128
|
"storeCategories"
|
|
129
129
|
],
|
|
130
130
|
"defaultVariants": {
|
|
131
|
-
"filter": "
|
|
131
|
+
"filter": "CategoryListing",
|
|
132
132
|
"productCard": "ProductGrid",
|
|
133
133
|
"breadcrumb": "Breadcrumb"
|
|
134
134
|
},
|
|
135
135
|
"allowedVariants": {
|
|
136
136
|
"filter": [
|
|
137
|
-
"
|
|
138
|
-
"CategoryFilter2",
|
|
139
|
-
"CategoryFilter4"
|
|
137
|
+
"CategoryListing"
|
|
140
138
|
],
|
|
141
139
|
"productCard": [
|
|
142
140
|
"ProductGrid"
|
|
@@ -171,14 +169,12 @@
|
|
|
171
169
|
"checkoutPaymentMethods"
|
|
172
170
|
],
|
|
173
171
|
"defaultVariants": {
|
|
174
|
-
"checkout": "
|
|
172
|
+
"checkout": "Checkout",
|
|
175
173
|
"confirmation": "CheckoutConfirmation"
|
|
176
174
|
},
|
|
177
175
|
"allowedVariants": {
|
|
178
176
|
"checkout": [
|
|
179
|
-
"
|
|
180
|
-
"CheckoutForm2",
|
|
181
|
-
"CheckoutForm3"
|
|
177
|
+
"Checkout"
|
|
182
178
|
],
|
|
183
179
|
"confirmation": [
|
|
184
180
|
"CheckoutConfirmation"
|
|
@@ -202,13 +198,13 @@
|
|
|
202
198
|
"accountCustomer"
|
|
203
199
|
],
|
|
204
200
|
"defaultVariants": {
|
|
205
|
-
"login": "
|
|
201
|
+
"login": "card",
|
|
206
202
|
"register": "SignUpPage1"
|
|
207
203
|
},
|
|
208
204
|
"allowedVariants": {
|
|
209
205
|
"login": [
|
|
210
|
-
"
|
|
211
|
-
"
|
|
206
|
+
"card",
|
|
207
|
+
"social"
|
|
212
208
|
],
|
|
213
209
|
"register": [
|
|
214
210
|
"SignUpPage1"
|
package/recipes/sections.json
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"name": "testimonials",
|
|
8
8
|
"description": "Customer testimonials or social proof",
|
|
9
9
|
"elementType": "Testimonials",
|
|
10
|
-
"variants": ["
|
|
11
|
-
"defaultVariant": "
|
|
10
|
+
"variants": ["carousel", "bento"],
|
|
11
|
+
"defaultVariant": "carousel",
|
|
12
12
|
"propsHint": "title, badge, items[] (quote, author, role, avatar)",
|
|
13
13
|
"status": "held",
|
|
14
14
|
"reason": "bounded curation: no verified presentation bridge/provenance in the current composition and no verified backend/data source for the MVP"
|
package/scripts/composers.mjs
CHANGED
|
@@ -78,7 +78,7 @@ function isPlainObject(value) {
|
|
|
78
78
|
* Build the `composition.ts` composer: the installed manifest catalog features
|
|
79
79
|
* in stable order, plus their persisted config. This is the generation seam the
|
|
80
80
|
* catalog URL boundary consumes to reject parameters owned by a feature that is
|
|
81
|
-
* not installed, and the seam the single controlled `
|
|
81
|
+
* not installed, and the seam the single controlled `CategoryListing` reads to
|
|
82
82
|
* select its control visibility/config from the installed manifest only. It is
|
|
83
83
|
* derived from the manifest — never hardcoded as always-mounted.
|
|
84
84
|
*
|
|
@@ -116,7 +116,7 @@ export function buildCompositionComposer(features, views = []) {
|
|
|
116
116
|
`// Installed manifest catalog features, in stable order, with their persisted\n` +
|
|
117
117
|
`// config. This is the generation seam the catalog URL boundary consumes to\n` +
|
|
118
118
|
`// reject parameters owned by a feature that is not installed, and the seam the\n` +
|
|
119
|
-
`// single controlled
|
|
119
|
+
`// single controlled CategoryListing reads to select its control\n` +
|
|
120
120
|
`// visibility/config from the installed manifest only.\n\n` +
|
|
121
121
|
`import type { CatalogFeatureName } from '@thorprovider/runtime/contracts'\n\n` +
|
|
122
122
|
`export const mountedFeatures: readonly CatalogFeatureName[] = [${list}]\n\n` +
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// those mounts (E2 design Decision 2c / the task 6.3 M2 resolution).
|
|
12
12
|
//
|
|
13
13
|
// This is metadata only: no new operation, no block, no element. The base
|
|
14
|
-
// listing (`category.filter` rendering the one controlled `
|
|
14
|
+
// listing (`category.filter` rendering the one controlled `CategoryListing`)
|
|
15
15
|
// stays the view default; these controls only toggle visibility on it.
|
|
16
16
|
//
|
|
17
17
|
// IMPORT-CYCLE NOTE: this module is a LEAF. It deliberately does not import
|
|
@@ -26,14 +26,14 @@ import {
|
|
|
26
26
|
logicalControlFor,
|
|
27
27
|
} from './operation-registry.mjs'
|
|
28
28
|
|
|
29
|
-
/** The two E2 control contributions to the single `
|
|
29
|
+
/** The two E2 control contributions to the single `CategoryListing` listing. */
|
|
30
30
|
export const CATALOG_LOGICAL_CONTROLS = Object.freeze([
|
|
31
31
|
Object.freeze({
|
|
32
32
|
kind: LOGICAL_CONTROL_KIND,
|
|
33
33
|
feature: 'catalog-search',
|
|
34
34
|
host: 'category',
|
|
35
35
|
slot: 'search',
|
|
36
|
-
presentation: '
|
|
36
|
+
presentation: 'CategoryListing',
|
|
37
37
|
capability: 'category.search.apply',
|
|
38
38
|
}),
|
|
39
39
|
Object.freeze({
|
|
@@ -41,7 +41,7 @@ export const CATALOG_LOGICAL_CONTROLS = Object.freeze([
|
|
|
41
41
|
feature: 'category-filters',
|
|
42
42
|
host: 'category',
|
|
43
43
|
slot: 'filters',
|
|
44
|
-
presentation: '
|
|
44
|
+
presentation: 'CategoryListing',
|
|
45
45
|
capability: 'category.filter.apply',
|
|
46
46
|
}),
|
|
47
47
|
])
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// `slot`, `presentation`, optional `capability`). It carries no render-owned
|
|
23
23
|
// field (`block`, `element`), no behavior (`reducer`), and no operation. This
|
|
24
24
|
// is the distinction E2 relies on when it contributes search/filters to the
|
|
25
|
-
// single `
|
|
25
|
+
// single `CategoryListing` listing with no new operation (E2 design; E1
|
|
26
26
|
// Decision 16). Registering a whole view is the catalog's job, not this
|
|
27
27
|
// seam's, so a contribution that tries to carry a render field is rejected.
|
|
28
28
|
|
|
@@ -61,7 +61,7 @@ export function fragmentVariants(templateDir, slot) {
|
|
|
61
61
|
//
|
|
62
62
|
// A slot marked `nested: true` is a presentation slot that is rendered inside
|
|
63
63
|
// its host element (for example the category `productCard` inside the single
|
|
64
|
-
// `
|
|
64
|
+
// `CategoryListing` listing), so it has no top-level fragment and is skipped
|
|
65
65
|
// here: it stays in the ordered composition (it is a core registered slot) but
|
|
66
66
|
// contributes no top-level element, catalog entry, or route id.
|
|
67
67
|
export function resolveViewSelection(templateDir, selection = {}) {
|
|
@@ -209,7 +209,7 @@ function renderDataBoundElement(entry, def) {
|
|
|
209
209
|
* A slot marked `nested: true` (a presentation slot rendered inside its host
|
|
210
210
|
* element) stays in the ordered composition but is skipped at the top level, so
|
|
211
211
|
* it contributes no element, catalog entry, registry binding, or route id — the
|
|
212
|
-
* category `productCard` nested in `
|
|
212
|
+
* category `productCard` nested in `CategoryListing`. The default category
|
|
213
213
|
* composition therefore renders exactly the single `category.filter` element.
|
|
214
214
|
*
|
|
215
215
|
* Returns the raw source (placeholders intact); callers run
|
|
@@ -100,34 +100,30 @@
|
|
|
100
100
|
"category.filter": {
|
|
101
101
|
"default": "sidebar",
|
|
102
102
|
"intents": {
|
|
103
|
-
"inline": {
|
|
104
|
-
"variant": "CategoryFilter1",
|
|
105
|
-
"when": "A compact inline filter bar above the product grid."
|
|
106
|
-
},
|
|
107
103
|
"sidebar": {
|
|
108
|
-
"variant": "
|
|
109
|
-
"when": "A left sidebar with
|
|
104
|
+
"variant": "CategoryListing",
|
|
105
|
+
"when": "A persistent left sidebar with filters, price range, and sort controls."
|
|
110
106
|
},
|
|
111
|
-
"
|
|
112
|
-
"variant": "
|
|
113
|
-
"when": "
|
|
107
|
+
"toolbar": {
|
|
108
|
+
"variant": "CategoryListing",
|
|
109
|
+
"when": "A sticky toolbar with a filter drawer, active-filter chips, and a sort sheet."
|
|
114
110
|
}
|
|
115
111
|
}
|
|
116
112
|
},
|
|
117
113
|
"checkout.checkout": {
|
|
118
|
-
"default": "
|
|
114
|
+
"default": "multiStep",
|
|
119
115
|
"intents": {
|
|
120
116
|
"singlePage": {
|
|
121
|
-
"variant": "
|
|
122
|
-
"when": "A single-page checkout
|
|
117
|
+
"variant": "Checkout",
|
|
118
|
+
"when": "A single-page checkout with contact, shipping, and payment sections visible at once (canonical `presentation: 'single-page'`)."
|
|
123
119
|
},
|
|
124
120
|
"multiStep": {
|
|
125
|
-
"variant": "
|
|
126
|
-
"when": "A
|
|
121
|
+
"variant": "Checkout",
|
|
122
|
+
"when": "A step-by-step checkout that shows one step at a time (canonical `presentation: 'stepper'`)."
|
|
127
123
|
},
|
|
128
|
-
"
|
|
129
|
-
"variant": "
|
|
130
|
-
"when": "A
|
|
124
|
+
"reviewStep": {
|
|
125
|
+
"variant": "Checkout",
|
|
126
|
+
"when": "A step-by-step checkout that appends a confirmation review before submission (canonical `presentation: 'stepper'` with `showReviewStep`)."
|
|
131
127
|
}
|
|
132
128
|
}
|
|
133
129
|
},
|
|
@@ -135,7 +131,7 @@
|
|
|
135
131
|
"default": "signIn",
|
|
136
132
|
"intents": {
|
|
137
133
|
"signIn": {
|
|
138
|
-
"variant": "
|
|
134
|
+
"variant": "card",
|
|
139
135
|
"when": "A full sign-in page with email and password and a link to create an account."
|
|
140
136
|
}
|
|
141
137
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./catalog.schema.json",
|
|
3
3
|
"catalogVersion": 1,
|
|
4
|
-
"description": "Initial semantic executable catalog (E1 tasks 1.2-1.3), classified by source-shape inspection of the @thorprovider/blocks prop contracts and the view templates. Scope: every slot the curated MVP views (home, product, category, checkout, account) render by default, covering both the selectable archetype slots declared by recipes/archetypes.json and the nested default slots that have no archetype (category.productCard, checkout.confirmation) so no legacy default support is dropped. The account view
|
|
4
|
+
"description": "Initial semantic executable catalog (E1 tasks 1.2-1.3), classified by source-shape inspection of the @thorprovider/blocks prop contracts and the view templates. Scope: every slot the curated MVP views (home, product, category, checkout, account) render by default, covering both the selectable archetype slots declared by recipes/archetypes.json and the nested default slots that have no archetype (category.productCard, checkout.confirmation) so no legacy default support is dropped. The account view declares canonical LoginPage card/social presentations and SignUpPage1; legacy LoginPage1/LoginPage2 names resolve to card/social through legacyAliases, with social remaining held pending verified account lifecycle wiring. A variant is `executable` only when the slot's canonical data shape can feed its block props without a prop bridge and without inventing data; every other non-default variant is `held` with the specific reason. The one non-default structural choice is home.benefits, which selects between the two bounded presentations (`cards`, `split`) of the single canonical `Feature` block (identical item contract, no bridge); the retired numbered names `Feature1`/`Feature2` resolve through the slot's `legacyAliases`. E2 task 6.1 declares the base listing slot category.filter CategoryFilter2 as the single controlled listing (dataShape `CatalogQuery & CatalogResults`, state controlled) with the search/filter controls contributed by the logical mounts category.search / category.filters (no second block). Source-shape compatibility is not end-to-end backend behavior proof: the render is executable, but the category.search.apply / category.filter.apply actions remain held under the capability catalog (owner: storefront-catalog-search-filters, E2) until a real runtime proof. The `capabilities` map declares those operational capabilities with their requirements and verification state; E1 declares the held category.filter.apply action, E2 adds the held category.search.apply action and the held category.price.range capability that gates the category-filters showPrice option; no capability is claimed verified. The home.hero variants of the retired numbered family (StorefrontHero1/2/5/6) resolve through the slot's `legacyAliases` to the single canonical `StorefrontHero`, whose bounded presentation options (`compact`, `showcase`, `editorial`, `promotional`) preserve the four structural identities; the extended editorial/promotional sections render only from host-supplied data and are omitted otherwise. The category.productCard slot's retired numbered family (ProductCard1/2/3/5) and the previous `ProductCard` variant resolve through the slot's `legacyAliases` to the single canonical `ProductGrid` listing, which renders `ProductCard` item cells with bounded presentation options (`classic`, `minimal`, `rich`) that preserve the three structural identities; the rich presentation's wishlist and view-similar affordances are host-owned and optional, evidence (rating, badge, compare-at) renders only from host-supplied data, and the comparison-table variant `ProductCard5` was discarded as a listing controller, not a card presentation.",
|
|
5
5
|
"slots": {
|
|
6
6
|
"home.hero": {
|
|
7
7
|
"default": "StorefrontHero",
|
|
@@ -181,11 +181,14 @@
|
|
|
181
181
|
}
|
|
182
182
|
},
|
|
183
183
|
"category.filter": {
|
|
184
|
-
"default": "
|
|
184
|
+
"default": "CategoryListing",
|
|
185
|
+
"legacyAliases": {
|
|
186
|
+
"CategoryFilter2": "CategoryListing"
|
|
187
|
+
},
|
|
185
188
|
"variants": {
|
|
186
|
-
"
|
|
189
|
+
"CategoryListing": {
|
|
187
190
|
"status": "executable",
|
|
188
|
-
"block": "
|
|
191
|
+
"block": "CategoryListing",
|
|
189
192
|
"dataShape": "CatalogQuery & CatalogResults",
|
|
190
193
|
"events": [
|
|
191
194
|
"productClick",
|
|
@@ -205,32 +208,6 @@
|
|
|
205
208
|
"categoryQuery",
|
|
206
209
|
"facetSupport"
|
|
207
210
|
]
|
|
208
|
-
},
|
|
209
|
-
"CategoryFilter1": {
|
|
210
|
-
"status": "held",
|
|
211
|
-
"reason": "block requires categories/priceRanges/sortOptions with counts the canonical CardProduct[] listing does not supply; no verified prop bridge exists",
|
|
212
|
-
"block": "CategoryFilter",
|
|
213
|
-
"dataShape": "CategoryFilter1Filters",
|
|
214
|
-
"events": [
|
|
215
|
-
"filterChange"
|
|
216
|
-
],
|
|
217
|
-
"state": "uncontrolled",
|
|
218
|
-
"requirements": [
|
|
219
|
-
"categoryProducts"
|
|
220
|
-
]
|
|
221
|
-
},
|
|
222
|
-
"CategoryFilter4": {
|
|
223
|
-
"status": "held",
|
|
224
|
-
"reason": "block requires an advanced facets contract (modelTypes/rangeBands/frameSizes/colourways/features) the canonical listing does not supply; no verified prop bridge exists",
|
|
225
|
-
"block": "CategoryFilter",
|
|
226
|
-
"dataShape": "CategoryFilter4Facets",
|
|
227
|
-
"events": [
|
|
228
|
-
"filterChange"
|
|
229
|
-
],
|
|
230
|
-
"state": "uncontrolled",
|
|
231
|
-
"requirements": [
|
|
232
|
-
"categoryProducts"
|
|
233
|
-
]
|
|
234
211
|
}
|
|
235
212
|
}
|
|
236
213
|
},
|
|
@@ -262,45 +239,21 @@
|
|
|
262
239
|
}
|
|
263
240
|
},
|
|
264
241
|
"checkout.checkout": {
|
|
265
|
-
"default": "
|
|
242
|
+
"default": "Checkout",
|
|
243
|
+
"legacyAliases": {
|
|
244
|
+
"CheckoutForm1": "Checkout"
|
|
245
|
+
},
|
|
266
246
|
"variants": {
|
|
267
|
-
"
|
|
247
|
+
"Checkout": {
|
|
268
248
|
"status": "executable",
|
|
269
249
|
"block": "Checkout",
|
|
270
|
-
"dataShape": "
|
|
250
|
+
"dataShape": "CheckoutValues & CheckoutOrderSummary & PaymentMethod[]",
|
|
271
251
|
"events": [
|
|
272
252
|
"retryTotals",
|
|
273
253
|
"selectShippingOption",
|
|
274
254
|
"applyPromo",
|
|
275
|
-
"submit"
|
|
276
|
-
|
|
277
|
-
"state": "controlled",
|
|
278
|
-
"requirements": [
|
|
279
|
-
"checkoutCountries",
|
|
280
|
-
"checkoutPaymentMethods"
|
|
281
|
-
]
|
|
282
|
-
},
|
|
283
|
-
"CheckoutForm2": {
|
|
284
|
-
"status": "held",
|
|
285
|
-
"reason": "unproven checkout variant: E1 keeps only the default CheckoutForm1, whose behavior is unchanged; no verified prop bridge exists",
|
|
286
|
-
"block": "Checkout",
|
|
287
|
-
"dataShape": "CheckoutForm2Data",
|
|
288
|
-
"events": [
|
|
289
|
-
"submit"
|
|
290
|
-
],
|
|
291
|
-
"state": "controlled",
|
|
292
|
-
"requirements": [
|
|
293
|
-
"checkoutCountries",
|
|
294
|
-
"checkoutPaymentMethods"
|
|
295
|
-
]
|
|
296
|
-
},
|
|
297
|
-
"CheckoutForm3": {
|
|
298
|
-
"status": "held",
|
|
299
|
-
"reason": "unproven checkout variant: E1 keeps only the default CheckoutForm1, whose behavior is unchanged; no verified prop bridge exists",
|
|
300
|
-
"block": "Checkout",
|
|
301
|
-
"dataShape": "CheckoutForm3FormData",
|
|
302
|
-
"events": [
|
|
303
|
-
"submit"
|
|
255
|
+
"submit",
|
|
256
|
+
"stepChange"
|
|
304
257
|
],
|
|
305
258
|
"state": "controlled",
|
|
306
259
|
"requirements": [
|
|
@@ -328,12 +281,16 @@
|
|
|
328
281
|
}
|
|
329
282
|
},
|
|
330
283
|
"account.login": {
|
|
331
|
-
"default": "
|
|
284
|
+
"default": "card",
|
|
285
|
+
"legacyAliases": {
|
|
286
|
+
"LoginPage1": "card",
|
|
287
|
+
"LoginPage2": "social"
|
|
288
|
+
},
|
|
332
289
|
"variants": {
|
|
333
|
-
"
|
|
290
|
+
"card": {
|
|
334
291
|
"status": "executable",
|
|
335
|
-
"block": "
|
|
336
|
-
"dataShape": "
|
|
292
|
+
"block": "LoginPage",
|
|
293
|
+
"dataShape": "LoginPageFormData & AccountAuthResult",
|
|
337
294
|
"events": [
|
|
338
295
|
"submit",
|
|
339
296
|
"createAccount"
|
|
@@ -344,11 +301,11 @@
|
|
|
344
301
|
"accountAuthenticated"
|
|
345
302
|
]
|
|
346
303
|
},
|
|
347
|
-
"
|
|
304
|
+
"social": {
|
|
348
305
|
"status": "held",
|
|
349
|
-
"reason": "
|
|
350
|
-
"block": "
|
|
351
|
-
"dataShape": "
|
|
306
|
+
"reason": "The social presentation remains held for the Storefront account slot until social-auth lifecycle wiring is verified.",
|
|
307
|
+
"block": "LoginPage",
|
|
308
|
+
"dataShape": "LoginPageFormData & AccountAuthResult",
|
|
352
309
|
"events": [
|
|
353
310
|
"submit",
|
|
354
311
|
"forgotPassword",
|