Files
docs/apps/spec/app/docs/layout.tsx
zeekay 3aa390d961 fix(docs): mdx webpack-loader subpaths + spec shell mirror (swarm: scientist+red)
Verified on node 24.18 (the supported runtime; install resolves clean, 28/30
packages build green). Two real upstream-staleness fixes the package-name
normalization couldn't cover:
- packages/mdx/src/next/index.ts: webpack loaders renamed upstream
  fumadocs-mdx/loader-{mdx,meta} → /webpack/{mdx,meta} (old paths unexported);
  next-plugin wasn't updated. Confirmed against the package's exports map.
- apps/spec: mirror gui-docs's proven app shell (@hanzo/docs/{ui,core}/* meta-
  package subpaths) — my scaffolding sed had mangled them to fumadocs-ui/ui/*;
  deps aligned to gui-docs.
- keep twoslash tsdown deps fix (scientist).

KNOWN-REMAINING (blue): a deeper fumadocs-mdx/next-16 loader-RULE wiring issue
(meta loader JSON-parsing MDX output) blocks the final app build — a rule-match
problem, not a path; needs the next-plugin's loader rules reviewed.
2026-06-24 16:04:58 -07:00

44 lines
1.1 KiB
TypeScript

import { DocsLayout } from '@hanzo/docs/ui/layouts/docs';
import { baseOptions, linkItems, logo } from '@/lib/layout.shared';
import { source } from '@/lib/source';
import type { ReactNode } from 'react';
export default function Layout({ children }: { children: ReactNode }) {
const base = baseOptions();
return (
<DocsLayout
{...base}
tree={source.getPageTree()}
links={linkItems.filter((item) => item.type === 'icon')}
nav={{
...base.nav,
title: (
<>
{logo}
<span className="font-medium max-md:hidden">Hanzo Standards</span>
</>
),
}}
sidebar={{
tabs: {
transform(option, node) {
if (!node.icon) return option;
return {
...option,
icon: (
<div className="[&_svg]:size-full rounded-lg size-full text-brand max-md:bg-brand/10 max-md:border max-md:p-1.5">
{node.icon}
</div>
),
};
},
},
}}
>
{children}
</DocsLayout>
);
}