yrby 0.4.0-aarch64-linux → 0.5.0-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 +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +42 -6
- data/lib/y/3.4/yrby.so +0 -0
- data/lib/y/4.0/yrby.so +0 -0
- data/lib/y/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d57e5226ef4574d5add30b93378d79153bb6d99e566cdf4b46f1617afa4baba0
|
|
4
|
+
data.tar.gz: 2318c5397a272498e47552c35f26f4596fd4f9691a48fbeec57d148eec68a528
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d312593acea3022d672651fe5a6175b65d1e398fe20c26bac4ccd85f0915e72ea7c14914faaeb8b01694024314f7c3490b39b2534082441e0602ee08efbed87d
|
|
7
|
+
data.tar.gz: f8cc4678c3ec88c1c99d4fadd6efff8c6730dcce37408246303f9a3429d6e7751d1d197e3793c7955f394b69bf07ffd506b5febb47c30ccdbdc683d9d90c5dcc
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,24 @@ to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.5.0] - 2026-07-08
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`Y::Lexical` — render Lexical/Lexxy documents to HTML.**
|
|
14
|
+
`Y::Lexical.new(doc).to_html` turns a Lexxy document into HTML on the server,
|
|
15
|
+
with no Node process or headless editor. The output is identical to the HTML
|
|
16
|
+
a `lexxy-editor` submits to Rails; the tests check it byte-for-byte against a
|
|
17
|
+
document captured from a real editor. It covers the whole Lexxy 0.9.x node
|
|
18
|
+
set: headings, every text format, links, bullet/numbered/check/nested lists,
|
|
19
|
+
quotes, code blocks, horizontal rules, tables with header cells, image galleries, and
|
|
20
|
+
ActionText attachments. Unknown nodes fall back to a plain paragraph, and a
|
|
21
|
+
root that isn't Lexical (a ProseMirror document, say) returns `nil`. This is
|
|
22
|
+
what `tiptap-php` does for ProseMirror JSON, applied to the Yjs structure.
|
|
23
|
+
- `read_xml` now pulls text out of attachments too: a mention's text goes
|
|
24
|
+
inline, and an upload adds its caption, alt text, or filename. Before, both
|
|
25
|
+
were dropped.
|
|
26
|
+
|
|
9
27
|
## [0.4.0] - 2026-07-07
|
|
10
28
|
|
|
11
29
|
### Added
|
data/README.md
CHANGED
|
@@ -157,6 +157,17 @@ doc.handle_sync_message(data) # => [msg_type, sync_type, response]; answers
|
|
|
157
157
|
# SyncStep2 (never serves pending structs)
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
+
### Reading document contents
|
|
161
|
+
|
|
162
|
+
Reconstruct a document server-side — search, exports, emails, SSR — with no
|
|
163
|
+
Node process:
|
|
164
|
+
|
|
165
|
+
```ruby
|
|
166
|
+
doc.read_text("prosemirror") # => plain text of a Y.Text root, or nil
|
|
167
|
+
doc.read_xml("root") # => text of an XML root, one block per line
|
|
168
|
+
doc.read_map("state") # => a Y.Map root as a JSON string; JSON.parse it
|
|
169
|
+
```
|
|
170
|
+
|
|
160
171
|
### Pending structs and gap-free state
|
|
161
172
|
|
|
162
173
|
If a doc applies an update whose causally-prior update is missing (a "gappy"
|
|
@@ -177,8 +188,13 @@ guarantees keep serving safe:
|
|
|
177
188
|
|
|
178
189
|
### Rendering to HTML
|
|
179
190
|
|
|
180
|
-
|
|
181
|
-
server, with no Node process or headless editor:
|
|
191
|
+
Two schema-pinned renderers turn a collaborative document into HTML on the
|
|
192
|
+
server, with no Node process or headless editor: `Y::ProseMirror` for
|
|
193
|
+
ProseMirror/Tiptap documents and `Y::Lexical` for
|
|
194
|
+
[Lexxy](https://github.com/basecamp/lexxy) (Lexical) documents. Each returns
|
|
195
|
+
`nil` for a root that belongs to the other schema.
|
|
196
|
+
|
|
197
|
+
#### `Y::ProseMirror`
|
|
182
198
|
|
|
183
199
|
```ruby
|
|
184
200
|
prosemirror = Y::ProseMirror.new(doc)
|
|
@@ -187,8 +203,7 @@ prosemirror.to_html("content") # or another XML root
|
|
|
187
203
|
```
|
|
188
204
|
|
|
189
205
|
The output matches Tiptap's own `getHTML()`, checked byte-for-byte in the tests
|
|
190
|
-
against a document captured from a real editor.
|
|
191
|
-
email a collaborative document without running a browser. It follows
|
|
206
|
+
against a document captured from a real editor. It follows
|
|
192
207
|
[`tiptap-php`](https://github.com/ueberdosis/tiptap-php) and reads both name
|
|
193
208
|
styles editors use — Tiptap's `bulletList`/`bold` and prosemirror-schema-basic's
|
|
194
209
|
`bullet_list`/`strong`.
|
|
@@ -197,8 +212,29 @@ It covers paragraphs, headings, blockquotes, bullet/ordered/task lists, code
|
|
|
197
212
|
blocks, links, images, mentions, details, hard breaks, horizontal rules,
|
|
198
213
|
tables, text styles (color, font family), and every text mark. A table renders
|
|
199
214
|
as semantic `<table><tbody>`, without the column-width styling Tiptap's editor
|
|
200
|
-
view adds.
|
|
201
|
-
|
|
215
|
+
view adds.
|
|
216
|
+
|
|
217
|
+
#### `Y::Lexical`
|
|
218
|
+
|
|
219
|
+
```ruby
|
|
220
|
+
lexical = Y::Lexical.new(doc)
|
|
221
|
+
lexical.to_html # the "root" fragment (Lexical's default root name)
|
|
222
|
+
lexical.to_html("notepad") # or another XML root
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The HTML is identical to what a `lexxy-editor` submits to Rails (its `value`).
|
|
226
|
+
The tests check this byte-for-byte against a document captured from a real
|
|
227
|
+
editor.
|
|
228
|
+
|
|
229
|
+
It handles the whole Lexxy 0.9.x node set: paragraphs, headings, every text
|
|
230
|
+
format and their combinations, links, the four list types and nesting,
|
|
231
|
+
blockquotes, code blocks, tabs and soft breaks, horizontal rules, tables with
|
|
232
|
+
header cells, image galleries, and ActionText attachments (uploads and
|
|
233
|
+
mentions both emit `<action-text-attachment>` elements that ActionText can
|
|
234
|
+
re-render).
|
|
235
|
+
|
|
236
|
+
In both renderers an unknown node keeps its content — text falls back to a
|
|
237
|
+
plain paragraph rather than disappearing.
|
|
202
238
|
|
|
203
239
|
### Protocol codec (module functions)
|
|
204
240
|
|
data/lib/y/3.4/yrby.so
CHANGED
|
Binary file
|
data/lib/y/4.0/yrby.so
CHANGED
|
Binary file
|
data/lib/y/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.5.0
|
|
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-07-
|
|
11
|
+
date: 2026-07-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|