yrby 0.7.0 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +71 -0
- data/Cargo.lock +29 -29
- data/README.md +582 -380
- data/ext/yrby/Cargo.toml +3 -3
- data/ext/yrby/crates/html-core/Cargo.toml +5 -4
- data/ext/yrby/crates/html-core/src/lib.rs +16 -20
- data/ext/yrby/crates/lexical-html/Cargo.toml +5 -4
- data/ext/yrby/crates/lexical-html/src/lib.rs +57 -48
- data/ext/yrby/crates/prosemirror-html/Cargo.toml +5 -4
- data/ext/yrby/crates/prosemirror-html/src/lib.rs +151 -104
- data/ext/yrby/src/lib.rs +30 -15
- data/ext/yrby/src/protocol.rs +17 -17
- data/ext/yrby/src/read.rs +137 -26
- data/lib/generators/yrby/install/install_generator.rb +24 -13
- data/lib/generators/yrby/install/templates/document_channel.rb +4 -7
- data/lib/generators/yrby/tables/tables_generator.rb +7 -4
- data/lib/generators/yrby/tables/templates/create_y_tables.rb +1 -1
- data/lib/y/collaborative/attribute.rb +53 -0
- data/lib/y/collaborative/helper.rb +48 -0
- data/lib/y/collaborative.rb +98 -0
- data/lib/y/lexxy.rb +2 -2
- data/lib/y/rendering.rb +15 -15
- data/lib/y/tiptap.rb +3 -3
- data/lib/y/version.rb +1 -1
- data/lib/y.rb +1 -1
- metadata +4 -9
- data/ext/yrby/target/debug/build/clang-sys-e3ae45bd384f74c3/out/common.rs +0 -355
- data/ext/yrby/target/debug/build/clang-sys-e3ae45bd384f74c3/out/dynamic.rs +0 -276
- data/ext/yrby/target/debug/build/clang-sys-e3ae45bd384f74c3/out/macros.rs +0 -49
- data/ext/yrby/target/debug/build/rb-sys-4407948463231c4f/out/bindings-0.9.128-mri-arm64-darwin23-3.4.7.rs +0 -8934
- data/ext/yrby/target/debug/build/rb-sys-dbeea42737529c2d/out/bindings-0.9.128-mri-arm64-darwin23-3.4.7.rs +0 -8934
- data/ext/yrby/target/debug/build/serde-58ea0ee887cc2602/out/private.rs +0 -6
- data/ext/yrby/target/debug/build/serde_core-41f407c21c1f205e/out/private.rs +0 -5
- 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9e731133b862944bb0475e1175d59c1d365924a5da722a395624426044371413
|
|
4
|
+
data.tar.gz: 1ec6b9298ecb11609d3d93279ecd5239f54b10ae5e7cd5f9d1b7deffe75288b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b0d016da20f2bd97529fdf0fce808a771e4997d9834f5be9234ef6f0225485f72fa3854cd7a362ff72275f84f3fa8003ac0cd42efea55028c07879fa6b9da1a
|
|
7
|
+
data.tar.gz: da77acc0583feb5e7cbb4da0076c6fd3053c11fb64a6aa4c33d708a31220a49e67f1cadf6c5ea27f67c9dd5b9c655285a004dbe70acea1133a232c606d8f7ccb
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,77 @@ 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
|
+
|
|
64
|
+
## [0.7.1] - 2026-08-19
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
|
|
68
|
+
- `Y::ProseMirror` and `Y::Tiptap` keep marks shared by adjacent text
|
|
69
|
+
runs open across them, the way ProseMirror's own serializer does:
|
|
70
|
+
bold then bold-italic renders as `<strong>a<em>b</em></strong>`, not
|
|
71
|
+
as two sibling `<strong>` wraps. A mark whose attributes differ
|
|
72
|
+
between runs never merges. Found by the new cross-renderer
|
|
73
|
+
verification, which checks the renderers against a live Tiptap
|
|
74
|
+
editor, `@tiptap/html`'s static `generateHTML`, `tiptap-php`,
|
|
75
|
+
Lexical's `$generateHtmlFromNodes`, and Payload CMS's
|
|
76
|
+
`convertLexicalToHTML` on a shared corpus.
|
|
77
|
+
|
|
7
78
|
## [0.7.0] - 2026-08-11
|
|
8
79
|
|
|
9
80
|
### Added
|
data/Cargo.lock
CHANGED
|
@@ -227,6 +227,15 @@ version = "1.3.0"
|
|
|
227
227
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
228
228
|
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|
229
229
|
|
|
230
|
+
[[package]]
|
|
231
|
+
name = "lexical-yjs-html"
|
|
232
|
+
version = "0.1.3"
|
|
233
|
+
dependencies = [
|
|
234
|
+
"serde_json",
|
|
235
|
+
"yjs-html-core",
|
|
236
|
+
"yrs",
|
|
237
|
+
]
|
|
238
|
+
|
|
230
239
|
[[package]]
|
|
231
240
|
name = "libc"
|
|
232
241
|
version = "0.2.180"
|
|
@@ -337,6 +346,15 @@ dependencies = [
|
|
|
337
346
|
"unicode-ident",
|
|
338
347
|
]
|
|
339
348
|
|
|
349
|
+
[[package]]
|
|
350
|
+
name = "prosemirror-yjs-html"
|
|
351
|
+
version = "0.1.4"
|
|
352
|
+
dependencies = [
|
|
353
|
+
"serde_json",
|
|
354
|
+
"yjs-html-core",
|
|
355
|
+
"yrs",
|
|
356
|
+
]
|
|
357
|
+
|
|
340
358
|
[[package]]
|
|
341
359
|
name = "quote"
|
|
342
360
|
version = "1.0.43"
|
|
@@ -608,18 +626,26 @@ version = "0.2.1"
|
|
|
608
626
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
609
627
|
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
610
628
|
|
|
629
|
+
[[package]]
|
|
630
|
+
name = "yjs-html-core"
|
|
631
|
+
version = "0.1.3"
|
|
632
|
+
dependencies = [
|
|
633
|
+
"serde_json",
|
|
634
|
+
"yrs",
|
|
635
|
+
]
|
|
636
|
+
|
|
611
637
|
[[package]]
|
|
612
638
|
name = "yrby"
|
|
613
639
|
version = "0.1.0"
|
|
614
640
|
dependencies = [
|
|
641
|
+
"lexical-yjs-html",
|
|
615
642
|
"magnus",
|
|
643
|
+
"prosemirror-yjs-html",
|
|
616
644
|
"rb-sys",
|
|
617
645
|
"rb-sys-env 0.1.2",
|
|
618
646
|
"serde_json",
|
|
647
|
+
"yjs-html-core",
|
|
619
648
|
"yrs",
|
|
620
|
-
"yrs-html-core",
|
|
621
|
-
"yrs-lexical-html",
|
|
622
|
-
"yrs-prosemirror-html",
|
|
623
649
|
]
|
|
624
650
|
|
|
625
651
|
[[package]]
|
|
@@ -640,32 +666,6 @@ dependencies = [
|
|
|
640
666
|
"thiserror",
|
|
641
667
|
]
|
|
642
668
|
|
|
643
|
-
[[package]]
|
|
644
|
-
name = "yrs-html-core"
|
|
645
|
-
version = "0.1.0"
|
|
646
|
-
dependencies = [
|
|
647
|
-
"serde_json",
|
|
648
|
-
"yrs",
|
|
649
|
-
]
|
|
650
|
-
|
|
651
|
-
[[package]]
|
|
652
|
-
name = "yrs-lexical-html"
|
|
653
|
-
version = "0.1.0"
|
|
654
|
-
dependencies = [
|
|
655
|
-
"serde_json",
|
|
656
|
-
"yrs",
|
|
657
|
-
"yrs-html-core",
|
|
658
|
-
]
|
|
659
|
-
|
|
660
|
-
[[package]]
|
|
661
|
-
name = "yrs-prosemirror-html"
|
|
662
|
-
version = "0.1.0"
|
|
663
|
-
dependencies = [
|
|
664
|
-
"serde_json",
|
|
665
|
-
"yrs",
|
|
666
|
-
"yrs-html-core",
|
|
667
|
-
]
|
|
668
|
-
|
|
669
669
|
[[package]]
|
|
670
670
|
name = "zmij"
|
|
671
671
|
version = "1.0.14"
|