343 Commits
Author SHA1 Message Date
Fuma Nama 81ec318661 fix(satteri): temporarily workaround missing markdown to js 2026-07-21 23:44:34 +08:00
Fuma Nama 3b07bec29a refactor(local-md): extract shared logic to local-content 2026-07-21 03:26:50 +08:00
Fuma Nama efc9d18402 chore(mdx): bake passthroughs into runtime module 2026-07-16 02:26:42 +08:00
Fuma Nama 368a92e3a2 feat(mdx): macro collection-level last modified time 2026-07-16 01:57:51 +08:00
Fuma Nama 13dfdbc224 feat(mdx): no longer require include for macros 2026-07-16 00:19:20 +08:00
Fuma Nama 126a74d995 fix(ui): fix accessibility of sidebar components 2026-07-15 23:21:37 +08:00
Fuma Nama 430254caab fix(mdx): fix file check 2026-07-15 23:16:29 +08:00
Fuma Nama 1862822aa5 feat(mdx): redesign macro infrastructure 2026-07-15 23:05:15 +08:00
Fuma Nama 98a899ae4b feat(mdx): support macro API 2026-07-15 01:36:49 +08:00
Fuma Nama 8a280f5d3b refactor(*): migrate to yaml 2026-07-13 17:10:02 +08:00
Fuma Nama 0f389cf3de feat(satteri): decouple imports/exports from compile() 2026-07-07 17:21:40 +08:00
Fuma Nama 3d80b8b242 fix(mdx): ensure satteri integration is optional 2026-07-06 21:25:13 +08:00
Fuma Nama 0ec19af868 feat(satteri): more tests & move remark-include 2026-07-06 16:30:40 +08:00
Fuma Nama d0221f6fbd fix types 2026-07-06 01:27:06 +08:00
Fuma Nama ae33a96e64 remove duplicate export 2026-07-03 19:35:12 +08:00
aded98924a Integrate Satteri (#3402)
* feat(satteri): add @fumadocs/satteri package and compiler discriminator

Introduce @fumadocs/satteri with Sätteri-native ports of Fumadocs MDX
plugins (remark-heading, structure, image, code-tab, npm, rehype-toc,
rehype-code, and others), plus applySatteriPreset and compileMdx.

In fumadocs-mdx, add compiler: 'satteri' on doc collections with
satteriOptions typing, getSatteriOptions(), and a buildSatteriMDX path
that uses mdxToJs instead of @mdx-js/mdx.

Co-authored-by: Fuma Nama <[email protected]>

* Port native rehype-code and isolate Satteri as optional peer

- Rewrite @fumadocs/satteri rehype-code as a Satteri hast plugin using
  fumadocs-core Shiki (no unified/vfile deps in the package)
- Unwrap Shiki root fragments before ctx.replaceNode
- Move getSatteriOptions to fumadocs-mdx/config/build-satteri and expose
  fumadocs-mdx/satteri and fumadocs-mdx/config/satteri entry points
- Make @fumadocs/satteri and satteri optional peerDependencies
- Dynamic-import the satteri build path only when compiler is satteri
- Add rehype-code and fumadocs-mdx satteri pipeline tests

Co-authored-by: Fuma Nama <[email protected]>

* Port official docs app to Satteri compiler

- Switch apps/docs docs and blog collections to compiler: satteri
- Replace mdxOptions/applyMdxPreset with applySatteriPreset and Satteri plugins
- Add @fumadocs/satteri plugins: rehypeKatex, remarkElementIds, remarkLlms
- Port remarkAutoTypeTableSatteri and remarkTypeScriptToJavaScriptSatteri
- Enhance remark-structure stringify and satteri postprocess pipeline
- Drop remark-math/rehype-katex/unified from docs deps (math via features.math)

Co-authored-by: Fuma Nama <[email protected]>

* Remove custom rehypeKatex; use Satteri features.math

Satteri natively parses inline ($...$) and display ($$...$$) math via
features.math. Drop the redundant KaTeX hast plugin, katex peer dependency,
and hast-util-from-html-isomorphic from @fumadocs/satteri.

Co-authored-by: Fuma Nama <[email protected]>

* Use structuredClone for Satteri node snapshots; fix build blockers

- Replace custom materialize() with structuredClone in remark-llms and
  remark-structure (snapshot nodes during visitor, stringify after pass)
- Add GFM/math stringifiers for structured data and LLM markdown export
- Fix remark-include cwd attribute, section extraction, and node replacement
- Fix remarkAutoTypeTableSatteri cwd resolution via collection _cwd
- Restore remark deps for apps/docs markdown.tsx

Co-authored-by: Fuma Nama <[email protected]>

* docs: add AGENTS.md with Cursor Cloud setup instructions

Co-authored-by: god63820869 <[email protected]>

* Fix Satteri plugin patterns per upstream API docs

Plugins were fighting Satteri's Rust-backed AST model:

- Export once at compile end via ctx.data, not queueDataExport per visit
  (rehype-toc, remark-llms, valueExportPlugin) — avoids 1600+ duplicate exports
- Use ctx.replaceNode / insertChildAt instead of splicing parent.children
  (remark-npm, remark-code-tab, remark-auto-type-table)
- Return { raw: string } for includes instead of inserting external mdast
- Skip Shiki on math code blocks; flatten toc titles for appendExports
- Sync remark-llms _markdown writes; guard get-llm-text processed fallback

Adds satteri-toc-count test. Docs build passes.

Co-authored-by: Fuma Nama <[email protected]>

* Use Satteri exported types instead of duplicating context shapes

Centralize ctx.data keys in @fumadocs/satteri/data-map via DataMap
augmentation. Plugins use MdastVisitorContext, HastVisitorContext, and
Data from satteri rather than inline { data: Record<...> } or
Parameters<typeof queueDataExport> hacks.

Re-export visitor context types from @fumadocs/satteri. MDX loader adds
_compiler to satteri DataMap separately.

Co-authored-by: Fuma Nama <[email protected]>

* Move remarkElementIds to docs; optimize Satteri plugin hot paths

- remarkElementIds is docs-only (apps/docs/lib) for lint link validation,
  removed from @fumadocs/satteri exports
- remark-llms: stringify once after all root children collected (was O(n²))
- remark-structure: attach structuredData once instead of every visit
- rehype-toc: store textContent title strings, not hast element refs
- preset: drop valueExportPlugin; compile.ts already handles _valueToExport

Co-authored-by: Fuma Nama <[email protected]>

* reduce deps

* Further Satteri plugin perf: defer clones, use textContent

- remark-llms: collect root indices during visit, structuredClone batch at end
- remark-structure: ctx.textContent instead of flattenNode when no custom stringify;
  single shared visitor per type; attach structuredData on first visit only
- remark-heading/postprocess: ctx.textContent for slug/title (no double tree walk)
- rehype-toc: assign export object once, mutate items array in place
- rehype-code: skip elements already highlighted by shiki
- Add remark-llms tests; vitest @ path alias

Co-authored-by: Fuma Nama <[email protected]>

* Move remark-ts2js Satteri plugin to @fumadocs/satteri

- Add remarkTs2js to @fumadocs/satteri (oxc-transform dep)
- doc-gen keeps unified remarkTypeScriptToJavaScript only; drop satteri peer
- Docs source.config imports remarkTs2js from @fumadocs/satteri
- Document Satteri usage tab in remark-ts2js docs page

Co-authored-by: Fuma Nama <[email protected]>

* Move remarkAutoTypeTable Satteri plugin to @fumadocs/satteri

Extract shared generation into fumadocs-typescript/auto-type-table-generate.
fumadocs-typescript keeps unified remarkAutoTypeTable only; no satteri dep.

Satteri remarkAutoTypeTable uses createAutoTypeTableGenerator from
fumadocs-typescript. Docs imports plugin from @fumadocs/satteri.

Co-authored-by: Fuma Nama <[email protected]>

* refactor(satteri): remove barrel export, use subpath imports

Drop src/index.ts and the package root export. Each plugin, preset,
compile, utils, and data-map module is now a separate subpath export.
Consumers import from paths like @fumadocs/satteri/preset and
@fumadocs/satteri/remark-ts2js. Satteri core APIs are imported
from the satteri package directly.

Co-authored-by: Fuma Nama <[email protected]>

* fix(satteri): keep auto-type-table logic local, use markdownToHast

Revert all fumadocs-typescript changes. Move auto-type-table generation
into @fumadocs/satteri with duplicated parse-tags helper. Render JSDoc
markdown via Satteri's markdownToHast (no remark/unified deps); sanitize
raw hast nodes for hast-util-to-estree compatibility.

Co-authored-by: Fuma Nama <[email protected]>

* refactor(satteri): consolidate remark-auto-type-table into one file

Merge auto-type-table-generate, markdown-renderer, and parse-tags into
remark-auto-type-table.ts. Drop factory/helpers; inline prop parsing and
table generation in the Satteri plugin visitor.

Co-authored-by: Fuma Nama <[email protected]>

* improve performance

* Merge branch 'pr-3398' into cursor/satteri-package-b279

---------

Co-authored-by: Fuma Nama <[email protected]>
2026-07-03 19:33:29 +08:00
Fuma Nama baacf1a67d perf(mdx): require collection query param at regex matching 2026-06-27 23:03:58 +08:00
Fuma Nama 7974b8655b Version Packages 2026-06-11 01:35:10 +08:00
Fuma Nama 2d65ceb343 feat(mdx): support hot reload in source.config.ts with Vite plugin 2026-06-04 22:56:34 +08:00
Fuma Nama d35d0d6a43 fix(mdx): respect root in Vite config 2026-05-29 18:23:25 +08:00
Fuma Nama 5d579bdfac fix(openapi): improve loader API types 2026-05-27 19:27:48 +08:00
Fuma Nama cd044251d7 feat(mdx): support _fumadocs_skipViteConfig flag for Vite plugin 2026-05-25 17:50:40 +08:00
Fuma Nama dca5b49929 fix(mdx): fix compatibility with ?raw query string 2026-05-23 00:37:38 +08:00
Fuma Nama ff64e2a1f6 Chore: fix CJS module detection 2026-05-19 20:39:36 +08:00
Fuma Nama 65c174ec9c MDX: add more notes 2026-05-19 19:30:30 +08:00
Fuma Nama 768b676214 Core: Standardize structuredData in page data 2026-05-18 19:56:47 +08:00
Fuma Nama 1fb6a6168c Chore: Support custom base directory for content sources 2026-05-15 18:06:59 +08:00
Fuma Nama 30b7db18b2 MDX: fix types 2026-05-12 19:18:19 +08:00
Fuma Nama 819b6ec2d2 MDX: Support Rolldown integration 2026-05-12 18:47:27 +08:00
Fuma Nama 2569154380 Vite: Pre-generate Vite config to prevent CJS compat issues 2026-05-11 22:37:12 +08:00
Fuma Nama 4ac7490104 MDX: remove vitefu from inline deps 2026-05-10 17:45:16 +08:00
Fuma Nama 298ac97867 MDX: fix compatibility issues with Vite RSC 2026-05-10 16:56:19 +08:00
Fuma Nama aadf3de6fe Breaking: Rename fumapress to fumadocs-preview 2026-05-09 17:38:18 +08:00
Fuma Nama 3696a7efc8 MDX: Make source config optional in Vite plugin 2026-05-08 16:28:55 +08:00
Fuma Nama 1f1e49a0a8 Press: auto CSS & layout 2026-05-06 20:48:43 +08:00
Fuma Nama 3de9dfee24 MDX: require fumadocs-core 16.7+ 2026-05-06 20:48:43 +08:00
Fuma Nama 5745fcfe73 MDX: better Node.js loader 2026-05-06 20:48:43 +08:00
Fuma Nama fa781f1949 fix jsdoc omitted from output 2026-04-26 20:22:51 +08:00
Fuma Nama 79d320986f Core: narrow schema types 2026-04-26 18:52:54 +08:00
Fuma Nama d10688d4fc Chore: keep legacy types for backward compat 2026-04-20 15:13:17 +08:00
Fuma Nama c0f4d1a207 Bump deps 2026-04-19 22:23:53 +08:00
Fuma Nama a744f9fae7 Core: Support frontmatter parsing at core-level 2026-04-16 19:38:40 +08:00
Fuma Nama c731a92bba Core & UI: Implement selective re-render for TOC 2026-04-14 22:54:08 +08:00
Fuma Nama eb62304a14 MDX: Make mdx-remote optional for dynamic mode 2026-04-14 18:43:01 +08:00
Fuma Nama d2b211d323 Clean code 2026-04-09 21:53:42 +08:00
Fuma Nama ff7ff36e7c fix vite peer deps 2026-04-07 19:00:36 +08:00
Fuma Nama e3855eb1cf Chore: update Tanstack Start templates 2026-03-31 17:17:49 +08:00
Khiet Tam NguyenandGitHub 8d37f96f78 Merge pull request #3127 from nktnet1/fix-typo
fix: typos in all packages
2026-03-20 10:50:17 +08:00
Fuma Nama faf02fffb3 Chore: Bump deps 2026-03-19 23:40:55 +08:00
eliasfaltinandGitHub 31441492e7 fix(mdx): correct dynamic index generation for lazy entries (#3116)
* fix: correct mdx dynamic index generation

* fix: avoid unused dynamic path import
2026-03-16 21:21:34 +08:00