rapier-markdown-kit 1.1.19 → 1.1.21

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.
Files changed (2) hide show
  1. package/README.md +14 -35
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -18,21 +18,6 @@ import {parseWill} from 'rapier-markdown-kit/will'; // Will/1 markers: kee
18
18
  import {parseAssets} from 'rapier-markdown-kit/assets'; // the picture appendix
19
19
  ```
20
20
 
21
- **What it does**
22
- - Parses, validates and writes back the `md-layout:v1` comment that places a picture: width, wrap,
23
- position.
24
- - Lays text out around a picture's shape exactly as Rapier does, given the host's font metrics.
25
- - Reads and writes colour and page-break marks.
26
- - Reads Will/1 markers (a separate, optional standard) and says what a region's law allows.
27
- - Reads the picture appendix, the reference definitions a document's pictures live in, without decoding
28
- a picture.
29
- - Styles rendered Markdown with the same self-contained sheet Rapier and its exported pages use.
30
-
31
- **What it is not**
32
- - Not the editor, not Draw, not the image decoders. Every convention is plain Markdown or an HTML
33
- comment other readers ignore. The text layout engine it uses, Pretext, is vendored with its own MIT
34
- licence.
35
-
36
21
  ## What it gives you
37
22
 
38
23
  | Import | What it is |
@@ -45,8 +30,8 @@ import {parseAssets} from 'rapier-markdown-kit/assets'; // the picture appendi
45
30
  | `rapier-markdown-kit/style.css` | The reference style: type, lists, tables, tasks, pictures and the document's other markup, scoped to `.md-render`. |
46
31
  | `rapier-markdown-kit` | All five in one import. |
47
32
 
48
- Every convention here is plain Markdown or an HTML comment that other readers ignore. Laying lines
49
- out exactly as Rapier does also takes the same font metrics, which the host supplies (below).
33
+ Every convention is plain Markdown or an HTML comment other readers ignore. Laying lines out as Rapier does takes
34
+ the host's font metrics (below).
50
35
 
51
36
  ## Render with the reference style
52
37
 
@@ -56,17 +41,11 @@ link it with `<link rel="stylesheet" href="style.css">`. Put rendered content in
56
41
  on that root chooses one. Its `--md-*` properties are defined by the sheet itself. Geist and Geist Mono
57
42
  are named font families with system fallbacks; no font or external asset is fetched by the sheet.
58
43
 
59
- This runnable example supplies `markdown-it` as the renderer and the kit as the convention readers.
60
- Save the following as `render.mjs`, run `npm install rapier-markdown-kit markdown-it@15`, then
61
- `node render.mjs`. Open `styled.html`; it uses only `style.css` for its document styles. The function
62
- below belongs to the example, not to the package API.
63
-
64
- The example renders trusted Markdown, including its HTML. It demonstrates core Markdown, GFM tables,
65
- an aligned paragraph, a sized picture, a named text colour and a page break. Tasks,
66
- footnotes and other extensions use the caller's Markdown plugins; details use ordinary HTML.
67
- In a Rapier page, supported Mermaid flowchart fences also draw offline in Rapier's look, so an agent can write a fence or use figures. The kit itself does not render diagrams.
68
- The complete markup contract, including callouts, diagrams, math and image wrapping, is
69
- [Reference style](https://github.com/jackskip22/rapier/blob/main/docs/markdown-standard.md#reference-style).
44
+ The example below renders trusted Markdown with `markdown-it` and the kit's readers: run
45
+ `npm install rapier-markdown-kit markdown-it@15`, save it as `render.mjs`, run `node render.mjs` and open
46
+ `styled.html`, which uses only `style.css`. It shows core Markdown, GFM tables, an aligned paragraph, a sized
47
+ picture, a named colour and a page break; tasks, footnotes and diagrams are the caller's plugins. The full markup
48
+ contract is [Reference style](https://github.com/jackskip22/rapier/blob/main/docs/markdown-standard.md#reference-style).
70
49
 
71
50
  <!-- reference-style-example -->
72
51
  ```js
@@ -236,12 +215,11 @@ The appendix parser takes a markdown-it-compatible parser factory from the calle
236
215
  node node_modules/rapier-markdown-kit/dist/kit/conformance/run.mjs
237
216
  ```
238
217
 
239
- Thirteen small documents, each with the line boxes Rapier's own export produced for it. The runner
240
- reports two things separately. **Preservation**: every layout comment round-trips exactly (12 of
241
- the 12 documents that carry one). **Presentation**: how closely the planned lines match (4 agree
242
- within 2px, 9 are close, none differ); each close row has a named cause, given in the runner's
243
- output and in `dist/kit/conformance/README.md`. `--impl path/to/module.mjs` runs another
244
- implementation against the same documents; `--tolerance 2` sets the pixel tolerance.
218
+ Thirteen small documents, each with the line boxes Rapier's own export produced for it. **Preservation**: every
219
+ layout comment round-trips exactly (12 of 12 that carry one). **Presentation**: how closely the planned lines match
220
+ (4 agree within 2px, 9 are close with a named cause, none differ; `dist/kit/conformance/README.md`).
221
+ `--impl path/to/module.mjs` runs another implementation against the same documents; `--tolerance 2` sets the pixel
222
+ tolerance.
245
223
 
246
224
  ## Licence
247
225
 
@@ -252,4 +230,5 @@ value the editor's release reads.
252
230
 
253
231
  ## Where the modules live
254
232
 
255
- Each module of the standard has one home in the Rapier source (`spec/`, `layout/`, `agent/`), where Rapier itself reads it; `dist/` is that closure copied byte for byte, so an installed copy needs nothing beside it. `style.css` is copied byte for byte from the same `spec/markdown-style.css` that Rapier bundles.
233
+ Each module has one home in the Rapier source (`spec/`, `layout/`, `agent/`), where Rapier itself reads it; `dist/`
234
+ is that closure copied byte for byte, and `style.css` is the same `spec/markdown-style.css` Rapier bundles.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapier-markdown-kit",
3
- "version": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "description": "Read, write and style Self-contained Markdown: the universal stylesheet, picture layout, text marks, picture appendix, line planner and Will/1 markers. MIT, no dependencies.",
5
5
  "author": "Jack Skipworth",
6
6
  "license": "MIT",