@lexion-rte/next 0.1.0 → 0.1.2

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +53 -0
  3. package/package.json +5 -5
package/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # @lexion-rte/next
2
+
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Refresh package metadata links and expand package-level README documentation.
8
+ - Updated dependencies
9
+ - @lexion-rte/react@0.1.2
10
+
11
+ ## 0.1.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Update package metadata and documentation for the `@lexion-rte` package set.
16
+
17
+ - Align repository/homepage/bugs metadata with the current GitHub repository owner.
18
+ - Add package-level README files with package purpose and usage examples.
19
+
20
+ - Updated dependencies
21
+ - @lexion-rte/react@0.1.1
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # @lexion-rte/next
2
+
3
+ Next.js adapter for Lexion.
4
+
5
+ ## Overview
6
+
7
+ `@lexion-rte/next` exports `LexionNextEditorView`, which wraps the React adapter as a client component.
8
+
9
+ This package is ideal for Next App Router and can also be used in Pages Router client components.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ pnpm add @lexion-rte/next next react react-dom
15
+ ```
16
+
17
+ ## Basic Example
18
+
19
+ ```tsx
20
+ "use client";
21
+
22
+ import { LexionNextEditorView } from "@lexion-rte/next";
23
+
24
+ export default function EditorPage() {
25
+ return <LexionNextEditorView />;
26
+ }
27
+ ```
28
+
29
+ ## Controlled Example
30
+
31
+ ```tsx
32
+ "use client";
33
+
34
+ import { useState } from "react";
35
+ import type { JSONDocument } from "@lexion-rte/core";
36
+ import { LexionNextEditorView } from "@lexion-rte/next";
37
+
38
+ export default function EditorPage() {
39
+ const [value, setValue] = useState<JSONDocument | undefined>(undefined);
40
+
41
+ return (
42
+ <LexionNextEditorView
43
+ value={value}
44
+ onChange={(nextValue) => setValue(nextValue)}
45
+ />
46
+ );
47
+ }
48
+ ```
49
+
50
+ ## Notes
51
+
52
+ - Keep `"use client"` at the top of files that render the component.
53
+ - Component props are the same as `@lexion-rte/react` `LexionEditorViewProps`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lexion-rte/next",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Next.js adapter for the Lexion editor.",
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/lexion-rte/lexion.git",
18
+ "url": "https://github.com/dariusve/lexion.git",
19
19
  "directory": "packages/next"
20
20
  },
21
- "homepage": "https://github.com/lexion-rte/lexion/tree/main/packages/next",
21
+ "homepage": "https://github.com/dariusve/lexion/tree/main/packages/next",
22
22
  "bugs": {
23
- "url": "https://github.com/lexion-rte/lexion/issues"
23
+ "url": "https://github.com/dariusve/lexion/issues"
24
24
  },
25
25
  "keywords": [
26
26
  "lexion",
@@ -39,7 +39,7 @@
39
39
  "react-dom": "^18.2.0 || ^19.0.0"
40
40
  },
41
41
  "dependencies": {
42
- "@lexion-rte/react": "0.1.0"
42
+ "@lexion-rte/react": "0.1.2"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "tsc -p tsconfig.json",