docblocks-react-ui 0.24.0 → 0.25.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.25.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b113562: The external-form database grid's header row is resizable: dragging the strip
8
+ over its lower edge sets the height of every header cell at once, with the
9
+ live preview and one commit on the release. The height lands in the block's
10
+ `headerHeight` attr (document data — undoable, synced, restored on reload) or,
11
+ over the `EditorProvider.databaseTableSection` contract, in the consumer's
12
+ per-table value (one height over every block referencing the table; the
13
+ block's own attr wins). The auto height is the drag's floor and read-only
14
+ modes render no handle. The standalone `DatabaseTable` takes the same
15
+ `tableSection` contract.
16
+ - 58dfce7: The published stand's selection policy is the consumer's: the new
17
+ `publishedCopyable` provider prop makes the published snapshot's page text
18
+ selectable and copyable — the `view` mode's parity (the editor's copy
19
+ payload: marks, `@label` mentions, cross-block ranges, the table's grid
20
+ serialization). The default keeps the reader's selection and copy off; the
21
+ canvas world keeps the no-select stand either way.
22
+
23
+ ### Patch Changes
24
+
25
+ - 4d8da14: The floating format toolbar never paints over the consumer's chrome above the
26
+ editor: a selection the DOM carries no rect for (the canvas/page switch
27
+ re-seats it over a re-mounted page) keeps the bar's last position instead of
28
+ anchoring off an empty rect, and the bar's own stand never lands above the
29
+ editor root's upper edge.
30
+ - 86d46fa: The column seam at a merged region's interior boundary stands and resizes
31
+ its covered column: a drag over the seam of a column a `colspan` region
32
+ covers commits that column's width (the region's width follows the
33
+ columns' sum). The region's reorder handles stay hidden (the core's
34
+ move/insert guards stand).
35
+ - Updated dependencies [b113562]
36
+ - docblocks-core@0.10.0
37
+
38
+ ## 0.24.1
39
+
40
+ ### Patch Changes
41
+
42
+ - 345f059: The link editor's popover closes on an outside press (the document's
43
+ pointerdown over the popover's own press's exclusion) and on the document's
44
+ Escape (the input's no-focus's stand) — the stands the anchor's right-click
45
+ menu already kept. A press on the popover's input keeps the mousedown's
46
+ default (the input's focus + the caret's seat over the click), so the
47
+ address's edit works after the input lost the focus — the typing lands in
48
+ the input, not in the document. The popover's chrome keeps the default's
49
+ suppression (the document's selection's life over the edit).
50
+
3
51
  ## 0.24.0
4
52
 
5
53
  ### Minor Changes
package/README.md CHANGED
@@ -97,25 +97,27 @@ slash command is hidden without a bridge; the `sync-embed` block stands
97
97
  its broken state without a resolver; the `@` stays plain text without a
98
98
  mention catalog). The full props list:
99
99
 
100
- | Prop | Contract |
101
- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
102
- | `doc` | The core `Doc` to render. Must not change after mount (a throw on change is the contract). Required for the `editor` stand; over the `viewer`'s level the doc IS the published snapshot (the security model — the reader's browser never receives the live document), and an absent stand renders the "not published yet" placeholder. |
103
- | `provider?` | A core `SyncProvider` for the wire + presence. Without it the editor is a single-client document (local edits stand, nothing syncs). |
104
- | `blockRenderers?` | Per-type renderer overrides (see below). |
105
- | `blobStore?` | The blob bridge for image / pdf / file blocks and the document-attributes' cover (see below). |
106
- | `coverPresets?` | The cover's upload modal's preset gallery: the consumer's ready-made cover's file ids (the consumer's blob store's ids) per placement mode — the `tile` / the `center`'s set. A pick commits the id over the mode without an upload (see Blobs below). |
107
- | `databaseBridge?` | The table operations behind external-form database blocks (see below). |
108
- | `syncEmbedResolver?` | `(ref) => Doc \| null` — resolves a `sync-embed` block's ref to the master doc (see below). |
109
- | `embedSandbox?` | `(src) => string \| null` — the embed iframe's `sandbox` policy. The default grants the same-origin (the embedded app's own storage / cookies stand, so the real apps boot); `null` stands no sandbox (a fully trusted embed). Over an untrusted URL stand the `""`'s return (the opaque origin, no scripts); the opaque-origin's restriction stands over this policy. |
110
- | `pdfPreview?` | A first-page preview component for PDF file blocks (and legacy PDF image blocks). |
111
- | `mentionProvider?` | The `@` mention picker's search catalog (see below). |
112
- | `mentionInteractions?` | The mention chip's hover card + the click's delivery (see below). Without the prop the chip stands inert (no card, the click is the browser's stand). |
113
- | `rootBlockId?` | Render the entry list of this block instead of the document root (the subtree view). Must not change after mount. |
114
- | `commandPalettePlaceholder?` | The empty-block hint override; the default is localized (en/ru). |
115
- | `accessLevel?` | The consumer's user access level (default `editor`): `viewer` forces the `published` mode (the current state is never rendered to a reader). |
116
- | `mode?` | The document mode (default `edit`): `view` is a read-only live document; `published` renders the `publishedDoc` snapshot read-only. |
117
- | `publishedDoc?` | The published snapshot (a hydrated core `Doc`; must not change after mount — remount over `key` for a new snapshot). The consumer owns the publish action and the snapshot storage. |
118
- | `presence?` | The local user's presence identity + the selection-sharing cipher (see Presence sharing below). Without the prop the editor keeps the legacy stand (the anonymous plaintext selection, always shared over the room). |
100
+ | Prop | Contract |
101
+ | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
102
+ | `doc` | The core `Doc` to render. Must not change after mount (a throw on change is the contract). Required for the `editor` stand; over the `viewer`'s level the doc IS the published snapshot (the security model — the reader's browser never receives the live document), and an absent stand renders the "not published yet" placeholder. |
103
+ | `provider?` | A core `SyncProvider` for the wire + presence. Without it the editor is a single-client document (local edits stand, nothing syncs). |
104
+ | `blockRenderers?` | Per-type renderer overrides (see below). |
105
+ | `blobStore?` | The blob bridge for image / pdf / file blocks and the document-attributes' cover (see below). |
106
+ | `coverPresets?` | The cover's upload modal's preset gallery: the consumer's ready-made cover's file ids (the consumer's blob store's ids) per placement mode — the `tile` / the `center`'s set. A pick commits the id over the mode without an upload (see Blobs below). |
107
+ | `databaseBridge?` | The table operations behind external-form database blocks (see below). |
108
+ | `databaseTableSection?` | The per-table section settings: `getHeaderHeight(tableId)` + `setHeaderHeight(tableId, height)` (see Database below). The grid reads the header-row height per table; a block's own attr wins over it. |
109
+ | `syncEmbedResolver?` | `(ref) => Doc \| null` — resolves a `sync-embed` block's ref to the master doc (see below). |
110
+ | `embedSandbox?` | `(src) => string \| null` — the embed iframe's `sandbox` policy. The default grants the same-origin (the embedded app's own storage / cookies stand, so the real apps boot); `null` stands no sandbox (a fully trusted embed). Over an untrusted URL stand the `""`'s return (the opaque origin, no scripts); the opaque-origin's restriction stands over this policy. |
111
+ | `pdfPreview?` | A first-page preview component for PDF file blocks (and legacy PDF image blocks). |
112
+ | `mentionProvider?` | The `@` mention picker's search catalog (see below). |
113
+ | `mentionInteractions?` | The mention chip's hover card + the click's delivery (see below). Without the prop the chip stands inert (no card, the click is the browser's stand). |
114
+ | `rootBlockId?` | Render the entry list of this block instead of the document root (the subtree view). Must not change after mount. |
115
+ | `commandPalettePlaceholder?` | The empty-block hint override; the default is localized (en/ru). |
116
+ | `accessLevel?` | The consumer's user access level (default `editor`): `viewer` forces the `published` mode (the current state is never rendered to a reader). |
117
+ | `mode?` | The document mode (default `edit`): `view` is a read-only live document; `published` renders the `publishedDoc` snapshot read-only. |
118
+ | `publishedDoc?` | The published snapshot (a hydrated core `Doc`; must not change after mount — remount over `key` for a new snapshot). The consumer owns the publish action and the snapshot storage. |
119
+ | `publishedCopyable?` | The published stand's selection policy (default `false`): `true` makes the published snapshot's page text selectable and copyable — the `view` mode's parity (the editor's copy payload: marks, `@label` mentions, cross-block ranges, the table's grid serialization); the canvas world keeps the no-select stand. The consumer decides per reader. Session state — never document data. |
120
+ | `presence?` | The local user's presence identity + the selection-sharing cipher (see Presence sharing below). Without the prop the editor keeps the legacy stand (the anonymous plaintext selection, always shared over the room). |
119
121
 
120
122
  Two rules for the optional props:
121
123
 
@@ -210,10 +212,14 @@ document data, never on the wire):
210
212
  ranges); a native table block copies as a spreadsheet's grid (the
211
213
  `text/html` flavor is a real `<table>`, the `text/plain` one the TSV —
212
214
  the block's own selection copies the whole table). The `published`
213
- mode stands no selection and no copy (the reader gets the rendered page
214
- only). The editor root carries the resolved mode over the `data-mode`
215
- attribute (the styling hook; `data-readonly` marks both read-only
216
- modes).
215
+ mode stands no selection and no copy by default (the reader gets the
216
+ rendered page only); the `publishedCopyable` provider prop lifts the
217
+ block per reader — the published page text then stands selectable and
218
+ copyable over the same editor payload as `view`. The canvas world keeps
219
+ the no-select stand in every mode. The editor root carries the resolved
220
+ mode over the `data-mode` attribute (the styling hook; `data-readonly`
221
+ marks both read-only modes, `data-copyable` the copyable published
222
+ stand).
217
223
  - Publishing is a consumer action: snapshot the doc state (`doc.encode()`
218
224
  or `doc.toJSON()`), persist it where the reader loads it from, and
219
225
  hydrate it (`loadDoc` / `fromJSON`) — for the `editor`'s `published`
@@ -597,6 +603,19 @@ and reorders them by dragging their grips or pressing ArrowUp/ArrowDown on a
597
603
  focused grip. Header drag and the popover share one full column order, and
598
604
  visible column widths follow the moved column.
599
605
 
606
+ The header row's **height** is adjustable: dragging the lower edge of the
607
+ header row (the full-width strip over its bottom border) sets the height of
608
+ every header cell at once, with the live preview and one commit on the
609
+ release. The drag cannot go below the header's own auto height (the column
610
+ names never render clipped) and stops at a 600 px ceiling. The height has
611
+ two persistence levels: the block's `headerHeight` attr (document data —
612
+ survives the reload, reaches the other participants over the wire, undoes),
613
+ and the table-level value of the consumer's tables section (the
614
+ `databaseTableSection` provider prop, see the props table). A block's own
615
+ attr wins over the table-level value; a block without one follows the table
616
+ and falls back to the auto height. Read-only modes apply the height and
617
+ render no handle.
618
+
600
619
  The grid's **Filter** control edits a recursive and/or condition tree: one
601
620
  row per condition (the field / the operator / the value over the column's
602
621
  annotation, a single line), the nested groups over bordered cards, and the
@@ -640,7 +659,7 @@ function TablesSection({ bridge }: { bridge: DatabaseBridge }) {
640
659
  ```
641
660
 
642
661
  - `DatabaseTable({ bridge, tableId, readOnly?, view?, onViewChange?,
643
- className? })` —
662
+ className?, tableSection? })` —
644
663
  the live grid over the bridge's table id (the same data stand as the
645
664
  document block: the schema, the rows, the live events, the optimistic
646
665
  cell layer). The view's settings (`filter`, `columnOrder`,
@@ -648,7 +667,13 @@ className? })` —
648
667
  the optional `view` prop at mount); `onViewChange(patch)` receives one
649
668
  patch per change for the consumer's persistence (the controlled mode
650
669
  stands absent — the state is never external). `readOnly` gates the
651
- editing's paths (the read-only block's parity). The standalone's grid
670
+ editing's paths (the read-only block's parity). `tableSection` is the
671
+ same per-table contract the `EditorProvider` takes: the header row's
672
+ height comes from `getHeaderHeight(tableId)` and the grid's drag commits
673
+ it back over `setHeaderHeight(tableId, height)`, so the section's value and
674
+ the document blocks over the same table stand one height. Without the
675
+ contract the grid renders no header handle (the header keeps the auto
676
+ height). The standalone's grid
652
677
  stands no table-name display — the consumer's own visual element (the
653
678
  section's list / the heading) stands the name; the document block's
654
679
  grid keeps the live name + the rename over it. The sizing's stand is