ssovee-os-web-ui 0.1.100 → 0.1.102

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 CHANGED
@@ -84,6 +84,47 @@ Use `theme="vs-dark"` for a dark editor. The component also accepts Monaco `lang
84
84
 
85
85
  The component supports `toolbar`, `plugins`, `fullWidth`, `error`, and `disabled` props for common form usage.
86
86
 
87
+ ### RichEditor
88
+
89
+ `RichEditor` is a controlled rich-text editor that returns the edited content as HTML. Set `isDarkTheme` when the surrounding app uses the dark theme:
90
+
91
+ ```tsx
92
+ import { useState } from "react";
93
+ import { RichEditor } from "ssovee-os-web-ui";
94
+
95
+ export function NoteEditor() {
96
+ const [content, setContent] = useState("<p>Write a note...</p>");
97
+
98
+ return (
99
+ <RichEditor
100
+ content={content}
101
+ onChange={setContent}
102
+ isDarkTheme
103
+ />
104
+ );
105
+ }
106
+ ```
107
+
108
+ ### PreviewComponent
109
+
110
+ `PreviewComponent` previews a file from base64 data supplied by the host application. Pass either raw base64 or a complete data URL along with the original file name. Image files, PDFs, text files, and JSON are supported.
111
+
112
+ ```tsx
113
+ import { PreviewComponent } from "ssovee-os-web-ui";
114
+
115
+ export function FilePreview({ fileName, base64 }: { fileName: string; base64: string }) {
116
+ return (
117
+ <PreviewComponent
118
+ fileName={fileName}
119
+ base64={base64}
120
+ className="h-96"
121
+ />
122
+ );
123
+ }
124
+ ```
125
+
126
+ Supported image extensions include `avif`, `bmp`, `gif`, `jpg`, `jpeg`, `png`, `svg`, and `webp`. Supported text extensions include `css`, `csv`, `html`, `js`, `jsx`, `md`, `ts`, `tsx`, `txt`, `xml`, `yaml`, and `yml`.
127
+
87
128
  ## Window components
88
129
 
89
130
  ### Simple window
@@ -207,6 +248,8 @@ The package exports these components and types for external use:
207
248
  - `Input`
208
249
  - `TextArea`
209
250
  - `CodeEditor`
251
+ - `RichEditor`
252
+ - `PreviewComponent` (also available as `FilePreview`)
210
253
  - `Select`
211
254
  - `SelectOption`
212
255
  - `Checkbox`