Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,8 @@ Temporary Items
.history/

# Built Visual Studio Code Extensions
*.vsix
*.vsix

# Temporary planning files (to be removed later)
CLAUDE.md
reference/*
5 changes: 4 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ enableGlobalCache: true

globalFolder: ./.yarn/cache/global

nodeLinker: pnpm
nodeLinker: node-modules

npmMinimalAgeGate: 7d

Expand All @@ -22,6 +22,9 @@ packageExtensions:
prettier-eslint@*:
dependencies:
typescript: "*"
nextra@*:
peerDependencies:
typescript: "*"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"workspaces": [
"configs/*",
"packages/*",
"examples/*"
"examples/*",
"site"
],
"scripts": {
"postinstall": "yarn workspace vite-config-custom build",
Expand Down
14 changes: 14 additions & 0 deletions site/mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { MDXComponents } from 'mdx/types'
import { useMDXComponents as getNextraComponents } from 'nextra/mdx-components'
import { useMDXComponents as getDocsMDXComponents } from 'nextra-theme-docs'

const nextraComponents = getNextraComponents()
const docsComponents = getDocsMDXComponents()

export function useMDXComponents(components?: MDXComponents): MDXComponents {
return {
...nextraComponents,
...docsComponents,
...components
}
}
6 changes: 6 additions & 0 deletions site/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Check for hard-coded generated route reference:"
rg -n 'reference path="\./\.next/types/routes\.d\.ts"' site/next-env.d.ts || true

echo
echo "Check if generated route file exists in repository checkout:"
if [ -f site/.next/types/routes.d.ts ]; then
  echo "FOUND: site/.next/types/routes.d.ts"
else
  echo "MISSING: site/.next/types/routes.d.ts"
fi

echo
echo "Display full content of site/next-env.d.ts:"
cat -n site/next-env.d.ts

Repository: mincho-js/mincho

Length of output: 609


Remove the direct reference to generated .next route types.

Line 3 hard-codes a reference to a generated file that does not exist in the repository. This will cause TypeScript type-checking failures in clean checkouts before next dev/build generates .next.

Proposed fix
 /// <reference types="next" />
 /// <reference types="next/image-types/global" />
-/// <reference path="./.next/types/routes.d.ts" />
 
 // NOTE: This file should not be edited
 // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/// <reference path="./.next/types/routes.d.ts" />
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@site/next-env.d.ts` at line 3, Remove the hard-coded triple-slash reference
to the generated routes types in next-env.d.ts (the line /// <reference
path="./.next/types/routes.d.ts" />); delete that line so TypeScript won't error
on clean checkouts before Next has generated .next, or replace it with a
non-blocking runtime-generated types strategy if you need the reference later.
Ensure the file now only contains the standard Next.js ambient declarations and
no direct reference to .next-generated routes.


// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
9 changes: 9 additions & 0 deletions site/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import nextra from 'nextra'

const withNextra = nextra({
contentDirBasePath: '/docs'
})

export default withNextra({
reactStrictMode: true
})
23 changes: 23 additions & 0 deletions site/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "mincho-docs",
"version": "0.1.0",
"type": "module",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "^15.5.10",
"nextra": "^4.6.1",
"nextra-theme-docs": "^4.6.1",
"react": "^19.2.1",
"react-dom": "^19.2.1"
},
"devDependencies": {
"@types/node": "^24.10.1",
"@types/react": "^19.2.7",
"typescript": "^5.9.3"
}
}
29 changes: 29 additions & 0 deletions site/src/app/docs/[[...mdxPath]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { generateStaticParamsFor, importPage } from 'nextra/pages'
import { useMDXComponents } from '../../../../mdx-components'

export const generateStaticParams = generateStaticParamsFor('mdxPath')

type PageProps = {
params: Promise<{ mdxPath?: string[] }>
}

export async function generateMetadata(props: PageProps) {
const params = await props.params
const { metadata } = await importPage(params.mdxPath)
return metadata
}

const components = useMDXComponents()
const Wrapper = components.wrapper!

export default async function Page(props: PageProps) {
const params = await props.params
const result = await importPage(params.mdxPath)
const { default: MDXContent, toc, metadata } = result

return (
<Wrapper toc={toc} metadata={metadata}>
<MDXContent {...props} params={params} />
</Wrapper>
)
}
35 changes: 35 additions & 0 deletions site/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import type { ReactNode } from 'react'
import { Footer, Layout, Navbar } from 'nextra-theme-docs'
import { Head } from 'nextra/components'
import { getPageMap } from 'nextra/page-map'
import 'nextra-theme-docs/style.css'

export const metadata = {
title: 'Mincho.js',
description: 'Natural CSS in TypeScript - A CSS-in-JS framework built on Vanilla Extract'
}

export default async function RootLayout({ children }: { children: ReactNode }) {
const pageMap = await getPageMap()

return (
<html lang="en" suppressHydrationWarning>
<Head />
<body suppressHydrationWarning>
<Layout
navbar={
<Navbar
logo={<span style={{ fontWeight: 700 }}>Mincho.js</span>}
projectLink="https://github.com/mincho-js/mincho"
/>
}
pageMap={pageMap}
docsRepositoryBase="https://github.com/mincho-js/mincho/tree/main/site"
footer={<Footer>MIT {new Date().getFullYear()} © Mincho.js</Footer>}
>
{children}
</Layout>
</body>
</html>
)
}
26 changes: 26 additions & 0 deletions site/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export default function IndexPage() {
return (
<div style={{ textAlign: 'center', padding: '100px 20px' }}>
<h1 style={{ fontSize: 48, fontWeight: 'bold', marginBottom: 16 }}>
Mincho.js
</h1>
<p style={{ fontSize: 20, color: '#666', marginBottom: 32 }}>
Natural CSS in TypeScript
</p>
<a
href="/docs"
style={{
display: 'inline-block',
padding: '12px 24px',
backgroundColor: '#0070f3',
color: 'white',
borderRadius: 8,
textDecoration: 'none',
fontWeight: 500
}}
>
Get Started
</a>
</div>
)
}
10 changes: 10 additions & 0 deletions site/src/content/_meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default {
index: "Introduction",
"getting-started": "Getting Started",
literal: "Literal CSS",
rules: "Rules",
theme: "Theme",
styled: "Styled Components",
classname: "Class Name Utilities",
"define-rules": "Define Rules"
};
Loading