yrby 0.7.1 → 0.8.0

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 +57 -0
  3. data/Cargo.lock +3 -3
  4. data/README.md +582 -380
  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 +52 -39
  9. data/ext/yrby/crates/prosemirror-html/Cargo.toml +2 -2
  10. data/ext/yrby/crates/prosemirror-html/src/lib.rs +37 -32
  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 +2 -2
  22. data/lib/y/rendering.rb +15 -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: 9e731133b862944bb0475e1175d59c1d365924a5da722a395624426044371413
4
+ data.tar.gz: 1ec6b9298ecb11609d3d93279ecd5239f54b10ae5e7cd5f9d1b7deffe75288b6
5
5
  SHA512:
6
- metadata.gz: fe5ba9524856f360def8b53a942bc8142017cb87254344aaeab9b90d4006471d3f480db5c527e4563f031ebc25d9c504c3070d306308676e10f11127ac6695c7
7
- data.tar.gz: ef2cf7df98eced8c39ad5059ff12d3dfbdd8fc6dbd22c949163cc074d1710add09b9c4adb9d4c4ca24fa957f1b5983578c9f38623a80b0a4172027da4505a3a9
6
+ metadata.gz: 3b0d016da20f2bd97529fdf0fce808a771e4997d9834f5be9234ef6f0225485f72fa3854cd7a362ff72275f84f3fa8003ac0cd42efea55028c07879fa6b9da1a
7
+ data.tar.gz: da77acc0583feb5e7cbb4da0076c6fd3053c11fb64a6aa4c33d708a31220a49e67f1cadf6c5ea27f67c9dd5b9c655285a004dbe70acea1133a232c606d8f7ccb
data/CHANGELOG.md CHANGED
@@ -4,6 +4,63 @@ 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.0] - 2026-10-01
10
+
11
+ This release ships alongside yrby-client 0.6.0, and the client entries below
12
+ are for that version.
13
+
14
+ ### Added
15
+
16
+ - `Doc#read_array(name)` returns a `Y.Array` root as a JSON string, for
17
+ documents whose content lives in an array.
18
+
19
+ ### Changed
20
+
21
+ - yrby-client document elements now use shared document sessions scoped to
22
+ the consumer. A session tracks pending delivery separately from the editors
23
+ attached to it, and each editor binding gets an abort signal for cleanup. A
24
+ clean remount after a delay reloads from the server. `doc` and `provider`
25
+ are unavailable until the session is acquired and while it is retargeting.
26
+ Turbo no longer serializes CRDT state into cached HTML. Turbolinks 5 works
27
+ the same way, with its before-cache, render, load, and preview signals
28
+ handled alongside Turbo's.
29
+ - Managed sessions expose their delivery status and hold rejected work until
30
+ you call `retry()` or `discard()`. Each session uses its own subscription
31
+ nonce, so acknowledgment sequences from different sessions don't mix.
32
+ Provider status events now include a `pending` flag.
33
+ - The element accepts a `refresh` attribute. If a subscription is rejected
34
+ and `refresh` is set, the session fetches that URL once, expects
35
+ `{ "grant": ... }` back, and resubscribes with the new grant, keeping the
36
+ same document and pending edits. A failed fetch or a second rejection
37
+ blocks the session as before. The session doesn't renew grants on a timer.
38
+
39
+ - `YProtocolSession` and `ReliableSync` renamed their transport hooks to read
40
+ as commands. `onConnect()`, `onDisconnect()`, and `ack()`/`onAck()` are now
41
+ `resume()`, `pause()`, and `acknowledge(id)`, and `ReliableSync`'s
42
+ `onTick()` is now `retransmit()`. `onStatusChange` keeps the `on` prefix
43
+ because it's the only one that registers a listener. `ReliableSync#pending`
44
+ returns an independent snapshot with its own copy of the update bytes, and
45
+ enqueueing copies the buffer you pass in.
46
+ - A grant refresh request now times out after 15 seconds and blocks the
47
+ session. Previously the session stayed offline indefinitely. If a consumer
48
+ throws while resubscribing with a renewed grant, that now blocks the
49
+ session too, where it used to be an unhandled rejection.
50
+ - When a status listener throws, the error goes to `onError`, and the other
51
+ listeners and the cable callback that fired it still run. The provider also
52
+ reports failures in awareness events and unsubscribe. A throwing callback
53
+ can't interrupt presence removal or leave the awareness timer running. If
54
+ the error handler itself throws, the error goes to the console.
55
+
56
+ ### Fixed
57
+
58
+ - ActionCable providers now ignore callbacks from subscriptions that have
59
+ been replaced, so a late disconnect or rejection can't stop the new
60
+ subscription from delivering edits. Synchronous consumer callbacks wait
61
+ until subscription creation returns, and managed sessions use distinct
62
+ subscription identifiers so old ACKs stay separate.
63
+
7
64
  ## [0.7.1] - 2026-08-19
8
65
 
9
66
  ### 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.3"
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.4"
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",