rapier-html 1.1.87 → 1.1.88

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.1.87",
3
+ "version": "1.1.88",
4
4
  "path": "dist/rapier.html",
5
- "bytes": 2268085,
6
- "sha256": "de1f732bce1e8292ff1d967eca0e2c5d2251d52dd9cbf24cdb880120ededb4c4",
7
- "builtAt": "2026-10-09T07:07:05.331Z",
5
+ "bytes": 2292911,
6
+ "sha256": "e1fe37abd18601a1dc4b3b216c664abbe1d359304ba44553d73e7959a6251660",
7
+ "builtAt": "2026-10-09T17:36:28.753Z",
8
8
  "node": "v22.23.3",
9
9
  "canonical": true,
10
10
  "packing": "zopfli",
package/README.md CHANGED
@@ -6,25 +6,25 @@ editor, offline, with the document inside.
6
6
  Use it for a plan to rearrange, an illustrated guide to annotate, a draft to continue writing, or a revision
7
7
  to review. Text and drawings stay editable, and the file remains usable independently of a hosted workspace.
8
8
 
9
- - The page writes, draws and paints, saves Markdown, exports a web page and prints, with no account and nothing
10
- fetched to open, edit or save.
9
+ - The page writes, draws and paints, saves Markdown, exports Word, PDF and a web page, and prints, with no account
10
+ and nothing fetched to open, edit or save.
11
11
  - `--return` adds a one-use Send back address from the agent door: the person edits offline, presses Send back,
12
12
  and the agent reads the returned copy.
13
- - `--view draw` opens on Draw; `--base original.md` opens on the diff of a proposed change, and the person keeps
13
+ - `--view draw` opens on Draw; `--propose original.md` opens on the diff of a proposed change, and the person keeps
14
14
  or drops each change; `--by <name>` says on that diff who proposed it and when.
15
15
  - `wrap` and `unwrap` carry a document into a page and out again, exactly, for programs.
16
16
 
17
17
  Node 22 or newer.
18
18
 
19
19
  ```sh
20
- npx -- rapier-html@1.1.87 notes.md # the editor, notes.md inside it, written beside the file
21
- npx -- rapier-html@1.1.87 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
22
- npx -- rapier-html@1.1.87 notes.md --view notes # opens the Notes library
23
- npx -- rapier-html@1.1.87 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
24
- npx -- rapier-html@1.1.87 proposal.md --base original.md # opens on the diff of a proposed change
25
- npx -- rapier-html@1.1.87 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
26
- npx -- rapier-html@1.1.87 notes.md out.html # a named output
27
- npm install rapier-html@1.1.87 # as a library: wrap, unwrap
20
+ npx -- rapier-html@1.1.88 notes.md # the editor, notes.md inside it, written beside the file
21
+ npx -- rapier-html@1.1.88 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
22
+ npx -- rapier-html@1.1.88 notes.md --view notes # opens the Notes library
23
+ npx -- rapier-html@1.1.88 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
24
+ npx -- rapier-html@1.1.88 --propose original.md proposal.md # opens on the diff of a proposed change
25
+ npx -- rapier-html@1.1.88 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
26
+ npx -- rapier-html@1.1.88 notes.md out.html # a named output
27
+ npm install rapier-html@1.1.88 # as a library: wrap, unwrap
28
28
  ```
29
29
 
30
30
  The first `--` is for npm, so `--help` reaches the command. It never overwrites a file.
@@ -86,18 +86,12 @@ fact of the file and written back on Save.
86
86
  ## Safety
87
87
 
88
88
  - It never overwrites: an existing output, the document itself included, is refused, as are unknown options, a
89
- `--view` other than `draw` or `notes`, a `--drawing` or `--base` with no file, a return without its expiry, an
89
+ `--view` other than `draw` or `notes`, a `--drawing` or `--propose` with no file, a return without its expiry, an
90
90
  invalid expiry, an unsafe return URL and a third filename.
91
91
  - Nothing reports on the page's use. It reaches the network only when the document or the person asks: a linked
92
- picture or video, the maths, diagram and PDF-import helpers on first use, or Send back. A return URL names only
93
- the worker's exact origin and route; credentials, query strings and fragments are refused.
94
-
95
- ## Licence
96
-
97
- AGPL-3.0-only (`LICENSE`): the page is the Rapier editor with the notices of the libraries it carries.
98
- The Markdown standard without the editor is `rapier-markdown-kit` (MIT). Rapier is https://rapier.website.
99
- `BUILD.json` records the page's size, SHA-256, build time and Node version.
100
-
92
+ picture or video, a plug-in on first use (maths, diagrams, PDF import, text in pictures, a letter set), or
93
+ Send back. A return URL names only the worker's exact origin and route; credentials, query strings and fragments
94
+ are refused.
101
95
 
102
96
  ## Optional edit history
103
97
 
@@ -110,3 +104,9 @@ of attaching false history. Saved Markdown written with the kit's
110
104
  `ledger/carried.writeDocument` is read automatically when wrapping. Rewrapping a
111
105
  page without parts drops its previous document's parts. Published npm files carry
112
106
  their own staged MIT validator closure; no source checkout is needed.
107
+
108
+ ## Licence
109
+
110
+ AGPL-3.0-only (`LICENSE`): the page is the Rapier editor with the notices of the libraries it carries.
111
+ The Markdown standard without the editor is `rapier-markdown-kit` (MIT). Rapier is https://rapier.website.
112
+ `BUILD.json` records the page's size, SHA-256, build time and Node version.
package/dist/page.mjs CHANGED
@@ -4,15 +4,14 @@ import {basename, dirname, join} from 'node:path';
4
4
  import {wrap} from './wrap.mjs';
5
5
  import {returnAddress, returnExpiresAt} from './return-address.mjs';
6
6
  export {wrap, unwrap, encodeCarried, decodeCarried} from './wrap.mjs';
7
- // Unknown options, a bare --drawing or --base and a third name are refused, never dropped.
8
- const USAGE = 'usage: rapier-html <document.md> [out.html] [--view draw|notes] [--drawing sketch.svg] [--base original.md [--by <your name>]] [--return <url> --return-expires-at <timestamp>]\n' +
7
+ // Unknown options, a bare --drawing or --propose and a third name are refused, never dropped.
8
+ const USAGE = 'usage: rapier-html <document.md> [out.html] [--view draw|notes] [--drawing sketch.svg] [--propose original.md [--by <your name>]] [--return <url> --return-expires-at <timestamp>]\n' +
9
9
  ' writes <document>.rapier.html beside the file: Rapier with the document inside it, one file, offline.\n' +
10
10
  ' It never overwrites: an output that already exists, the document itself included, is refused.\n' +
11
11
  ' --view opens the page on Draw (sketch and paint, the document behind it) or on Notes\n' +
12
12
  ' --drawing carries an SVG drawing alongside the document, opened on Draw as the page boots\n' +
13
- ' --propose <base.md> <proposed.md>: carries the original base for per-change review\n' +
14
- ' --base the older spelling of --propose; carries the text the document was proposed against; the page opens on their diff\n' +
15
- ' --by with --base: who proposes it, shown on the diff with the time the page was made\n' +
13
+ ' --propose carries the text the document was proposed against; the page opens on their diff for per-change review\n' +
14
+ ' --by with --propose: who proposes it, shown on the diff with the time the page was made\n' +
16
15
  ' --return carries a one-use return URL from document.create_return; Share offers Send back\n' +
17
16
  ' --return-expires-at carries the same mint\'s expiry; Share offers Save once the return expires\n' +
18
17
  ' -- everything after it is a filename, even one that starts with a dash\n' +
@@ -29,8 +28,8 @@ export async function main(argv, pagesDir, {log = console.log} = {}) {
29
28
  if (view !== null || !['draw', 'notes'].includes(argv[i + 1])) throw new Error('--view takes draw or notes');
30
29
  view = argv[++i];
31
30
  }
32
- else if (arg === '--base' || arg === '--propose') {
33
- if (basePath !== null || !argv[i + 1] || argv[i + 1].startsWith('-')) throw new Error('--base takes one text file (write a name that starts with a dash as ./-original.md)');
31
+ else if (arg === '--propose') {
32
+ if (basePath !== null || !argv[i + 1] || argv[i + 1].startsWith('-')) throw new Error('--propose takes one text file (write a name that starts with a dash as ./-original.md)');
34
33
  basePath = argv[++i];
35
34
  }
36
35
  else if (arg === '--by') {
@@ -57,7 +56,7 @@ export async function main(argv, pagesDir, {log = console.log} = {}) {
57
56
  const out = named || join(dirname(input), name.replace(/\.(md|markdown|txt)$/i, '') + '.rapier.html');
58
57
  const wrapOptions = {};
59
58
  if (drawingPath) { wrapOptions.drawing = await readFile(drawingPath, 'utf8'); wrapOptions.drawingName = basename(drawingPath); }
60
- if (by !== null && !basePath) throw new Error('--by names who proposes a change: give the --base it proposes over');
59
+ if (by !== null && !basePath) throw new Error('--by names who proposes a change: give the --propose file it proposes over');
61
60
  if (basePath) { wrapOptions.base = await readFile(basePath, 'utf8'); wrapOptions.baseName = basename(basePath); wrapOptions.at = new Date().toISOString(); }
62
61
  if (by !== null) { wrapOptions.by = by; wrapOptions.at = new Date().toISOString(); }
63
62
  if (view) wrapOptions.view = view;