@mdxeditor/editor 2.14.0 → 2.15.0
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/dist/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ import { FC } from 'react';
|
|
|
44
44
|
import { HeadingTagType } from '@lexical/rich-text';
|
|
45
45
|
import { HistoryState } from '@lexical/history';
|
|
46
46
|
import { InitialEditorStateType } from '@lexical/react/LexicalComposer.js';
|
|
47
|
-
import {
|
|
47
|
+
import { KlassConstructor } from 'lexical';
|
|
48
48
|
import { LexicalCommand } from 'lexical';
|
|
49
49
|
import { LexicalEditor } from 'lexical';
|
|
50
50
|
import { LexicalNode } from 'lexical';
|
|
@@ -190,7 +190,7 @@ export declare const addImportVisitor$: NodeRef<MdastImportVisitor<Mdast.Nodes>
|
|
|
190
190
|
* Registers a lexical node to be used in the editor.
|
|
191
191
|
* @group Core
|
|
192
192
|
*/
|
|
193
|
-
export declare const addLexicalNode$: NodeRef<
|
|
193
|
+
export declare const addLexicalNode$: NodeRef<KlassConstructor<typeof LexicalNode> | KlassConstructor<typeof LexicalNode>[]>;
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
196
|
* Adds a mdast extension to the markdown parser.
|
|
@@ -424,9 +424,11 @@ const insertDecoratorNode$ = Signal((r) => {
|
|
|
424
424
|
} else {
|
|
425
425
|
$insertNodeToNearestRoot(node);
|
|
426
426
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
427
|
+
setTimeout(() => {
|
|
428
|
+
if ("select" in node && typeof node.select === "function") {
|
|
429
|
+
node.select();
|
|
430
|
+
}
|
|
431
|
+
});
|
|
430
432
|
});
|
|
431
433
|
setTimeout(() => {
|
|
432
434
|
theEditor.dispatchCommand(NESTED_EDITOR_UPDATED_COMMAND, void 0);
|
|
@@ -10,7 +10,6 @@ import { NestedEditorsContext } from "../core/NestedLexicalEditor.js";
|
|
|
10
10
|
import { voidEmitter } from "../../utils/voidEmitter.js";
|
|
11
11
|
import { useCellValues } from "@mdxeditor/gurx";
|
|
12
12
|
import { directiveDescriptors$ } from "../core/index.js";
|
|
13
|
-
let GENERATION = 0;
|
|
14
13
|
class DirectiveNode extends DecoratorNode {
|
|
15
14
|
/**
|
|
16
15
|
* Constructs a new {@link DirectiveNode} with the specified MDAST directive node as the object to edit.
|
|
@@ -28,7 +27,6 @@ class DirectiveNode extends DecoratorNode {
|
|
|
28
27
|
this.__focusEmitter.publish();
|
|
29
28
|
});
|
|
30
29
|
this.__mdastNode = mdastNode;
|
|
31
|
-
this.generation = GENERATION++;
|
|
32
30
|
}
|
|
33
31
|
/** @internal */
|
|
34
32
|
static getType() {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"*.css"
|
|
12
12
|
],
|
|
13
13
|
"type": "module",
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.15.0",
|
|
15
15
|
"description": "React component for rich text markdown editing",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "vite build",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@codemirror/state": "^6.4.0",
|
|
42
42
|
"@codemirror/view": "^6.23.0",
|
|
43
43
|
"@codesandbox/sandpack-react": "^2.10.0",
|
|
44
|
-
"@lexical/clipboard": "^0.
|
|
45
|
-
"@lexical/link": "^0.
|
|
46
|
-
"@lexical/list": "^0.
|
|
47
|
-
"@lexical/markdown": "^0.
|
|
48
|
-
"@lexical/plain-text": "^0.
|
|
49
|
-
"@lexical/react": "^0.
|
|
50
|
-
"@lexical/rich-text": "^0.
|
|
51
|
-
"@lexical/selection": "^0.
|
|
52
|
-
"@lexical/utils": "^0.
|
|
44
|
+
"@lexical/clipboard": "^0.13.1",
|
|
45
|
+
"@lexical/link": "^0.13.1",
|
|
46
|
+
"@lexical/list": "^0.13.1",
|
|
47
|
+
"@lexical/markdown": "^0.13.1",
|
|
48
|
+
"@lexical/plain-text": "^0.13.1",
|
|
49
|
+
"@lexical/react": "^0.13.1",
|
|
50
|
+
"@lexical/rich-text": "^0.13.1",
|
|
51
|
+
"@lexical/selection": "^0.13.1",
|
|
52
|
+
"@lexical/utils": "^0.13.1",
|
|
53
53
|
"@mdxeditor/gurx": "^1.1.1",
|
|
54
54
|
"@radix-ui/colors": "^3.0.0",
|
|
55
55
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"codemirror": "^6.0.1",
|
|
65
65
|
"downshift": "^7.6.0",
|
|
66
66
|
"js-yaml": "4.1.0",
|
|
67
|
-
"lexical": "^0.
|
|
67
|
+
"lexical": "^0.13.1",
|
|
68
68
|
"mdast-util-directive": "^3.0.0",
|
|
69
69
|
"mdast-util-from-markdown": "^2.0.0",
|
|
70
70
|
"mdast-util-frontmatter": "^2.0.1",
|