@thorprovider/storefront 0.4.0-mvp.0 → 0.4.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 +174 -156
- package/VENDOR.md +69 -0
- package/assets/openspec/config.yaml +38 -0
- package/assets/templates/AGENTS.md +76 -0
- package/assets/templates/app/app/[[...slug]]/page.tsx +56 -2
- package/assets/templates/app/app/[[...slug]]/renderer.tsx +44 -2
- package/assets/templates/app/app/globals.css +5 -8
- package/assets/templates/app/app/layout.tsx +1 -5
- package/assets/templates/app/app/robots.ts +9 -3
- package/assets/templates/app/app/sitemap.ts +64 -5
- package/assets/templates/app/lib/__STOREFRONT__/account-boundary.client.tsx +76 -0
- package/assets/templates/app/lib/__STOREFRONT__/account-lifecycle.client.tsx +461 -0
- package/assets/templates/app/lib/__STOREFRONT__/account-mutation.client.ts +46 -0
- package/assets/templates/app/lib/__STOREFRONT__/account-private.core.ts +103 -0
- package/assets/templates/app/lib/__STOREFRONT__/account-reconcile.client.ts +465 -0
- package/assets/templates/app/lib/__STOREFRONT__/account-session.core.ts +177 -0
- package/assets/templates/app/lib/__STOREFRONT__/account-session.ts +44 -0
- package/assets/templates/app/lib/__STOREFRONT__/account-user.core.ts +65 -0
- package/assets/templates/app/lib/__STOREFRONT__/actions.ts +135 -16
- package/assets/templates/app/lib/__STOREFRONT__/catalog.ts +19 -9
- package/assets/templates/app/lib/__STOREFRONT__/commerce.ts +61 -0
- package/assets/templates/app/lib/__STOREFRONT__/composition.ts +26 -0
- package/assets/templates/app/lib/__STOREFRONT__/handlers.core.ts +36 -4
- package/assets/templates/app/lib/__STOREFRONT__/mappers.ts +17 -18
- package/assets/templates/app/lib/__STOREFRONT__/projection-ownership.client.tsx +209 -0
- package/assets/templates/app/lib/__STOREFRONT__/projection-ownership.ts +247 -0
- package/assets/templates/app/lib/__STOREFRONT__/registry.tsx +123 -62
- package/assets/templates/app/lib/__STOREFRONT__/runtime.ts +3 -0
- package/assets/templates/app/lib/__STOREFRONT__/schema.ts +78 -25
- package/assets/templates/app/lib/__STOREFRONT__/section-observation.ts +182 -0
- package/assets/templates/app/lib/__STOREFRONT__/section-sources.ts +128 -0
- package/assets/templates/app/lib/__STOREFRONT__/shell/content.ts +31 -7
- package/assets/templates/app/lib/__STOREFRONT__/shell/props.ts +4 -0
- package/assets/templates/app/lib/__STOREFRONT__/spec/index.ts +81 -26
- package/assets/templates/app/lib/__STOREFRONT__/spec/seo.ts +165 -0
- package/assets/templates/app/lib/__STOREFRONT__/state.core.ts +4 -2
- package/assets/templates/app/lib/__STOREFRONT__/store-context.ts +26 -7
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/cta.client.tsx +1 -1
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/faq.client.tsx +1 -1
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/index.ts +2 -1
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/logoCloud.tsx +1 -1
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/pricing.tsx +1 -1
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/products.client.tsx +100 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/products.tsx +19 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.products.ts +39 -0
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/statistics.tsx +1 -1
- package/assets/templates/app/lib/__STOREFRONT__/views/sections/testimonials.tsx +1 -1
- package/assets/templates/features/checkout/handlers.ts +6 -0
- package/assets/templates/features/customer-auth/handlers.ts +19 -23
- package/assets/templates/features/customer-auth/state.ts +31 -1
- package/assets/templates/views/account/index.tsx +20 -8
- package/assets/templates/views/account/registry.tsx +294 -154
- package/assets/templates/views/account/schema.ts +1 -0
- package/assets/templates/views/cart/content.ts +11 -0
- package/assets/templates/views/cart/data.ts +23 -0
- package/assets/templates/views/cart/index.tsx +53 -0
- package/assets/templates/views/cart/props.ts +12 -0
- package/assets/templates/views/cart/registry.tsx +82 -0
- package/assets/templates/views/cart/schema.ts +52 -0
- package/assets/templates/views/category/assembly/assembly.json +2 -1
- package/assets/templates/views/category/assembly/index.skeleton.tsx +64 -6
- package/assets/templates/views/category/assembly/registry.skeleton.tsx +7 -6
- package/assets/templates/views/category/assembly/slots/breadcrumb/Breadcrumb/binding.json +5 -0
- package/assets/templates/views/category/assembly/slots/breadcrumb/Breadcrumb/catalog.part +4 -0
- package/assets/templates/views/category/assembly/slots/breadcrumb/Breadcrumb/element.part +7 -0
- package/assets/templates/views/category/assembly/slots/breadcrumb/Breadcrumb/registry.part +18 -0
- package/assets/templates/views/category/index.tsx +76 -7
- package/assets/templates/views/category/props.ts +7 -0
- package/assets/templates/views/category/registry.tsx +25 -6
- package/assets/templates/views/category/schema.ts +13 -0
- package/assets/templates/views/checkout/registry.tsx +3 -5
- package/assets/templates/views/home/assembly/assembly.json +12 -3
- package/assets/templates/views/home/assembly/index.skeleton.tsx +24 -5
- package/assets/templates/views/home/assembly/registry.skeleton.tsx +4 -1
- package/assets/templates/views/home/assembly/slots/benefits/cards/binding.json +5 -0
- package/assets/templates/views/home/assembly/slots/benefits/cards/registry.part +17 -0
- package/assets/templates/views/home/assembly/slots/benefits/split/binding.json +5 -0
- package/assets/templates/views/home/assembly/slots/benefits/{Feature1 → split}/registry.part +6 -2
- package/assets/templates/views/home/assembly/slots/categories/CategoryGrid/binding.json +5 -0
- package/assets/templates/views/home/assembly/slots/categories/CategoryGrid/catalog.part +8 -0
- package/assets/templates/views/home/assembly/slots/categories/{ProductCategory2 → CategoryGrid}/element.part +1 -1
- package/assets/templates/views/home/assembly/slots/categories/CategoryGrid/registry.part +31 -0
- package/assets/templates/views/home/assembly/slots/hero/StorefrontHero/binding.json +5 -0
- package/assets/templates/views/home/assembly/slots/hero/StorefrontHero/catalog.part +4 -0
- package/assets/templates/views/home/assembly/slots/hero/StorefrontHero/element.part +5 -0
- package/assets/templates/views/home/assembly/slots/hero/{StorefrontHero1 → StorefrontHero}/registry.part +5 -3
- package/assets/templates/views/home/content.ts +22 -0
- package/assets/templates/views/home/data.ts +9 -0
- package/assets/templates/views/home/index.tsx +34 -11
- package/assets/templates/views/home/props.ts +1 -0
- package/assets/templates/views/home/registry.tsx +41 -17
- package/assets/templates/views/home/schema.ts +141 -24
- package/assets/templates/views/product/data.ts +5 -3
- package/assets/templates/views/product/index.tsx +49 -5
- package/assets/templates/views/product/props.ts +7 -0
- package/assets/templates/views/product/registry.tsx +34 -5
- package/assets/templates/views/product/schema.ts +49 -1
- package/assets/templates/views/static/content.ts +4 -4
- package/assets/templates/views/static/index.tsx +1 -1
- package/bin/storefront.js +1231 -154
- package/examples/merchandising/category-led.json +37 -0
- package/examples/merchandising/collection-led.json +37 -0
- package/package.json +10 -7
- package/recipes/archetypes.json +33 -46
- package/recipes/catalog.json +245 -153
- package/recipes/catalog.mjs +10 -0
- package/recipes/catalog.schema.json +4 -0
- package/recipes/features.json +28 -5
- package/recipes/recipe.schema.json +1 -1
- package/recipes/recipes.json +159 -59
- package/recipes/sections.json +10 -0
- package/recipes/validate.mjs +75 -4
- package/scripts/candidate.mjs +4 -4
- package/scripts/composers.mjs +25 -5
- package/scripts/env-file.mjs +86 -0
- package/scripts/file-classes.mjs +15 -0
- package/scripts/migrate-english-routes.mjs +276 -0
- package/scripts/ownership-conflict.mjs +5 -2
- package/scripts/pinning.mjs +74 -5
- package/scripts/plan-apply.mjs +149 -5
- package/scripts/reconcile.mjs +49 -11
- package/scripts/render-templates.mjs +97 -44
- package/scripts/section-config.mjs +253 -0
- package/scripts/starter.mjs +17 -0
- package/scripts/theme/color.mjs +185 -0
- package/scripts/theme/css-theme.mjs +233 -0
- package/scripts/theme/fonts.mjs +123 -0
- package/scripts/theme/import-export.mjs +125 -0
- package/scripts/theme/preset.mjs +93 -0
- package/scripts/theme/theme-plan.mjs +292 -0
- package/scripts/theme/tokens.mjs +137 -0
- package/scripts/view-assembly.mjs +57 -3
- package/scripts/view-selection.mjs +1 -1
- package/skills/sf-feature/SKILL.md +32 -19
- package/skills/sf-setup/SKILL.md +79 -0
- package/skills/sf-theme-gen/SKILL.md +99 -36
- package/skills/sf-theme-gen/references/shadcn-theming.md +87 -0
- package/skills/{shadcn-theming/references/templates → sf-theme-gen/references}/theme-setup.md +15 -19
- package/skills/{shadcn-theming → sf-theme-gen}/references/theming-guide.md +6 -11
- package/skills/sf-view-gen/SKILL.md +63 -40
- package/skills/sf-view-gen/assets/recipes/archetypes.json +33 -46
- package/skills/sf-view-gen/assets/recipes/catalog.json +245 -153
- package/skills/sf-view-gen/assets/recipes/catalog.schema.json +4 -0
- package/skills/sf-view-gen/assets/recipes/features.json +28 -5
- package/skills/sf-view-gen/assets/recipes/recipes.json +159 -59
- package/skills/sf-view-gen/assets/recipes/sections.json +10 -0
- package/skills/sf-view-gen/assets/templates/views/sections/cta.client.tsx +1 -1
- package/skills/sf-view-gen/assets/templates/views/sections/faq.client.tsx +1 -1
- package/skills/sf-view-gen/assets/templates/views/sections/logoCloud.client.tsx +1 -1
- package/skills/sf-view-gen/assets/templates/views/sections/pricing.client.tsx +1 -1
- package/skills/sf-view-gen/assets/templates/views/sections/products.client.tsx +100 -0
- package/skills/sf-view-gen/assets/templates/views/sections/products.tsx +19 -0
- package/skills/sf-view-gen/assets/templates/views/sections/schema.products.ts +39 -0
- package/skills/sf-view-gen/assets/templates/views/sections/statistics.client.tsx +1 -1
- package/skills/sf-view-gen/assets/templates/views/sections/testimonials.client.tsx +1 -1
- package/skills/{json-render-core/SKILL.md → sf-view-gen/references/json-render-core.md} +4 -27
- package/skills/{json-render-next/SKILL.md → sf-view-gen/references/json-render-next.md} +5 -8
- package/skills/{json-render-react/SKILL.md → sf-view-gen/references/json-render-react.md} +3 -5
- package/skills/{json-render-shadcn/SKILL.md → sf-view-gen/references/json-render-shadcn.md} +3 -5
- package/skills/sf-view-gen/references/views.md +28 -37
- package/skills/sf-view-gen/scripts/catalog.mjs +10 -0
- package/skills/sf-view-gen/scripts/validate.mjs +75 -4
- package/skills/storefront-workflow/SKILL.md +94 -31
- package/skills/{storefront-best-practices/reference/design.md → storefront-workflow/references/design-consistency.md} +13 -29
- package/CHANGELOG.md +0 -84
- package/assets/templates/views/home/assembly/slots/benefits/Feature1/binding.json +0 -5
- package/assets/templates/views/home/assembly/slots/benefits/Feature2/binding.json +0 -5
- package/assets/templates/views/home/assembly/slots/benefits/Feature2/registry.part +0 -10
- package/assets/templates/views/home/assembly/slots/categories/ProductCategory2/binding.json +0 -5
- package/assets/templates/views/home/assembly/slots/categories/ProductCategory2/catalog.part +0 -4
- package/assets/templates/views/home/assembly/slots/categories/ProductCategory2/registry.part +0 -16
- package/assets/templates/views/home/assembly/slots/hero/StorefrontHero1/binding.json +0 -5
- package/assets/templates/views/home/assembly/slots/hero/StorefrontHero1/catalog.part +0 -4
- package/assets/templates/views/home/assembly/slots/hero/StorefrontHero1/element.part +0 -5
- package/assets/templates/views/user-panel/index.tsx +0 -106
- package/assets/templates/views/user-panel/registry.tsx +0 -54
- package/assets/templates/views/user-panel/schema.ts +0 -79
- package/commands/sf-add-view.md +0 -57
- package/commands/sf-feature.md +0 -28
- package/commands/sf-theme.md +0 -26
- package/commands/sf-view.md +0 -67
- package/skills/building-storefronts/SKILL.md +0 -178
- package/skills/building-storefronts/references/frontend-integration.md +0 -229
- package/skills/json-render-remotion/SKILL.md +0 -111
- package/skills/json-render-solid/SKILL.md +0 -204
- package/skills/nextjs-shadcn/SKILL.md +0 -367
- package/skills/nextjs-shadcn/references/architecture.md +0 -499
- package/skills/nextjs-shadcn/references/project-setup.md +0 -162
- package/skills/nextjs-shadcn/references/shadcn-platform.md +0 -261
- package/skills/nextjs-shadcn/references/sidebar.md +0 -274
- package/skills/nextjs-shadcn/references/styling.md +0 -555
- package/skills/shadcn-component-discovery/SKILL.md +0 -273
- package/skills/shadcn-component-discovery/references/registries.md +0 -226
- package/skills/shadcn-theming/SKILL.md +0 -104
- package/skills/storefront-best-practices/SKILL.md +0 -421
- package/skills/storefront-best-practices/reference/components/breadcrumbs.md +0 -123
- package/skills/storefront-best-practices/reference/components/cart-popup.md +0 -189
- package/skills/storefront-best-practices/reference/components/country-selector.md +0 -298
- package/skills/storefront-best-practices/reference/components/footer.md +0 -112
- package/skills/storefront-best-practices/reference/components/hero.md +0 -241
- package/skills/storefront-best-practices/reference/components/megamenu.md +0 -239
- package/skills/storefront-best-practices/reference/components/navbar.md +0 -397
- package/skills/storefront-best-practices/reference/components/popups.md +0 -221
- package/skills/storefront-best-practices/reference/components/product-card.md +0 -125
- package/skills/storefront-best-practices/reference/components/product-reviews.md +0 -217
- package/skills/storefront-best-practices/reference/components/product-slider.md +0 -174
- package/skills/storefront-best-practices/reference/components/search.md +0 -101
- package/skills/storefront-best-practices/reference/connecting-to-backend.md +0 -391
- package/skills/storefront-best-practices/reference/features/promotions.md +0 -307
- package/skills/storefront-best-practices/reference/features/wishlist.md +0 -230
- package/skills/storefront-best-practices/reference/layouts/account.md +0 -380
- package/skills/storefront-best-practices/reference/layouts/cart.md +0 -316
- package/skills/storefront-best-practices/reference/layouts/checkout.md +0 -486
- package/skills/storefront-best-practices/reference/layouts/home-page.md +0 -264
- package/skills/storefront-best-practices/reference/layouts/order-confirmation.md +0 -231
- package/skills/storefront-best-practices/reference/layouts/product-details.md +0 -527
- package/skills/storefront-best-practices/reference/layouts/product-listing.md +0 -520
- package/skills/storefront-best-practices/reference/layouts/static-pages.md +0 -356
- package/skills/storefront-best-practices/reference/medusa.md +0 -307
- /package/assets/templates/views/home/assembly/slots/benefits/{Feature1 → cards}/catalog.part +0 -0
- /package/assets/templates/views/home/assembly/slots/benefits/{Feature1 → cards}/element.part +0 -0
- /package/assets/templates/views/home/assembly/slots/benefits/{Feature2 → split}/catalog.part +0 -0
- /package/assets/templates/views/home/assembly/slots/benefits/{Feature2 → split}/element.part +0 -0
- /package/skills/{storefront-best-practices/reference → storefront-workflow/references}/mobile-responsiveness.md +0 -0
- /package/skills/{storefront-best-practices/reference → storefront-workflow/references}/seo.md +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "category-led",
|
|
3
|
+
"title": "Category-led combined presentation plus freshness selection",
|
|
4
|
+
"intent": "Lead with a category-focused combined grid-and-carousel of the newest arrivals, keep category navigation visible, and cross-sell a related category below. Selection (category handle and ordering) is independent of the presentation variant.",
|
|
5
|
+
"sections": [
|
|
6
|
+
{ "id": "slot:hero", "type": "hero", "variant": "StorefrontHero1" },
|
|
7
|
+
{ "id": "slot:benefits", "type": "benefits", "variant": "Feature1" },
|
|
8
|
+
{ "id": "slot:categories", "type": "categories", "variant": "ProductCategory2" },
|
|
9
|
+
{
|
|
10
|
+
"id": "home-products-1",
|
|
11
|
+
"type": "products",
|
|
12
|
+
"variant": "ProductShowcase1",
|
|
13
|
+
"objective": "Showcase the newest arrivals in a category as a browsable carousel",
|
|
14
|
+
"destination": "/categories/repuestos",
|
|
15
|
+
"source": {
|
|
16
|
+
"kind": "products",
|
|
17
|
+
"query": { "categories": ["repuestos"], "sort": "newest", "pageSize": 12 }
|
|
18
|
+
},
|
|
19
|
+
"content": {
|
|
20
|
+
"heading": "Novedades en repuestos",
|
|
21
|
+
"description": "Lo último que llega a la categoría."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "home-products-2",
|
|
26
|
+
"type": "products",
|
|
27
|
+
"variant": "ProductCard1",
|
|
28
|
+
"objective": "Cross-sell a related category below the carousel",
|
|
29
|
+
"destination": "/categories/accesorios",
|
|
30
|
+
"source": {
|
|
31
|
+
"kind": "products",
|
|
32
|
+
"query": { "categories": ["accesorios"], "sort": "featured", "pageSize": 4 }
|
|
33
|
+
},
|
|
34
|
+
"content": { "heading": "Accesorios recomendados" }
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "collection-led",
|
|
3
|
+
"title": "Collection-led grid plus campaign CTA",
|
|
4
|
+
"intent": "Lead the home with one curated collection as the primary merchandise grid, and reinforce it with a single campaign call to action. The selection is a collection handle, not a sales ranking.",
|
|
5
|
+
"sections": [
|
|
6
|
+
{ "id": "slot:hero", "type": "hero", "variant": "StorefrontHero1" },
|
|
7
|
+
{ "id": "slot:benefits", "type": "benefits", "variant": "Feature1" },
|
|
8
|
+
{
|
|
9
|
+
"id": "home-products-1",
|
|
10
|
+
"type": "products",
|
|
11
|
+
"variant": "ProductCard1",
|
|
12
|
+
"objective": "Move collection browsers into the featured collection",
|
|
13
|
+
"destination": "/collections/featured",
|
|
14
|
+
"source": {
|
|
15
|
+
"kind": "products",
|
|
16
|
+
"query": { "collections": ["featured"], "sort": "featured", "pageSize": 8 }
|
|
17
|
+
},
|
|
18
|
+
"content": {
|
|
19
|
+
"heading": "Destacados de la temporada",
|
|
20
|
+
"description": "Una selección curada de la colección destacada."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "home-cta-1",
|
|
25
|
+
"type": "cta",
|
|
26
|
+
"objective": "Reinforce the campaign message with one clear action",
|
|
27
|
+
"destination": "/collections/featured",
|
|
28
|
+
"content": {
|
|
29
|
+
"badgeText": "Campaña",
|
|
30
|
+
"title": "Envío gratis esta semana",
|
|
31
|
+
"description": "En pedidos superiores al mínimo de la campaña.",
|
|
32
|
+
"primaryCta": { "label": "Ver la colección", "href": "/collections/featured" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{ "id": "slot:categories", "type": "categories", "variant": "ProductCategory2" }
|
|
36
|
+
]
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thorprovider/storefront",
|
|
3
|
-
"version": "0.4.0
|
|
4
|
-
"description": "Deterministic storefront scaffolder and installable OpenCode
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Deterministic storefront scaffolder and installable OpenCode skill suite for Thor Commerce (Next.js, @thorprovider/blocks, @thorprovider/adapters, Medusa)",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"bin": "
|
|
6
|
+
"bin": "bin/storefront.js",
|
|
7
7
|
"files": [
|
|
8
8
|
"assets",
|
|
9
9
|
"bin",
|
|
10
|
-
"
|
|
10
|
+
"examples",
|
|
11
11
|
"skills",
|
|
12
12
|
"recipes",
|
|
13
13
|
"scripts",
|
|
14
|
-
"README.md"
|
|
14
|
+
"README.md",
|
|
15
|
+
"VENDOR.md"
|
|
15
16
|
],
|
|
16
17
|
"engines": {
|
|
17
18
|
"node": ">=20.9.0"
|
|
@@ -21,7 +22,8 @@
|
|
|
21
22
|
"check-assets": "node ./scripts/sync-assets.mjs --check",
|
|
22
23
|
"pretest": "node ./scripts/sync-assets.mjs --check",
|
|
23
24
|
"test": "vitest run --config vitest.config.ts",
|
|
24
|
-
"test:integration": "vitest run --config vitest.config.ts tests/scaffold-integration.test.ts"
|
|
25
|
+
"test:integration": "vitest run --config vitest.config.ts tests/scaffold-integration.test.ts tests/starter-integration.test.ts",
|
|
26
|
+
"test:browser": "node ./tests/support/projection-ownership.browser.mjs"
|
|
25
27
|
},
|
|
26
28
|
"publishConfig": {
|
|
27
29
|
"access": "public",
|
|
@@ -41,10 +43,11 @@
|
|
|
41
43
|
],
|
|
42
44
|
"dependencies": {
|
|
43
45
|
"@clack/prompts": "^1.8.1",
|
|
46
|
+
"@fission-ai/openspec": "1.11.0",
|
|
44
47
|
"semver": "^7.7.4"
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
47
50
|
"vitest": "^3.2.4"
|
|
48
51
|
},
|
|
49
52
|
"license": "MIT"
|
|
50
|
-
}
|
|
53
|
+
}
|
package/recipes/archetypes.json
CHANGED
|
@@ -7,20 +7,20 @@
|
|
|
7
7
|
"default": "compact",
|
|
8
8
|
"intents": {
|
|
9
9
|
"compact": {
|
|
10
|
-
"variant": "
|
|
11
|
-
"when": "A simple, text-forward hero with a single call to action
|
|
10
|
+
"variant": "StorefrontHero",
|
|
11
|
+
"when": "A simple, text-forward hero with a single call to action (canonical `presentation: 'compact'`)."
|
|
12
12
|
},
|
|
13
13
|
"showcase": {
|
|
14
|
-
"variant": "
|
|
15
|
-
"when": "A product-led hero
|
|
14
|
+
"variant": "StorefrontHero",
|
|
15
|
+
"when": "A product-led hero with a search affordance and rotating featured products (canonical `presentation: 'showcase'`)."
|
|
16
16
|
},
|
|
17
17
|
"editorial": {
|
|
18
|
-
"variant": "
|
|
19
|
-
"when": "A storytelling
|
|
18
|
+
"variant": "StorefrontHero",
|
|
19
|
+
"when": "A storytelling hero with department navigation and optional curated deals (canonical `presentation: 'editorial'`)."
|
|
20
20
|
},
|
|
21
21
|
"promotional": {
|
|
22
|
-
"variant": "
|
|
23
|
-
"when": "A campaign hero built around
|
|
22
|
+
"variant": "StorefrontHero",
|
|
23
|
+
"when": "A campaign hero built around real, host-supplied offers (canonical `presentation: 'promotional'`)."
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
},
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"default": "compact",
|
|
29
29
|
"intents": {
|
|
30
30
|
"compact": {
|
|
31
|
-
"variant": "
|
|
31
|
+
"variant": "cards",
|
|
32
32
|
"when": "A short list of benefits with icons and one-line descriptions."
|
|
33
33
|
},
|
|
34
34
|
"detailed": {
|
|
35
|
-
"variant": "
|
|
35
|
+
"variant": "split",
|
|
36
36
|
"when": "Benefits that need longer explanations, richer layout, or supporting media."
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -41,20 +41,20 @@
|
|
|
41
41
|
"default": "standard",
|
|
42
42
|
"intents": {
|
|
43
43
|
"standard": {
|
|
44
|
-
"variant": "
|
|
45
|
-
"when": "A balanced grid of category cards with image and label."
|
|
44
|
+
"variant": "CategoryGrid",
|
|
45
|
+
"when": "A balanced grid of category cards with image and label (canonical `presentation: 'grid'`)."
|
|
46
46
|
},
|
|
47
47
|
"iconGrid": {
|
|
48
|
-
"variant": "
|
|
49
|
-
"when": "A compact icon-based category grid for many small categories."
|
|
48
|
+
"variant": "CategoryGrid",
|
|
49
|
+
"when": "A compact icon-based category grid for many small categories (canonical `presentation: 'icons'`)."
|
|
50
50
|
},
|
|
51
51
|
"featured": {
|
|
52
|
-
"variant": "
|
|
53
|
-
"when": "Few, large featured category tiles that act as primary navigation."
|
|
52
|
+
"variant": "CategoryGrid",
|
|
53
|
+
"when": "Few, large featured category tiles that act as primary navigation (canonical `presentation: 'icons'`)."
|
|
54
54
|
},
|
|
55
55
|
"editorial": {
|
|
56
|
-
"variant": "
|
|
57
|
-
"when": "Category tiles presented as
|
|
56
|
+
"variant": "CategoryGrid",
|
|
57
|
+
"when": "Category tiles presented as a searchable list with subcategory chips (canonical `presentation: 'list'`)."
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
},
|
|
@@ -62,16 +62,16 @@
|
|
|
62
62
|
"default": "standard",
|
|
63
63
|
"intents": {
|
|
64
64
|
"standard": {
|
|
65
|
-
"variant": "
|
|
66
|
-
"when": "A straightforward product detail layout: gallery, title, price, add to cart."
|
|
65
|
+
"variant": "ProductOverview",
|
|
66
|
+
"when": "A straightforward product detail layout: gallery, title, price, add to cart (canonical `presentation: 'standard'`)."
|
|
67
67
|
},
|
|
68
68
|
"gallery": {
|
|
69
|
-
"variant": "
|
|
70
|
-
"when": "The product needs emphasis on a large image gallery with thumbnails."
|
|
69
|
+
"variant": "ProductOverview",
|
|
70
|
+
"when": "The product needs emphasis on a large image gallery with thumbnails (canonical `presentation: 'gallery'`)."
|
|
71
71
|
},
|
|
72
72
|
"rich": {
|
|
73
|
-
"variant": "
|
|
74
|
-
"when": "A detailed product page with tabs, specs, and extensive structured information."
|
|
73
|
+
"variant": "ProductOverview",
|
|
74
|
+
"when": "A detailed product page with tabs, specs, and extensive structured information (canonical `presentation: 'rich'`)."
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
},
|
|
@@ -88,6 +88,15 @@
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
+
"cart.view": {
|
|
92
|
+
"default": "review",
|
|
93
|
+
"intents": {
|
|
94
|
+
"review": {
|
|
95
|
+
"variant": "ShoppingCart",
|
|
96
|
+
"when": "A standalone cart review page: line editing plus backend-authoritative totals before checkout."
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
91
100
|
"category.filter": {
|
|
92
101
|
"default": "sidebar",
|
|
93
102
|
"intents": {
|
|
@@ -148,28 +157,6 @@
|
|
|
148
157
|
"when": "A signed-in shopper's order history with per-order totals and detail on demand."
|
|
149
158
|
}
|
|
150
159
|
}
|
|
151
|
-
},
|
|
152
|
-
"user-panel.shell": {
|
|
153
|
-
"default": "standard",
|
|
154
|
-
"intents": {
|
|
155
|
-
"standard": {
|
|
156
|
-
"variant": "AppShell1",
|
|
157
|
-
"when": "A standard account shell with side navigation and content area."
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
"user-panel.orderHistory": {
|
|
162
|
-
"default": "compact",
|
|
163
|
-
"intents": {
|
|
164
|
-
"compact": {
|
|
165
|
-
"variant": "OrderHistory1",
|
|
166
|
-
"when": "A concise list of past orders with status and totals."
|
|
167
|
-
},
|
|
168
|
-
"detailed": {
|
|
169
|
-
"variant": "OrderHistory2",
|
|
170
|
-
"when": "Order history with line-item detail, tracking, and reorder actions."
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
160
|
}
|
|
174
161
|
}
|
|
175
162
|
}
|