@thorprovider/storefront 0.11.0 → 0.13.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 (25) hide show
  1. package/README.md +19 -6
  2. package/assets/templates/app/lib/__STOREFRONT__/footer-content.ts +241 -0
  3. package/assets/templates/app/lib/__STOREFRONT__/registry.tsx +8 -24
  4. package/assets/templates/app/lib/__STOREFRONT__/schema.ts +5 -3
  5. package/assets/templates/app/lib/__STOREFRONT__/shell/content.ts +14 -13
  6. package/assets/templates/app/lib/__STOREFRONT__/shell/props.ts +7 -2
  7. package/assets/templates/app/lib/__STOREFRONT__/views/sections/index.ts +2 -1
  8. package/assets/templates/app/lib/__STOREFRONT__/views/sections/products.client.tsx +52 -1
  9. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.universal-main-menu.ts +136 -0
  10. package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-main-menu.client.tsx +19 -0
  11. package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-main-menu.tsx +16 -0
  12. package/assets/templates/views/home/assembly/assembly.json +7 -0
  13. package/bin/storefront.js +54 -19
  14. package/package.json +1 -1
  15. package/recipes/recipes.json +3 -1
  16. package/recipes/sections.json +13 -3
  17. package/scripts/candidate.mjs +1 -1
  18. package/scripts/default-sections.mjs +1 -0
  19. package/scripts/file-classes.mjs +3 -0
  20. package/scripts/scaffold-env.mjs +48 -0
  21. package/skills/sf-view-gen/assets/recipes/recipes.json +3 -1
  22. package/skills/sf-view-gen/assets/recipes/sections.json +13 -3
  23. package/skills/sf-view-gen/assets/templates/views/sections/schema.universal-main-menu.ts +136 -0
  24. package/skills/sf-view-gen/assets/templates/views/sections/universal-main-menu.client.tsx +19 -0
  25. package/skills/sf-view-gen/assets/templates/views/sections/universal-main-menu.tsx +16 -0
@@ -0,0 +1,19 @@
1
+ 'use client'
2
+
3
+ // Optional section fragment: universal-main-menu (mirrors recipes/sections.json) — client registry.
4
+ // The matching server-side catalog lives in universal-main-menu.tsx. @thorprovider/blocks ships a
5
+ // 'use client' boundary, but this fragment keeps the explicit client boundary so
6
+ // the section composes identically in any consumer graph.
7
+
8
+ import { UniversalMainMenu } from '@thorprovider/blocks'
9
+ import { universalMainMenuPropsSchema } from './schema.universal-main-menu'
10
+ import type { ViewRegistry } from '../types'
11
+
12
+ export const universalMainMenuRegistry: ViewRegistry = {
13
+ UniversalMainMenu: ({ props }) => {
14
+ const parsed = universalMainMenuPropsSchema.parse(props)
15
+ return (
16
+ <UniversalMainMenu data={parsed.data} />
17
+ )
18
+ },
19
+ }
@@ -0,0 +1,16 @@
1
+ // Optional section fragment: universal-main-menu (mirrors recipes/sections.json)
2
+ // Server-side part: element type + zod catalog entry. The component mappings
3
+ // live in universal-main-menu.client.tsx ('use client') and are composed via composeSections.
4
+
5
+ import { universalMainMenuPropsSchema } from './schema.universal-main-menu'
6
+
7
+ export const universalMainMenuSection = {
8
+ elementType: 'UniversalMainMenu',
9
+ catalog: {
10
+ UniversalMainMenu: {
11
+ props: universalMainMenuPropsSchema,
12
+ description: 'UniversalMainMenu presentation section (delivery universal-main-menu).',
13
+ },
14
+ },
15
+ registryModule: './universal-main-menu.client',
16
+ }