yrby 0.7.1 → 0.8.1

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +88 -0
  3. data/Cargo.lock +3 -3
  4. data/README.md +593 -384
  5. data/ext/yrby/crates/html-core/Cargo.toml +1 -1
  6. data/ext/yrby/crates/html-core/src/lib.rs +13 -13
  7. data/ext/yrby/crates/lexical-html/Cargo.toml +2 -2
  8. data/ext/yrby/crates/lexical-html/src/lib.rs +90 -45
  9. data/ext/yrby/crates/prosemirror-html/Cargo.toml +2 -2
  10. data/ext/yrby/crates/prosemirror-html/src/lib.rs +44 -35
  11. data/ext/yrby/src/lib.rs +27 -12
  12. data/ext/yrby/src/protocol.rs +17 -17
  13. data/ext/yrby/src/read.rs +137 -26
  14. data/lib/generators/yrby/install/install_generator.rb +24 -13
  15. data/lib/generators/yrby/install/templates/document_channel.rb +4 -7
  16. data/lib/generators/yrby/tables/tables_generator.rb +7 -4
  17. data/lib/generators/yrby/tables/templates/create_y_tables.rb +1 -1
  18. data/lib/y/collaborative/attribute.rb +53 -0
  19. data/lib/y/collaborative/helper.rb +48 -0
  20. data/lib/y/collaborative.rb +98 -0
  21. data/lib/y/lexxy.rb +4 -4
  22. data/lib/y/rendering.rb +39 -15
  23. data/lib/y/tiptap.rb +3 -3
  24. data/lib/y/version.rb +1 -1
  25. metadata +4 -9
  26. data/ext/yrby/target/debug/build/clang-sys-e3ae45bd384f74c3/out/common.rs +0 -355
  27. data/ext/yrby/target/debug/build/clang-sys-e3ae45bd384f74c3/out/dynamic.rs +0 -276
  28. data/ext/yrby/target/debug/build/clang-sys-e3ae45bd384f74c3/out/macros.rs +0 -49
  29. data/ext/yrby/target/debug/build/rb-sys-4407948463231c4f/out/bindings-0.9.128-mri-arm64-darwin23-3.4.7.rs +0 -8934
  30. data/ext/yrby/target/debug/build/rb-sys-dbeea42737529c2d/out/bindings-0.9.128-mri-arm64-darwin23-3.4.7.rs +0 -8934
  31. data/ext/yrby/target/debug/build/serde-58ea0ee887cc2602/out/private.rs +0 -6
  32. data/ext/yrby/target/debug/build/serde_core-41f407c21c1f205e/out/private.rs +0 -5
  33. data/ext/yrby/target/debug/build/thiserror-0f1416a82ff26f22/out/private.rs +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80931cbbabc08011f5f8ac78dfcf92e648feaf39ef8338ba7abb77bd575bb231
4
- data.tar.gz: 340e157cea8aeee6ab5013ca43571e74a8f01f514ee8172aad81e14c10cf55b6
3
+ metadata.gz: ea4b274bb5d8928c48900e3fe08b1e2b5d93c7e9970fe8ee6d453366e2c2c9be
4
+ data.tar.gz: 6df2e03ac56e522e1ba854266dd193124514d0fe5f756ad79f1038e4704103b9
5
5
  SHA512:
6
- metadata.gz: fe5ba9524856f360def8b53a942bc8142017cb87254344aaeab9b90d4006471d3f480db5c527e4563f031ebc25d9c504c3070d306308676e10f11127ac6695c7
7
- data.tar.gz: ef2cf7df98eced8c39ad5059ff12d3dfbdd8fc6dbd22c949163cc074d1710add09b9c4adb9d4c4ca24fa957f1b5983578c9f38623a80b0a4172027da4505a3a9
6
+ metadata.gz: e45d38cf54bf43b63a72e0127c89aedd3f5c713a7677afddbdd5c2b4c702af1d755bc1c15fdf22d0f118d9611dc7dd06843efb7ec94cb89d6a898cf6f6d44b30
7
+ data.tar.gz: 651268d3b107633e104e346840083bcf5b1ecda00ae3d4586ed89cdb235b8bda34df34c6d60fcde23fdd47b18d0439ff9fca5e36683322799fc66d86157923bb
data/CHANGELOG.md CHANGED
@@ -4,6 +4,94 @@ All notable changes to this project are documented here. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project aims
5
5
  to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [Unreleased]
8
+
9
+ ## [0.8.1] - 2026-10-03
10
+
11
+ ### Added
12
+
13
+ - `unknown_types` on `Y::Lexical` and `Y::ProseMirror`, and so on `Y::Lexxy`
14
+ and `Y::Tiptap`. It lists the node types in a document that neither the
15
+ built-in schema nor a rule handles, which are the ones `to_html` can't fully
16
+ render. Render a real document from your editor in a test and assert the list
17
+ is empty.
18
+ - The renderer crates export `escape_text` and `escape_attr` for callers that
19
+ build their own markup (`lexical-yjs-html` 0.1.4, `prosemirror-yjs-html`
20
+ 0.1.5).
21
+
22
+ ### Changed
23
+
24
+ - The demo app and the render-parity test run on Lexxy 1.0. `Y::Lexxy`
25
+ output matches Lexxy 1.0's own `value`, including image alt text edited
26
+ after the document syncs.
27
+
28
+ ### Fixed
29
+
30
+ - The Lexical renderers keep the text of an unknown inline wrapper, such as a
31
+ mark with no rule. The text renders without the wrapper. Before, the whole
32
+ node rendered as nothing, so its text was missing from the HTML.
33
+ - `Y::Lexxy`'s list-item rule escapes the stored `__checked` and `__value`
34
+ attributes. Collaborators write those attributes, and a crafted value could
35
+ break out of the HTML attribute. Normal values (booleans and integers) render
36
+ the same as before.
37
+ - The crate READMEs' callback examples escape the values they insert, and both
38
+ READMEs describe how unknown node types render.
39
+
40
+ ## [0.8.0] - 2026-10-01
41
+
42
+ This release ships alongside yrby-client 0.6.0, and the client entries below
43
+ are for that version.
44
+
45
+ ### Added
46
+
47
+ - `Doc#read_array(name)` returns a `Y.Array` root as a JSON string, for
48
+ documents whose content lives in an array.
49
+
50
+ ### Changed
51
+
52
+ - yrby-client document elements now use shared document sessions scoped to
53
+ the consumer. A session tracks pending delivery separately from the editors
54
+ attached to it, and each editor binding gets an abort signal for cleanup. A
55
+ clean remount after a delay reloads from the server. `doc` and `provider`
56
+ are unavailable until the session is acquired and while it is retargeting.
57
+ Turbo no longer serializes CRDT state into cached HTML. Turbolinks 5 works
58
+ the same way, with its before-cache, render, load, and preview signals
59
+ handled alongside Turbo's.
60
+ - Managed sessions expose their delivery status and hold rejected work until
61
+ you call `retry()` or `discard()`. Each session uses its own subscription
62
+ nonce, so acknowledgment sequences from different sessions don't mix.
63
+ Provider status events now include a `pending` flag.
64
+ - The element accepts a `refresh` attribute. If a subscription is rejected
65
+ and `refresh` is set, the session fetches that URL once, expects
66
+ `{ "grant": ... }` back, and resubscribes with the new grant, keeping the
67
+ same document and pending edits. A failed fetch or a second rejection
68
+ blocks the session as before. The session doesn't renew grants on a timer.
69
+
70
+ - `YProtocolSession` and `ReliableSync` renamed their transport hooks to read
71
+ as commands. `onConnect()`, `onDisconnect()`, and `ack()`/`onAck()` are now
72
+ `resume()`, `pause()`, and `acknowledge(id)`, and `ReliableSync`'s
73
+ `onTick()` is now `retransmit()`. `onStatusChange` keeps the `on` prefix
74
+ because it's the only one that registers a listener. `ReliableSync#pending`
75
+ returns an independent snapshot with its own copy of the update bytes, and
76
+ enqueueing copies the buffer you pass in.
77
+ - A grant refresh request now times out after 15 seconds and blocks the
78
+ session. Previously the session stayed offline indefinitely. If a consumer
79
+ throws while resubscribing with a renewed grant, that now blocks the
80
+ session too, where it used to be an unhandled rejection.
81
+ - When a status listener throws, the error goes to `onError`, and the other
82
+ listeners and the cable callback that fired it still run. The provider also
83
+ reports failures in awareness events and unsubscribe. A throwing callback
84
+ can't interrupt presence removal or leave the awareness timer running. If
85
+ the error handler itself throws, the error goes to the console.
86
+
87
+ ### Fixed
88
+
89
+ - ActionCable providers now ignore callbacks from subscriptions that have
90
+ been replaced, so a late disconnect or rejection can't stop the new
91
+ subscription from delivering edits. Synchronous consumer callbacks wait
92
+ until subscription creation returns, and managed sessions use distinct
93
+ subscription identifiers so old ACKs stay separate.
94
+
7
95
  ## [0.7.1] - 2026-08-19
8
96
 
9
97
  ### Fixed
data/Cargo.lock CHANGED
@@ -229,7 +229,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
229
229
 
230
230
  [[package]]
231
231
  name = "lexical-yjs-html"
232
- version = "0.1.1"
232
+ version = "0.1.4"
233
233
  dependencies = [
234
234
  "serde_json",
235
235
  "yjs-html-core",
@@ -348,7 +348,7 @@ dependencies = [
348
348
 
349
349
  [[package]]
350
350
  name = "prosemirror-yjs-html"
351
- version = "0.1.2"
351
+ version = "0.1.5"
352
352
  dependencies = [
353
353
  "serde_json",
354
354
  "yjs-html-core",
@@ -628,7 +628,7 @@ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
628
628
 
629
629
  [[package]]
630
630
  name = "yjs-html-core"
631
- version = "0.1.1"
631
+ version = "0.1.3"
632
632
  dependencies = [
633
633
  "serde_json",
634
634
  "yrs",