feat(layout-system basics): Added component-map, component-props, configloader and renderer.

Added vt-template for nav and poc example footer.
Added ste.medusa-starter.design.json.
Probable starting point (main)/layout.tsx refactored to use dynamic layout renderer instead of hardcoded template.
This commit is contained in:
2025-11-19 18:19:25 +01:00
parent b7c67b5834
commit 51d6ee2051
8 changed files with 367 additions and 21 deletions
@@ -0,0 +1,26 @@
import { listRegions } from "@lib/data/regions"
import { StoreRegion } from "@medusajs/types"
import SideMenu from "@modules/layout/components/side-menu"
import { DynamicLayoutRenderer, DynamicLayoutRendererProps } from "vibentec/renderer"
export default async function VtNav({ nodes, context }: DynamicLayoutRendererProps) {
const regions = await listRegions().then((regions: StoreRegion[]) => regions)
return (
<div className="sticky top-0 inset-x-0 z-50 group">
<header className="relative h-16 mx-auto border-b duration-200 bg-white border-ui-border-base">
<nav className="content-container txt-xsmall-plus text-ui-fg-subtle flex items-center justify-between w-full h-full text-small-regular">
<div className="flex-1 basis-0 h-full flex items-center">
<div className="h-full">
<SideMenu regions={regions} />
</div>
</div>
{nodes && (
<DynamicLayoutRenderer nodes={nodes} context={context} />
)}
</nav>
</header>
</div>
)
}