@thorprovider/storefront 0.7.0 → 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 +621 -80
- package/assets/templates/app/lib/__STOREFRONT__/addresses-port.ts +107 -0
- package/assets/templates/app/lib/__STOREFRONT__/commerce.ts +346 -38
- 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 +21 -0
- 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 +4 -1
- 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.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 +24 -4
- 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 +51 -0
- package/assets/templates/views/checkout/index.tsx +1 -1
- package/assets/templates/views/checkout/props.ts +10 -2
- package/assets/templates/views/checkout/registry.tsx +104 -42
- package/assets/templates/views/checkout/schema.ts +76 -1
- package/assets/templates/views/home/assembly/assembly.json +22 -1
- 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 +13 -1
- package/recipes/recipes.json +34 -5
- package/recipes/section.schema.json +112 -0
- package/recipes/sections.json +281 -4
- 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 +14 -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 +73 -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 +34 -5
- package/skills/sf-view-gen/assets/recipes/section.schema.json +112 -0
- package/skills/sf-view-gen/assets/recipes/sections.json +281 -4
- 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/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.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/recipes/archetypes.json
CHANGED
|
@@ -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
|
}
|
package/recipes/catalog.json
CHANGED
|
@@ -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": {
|
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
"name": { "type": "string", "minLength": 1 },
|
|
16
16
|
"description": { "type": "string" },
|
|
17
17
|
"mvp": { "type": "boolean" },
|
|
18
|
+
"starter": { "type": "boolean" },
|
|
19
|
+
"status": { "type": "string", "enum": ["executable", "gated", "held"] },
|
|
20
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
21
|
+
"owner": { "type": "string", "minLength": 1 },
|
|
22
|
+
"requires": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
23
|
+
"backendCapabilities": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": { "type": "string", "minLength": 1 }
|
|
26
|
+
},
|
|
18
27
|
"route": { "type": "string", "minLength": 1 },
|
|
19
28
|
"views": { "type": "array", "items": { "type": "string" } },
|
|
20
29
|
"state": { "type": "array", "items": { "type": "string" } },
|
package/recipes/features.json
CHANGED
|
@@ -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
|
}
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"version": { "type": "string", "minLength": 1 },
|
|
10
10
|
"name": { "type": "string", "minLength": 1 },
|
|
11
11
|
"siteName": { "type": "string" },
|
|
12
|
+
"capabilities": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "type": "string", "minLength": 1 },
|
|
15
|
+
"description": "Backend capability flags recorded by `storefront setup`. Absent means unknown (probe failed or never ran); an empty array means the backend advertises none."
|
|
16
|
+
},
|
|
12
17
|
"theme": {
|
|
13
18
|
"type": "object",
|
|
14
19
|
"required": ["mode"],
|
|
@@ -60,7 +60,19 @@
|
|
|
60
60
|
"type": "array",
|
|
61
61
|
"items": { "type": "string" }
|
|
62
62
|
},
|
|
63
|
-
"maxSections": { "type": "number" }
|
|
63
|
+
"maxSections": { "type": "number" },
|
|
64
|
+
"defaultSections": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["type"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"type": { "type": "string" },
|
|
71
|
+
"after": { "type": "string" }
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
}
|
|
75
|
+
}
|
|
64
76
|
}
|
|
65
77
|
}
|
|
66
78
|
}
|
package/recipes/recipes.json
CHANGED
|
@@ -48,7 +48,16 @@
|
|
|
48
48
|
"faq",
|
|
49
49
|
"cta",
|
|
50
50
|
"products",
|
|
51
|
-
"marketplace-product-card"
|
|
51
|
+
"marketplace-product-card",
|
|
52
|
+
"checkout-commerce-v1",
|
|
53
|
+
"mega-menu-universal",
|
|
54
|
+
"universal-banner"
|
|
55
|
+
],
|
|
56
|
+
"defaultSections": [
|
|
57
|
+
{
|
|
58
|
+
"type": "universal-banner",
|
|
59
|
+
"after": "hero"
|
|
60
|
+
}
|
|
52
61
|
],
|
|
53
62
|
"maxSections": 4
|
|
54
63
|
},
|
|
@@ -191,7 +200,7 @@
|
|
|
191
200
|
{
|
|
192
201
|
"name": "account",
|
|
193
202
|
"mvp": true,
|
|
194
|
-
"description": "Customer account area with sign-in, registration,
|
|
203
|
+
"description": "Customer account area with sign-in, registration, a shaped signed-in area, and installable profile and address modules",
|
|
195
204
|
"route": "/account",
|
|
196
205
|
"loader": "account",
|
|
197
206
|
"requiredDataKeys": [
|
|
@@ -199,7 +208,11 @@
|
|
|
199
208
|
],
|
|
200
209
|
"defaultVariants": {
|
|
201
210
|
"login": "card",
|
|
202
|
-
"register": "SignUpPage1"
|
|
211
|
+
"register": "SignUpPage1",
|
|
212
|
+
"summary": "stack",
|
|
213
|
+
"orders": "OrderHistoryAdvanced",
|
|
214
|
+
"profile": "CustomerProfileAdvanced",
|
|
215
|
+
"addresses": "AddressBookAdvanced"
|
|
203
216
|
},
|
|
204
217
|
"allowedVariants": {
|
|
205
218
|
"login": [
|
|
@@ -210,14 +223,30 @@
|
|
|
210
223
|
"SignUpPage1"
|
|
211
224
|
],
|
|
212
225
|
"orders": [
|
|
213
|
-
"OrderHistory"
|
|
226
|
+
"OrderHistory",
|
|
227
|
+
"OrderHistoryAdvanced"
|
|
228
|
+
],
|
|
229
|
+
"summary": [
|
|
230
|
+
"stack",
|
|
231
|
+
"tabs"
|
|
232
|
+
],
|
|
233
|
+
"profile": [
|
|
234
|
+
"form",
|
|
235
|
+
"CustomerProfileAdvanced"
|
|
236
|
+
],
|
|
237
|
+
"addresses": [
|
|
238
|
+
"cards",
|
|
239
|
+
"AddressBookAdvanced"
|
|
214
240
|
]
|
|
215
241
|
},
|
|
216
242
|
"optionalSections": [],
|
|
217
243
|
"registeredSlots": [
|
|
218
244
|
"login",
|
|
219
245
|
"register",
|
|
220
|
-
"
|
|
246
|
+
"summary",
|
|
247
|
+
"orders",
|
|
248
|
+
"profile",
|
|
249
|
+
"addresses"
|
|
221
250
|
],
|
|
222
251
|
"allowedSections": [],
|
|
223
252
|
"maxSections": 4
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Storefront section registry",
|
|
4
|
+
"description": "Structural contract for the complete section registry and its optional agent cards. Status-specific completeness is checked by the storefront semantic validator.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version", "description", "sections"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"version": { "type": "string", "minLength": 1 },
|
|
11
|
+
"description": { "type": "string", "minLength": 1 },
|
|
12
|
+
"sections": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"required": ["name", "description", "elementType", "variants", "defaultVariant", "propsHint", "status"],
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"name": { "type": "string", "minLength": 1 },
|
|
20
|
+
"description": { "type": "string", "minLength": 1 },
|
|
21
|
+
"elementType": { "type": "string", "minLength": 1 },
|
|
22
|
+
"variants": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
23
|
+
"defaultVariant": { "type": "string", "minLength": 1 },
|
|
24
|
+
"propsHint": { "type": "string", "minLength": 1 },
|
|
25
|
+
"status": { "type": "string", "enum": ["executable", "held"] },
|
|
26
|
+
"dataBound": { "type": "boolean" },
|
|
27
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
28
|
+
"agent": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["status", "section", "elementType", "variants"],
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"status": { "type": "string", "enum": ["ready", "pending", "exempt"] },
|
|
34
|
+
"section": { "type": "string", "minLength": 1 },
|
|
35
|
+
"elementType": { "type": "string", "minLength": 1 },
|
|
36
|
+
"variants": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
37
|
+
"label": { "type": "string", "minLength": 1 },
|
|
38
|
+
"purpose": { "type": "string", "minLength": 1 },
|
|
39
|
+
"useWhen": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
40
|
+
"avoidWhen": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
41
|
+
"surfaces": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": ["kind", "hosts"],
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"properties": {
|
|
48
|
+
"kind": { "type": "string", "enum": ["section", "shell", "route", "feature"] },
|
|
49
|
+
"hosts": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"editable": { "type": "boolean" },
|
|
54
|
+
"fields": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"required": ["path", "type", "required", "description"],
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"properties": {
|
|
61
|
+
"path": { "type": "string", "minLength": 1 },
|
|
62
|
+
"type": { "type": "string", "enum": ["string", "number", "boolean", "object", "array", "enum"] },
|
|
63
|
+
"required": { "type": "boolean" },
|
|
64
|
+
"description": { "type": "string", "minLength": 1 }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"hostOnly": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"required": ["path", "reason"],
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"properties": {
|
|
75
|
+
"path": { "type": "string", "minLength": 1 },
|
|
76
|
+
"reason": { "type": "string", "minLength": 1 }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"examples": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"required": ["name", "description", "data"],
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"properties": {
|
|
87
|
+
"name": { "type": "string", "minLength": 1 },
|
|
88
|
+
"description": { "type": "string", "minLength": 1 },
|
|
89
|
+
"data": { "type": "object" }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"validator": {
|
|
94
|
+
"description": "Required for ready cards with section surfaces; route-only ready cards do not use a section-data validator.",
|
|
95
|
+
"type": "object",
|
|
96
|
+
"required": ["export"],
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"properties": {
|
|
99
|
+
"export": { "type": "string", "minLength": 1 }
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"kind": { "type": "string", "enum": ["pending-card", "host-only", "requiresPort", "not-user-configurable", "internal"] },
|
|
103
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
104
|
+
"owner": { "type": "string", "minLength": 1 },
|
|
105
|
+
"expires": { "type": "string", "minLength": 1 }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|