rapier-markdown-kit 1.1.0 → 1.1.1

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 +24 -11
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,21 +1,34 @@
1
1
  # rapier-markdown-kit
2
2
 
3
- Read and write the Rapier Markdown standard -- picture layout, text marks, Will intent markers and
4
- the picture appendix -- and lay text out around pictures exactly as Rapier does, without taking the
5
- Rapier editor.
6
-
7
- **MIT. No Rapier required. No npm dependencies.** The text layout engine it uses, Pretext, is
8
- vendored inside the package with its own MIT licence. Nothing from the editor, Draw, the image
9
- decoders or the apps is in here.
10
-
11
- ## Install
12
-
13
- Node 22 or newer:
3
+ Read and write Rapier Markdown without the editor: picture layout, text marks, the line planner, Will
4
+ markers and the picture appendix. MIT, no dependencies, Node 22 or newer.
14
5
 
15
6
  ```sh
16
7
  npm install rapier-markdown-kit
17
8
  ```
18
9
 
10
+ ```js
11
+ import {parseLayout} from 'rapier-markdown-kit/layout'; // the md-layout comment a picture carries
12
+ import {scanColorMarkers, formatPageBreak} from 'rapier-markdown-kit/marks'; // colour runs and page breaks
13
+ import {flowLines} from 'rapier-markdown-kit/model'; // the line planner: text around pictures
14
+ import {parseWill} from 'rapier-markdown-kit/will'; // Will/1 markers: keep, append, edit
15
+ import {parseAssets} from 'rapier-markdown-kit/assets'; // the picture appendix
16
+ ```
17
+
18
+ **What it does**
19
+ - Parses, validates and writes back the `md-layout:v1` comment that places a picture: width, wrap,
20
+ position.
21
+ - Lays text out around a picture's shape exactly as Rapier does, given the host's font metrics.
22
+ - Reads and writes colour and page-break marks.
23
+ - Reads Will/1 markers (a separate, optional standard) and says what a region's law allows.
24
+ - Reads the picture appendix, the reference definitions a document's pictures live in, without decoding
25
+ a picture.
26
+
27
+ **What it is not**
28
+ - Not the editor, not Draw, not the image decoders. Every convention is plain Markdown or an HTML
29
+ comment other readers ignore. The text layout engine it uses, Pretext, is vendored with its own MIT
30
+ licence.
31
+
19
32
  ## What it gives you
20
33
 
21
34
  | Import | What it is |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rapier-markdown-kit",
3
- "version": "1.1.0",
4
- "description": "The Rapier Markdown standard's layout grammar, occupancy model, line planner, Will grammar and picture appendix -- MIT, no Rapier required.",
3
+ "version": "1.1.1",
4
+ "description": "Read and write Rapier Markdown without the editor: picture layout, text marks, the line planner, Will markers and the picture appendix. MIT, no dependencies.",
5
5
  "author": "Jack Skipworth",
6
6
  "license": "MIT",
7
7
  "type": "module",