@yoopta/editor 4.3.2 → 4.4.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 +259 -75
- package/dist/YooptaEditor.d.ts +2 -1
- package/dist/YooptaEditor.d.ts.map +1 -1
- package/dist/components/Editor/Editor.d.ts +3 -2
- package/dist/components/Editor/Editor.d.ts.map +1 -1
- package/dist/contexts/YooptaContext/YooptaContext.d.ts +2 -3
- package/dist/contexts/YooptaContext/YooptaContext.d.ts.map +1 -1
- package/dist/editor/core/blur.d.ts.map +1 -0
- package/dist/editor/core/focus.d.ts +3 -0
- package/dist/editor/core/focus.d.ts.map +1 -0
- package/dist/editor/core/isFocused.d.ts +3 -0
- package/dist/editor/core/isFocused.d.ts.map +1 -0
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/transforms/focusBlock.d.ts.map +1 -1
- package/dist/editor/types.d.ts +6 -4
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/plugins/SlateEditorComponent.d.ts.map +1 -1
- package/dist/utils/weakMaps.d.ts +3 -0
- package/dist/utils/weakMaps.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/editor/selection/blur.d.ts.map +0 -1
- /package/dist/editor/{selection → core}/blur.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,99 +1,283 @@
|
|
|
1
|
-
|
|
2
|
-
<p align="center">Yoopta-Editor - is an open source notion-like editor 💥</p>
|
|
3
|
-
<div align="center">
|
|
4
|
-
<img width="574" alt="Screen Shot 2023-01-25 at 16 04 29" src="https://user-images.githubusercontent.com/29093118/215324525-882bf403-646c-4267-bb5f-c0f37509ac09.png">
|
|
5
|
-
</div>
|
|
1
|
+
# Core package
|
|
6
2
|
|
|
7
|
-
|
|
3
|
+
This is core package for Yoopta-Editor
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
### Installation
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<a target="_blank" rel="noopener noreferrer" href="https://yopage.co/blog/0zntIA46L4/kUoZ2DoHnG">API</a> |
|
|
15
|
-
<a target="_blank" rel="noopener noreferrer" href="https://yopage.co/blog/0zntIA46L4/qo9nK4lDG5">FAQs</a> |
|
|
16
|
-
<a target="_blank" rel="noopener noreferrer" href="https://yoopta-editor.vercel.app/basic">Examples</a>
|
|
17
|
-
</p>
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @yoopta/editor
|
|
9
|
+
```
|
|
18
10
|
|
|
19
|
-
###
|
|
11
|
+
### Usage
|
|
20
12
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- Shortcuts
|
|
26
|
-
- A cool representation of the data in JSON format, so you can easily save the content data to the database and validate
|
|
27
|
-
You can import two plugins from library: `<YooptaEditor />` and `<YooptaRender />`. <br>
|
|
28
|
-
`<YooptaEditor />` - it's for building beautiful content <br>
|
|
29
|
-
`<YooptaRender />` - it's just for rendering from your saved data, without any editor tools and libraries, so it make you page loading faster
|
|
30
|
-
- Custom styling
|
|
31
|
-
...and other
|
|
13
|
+
```tsx
|
|
14
|
+
import YooptaEditor, { createYooptaEditor, YooEditor } from '@yoopta/editor';
|
|
15
|
+
// plugins
|
|
16
|
+
import Paragraph from '@yoopta/paragraph';
|
|
32
17
|
|
|
33
|
-
|
|
18
|
+
const plugins = [Paragraph];
|
|
34
19
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
20
|
+
const Editor = () => {
|
|
21
|
+
// create instance
|
|
22
|
+
const editor: YooEditor = useMemo(() => createYooptaEditor(), []);
|
|
38
23
|
|
|
39
|
-
|
|
24
|
+
return <YooptaEditor editor={editor} plugins={plugins} />;
|
|
25
|
+
};
|
|
26
|
+
```
|
|
40
27
|
|
|
41
|
-
|
|
42
|
-
or
|
|
43
|
-
npm install react react-dom slate slate-react
|
|
28
|
+
### YooptaEditor component props
|
|
44
29
|
|
|
45
|
-
|
|
30
|
+
```ts
|
|
31
|
+
type Props = {
|
|
32
|
+
/**
|
|
33
|
+
* Instance of editor
|
|
34
|
+
*/
|
|
35
|
+
editor: YooEditor;
|
|
36
|
+
/**
|
|
37
|
+
* Optional custom id. Useful for multiple instances
|
|
38
|
+
*/
|
|
39
|
+
id?: string;
|
|
40
|
+
/**
|
|
41
|
+
* List of plugins
|
|
42
|
+
*/
|
|
43
|
+
plugins: YooptaPlugin[];
|
|
44
|
+
/**
|
|
45
|
+
* List of marks from @yoopta/marks
|
|
46
|
+
*/
|
|
47
|
+
marks?: YooptaMark<any>[];
|
|
48
|
+
/**
|
|
49
|
+
* Optional value of editor. DEFAULT - [undefined]
|
|
50
|
+
*/
|
|
51
|
+
value?: YooptaContentValue;
|
|
52
|
+
/**
|
|
53
|
+
* Autofocus when editor is ready. DEFAULT - [true]
|
|
54
|
+
*/
|
|
55
|
+
autoFocus?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Additional className for your needs. DEFAULT - [.yoopta-editor]
|
|
58
|
+
*/
|
|
59
|
+
className?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Box for selection area to select by mouse several blocks. DEFAULT - [document]
|
|
62
|
+
*/
|
|
63
|
+
selectionBoxRoot?: HTMLElement | React.MutableRefObject<HTMLElement | null> | false;
|
|
64
|
+
children?: React.ReactNode;
|
|
65
|
+
tools?: Partial<Tools>;
|
|
66
|
+
placeholder?: string;
|
|
67
|
+
readOnly?: boolean;
|
|
68
|
+
width?: number | string;
|
|
69
|
+
};
|
|
70
|
+
```
|
|
46
71
|
|
|
47
|
-
|
|
48
|
-
import { YooptaEditor } from '@yoopta/editor';
|
|
49
|
-
import { useState } from 'react';
|
|
72
|
+
### API from editor instance
|
|
50
73
|
|
|
51
|
-
|
|
74
|
+
```tsx
|
|
75
|
+
type YooEditor<TNodes> = {
|
|
76
|
+
/**
|
|
77
|
+
* Unique identifier for the editor instance.
|
|
78
|
+
*/
|
|
79
|
+
id: string;
|
|
52
80
|
|
|
53
|
-
|
|
54
|
-
|
|
81
|
+
/**
|
|
82
|
+
* Inserts a single block of data into the editor.
|
|
83
|
+
*/
|
|
84
|
+
insertBlock: (data: YooptaBlockData, options?: YooptaEditorTransformOptions) => void;
|
|
55
85
|
|
|
56
|
-
|
|
86
|
+
/**
|
|
87
|
+
* Inserts multiple blocks of data into the editor at once.
|
|
88
|
+
*/
|
|
89
|
+
insertBlocks: (blocks: YooptaBlockData[], options?: YooptaEditorTransformOptions) => void;
|
|
57
90
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
91
|
+
/**
|
|
92
|
+
* Splits the current block at the cursor's position.
|
|
93
|
+
*/
|
|
94
|
+
splitBlock: (options?: YooptaEditorTransformOptions) => void;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Updates a block with new data based on its id.
|
|
98
|
+
*/
|
|
99
|
+
updateBlock: (id: string, data: Partial<YooptaBlockData>) => void;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Deletes a block from the editor.
|
|
103
|
+
*/
|
|
104
|
+
deleteBlock: (options?: DeleteBlockOptions) => void;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Duplicates a block within the editor.
|
|
108
|
+
*/
|
|
109
|
+
duplicateBlock: (options?: DuplicateBlockOptions) => void;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Retrieves a block's data based on provided options.
|
|
113
|
+
*/
|
|
114
|
+
getBlock: (options?: YooptaEditorTransformOptions) => void;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Toggles a block's type in the editor.
|
|
118
|
+
*/
|
|
119
|
+
toggleBlock: (toBlockType?: string, options?: ToggleBlockOptions) => void;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Increases the depth of a block, typically used for nested structures like lists.
|
|
123
|
+
*/
|
|
124
|
+
increaseBlockDepth: (options?: YooptaEditorTransformOptions) => void;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Decreases the depth of a block.
|
|
128
|
+
*/
|
|
129
|
+
decreaseBlockDepth: (options?: YooptaEditorTransformOptions) => void;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Applies any staged changes to the editor.
|
|
133
|
+
*/
|
|
134
|
+
applyChanges: () => void;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Moves a block to a different position within the editor.
|
|
138
|
+
*/
|
|
139
|
+
moveBlock: (blockId: string, to: YooptaBlockPath) => void;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Focuses on a block based on its id.
|
|
143
|
+
*/
|
|
144
|
+
focusBlock: (id: string, options?: FocusBlockOptions) => void;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Current selection path in the editor.
|
|
148
|
+
*/
|
|
149
|
+
selection: YooptaBlockPath | null;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Array of currently selected block indices.
|
|
153
|
+
*/
|
|
154
|
+
selectedBlocks: number[] | null;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Holds the structured data representing the editor's content.
|
|
158
|
+
*/
|
|
159
|
+
children: Record<string, YooptaBlockData>;
|
|
65
160
|
|
|
66
|
-
|
|
161
|
+
/**
|
|
162
|
+
* Retrieves the entire editor's value.
|
|
163
|
+
*/
|
|
164
|
+
getEditorValue: () => TNodes;
|
|
67
165
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- <a target="_blank" rel="noopener noreferrer" href="https://yoopta-editor.vercel.app/styling">Custom styling</a>
|
|
73
|
-
<br>
|
|
74
|
-
<br>
|
|
166
|
+
/**
|
|
167
|
+
* Sets the editor's content.
|
|
168
|
+
*/
|
|
169
|
+
setEditorValue: (value: YooptaContentValue) => void;
|
|
75
170
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</div>
|
|
81
|
-
<br>
|
|
82
|
-
<div style="padding: 10px; marging: 10px">
|
|
83
|
-
📝 This WYSIWYG editor build on top of <a target="_blank" rel="noopener noreferrer" href="https://github.com/ianstormtaylor/slate">Slate JS framework</a> <br>
|
|
84
|
-
💙 SlateJS - is the best tool for building rich-text editors. It has beautiful design and great API
|
|
85
|
-
</div>
|
|
171
|
+
/**
|
|
172
|
+
* Sets the selection path in the editor.
|
|
173
|
+
*/
|
|
174
|
+
setSelection: (path: YooptaBlockPath | null, options?: SetSelectionOptions) => void;
|
|
86
175
|
|
|
87
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Sets or clears the selection for a block.
|
|
178
|
+
*/
|
|
179
|
+
setBlockSelected: (path: number[] | null, options?: BlockSelectedOptions) => void;
|
|
88
180
|
|
|
89
|
-
|
|
181
|
+
/**
|
|
182
|
+
* Map of individual block editors.
|
|
183
|
+
*/
|
|
184
|
+
blockEditorsMap: YooptaPluginsEditorMap;
|
|
90
185
|
|
|
91
|
-
|
|
186
|
+
/**
|
|
187
|
+
* Definitions of all blocks in the editor.
|
|
188
|
+
*/
|
|
189
|
+
blocks: YooptaBlocks;
|
|
92
190
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Formatting options available in the editor.
|
|
193
|
+
*/
|
|
194
|
+
formats: YooptaFormats;
|
|
96
195
|
|
|
97
|
-
|
|
196
|
+
/**
|
|
197
|
+
* Keyboard shortcuts configured for the editor.
|
|
198
|
+
*/
|
|
199
|
+
shortcuts: Record<string, YooptaBlock>;
|
|
98
200
|
|
|
99
|
-
|
|
201
|
+
/**
|
|
202
|
+
* Registered plugins.
|
|
203
|
+
*/
|
|
204
|
+
plugins: Record<string, Plugin<string, unknown>>;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Subscribes to an event.
|
|
208
|
+
*/
|
|
209
|
+
on: (event: YooEditorEvents, fn: (payload: any) => void) => void;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Subscribes once to an event.
|
|
213
|
+
*/
|
|
214
|
+
once: (event: YooEditorEvents, fn: (payload: any) => void) => void;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Unsubscribes from an event.
|
|
218
|
+
*/
|
|
219
|
+
off: (event: YooEditorEvents, fn: (payload: any) => void) => void;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Emits an event.
|
|
223
|
+
*/
|
|
224
|
+
emit: (event: YooEditorEvents, payload: any) => void;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Indicates if the editor is read-only.
|
|
228
|
+
*/
|
|
229
|
+
readOnly: boolean;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Returns whether the editor is focused.
|
|
233
|
+
*/
|
|
234
|
+
isFocused: () => boolean;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Blurs the editor, removing focus.
|
|
238
|
+
*/
|
|
239
|
+
blur: (options?: EditorBlurOptions) => void;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Focuses the editor.
|
|
243
|
+
*/
|
|
244
|
+
focus: () => void;
|
|
245
|
+
};
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Hooks from @yoopta/editor
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
/**
|
|
252
|
+
* Hook to access the Yoopta editor instance. Must be used in children components of <YooptaEditor />.
|
|
253
|
+
* @returns {YooEditor} The editor instance.
|
|
254
|
+
*/
|
|
255
|
+
useYooptaEditor();
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Hook to check if the editor is in read-only mode.
|
|
259
|
+
* @returns {boolean} True if the editor is read-only.
|
|
260
|
+
*/
|
|
261
|
+
useYooptaReadOnly();
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Hook to check if the editor is focused.
|
|
265
|
+
* @returns {boolean} True if the editor is focused.
|
|
266
|
+
*/
|
|
267
|
+
useYooptaFocused();
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Hook to get the data for a specific block by its ID.
|
|
271
|
+
* @param {string} blockId The ID of the block.
|
|
272
|
+
* @returns {YooptaBlockData | undefined} The data of the block, or undefined if not found.
|
|
273
|
+
*/
|
|
274
|
+
useBlockData(blockId);
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Hook to get the options for a plugin.
|
|
278
|
+
* @template TOptions The type of options expected.
|
|
279
|
+
* @param {string} blockType The block type associated with the plugin.
|
|
280
|
+
* @returns {PluginOptions<TOptions>} The options of the plugin.
|
|
281
|
+
*/
|
|
282
|
+
useYooptaPluginOptions<TOptions>(blockType);
|
|
283
|
+
```
|
package/dist/YooptaEditor.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Tools } from './contexts/YooptaContext/ToolsContext';
|
|
|
4
4
|
import { YooptaPlugin } from './plugins';
|
|
5
5
|
import { YooptaMark } from './marks';
|
|
6
6
|
type Props = {
|
|
7
|
+
id?: string;
|
|
7
8
|
editor: YooEditor;
|
|
8
9
|
plugins: YooptaPlugin[];
|
|
9
10
|
marks?: YooptaMark<any>[];
|
|
@@ -17,6 +18,6 @@ type Props = {
|
|
|
17
18
|
readOnly?: boolean;
|
|
18
19
|
width?: number | string;
|
|
19
20
|
};
|
|
20
|
-
declare const YooptaEditor: ({ editor, value, marks: marksProps, plugins: pluginsProps, autoFocus, className, tools, selectionBoxRoot, children, placeholder, readOnly, width, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const YooptaEditor: ({ id, editor, value, marks: marksProps, plugins: pluginsProps, autoFocus, className, tools, selectionBoxRoot, children, placeholder, readOnly, width, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export { YooptaEditor };
|
|
22
23
|
//# sourceMappingURL=YooptaEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YooptaEditor.d.ts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;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;IACpF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAgCF,QAAA,MAAM,YAAY,4JAcf,KAAK,4CAsFP,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { YooptaMark } from '../../marks';
|
|
3
3
|
type Props = {
|
|
4
4
|
marks?: YooptaMark<any>[];
|
|
@@ -7,7 +7,8 @@ type Props = {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
width?: number | string;
|
|
10
|
+
children: ReactNode;
|
|
10
11
|
};
|
|
11
|
-
declare const Editor: ({ placeholder, marks, className, selectionBoxRoot, width, autoFocus }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const Editor: ({ placeholder, marks, className, selectionBoxRoot, width, children, autoFocus }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export { Editor };
|
|
13
14
|
//# sourceMappingURL=Editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/Editor.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/Editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAqB,MAAM,OAAO,CAAC;AAGpE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAazC,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;IACpF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAmBF,QAAA,MAAM,MAAM,oFAA4F,KAAK,4CAqT5G,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -14,8 +14,7 @@ declare const YooptaContextProvider: ({ children, editorState }: {
|
|
|
14
14
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
declare const useYooptaEditor: () => YooEditor;
|
|
16
16
|
declare const useBlockData: (blockId: string) => import("../../editor/types").YooptaBlockData<import("slate").Descendant>;
|
|
17
|
-
declare const
|
|
18
|
-
declare const useYooptaPlugin: (type: string) => import("../../plugins/types").Plugin<string, unknown, Record<string, unknown>>;
|
|
17
|
+
declare const useYooptaFocused: () => boolean;
|
|
19
18
|
declare const useYooptaReadOnly: () => boolean;
|
|
20
19
|
declare const useYooptaPluginOptions: <TOptions>(blockType: string) => PluginOptions<TOptions>;
|
|
21
20
|
type UseBlockSelectedProps = {
|
|
@@ -26,5 +25,5 @@ type UseBlockSelectedProps = {
|
|
|
26
25
|
blockId?: string;
|
|
27
26
|
};
|
|
28
27
|
declare const useBlockSelected: ({ blockId, path }: UseBlockSelectedProps) => boolean;
|
|
29
|
-
export { useYooptaEditor, useBlockData,
|
|
28
|
+
export { useYooptaEditor, useBlockData, useYooptaPluginOptions, useBlockSelected, useYooptaReadOnly, useYooptaFocused, YooptaContextProvider, };
|
|
30
29
|
//# sourceMappingURL=YooptaContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YooptaContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/YooptaContext/YooptaContext.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"YooptaContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/YooptaContext/YooptaContext.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AA+CF,eAAO,MAAM,aAAa,8CAAuD,CAAC;AAElF;;GAEG;AACH,QAAA,MAAM,qBAAqB;;;6CAQ1B,CAAC;AAEF,QAAA,MAAM,eAAe,QAAO,SAQ3B,CAAC;AAEF,QAAA,MAAM,YAAY,YAAa,MAAM,6EAAwC,CAAC;AAC9E,QAAA,MAAM,gBAAgB,eAAsC,CAAC;AAC7D,QAAA,MAAM,iBAAiB,eAAmC,CAAC;AAC3D,QAAA,MAAM,sBAAsB,wBAA0B,MAAM,4BACc,CAAC;AAE3E,KAAK,qBAAqB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACvH,QAAA,MAAM,gBAAgB,sBAAuB,qBAAqB,YAkBjE,CAAC;AAEF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../src/editor/core/blur.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,SAAS,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC,GAAG;IAC5E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAWF,wBAAgB,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,iBAAsB,QAiBtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../../src/editor/core/focus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,wBAAgB,KAAK,CAAC,MAAM,EAAE,SAAS,QAUtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isFocused.d.ts","sourceRoot":"","sources":["../../../src/editor/core/isFocused.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,WAE1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editor/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editor/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA8BpC,eAAO,MAAM,kBAAkB,QAAO,SAyCrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,sBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/transforms/focusBlock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"focusBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/transforms/focusBlock.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,SAAS,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEzF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,4BAA4B,EAAE,SAAS,GAAG,OAAO,CAAC,GAAG;IACxF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,CAAC;AAkBF,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,QAgC7F"}
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Descendant, Editor, Path, Point } from 'slate';
|
|
2
2
|
import { Plugin, PluginElementsMap, PluginOptions, PluginElementProps } from '../plugins/types';
|
|
3
|
-
import { EditorBlurOptions } from './
|
|
3
|
+
import { EditorBlurOptions } from './core/blur';
|
|
4
4
|
import { BlockSelectedOptions } from './selection/setBlockSelected';
|
|
5
5
|
import { SetSelectionOptions } from './selection/setSelection';
|
|
6
6
|
import { CreateBlockOptions } from './transforms/createBlock';
|
|
@@ -52,7 +52,7 @@ export type YooptaBlock = {
|
|
|
52
52
|
};
|
|
53
53
|
export type YooptaBlocks = Record<string, YooptaBlock>;
|
|
54
54
|
export type YooptaFormats = Record<string, TextFormat>;
|
|
55
|
-
export type YooEditorEvents = 'change' | 'block:copy';
|
|
55
|
+
export type YooEditorEvents = 'change' | 'focus' | 'blur' | 'block:copy';
|
|
56
56
|
export type YooEditor<TNodes = any> = {
|
|
57
57
|
id: string;
|
|
58
58
|
insertBlock: (data: YooptaBlockData, options?: YooptaEditorTransformOptions) => void;
|
|
@@ -62,7 +62,7 @@ export type YooEditor<TNodes = any> = {
|
|
|
62
62
|
deleteBlock: (options?: DeleteBlockOptions) => void;
|
|
63
63
|
duplicateBlock: (options?: DuplicateBlockOptions) => void;
|
|
64
64
|
getBlock: (options?: YooptaEditorTransformOptions) => void;
|
|
65
|
-
toggleBlock: (toBlockType
|
|
65
|
+
toggleBlock: (toBlockType: string, options?: ToggleBlockOptions) => void;
|
|
66
66
|
increaseBlockDepth: (options?: YooptaEditorTransformOptions) => void;
|
|
67
67
|
decreaseBlockDepth: (options?: YooptaEditorTransformOptions) => void;
|
|
68
68
|
applyChanges: () => void;
|
|
@@ -75,7 +75,6 @@ export type YooEditor<TNodes = any> = {
|
|
|
75
75
|
setEditorValue: (value: YooptaContentValue) => void;
|
|
76
76
|
setSelection: (path: YooptaBlockPath | null, options?: SetSelectionOptions) => void;
|
|
77
77
|
setBlockSelected: (path: number[] | null, options?: BlockSelectedOptions) => void;
|
|
78
|
-
blur: (options?: EditorBlurOptions) => void;
|
|
79
78
|
blockEditorsMap: YooptaPluginsEditorMap;
|
|
80
79
|
blocks: YooptaBlocks;
|
|
81
80
|
formats: YooptaFormats;
|
|
@@ -86,6 +85,9 @@ export type YooEditor<TNodes = any> = {
|
|
|
86
85
|
off: (event: YooEditorEvents, fn: (payload: any) => void) => void;
|
|
87
86
|
emit: (event: YooEditorEvents, payload: any) => void;
|
|
88
87
|
readOnly: boolean;
|
|
88
|
+
isFocused: () => boolean;
|
|
89
|
+
blur: (options?: EditorBlurOptions) => void;
|
|
90
|
+
focus: () => void;
|
|
89
91
|
};
|
|
90
92
|
export type SlateElement<K extends string = string, T = any> = {
|
|
91
93
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,MAAM,eAAe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ACrB,OAAO,EAAE,aAAa,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,EAAE,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IACjE,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IACnE,GAAG,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IAClE,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACrD,QAAQ,EAAE,OAAO,CAAC;IAElB,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAGF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,EAAE,UAAU,EAAE,GAAG,YAAY,EAAE,CAAC;IACxC,KAAK,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { YooptaPlugin } from './plugins';
|
|
2
|
-
export { useBlockData,
|
|
2
|
+
export { useBlockData, useYooptaEditor, useYooptaFocused, useBlockSelected, useYooptaReadOnly, useYooptaPluginOptions, } from './contexts/YooptaContext/YooptaContext';
|
|
3
3
|
import { YooptaEditor } from './YooptaEditor';
|
|
4
4
|
export { UI } from './UI';
|
|
5
5
|
export { useYooptaTools, Tools } from './contexts/YooptaContext/ToolsContext';
|
|
@@ -13,7 +13,7 @@ export { createYooptaEditor } from './editor';
|
|
|
13
13
|
export { createYooptaMark, YooptaMarkParams, YooptaMark } from './marks';
|
|
14
14
|
export { YooEditor, SlateElement, YooptaBlockData, YooptaBlock, YooptaContentValue } from './editor/types';
|
|
15
15
|
export { buildBlockData, buildBlockElement } from './components/Editor/utils';
|
|
16
|
-
export default YooptaEditor;
|
|
17
16
|
export { PluginElementRenderProps, PluginEventHandlerOptions, PluginCustomEditorRenderProps, YooptaMarkProps, } from './plugins/types';
|
|
18
17
|
import './styles.css';
|
|
18
|
+
export default YooptaEditor;
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OA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