docblocks-react-ui 0.21.0 → 0.23.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,71 @@
1
1
  # docblocks-react-ui
2
2
 
3
+ ## 0.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bb8b0fc: An image renders straight from the store's `downloadUrl` when the store
8
+ supplies both optional members: the `image` block's `<img>` src is
9
+ `downloadUrl(fileId)` — the browser's own cacheable subrequest — instead of
10
+ the bytes fetched over `get` into an object URL. A response fetched into a
11
+ blob URL never reuses the native response cache on WebKit, so a page reload
12
+ in Safari re-downloaded every image regardless of the backend's
13
+ `Cache-Control: immutable`.
14
+
15
+ The document attributes' cover stands the same contract: the banner, the
16
+ row's thumbnail and the preset cells render the store's URL, and the
17
+ intrinsic-dimension probe plus the frame's tint read that same URL instead
18
+ of decoding the blob (a cross-origin URL without CORS taints the tint's
19
+ canvas — the tint falls back to the fetched bytes' same-origin object URL).
20
+
21
+ `getMeta` still decides the MIME and reserves the placeholder's aspect
22
+ ratio; the consumer's URL must serve the payload inline (a
23
+ `Content-Disposition: attachment` response suits the download card only).
24
+ PDF payloads (the preview and the native iframe), a store without `getMeta`
25
+ (the MIME is unknown before the bytes) and an executable-scheme URL keep
26
+ the bytes' path; without `downloadUrl` nothing changes.
27
+
28
+ ## 0.22.0
29
+
30
+ ### Minor Changes
31
+
32
+ - 9f02d63: The table's merged cells over the editor: the anchor cell renders the
33
+ region's `colspan`/`rowspan` (the covered cells stand no `<td>`, the
34
+ browser's own table layout carries the geometry), and the cell's corner grip
35
+ drags a rectangular cell range — the new `tableRange` view-state slice,
36
+ never document data. The cell's right-click menu gains **Merge cells** over
37
+ a selected rectangle and **Split cells** over a merged cell (the anchor
38
+ keeps its content, the restored cells stand empty); the grid coordinates the
39
+ hover and the range read come from the resolver, not the DOM's
40
+ `cellIndex`/`rowIndex`, so a merged cell's drawn position never lies. The
41
+ read-only modes render the spans without the grip, the menu commands or the
42
+ resizing chrome.
43
+
44
+ The range's drag resolves the cell from the DOM boxes (never the top-most
45
+ element — the table's chrome overlays the grid), selects whole regions (a
46
+ rectangle never cuts a merged cell), stands no resize seam inside a region,
47
+ and clears on a press over the document's content outside the table.
48
+
49
+ A region's chrome offers nothing it cannot do: no resize seam inside the
50
+ region, no reorder handle over a spanned column / row, and the cell range
51
+ resets over a structural change (its rectangles were read from the cells'
52
+ positions).
53
+
54
+ The add-row chip's drag counts the rows the pointer actually travels: the
55
+ step is the last row's height (it was a fixed 24 px, so one row's worth of
56
+ drag removed two), the removal walks the real row heights from the last one,
57
+ the ghost rows stand the real row height, and the size stand spells the
58
+ delta out (`3 × 3 − 1`).
59
+
60
+ The rows a negative add-chip drag removes stand the columns' fill over the
61
+ last rows (the count rides the size stand), and the slash `/table` takes an
62
+ empty block's slot instead of leaving an empty paragraph above the grid.
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [db5cfee]
67
+ - docblocks-core@0.9.0
68
+
3
69
  ## 0.21.0
4
70
 
5
71
  ### Minor Changes
package/README.md CHANGED
@@ -470,14 +470,31 @@ interface BlobStore {
470
470
  - **The meta-only stand (opt-in):** with the optional `getMeta` member the
471
471
  blocks resolve the metadata first (a cheap head stand, no body transfer).
472
472
  A MIME the block renders — `application/pdf` for the `file` block, the
473
- `image/*` and `application/pdf` payloads for the `image` block — still
474
- resolves the bytes over `get` (the pdf preview / the `<img>` stand
475
- unchanged); any other MIME stands the download card WITHOUT fetching the
476
- bytes (no `get` call, no object URL), the download's href standing the
477
- consumer's `downloadUrl(fileId)`. Without `getMeta` — or without
478
- `downloadUrl` — the blocks keep the legacy stand (the bytes over `get`,
479
- the object URL's href). Both members are optional: existing consumers and
473
+ `image/*` and `application/pdf` payloads for the `image` block — resolves
474
+ the bytes over `get` (the pdf preview / the `<img>` stand), except for an
475
+ image the store's `downloadUrl` serves (the next bullet); any other MIME
476
+ stands the download card WITHOUT fetching the bytes (no `get` call, no
477
+ object URL), the download's href standing the consumer's
478
+ `downloadUrl(fileId)`. Without `getMeta` — or without `downloadUrl` — the
479
+ blocks keep the legacy stand (the bytes over `get`, the object URL's
480
+ href). Both members are optional: existing consumers and
480
481
  `createMemoryBlobStore` stand exactly the legacy behavior.
482
+ - **The direct image URL:** an `image/*` payload over a store that supplies
483
+ both `getMeta` and `downloadUrl` renders `<img src={downloadUrl(fileId)}>`
484
+ — the browser's own subrequest, cached natively. The library neither
485
+ fetches the bytes nor creates an object URL: a `fetch`-resolved blob URL
486
+ never reuses the native cache on WebKit, so every page reload
487
+ re-downloaded the images. `getMeta` still decides the MIME and reserves
488
+ the placeholder's aspect ratio, and `downloadUrl` serves the payload
489
+ inline (a `Content-Disposition: attachment` response suits the download
490
+ card only). PDF payloads stay on the bytes' path (the preview and the
491
+ iframe read the bytes); without `getMeta` — the MIME is unknown before
492
+ the bytes — or over an executable-scheme URL, an image keeps that path as
493
+ well. The document attributes' cover stands the same contract: the
494
+ banner, the row's thumbnail and the preset cells render the store's URL,
495
+ and the intrinsic-dimension probe plus the frame's tint read that same
496
+ URL (a cross-origin URL without CORS taints the tint's canvas — the tint
497
+ falls back to the fetched bytes' same-origin object URL).
481
498
  - **The lazy resolution (the default):** the metadata's head lookup runs at
482
499
  mount (the placeholder reserves the aspect ratio from `width`/`height`),
483
500
  and the bytes resolve only once the block enters the preload band — the
@@ -905,7 +922,9 @@ value actually changes (the store's reference-stability contract):
905
922
  - `useCoverAverageColor()` — the stored cover's alpha-weighted average
906
923
  color (the `rgb(...)` string or `null` over the absent / the
907
924
  undecodable's stand) — the frame's tint's data and the consumer's
908
- surroundings' glow's source.
925
+ surroundings' glow's source. The read stands over the cover's resolved
926
+ URL (the store's `downloadUrl` when supplied, the object URL otherwise);
927
+ a cross-origin URL without CORS falls back to the fetched bytes.
909
928
  - `useDatabaseTable(bridge, tableId, filter?)` — the external database
910
929
  block's grid controller (a consumer-owned grid over the bridge).
911
930