@contentful/field-editor-rich-text 2.3.20 → 3.0.1
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/CHANGELOG.md +16 -0
- package/dist/SdkProvider.d.ts +1 -1
- package/dist/dialogs/HypelinkDialog/HyperlinkDialog.d.ts +3 -3
- package/dist/field-editor-rich-text.cjs.development.js +72 -137
- 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 +74 -139
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/editor.d.ts +1 -1
- package/dist/plugins/Heading/components/Heading.d.ts +0 -1
- package/dist/prepareDocument.d.ts +2 -2
- package/dist/test-utils/jsx.d.ts +1 -1
- package/package.json +3 -3
- package/dist/plugins/shared/useFetchedEntity.d.ts +0 -8
- package/dist/plugins/shared/useStableCallback.d.ts +0 -6
package/dist/helpers/editor.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare function isNodeTypeSelected(editor: RichTextEditor, nodeType: BLO
|
|
|
13
13
|
export declare function moveToTheNextLine(editor: RichTextEditor): void;
|
|
14
14
|
export declare function moveToTheNextChar(editor: RichTextEditor): void;
|
|
15
15
|
export declare function insertEmptyParagraph(editor: RichTextEditor, options?: any): void;
|
|
16
|
-
export declare function getElementFromCurrentSelection(editor: RichTextEditor): (
|
|
16
|
+
export declare function getElementFromCurrentSelection(editor: RichTextEditor): (Node | Path)[];
|
|
17
17
|
export declare function isList(editor?: RichTextEditor): boolean;
|
|
18
18
|
export declare function getTableSize(table: CustomElement): Record<'numRows' | 'numColumns', number> | null;
|
|
19
19
|
interface InsertLinkOptions {
|
|
@@ -16,5 +16,5 @@ export declare const setEditorContent: (editor: Editor, nodes?: Node[] | undefin
|
|
|
16
16
|
* Converts a Contentful rich text document to the corresponding slate editor
|
|
17
17
|
* value
|
|
18
18
|
*/
|
|
19
|
-
export declare const documentToEditorValue: (doc: any) =>
|
|
20
|
-
export declare const normalizeEditorValue: (value: Descendant[], options?:
|
|
19
|
+
export declare const documentToEditorValue: (doc: any) => import("types").TextOrCustomElement[];
|
|
20
|
+
export declare const normalizeEditorValue: (value: Descendant[], options?: Omit<CreatePlateEditorOptions<RichTextEditor>, "id" | "editor"> | undefined) => Descendant[] & any[];
|
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 "element" | "editor" | "
|
|
6
|
+
export declare const jsx: <S extends "element" | "editor" | "selection" | "text" | "anchor" | "focus" | "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": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "dist/field-editor-rich-text.esm.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@contentful/f36-components": "^4.0.33",
|
|
30
30
|
"@contentful/f36-icons": "^4.1.1",
|
|
31
31
|
"@contentful/f36-tokens": "^4.0.0",
|
|
32
|
-
"@contentful/field-editor-reference": "^
|
|
32
|
+
"@contentful/field-editor-reference": "^5.1.0",
|
|
33
33
|
"@contentful/field-editor-shared": "^1.1.3",
|
|
34
34
|
"@contentful/rich-text-plain-text-renderer": "^15.12.1",
|
|
35
35
|
"@contentful/rich-text-types": "^15.12.1",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"@udecode/plate-test-utils": "^3.2.0",
|
|
73
73
|
"react": ">=16.14.0"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "dd40564d18b331c7325878f9ede41a1bf8f814a6"
|
|
76
76
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Entry, Asset } from '@contentful/app-sdk';
|
|
2
|
-
interface FetchedEntityProps {
|
|
3
|
-
type: 'Entry' | 'Asset';
|
|
4
|
-
id: string;
|
|
5
|
-
onEntityFetchComplete?: VoidFunction;
|
|
6
|
-
}
|
|
7
|
-
export declare function useFetchedEntity({ type, id, onEntityFetchComplete }: FetchedEntityProps): Entry<Record<string, any>> | Asset | "failed" | undefined;
|
|
8
|
-
export {};
|