@thorprovider/storefront 0.9.0 → 0.10.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 (46) hide show
  1. package/assets/templates/app/lib/__STOREFRONT__/actions.ts +57 -1
  2. package/assets/templates/app/lib/__STOREFRONT__/commerce.ts +138 -7
  3. package/assets/templates/app/lib/__STOREFRONT__/fulfillment-evidence-port.ts +31 -0
  4. package/assets/templates/app/lib/__STOREFRONT__/handlers.core.ts +21 -4
  5. package/assets/templates/app/lib/__STOREFRONT__/mappers.ts +6 -2
  6. package/assets/templates/app/lib/__STOREFRONT__/order-detail-mapper.ts +642 -0
  7. package/assets/templates/app/lib/__STOREFRONT__/order-detail-port.ts +6 -7
  8. package/assets/templates/app/lib/__STOREFRONT__/ports.ts +13 -3
  9. package/assets/templates/views/account/assembly/assembly.json +0 -5
  10. package/assets/templates/views/account/assembly/index.skeleton.tsx +48 -0
  11. package/assets/templates/views/account/assembly/registry.skeleton.tsx +5 -64
  12. package/assets/templates/views/account/content.ts +7 -7
  13. package/assets/templates/views/account/fulfillment-evidence.client.tsx +34 -0
  14. package/assets/templates/views/account/fulfillment-evidence.defaults.ts +145 -0
  15. package/assets/templates/views/account/fulfillment-evidence.schema.ts +15 -0
  16. package/assets/templates/views/account/index.tsx +41 -3
  17. package/assets/templates/views/account/orders-advanced.client.tsx +10 -99
  18. package/assets/templates/views/account/orders-advanced.defaults.ts +7 -7
  19. package/assets/templates/views/account/registry.tsx +5 -65
  20. package/assets/templates/views/home/assembly/assembly.json +1 -1
  21. package/assets/templates/views/home/assembly/index.skeleton.tsx +3 -1
  22. package/assets/templates/views/home/assembly/registry.skeleton.tsx +1 -0
  23. package/assets/templates/views/home/assembly/slots/hero/UniversalBanner/binding.json +5 -0
  24. package/assets/templates/views/home/assembly/slots/hero/UniversalBanner/catalog.part +4 -0
  25. package/assets/templates/views/home/assembly/slots/hero/UniversalBanner/element.part +4 -0
  26. package/assets/templates/views/home/assembly/slots/hero/UniversalBanner/registry.part +10 -0
  27. package/assets/templates/views/home/content.ts +246 -2
  28. package/assets/templates/views/home/data.ts +10 -1
  29. package/assets/templates/views/home/index.tsx +7 -6
  30. package/assets/templates/views/home/props.ts +7 -1
  31. package/assets/templates/views/home/registry.tsx +11 -28
  32. package/assets/templates/views/home/schema.ts +163 -0
  33. package/bin/storefront.js +13 -14
  34. package/package.json +1 -1
  35. package/recipes/adapter-surface.json +1 -0
  36. package/recipes/archetypes.json +5 -1
  37. package/recipes/catalog.json +9 -1
  38. package/recipes/recipes.json +5 -4
  39. package/scripts/candidate.mjs +55 -14
  40. package/scripts/file-classes.mjs +4 -0
  41. package/skills/sf-view-gen/assets/recipes/archetypes.json +5 -1
  42. package/skills/sf-view-gen/assets/recipes/catalog.json +9 -1
  43. package/skills/sf-view-gen/assets/recipes/recipes.json +5 -4
  44. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/catalog.part +0 -5
  45. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/element.part +0 -5
  46. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/registry.part +0 -1
@@ -194,6 +194,167 @@ export const categoryGridPropsSchema = z.object({
194
194
  skeletonCount: z.number().int().positive().optional(),
195
195
  })
196
196
 
197
+ // Local mirror of the canonical UniversalBanner contract (delivery
198
+ // universal-banner, contract version 4.1.0) — the same shape the editorial
199
+ // section fragment mirrors. Kept local (not imported from the section module)
200
+ // so the home view stays self-contained for homes generated before that
201
+ // delivery. The React-only callbacks (onBannerClick, onCtaClick) are
202
+ // intentionally absent: they are consumer bindings, not serializable props.
203
+ const bannerTargetSchema = z.object({
204
+ kind: z.string(),
205
+ id: z.string().optional(),
206
+ slug: z.string().optional(),
207
+ query: z.string().optional(),
208
+ url: z.string().optional(),
209
+ })
210
+
211
+ const bannerPresentationSchema = z.object({
212
+ mode: z.enum(['image-only', 'overlay', 'split']),
213
+ width: z.enum(['full', 'content', 'custom']),
214
+ maxWidth: z.enum(['sm', 'md', 'lg', 'xl']).optional(),
215
+ height: z.enum(['auto', 'fixed', 'adaptive']),
216
+ heightToken: z.enum(['sm', 'md', 'lg', 'xl']).optional(),
217
+ aspect: z.enum(['square', 'video', 'photo', 'wide', 'tall', 'natural']),
218
+ fit: z.enum(['natural', 'cover', 'contain']),
219
+ focal: z.enum(['top-left', 'top', 'top-right', 'left', 'center', 'right', 'bottom-left', 'bottom', 'bottom-right']),
220
+ align: z.enum(['center', 'start', 'end']),
221
+ radius: z.enum(['md', 'lg', 'xl', 'none', '2xl']),
222
+ surface: z.enum(['primary', 'secondary', 'none', 'card', 'muted', 'accent']),
223
+ overlay: z.enum(['none', 'scrim', 'gradient']),
224
+ overlayOpacity: z.enum(['light', 'medium', 'strong']),
225
+ padding: z.enum(['sm', 'md', 'lg', 'none']),
226
+ textScale: z.enum(['sm', 'md', 'lg']),
227
+ splitSide: z.enum(['media-start', 'media-end']).optional(),
228
+ hiddenFields: z.array(z.string()).optional(),
229
+ })
230
+
231
+ const bannerOverrideSchema = z.object({
232
+ mode: z.enum(['image-only', 'overlay', 'split']).optional(),
233
+ width: z.enum(['full', 'content', 'custom']).optional(),
234
+ maxWidth: z.enum(['sm', 'md', 'lg', 'xl']).optional(),
235
+ height: z.enum(['auto', 'fixed', 'adaptive']).optional(),
236
+ heightToken: z.enum(['sm', 'md', 'lg', 'xl']).optional(),
237
+ aspect: z.enum(['square', 'video', 'photo', 'wide', 'tall', 'natural']).optional(),
238
+ fit: z.enum(['natural', 'cover', 'contain']).optional(),
239
+ focal: z.enum(['top-left', 'top', 'top-right', 'left', 'center', 'right', 'bottom-left', 'bottom', 'bottom-right']).optional(),
240
+ align: z.enum(['center', 'start', 'end']).optional(),
241
+ radius: z.enum(['md', 'lg', 'xl', 'none', '2xl']).optional(),
242
+ surface: z.enum(['primary', 'secondary', 'none', 'card', 'muted', 'accent']).optional(),
243
+ overlay: z.enum(['none', 'scrim', 'gradient']).optional(),
244
+ overlayOpacity: z.enum(['light', 'medium', 'strong']).optional(),
245
+ padding: z.enum(['sm', 'md', 'lg', 'none']).optional(),
246
+ textScale: z.enum(['sm', 'md', 'lg']).optional(),
247
+ splitSide: z.enum(['media-start', 'media-end']).optional(),
248
+ hiddenFields: z.array(z.string()).optional(),
249
+ })
250
+
251
+ const bannerScheduleSchema = z.object({
252
+ from: z.string().optional(),
253
+ to: z.string().optional(),
254
+ timezone: z.string(),
255
+ })
256
+
257
+ export const universalBannerDataSchema = z.object({
258
+ campaign: z.object({
259
+ schemaVersion: z.number(),
260
+ campaignId: z.string(),
261
+ banners: z.array(
262
+ z.object({
263
+ id: z.string(),
264
+ campaignId: z.string(),
265
+ content: z.object({
266
+ name: z.string(),
267
+ alt: z.string(),
268
+ title: z.string().optional(),
269
+ subtitle: z.string().optional(),
270
+ description: z.string().optional(),
271
+ badge: z.string().optional(),
272
+ target: bannerTargetSchema.optional(),
273
+ ctas: z.array(
274
+ z.object({
275
+ id: z.string(),
276
+ label: z.string(),
277
+ target: bannerTargetSchema,
278
+ tone: z.enum(['primary', 'secondary']),
279
+ }),
280
+ ),
281
+ }),
282
+ media: z.object({
283
+ desktop: z.string().optional(),
284
+ tablet: z.string().optional(),
285
+ mobile: z.string().optional(),
286
+ }),
287
+ presentation: bannerPresentationSchema,
288
+ responsive: z
289
+ .object({
290
+ md: bannerOverrideSchema.optional(),
291
+ '2xl': bannerOverrideSchema.optional(),
292
+ base: bannerOverrideSchema.optional(),
293
+ })
294
+ .optional(),
295
+ schedule: bannerScheduleSchema.optional(),
296
+ visible: z.boolean(),
297
+ }),
298
+ ),
299
+ }),
300
+ config: z.object({
301
+ schemaVersion: z.number(),
302
+ blockId: z.string(),
303
+ name: z.string(),
304
+ visible: z.boolean(),
305
+ schedule: bannerScheduleSchema.optional(),
306
+ scheduleAware: z.boolean(),
307
+ responsiveEnabled: z.boolean(),
308
+ presentation: z.enum(['single', 'grid', 'carousel']),
309
+ preset: z.enum(['custom', 'one', 'two', 'three', 'four', 'mosaic', 'hero-two', 'hero-three']),
310
+ refs: z.array(
311
+ z.object({
312
+ bannerId: z.string(),
313
+ overrides: bannerOverrideSchema.optional(),
314
+ }),
315
+ ),
316
+ layout: z.object({
317
+ gapX: z.enum(['sm', 'md', 'lg', 'xl', 'none']),
318
+ gapY: z.enum(['sm', 'md', 'lg', 'xl', 'none']),
319
+ maxWidth: z.enum(['full', 'sm', 'md', 'lg', 'xl']),
320
+ maxHeight: z.enum(['sm', 'md', 'lg', 'xl', 'none']),
321
+ align: z.enum(['center', 'start', 'end']),
322
+ radius: z.enum(['md', 'lg', 'xl', 'none', '2xl']),
323
+ columns: z.object({ md: z.number(), '2xl': z.number(), base: z.number() }).optional(),
324
+ spans: z.array(z.number()).optional(),
325
+ }),
326
+ carousel: z.object({
327
+ visible: z.object({ md: z.number(), '2xl': z.number(), base: z.number() }),
328
+ autoplay: z.boolean(),
329
+ intervalMs: z.number(),
330
+ loop: z.boolean(),
331
+ indicators: z.boolean(),
332
+ carouselOnMobile: z.boolean(),
333
+ peek: z.boolean(),
334
+ story: z.boolean(),
335
+ }),
336
+ rules: z.object({
337
+ emptyLabel: z.string(),
338
+ inactiveLabel: z.string(),
339
+ danglingLabel: z.string(),
340
+ }),
341
+ }),
342
+ now: z.string(),
343
+ banner: z.object({
344
+ carouselPrevious: z.string(),
345
+ carouselNext: z.string(),
346
+ carouselStatus: z.string(),
347
+ carouselRole: z.string(),
348
+ storyPrevious: z.string(),
349
+ storyNext: z.string(),
350
+ storyRole: z.string(),
351
+ }),
352
+ })
353
+
354
+ export const universalBannerPropsSchema = z.object({
355
+ data: universalBannerDataSchema,
356
+ })
357
+
197
358
  export type FeaturedProduct = z.infer<typeof featuredProductSchema>
198
359
  export type FeatureItem = z.infer<typeof featureItemSchema>
199
360
  export type CategoryCard = z.infer<typeof categoryCardSchema>
@@ -208,3 +369,5 @@ export type FeatureCardsSpecProps = z.infer<typeof featureCardsSpecSchema>
208
369
  export type FeatureSplitSpecProps = z.infer<typeof featureSplitSpecSchema>
209
370
  export type CategoryCardProps = z.infer<typeof categoryCardPropsSchema>
210
371
  export type CategoryGridProps = z.infer<typeof categoryGridPropsSchema>
372
+ export type UniversalBannerData = z.infer<typeof universalBannerDataSchema>
373
+ export type UniversalBannerProps = z.infer<typeof universalBannerPropsSchema>
package/bin/storefront.js CHANGED
@@ -61,7 +61,6 @@ import {
61
61
  findPack,
62
62
  parseRuntimeCommerceImports,
63
63
  verifyPackExports,
64
- verifyPackManifest,
65
64
  verifyRegistryToolset,
66
65
  } from '../scripts/candidate.mjs'
67
66
  import {
@@ -957,32 +956,32 @@ async function create(args) {
957
956
  if (plan.missingPacks.length > 0) {
958
957
  console.error(`Refusing to create: missing packed local candidate(s) in ${resolve(args.packs)}:`)
959
958
  for (const name of plan.missingPacks) console.error(` ${name}`)
960
- console.error('Pack each @thorprovider/* package with `yarn pack --filename <slug>-<version>.tgz`.')
959
+ console.error('Pack each @thorprovider/* package with `yarn pack --filename <slug>-<version>.tgz`,')
960
+ console.error('or let `consumer:create --pack-path <dir>` build and pack the current workspaces.')
961
961
  return 1
962
962
  }
963
963
 
964
964
  // Integrity guard for the local candidate packs. A `--packs` directory can be
965
965
  // stale: a tarball packed before a public export was added still resolves for
966
966
  // the same exact version, so the generated project imports a symbol the
967
- // packed dist does not export. Verify each pack declares the expected
968
- // name+version (Tier 1) and that the packed runtime actually exports every
969
- // value the generated host imports from `@thorprovider/runtime/commerce`
970
- // (Tier 2) before the first write.
967
+ // packed dist does not export. The planner already verified each pack's
968
+ // manifest (readable, expected package name, declared version, and for the
969
+ // CLI pack the running CLI version) and adopted its versions; here the
970
+ // remaining Tier-2 check verifies that the packed runtime actually exports
971
+ // every value the generated host imports from `@thorprovider/runtime/commerce`
972
+ // before the first write.
971
973
  if (args.packs) {
972
974
  const packsDir = resolve(args.packs)
973
- const localPacks = { ...CANDIDATE_TOOLSET.local, '@thorprovider/storefront': cliVersion }
974
- for (const [name, version] of Object.entries(localPacks)) {
975
- const guard = verifyPackManifest({ tgzPath: findPack(packsDir, name, version), name, version })
976
- if (!guard.ok) {
977
- console.error(`Refusing to create: ${guard.message} (${guard.code})`)
978
- return 1
979
- }
975
+ if (plan.invalidPacks.length > 0) {
976
+ console.error(`Refusing to create: invalid packed local candidate(s) in ${packsDir}:`)
977
+ for (const pack of plan.invalidPacks) console.error(` ${pack.name}: ${pack.message} (${pack.code})`)
978
+ return 1
980
979
  }
981
980
  const commerceTemplate = join(PKG_ROOT, 'assets', 'templates', 'app', 'lib', '__STOREFRONT__', 'commerce.ts')
982
981
  const requiredExports = parseRuntimeCommerceImports(readFileSync(commerceTemplate, 'utf8'))
983
982
  const runtimeName = '@thorprovider/runtime'
984
983
  const runtimeGuard = verifyPackExports({
985
- tgzPath: findPack(packsDir, runtimeName, CANDIDATE_TOOLSET.local[runtimeName]),
984
+ tgzPath: findPack(packsDir, runtimeName, plan.dependencies[runtimeName]),
986
985
  innerPath: 'package/dist/commerce/index.mjs',
987
986
  requiredExports,
988
987
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thorprovider/storefront",
3
- "version": "0.9.0",
3
+ "version": "0.10.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",
@@ -89,6 +89,7 @@
89
89
  "getCommerceClientWithToken",
90
90
  "getCurrentCustomer",
91
91
  "getCustomerAddresses",
92
+ "getCustomerOrderDetail",
92
93
  "getCustomerOrders",
93
94
  "getCustomerOrdersPage",
94
95
  "getDataSource",
@@ -4,8 +4,12 @@
4
4
  "description": "Archetype (intent) layer. Maps a slot to named intents so selection is by meaning, not by variant ordinal. Each intent resolves to a variant that MUST be allowed by the recipe for that slot.",
5
5
  "slots": {
6
6
  "home.hero": {
7
- "default": "compact",
7
+ "default": "campaign",
8
8
  "intents": {
9
+ "campaign": {
10
+ "variant": "UniversalBanner",
11
+ "when": "A deal-forward multi-banner campaign wall grounded in the connected catalog (universal-banner family)."
12
+ },
9
13
  "compact": {
10
14
  "variant": "StorefrontHero",
11
15
  "when": "A simple, text-forward hero with a single call to action (canonical `presentation: 'compact'`)."
@@ -4,7 +4,7 @@
4
4
  "description": "Initial semantic executable catalog (E1 tasks 1.2-1.3), classified by source-shape inspection of the @thorprovider/blocks prop contracts and the view templates. Scope: every slot the curated MVP views (home, product, category, checkout, account) render by default, covering both the selectable archetype slots declared by recipes/archetypes.json and the nested default slots that have no archetype (category.productCard, checkout.confirmation) so no legacy default support is dropped. The account view declares canonical LoginPage card/social presentations and SignUpPage1; legacy LoginPage1/LoginPage2 names resolve to card/social through legacyAliases, with social remaining held pending verified account lifecycle wiring. A variant is `executable` only when the slot's canonical data shape can feed its block props without a prop bridge and without inventing data; every other non-default variant is `held` with the specific reason. The one non-default structural choice is home.benefits, which selects between the two bounded presentations (`cards`, `split`) of the single canonical `Feature` block (identical item contract, no bridge); the retired numbered names `Feature1`/`Feature2` resolve through the slot's `legacyAliases`. E2 task 6.1 declares the base listing slot category.filter CategoryFilter2 as the single controlled listing (dataShape `CatalogQuery & CatalogResults`, state controlled) with the search/filter controls contributed by the logical mounts category.search / category.filters (no second block). Source-shape compatibility is not end-to-end backend behavior proof: the render is executable, but the category.search.apply / category.filter.apply actions remain held under the capability catalog (owner: storefront-catalog-search-filters, E2) until a real runtime proof. The `capabilities` map declares those operational capabilities with their requirements and verification state; E1 declares the held category.filter.apply action, E2 adds the held category.search.apply action and the held category.price.range capability that gates the category-filters showPrice option; no capability is claimed verified. The home.hero variants of the retired numbered family (StorefrontHero1/2/5/6) resolve through the slot's `legacyAliases` to the single canonical `StorefrontHero`, whose bounded presentation options (`compact`, `showcase`, `editorial`, `promotional`) preserve the four structural identities; the extended editorial/promotional sections render only from host-supplied data and are omitted otherwise. The category.productCard slot's retired numbered family (ProductCard1/2/3/5) and the previous `ProductCard` variant resolve through the slot's `legacyAliases` to the single canonical `ProductGrid` listing, which renders `ProductCard` item cells with bounded presentation options (`classic`, `minimal`, `rich`) that preserve the three structural identities; the rich presentation's wishlist and view-similar affordances are host-owned and optional, evidence (rating, badge, compare-at) renders only from host-supplied data, and the comparison-table variant `ProductCard5` was discarded as a listing controller, not a card presentation.",
5
5
  "slots": {
6
6
  "home.hero": {
7
- "default": "StorefrontHero",
7
+ "default": "UniversalBanner",
8
8
  "legacyAliases": {
9
9
  "StorefrontHero1": "StorefrontHero",
10
10
  "StorefrontHero2": "StorefrontHero",
@@ -31,6 +31,14 @@
31
31
  "requirements": [
32
32
  "heroProducts"
33
33
  ]
34
+ },
35
+ "UniversalBanner": {
36
+ "status": "executable",
37
+ "block": "UniversalBanner",
38
+ "dataShape": "UniversalBannerData",
39
+ "events": [],
40
+ "state": "uncontrolled",
41
+ "requirements": []
34
42
  }
35
43
  }
36
44
  },
@@ -13,13 +13,14 @@
13
13
  "categories"
14
14
  ],
15
15
  "defaultVariants": {
16
- "hero": "StorefrontHero",
16
+ "hero": "UniversalBanner",
17
17
  "benefits": "cards",
18
18
  "categories": "CategoryGrid"
19
19
  },
20
20
  "allowedVariants": {
21
21
  "hero": [
22
- "StorefrontHero"
22
+ "StorefrontHero",
23
+ "UniversalBanner"
23
24
  ],
24
25
  "benefits": [
25
26
  "cards",
@@ -55,8 +56,8 @@
55
56
  ],
56
57
  "defaultSections": [
57
58
  {
58
- "type": "universal-banner",
59
- "after": "hero"
59
+ "type": "products",
60
+ "after": "benefits"
60
61
  }
61
62
  ],
62
63
  "maxSections": 4
@@ -43,10 +43,10 @@ export const CANDIDATE_TOOLSET = Object.freeze({
43
43
  '@json-render/next': '0.21.0',
44
44
  }),
45
45
  local: Object.freeze({
46
- '@thorprovider/blocks': '4.3.0',
47
- '@thorprovider/adapters': '5.4.0',
48
- '@thorprovider/runtime': '0.6.0',
49
- '@thorprovider/types': '7.5.0',
46
+ '@thorprovider/blocks': '4.3.1',
47
+ '@thorprovider/adapters': '5.5.0',
48
+ '@thorprovider/runtime': '0.7.0',
49
+ '@thorprovider/types': '7.6.0',
50
50
  }),
51
51
  })
52
52
 
@@ -64,14 +64,15 @@ export function packSlug(name) {
64
64
  }
65
65
 
66
66
  /**
67
- * Find the local tarball for a package in a packs directory. Accepts the
68
- * documented `yarn pack --filename <slug>-<version>.tgz` name, a plain
69
- * `<slug>.tgz`, or any `.tgz` containing the slug.
67
+ * Find the local tarball for a package in a packs directory. Prefers the
68
+ * deterministic plain `<slug>.tgz` name (what `consumer:create --pack-path`
69
+ * writes), then falls back to the documented `yarn pack --filename
70
+ * <slug>-<version>.tgz` name, or any `.tgz` containing the slug.
70
71
  */
71
72
  export function findPack(packsDir, name, version) {
72
73
  if (!existsSync(packsDir)) return null
73
74
  const slug = packSlug(name)
74
- const named = [`${slug}-${version}.tgz`, `${slug}.tgz`]
75
+ const named = version ? [`${slug}.tgz`, `${slug}-${version}.tgz`] : [`${slug}.tgz`]
75
76
  for (const file of named) {
76
77
  const abs = join(packsDir, file)
77
78
  if (existsSync(abs)) return abs
@@ -89,6 +90,13 @@ export function findPack(packsDir, name, version) {
89
90
  * - `resolutions`: when `packsDir` is given, name -> `file:<abs>` mapping each
90
91
  * local `@thorprovider/*` package (and the CLI) to its packed tarball.
91
92
  * - `missingPacks`: local packages requested but absent from the packs dir.
93
+ * - `invalidPacks`: local packages whose tarball was found but rejected —
94
+ * unreadable, wrong manifest name, no version, or (for the CLI pack) a
95
+ * version other than the running CLI.
96
+ *
97
+ * Without a packs dir, versions are the pinned registry candidates. With one,
98
+ * each dependency version is adopted from the verified tarball manifest, so a
99
+ * local pack may carry unreleased versions that differ from the pins.
92
100
  */
93
101
  export function buildInstallPlan({ cliVersion, packsDir, toolset = CANDIDATE_TOOLSET } = {}) {
94
102
  const dependencies = {
@@ -98,15 +106,46 @@ export function buildInstallPlan({ cliVersion, packsDir, toolset = CANDIDATE_TOO
98
106
  }
99
107
  const resolutions = {}
100
108
  const missingPacks = []
109
+ const invalidPacks = []
101
110
  if (packsDir) {
102
111
  const local = { ...toolset.local, '@thorprovider/storefront': cliVersion }
103
- for (const [name, version] of Object.entries(local)) {
104
- const pack = findPack(packsDir, name, version)
105
- if (!pack) missingPacks.push(name)
106
- else resolutions[name] = `file:${pack}`
112
+ for (const [name, pinnedVersion] of Object.entries(local)) {
113
+ const pack = findPack(packsDir, name, pinnedVersion)
114
+ if (!pack) {
115
+ missingPacks.push(name)
116
+ continue
117
+ }
118
+ const manifest = readPackManifest(pack)
119
+ if (!manifest) {
120
+ invalidPacks.push({ name, code: 'E_PACK_UNREADABLE', message: `${pack}: cannot read as a package tarball` })
121
+ continue
122
+ }
123
+ if (manifest.name !== name) {
124
+ invalidPacks.push({
125
+ name,
126
+ code: 'E_PACK_NAME_MISMATCH',
127
+ message: `${pack} declares ${manifest.name}, expected ${name}`,
128
+ })
129
+ continue
130
+ }
131
+ const version = typeof manifest.version === 'string' && manifest.version ? manifest.version : null
132
+ if (!version) {
133
+ invalidPacks.push({ name, code: 'E_PACK_VERSION_MISSING', message: `${pack} declares no version` })
134
+ continue
135
+ }
136
+ if (name === '@thorprovider/storefront' && version !== cliVersion) {
137
+ invalidPacks.push({
138
+ name,
139
+ code: 'E_PACK_CLI_MISMATCH',
140
+ message: `${pack} declares ${manifest.name}@${version}, expected the running CLI ${cliVersion} — repack the candidate`,
141
+ })
142
+ continue
143
+ }
144
+ dependencies[name] = version
145
+ resolutions[name] = `file:${pack}`
107
146
  }
108
147
  }
109
- return { dependencies, resolutions, missingPacks, scaffolder: toolset.scaffolder, packageManager: toolset.packageManager }
148
+ return { dependencies, resolutions, missingPacks, invalidPacks, scaffolder: toolset.scaffolder, packageManager: toolset.packageManager }
110
149
  }
111
150
 
112
151
  /** Read the actual version of a sibling monorepo package (drift guard). */
@@ -282,6 +321,9 @@ export function blockSpecifierPath(specifier) {
282
321
  if (specifier === '@thorprovider/blocks/contracts') return 'package/dist/lib/contracts.mjs'
283
322
  if (specifier === '@thorprovider/blocks/ports') return 'package/dist/ports/index.mjs'
284
323
  if (specifier === '@thorprovider/blocks/styles.css') return 'package/styles.css'
324
+ if (specifier === '@thorprovider/blocks/order-history-engine') {
325
+ return 'package/dist/blocks/designs/order-history/engine.mjs'
326
+ }
285
327
  if (!specifier.startsWith('@thorprovider/blocks/')) return null
286
328
  return `package/dist/${specifier.slice('@thorprovider/blocks/'.length)}.mjs`
287
329
  }
@@ -522,4 +564,3 @@ export async function verifyRegistryToolset({
522
564
  for (const result of Object.values(resolved)) result.cleanup?.()
523
565
  return { ok: errors.length === 0, errors }
524
566
  }
525
-
@@ -69,6 +69,8 @@ const RULES = [
69
69
  'app/lib/*/ports.ts',
70
70
  'app/lib/*/orders-port.ts',
71
71
  'app/lib/*/order-detail-port.ts',
72
+ 'app/lib/*/order-detail-mapper.ts',
73
+ 'app/lib/*/fulfillment-evidence-port.ts',
72
74
  'app/lib/*/addresses-port.ts',
73
75
  'app/lib/*/customer-profile-port.ts',
74
76
  'app/lib/*/account-address.ts',
@@ -90,6 +92,8 @@ const RULES = [
90
92
  'views/*/registry.tsx',
91
93
  'views/*/orders-advanced.client.tsx',
92
94
  'views/*/order-detail.client.tsx',
95
+ 'views/*/fulfillment-evidence.client.tsx',
96
+ 'views/*/fulfillment-evidence.schema.ts',
93
97
  'views/*/*.defaults.ts',
94
98
  'views/checkout/checkout-commerce-hosted.tsx',
95
99
  // The views-root barrels are generated by reconcile (buildBarrel /
@@ -4,8 +4,12 @@
4
4
  "description": "Archetype (intent) layer. Maps a slot to named intents so selection is by meaning, not by variant ordinal. Each intent resolves to a variant that MUST be allowed by the recipe for that slot.",
5
5
  "slots": {
6
6
  "home.hero": {
7
- "default": "compact",
7
+ "default": "campaign",
8
8
  "intents": {
9
+ "campaign": {
10
+ "variant": "UniversalBanner",
11
+ "when": "A deal-forward multi-banner campaign wall grounded in the connected catalog (universal-banner family)."
12
+ },
9
13
  "compact": {
10
14
  "variant": "StorefrontHero",
11
15
  "when": "A simple, text-forward hero with a single call to action (canonical `presentation: 'compact'`)."
@@ -4,7 +4,7 @@
4
4
  "description": "Initial semantic executable catalog (E1 tasks 1.2-1.3), classified by source-shape inspection of the @thorprovider/blocks prop contracts and the view templates. Scope: every slot the curated MVP views (home, product, category, checkout, account) render by default, covering both the selectable archetype slots declared by recipes/archetypes.json and the nested default slots that have no archetype (category.productCard, checkout.confirmation) so no legacy default support is dropped. The account view declares canonical LoginPage card/social presentations and SignUpPage1; legacy LoginPage1/LoginPage2 names resolve to card/social through legacyAliases, with social remaining held pending verified account lifecycle wiring. A variant is `executable` only when the slot's canonical data shape can feed its block props without a prop bridge and without inventing data; every other non-default variant is `held` with the specific reason. The one non-default structural choice is home.benefits, which selects between the two bounded presentations (`cards`, `split`) of the single canonical `Feature` block (identical item contract, no bridge); the retired numbered names `Feature1`/`Feature2` resolve through the slot's `legacyAliases`. E2 task 6.1 declares the base listing slot category.filter CategoryFilter2 as the single controlled listing (dataShape `CatalogQuery & CatalogResults`, state controlled) with the search/filter controls contributed by the logical mounts category.search / category.filters (no second block). Source-shape compatibility is not end-to-end backend behavior proof: the render is executable, but the category.search.apply / category.filter.apply actions remain held under the capability catalog (owner: storefront-catalog-search-filters, E2) until a real runtime proof. The `capabilities` map declares those operational capabilities with their requirements and verification state; E1 declares the held category.filter.apply action, E2 adds the held category.search.apply action and the held category.price.range capability that gates the category-filters showPrice option; no capability is claimed verified. The home.hero variants of the retired numbered family (StorefrontHero1/2/5/6) resolve through the slot's `legacyAliases` to the single canonical `StorefrontHero`, whose bounded presentation options (`compact`, `showcase`, `editorial`, `promotional`) preserve the four structural identities; the extended editorial/promotional sections render only from host-supplied data and are omitted otherwise. The category.productCard slot's retired numbered family (ProductCard1/2/3/5) and the previous `ProductCard` variant resolve through the slot's `legacyAliases` to the single canonical `ProductGrid` listing, which renders `ProductCard` item cells with bounded presentation options (`classic`, `minimal`, `rich`) that preserve the three structural identities; the rich presentation's wishlist and view-similar affordances are host-owned and optional, evidence (rating, badge, compare-at) renders only from host-supplied data, and the comparison-table variant `ProductCard5` was discarded as a listing controller, not a card presentation.",
5
5
  "slots": {
6
6
  "home.hero": {
7
- "default": "StorefrontHero",
7
+ "default": "UniversalBanner",
8
8
  "legacyAliases": {
9
9
  "StorefrontHero1": "StorefrontHero",
10
10
  "StorefrontHero2": "StorefrontHero",
@@ -31,6 +31,14 @@
31
31
  "requirements": [
32
32
  "heroProducts"
33
33
  ]
34
+ },
35
+ "UniversalBanner": {
36
+ "status": "executable",
37
+ "block": "UniversalBanner",
38
+ "dataShape": "UniversalBannerData",
39
+ "events": [],
40
+ "state": "uncontrolled",
41
+ "requirements": []
34
42
  }
35
43
  }
36
44
  },
@@ -13,13 +13,14 @@
13
13
  "categories"
14
14
  ],
15
15
  "defaultVariants": {
16
- "hero": "StorefrontHero",
16
+ "hero": "UniversalBanner",
17
17
  "benefits": "cards",
18
18
  "categories": "CategoryGrid"
19
19
  },
20
20
  "allowedVariants": {
21
21
  "hero": [
22
- "StorefrontHero"
22
+ "StorefrontHero",
23
+ "UniversalBanner"
23
24
  ],
24
25
  "benefits": [
25
26
  "cards",
@@ -55,8 +56,8 @@
55
56
  ],
56
57
  "defaultSections": [
57
58
  {
58
- "type": "universal-banner",
59
- "after": "hero"
59
+ "type": "products",
60
+ "after": "benefits"
60
61
  }
61
62
  ],
62
63
  "maxSections": 4
@@ -1,5 +0,0 @@
1
- AccountBoot: {
2
- props: accountEmptyPropsSchema,
3
- description:
4
- 'Passive account boundary: shows a retryable unavailable status when the session cannot be resolved, otherwise nothing. Never fetches identity.',
5
- },
@@ -1,5 +0,0 @@
1
- 'account.boot': {
2
- type: 'AccountBoot',
3
- props: {},
4
- on: { retry: { action: 'retryAccountSession' } },
5
- },
@@ -1 +0,0 @@
1
- AccountBoot: ({ emit }) => <AccountBoundary emit={emit} />,