@contentful/field-editor-rich-text 2.1.2 → 2.2.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.
@@ -1,6 +1,7 @@
1
- import { PlateEditor } from '@udecode/plate-core';
1
+ import { RichTextEditor } from '../../../types';
2
2
  export interface CommandListProps {
3
3
  query: string;
4
- editor: PlateEditor;
4
+ editor: RichTextEditor;
5
+ textContainer?: HTMLSpanElement;
5
6
  }
6
- export declare const CommandList: ({ query, editor }: CommandListProps) => JSX.Element | null;
7
+ export declare const CommandList: ({ query, editor, textContainer }: CommandListProps) => JSX.Element | null;
@@ -1,3 +1,4 @@
1
1
  export declare const useCommandList: (commandItems: any, container: any) => {
2
2
  selectedItem: string;
3
+ isOpen: boolean;
3
4
  };
@@ -1,5 +1,5 @@
1
1
  import { FieldExtensionSDK } from '@contentful/app-sdk';
2
- import { PlateEditor } from '@udecode/plate-core';
2
+ import { RichTextEditor } from 'types';
3
3
  export interface Command {
4
4
  id: string;
5
5
  thumbnail?: string;
@@ -11,4 +11,4 @@ export interface CommandGroup {
11
11
  commands: Command[];
12
12
  }
13
13
  export declare type CommandList = (Command | CommandGroup)[];
14
- export declare const useCommands: (sdk: FieldExtensionSDK, query: string, editor: PlateEditor) => CommandList;
14
+ export declare const useCommands: (sdk: FieldExtensionSDK, query: string, editor: RichTextEditor) => CommandList;
@@ -1,5 +1,5 @@
1
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';
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' | 'openRichTextCommandPalette' | 'cancelRichTextCommandPalette';
3
3
  export declare type RichTextTrackingActionHandler = (name: RichTextTrackingActionName, data: Record<string, unknown>) => unknown;
4
4
  export interface TrackingPluginActions {
5
5
  onViewportAction: (actionName: RichTextTrackingActionName, data?: Record<string, unknown>) => ReturnType<RichTextTrackingActionHandler>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "2.1.2",
3
+ "version": "2.2.1",
4
4
  "source": "./src/index.tsx",
5
5
  "main": "./dist/index.js",
6
6
  "module": "dist/field-editor-rich-text.esm.js",
@@ -33,6 +33,7 @@
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",
36
+ "@popperjs/core": "^2.11.5",
36
37
  "@udecode/plate-basic-marks": "^10.4.0",
37
38
  "@udecode/plate-break": "^10.4.0",
38
39
  "@udecode/plate-core": "^10.4.0",
@@ -46,6 +47,7 @@
46
47
  "fast-deep-equal": "^3.1.3",
47
48
  "is-hotkey": "^0.2.0",
48
49
  "is-plain-obj": "^3.0.0",
50
+ "react-popper": "^2.3.0",
49
51
  "slate": "^0.80.0",
50
52
  "slate-history": "^0.66.0",
51
53
  "slate-hyperscript": "^0.67.0",
@@ -70,5 +72,5 @@
70
72
  "@udecode/plate-test-utils": "^3.2.0",
71
73
  "react": ">=16.14.0"
72
74
  },
73
- "gitHead": "3a8e906e1176c6a78ab9a7dff53138aa67f42e37"
75
+ "gitHead": "a767eac4541daa83c1ebdc77cf8770873cbcf2c3"
74
76
  }