docblocks-react-ui 0.10.1 → 0.12.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,172 @@
1
1
  # docblocks-react-ui
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 086e514: The canvas figure's fill stand over the themes (the render-time's transform,
8
+ no document data change): the light theme stands the fixed-hex fill verbatim
9
+ (import fidelity), the dark theme stands the light fixed fill darkened (the
10
+ dark corridor — the hue kept, the lightness over the dark, the saturation
11
+ reduced; dark fills pass through; palette-token fills are unchanged in both
12
+ themes). The figure text without an explicit `textColor` resolves the
13
+ contrast against the effective fill (black or white by the better WCAG
14
+ contrast; an explicit `textColor` always wins). The dark-class flip
15
+ re-renders the figures with no wire writes and no document-state mutation;
16
+ the strokes pass through unchanged.
17
+ - 43e2183: The canvas figure's stroke and the connector's line color stand the same
18
+ themes' transform as the fill (the render-time's dark corridor): over the
19
+ dark theme a light fixed-hex `stroke` (the shape's border) and `strokeColor`
20
+ (the connector's line, the arrowheads, and the label chip's frame) stand the
21
+ darkened's value; dark values and the theme tokens pass through, and the
22
+ light theme stands the data verbatim. The document keeps the source hex (no
23
+ wire writes, no persistence).
24
+ - d97a429: The floating format toolbar's color palette (the text's `color` / the
25
+ background's `highlight` target) stands the reset's affordance: a cross
26
+ button after all the palette's swatches clears the active target's mark
27
+ (`unsetMark`). The other palettes (the callout's background, the table's
28
+ handles, the canvas's fill / stroke) keep the transparent's "no color"
29
+ swatch.
30
+ - acb03c6: The mermaid diagram preview's viewport (the `./mermaid` subpath): the diagram now renders over a pan/zoom viewport — the `ctrl`/`cmd` + wheel's zoom at the cursor (0.25–4x), the plain wheel's vertical pan, the drag's pan, and the hover toolbar (zoom in / out, the percent label, the fit-to-view button, the reset) over the diagram. The fit stands the diagram into the visible viewport (capped at 100% — the small diagram stands its natural size, centered); the reset restores the default view. The view persists over the code block's new optional `zoom` / `panX` / `panY` attrs (the null idiom — the reload restores the view, the panes share it over the wire; the persisted coordinate stands the clamped stand — the sub-wrapper content's centering offset is the identity's canonical coordinate, so the peer's adopt stands the no-write parity). The bottom-edge's resize (the editing mode's stand) stretches / clips the diagram's height over the new optional `height` attr (absent = the diagram's natural's height — the auto's stand; the drag's linear stand over the pointer delta, the keyboard's step per press). The attrs are additive over the `code` block's schema; the code mode stands the attrs inert.
31
+
32
+ ### Patch Changes
33
+
34
+ - The shape and canvas-text toolbars' text color section stands the reset's
35
+ cross — the none's button over the row's tail (the after-all-the-colors'
36
+ position, the page's format palette's parity): the active stand over the
37
+ `textColor`'s set, the inert stand over the unset color (the pick is a
38
+ no-op). The pick removes the `textColor` attr over the core's
39
+ `removeBlockAttr` (one transact, one undo step) and returns the text to
40
+ the no-color's stand — the contrast's resolution over the effective fill
41
+ (or the theme's foreground when the fill stands none) — in the shape and
42
+ the canvas-text alike. The color's sections keep the transparent swatch's
43
+ none over the fill / stroke / line / label palettes (their data's "none"
44
+ stand) — the cross is the text color's affordance only.
45
+ - 049735e: The canvas-text's figure stands the side insets from the box's edges
46
+ (the shape's text's padding parity — the rect's 8 px x): the item's
47
+ wrapper carries the horizontal padding inside the box (the border-box's
48
+ stand — the selection's frame and the item's geometry are unmoved, the
49
+ text's wrap width stands the inset's width). The double-click's ghost
50
+ stands the same inset (the commit's visual continuity — the typed text
51
+ stands where the committed text stands).
52
+ - 64abd94: Improved the canvas view's re-render contract for large canvases (several
53
+ thousands of figures and connectors): the viewport state (the in-flight
54
+ session's previews — the move / the resize, the connector endpoint's
55
+ drag, the keyboard focus) stands in a per-view zustand store, and the
56
+ canvas items / connector lines / port dots / label chips subscribe to
57
+ their own narrow slices (a pointermove re-renders only the items and the
58
+ lines the preview touches, never the resting surface). The surfaces'
59
+ chrome re-render keys over a structural chrome stamp (a content-only
60
+ change stands no re-render of the chrome). The off-viewport items stand
61
+ no DOM of their own (the viewport's culling over the visible world rect
62
+ + the 300px margin — the off-viewport figures / connectors mount / unmount
63
+ over the pan's bring-in / take-out; the in-flight session's items stand
64
+ un-culled). The canvas view's module set stands split by responsibility
65
+ (the world assembly, the world-space overlays, the screen-space chrome,
66
+ the selection's overlay, the per-line / per-item math).
67
+ - 9efe1d4: Fixed the code block's caption line losing the focus (and the empty line
68
+ unmounting) over a press of the caption's button while a caret stood in
69
+ the code: the page container's stranded-caret re-seat mistook the form
70
+ control's focus residue (the document selection standing a collapsed caret
71
+ at a container position while the input holds the focus) for a stranded
72
+ caret and re-seated it into the block on every frame, blurring the
73
+ just-seated input. The re-seat now stands no while a form control inside
74
+ the container holds the focus (the control's landing stands a genuine
75
+ one).
76
+ - de984b6: The code block's copy button now copies the `text/html` payload (the `PRE`
77
+ over the code's child, the `language-*` class on the `code` element) plus
78
+ the `text/plain` fallback — the paste into a text block materializes the
79
+ code block verbatim through the rich pipeline (the plain payload's
80
+ markdown pipeline stood the distortion: the newlines collapsed, the
81
+ indentation lost, the markdown-flavored lines re-blocked — the `---` to
82
+ the divider, the `# x` to the heading, …). The rich pipeline now reads
83
+ the `language-*` class back over the `PRE`'s materialization (the
84
+ language's round-trip's stand — over the `PRE`'s own class or the
85
+ `code`'s child's, the producer's convention's positions); the paste into
86
+ the code block keeps the plain payload's stand (the `plainWins`'s gate),
87
+ and the external apps receive the plain fallback unchanged (the legacy
88
+ engines without `ClipboardItem` stand the plain write).
89
+ - 7b7917c: The link's click over the edit's mode: the browser cancels the anchor's
90
+ navigation default inside the contenteditable (the caret's seat stands),
91
+ so a clicked link stood dead — the editor now opens the href itself over
92
+ the new tab's stand (`noopener,noreferrer`, the `window.open`'s
93
+ gesture's call) — the edit and the view's modes stand the same contract
94
+ (the reader's same-tab's carry-away's off), the editor's state stands
95
+ untouched (the caret's seat and the focus are the mousedown's default's
96
+ work — preserved; no write, no navigation). A press-drag over the link
97
+ (the selection's gesture) stands no open (the down/click distance's
98
+ guard); the modified clicks and the middle-click stand the browser's
99
+ native stands; the rendered anchor stands `rel="noopener noreferrer"`
100
+ (the native open's security's parity).
101
+ - Updated dependencies [75e6caa]
102
+ - Updated dependencies
103
+ - Updated dependencies [acb03c6]
104
+ - docblocks-core@0.5.0
105
+
106
+ ## 0.11.0
107
+
108
+ ### Minor Changes
109
+
110
+ - 14cf58a: The cover's frame's tint (the `coverTint`'s attribute — the absence's
111
+ default's on, the explicit's `false`'s off over the attributes panel's
112
+ checkbox's row, which stands over the cover's presence like the mode's
113
+ row): the editor's card's border mixes the cover's alpha-weighted
114
+ average color with the theme's border token (the `color-mix`'s 25%
115
+ share — the light's theme's pale's stand, the dark's gray's stand over
116
+ the same average's value; the theme's flip stands the re-mix without a
117
+ re-read). The average's read decodes the cover's blob over the `img`'s
118
+ element (the SVG's parity — the `createImageBitmap`'s SVG rejection's
119
+ stand) and weighs the alpha's share per pixel (the transparent's stand
120
+ no gray's pull). The `useCoverAverageColor()`'s hook exports the same
121
+ average's color (the `rgb(...)`'s string or `null` over the absent's /
122
+ the undecodable's stand) — the consumer's own chrome's data's source
123
+ (e.g. the glow's stand over the editor's surroundings — the consumer's
124
+ CSS, the package's DOM ends at the card).
125
+ - c4911e9: The cover's upload modal's preset gallery (the `coverPresets` provider
126
+ prop): the consumer's ready-made cover's file ids (the consumer's blob
127
+ store's ids — the same ids the store's `get` resolves) per placement
128
+ mode (the `tile` / the `center`'s set, each optional). The modal
129
+ renders the current mode's set over the 4-column's scrollable grid (the
130
+ visible's 3 rows' cap — the overflow scrolls, the 4-column's width
131
+ stands; a set over 12 ids scrolls, a shorter one stands the fewer
132
+ rows). The mode's switch stands the set's switch over the same grid,
133
+ and a pick commits the id over the mode WITHOUT an upload (the upload's
134
+ gate never runs over a preset — the consumer's catalog's curation's
135
+ stand; the thumbnails resolve over the store's `get`, the placeholder
136
+ over the loading / the missing's stands). Without the prop the grid
137
+ stands absent and the modal stands the enlarged's base's stand (the
138
+ former's 400 px's width stands the 440 px's, the drop zone's height the
139
+ 112 px's over the 144 px's).
140
+ - d1cb23e: The cover's upload stands the modal's stand (the placement mode's selector
141
+ over the tile / the centering, the drop zone's drag-and-drop + the click's
142
+ picker over the strict's png/jpeg/webp's accept, the mode's rule's info,
143
+ and the rejection's hint). The cover renders as a banner over the editor
144
+ frame's top edge (the full frame width's bleed, the frame's top corner's
145
+ clip, the bottom's 16 px's fade-out over the smooth's ease-out's curve — the
146
+ fixed's package's stand; the image's slightly dimmed stand over the dark
147
+ theme). The
148
+ tile's mode stands the strip scaled to the fixed's 150 px's height (the
149
+ width's proportional, the `repeat-x`'s horizontal glue over the narrow's,
150
+ the centered's side crop over the wide's), and the centering's mode stands
151
+ the width scaled to the frame's width (the height's proportional) over the
152
+ centered's 150 px's vertical slice (the narrower's scaled height stands its
153
+ own). The placement mode stores over the new `coverMode`
154
+ document-attribute key (the "center"'s stand — the tile's stand is the
155
+ key's absence), with the panel's mode toggle row over the `cover` row — the
156
+ toggle's switch stands gated: an option stands disabled when its gate is
157
+ known unmet over the current image (the centering's editor width's minimum,
158
+ the tile's 150 px's minimum height). The upload's gate stands per mode: the
159
+ 150 px's minimum height over the tile, the editor width's minimum over the
160
+ centering (the rejected file's bytes never reach the blob store).
161
+
162
+ ### Patch Changes
163
+
164
+ - e4c240a: The cover's upload gate: the image's intrinsic height is checked over
165
+ `createImageBitmap` before the upload — a cover shorter than 150 px is
166
+ rejected (the upload never reaches the consumer's blob store; the inline
167
+ hint stands the threshold, and the next attempt clears it), and an
168
+ undecodable payload stands the fail-open (the upload proceeds).
169
+
3
170
  ## 0.10.1
4
171
 
5
172
  ### Patch 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