@lexion-rte/react 0.1.0 → 0.1.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/CHANGELOG.md +14 -0
- package/README.md +33 -0
- package/package.json +6 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @lexion-rte/react
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update package metadata and documentation for the `@lexion-rte` package set.
|
|
8
|
+
|
|
9
|
+
- Align repository/homepage/bugs metadata with the current GitHub repository owner.
|
|
10
|
+
- Add package-level README files with package purpose and usage examples.
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @lexion-rte/core@0.1.1
|
|
14
|
+
- @lexion-rte/extensions@0.1.1
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @lexion-rte/react
|
|
2
|
+
|
|
3
|
+
React adapter for Lexion.
|
|
4
|
+
|
|
5
|
+
## What It Is
|
|
6
|
+
|
|
7
|
+
`@lexion-rte/react` exposes `LexionEditorView`, a React component that supports controlled and uncontrolled usage.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @lexion-rte/react react react-dom
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { useState } from "react";
|
|
19
|
+
import type { JSONDocument } from "@lexion-rte/core";
|
|
20
|
+
import { LexionEditorView } from "@lexion-rte/react";
|
|
21
|
+
|
|
22
|
+
export function EditorScreen() {
|
|
23
|
+
const [value, setValue] = useState<JSONDocument | undefined>(undefined);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<LexionEditorView
|
|
27
|
+
value={value}
|
|
28
|
+
onChange={(nextValue) => setValue(nextValue)}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lexion-rte/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "React adapter for the Lexion editor platform.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"license": "GPL-3.0-only",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/
|
|
18
|
+
"url": "https://github.com/dariusve/lexion.git",
|
|
19
19
|
"directory": "packages/react"
|
|
20
20
|
},
|
|
21
|
-
"homepage": "https://github.com/
|
|
21
|
+
"homepage": "https://github.com/dariusve/lexion/tree/main/packages/react",
|
|
22
22
|
"bugs": {
|
|
23
|
-
"url": "https://github.com/
|
|
23
|
+
"url": "https://github.com/dariusve/lexion/issues"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"lexion",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"prosemirror-view": "^1.37.2",
|
|
38
|
-
"@lexion-rte/core": "0.1.
|
|
39
|
-
"@lexion-rte/extensions": "0.1.
|
|
38
|
+
"@lexion-rte/core": "0.1.1",
|
|
39
|
+
"@lexion-rte/extensions": "0.1.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": "^18.2.0 || ^19.0.0",
|