@thorprovider/storefront 0.9.0 → 0.11.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 +8 -5
- package/assets/templates/app/app/globals.css +0 -1
- package/assets/templates/app/lib/__STOREFRONT__/account-session.core.ts +4 -2
- package/assets/templates/app/lib/__STOREFRONT__/account-user.core.ts +2 -1
- package/assets/templates/app/lib/__STOREFRONT__/actions.ts +130 -12
- package/assets/templates/app/lib/__STOREFRONT__/commerce.ts +156 -9
- package/assets/templates/app/lib/__STOREFRONT__/confirmation.core.ts +38 -3
- package/assets/templates/app/lib/__STOREFRONT__/fulfillment-evidence-port.ts +31 -0
- package/assets/templates/app/lib/__STOREFRONT__/handlers.core.ts +21 -4
- package/assets/templates/app/lib/__STOREFRONT__/mappers.ts +6 -2
- package/assets/templates/app/lib/__STOREFRONT__/order-detail-aftersales.ts +55 -0
- package/assets/templates/app/lib/__STOREFRONT__/order-detail-capabilities.ts +79 -0
- package/assets/templates/app/lib/__STOREFRONT__/order-detail-mapper.ts +653 -0
- package/assets/templates/app/lib/__STOREFRONT__/order-detail-money.ts +39 -0
- package/assets/templates/app/lib/__STOREFRONT__/order-detail-port.ts +6 -7
- package/assets/templates/app/lib/__STOREFRONT__/order-detail-reorder.ts +62 -0
- package/assets/templates/app/lib/__STOREFRONT__/ports.ts +13 -3
- package/assets/templates/views/account/assembly/assembly.json +0 -5
- package/assets/templates/views/account/assembly/index.skeleton.tsx +51 -0
- package/assets/templates/views/account/assembly/registry.skeleton.tsx +120 -68
- package/assets/templates/views/account/content.ts +13 -7
- package/assets/templates/views/account/fulfillment-evidence.client.tsx +34 -0
- package/assets/templates/views/account/fulfillment-evidence.defaults.ts +145 -0
- package/assets/templates/views/account/fulfillment-evidence.schema.ts +15 -0
- package/assets/templates/views/account/index.tsx +44 -3
- package/assets/templates/views/account/order-detail-flows.defaults.ts +106 -0
- package/assets/templates/views/account/order-detail-invoice.ts +136 -0
- package/assets/templates/views/account/order-detail-sheet.tsx +100 -0
- package/assets/templates/views/account/order-detail-sheets.tsx +122 -0
- package/assets/templates/views/account/order-detail.client.tsx +401 -1
- package/assets/templates/views/account/orders-advanced.client.tsx +10 -99
- package/assets/templates/views/account/orders-advanced.defaults.ts +7 -7
- package/assets/templates/views/account/registry.tsx +120 -69
- package/assets/templates/views/account/schema.ts +2 -0
- package/assets/templates/views/home/assembly/assembly.json +1 -1
- package/assets/templates/views/home/assembly/index.skeleton.tsx +3 -1
- package/assets/templates/views/home/assembly/registry.skeleton.tsx +1 -0
- package/assets/templates/views/home/assembly/slots/hero/UniversalBanner/binding.json +5 -0
- package/assets/templates/views/home/assembly/slots/hero/UniversalBanner/catalog.part +4 -0
- package/assets/templates/views/home/assembly/slots/hero/UniversalBanner/element.part +4 -0
- package/assets/templates/views/home/assembly/slots/hero/UniversalBanner/registry.part +10 -0
- package/assets/templates/views/home/content.ts +248 -2
- package/assets/templates/views/home/data.ts +10 -1
- package/assets/templates/views/home/index.tsx +7 -6
- package/assets/templates/views/home/props.ts +7 -1
- package/assets/templates/views/home/registry.tsx +11 -28
- package/assets/templates/views/home/schema.ts +163 -0
- package/assets/templates/views/product/data.ts +13 -6
- package/assets/templates/views/product/index.tsx +3 -3
- package/bin/storefront.js +18 -18
- package/package.json +1 -1
- package/recipes/adapter-surface.json +1 -0
- package/recipes/archetypes.json +5 -1
- package/recipes/catalog.json +9 -1
- package/recipes/recipes.json +5 -4
- package/scripts/candidate.mjs +59 -14
- package/scripts/file-classes.mjs +4 -0
- package/scripts/mock-capabilities.mjs +22 -0
- package/scripts/reconcile.mjs +5 -2
- package/scripts/render-templates.mjs +126 -43
- package/skills/sf-view-gen/assets/recipes/archetypes.json +5 -1
- package/skills/sf-view-gen/assets/recipes/catalog.json +9 -1
- package/skills/sf-view-gen/assets/recipes/recipes.json +5 -4
- package/assets/templates/views/account/assembly/slots/boot/AccountBoot/catalog.part +0 -5
- package/assets/templates/views/account/assembly/slots/boot/AccountBoot/element.part +0 -5
- package/assets/templates/views/account/assembly/slots/boot/AccountBoot/registry.part +0 -1
package/scripts/file-classes.mjs
CHANGED
|
@@ -69,6 +69,8 @@ const RULES = [
|
|
|
69
69
|
'app/lib/*/ports.ts',
|
|
70
70
|
'app/lib/*/orders-port.ts',
|
|
71
71
|
'app/lib/*/order-detail-port.ts',
|
|
72
|
+
'app/lib/*/order-detail-mapper.ts',
|
|
73
|
+
'app/lib/*/fulfillment-evidence-port.ts',
|
|
72
74
|
'app/lib/*/addresses-port.ts',
|
|
73
75
|
'app/lib/*/customer-profile-port.ts',
|
|
74
76
|
'app/lib/*/account-address.ts',
|
|
@@ -90,6 +92,8 @@ const RULES = [
|
|
|
90
92
|
'views/*/registry.tsx',
|
|
91
93
|
'views/*/orders-advanced.client.tsx',
|
|
92
94
|
'views/*/order-detail.client.tsx',
|
|
95
|
+
'views/*/fulfillment-evidence.client.tsx',
|
|
96
|
+
'views/*/fulfillment-evidence.schema.ts',
|
|
93
97
|
'views/*/*.defaults.ts',
|
|
94
98
|
'views/checkout/checkout-commerce-hosted.tsx',
|
|
95
99
|
// The views-root barrels are generated by reconcile (buildBarrel /
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// The mock provider's advertised backend capabilities, sorted the same way the
|
|
2
|
+
// live probe reports them.
|
|
3
|
+
//
|
|
4
|
+
// `setup` records this list when the store stays in mock mode. The mock is a
|
|
5
|
+
// real provider with a fixed contract — it supports the customer account
|
|
6
|
+
// surface (profile updates, address book, order history) and refuses the
|
|
7
|
+
// operations it cannot honor — so recording an empty list would hide working
|
|
8
|
+
// modules behind an install gate that assumes nothing works. The adapters
|
|
9
|
+
// package owns the contract (`MOCK_CAPABILITIES`); this list is its enabled
|
|
10
|
+
// flags, and `tests/mock-capabilities.contract.test.ts` fails if they drift.
|
|
11
|
+
export const MOCK_BACKEND_CAPABILITIES = Object.freeze([
|
|
12
|
+
'applyDiscounts',
|
|
13
|
+
'cancelOrder',
|
|
14
|
+
'defaultAddress',
|
|
15
|
+
'fetchOrders',
|
|
16
|
+
'guestCheckout',
|
|
17
|
+
'listPaymentProviders',
|
|
18
|
+
'manageAddresses',
|
|
19
|
+
'regionSpecificPayments',
|
|
20
|
+
'shippingCalculation',
|
|
21
|
+
'updateProfile',
|
|
22
|
+
])
|
package/scripts/reconcile.mjs
CHANGED
|
@@ -103,16 +103,19 @@ async function ensureLayoutAppend(targetDir, name, siteName, mode, dryRun) {
|
|
|
103
103
|
|
|
104
104
|
async function ensureGlobalsAppend(targetDir, name, siteName, dryRun) {
|
|
105
105
|
const globalsPath = path.join(targetDir, 'app', 'globals.css')
|
|
106
|
+
// The animation plugin is imported only when the project actually has it, so a
|
|
107
|
+
// stylesheet never references an uninstalled package (which fails the build).
|
|
108
|
+
const animations = existsSync(path.join(targetDir, 'node_modules', 'tw-animate-css'))
|
|
106
109
|
if (!existsSync(globalsPath)) {
|
|
107
110
|
if (dryRun) return true
|
|
108
111
|
const raw = await readFile(path.join(templatesRoot, 'app', 'app', 'globals.css'), 'utf8')
|
|
109
|
-
const content = injectGlobals(replacePlaceholders(raw, { name, siteName }))
|
|
112
|
+
const content = injectGlobals(replacePlaceholders(raw, { name, siteName }), { animations })
|
|
110
113
|
await mkdir(path.dirname(globalsPath), { recursive: true })
|
|
111
114
|
await writeFile(globalsPath, content)
|
|
112
115
|
return true
|
|
113
116
|
}
|
|
114
117
|
const existing = await readFile(globalsPath, 'utf8')
|
|
115
|
-
const content = injectGlobals(existing)
|
|
118
|
+
const content = injectGlobals(existing, { animations })
|
|
116
119
|
if (content === existing) return false
|
|
117
120
|
if (!dryRun) await writeFile(globalsPath, content)
|
|
118
121
|
return true
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
resolveViewGenerationSelection,
|
|
18
18
|
} from './view-selection.mjs'
|
|
19
19
|
import { getFeature } from '../recipes/validate.mjs'
|
|
20
|
-
import { fillMissingTokens } from './theme/css-theme.mjs'
|
|
21
|
-
import { REQUIRED_CSS_TOKENS, DEFAULT_GLOBALS_TOKENS } from './theme/tokens.mjs'
|
|
20
|
+
import { applyBlockDeclarations, fillMissingTokens, findBlock } from './theme/css-theme.mjs'
|
|
21
|
+
import { REQUIRED_CSS_TOKENS, DEFAULT_GLOBALS_TOKENS, RADIUS_SCALE } from './theme/tokens.mjs'
|
|
22
22
|
|
|
23
23
|
const here = path.dirname(fileURLToPath(import.meta.url))
|
|
24
24
|
const pkgRoot = path.resolve(here, '..')
|
|
@@ -183,22 +183,104 @@ const THEME_MODE_MARKER = "from 'next-themes'"
|
|
|
183
183
|
export const THEME_MODES = ['light', 'dark', 'system']
|
|
184
184
|
export const DEFAULT_THEME_MODE = 'system'
|
|
185
185
|
const GLOBALS_IMPORT = '@import "@thorprovider/blocks/styles.css";'
|
|
186
|
-
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
//
|
|
193
|
-
//
|
|
194
|
-
//
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
186
|
+
|
|
187
|
+
// The `.dark` class next-themes writes on <html> only selects the `.dark` token
|
|
188
|
+
// block when Tailwind knows the variant; without it the storefront renders the
|
|
189
|
+
// light tokens for every visitor regardless of the configured mode.
|
|
190
|
+
const GLOBALS_DARK_VARIANT = '@custom-variant dark (&:is(.dark *));'
|
|
191
|
+
|
|
192
|
+
// The base layer that gives the semantic utilities their meaning: `border`
|
|
193
|
+
// defaults to the border token instead of `currentColor`, and the page adopts
|
|
194
|
+
// the background/foreground tokens and the sans stack.
|
|
195
|
+
const GLOBALS_BASE_LAYER = `@layer base {
|
|
196
|
+
* {
|
|
197
|
+
@apply border-border outline-ring/50;
|
|
198
|
+
}
|
|
199
|
+
body {
|
|
200
|
+
@apply bg-background text-foreground font-sans;
|
|
201
|
+
}
|
|
200
202
|
}`
|
|
201
203
|
|
|
204
|
+
// The animation utilities the blocks use (`animate-in`, `fade-in-0`, …) come from
|
|
205
|
+
// tw-animate-css. The import is added only when the dependency is installed, so a
|
|
206
|
+
// stylesheet never references a package the project does not have.
|
|
207
|
+
const GLOBALS_ANIMATION_IMPORT = '@import "tw-animate-css";'
|
|
208
|
+
|
|
209
|
+
// Insert lines directly after the last `@import` (CSS requires imports first), or
|
|
210
|
+
// at the top when the stylesheet has none yet.
|
|
211
|
+
function insertAfterImports(css, ...inserts) {
|
|
212
|
+
const lines = css.split('\n')
|
|
213
|
+
let lastImport = -1
|
|
214
|
+
for (let i = 0; i < lines.length; i++) {
|
|
215
|
+
if (lines[i].trimStart().startsWith('@import ')) lastImport = i
|
|
216
|
+
}
|
|
217
|
+
lines.splice(lastImport >= 0 ? lastImport + 1 : 0, 0, ...inserts)
|
|
218
|
+
return lines.join('\n')
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const hasDependency = (targetDir, name) => existsSync(path.join(targetDir, 'node_modules', name))
|
|
222
|
+
|
|
223
|
+
// create-next-app's OS-driven palette override. It is removed because the
|
|
224
|
+
// storefront's mode is a site setting owned by app/globals.css: leaving it in
|
|
225
|
+
// paints the page with the visitor's OS palette and flattens every token.
|
|
226
|
+
const CNA_DARK_MEDIA = '@media (prefers-color-scheme: dark)'
|
|
227
|
+
const CNA_DARK_BODY = ':root{--background:#0a0a0a;--foreground:#ededed;}'
|
|
228
|
+
// create-next-app's hard-coded body font, which would override the base layer's
|
|
229
|
+
// `font-sans` for the whole page.
|
|
230
|
+
const CNA_BODY_FONT = /^[ \t]*font-family:\s*Arial,\s*Helvetica,\s*sans-serif;\s*$/m
|
|
231
|
+
|
|
232
|
+
const normalizeCss = (value) =>
|
|
233
|
+
value.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\s+/g, '').trim()
|
|
234
|
+
|
|
235
|
+
// Drop create-next-app's dark-scheme block and Arial body font, keeping any
|
|
236
|
+
// developer-owned override: a `prefers-color-scheme` block is removed only when
|
|
237
|
+
// its body is exactly create-next-app's, and only the known font declaration is
|
|
238
|
+
// stripped from `body`.
|
|
239
|
+
function stripCreateNextAppOverrides(css) {
|
|
240
|
+
let out = css
|
|
241
|
+
for (;;) {
|
|
242
|
+
const block = findBlock(out, CNA_DARK_MEDIA)
|
|
243
|
+
if (!block || normalizeCss(out.slice(block.bodyStart, block.bodyEnd)) !== CNA_DARK_BODY) break
|
|
244
|
+
out = `${out.slice(0, block.start)}${out.slice(block.end)}`.replace(/\n{3,}/g, '\n\n')
|
|
245
|
+
}
|
|
246
|
+
return out.replace(CNA_BODY_FONT, '')
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// The `@theme inline` bridge every block utility resolves against: `bg-card`,
|
|
250
|
+
// `border-border`, `text-muted-foreground`, `rounded-lg`, … all need an entry
|
|
251
|
+
// here. A create-next-app stylesheet maps only background/foreground, so the
|
|
252
|
+
// scaffold owns the rest and adds just the mappings that are missing — a preset
|
|
253
|
+
// (or a developer) that already mapped a name keeps its own value.
|
|
254
|
+
function ensureThemeBridge(css) {
|
|
255
|
+
const mapped = new Set()
|
|
256
|
+
for (const match of css.matchAll(/--((?:color|radius)-[\w-]+)\s*:/g)) mapped.add(match[1])
|
|
257
|
+
|
|
258
|
+
const inserts = []
|
|
259
|
+
for (const token of REQUIRED_CSS_TOKENS) {
|
|
260
|
+
if (mapped.has(`color-${token}`)) continue
|
|
261
|
+
inserts.push({ name: `--color-${token}`, value: `var(--${token})` })
|
|
262
|
+
}
|
|
263
|
+
for (const [step, value] of Object.entries(RADIUS_SCALE)) {
|
|
264
|
+
const name = `radius-${step}`
|
|
265
|
+
if (mapped.has(name)) continue
|
|
266
|
+
inserts.push({ name: `--${name}`, value })
|
|
267
|
+
}
|
|
268
|
+
if (inserts.length === 0) return css
|
|
269
|
+
return applyBlockDeclarations(css, '@theme inline', inserts)
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// `@custom-variant` and `@layer` must follow the imports; both are inserted once
|
|
273
|
+
// and never rewritten, so a preset- or developer-authored variant survives.
|
|
274
|
+
function ensureDarkVariant(css) {
|
|
275
|
+
if (/@custom-variant\s+dark\b/.test(css)) return css
|
|
276
|
+
return insertAfterImports(css, `\n${GLOBALS_DARK_VARIANT}`)
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function ensureBaseLayer(css) {
|
|
280
|
+
if (/@apply\s+border-border\b/.test(css)) return css
|
|
281
|
+
return `${css.replace(/\s*$/, '')}\n\n${GLOBALS_BASE_LAYER}\n`
|
|
282
|
+
}
|
|
283
|
+
|
|
202
284
|
/**
|
|
203
285
|
* Idempotently inject the storefront provider wiring into an existing
|
|
204
286
|
* app/layout.tsx (the create-next-app default). Adds the provider and registry
|
|
@@ -340,35 +422,32 @@ export function injectThemeMode(content, mode = DEFAULT_THEME_MODE) {
|
|
|
340
422
|
|
|
341
423
|
/**
|
|
342
424
|
* Idempotently complete an existing app/globals.css (produced by create-next-app
|
|
343
|
-
* + shadcn init):
|
|
344
|
-
*
|
|
345
|
-
* `:root` / `.dark
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
425
|
+
* + shadcn init): ensure the blocks stylesheet import, the `.dark` variant, the
|
|
426
|
+
* full `@theme inline` bridge and the base layer, then fill every missing
|
|
427
|
+
* required token declaration in `:root` / `.dark`. create-next-app's own OS
|
|
428
|
+
* palette override and Arial body font are removed so the storefront tokens are
|
|
429
|
+
* the only visual source. Existing declarations are never replaced — a
|
|
430
|
+
* developer's customized value always wins — and the result is stable across
|
|
431
|
+
* repeated runs.
|
|
350
432
|
*/
|
|
351
|
-
export function injectGlobals(content) {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
if (lines[i].trimStart().startsWith('@import ')) lastImport = i
|
|
356
|
-
}
|
|
357
|
-
let out
|
|
358
|
-
if (content.includes(GLOBALS_IMPORT)) {
|
|
359
|
-
out = content
|
|
360
|
-
} else if (lastImport >= 0) {
|
|
361
|
-
lines.splice(lastImport + 1, 0, GLOBALS_IMPORT)
|
|
362
|
-
out = lines.join('\n')
|
|
363
|
-
} else {
|
|
364
|
-
out = `${GLOBALS_IMPORT}\n${content}`
|
|
433
|
+
export function injectGlobals(content, { animations = false } = {}) {
|
|
434
|
+
let out = content.includes(GLOBALS_IMPORT) ? content : insertAfterImports(content, GLOBALS_IMPORT)
|
|
435
|
+
if (animations && !out.includes(GLOBALS_ANIMATION_IMPORT)) {
|
|
436
|
+
out = insertAfterImports(out, GLOBALS_ANIMATION_IMPORT)
|
|
365
437
|
}
|
|
366
438
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
439
|
+
out = stripCreateNextAppOverrides(out)
|
|
440
|
+
out = ensureDarkVariant(out)
|
|
441
|
+
out = ensureThemeBridge(out)
|
|
442
|
+
out = ensureBaseLayer(out)
|
|
370
443
|
|
|
371
|
-
|
|
444
|
+
// `--radius` is not a color token, but the radius bridge above resolves
|
|
445
|
+
// against it and a create-next-app stylesheet never declares it.
|
|
446
|
+
const defaults = {
|
|
447
|
+
light: { ...DEFAULT_GLOBALS_TOKENS.light, radius: '0.5rem' },
|
|
448
|
+
dark: DEFAULT_GLOBALS_TOKENS.dark,
|
|
449
|
+
}
|
|
450
|
+
return fillMissingTokens(out, [...REQUIRED_CSS_TOKENS, 'radius'], defaults)
|
|
372
451
|
}
|
|
373
452
|
|
|
374
453
|
/**
|
|
@@ -490,15 +569,19 @@ async function ensureLayoutAppend(targetDir, name, siteName, mode = DEFAULT_THEM
|
|
|
490
569
|
async function ensureGlobalsAppend(targetDir, name, siteName) {
|
|
491
570
|
const globalsPath = path.join(targetDir, 'app', 'globals.css')
|
|
492
571
|
const templatePath = path.join(templatesRoot, 'app', 'app', 'globals.css')
|
|
572
|
+
const animations = hasDependency(targetDir, 'tw-animate-css')
|
|
493
573
|
if (!existsSync(globalsPath)) {
|
|
494
574
|
const raw = await readFile(templatePath, 'utf8')
|
|
495
575
|
// Run the completeness fill on the fallback template too, so a fresh project
|
|
496
576
|
// and a shadcn-generated one end with the same required token set.
|
|
497
|
-
await writeFile(
|
|
577
|
+
await writeFile(
|
|
578
|
+
globalsPath,
|
|
579
|
+
injectGlobals(replacePlaceholders(raw, { name, siteName }), { animations }),
|
|
580
|
+
)
|
|
498
581
|
return
|
|
499
582
|
}
|
|
500
583
|
const existing = await readFile(globalsPath, 'utf8')
|
|
501
|
-
const injected = injectGlobals(existing)
|
|
584
|
+
const injected = injectGlobals(existing, { animations })
|
|
502
585
|
if (injected !== existing) await writeFile(globalsPath, injected)
|
|
503
586
|
}
|
|
504
587
|
|
|
@@ -4,8 +4,12 @@
|
|
|
4
4
|
"description": "Archetype (intent) layer. Maps a slot to named intents so selection is by meaning, not by variant ordinal. Each intent resolves to a variant that MUST be allowed by the recipe for that slot.",
|
|
5
5
|
"slots": {
|
|
6
6
|
"home.hero": {
|
|
7
|
-
"default": "
|
|
7
|
+
"default": "campaign",
|
|
8
8
|
"intents": {
|
|
9
|
+
"campaign": {
|
|
10
|
+
"variant": "UniversalBanner",
|
|
11
|
+
"when": "A deal-forward multi-banner campaign wall grounded in the connected catalog (universal-banner family)."
|
|
12
|
+
},
|
|
9
13
|
"compact": {
|
|
10
14
|
"variant": "StorefrontHero",
|
|
11
15
|
"when": "A simple, text-forward hero with a single call to action (canonical `presentation: 'compact'`)."
|
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
"default": "
|
|
7
|
+
"default": "UniversalBanner",
|
|
8
8
|
"legacyAliases": {
|
|
9
9
|
"StorefrontHero1": "StorefrontHero",
|
|
10
10
|
"StorefrontHero2": "StorefrontHero",
|
|
@@ -31,6 +31,14 @@
|
|
|
31
31
|
"requirements": [
|
|
32
32
|
"heroProducts"
|
|
33
33
|
]
|
|
34
|
+
},
|
|
35
|
+
"UniversalBanner": {
|
|
36
|
+
"status": "executable",
|
|
37
|
+
"block": "UniversalBanner",
|
|
38
|
+
"dataShape": "UniversalBannerData",
|
|
39
|
+
"events": [],
|
|
40
|
+
"state": "uncontrolled",
|
|
41
|
+
"requirements": []
|
|
34
42
|
}
|
|
35
43
|
}
|
|
36
44
|
},
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
"categories"
|
|
14
14
|
],
|
|
15
15
|
"defaultVariants": {
|
|
16
|
-
"hero": "
|
|
16
|
+
"hero": "UniversalBanner",
|
|
17
17
|
"benefits": "cards",
|
|
18
18
|
"categories": "CategoryGrid"
|
|
19
19
|
},
|
|
20
20
|
"allowedVariants": {
|
|
21
21
|
"hero": [
|
|
22
|
-
"StorefrontHero"
|
|
22
|
+
"StorefrontHero",
|
|
23
|
+
"UniversalBanner"
|
|
23
24
|
],
|
|
24
25
|
"benefits": [
|
|
25
26
|
"cards",
|
|
@@ -55,8 +56,8 @@
|
|
|
55
56
|
],
|
|
56
57
|
"defaultSections": [
|
|
57
58
|
{
|
|
58
|
-
"type": "
|
|
59
|
-
"after": "
|
|
59
|
+
"type": "products",
|
|
60
|
+
"after": "benefits"
|
|
60
61
|
}
|
|
61
62
|
],
|
|
62
63
|
"maxSections": 4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
AccountBoot: ({ emit }) => <AccountBoundary emit={emit} />,
|