Docs: dedicated math, diagram & source-with-preview pages - #2966
Conversation
The content globs are cwd-relative and the glob library snapshots process.cwd() at import time - run from anywhere but docs/, the script silently matched zero files and reported success. Pin the cwd to the script's directory before dynamically importing the library (static imports would hoist above the chdir).
Restructures the code-block/math/diagram documentation: - code-blocks.mdx covers just code blocks, with syntax highlighting explained simple-first (install @blocknote/code-block, add the extension) and the extension architecture moved under Custom Syntax Highlighting. - blocks/math.mdx and blocks/diagrams.mdx are new sidebar pages: setup, menu items & localization (compact - the wiring lives in the linked component pages and the embedded example), a live example, and a format-by-format Exporting section with the mapping setup and factory option signatures. The renderDiagram server-side story now exists once, on the diagram page, instead of on four export pages. - The export pages keep short stubs linking to the block pages; the email page keeps image delivery (email-client knowledge) and moves the whole math/diagram section below the generic sections. - custom-schemas/source-with-preview.mdx documents building your own preview blocks as a three-step walkthrough, with the complete implementation in a new embedded example (examples/06-custom-schema/11-source-with-preview: a CSV table block and a color chip inline content) - the example is type-checked and rendered, so the documented API can't silently rot. It also corrects the pattern's API docs, which described the pre-refactor per-spec extension options instead of meta.hasPreview. - document-structure.mdx uses plainContentToString instead of showing hand-joined content items.
Editorial principles and the verification workflow for docs/content, distilled from the restructure: simple-first ordering, one page per searchable feature, single-sourced mechanisms, examples as the compiled-and-rendered home of complete implementations, actionable caveats only, plus the validate-links/dev-server/screenshot workflow and fumadocs mechanics.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe changes add documentation workflow guidance, expand math, diagram, code-block, and source-preview documentation, update export references, improve link validation, and add a runnable source-preview example to the playground. ChangesDocumentation and examples
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
|
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (1)
docs/content/docs/features/blocks/code-blocks.mdx (1)
64-70: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd the missing imports to the setup snippet.
The snippet below this line uses
useCreateBlockNoteandBlockNoteSchema, but imports onlycreateCodeBlockSpec,codeBlockOptions, andsyntaxHighlighter. A reader who copies the block gets unresolved identifiers.
.claude/skills/docs-skill/SKILL.mdin this same PR states: "Setup snippets are self-contained. A snippet the reader is meant to copy includes the imports for each symbol it uses — without them it doesn't work when copied."📝 Proposed import additions
-import { createCodeBlockSpec } from "`@blocknote/core`"; +import { BlockNoteSchema, createCodeBlockSpec } from "`@blocknote/core`"; +import { useCreateBlockNote } from "`@blocknote/react`"; import { codeBlockOptions, syntaxHighlighter } from "`@blocknote/code-block`";🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/content/docs/features/blocks/code-blocks.mdx` around lines 64 - 70, Update the code-block setup snippet using useCreateBlockNote and BlockNoteSchema to include imports for both symbols, while preserving the existing imports for createCodeBlockSpec, codeBlockOptions, and syntaxHighlighter so the copied snippet is self-contained.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/content/docs/features/blocks/diagrams.mdx`:
- Line 71: Fix the incomplete sentence in the exporter introduction by adding a
verb after “The [DOCX exporter](/docs/features/export/docx)” so it clearly
states that the DOCX exporter is shown in the example, while preserving the
existing comparison with the PDF, ODT, and email exporters.
- Around line 34-43: Update the Mermaid syntax-highlighting guidance near the
editor snippet to accurately state that the current Mermaid grammar may produce
no visible highlighting because it only tokenizes Mermaid inside fenced Markdown
blocks; make this limitation actionable, or remove the instruction and snippet
if highlighting is not currently effective. Ensure the documentation matches the
behavior in createReactDiagramBlockSpec.
In `@examples/06-custom-schema/11-source-with-preview/index.html`:
- Line 1: Add the standard HTML5 doctype declaration before the opening html
element in the document, leaving the existing lang attribute and remaining
markup unchanged.
In `@examples/06-custom-schema/11-source-with-preview/main.tsx`:
- Line 4: Update the App import in the entry module to omit the .jsx extension,
using the existing ./src/App module specifier so Vite resolves the available
App.tsx file.
In `@examples/06-custom-schema/11-source-with-preview/package.json`:
- Around line 7-12: Update the build:prod script in package.json to replace the
direct tsc invocation with vp run lint, while preserving the subsequent Vite
production build command.
In `@examples/06-custom-schema/11-source-with-preview/vite.config.ts`:
- Around line 16-28: Update the path resolution in the Vite alias configuration:
change the existence check and both “@blocknote/core” and “@blocknote/react”
aliases from “../../packages” to “../../../packages” so they point to the
repository packages directory and remain enabled.
---
Nitpick comments:
In `@docs/content/docs/features/blocks/code-blocks.mdx`:
- Around line 64-70: Update the code-block setup snippet using
useCreateBlockNote and BlockNoteSchema to include imports for both symbols,
while preserving the existing imports for createCodeBlockSpec, codeBlockOptions,
and syntaxHighlighter so the copied snippet is self-contained.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e7e5e54e-9262-4d3b-88e7-ff04682b043a
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (24)
.claude/skills/docs-skill/SKILL.mddocs/content/docs/features/blocks/code-blocks.mdxdocs/content/docs/features/blocks/diagrams.mdxdocs/content/docs/features/blocks/math.mdxdocs/content/docs/features/blocks/meta.jsondocs/content/docs/features/custom-schemas/source-with-preview.mdxdocs/content/docs/features/export/docx.mdxdocs/content/docs/features/export/email.mdxdocs/content/docs/features/export/markdown.mdxdocs/content/docs/features/export/odt.mdxdocs/content/docs/features/export/pdf.mdxdocs/content/docs/foundations/document-structure.mdxdocs/validate-links.mjsexamples/06-custom-schema/11-source-with-preview/.bnexample.jsonexamples/06-custom-schema/11-source-with-preview/README.mdexamples/06-custom-schema/11-source-with-preview/index.htmlexamples/06-custom-schema/11-source-with-preview/main.tsxexamples/06-custom-schema/11-source-with-preview/package.jsonexamples/06-custom-schema/11-source-with-preview/src/App.tsxexamples/06-custom-schema/11-source-with-preview/src/styles.cssexamples/06-custom-schema/11-source-with-preview/tsconfig.jsonexamples/06-custom-schema/11-source-with-preview/vite-env.d.tsexamples/06-custom-schema/11-source-with-preview/vite.config.tsplayground/src/examples.gen.tsx
💤 Files with no reviewable changes (1)
- docs/content/docs/features/export/markdown.mdx
| To highlight the Mermaid source in the popup, add the [syntax highlighting](/docs/features/blocks/code-blocks#syntax-highlighting) extension to your editor. The diagram block already declares its source language (`mermaid`), so no per-block configuration is needed: | ||
|
|
||
| ```tsx | ||
| import { syntaxHighlighter } from "@blocknote/code-block"; | ||
|
|
||
| const editor = useCreateBlockNote({ | ||
| schema, | ||
| extensions: [syntaxHighlighter], | ||
| }); | ||
| ``` |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
The Mermaid highlighting instruction may not produce a visible result.
packages/diagram-block/src/block/createReactDiagramBlockSpec.tsx (lines 24-60) carries an explicit note next to the mermaid highlight declaration: the highlighting "currently has no visible effect", because Shiki's Mermaid grammar is a Markdown injection with injectionSelector: "L:text.html.markdown" that only tokenizes inside a fenced Markdown block.
This section tells the reader to install and wire @blocknote/code-block to highlight the Mermaid source. If the effect is not visible today, the reader adds a dependency for no result.
Either drop this section from the diagram page, or state the current limitation next to the instruction. .claude/skills/docs-skill/SKILL.md in this PR requires verifying snippets against the actual package source, and requires caveats to be actionable.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/content/docs/features/blocks/diagrams.mdx` around lines 34 - 43, Update
the Mermaid syntax-highlighting guidance near the editor snippet to accurately
state that the current Mermaid grammar may produce no visible highlighting
because it only tokenizes Mermaid inside fenced Markdown blocks; make this
limitation actionable, or remove the instruction and snippet if highlighting is
not currently effective. Ensure the documentation matches the behavior in
createReactDiagramBlockSpec.
|
|
||
| Diagrams export to every format BlockNote supports. [Markdown](/docs/features/export/markdown) works out of the box — diagrams export as ` ```mermaid ` fenced code blocks, their common Markdown notation. | ||
|
|
||
| The [PDF](/docs/features/export/pdf), [DOCX](/docs/features/export/docx), [ODT](/docs/features/export/odt), and [email](/docs/features/export/email) exporters embed the diagram as an image via their mappings — they live as subpaths of this package, and each exports a `createDiagramBlockMapping` factory to spread into the exporter's default mappings. The [DOCX exporter](/docs/features/export/docx) shown here; the [PDF](/docs/features/export/pdf), [ODT](/docs/features/export/odt), and [email](/docs/features/export/email) exporters work the same way with their respective subpaths: |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the incomplete sentence.
"The DOCX exporter shown here" has no verb. The sentence introduces the code sample, so the break is visible at the point of highest reader attention.
✏️ Proposed wording
-The [PDF](/docs/features/export/pdf), [DOCX](/docs/features/export/docx), [ODT](/docs/features/export/odt), and [email](/docs/features/export/email) exporters embed the diagram as an image via their mappings — they live as subpaths of this package, and each exports a `createDiagramBlockMapping` factory to spread into the exporter's default mappings. The [DOCX exporter](/docs/features/export/docx) shown here; the [PDF](/docs/features/export/pdf), [ODT](/docs/features/export/odt), and [email](/docs/features/export/email) exporters work the same way with their respective subpaths:
+The [PDF](/docs/features/export/pdf), [DOCX](/docs/features/export/docx), [ODT](/docs/features/export/odt), and [email](/docs/features/export/email) exporters embed the diagram as an image via their mappings — they live as subpaths of this package, and each exports a `createDiagramBlockMapping` factory to spread into the exporter's default mappings. The DOCX exporter is shown here; the PDF, ODT, and email exporters work the same way with their respective subpaths:📝 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.
| The [PDF](/docs/features/export/pdf), [DOCX](/docs/features/export/docx), [ODT](/docs/features/export/odt), and [email](/docs/features/export/email) exporters embed the diagram as an image via their mappings — they live as subpaths of this package, and each exports a `createDiagramBlockMapping` factory to spread into the exporter's default mappings. The [DOCX exporter](/docs/features/export/docx) shown here; the [PDF](/docs/features/export/pdf), [ODT](/docs/features/export/odt), and [email](/docs/features/export/email) exporters work the same way with their respective subpaths: | |
| The [PDF](/docs/features/export/pdf), [DOCX](/docs/features/export/docx), [ODT](/docs/features/export/odt), and [email](/docs/features/export/email) exporters embed the diagram as an image via their mappings — they live as subpaths of this package, and each exports a `createDiagramBlockMapping` factory to spread into the exporter's default mappings. The DOCX exporter is shown here; the PDF, ODT, and email exporters work the same way with their respective subpaths: |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/content/docs/features/blocks/diagrams.mdx` at line 71, Fix the
incomplete sentence in the exporter introduction by adding a verb after “The
[DOCX exporter](/docs/features/export/docx)” so it clearly states that the DOCX
exporter is shown in the example, while preserving the existing comparison with
the PDF, ODT, and email exporters.
| @@ -0,0 +1,14 @@ | |||
| <html lang="en"> | |||
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Add the HTML doctype.
Line 1 starts the document without <!doctype html>. Browsers can enter quirks mode and render the example differently.
Proposed fix
+<!doctype html>
<html lang="en">📝 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.
| <html lang="en"> | |
| <!doctype html> | |
| <html lang="en"> |
🧰 Tools
🪛 HTMLHint (1.9.2)
[error] 1-1: Doctype must be declared before any non-comment content.
(doctype-first)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@examples/06-custom-schema/11-source-with-preview/index.html` at line 1, Add
the standard HTML5 doctype declaration before the opening html element in the
document, leaving the existing lang attribute and remaining markup unchanged.
Source: Linters/SAST tools
| // AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY | ||
| import React from "react"; | ||
| import { createRoot } from "react-dom/client"; | ||
| import App from "./src/App.jsx"; |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
vp run lintRepository: TypeCellOS/BlockNote
Length of output: 198
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- candidate files ---'
fd -a . examples/06-custom-schema/11-source-with-preview
printf '%s\n' '--- entry point ---'
cat -n examples/06-custom-schema/11-source-with-preview/main.tsx
printf '%s\n' '--- package and Vite configuration references ---'
rg -n --hidden --glob '!node_modules' --glob '!dist' \
'11-source-with-preview|resolve|extensions|vite|App\.jsx|App\.tsx' \
examples/06-custom-schema/11-source-with-preview package.json pnpm-workspace.yaml vite.config.* 2>/dev/null || trueRepository: TypeCellOS/BlockNote
Length of output: 4665
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- example package ---'
cat -n examples/06-custom-schema/11-source-with-preview/package.json
printf '%s\n' '--- example Vite config ---'
cat -n examples/06-custom-schema/11-source-with-preview/vite.config.ts
printf '%s\n' '--- example TypeScript config ---'
cat -n examples/06-custom-schema/11-source-with-preview/tsconfig.json
printf '%s\n' '--- exact specifier resolution probe ---'
python3 - <<'PY'
from pathlib import Path
root = Path("examples/06-custom-schema/11-source-with-preview")
specifier = root / "src" / "App.jsx"
fallbacks = [specifier.with_suffix(ext) for ext in (".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json")]
print("explicit path exists:", specifier.exists())
print("Vite-default fallback candidates:")
for path in fallbacks:
print(f" {path.relative_to(root)}: {path.exists()}")
PYRepository: TypeCellOS/BlockNote
Length of output: 3650
🌐 Web query:
Vite resolve.extensions default explicit file extension resolution documentation
💡 Result:
In Vite, the resolve.extensions configuration option defines the list of file extensions that Vite will automatically attempt to resolve when an import statement omits a file extension [1][2]. The default value for resolve.extensions is: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json'] [1][3] Key details regarding this behavior: - Automatic Resolution: When you import a file without specifying its extension (e.g., import './myFile'), Vite iterates through this list in order to find a matching file on the filesystem [1][4]. - Best Practices: While Vite supports this automatic resolution, it is officially recommended not to omit extensions for custom file types (such as.vue files) [1][2]. Omitting extensions for such types can interfere with IDE and type-checking support [1][2]. - Configuration: You can override this default list in your vite.config.js or vite.config.ts file under the resolve property: // vite.config.js export default { resolve: { extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json'] } } Note that this configuration affects how imports are resolved during development and bundling [5][4]. For production-ready code, explicit extensions are generally preferred to avoid ambiguity and improve build performance.
Citations:
- 1: https://github.com/vitejs/vite/blob/main/docs/config/shared-options.md
- 2: https://vite.dev/config/shared-options
- 3: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/constants.ts
- 4: https://github.com/vitejs/vite/blob/b089c2ba/packages/vite/src/node/plugins/resolve.ts
- 5: https://github.com/vitejs/vite/blob/v4.4.9/packages/vite/src/node/plugins/resolve.ts
Import the existing application module.
src/App.jsx does not exist. Vite only applies extension fallback when the import omits its extension. Use ./src/App so Vite resolves src/App.tsx.
Proposed fix
-import App from "./src/App.jsx";
+import App from "./src/App";📝 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.
| import App from "./src/App.jsx"; | |
| import App from "./src/App"; |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@examples/06-custom-schema/11-source-with-preview/main.tsx` at line 4, Update
the App import in the entry module to omit the .jsx extension, using the
existing ./src/App module specifier so Vite resolves the available App.tsx file.
| "scripts": { | ||
| "start": "vite", | ||
| "dev": "vite", | ||
| "build:prod": "tsc && vite build", | ||
| "preview": "vite preview" | ||
| }, |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Replace the direct TypeScript command.
Line 10 runs tsc directly. Use vp run lint for type checking, then run Vite for the production bundle.
Proposed fix
- "build:prod": "tsc && vite build",
+ "build:prod": "vp run lint && vite build",📝 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.
| "scripts": { | |
| "start": "vite", | |
| "dev": "vite", | |
| "build:prod": "tsc && vite build", | |
| "preview": "vite preview" | |
| }, | |
| "scripts": { | |
| "start": "vite", | |
| "dev": "vite", | |
| "build:prod": "vp run lint && vite build", | |
| "preview": "vite preview" | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@examples/06-custom-schema/11-source-with-preview/package.json` around lines 7
- 12, Update the build:prod script in package.json to replace the direct tsc
invocation with vp run lint, while preserving the subsequent Vite production
build command.
Source: Coding guidelines
| !fs.existsSync(path.resolve(__dirname, "../../packages/core/src")) | ||
| ? {} | ||
| : ({ | ||
| // Comment out the lines below to load a built version of blocknote | ||
| // or, keep as is to load live from sources with live reload working | ||
| "@blocknote/core": path.resolve( | ||
| __dirname, | ||
| "../../packages/core/src/", | ||
| ), | ||
| "@blocknote/react": path.resolve( | ||
| __dirname, | ||
| "../../packages/react/src/", | ||
| ), |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
example_dir="examples/06-custom-schema/11-source-with-preview"
test -d "$example_dir/../../../packages/core/src"
test -d "$example_dir/../../../packages/react/src"
vp run lintRepository: TypeCellOS/BlockNote
Length of output: 198
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
example = Path("examples/06-custom-schema/11-source-with-preview").resolve()
repo = Path.cwd().resolve()
print("repo:", repo)
print("example:", example)
for rel in ("../../packages/core/src", "../../packages/react/src",
"../../../packages/core/src", "../../../packages/react/src"):
target = (example / rel).resolve()
print(f"{rel} -> {target} exists={target.is_dir()}")
config = Path("examples/06-custom-schema/11-source-with-preview/vite.config.ts")
print("\nconfig references:")
for i, line in enumerate(config.read_text().splitlines(), 1):
if 16 <= i <= 28:
print(f"{i}: {line}")
tsconfig = Path("examples/06-custom-schema/11-source-with-preview/tsconfig.json")
print("\ntsconfig references:")
for i, line in enumerate(tsconfig.read_text().splitlines(), 1):
if "packages" in line:
print(f"{i}: {line}")
PY
if command -v vp >/dev/null 2>&1; then
vp run lint
else
echo "vp: unavailable; lint not run"
fiRepository: TypeCellOS/BlockNote
Length of output: 1323
Correct the local source alias paths.
The ../../packages paths resolve to examples/packages, so the aliases are disabled. Use ../../../packages for the existence check and both source aliases.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@examples/06-custom-schema/11-source-with-preview/vite.config.ts` around lines
16 - 28, Update the path resolution in the Vite alias configuration: change the
existence check and both “@blocknote/core” and “@blocknote/react” aliases from
“../../packages” to “../../../packages” so they point to the repository packages
directory and remain enabled.
Remove the redundant @blocknote/shared package dependency from packages and examples, standardizing on the @shared path alias (tsconfig paths + bundler alias) plus a TypeScript project reference to ../shared, matching the @blocknote/tests package. The shared directory is private, unbuilt, and never imported by its package name. The dev-scripts react template now always injects the @shared alias/paths (only active in local monorepo dev), regenerating every example's tsconfig.json and vite.config.ts. Updates shared/README.md to document the wiring.
Replace the @typescript/native-preview (tsgo) compiler with the native TypeScript 7 compiler shipped as the regular typescript package. Bump typescript to ^7.0.2 across all packages and swap tsgo for tsc in every build command and script. Upgrade vite-plus to ^0.2.9 (oxlint 1.77, oxfmt 0.62, @oxlint/plugins 1.73) and oxlint-tsgolint to ^7.0.2001. Scope shared/tsconfig.json's include/exclude per the oxlint type-aware performance guidance so the type-aware lint programs stay small, and fix a floating promise in scripts/release.mjs flagged by no-floating-promises.
# Conflicts: # docs/content/docs/features/blocks/code-blocks.mdx
Stacked on #2961 (
math-diagram-exporters). Restructures the code-block/math/diagram documentation and establishes the editorial conventions it follows (now in.claude/skills/docs-skill).The restructure
The old
code-blocks.mdxserved four different readers on one 400-line page — code blocks, syntax highlighting, math/diagrams (invisible in the sidebar!), and building your own preview blocks. It's now four focused pages:@blocknote/code-block, addsyntaxHighlighter, done); the extension architecture moved under "Custom Syntax Highlighting".renderDiagramserver-side setup now exists once on the diagram page instead of being duplicated on four export pages.custom-schema/source-with-preview: a CSV table block + a color chip inline content) rather than in page-length snippets — the example is type-checked and rendered, so the documented API can't silently rot. Writing it also caught that this page documented a deleted API (per-spec extension options vs. today'smeta.hasPreview).The export pages keep short stubs linking to the block pages; the email page keeps image delivery (that's email-client knowledge) with the math/diagram section moved below the generic sections.
Conventions established (in the new docs skill)
validate-links(routes and anchors), dev-server render checks, playwright screenshots.Also fixed
docs/validate-links.mjssilently validated zero files when run from anywhere butdocs/(cwd-relative globs + the glob library snapshottingprocess.cwd()at import time). It now works from any directory — and genuinely validates anchors, which it was already capable of.document-structure.mdxusesplainContentToStringinstead of hand-joining content items.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chores