yrby 0.2.0-aarch64-linux → 0.2.3-aarch64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3df6d0fa35fa727623994108610049d211940ca8d50adac0b3fd2f7fbaa8aa2b
4
- data.tar.gz: e7ac7a5e9f2f01ea8af1a36eaff58eb6ffc86c14ff25d67a523373c4a69ce431
3
+ metadata.gz: e672475cdf4e8d6bee399365c00ca8059b192b9232767e5854a20988c7b7e629
4
+ data.tar.gz: 70ca13fb08dbdb54c96cdcc2c6dd5af31ef4af76af9896f15f4d17dddc4bb586
5
5
  SHA512:
6
- metadata.gz: 428cb3117ef111a2ca5d211b356bc932b3c9116d0816dbcb35198649a687e1d26c8f1569e033fd8ff7fe417f6eef7e1171fc01ff77c6cb101b7e89f2771cd863
7
- data.tar.gz: bc0d555eac46cb97748b4df45a4e44d1c003b9c65c7b0e14722ce3b1c89d10011b5483c09605f423f43252a4e8d1849085d77c3ed6298b58b6248ef63b4fbaa4
6
+ metadata.gz: 488c5e0a897958d514a5a31fd6ec488b31c84d9b54bc0ca625fdbe11a9b37e4df4102b97563316f957e4801a60f51997f7d326fb7df0e50aa6196c3e915a6408
7
+ data.tar.gz: 8b8d7de6765a87b218df2a3d57c541a6f678a73ed79bd6091c80b757bc2aee866fd8115d6e793d941d8665e5543ef58711ce5e014b5654899ce5a92a6d2f6c09
data/CHANGELOG.md CHANGED
@@ -6,17 +6,56 @@ to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- ## [0.2.0] - 2026-06-28
9
+ ## [0.2.3] - 2026-07-01
10
+
11
+ ### Fixed
12
+
13
+ - `Doc#update_advances?` is now exact for **delete-bearing** updates, so an
14
+ already-applied pure-delete retry no longer reports as advancing. Previously any
15
+ update carrying a delete set returned `true` (record it) because deletes don't
16
+ move the state vector, so the cheap state-vector probe couldn't prove a
17
+ duplicate. A lost-ack retry of a deletion the server had already integrated was
18
+ therefore re-recorded and re-broadcast every time. For delete-bearing updates we
19
+ now compare the full encoded document state (which includes the delete set)
20
+ before vs. after a trial apply on an isolated probe: a genuinely new deletion
21
+ changes it (`true`); an already-applied retry re-encodes identically (`false`).
22
+ Insert/format-only updates keep the cheaper state-vector path, so only
23
+ delete-bearing frames — a minority — pay for the exact comparison. The exactly-
24
+ once guarantee is unchanged in the safe direction: a real deletion is never
25
+ dropped.
26
+
27
+ This lets `yrby-actioncable` (and any caller gating `on_change` on
28
+ `update_advances?`) settle a duplicate pure-delete frame as `:applied` — acked,
29
+ but not stored or relayed — so apps no longer need an app-level
30
+ encode-and-compare guard around their durable writes.
31
+
32
+ ## [0.2.2] - 2026-06-30
10
33
 
11
- First release under the **`yrby`** name (the project was previously developed
12
- as `yrb-lite`). The public Ruby interface is the top-level module **`Y`** —
13
- mirroring the `y-rb` gem's `Y::Doc` interface.
34
+ ### Fixed
35
+
36
+ - `Doc#read_xml` now recovers text from **nested** Lexical/Lexxy blocks. Lexical
37
+ embeds child blocks (list items, table cells, nested lists) as `Y.XmlText`
38
+ embeds that `get_string` silently drops, so lists and tables previously came
39
+ back empty. `read_xml` now walks the embeds: text runs build a line, inline
40
+ children (links) join it, and nested block children flush and recurse — so a
41
+ document with headings, formatted text, links, bullet/numbered/check/nested
42
+ lists, blockquotes, code blocks and tables extracts every piece of text.
43
+ Lexical decorator elements (horizontal rule, image) are skipped instead of
44
+ emitting their `<UNDEFINED …>` serialization. ProseMirror handling is
45
+ unchanged.
46
+
47
+ ## [0.2.1] - 2026-06-29
14
48
 
15
49
  ### Changed
16
- - **Renamed `yrb-lite` `yrby`.** Module `YrbLite` → top-level `Y`
17
- (`Y::Doc`, `Y::Error`, `Y::VERSION`). Require path `require "yrb_lite"`
18
- `require "y"`. Native extension crate `yrb_lite` → `y_ruby`, loaded from
19
- `lib/y/y_ruby.bundle`.
50
+ - **Internal:** renamed the native extension crate `y_ruby` → `yrby` (now loads
51
+ from `lib/y/yrby.bundle`). No public API change — `require "y"` and `Y::Doc`
52
+ are unchanged.
53
+
54
+ ## [0.2.0] - 2026-06-28
55
+
56
+ First release. The public Ruby interface is the top-level module **`Y`**
57
+ (`Y::Doc`, `Y::Error`, `Y::VERSION`), loaded with `require "y"` — mirroring the
58
+ `y-rb` gem's `Y::Doc` interface.
20
59
 
21
60
  ### Added
22
61
  - Native `Doc#read_text` and `Doc#read_map` readers — reconstruct plain text and
data/README.md CHANGED
@@ -20,7 +20,7 @@ end
20
20
  ```
21
21
 
22
22
  On the browser, use the `ActionCableProvider` from the
23
- [`@yrby/client`](https://www.npmjs.com/package/@yrby/client) npm package.
23
+ [`yrby-client`](https://www.npmjs.com/package/yrby-client) npm package.
24
24
  Integrates with any editor that includes Y.js support, such as Tiptap, ProseMirror
25
25
  and [Lexxy](https://www.npmjs.com/package/lexxy-realtime).
26
26
 
@@ -30,7 +30,7 @@ Install the gem and npm package:
30
30
 
31
31
  ```
32
32
  gem install yrby-actioncable # depends on yrby
33
- npm install @yrby/client
33
+ npm install yrby-client
34
34
  ```
35
35
 
36
36
  ## What you get
@@ -41,25 +41,27 @@ npm install @yrby/client
41
41
  one-include ActionCable concern.
42
42
  - Authoritative record-before-distribute semantics: each document change can be
43
43
  recorded durably before it goes out to anyone.
44
- -
44
+ - Optional server-side reads: `Doc#read_text` and `Doc#read_map` reconstruct a
45
+ document's contents in Ruby - no Node process - for search, exports, validation,
46
+ or server-side rendering.
45
47
 
46
- ## Why "lite"
48
+ ## Scope
47
49
 
48
- The "lite" is the size of the surface. `yrby` binds just the part of `y-crdt` you
49
- need to *sync and persist* collaborative documents - a `Doc`, awareness, and the
50
- y-websocket protocol primitives. The Ruby side treats a document as opaque CRDT
51
- state: it applies updates, answers sync handshakes, and records deltas, but never
52
- reaches in to read or edit the contents. The browser editor owns the document's
53
- shape.
50
+ `yrby` binds just the part of `y-crdt` you need to *sync and persist* collaborative
51
+ documents - a `Doc`, awareness, and the y-websocket protocol primitives. By default
52
+ the Ruby side treats a document as opaque CRDT state: it applies updates, answers
53
+ sync handshakes, and records deltas without reaching into the contents - the browser
54
+ editor owns the document's shape. When you do need to look inside, `Doc#read_text`
55
+ and `Doc#read_map` reconstruct it server-side, in Ruby.
54
56
 
55
- ## What isn't "lite"
57
+ ## Durability and delivery
56
58
 
57
- The surface area may be "lite", but a core focus is on durability, resiliency, delivery
59
+ The surface is intentionally small, but the focus is durability, resiliency, delivery
58
60
  guarantees, correctness, and thread safety.
59
61
 
60
- Towards that goal, `yrby` adds capabilities that may even stand out in the Yjs ecosystem:
62
+ Towards that goal, `yrby` adds capabilities that stand out even in the Yjs ecosystem:
61
63
 
62
- - Built-in update acknowledgement: the `ActionCableProvider` in `@yrby/client` will continue to
64
+ - Built-in update acknowledgement: the `ActionCableProvider` in `yrby-client` will continue to
63
65
  send updates until an ack is received from the server. [`yrby-actioncable`](https://rubygems.org/gems/yrby-actioncable)
64
66
  only sends an ack when applying an update is successful. The goal is at-least-once delivery,
65
67
  and because CRDTs are idempotent a duplicate update is effectively a no-op.
@@ -197,7 +199,7 @@ for the same document as long as they share the same store and cable adapter.
197
199
 
198
200
  `on_load` and `on_change` are required. If either is missing, the channel fails
199
201
  before it can acknowledge or broadcast edits. Presence is ephemeral:
200
- awareness frames are relayed, and `@yrby/client` sends a best-effort
202
+ awareness frames are relayed, and `yrby-client` sends a best-effort
201
203
  presence-removal frame on disconnect/pagehide, with the client-side awareness
202
204
  timeout as the fallback for abrupt disconnects.
203
205
 
@@ -315,7 +317,7 @@ client -> server { "update": "<base64 update>", "id": 42 }
315
317
  server -> client { "ack": 42 } # update accepted; safe to forget
316
318
  ```
317
319
 
318
- `@yrby/client`'s `ActionCableProvider` handles this automatically. It keeps
320
+ `yrby-client`'s `ActionCableProvider` handles this automatically. It keeps
319
321
  the unacknowledged local document tail in a queue and sends the merged tail as a
320
322
  single causally-complete delta. The id is the highest sequence in the batch, so
321
323
  one `{ ack: id }` cumulatively confirms everything up to it. Because CRDT apply
@@ -324,7 +326,7 @@ re-acks. Awareness stays ephemeral and is not acked.
324
326
 
325
327
  Presence (cursors, selections) is owned by the browser clients — the server
326
328
  never sets or holds presence state, it only relays awareness frames opaquely.
327
- See `@yrby/client` for the client-side awareness API.
329
+ See `yrby-client` for the client-side awareness API.
328
330
 
329
331
  ## Thread Safety
330
332
 
data/lib/y/3.4/yrby.so ADDED
Binary file
data/lib/y/4.0/yrby.so ADDED
Binary file
data/lib/y/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Y
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.3"
5
5
  end
data/lib/y.rb CHANGED
@@ -3,13 +3,13 @@
3
3
  require_relative "y/version"
4
4
 
5
5
  # Load the native extension. Precompiled gems ship it in a per-Ruby-version
6
- # subdir (lib/y/<major.minor>/y_ruby.<ext>); a source build puts it flat at
7
- # lib/y/y_ruby.<ext>. Try the versioned path first, fall back.
6
+ # subdir (lib/y/<major.minor>/yrby.<ext>); a source build puts it flat at
7
+ # lib/y/yrby.<ext>. Try the versioned path first, fall back.
8
8
  begin
9
9
  RUBY_VERSION =~ /(\d+\.\d+)/
10
- require_relative "y/#{Regexp.last_match(1)}/y_ruby"
10
+ require_relative "y/#{Regexp.last_match(1)}/yrby"
11
11
  rescue LoadError
12
- require_relative "y/y_ruby"
12
+ require_relative "y/yrby"
13
13
  end
14
14
 
15
15
  module Y
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yrby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.3
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - JP Camara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-29 00:00:00.000000000 Z
11
+ date: 2026-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -66,8 +66,8 @@ files:
66
66
  - LICENSE
67
67
  - README.md
68
68
  - lib/y.rb
69
- - lib/y/3.4/y_ruby.so
70
- - lib/y/4.0/y_ruby.so
69
+ - lib/y/3.4/yrby.so
70
+ - lib/y/4.0/yrby.so
71
71
  - lib/y/decoder.rb
72
72
  - lib/y/decoder/version.rb
73
73
  - lib/y/version.rb
data/lib/y/3.4/y_ruby.so DELETED
Binary file
data/lib/y/4.0/y_ruby.so DELETED
Binary file