docblocks-react-ui 0.29.1 → 0.30.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # docblocks-react-ui
2
2
 
3
+ ## 0.30.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 52822ae: The empty page's input stand: a full-document empty page (the edit mode)
8
+ stands a visible, focusable caret home (the command-palette placeholder's
9
+ affordance) while the root holds no blocks, so a newly created or peer-emptied
10
+ document is editable again. The arrival stands nothing — the untouched doc
11
+ gains no block and no version (the no-phantom-version invariant holds). The
12
+ first gesture (the click over the stand, or the first input over a pure
13
+ container position) materializes the first paragraph: a fresh id (the
14
+ reserved `${docId}-tail` stays free for the trailing-paragraph guarantee, so
15
+ a later non-text tail still stands its editable trailing line) and seats the
16
+ caret in it; the stand unmounts over the real block's row. The read-only
17
+ empty page stands no stand.
18
+ - 1459e60: The table's auto-sizing stand: a table with no stored `columnWidths`
19
+ (the import / the paste / the slash insert's stand) renders its columns
20
+ over the first row's text (one line without the wrap, the 50 px minimum
21
+ floor), stretched proportionally to the page column's content width — the
22
+ table spans the content. A sum over the container stands un-stretched
23
+ (the overflow scrolls). The first seam resize (the pointer's drag or the
24
+ keyboard's step) materializes the layout: the commit stores the full width
25
+ array in one transaction, and the undo reverts to the auto stand. A table
26
+ with stored `columnWidths` stands them un-stretched (the explicit stand's
27
+ priority). The slash's Table insert now stands a widthless table (the auto
28
+ stand) instead of the fixed 100 px default widths.
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [d7807c7]
33
+ - docblocks-core@0.14.0
34
+
35
+ ## 0.29.2
36
+
37
+ ### Patch Changes
38
+
39
+ - 0caf66d: The editor store resyncs over the document's snapshot right after the mount
40
+ subscription: a change committed between the render (the store's seed) and
41
+ `doc.onChange` was invisible to the store, so an editor mounted over a
42
+ document whose state lands in that window could stay blank. An unmoved
43
+ document stands a no-op, and an unchanged block keeps its reference.
44
+ - 03c20c7: The trailing-paragraph guard writes nothing when a remote change leaves the
45
+ page empty: the empty page is the editor's own stand, so a document opened
46
+ without content (or emptied by a peer) is not edited by the guard on
47
+ arrival. The non-empty sequence with a non-text tail keeps its paragraph.
48
+ - Updated dependencies [49aaea5]
49
+ - docblocks-core@0.13.0
50
+
3
51
  ## 0.29.1
4
52
 
5
53
  ### Patch Changes
package/README.md CHANGED
@@ -207,6 +207,14 @@ document data, never on the wire):
207
207
  off); the read-only gestures keep (scroll, the embed pan / zoom, the
208
208
  canvas wheel zoom / pan). Consecutive empty text blocks render as one
209
209
  over the read-only modes (the document data is untouched).
210
+ - **The empty page's input stand (the `edit` mode only):** a full-document
211
+ empty page (the root holds no blocks) stands a visible, focusable caret
212
+ home (the command-palette placeholder's affordance) so a newly created or
213
+ peer-emptied document is editable. The arrival stands nothing — the
214
+ untouched doc gains no block and no version; the first gesture (the click
215
+ over the stand, or the first input over a pure container position)
216
+ materializes the first paragraph and seats the caret in it, and the stand
217
+ unmounts over the real block. The read-only empty page stands no stand.
210
218
  - Copy: the `view` mode's text stands selectable and copyable (the
211
219
  editor's payload keeps the marks, the mentions, and the cross-block
212
220
  ranges); a native table block copies as a spreadsheet's grid (the
@@ -309,6 +317,12 @@ attach(doc, provider);
309
317
  span the grid fits; the parse never throws and the same payload always
310
318
  imports the same document. The markdown path carries no merged cells (GFM
311
319
  cannot express them);
320
+ - a table imported from markdown / HTML stores no `columnWidths` — the
321
+ renderer auto-sizes a table with no stored widths: the columns stand the
322
+ first row's text (one line, the 50 px minimum) stretched proportionally
323
+ to the page column's content width, and the first seam resize
324
+ materializes the layout (the stored `columnWidths` from then on). A table
325
+ with stored `columnWidths` stands them un-stretched;
312
326
  - an empty or whitespace-only payload is a no-op (no transaction);
313
327
  - a non-fresh document (the root has children) throws the typed
314
328
  `ImportDocumentError` — the import fills the root, it never appends;
@@ -337,7 +351,7 @@ import { useEffect, useMemo } from "react";
337
351
 
338
352
  import { WsSyncProvider, attach, createDoc } from "docblocks-core";
339
353
 
340
- const doc = createDoc({ id: "room-1" }); // or restore it (the Persistence section)
354
+ const doc = createDoc({ id: "room-1" }); // a new document; an existing one — openDoc({ id })
341
355
 
342
356
  function App() {
343
357
  const provider = useMemo(() => new WsSyncProvider("ws://my-server:5199/room-1"), []);
@@ -359,7 +373,11 @@ function App() {
359
373
 
360
374
  - `attach` bootstraps the session (it sends the full local state first,
361
375
  then routes local transactions out and remote updates in); detach it on
362
- unmount.
376
+ unmount. A doc with no state at all — one opened with `openDoc({ id })` —
377
+ sends no bootstrap: opening an existing document is the server's state
378
+ arriving, not a local seed pushed into the room, so an unchanged document
379
+ gains no version. The opened doc's reads are empty and its writes throw
380
+ until that state lands.
363
381
  - `WsSyncProvider` speaks standard y-protocols over WebSocket (the
364
382
  y-websocket wire, wire-compatible with a standard y-websocket server);
365
383
  `options: { token?, webSocketImpl?, maxPendingBytes?, maxFrameBytes? }`