Skip to content

Commit 1d9a5db

Browse files
committed
fix issues after upgrade
1 parent 9b95efb commit 1d9a5db

File tree

6 files changed

+50
-11
lines changed

6 files changed

+50
-11
lines changed

content/test-collection/components/stepper.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Stepper
33
---
44

55
import { Preview } from "@/components/preview"
6-
import { APIReference } from "renoun/components"
6+
import { Reference } from "renoun/components"
77

88
## Source
99

@@ -41,4 +41,4 @@ The component uses
4141

4242
## API Reference
4343

44-
<APIReference source="./src/components/ui/stepper.tsx" />
44+
<Reference source="./src/components/ui/stepper.tsx" />

next.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import createMDXPlugin from "@next/mdx"
2-
import rehypeRenoun from "@renoun/mdx/rehype"
2+
import { rehypePlugins } from "@renoun/mdx"
33
import remarkRenounAddHeadings from "@renoun/mdx/remark/add-headings"
44
import remarkRenounRemoveParagraphs from "@renoun/mdx/remark/remove-immediate-paragraphs"
55
import remarkRenounRelativeLinks from "@renoun/mdx/remark/transform-relative-links"
@@ -22,7 +22,7 @@ const withMDX = createMDXPlugin({
2222
remarkRenounRelativeLinks,
2323
remarkGfm,
2424
],
25-
rehypePlugins: [rehypeRenoun, rehypeMdxImportMedia],
25+
rehypePlugins: [...rehypePlugins, rehypeMdxImportMedia],
2626
},
2727
})
2828

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"type": "module",
66
"scripts": {
77
"build": "renoun next build && pnpm generate-pagefind",
8+
"build2": "next build",
89
"create:pages": "node create-test-collections.js",
910
"deps:check": "pnpm outdated -r",
1011
"deps:update": "pnpm update -i -L -r",
@@ -61,6 +62,7 @@
6162
"renoun": "9.3.0",
6263
"tailwind-merge": "3.3.1",
6364
"tailwindcss-animate": "1.0.7",
65+
"tm-grammars": "1.24.3",
6466
"tm-themes": "1.10.7",
6567
"ts-dot-prop": "2.1.4",
6668
"zod": "4.0.17",

pnpm-lock.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

renoun.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
},
1414
"languages": [
1515
"css",
16-
"javascript",
16+
"js",
1717
"jsx",
18-
"typescript",
18+
"ts",
1919
"tsx",
20-
"markdown",
20+
"md",
2121
"mdx",
22-
"shellscript",
22+
"bash",
2323
"json",
2424
"html",
25-
"python",
26-
"graphql",
27-
"yaml",
25+
"py",
26+
"gql",
27+
"yml",
2828
"sql",
2929
"xml",
3030
"docker"

src/mdx-components.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,23 @@ export function useMDXComponents() {
145145
/>
146146
)
147147
},
148+
CodeInline: (props) => {
149+
return (
150+
<CodeInline
151+
{...props}
152+
allowErrors
153+
css={{
154+
backgroundColor: "hsl(var(--secondary))",
155+
color: "auto",
156+
boxShadow: "none",
157+
display: "inline",
158+
}}
159+
paddingX="auto"
160+
paddingY="auto"
161+
className="border px-2 py-0.5 text-xs"
162+
/>
163+
)
164+
},
148165
// Code block
149166
pre: (props: CodeBlockProps) => {
150167
if (props.language === "mermaid") {
@@ -158,6 +175,18 @@ export function useMDXComponents() {
158175

159176
return <CodeBlock {...props} className={{ container: "my-4!" }} />
160177
},
178+
CodeBlock: (props: CodeBlockProps) => {
179+
if (props.language === "mermaid") {
180+
return <MermaidWrapper chart={props.children as string} />
181+
}
182+
183+
// @ts-expect-error railroad is not a valid language
184+
if (props.language === "railroad") {
185+
return <RailroadWrapper content={props.children as string} />
186+
}
187+
188+
return <CodeBlock {...props} className={{ container: "my-4!" }} />
189+
},
161190
Note: ({ title, children }: { title?: string; children: ReactNode }) => {
162191
return (
163192
<Alert variant={"default"} className="my-4">

0 commit comments

Comments
 (0)