@thorprovider/storefront 0.13.3 → 0.15.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.
Files changed (108) hide show
  1. package/README.md +19 -8
  2. package/assets/templates/app/lib/__STOREFRONT__/mappers.ts +18 -3
  3. package/assets/templates/app/lib/__STOREFRONT__/views/sections/products.client.tsx +1 -0
  4. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.products.ts +6 -0
  5. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.universal-main-menu.ts +3 -1
  6. package/assets/templates/app/public/images/README.md +43 -0
  7. package/assets/templates/app/public/images/banners/banner-aurora-deal.webp +0 -0
  8. package/assets/templates/app/public/images/banners/banner-guia-regalo.webp +0 -0
  9. package/assets/templates/app/public/images/banners/banner-mesa-decor.webp +0 -0
  10. package/assets/templates/app/public/images/banners/banner-nuevas-llegadas.webp +0 -0
  11. package/assets/templates/app/public/images/banners/banner-salon-oferta.webp +0 -0
  12. package/assets/templates/app/public/images/categories/accessories.webp +0 -0
  13. package/assets/templates/app/public/images/categories/dresses.webp +0 -0
  14. package/assets/templates/app/public/images/categories/furniture.webp +0 -0
  15. package/assets/templates/app/public/images/categories/home.webp +0 -0
  16. package/assets/templates/app/public/images/categories/jackets.webp +0 -0
  17. package/assets/templates/app/public/images/editorial/studio.webp +0 -0
  18. package/assets/templates/app/public/images/products/alpine-jacket.webp +0 -0
  19. package/assets/templates/app/public/images/products/amber-dress.webp +0 -0
  20. package/assets/templates/app/public/images/products/atlas-lamp.webp +0 -0
  21. package/assets/templates/app/public/images/products/atlas-sofa.webp +0 -0
  22. package/assets/templates/app/public/images/products/aurora-jacket.webp +0 -0
  23. package/assets/templates/app/public/images/products/boreal-jacket.webp +0 -0
  24. package/assets/templates/app/public/images/products/camille-dress.webp +0 -0
  25. package/assets/templates/app/public/images/products/ceramic-table-lamp.webp +0 -0
  26. package/assets/templates/app/public/images/products/cinder-jacket.webp +0 -0
  27. package/assets/templates/app/public/images/products/copper-lamp.webp +0 -0
  28. package/assets/templates/app/public/images/products/cove-bag.webp +0 -0
  29. package/assets/templates/app/public/images/products/dahlia-dress.webp +0 -0
  30. package/assets/templates/app/public/images/products/drift-jacket.webp +0 -0
  31. package/assets/templates/app/public/images/products/dune-lamp.webp +0 -0
  32. package/assets/templates/app/public/images/products/elara-dress.webp +0 -0
  33. package/assets/templates/app/public/images/products/ember-jacket.webp +0 -0
  34. package/assets/templates/app/public/images/products/fable-bag.webp +0 -0
  35. package/assets/templates/app/public/images/products/fjord-jacket.webp +0 -0
  36. package/assets/templates/app/public/images/products/floor-cushion.webp +0 -0
  37. package/assets/templates/app/public/images/products/harbor-jacket.webp +0 -0
  38. package/assets/templates/app/public/images/products/helios-lamp.webp +0 -0
  39. package/assets/templates/app/public/images/products/iris-dress.webp +0 -0
  40. package/assets/templates/app/public/images/products/juniper-bag.webp +0 -0
  41. package/assets/templates/app/public/images/products/kestrel-bag.webp +0 -0
  42. package/assets/templates/app/public/images/products/linen-armchair.webp +0 -0
  43. package/assets/templates/app/public/images/products/lumen-dress.webp +0 -0
  44. package/assets/templates/app/public/images/products/luna-bag.webp +0 -0
  45. package/assets/templates/app/public/images/products/marble-coffee-table.webp +0 -0
  46. package/assets/templates/app/public/images/products/marlowe-bag.webp +0 -0
  47. package/assets/templates/app/public/images/products/meridian-jacket.webp +0 -0
  48. package/assets/templates/app/public/images/products/nomad-jacket.webp +0 -0
  49. package/assets/templates/app/public/images/products/nova-dress.webp +0 -0
  50. package/assets/templates/app/public/images/products/oak-dining-table.webp +0 -0
  51. package/assets/templates/app/public/images/products/onyx-lamp.webp +0 -0
  52. package/assets/templates/app/public/images/products/piper-bag.webp +0 -0
  53. package/assets/templates/app/public/images/products/quill-lamp.webp +0 -0
  54. package/assets/templates/app/public/images/products/rosalind-dress.webp +0 -0
  55. package/assets/templates/app/public/images/products/rune-bag.webp +0 -0
  56. package/assets/templates/app/public/images/products/side-table.webp +0 -0
  57. package/assets/templates/app/public/images/products/slate-lamp.webp +0 -0
  58. package/assets/templates/app/public/images/products/solis-dress.webp +0 -0
  59. package/assets/templates/app/public/images/products/storage-shelf.webp +0 -0
  60. package/assets/templates/app/public/images/products/terra-lamp.webp +0 -0
  61. package/assets/templates/app/public/images/products/tundra-jacket.webp +0 -0
  62. package/assets/templates/app/public/images/products/vantage-jacket.webp +0 -0
  63. package/assets/templates/app/public/images/products/vera-dress.webp +0 -0
  64. package/assets/templates/app/public/images/products/verdant-lamp.webp +0 -0
  65. package/assets/templates/app/public/images/products/wall-mirror.webp +0 -0
  66. package/assets/templates/app/public/images/products/wool-rug.webp +0 -0
  67. package/assets/templates/views/account/address-book-advanced.defaults.ts +1 -1
  68. package/assets/templates/views/home/assembly/assembly.json +1 -2
  69. package/assets/templates/views/home/assembly/index.skeleton.tsx +3 -7
  70. package/assets/templates/views/home/assembly/registry.skeleton.tsx +0 -3
  71. package/assets/templates/views/home/content.ts +80 -72
  72. package/assets/templates/views/home/data.ts +25 -3
  73. package/assets/templates/views/home/index.tsx +4 -21
  74. package/assets/templates/views/home/props.ts +1 -7
  75. package/assets/templates/views/home/registry.tsx +0 -35
  76. package/assets/templates/views/home/schema.ts +0 -36
  77. package/bin/storefront.js +12 -27
  78. package/package.json +3 -2
  79. package/recipes/archetypes.json +0 -21
  80. package/recipes/catalog.json +0 -22
  81. package/recipes/features.json +0 -2
  82. package/recipes/recipe.schema.json +5 -0
  83. package/recipes/recipes.json +32 -11
  84. package/recipes/validate.mjs +7 -0
  85. package/scripts/candidate.mjs +3 -3
  86. package/scripts/default-sections.mjs +1 -0
  87. package/scripts/env-file.mjs +5 -0
  88. package/scripts/file-classes.mjs +3 -0
  89. package/scripts/generate-demo-images.mjs +507 -0
  90. package/scripts/reconcile.mjs +32 -1
  91. package/scripts/render-templates.mjs +13 -1
  92. package/scripts/section-compat.mjs +10 -1
  93. package/scripts/section-operations.mjs +3 -0
  94. package/scripts/starter.mjs +25 -1
  95. package/scripts/theme/starter-theme.mjs +118 -0
  96. package/scripts/view-assembly.mjs +26 -5
  97. package/skills/sf-view-gen/assets/recipes/archetypes.json +0 -21
  98. package/skills/sf-view-gen/assets/recipes/catalog.json +0 -22
  99. package/skills/sf-view-gen/assets/recipes/features.json +0 -2
  100. package/skills/sf-view-gen/assets/recipes/recipes.json +32 -11
  101. package/skills/sf-view-gen/assets/templates/views/sections/products.client.tsx +53 -1
  102. package/skills/sf-view-gen/assets/templates/views/sections/schema.products.ts +6 -0
  103. package/skills/sf-view-gen/assets/templates/views/sections/schema.universal-main-menu.ts +3 -1
  104. package/skills/sf-view-gen/scripts/validate.mjs +7 -0
  105. package/assets/templates/views/home/assembly/slots/categories/CategoryGrid/binding.json +0 -5
  106. package/assets/templates/views/home/assembly/slots/categories/CategoryGrid/catalog.part +0 -8
  107. package/assets/templates/views/home/assembly/slots/categories/CategoryGrid/element.part +0 -5
  108. package/assets/templates/views/home/assembly/slots/categories/CategoryGrid/registry.part +0 -31
@@ -34,11 +34,7 @@ export const heroContent = {
34
34
  * user-owned content, not in the block library.
35
35
  */
36
36
  const editorialImage = {
37
- src:
38
- 'data:image/svg+xml;charset=utf-8,' +
39
- encodeURIComponent(
40
- `<svg xmlns='http://www.w3.org/2000/svg' width='1200' height='900'><rect width='100%' height='100%' fill='#e2e8f0'/><circle cx='360' cy='300' r='170' fill='#cbd5e1'/><rect x='560' y='180' width='420' height='420' rx='24' fill='#94a3b8' opacity='.55'/><path d='M120 720h960' stroke='#94a3b8' stroke-width='14' stroke-linecap='round'/></svg>`,
41
- ),
37
+ src: '/images/editorial/studio.webp',
42
38
  alt: '',
43
39
  }
44
40
 
@@ -70,18 +66,6 @@ export const benefitsContent = {
70
66
  ],
71
67
  }
72
68
 
73
- export const categoriesContent = {
74
- title: 'Compra por categoría',
75
- description: 'Explora nuestro catálogo completo.',
76
- browseLabel: 'Explorar',
77
- itemsLabel: 'productos',
78
- searchLabel: 'Buscar categorías',
79
- searchPlaceholder: 'Buscar categorías',
80
- emptyLabel: 'No hay categorías disponibles.',
81
- noResultsLabel: 'No se encontraron categorías.',
82
- viewAllLabel: 'Ver todas las categorías',
83
- }
84
-
85
69
  /**
86
70
  * Banner-hero campaign (hero slot, UniversalBanner variant). Editorial content
87
71
  * in the marketplace deal-wall voice: every destination is a real category or
@@ -91,49 +75,13 @@ export const categoriesContent = {
91
75
  * (−19%), Luna $82, Helios $96. A conformance test pins each claim to the
92
76
  * catalog fixtures, so editing a claim to an unsupported value fails CI.
93
77
  */
94
- const bannerScene = (svg: string) =>
95
- 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svg)
96
-
97
- // Warm living-room scene for the salon anchor deal: cream wall, window light,
98
- // bouclé sofa silhouette with a terracotta cushion.
99
- const salonDesktop = bannerScene(
100
- `<svg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'><defs><linearGradient id='wall' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='#f2e9dd'/><stop offset='1' stop-color='#e5d6c3'/></linearGradient><linearGradient id='glow' x1='0' y1='0' x2='1' y2='0'><stop offset='0' stop-color='#fff6e8' stop-opacity='0.95'/><stop offset='1' stop-color='#fff6e8' stop-opacity='0'/></linearGradient></defs><rect width='1600' height='900' fill='url(#wall)'/><rect x='980' y='90' width='380' height='560' rx='18' fill='#fdfaf4' opacity='0.9'/><rect x='1010' y='120' width='320' height='500' rx='12' fill='url(#glow)'/><rect x='0' y='720' width='1600' height='180' fill='#d9c4a8'/><g fill='#efe3d2' stroke='#c9b295' stroke-width='6'><rect x='330' y='430' width='740' height='240' rx='46'/><rect x='330' y='340' width='360' height='140' rx='42'/><rect x='700' y='340' width='370' height='140' rx='42'/></g><rect x='620' y='470' width='120' height='90' rx='24' fill='#c96f4a'/><rect x='1120' y='250' width='140' height='470' rx='14' fill='#b7a184' opacity='0.7'/><circle cx='1190' cy='210' r='52' fill='#8a9b6e'/><text x='90' y='140' font-family='system-ui, sans-serif' font-size='40' fill='#8b7a63' opacity='0.55'>SALÓN</text></svg>`,
101
- )
102
- const salonMobile = bannerScene(
103
- `<svg xmlns='http://www.w3.org/2000/svg' width='640' height='960' viewBox='0 0 640 960'><defs><linearGradient id='wallm' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='#f2e9dd'/><stop offset='1' stop-color='#e5d6c3'/></linearGradient></defs><rect width='640' height='960' fill='url(#wallm)'/><rect x='60' y='140' width='520' height='300' rx='16' fill='#fdfaf4' opacity='0.9'/><rect x='0' y='760' width='640' height='200' fill='#d9c4a8'/><g fill='#efe3d2' stroke='#c9b295' stroke-width='5'><rect x='80' y='520' width='480' height='220' rx='40'/><rect x='80' y='440' width='230' height='120' rx='34'/><rect x='320' y='440' width='240' height='120' rx='34'/></g><rect x='270' y='550' width='100' height='76' rx='20' fill='#c96f4a'/></svg>`,
104
- )
105
-
106
- // Cool quilted-jacket scene for the Aurora deal tile (catalog imageHue 222).
107
- const auroraDesktop = bannerScene(
108
- `<svg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'><defs><linearGradient id='night' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='#2b3d55'/><stop offset='1' stop-color='#1d2940'/></linearGradient></defs><rect width='1600' height='900' fill='url(#night)'/><circle cx='1240' cy='260' r='150' fill='#3d5578' opacity='0.5'/><g fill='#31445e' stroke='#4c6588' stroke-width='8'><path d='M690 300 L910 300 L980 420 L940 470 L940 760 L660 760 L660 470 L620 420 Z'/><path d='M790 300 L790 420' stroke='#4c6588' stroke-width='6'/></g><g stroke='#4c6588' stroke-width='4' opacity='0.8'><path d='M700 440 h200 M700 500 h200 M700 560 h200 M700 620 h200 M700 680 h200'/></g><rect x='0' y='760' width='1600' height='140' fill='#16213a'/><text x='90' y='140' font-family='system-ui, sans-serif' font-size='40' fill='#8fa8c8' opacity='0.6'>MODA</text></svg>`,
109
- )
110
- const auroraMobile = bannerScene(
111
- `<svg xmlns='http://www.w3.org/2000/svg' width='640' height='960' viewBox='0 0 640 960'><rect width='640' height='960' fill='#2b3d55'/><circle cx='480' cy='260' r='120' fill='#3d5578' opacity='0.5'/><g fill='#31445e' stroke='#4c6588' stroke-width='7'><path d='M230 380 L410 380 L470 480 L436 524 L436 780 L204 780 L204 524 L170 480 Z'/></g><g stroke='#4c6588' stroke-width='4' opacity='0.8'><path d='M216 540 h208 M216 600 h208 M216 660 h208 M216 720 h208'/></g><rect x='0' y='820' width='640' height='140' fill='#16213a'/></svg>`,
112
- )
113
-
114
- // Sage-wall arch mirror scene for the arrivals tile.
115
- const arrivalsDesktop = bannerScene(
116
- `<svg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'><rect width='1600' height='900' fill='#dde4d8'/><rect x='0' y='700' width='1600' height='200' fill='#c2cbb8'/><g><path d='M620 660 L620 340 Q620 220 740 220 Q860 220 860 340 L860 660 Z' fill='#d9c9a8' stroke='#b09b74' stroke-width='10'/><path d='M650 640 L650 350 Q650 260 740 260 Q830 260 830 350 L830 640 Z' fill='#eef2ea'/><path d='M660 620 L660 356 Q660 276 740 276 Q800 276 812 320 L688 620 Z' fill='#ffffff' opacity='0.55'/></g><rect x='1020' y='420' width='90' height='280' rx='10' fill='#b7a184' opacity='0.8'/><circle cx='1065' cy='380' r='46' fill='#8a9b6e'/><circle cx='1045' cy='340' r='26' fill='#9daf80'/><rect x='240' y='560' width='120' height='140' rx='22' fill='#c96f4a' opacity='0.85'/><text x='90' y='140' font-family='system-ui, sans-serif' font-size='40' fill='#75816a' opacity='0.6'>HOGAR</text></svg>`,
117
- )
118
- const arrivalsMobile = bannerScene(
119
- `<svg xmlns='http://www.w3.org/2000/svg' width='640' height='960' viewBox='0 0 640 960'><rect width='640' height='960' fill='#dde4d8'/><rect x='0' y='760' width='640' height='200' fill='#c2cbb8'/><path d='M210 700 L210 380 Q210 250 320 250 Q430 250 430 380 L430 700 Z' fill='#d9c9a8' stroke='#b09b74' stroke-width='9'/><path d='M236 680 L236 390 Q236 296 320 296 Q404 296 404 390 L404 680 Z' fill='#eef2ea'/><path d='M246 660 L246 400 Q246 316 320 316 Q376 316 388 356 L282 660 Z' fill='#ffffff' opacity='0.55'/><rect x='470' y='500' width='70' height='220' rx='10' fill='#b7a184' opacity='0.8'/><circle cx='505' cy='460' r='38' fill='#8a9b6e'/></svg>`,
120
- )
121
-
122
- // Gift scene for the under-$100 tile: berry crossbody bag on a pedestal.
123
- const giftsDesktop = bannerScene(
124
- `<svg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'><rect width='1600' height='900' fill='#f3e7e2'/><rect x='0' y='720' width='1600' height='180' fill='#e0cdc6'/><rect x='560' y='640' width='480' height='90' rx='14' fill='#d8c2ba'/><rect x='600' y='300' width='400' height='350' rx='30' fill='#a4465c'/><path d='M700 300 Q700 210 800 210 Q900 210 900 300' fill='none' stroke='#7d3346' stroke-width='22'/><rect x='600' y='420' width='400' height='26' fill='#7d3346' opacity='0.5'/><rect x='770' y='392' width='60' height='80' rx='10' fill='#e8c8a0'/><circle cx='1160' cy='250' r='90' fill='#e8c8a0' opacity='0.5'/><text x='90' y='140' font-family='system-ui, sans-serif' font-size='40' fill='#9c7c74' opacity='0.6'>REGALO</text></svg>`,
125
- )
126
- const giftsMobile = bannerScene(
127
- `<svg xmlns='http://www.w3.org/2000/svg' width='640' height='960' viewBox='0 0 640 960'><rect width='640' height='960' fill='#f3e7e2'/><rect x='0' y='780' width='640' height='180' fill='#e0cdc6'/><rect x='170' y='700' width='300' height='80' rx='12' fill='#d8c2ba'/><rect x='200' y='400' width='240' height='300' rx='26' fill='#a4465c'/><path d='M270 400 Q270 320 320 320 Q370 320 370 400' fill='none' stroke='#7d3346' stroke-width='20'/><rect x='200' y='510' width='240' height='22' fill='#7d3346' opacity='0.5'/><rect x='292' y='484' width='52' height='66' rx='9' fill='#e8c8a0'/></svg>`,
128
- )
129
-
130
- // Dining-table scene for the decor tile: oak table, linen runner, plate stack.
131
- const decorDesktop = bannerScene(
132
- `<svg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'><rect width='1600' height='900' fill='#eef1ec'/><rect x='0' y='640' width='1600' height='260' fill='#d5dccf'/><rect x='180' y='470' width='1240' height='190' rx='18' fill='#c9a879'/><rect x='120' y='660' width='60' height='150' rx='10' fill='#a98d63'/><rect x='1420' y='660' width='60' height='150' rx='10' fill='#a98d63'/><rect x='560' y='440' width='480' height='60' rx='8' fill='#f6f2ea'/><g fill='#ffffff' stroke='#cdd6c6' stroke-width='6'><circle cx='430' cy='440' r='110'/><circle cx='760' cy='430' r='86'/><circle cx='1050' cy='445' r='110'/></g><circle cx='430' cy='440' r='60' fill='#e8e3d6'/><circle cx='1050' cy='445' r='60' fill='#e8e3d6'/><g><rect x='1240' y='330' width='90' height='150' rx='16' fill='#b7a184'/><path d='M1265 330 q20 -70 40 0' fill='none' stroke='#8a9b6e' stroke-width='10'/><circle cx='1285' cy='248' r='34' fill='#9daf80'/></g><text x='90' y='140' font-family='system-ui, sans-serif' font-size='40' fill='#7c8778' opacity='0.6'>MESA</text></svg>`,
133
- )
134
- const decorMobile = bannerScene(
135
- `<svg xmlns='http://www.w3.org/2000/svg' width='640' height='960' viewBox='0 0 640 960'><rect width='640' height='960' fill='#eef1ec'/><rect x='0' y='700' width='640' height='260' fill='#d5dccf'/><rect x='40' y='560' width='560' height='170' rx='16' fill='#c9a879'/><rect x='180' y='530' width='280' height='50' rx='8' fill='#f6f2ea'/><g fill='#ffffff' stroke='#cdd6c6' stroke-width='6'><circle cx='230' cy='520' r='80'/><circle cx='430' cy='525' r='80'/></g><g><rect x='470' y='380' width='70' height='120' rx='14' fill='#b7a184'/><path d='M490 380 q16 -54 32 0' fill='none' stroke='#8a9b6e' stroke-width='9'/><circle cx='506' cy='318' r='28' fill='#9daf80'/></g></svg>`,
136
- )
78
+ /**
79
+ * Demo photography for the campaign banners: local static files under
80
+ * `public/images/banners`, shipped by the starter and replaced in place (see the
81
+ * folder README). The banner id is the file name, so a new shot needs no code
82
+ * change — remove a file and the block falls back to its own placeholder.
83
+ */
84
+ const bannerImage = (id: string) => `/images/banners/${id}.webp`
137
85
 
138
86
  export const heroBannerData = {
139
87
  campaign: {
@@ -157,7 +105,7 @@ export const heroBannerData = {
157
105
  { id: 'cta-atlas', label: 'Comprar Atlas', target: { kind: 'product', id: 'atlas-sofa' }, tone: 'secondary' },
158
106
  ],
159
107
  },
160
- media: { desktop: salonDesktop, mobile: salonMobile },
108
+ media: { desktop: bannerImage('banner-salon-oferta') },
161
109
  presentation: {
162
110
  mode: 'overlay',
163
111
  width: 'full',
@@ -170,7 +118,7 @@ export const heroBannerData = {
170
118
  radius: '2xl',
171
119
  surface: 'card',
172
120
  overlay: 'gradient',
173
- overlayOpacity: 'strong',
121
+ overlayOpacity: 'medium',
174
122
  padding: 'lg',
175
123
  textScale: 'lg',
176
124
  },
@@ -190,7 +138,7 @@ export const heroBannerData = {
190
138
  { id: 'cta-aurora', label: 'Ver chaqueta', target: { kind: 'product', id: 'aurora-jacket' }, tone: 'primary' },
191
139
  ],
192
140
  },
193
- media: { desktop: auroraDesktop, mobile: auroraMobile },
141
+ media: { desktop: bannerImage('banner-aurora-deal') },
194
142
  presentation: {
195
143
  mode: 'overlay',
196
144
  width: 'full',
@@ -202,7 +150,7 @@ export const heroBannerData = {
202
150
  align: 'start',
203
151
  radius: '2xl',
204
152
  surface: 'card',
205
- overlay: 'scrim',
153
+ overlay: 'gradient',
206
154
  overlayOpacity: 'medium',
207
155
  padding: 'md',
208
156
  textScale: 'sm',
@@ -226,7 +174,7 @@ export const heroBannerData = {
226
174
  { id: 'cta-novedades', label: 'Ver novedades', target: { kind: 'category', id: 'furniture' }, tone: 'secondary' },
227
175
  ],
228
176
  },
229
- media: { desktop: arrivalsDesktop, mobile: arrivalsMobile },
177
+ media: { desktop: bannerImage('banner-nuevas-llegadas') },
230
178
  presentation: {
231
179
  mode: 'overlay',
232
180
  width: 'full',
@@ -238,7 +186,7 @@ export const heroBannerData = {
238
186
  align: 'start',
239
187
  radius: '2xl',
240
188
  surface: 'card',
241
- overlay: 'scrim',
189
+ overlay: 'gradient',
242
190
  overlayOpacity: 'light',
243
191
  padding: 'md',
244
192
  textScale: 'sm',
@@ -262,7 +210,7 @@ export const heroBannerData = {
262
210
  { id: 'cta-regalos', label: 'Ver regalos', target: { kind: 'category', id: 'accessories' }, tone: 'primary' },
263
211
  ],
264
212
  },
265
- media: { desktop: giftsDesktop, mobile: giftsMobile },
213
+ media: { desktop: bannerImage('banner-guia-regalo') },
266
214
  presentation: {
267
215
  mode: 'overlay',
268
216
  width: 'full',
@@ -274,7 +222,7 @@ export const heroBannerData = {
274
222
  align: 'start',
275
223
  radius: '2xl',
276
224
  surface: 'card',
277
- overlay: 'scrim',
225
+ overlay: 'gradient',
278
226
  overlayOpacity: 'medium',
279
227
  padding: 'md',
280
228
  textScale: 'sm',
@@ -298,7 +246,7 @@ export const heroBannerData = {
298
246
  { id: 'cta-mesa', label: 'Ver decoración', target: { kind: 'category', id: 'home' }, tone: 'secondary' },
299
247
  ],
300
248
  },
301
- media: { desktop: decorDesktop, mobile: decorMobile },
249
+ media: { desktop: bannerImage('banner-mesa-decor') },
302
250
  presentation: {
303
251
  mode: 'overlay',
304
252
  width: 'full',
@@ -310,7 +258,7 @@ export const heroBannerData = {
310
258
  align: 'start',
311
259
  radius: '2xl',
312
260
  surface: 'card',
313
- overlay: 'scrim',
261
+ overlay: 'gradient',
314
262
  overlayOpacity: 'light',
315
263
  padding: 'md',
316
264
  textScale: 'sm',
@@ -380,6 +328,31 @@ export const heroBannerData = {
380
328
  },
381
329
  }
382
330
 
331
+ /**
332
+ * Mid-page campaign band (the `universal-banner` section instance). It reuses
333
+ * the hero campaign — same banners, same real destinations and price claims — but
334
+ * refs only the two campaign tiles and lays them out as a wide pair, so the page
335
+ * changes tone between merch rails without inventing a second campaign.
336
+ */
337
+ export const bandBannerData = {
338
+ ...heroBannerData,
339
+ config: {
340
+ ...heroBannerData.config,
341
+ blockId: 'home-campaign-band',
342
+ name: 'Banda de campaña',
343
+ refs: [
344
+ { bannerId: 'banner-nuevas-llegadas' },
345
+ { bannerId: 'banner-guia-regalo' },
346
+ ],
347
+ layout: {
348
+ ...heroBannerData.config.layout,
349
+ columns: { base: 1, md: 2, '2xl': 2 },
350
+ spans: [1, 1],
351
+ maxHeight: 'lg',
352
+ },
353
+ },
354
+ }
355
+
383
356
  /**
384
357
  * Editorial section instance content, keyed by the section instance id the
385
358
  * manifest persists (`views[].sections[].id`, e.g. `home-faq-1`). The derived
@@ -389,10 +362,45 @@ export const heroBannerData = {
389
362
  * the section's neutral default.
390
363
  */
391
364
  export const sectionContent: Record<string, Record<string, unknown>> = {
365
+ // Marketplace shelf order, seeded by the home recipe: best sellers prove
366
+ // demand, the campaign band changes the tone, deals carry urgency, arrivals
367
+ // give the returning visitor something new, and the closing grid and showcase
368
+ // keep the shopper browsing products instead of prose. Every id is minted by
369
+ // the manifest and stable, so removing a section never rewrites this file.
392
370
  'home-products-1': {
393
- heading: 'Los más vendidos en tu tienda',
394
- description: 'Piezas reales del catálogo, con sus descuentos honestos.',
371
+ heading: 'Los más vendidos',
372
+ description: 'Lo que más se está llevando, con precio y descuento reales de catálogo.',
395
373
  ctaLabel: 'Ver todo el catálogo',
396
374
  ctaHref: '/categories',
397
375
  },
376
+ 'home-universal-banner-1': {
377
+ data: bandBannerData,
378
+ },
379
+ 'home-products-2': {
380
+ heading: 'Ofertas de la semana',
381
+ description: 'Piezas rebajadas del catálogo, con el descuento a la vista.',
382
+ ctaLabel: 'Ver rebajas',
383
+ ctaHref: '/categories',
384
+ // Presentation preset, not the section variant: `deals` adds the muted
385
+ // surface and the discount/compare-at badges to every card in the rail.
386
+ sliderPreset: 'deals',
387
+ },
388
+ 'home-products-3': {
389
+ heading: 'Recién llegado',
390
+ description: 'Las últimas incorporaciones de la temporada, antes que nadie.',
391
+ ctaLabel: 'Ver novedades',
392
+ ctaHref: '/categories',
393
+ },
394
+ // Plain product grid (`ProductGrid`): the grid presentation reads the heading
395
+ // and the resolved products only, so this instance carries no description or
396
+ // call to action the block would ignore.
397
+ 'home-products-4': {
398
+ heading: 'Ideas para regalar',
399
+ },
400
+ // Combined grid-and-showcase (`ProductShowcase1`): same resolved products, a
401
+ // shelf that pages in place instead of scrolling sideways.
402
+ 'home-products-5': {
403
+ heading: 'Favoritos del estudio',
404
+ description: 'Piezas elegidas por nuestro estudio, con stock y precio reales de catálogo.',
405
+ },
398
406
  }
@@ -22,12 +22,34 @@ export function toNavCategories(
22
22
  // state. Entries whose id is no longer referenced by the composition are kept
23
23
  // but never queried, so re-adding the section with the same id restores them.
24
24
  export const sectionSources: Record<string, unknown> = {
25
- // The seeded merchandising grid: the mock catalog's real `best-sellers`
26
- // collection through the canonical catalog bridge. The id matches the
27
- // auto-minted instance id of the recipe's default `products` seed.
25
+ // Three rails, three buying reasons, one component. Each id is minted by the
26
+ // home recipe's `defaultSections` seed, and each selection is a canonical
27
+ // catalog collection resolved through the runtime catalog bridge.
28
28
  'home-products-1': {
29
29
  kind: 'products',
30
30
  query: { collections: ['best-sellers'], pageSize: 8 },
31
31
  maxItems: 8,
32
32
  },
33
+ 'home-products-2': {
34
+ kind: 'products',
35
+ query: { collections: ['sale'], pageSize: 8 },
36
+ maxItems: 8,
37
+ },
38
+ 'home-products-3': {
39
+ kind: 'products',
40
+ query: { collections: ['new-arrivals'], pageSize: 8 },
41
+ maxItems: 8,
42
+ },
43
+ // The closing shelves read two further canonical collections: the gift guide
44
+ // renders as a plain grid, the studio selection as the paged showcase.
45
+ 'home-products-4': {
46
+ kind: 'products',
47
+ query: { collections: ['gift-guide'], pageSize: 8 },
48
+ maxItems: 8,
49
+ },
50
+ 'home-products-5': {
51
+ kind: 'products',
52
+ query: { collections: ['studio-essentials'], pageSize: 8 },
53
+ maxItems: 8,
54
+ },
33
55
  }
@@ -11,14 +11,12 @@ import type { StorefrontElement } from '../../spec/types'
11
11
  import type { ViewModule } from '../types'
12
12
  import { registry } from './registry'
13
13
  import { sectionData } from './sections-data'
14
- import { benefitsProps, categoriesProps, heroProps } from './props'
14
+ import { benefitsProps, heroProps } from './props'
15
15
  import * as homeProps from './props'
16
16
  import * as homeData from './data'
17
- import { toCategoryCard, toFeaturedProduct } from '../../mappers'
17
+ import { toFeaturedProduct } from '../../mappers'
18
18
  import { resolveSectionSources, resolveSectionViewStates } from '../../section-sources'
19
19
  import {
20
- categoryCardPropsSchema,
21
- categoryGridPropsSchema,
22
20
  featurePropsSchema,
23
21
  storefrontHeroPropsSchema,
24
22
  } from './schema'
@@ -35,11 +33,6 @@ const elements: Record<string, StorefrontElement> = {
35
33
  type: 'Feature',
36
34
  props: benefitsProps,
37
35
  },
38
- 'home.categories': {
39
- type: 'CategoryGrid',
40
- props: categoriesProps,
41
- on: { openCategory: { action: 'openCategory' } },
42
- },
43
36
  }
44
37
 
45
38
  const catalog = {
@@ -51,14 +44,6 @@ const catalog = {
51
44
  props: featurePropsSchema,
52
45
  description: 'Benefit highlights.',
53
46
  },
54
- CategoryGrid: {
55
- props: categoryGridPropsSchema,
56
- description: 'Category listing that renders category cells.',
57
- },
58
- CategoryCard: {
59
- props: categoryCardPropsSchema,
60
- description: 'One category cell, without listing section chrome.',
61
- },
62
47
  }
63
48
 
64
49
  export const home: ViewModule = {
@@ -74,7 +59,7 @@ export const home: ViewModule = {
74
59
  title: 'Inicio',
75
60
  description: 'Descubre los productos de __SITE_NAME__.',
76
61
  },
77
- entry: pageRoot('home', ['home.hero', 'home.benefits', 'home.categories'], elements),
62
+ entry: pageRoot('home', ['home.hero', 'home.benefits'], elements),
78
63
  },
79
64
  loader: {
80
65
  home: async () => {
@@ -94,10 +79,9 @@ export const home: ViewModule = {
94
79
  sections = {}
95
80
  }
96
81
  try {
97
- const { products, categories, source } = await getCatalog()
82
+ const { products, source } = await getCatalog()
98
83
  return {
99
84
  heroProducts: homeData.selectHeroProducts(products).map(toFeaturedProduct),
100
- categories: categories.map(toCategoryCard),
101
85
  dataSource: source,
102
86
  dataError: null,
103
87
  sections,
@@ -107,7 +91,6 @@ export const home: ViewModule = {
107
91
  // data. Mock mode is labelled by `dataSource`.
108
92
  return {
109
93
  heroProducts: [],
110
- categories: [],
111
94
  dataSource: getDataSource(),
112
95
  dataError:
113
96
  error instanceof Error ? error.message : 'No se pudo cargar el catálogo.',
@@ -4,7 +4,7 @@
4
4
  // and binds them into the element tree, so edits here survive `storefront sync`
5
5
  // and unit removal. Plain data only: no React and no server imports.
6
6
 
7
- import { benefitsContent, categoriesContent, heroContent, heroBannerData, heroImage } from './content'
7
+ import { benefitsContent, heroContent, heroBannerData, heroImage } from './content'
8
8
 
9
9
  export const heroProps = {
10
10
  ...heroContent,
@@ -21,9 +21,3 @@ export const heroBannerProps = {
21
21
  export const benefitsProps = {
22
22
  ...benefitsContent,
23
23
  }
24
-
25
- export const categoriesProps = {
26
- ...categoriesContent,
27
- categories: { $state: '/categories' },
28
- query: { $state: '/categoryQuery' },
29
- }
@@ -10,9 +10,7 @@
10
10
  // schema (./schema.ts) before binding, so a contract mismatch fails loudly at
11
11
  // the boundary instead of rendering undefined fields or literal icon tags.
12
12
 
13
- import { CategoryCard as CategoryCardBlock } from '@thorprovider/blocks/blocks/e-commerce/product-categories/category-card'
14
13
  import { UniversalBanner as UniversalBannerBlock } from '@thorprovider/blocks'
15
- import { CategoryGrid as CategoryGridBlock } from '@thorprovider/blocks/blocks/e-commerce/product-categories/product-category-grid'
16
14
  import { Feature as FeatureBlock } from '@thorprovider/blocks/blocks/marketing/features/feature'
17
15
  import { useEffect, useState } from 'react'
18
16
  import { useStateStore } from '@json-render/react'
@@ -20,8 +18,6 @@ import { resolveIcon } from '../../icon-map'
20
18
  import type { ViewRegistry } from '../types'
21
19
  import * as featureSchemas from './schema'
22
20
  import {
23
- categoryCardPropsSchema,
24
- categoryGridPropsSchema,
25
21
  featurePropsSchema,
26
22
  storefrontHeroPropsSchema,
27
23
  } from './schema'
@@ -54,35 +50,4 @@ export const registry: ViewRegistry = {
54
50
  />
55
51
  )
56
52
  },
57
- CategoryCard: ({ props, emit }) => {
58
- const { set } = useStateStore()
59
- const card = categoryCardPropsSchema.parse(props)
60
- return (
61
- <CategoryCardBlock
62
- {...card}
63
- onBrowse={(category) => {
64
- set('/lastCategory', category.handle ?? String(category.id))
65
- emit('openCategory')
66
- }}
67
- />
68
- )
69
- },
70
- CategoryGrid: ({ props, emit }) => {
71
- const { set } = useStateStore()
72
- const grid = categoryGridPropsSchema.parse(props)
73
- return (
74
- <CategoryGridBlock
75
- {...grid}
76
- onBrowse={(category) => {
77
- set('/lastCategory', category.handle ?? String(category.id))
78
- emit('openCategory')
79
- }}
80
- onViewAll={() => {
81
- set('/lastCategory', '/categories')
82
- emit('openCategory')
83
- }}
84
- onQueryChange={(query) => set('/categoryQuery', query)}
85
- />
86
- )
87
- },
88
53
  }
@@ -160,40 +160,6 @@ export const featureSplitSpecSchema = z.object({
160
160
 
161
161
  export const featurePropsSchema = z.union([featureSplitSpecSchema, featureCardsSpecSchema])
162
162
 
163
- export const categoryCardPropsSchema = z.object({
164
- category: categoryCardSchema,
165
- presentation: z.enum(['grid', 'icons', 'list']).optional(),
166
- browseLabel: z.string().optional(),
167
- itemsLabel: z.string().optional(),
168
- trendingLabel: z.string().optional(),
169
- featuredLabel: z.string().optional(),
170
- imageFallback: z.string().optional(),
171
- })
172
-
173
- export const categoryGridPropsSchema = z.object({
174
- title: z.string().optional(),
175
- description: z.string().optional(),
176
- badge: z.string().optional(),
177
- presentation: z.enum(['grid', 'icons', 'list']).optional(),
178
- categories: z.array(categoryCardSchema),
179
- cta: ctaSchema.optional(),
180
- query: z.string().optional(),
181
- searchPlaceholder: z.string().optional(),
182
- searchLabel: z.string().optional(),
183
- emptyLabel: z.string().optional(),
184
- noResultsLabel: z.string().optional(),
185
- browseLabel: z.string().optional(),
186
- viewAllLabel: z.string().optional(),
187
- trendingLabel: z.string().optional(),
188
- featuredLabel: z.string().optional(),
189
- itemsLabel: z.string().optional(),
190
- imageFallback: z.string().optional(),
191
- className: z.string().optional(),
192
- maxItems: z.number().int().positive().optional(),
193
- loading: z.boolean().optional(),
194
- skeletonCount: z.number().int().positive().optional(),
195
- })
196
-
197
163
  // Local mirror of the canonical UniversalBanner contract (delivery
198
164
  // universal-banner, contract version 4.1.0) — the same shape the editorial
199
165
  // section fragment mirrors. Kept local (not imported from the section module)
@@ -367,7 +333,5 @@ export type StorefrontHeroProps = z.infer<typeof storefrontHeroPropsSchema>
367
333
  export type FeatureProps = z.infer<typeof featurePropsSchema>
368
334
  export type FeatureCardsSpecProps = z.infer<typeof featureCardsSpecSchema>
369
335
  export type FeatureSplitSpecProps = z.infer<typeof featureSplitSpecSchema>
370
- export type CategoryCardProps = z.infer<typeof categoryCardPropsSchema>
371
- export type CategoryGridProps = z.infer<typeof categoryGridPropsSchema>
372
336
  export type UniversalBannerData = z.infer<typeof universalBannerDataSchema>
373
337
  export type UniversalBannerProps = z.infer<typeof universalBannerPropsSchema>
package/bin/storefront.js CHANGED
@@ -40,6 +40,7 @@ import {
40
40
  classifyImportSource,
41
41
  } from '../scripts/theme/import-export.mjs'
42
42
  import { resolvePreset, makeShadcnRunner } from '../scripts/theme/preset.mjs'
43
+ import { applyStarterTheme } from '../scripts/theme/starter-theme.mjs'
43
44
  import { THEME_COLOR_TOKENS, FONT_VARS, DEFAULT_GLOBALS_TOKENS } from '../scripts/theme/tokens.mjs'
44
45
  import { NAMED_COLOR_NAMES, parseColor, formatOklch } from '../scripts/theme/color.mjs'
45
46
  import {
@@ -48,7 +49,6 @@ import {
48
49
  looksLikeStorefront,
49
50
  readManifest,
50
51
  validateManifest,
51
- createManifest,
52
52
  writeManifest,
53
53
  } from '../scripts/manifest.mjs'
54
54
  import { reconcile } from '../scripts/reconcile.mjs'
@@ -57,7 +57,7 @@ import {
57
57
  scaffoldTempEnv,
58
58
  } from '../scripts/scaffold-env.mjs'
59
59
  import { preflightManifest } from '../scripts/preflight.mjs'
60
- import { scaffoldComposition } from '../scripts/starter.mjs'
60
+ import { initialManifest } from '../scripts/starter.mjs'
61
61
  import {
62
62
  buildInstallPlan,
63
63
  CANDIDATE_TOOLSET,
@@ -193,7 +193,7 @@ create options:
193
193
  --mode <mode> light | dark | system (default: system)
194
194
  --starter install every curated view and feature (a full store),
195
195
  not just the home+cart baseline
196
- --brand <color> brand color over preset tokens (not prompted by the wizard)
196
+ --brand <color> brand color over the starter theme (not prompted by the wizard)
197
197
  --packs <dir> directory of local @thorprovider/* .tgz tarballs; installs
198
198
  the local candidate via Yarn resolutions (no publish)
199
199
  -f, --force overwrite files that already exist
@@ -806,19 +806,13 @@ function runYarn(yarnSpec, cmdArgs, cwd, env) {
806
806
  return res.status ?? 1
807
807
  }
808
808
 
809
- // Apply a named brand color through the same transformation the `theme` command
810
- // uses, so `create --brand` and `theme --brand` agree: real chromatic palette
811
- // values (not a hue swap on a possibly-achromatic preset), a measured-contrast
812
- // foreground, and the documented primary family. Returns `{ css }` or `{ error }`.
813
- function applyBrandToGlobals(globalsCss, brand) {
814
- if (!brand) return { css: globalsCss }
815
- const { operation, diagnostics } = normalizeOperation({ brand })
816
- const error = diagnostics.find((d) => d.severity === 'error')
817
- if (error) return { error: error.message }
818
- const planned = planCss(globalsCss, operation)
819
- const planError = planned.diagnostics.find((d) => d.severity === 'error')
820
- if (planError) return { error: planError.message }
821
- return { css: planned.css }
809
+ // Apply the starter marketplace palette and then a named brand color, both
810
+ // through the same theme-plan pipeline the `theme` command uses. The starter is
811
+ // the default every scaffold ships (orange CTA, navy chrome, tight corners); a
812
+ // `--brand` on top of it overrides the primary family, so `create --brand` and
813
+ // `theme --brand` still agree. Returns `{ css }` or `{ error }`.
814
+ function applyCreateTheme(globalsCss, brand) {
815
+ return applyStarterTheme(globalsCss, { brand })
822
816
  }
823
817
 
824
818
  async function promptScaffoldInputs(args) {
@@ -1010,16 +1004,7 @@ async function create(args) {
1010
1004
  // same preflight as every other write boundary — and it must run before any
1011
1005
  // mkdir, external scaffold, or write so rejected input leaves no trace.
1012
1006
  const starter = args.starter === true
1013
- const composition = scaffoldComposition({ starter })
1014
- const manifest = seedDefaultSections(
1015
- createManifest({
1016
- name,
1017
- siteName,
1018
- mode,
1019
- views: composition.views,
1020
- features: composition.features,
1021
- }),
1022
- )
1007
+ const manifest = seedDefaultSections(initialManifest({ name, siteName, mode, starter }))
1023
1008
  const preflight = preflightManifest(manifest)
1024
1009
  if (!preflight.ok) return rejectComposition(preflight.errors)
1025
1010
 
@@ -1217,7 +1202,7 @@ async function create(args) {
1217
1202
  const globalsPath = join(target, 'app', 'globals.css')
1218
1203
  if (existsSync(globalsPath)) {
1219
1204
  const css = readFileSync(globalsPath, 'utf8')
1220
- const branded = applyBrandToGlobals(css, brand)
1205
+ const branded = applyCreateTheme(css, brand)
1221
1206
  if (branded.error) {
1222
1207
  console.error(`Unknown brand color: ${branded.error}`)
1223
1208
  return 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thorprovider/storefront",
3
- "version": "0.13.3",
3
+ "version": "0.15.0",
4
4
  "description": "Deterministic storefront scaffolder and installable OpenCode skill suite for Thor Commerce (Next.js, @thorprovider/blocks, @thorprovider/adapters, Medusa)",
5
5
  "type": "module",
6
6
  "bin": "bin/storefront.js",
@@ -24,7 +24,8 @@
24
24
  "test": "vitest run --config vitest.config.ts",
25
25
  "test:integration": "vitest run --config vitest.config.ts tests/scaffold-integration.test.ts tests/starter-integration.test.ts",
26
26
  "test:registry": "RUN_SCAFFOLD_INTEGRATION=1 STOREFRONT_ACCEPTANCE_CLI=registry vitest run --config vitest.config.ts tests/scaffold-integration.test.ts tests/starter-integration.test.ts",
27
- "test:browser": "node ./tests/support/projection-ownership.browser.mjs"
27
+ "test:browser": "node ./tests/support/projection-ownership.browser.mjs",
28
+ "demo:images": "node scripts/generate-demo-images.mjs"
28
29
  },
29
30
  "publishConfig": {
30
31
  "access": "public",
@@ -41,27 +41,6 @@
41
41
  }
42
42
  }
43
43
  },
44
- "home.categories": {
45
- "default": "standard",
46
- "intents": {
47
- "standard": {
48
- "variant": "CategoryGrid",
49
- "when": "A balanced grid of category cards with image and label (canonical `presentation: 'grid'`)."
50
- },
51
- "iconGrid": {
52
- "variant": "CategoryGrid",
53
- "when": "A compact icon-based category grid for many small categories (canonical `presentation: 'icons'`)."
54
- },
55
- "featured": {
56
- "variant": "CategoryGrid",
57
- "when": "Few, large featured category tiles that act as primary navigation (canonical `presentation: 'icons'`)."
58
- },
59
- "editorial": {
60
- "variant": "CategoryGrid",
61
- "when": "Category tiles presented as a searchable list with subcategory chips (canonical `presentation: 'list'`)."
62
- }
63
- }
64
- },
65
44
  "product.overview": {
66
45
  "default": "standard",
67
46
  "intents": {