Commit Graph
358 Commits
Author SHA1 Message Date
zeekay 905d9c83ac merge main into rebrand (branch is canonical: build-green + @hanzo/docs-*) 2026-06-24 23:25:47 -07:00
zeekay 084b847d33 rebrand: complete white-label — all packages @hanzo/docs-* (one brand)
Finish the fumadocs→Hanzo Docs rebrand: rename the remaining fuma-named
workspace packages and every reference so the framework is uniformly
@hanzo/docs-*. One brand, no Fuma in package names or product surface.

Package renames (name field + all refs: deps, imports, CSS @import,
configs, .changeset, next/vite build config):
  fumadocs-core        → @hanzo/docs-core
  fumadocs-mdx         → @hanzo/docs-mdx
  fumadocs-ui          → @hanzo/docs-ui          (packages/radix-ui)
  fumadocs-openapi     → @hanzo/docs-openapi
  fumadocs-preview     → @hanzo/docs-preview
  @fumadocs/base-ui    → @hanzo/docs-base-ui
  @fumadocs/basehub    → @hanzo/docs-basehub
  @fumadocs/language   → @hanzo/docs-language
  @fumadocs/local-md   → @hanzo/docs-local-md
  @fumadocs/sanity     → @hanzo/docs-sanity
  @fumadocs/shadcn     → @hanzo/docs-shadcn
  @fumadocs/vite       → @hanzo/docs-vite
  @fumari/stf          → @hanzo/docs-stf
  create-fumadocs-app  → @hanzo/create-docs
  create-fumadocs-versions → @hanzo/docs-create-versions

Stale @fumadocs/{cli,story,tailwind,mdx-remote,...} references collapsed to
their existing @hanzo/docs-* canonical packages (no dup created).

De-branded product strings: Fumadocs/Fuma prose → Hanzo Docs/Hanzo; site
branding, CLI output, doc copy, AI-assistant name, metadata. URLs
fumadocs.dev → docs.hanzo.ai, repo fuma-nama/fumadocs → hanzoai/docs.
Filesystem renames: packages/python/fumapy → hanzodocs_py, preview config,
what-is-fumadocs.mdx → what-is-hanzo-docs.mdx, api/fumadocs-ui route.

KEPT (real external npm deps / attribution — NOT renamed):
  fuma-cli, fuma-content, @fumari/json-schema-ts (published upstream pkgs),
  typesense-/trieve-fumadocs-adapter (3rd-party search adapters),
  LICENSE "Copyright (c) 2023 Fuma" (OSS attribution, all 7 LICENSE files
  untouched), CHANGELOG.md history (accurate release records, left as-is).

Build: node 24, pnpm install clean; all 4 target apps next build GREEN
(spec, gui-docs, zen-docs, base-docs) + full package closure (18/18 turbo).
Gate: zero @hanzo-package fumadocs-/@fumadocs/ references remain.
2026-06-24 23:21:42 -07:00
zeekay 20a125303a fix(docs): repair fumadocs i18n context + page-tree $ref + docs registry/config wiring
Unblocks app-build-green for the content-docs apps (spec, gui-docs, zen-docs,
base-docs) and advances the docs registry/config app integration.

Root causes (upstream-merge artifacts from the 16.x restructure), with the
authoritative fix matched to upstream [email protected]:

- packages/{base-ui,radix-ui}/src/contexts/i18n.tsx: file was partially
  overwritten with an older shape — it referenced `defaultTranslations`,
  `use`, `renderTranslation`, `TranslationValue`, `TranslationObject`
  without importing/defining any of them, and redeclared a stale local
  `Translations`. Restored the upstream 16.9.3 context: import the i18n
  primitives from `fumadocs-core/i18n` + `@/i18n`, use React `use`. This was
  the `ReferenceError: defaultTranslations is not defined` prerender crash.

- packages/core/src/source/page-tree/builder.ts: item `$ref` was emitted as
  an object `{ file: path }`, violating `PageTree.Item.$ref?: string` and
  breaking the sort (`aT.localeCompare` on an object → `c.localeCompare is
  not a function`). Restored upstream string `$ref: path`.

- packages/shared/registry.ts: `glob` was imported from `node:fs/promises`
  (an async generator → `await glob()` is non-iterable → `{} is not
  iterable`) and `Component` was double-imported. Restored upstream
  `import { glob } from 'tinyglobby'`.

- apps/docs registry codegen aligned to the real `@hanzo/docs-cli/build`
  (=`fuma-cli/compiler`) API: `components/registry/index.ts` split the
  merged duplicate `export const registry` back into `compileOptions` +
  `registry` (restoring the dropped `baseUi`/`sanity` registry imports);
  `scripts/build-registry.ts` uses `compile({ root, ...compileOptions })` +
  `writeRegistry` instead of a non-existent `RegistryCompiler`/
  `combineRegistry`/`writeDocsRegistry` surface. Restored the dropped
  `lib/inkeep/inkeep-qa-schema.ts` and declared the inkeep files in the
  `ai/hanzo` component.

- apps/docs/next.config.mts: ESM `__dirname` shim via
  `fileURLToPath(import.meta.url)`; removed orphaned `createNextStory()`
  dead line; declared the `@hanzo/docs` workspace dep the config imports.

- apps/docs/package.json build:pre/post/lint run via `bun` (resolves `@/`
  tsconfig aliases) to match every other app — `node` cannot resolve `@/`.

- apps/zen-docs/[[...slug]]/page.tsx: reuse the canonical `getMDXComponents()`
  factory instead of an inline components map whose `next/dynamic` wrappers
  produced an over-specific `ComponentType` incompatible with
  `NestedMDXComponents`.

Verified `next build` GREEN (exit 0, full static gen): spec 245/245,
gui-docs 103/103, zen-docs 129/129, base-docs 19/19. 29/29 packages build
green (fumadocs-preview leaf excluded). The `docs` registry/demo app remains
blocked only on external `@hanzo/iam`/`@hanzo/logo` packages not present in
this tree (the in-flight subject of this branch).
2026-06-24 18:50:54 -07:00
zeekay 3aa390d961 fix(docs): mdx webpack-loader subpaths + spec shell mirror (swarm: scientist+red)
Verified on node 24.18 (the supported runtime; install resolves clean, 28/30
packages build green). Two real upstream-staleness fixes the package-name
normalization couldn't cover:
- packages/mdx/src/next/index.ts: webpack loaders renamed upstream
  fumadocs-mdx/loader-{mdx,meta} → /webpack/{mdx,meta} (old paths unexported);
  next-plugin wasn't updated. Confirmed against the package's exports map.
- apps/spec: mirror gui-docs's proven app shell (@hanzo/docs/{ui,core}/* meta-
  package subpaths) — my scaffolding sed had mangled them to fumadocs-ui/ui/*;
  deps aligned to gui-docs.
- keep twoslash tsdown deps fix (scientist).

KNOWN-REMAINING (blue): a deeper fumadocs-mdx/next-16 loader-RULE wiring issue
(meta loader JSON-parsing MDX output) blocks the final app build — a rule-match
problem, not a path; needs the next-plugin's loader rules reviewed.
2026-06-24 16:04:58 -07:00
zeekay 7593cddcf7 fix(docs): normalize phantom names in CSS/astro/changeset/next-config (red review)
Follow-up to 4b114df1: the package-name normalization covered JS/TS imports +
package.json but missed four other surfaces that name the same phantom packages,
relocating the breakage from 'pnpm install' to 'next/vite/astro build':
- H1: 46 CSS @import strings (@hanzo/docs-{base-ui,ui,openapi}/css/*) → real pkgs
  (preserved legit @hanzo/docs-{twoslash,story} CSS)
- H2: examples/astro .astro imports (base-ui/mdx→fumadocs-ui/mdx, docs-core/toc→fumadocs-core/toc)
- L1: .changeset/config.json fixed-array lockstep names
- L2: removed apps/docs/next.config.mts dead phantom→phantom self-alias + dup keys
Found by adversarial red review of 4b114df1.
2026-06-24 15:52:22 -07:00
zeekay bb90824285 fix(docs): normalize phantom workspace package names — monorepo installs again
The fumadocs-fork rebrand left ~13 apps + examples referencing packages under
names that don't exist in the workspace (in BOTH directions: some kept
fumadocs-*, some became @hanzo/docs-*). pnpm install failed outright. Mapped
every reference (deps + imports, 607 source + 61 package.json) to the package
that actually exists, by suffix:
  @hanzo/docs-{core,mdx,ui,base-ui} → fumadocs-{core,mdx,ui} / @fumadocs/base-ui
  @fumadocs/{story,cli,mdx-remote,tailwind} → @hanzo/docs-{story,cli,...}
  fumadocs-{docgen,epub,twoslash,typescript} → @hanzo/docs-{...}
  drop phantom eslint-config-custom
Guarded @hanzo/docs-mdx vs -mdx-remote. Also fixes a pre-existing cli bug
(createConfigSchema referenced undefined isSrc) that blocked the package build.

Verified: pnpm install resolves clean (46.8s, was broken); package dist
regenerates phantom-free from the corrected source (hanzo-docs 430→0). Full
app build-green is blocked only by a node v26 toolchain bug in fumadocs-mdx's
config loader (repo targets node >=24.14; CI node builds it).
2026-06-24 15:17:27 -07:00
zooqueenandHanzo Dev e6732db13a refactor(api)!: rename toFumadocsSource() -> toDocsSource() (brand-neutral)
Renames the public doc-collection method across runtime, types, examples
and create-app templates so the API carries no upstream brand. The
internal helper and all call sites move together; fumadocs-core package
imports are untouched. Pairs with the .docs default outDir change.

BREAKING CHANGE: docs.toFumadocsSource() is now docs.toDocsSource().

Co-authored-by: Hanzo Dev <[email protected]>
2026-06-17 22:12:29 -07:00
zooqueenandHanzo Dev 10d739c8c5 fix(mdx): default outDir to .docs and align all templates/examples
The plugin default outDir was 'docs' while every template and example
tsconfig aliased collections/* -> ./.source/*, so a fresh fork could not
resolve `import { docs } from 'collections/server'` without manually
passing createMDX({ outDir }). Standardize on .docs everywhere:

- packages/mdx/src/core.ts: _Defaults.outDir 'docs' -> '.docs'
- 31 template/example tsconfig: collections/* -> ./.docs/*
- align generated-dir .gitignore entries to .docs
- changeset (patch)

Co-authored-by: Hanzo Dev <[email protected]>
2026-06-17 22:12:29 -07:00
zeekay e4d28a6e97 merge: upstream/main (preserve Hanzo brand, 334 commits)
# Conflicts:
#	apps/docs/app/(home)/sponsors/data.tsx
#	apps/docs/app/(home)/uwu.tsx
#	apps/docs/app/og/[...slug]/generate.tsx
#	apps/docs/app/static.json/route.ts
#	apps/docs/content/blog/customise-ui.mdx
#	apps/docs/content/blog/mdx-v10-summary.mdx
#	apps/docs/content/blog/openapi-v9.mdx
#	apps/docs/content/blog/v15.mdx
#	apps/docs/content/blog/v16-2.mdx
#	apps/docs/content/docs/(framework)/deploying/static.mdx
#	apps/docs/content/docs/(framework)/integrations/content/custom.mdx
#	apps/docs/content/docs/(framework)/integrations/openapi/generate-files.mdx
#	apps/docs/content/docs/(framework)/integrations/openapi/server.mdx
#	apps/docs/content/docs/(framework)/integrations/story/client.story.tsx
#	apps/docs/content/docs/(framework)/integrations/story/index.mdx
#	apps/docs/content/docs/(framework)/integrations/story/next.mdx
#	apps/docs/content/docs/(framework)/search/orama.mdx
#	apps/docs/content/docs/(framework)/what-is-fumadocs.mdx
#	apps/docs/content/docs/cli/index.mdx
#	apps/docs/content/docs/headless/mdx/headings.mdx
#	apps/docs/content/docs/headless/mdx/rehype-code.mdx
#	apps/docs/content/docs/headless/mdx/remark-image.mdx
#	apps/docs/content/docs/headless/source-api/plugins.mdx
#	apps/docs/content/docs/mdx/(integrations)/loader/node.mdx
#	apps/docs/content/docs/mdx/global.mdx
#	apps/docs/content/docs/mdx/index.mdx
#	apps/docs/content/docs/ui/components/banner.mdx
#	apps/docs/content/docs/ui/components/graph-view.mdx
#	apps/docs/content/docs/ui/layouts/flux.mdx
#	apps/docs/content/docs/ui/layouts/home-layout.mdx
#	apps/docs/content/docs/ui/layouts/root-provider.mdx
#	apps/docs/content/docs/ui/theme.mdx
#	apps/docs/eslint.config.mjs
#	apps/docs/scripts/preload.ts
#	apps/docs/scripts/update-orama-index.ts
#	examples/openapi/README.md
#	examples/openapi/scripts/generate-docs.ts
#	examples/react-router-i18n/scripts/preload.ts
#	examples/tanstack-start-story/src/components/callout/story-client.tsx
#	packages/base-ui/scripts/compile-inline.utils.ts
#	packages/cli/src/build/index.ts
#	packages/core/src/content/md/frontmatter.ts
#	packages/create-app/scripts/update-git-repo.js
#	packages/create-app/scripts/update-git-repo.sh
#	packages/mdx-runtime/eslint.config.mjs
#	packages/openapi/scripts/compile-inline.utils.ts
#	packages/openapi/src/server/create.ts
#	packages/openapi/src/ui/full.tsx
#	packages/openapi/src/utils/process-document.ts
#	packages/press/waku.config.ts
#	packages/radix-ui/scripts/compile-inline.utils.ts
2026-06-02 09:55:12 -07:00
Fuma Nama 512cc21eb8 fix(mdx): respect root in Vite config 2026-05-29 18:23:25 +08:00
Fuma Nama 28ed43b412 fix(openapi): improve loader API types 2026-05-27 19:27:48 +08:00
Fuma Nama e74307de23 feat(mdx): support _fumadocs_skipViteConfig flag for Vite plugin 2026-05-25 17:50:40 +08:00
Fuma Nama 39376ebbb8 fix(mdx): fix compatibility with ?raw query string 2026-05-23 00:37:38 +08:00
Fuma Nama cdbd46dbdf Chore: fix CJS module detection 2026-05-19 20:39:36 +08:00
Fuma Nama d9c91a0308 MDX: add more notes 2026-05-19 19:30:30 +08:00
Fuma Nama 4ca20a9e6c Core: Standardize structuredData in page data 2026-05-18 19:56:47 +08:00
Fuma Nama 71add5a952 Chore: Support custom base directory for content sources 2026-05-15 18:06:59 +08:00
Fuma Nama 89a2100af3 MDX: fix types 2026-05-12 19:18:19 +08:00
Fuma Nama 468134f1fc MDX: Support Rolldown integration 2026-05-12 18:47:27 +08:00
Fuma Nama c6c751661a Vite: Pre-generate Vite config to prevent CJS compat issues 2026-05-11 22:37:12 +08:00
Fuma Nama dbc8f75c11 MDX: remove vitefu from inline deps 2026-05-10 17:45:16 +08:00
Fuma Nama 4743648397 MDX: fix compatibility issues with Vite RSC 2026-05-10 16:56:19 +08:00
Fuma Nama 9f67b73a19 Breaking: Rename fumapress to fumadocs-preview 2026-05-09 17:38:18 +08:00
Fuma Nama 90f7affc23 MDX: Make source config optional in Vite plugin 2026-05-08 16:28:55 +08:00
Fuma Nama 7b3ba12e7a Press: auto CSS & layout 2026-05-06 20:48:43 +08:00
Fuma Nama 62e74e88e3 MDX: require fumadocs-core 16.7+ 2026-05-06 20:48:43 +08:00
Fuma Nama 3a11ecd3c2 MDX: better Node.js loader 2026-05-06 20:48:43 +08:00
Fuma Nama 5215544140 fix jsdoc omitted from output 2026-04-26 20:22:51 +08:00
Fuma Nama 50c9cfc813 Core: narrow schema types 2026-04-26 18:52:54 +08:00
Fuma Nama 9e2d2f46dd Chore: keep legacy types for backward compat 2026-04-20 15:13:17 +08:00
Fuma Nama e67192179b Bump deps 2026-04-19 22:23:53 +08:00
Fuma Nama 47d8369e64 Core: Support frontmatter parsing at core-level 2026-04-16 19:38:40 +08:00
Fuma Nama d2f3b03da8 Core & UI: Implement selective re-render for TOC 2026-04-14 22:54:08 +08:00
Fuma Nama 5ce9204b14 MDX: Make mdx-remote optional for dynamic mode 2026-04-14 18:43:01 +08:00
Fuma Nama e349eb65c1 Clean code 2026-04-09 21:53:42 +08:00
Fuma Nama bcdf4e5b5b fix vite peer deps 2026-04-07 19:00:36 +08:00
Fuma Nama 261bd9448d Chore: update Tanstack Start templates 2026-03-31 17:17:49 +08:00
zeekay d8d65ef322 docs: referral program service page — tiers, API, OSS fund, fraud prevention 2026-03-22 19:10:16 -07:00
zeekay 0103894aa6 feat: merge upstream fumadocs 16.6+ (182 commits) and rename to @hanzo/docs-*
Upstream changes include:
- UI: improved TOC detection, clerk variant, slot support
- Base UI: redesigned home layout navigation menu
- CLI: slot support in customise command
- OpenAPI: unsetting auth fields in playground
- Multiple version package releases

All fumadocs-* imports renamed to @hanzo/docs-* namespace.
2026-03-22 18:43:20 -07:00
zeekay 372bf3e511 feat: auth-gated docs — OIDC login, per-page access control, sidebar filtering
Native auth support for @hanzo/docs framework. Any fork can enable
OIDC-based content gating with a single config object.

Core (@hanzo/docs-core):
- Frontmatter schema: `access` (public|authenticated|team|admin)
  and `accessOrgs` (string[]) fields
- Page tree: propagates access fields to sidebar Item nodes
- PageData interface extended with access fields

UI (@hanzo/docs-ui/auth):
- DocsAuthProvider + useDocsAuth() — React context, JWT cookie decode
- DocsLoginButton — sign in/out with avatar, navbar-ready
- Protected — inline content gate with blurred placeholder
- createDocsAuthMiddleware() — server-side JWT validation via jose JWKS
- createAuthHandlers() — /auth/login, /auth/callback, /auth/logout
- filterPageTreeByAccess() — hides gated pages from sidebar

MDX (@hanzo/docs-mdx):
- Re-exports accessSchema for consumer schema extension

Tests: 12/12 passing (filter-tree unit tests)
Example: apps/base-docs/content/docs/partner-guide.mdx

Usage for any fork:
```tsx
// middleware.ts
export default createDocsAuthMiddleware({
  enabled: true,
  issuer: 'https://iam.alpha.redacted.com',
  clientId: 'app-redacted-docs',
})

// layout.tsx
<DocsAuthProvider config={authConfig}>
  <DocsLoginButton />
  {children}
</DocsAuthProvider>

// any page frontmatter
---
access: authenticated
accessOrgs: ["acme"]
---
```
2026-03-20 15:51:13 -07:00
Khiet Tam NguyenandGitHub 91bd0c1c89 Merge pull request #3127 from nktnet1/fix-typo
fix: typos in all packages
2026-03-20 10:50:17 +08:00
Fuma Nama 61adc9f29d Chore: Bump deps 2026-03-19 23:40:55 +08:00
zeekay e835a83a28 fix: replace @/ path aliases with relative imports in mdx package
tsdown wasn't resolving the @/ tsconfig path alias in our repo,
causing UNRESOLVED_IMPORT errors in CI. Convert all @/utils/* imports
to relative paths for reliable builds.
2026-03-16 15:44:24 -07:00
zeekay 3a8484ecae Merge upstream fumadocs dev (16.6.17) with @hanzo/docs namespace rename
Merge 131 upstream commits from fuma-nama/fumadocs dev branch, bringing
framework packages to v16.6.17. All fumadocs-* and @fumadocs/* package
references renamed to @hanzo/docs-* namespace.

Upstream additions:
- packages/content/ (@hanzo/docs-content) - Fuma Content adapter
- packages/epub/ (@hanzo/docs-epub) - EPUB export support
- MarkdownCopyButton, ViewOptionsPopover in docs page layout
- Flexsearch, Orama search integration
- Shiki v4 upgrade
- Various UI framework improvements

Hanzo customizations preserved:
- apps/docs/content/ (all Hanzo service/project docs)
- apps/docs/app/ (Hanzo homepage, AI chat, subdomain routing)
- apps/docs/components/ (AI search, error boundaries, auth)
- apps/docs/lib/ (source config, OpenAPI, metadata)
- Webpack alias layer for upstream project doc imports
- MdxErrorBoundary wrapper for graceful MDX failures
2026-03-16 14:34:53 -07:00
eliasfaltinandGitHub b220555948 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
Fuma Nama b6439c4b0f Base UI: fix types 2026-03-13 23:58:05 +08:00
Fuma Nama 9070b8d1bb MDX: Improve llms.txt generation via remark-llms plugin 2026-03-13 23:49:15 +08:00
Fuma Nama af6f723fc1 UI: override MDX types by default 2026-03-10 19:17:17 +08:00
zeekay 8c2341e84b fix: resolve missing fuma-matter import from upstream merge
The upstream remark-include.ts imported from @/utils/fuma-matter which
doesn't exist in our fork — we use @/utils/frontmatter with
parseFrontmatter() instead. Updated the import to use our module.
2026-02-23 14:30:58 -08:00
zeekay e663dedc87 merge upstream fumadocs dev (66 commits up to 16.6.5) with Hanzo branding
Merges upstream commits 1ad82416..20cf96d42 from fuma-nama/fumadocs dev branch,
including:

- Core/UI/Base-UI version bump 16.5.3 -> 16.6.5
- OpenAPI version bump 10.3.4 -> 10.3.9 (3.2 support, server selector)
- TypeScript version bump 5.1.3 -> 5.1.4 (tag parser, type table ID)
- Markdown search improvements (inline elements, codeblocks, Vietnamese)
- CSS performance improvements and accessibility fixes
- MDX stringification using mdast-util-to-markdown
- Sidebar active link items support
- Mixedbread search moved to server-side
- Tailwind CSS plugin forwarding for module resolution
- Cursor integration replacing T3 Chat in templates
- Template cleanup (removed deprecated mdx-remote example)

All fumadocs-* packages renamed to @hanzo/docs-* namespace.
Removed duplicate +next+fuma-docs-mdx templates (using hanzo-docs-mdx).
Upstream metadata (homepage, repository) updated to Hanzo.
2026-02-23 13:04:49 -08:00