@mdxeditor/editor 0.17.1 → 0.18.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/MDXEditor.d.ts
CHANGED
|
@@ -66,6 +66,10 @@ export interface MDXEditorMethods {
|
|
|
66
66
|
* Updates the markdown value of the editor.
|
|
67
67
|
*/
|
|
68
68
|
setMarkdown: (value: string) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Sets focus on input
|
|
71
|
+
*/
|
|
72
|
+
focus: () => void;
|
|
69
73
|
}
|
|
70
74
|
/**
|
|
71
75
|
* The MDXEditor React component. See {@link MDXEditorProps} for the list of properties supported and the {@link MDXEditorMethods} for the methods accessible through the ref.
|
package/dist/MDXEditor.js
CHANGED
|
@@ -86,6 +86,9 @@ function exportLexicalTreeToMdast({
|
|
|
86
86
|
if (!descriptor) {
|
|
87
87
|
throw new Error(`Component ${componentName} is used but not imported`);
|
|
88
88
|
}
|
|
89
|
+
if (!descriptor.source) {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
89
92
|
if (descriptor.defaultExport) {
|
|
90
93
|
defaultImportsMap.set(componentName, descriptor.source);
|
|
91
94
|
} else {
|
|
@@ -45,8 +45,9 @@ export interface JsxComponentDescriptor {
|
|
|
45
45
|
kind: 'flow' | 'text';
|
|
46
46
|
/**
|
|
47
47
|
* The module path from which the component can be imported
|
|
48
|
+
* Omit to skip injecting an import statement
|
|
48
49
|
*/
|
|
49
|
-
source
|
|
50
|
+
source?: string;
|
|
50
51
|
/**
|
|
51
52
|
* Wether the component is the default export of the module
|
|
52
53
|
*/
|