@contentful/field-editor-rich-text 2.0.0-next.2 → 2.0.0-next.22

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.
Files changed (152) hide show
  1. package/README.md +4 -0
  2. package/dist/ContentfulEditorProvider.d.ts +6 -5
  3. package/dist/RichTextEditor.d.ts +2 -3
  4. package/dist/Toolbar/{EmbedEntityWidget.d.ts → components/EmbedEntityWidget.d.ts} +0 -1
  5. package/dist/{plugins/EmbeddedEntity/index.d.ts → Toolbar/components/EmbeddedEntityDropdownButton.d.ts} +1 -2
  6. package/dist/Toolbar/{StickyToolbarWrapper.d.ts → components/StickyToolbarWrapper.d.ts} +0 -0
  7. package/dist/Toolbar/index.d.ts +0 -1
  8. package/dist/dialogs/renderRichTextDialog.d.ts +0 -1
  9. package/dist/field-editor-rich-text.cjs.development.js +5720 -4525
  10. package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
  11. package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
  12. package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
  13. package/dist/field-editor-rich-text.esm.js +5592 -4397
  14. package/dist/field-editor-rich-text.esm.js.map +1 -1
  15. package/dist/helpers/editor.d.ts +22 -27
  16. package/dist/helpers/environment.d.ts +1 -0
  17. package/dist/helpers/extractNodes.d.ts +6 -0
  18. package/dist/helpers/transformers.d.ts +8 -0
  19. package/dist/helpers/validations.d.ts +1 -1
  20. package/dist/plugins/Break/createExitBreakPlugin.d.ts +2 -0
  21. package/dist/plugins/Break/createResetNodePlugin.d.ts +2 -0
  22. package/dist/plugins/Break/createSoftBreakPlugin.d.ts +2 -0
  23. package/dist/plugins/Break/index.d.ts +5 -0
  24. package/dist/plugins/DragAndDrop/index.d.ts +2 -2
  25. package/dist/plugins/EmbeddedEntityBlock/LinkedEntityBlock.d.ts +3 -2
  26. package/dist/plugins/EmbeddedEntityBlock/ToolbarIcon.d.ts +1 -3
  27. package/dist/plugins/EmbeddedEntityBlock/Util.d.ts +2 -1
  28. package/dist/plugins/EmbeddedEntityBlock/index.d.ts +3 -9
  29. package/dist/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.d.ts +1 -0
  30. package/dist/plugins/EmbeddedEntityInline/index.d.ts +3 -5
  31. package/dist/plugins/Heading/components/Heading.d.ts +11 -0
  32. package/dist/plugins/Heading/components/ToolbarHeadingButton.d.ts +4 -0
  33. package/dist/plugins/Heading/createHeadingPlugin.d.ts +2 -0
  34. package/dist/plugins/Heading/index.d.ts +2 -20
  35. package/dist/plugins/Hr/index.d.ts +3 -5
  36. package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +4 -6
  37. package/dist/plugins/Hyperlink/components/EntityHyperlink.d.ts +9 -0
  38. package/dist/plugins/Hyperlink/components/ToolbarHyperlinkButton.d.ts +5 -0
  39. package/dist/plugins/Hyperlink/components/UrlHyperlink.d.ts +9 -0
  40. package/dist/plugins/Hyperlink/components/styles.d.ts +4 -0
  41. package/dist/plugins/Hyperlink/createHyperlinkPlugin.d.ts +3 -0
  42. package/dist/plugins/Hyperlink/index.d.ts +2 -12
  43. package/dist/plugins/Hyperlink/useEntityInfo.d.ts +16 -0
  44. package/dist/plugins/Hyperlink/utils.d.ts +5 -0
  45. package/dist/plugins/List/components/List.d.ts +3 -0
  46. package/dist/plugins/List/components/ListItem.d.ts +2 -0
  47. package/dist/plugins/List/components/ToolbarListButton.d.ts +4 -0
  48. package/dist/plugins/List/createListPlugin.d.ts +2 -0
  49. package/dist/plugins/List/index.d.ts +2 -15
  50. package/dist/plugins/List/insertListBreak.d.ts +2 -0
  51. package/dist/plugins/List/insertListFragment.d.ts +3 -0
  52. package/dist/plugins/List/onKeyDownList.d.ts +7 -0
  53. package/dist/plugins/List/transforms/deleteBackwardList.d.ts +2 -0
  54. package/dist/plugins/List/transforms/insertListItem.d.ts +5 -0
  55. package/dist/plugins/List/transforms/moveListItemDown.d.ts +11 -0
  56. package/dist/plugins/List/transforms/moveListItems.d.ts +10 -0
  57. package/dist/plugins/List/transforms/toggleList.d.ts +4 -0
  58. package/dist/plugins/List/transforms/unwrapList.d.ts +5 -0
  59. package/dist/plugins/List/utils.d.ts +15 -0
  60. package/dist/plugins/List/withList.d.ts +4 -0
  61. package/dist/plugins/Marks/Bold.d.ts +11 -0
  62. package/dist/plugins/Marks/Code.d.ts +11 -0
  63. package/dist/plugins/Marks/Italic.d.ts +11 -0
  64. package/dist/plugins/Marks/Underline.d.ts +11 -0
  65. package/dist/plugins/Marks/components/MarkToolbarButton.d.ts +13 -0
  66. package/dist/plugins/Marks/helpers.d.ts +4 -0
  67. package/dist/plugins/Marks/index.d.ts +2 -0
  68. package/dist/plugins/Normalizer/baseRules.d.ts +2 -0
  69. package/dist/plugins/Normalizer/createNormalizerPlugin.d.ts +2 -0
  70. package/dist/plugins/Normalizer/index.d.ts +2 -0
  71. package/dist/plugins/Normalizer/types.d.ts +40 -0
  72. package/dist/plugins/Normalizer/utils.d.ts +8 -0
  73. package/dist/plugins/Normalizer/withNormalizer.d.ts +2 -0
  74. package/dist/plugins/Paragraph/Paragraph.d.ts +2 -0
  75. package/dist/plugins/Paragraph/createParagraphPlugin.d.ts +2 -0
  76. package/dist/plugins/Paragraph/index.d.ts +1 -7
  77. package/dist/plugins/Paragraph/utils.d.ts +2 -0
  78. package/dist/plugins/PasteHTML/createPasteHTMLPlugin.d.ts +8 -0
  79. package/dist/plugins/PasteHTML/index.d.ts +1 -0
  80. package/dist/plugins/PasteHTML/utils/sanitizeHTML.d.ts +1 -0
  81. package/dist/plugins/PasteHTML/utils/sanitizeSheets.d.ts +4 -0
  82. package/dist/plugins/Quote/components/Quote.d.ts +2 -0
  83. package/dist/plugins/Quote/components/ToolbarQuoteButton.d.ts +4 -0
  84. package/dist/plugins/Quote/createQuotePlugin.d.ts +2 -0
  85. package/dist/plugins/Quote/index.d.ts +2 -13
  86. package/dist/plugins/Quote/shouldResetQuote.d.ts +8 -0
  87. package/dist/plugins/Quote/toggleQuote.d.ts +5 -0
  88. package/dist/plugins/Quote/withQuote.d.ts +3 -0
  89. package/dist/plugins/SelectOnBackspace/createSelectOnBackspacePlugin.d.ts +2 -0
  90. package/dist/plugins/SelectOnBackspace/index.d.ts +1 -0
  91. package/dist/plugins/Table/actions/addColumn.d.ts +4 -3
  92. package/dist/plugins/Table/actions/addRow.d.ts +3 -3
  93. package/dist/plugins/Table/actions/setHeader.d.ts +2 -2
  94. package/dist/plugins/Table/addTableTrackingEvents.d.ts +2 -0
  95. package/dist/plugins/Table/components/Cell.d.ts +2 -0
  96. package/dist/plugins/Table/components/HeaderCell.d.ts +2 -0
  97. package/dist/plugins/Table/components/Row.d.ts +2 -0
  98. package/dist/plugins/Table/components/Table.d.ts +2 -0
  99. package/dist/plugins/Table/components/TableActions.d.ts +4 -0
  100. package/dist/plugins/Table/components/ToolbarButton.d.ts +4 -0
  101. package/dist/plugins/Table/createTablePlugin.d.ts +2 -0
  102. package/dist/plugins/Table/helpers.d.ts +15 -5
  103. package/dist/plugins/Table/index.d.ts +2 -189
  104. package/dist/plugins/Text/createTextPlugin.d.ts +2 -0
  105. package/dist/plugins/Text/index.d.ts +1 -2
  106. package/dist/plugins/Tracking/createTrackingPlugin.d.ts +10 -0
  107. package/dist/plugins/Tracking/index.d.ts +1 -0
  108. package/dist/plugins/Tracking/utils.d.ts +2 -0
  109. package/dist/plugins/TrailingParagraph/index.d.ts +2 -1
  110. package/dist/plugins/Voids/createVoidsPlugin.d.ts +2 -0
  111. package/dist/plugins/Voids/index.d.ts +1 -0
  112. package/dist/plugins/Voids/transformVoid.d.ts +6 -0
  113. package/dist/plugins/index.d.ts +5 -179
  114. package/dist/plugins/links-tracking.d.ts +6 -0
  115. package/dist/plugins/shared/EntityStatusIcon.d.ts +0 -1
  116. package/dist/plugins/shared/FetchingWrappedAssetCard.d.ts +1 -1
  117. package/dist/plugins/shared/FetchingWrappedEntryCard.d.ts +3 -3
  118. package/dist/plugins/shared/ToolbarButton.d.ts +0 -1
  119. package/dist/prepareDocument.d.ts +20 -0
  120. package/dist/test-utils/assertOutput.d.ts +7 -0
  121. package/dist/test-utils/createEditor.d.ts +10 -4
  122. package/dist/test-utils/index.d.ts +2 -0
  123. package/dist/test-utils/jsx.d.ts +2 -2
  124. package/dist/test-utils/mockPlugin.d.ts +2 -0
  125. package/dist/test-utils/randomId.d.ts +4 -0
  126. package/dist/test-utils/setEmptyDataAttribute.d.ts +6 -0
  127. package/dist/test-utils/validation.d.ts +1 -0
  128. package/dist/types.d.ts +34 -9
  129. package/dist/useOnValueChanged.d.ts +8 -0
  130. package/package.json +28 -17
  131. package/dist/TrackingProvider.d.ts +0 -11
  132. package/dist/helpers/deserializer.d.ts +0 -3
  133. package/dist/helpers/normalizers.d.ts +0 -15
  134. package/dist/helpers/sanitizeSlateDoc.d.ts +0 -18
  135. package/dist/helpers/truncate.d.ts +0 -1
  136. package/dist/plugins/Bold/index.d.ts +0 -12
  137. package/dist/plugins/Code/index.d.ts +0 -12
  138. package/dist/plugins/CommandPalette/CommandPanel/InViewport/InViewport.d.ts +0 -37
  139. package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +0 -10
  140. package/dist/plugins/InsertBeforeFirstVoidBlock/index.d.ts +0 -2
  141. package/dist/plugins/Italic/index.d.ts +0 -12
  142. package/dist/plugins/List/getListInsertFragment.d.ts +0 -6
  143. package/dist/plugins/NewLine/index.d.ts +0 -2
  144. package/dist/plugins/Paste/index.d.ts +0 -2
  145. package/dist/plugins/Paste/sanitizers/helpers.d.ts +0 -7
  146. package/dist/plugins/Paste/sanitizers/index.d.ts +0 -3
  147. package/dist/plugins/Paste/sanitizers/removeComments.d.ts +0 -2
  148. package/dist/plugins/Paste/sanitizers/sanitizeEntityBlocks.d.ts +0 -6
  149. package/dist/plugins/Paste/sanitizers/sanitizeTables.d.ts +0 -2
  150. package/dist/plugins/Table/TableActions.d.ts +0 -5
  151. package/dist/plugins/Table/normalizers.d.ts +0 -2
  152. package/dist/plugins/Underline/index.d.ts +0 -12
@@ -1,37 +0,0 @@
1
- export class InViewport extends React.Component<any, any, any> {
2
- static defaultProps: {
3
- testId: string;
4
- offset: number;
5
- };
6
- constructor(props: any);
7
- constructor(props: any, context: any);
8
- tGetDomPosition: any;
9
- nodeRef: any;
10
- lastOverflowAt: any;
11
- tOnOverflowTop: (...args: any[]) => any;
12
- tOnOverflowBottom: (...args: any[]) => any;
13
- tOnOverflowRight: (...args: any[]) => any;
14
- tOnOverflowLeft: (...args: any[]) => any;
15
- getDomPosition: () => void;
16
- bindEventListeners: () => void;
17
- handleOverflow: ({ top, left, bottom, right }: {
18
- top: any;
19
- left: any;
20
- bottom: any;
21
- right: any;
22
- }, windowWidth: any, windowHeight: any) => void;
23
- }
24
- export namespace InViewport {
25
- export namespace propTypes {
26
- export const offset: PropTypes.Requireable<number>;
27
- export const onOverflowTop: PropTypes.Requireable<(...args: any[]) => any>;
28
- export const onOverflowRight: PropTypes.Requireable<(...args: any[]) => any>;
29
- export const onOverflowBottom: PropTypes.Requireable<(...args: any[]) => any>;
30
- export const onOverflowLeft: PropTypes.Requireable<(...args: any[]) => any>;
31
- export const className: PropTypes.Requireable<string>;
32
- export const children: PropTypes.Requireable<any>;
33
- export const testId: PropTypes.Requireable<string>;
34
- }
35
- }
36
- import React from "react";
37
- import PropTypes from "prop-types";
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { ContentEntityType as EntityType } from '@contentful/field-editor-reference/dist/types';
3
- import { FieldExtensionSDK } from '@contentful/field-editor-shared';
4
- interface EntryAssetTooltipProps {
5
- id: string;
6
- type: EntityType;
7
- sdk: FieldExtensionSDK;
8
- }
9
- export declare function EntryAssetTooltip({ id, type, sdk }: EntryAssetTooltipProps): JSX.Element;
10
- export {};
@@ -1,2 +0,0 @@
1
- import { PlatePlugin } from '@udecode/plate';
2
- export declare function createInsertBeforeFirstVoidBlockPlugin(): PlatePlugin;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import * as Slate from 'slate-react';
3
- import { PlatePlugin } from '@udecode/plate';
4
- import { CustomSlatePluginOptions } from '../../types';
5
- interface ToolbarItalicButtonProps {
6
- isDisabled?: boolean;
7
- }
8
- export declare function ToolbarItalicButton(props: ToolbarItalicButtonProps): JSX.Element | null;
9
- export declare function Italic(props: Slate.RenderLeafProps): JSX.Element;
10
- export declare function createItalicPlugin(): PlatePlugin;
11
- export declare const withItalicOptions: CustomSlatePluginOptions;
12
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * A copy of Plate's list plugin with a few adjustments
3
- * to fix pasting text inside lists.
4
- */
5
- import { PlateEditor, TDescendant } from '@udecode/plate';
6
- export declare const getListInsertFragment: (editor: PlateEditor) => (fragment: TDescendant[]) => void;
@@ -1,2 +0,0 @@
1
- import { PlatePlugin } from '@udecode/plate';
2
- export declare function createNewLinePlugin(): PlatePlugin;
@@ -1,2 +0,0 @@
1
- import { PlatePlugin } from '@udecode/plate';
2
- export declare const createPastePlugin: () => PlatePlugin;
@@ -1,7 +0,0 @@
1
- import { PlateEditor } from '@udecode/plate';
2
- export declare type SanitizerTuple = [Document, PlateEditor];
3
- declare type Predicate = (node: ChildNode) => boolean;
4
- export declare const isHTMLElement: (node: ChildNode) => node is HTMLElement;
5
- export declare const removeChildNodes: (node: ChildNode, predicate?: Predicate) => void;
6
- export declare const removeChildNodesUsingPredicate: (predicate: Predicate) => (nodeList: NodeList) => Node[];
7
- export {};
@@ -1,3 +0,0 @@
1
- export { removeComments } from './removeComments';
2
- export { sanitizeTables } from './sanitizeTables';
3
- export { sanitizeEntityBlocks } from './sanitizeEntityBlocks';
@@ -1,2 +0,0 @@
1
- import { SanitizerTuple } from './helpers';
2
- export declare const removeComments: ([doc, editor]: SanitizerTuple) => SanitizerTuple;
@@ -1,6 +0,0 @@
1
- import { SanitizerTuple } from './helpers';
2
- /**
3
- * Ensures the text selection from entity block elements is
4
- * not included in the paste buffer.
5
- */
6
- export declare const sanitizeEntityBlocks: ([doc, editor]: SanitizerTuple) => SanitizerTuple;
@@ -1,2 +0,0 @@
1
- import { SanitizerTuple } from './helpers';
2
- export declare const sanitizeTables: ([doc, editor]: SanitizerTuple) => SanitizerTuple;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const styles: {
3
- topRight: string;
4
- };
5
- export declare const TableActions: () => JSX.Element;
@@ -1,2 +0,0 @@
1
- import { PlateEditor } from '@udecode/plate';
2
- export declare const addTableNormalizers: (editor: PlateEditor) => void;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import * as Slate from 'slate-react';
3
- import { PlatePlugin } from '@udecode/plate';
4
- import { CustomSlatePluginOptions } from 'types';
5
- interface ToolbarUnderlineButtonProps {
6
- isDisabled?: boolean;
7
- }
8
- export declare function ToolbarUnderlineButton(props: ToolbarUnderlineButtonProps): JSX.Element | null;
9
- export declare function Underline(props: Slate.RenderLeafProps): JSX.Element;
10
- export declare function createUnderlinePlugin(): PlatePlugin;
11
- export declare const withUnderlineOptions: CustomSlatePluginOptions;
12
- export {};