@haklex/rich-renderer-mention 0.24.0 → 0.25.1
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/README.md +21 -19
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -10,45 +10,47 @@ pnpm add @haklex/rich-renderer-mention
|
|
|
10
10
|
|
|
11
11
|
## Peer Dependencies
|
|
12
12
|
|
|
13
|
-
| Package
|
|
14
|
-
|
|
|
15
|
-
| `lexical`
|
|
16
|
-
| `@lexical/react` | `^0.
|
|
17
|
-
| `react`
|
|
18
|
-
| `react-dom`
|
|
13
|
+
| Package | Version |
|
|
14
|
+
| ---------------- | --------- |
|
|
15
|
+
| `lexical` | `^0.45.0` |
|
|
16
|
+
| `@lexical/react` | `^0.45.0` |
|
|
17
|
+
| `react` | `>=19` |
|
|
18
|
+
| `react-dom` | `>=19` |
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
21
21
|
|
|
22
22
|
```tsx
|
|
23
|
-
import { MentionRenderer } from '@haklex/rich-renderer-mention/static'
|
|
23
|
+
import { MentionRenderer } from '@haklex/rich-renderer-mention/static';
|
|
24
24
|
|
|
25
25
|
// Register in a static RendererConfig
|
|
26
26
|
const rendererConfig = {
|
|
27
27
|
// ...other renderers
|
|
28
28
|
Mention: MentionRenderer,
|
|
29
|
-
}
|
|
29
|
+
};
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
For edit mode:
|
|
33
33
|
|
|
34
34
|
```tsx
|
|
35
|
-
import { MentionEditRenderer } from '@haklex/rich-renderer-mention'
|
|
35
|
+
import { MentionEditRenderer } from '@haklex/rich-renderer-mention';
|
|
36
36
|
|
|
37
37
|
const editRendererConfig = {
|
|
38
38
|
// ...other renderers
|
|
39
39
|
Mention: MentionEditRenderer,
|
|
40
|
-
}
|
|
40
|
+
};
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### Configuring platform metadata
|
|
44
44
|
|
|
45
45
|
```tsx
|
|
46
|
-
import {
|
|
46
|
+
import {
|
|
47
|
+
MentionPlatformProvider,
|
|
48
|
+
platformMetaMap,
|
|
49
|
+
platformKeys,
|
|
50
|
+
} from '@haklex/rich-renderer-mention';
|
|
47
51
|
|
|
48
52
|
// Wrap your app with the provider to customize platform rendering
|
|
49
|
-
<MentionPlatformProvider>
|
|
50
|
-
{children}
|
|
51
|
-
</MentionPlatformProvider>
|
|
53
|
+
<MentionPlatformProvider>{children}</MentionPlatformProvider>;
|
|
52
54
|
```
|
|
53
55
|
|
|
54
56
|
## Exports
|
|
@@ -66,11 +68,11 @@ import { MentionPlatformProvider, platformMetaMap, platformKeys } from '@haklex/
|
|
|
66
68
|
|
|
67
69
|
### Sub-path Exports
|
|
68
70
|
|
|
69
|
-
| Path
|
|
70
|
-
|
|
|
71
|
-
| `@haklex/rich-renderer-mention`
|
|
72
|
-
| `@haklex/rich-renderer-mention/static`
|
|
73
|
-
| `@haklex/rich-renderer-mention/style.css` | Stylesheet
|
|
71
|
+
| Path | Description |
|
|
72
|
+
| ----------------------------------------- | ---------------------------- |
|
|
73
|
+
| `@haklex/rich-renderer-mention` | Full exports (edit + static) |
|
|
74
|
+
| `@haklex/rich-renderer-mention/static` | Static-only renderer |
|
|
75
|
+
| `@haklex/rich-renderer-mention/style.css` | Stylesheet |
|
|
74
76
|
|
|
75
77
|
## Part of Haklex
|
|
76
78
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-renderer-mention",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"description": "Social mention renderer with platform badges",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"lucide-react": "^1.0.0",
|
|
47
47
|
"react": ">=19",
|
|
48
48
|
"react-dom": ">=19",
|
|
49
|
-
"@haklex/rich-editor
|
|
50
|
-
"@haklex/rich-editor": "0.
|
|
51
|
-
"@haklex/rich-style-token": "0.
|
|
49
|
+
"@haklex/rich-editor": "0.25.1",
|
|
50
|
+
"@haklex/rich-editor-ui": "0.25.1",
|
|
51
|
+
"@haklex/rich-style-token": "0.25.1"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|