wysimark-lite 0.25.42 → 0.26.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.mts +9 -9
- package/dist/index.js +316 -128
- package/dist/index.mjs +1274 -674
- package/dist/index.mjs.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default from 'react';
|
|
2
3
|
import * as slate from 'slate';
|
|
3
4
|
import { Descendant, Editor, Element as Element$1, BaseEditor, NodeEntry, BaseRange, Location, Path, Text, BaseText } from 'slate';
|
|
4
5
|
import { HistoryEditor } from 'slate-history';
|
|
5
6
|
import { ReactEditor } from 'slate-react';
|
|
6
7
|
import { SetReturnType, SetOptional, UnionToIntersection, Simplify } from 'type-fest';
|
|
7
|
-
import react from 'react';
|
|
8
8
|
import { EditableProps as EditableProps$1, RenderElementProps, RenderLeafProps, RenderPlaceholderProps } from 'slate-react/dist/components/editable';
|
|
9
9
|
|
|
10
10
|
type OnImageChangeHandler = (file: File) => Promise<string>;
|
|
@@ -201,9 +201,9 @@ type VoidActionReturn = boolean | (() => void);
|
|
|
201
201
|
|
|
202
202
|
type RenderEditableProps = {
|
|
203
203
|
attributes: EditableProps$1;
|
|
204
|
-
Editable:
|
|
204
|
+
Editable: react__default.ComponentType<EditableProps$1>;
|
|
205
205
|
};
|
|
206
|
-
type RenderEditable = (props: RenderEditableProps) =>
|
|
206
|
+
type RenderEditable = (props: RenderEditableProps) => react__default.ReactElement;
|
|
207
207
|
/**
|
|
208
208
|
* The return type of the BasePluginFn which specifies how the Plugin is
|
|
209
209
|
* supposed to behave.
|
|
@@ -228,9 +228,9 @@ type BasePluginPolicy = {
|
|
|
228
228
|
renderEditable?: RenderEditable;
|
|
229
229
|
editableProps?: {
|
|
230
230
|
decorate?: ((entry: NodeEntry) => BaseRange[]) | undefined;
|
|
231
|
-
renderElement?: (props: RenderElementProps) =>
|
|
232
|
-
renderLeaf?: (props: RenderLeafProps) =>
|
|
233
|
-
renderPlaceholder?: (props: RenderPlaceholderProps) =>
|
|
231
|
+
renderElement?: (props: RenderElementProps) => react__default.ReactElement | undefined;
|
|
232
|
+
renderLeaf?: (props: RenderLeafProps) => react__default.ReactElement | undefined;
|
|
233
|
+
renderPlaceholder?: (props: RenderPlaceholderProps) => react__default.ReactElement;
|
|
234
234
|
onKeyDown?: EditableVoidToBooleanHandlerType<"onKeyDown">;
|
|
235
235
|
onKeyUp?: EditableVoidToBooleanHandlerType<"onKeyDown">;
|
|
236
236
|
onPaste?: EditableVoidToBooleanHandlerType<"onPaste">;
|
|
@@ -816,7 +816,7 @@ declare function createCodeBlockMethods(editor: Editor): {
|
|
|
816
816
|
};
|
|
817
817
|
|
|
818
818
|
type CodeBlockMethods = ReturnType<typeof createCodeBlockMethods>;
|
|
819
|
-
type BuiltInLanguage = "text" | "html" | "svg" | "markup" | "css" | "javascript" | "js" | "java" | "c" | "clike";
|
|
819
|
+
type BuiltInLanguage = "text" | "html" | "svg" | "markup" | "css" | "javascript" | "js" | "java" | "c" | "clike" | "mermaid";
|
|
820
820
|
type CodeBlockEditor = {
|
|
821
821
|
codeBlock: CodeBlockMethods;
|
|
822
822
|
};
|
|
@@ -1032,7 +1032,7 @@ type EditableProps = {
|
|
|
1032
1032
|
onImageChange?: OnImageChangeHandler;
|
|
1033
1033
|
onFileSelect?: OnFileSelectHandler;
|
|
1034
1034
|
};
|
|
1035
|
-
declare function Editable({ editor, value, onChange, throttleInMs, placeholder, className, style, onImageChange, onFileSelect, }: EditableProps):
|
|
1035
|
+
declare function Editable({ editor, value, onChange, throttleInMs, placeholder, className, style, onImageChange, onFileSelect, }: EditableProps): react.JSX.Element;
|
|
1036
1036
|
|
|
1037
1037
|
/**
|
|
1038
1038
|
* Remove inline escape backslashes added by the serializer's escapeText.
|