@suzumiyaaoba/mdxr 0.14.0 → 0.15.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 +30 -6
- package/dist/cli.mjs +3913 -2995
- package/dist/components.d.mts +5 -5
- package/dist/components.mjs +1 -1
- package/dist/{config-DssZ4uXC.mjs → config-DSZfMOIO.mjs} +1 -1
- package/dist/{doc-context-rjANTj9L.d.mts → doc-context-Cye5isVT.d.mts} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{ui-DuJK74P7.mjs → ui-CyLil0AF.mjs} +64 -18
- package/package.json +1 -1
- package/skill/SKILL.md +3 -3
- package/src/agent-options.ts +24 -0
- package/src/annotation-html.ts +18 -8
- package/src/annotations.ts +107 -11
- package/src/assets/annotations.css +63 -0
- package/src/assets/library.css +605 -0
- package/src/assets/scripts.ts +20 -18
- package/src/cli.ts +55 -35
- package/src/client/annotation-copy.ts +237 -0
- package/src/client/annotation-resolution.ts +53 -0
- package/src/client/annotation-view.ts +217 -26
- package/src/client/annotations.ts +200 -60
- package/src/client/doc-events.ts +6 -40
- package/src/client/theme.ts +76 -0
- package/src/library-app.tsx +661 -0
- package/src/library-delete.tsx +132 -0
- package/src/library-index.ts +711 -0
- package/src/library-page.ts +71 -0
- package/src/library-search.ts +331 -0
- package/src/library-state.ts +282 -0
- package/src/library-theme.ts +44 -0
- package/src/library-types.ts +42 -0
- package/src/library.ts +365 -0
- package/src/render.ts +1 -0
- package/src/serve-documents.ts +44 -0
- package/src/serve.ts +5 -11
- package/src/ui/files.tsx +75 -24
- package/src/workspace-export-html.ts +39 -8
package/README.md
CHANGED
|
@@ -8,7 +8,8 @@ Run directly with `npx` — no install required:
|
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npx @suzumiyaaoba/mdxr render plan.mdx # writes plan.html
|
|
11
|
-
npx @suzumiyaaoba/mdxr serve
|
|
11
|
+
npx @suzumiyaaoba/mdxr serve # serve .mdxr at http://localhost:3737
|
|
12
|
+
npx @suzumiyaaoba/mdxr library # browse and search .mdxr
|
|
12
13
|
npx @suzumiyaaoba/mdxr catalog # list available components
|
|
13
14
|
npx @suzumiyaaoba/mdxr --version # print the package version
|
|
14
15
|
npx @suzumiyaaoba/mdxr init # install mdxr instructions for Codex and Claude
|
|
@@ -21,6 +22,19 @@ npm install -g @suzumiyaaoba/mdxr # global CLI
|
|
|
21
22
|
npm install @suzumiyaaoba/mdxr # library: import { render } from "@suzumiyaaoba/mdxr"
|
|
22
23
|
```
|
|
23
24
|
|
|
25
|
+
### `mdxr library [dir]`
|
|
26
|
+
|
|
27
|
+
Browse and search Markdown and MDX documents under a directory (defaults to `.mdxr`). The local browser UI searches titles, document text, and relative paths; supports status filtering and relevance, update-date, or title sorting; and opens each result in a new tab with the live preview workspace.
|
|
28
|
+
|
|
29
|
+
Delete a document from its row to permanently remove that file; its assets and parent directories remain.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
mdxr library # browse .mdxr
|
|
33
|
+
mdxr library ./docs -p 3738 --open # browse another directory
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Search terms separated by spaces (including full-width spaces) use AND matching. Japanese text supports partial matches. Unicode NFKC normalization handles full-/half-width forms, including half-width kana with voiced marks; lowercasing makes letter case equivalent, and hiragana and katakana are treated as equivalent. For example, search for `かたろぐ API`. The library indexes `.md`, `.markdown`, and `.mdx` files without running document JavaScript or custom components. Both the library and previews listen on loopback; generated and dependency directories such as `node_modules`, `dist`, `.git`, `.mdxr-cache`, `storybook-static`, and `.mdxr/history` are excluded, and symbolic links are not followed. Use the UI's refresh action to include added, changed, or deleted files.
|
|
37
|
+
|
|
24
38
|
### `mdxr render [file]`
|
|
25
39
|
|
|
26
40
|
Render an `.mdx` file (or stdin) to a standalone HTML file.
|
|
@@ -34,19 +48,29 @@ mdxr render plan.mdx --no-hydrate # static HTML, no client bundle
|
|
|
34
48
|
mdxr render plan.mdx --format json # machine-readable errors
|
|
35
49
|
```
|
|
36
50
|
|
|
37
|
-
### `mdxr serve [
|
|
51
|
+
### `mdxr serve [path]`
|
|
52
|
+
|
|
53
|
+
Serve all Markdown and MDX documents under `.mdxr/` by default, creating an empty directory when needed. The browser listing lets you search and open each document in its live workspace. Pass another directory to serve it instead (`-p, --port`, default `3737`; if taken, the next free port is used).
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
mdxr serve # serve .mdxr/
|
|
57
|
+
mdxr serve .mdxr/ --agent codex --open .mdxr/20260930170000-plan/index.mdx
|
|
58
|
+
mdxr serve ./reports --open ./reports/plan.mdx # open this document directly
|
|
59
|
+
mdxr serve --open # open the directory listing
|
|
60
|
+
cat plan.mdx | mdxr serve - --open # explicit stdin preview
|
|
61
|
+
```
|
|
38
62
|
|
|
39
|
-
|
|
63
|
+
`--open <file>` takes a document path relative to the working directory, or an absolute path. It opens that document directly, with its relative file path in the preview URL. `--agent codex` or `--agent claude` enables chat in every document workspace. A file argument such as `mdxr serve .mdxr/20260930170000-plan/index.mdx --open` serves the containing `.mdxr/` library and opens that file; outside `.mdxr/`, it serves the file's parent directory.
|
|
40
64
|
|
|
41
65
|
### Review the rendered document
|
|
42
66
|
|
|
43
67
|
Select text and click **Add comment**, or open **Annotate → Select figure** to comment on an image, diagram, or chart. Edit or delete comments in the panel, then **Copy Markdown** to send the quoted targets, source locations, and feedback to a coding agent.
|
|
44
68
|
|
|
45
|
-
Saved annotations remain in your browser for that document; they do not modify the source file or travel with the HTML. If the document changes, targets that cannot be identified keep their original quotes and are marked unavailable. [Review annotations](https://suzumiyaaoba.com/mdxr/annotations) describes keyboard shortcuts, storage, and clipboard fallbacks.
|
|
69
|
+
Saved annotations remain in your browser for that document; they do not modify the source file or travel with the HTML. Track comments as open or resolved, and resolve them against the version you reviewed. Copying or sending feedback keeps the current comments and hands off only open comments; each handoff saves a snapshot of the open comments it contains. If the document changes, targets that cannot be identified keep their original quotes and are marked unavailable. [Review annotations](https://suzumiyaaoba.com/mdxr/annotations) describes keyboard shortcuts, storage, and clipboard fallbacks.
|
|
46
70
|
|
|
47
71
|
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).
|
|
48
72
|
|
|
49
|
-
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.
|
|
73
|
+
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. Comment status, resolution time, revision, and reviewed version are included; links jump to matching versions in the archive. 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.
|
|
50
74
|
|
|
51
75
|
### `mdxr text [file]`
|
|
52
76
|
|
|
@@ -110,7 +134,7 @@ Once the instructions or skill are installed, ask your agent, for example:
|
|
|
110
134
|
|
|
111
135
|
> Write an implementation plan for the auth feature and render it to HTML with mdxr.
|
|
112
136
|
|
|
113
|
-
Plans, reports, reviews, investigation summaries, release notes, and postmortems all work. By default, new documents use `.mdxr/yyyyMMddhhmmss-<name>/index.mdx`, with a zero-padded 14-digit local creation time in 24-hour format (for example, `.mdxr/20260929140530-auth-plan/index.mdx`). Keep images and related MDX files in the document's directory. A file path you provide takes priority, and existing documents keep their current paths. If you specify only a directory, create a timestamped subdirectory there and save the document as `index.mdx`.
|
|
137
|
+
Plans, reports, reviews, investigation summaries, release notes, and postmortems all work. By default, new documents use `.mdxr/yyyyMMddhhmmss-<name>/index.mdx`, with a zero-padded 14-digit local creation time in 24-hour format (for example, `.mdxr/20260929140530-auth-plan/index.mdx`). Keep images and related MDX files in the document's directory. A file path you provide takes priority, and existing documents keep their current paths. If you specify only a directory, create a timestamped subdirectory there and save the document as `index.mdx`. Serve the directory and open the new document directly with `mdxr serve .mdxr/ --open .mdxr/20260929140530-auth-plan/index.mdx`.
|
|
114
138
|
|
|
115
139
|
## License
|
|
116
140
|
|