rapier-html 1.2.12 → 1.2.15

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/BUILD.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "package": "rapier-html",
3
- "version": "1.2.12",
3
+ "version": "1.2.15",
4
4
  "path": "dist/rapier.html",
5
- "bytes": 5252185,
6
- "sha256": "3f6e80c2bc5f8a5c1e5bad1826abc15b08ad11347c3c92a4005da1a0f136970e",
7
- "builtAt": "2026-10-18T14:10:49.865Z",
5
+ "bytes": 5256020,
6
+ "sha256": "0ddaf7fd3564de7c9edbe954e21f2294993f851c3d9de37c1a465ebe6e3d381a",
7
+ "builtAt": "2026-10-19T02:29:57.696Z",
8
8
  "node": "v22.23.3",
9
9
  "canonical": true,
10
10
  "packing": "zopfli",
package/README.md CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  Turn Markdown into one offline HTML file that contains the full Rapier editor. It opens in any browser, on a phone or
4
4
  computer, with no account. People read, edit, draw and paint; agents hand over documents, show what changed and get
5
- the edited copy back. Start with `npx rapier-html@1.2.12 notes.md`.
5
+ the edited copy back. Start with `npx rapier-html@1.2.15 notes.md`.
6
6
 
7
7
  Use it for a plan to rearrange, a guide to annotate, a draft to keep writing, or a revision to review. The file works
8
8
  without any hosted workspace.
9
9
 
10
10
  - The page writes, saves Markdown, exports Word, PDF and a web page, and prints. It needs no account and fetches
11
11
  nothing to open, edit or save. It is the base editor (about 1.7 MB) with the plug-ins the document displays with
12
- (Math, Mermaid); `--include draw` adds drawing and painting. Notes never travel.
12
+ (Math, Mermaid, and page layout for a template page); `--include draw` adds drawing and painting. Notes never travel.
13
13
  - `--return` adds a one-use Send back address from the agent door.
14
14
  - `--view draw` opens on Draw. `--compare original.md` opens the edit with its diff; `--by <name>` attributes it.
15
15
  - `writePage(text, name)` makes the page in one call; `unwrap` gives the document back, exactly.
@@ -17,14 +17,14 @@ without any hosted workspace.
17
17
  Needs Node 22 or newer.
18
18
 
19
19
  ```sh
20
- npx -- rapier-html@1.2.12 notes.md # the editor, notes.md inside it, written beside the file
21
- npx -- rapier-html@1.2.12 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
22
- npx -- rapier-html@1.2.12 notes.md --include draw,math # carries Draw and Math (default: what the document needs)
23
- npx -- rapier-html@1.2.12 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
24
- npx -- rapier-html@1.2.12 revised.md --compare original.md # opens showing what changed
25
- npx -- rapier-html@1.2.12 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
26
- npx -- rapier-html@1.2.12 notes.md out.html # a named output
27
- npm install rapier-html@1.2.12 # as a library: writePage, unwrap
20
+ npx -- rapier-html@1.2.15 notes.md # the editor, notes.md inside it, written beside the file
21
+ npx -- rapier-html@1.2.15 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
22
+ npx -- rapier-html@1.2.15 notes.md --include draw,math # carries Draw and Math (default: what the document needs)
23
+ npx -- rapier-html@1.2.15 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
24
+ npx -- rapier-html@1.2.15 revised.md --compare original.md # opens showing what changed
25
+ npx -- rapier-html@1.2.15 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
26
+ npx -- rapier-html@1.2.15 notes.md out.html # a named output
27
+ npm install rapier-html@1.2.15 # as a library: writePage, unwrap
28
28
  ```
29
29
 
30
30
  The first `--` is for npm, so `--help` reaches the command. It never overwrites a file.
package/dist/page.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  // rapier-html: Markdown to one offline HTML file that carries its exact source, and back.
3
- export type Part = 'drawing' | 'math' | 'mermaid';
3
+ export type Part = 'drawing' | 'layout' | 'math' | 'mermaid';
4
4
  export type DocKind = 'markdown' | 'text' | 'code';
5
5
  export interface WrapOptions {
6
6
  kind?: DocKind;
package/dist/page.mjs CHANGED
@@ -11,10 +11,11 @@ export async function writePage(text, name = 'document.md', {include, ...options
11
11
  const carries = include ?? [...(options.view === 'draw' || options.drawing != null ? ['drawing'] : []), ...portableNeeds(String(text), {base: options.base})];
12
12
  return wrap(carry(await carriedPage(), carries), text, name, options);
13
13
  }
14
- const USAGE = 'usage: rapier-html <document.md> [out.html] [--include draw,math,mermaid] [--view draw] [--drawing sketch.svg] [--compare original.md [--by <your name>]] [--return <url> --return-expires-at <timestamp>]\n' +
14
+ const USAGE = 'usage: rapier-html <document.md> [out.html] [--include draw,layout,math,mermaid] [--view draw] [--drawing sketch.svg] [--compare original.md [--by <your name>]] [--return <url> --return-expires-at <timestamp>]\n' +
15
15
  ' writes <document>.rapier.html beside the file: Rapier with the document inside it, one file, offline.\n' +
16
16
  ' It never overwrites: an output that already exists, the document itself included, is refused.\n' +
17
- ' --include what the file carries beyond the base editor: draw (drawing and painting), math, mermaid, or none;\n' +
17
+ ' --include what the file carries beyond the base editor: draw (drawing and painting), layout (a template page), math,\n' +
18
+ ' mermaid, or none;\n' +
18
19
  ' by default, the plug-ins the document displays with, and Draw for --view draw or --drawing\n' +
19
20
  ' --view draw: opens the page on Draw (sketch and paint, the document behind it)\n' +
20
21
  ' --drawing carries an SVG drawing alongside the document, opened on Draw as the page boots\n' +
@@ -40,7 +41,7 @@ export async function main(argv, pagesDir, {log = console.log} = {}) {
40
41
  }
41
42
  else if (arg === '--include') {
42
43
  const listed = argv[i + 1] === 'none' ? [] : String(argv[i + 1] || '').split(',');
43
- if (include !== null || listed.some(item => !['draw', 'math', 'mermaid'].includes(item))) throw new Error('--include takes draw, math and mermaid, comma-separated, or none');
44
+ if (include !== null || listed.some(item => !['draw', 'layout', 'math', 'mermaid'].includes(item))) throw new Error('--include takes draw, layout, math and mermaid, comma-separated, or none');
44
45
  include = listed.map(item => item === 'draw' ? 'drawing' : item);
45
46
  i++;
46
47
  }