rapier-html 1.1.74 → 1.1.78

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.74",
3
+ "version": "1.1.78",
4
4
  "path": "dist/rapier.html",
5
- "bytes": 1929942,
6
- "sha256": "da381feda471d451f73375d64c4a0f1211d0a03c664e3db7720970ca19c4741f",
7
- "builtAt": "2026-10-06T13:28:24.777Z",
5
+ "bytes": 2146192,
6
+ "sha256": "d84fbe138681af2600417975d075ed7e4843a5da42f6fb09fa0f3a46afce33a2",
7
+ "builtAt": "2026-10-07T15:01:20.313Z",
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.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
17
+ npx -- rapier-html@1.1.78 notes.md # the editor, notes.md inside it, written beside the file
18
+ npx -- rapier-html@1.1.78 notes.md --view draw # opens on Draw: sketch and paint, the document behind it
19
+ npx -- rapier-html@1.1.78 notes.md --view notes # opens the Notes library
20
+ npx -- rapier-html@1.1.78 notes.md --drawing sketch.svg # carries a drawing, opened on Draw over the document
21
+ npx -- rapier-html@1.1.78 proposal.md --base original.md # opens on the diff of a proposed change
22
+ npx -- rapier-html@1.1.78 notes.md --return "$RETURN_URL" --return-expires-at "$RETURN_EXPIRES_AT" # Send back
23
+ npx -- rapier-html@1.1.78 notes.md out.html # a named output
24
+ npm install rapier-html@1.1.78 # 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.
@@ -105,6 +105,10 @@ function _rapierValidLedgerRecord(record, prior, earlier, documentAuthority, max
105
105
  const transaction = record.transaction;
106
106
  const nullableText = (value, limit, empty = true) => value === null ||
107
107
  (typeof value === 'string' && value.length <= limit && (empty || value.length > 0));
108
+ // A grouped agent contribution's optional fields, bounded like the identities beside them: a name of 1 to 120 characters, a
109
+ // revision, at most 500 source identities (the journal the kernel retains) of 1 to 160, and a hosted row's identity of 1 to 256.
110
+ const optional = (value, valid) => value === undefined || valid(value);
111
+ const identity = (value, limit) => typeof value === 'string' && value.length > 0 && value.length <= limit;
108
112
  if (!transaction || typeof transaction.id !== 'string' || !transaction.id.length ||
109
113
  transaction.id.length > 256 || !Array.isArray(earlier) ||
110
114
  earlier.some(row => row?.transaction?.id === transaction.id) ||
@@ -115,6 +119,11 @@ function _rapierValidLedgerRecord(record, prior, earlier, documentAuthority, max
115
119
  transaction.operation.length > _RAPIER_TRANSACTION_OPERATION_LIMIT ||
116
120
  !nullableText(transaction.requestId, _RAPIER_TRANSACTION_REQUEST_LIMIT) ||
117
121
  !nullableText(transaction.sourceTransactionId, _RAPIER_TRANSACTION_REQUEST_LIMIT) ||
122
+ !optional(transaction.contribution, value => identity(value, 120)) ||
123
+ !optional(transaction.contributionBaseRevision, value => Number.isSafeInteger(value) && value >= 0 && !Object.is(value, -0)) ||
124
+ !optional(transaction.sourceTransactionIds, value => Array.isArray(value) && value.length <= 500 &&
125
+ value.every(id => identity(id, _RAPIER_TRANSACTION_REQUEST_LIMIT))) ||
126
+ !optional(transaction.remoteTransactionId, value => identity(value, 256)) ||
118
127
  !nullableText(transaction.parent, 256, false) ||
119
128
  !nullableText(transaction.reverts, 256, false) ||
120
129
  !nullableText(transaction.reapplies, 256, false) ||