docblocks-react-ui 0.10.0 → 0.11.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,106 @@
1
1
  # docblocks-react-ui
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 14cf58a: The cover's frame's tint (the `coverTint`'s attribute — the absence's
8
+ default's on, the explicit's `false`'s off over the attributes panel's
9
+ checkbox's row, which stands over the cover's presence like the mode's
10
+ row): the editor's card's border mixes the cover's alpha-weighted
11
+ average color with the theme's border token (the `color-mix`'s 25%
12
+ share — the light's theme's pale's stand, the dark's gray's stand over
13
+ the same average's value; the theme's flip stands the re-mix without a
14
+ re-read). The average's read decodes the cover's blob over the `img`'s
15
+ element (the SVG's parity — the `createImageBitmap`'s SVG rejection's
16
+ stand) and weighs the alpha's share per pixel (the transparent's stand
17
+ no gray's pull). The `useCoverAverageColor()`'s hook exports the same
18
+ average's color (the `rgb(...)`'s string or `null` over the absent's /
19
+ the undecodable's stand) — the consumer's own chrome's data's source
20
+ (e.g. the glow's stand over the editor's surroundings — the consumer's
21
+ CSS, the package's DOM ends at the card).
22
+ - c4911e9: The cover's upload modal's preset gallery (the `coverPresets` provider
23
+ prop): the consumer's ready-made cover's file ids (the consumer's blob
24
+ store's ids — the same ids the store's `get` resolves) per placement
25
+ mode (the `tile` / the `center`'s set, each optional). The modal
26
+ renders the current mode's set over the 4-column's scrollable grid (the
27
+ visible's 3 rows' cap — the overflow scrolls, the 4-column's width
28
+ stands; a set over 12 ids scrolls, a shorter one stands the fewer
29
+ rows). The mode's switch stands the set's switch over the same grid,
30
+ and a pick commits the id over the mode WITHOUT an upload (the upload's
31
+ gate never runs over a preset — the consumer's catalog's curation's
32
+ stand; the thumbnails resolve over the store's `get`, the placeholder
33
+ over the loading / the missing's stands). Without the prop the grid
34
+ stands absent and the modal stands the enlarged's base's stand (the
35
+ former's 400 px's width stands the 440 px's, the drop zone's height the
36
+ 112 px's over the 144 px's).
37
+ - d1cb23e: The cover's upload stands the modal's stand (the placement mode's selector
38
+ over the tile / the centering, the drop zone's drag-and-drop + the click's
39
+ picker over the strict's png/jpeg/webp's accept, the mode's rule's info,
40
+ and the rejection's hint). The cover renders as a banner over the editor
41
+ frame's top edge (the full frame width's bleed, the frame's top corner's
42
+ clip, the bottom's 16 px's fade-out over the smooth's ease-out's curve — the
43
+ fixed's package's stand; the image's slightly dimmed stand over the dark
44
+ theme). The
45
+ tile's mode stands the strip scaled to the fixed's 150 px's height (the
46
+ width's proportional, the `repeat-x`'s horizontal glue over the narrow's,
47
+ the centered's side crop over the wide's), and the centering's mode stands
48
+ the width scaled to the frame's width (the height's proportional) over the
49
+ centered's 150 px's vertical slice (the narrower's scaled height stands its
50
+ own). The placement mode stores over the new `coverMode`
51
+ document-attribute key (the "center"'s stand — the tile's stand is the
52
+ key's absence), with the panel's mode toggle row over the `cover` row — the
53
+ toggle's switch stands gated: an option stands disabled when its gate is
54
+ known unmet over the current image (the centering's editor width's minimum,
55
+ the tile's 150 px's minimum height). The upload's gate stands per mode: the
56
+ 150 px's minimum height over the tile, the editor width's minimum over the
57
+ centering (the rejected file's bytes never reach the blob store).
58
+
59
+ ### Patch Changes
60
+
61
+ - e4c240a: The cover's upload gate: the image's intrinsic height is checked over
62
+ `createImageBitmap` before the upload — a cover shorter than 150 px is
63
+ rejected (the upload never reaches the consumer's blob store; the inline
64
+ hint stands the threshold, and the next attempt clears it), and an
65
+ undecodable payload stands the fail-open (the upload proceeds).
66
+
67
+ ## 0.10.1
68
+
69
+ ### Patch Changes
70
+
71
+ - 9188b14: The attributes panel's polish: the label column stands the longest
72
+ locale key (the Russian's published-date key — the `w-32`), the rows
73
+ stand a 4 px gap over the former padding, the row's minimum height
74
+ stands dropped (the rows hug the values' band), the "Not set"
75
+ placeholder stands the values' font and the column's left edge over
76
+ every row, and the `publishedAt` row is display-only (the value is
77
+ consumer-owned — the panel's edit entry and the row's removal stand
78
+ removed, like the `status` row; the
79
+ `docblocks/attributes-published-at` slot now marks the display span).
80
+ - 985c50f: The color pickers stand one shared mechanism (the canvas's palette's
81
+ parity): the circular swatches over the shared `ColorSwatches` with the
82
+ custom rainbow's swatch + the hex's input, and the trigger's preview over
83
+ the shared `ColorChip` (the current's color, the hollow's stroke over the
84
+ stroke's attrs, the `X` over the absent).
85
+
86
+ - The callout's menu: the native `input type="color"`'s picker stands
87
+ removed. The custom color's commit stands over the hex's field (the
88
+ Enter / the blur over the valid value); the close over the uncommitted
89
+ draft discards it (the canvas's Esc's parity — the former's
90
+ commit-on-close's scrub stands no stand). The
91
+ `docblocks/callout-color-picker` slot now marks the hex's input.
92
+ - The table's row / column background: the own square swatch's grid stands
93
+ removed over the shared's palette (the subcontent's slot
94
+ `docblocks/table-color-palette`); the conditional `Remove background`'s
95
+ item stands removed — the shared's none's swatch
96
+ (`docblocks/palette-none`) is the clear's mechanism. The handle's menu
97
+ closes over a swatch's pick (the palette's buttons stand no Radix
98
+ item's close of their own).
99
+ - The page format toolbar's color trigger stands the current's color's
100
+ chip (the mark's hex; the `X` over the absent / the mixed's range).
101
+ - The `ColorChip`'s primitive (the `docblocks/color-chip`'s slot) is the
102
+ shared's trigger's preview.
103
+
3
104
  ## 0.10.0
4
105
 
5
106
  ### Minor Changes
package/README.md CHANGED
@@ -98,7 +98,8 @@ mention catalog). The full props list:
98
98
  | `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. |
99
99
  | `provider?` | A core `SyncProvider` for the wire + presence. Without it the editor is a single-client document (local edits stand, nothing syncs). |
100
100
  | `blockRenderers?` | Per-type renderer overrides (see below). |
101
- | `blobStore?` | The blob bridge for image / pdf / file blocks (see below). |
101
+ | `blobStore?` | The blob bridge for image / pdf / file blocks and the document-attributes' cover (see below). |
102
+ | `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). |
102
103
  | `databaseBridge?` | The table operations behind external-form database blocks (see below). |
103
104
  | `syncEmbedResolver?` | `(ref) => Doc \| null` — resolves a `sync-embed` block's ref to the master doc (see below). |
104
105
  | `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). The opaque-origin restriction stands over this policy. |
@@ -317,7 +318,24 @@ anonymous plaintext selection over the room — the 0.2.0 behavior).
317
318
  ### Blobs
318
319
 
319
320
  File-backed blocks hold only consumer-owned ids: `file.attrs.fileId` for
320
- attachments and PDFs, and `image.attrs.src` for inline images. Bytes, names,
321
+ attachments and PDFs, and `image.attrs.src` for inline images. The
322
+ document-attributes' `cover` key stands the same contract: it holds the
323
+ consumer's file id for the cover image (the banner over the editor frame's
324
+ top edge + the row's thumbnail in the attributes panel), resolved over the
325
+ same store. The upload modal's optional preset gallery (the
326
+ `coverPresets` provider prop) lists the consumer's ready-made cover's ids
327
+ per placement mode (the `tile` / the `center`'s set) over the 4-column's
328
+ scrollable grid; a pick commits the id over the mode without an upload
329
+ (the thumbnails resolve over the same store). The stored cover also drives
330
+ the editor frame's **tint** (opt-out over the `coverTint` attribute — the
331
+ absence is the default on, the explicit `false` turns it off over the
332
+ attributes panel's checkbox): the card's border mixes the cover's
333
+ alpha-weighted average color with the theme's border token (the `color-mix`
334
+ 25% share — pale over the light theme, gray-mixed over the dark one). The
335
+ `useCoverAverageColor()` hook (below) exports the same average for the
336
+ consumer's own chrome — e.g. a glow over the editor's surroundings —
337
+ which stays the consumer's CSS (the package's DOM ends at the card). Bytes,
338
+ names,
321
339
  and MIME types never enter the document. `BlobStore` is the only bridge
322
340
  between those ids and the stored objects:
323
341
 
@@ -339,7 +357,8 @@ interface BlobStore {
339
357
  ```
340
358
 
341
359
  - `get` rejects an unknown id; the block renders a placeholder while loading
342
- or when the id is unavailable. The library creates an object URL for the
360
+ or when the id is unavailable (the cover banner stands absent over the
361
+ unknown id). The library creates an object URL for the
343
362
  returned blob and revokes it on replacement or unmount.
344
363
  - **The meta-only stand (opt-in):** with the optional `getMeta` member the
345
364
  blocks resolve the metadata first (a cheap head stand, no body transfer).
@@ -713,6 +732,10 @@ value actually changes (the store's reference-stability contract):
713
732
  the title changed).
714
733
  - `useEditorContext()` — the whole provider context (the store, the
715
734
  resolvers, the access stand).
735
+ - `useCoverAverageColor()` — the stored cover's alpha-weighted average
736
+ color (the `rgb(...)` string or `null` over the absent / the
737
+ undecodable's stand) — the frame's tint's data and the consumer's
738
+ surroundings' glow's source.
716
739
  - `useDatabaseTable(bridge, tableId, filter?)` — the external database
717
740
  block's grid controller (a consumer-owned grid over the bridge).
718
741