Feat: Documentation site with Nextra (Next.js)#311
Conversation
- Set up Next.js 15 + Nextra 4 + nextra-theme-docs - Add basic project structure (src/app, src/content) - Create sample documentation pages (Introduction, Getting Started)
Add suppressHydrationWarning to <body> to prevent false warnings caused by browser extensions (e.g., ColorZilla) that modify DOM attributes. This only suppresses warnings for the element itself, not its children, so actual hydration errors in content will still be reported. Ref: https://nextjs.org/docs/messages/react-hydration-error
- Convert all .jsx files to .tsx - Add tsconfig.json with strict mode - Add TypeScript and type dependencies
- Rename _meta.js to _meta.ts for TypeScript consistency - Fix Vite plugin export name: mincho → minchoVitePlugin - Add @vanilla-extract/css to installation command - Expand getting-started with practical examples and key features
Comprehensive documentation for Mincho.js Literal CSS features: - Merge Values ($ and _ suffixes) - Simply Important (! suffix) - CSS Variables ($ prefix) - Simple/Complex Pseudo Selectors - Toplevel Selectors - Nested Selectors and At-Rules - Property Reference (@) - Nested Properties (uppercase keys) - Property Conditions (base keyword) - Anonymous At-Rules (keyframes, fontface) - Variant Reference (%) All examples verified against actual implementation test cases.
- Add site to monorepo workspaces configuration - Change nodeLinker from pnpm to node-modules for Next.js compatibility - Remove npm package-lock.json (now managed by yarn) - Add type: module to site/package.json
- Next.js: ^15.0.0 → ^15.5.7 - React/React-DOM: ^19.0.0 → ^19.2.1 - Nextra/Nextra-theme-docs: ^4.0.0 → ^4.6.1 Update mdx-components.tsx and page.tsx for Nextra 4.6.x compatibility.
- rules() function with variants, toggles, props - Compound variants with function-based conditions - Multiple rules with rules.multiple() - Type constraints with rules.with() - Limitations and workarounds section
- Add theme.mdx covering theme() and globalTheme() functions - Document token types: primitive, arrays, nested objects, unit values - Document DTCG token definitions: color, fontFamily, duration, cubicBezier, fontWeight, number, dimension - Document semantic tokens with getters, fallbackVar(), alias(), raw() - Document composite values, CSS layers, multiple themes - Update _meta.ts to include theme page
- Add css.raw() documentation for object passthrough - Add css.multiple() documentation for creating multiple class names - Add css.with() documentation for type restrictions and mixin patterns - Document chaining with raw() and multiple() methods
- Document planned theme.raw(), theme.with(), theme.multiple() methods - Note that these are under development for API consistency with css and rules
- Next.js: ^15.5.7 → ^15.5.10 (resolved to 15.5.12) - GHSA-9g9p-9gw9-jx7f: Image Optimizer DoS via remotePatterns (moderate) - GHSA-h25m-26qc-wcjf: HTTP request deserialization DoS (high)
|
|
Triggered from #311 by @Jeong-jj. Checking if we can fast forward Target branch ( commit 64d891eeda0fe99572e9372a78ad2c1e5df46c18 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Mon Feb 16 00:00:00 2026 +0900
chore: tsconfig - strict module syntaxPull request ( commit e541ae950206ce45eb6e063d53eae3e4496d8c9c (pull_request/feat/docs-site)
Author: JeongJun <rgfdds98@gmail.com>
Date: Mon Mar 2 23:55:20 2026 +0900
Chore: add site to root tsconfig project referencesIt is possible to fast forward |
📝 WalkthroughWalkthroughThis PR establishes a new documentation site for the Mincho.js project within the monorepo. It adds configuration updates to support a "site" workspace, creates a Next.js application with Nextra integration for MDX-based documentation, and introduces comprehensive docs covering getting started, API features (literal CSS, rules, styled components, theming), class name utilities, and define rules functionality. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
site/src/app/page.tsx (1)
1-23: Usenext/linkfor internal navigation to/docs.The
/docsroute is internal to the App Router. UsingLinkenables client-side navigation, automatic prefetching, and better performance—while plain<a>is reserved for external URLs and non-route navigation.♻️ Proposed refactor
+import Link from 'next/link' + export default function IndexPage() { return ( @@ - <a + <Link href="/docs" style={{ display: 'inline-block', @@ > Get Started - </a> + </Link>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@site/src/app/page.tsx` around lines 1 - 23, The IndexPage uses a plain <a href="/docs"> for an internal route; import Link from 'next/link' and replace the anchor with the Next.js Link component (keeping the same styling/props and inner text) so navigation to "/docs" uses client-side navigation and prefetching; update the IndexPage function to import Link and return <Link href="/docs">...styled content...</Link> instead of the raw <a>.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@site/next-env.d.ts`:
- 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.
In `@site/src/content/define-rules.mdx`:
- Line 3: Replace the user-facing typo "high-order" with the correct term
"higher-order" in the API description for defineRules(); specifically update the
sentence that currently reads "`defineRules()` is a high-order definition
API..." to use "higher-order" so the documentation for defineRules() uses the
correct terminology.
- Around line 397-404: The Selector Conditions example in defineRules uses
invalid object syntax like selector: '&:is(... )': {} which breaks
TypeScript/JS; update the conditions block (symbols: defineRules, conditions,
hover, focus, checked, css) so each condition's selector is a string value
(e.g., selector: '&:is(:hover, [data-hover])') without the trailing ": {}"
object—ensure all selector properties are plain strings to make the snippet
valid and copy-pasteable.
In `@site/src/content/getting-started.mdx`:
- Around line 125-131: The snippet passed to the css(...) call contains an
object with a nested padding property but is missing a trailing comma after the
closing brace of the padding object; update the snippet inside the css call (the
padding object in the css(...) argument) to add a trailing comma after the
padding object's closing brace so the object literal is valid JSON/JS/TS (i.e.,
ensure the padding: { Block: 16, Inline: 24 }, line ends with a comma before the
next token/comment).
In `@site/src/content/literal.mdx`:
- Line 3: In the sentence mentioning the `css()` function that currently reads
"Vanilla Extract compatible styles", change the compound adjective to "Vanilla
Extract-compatible styles" (update the phrase "Vanilla Extract compatible" to
"Vanilla Extract-compatible"); search for and fix any other occurrences of the
same unhyphenated phrase in the same doc to keep grammar consistent.
In `@site/src/content/styled.mdx`:
- Around line 74-92: The example redeclares the variable Button twice; rename
the second declaration to a different identifier (e.g., ButtonAlt or
ButtonComponent) so the function-call example (const Button = styled('button',
...)) and the property-access example (const Button = styled.button(...)) do not
conflict—update the second const declaration that uses styled.button to use the
new name and ensure any explanatory text refers to that new identifier.
In `@site/tsconfig.json`:
- Around line 2-24: Add "composite": true to the compilerOptions in this
project's tsconfig.json so the project can be used with TypeScript project
references (tsc --build); update the compilerOptions object (the same block
containing "target", "lib", "strict", etc.) to include composite: true to ensure
compatibility with the root tsconfig.json references.
---
Nitpick comments:
In `@site/src/app/page.tsx`:
- Around line 1-23: The IndexPage uses a plain <a href="/docs"> for an internal
route; import Link from 'next/link' and replace the anchor with the Next.js Link
component (keeping the same styling/props and inner text) so navigation to
"/docs" uses client-side navigation and prefetching; update the IndexPage
function to import Link and return <Link href="/docs">...styled
content...</Link> instead of the raw <a>.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (21)
.gitignore.yarnrc.ymlpackage.jsonsite/mdx-components.tsxsite/next-env.d.tssite/next.config.mjssite/package.jsonsite/src/app/docs/[[...mdxPath]]/page.tsxsite/src/app/layout.tsxsite/src/app/page.tsxsite/src/content/_meta.tssite/src/content/classname.mdxsite/src/content/define-rules.mdxsite/src/content/getting-started.mdxsite/src/content/index.mdxsite/src/content/literal.mdxsite/src/content/rules.mdxsite/src/content/styled.mdxsite/src/content/theme.mdxsite/tsconfig.jsontsconfig.json
| @@ -0,0 +1,6 @@ | |||
| /// <reference types="next" /> | |||
| /// <reference types="next/image-types/global" /> | |||
| /// <reference path="./.next/types/routes.d.ts" /> | |||
There was a problem hiding this comment.
🧩 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.tsRepository: 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.
| /// <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.
| @@ -0,0 +1,580 @@ | |||
| # Define Rules | |||
|
|
|||
| `defineRules()` is a high-order definition API that creates constrained style functions with property constraints and shortcuts. | |||
There was a problem hiding this comment.
Use “higher-order” instead of “high-order.”
This is a user-facing terminology typo in the API description.
✏️ Suggested doc fix
-`defineRules()` is a high-order definition API that creates constrained style functions with property constraints and shortcuts.
+`defineRules()` is a higher-order definition API that creates constrained style functions with property constraints and shortcuts.📝 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.
| `defineRules()` is a high-order definition API that creates constrained style functions with property constraints and shortcuts. | |
| `defineRules()` is a higher-order definition API that creates constrained style functions with property constraints and shortcuts. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@site/src/content/define-rules.mdx` at line 3, Replace the user-facing typo
"high-order" with the correct term "higher-order" in the API description for
defineRules(); specifically update the sentence that currently reads
"`defineRules()` is a high-order definition API..." to use "higher-order" so the
documentation for defineRules() uses the correct terminology.
| ```typescript | ||
| // Future API | ||
| const { css } = defineRules({ | ||
| conditions: { | ||
| hover: { selector: '&:is(:hover, [data-hover])': {} }, | ||
| focus: { selector: '&:is(:focus, [data-focus])': {} }, | ||
| checked: { selector: '&:is(:checked, [data-checked], [aria-checked=true])': {} } | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n site/src/content/define-rules.mdx | sed -n '397,404p'Repository: mincho-js/mincho
Length of output: 398
🏁 Script executed:
# Find type definitions or documentation for defineRules
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.d.ts" \) | xargs grep -l "defineRules" | head -5Repository: mincho-js/mincho
Length of output: 167
🏁 Script executed:
# Check the types definition for defineRules conditions
cat ./packages/css/src/defineRules/types.tsRepository: mincho-js/mincho
Length of output: 21215
🏁 Script executed:
# Search for conditions type or interface definition
grep -rn "conditions" ./packages/css/src/defineRules/ --include="*.ts" -A 3 | head -50Repository: mincho-js/mincho
Length of output: 42
🏁 Script executed:
cat ./packages/css/src/defineRules/index.tsRepository: mincho-js/mincho
Length of output: 14424
🏁 Script executed:
# Search for "conditions" in the entire codebase
rg -n "conditions" --type typescript --type mdx -B 2 -A 2 | head -100Repository: mincho-js/mincho
Length of output: 94
🏁 Script executed:
# Search for "conditions" in the entire codebase
rg -n "conditions" -B 2 -A 2 | head -150Repository: mincho-js/mincho
Length of output: 5389
🏁 Script executed:
# Search for conditions in documentation and source files
find . -type f \( -name "*.mdx" -o -name "*.ts" -o -name "*.tsx" \) ! -path "*/node_modules/*" ! -path "*/.yarn/*" -exec grep -l "conditions" {} \; | head -20Repository: mincho-js/mincho
Length of output: 378
🏁 Script executed:
# Check the rules implementation for conditions API
grep -n "conditions" ./packages/css/src/rules/index.ts -B 3 -A 3 | head -50Repository: mincho-js/mincho
Length of output: 514
🏁 Script executed:
# Search for the conditions property definition in rules
rg "conditions\s*:" ./packages/css/src/rules/index.ts -B 2 -A 2Repository: mincho-js/mincho
Length of output: 42
🏁 Script executed:
# Check the transform-to-vanilla style-rule types
cat ./packages/transform-to-vanilla/src/types/style-rule.tsRepository: mincho-js/mincho
Length of output: 17454
🏁 Script executed:
# Check the rules documentation file
grep -n "conditions" ./site/src/content/rules.mdx -B 5 -A 10 | head -100Repository: mincho-js/mincho
Length of output: 649
🏁 Script executed:
# Look at more context in the define-rules.mdx file around the problematic code
cat -n ./site/src/content/define-rules.mdx | sed -n '385,420p'Repository: mincho-js/mincho
Length of output: 1201
Fix invalid TypeScript syntax in the Selector Conditions example.
The snippet uses selector: '...': {}syntax, which is not valid JavaScript/TypeScript and will break copy-paste usage. The object values should be strings only, not have a trailing: {}`.
🛠️ Suggested doc fix
const { css } = defineRules({
conditions: {
- hover: { selector: '&:is(:hover, [data-hover])': {} },
- focus: { selector: '&:is(:focus, [data-focus])': {} },
- checked: { selector: '&:is(:checked, [data-checked], [aria-checked=true])': {} }
+ hover: { selector: '&:is(:hover, [data-hover])' },
+ focus: { selector: '&:is(:focus, [data-focus])' },
+ checked: { selector: '&:is(:checked, [data-checked], [aria-checked=true])' }
}
});🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@site/src/content/define-rules.mdx` around lines 397 - 404, The Selector
Conditions example in defineRules uses invalid object syntax like selector:
'&:is(... )': {} which breaks TypeScript/JS; update the conditions block
(symbols: defineRules, conditions, hover, focus, checked, css) so each
condition's selector is a string value (e.g., selector: '&:is(:hover,
[data-hover])') without the trailing ": {}" object—ensure all selector
properties are plain strings to make the snippet valid and copy-pasteable.
| css({ | ||
| padding: { | ||
| Block: 16, | ||
| Inline: 24 | ||
| } | ||
| // → padding-block: 16px; padding-inline: 24px; | ||
| }) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check if file exists
ls -la site/src/content/getting-started.mdxRepository: mincho-js/mincho
Length of output: 145
🏁 Script executed:
# Read lines 125-131 from the file
sed -n '125,131p' site/src/content/getting-started.mdxRepository: mincho-js/mincho
Length of output: 165
🏁 Script executed:
# Get context: read a broader range to understand the snippet purpose
sed -n '120,140p' site/src/content/getting-started.mdxRepository: mincho-js/mincho
Length of output: 391
Fix invalid object literal in the nested-properties snippet.
Line 129 needs a trailing comma after the padding object; without it, the code snippet contains a syntax error and will fail if copied into TypeScript/JavaScript code.
Suggested fix
css({
padding: {
Block: 16,
Inline: 24
- }
+ },
// → padding-block: 16px; padding-inline: 24px;
})📝 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.
| css({ | |
| padding: { | |
| Block: 16, | |
| Inline: 24 | |
| } | |
| // → padding-block: 16px; padding-inline: 24px; | |
| }) | |
| css({ | |
| padding: { | |
| Block: 16, | |
| Inline: 24 | |
| }, | |
| // → padding-block: 16px; padding-inline: 24px; | |
| }) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@site/src/content/getting-started.mdx` around lines 125 - 131, The snippet
passed to the css(...) call contains an object with a nested padding property
but is missing a trailing comma after the closing brace of the padding object;
update the snippet inside the css call (the padding object in the css(...)
argument) to add a trailing comma after the padding object's closing brace so
the object literal is valid JSON/JS/TS (i.e., ensure the padding: { Block: 16,
Inline: 24 }, line ends with a comma before the next token/comment).
| @@ -0,0 +1,1162 @@ | |||
| # Literal CSS | |||
|
|
|||
| Mincho.js provides a natural way to write CSS in TypeScript. The `css()` function transforms intuitive syntax into Vanilla Extract compatible styles at build time. | |||
There was a problem hiding this comment.
Hyphenate “Vanilla Extract-compatible.”
Use a compound adjective here for correct grammar in user-facing docs.
✏️ Suggested doc fix
-Mincho.js provides a natural way to write CSS in TypeScript. The `css()` function transforms intuitive syntax into Vanilla Extract compatible styles at build time.
+Mincho.js provides a natural way to write CSS in TypeScript. The `css()` function transforms intuitive syntax into Vanilla Extract-compatible styles at build time.📝 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.
| Mincho.js provides a natural way to write CSS in TypeScript. The `css()` function transforms intuitive syntax into Vanilla Extract compatible styles at build time. | |
| Mincho.js provides a natural way to write CSS in TypeScript. The `css()` function transforms intuitive syntax into Vanilla Extract-compatible styles at build time. |
🧰 Tools
🪛 LanguageTool
[grammar] ~3-~3: Use a hyphen to join words.
Context: ...ms intuitive syntax into Vanilla Extract compatible styles at build time. ## Ove...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@site/src/content/literal.mdx` at line 3, In the sentence mentioning the
`css()` function that currently reads "Vanilla Extract compatible styles",
change the compound adjective to "Vanilla Extract-compatible styles" (update the
phrase "Vanilla Extract compatible" to "Vanilla Extract-compatible"); search for
and fix any other occurrences of the same unhyphenated phrase in the same doc to
keep grammar consistent.
| ```tsx | ||
| import { styled } from '@mincho-js/react'; | ||
|
|
||
| // Function call syntax (primary approach) | ||
| const Button = styled('button', { | ||
| base: { | ||
| padding: '10px 20px', | ||
| borderRadius: '4px', | ||
| }, | ||
| }); | ||
|
|
||
| // Property accessor syntax (styled-components-like) | ||
| const Button = styled.button({ | ||
| base: { | ||
| padding: '10px 20px', | ||
| borderRadius: '4px', | ||
| }, | ||
| }); | ||
| ``` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check if the file exists and read the relevant lines
if [ -f "site/src/content/styled.mdx" ]; then
echo "=== File found: site/src/content/styled.mdx ==="
echo "=== Lines 74-92 ==="
sed -n '74,92p' site/src/content/styled.mdx | cat -n
else
# Try to find the file if path is different
echo "=== Searching for styled.mdx ==="
find . -name "styled.mdx" -type f 2>/dev/null
fiRepository: mincho-js/mincho
Length of output: 619
Rename the second Button declaration to avoid duplicate variable error.
This code block redeclares Button on lines 78 and 86, which causes a TypeScript/JavaScript compile error when users copy and paste it. Since the two syntaxes are presented as alternatives, rename the second declaration for clarity.
Suggested fix
// Function call syntax (primary approach)
const Button = styled('button', {
base: {
padding: '10px 20px',
borderRadius: '4px',
},
});
// Property accessor syntax (styled-components-like)
-const Button = styled.button({
+const ButtonByAccessor = styled.button({
base: {
padding: '10px 20px',
borderRadius: '4px',
},
});📝 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.
| ```tsx | |
| import { styled } from '@mincho-js/react'; | |
| // Function call syntax (primary approach) | |
| const Button = styled('button', { | |
| base: { | |
| padding: '10px 20px', | |
| borderRadius: '4px', | |
| }, | |
| }); | |
| // Property accessor syntax (styled-components-like) | |
| const Button = styled.button({ | |
| base: { | |
| padding: '10px 20px', | |
| borderRadius: '4px', | |
| }, | |
| }); | |
| ``` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@site/src/content/styled.mdx` around lines 74 - 92, The example redeclares the
variable Button twice; rename the second declaration to a different identifier
(e.g., ButtonAlt or ButtonComponent) so the function-call example (const Button
= styled('button', ...)) and the property-access example (const Button =
styled.button(...)) do not conflict—update the second const declaration that
uses styled.button to use the new name and ensure any explanatory text refers to
that new identifier.
| "compilerOptions": { | ||
| "target": "ES2017", | ||
| "lib": ["dom", "dom.iterable", "esnext"], | ||
| "allowJs": true, | ||
| "skipLibCheck": true, | ||
| "strict": true, | ||
| "noEmit": true, | ||
| "esModuleInterop": true, | ||
| "module": "esnext", | ||
| "moduleResolution": "bundler", | ||
| "resolveJsonModule": true, | ||
| "isolatedModules": true, | ||
| "jsx": "preserve", | ||
| "incremental": true, | ||
| "plugins": [ | ||
| { | ||
| "name": "next" | ||
| } | ||
| ], | ||
| "paths": { | ||
| "@/*": ["./src/*"] | ||
| } | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python - <<'PY'
import json
from pathlib import Path
root = json.loads(Path("tsconfig.json").read_text())
site_ref = any(ref.get("path") == "site" for ref in root.get("references", []))
site_cfg = json.loads(Path("site/tsconfig.json").read_text())
composite = site_cfg.get("compilerOptions", {}).get("composite")
print(f"root references 'site': {site_ref}")
print(f"site compilerOptions.composite: {composite}")
if site_ref and composite is not True:
print("RESULT: referenced project is missing composite=true")
PYRepository: mincho-js/mincho
Length of output: 178
Add composite: true for project-reference compatibility.
Since the root tsconfig.json references this project, it requires composite: true in compilerOptions for TypeScript's tsc --build to function correctly.
🛠️ Proposed fix
"compilerOptions": {
"jsx": "preserve",
"incremental": true,
+ "composite": true,
"plugins": [📝 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.
| "compilerOptions": { | |
| "target": "ES2017", | |
| "lib": ["dom", "dom.iterable", "esnext"], | |
| "allowJs": true, | |
| "skipLibCheck": true, | |
| "strict": true, | |
| "noEmit": true, | |
| "esModuleInterop": true, | |
| "module": "esnext", | |
| "moduleResolution": "bundler", | |
| "resolveJsonModule": true, | |
| "isolatedModules": true, | |
| "jsx": "preserve", | |
| "incremental": true, | |
| "plugins": [ | |
| { | |
| "name": "next" | |
| } | |
| ], | |
| "paths": { | |
| "@/*": ["./src/*"] | |
| } | |
| }, | |
| "compilerOptions": { | |
| "target": "ES2017", | |
| "lib": ["dom", "dom.iterable", "esnext"], | |
| "allowJs": true, | |
| "skipLibCheck": true, | |
| "strict": true, | |
| "noEmit": true, | |
| "esModuleInterop": true, | |
| "module": "esnext", | |
| "moduleResolution": "bundler", | |
| "resolveJsonModule": true, | |
| "isolatedModules": true, | |
| "jsx": "preserve", | |
| "incremental": true, | |
| "composite": true, | |
| "plugins": [ | |
| { | |
| "name": "next" | |
| } | |
| ], | |
| "paths": { | |
| "@/*": ["./src/*"] | |
| } | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@site/tsconfig.json` around lines 2 - 24, Add "composite": true to the
compilerOptions in this project's tsconfig.json so the project can be used with
TypeScript project references (tsc --build); update the compilerOptions object
(the same block containing "target", "lib", "strict", etc.) to include
composite: true to ensure compatibility with the root tsconfig.json references.
Description
Set up a documentation site for Mincho.js using Nextra 4.x with Next.js App Router.
Site Structure
cx(),cx.with(),cx.multiple()documentationInfrastructure
mincho-docssiteto root tsconfig project references.yarnrc.ymlRelated Issue
Summary by CodeRabbit
New Features
Chores
Additional context
The
defineRules()documentation has been updated to reflect the current implementation status — Property Constraints and Shortcuts are now documented with working examples based on the actual API, while Conditions, Theme integration, and other planned features remain marked as Coming Soon.Checklist
yarn workspace mincho-docs build)