yrby 0.3.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dcb5650668e6cc3f1e0ef1349426ba875d5580a945e90a62216e61a24bf9cef
4
- data.tar.gz: eead1e7159caeacf517febe05149d0c55491dcceaf6fbbbe2f3c40fdf7620978
3
+ metadata.gz: bb0de1a9048f2aa942aad3bafed3269a029ed28ea178a72cb0f532e163cbb5f5
4
+ data.tar.gz: 6949735cd0edca033e78ef060333b91c40af2e3f900a79da46885d6630e6bc32
5
5
  SHA512:
6
- metadata.gz: 68948615ae023becf04deea8c767cdd075ccd7097bbcecefb52868a7c2257fe4bd39d20bbac83b1f6a47d78a2889d76e590a83b7df0d9f6e1ccea1a8fdfa115d
7
- data.tar.gz: 70716f2948661046b71843e66dcec62e5cf3e2b5c1509e9ea76c49db6039909bc02f510a90e3b9f44054b20ea3c2297d10878834b3c751abd1a28c72d0d2cabc
6
+ metadata.gz: 3f0a9aeea9e3efdd443f7da526eaf692226015a5a6be037527e1600b74cb2529e123fbcf0f03d91282ad4b60e96cfd5d81d51d149ec1f42b06f27664f4cf3ffb
7
+ data.tar.gz: 5532beea7978401cf18a2970eac4eefdc037c075bc6de2fb56b92978b3dc5e8b3c5759b9b6d9aabfb879ba92517e3792810ab14fabf9ef4461da30bfa2bd4c39
data/CHANGELOG.md CHANGED
@@ -6,6 +6,62 @@ to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.4.0] - 2026-07-07
10
+
11
+ ### Added
12
+
13
+ - **`Y::ProseMirror` — render ProseMirror/Tiptap documents to HTML.**
14
+ `Y::ProseMirror.new(doc).to_html` turns a Tiptap document into HTML on the
15
+ server, with no Node process or headless editor. The output matches Tiptap's
16
+ own `getHTML()`; the tests check it byte-for-byte against a document captured
17
+ from a real editor. It follows `ueberdosis/tiptap-php` and reads both name
18
+ styles editors use — Tiptap's `bulletList`/`bold` and prosemirror-schema-basic's
19
+ `bullet_list`/`strong`. Covers paragraphs, headings, blockquotes,
20
+ bullet/ordered/task lists, code blocks, links, images, mentions, details,
21
+ hard breaks, horizontal rules, tables, text styles (color, font family), and
22
+ every text mark. A table renders as semantic `<table><tbody>` without the
23
+ editor's column-width styling. A root that isn't ProseMirror (a Lexical
24
+ document, say) returns `nil`.
25
+
26
+ ## [0.3.1] - 2026-07-01
27
+
28
+ Fixes from a full source review.
29
+
30
+ ### Fixed
31
+
32
+ - **`Doc#update_ready?` is now exact.** It previously checked only the
33
+ per-client clock lower bound, but yrs's real integration gate also requires
34
+ every block referenced by an item's origin / right-origin / parent — which
35
+ routinely belong to *other* clients — and post-Skip blocks in a merged update
36
+ sit above the lower bound. An update could pass the clock check yet park as
37
+ pending; downstream, `update_advances?` then misread the parked update as an
38
+ already-applied retry (pending doesn't move a state vector) and the sync
39
+ channel **acked and dropped real content**. `update_ready?` now
40
+ trial-integrates on a throwaway probe seeded with the doc's integrated state
41
+ (the clock check remains as a cheap pre-filter), so a cross-client-origin gap
42
+ is correctly rejected for a resync. `update_advances?` also gained defense in
43
+ depth: an update that would park reports as advancing, never as a duplicate.
44
+ - **`Doc#read_text` could deadlock the process.** It opened a second read
45
+ transaction while still holding the first (a chained temporary); yrs's lock is
46
+ write-preferring, so a concurrent writer between the two acquisitions
47
+ deadlocked reader-vs-writer inside the GVL-released (uninterruptible) region.
48
+ Now uses a single transaction.
49
+ - **TOCTOU in gap-free encoding.** The pending check and the encode ran in
50
+ separate transactions, so a concurrent gappy `apply_update` between them could
51
+ make `handle_sync_message`/`compacted_state_update` serve pending structs
52
+ anyway. Both now happen under one transaction.
53
+ - `read_xml`: Lexical soft line breaks and tabs now come through as `\n`/`\t`
54
+ instead of vanishing (`"foo⏎bar"` no longer extracts as `"foobar"`).
55
+
56
+ ### Changed
57
+
58
+ - `update_advances?` skips its full-document probe when the update carries
59
+ blocks beyond the doc's state vector (a novel update trivially advances) —
60
+ the common case no longer pays O(doc) per frame.
61
+ - The gem no longer packages the `yrby-decoder` gem's files (they ship in that
62
+ gem; the duplicate copy could shadow a newer standalone release), and now
63
+ ships `Cargo.lock` so source builds compile the exact crate graph CI tested.
64
+
9
65
  ## [0.3.0] - 2026-07-01
10
66
 
11
67
  ### Fixed