@contentful/field-editor-rich-text 2.0.0-next.9 → 2.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 +122 -0
- package/LICENSE +21 -0
- package/README.md +25 -3
- package/dist/ContentfulEditorProvider.d.ts +6 -5
- package/dist/RichTextEditor.d.ts +1 -1
- package/dist/Toolbar/components/EmbedEntityWidget.d.ts +1 -1
- package/dist/field-editor-rich-text.cjs.development.js +2388 -1402
- 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 +2397 -1411
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/editor.d.ts +16 -18
- package/dist/helpers/environment.d.ts +1 -1
- package/dist/helpers/extractNodes.d.ts +2 -3
- package/dist/helpers/{sanitizeSlateDoc.d.ts → sanitizeIncomingSlateDoc.d.ts} +2 -1
- package/dist/helpers/transformers.d.ts +6 -6
- package/dist/plugins/Break/createResetNodePlugin.d.ts +2 -0
- package/dist/plugins/Break/index.d.ts +2 -0
- package/dist/plugins/EmbeddedEntityBlock/ToolbarIcon.d.ts +1 -3
- package/dist/plugins/EmbeddedEntityBlock/Util.d.ts +2 -1
- package/dist/plugins/EmbeddedEntityBlock/index.d.ts +2 -3
- package/dist/plugins/EmbeddedEntityInline/index.d.ts +1 -3
- package/dist/plugins/Hr/index.d.ts +2 -3
- package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +5 -4
- package/dist/plugins/Hyperlink/components/EntityHyperlink.d.ts +9 -0
- package/dist/plugins/Hyperlink/components/ToolbarHyperlinkButton.d.ts +5 -0
- package/dist/plugins/Hyperlink/components/UrlHyperlink.d.ts +9 -0
- package/dist/plugins/Hyperlink/components/styles.d.ts +4 -0
- package/dist/plugins/Hyperlink/createHyperlinkPlugin.d.ts +3 -0
- package/dist/plugins/Hyperlink/index.d.ts +2 -9
- package/dist/plugins/Hyperlink/useEntityInfo.d.ts +16 -0
- package/dist/plugins/Hyperlink/utils.d.ts +4 -2
- package/dist/plugins/List/insertListBreak.d.ts +2 -2
- package/dist/plugins/List/insertListFragment.d.ts +3 -2
- package/dist/plugins/List/onKeyDownList.d.ts +7 -0
- package/dist/plugins/List/transforms/deleteBackwardList.d.ts +2 -0
- package/dist/plugins/List/transforms/insertListItem.d.ts +2 -2
- package/dist/plugins/List/transforms/moveListItemDown.d.ts +11 -0
- package/dist/plugins/List/transforms/moveListItems.d.ts +10 -0
- package/dist/plugins/List/transforms/toggleList.d.ts +4 -0
- package/dist/plugins/List/transforms/unwrapList.d.ts +5 -0
- package/dist/plugins/List/utils.d.ts +9 -5
- package/dist/plugins/List/withList.d.ts +2 -1
- package/dist/plugins/Marks/Bold.d.ts +7 -5
- package/dist/plugins/Marks/Code.d.ts +7 -5
- package/dist/plugins/Marks/Italic.d.ts +7 -5
- package/dist/plugins/Marks/Underline.d.ts +7 -5
- package/dist/plugins/Marks/components/MarkToolbarButton.d.ts +13 -0
- package/dist/plugins/Marks/helpers.d.ts +4 -0
- package/dist/plugins/Normalizer/types.d.ts +4 -3
- package/dist/plugins/Normalizer/utils.d.ts +2 -2
- package/dist/plugins/Normalizer/withNormalizer.d.ts +2 -2
- package/dist/plugins/PasteHTML/createPasteHTMLPlugin.d.ts +6 -0
- package/dist/plugins/Quote/shouldResetQuote.d.ts +8 -0
- package/dist/plugins/Quote/toggleQuote.d.ts +4 -2
- package/dist/plugins/Quote/withQuote.d.ts +3 -0
- package/dist/plugins/SlashCommands/SlashCommandsPalette.d.ts +5 -0
- package/dist/plugins/SlashCommands/createSlashCommandsPlugin.d.ts +2 -0
- package/dist/plugins/SlashCommands/helpers.d.ts +6 -0
- package/dist/plugins/SlashCommands/index.d.ts +2 -0
- package/dist/plugins/Table/actions/addColumn.d.ts +3 -3
- package/dist/plugins/Table/actions/addRow.d.ts +3 -3
- package/dist/plugins/Table/actions/setHeader.d.ts +2 -2
- package/dist/plugins/Table/createTablePlugin.d.ts +1 -2
- package/dist/plugins/Table/helpers.d.ts +8 -7
- package/dist/plugins/Table/insertTableFragment.d.ts +3 -0
- package/dist/plugins/Table/onKeyDownTable.d.ts +3 -0
- package/dist/plugins/Table/tableTracking.d.ts +4 -0
- package/dist/plugins/Tracking/createTrackingPlugin.d.ts +11 -0
- package/dist/plugins/Tracking/index.d.ts +1 -0
- package/dist/plugins/Tracking/utils.d.ts +2 -0
- package/dist/plugins/TrailingParagraph/index.d.ts +2 -1
- package/dist/plugins/Voids/transformVoid.d.ts +2 -2
- package/dist/plugins/index.d.ts +2 -2
- package/dist/plugins/links-tracking.d.ts +1 -2
- package/dist/plugins/shared/FetchingWrappedAssetCard.d.ts +0 -10
- package/dist/plugins/shared/FetchingWrappedEntryCard.d.ts +1 -1
- package/dist/plugins/shared/useFetchedEntity.d.ts +8 -0
- package/dist/prepareDocument.d.ts +20 -0
- package/dist/test-utils/assertOutput.d.ts +2 -3
- package/dist/test-utils/createEditor.d.ts +5 -6
- package/dist/test-utils/jsx.d.ts +1 -1
- package/dist/test-utils/mockPlugin.d.ts +1 -1
- package/dist/test-utils/setEmptyDataAttribute.d.ts +2 -2
- package/dist/types.d.ts +11 -3
- package/dist/useOnValueChanged.d.ts +8 -0
- package/package.json +23 -23
- package/dist/TrackingProvider.d.ts +0 -11
- package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +0 -9
- package/dist/plugins/Hyperlink/truncate.d.ts +0 -1
- package/dist/plugins/Table/addTableTrackingEvents.d.ts +0 -3
- package/dist/plugins/shared/EntityStatusIcon.d.ts +0 -7
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { PlateEditor } from '@udecode/plate-core';
|
|
2
1
|
import { Node, NodeEntry } from 'slate';
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
2
|
+
import { RichTextEditor, TextOrCustomElement } from '../../types';
|
|
3
|
+
export declare function insertTableAndFocusFirstCell(editor: RichTextEditor): void;
|
|
4
|
+
export declare function isTableActive(editor: RichTextEditor): boolean;
|
|
5
|
+
export declare function isTableHeaderEnabled(editor: RichTextEditor): boolean;
|
|
6
|
+
export declare function replaceEmptyParagraphWithTable(editor: RichTextEditor): void;
|
|
7
7
|
/**
|
|
8
8
|
* Returns the number of cells in a given row vs the table width
|
|
9
9
|
*
|
|
10
10
|
* Note: We should only get different table rows cell counts in between
|
|
11
11
|
* normalization cycles.
|
|
12
12
|
*/
|
|
13
|
-
export declare const getNoOfMissingTableCellsInRow: (editor:
|
|
13
|
+
export declare const getNoOfMissingTableCellsInRow: (editor: RichTextEditor, [, rowPath]: NodeEntry<Node>) => number;
|
|
14
14
|
export declare const createEmptyTableCells: (count: number) => Node[];
|
|
15
|
-
export declare const isNotEmpty: (editor:
|
|
15
|
+
export declare const isNotEmpty: (editor: RichTextEditor, [, path]: NodeEntry<Node>) => boolean;
|
|
16
|
+
export declare const isTable: (node: TextOrCustomElement) => boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RichTextEditor } from '../../types';
|
|
2
|
+
import type { NodeTransformer } from '../Normalizer';
|
|
3
|
+
export declare function addTableTrackingEvents(editor: RichTextEditor): void;
|
|
4
|
+
export declare const withInvalidCellChildrenTracking: (transformer: NodeTransformer) => NodeTransformer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RichTextPlugin } from '../../types';
|
|
2
|
+
export declare type RichTextTrackingActionName = 'edit' | 'insert' | 'remove' | 'mark' | 'unmark' | 'insertTable' | 'insertTableRow' | 'insertTableColumn' | 'removeTable' | 'removeTableRow' | 'removeTableColumn' | 'paste' | 'invalidTablePaste' | 'cancelCreateHyperlinkDialog' | 'cancelEditHyperlinkDialog' | 'linkRendered' | 'openCreateHyperlinkDialog' | 'openEditHyperlinkDialog' | 'unlinkHyperlinks' | 'openCreateEmbedDialog' | 'cancelCreateEmbedDialog';
|
|
3
|
+
export declare type RichTextTrackingActionHandler = (name: RichTextTrackingActionName, data: Record<string, unknown>) => unknown;
|
|
4
|
+
export interface TrackingPluginActions {
|
|
5
|
+
onViewportAction: (actionName: RichTextTrackingActionName, data?: Record<string, unknown>) => ReturnType<RichTextTrackingActionHandler>;
|
|
6
|
+
onShortcutAction: (actionName: RichTextTrackingActionName, data?: Record<string, unknown>) => ReturnType<RichTextTrackingActionHandler>;
|
|
7
|
+
onToolbarAction: (actionName: RichTextTrackingActionName, data?: Record<string, unknown>) => ReturnType<RichTextTrackingActionHandler>;
|
|
8
|
+
onCommandPaletteAction: (actionName: RichTextTrackingActionName, data?: Record<string, unknown>) => ReturnType<RichTextTrackingActionHandler>;
|
|
9
|
+
}
|
|
10
|
+
export declare function getPastingSource(data: DataTransfer): "Google Docs" | "Google Spreadsheets" | "Microsoft Excel" | "Microsoft Word" | "Microsoft Word Online" | "Apple Notes" | "Slack" | "Unknown";
|
|
11
|
+
export declare const createTrackingPlugin: (onAction: RichTextTrackingActionHandler) => RichTextPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './createTrackingPlugin';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { RichTextPlugin } from '../../types';
|
|
2
|
+
export declare const createTrailingParagraphPlugin: () => RichTextPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PlateEditor } from '@udecode/plate-core';
|
|
2
1
|
import { NodeEntry } from 'slate';
|
|
2
|
+
import { RichTextEditor } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Re-creates a void node with valid children.
|
|
5
5
|
*/
|
|
6
|
-
export declare const transformVoid: (editor:
|
|
6
|
+
export declare const transformVoid: (editor: RichTextEditor, [node, path]: NodeEntry<import("slate").Node>) => void;
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
2
2
|
import { PlateProps } from '@udecode/plate-core';
|
|
3
|
-
import { TrackingProvider } from '../TrackingProvider';
|
|
4
3
|
import { RichTextPlugin } from '../types';
|
|
5
|
-
|
|
4
|
+
import { RichTextTrackingActionHandler } from './Tracking';
|
|
5
|
+
export declare const getPlugins: (sdk: FieldExtensionSDK, onAction: RichTextTrackingActionHandler) => RichTextPlugin[];
|
|
6
6
|
export declare const disableCorePlugins: PlateProps['disableCorePlugins'];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { ComponentProps } from 'react';
|
|
2
|
-
import { TrackingProvider } from '../TrackingProvider';
|
|
3
2
|
declare type WithEntityFetchProps = {
|
|
4
3
|
onEntityFetchComplete: VoidFunction;
|
|
5
4
|
} & JSX.IntrinsicAttributes;
|
|
6
|
-
export declare function withLinkTracking(
|
|
5
|
+
export declare function withLinkTracking(Component: React.ComponentType<WithEntityFetchProps>): (props: ComponentProps<typeof Component>) => JSX.Element;
|
|
7
6
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
2
|
-
import { File } from '@contentful/field-editor-shared';
|
|
3
2
|
interface FetchingWrappedAssetCardProps {
|
|
4
3
|
assetId: string;
|
|
5
4
|
isDisabled: boolean;
|
|
@@ -10,14 +9,5 @@ interface FetchingWrappedAssetCardProps {
|
|
|
10
9
|
sdk: FieldExtensionSDK;
|
|
11
10
|
onEntityFetchComplete?: VoidFunction;
|
|
12
11
|
}
|
|
13
|
-
export declare function renderAssetInfo(props: {
|
|
14
|
-
entityFile: File;
|
|
15
|
-
}): ("" | JSX.Element)[];
|
|
16
|
-
export declare function renderActions(props: {
|
|
17
|
-
onEdit?: () => void;
|
|
18
|
-
onRemove?: () => void;
|
|
19
|
-
isDisabled: boolean;
|
|
20
|
-
entityFile?: File;
|
|
21
|
-
}): (JSX.Element | null)[];
|
|
22
12
|
export declare function FetchingWrappedAssetCard(props: FetchingWrappedAssetCardProps): JSX.Element;
|
|
23
13
|
export {};
|
|
@@ -9,5 +9,5 @@ interface FetchingWrappedEntryCardProps {
|
|
|
9
9
|
onEdit?: VoidFunction;
|
|
10
10
|
onRemove?: VoidFunction;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const FetchingWrappedEntryCard: (props: FetchingWrappedEntryCardProps) => JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Document } from '@contentful/rich-text-types';
|
|
2
|
+
import { CreatePlateEditorOptions } from '@udecode/plate-core';
|
|
3
|
+
import { Descendant, Editor, Node } from 'slate';
|
|
4
|
+
import { RichTextEditor } from 'types';
|
|
5
|
+
/**
|
|
6
|
+
* For legacy reasons, a document may not have any content at all
|
|
7
|
+
* e.g:
|
|
8
|
+
*
|
|
9
|
+
* {nodeType: document, data: {}, content: []}
|
|
10
|
+
*
|
|
11
|
+
* Rendering such document will break the Slate editor
|
|
12
|
+
*/
|
|
13
|
+
export declare const hasContent: (doc?: Document | undefined) => boolean;
|
|
14
|
+
export declare const setEditorContent: (editor: Editor, nodes?: Node[] | undefined) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Converts a Contentful rich text document to the corresponding slate editor
|
|
17
|
+
* value
|
|
18
|
+
*/
|
|
19
|
+
export declare const documentToEditorValue: (doc: any) => Descendant[];
|
|
20
|
+
export declare const normalizeEditorValue: (value: Descendant[], options?: Pick<CreatePlateEditorOptions<RichTextEditor>, "plugins" | "disableCorePlugins" | "components" | "overrideByKey" | "normalizeInitialValue"> | undefined) => Descendant[] & any[];
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RichTextEditor } from '../types';
|
|
2
2
|
export declare const assertOutput: (options: {
|
|
3
3
|
input?: any;
|
|
4
4
|
expected: any;
|
|
5
|
-
editor?:
|
|
5
|
+
editor?: RichTextEditor;
|
|
6
6
|
log?: boolean;
|
|
7
|
-
skipCursor?: boolean;
|
|
8
7
|
}) => void;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export declare const normalize: (editor: PlateEditor) => void;
|
|
2
|
+
import { RichTextTrackingActionHandler } from '../plugins/Tracking';
|
|
3
|
+
import { RichTextEditor, RichTextPlugin } from '../types';
|
|
4
|
+
export declare const normalize: (editor: RichTextEditor) => void;
|
|
6
5
|
export declare const createTestEditor: (options: {
|
|
7
6
|
input?: any;
|
|
8
7
|
sdk?: FieldExtensionSDK;
|
|
9
|
-
|
|
8
|
+
trackingHandler?: RichTextTrackingActionHandler;
|
|
10
9
|
plugins?: RichTextPlugin[];
|
|
11
10
|
}) => {
|
|
12
|
-
editor: PlateEditor<
|
|
11
|
+
editor: import("@udecode/plate-core").PlateEditor<RichTextEditor>;
|
|
13
12
|
normalize: () => void;
|
|
14
13
|
};
|
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 "element" | "editor" | "text" | "focus" | "anchor" | "cursor" | "fragment" | "selection">(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>) =>
|
|
2
|
+
export declare const mockPlugin: (p: Partial<RichTextPlugin>) => any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RichTextEditor } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Sets empty node.data attributes. Helpful when testing against
|
|
4
4
|
* output generated by a 3rd-party library e.g. Plate.
|
|
5
5
|
*/
|
|
6
|
-
export declare const setEmptyDataAttribute: (root:
|
|
6
|
+
export declare const setEmptyDataAttribute: (root: RichTextEditor) => void;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { MARKS } from '@contentful/rich-text-types';
|
|
2
|
-
import { PlatePlugin } from '@udecode/plate-core';
|
|
2
|
+
import { PlateEditor, PlatePlugin } from '@udecode/plate-core';
|
|
3
3
|
import { RenderElementProps } from 'slate-react';
|
|
4
|
-
import type { SoftBreakRule, ExitBreakRule } from './plugins/Break';
|
|
4
|
+
import type { SoftBreakRule, ExitBreakRule, ResetNodePluginRule } from './plugins/Break';
|
|
5
5
|
import type { NormalizerRule } from './plugins/Normalizer';
|
|
6
|
+
import { TrackingPluginActions } from './plugins/Tracking';
|
|
6
7
|
export declare type CustomText = {
|
|
7
8
|
text: string;
|
|
8
9
|
[MARKS.BOLD]?: boolean;
|
|
@@ -26,7 +27,7 @@ declare module 'slate' {
|
|
|
26
27
|
Text: CustomText;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
export interface RichTextPlugin extends PlatePlugin {
|
|
30
|
+
export interface RichTextPlugin extends PlatePlugin<RichTextEditor> {
|
|
30
31
|
/**
|
|
31
32
|
* @see createSoftBreakPlugin
|
|
32
33
|
*/
|
|
@@ -35,8 +36,15 @@ export interface RichTextPlugin extends PlatePlugin {
|
|
|
35
36
|
* @see createExitBreakPlugin
|
|
36
37
|
*/
|
|
37
38
|
exitBreak?: ExitBreakRule[];
|
|
39
|
+
/**
|
|
40
|
+
* @see createResetNodePlugin
|
|
41
|
+
*/
|
|
42
|
+
resetNode?: ResetNodePluginRule[];
|
|
38
43
|
/**
|
|
39
44
|
* @see createNormalizerPlugin
|
|
40
45
|
*/
|
|
41
46
|
normalizer?: NormalizerRule[];
|
|
42
47
|
}
|
|
48
|
+
export interface RichTextEditor extends PlateEditor {
|
|
49
|
+
tracking: TrackingPluginActions;
|
|
50
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Document } from '@contentful/rich-text-types';
|
|
2
|
+
export declare type OnValueChangedProps = {
|
|
3
|
+
editorId: string;
|
|
4
|
+
handler?: (value: Document) => unknown;
|
|
5
|
+
skip?: boolean;
|
|
6
|
+
onSkip?: VoidFunction;
|
|
7
|
+
};
|
|
8
|
+
export declare const useOnValueChanged: ({ editorId, handler, skip, onSkip }: OnValueChangedProps) => (value: unknown) => void;
|
package/package.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"publishConfig": {
|
|
5
|
-
"tag": "next"
|
|
6
|
-
},
|
|
3
|
+
"version": "2.0.1",
|
|
7
4
|
"source": "./src/index.tsx",
|
|
8
5
|
"main": "./dist/index.js",
|
|
9
6
|
"module": "dist/field-editor-rich-text.esm.js",
|
|
@@ -27,30 +24,32 @@
|
|
|
27
24
|
"prepublishOnly": "yarn build"
|
|
28
25
|
},
|
|
29
26
|
"dependencies": {
|
|
30
|
-
"@contentful/
|
|
31
|
-
"@contentful/
|
|
32
|
-
"@contentful/f36-
|
|
33
|
-
"@contentful/f36-
|
|
34
|
-
"@contentful/
|
|
27
|
+
"@contentful/app-sdk": "^4.6.0",
|
|
28
|
+
"@contentful/contentful-slatejs-adapter": "^15.13.1",
|
|
29
|
+
"@contentful/f36-components": "^4.0.33",
|
|
30
|
+
"@contentful/f36-icons": "^4.1.1",
|
|
31
|
+
"@contentful/f36-tokens": "^4.0.0",
|
|
32
|
+
"@contentful/field-editor-reference": "^4.3.9",
|
|
35
33
|
"@contentful/field-editor-shared": "^1.0.3",
|
|
36
|
-
"@contentful/rich-text-plain-text-renderer": "^15.
|
|
37
|
-
"@contentful/rich-text-types": "^15.
|
|
38
|
-
"@udecode/plate-basic-marks": "^
|
|
39
|
-
"@udecode/plate-break": "^
|
|
40
|
-
"@udecode/plate-core": "^
|
|
41
|
-
"@udecode/plate-list": "^
|
|
42
|
-
"@udecode/plate-paragraph": "^
|
|
43
|
-
"@udecode/plate-
|
|
44
|
-
"@udecode/plate-
|
|
45
|
-
"@udecode/plate-
|
|
46
|
-
"@udecode/plate-
|
|
34
|
+
"@contentful/rich-text-plain-text-renderer": "^15.12.1",
|
|
35
|
+
"@contentful/rich-text-types": "^15.12.1",
|
|
36
|
+
"@udecode/plate-basic-marks": "^10.4.0",
|
|
37
|
+
"@udecode/plate-break": "^10.4.0",
|
|
38
|
+
"@udecode/plate-core": "^10.4.0",
|
|
39
|
+
"@udecode/plate-list": "^10.4.0",
|
|
40
|
+
"@udecode/plate-paragraph": "^10.4.0",
|
|
41
|
+
"@udecode/plate-reset-node": "^10.4.0",
|
|
42
|
+
"@udecode/plate-select": "^10.4.0",
|
|
43
|
+
"@udecode/plate-serializer-docx": "^10.4.0",
|
|
44
|
+
"@udecode/plate-table": "^10.4.0",
|
|
45
|
+
"@udecode/plate-trailing-block": "^10.4.0",
|
|
47
46
|
"fast-deep-equal": "^3.1.3",
|
|
48
47
|
"is-hotkey": "^0.2.0",
|
|
49
48
|
"is-plain-obj": "^3.0.0",
|
|
50
|
-
"slate": "^0.
|
|
49
|
+
"slate": "^0.80.0",
|
|
51
50
|
"slate-history": "^0.66.0",
|
|
52
51
|
"slate-hyperscript": "^0.67.0",
|
|
53
|
-
"slate-react": "^0.
|
|
52
|
+
"slate-react": "^0.80.0"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|
|
56
55
|
"react": ">=16.14.0",
|
|
@@ -70,5 +69,6 @@
|
|
|
70
69
|
"@types/is-hotkey": "^0.1.6",
|
|
71
70
|
"@udecode/plate-test-utils": "^3.2.0",
|
|
72
71
|
"react": ">=16.14.0"
|
|
73
|
-
}
|
|
72
|
+
},
|
|
73
|
+
"gitHead": "6a5af47ae1e39639805ec56251dc20ed376d5983"
|
|
74
74
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare type RichTextTrackingActionName = 'insertTable' | 'insertTableRow' | 'insertTableColumn' | 'removeTable' | 'removeTableRow' | 'removeTableColumn' | 'paste' | 'linkRendered';
|
|
3
|
-
export declare type RichTextTrackingActionHandler = (name: RichTextTrackingActionName, data: Record<string, unknown>) => unknown;
|
|
4
|
-
interface TrackingProviderProps {
|
|
5
|
-
onAction: RichTextTrackingActionHandler;
|
|
6
|
-
}
|
|
7
|
-
export interface TrackingProvider {
|
|
8
|
-
onViewportAction: (actionName: RichTextTrackingActionName, data?: Record<string, unknown>) => ReturnType<TrackingProviderProps['onAction']>;
|
|
9
|
-
}
|
|
10
|
-
export declare const TrackingProvider: React.FC<TrackingProviderProps>, useTrackingContext: any;
|
|
11
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ContentEntityType as EntityType } from '@contentful/field-editor-reference/dist/types';
|
|
2
|
-
import { FieldExtensionSDK } from '@contentful/field-editor-shared';
|
|
3
|
-
interface EntryAssetTooltipProps {
|
|
4
|
-
id: string;
|
|
5
|
-
type: EntityType;
|
|
6
|
-
sdk: FieldExtensionSDK;
|
|
7
|
-
}
|
|
8
|
-
export declare function EntryAssetTooltip({ id, type, sdk }: EntryAssetTooltipProps): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function truncate(str: string, length: number): string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Entry, Asset } from '@contentful/field-editor-shared';
|
|
2
|
-
interface EntityStatusIconProps {
|
|
3
|
-
entity: Entry | Asset;
|
|
4
|
-
entityType: 'Entry' | 'Asset';
|
|
5
|
-
}
|
|
6
|
-
export declare function EntityStatusIcon({ entity, entityType }: EntityStatusIconProps): JSX.Element;
|
|
7
|
-
export {};
|