@contentful/field-editor-rich-text 2.0.0-next.5 → 2.0.0-next.6

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.
@@ -7,6 +7,8 @@ declare type LinkedEntityBlockProps = CustomRenderElementProps<{
7
7
  type: 'Link';
8
8
  };
9
9
  };
10
- }>;
10
+ }> & {
11
+ onEntityFetchComplete: VoidFunction;
12
+ };
11
13
  export declare function LinkedEntityBlock(props: LinkedEntityBlockProps): JSX.Element;
12
14
  export {};
@@ -1,5 +1,6 @@
1
1
  import { FieldExtensionSDK } from '@contentful/app-sdk';
2
+ import { TrackingProvider } from 'TrackingProvider';
2
3
  import { RichTextPlugin } from '../../types';
3
4
  export { EmbeddedEntityBlockToolbarIcon as ToolbarIcon } from './ToolbarIcon';
4
- export declare const createEmbeddedEntryBlockPlugin: (sdk: FieldExtensionSDK) => RichTextPlugin;
5
- export declare const createEmbeddedAssetBlockPlugin: (sdk: FieldExtensionSDK) => RichTextPlugin;
5
+ export declare const createEmbeddedEntryBlockPlugin: (sdk: FieldExtensionSDK, tracking: TrackingProvider) => RichTextPlugin;
6
+ export declare const createEmbeddedAssetBlockPlugin: (sdk: FieldExtensionSDK, tracking: TrackingProvider) => RichTextPlugin;
@@ -7,6 +7,7 @@ interface FetchingWrappedInlineEntryCardProps {
7
7
  isDisabled: boolean;
8
8
  onEdit: (event: React.MouseEvent<Element, MouseEvent>) => void;
9
9
  onRemove: (event: React.MouseEvent<Element, MouseEvent>) => void;
10
+ onEntityFetchComplete?: VoidFunction;
10
11
  }
11
12
  export declare function FetchingWrappedInlineEntryCard(props: FetchingWrappedInlineEntryCardProps): JSX.Element;
12
13
  export {};
@@ -1,3 +1,5 @@
1
+ import { FieldExtensionSDK } from '@contentful/app-sdk';
2
+ import { TrackingProvider } from 'TrackingProvider';
1
3
  import { RichTextPlugin } from '../../types';
2
4
  interface ToolbarEmbeddedEntityInlineButtonProps {
3
5
  onClose: () => void;
@@ -5,5 +7,5 @@ interface ToolbarEmbeddedEntityInlineButtonProps {
5
7
  isButton?: boolean;
6
8
  }
7
9
  export declare function ToolbarEmbeddedEntityInlineButton(props: ToolbarEmbeddedEntityInlineButtonProps): JSX.Element;
8
- export declare function createEmbeddedEntityInlinePlugin(sdk: any): RichTextPlugin;
10
+ export declare function createEmbeddedEntityInlinePlugin(sdk: FieldExtensionSDK, tracking: TrackingProvider): RichTextPlugin;
9
11
  export {};
@@ -1,8 +1,9 @@
1
1
  import { FieldExtensionSDK } from '@contentful/app-sdk';
2
+ import { TrackingProvider } from 'TrackingProvider';
2
3
  import { RichTextPlugin } from '../../types';
3
4
  interface ToolbarHyperlinkButtonProps {
4
5
  isDisabled: boolean | undefined;
5
6
  }
6
7
  export declare function ToolbarHyperlinkButton(props: ToolbarHyperlinkButtonProps): JSX.Element | null;
7
- export declare const createHyperlinkPlugin: (sdk: FieldExtensionSDK) => RichTextPlugin;
8
+ export declare const createHyperlinkPlugin: (sdk: FieldExtensionSDK, tracking: TrackingProvider) => RichTextPlugin;
8
9
  export {};
@@ -0,0 +1,2 @@
1
+ import { PlateEditor } from '@udecode/plate-core';
2
+ export declare const insertListBreak: (editor: PlateEditor) => () => void;
@@ -0,0 +1,2 @@
1
+ import { PlateEditor, TDescendant } from '@udecode/plate-core';
2
+ export declare const insertListFragment: (editor: PlateEditor) => (fragment: TDescendant[]) => void;
@@ -0,0 +1,5 @@
1
+ import { PlateEditor } from '@udecode/plate-core';
2
+ /**
3
+ * Insert list item if selection is in li>p.
4
+ */
5
+ export declare const insertListItem: (editor: PlateEditor) => boolean;
@@ -0,0 +1,2 @@
1
+ import { RichTextPlugin } from '../../types';
2
+ export declare function createTextPlugin(): RichTextPlugin;
@@ -1,2 +1 @@
1
- import { RichTextPlugin } from '../../types';
2
- export declare function createTextPlugin(): RichTextPlugin;
1
+ export * from './createTextPlugin';
@@ -0,0 +1,7 @@
1
+ import React, { ComponentProps } from 'react';
2
+ import { TrackingProvider } from '../TrackingProvider';
3
+ declare type WithEntityFetchProps = {
4
+ onEntityFetchComplete: VoidFunction;
5
+ } & JSX.IntrinsicAttributes;
6
+ export declare function withLinkTracking(tracking: TrackingProvider, Component: React.ComponentType<WithEntityFetchProps>): (props: ComponentProps<typeof Component>) => JSX.Element;
7
+ export {};
@@ -8,6 +8,7 @@ interface FetchingWrappedAssetCardProps {
8
8
  onEdit?: () => void;
9
9
  onRemove?: () => unknown;
10
10
  sdk: FieldExtensionSDK;
11
+ onEntityFetchComplete?: VoidFunction;
11
12
  }
12
13
  export declare function renderAssetInfo(props: {
13
14
  entityFile: File;
@@ -5,8 +5,9 @@ interface FetchingWrappedEntryCardProps {
5
5
  isSelected: boolean;
6
6
  locale: string;
7
7
  sdk: FieldExtensionSDK;
8
- onEdit?: () => void;
9
- onRemove?: () => void;
8
+ onEntityFetchComplete?: VoidFunction;
9
+ onEdit?: VoidFunction;
10
+ onRemove?: VoidFunction;
10
11
  }
11
12
  export declare function FetchingWrappedEntryCard(props: FetchingWrappedEntryCardProps): JSX.Element;
12
13
  export {};
@@ -4,4 +4,5 @@ export declare const assertOutput: (options: {
4
4
  expected: any;
5
5
  editor?: PlateEditor;
6
6
  log?: boolean;
7
+ skipCursor?: boolean;
7
8
  }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "2.0.0-next.5",
3
+ "version": "2.0.0-next.6",
4
4
  "publishConfig": {
5
5
  "tag": "next"
6
6
  },
@@ -35,22 +35,22 @@
35
35
  "@contentful/field-editor-shared": "^1.0.3",
36
36
  "@contentful/rich-text-plain-text-renderer": "^15.11.1",
37
37
  "@contentful/rich-text-types": "^15.11.1",
38
- "@udecode/plate-basic-marks": "^9.0.0",
39
- "@udecode/plate-break": "^9.0.0",
40
- "@udecode/plate-core": "^9.0.0",
41
- "@udecode/plate-list": "^9.0.0",
42
- "@udecode/plate-paragraph": "^9.0.0",
43
- "@udecode/plate-select": "^9.0.0",
44
- "@udecode/plate-serializer-docx": "^9.1.3",
45
- "@udecode/plate-table": "^9.1.1",
46
- "@udecode/plate-trailing-block": "^9.0.0",
38
+ "@udecode/plate-basic-marks": "^9.2.1",
39
+ "@udecode/plate-break": "^9.2.1",
40
+ "@udecode/plate-core": "^9.2.1",
41
+ "@udecode/plate-list": "^9.2.1",
42
+ "@udecode/plate-paragraph": "^9.2.1",
43
+ "@udecode/plate-select": "^9.2.1",
44
+ "@udecode/plate-serializer-docx": "^9.2.1",
45
+ "@udecode/plate-table": "^9.2.1",
46
+ "@udecode/plate-trailing-block": "^9.2.1",
47
47
  "fast-deep-equal": "^3.1.3",
48
48
  "is-hotkey": "^0.2.0",
49
49
  "is-plain-obj": "^3.0.0",
50
50
  "slate": "^0.72.3",
51
51
  "slate-history": "^0.66.0",
52
52
  "slate-hyperscript": "^0.67.0",
53
- "slate-react": "^0.72.1"
53
+ "slate-react": "^0.72.6"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "react": ">=16.14.0",
@@ -1,6 +0,0 @@
1
- /**
2
- * A copy of Plate's list plugin with a few adjustments
3
- * to support pasting any element
4
- */
5
- import { PlateEditor, TDescendant } from '@udecode/plate-core';
6
- export declare const getListInsertFragment: (editor: PlateEditor) => (fragment: TDescendant[]) => void;