@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.
- package/README.md +22 -2
- package/assets/templates/AGENTS.md +14 -2
- package/assets/templates/app/app/[[...slug]]/page.tsx +9 -2
- package/assets/templates/app/lib/__STOREFRONT__/account-address.ts +129 -0
- package/assets/templates/app/lib/__STOREFRONT__/account-lifecycle.client.tsx +2 -2
- package/assets/templates/app/lib/__STOREFRONT__/account-private.core.ts +143 -0
- package/assets/templates/app/lib/__STOREFRONT__/account-profile.ts +220 -0
- package/assets/templates/app/lib/__STOREFRONT__/actions.ts +1234 -75
- package/assets/templates/app/lib/__STOREFRONT__/addresses-port.ts +107 -0
- package/assets/templates/app/lib/__STOREFRONT__/checkout-shipping.core.ts +37 -0
- package/assets/templates/app/lib/__STOREFRONT__/commerce.ts +460 -35
- package/assets/templates/app/lib/__STOREFRONT__/confirmation.core.ts +240 -0
- package/assets/templates/app/lib/__STOREFRONT__/customer-profile-port.ts +103 -0
- package/assets/templates/app/lib/__STOREFRONT__/order-detail-port.ts +26 -0
- package/assets/templates/app/lib/__STOREFRONT__/orders-port.ts +30 -0
- package/assets/templates/app/lib/__STOREFRONT__/ports.ts +18 -0
- package/assets/templates/app/lib/__STOREFRONT__/projection-ownership.client.tsx +4 -4
- package/assets/templates/app/lib/__STOREFRONT__/session.ts +24 -6
- package/assets/templates/app/lib/__STOREFRONT__/state.core.ts +28 -1
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/address-book-advanced.client.tsx +29 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/checkout-commerce-v1.client.tsx +19 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/checkout-commerce-v1.tsx +16 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/customer-profile.client.tsx +27 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/index.ts +5 -1
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/marketplace-product-card.client.tsx +19 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/marketplace-product-card.tsx +16 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/mega-menu-universal.client.tsx +19 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/mega-menu-universal.tsx +16 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.address-book-advanced.ts +437 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.checkout-commerce-v1.ts +398 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.customer-profile.ts +138 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.marketplace-product-card.ts +67 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.mega-menu-universal.ts +76 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.universal-banner.ts +217 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-banner.client.tsx +24 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-banner.tsx +16 -0
- package/assets/templates/features/checkout/handlers.ts +348 -33
- package/assets/templates/features/checkout/state.ts +79 -3
- package/assets/templates/features/customer-addresses/handlers.ts +11 -0
- package/assets/templates/features/customer-addresses/state.ts +33 -0
- package/assets/templates/features/customer-auth/state.ts +10 -0
- package/assets/templates/features/customer-profile/handlers.ts +11 -0
- package/assets/templates/features/customer-profile/state.ts +18 -0
- package/assets/templates/views/account/address-book-advanced.defaults.ts +534 -0
- package/assets/templates/views/account/assembly/assembly.json +41 -0
- package/assets/templates/views/account/assembly/index.skeleton.tsx +229 -0
- package/assets/templates/views/account/assembly/registry.skeleton.tsx +1116 -0
- package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/binding.json +5 -0
- package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/catalog.part +4 -0
- package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/element.part +5 -0
- package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/registry.part +1 -0
- package/assets/templates/views/account/assembly/slots/addresses/cards/catalog.part +5 -0
- package/assets/templates/views/account/assembly/slots/addresses/cards/element.part +10 -0
- package/assets/templates/views/account/assembly/slots/addresses/cards/registry.part +1 -0
- package/assets/templates/views/account/assembly/slots/boot/AccountBoot/catalog.part +5 -0
- package/assets/templates/views/account/assembly/slots/boot/AccountBoot/element.part +5 -0
- package/assets/templates/views/account/assembly/slots/boot/AccountBoot/registry.part +1 -0
- package/assets/templates/views/account/assembly/slots/login/card/catalog.part +4 -0
- package/assets/templates/views/account/assembly/slots/login/card/element.part +13 -0
- package/assets/templates/views/account/assembly/slots/login/card/registry.part +1 -0
- package/assets/templates/views/account/assembly/slots/orders/OrderHistory/catalog.part +5 -0
- package/assets/templates/views/account/assembly/slots/orders/OrderHistory/element.part +5 -0
- package/assets/templates/views/account/assembly/slots/orders/OrderHistory/registry.part +2 -0
- package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/binding.json +5 -0
- package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/catalog.part +5 -0
- package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/element.part +5 -0
- package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/registry.part +1 -0
- package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/binding.json +5 -0
- package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/catalog.part +4 -0
- package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/element.part +5 -0
- package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/registry.part +1 -0
- package/assets/templates/views/account/assembly/slots/profile/form/catalog.part +5 -0
- package/assets/templates/views/account/assembly/slots/profile/form/element.part +10 -0
- package/assets/templates/views/account/assembly/slots/profile/form/registry.part +1 -0
- package/assets/templates/views/account/assembly/slots/register/SignUpPage1/catalog.part +4 -0
- package/assets/templates/views/account/assembly/slots/register/SignUpPage1/element.part +13 -0
- package/assets/templates/views/account/assembly/slots/register/SignUpPage1/registry.part +1 -0
- package/assets/templates/views/account/assembly/slots/summary/stack/catalog.part +5 -0
- package/assets/templates/views/account/assembly/slots/summary/stack/element.part +5 -0
- package/assets/templates/views/account/assembly/slots/summary/stack/registry.part +1 -0
- package/assets/templates/views/account/assembly/slots/summary/tabs/catalog.part +5 -0
- package/assets/templates/views/account/assembly/slots/summary/tabs/element.part +5 -0
- package/assets/templates/views/account/assembly/slots/summary/tabs/registry.part +1 -0
- package/assets/templates/views/account/content.ts +326 -0
- package/assets/templates/views/account/customer-profile.defaults.ts +136 -0
- package/assets/templates/views/account/index.tsx +218 -35
- package/assets/templates/views/account/order-detail.client.tsx +35 -0
- package/assets/templates/views/account/order-detail.defaults.ts +457 -0
- package/assets/templates/views/account/orders-advanced.client.tsx +166 -0
- package/assets/templates/views/account/orders-advanced.defaults.ts +230 -0
- package/assets/templates/views/account/registry.tsx +944 -369
- package/assets/templates/views/account/schema.ts +50 -0
- package/assets/templates/views/account/sections-data.ts +2 -0
- package/assets/templates/views/cart/content.ts +1 -0
- package/assets/templates/views/category/assembly/index.skeleton.tsx +1 -0
- package/assets/templates/views/category/assembly/slots/filter/CategoryListing/element.part +1 -0
- package/assets/templates/views/category/content.ts +2 -0
- package/assets/templates/views/category/index.tsx +2 -0
- package/assets/templates/views/category/sections-data.ts +2 -0
- package/assets/templates/views/checkout/checkout-commerce-hosted.tsx +1089 -0
- package/assets/templates/views/checkout/content.ts +114 -2
- package/assets/templates/views/checkout/index.tsx +7 -1
- package/assets/templates/views/checkout/props.ts +70 -22
- package/assets/templates/views/checkout/registry.tsx +400 -71
- package/assets/templates/views/checkout/schema.ts +260 -9
- package/assets/templates/views/home/assembly/assembly.json +28 -0
- package/assets/templates/views/home/assembly/index.skeleton.tsx +1 -0
- package/assets/templates/views/home/content.ts +2 -0
- package/assets/templates/views/home/index.tsx +1 -0
- package/assets/templates/views/home/sections-data.ts +2 -0
- package/assets/templates/views/product/content.ts +1 -0
- package/assets/templates/views/static/content.ts +1 -0
- package/bin/storefront.js +343 -13
- package/package.json +2 -1
- package/recipes/adapter-surface.json +158 -0
- package/recipes/archetypes.json +38 -3
- package/recipes/catalog.json +138 -1
- package/recipes/feature.schema.json +9 -0
- package/recipes/features.json +72 -1
- package/recipes/manifest.schema.json +5 -0
- package/recipes/recipe.schema.json +14 -2
- package/recipes/recipes.json +35 -5
- package/recipes/section.schema.json +112 -0
- package/recipes/sections.json +289 -3
- package/recipes/validate.mjs +83 -1
- package/scripts/adapter-surface.mjs +41 -0
- package/scripts/agent-blocks.mjs +700 -0
- package/scripts/block-validator.mjs +45 -0
- package/scripts/candidate.mjs +5 -4
- package/scripts/composers.mjs +7 -2
- package/scripts/default-sections.mjs +78 -0
- package/scripts/file-classes.mjs +15 -0
- package/scripts/generate-adapter-surface.mjs +148 -0
- package/scripts/operations.mjs +100 -0
- package/scripts/reconcile.mjs +67 -39
- package/scripts/section-configure.mjs +316 -0
- package/scripts/sync-assets.mjs +1 -0
- package/scripts/view-assembly.mjs +101 -14
- package/skills/sf-feature/SKILL.md +19 -0
- package/skills/sf-view-gen/SKILL.md +79 -7
- package/skills/sf-view-gen/assets/recipes/archetypes.json +38 -3
- package/skills/sf-view-gen/assets/recipes/catalog.json +138 -1
- package/skills/sf-view-gen/assets/recipes/features.json +72 -1
- package/skills/sf-view-gen/assets/recipes/recipes.json +35 -5
- package/skills/sf-view-gen/assets/recipes/section.schema.json +112 -0
- package/skills/sf-view-gen/assets/recipes/sections.json +289 -3
- package/skills/sf-view-gen/assets/templates/views/sections/checkout-commerce-v1.client.tsx +19 -0
- package/skills/sf-view-gen/assets/templates/views/sections/checkout-commerce-v1.tsx +16 -0
- package/skills/sf-view-gen/assets/templates/views/sections/marketplace-product-card.client.tsx +19 -0
- package/skills/sf-view-gen/assets/templates/views/sections/marketplace-product-card.tsx +16 -0
- package/skills/sf-view-gen/assets/templates/views/sections/mega-menu-universal.client.tsx +19 -0
- package/skills/sf-view-gen/assets/templates/views/sections/mega-menu-universal.tsx +16 -0
- package/skills/sf-view-gen/assets/templates/views/sections/schema.checkout-commerce-v1.ts +398 -0
- package/skills/sf-view-gen/assets/templates/views/sections/schema.marketplace-product-card.ts +67 -0
- package/skills/sf-view-gen/assets/templates/views/sections/schema.mega-menu-universal.ts +76 -0
- package/skills/sf-view-gen/assets/templates/views/sections/schema.universal-banner.ts +217 -0
- package/skills/sf-view-gen/assets/templates/views/sections/universal-banner.client.tsx +24 -0
- package/skills/sf-view-gen/assets/templates/views/sections/universal-banner.tsx +16 -0
- package/skills/sf-view-gen/scripts/validate.mjs +83 -1
- package/skills/storefront-workflow/SKILL.md +5 -0
- package/skills/storefront-workflow/references/mobile-responsiveness.md +1 -1
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
// selectable set is exactly the fragment set, which a parity test pins to the
|
|
18
18
|
// semantic catalog's `executable` entries.
|
|
19
19
|
|
|
20
|
-
import { existsSync, readFileSync, readdirSync } from 'node:fs'
|
|
20
|
+
import { existsSync, lstatSync, readFileSync, readdirSync } from 'node:fs'
|
|
21
21
|
import { mkdir, writeFile } from 'node:fs/promises'
|
|
22
22
|
import path from 'node:path'
|
|
23
|
-
import { isSlotSectionEntry } from './section-compat.mjs'
|
|
23
|
+
import { isEditorialSectionEntry, isSlotSectionEntry } from './section-compat.mjs'
|
|
24
24
|
import { resolveLegacyVariant } from '../recipes/validate.mjs'
|
|
25
25
|
|
|
26
26
|
export const ASSEMBLY_DIRNAME = 'assembly'
|
|
@@ -124,8 +124,7 @@ function renderBlockImports(bindings) {
|
|
|
124
124
|
|
|
125
125
|
// The import line that lets an editorial element read its user-owned instance
|
|
126
126
|
// content from the view's `content.ts` (`sectionContent[id]`). Emitted only when
|
|
127
|
-
// the ordered composition contains at least one editorial instance
|
|
128
|
-
// default (slot-only) composition keeps its exact output.
|
|
127
|
+
// the ordered composition contains at least one editorial instance.
|
|
129
128
|
function renderSectionImports(modules) {
|
|
130
129
|
const lines = [...modules]
|
|
131
130
|
.sort((a, b) => a.localeCompare(b))
|
|
@@ -144,6 +143,17 @@ function renderSectionRegistryImports(byModule) {
|
|
|
144
143
|
|
|
145
144
|
const SECTION_CONTENT_EXPORT = 'sectionContent'
|
|
146
145
|
|
|
146
|
+
// JSON string contents safely escape backslashes, quotes, and control chars.
|
|
147
|
+
// Keep the surrounding single quotes so ordinary generated output is unchanged.
|
|
148
|
+
function tsStringLiteral(value) {
|
|
149
|
+
const contents = JSON.stringify(value)
|
|
150
|
+
.slice(1, -1)
|
|
151
|
+
.replace(/'/g, "\\'")
|
|
152
|
+
.replace(/\u2028/g, '\\u2028')
|
|
153
|
+
.replace(/\u2029/g, '\\u2029')
|
|
154
|
+
return `'${contents}'`
|
|
155
|
+
}
|
|
156
|
+
|
|
147
157
|
// One editorial instance's element: a persisted instance id, the section's
|
|
148
158
|
// registered element type, and its props read from the view's user-owned
|
|
149
159
|
// `content.ts` by id (falling back to the section fragment's declared neutral
|
|
@@ -151,8 +161,9 @@ const SECTION_CONTENT_EXPORT = 'sectionContent'
|
|
|
151
161
|
function renderEditorialElement(entry, def) {
|
|
152
162
|
const fallback =
|
|
153
163
|
typeof def.defaultProps === 'string' && def.defaultProps.length > 0 ? def.defaultProps : '{}'
|
|
154
|
-
const
|
|
155
|
-
|
|
164
|
+
const id = tsStringLiteral(entry.id)
|
|
165
|
+
const props = `sectionData[${id}] ?? ${SECTION_CONTENT_EXPORT}[${id}] ?? ${fallback}`
|
|
166
|
+
return ` ${id}: {\n type: '${def.elementType}',\n props: ${props},\n },`
|
|
156
167
|
}
|
|
157
168
|
|
|
158
169
|
// One editorial instance's client registry binding: the section element type
|
|
@@ -177,16 +188,17 @@ function renderDataBoundElement(entry, def) {
|
|
|
177
188
|
`Data-bound section "${entry.type}" instance "${entry.id}" has no variant and no declared defaultVariant.`,
|
|
178
189
|
)
|
|
179
190
|
}
|
|
191
|
+
const id = tsStringLiteral(entry.id)
|
|
180
192
|
return [
|
|
181
|
-
`
|
|
193
|
+
` ${id}: {`,
|
|
182
194
|
` type: '${def.elementType}',`,
|
|
183
195
|
` props: {`,
|
|
184
|
-
` ...(${SECTION_CONTENT_EXPORT}[
|
|
185
|
-
` sectionId:
|
|
196
|
+
` ...(${SECTION_CONTENT_EXPORT}[${id}] ?? {}),`,
|
|
197
|
+
` sectionId: ${id},`,
|
|
186
198
|
` sectionType: '${entry.type}',`,
|
|
187
199
|
` variant: '${variant}',`,
|
|
188
|
-
` products: { $state:
|
|
189
|
-
` status: { $state:
|
|
200
|
+
` products: { $state: ${tsStringLiteral(`/sections/${entry.id}/products`)} },`,
|
|
201
|
+
` status: { $state: ${tsStringLiteral(`/sections/${entry.id}/status`)} },`,
|
|
190
202
|
` },`,
|
|
191
203
|
` on: { addClickedToCart: { action: 'addClickedToCart' }, openProduct: { action: 'openProduct' } },`,
|
|
192
204
|
` },`,
|
|
@@ -264,7 +276,7 @@ export function assembleView(templateDir, selection = {}, sections = null) {
|
|
|
264
276
|
if (existsSync(bindingPath)) {
|
|
265
277
|
bindings.push(JSON.parse(readFileSync(bindingPath, 'utf8')))
|
|
266
278
|
}
|
|
267
|
-
slotIds.push(
|
|
279
|
+
slotIds.push(tsStringLiteral(slot.id))
|
|
268
280
|
continue
|
|
269
281
|
}
|
|
270
282
|
const def = sectionMeta[entry.type]
|
|
@@ -285,10 +297,10 @@ export function assembleView(templateDir, selection = {}, sections = null) {
|
|
|
285
297
|
// duplicate object keys in the derived `registry.tsx`.
|
|
286
298
|
if (registryTypes.has(def.elementType)) registry.pop()
|
|
287
299
|
else registryTypes.add(def.elementType)
|
|
288
|
-
slotIds.push(
|
|
300
|
+
slotIds.push(tsStringLiteral(entry.id))
|
|
289
301
|
sectionPropsModules.add(def.propsModule ?? './content')
|
|
290
302
|
sectionRegistryImports.set(def.registryModule, def.registryExport)
|
|
291
|
-
if (def.dataBound === true) dataBoundIds.push(
|
|
303
|
+
if (def.dataBound === true) dataBoundIds.push(tsStringLiteral(entry.id))
|
|
292
304
|
}
|
|
293
305
|
|
|
294
306
|
const indexSkeleton = readFileSync(path.join(assemblyDir(templateDir), 'index.skeleton.tsx'), 'utf8')
|
|
@@ -343,3 +355,78 @@ export async function writeViewAssembly({
|
|
|
343
355
|
}
|
|
344
356
|
return changed
|
|
345
357
|
}
|
|
358
|
+
|
|
359
|
+
function safeSidecarId(id) {
|
|
360
|
+
return (
|
|
361
|
+
typeof id === 'string' &&
|
|
362
|
+
id.trim().length > 0 &&
|
|
363
|
+
id !== '.' &&
|
|
364
|
+
id !== '..' &&
|
|
365
|
+
!id.includes('..') &&
|
|
366
|
+
!id.includes('/') &&
|
|
367
|
+
!id.includes('\\') &&
|
|
368
|
+
!id.includes('\0') &&
|
|
369
|
+
!id.startsWith('slot:')
|
|
370
|
+
)
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function renderSectionsData(imports) {
|
|
374
|
+
const lines = ['// Generated by @thorprovider/storefront. Do not edit directly.']
|
|
375
|
+
for (const entry of imports) {
|
|
376
|
+
lines.push(`import sectionData${entry.index} from ${tsStringLiteral(entry.module)}`)
|
|
377
|
+
}
|
|
378
|
+
if (imports.length === 0) {
|
|
379
|
+
lines.push('export const sectionData: Record<string, Record<string, unknown>> = {}', '')
|
|
380
|
+
return lines.join('\n')
|
|
381
|
+
}
|
|
382
|
+
lines.push('', 'export const sectionData: Record<string, Record<string, unknown>> = {')
|
|
383
|
+
for (const entry of imports) {
|
|
384
|
+
lines.push(` ${tsStringLiteral(entry.id)}: sectionData${entry.index} as Record<string, unknown>,`)
|
|
385
|
+
}
|
|
386
|
+
lines.push('}', '')
|
|
387
|
+
return lines.join('\n')
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Generate the derived data map for editorial sidecars belonging to the
|
|
392
|
+
* manifest's ordered normalized sections. Sidecars are retained when an
|
|
393
|
+
* instance is removed; only current safe ids with regular files are imported.
|
|
394
|
+
*/
|
|
395
|
+
export async function writeSectionsData({ viewDir, sections = [], dryRun = false } = {}) {
|
|
396
|
+
const sectionsDir = path.join(viewDir, 'sections')
|
|
397
|
+
const imports = []
|
|
398
|
+
const sectionsDirIsDirectory = existsSync(sectionsDir) && lstatSync(sectionsDir).isDirectory()
|
|
399
|
+
|
|
400
|
+
if (sectionsDirIsDirectory && Array.isArray(sections)) {
|
|
401
|
+
for (const entry of sections) {
|
|
402
|
+
if (!isEditorialSectionEntry(entry) || !safeSidecarId(entry.id)) continue
|
|
403
|
+
const sidecarPath = path.join(sectionsDir, `${entry.id}.json`)
|
|
404
|
+
const relativePath = path.relative(sectionsDir, sidecarPath)
|
|
405
|
+
if (
|
|
406
|
+
relativePath === '' ||
|
|
407
|
+
relativePath.startsWith(`..${path.sep}`) ||
|
|
408
|
+
relativePath === '..' ||
|
|
409
|
+
path.isAbsolute(relativePath) ||
|
|
410
|
+
!existsSync(sidecarPath) ||
|
|
411
|
+
!lstatSync(sidecarPath).isFile()
|
|
412
|
+
) {
|
|
413
|
+
continue
|
|
414
|
+
}
|
|
415
|
+
imports.push({
|
|
416
|
+
id: entry.id,
|
|
417
|
+
index: imports.length,
|
|
418
|
+
module: `./sections/${entry.id}.json`,
|
|
419
|
+
})
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
const dest = path.join(viewDir, 'sections-data.ts')
|
|
424
|
+
const next = renderSectionsData(imports)
|
|
425
|
+
const prev = existsSync(dest) ? readFileSync(dest, 'utf8') : null
|
|
426
|
+
if (prev === next) return []
|
|
427
|
+
if (!dryRun) {
|
|
428
|
+
await mkdir(path.dirname(dest), { recursive: true })
|
|
429
|
+
await writeFile(dest, next)
|
|
430
|
+
}
|
|
431
|
+
return [dest]
|
|
432
|
+
}
|
|
@@ -40,6 +40,25 @@ not read the JSON files directly; they are an implementation detail.
|
|
|
40
40
|
- **Held feature** — `mvp: false`. The CLI rejects it before any write; report it
|
|
41
41
|
as not available rather than trying to install it.
|
|
42
42
|
|
|
43
|
+
## Checkout route requests
|
|
44
|
+
|
|
45
|
+
Checkout requests stay with the checkout feature: it owns the hosted `/checkout`
|
|
46
|
+
route. The agent does not select an editorial section for checkout requests. Do
|
|
47
|
+
not use `view add checkout` or create a second checkout page. When useful,
|
|
48
|
+
explain that the host-driven checkout renders host-owned
|
|
49
|
+
cart/contact/address state, backend grouped delivery, payment methods,
|
|
50
|
+
and designer order confirmation; `blocks show checkout-commerce-v1 --json`
|
|
51
|
+
describes that route surface, not an editorial section to configure.
|
|
52
|
+
|
|
53
|
+
For checkout customization, discuss or edit only user-owned checkout files:
|
|
54
|
+
`views/checkout/{content,props,data,schema}.ts`, under the project's declared
|
|
55
|
+
ownership rules. Generated checkout files (route, registry, adapter, state, and
|
|
56
|
+
handler wiring) remain CLI-owned and must not be edited by the agent.
|
|
57
|
+
Transactional data and actions are host-owned: never serialize or author cart
|
|
58
|
+
contents/totals, shopper identity or addresses, fulfillment groups/selections,
|
|
59
|
+
payment methods/selections, order actions, or confirmation as agent-side data.
|
|
60
|
+
Use the normal `feature add|remove checkout` CLI workflow for structural changes.
|
|
61
|
+
|
|
43
62
|
## Add a feature
|
|
44
63
|
|
|
45
64
|
```bash
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sf-view-gen
|
|
3
|
-
description: Add or remove a Thor Commerce storefront view, compose and reorder a view's executable sections, or customize a view's user-owned files. Use when the user
|
|
3
|
+
description: Add or remove a Thor Commerce storefront view, compose and reorder a view's executable sections, choose or customize an editorial section from its purpose, or customize a view's user-owned files. Use when the user describes an outcome for an editorial section, asks to add or remove a view or section, change a variant, or change a view's content, props, or data. Delegates every structural write to the `storefront` CLI.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# sf-view-gen
|
|
@@ -28,6 +28,12 @@ list in this skill**: `views --json` reports the authoritative curated set
|
|
|
28
28
|
`static`) annotated with `installed` and `supported`, so a view added to or
|
|
29
29
|
removed from the registry is reflected without editing this text.
|
|
30
30
|
|
|
31
|
+
The checkout view schema and user-owned props must mirror the canonical
|
|
32
|
+
structured `Checkout` contract: controlled `contact`, `shippingAddress`,
|
|
33
|
+
`billingAddress`, `sameAsShipping`, `paymentMethod`, host-supplied location
|
|
34
|
+
options and shipping groups. The block never fetches or prefills; keep the
|
|
35
|
+
customer/address read in the host.
|
|
36
|
+
|
|
31
37
|
`views --json` and `recipes --json` also report, per view, `registeredSlots` (the
|
|
32
38
|
non-removable core slots), `allowedSections` (the section types the view may
|
|
33
39
|
host), and `maxSections` (the editorial-instance bound), plus a top-level
|
|
@@ -77,7 +83,7 @@ natural language and never types a command.
|
|
|
77
83
|
`sections --json` installed-instance list as the set of available types.
|
|
78
84
|
2. Only `executable` types may be composed; a `held` type is refused with the
|
|
79
85
|
`reason` the registry reports — relay that reason, never invent one. A
|
|
80
|
-
`dataBound`
|
|
86
|
+
`dataBound` instance is configured separately by the developer in
|
|
81
87
|
`views/<view>/data.ts` → `sectionSources[id]` (a canonical query — not a sales
|
|
82
88
|
ranking); its variant only changes presentation, and until the selection is set
|
|
83
89
|
the instance renders a truthful "needs configuration" state that `doctor`
|
|
@@ -117,17 +123,83 @@ through the CLI (`view add`/`remove` with `--variant`, or a `section.add` /
|
|
|
117
123
|
`index.tsx` or registry to swap an import identifier. Variant changes go through
|
|
118
124
|
the CLI plan/apply path so the manifest and the derived files stay in sync.
|
|
119
125
|
|
|
126
|
+
## Choose and configure an editorial block
|
|
127
|
+
|
|
128
|
+
Route wrong surfaces before considering an editorial section: navigation or a
|
|
129
|
+
header belongs to the shell/view procedure; a product listing belongs to its
|
|
130
|
+
owning product view or feature procedure; checkout and account behavior belong
|
|
131
|
+
to their owning `sf-feature` procedures. Do not select an editorial section for
|
|
132
|
+
any of these requests.
|
|
133
|
+
|
|
134
|
+
1. Read the installed-only catalog from the storefront project root:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
npx @thorprovider/storefront blocks list --json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
2. Choose by each ready card's `purpose`, `useWhen`, and `avoidWhen`, not by its
|
|
141
|
+
name. If two cards plausibly match the described outcome, ask one clarifying
|
|
142
|
+
question before choosing. If no ready card matches, or the closest card is
|
|
143
|
+
pending or exempt, explain the unavailable capability and do not configure
|
|
144
|
+
it.
|
|
145
|
+
3. Read the full card for the selected `<type>`:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npx @thorprovider/storefront blocks show <type> --json
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Use this output for the complete example, editable fields, host-only fields,
|
|
152
|
+
validator, and installed instance ids. Configure only an instance id listed
|
|
153
|
+
for the target view.
|
|
154
|
+
4. Start from a complete example returned by `show`. Adapt only the user's
|
|
155
|
+
content values in its user-owned data fields; preserve the example's shape,
|
|
156
|
+
never invent fields, and do not supply host-only fields.
|
|
157
|
+
5. Save the candidate data as JSON and validate it without writing:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npx @thorprovider/storefront section configure <view> <id> --data <file|-> --dry-run --json
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Repair only the reported data paths, then repeat the dry run until valid.
|
|
164
|
+
6. Run the same command without `--dry-run` to write the validated configuration:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
npx @thorprovider/storefront section configure <view> <id> --data <file|-> --json
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
7. Regenerate and verify:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npx @thorprovider/storefront sync
|
|
174
|
+
npx @thorprovider/storefront doctor
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
8. Explain the block's purpose and when not to use it. Describe which fields
|
|
178
|
+
customize content, media, composition, scheduling, and responsiveness, and
|
|
179
|
+
distinguish user-editable fields from host-only fields.
|
|
180
|
+
|
|
120
181
|
## Customize a view
|
|
121
182
|
|
|
122
|
-
Only
|
|
123
|
-
|
|
183
|
+
Only the listed user-owned files may be edited by hand. `content.ts` is
|
|
184
|
+
user-owned and may be edited for view-level content that is not section-instance
|
|
185
|
+
configuration. For section-instance content, use `section configure`; never
|
|
186
|
+
hand-edit the `sectionContent` map in `content.ts`, a `sections/<id>.json`
|
|
187
|
+
sidecar, or derived files. A configured sidecar wins over
|
|
188
|
+
`sectionContent[id]`, which remains the fallback when no sidecar exists.
|
|
124
189
|
|
|
125
|
-
User-owned (edit these): `lib/<name>/views/<view>/content.ts
|
|
126
|
-
`data.ts`, `schema.ts`, and `lib/<name>/mappers.ts`.
|
|
190
|
+
User-owned (edit these): `lib/<name>/views/<view>/content.ts` (non-section view
|
|
191
|
+
content), `props.ts`, `data.ts`, `schema.ts`, and `lib/<name>/mappers.ts`.
|
|
127
192
|
|
|
128
193
|
Derived (never edit; the CLI regenerates them): `index.tsx`, `registry.tsx`,
|
|
129
194
|
`lib/<name>/views/index.ts`, `lib/<name>/views/registry.ts`, `catalog.ts`,
|
|
130
|
-
`runtime.ts`, `spec/index.ts`, `state.ts`, `handlers.ts
|
|
195
|
+
`runtime.ts`, `spec/index.ts`, `state.ts`, `handlers.ts`, and
|
|
196
|
+
`lib/<name>/views/<view>/sections-data.ts`.
|
|
197
|
+
|
|
198
|
+
The CLI writes `sections/<id>.json` only through `section configure`; never
|
|
199
|
+
hand-edit that sidecar or the derived `sections-data.ts`. Keep `content.ts` as a
|
|
200
|
+
hand-edit target for non-section view content, but do not customize section
|
|
201
|
+
instances through its `sectionContent` map. For an instance with a sidecar, its
|
|
202
|
+
data wins over the `content.ts` fallback.
|
|
131
203
|
|
|
132
204
|
1. Read the current user-owned files for the view.
|
|
133
205
|
2. Apply the requested change there. Preserve exported names, element ids, and
|
|
@@ -146,15 +146,50 @@
|
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
"account.orders": {
|
|
149
|
-
"default": "
|
|
149
|
+
"default": "advanced",
|
|
150
150
|
"intents": {
|
|
151
|
+
"advanced": {
|
|
152
|
+
"variant": "OrderHistoryAdvanced",
|
|
153
|
+
"when": "The signed-in shopper's full order history: search, quick filters, sort, counts and order cards driven by the host `OrdersPort` (the default surface)."
|
|
154
|
+
},
|
|
151
155
|
"cards": {
|
|
152
156
|
"variant": "OrderHistory",
|
|
153
|
-
"when": "A
|
|
157
|
+
"when": "A minimal order history rendered by the canonical `OrderHistory` block with one summary card per order and no query controls."
|
|
154
158
|
},
|
|
155
159
|
"rows": {
|
|
156
160
|
"variant": "OrderHistory",
|
|
157
|
-
"when": "A
|
|
161
|
+
"when": "A minimal, list-first order history rendered by the canonical `OrderHistory` block in its `rows` presentation."
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"account.summary": {
|
|
166
|
+
"default": "stack",
|
|
167
|
+
"intents": {
|
|
168
|
+
"stack": {
|
|
169
|
+
"variant": "stack",
|
|
170
|
+
"when": "A single scrolling account page: identity, then every installed module in order, with in-page navigation (canonical `presentation: 'stack'`)."
|
|
171
|
+
},
|
|
172
|
+
"tabs": {
|
|
173
|
+
"variant": "tabs",
|
|
174
|
+
"when": "One module visible at a time behind a tablist (canonical `presentation: 'tabs'`)."
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"account.profile": {
|
|
179
|
+
"default": "form",
|
|
180
|
+
"intents": {
|
|
181
|
+
"form": {
|
|
182
|
+
"variant": "form",
|
|
183
|
+
"when": "The shopper's editable profile fields, with the email control present only when the backend supports changing it."
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"account.addresses": {
|
|
188
|
+
"default": "cards",
|
|
189
|
+
"intents": {
|
|
190
|
+
"cards": {
|
|
191
|
+
"variant": "cards",
|
|
192
|
+
"when": "The shopper's saved addresses as cards, with create, edit, delete, and default-address actions."
|
|
158
193
|
}
|
|
159
194
|
}
|
|
160
195
|
}
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
"account.orders": {
|
|
332
|
-
"default": "
|
|
332
|
+
"default": "OrderHistoryAdvanced",
|
|
333
333
|
"variants": {
|
|
334
334
|
"OrderHistory": {
|
|
335
335
|
"status": "executable",
|
|
@@ -343,12 +343,149 @@
|
|
|
343
343
|
"accountCustomer",
|
|
344
344
|
"accountAuthenticated"
|
|
345
345
|
]
|
|
346
|
+
},
|
|
347
|
+
"OrderHistoryAdvanced": {
|
|
348
|
+
"status": "executable",
|
|
349
|
+
"block": "OrderHistoryAdvanced",
|
|
350
|
+
"dataShape": "OrdersPage (host OrdersPort; B2C MVP)",
|
|
351
|
+
"events": [
|
|
352
|
+
"viewOrder",
|
|
353
|
+
"queryChange",
|
|
354
|
+
"presentationChange",
|
|
355
|
+
"orderAction",
|
|
356
|
+
"bulkAction"
|
|
357
|
+
],
|
|
358
|
+
"state": "uncontrolled",
|
|
359
|
+
"requirements": [
|
|
360
|
+
"accountAuthenticated",
|
|
361
|
+
"ordersPort"
|
|
362
|
+
]
|
|
346
363
|
}
|
|
347
364
|
},
|
|
348
365
|
"legacyAliases": {
|
|
349
366
|
"OrderHistory2": "OrderHistory"
|
|
350
367
|
}
|
|
351
368
|
},
|
|
369
|
+
"account.summary": {
|
|
370
|
+
"default": "stack",
|
|
371
|
+
"variants": {
|
|
372
|
+
"stack": {
|
|
373
|
+
"status": "executable",
|
|
374
|
+
"block": "AccountFrame",
|
|
375
|
+
"dataShape": "Customer & AccountModule[]",
|
|
376
|
+
"events": [
|
|
377
|
+
"selectModule"
|
|
378
|
+
],
|
|
379
|
+
"state": "controlled",
|
|
380
|
+
"requirements": [
|
|
381
|
+
"accountCustomer",
|
|
382
|
+
"accountAuthenticated"
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
"tabs": {
|
|
386
|
+
"status": "executable",
|
|
387
|
+
"block": "AccountFrame",
|
|
388
|
+
"dataShape": "Customer & AccountModule[]",
|
|
389
|
+
"events": [
|
|
390
|
+
"selectModule"
|
|
391
|
+
],
|
|
392
|
+
"state": "controlled",
|
|
393
|
+
"requirements": [
|
|
394
|
+
"accountCustomer",
|
|
395
|
+
"accountAuthenticated"
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
"sidebar": {
|
|
399
|
+
"status": "held",
|
|
400
|
+
"reason": "A dashboard sidebar nests the account navigation inside the storefront chrome and needs a layout the generated storefront does not provide yet.",
|
|
401
|
+
"block": "AccountFrame",
|
|
402
|
+
"dataShape": "Customer & AccountModule[]",
|
|
403
|
+
"events": [
|
|
404
|
+
"selectModule"
|
|
405
|
+
],
|
|
406
|
+
"state": "controlled",
|
|
407
|
+
"requirements": [
|
|
408
|
+
"accountCustomer",
|
|
409
|
+
"accountAuthenticated"
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"account.profile": {
|
|
415
|
+
"default": "CustomerProfileAdvanced",
|
|
416
|
+
"variants": {
|
|
417
|
+
"form": {
|
|
418
|
+
"status": "executable",
|
|
419
|
+
"block": "ProfileForm",
|
|
420
|
+
"dataShape": "ProfileField[] & ProfileFormLabels",
|
|
421
|
+
"events": [
|
|
422
|
+
"submit"
|
|
423
|
+
],
|
|
424
|
+
"state": "controlled",
|
|
425
|
+
"requirements": [
|
|
426
|
+
"accountCustomer",
|
|
427
|
+
"accountAuthenticated",
|
|
428
|
+
"accountProfileAvailable"
|
|
429
|
+
]
|
|
430
|
+
},
|
|
431
|
+
"CustomerProfileAdvanced": {
|
|
432
|
+
"status": "executable",
|
|
433
|
+
"block": "CustomerProfile",
|
|
434
|
+
"dataShape": "CustomerProfileSnapshot (host CustomerProfilePort)",
|
|
435
|
+
"events": [
|
|
436
|
+
"manageOrganization",
|
|
437
|
+
"requestVerification",
|
|
438
|
+
"retry"
|
|
439
|
+
],
|
|
440
|
+
"state": "controlled",
|
|
441
|
+
"requirements": [
|
|
442
|
+
"accountAuthenticated",
|
|
443
|
+
"customerProfilePort"
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"account.addresses": {
|
|
449
|
+
"default": "AddressBookAdvanced",
|
|
450
|
+
"variants": {
|
|
451
|
+
"cards": {
|
|
452
|
+
"status": "executable",
|
|
453
|
+
"block": "AddressBook",
|
|
454
|
+
"dataShape": "AccountAddressView[] & AddressBookLabels",
|
|
455
|
+
"events": [
|
|
456
|
+
"create",
|
|
457
|
+
"edit",
|
|
458
|
+
"delete",
|
|
459
|
+
"setDefaultShipping",
|
|
460
|
+
"setDefaultBilling"
|
|
461
|
+
],
|
|
462
|
+
"state": "controlled",
|
|
463
|
+
"requirements": [
|
|
464
|
+
"accountCustomer",
|
|
465
|
+
"accountAuthenticated",
|
|
466
|
+
"accountAddressesAvailable"
|
|
467
|
+
]
|
|
468
|
+
},
|
|
469
|
+
"AddressBookAdvanced": {
|
|
470
|
+
"status": "executable",
|
|
471
|
+
"block": "AddressBookAdvanced",
|
|
472
|
+
"dataShape": "AddressListResult (host AddressBookPort)",
|
|
473
|
+
"events": [
|
|
474
|
+
"create",
|
|
475
|
+
"edit",
|
|
476
|
+
"delete",
|
|
477
|
+
"setDefault",
|
|
478
|
+
"select"
|
|
479
|
+
],
|
|
480
|
+
"state": "controlled",
|
|
481
|
+
"requirements": [
|
|
482
|
+
"accountAuthenticated",
|
|
483
|
+
"accountAddressesAvailable",
|
|
484
|
+
"addressesPort"
|
|
485
|
+
]
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
},
|
|
352
489
|
"category.breadcrumb": {
|
|
353
490
|
"default": "Breadcrumb",
|
|
354
491
|
"variants": {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"name": "checkout",
|
|
6
6
|
"mvp": true,
|
|
7
|
+
"status": "executable",
|
|
7
8
|
"description": "Multi-step checkout: cart validation, shipping, payment, and order placement.",
|
|
8
9
|
"route": "/checkout",
|
|
9
10
|
"views": ["checkout"],
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
{
|
|
30
31
|
"name": "customer-auth",
|
|
31
32
|
"mvp": true,
|
|
33
|
+
"status": "executable",
|
|
32
34
|
"description": "Customer authentication: registration, login, logout, and a minimal signed-in state. Owns the account view.",
|
|
33
35
|
"route": "/account",
|
|
34
36
|
"views": ["account"],
|
|
@@ -44,9 +46,57 @@
|
|
|
44
46
|
"config": { "type": "object", "additionalProperties": false, "properties": {} },
|
|
45
47
|
"surfaces": []
|
|
46
48
|
},
|
|
49
|
+
{
|
|
50
|
+
"name": "customer-profile",
|
|
51
|
+
"mvp": true,
|
|
52
|
+
"starter": false,
|
|
53
|
+
"status": "gated",
|
|
54
|
+
"description": "Signed-in profile editor for the account area (name, phone, and email only where the backend supports changing it). Module of customer-auth.",
|
|
55
|
+
"views": [],
|
|
56
|
+
"state": ["accountProfileAvailable", "accountProfilePending", "accountProfileError"],
|
|
57
|
+
"handlers": [],
|
|
58
|
+
"requires": ["customer-auth"],
|
|
59
|
+
"adapter": { "needs": ["updateCustomer"] },
|
|
60
|
+
"backendCapabilities": ["updateProfile"],
|
|
61
|
+
"config": { "type": "object", "additionalProperties": false, "properties": {} },
|
|
62
|
+
"surfaces": []
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "customer-addresses",
|
|
66
|
+
"mvp": true,
|
|
67
|
+
"starter": false,
|
|
68
|
+
"status": "gated",
|
|
69
|
+
"description": "Signed-in address book for the account area (list, create, edit, delete, default shipping and billing). Module of customer-auth.",
|
|
70
|
+
"views": [],
|
|
71
|
+
"state": [
|
|
72
|
+
"accountAddressesAvailable",
|
|
73
|
+
"accountAddresses",
|
|
74
|
+
"accountAddressesPending",
|
|
75
|
+
"accountAddressesError",
|
|
76
|
+
"accountAddressFormOpen",
|
|
77
|
+
"accountAddressEditingId",
|
|
78
|
+
"accountAddressMutationPending",
|
|
79
|
+
"accountAddressMutationError",
|
|
80
|
+
"accountAddressFieldErrors"
|
|
81
|
+
],
|
|
82
|
+
"handlers": [],
|
|
83
|
+
"requires": ["customer-auth"],
|
|
84
|
+
"adapter": {
|
|
85
|
+
"needs": [
|
|
86
|
+
"getCustomerAddresses",
|
|
87
|
+
"createCustomerAddress",
|
|
88
|
+
"updateCustomerAddress",
|
|
89
|
+
"deleteCustomerAddress"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"backendCapabilities": ["manageAddresses"],
|
|
93
|
+
"config": { "type": "object", "additionalProperties": false, "properties": {} },
|
|
94
|
+
"surfaces": []
|
|
95
|
+
},
|
|
47
96
|
{
|
|
48
97
|
"name": "static-pages",
|
|
49
98
|
"mvp": true,
|
|
99
|
+
"status": "executable",
|
|
50
100
|
"description": "Content-driven static pages (contact, legal, about) served with per-page metadata. Owns the static view.",
|
|
51
101
|
"route": "/contact",
|
|
52
102
|
"views": ["static"],
|
|
@@ -59,6 +109,7 @@
|
|
|
59
109
|
{
|
|
60
110
|
"name": "benefits",
|
|
61
111
|
"mvp": true,
|
|
112
|
+
"status": "executable",
|
|
62
113
|
"description": "Bounded editorial benefits feature that mounts at the home benefits slot; config selects the canonical Feature block's presentation (compact -> cards, detailed -> split) while the item content stays user-owned.",
|
|
63
114
|
"views": [],
|
|
64
115
|
"state": [],
|
|
@@ -78,6 +129,7 @@
|
|
|
78
129
|
{
|
|
79
130
|
"name": "catalog-search",
|
|
80
131
|
"mvp": true,
|
|
132
|
+
"status": "executable",
|
|
81
133
|
"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
134
|
"views": [],
|
|
83
135
|
"state": [],
|
|
@@ -96,6 +148,7 @@
|
|
|
96
148
|
{
|
|
97
149
|
"name": "category-filters",
|
|
98
150
|
"mvp": true,
|
|
151
|
+
"status": "executable",
|
|
99
152
|
"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
153
|
"views": [],
|
|
101
154
|
"state": [],
|
|
@@ -125,6 +178,7 @@
|
|
|
125
178
|
{
|
|
126
179
|
"name": "navigability",
|
|
127
180
|
"mvp": true,
|
|
181
|
+
"status": "executable",
|
|
128
182
|
"description": "Cross-cutting navigability feature: entity-derived breadcrumbs with BreadcrumbList structured data on the product and category surfaces, plus skip-to-content, current-page indication, back-to-top, and a mobile bottom navigation in the shared shell.",
|
|
129
183
|
"views": [],
|
|
130
184
|
"state": [],
|
|
@@ -148,15 +202,32 @@
|
|
|
148
202
|
{
|
|
149
203
|
"name": "recommendations",
|
|
150
204
|
"mvp": false,
|
|
205
|
+
"status": "held",
|
|
206
|
+
"reason": "No provider method backs a related-products read; the surface is injected through a catalog fallback and is outside the curated MVP set.",
|
|
207
|
+
"owner": "post-MVP recommendations change",
|
|
151
208
|
"description": "Related-products surface injected into the product view.",
|
|
152
209
|
"views": [],
|
|
153
210
|
"state": ["recommendedProducts"],
|
|
154
211
|
"handlers": [],
|
|
155
|
-
"adapter": { "needs": [
|
|
212
|
+
"adapter": { "needs": [] },
|
|
156
213
|
"config": { "type": "object", "additionalProperties": false, "properties": {} },
|
|
157
214
|
"surfaces": [
|
|
158
215
|
{ "host": "product", "slot": "product.related", "element": "ProductGrid" }
|
|
159
216
|
]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "customer-security",
|
|
220
|
+
"mvp": false,
|
|
221
|
+
"status": "held",
|
|
222
|
+
"reason": "Account deletion has no backend endpoint (the adapter throws NOT_IMPLEMENTED) and customer email change is not supported by the Medusa store API.",
|
|
223
|
+
"owner": "future customer-security change",
|
|
224
|
+
"description": "Account security controls: password reset, email change, and account deletion.",
|
|
225
|
+
"views": [],
|
|
226
|
+
"state": [],
|
|
227
|
+
"handlers": [],
|
|
228
|
+
"adapter": { "needs": [] },
|
|
229
|
+
"config": { "type": "object", "additionalProperties": false, "properties": {} },
|
|
230
|
+
"surfaces": []
|
|
160
231
|
}
|
|
161
232
|
]
|
|
162
233
|
}
|