rapier-html 1.2.16 → 1.2.18
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 +4 -4
- package/README.md +10 -10
- package/dist/ledger/carried.mjs +6 -3
- package/dist/rapier.html +49 -47
- package/package.json +1 -1
package/BUILD.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "rapier-html",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.18",
|
|
4
4
|
"path": "dist/rapier.html",
|
|
5
|
-
"bytes":
|
|
6
|
-
"sha256": "
|
|
7
|
-
"builtAt": "2026-10-
|
|
5
|
+
"bytes": 5479913,
|
|
6
|
+
"sha256": "c699ec8eeb9e31233a72b00ea56ec7f78df866be038a9ae6fad80534db624c96",
|
|
7
|
+
"builtAt": "2026-10-20T09:30:45.194Z",
|
|
8
8
|
"node": "v22.23.3",
|
|
9
9
|
"canonical": true,
|
|
10
10
|
"packing": "zopfli",
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.
|
|
5
|
+
the edited copy back. Start with `npx rapier-html@1.2.18 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.
|
|
@@ -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.
|
|
21
|
-
npx -- rapier-html@1.2.
|
|
22
|
-
npx -- rapier-html@1.2.
|
|
23
|
-
npx -- rapier-html@1.2.
|
|
24
|
-
npx -- rapier-html@1.2.
|
|
25
|
-
npx -- rapier-html@1.2.
|
|
26
|
-
npx -- rapier-html@1.2.
|
|
27
|
-
npm install rapier-html@1.2.
|
|
20
|
+
npx -- rapier-html@1.2.18 notes.md # the editor, notes.md inside it, written beside the file
|
|
21
|
+
npx -- rapier-html@1.2.18 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
|
|
22
|
+
npx -- rapier-html@1.2.18 notes.md --include draw,math # carries Draw and Math (default: what the document needs)
|
|
23
|
+
npx -- rapier-html@1.2.18 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
|
|
24
|
+
npx -- rapier-html@1.2.18 revised.md --compare original.md # opens showing what changed
|
|
25
|
+
npx -- rapier-html@1.2.18 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
|
|
26
|
+
npx -- rapier-html@1.2.18 notes.md out.html # a named output
|
|
27
|
+
npm install rapier-html@1.2.18 # 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.
|
|
@@ -33,7 +33,7 @@ Will markers in the Markdown (`keep`, `append`, `edit`) control what agents may
|
|
|
33
33
|
|
|
34
34
|
## Choose a Rapier workflow
|
|
35
35
|
|
|
36
|
-
1. **Work together live.** Connect to `https://mcp.rapier.website/
|
|
36
|
+
1. **Work together live.** Connect to `https://mcp.rapier.website/mcp`, then call `open` to share one document with the person.
|
|
37
37
|
2. **Hand over an offline editor.** Use this package.
|
|
38
38
|
3. **Embed the editor.** [rapier-embed](https://github.com/jackskip22/rapier-plugins/tree/main/npm/rapier-embed)
|
|
39
39
|
mounts the editor or reader in your app.
|
package/dist/ledger/carried.mjs
CHANGED
|
@@ -47,11 +47,14 @@ export function takeParts(html, text) {
|
|
|
47
47
|
return {html: stripped, ...readParts(text ?? '', elements)};
|
|
48
48
|
}
|
|
49
49
|
const OPEN = '\n\n<!-- rapier-carried/1\n', CLOSE = '\n-->\n';
|
|
50
|
-
export function
|
|
50
|
+
export function documentTrailer(text, options) {
|
|
51
51
|
const parts = validateParts(text, options);
|
|
52
|
-
if (!parts.ledger && !parts.authorship) return
|
|
52
|
+
if (!parts.ledger && !parts.authorship) return '';
|
|
53
53
|
const json = JSON.stringify(parts).replace(/</g, '\\u003c').replace(/>/g, '\\u003e');
|
|
54
|
-
return
|
|
54
|
+
return OPEN + json + CLOSE;
|
|
55
|
+
}
|
|
56
|
+
export function writeDocument(text, options) {
|
|
57
|
+
return text + documentTrailer(text, options);
|
|
55
58
|
}
|
|
56
59
|
export function readDocument(source) {
|
|
57
60
|
if (!source.endsWith(CLOSE)) {
|