@vizel/react 0.0.1-alpha.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 ADDED
@@ -0,0 +1,90 @@
1
+ # @vizel/react
2
+
3
+ React components for Vizel block-based Markdown editor.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @vizel/react @vizel/core
9
+ ```
10
+
11
+ ## Requirements
12
+
13
+ - React 19+
14
+ - React DOM 19+
15
+
16
+ ## Usage
17
+
18
+ ### Basic Setup
19
+
20
+ ```tsx
21
+ import { Vizel } from "@vizel/react";
22
+ import "@vizel/core/styles.css";
23
+
24
+ function App() {
25
+ return <Vizel />;
26
+ }
27
+ ```
28
+
29
+ ### With Editor Control
30
+
31
+ ```tsx
32
+ import { VizelEditor, VizelBubbleMenu, useVizelEditor } from "@vizel/react";
33
+ import "@vizel/core/styles.css";
34
+
35
+ function App() {
36
+ const editor = useVizelEditor();
37
+
38
+ return (
39
+ <>
40
+ <VizelEditor editor={editor.current} />
41
+ <VizelBubbleMenu editor={editor.current} />
42
+ </>
43
+ );
44
+ }
45
+ ```
46
+
47
+ ### Markdown Import/Export
48
+
49
+ ```tsx
50
+ import { useVizelEditor, useVizelMarkdown } from "@vizel/react";
51
+
52
+ function App() {
53
+ const editor = useVizelEditor();
54
+ const { getMarkdown, setMarkdown } = useVizelMarkdown(() => editor.current);
55
+
56
+ const handleExport = () => {
57
+ const markdown = getMarkdown();
58
+ console.log(markdown);
59
+ };
60
+
61
+ return <VizelEditor editor={editor.current} />;
62
+ }
63
+ ```
64
+
65
+ ## Components
66
+
67
+ | Component | Description |
68
+ |-----------|-------------|
69
+ | `Vizel` | All-in-one editor with bubble menu |
70
+ | `VizelEditor` | Editor component |
71
+ | `VizelBubbleMenu` | Floating formatting toolbar |
72
+ | `VizelSlashMenu` | Slash command menu |
73
+ | `VizelIconProvider` | Custom icon provider |
74
+
75
+ ## Hooks
76
+
77
+ | Hook | Description |
78
+ |------|-------------|
79
+ | `useVizelEditor` | Create and manage editor instance |
80
+ | `useVizelMarkdown` | Markdown import/export |
81
+ | `useVizelAutoSave` | Auto-save functionality |
82
+ | `useVizelState` | Editor state management |
83
+
84
+ ## Documentation
85
+
86
+ See the [main repository](https://github.com/seijikohara/vizel) for full documentation.
87
+
88
+ ## License
89
+
90
+ MIT