@kennethmakjw/appflowy-editor-react19 0.0.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 +306 -0
- package/dist/ar-SA-B3W2Oswh.cjs +8 -0
- package/dist/ar-SA-CaPcPWVS.js +8 -0
- package/dist/ca-ES-DehQhAeM.js +8 -0
- package/dist/ca-ES-WjpoQZs5.cjs +8 -0
- package/dist/ckb-KU-Cc13dwJI.cjs +8 -0
- package/dist/ckb-KU-DXz5rZMu.js +8 -0
- package/dist/components/Leaf.d.ts +3 -0
- package/dist/components/element/BulletedList.d.ts +3 -0
- package/dist/components/element/Checkbox.d.ts +3 -0
- package/dist/components/element/CodeBlock/index.d.ts +3 -0
- package/dist/components/element/CodeBlock/useDecorate.d.ts +3 -0
- package/dist/components/element/CodeBlock/utils.d.ts +2 -0
- package/dist/components/element/Divider.d.ts +3 -0
- package/dist/components/element/Element.d.ts +3 -0
- package/dist/components/element/Heading.d.ts +3 -0
- package/dist/components/element/Image.d.ts +3 -0
- package/dist/components/element/LinkPreview.d.ts +3 -0
- package/dist/components/element/NumberedList.d.ts +3 -0
- package/dist/components/element/Quote.d.ts +3 -0
- package/dist/components/element/Table.d.ts +3 -0
- package/dist/components/element/TableCell.d.ts +3 -0
- package/dist/components/element/TableRow.d.ts +3 -0
- package/dist/components/element/index.d.ts +1 -0
- package/dist/components/fixed-toolbar/Aa.d.ts +2 -0
- package/dist/components/fixed-toolbar/BIUS.d.ts +4 -0
- package/dist/components/fixed-toolbar/Color.d.ts +2 -0
- package/dist/components/fixed-toolbar/FixedToolbar.d.ts +2 -0
- package/dist/components/fixed-toolbar/List.d.ts +2 -0
- package/dist/components/fixed-toolbar/index.d.ts +1 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/button.d.ts +15 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/loading-dots.d.ts +4 -0
- package/dist/components/ui/popover.d.ts +12 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/cs-CZ-B7cFODNF.js +8 -0
- package/dist/cs-CZ-BiGttx8Y.cjs +8 -0
- package/dist/de-DE-3L1r5Sau.cjs +8 -0
- package/dist/de-DE-CJLJMQlm.js +8 -0
- package/dist/dev/App.d.ts +1 -0
- package/dist/dev/MarkdownDemo.d.ts +2 -0
- package/dist/dev/i18n.d.ts +1 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/editor/Editor.d.ts +3 -0
- package/dist/editor/RichText.d.ts +12 -0
- package/dist/editor/context.d.ts +6 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/editor/useEditor.d.ts +5 -0
- package/dist/editor/useKeydown.d.ts +3 -0
- package/dist/es-VE-IXYuj5s7.js +8 -0
- package/dist/es-VE-ZvJoouw6.cjs +8 -0
- package/dist/eu-ES-BGs4iMYs.js +8 -0
- package/dist/eu-ES-DjInTP04.cjs +8 -0
- package/dist/fa-BCkDldDE.js +8 -0
- package/dist/fa-BsZBNwW8.cjs +8 -0
- package/dist/fr-CA-BlpVaep8.cjs +8 -0
- package/dist/fr-CA-v0JzOPW4.js +8 -0
- package/dist/fr-FR-CiKan-7_.cjs +8 -0
- package/dist/fr-FR-DsF3n-KY.js +8 -0
- package/dist/he-BwXJVdkh.cjs +8 -0
- package/dist/he-DtMbntw2.js +8 -0
- package/dist/hu-HU-B6cP2C9b.cjs +8 -0
- package/dist/hu-HU-BIfnlWEM.js +8 -0
- package/dist/i18n/config.d.ts +3 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/id-ID-AOveF0gP.js +8 -0
- package/dist/id-ID-cZS98QKP.cjs +8 -0
- package/dist/index.css +1593 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10266 -0
- package/dist/index.mjs +10250 -0
- package/dist/it-IT-DN-rTKuB.js +8 -0
- package/dist/it-IT-rGclB8nF.cjs +8 -0
- package/dist/ja-JP-BT23Z2YG.js +8 -0
- package/dist/ja-JP-DaiwUIKv.cjs +8 -0
- package/dist/ko-KR-CBlhTpPW.cjs +8 -0
- package/dist/ko-KR-DYwSdomr.js +8 -0
- package/dist/lib/color.d.ts +50 -0
- package/dist/lib/editor.d.ts +11 -0
- package/dist/lib/hotkeys.d.ts +66 -0
- package/dist/lib/list.d.ts +6 -0
- package/dist/lib/markdown.d.ts +3 -0
- package/dist/lib/mdast.d.ts +5 -0
- package/dist/lib/mdast.test.d.ts +1 -0
- package/dist/lib/transform.d.ts +7 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/locales/ar-SA.json +17 -0
- package/dist/locales/ca-ES.json +17 -0
- package/dist/locales/ckb-KU.json +5 -0
- package/dist/locales/cs-CZ.json +17 -0
- package/dist/locales/de-DE.json +17 -0
- package/dist/locales/en.json +38 -0
- package/dist/locales/es-VE.json +17 -0
- package/dist/locales/eu-ES.json +17 -0
- package/dist/locales/fa.json +17 -0
- package/dist/locales/fr-CA.json +17 -0
- package/dist/locales/fr-FR.json +17 -0
- package/dist/locales/he.json +17 -0
- package/dist/locales/hu-HU.json +17 -0
- package/dist/locales/id-ID.json +17 -0
- package/dist/locales/it-IT.json +17 -0
- package/dist/locales/ja-JP.json +17 -0
- package/dist/locales/ko-KR.json +17 -0
- package/dist/locales/pl-PL.json +17 -0
- package/dist/locales/pt-BR.json +17 -0
- package/dist/locales/pt-PT.json +17 -0
- package/dist/locales/ru-RU.json +17 -0
- package/dist/locales/sv-SE.json +17 -0
- package/dist/locales/th-TH.json +17 -0
- package/dist/locales/tr-TR.json +17 -0
- package/dist/locales/uk-UA.json +17 -0
- package/dist/locales/vi-VN.json +17 -0
- package/dist/locales/vi.json +17 -0
- package/dist/locales/zh-CN.json +17 -0
- package/dist/locales/zh-TW.json +17 -0
- package/dist/markdown-BidIaSbx.cjs +3274 -0
- package/dist/markdown-CeG0xHLH.js +3275 -0
- package/dist/pl-PL-C_wxsekf.js +8 -0
- package/dist/pl-PL-DBrdwSfX.cjs +8 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/withMarkdown.d.ts +2 -0
- package/dist/plugins/withPasted.d.ts +18 -0
- package/dist/pt-BR-CcIBbs5v.js +8 -0
- package/dist/pt-BR-CpCH-0Ym.cjs +8 -0
- package/dist/pt-PT-2DJTSiTI.js +8 -0
- package/dist/pt-PT-CuvXqmHX.cjs +8 -0
- package/dist/ru-RU-BcrEOraZ.cjs +8 -0
- package/dist/ru-RU-DZ-BGTMT.js +8 -0
- package/dist/sv-SE-B-1TVV6s.js +8 -0
- package/dist/sv-SE-EHxWN7g5.cjs +8 -0
- package/dist/th-TH-B2osIZz0.cjs +8 -0
- package/dist/th-TH-HhkGXVcg.js +8 -0
- package/dist/tr-TR-DKzjnjXz.js +8 -0
- package/dist/tr-TR-DPok6TDa.cjs +8 -0
- package/dist/types/element.d.ts +10 -0
- package/dist/types/index.d.ts +53 -0
- package/dist/uk-UA-CvadWbnH.cjs +8 -0
- package/dist/uk-UA-Us4Zq40s.js +8 -0
- package/dist/vi-DGchnzC4.cjs +8 -0
- package/dist/vi-DV4OvZ5s.js +8 -0
- package/dist/vi-VN-BZdQFzYv.js +8 -0
- package/dist/vi-VN-DzF53ZQz.cjs +8 -0
- package/dist/zh-CN-D7lPKvRq.js +8 -0
- package/dist/zh-CN-FWhRTZFL.cjs +8 -0
- package/dist/zh-TW-D24z6DBg.js +8 -0
- package/dist/zh-TW-DSEvmJwy.cjs +8 -0
- package/package.json +103 -0
package/README.md
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# AppFlowy Web Editor
|
|
2
|
+
|
|
3
|
+
A modern editor library with support for rich text, markdown, and code editing.
|
|
4
|
+
|
|
5
|
+
## ✨ Features
|
|
6
|
+
|
|
7
|
+
- 🌓 Day/Night mode switching
|
|
8
|
+
- 🌍 Multi-language support
|
|
9
|
+
- 📱 Responsive design
|
|
10
|
+
- 💪 TypeScript support
|
|
11
|
+
- 📝 Rich text, markdown, and code editing
|
|
12
|
+
- 📦 Easy to integrate
|
|
13
|
+
- 🎉 And more!
|
|
14
|
+
|
|
15
|
+
## 📦 Installation
|
|
16
|
+
|
|
17
|
+
To install the AppFlowy Web Editor, run the following command:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @appflowyinc/editor
|
|
21
|
+
|
|
22
|
+
# or
|
|
23
|
+
|
|
24
|
+
yarn add @appflowyinc/editor
|
|
25
|
+
|
|
26
|
+
# or
|
|
27
|
+
|
|
28
|
+
pnpm add @appflowyinc/editor
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Note: This package requires these peer dependencies to be installed:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"i18next": "^22.4.10",
|
|
36
|
+
"i18next-resources-to-backend": "^1.2.1",
|
|
37
|
+
"react": "^18.3.1",
|
|
38
|
+
"react-dom": "^18.3.1",
|
|
39
|
+
"react-i18next": "^14.1.0",
|
|
40
|
+
"slate": "^0.112.0",
|
|
41
|
+
"slate-history": "^0.110.3",
|
|
42
|
+
"slate-react": "^0.112.0"
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 🚀 Quick Start
|
|
47
|
+
|
|
48
|
+
To use the AppFlowy Web Editor, import the `Editor` and `EditorProvider` components from the package and wrap your app
|
|
49
|
+
|
|
50
|
+
Note: Using the editor requires the `EditorProvider` component. Therefore, each `Editor` component needs to be wrapped
|
|
51
|
+
by the corresponding `EditorProvider`
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
|
|
55
|
+
import { Editor, EditorProvider } from '@appflowyinc/editor';
|
|
56
|
+
|
|
57
|
+
const App = () => {
|
|
58
|
+
return <EditorProvider>
|
|
59
|
+
<Editor/>
|
|
60
|
+
</EditorProvider>
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export default App;
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 🎨 Custom Toolbar
|
|
67
|
+
|
|
68
|
+
The AppFlowy Web Editor provides a toolbar with various options for editing content. You can customize the toolbar by
|
|
69
|
+
passing the `ToolbarComponent` prop to the `Editor` component.
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
import { Editor, EditorProvider, FixedToolbar } from '@appflowyinc/editor';
|
|
73
|
+
|
|
74
|
+
const App = () => {
|
|
75
|
+
return <EditorProvider>
|
|
76
|
+
<Editor ToolbarComponent={FixedToolbar}/>
|
|
77
|
+
</EditorProvider>;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default App;
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 📚 Apply Data
|
|
84
|
+
|
|
85
|
+
You can get `editor` from the `useEditor` hook and apply data to the editor.
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
import { Editor, EditorProvider, useEditor, NodeType } from '@appflowyinc/editor';
|
|
89
|
+
|
|
90
|
+
const App = () => {
|
|
91
|
+
const editor = useEditor();
|
|
92
|
+
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
editor.applyData({
|
|
95
|
+
type: NodeType.Paragraph,
|
|
96
|
+
delta: [
|
|
97
|
+
{
|
|
98
|
+
insert: 'Hello, World!',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
children: []
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// or apply markdown
|
|
105
|
+
editor.applyMarkdown('# Hello, World!');
|
|
106
|
+
}, []);
|
|
107
|
+
|
|
108
|
+
return
|
|
109
|
+
<Editor/>;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const Main = () => {
|
|
113
|
+
return <EditorProvider>
|
|
114
|
+
<App/>
|
|
115
|
+
</EditorProvider>;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export default App;
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## 💡 Theme Switching
|
|
122
|
+
|
|
123
|
+
The AppFlowy Web Editor supports theme switching between light and dark modes. You can customize the themes by passing
|
|
124
|
+
the `theme` prop to the `Editor` component.
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
import { Editor, EditorProvider } from '@appflowyinc/editor';
|
|
128
|
+
|
|
129
|
+
const App = () => {
|
|
130
|
+
return <EditorProvider>
|
|
131
|
+
<Editor theme={'dark'}/>
|
|
132
|
+
</EditorProvider>;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export default App;
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## 🌍 Multi-language Usage
|
|
139
|
+
|
|
140
|
+
The AppFlowy Web Editor supports multiple languages. You can customize the language by passing the `language` prop to
|
|
141
|
+
the `Editor` component.
|
|
142
|
+
|
|
143
|
+
```tsx
|
|
144
|
+
|
|
145
|
+
import { Editor, EditorProvider } from '@appflowyinc/editor';
|
|
146
|
+
// Optionally, you can import the language resources from the package
|
|
147
|
+
import zh from '@appflowyinc/editor/locales/zh-CN.json';
|
|
148
|
+
|
|
149
|
+
import hostI18n from 'i18next';
|
|
150
|
+
|
|
151
|
+
const App = () => {
|
|
152
|
+
return <I18nextProvider i18n={hostI18n}>
|
|
153
|
+
<EditorProvider>
|
|
154
|
+
<Editor locale={{
|
|
155
|
+
// The language code.
|
|
156
|
+
lang: 'zh-CN',
|
|
157
|
+
// Optionally, you can pass the language resources or let it use the default resources
|
|
158
|
+
resources: zh,
|
|
159
|
+
}}/>
|
|
160
|
+
</EditorProvider>
|
|
161
|
+
</I18nextProvider>;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export default App;
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Supported Languages
|
|
168
|
+
|
|
169
|
+
- English(en)
|
|
170
|
+
- Arabic(ar-SA)
|
|
171
|
+
- Catalan(ca-ES)
|
|
172
|
+
- Central Kurdish(ckb-KU)
|
|
173
|
+
- Czech(cs-CZ)
|
|
174
|
+
- German(de-DE)
|
|
175
|
+
- Spanish(es-VE)
|
|
176
|
+
- Basque(eu-ES)
|
|
177
|
+
- Persian(fa)
|
|
178
|
+
- French(fr-CA)
|
|
179
|
+
- French(fr-FR)
|
|
180
|
+
- Hebrew(he)
|
|
181
|
+
- Hungarian(hu-HU)
|
|
182
|
+
- Indonesian(id-ID)
|
|
183
|
+
- Italian(it-IT)
|
|
184
|
+
- Japanese(ja-JP)
|
|
185
|
+
- Korean(ko-KR)
|
|
186
|
+
- Polish(pl-PL)
|
|
187
|
+
- Brazilian Portuguese(pt-BR)
|
|
188
|
+
- Portuguese(pt-PT)
|
|
189
|
+
- Russian(ru-RU)
|
|
190
|
+
- Swedish(sv-SE)
|
|
191
|
+
- Thai(th-TH)
|
|
192
|
+
- Turkish(tr-TR)
|
|
193
|
+
- Ukrainian(uk-UA)
|
|
194
|
+
- Vietnamese(vi)
|
|
195
|
+
- Vietnamese(vi-VN)
|
|
196
|
+
- Simplified Chinese(zh-CN)
|
|
197
|
+
- Traditional Chinese(zh-TW)
|
|
198
|
+
|
|
199
|
+
## 📖 API
|
|
200
|
+
|
|
201
|
+
### Editor Props
|
|
202
|
+
|
|
203
|
+
| Prop | Type | Default | Description |
|
|
204
|
+
|------------------|--------------------------------------------------------|-----------|--------------------------------------|
|
|
205
|
+
| theme | `'light' \| 'dark'` | `'light'` | Editor theme |
|
|
206
|
+
| locale | `{ lang: string; resources?: Record<string, string> }` | - | Editor language configuration |
|
|
207
|
+
| readOnly | `boolean` | `false` | Whether the editor is read-only |
|
|
208
|
+
| onChange | `(data: EditorData) => void` | - | Callback when editor content changes |
|
|
209
|
+
| initialValue | `EditorData` | - | Initial editor content |
|
|
210
|
+
| modalZIndex | `number` | 50 | Editor modal z-index |
|
|
211
|
+
| ToolbarComponent | `FC` | - | Custom toolbar component |
|
|
212
|
+
|
|
213
|
+
### EditorProvider Props
|
|
214
|
+
|
|
215
|
+
| Prop | Type | Default | Description |
|
|
216
|
+
|----------|-------------|---------|-------------------------|
|
|
217
|
+
| children | `ReactNode` | - | The children components |
|
|
218
|
+
|
|
219
|
+
### EditorData
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
type EditorData = {
|
|
223
|
+
type: NodeType;
|
|
224
|
+
data: Record<string, any>;
|
|
225
|
+
delta: DeltaOperation[];
|
|
226
|
+
children: EditorData[];
|
|
227
|
+
};
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### NodeType
|
|
231
|
+
|
|
232
|
+
```ts
|
|
233
|
+
|
|
234
|
+
enum NodeType {
|
|
235
|
+
Paragraph = 'paragraph',
|
|
236
|
+
Heading = 'heading',
|
|
237
|
+
NestedBlock = 'nested-block',
|
|
238
|
+
Todo = 'todo_list',
|
|
239
|
+
NumberedList = 'numbered_list',
|
|
240
|
+
BulletedList = 'bulleted_list',
|
|
241
|
+
Quote = 'quote',
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Hooks
|
|
246
|
+
|
|
247
|
+
#### useEditor
|
|
248
|
+
|
|
249
|
+
Returns the editor instance with methods to control the editor.
|
|
250
|
+
|
|
251
|
+
```ts
|
|
252
|
+
const editor = useEditor();
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
| Method | Description |
|
|
256
|
+
|---------------|------------------------------|
|
|
257
|
+
| applyData | Apply data to the editor |
|
|
258
|
+
| applyMarkdown | Apply markdown to the editor |
|
|
259
|
+
|
|
260
|
+
## 🔨 Development
|
|
261
|
+
|
|
262
|
+
Guide
|
|
263
|
+
|
|
264
|
+
###
|
|
265
|
+
|
|
266
|
+
Development
|
|
267
|
+
Mode
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
# Install dependencies
|
|
272
|
+
|
|
273
|
+
pnpm i
|
|
274
|
+
|
|
275
|
+
# Start development server
|
|
276
|
+
|
|
277
|
+
pnpm run dev
|
|
278
|
+
|
|
279
|
+
# Build library
|
|
280
|
+
|
|
281
|
+
pnpm run build
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
To run the demo locally:
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
pnpm install
|
|
289
|
+
pnpm run dev
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Open [http://localhost:5173/](http://localhost:5173/) with your browser to see the result.
|
|
293
|
+

|
|
294
|
+
|
|
295
|
+
Switch between light and dark mode by clicking the theme switcher in the top right corner.
|
|
296
|
+

|
|
297
|
+
|
|
298
|
+
## 📄 License
|
|
299
|
+
|
|
300
|
+
MIT License
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
[]: # (END) README.md
|
|
305
|
+
|
|
306
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "اكتب شيئا...", "fontColorDefault": "تقصير", "fontColorRed": "أحمر", "fontColorGreen": "أخضر", "fontColorBlue": "أزرق", "fontColorYellow": "أصفر", "fontColorOrange": "البرتقالي", "fontColorPurple": "أرجواني", "fontColorPink": "لون القرنفل", "fontColorBrown": "بني", "fontColorGray": "رمادي", "backgroundColorDefault": "تقصير", "backgroundColorRed": "أحمر" };
|
|
4
|
+
const arSA = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = arSA;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "اكتب شيئا...", "fontColorDefault": "تقصير", "fontColorRed": "أحمر", "fontColorGreen": "أخضر", "fontColorBlue": "أزرق", "fontColorYellow": "أصفر", "fontColorOrange": "البرتقالي", "fontColorPurple": "أرجواني", "fontColorPink": "لون القرنفل", "fontColorBrown": "بني", "fontColorGray": "رمادي", "backgroundColorDefault": "تقصير", "backgroundColorRed": "أحمر" };
|
|
2
|
+
const arSA = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
arSA as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Escriu alguna cosa...", "fontColorDefault": "Per defecte", "fontColorRed": "Vermell", "fontColorGreen": "Verd", "fontColorBlue": "Blau", "fontColorYellow": "groc", "fontColorOrange": "Taronja", "fontColorPurple": "Lila", "fontColorPink": "Rosa", "fontColorBrown": "marró", "fontColorGray": "Gris", "backgroundColorDefault": "Per defecte", "backgroundColorRed": "Vermell" };
|
|
2
|
+
const caES = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
caES as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Escriu alguna cosa...", "fontColorDefault": "Per defecte", "fontColorRed": "Vermell", "fontColorGreen": "Verd", "fontColorBlue": "Blau", "fontColorYellow": "groc", "fontColorOrange": "Taronja", "fontColorPurple": "Lila", "fontColorPink": "Rosa", "fontColorBrown": "marró", "fontColorGray": "Gris", "backgroundColorDefault": "Per defecte", "backgroundColorRed": "Vermell" };
|
|
4
|
+
const caES = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = caES;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Element';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FixedToolbar';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
color?: "default" | "secondary" | "primary" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
color?: 'default' | 'primary' | 'secondary';
|
|
11
|
+
startIcon?: React.ReactNode;
|
|
12
|
+
endIcon?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/dist/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export interface PopoverContentProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
|
|
7
|
+
container?: HTMLElement | null;
|
|
8
|
+
forceMount?: true;
|
|
9
|
+
disableOutsidePointerEvents?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Switch };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Napiš něco...", "fontColorDefault": "Výchozí", "fontColorRed": "Červený", "fontColorGreen": "Zelený", "fontColorBlue": "Modrý", "fontColorYellow": "Žluť", "fontColorOrange": "Pomerančový", "fontColorPurple": "Fialová", "fontColorPink": "Růžový", "fontColorBrown": "Hnědý", "fontColorGray": "Šedá", "backgroundColorDefault": "Výchozí", "backgroundColorRed": "Červený" };
|
|
2
|
+
const csCZ = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
csCZ as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Napiš něco...", "fontColorDefault": "Výchozí", "fontColorRed": "Červený", "fontColorGreen": "Zelený", "fontColorBlue": "Modrý", "fontColorYellow": "Žluť", "fontColorOrange": "Pomerančový", "fontColorPurple": "Fialová", "fontColorPink": "Růžový", "fontColorBrown": "Hnědý", "fontColorGray": "Šedá", "backgroundColorDefault": "Výchozí", "backgroundColorRed": "Červený" };
|
|
4
|
+
const csCZ = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = csCZ;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Schreib etwas...", "fontColorDefault": "Standard", "fontColorRed": "Rot", "fontColorGreen": "Grün", "fontColorBlue": "Blau", "fontColorYellow": "Gelb", "fontColorOrange": "Orange", "fontColorPurple": "Lila", "fontColorPink": "Rosa", "fontColorBrown": "Braun", "fontColorGray": "Grau", "backgroundColorDefault": "Standard", "backgroundColorRed": "Rot" };
|
|
4
|
+
const deDE = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = deDE;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Schreib etwas...", "fontColorDefault": "Standard", "fontColorRed": "Rot", "fontColorGreen": "Grün", "fontColorBlue": "Blau", "fontColorYellow": "Gelb", "fontColorOrange": "Orange", "fontColorPurple": "Lila", "fontColorPink": "Rosa", "fontColorBrown": "Braun", "fontColorGray": "Grau", "backgroundColorDefault": "Standard", "backgroundColorRed": "Rot" };
|
|
2
|
+
const deDE = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
deDE as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function App(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ReactEditor } from 'slate-react';
|
|
3
|
+
import { Descendant, Operation } from 'slate';
|
|
4
|
+
export interface RichTextProps {
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
onChange?: (ops: Operation[], value: Descendant[]) => void;
|
|
7
|
+
initialValue?: Descendant[];
|
|
8
|
+
editor: ReactEditor;
|
|
9
|
+
ToolbarComponent?: FC;
|
|
10
|
+
}
|
|
11
|
+
declare const RichText: ({ editor, readOnly, onChange, ToolbarComponent, initialValue, }: RichTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default RichText;
|