@haklex/rich-static-renderer 0.0.86 → 0.0.87
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 +20 -20
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,26 +10,26 @@ pnpm add @haklex/rich-static-renderer
|
|
|
10
10
|
|
|
11
11
|
## Peer Dependencies
|
|
12
12
|
|
|
13
|
-
`@lexical/code`
|
|
14
|
-
|
|
15
|
-
| Package
|
|
16
|
-
|
|
|
17
|
-
| `@lexical/extension` | `^0.
|
|
18
|
-
| `@lexical/link`
|
|
19
|
-
| `@lexical/list`
|
|
20
|
-
| `@lexical/rich-text` | `^0.
|
|
21
|
-
| `@lexical/table`
|
|
22
|
-
| `lexical`
|
|
23
|
-
| `react`
|
|
24
|
-
| `react-dom`
|
|
13
|
+
This package depends on `@lexical/code-core` (Lexical 0.42+ code blocks, no Prism). Add `@lexical/code-core` yourself only if your app imports it directly.
|
|
14
|
+
|
|
15
|
+
| Package | Version |
|
|
16
|
+
| -------------------- | --------- |
|
|
17
|
+
| `@lexical/extension` | `^0.42.0` |
|
|
18
|
+
| `@lexical/link` | `^0.42.0` |
|
|
19
|
+
| `@lexical/list` | `^0.42.0` |
|
|
20
|
+
| `@lexical/rich-text` | `^0.42.0` |
|
|
21
|
+
| `@lexical/table` | `^0.42.0` |
|
|
22
|
+
| `lexical` | `^0.42.0` |
|
|
23
|
+
| `react` | `>=19` |
|
|
24
|
+
| `react-dom` | `>=19` |
|
|
25
25
|
|
|
26
26
|
## Usage
|
|
27
27
|
|
|
28
28
|
```tsx
|
|
29
|
-
import { RichRenderer } from '@haklex/rich-static-renderer'
|
|
30
|
-
import '@haklex/rich-editor/style.css'
|
|
29
|
+
import { RichRenderer } from '@haklex/rich-static-renderer';
|
|
30
|
+
import '@haklex/rich-editor/style.css';
|
|
31
31
|
|
|
32
|
-
<RichRenderer value={editorState} variant="article" theme="light"
|
|
32
|
+
<RichRenderer value={editorState} variant="article" theme="light" />;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
The `value` prop accepts a Lexical `SerializedEditorState` JSON object. The renderer parses it into React elements without instantiating a Lexical editor, making it suitable for SSR and static rendering.
|
|
@@ -38,15 +38,15 @@ The `value` prop accepts a Lexical `SerializedEditorState` JSON object. The rend
|
|
|
38
38
|
|
|
39
39
|
### Components
|
|
40
40
|
|
|
41
|
-
| Export
|
|
42
|
-
|
|
|
41
|
+
| Export | Description |
|
|
42
|
+
| -------------- | ------------------------------ |
|
|
43
43
|
| `RichRenderer` | Main static renderer component |
|
|
44
44
|
|
|
45
45
|
### Types
|
|
46
46
|
|
|
47
|
-
| Export
|
|
48
|
-
|
|
|
49
|
-
| `RichRendererProps`
|
|
47
|
+
| Export | Description |
|
|
48
|
+
| --------------------- | ---------------------------------------- |
|
|
49
|
+
| `RichRendererProps` | Props for `RichRenderer` |
|
|
50
50
|
| `BuiltinNodeRenderer` | Type for builtin node renderer functions |
|
|
51
51
|
|
|
52
52
|
## Part of Haklex
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-static-renderer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.87",
|
|
4
4
|
"description": "Headless SSR engine for Lexical rich content",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@lexical/code-core": "^0.42.0",
|
|
24
24
|
"@lexical/headless": "^0.42.0",
|
|
25
25
|
"lucide-react": "^0.577.0",
|
|
26
|
-
"@haklex/rich-editor": "0.0.
|
|
27
|
-
"@haklex/rich-style-token": "0.0.
|
|
26
|
+
"@haklex/rich-editor": "0.0.87",
|
|
27
|
+
"@haklex/rich-style-token": "0.0.87"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@lexical/extension": "^0.42.0",
|