@contentful/field-editor-rich-text 2.0.0-next.15 → 2.0.0-next.18

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.
@@ -1,5 +1,6 @@
1
1
  import { Link } from '@contentful/field-editor-reference/dist/types';
2
2
  import { BLOCKS, INLINES } from '@contentful/rich-text-types';
3
+ import { EditorNodesOptions, ToggleNodeTypeOptions } from '@udecode/plate-core';
3
4
  import { Path, Node } from 'slate';
4
5
  import { CustomElement, RichTextEditor } from '../types';
5
6
  export declare const LINK_TYPES: INLINES[];
@@ -25,8 +26,6 @@ export declare function isLinkActive(editor?: RichTextEditor): boolean;
25
26
  export declare function unwrapLink(editor: any): void;
26
27
  export declare function wrapLink(editor: any, { text, url, target, type, path }: InsertLinkOptions): void;
27
28
  export declare function getAncestorPathFromSelection(editor: RichTextEditor): Path | undefined;
28
- export declare function shouldUnwrapBlockquote(editor: RichTextEditor, type: BLOCKS): boolean;
29
- export declare function unwrapFromRoot(editor: RichTextEditor): void;
30
29
  export declare const isAtEndOfTextSelection: (editor: RichTextEditor) => boolean;
31
30
  export declare function currentSelectionStartsTableCell(editor: RichTextEditor): boolean;
32
31
  /**
@@ -38,4 +37,5 @@ export declare function currentSelectionPrecedesTableCell(editor: RichTextEditor
38
37
  export declare const INLINE_TYPES: string[];
39
38
  export declare const isInlineOrText: (node: Node) => boolean;
40
39
  export declare const focus: (editor: RichTextEditor) => void;
40
+ export declare function toggleElement(editor: RichTextEditor, options: ToggleNodeTypeOptions, editorOptions?: Omit<EditorNodesOptions, 'match'>): void;
41
41
  export {};
@@ -0,0 +1,4 @@
1
+ import { PlateEditor } from '@udecode/plate-core';
2
+ export declare const toggleList: (editor: PlateEditor, { type }: {
3
+ type: string;
4
+ }) => void;
@@ -1,3 +1,4 @@
1
+ import { BLOCKS } from '@contentful/rich-text-types';
1
2
  import { NodeEntry, Node } from 'slate';
2
3
  import { CustomElement, RichTextEditor } from '../../types';
3
4
  export declare const hasListAsDirectParent: (editor: RichTextEditor, [, path]: NodeEntry<Node>) => boolean;
@@ -11,3 +12,4 @@ export declare const isNonEmptyListItem: (editor: RichTextEditor, [, path]: Node
11
12
  export declare const firstNodeIsNotList: (_editor: RichTextEditor, [node]: NodeEntry<CustomElement<unknown>>) => boolean;
12
13
  export declare const insertParagraphAsChild: (editor: RichTextEditor, [, path]: NodeEntry<Node>) => void;
13
14
  export declare const replaceNodeWithListItems: (editor: any, entry: any) => void;
15
+ export declare const isListTypeActive: (editor: RichTextEditor, type: BLOCKS) => boolean;
@@ -4,5 +4,4 @@ export declare const assertOutput: (options: {
4
4
  expected: any;
5
5
  editor?: RichTextEditor;
6
6
  log?: boolean;
7
- skipCursor?: boolean;
8
7
  }) => void;
@@ -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 "selection" | "text" | "element" | "editor" | "focus" | "anchor" | "cursor" | "fragment">(tagName: S, attributes?: Object | undefined, ...children: any[]) => ReturnType<({
6
+ export declare const jsx: <S extends "editor" | "text" | "selection" | "element" | "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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "2.0.0-next.15",
3
+ "version": "2.0.0-next.18",
4
4
  "publishConfig": {
5
5
  "tag": "next"
6
6
  },
@@ -28,9 +28,9 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@contentful/contentful-slatejs-adapter": "^15.11.0",
31
- "@contentful/f36-components": "^4.0.1-beta.2705",
32
- "@contentful/f36-icons": "^4.0.1-beta.2705",
33
- "@contentful/f36-tokens": "^4.0.1-beta.2705",
31
+ "@contentful/f36-components": "^4.0.33",
32
+ "@contentful/f36-icons": "^4.1.1",
33
+ "@contentful/f36-tokens": "^4.0.0",
34
34
  "@contentful/field-editor-reference": "^4.0.7",
35
35
  "@contentful/field-editor-shared": "^1.0.3",
36
36
  "@contentful/rich-text-plain-text-renderer": "^15.11.1",