diff --git a/.changeset/unified-mdx-components.md b/.changeset/unified-mdx-components.md deleted file mode 100644 index 5a7895c1a..000000000 --- a/.changeset/unified-mdx-components.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -mdxui: minor ---- - -Create unified abstraction layer for MDX UI components that automatically injects the appropriate implementation based on the environment (browser or terminal). diff --git a/.changeset/workflow-step-interface.md b/.changeset/workflow-step-interface.md index a654e0db2..de14bc60d 100644 --- a/.changeset/workflow-step-interface.md +++ b/.changeset/workflow-step-interface.md @@ -1,5 +1,4 @@ --- -'mdxui': patch '@mdxui/ink': patch --- diff --git a/packages/@mdxui/basic-browser/package.json b/packages/@mdxui/basic-browser/package.json index c8c7b45d1..dcb63517f 100644 --- a/packages/@mdxui/basic-browser/package.json +++ b/packages/@mdxui/basic-browser/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/basic-browser", + "private": true, "version": "0.1.0", "description": "Complete MDX browser with editing, preview, and file management capabilities", "type": "module", diff --git a/packages/@mdxui/browser/package.json b/packages/@mdxui/browser/package.json index 38c809888..646b00a3a 100644 --- a/packages/@mdxui/browser/package.json +++ b/packages/@mdxui/browser/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/browser", + "private": true, "version": "0.1.0", "description": "Browser component for viewing, editing, and previewing MDX content", "type": "module", diff --git a/packages/@mdxui/chrome/package.json b/packages/@mdxui/chrome/package.json index 1b2032cfa..9dfaffbef 100644 --- a/packages/@mdxui/chrome/package.json +++ b/packages/@mdxui/chrome/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/chrome", + "private": true, "version": "0.2.0", "description": "Chrome extension for rendering MDX files with Monaco editor and Shiki", "type": "module", diff --git a/packages/@mdxui/core/package.json b/packages/@mdxui/core/package.json index fb93284e8..c9ef6c1b6 100644 --- a/packages/@mdxui/core/package.json +++ b/packages/@mdxui/core/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/core", + "private": true, "type": "module", "version": "0.0.0", "sideEffects": [ diff --git a/packages/@mdxui/ink/package.json b/packages/@mdxui/ink/package.json index 6c51922eb..f31191c08 100644 --- a/packages/@mdxui/ink/package.json +++ b/packages/@mdxui/ink/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/ink", + "private": true, "version": "0.1.0", "description": "Create CLI apps using MDX with React Ink and Pastel", "type": "module", diff --git a/packages/@mdxui/magicui/package.json b/packages/@mdxui/magicui/package.json index 1e1fe1187..6dab4db46 100644 --- a/packages/@mdxui/magicui/package.json +++ b/packages/@mdxui/magicui/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/magicui", + "private": true, "type": "module", "version": "0.0.0", "sideEffects": [ diff --git a/packages/@mdxui/mcp/package.json b/packages/@mdxui/mcp/package.json index eda7ef9a4..b58e6895d 100644 --- a/packages/@mdxui/mcp/package.json +++ b/packages/@mdxui/mcp/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/mcp", + "private": true, "version": "0.1.0", "description": "Model Context Protocol server for MDX files", "type": "module", diff --git a/packages/@mdxui/react/package.json b/packages/@mdxui/react/package.json index bea2f2653..4ec556cdd 100644 --- a/packages/@mdxui/react/package.json +++ b/packages/@mdxui/react/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/react", + "private": true, "version": "0.0.0", "description": "React components for mdxui with dual API support", "type": "module", diff --git a/packages/@mdxui/reveal/package.json b/packages/@mdxui/reveal/package.json index 3829174af..e77ad528d 100644 --- a/packages/@mdxui/reveal/package.json +++ b/packages/@mdxui/reveal/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/reveal", + "private": true, "type": "module", "version": "0.0.0", "sideEffects": [ diff --git a/packages/@mdxui/safari/package.json b/packages/@mdxui/safari/package.json index 695378d65..4fcd7e2c3 100644 --- a/packages/@mdxui/safari/package.json +++ b/packages/@mdxui/safari/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/safari", + "private": true, "type": "module", "version": "0.0.0", "description": "Safari extension for rendering text, markdown, mdx, and mdxld files with Monaco Editor", diff --git a/packages/@mdxui/semantic-mapping/package.json b/packages/@mdxui/semantic-mapping/package.json index ddc0c2dff..0b3706e55 100644 --- a/packages/@mdxui/semantic-mapping/package.json +++ b/packages/@mdxui/semantic-mapping/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/semantic-mapping", + "private": true, "version": "0.0.0", "description": "Semantic MDX parser that extracts structured props from markdown children", "type": "module", diff --git a/packages/@mdxui/shadcn/package.json b/packages/@mdxui/shadcn/package.json index 6187b81b4..c24c7444f 100644 --- a/packages/@mdxui/shadcn/package.json +++ b/packages/@mdxui/shadcn/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/shadcn", + "private": true, "type": "module", "version": "0.0.0", "sideEffects": [ diff --git a/packages/@mdxui/types/package.json b/packages/@mdxui/types/package.json index 9700586c7..2f1d750c8 100644 --- a/packages/@mdxui/types/package.json +++ b/packages/@mdxui/types/package.json @@ -1,5 +1,6 @@ { "name": "@mdxui/types", + "private": true, "version": "0.0.0", "description": "TypeScript types for mdxui components", "type": "module", diff --git a/packages/mdxui/DEPRECATED.md b/packages/mdxui/DEPRECATED.md new file mode 100644 index 000000000..18098c3d4 --- /dev/null +++ b/packages/mdxui/DEPRECATED.md @@ -0,0 +1,55 @@ +# `mdxui` in this repo is DEPRECATED — and it is a name collision, not just dead code + +**The published `mdxui` on npm is not this package.** It is +[`dot-do/ui` → `packages/mdxui`](https://github.com/dot-do/ui/tree/main/packages/mdxui). + +| | this repo (`dot-do/mdx`) | the published package (`dot-do/ui`) | +|---|---|---| +| version | `0.1.0` | `6.1.0` in-repo, `7.0.0-alpha.1` on npm (`latest`) | +| npm identity | **none** — never published from here | every published version of `mdxui`, `0.0.0` → `7.0.0-alpha.1`, records `repository: dot-do/ui` | +| what it exports | `Button`, `Card`, `Slides`, `Slide`, and the namespace objects `Core` / `Shadcn` / `Ink` / `Magicui` / `Browser` | Business-as-Code higher-order abstractions — `./site`, `./app`, `./admin`, `./zod`, `./templates` | + +## The two APIs are disjoint + +This is the part that makes the collision dangerous rather than merely untidy. The two packages share +a name and share **nothing else**. Anything that resolves `mdxui` to the wrong one does not get a +version mismatch — it gets a module with none of the expected exports. + +## What changed here, and what did not + +**Changed:** every package under `packages/mdxui` and `packages/@mdxui/*` in this repo is now +`"private": true`, so `changeset publish` cannot push any of them to npm. Two pending changesets +(`unified-mdx-components.md`, and the `mdxui` half of `workflow-step-interface.md`) declared a +`mdxui` release from this repo; they have been removed. Had a release run before this change, this +repo would have published `mdxui@0.2.0` and **moved the npm `latest` tag off `dot-do/ui`'s +`7.0.0-alpha.1`**. + +**Not changed:** the workspace name is still `mdxui`, so in-repo consumers still resolve and build. +Renaming it is the *next* step, not this one — see below. + +## Do not import `mdxui` from this repo + +New code in this repo should import the underlying `@mdxui/*` workspace packages directly +(`@mdxui/core`, `@mdxui/shadcn`, `@mdxui/magicui`, `@mdxui/browser`, `@mdxui/ink`, …) rather than the +`mdxui` barrel. New code **outside** this repo that wants `mdxui` wants `dot-do/ui`. + +## Remaining in-repo consumers — these block the delete + +| consumer | how it couples | +|---|---| +| `packages/mdxe` | `dependencies: { "mdxui": "workspace:*" }`, and `src/template/components/mdx-components.tsx` imports `{ Button, Card, Core, Shadcn, Magicui, Browser } from 'mdxui'` | +| `packages/@mdxui/mcp` | declares `mdxui` as a dependency | +| `examples/deck`, `examples/payload-blog` | declare `mdxui` as a dependency | +| `README.md`, `examples/blog/getting-started-with-mdxe.mdx` | document `import … from 'mdxui'` | + +`mdxe` is the one that matters: it is a live, published package whose scaffolding template emits an +`import … from 'mdxui'` into user projects. **In a user's project that import resolves to npm — i.e. +to `dot-do/ui`'s `mdxui`, which has none of those exports.** Migrating `mdxe` off the barrel and onto +explicit `@mdxui/*` imports is the prerequisite for deleting this directory. + +## Why this exists + +Recorded for the next agent so the reasoning is not re-derived: the owner ruled on 2026-08-03 that +"the mdxui in the mdx repo is old and needs mostly deprecated … the new mdxui packages are in the ui +repo … and mdxui needs to be removed from the mdx repo and refer to the ui repo." Tracked as +`dot-do/vis#166` (which upgrades `dot-do/vis#145` from "dead code" to "name collision"). diff --git a/packages/mdxui/README.md b/packages/mdxui/README.md index 2c28c34db..d38b4df2c 100644 --- a/packages/mdxui/README.md +++ b/packages/mdxui/README.md @@ -1,5 +1,11 @@ # `mdxui` – Component Library for MDX +> **⚠ DEPRECATED — and this is not the `mdxui` published on npm.** +> The published `mdxui` is [`dot-do/ui` → `packages/mdxui`](https://github.com/dot-do/ui/tree/main/packages/mdxui), +> a different package with a disjoint API. Every package under `packages/mdxui` and +> `packages/@mdxui/*` **in this repo** is now `private` and cannot be published. +> Read [DEPRECATED.md](./DEPRECATED.md) before touching anything here. + `mdxui` is a collection of UI packages that provide ready‑to‑use React components for Markdown and MDX content. Each package focuses on a different environment—from web apps to the terminal. All packages can be used individually or through the main `mdxui` bundle, which re‑exports them under namespaces like `Core`, `Shadcn` and `Ink`. ```ts diff --git a/packages/mdxui/package.json b/packages/mdxui/package.json index 6092a9363..99c42c4a2 100644 --- a/packages/mdxui/package.json +++ b/packages/mdxui/package.json @@ -1,8 +1,9 @@ { "name": "mdxui", + "private": true, "type": "module", "version": "0.1.0", - "description": "MDX UI components library", + "description": "DEPRECATED — not the published `mdxui`. This is the mdx repo's legacy in-repo barrel; the published mdxui lives at github.com/dot-do/ui (packages/mdxui). See DEPRECATED.md.", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [