-
Notifications
You must be signed in to change notification settings - Fork 162
Version Packages #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Version Packages #285
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
e80a19c to
8fef8ed
Compare
8fef8ed to
081a22c
Compare
081a22c to
b28b40b
Compare
b28b40b to
4dfd981
Compare
4dfd981 to
1456739
Compare
1456739 to
3077f01
Compare
3077f01 to
d032d64
Compare
d032d64 to
e4e5f16
Compare
e4e5f16 to
501a584
Compare
501a584 to
ea0a187
Compare
ea0a187 to
1c19873
Compare
1c19873 to
ddc762c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 Build Fix:
The PageTOC and PageTOCItems components have been removed in fumadocs-ui v16.2.3. The code imports these non-existent components from fumadocs-ui/layouts/docs/page, causing Turbopack compilation to fail. Additionally, the generatePageMetadata and generateStaticPageParams functions are missing from the docs-page.tsx wrapper component.
View Details
📝 Patch Details
diff --git a/apps/website/components/geistdocs/docs-page.tsx b/apps/website/components/geistdocs/docs-page.tsx
index 1952e22..7b58efe 100644
--- a/apps/website/components/geistdocs/docs-page.tsx
+++ b/apps/website/components/geistdocs/docs-page.tsx
@@ -4,8 +4,9 @@ import {
DocsPage as FumadocsDocsPage,
DocsTitle as FumadocsDocsTitle,
} from "fumadocs-ui/layouts/docs/page";
-import type { ComponentProps } from "react";
+import type { ComponentProps, Metadata } from "react";
import { cn } from "@/lib/utils";
+import { source } from "@/lib/geistdocs/source";
type PageProps = ComponentProps<typeof FumadocsDocsPage>;
@@ -33,3 +34,22 @@ export const DocsBody = ({
}: ComponentProps<typeof FumadocsDocsBody>) => (
<FumadocsDocsBody className={cn("mx-auto w-full", className)} {...props} />
);
+
+export const generateStaticPageParams = () => {
+ return source.generateParams("slug");
+};
+
+export const generatePageMetadata = async (
+ slugs: string[] | undefined
+): Promise<Metadata> => {
+ const page = source.getPage(slugs);
+
+ if (!page) {
+ return {};
+ }
+
+ return {
+ title: page.data.title,
+ description: page.data.description,
+ };
+};
diff --git a/apps/website/components/geistdocs/toc.tsx b/apps/website/components/geistdocs/toc.tsx
index 40dc30b..650077a 100644
--- a/apps/website/components/geistdocs/toc.tsx
+++ b/apps/website/components/geistdocs/toc.tsx
@@ -1,6 +1,6 @@
"use client";
-import { PageTOC, PageTOCItems } from "fumadocs-ui/layouts/docs/page";
+import { TOCItems } from "fumadocs-ui/components/toc/clerk";
import type { ReactNode } from "react";
import { useChatContext } from "@/hooks/geistdocs/use-chat";
import { useIsMobile } from "@/hooks/use-mobile";
@@ -16,14 +16,14 @@ export const TableOfContents = ({ children }: TableOfContentsProps) => {
const isMobile = useIsMobile();
return (
- <PageTOC
+ <aside
className={cn(
"transition-[right]",
isOpen && !isMobile && "right-[384px]!"
)}
>
<p className="mb-1 font-medium text-sm">On this page</p>
- <PageTOCItems variant="clerk" />
+ <TOCItems />
{children && (
<div className="my-3 space-y-3">
@@ -31,6 +31,6 @@ export const TableOfContents = ({ children }: TableOfContentsProps) => {
{children}
</div>
)}
- </PageTOC>
+ </aside>
);
};
Analysis
Fumadocs UI v16.2.3 Breaking Change: Missing Component Exports
What fails: Turbopack compilation fails due to missing exports from fumadocs-ui v16.2.3 after dependency upgrade from v16.0.10 to v16.2.3.
How to reproduce:
cd apps/website && npm run buildResult:
Export PageTOC doesn't exist in target module
Error: Turbopack build failed with 6 errors:
./apps/website/components/geistdocs/toc.tsx:3:1
Export PageTOC doesn't exist in target module
./apps/website/components/geistdocs/toc.tsx:3:1
Export PageTOCItems doesn't exist in target module
./app/docs/[[...slug]]/page.tsx:5:1
Export generatePageMetadata doesn't exist in target module
Export generateStaticPageParams doesn't exist in target module
Root cause: The fumadocs-ui library v16.2.3 removed the PageTOC and PageTOCItems components from fumadocs-ui/layouts/docs/page. These were refactored and the TOC components are now available from fumadocs-ui/components/toc/clerk. Additionally, the metadata generation functions were not exported from the local docs-page.tsx wrapper component.
Fix:
- Updated
apps/website/components/geistdocs/toc.tsxto importTOCItemsfromfumadocs-ui/components/toc/clerkinstead of the removedPageTOCandPageTOCItems - Replaced the
PageTOCwrapper component with a standardasideelement to maintain the same DOM structure - Removed the unused
variant="clerk"prop fromPageTOCItems(now justTOCItems) - Added missing
generateStaticPageParamsandgeneratePageMetadataexports toapps/website/components/geistdocs/docs-page.tsxthat are required by the page route handler
ddc762c to
caff038
Compare
caff038 to
2a96502
Compare
2a96502 to
5efdafd
Compare
5efdafd to
50f380b
Compare
50f380b to
36ee30d
Compare
36ee30d to
ab996e9
Compare
ab996e9 to
6f08f01
Compare
6f08f01 to
2012c50
Compare
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
streamdown@2.0.0
Major Changes
Minor Changes
Patch Changes
133c6c8: Load KaTeX CSS from CDN
0c830f5: Fix Mermaid pan/zoom controls layout issues in fullscreen and non-fullscreen modes
68109f2: Fix setext heading issues
ee12ec8: Add support for CDN offline mode
6a7dc7c: Optimize Mermaid rendering performance with viewport-based lazy loading
8d8d67f: Add rehype sanitize
271265c: Fix list indentation
8157e80: Fix fullscreen mermaid
16df4a4: Fix KaTeX parsing
6bd211d: Update rehype-harden to fix relative URLs
d1635f0: Fix bug: Code block line numbers over 100 wrap and start new line
Updated dependencies [6769e7a]
Updated dependencies [68109f2]
Updated dependencies [e0ee74e]
Updated dependencies [45f0f4d]
Updated dependencies [68f29c0]
Updated dependencies [e7eca51]
remend@1.0.2
Patch Changes