@contentful/field-editor-rich-text 2.0.0-next.12 → 2.0.0-next.13
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/field-editor-rich-text.cjs.development.js +6 -2
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +6 -2
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/editor.d.ts +7 -8
- package/dist/test-utils/jsx.d.ts +1 -1
- package/dist/test-utils/mockPlugin.d.ts +1 -1
- package/package.json +1 -1
package/dist/helpers/editor.d.ts
CHANGED
|
@@ -4,16 +4,15 @@ import { PlateEditor } from '@udecode/plate-core';
|
|
|
4
4
|
import { Path, Node } from 'slate';
|
|
5
5
|
import { CustomElement } from '../types';
|
|
6
6
|
export declare const LINK_TYPES: INLINES[];
|
|
7
|
-
export declare function isBlockSelected(editor:
|
|
7
|
+
export declare function isBlockSelected(editor: PlateEditor, type: string): boolean;
|
|
8
8
|
export declare function isRootLevel(path: Path): boolean;
|
|
9
|
-
export declare function hasSelectionText(editor: any): boolean;
|
|
10
9
|
declare type NodeEntry = [CustomElement, Path];
|
|
11
10
|
declare type NodeType = BLOCKS | INLINES;
|
|
12
|
-
export declare function getNodeEntryFromSelection(editor:
|
|
13
|
-
export declare function isNodeTypeSelected(editor:
|
|
14
|
-
export declare function moveToTheNextLine(editor:
|
|
15
|
-
export declare function getElementFromCurrentSelection(editor:
|
|
16
|
-
export declare function isList(editor
|
|
11
|
+
export declare function getNodeEntryFromSelection(editor: PlateEditor, nodeTypeOrTypes: NodeType | NodeType[]): NodeEntry | [];
|
|
12
|
+
export declare function isNodeTypeSelected(editor: PlateEditor, nodeType: BLOCKS | INLINES): boolean;
|
|
13
|
+
export declare function moveToTheNextLine(editor: PlateEditor): void;
|
|
14
|
+
export declare function getElementFromCurrentSelection(editor: PlateEditor): (import("slate").BaseEditor | CustomElement<unknown> | import("../types").CustomText | Path)[];
|
|
15
|
+
export declare function isList(editor?: PlateEditor): boolean;
|
|
17
16
|
export declare function getTableSize(table: CustomElement): Record<'numRows' | 'numColumns', number> | null;
|
|
18
17
|
interface InsertLinkOptions {
|
|
19
18
|
text: string;
|
|
@@ -23,7 +22,7 @@ interface InsertLinkOptions {
|
|
|
23
22
|
path?: Path;
|
|
24
23
|
}
|
|
25
24
|
export declare function insertLink(editor: any, options: InsertLinkOptions): void;
|
|
26
|
-
export declare function isLinkActive(editor
|
|
25
|
+
export declare function isLinkActive(editor?: PlateEditor): boolean;
|
|
27
26
|
export declare function unwrapLink(editor: any): void;
|
|
28
27
|
export declare function wrapLink(editor: any, { text, url, target, type, path }: InsertLinkOptions): void;
|
|
29
28
|
export declare function getAncestorPathFromSelection(editor: PlateEditor): Path | undefined;
|
package/dist/test-utils/jsx.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Add items as needed. Don't forget to adjust hyperscript.d.ts
|
|
5
5
|
*/
|
|
6
|
-
export declare const jsx: <S extends "
|
|
6
|
+
export declare const jsx: <S extends "selection" | "text" | "element" | "editor" | "focus" | "anchor" | "cursor" | "fragment">(tagName: S, attributes?: Object | undefined, ...children: any[]) => ReturnType<({
|
|
7
7
|
anchor: typeof import("slate-hyperscript/dist/creators").createAnchor;
|
|
8
8
|
cursor: typeof import("slate-hyperscript/dist/creators").createCursor;
|
|
9
9
|
editor: (tagName: string, attributes: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RichTextPlugin } from '../types';
|
|
2
|
-
export declare const mockPlugin: (p: Partial<RichTextPlugin>) => import("@udecode/plate-core").WithRequired<import("@udecode/plate-core").PlatePlugin<{}, {}>, "type" | "
|
|
2
|
+
export declare const mockPlugin: (p: Partial<RichTextPlugin>) => import("@udecode/plate-core").WithRequired<import("@udecode/plate-core").PlatePlugin<{}, {}>, "type" | "editor" | "options" | "inject">;
|