@suzumiyaaoba/mdxr 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -16
- package/dist/cli.mjs +820 -477
- package/dist/components.d.mts +1 -1
- package/dist/components.mjs +1 -1
- package/dist/{config-HGfE6JlG.mjs → config-CkuczeTw.mjs} +12 -5
- package/dist/index.mjs +2 -2
- package/dist/{ui-BhvyxJNU.mjs → ui-WWQsRQbX.mjs} +35 -17
- package/package.json +1 -1
- package/src/agent-http.ts +10 -4
- package/src/agent-markdown.ts +15 -3
- package/src/ascii/ast.ts +47 -2
- package/src/ascii/charts.ts +5 -3
- package/src/ascii/reports.ts +4 -4
- package/src/assets/css.ts +40 -12
- package/src/assets/pages.css +23 -0
- package/src/assets/scripts.ts +4 -0
- package/src/assets/workspace.css +85 -1
- package/src/cli.ts +61 -25
- package/src/client/annotations.ts +19 -0
- package/src/client/doc-events/ask.ts +148 -0
- package/src/client/doc-events/board.ts +305 -0
- package/src/client/doc-events/comments.ts +406 -0
- package/src/client/doc-events/serialization.ts +33 -0
- package/src/client/doc-events/shared.ts +103 -0
- package/src/client/doc-events.ts +7 -984
- package/src/client/section-reviews.ts +11 -0
- package/src/client/workspace-export-state.ts +211 -0
- package/src/client/workspace-snapshot.ts +249 -0
- package/src/codex-app-server-error.ts +15 -0
- package/src/codex-app-server-turn.ts +123 -0
- package/src/codex-app-server.ts +281 -392
- package/src/document-history-http.ts +101 -56
- package/src/document-history.ts +165 -97
- package/src/editor.ts +8 -2
- package/src/extended/diagrams.ts +16 -14
- package/src/extended/plots.ts +26 -12
- package/src/html.ts +10 -1
- package/src/init.ts +16 -4
- package/src/instructions.ts +147 -0
- package/src/load-user-module.ts +19 -9
- package/src/remark/headings.ts +22 -13
- package/src/remark/include.ts +32 -12
- package/src/render.ts +6 -0
- package/src/serve.ts +72 -40
- package/src/styles/globals.css +1 -0
- package/src/styles/motion.css +124 -0
- package/src/workspace-api.ts +186 -0
- package/src/workspace-app.tsx +85 -709
- package/src/workspace-chat.tsx +115 -103
- package/src/workspace-document.ts +55 -0
- package/src/workspace-export-data.ts +111 -0
- package/src/workspace-export-html.ts +103 -0
- package/src/workspace-export.tsx +143 -0
- package/src/workspace-panes.tsx +334 -0
- package/src/workspace-state.ts +241 -0
- package/src/workspace-theme.ts +21 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Run directly with `npx` — no install required:
|
|
|
10
10
|
npx @suzumiyaaoba/mdxr render plan.mdx # writes plan.html
|
|
11
11
|
npx @suzumiyaaoba/mdxr serve plan.mdx # live preview at http://localhost:3737
|
|
12
12
|
npx @suzumiyaaoba/mdxr catalog # list available components
|
|
13
|
-
npx @suzumiyaaoba/mdxr init # install
|
|
13
|
+
npx @suzumiyaaoba/mdxr init # install mdxr instructions for Codex and Claude
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Or install it:
|
|
@@ -45,6 +45,8 @@ Saved annotations remain in your browser for that document; they do not modify t
|
|
|
45
45
|
|
|
46
46
|
Each document-level `##` section also has a **Not reviewed / Reviewed** toggle. Review status is saved locally per document and restored after reload; sections with changed content require review again. In **Pages** view, the sidebar shows section statuses and review progress. See [Section review status](https://suzumiyaaoba.com/mdxr/authoring#section-review-status).
|
|
47
47
|
|
|
48
|
+
In the `mdxr serve` workspace, choose **Export HTML** to download one standalone review archive with the rendered document, chat, comments, section review statuses, every saved MDX version, and their diffs. Images and stylesheets are embedded in the snapshot; if an external resource cannot be captured, export reports an error instead of omitting it. Open the file locally to review or share the captured state without running the server.
|
|
49
|
+
|
|
48
50
|
### `mdxr text [file]`
|
|
49
51
|
|
|
50
52
|
Render an `.mdx` document to plain Markdown — every component becomes an ASCII/text stand-in (status checkbox lists, block-bar charts, GFM tables, `<details>` disclosures) so the document stays readable in any Markdown viewer or terminal. Interactive-only widgets (dialogs, menus, shadcn chrome) degrade to their text content; unknown components warn to stderr and keep their children.
|
|
@@ -61,16 +63,18 @@ List built-in and project-defined components (`--json` for machine-readable outp
|
|
|
61
63
|
|
|
62
64
|
### `mdxr init`
|
|
63
65
|
|
|
64
|
-
Install the
|
|
66
|
+
Install mdxr's authoring instructions for Codex and Claude. By default, the instructions go into your home directory and are referenced from the global agent config files.
|
|
65
67
|
|
|
66
68
|
```sh
|
|
67
|
-
mdxr init
|
|
68
|
-
mdxr init --tool
|
|
69
|
-
mdxr init --tool
|
|
70
|
-
mdxr init --global
|
|
69
|
+
mdxr init # Codex + Claude, in your home directory
|
|
70
|
+
mdxr init --tool codex # Codex only
|
|
71
|
+
mdxr init --tool claude --local # Claude only, in this project
|
|
72
|
+
mdxr init --global # explicitly install into your home directory
|
|
73
|
+
mdxr init --force # refresh generated instructions and references
|
|
74
|
+
mdxr init --skill # install the Agent Skill instead
|
|
71
75
|
```
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
The global install creates `$CODEX_HOME/MDXR.md` (or `~/.codex/MDXR.md` when `CODEX_HOME` is unset) and its `mdxr/references/`, plus matching files under `~/.claude/`. It adds a read instruction to `$CODEX_HOME/AGENTS.md`; Claude's `~/.claude/CLAUDE.md` imports `@./MDXR.md`. Use `--local` to create `.codex/MDXR.md` and `.claude/MDXR.md` in the project, with references from the root `AGENTS.md` and `CLAUDE.md`. A local install also adds `.mdxr/` to `.gitignore` for agent-authored documents and rendered HTML. `--force` refreshes generated instruction files and references while preserving the rest of your config files.
|
|
74
78
|
|
|
75
79
|
## Wireframes
|
|
76
80
|
|
|
@@ -89,24 +93,21 @@ Build screen mockups with the built-in `Wireframe*` components, adapted from [wi
|
|
|
89
93
|
|
|
90
94
|
Render with `mdxr render wireframe.mdx`. Text/media placeholders, cards, avatars, lists, section presets, and editable fields support light/dark themes and Markdown output. See the [guide](docs/docs/wireframe.mdx) and [examples](examples/catalog/wireframe.mdx). Adapted source retains the [upstream MIT license](src/wireframe-ui.LICENSE.md).
|
|
91
95
|
|
|
92
|
-
## Agent
|
|
96
|
+
## Agent Skill
|
|
93
97
|
|
|
94
|
-
|
|
98
|
+
If you prefer the Agent Skills format, `mdxr init --skill` installs the bundled skill. You can also install it from the repo with the [`skills` CLI](https://github.com/vercel-labs/skills):
|
|
95
99
|
|
|
96
100
|
```sh
|
|
101
|
+
mdxr init --skill
|
|
97
102
|
npx skills add Suzumiyaaoba/mdxr --skill mdxr
|
|
98
103
|
# add -g for a global install, or -a claude-code to target a specific agent
|
|
99
104
|
```
|
|
100
105
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
> Use the mdxr skill to write an implementation plan for the auth feature and render it to HTML.
|
|
106
|
+
Once the instructions or skill are installed, ask your agent, for example:
|
|
104
107
|
|
|
105
|
-
|
|
108
|
+
> Write an implementation plan for the auth feature and render it to HTML with mdxr.
|
|
106
109
|
|
|
107
|
-
|
|
108
|
-
- Whenever the user explicitly asks for a deliverable with mdxr, use the mdxr skill to write and render it.
|
|
109
|
-
```
|
|
110
|
+
Plans, reports, reviews, investigation summaries, release notes, and postmortems all work. Documents go in `.mdxr/` unless you specify another location.
|
|
110
111
|
|
|
111
112
|
## License
|
|
112
113
|
|