rapier-html 1.1.65 → 1.1.74

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.65",
3
+ "version": "1.1.74",
4
4
  "path": "dist/rapier.html",
5
- "bytes": 1872881,
6
- "sha256": "a1b1d0bd91d1277274e840784d860c356a276053dc9e1abe890e98622711e895",
7
- "builtAt": "2026-10-05T16:49:20.828Z",
5
+ "bytes": 1929942,
6
+ "sha256": "da381feda471d451f73375d64c4a0f1211d0a03c664e3db7720970ca19c4741f",
7
+ "builtAt": "2026-10-06T13:28:24.777Z",
8
8
  "node": "v22.22.2",
9
9
  "canonical": true,
10
10
  "packing": "zopfli",
package/README.md CHANGED
@@ -14,14 +14,14 @@ editor, offline, with the document inside.
14
14
  Node 22 or newer.
15
15
 
16
16
  ```sh
17
- npx -- rapier-html@1.1.65 notes.md # the editor, notes.md inside it, written beside the file
18
- npx -- rapier-html@1.1.65 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
19
- npx -- rapier-html@1.1.65 notes.md --view notes # opens the Notes library
20
- npx -- rapier-html@1.1.65 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
21
- npx -- rapier-html@1.1.65 proposal.md --base original.md # opens on the diff of a proposed change
22
- npx -- rapier-html@1.1.65 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
23
- npx -- rapier-html@1.1.65 notes.md out.html # a named output
24
- npm install rapier-html@1.1.65 # as a library: wrap, unwrap
17
+ npx -- rapier-html@1.1.74 notes.md # the editor, notes.md inside it, written beside the file
18
+ npx -- rapier-html@1.1.74 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
19
+ npx -- rapier-html@1.1.74 notes.md --view notes # opens the Notes library
20
+ npx -- rapier-html@1.1.74 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
21
+ npx -- rapier-html@1.1.74 proposal.md --base original.md # opens on the diff of a proposed change
22
+ npx -- rapier-html@1.1.74 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
23
+ npx -- rapier-html@1.1.74 notes.md out.html # a named output
24
+ npm install rapier-html@1.1.74 # as a library: wrap, unwrap
25
25
  ```
26
26
 
27
27
  The first `--` is for npm, so `--help` reaches the command. It never overwrites a file.
@@ -76,7 +76,7 @@ export function readBase(value) {
76
76
  throw fault('proposal base SHA-256 differs from its text');
77
77
  if (typeof value.revision !== 'string' || !value.revision || value.revision.length > 256 || /[\u0000-\u001f\u007f]/.test(value.revision))
78
78
  throw fault('invalid proposal base revision');
79
- if (typeof value.name !== 'string' || !value.name || value.name.length > 255 || /[\\/\u0000-\u001f\u007f]/.test(value.name))
79
+ if (typeof value.name !== 'string' || !value.name || [...value.name].length > 256 || /[\\/\u0000-\u001f\u007f]/.test(value.name))
80
80
  throw fault('invalid proposal base name');
81
81
  if (typeof value.by !== 'string' || !value.by.trim() || value.by.length > 96 || /[\u0000-\u001f\u007f]/.test(value.by))
82
82
  throw fault('a proposal needs its proposer name');
@@ -45,12 +45,11 @@ function _rapierRecordSplices(entry, ledger) {
45
45
  }
46
46
 
47
47
  // A ledger record as the journal and the Notes return validate it below: plain data, nothing
48
- // undefined anywhere in it. A live record could carry a row whose type or order was not yet known
49
- // (a block just inserted, before its first render: `type: undefined`), and the validator refused
50
- // the whole ledger for that one field -- silently at boot, where a refused ledger is cleared, and on
51
- // the founder's phone as "Rapier could not be reopened: the document history could not be restored"
52
- // on every return from Notes (24 September). The copy is made once per record; records are frozen,
53
- // so it never goes stale.
48
+ // undefined anywhere in it. A live record could carry a row whose type or order is not yet known (a
49
+ // block just inserted, before its first render: `type: undefined`), and the validator would refuse
50
+ // the whole ledger for that one field -- silently at boot, where a refused ledger is cleared, and
51
+ // as "Rapier could not be reopened: the document history could not be restored" on a return from
52
+ // Notes. The copy is made once per record; records are frozen, so it never goes stale.
54
53
  const _rapierJournalRecord = (() => {
55
54
  const copies = new WeakMap();
56
55
  return record => {
package/dist/page.mjs CHANGED
@@ -63,7 +63,7 @@ export async function main(argv, pagesDir, {log = console.log} = {}) {
63
63
  if (view) wrapOptions.view = view;
64
64
  if (address) wrapOptions.return = address;
65
65
  if (expiry) wrapOptions.return_expires_at = expiry;
66
- // R85b: always a new file; 'wx' refuses any existing path, links included.
66
+ // Always a new file; 'wx' refuses any existing path, links included.
67
67
  try { await writeFile(out, wrap(page, text, name, wrapOptions), {flag: 'wx'}); }
68
68
  catch (error) { throw error.code === 'EEXIST' ? new Error(out + ' already exists, and rapier-html never overwrites a file: name a new one') : error; }
69
69
  log(out + ' (' + name + ', ' + Buffer.byteLength(text) + ' bytes of document' +