docblocks-react-ui 0.15.1 → 0.17.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 +39 -0
- package/README.md +38 -1
- package/dist/{Editor-xRjCnKad.mjs → Editor-CbHCJZ6R.mjs} +846 -69
- package/dist/index.d.mts +18 -3
- package/dist/index.mjs +86 -39
- package/dist/mermaid/index.mjs +1 -1
- package/dist/styles.css +10 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# docblocks-react-ui
|
|
2
2
|
|
|
3
|
+
## 0.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 05bd9d1: A protocol-relative link opens in a new tab with `noopener,noreferrer` (the
|
|
8
|
+
`web` class — it was treated as a relative path before), and the address
|
|
9
|
+
popover stores the typed protocol-relative form as an explicit `https://`
|
|
10
|
+
URL. The link popover parks the editor root's focus on the commit's effect,
|
|
11
|
+
so a fast gesture right after the close is not lost.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [348f4ad]
|
|
16
|
+
- docblocks-core@0.8.0
|
|
17
|
+
|
|
18
|
+
## 0.16.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- 1ca3796: The `DocHeader` avatar slot is customizable: `renderAvatarContent` stands
|
|
23
|
+
the consumer's content in place of the built-in emoji / "+" render (the
|
|
24
|
+
wrapper, the emoji picker, and the accessible names stay the library's; the
|
|
25
|
+
read-only stands pass `editable: false`), and `hideAvatar` removes the slot
|
|
26
|
+
for consumers that render the document avatar elsewhere. Without the new
|
|
27
|
+
props the render is unchanged.
|
|
28
|
+
- c1b519d: Link editing: the format toolbar's link button and mod+k open an address
|
|
29
|
+
popover over the selection (an existing uniform link prefills and can be
|
|
30
|
+
edited or removed), a bare address resolves by form — a domain becomes an
|
|
31
|
+
https URL, an email a `mailto:`, a number a `tel:` — and an invalid address
|
|
32
|
+
stands the error. A link opens on a plain click (web URLs in a new tab with
|
|
33
|
+
`noopener,noreferrer`, `mailto:` / `tel:` / relative ones in the same tab)
|
|
34
|
+
and takes a context menu (open, copy the address, edit, remove). A
|
|
35
|
+
plain-text paste links the bare URLs and the email addresses it carries.
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [ad563a8]
|
|
40
|
+
- docblocks-core@0.7.0
|
|
41
|
+
|
|
3
42
|
## 0.15.1
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -71,7 +71,11 @@ a bare `tsc`-only setup needs a one-line `declare module "*.css"` shim.
|
|
|
71
71
|
absent), the avatar, and the title — inline-editable in the edit mode
|
|
72
72
|
only (the read-only modes stand the title/avatar display-only), the
|
|
73
73
|
title/avatar commits are one core command each (one undo step each),
|
|
74
|
-
the Escape cancels without a write.
|
|
74
|
+
the Escape cancels without a write. The avatar slot's content is
|
|
75
|
+
replaceable over `renderAvatarContent` (the trigger, the picker, and the
|
|
76
|
+
accessible names stay the package's; the read-only stands pass
|
|
77
|
+
`editable: false`), and the slot is removable over `hideAvatar`. Over
|
|
78
|
+
the published's stand the
|
|
75
79
|
header stands the snapshot's meta (the live's meta stands off — the
|
|
76
80
|
`viewer`'s `doc` is the snapshot itself; the no-snapshot stand renders
|
|
77
81
|
the neutral meta, never the live one). It
|
|
@@ -648,6 +652,39 @@ or the removed state yourself — the `label` is the display snapshot. The
|
|
|
648
652
|
value is read per render into the provider context: pass a stable reference.
|
|
649
653
|
A nested provider that supplies none inherits the enclosing one.
|
|
650
654
|
|
|
655
|
+
### Links
|
|
656
|
+
|
|
657
|
+
The `link` mark's href stands one of four classes (the exported
|
|
658
|
+
`linkHrefKindOf` — the classifier the validator, the renderer, and the
|
|
659
|
+
click's open all stand on):
|
|
660
|
+
|
|
661
|
+
| Class | Example | The click's open |
|
|
662
|
+
| ---------- | ------------------------------------------------ | ------------------------------------ |
|
|
663
|
+
| `web` | `https://example.com/page`, `//example.com/page` | a new tab (`noopener,noreferrer`) |
|
|
664
|
+
| `mailto` | `mailto:help@example.com` | the same tab (the mail client) |
|
|
665
|
+
| `tel` | `tel:+79161234567` | the same tab (the dialer) |
|
|
666
|
+
| `relative` | `/docs/page`, `#section`, `./page` | the same tab (the page's navigation) |
|
|
667
|
+
|
|
668
|
+
The protocol-relative form is an absolute URL of the reader's scheme — the
|
|
669
|
+
`web` class, never a relative path. Any other scheme is rejected by the
|
|
670
|
+
writer (`InvalidMarkError` over the semantic API) and renders as plain text
|
|
671
|
+
over the lenient read.
|
|
672
|
+
|
|
673
|
+
Editing: the format toolbar's link button and mod+k over a text selection
|
|
674
|
+
open the address popover. A typed address resolves by form — a bare domain
|
|
675
|
+
stands `https://`, a bare email the `mailto:` form, a phone number the
|
|
676
|
+
`tel:` form, the protocol-relative form the explicit `https://`; an
|
|
677
|
+
existing uniform link prefills the input, and an invalid address stands the
|
|
678
|
+
error without a write. A commit is one `setMark` (one undo step), the
|
|
679
|
+
remove one `unsetMark`.
|
|
680
|
+
|
|
681
|
+
A plain click on a link opens it (a press-drag keeps the selection; the
|
|
682
|
+
modified and middle clicks keep the browser's native stand). A right-click
|
|
683
|
+
on a link opens the link menu — open, copy the address, edit, remove; the
|
|
684
|
+
read-only modes (`view` / `published`) stand the open and the copy only. A
|
|
685
|
+
plain-text paste links the bare URLs and the email addresses it carries
|
|
686
|
+
(the code blocks keep their raw text); typed text stands plain.
|
|
687
|
+
|
|
651
688
|
### Canvas
|
|
652
689
|
|
|
653
690
|
`view: "canvas"` renders the page miniature plus the document's
|