rapier-html 1.1.19 → 1.1.24

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.19",
3
+ "version": "1.1.24",
4
4
  "path": "rapier.html",
5
- "bytes": 1538239,
6
- "sha256": "b955f177413a2b179cfb93cba5651d8912cd8e14bc6d223ab9d82cb613ca2772",
7
- "builtAt": "2026-09-30T08:23:40.102Z",
5
+ "bytes": 1572823,
6
+ "sha256": "0958a43c151f90770436304c2900f9823de3d0598f025b1c027b4f14ed5925bf",
7
+ "builtAt": "2026-09-30T20:12:53.753Z",
8
8
  "node": "v22.22.2",
9
9
  "canonical": true,
10
10
  "packing": "zopfli",
package/README.md CHANGED
@@ -4,75 +4,40 @@ Rapier, the offline Markdown editor, as one HTML page with your document inside
4
4
  install, nothing fetched to open, edit or save. Node 22 or newer.
5
5
 
6
6
  ```sh
7
- npx -- rapier-html@1.1.19 notes.md # the editor, notes.md inside it, written beside the file
8
- npx -- rapier-html@1.1.19 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
9
- npx -- rapier-html@1.1.19 notes.md --view notes # opens on Notes: the document as cards
10
- npx -- rapier-html@1.1.19 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
11
- npx -- rapier-html@1.1.19 proposal.md --base original.md # opens on the diff of a proposed change
12
- npx -- rapier-html@1.1.19 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
13
- npx -- rapier-html@1.1.19 notes.md out.html # a named output
14
- npm install rapier-html@1.1.19 # as a library: wrap, unwrap
7
+ npx -- rapier-html@1.1.24 notes.md # the editor, notes.md inside it, written beside the file
8
+ npx -- rapier-html@1.1.24 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
9
+ npx -- rapier-html@1.1.24 notes.md --view notes # opens on Notes: the document as cards
10
+ npx -- rapier-html@1.1.24 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
11
+ npx -- rapier-html@1.1.24 proposal.md --base original.md # opens on the diff of a proposed change
12
+ npx -- rapier-html@1.1.24 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
13
+ npx -- rapier-html@1.1.24 notes.md out.html # a named output
14
+ npm install rapier-html@1.1.24 # as a library: wrap, unwrap
15
15
  ```
16
16
 
17
17
  The first `--` is for npm, so `--help` reaches the command. It never overwrites a file.
18
18
 
19
- ## What the page can do
20
-
21
- **Write**
22
- - Markdown the way it reads: headings, lists, checklists, tables, code, quotes, footnotes, pictures placed
23
- around text.
24
- - Find and replace, Undo, a source view of the exact bytes.
25
- - Supported Mermaid flowchart fences draw offline in Rapier's look, so an agent can write a fence or use figures; other diagrams and math use optional plugins.
26
-
27
- **Draw and paint**
28
- - Shapes, lines, arrows, text on a canvas that goes into the document as a picture.
29
- - Paint with real brushes: pencil, pen, ink, watercolour that runs and dries, oil that mixes, a smudge
30
- finger; dip the brush for more paint or more water.
31
- - Your own brush files, a dropper, paint laid over the drawing as a layer of its own.
32
-
33
- **Notes**
34
- - The document as cards: sections, drag to reorder, search across every note.
35
- - Voice recordings, reminders, a recycle bin that keeps seven days.
36
- - Import from Keep, Notion, Evernote, Joplin, Bear, Simplenote, OneNote, Obsidian and more.
37
-
38
- **Review a change**
39
- - Open on the diff of a proposal against the original; keep or drop each change; nothing applies until
40
- the person says so.
41
- - Will markers in the Markdown say what an agent may change: `keep`, `append`, `edit`.
42
-
43
- **Keep it**
44
- - Save to the device, share the page on, open it again anywhere a browser is; offline throughout.
45
- - Export the document as Markdown or as a web page; print it.
46
-
47
- **For agents**
48
- - Hand a person a document, a sketch or a change as one file that opens with one click.
49
- - What they save comes back byte for byte through `unwrap`.
50
- - Add the return URL from `document.create_return`: the person edits the page and presses Send back;
51
- `document.wait_for_user` wakes the agent, which reads the exact returned Markdown and continues.
19
+ The page is the whole editor: write, draw and paint, the document as Notes cards, Find and replace, Undo, a
20
+ source view of the exact bytes; save to the device, share the page on, export Markdown or a web page, print; all
21
+ offline. Opened with `--base` it shows the diff of a proposal against the original, and the person keeps or drops
22
+ each change. Will markers in the Markdown say what an agent may change: `keep`, `append`, `edit`.
52
23
 
53
24
  ## Send an edited document back
54
25
 
55
- Call `document.create_return` on the Rapier agent door for the document's workspace. Pass its
56
- `return_url` and `return_expires_at` as `--return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT"`
57
- or `wrap(..., {return: return_url, return_expires_at})`. Both values come from the same mint. Only the worker's
58
- HTTPS return route at `https://mcp.rapier.website/return/…` is accepted. The page shows Send back
59
- in Share; a page without an address has no such action.
60
-
61
- The person reads and edits offline, then presses Send back when ready. That press sends the current
62
- source and filename once, and shows acceptance or the worker's refusal. After acceptance, that page
63
- sends nothing again. Save to the device stays local. The return URL lasts up to one day, accepts one
64
- document up to 25 MiB, and grants no read or edit access to the agent's workspace.
26
+ Call `document.create_return` on the Rapier agent door for the document's workspace and pass its `return_url`
27
+ and `return_expires_at` as `--return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT"`, or
28
+ `wrap(..., {return: return_url, return_expires_at})`. Only the worker's HTTPS return route at
29
+ `https://mcp.rapier.website/return/…` is accepted. The page then shows Send back in Share; a page without an
30
+ address has no such action.
65
31
 
66
- Once the carried expiry passes, Share offers Save in place of Send back: the work is safe on the page.
67
- A used or expired return refused by the worker offers the same Save. Saving keeps the current words,
68
- filename, byte-order mark and line endings through the normal local save path. Bring that file back to the
69
- assistant, which compares it against the workspace's current work and creates a fresh return for the next
70
- handoff; the old capability stays spent.
32
+ The person edits offline and presses Send back: the current source and filename go once, the page shows the
33
+ acceptance or the worker's refusal, and it sends nothing again. The return lasts up to one day, takes one
34
+ document up to 25 MiB and grants no access to the agent's workspace. After the expiry, or a refusal, Share offers
35
+ Save instead; bring that file back to the assistant for a fresh return.
71
36
 
72
- The agent's `document.wait_for_user` returns a `returned` receipt with the `return_id`, name and time.
73
- `document.get_context` lists receipts even when no agent was waiting. Read the source with
74
- `document.read_context({return_id, start: 0})`, continuing at the returned `end` until `complete`.
75
- The returned copy stays separate from the workspace's current document, so newer work survives too.
37
+ The agent's `document.wait_for_user` returns a `returned` receipt with the `return_id`, name and time;
38
+ `document.get_context` lists receipts; `document.read_context({return_id, start: 0})` reads the source,
39
+ continuing at the returned `end` until `complete`. The returned copy stays separate from the workspace's
40
+ current document.
76
41
 
77
42
  ## As a library
78
43
 
@@ -89,9 +54,9 @@ console.log('words back exactly:', unwrap(page).text === words);
89
54
  await writeFile('hello.rapier.html', page, {flag: 'wx'}); // 'wx': never over an existing file
90
55
  ```
91
56
 
92
- `wrap(rapierHtml, text, name, {view, drawing, drawingName, base, baseName, return: returnURL, return_expires_at})` and `unwrap(pageHtml)`,
93
- which returns `{html, text, name, view, drawing, drawingName, base, baseName, return: returnURL, return_expires_at}` with `null` for what a
94
- page does not carry. Also exported: `encodeCarried`, `decodeCarried`, `main`.
57
+ `wrap(rapierHtml, text, name, {view, drawing, drawingName, base, baseName, return: returnURL, return_expires_at})`
58
+ and `unwrap(pageHtml)`, which returns the same fields with `null` for what a page does not carry. Also exported:
59
+ `encodeCarried`, `decodeCarried`, `main`.
95
60
 
96
61
  ## How the page carries the document
97
62
 
@@ -105,13 +70,12 @@ fact of the file and written back on Save.
105
70
 
106
71
  ## Safety
107
72
 
108
- - It never overwrites: an output that exists, the document itself included, is refused. Unknown options,
109
- a `--view` that is not `draw` or `notes`, a `--drawing` or `--base` with no file, a missing or repeated
110
- `--return` or `--return-expires-at`, a return without its expiry, an invalid expiry, an unsafe return URL and a third filename are refused too.
111
- - Nothing reports on the page's use. It reaches the network only when the document or the person asks:
112
- a picture or video the document links to, the math, diagram and PDF-import helpers on first use,
113
- or the person's Send back press. A return URL names only the worker's exact origin and return route;
114
- credentials, query strings and fragments are refused by both the writer and carried-page boot.
73
+ - It never overwrites: an existing output, the document itself included, is refused, as are unknown options, a
74
+ `--view` other than `draw` or `notes`, a `--drawing` or `--base` with no file, a return without its expiry, an
75
+ invalid expiry, an unsafe return URL and a third filename.
76
+ - Nothing reports on the page's use. It reaches the network only when the document or the person asks: a linked
77
+ picture or video, the maths, diagram and PDF-import helpers on first use, or Send back. A return URL names only
78
+ the worker's exact origin and route; credentials, query strings and fragments are refused.
115
79
 
116
80
  ## Licence
117
81
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapier-html",
3
- "version": "1.1.19",
3
+ "version": "1.1.24",
4
4
  "description": "Rapier, the offline Markdown editor, as one HTML page with your document inside it: write, draw and paint, notes, the diff of a change; no account, nothing fetched.",
5
5
  "keywords": [
6
6
  "markdown",