@suzumiyaaoba/mdxr 0.1.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/LICENSE +21 -0
- package/README.md +56 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +2902 -0
- package/dist/components.d.mts +791 -0
- package/dist/components.mjs +2 -0
- package/dist/config-SI9IyFiC.mjs +184 -0
- package/dist/doc-context-CEqzMYKv.d.mts +568 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.mjs +4 -0
- package/dist/ui-GKFD0mx5.mjs +15986 -0
- package/package.json +131 -0
- package/skill/SKILL.md +49 -0
- package/skill/references/components/charts.md +172 -0
- package/skill/references/components/document.md +98 -0
- package/skill/references/components/forms.md +35 -0
- package/skill/references/components/investigation.md +198 -0
- package/skill/references/components/layout.md +68 -0
- package/skill/references/components/output.md +158 -0
- package/skill/references/components/planning.md +155 -0
- package/skill/references/components/reports.md +252 -0
- package/skill/references/components/shadcn.md +19 -0
- package/skill/references/components.md +186 -0
- package/skill/references/extending.md +48 -0
- package/src/ask-sheet.ts +40 -0
- package/src/assets/css.ts +392 -0
- package/src/assets/scripts.ts +78 -0
- package/src/catalog.ts +287 -0
- package/src/cli.ts +178 -0
- package/src/client/doc-events.ts +1108 -0
- package/src/client/entry.ts +27 -0
- package/src/client-js.ts +47 -0
- package/src/component-map.ts +47 -0
- package/src/components/ui/accordion.tsx +77 -0
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +76 -0
- package/src/components/ui/aspect-ratio.tsx +22 -0
- package/src/components/ui/attachment.tsx +208 -0
- package/src/components/ui/avatar.tsx +106 -0
- package/src/components/ui/badge.tsx +52 -0
- package/src/components/ui/breadcrumb.tsx +121 -0
- package/src/components/ui/bubble.tsx +128 -0
- package/src/components/ui/button-group.tsx +88 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/calendar.tsx +226 -0
- package/src/components/ui/card.tsx +102 -0
- package/src/components/ui/carousel.tsx +246 -0
- package/src/components/ui/chart.tsx +379 -0
- package/src/components/ui/checkbox.tsx +27 -0
- package/src/components/ui/collapsible.tsx +19 -0
- package/src/components/ui/combobox.tsx +298 -0
- package/src/components/ui/command.tsx +193 -0
- package/src/components/ui/context-menu.tsx +271 -0
- package/src/components/ui/dialog.tsx +159 -0
- package/src/components/ui/direction.tsx +4 -0
- package/src/components/ui/drawer.tsx +227 -0
- package/src/components/ui/dropdown-menu.tsx +269 -0
- package/src/components/ui/empty.tsx +104 -0
- package/src/components/ui/field.tsx +237 -0
- package/src/components/ui/fieldset.tsx +32 -0
- package/src/components/ui/frame.tsx +87 -0
- package/src/components/ui/hover-card.tsx +50 -0
- package/src/components/ui/input-group.tsx +159 -0
- package/src/components/ui/input-otp.tsx +83 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/item.tsx +202 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/marker.tsx +71 -0
- package/src/components/ui/menubar.tsx +284 -0
- package/src/components/ui/message-scroller.tsx +128 -0
- package/src/components/ui/message.tsx +91 -0
- package/src/components/ui/meter.tsx +80 -0
- package/src/components/ui/native-select.tsx +64 -0
- package/src/components/ui/navigation-menu.tsx +170 -0
- package/src/components/ui/pagination.tsx +133 -0
- package/src/components/ui/popover.tsx +87 -0
- package/src/components/ui/progress.tsx +82 -0
- package/src/components/ui/questionnaire.tsx +328 -0
- package/src/components/ui/radio-group.tsx +35 -0
- package/src/components/ui/resizable.tsx +49 -0
- package/src/components/ui/scroll-area.tsx +50 -0
- package/src/components/ui/select.tsx +201 -0
- package/src/components/ui/separator.tsx +22 -0
- package/src/components/ui/sheet.tsx +135 -0
- package/src/components/ui/sidebar.tsx +730 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +51 -0
- package/src/components/ui/spinner.tsx +16 -0
- package/src/components/ui/switch.tsx +31 -0
- package/src/components/ui/table.tsx +113 -0
- package/src/components/ui/tabs.tsx +82 -0
- package/src/components/ui/textarea.tsx +17 -0
- package/src/components/ui/toast.tsx +229 -0
- package/src/components/ui/toggle-group.tsx +87 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +65 -0
- package/src/components.ts +78 -0
- package/src/config.ts +56 -0
- package/src/define.ts +122 -0
- package/src/doc-context.ts +20 -0
- package/src/editor.ts +94 -0
- package/src/format-error.ts +78 -0
- package/src/guards.ts +84 -0
- package/src/hooks/use-mobile.ts +21 -0
- package/src/html.ts +91 -0
- package/src/hydrate/export-index.ts +232 -0
- package/src/hydrate/import-scan.ts +169 -0
- package/src/hydrate/plugins.ts +118 -0
- package/src/hydrate/runtime-module.ts +145 -0
- package/src/hydrate-runtime.ts +67 -0
- package/src/hydrate.ts +147 -0
- package/src/index.ts +16 -0
- package/src/init.ts +57 -0
- package/src/langs.ts +148 -0
- package/src/lines.ts +53 -0
- package/src/load-user-module.ts +191 -0
- package/src/mdx.ts +248 -0
- package/src/paths.ts +36 -0
- package/src/rehype/shiki.ts +533 -0
- package/src/remark/alerts.ts +53 -0
- package/src/remark/ast.ts +96 -0
- package/src/remark/callouts.ts +25 -0
- package/src/remark/code-file.ts +85 -0
- package/src/remark/code-meta.ts +21 -0
- package/src/remark/directives.ts +170 -0
- package/src/remark/file-paths.ts +64 -0
- package/src/remark/headings.ts +131 -0
- package/src/remark/no-js.ts +40 -0
- package/src/render.ts +337 -0
- package/src/serve.ts +322 -0
- package/src/styles/globals.css +134 -0
- package/src/styles/shadcn.css +641 -0
- package/src/tailwind.ts +119 -0
- package/src/ui/approvals.tsx +76 -0
- package/src/ui/ask-question.tsx +386 -0
- package/src/ui/ask.tsx +206 -0
- package/src/ui/attrs.ts +51 -0
- package/src/ui/audit.tsx +139 -0
- package/src/ui/bar-chart.tsx +334 -0
- package/src/ui/benchmarks.tsx +143 -0
- package/src/ui/bits.tsx +537 -0
- package/src/ui/board.tsx +173 -0
- package/src/ui/bridge.tsx +207 -0
- package/src/ui/bumps.tsx +178 -0
- package/src/ui/callout.tsx +106 -0
- package/src/ui/changes.tsx +89 -0
- package/src/ui/chart-bits.tsx +52 -0
- package/src/ui/chart.ts +577 -0
- package/src/ui/checks.tsx +203 -0
- package/src/ui/child-index.tsx +44 -0
- package/src/ui/children.ts +43 -0
- package/src/ui/chips.tsx +49 -0
- package/src/ui/cmd.tsx +27 -0
- package/src/ui/columns.tsx +31 -0
- package/src/ui/comments.tsx +544 -0
- package/src/ui/compare.tsx +67 -0
- package/src/ui/decision.tsx +79 -0
- package/src/ui/deps.tsx +78 -0
- package/src/ui/details.tsx +43 -0
- package/src/ui/diff-parse.ts +307 -0
- package/src/ui/diff.tsx +458 -0
- package/src/ui/diffstat.tsx +58 -0
- package/src/ui/due.tsx +65 -0
- package/src/ui/effort.tsx +29 -0
- package/src/ui/endpoints.tsx +118 -0
- package/src/ui/envvars.tsx +96 -0
- package/src/ui/figure.tsx +37 -0
- package/src/ui/file-icon.ts +1020 -0
- package/src/ui/file-link.ts +32 -0
- package/src/ui/file-ref.tsx +39 -0
- package/src/ui/files.tsx +112 -0
- package/src/ui/findings.tsx +85 -0
- package/src/ui/flow.tsx +73 -0
- package/src/ui/funnel.tsx +121 -0
- package/src/ui/gantt.tsx +443 -0
- package/src/ui/gauges.tsx +135 -0
- package/src/ui/glossary.tsx +29 -0
- package/src/ui/graph-layout.ts +149 -0
- package/src/ui/graph-specs.tsx +102 -0
- package/src/ui/graph.tsx +278 -0
- package/src/ui/grid.tsx +119 -0
- package/src/ui/hypothesis.tsx +94 -0
- package/src/ui/icon.tsx +80 -0
- package/src/ui/incident.tsx +130 -0
- package/src/ui/index.ts +342 -0
- package/src/ui/ins-del.tsx +41 -0
- package/src/ui/json.tsx +190 -0
- package/src/ui/layout.ts +9 -0
- package/src/ui/line-chart.tsx +251 -0
- package/src/ui/matrix.tsx +208 -0
- package/src/ui/meta.tsx +73 -0
- package/src/ui/option.tsx +64 -0
- package/src/ui/owner.tsx +40 -0
- package/src/ui/packages.tsx +104 -0
- package/src/ui/pathway.tsx +96 -0
- package/src/ui/phase.tsx +41 -0
- package/src/ui/pie-chart.tsx +170 -0
- package/src/ui/plan.tsx +77 -0
- package/src/ui/pre.tsx +175 -0
- package/src/ui/priority.tsx +51 -0
- package/src/ui/props.tsx +77 -0
- package/src/ui/quadrant.tsx +172 -0
- package/src/ui/radar.tsx +200 -0
- package/src/ui/ref.tsx +160 -0
- package/src/ui/release.tsx +178 -0
- package/src/ui/req.tsx +42 -0
- package/src/ui/review.tsx +133 -0
- package/src/ui/risk.tsx +67 -0
- package/src/ui/sankey.tsx +287 -0
- package/src/ui/scatter.tsx +237 -0
- package/src/ui/schema.tsx +113 -0
- package/src/ui/score.tsx +105 -0
- package/src/ui/search.tsx +120 -0
- package/src/ui/series.tsx +38 -0
- package/src/ui/severity.tsx +69 -0
- package/src/ui/shadcn.tsx +216 -0
- package/src/ui/spark.tsx +86 -0
- package/src/ui/stack.tsx +57 -0
- package/src/ui/stats.tsx +63 -0
- package/src/ui/status-badge.tsx +66 -0
- package/src/ui/statuspage.tsx +238 -0
- package/src/ui/steps.tsx +74 -0
- package/src/ui/summary.tsx +41 -0
- package/src/ui/symbol-ref.tsx +73 -0
- package/src/ui/terminal.tsx +117 -0
- package/src/ui/tests.tsx +218 -0
- package/src/ui/timeline.tsx +63 -0
- package/src/ui/toc.tsx +56 -0
- package/src/ui/tones.ts +187 -0
- package/src/ui/trace.tsx +69 -0
- package/src/ui/tree.tsx +281 -0
- package/src/ui/treemap.tsx +128 -0
- package/src/ui/venn.tsx +258 -0
- package/src/ui/verdict.tsx +78 -0
- package/src/ui/waterfall.tsx +142 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Code investigation components
|
|
2
|
+
|
|
3
|
+
Index: [../components.md](../components.md). MDX attributes are always strings; `children` is Markdown.
|
|
4
|
+
|
|
5
|
+
### `<Findings title>` / `<Finding confidence="confirmed|inferred|unverified" title="…">` / `:::findings` / `:::finding`
|
|
6
|
+
|
|
7
|
+
Investigation findings with an epistemic-status pill: `confirmed` (read from the code), `inferred` (deduced from evidence), `unverified` (claimed, not checked). `Findings` numbers each `Finding` and renders a count summary on top; children carry the evidence (`<FileRef>`, `<CodeFile>`).
|
|
8
|
+
|
|
9
|
+
```mdx
|
|
10
|
+
<Findings title="Investigation results">
|
|
11
|
+
<Finding confidence="confirmed" title="Rendering is synchronous">
|
|
12
|
+
`mdxToHtml` awaits `evaluate()` then calls `renderToStaticMarkup`.
|
|
13
|
+
</Finding>
|
|
14
|
+
<Finding confidence="unverified" title="Watch-mode reloads">
|
|
15
|
+
Probably, but no test covers it.
|
|
16
|
+
</Finding>
|
|
17
|
+
</Findings>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### `<Files title>` / `<File path kind lines>` / `:::files`
|
|
21
|
+
|
|
22
|
+
Related-file inventory — "the files this investigation touches". The row icon is picked automatically from the file name/extension (`vscode-icons` set: `package.json` → npm, `Dockerfile` → Docker, `*.test.ts` → test TS, …). `kind` is a free-form chip; known values get an icon and color: `entry` `core` `types` `config` `test` `docs` `generated`. Children render as a muted note. For change-sets (what a plan modifies) use `Changes` instead. `path` links to the file in the reader's editor when it exists on disk (`href` overrides; see "File links" in [../components.md](../components.md)).
|
|
23
|
+
|
|
24
|
+
```mdx
|
|
25
|
+
<Files title="Files involved">
|
|
26
|
+
<File path="src/mdx.ts" kind="entry" lines="70-106">
|
|
27
|
+
Pipeline entry.
|
|
28
|
+
</File>
|
|
29
|
+
<File path="src/define.ts" kind="types" />
|
|
30
|
+
<File path="tests/render.test.ts" kind="test" />
|
|
31
|
+
</Files>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### `<Deps title>` / `<Dep from to kind>` / `:::deps`
|
|
35
|
+
|
|
36
|
+
Dependency-edge list — compact alternative to a mermaid graph for module relationships. `kind` (default `imports`): `imports` `calls` `extends` `implements` `reads` `writes`. `from`/`to` accept paths, module names, or symbols; children render as a muted note.
|
|
37
|
+
|
|
38
|
+
```mdx
|
|
39
|
+
<Deps title="Module dependencies">
|
|
40
|
+
<Dep from="src/cli.ts" to="src/render.ts" kind="calls" />
|
|
41
|
+
<Dep from="src/mdx.ts" to="remark-directive" kind="imports" />
|
|
42
|
+
<Dep from="src/render.ts" to="dist/out.html" kind="writes" />
|
|
43
|
+
</Deps>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### `<Changes>` / `<Change kind="add|modify|delete|rename" path="…" to="…">`
|
|
47
|
+
|
|
48
|
+
Change-set list — the "files this plan touches" section. `kind` drives the icon and color (`to` is the new path on `rename`); the file path also gets an extension-based icon automatically. Children render as a muted note. The path links to the file in the reader's editor when it exists (`to` wins on `rename`; `href` overrides).
|
|
49
|
+
|
|
50
|
+
```mdx
|
|
51
|
+
<Changes>
|
|
52
|
+
<Change kind="add" path="src/remark/headings.ts">
|
|
53
|
+
slug + toc expansion
|
|
54
|
+
</Change>
|
|
55
|
+
<Change kind="modify" path="src/mdx.ts" />
|
|
56
|
+
<Change kind="rename" path="src/old.ts" to="src/new.ts" />
|
|
57
|
+
<Change kind="delete" path="src/dead.ts" />
|
|
58
|
+
</Changes>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### `<Flow title="…">` / `<FlowStep name path lines>` / `:::flow{title="…"}`
|
|
62
|
+
|
|
63
|
+
Numbered call/execution chain — "how a request travels through the code". Each `FlowStep` renders a numbered node on a connecting rail; `name` is the function/phase label (mono), `path`/`lines` pin the location (linked to the file in the reader's editor when it exists; `href` overrides), children describe what happens there. Use `Steps` for task checklists and `Timeline` for dates — `Flow` is for hops through code.
|
|
64
|
+
|
|
65
|
+
```mdx
|
|
66
|
+
<Flow title="Request path">
|
|
67
|
+
<FlowStep name="cli()" path="src/cli.ts" lines="12-30">
|
|
68
|
+
Parses argv, loads config.
|
|
69
|
+
</FlowStep>
|
|
70
|
+
<FlowStep name="mdxToHtml()" path="src/mdx.ts">
|
|
71
|
+
Compiles MDX and evaluates it.
|
|
72
|
+
</FlowStep>
|
|
73
|
+
</Flow>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `<Tree root="…">`
|
|
77
|
+
|
|
78
|
+
File tree rendered from a nested Markdown list. Items ending in `/` or with children get a folder icon; `name — note` or `name # note` adds a muted note. Icons are picked automatically from the file extension or directory name (VS Code-style `vscode-icons` set, e.g. `.ts` → TypeScript logo, `src/` → src folder).
|
|
79
|
+
|
|
80
|
+
Starlight-style extras: directories are collapsible (click to fold; works without JS), `open="false"` starts every folder collapsed, a `...` or `…` entry renders a placeholder for omitted files, and a `**bold**` name highlights the entry.
|
|
81
|
+
|
|
82
|
+
```mdx
|
|
83
|
+
<Tree root="mdxr/">
|
|
84
|
+
|
|
85
|
+
- src/
|
|
86
|
+
- render.ts — pipeline entry
|
|
87
|
+
- ui/
|
|
88
|
+
- **plan.tsx**
|
|
89
|
+
- steps.tsx
|
|
90
|
+
- …
|
|
91
|
+
- package.json
|
|
92
|
+
- ...
|
|
93
|
+
|
|
94
|
+
</Tree>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### `<FileRef path="src/mdx.ts" lines="40-52" />`
|
|
98
|
+
|
|
99
|
+
Inline file reference chip with a copy button. The icon is picked automatically from the file extension (`vscode-icons` set). Links to the file in the reader's editor (`vscode://file/…` by default) when it exists on disk; `href` overrides the URL, `editor: none` disables linking.
|
|
100
|
+
|
|
101
|
+
### `<SymbolRef name="mdxToHtml" kind="fn" path="src/mdx.ts" lines="70-106" />`
|
|
102
|
+
|
|
103
|
+
Inline symbol reference chip for code explanations. `kind` picks the icon: `fn` `type` `class` `interface` `const` `enum` `prop` `component` (omit for no icon). `path`/`lines` show the definition site muted — the chip links to that file in the reader's editor when it exists (`href` overrides); the copy button copies `path` (or `name` when absent).
|
|
104
|
+
|
|
105
|
+
```mdx
|
|
106
|
+
<SymbolRef name="mdxToHtml" kind="fn" path="src/mdx.ts" /> returns
|
|
107
|
+
<SymbolRef name="MdxResult" kind="interface" />.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### `<CodeFile path="src/x.ts" lines="40-52" lang="ts" />`
|
|
111
|
+
|
|
112
|
+
Embeds a real file from disk as a fenced block — code explanations quote the actual source instead of drifting copies. `path` resolves relative to the document; `lines` slices a 1-based range (`"40"`, `"40-52"`, `"40-"`); `lang` overrides the extension-derived language. The filename header links back to the file in the reader's editor. Missing files and bad ranges are render errors.
|
|
113
|
+
|
|
114
|
+
### `<Props of="…">` / `<Prop name type required default>`
|
|
115
|
+
|
|
116
|
+
API/props table for documenting a component or function signature. `of` renders a caption bar; `required` (bare attr) adds a `*`; children are the description cell.
|
|
117
|
+
|
|
118
|
+
```mdx
|
|
119
|
+
<Props of="Step">
|
|
120
|
+
<Prop name="status" type="todo | doing | done | blocked" required>
|
|
121
|
+
Marker state.
|
|
122
|
+
</Prop>
|
|
123
|
+
<Prop name="effort" type="xs | s | m | l | xl" default="m" />
|
|
124
|
+
</Props>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### `<Terminal cmd exit title>` / `:::terminal` / ` ```console `
|
|
128
|
+
|
|
129
|
+
Terminal transcript — the standard evidence block for "what was run and what it printed". `cmd` renders as a `$ `-prompted first line; `exit` adds a title-bar badge (`0` green, anything else red). Children carry the output: put it in a fenced block for verbatim text — plain-text children are parsed as Markdown, which can mangle `_`, `*` etc. Body lines starting with `$ ` render as prompt lines, so multi-command sessions work too. The copy button copies the whole transcript.
|
|
130
|
+
|
|
131
|
+
````mdx
|
|
132
|
+
<Terminal cmd="pnpm test" exit="1" title="test run">
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
FAIL tests/render.test.ts
|
|
136
|
+
✗ renders markdown prose
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
</Terminal>
|
|
140
|
+
````
|
|
141
|
+
|
|
142
|
+
A ` ```console ` (or ` ```terminal ` / ` ```shellsession `) fence renders the same transcript with no component — `exit="N"` and `title="…"` in the fence meta work as well:
|
|
143
|
+
|
|
144
|
+
````
|
|
145
|
+
```console exit="1" title="grep evidence"
|
|
146
|
+
$ rg 'evaluate' src/ --count
|
|
147
|
+
src/mdx.ts: 3
|
|
148
|
+
```
|
|
149
|
+
````
|
|
150
|
+
|
|
151
|
+
### `<Hypotheses title>` / `<Hypothesis status="supported|refuted|untested" title="…">` / `:::hypotheses` / `:::hypothesis`
|
|
152
|
+
|
|
153
|
+
Hypothesis ledger — the "what we suspected, and whether it held up" section of a debugging-style investigation. `supported` = evidence backs it, `refuted` = ruled out (record dead ends — they save the reader from re-checking), `untested` = not yet checked. `Hypotheses` numbers each entry and summarizes per-status counts; children carry the reasoning and evidence (`<Terminal>`, `<FileRef>`).
|
|
154
|
+
|
|
155
|
+
```mdx
|
|
156
|
+
<Hypotheses title="Hypotheses tested">
|
|
157
|
+
<Hypothesis status="refuted" title="CSS loads at runtime">
|
|
158
|
+
Ruled out: the stylesheet is inlined into the HTML — see the
|
|
159
|
+
<Terminal cmd="grep stylesheet dist/out.html">…</Terminal>
|
|
160
|
+
</Hypothesis>
|
|
161
|
+
<Hypothesis status="supported" title="Directives expand before eval" />
|
|
162
|
+
</Hypotheses>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### `<Trace title error>` / `<TraceFrame name path lines kind="app|lib">` / `:::trace`
|
|
166
|
+
|
|
167
|
+
Stack/call trace for error and crash investigations. `error` renders the exception line on top (red); `TraceFrame`s are auto-numbered `#0…` top-down (most recent first, like `gdb bt`). `kind="lib"` dims framework/runtime frames and adds a `lib` tag. `path` links to the file in the reader's editor when it exists (`href` overrides). Children are per-frame notes.
|
|
168
|
+
|
|
169
|
+
```mdx
|
|
170
|
+
<Trace error="TypeError: Cannot read properties of undefined (reading 'kind')">
|
|
171
|
+
<TraceFrame name="toMdxComponent" path="src/remark/directives.ts" lines="64">
|
|
172
|
+
leaf directives have no attributes record
|
|
173
|
+
</TraceFrame>
|
|
174
|
+
<TraceFrame
|
|
175
|
+
name="visit"
|
|
176
|
+
path="node_modules/unist-util-visit/index.js"
|
|
177
|
+
kind="lib"
|
|
178
|
+
/>
|
|
179
|
+
<TraceFrame
|
|
180
|
+
name="remarkMdxrDirectives"
|
|
181
|
+
path="src/remark/directives.ts"
|
|
182
|
+
lines="91"
|
|
183
|
+
/>
|
|
184
|
+
</Trace>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### `<Searches title>` / `<Search pattern path tool hits>` / `:::searches` / `:::search`
|
|
188
|
+
|
|
189
|
+
Query log — provenance for an investigation: which patterns were searched where and how much came back. `pattern` is required; `path` is the scope (`in src/`), `tool` a small mono chip (`rg`, `grep`, …), `hits` a count badge — `0` renders "no hits" so dead ends read as deliberate exclusions. `Searches` adds a totals line; children are notes.
|
|
190
|
+
|
|
191
|
+
```mdx
|
|
192
|
+
<Searches title="How the code was searched">
|
|
193
|
+
<Search pattern="evaluate" path="src/" tool="rg" hits="3" />
|
|
194
|
+
<Search pattern="hydrateRoot" path="src/" tool="rg" hits="0">
|
|
195
|
+
Dead end — there is no client entry point.
|
|
196
|
+
</Search>
|
|
197
|
+
</Searches>
|
|
198
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Layout components
|
|
2
|
+
|
|
3
|
+
Index: [../components.md](../components.md). MDX attributes are always strings; `children` is Markdown.
|
|
4
|
+
|
|
5
|
+
### `<Columns cols="2|3|4">` / `<Column>`
|
|
6
|
+
|
|
7
|
+
Responsive grid layout for side-by-side content (options, before/after).
|
|
8
|
+
|
|
9
|
+
### `<Grid cols min gap flow items>` / `<Cell span rowSpan>`
|
|
10
|
+
|
|
11
|
+
Flexible 12-track grid for anything `<Columns>` can't express: asymmetric splits, dashboards, auto-wrapping card grids. Children that aren't `<Cell>` auto-place one track each.
|
|
12
|
+
|
|
13
|
+
- `cols`: `1`–`12` tracks (default `12`); applies from `sm` up — below that everything stacks.
|
|
14
|
+
- `min`: CSS length (`"12rem"`, `"200px"`) switches to `auto-fit` tracks at **every** viewport — use for card grids that wrap naturally. Overrides `cols`.
|
|
15
|
+
- `gap`: `none|xs|sm|md|lg|xl` (default `md`). `flow`: `row|col|row-dense|col-dense` — `*-dense` backfills gaps in dashboards. `items`: `stretch|start|center|end`.
|
|
16
|
+
- `<Cell>` `span`: `1`–`12` or `full` column span; `rowSpan`: `1`–`4`. Both apply from `sm` up. `className` on either adds arbitrary utilities.
|
|
17
|
+
|
|
18
|
+
```mdx
|
|
19
|
+
<Grid>
|
|
20
|
+
<Cell span="8">Main narrative…</Cell>
|
|
21
|
+
<Cell span="4">Sidebar: meta, links…</Cell>
|
|
22
|
+
</Grid>
|
|
23
|
+
|
|
24
|
+
<Grid cols="4" flow="row-dense">
|
|
25
|
+
<Cell span="2">
|
|
26
|
+
<Stat label="Coverage" value="92%" />
|
|
27
|
+
</Cell>
|
|
28
|
+
<Cell span="2" rowSpan="2">
|
|
29
|
+
Tall notes panel
|
|
30
|
+
</Cell>
|
|
31
|
+
</Grid>
|
|
32
|
+
|
|
33
|
+
<Grid min="14rem" gap="sm">
|
|
34
|
+
<Option title="A" status="recommended">
|
|
35
|
+
…
|
|
36
|
+
</Option>
|
|
37
|
+
<Option title="B" status="considered">
|
|
38
|
+
…
|
|
39
|
+
</Option>
|
|
40
|
+
<Option title="C" status="rejected">
|
|
41
|
+
…
|
|
42
|
+
</Option>
|
|
43
|
+
</Grid>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### `<Row gap items>` / `<Stack gap items>`
|
|
47
|
+
|
|
48
|
+
Flex containers for grouping components. Adjacent JSX elements render with no whitespace between them — margin-less primitives (the shadcn/ui set: `Button`, `Badge`, `Input`, `Switch`, …) end up glued together unless wrapped in `<Row>` or `<Stack>`.
|
|
49
|
+
|
|
50
|
+
- `<Row>`: `flex flex-wrap items-center` — button/badge rows and other inline groups. `gap` default `sm`.
|
|
51
|
+
- `<Stack>`: `flex flex-col` — vertical rhythm for stacked controls. `gap` default `md`.
|
|
52
|
+
- `gap`: `none|xs|sm|md|lg|xl`. `items`: `stretch|start|center|end|baseline`. `className` adds arbitrary utilities.
|
|
53
|
+
|
|
54
|
+
```mdx
|
|
55
|
+
<Row>
|
|
56
|
+
<Button>Default</Button>
|
|
57
|
+
<Button variant="outline">Outline</Button>
|
|
58
|
+
</Row>
|
|
59
|
+
|
|
60
|
+
<Stack gap="sm">
|
|
61
|
+
<Progress value="60" />
|
|
62
|
+
<Skeleton className="h-4 w-40" />
|
|
63
|
+
</Stack>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `<Before>` / `<After>`
|
|
67
|
+
|
|
68
|
+
Semantic before/after panels (red / green header). Wrap in `<Columns>` for side-by-side; `title` overrides the label ("Current" / "Proposed").
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Output artifacts — diffs, graphs, test reports, endpoints, JSON, timing
|
|
2
|
+
|
|
3
|
+
Index: [../components.md](../components.md). MDX attributes are always strings; `children` is Markdown.
|
|
4
|
+
|
|
5
|
+
### ` ```diff ` / ` ```patch ` fences → structured diff cards
|
|
6
|
+
|
|
7
|
+
An ordinary unified-diff fence becomes one card per file: file-type icon, path (editor link when the file exists), a `new file` / `deleted` / `renamed` chip, `+N −M` counts with a proportional stat bar, a copy button, and hunks with dual old/new line numbers. Git meta lines (`index`, `similarity index`, `rename from/to`, modes) collapse into a muted strip. Diffs without `diff --git`/`---`/`+++` headers — bare `+`/`-` streams — still render. `title="path"` in the fence meta supplies the filename when the patch itself lacks headers.
|
|
8
|
+
|
|
9
|
+
````mdx
|
|
10
|
+
```diff title="src/render.ts"
|
|
11
|
+
@@ -40,7 +40,8 @@
|
|
12
|
+
- const out = compile(src);
|
|
13
|
+
+ const doc = compile(src);
|
|
14
|
+
+ const out = minify(doc);
|
|
15
|
+
return out;
|
|
16
|
+
```
|
|
17
|
+
````
|
|
18
|
+
|
|
19
|
+
For word-level inline edits inside prose use `<Ins>`/`<Del>`; for block alternatives use `<Before>`/`<After>`.
|
|
20
|
+
|
|
21
|
+
### `<Comments>` / `<Comment lines side file>` / `:::comments` — line-anchored comment threads
|
|
22
|
+
|
|
23
|
+
GitHub review-comment UX for a fenced block: the **first fenced child** (any ` ```ts ` code block or ` ```diff `/` ```patch ` patch) is the subject, and each `<Comment>` child becomes a thread card rendered **inline under the line it references** — the body is MDX, so ` ```diff ` suggestion fences and inline code just work. Code fences get a line-number gutter automatically.
|
|
24
|
+
|
|
25
|
+
`<Comment>` props in this context:
|
|
26
|
+
|
|
27
|
+
- `lines` — `"40"`, `"40-52"` (inclusive range) or `"40-"` (to EOF). The thread lands under the **last** matching line. `lines` past the end of the block falls back to the file-level strip.
|
|
28
|
+
- `side` — `new` (default) or `old`: which side's line numbers anchor the thread inside a diff (`old` comments get a red `old` chip — for deleted/context lines).
|
|
29
|
+
- `file` — selects the file card in multi-file diffs (old or new path, or the fence `title`); absent/unmatched targets the first card.
|
|
30
|
+
- `author` — avatar initials + name in the thread header.
|
|
31
|
+
- `severity`, `title` — severity pill and a bold headline, same as `<Review>` comments.
|
|
32
|
+
- `href` — overrides the `:lines` chip's editor link.
|
|
33
|
+
|
|
34
|
+
Without `lines` the comment renders at the end of the block — GitHub's file-level comment. Without a fenced child at all, `<Comments>` degrades to the standalone card list.
|
|
35
|
+
|
|
36
|
+
The block is interactive in rendered documents: hovering (or keyboard-focusing) a code/diff row reveals a **+** button that opens a comment form under that line, and every thread ends with a **Reply** button. Reader comments post locally into the page — nothing is sent to a server — and the block's **Copy markdown** button serializes the fence plus every thread (authored and reader-added alike, with their `lines`/`side`/`file`/`author` anchors) back into `<Comments>` markup. Pasting that output over the source block persists the review.
|
|
37
|
+
|
|
38
|
+
````mdx
|
|
39
|
+
<Comments>
|
|
40
|
+
|
|
41
|
+
```diff title="src/render.ts"
|
|
42
|
+
@@ -40,3 +40,4 @@
|
|
43
|
+
const src = await read(path);
|
|
44
|
+
- const out = compile(src);
|
|
45
|
+
+ const doc = compile(src);
|
|
46
|
+
+ const out = minify(doc);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
<Comment lines="41" side="old" author="@alice" severity="high">
|
|
50
|
+
Why was this inlined — is `compile()` still pure?
|
|
51
|
+
</Comment>
|
|
52
|
+
|
|
53
|
+
<Comment lines="41-42" author="@devin">
|
|
54
|
+
The replacement keeps semantics.
|
|
55
|
+
|
|
56
|
+
```diff
|
|
57
|
+
+ const out = minify(compile(src));
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
</Comment>
|
|
61
|
+
|
|
62
|
+
</Comments>
|
|
63
|
+
````
|
|
64
|
+
|
|
65
|
+
Use `<Review>` for a summarized verdict report (severity tally + verdict pill); use `<Comments>` when the threads belong _on_ the code.
|
|
66
|
+
|
|
67
|
+
### `<Graph title direction>` / `<Node>` / `<Edge>` / `:::graph`
|
|
68
|
+
|
|
69
|
+
A static node/edge diagram — the "React Flow" shape without client JS: dagre computes the layout at render time and the output is absolute-positioned node cards over an SVG edge layer (printable, deterministic). Children are `<Node>` and `<Edge>` elements; anything else renders under the diagram.
|
|
70
|
+
|
|
71
|
+
`direction` is `down` (default) / `right` / `up` / `left` — dagre `TB`/`LR`/`BT`/`RL`.
|
|
72
|
+
|
|
73
|
+
`<Node>` props: `id` (required), `label` (display text, defaults to `id`), `note` (muted second line), `icon` (Iconify name), `path` + optional `lines`/`href` (file icon + editor link — something mermaid can't do), `status` (todo|doing|done|blocked → status icon), `external="true"` (dashed "outside the repo" styling).
|
|
74
|
+
|
|
75
|
+
`<Edge>` props: `from` / `to` (required, node ids), `kind` (`imports` `calls` `extends` `implements` `reads` `writes` — same palette as `<Dep>`; edges without `kind` render neutral), `label` (chip at the path midpoint). Edges referencing unknown node ids are dropped.
|
|
76
|
+
|
|
77
|
+
```mdx
|
|
78
|
+
<Graph title="mdx → html pipeline" direction="right">
|
|
79
|
+
<Node id="doc" label="plan.mdx" path="examples/plan.mdx" />
|
|
80
|
+
<Node id="eval" label="evaluate" note="@mdx-js/mdx" />
|
|
81
|
+
<Node id="out" label="out.html" path="examples/out.html" />
|
|
82
|
+
<Edge from="doc" to="eval" kind="reads" />
|
|
83
|
+
<Edge from="eval" to="out" kind="writes" label="static markup" />
|
|
84
|
+
</Graph>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
When the nodes/edges don't need 2-D layout prefer `<Deps>` (a list); for sequence/state/ER diagrams prefer ` ```mermaid `.
|
|
88
|
+
|
|
89
|
+
### `<Tests title tool>` / `<Test name status duration file>` / `:::tests`
|
|
90
|
+
|
|
91
|
+
Structured test-run report. `Tests` renders a caption bar that counts `<Test>` children per status and sums parseable durations (`120ms`, `1.2s`, `2m`); `tool` adds a runner chip (`vitest`, `jest`, …). `Test` needs `name`; `status` is `pass` (default) / `fail` / `skip` / `todo`, `duration` shows right-aligned, `file`/`lines`/`href` link to the test file. Children render as an indented detail block — the failure output for `status="fail"`.
|
|
92
|
+
|
|
93
|
+
```mdx
|
|
94
|
+
<Tests title="render.test.ts" tool="vitest">
|
|
95
|
+
<Test name="renders markdown prose" status="pass" duration="12ms" />
|
|
96
|
+
<Test
|
|
97
|
+
name="rejects invalid props"
|
|
98
|
+
status="fail"
|
|
99
|
+
duration="800ms"
|
|
100
|
+
file="tests/render.test.ts"
|
|
101
|
+
lines="96"
|
|
102
|
+
>
|
|
103
|
+
AssertionError: expected body to contain "Invalid props"
|
|
104
|
+
</Test>
|
|
105
|
+
</Tests>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `<Endpoints title base>` / `<Endpoint method path auth deprecated>` / `:::endpoints`
|
|
109
|
+
|
|
110
|
+
API route inventory. `Endpoint` renders a colored method chip (`GET` `POST` `PUT` `PATCH` `DELETE` `HEAD` `OPTIONS`; case-insensitive), the path in mono (with `base` prefixed in muted text), an optional `auth` chip, a `Deprecated` pill when `deprecated` is set, and children as the description.
|
|
111
|
+
|
|
112
|
+
```mdx
|
|
113
|
+
<Endpoints title="User service" base="/api/v1">
|
|
114
|
+
<Endpoint method="GET" path="/users">
|
|
115
|
+
List users, paginated.
|
|
116
|
+
</Endpoint>
|
|
117
|
+
<Endpoint method="POST" path="/users" auth="admin">
|
|
118
|
+
Create a user.
|
|
119
|
+
</Endpoint>
|
|
120
|
+
<Endpoint method="GET" path="/legacy/users" deprecated="true" />
|
|
121
|
+
</Endpoints>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### `<Json title value open>` — collapsible JSON tree
|
|
125
|
+
|
|
126
|
+
Renders a JSON payload as a nested tree of native `<details>` folds — no client JS; closed nodes show a `N keys`/`N items` badge. Supply the payload either as the `value` string attribute or as a fenced ` ```json ` block child (write the JSON inside the fence — bare `{…}` children are MDX expressions and rejected). `open="false"` starts every level folded. `title` adds a caption bar with a copy button. Values are typed: strings quoted/emerald, numbers sky, booleans violet, `null` dimmed; long strings truncate. Invalid JSON fails the render with `<Json> invalid JSON: …`.
|
|
127
|
+
|
|
128
|
+
````mdx
|
|
129
|
+
<Json title="tool result">
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{ "name": "mdxr", "stats": { "files": 12 }, "tags": ["agent", "render"] }
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
</Json>
|
|
136
|
+
````
|
|
137
|
+
|
|
138
|
+
### `<Waterfall title total unit>` / `<Span name start duration note>` / `:::waterfall`
|
|
139
|
+
|
|
140
|
+
Timing waterfall — OTel-trace-style horizontal bars. Each `<Span>` needs `name` and `duration`; `start` is the offset from zero (both accept numbers or strings like `"120ms"` — the unit suffix is display-only). `total` overrides the scale end (defaults to the latest span end); `unit` labels the axis (default `ms`). Bars are colored by position automatically.
|
|
141
|
+
|
|
142
|
+
```mdx
|
|
143
|
+
<Waterfall title="GET /api/users" unit="ms">
|
|
144
|
+
<Span name="route match" start="0" duration="3ms" />
|
|
145
|
+
<Span name="db query" start="21" duration="120ms" note="users + roles" />
|
|
146
|
+
<Span name="serialize" start="141" duration="9ms" />
|
|
147
|
+
</Waterfall>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### `<Ins>` / `<Del>` — inline edits
|
|
151
|
+
|
|
152
|
+
Semantic `<ins>`/`<del>` inline elements for word-level changes inside a sentence or code span: `<Ins>` renders green with underline, `<Del>` red with strikethrough; `title` sets the hover tooltip. Pair them for a before→after edit.
|
|
153
|
+
|
|
154
|
+
```mdx
|
|
155
|
+
The compiler <Del>concatenates strings</Del> <Ins>streams tokens</Ins> and
|
|
156
|
+
|
|
157
|
+
<Del>always</Del> <Ins>optionally</Ins> minifies the output.
|
|
158
|
+
```
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Planning & status components
|
|
2
|
+
|
|
3
|
+
Index: [../components.md](../components.md). MDX attributes are always strings; `children` is Markdown.
|
|
4
|
+
|
|
5
|
+
### `<Phase title="…" status="todo|doing|done|blocked" owner due>`
|
|
6
|
+
|
|
7
|
+
A section heading with a status badge, plus optional owner chip and deadline. Also produced by `:::phase{title="…"}`.
|
|
8
|
+
|
|
9
|
+
### `<Steps progress>` / `<Step status owner effort priority due>`
|
|
10
|
+
|
|
11
|
+
Ordered, status-aware step list. `progress` on `<Steps>` renders an automatic progress bar counting `<Step>` children. `Step` accepts `owner="…"`, `effort="xs|s|m|l|xl"`, `priority="p0|p1|p2|p3"` and `due="YYYY-MM-DD"` — each renders a chip under the step text.
|
|
12
|
+
|
|
13
|
+
```mdx
|
|
14
|
+
<Steps progress>
|
|
15
|
+
<Step status="done">Read the existing parser</Step>
|
|
16
|
+
<Step status="doing" owner="@alice" priority="p1" due="2026-09-18">
|
|
17
|
+
Add directive transform
|
|
18
|
+
</Step>
|
|
19
|
+
<Step status="todo" effort="m">
|
|
20
|
+
Update snapshots
|
|
21
|
+
</Step>
|
|
22
|
+
</Steps>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### `<Timeline title="…">` / `<Event date status title>`
|
|
26
|
+
|
|
27
|
+
Chronological milestone list with a left rail. `Event` requires `date` (any string), optional `status` (todo|doing|done|blocked) and `title`. Also produced by `:::timeline{title="…"}`.
|
|
28
|
+
|
|
29
|
+
```mdx
|
|
30
|
+
<Timeline title="Milestones">
|
|
31
|
+
<Event date="2026-09-10" status="done" title="Skeleton merged" />
|
|
32
|
+
<Event date="2026-09-30" status="todo" title="v1.0 freeze" />
|
|
33
|
+
</Timeline>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### `<Gantt title start end today>` / `<Task name start end status progress owner note>` / `<Milestone name date status owner note>` / `:::gantt`
|
|
37
|
+
|
|
38
|
+
Date-based schedule chart. `<Task>` needs `name` + `start` (ISO `YYYY-MM-DD`); `end` defaults to `start` (a one-day bar). `status` (todo|doing|done|blocked) colors the bar, `progress="0–100"` shows a partial fill, `owner`/`note` add a muted sub-line. `<Milestone>` needs `name` + `date` and renders a diamond. The range spans the earliest start to the latest end; `start`/`end` on `<Gantt>` override it. A "today" marker is drawn when the render date falls inside the range — disable with `today="false"` or pin it with `today="YYYY-MM-DD"`. Axis ticks are days on short ranges, Mondays mid-range, month starts after.
|
|
39
|
+
|
|
40
|
+
```mdx
|
|
41
|
+
<Gantt title="v1.0 release">
|
|
42
|
+
<Task name="API design" start="2026-09-01" end="2026-09-05" status="done" />
|
|
43
|
+
<Task
|
|
44
|
+
name="Implementation"
|
|
45
|
+
start="2026-09-08"
|
|
46
|
+
end="2026-09-18"
|
|
47
|
+
status="doing"
|
|
48
|
+
progress="40"
|
|
49
|
+
owner="alice"
|
|
50
|
+
/>
|
|
51
|
+
<Task name="Docs" start="2026-09-21" end="2026-09-25" />
|
|
52
|
+
<Milestone name="v1.0 freeze" date="2026-09-30" />
|
|
53
|
+
</Gantt>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `<Decision title="…" status="…" date="…">`
|
|
57
|
+
|
|
58
|
+
Decision record (ADR-lite). `status` is `proposed|accepted|rejected|deprecated| superseded`. Children hold context and rationale. For a one-line record prefer `:::decision` (the Callout kind).
|
|
59
|
+
|
|
60
|
+
```mdx
|
|
61
|
+
<Decision
|
|
62
|
+
title="Use renderToStaticMarkup (sync)"
|
|
63
|
+
status="accepted"
|
|
64
|
+
date="2026-09-12"
|
|
65
|
+
>
|
|
66
|
+
Documents have no data fetching — a synchronous renderer keeps the CLI simple.
|
|
67
|
+
</Decision>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### `<Option title="…" status="recommended|considered|rejected">`
|
|
71
|
+
|
|
72
|
+
Alternative-comparison card. Pair with `<Columns>` for side-by-side layout.
|
|
73
|
+
|
|
74
|
+
```mdx
|
|
75
|
+
<Columns>
|
|
76
|
+
<Option title="Template literals" status="rejected">
|
|
77
|
+
Escaping bugs keep recurring.
|
|
78
|
+
</Option>
|
|
79
|
+
<Option title="Component pipeline" status="recommended">
|
|
80
|
+
Deterministic + validated.
|
|
81
|
+
</Option>
|
|
82
|
+
</Columns>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### `<Risk level="low|medium|high" title="…" mitigation="…">`
|
|
86
|
+
|
|
87
|
+
Risk block with a severity pill; `mitigation` renders a dedicated line.
|
|
88
|
+
|
|
89
|
+
```mdx
|
|
90
|
+
<Risk level="high" title="Ecosystem drift" mitigation="Pin @mdx-js/mdx">
|
|
91
|
+
`evaluate()` semantics changed across majors before.
|
|
92
|
+
</Risk>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### `<Approvals>` / `<Approval name role status date>`
|
|
96
|
+
|
|
97
|
+
Sign-off list. `status` is `pending|approved|rejected|changes-requested`; children render as a comment next to the approver.
|
|
98
|
+
|
|
99
|
+
```mdx
|
|
100
|
+
<Approvals>
|
|
101
|
+
<Approval name="alice" role="tech lead" status="approved" date="2026-09-14" />
|
|
102
|
+
<Approval name="bob" role="security" status="pending" />
|
|
103
|
+
</Approvals>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### `<Stats>` / `<Stat value label delta>`
|
|
107
|
+
|
|
108
|
+
Metric card grid. `delta` colors by sign (`"+12"` green, `"-34%"` red).
|
|
109
|
+
|
|
110
|
+
### `<Priority level="p0|p1|p2|p3">` / `<Effort size="xs|s|m|l|xl">` / `<Due date="YYYY-MM-DD">` / `<Owner name="…" role="…">`
|
|
111
|
+
|
|
112
|
+
Inline chips: priority pill, T-shirt effort estimate (children = e.g. `3d`), deadline chip colored by urgency at render time (overdue → red, ≤3d → amber), and an initials-avatar person chip.
|
|
113
|
+
|
|
114
|
+
### `<Reqs>` / `<Req id="REQ-1" status="…">`
|
|
115
|
+
|
|
116
|
+
Requirement / acceptance-criteria rows: `id` renders a mono chip, optional `status` (todo|doing|done|blocked) a badge; children are the requirement text.
|
|
117
|
+
|
|
118
|
+
### `<Board title>` / `<Lane title status>` / `<BoardCard title>` / `:::board`
|
|
119
|
+
|
|
120
|
+
Kanban board — `Lane`s lay out side by side (horizontal scroll on narrow viewports); the header shows a status dot plus a card-count badge. `BoardCard` requires `title`; optional `status` icon plus the same inline chips as `Step` (`priority`, `effort`, `owner`, `due`); children are a muted description. Interactive: readers can drag cards between lanes (or use the ‹ › buttons on each card), and "Copy markdown" copies the current arrangement as `<Board>` markup to paste back into the source.
|
|
121
|
+
|
|
122
|
+
```mdx
|
|
123
|
+
<Board title="Sprint 12">
|
|
124
|
+
<Lane title="Todo" status="todo">
|
|
125
|
+
<BoardCard title="Write migration guide" priority="p1" owner="alice" />
|
|
126
|
+
</Lane>
|
|
127
|
+
<Lane title="In progress" status="doing">
|
|
128
|
+
<BoardCard title="Graph component" status="doing" due="2026-09-20">
|
|
129
|
+
dagre layout + svg edges
|
|
130
|
+
</BoardCard>
|
|
131
|
+
</Lane>
|
|
132
|
+
<Lane title="Done" status="done">
|
|
133
|
+
<BoardCard title="Ship v0.1" status="done" />
|
|
134
|
+
</Lane>
|
|
135
|
+
</Board>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### `<Matrix title cols="…">` / `:::matrix{cols="…"}`
|
|
139
|
+
|
|
140
|
+
Comparison matrix. `cols` is a comma-separated header row; each top-level list item is one matrix row — the item text before the first `|` is the row label, the `|`-separated rest are cells. Cell values `yes`/`ok`/`✓`/`○`, `no`/`✗`/`×`/`ng`, `partial`/`~`/`△`/`warn`, and `-`/`—`/`?` render as icons; anything else renders as text.
|
|
141
|
+
|
|
142
|
+
```mdx
|
|
143
|
+
<Matrix title="Renderer comparison" cols="mdxr, raw mdx, astro">
|
|
144
|
+
- standalone html | yes | no | partial - editor links | yes | no | no -
|
|
145
|
+
hydration | no | yes | yes
|
|
146
|
+
</Matrix>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### `<Summary done="3" total="8" label="Progress" />`
|
|
150
|
+
|
|
151
|
+
Progress bar.
|
|
152
|
+
|
|
153
|
+
### `<StatusBadge status="…" />`
|
|
154
|
+
|
|
155
|
+
Standalone status pill.
|