@contentful/field-editor-rich-text 1.1.0 → 2.0.0-next.10

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 (190) hide show
  1. package/README.md +1 -1
  2. package/dist/ContentfulEditorProvider.d.ts +8 -0
  3. package/dist/RichTextEditor.d.ts +18 -60
  4. package/dist/RichTextEditor.styles.d.ts +7 -0
  5. package/dist/SdkProvider.d.ts +7 -0
  6. package/dist/Toolbar/components/EmbedEntityWidget.d.ts +5 -0
  7. package/dist/Toolbar/components/EmbeddedEntityDropdownButton.d.ts +9 -0
  8. package/dist/Toolbar/components/StickyToolbarWrapper.d.ts +7 -0
  9. package/dist/Toolbar/index.d.ts +5 -20
  10. package/dist/TrackingProvider.d.ts +11 -0
  11. package/dist/constants/Schema.d.ts +93 -11
  12. package/dist/dialogs/openRichTextDialog.d.ts +2 -1
  13. package/dist/dialogs/renderRichTextDialog.d.ts +2 -1
  14. package/dist/field-editor-rich-text.cjs.development.js +4738 -5118
  15. package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
  16. package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
  17. package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
  18. package/dist/field-editor-rich-text.esm.js +4715 -5095
  19. package/dist/field-editor-rich-text.esm.js.map +1 -1
  20. package/dist/helpers/editor.d.ts +43 -0
  21. package/dist/helpers/environment.d.ts +2 -0
  22. package/dist/helpers/extractNodes.d.ts +7 -0
  23. package/dist/helpers/formatDateAndTime.d.ts +15 -0
  24. package/dist/helpers/getLinkedContentTypeIdsForNodeType.d.ts +26 -2
  25. package/dist/helpers/newEntitySelectorConfigFromRichTextField.d.ts +5 -1
  26. package/dist/helpers/sanitizeSlateDoc.d.ts +5 -0
  27. package/dist/helpers/transformers.d.ts +8 -0
  28. package/dist/helpers/validations.d.ts +10 -0
  29. package/dist/plugins/Break/createExitBreakPlugin.d.ts +2 -0
  30. package/dist/plugins/Break/createSoftBreakPlugin.d.ts +2 -0
  31. package/dist/plugins/Break/index.d.ts +3 -0
  32. package/dist/plugins/DragAndDrop/index.d.ts +2 -0
  33. package/dist/plugins/EmbeddedEntityBlock/LinkedEntityBlock.d.ts +14 -0
  34. package/dist/plugins/EmbeddedEntityBlock/ToolbarIcon.d.ts +11 -10
  35. package/dist/plugins/EmbeddedEntityBlock/Util.d.ts +2 -23
  36. package/dist/plugins/EmbeddedEntityBlock/index.d.ts +6 -26
  37. package/dist/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.d.ts +13 -0
  38. package/dist/plugins/EmbeddedEntityInline/Util.d.ts +16 -0
  39. package/dist/plugins/EmbeddedEntityInline/index.d.ts +11 -0
  40. package/dist/plugins/Heading/components/Heading.d.ts +11 -0
  41. package/dist/plugins/Heading/components/ToolbarHeadingButton.d.ts +4 -0
  42. package/dist/plugins/Heading/createHeadingPlugin.d.ts +2 -0
  43. package/dist/plugins/Heading/index.d.ts +2 -380
  44. package/dist/plugins/Hr/index.d.ts +12 -61
  45. package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +9 -0
  46. package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +16 -0
  47. package/dist/plugins/Hyperlink/index.d.ts +9 -9
  48. package/dist/plugins/Hyperlink/truncate.d.ts +1 -1
  49. package/dist/plugins/Hyperlink/utils.d.ts +3 -0
  50. package/dist/plugins/List/components/List.d.ts +3 -0
  51. package/dist/plugins/List/components/ListItem.d.ts +2 -0
  52. package/dist/plugins/List/components/ToolbarListButton.d.ts +4 -0
  53. package/dist/plugins/List/createListPlugin.d.ts +2 -0
  54. package/dist/plugins/List/index.d.ts +2 -114
  55. package/dist/plugins/List/insertListBreak.d.ts +2 -0
  56. package/dist/plugins/List/insertListFragment.d.ts +2 -0
  57. package/dist/plugins/List/transforms/insertListItem.d.ts +5 -0
  58. package/dist/plugins/List/utils.d.ts +14 -0
  59. package/dist/plugins/List/withList.d.ts +3 -0
  60. package/dist/plugins/Marks/Bold.d.ts +9 -0
  61. package/dist/plugins/Marks/Code.d.ts +9 -0
  62. package/dist/plugins/Marks/Italic.d.ts +9 -0
  63. package/dist/plugins/Marks/Underline.d.ts +9 -0
  64. package/dist/plugins/Marks/index.d.ts +2 -0
  65. package/dist/plugins/Normalizer/baseRules.d.ts +2 -0
  66. package/dist/plugins/Normalizer/createNormalizerPlugin.d.ts +2 -0
  67. package/dist/plugins/Normalizer/index.d.ts +2 -0
  68. package/dist/plugins/Normalizer/types.d.ts +39 -0
  69. package/dist/plugins/Normalizer/utils.d.ts +8 -0
  70. package/dist/plugins/Normalizer/withNormalizer.d.ts +2 -0
  71. package/dist/plugins/Paragraph/Paragraph.d.ts +2 -0
  72. package/dist/plugins/Paragraph/createParagraphPlugin.d.ts +2 -0
  73. package/dist/plugins/Paragraph/index.d.ts +1 -5
  74. package/dist/plugins/Paragraph/utils.d.ts +2 -0
  75. package/dist/plugins/PasteHTML/createPasteHTMLPlugin.d.ts +2 -0
  76. package/dist/plugins/PasteHTML/index.d.ts +1 -0
  77. package/dist/plugins/PasteHTML/utils/sanitizeHTML.d.ts +1 -0
  78. package/dist/plugins/PasteHTML/utils/sanitizeSheets.d.ts +4 -0
  79. package/dist/plugins/Quote/components/Quote.d.ts +2 -0
  80. package/dist/plugins/Quote/components/ToolbarQuoteButton.d.ts +4 -0
  81. package/dist/plugins/Quote/createQuotePlugin.d.ts +2 -0
  82. package/dist/plugins/Quote/index.d.ts +2 -59
  83. package/dist/plugins/Quote/toggleQuote.d.ts +3 -0
  84. package/dist/plugins/SelectOnBackspace/createSelectOnBackspacePlugin.d.ts +2 -0
  85. package/dist/plugins/SelectOnBackspace/index.d.ts +1 -0
  86. package/dist/plugins/Table/actions/addColumn.d.ts +4 -0
  87. package/dist/plugins/Table/actions/addRow.d.ts +3 -0
  88. package/dist/plugins/Table/actions/index.d.ts +3 -0
  89. package/dist/plugins/Table/actions/setHeader.d.ts +2 -0
  90. package/dist/plugins/Table/addTableTrackingEvents.d.ts +3 -0
  91. package/dist/plugins/Table/components/Cell.d.ts +2 -0
  92. package/dist/plugins/Table/components/HeaderCell.d.ts +2 -0
  93. package/dist/plugins/Table/components/Row.d.ts +2 -0
  94. package/dist/plugins/Table/components/Table.d.ts +2 -0
  95. package/dist/plugins/Table/components/TableActions.d.ts +4 -0
  96. package/dist/plugins/Table/components/ToolbarButton.d.ts +4 -0
  97. package/dist/plugins/Table/createTablePlugin.d.ts +3 -0
  98. package/dist/plugins/Table/helpers.d.ts +15 -0
  99. package/dist/plugins/Table/index.d.ts +2 -0
  100. package/dist/plugins/Text/createTextPlugin.d.ts +2 -0
  101. package/dist/plugins/Text/index.d.ts +1 -0
  102. package/dist/plugins/TrailingParagraph/index.d.ts +1 -0
  103. package/dist/plugins/Voids/createVoidsPlugin.d.ts +2 -0
  104. package/dist/plugins/Voids/index.d.ts +1 -0
  105. package/dist/plugins/Voids/transformVoid.d.ts +6 -0
  106. package/dist/plugins/index.d.ts +6 -1
  107. package/dist/plugins/links-tracking.d.ts +7 -0
  108. package/dist/plugins/shared/EntityStatusIcon.d.ts +7 -0
  109. package/dist/plugins/shared/FetchingWrappedAssetCard.d.ts +23 -0
  110. package/dist/plugins/shared/FetchingWrappedEntryCard.d.ts +13 -0
  111. package/dist/plugins/shared/ToolbarButton.d.ts +11 -0
  112. package/dist/test-utils/assertOutput.d.ts +8 -0
  113. package/dist/test-utils/createEditor.d.ts +14 -0
  114. package/dist/test-utils/index.d.ts +4 -0
  115. package/dist/test-utils/jsx.d.ts +28 -0
  116. package/dist/test-utils/mockPlugin.d.ts +2 -0
  117. package/dist/test-utils/randomId.d.ts +4 -0
  118. package/dist/test-utils/setEmptyDataAttribute.d.ts +6 -0
  119. package/dist/test-utils/validation.d.ts +1 -0
  120. package/dist/types.d.ts +42 -0
  121. package/package.json +40 -34
  122. package/CHANGELOG.md +0 -454
  123. package/LICENSE +0 -21
  124. package/dist/RichTextEditor.spec.d.ts +0 -1
  125. package/dist/Toolbar/StickyToolbarWrapper.d.ts +0 -12
  126. package/dist/Toolbar/Toolbar.spec.d.ts +0 -1
  127. package/dist/helpers/browserSupport.d.ts +0 -1
  128. package/dist/plugins/Bold/index.d.ts +0 -64
  129. package/dist/plugins/Code/index.d.ts +0 -64
  130. package/dist/plugins/CommandPalette/CommandMark.d.ts +0 -12
  131. package/dist/plugins/CommandPalette/CommandPalette.d.ts +0 -10
  132. package/dist/plugins/CommandPalette/CommandPaletteService.d.ts +0 -20
  133. package/dist/plugins/CommandPalette/CommandPanel/CommandPanelMenu.d.ts +0 -43
  134. package/dist/plugins/CommandPalette/CommandPanel/InViewport/InViewport.d.ts +0 -37
  135. package/dist/plugins/CommandPalette/CommandPanel/index.d.ts +0 -37
  136. package/dist/plugins/CommandPalette/Util.d.ts +0 -5
  137. package/dist/plugins/CommandPalette/index.d.ts +0 -7
  138. package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.d.ts +0 -20
  139. package/dist/plugins/EmbeddedEntityBlock/EmbeddedEntityBlock.styles.d.ts +0 -3
  140. package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedAssetCard.d.ts +0 -15
  141. package/dist/plugins/EmbeddedEntityBlock/FetchingWrappedEntryCard.d.ts +0 -15
  142. package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.d.ts +0 -21
  143. package/dist/plugins/EmbeddedEntryInline/EmbeddedEntryInline.styles.d.ts +0 -4
  144. package/dist/plugins/EmbeddedEntryInline/FetchingWrappedInlineEntryCard.d.ts +0 -14
  145. package/dist/plugins/EmbeddedEntryInline/ToolbarIcon.d.ts +0 -11
  146. package/dist/plugins/EmbeddedEntryInline/Utils.d.ts +0 -4
  147. package/dist/plugins/EmbeddedEntryInline/index.d.ts +0 -12
  148. package/dist/plugins/EntryEmbedDropdown/index.d.ts +0 -14
  149. package/dist/plugins/Heading/HeadingDropdown.d.ts +0 -28
  150. package/dist/plugins/Heading/HeadingDropdownItem.d.ts +0 -57
  151. package/dist/plugins/Heading/Paragraph.d.ts +0 -58
  152. package/dist/plugins/Hyperlink/Hyperlink.d.ts +0 -13
  153. package/dist/plugins/Hyperlink/ToolbarIcon.d.ts +0 -7
  154. package/dist/plugins/Hyperlink/Util.d.ts +0 -43
  155. package/dist/plugins/Hyperlink/styles.d.ts +0 -12
  156. package/dist/plugins/Hyperlink/useRequestStatus.d.ts +0 -6
  157. package/dist/plugins/InsertBeforeFirstVoidBlock/Util.d.ts +0 -14
  158. package/dist/plugins/InsertBeforeFirstVoidBlock/index.d.ts +0 -3
  159. package/dist/plugins/Italic/index.d.ts +0 -64
  160. package/dist/plugins/List/EditListWrapper.d.ts +0 -2
  161. package/dist/plugins/List/ToolbarDecorator.d.ts +0 -62
  162. package/dist/plugins/NewLinePlugin/index.d.ts +0 -3
  163. package/dist/plugins/Paste/Paste.d.ts +0 -1
  164. package/dist/plugins/Paste/Paste.spec.d.ts +0 -1
  165. package/dist/plugins/Paste/index.d.ts +0 -7
  166. package/dist/plugins/Paste/index.spec.d.ts +0 -1
  167. package/dist/plugins/PasteHtml/PasteHtml.spec.d.ts +0 -1
  168. package/dist/plugins/PasteHtml/Serializer.d.ts +0 -1
  169. package/dist/plugins/PasteHtml/index.d.ts +0 -3
  170. package/dist/plugins/PasteText/PasteText.spec.d.ts +0 -1
  171. package/dist/plugins/PasteText/index.d.ts +0 -3
  172. package/dist/plugins/Quote/QuotePlugin.d.ts +0 -10
  173. package/dist/plugins/Quote/Util.d.ts +0 -2
  174. package/dist/plugins/Underlined/index.d.ts +0 -64
  175. package/dist/plugins/shared/BlockSelectDecorator.d.ts +0 -63
  176. package/dist/plugins/shared/BlockToggleDecorator.d.ts +0 -65
  177. package/dist/plugins/shared/MarkDecorator.d.ts +0 -12
  178. package/dist/plugins/shared/MarkPlugin.d.ts +0 -9
  179. package/dist/plugins/shared/MarkToggleDecorator.d.ts +0 -62
  180. package/dist/plugins/shared/NodeDecorator.d.ts +0 -15
  181. package/dist/plugins/shared/PasteTestHelpers.d.ts +0 -35
  182. package/dist/plugins/shared/PluginApi.d.ts +0 -31
  183. package/dist/plugins/shared/PropTypes.d.ts +0 -15
  184. package/dist/plugins/shared/ToolbarDropdownListItem.d.ts +0 -14
  185. package/dist/plugins/shared/ToolbarIcon.d.ts +0 -16
  186. package/dist/plugins/shared/Util.d.ts +0 -1
  187. package/dist/plugins/shared/UtilHave.d.ts +0 -24
  188. package/dist/setupTests.d.ts +0 -1
  189. package/dist/validations/index.d.ts +0 -9
  190. package/dist/validations/validations.spec.d.ts +0 -1
@@ -1,43 +0,0 @@
1
- /**
2
- * Returns whether or not the current value selection would allow for a user
3
- * edit on a hyperlink.
4
- *
5
- * @param {slate.Value} value
6
- * @returns {boolean}
7
- */
8
- export function mayEditLink(value: any): boolean;
9
- /**
10
- * Returns whether the given value has any hyperlink node.
11
- *
12
- * @param {slate.Value} value
13
- * @returns {boolean}
14
- */
15
- export function hasHyperlink(value: any): boolean;
16
- /**
17
- * Returns whether the given value has any inline node other than hyperlinks.
18
- *
19
- * @param {slate.Value} value
20
- * @returns {boolean}
21
- */
22
- export function hasOnlyHyperlinkInlines(value: any): boolean;
23
- /**
24
- * Allows the user to insert/remove a link depending on whether the current
25
- * selection has a link or not. If there is no link, a dialog is shown for
26
- * the user.
27
- *
28
- * @param {slate.Editor} editor Will be mutated with the required operations.
29
- * @param {Object} sdk
30
- * @param {function} logAction
31
- * @returns {Promise<void>}
32
- */
33
- export function toggleLink(editor: any, sdk: any, logAction: Function): Promise<void>;
34
- /**
35
- * Allows the user to edit the first selected link of a given Change by showing
36
- * a dialog and applying the change.
37
- *
38
- * @param {slate.Editor} change Will be mutated with the required operations.
39
- * @param {Object} sdk
40
- * @param {function} logAction
41
- * @returns {Promise<void>}
42
- */
43
- export function editLink(change: any, sdk: any, logAction: Function): Promise<void>;
@@ -1,12 +0,0 @@
1
- export namespace hyperlinkTooltipStyles {
2
- export const entityContentType: string;
3
- export const entityTitle: string;
4
- export const separator: string;
5
- }
6
- declare namespace _default {
7
- export const hyperlinkWrapper: string;
8
- export const hyperlink: string;
9
- export const hyperlinkIEFallback: string;
10
- export const hyperlinkIcon: string;
11
- }
12
- export default _default;
@@ -1,6 +0,0 @@
1
- export function useRequestStatus({ richTextAPI, target }: {
2
- richTextAPI: any;
3
- target: any;
4
- }): {
5
- type: string;
6
- };
@@ -1,14 +0,0 @@
1
- /**
2
- * Checks if the first block in the document is void and is focused.
3
- *
4
- * @param {Slate.Editor} editor
5
- * @returns {Boolean}
6
- */
7
- export function isVoidBlockFirstAndFocused(editor: any): boolean;
8
- /**
9
- * Inserts and focuses an empty paragraph as a first child to the document.
10
- *
11
- * @param {Slate.Editor} editor
12
- * @returns {void}
13
- */
14
- export function insertParagraphAndFocusToStartOfDocument(editor: any): void;
@@ -1,3 +0,0 @@
1
- export function InsertBeforeFirstVoidBlockPlugin(): {
2
- onKeyDown: (event: any, editor: any, next: any) => any;
3
- };
@@ -1,64 +0,0 @@
1
- export function ItalicPlugin({ richTextAPI }: {
2
- richTextAPI: any;
3
- }): {
4
- renderMark: (props: any, _editor: any, next: any) => any;
5
- onKeyDown(event: any, editor: any, next: any): any;
6
- };
7
- declare var _default: {
8
- new (props: any): {
9
- handleToggle: (event: any) => any;
10
- render(): JSX.Element;
11
- context: any;
12
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
13
- forceUpdate(callback?: (() => void) | undefined): void;
14
- readonly props: Readonly<any> & Readonly<{
15
- children?: React.ReactNode;
16
- }>;
17
- state: Readonly<any>;
18
- refs: {
19
- [key: string]: React.ReactInstance;
20
- };
21
- componentDidMount?(): void;
22
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
23
- componentWillUnmount?(): void;
24
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
25
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
26
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
27
- componentWillMount?(): void;
28
- UNSAFE_componentWillMount?(): void;
29
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
30
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
31
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
32
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
33
- };
34
- new (props: any, context: any): {
35
- handleToggle: (event: any) => any;
36
- render(): JSX.Element;
37
- context: any;
38
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
39
- forceUpdate(callback?: (() => void) | undefined): void;
40
- readonly props: Readonly<any> & Readonly<{
41
- children?: React.ReactNode;
42
- }>;
43
- state: Readonly<any>;
44
- refs: {
45
- [key: string]: React.ReactInstance;
46
- };
47
- componentDidMount?(): void;
48
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
49
- componentWillUnmount?(): void;
50
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
51
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
52
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
53
- componentWillMount?(): void;
54
- UNSAFE_componentWillMount?(): void;
55
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
56
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
57
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
58
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
59
- };
60
- propTypes: any;
61
- contextType?: React.Context<any> | undefined;
62
- };
63
- export default _default;
64
- import React from "react";
@@ -1,2 +0,0 @@
1
- declare function _default(opt: any): any;
2
- export default _default;
@@ -1,62 +0,0 @@
1
- declare function _default({ type, title, children }: {
2
- type: any;
3
- title: any;
4
- children: any;
5
- }): (Block: any) => {
6
- new (props: any): {
7
- handleToggle: (event: any) => any;
8
- render(): JSX.Element;
9
- context: any;
10
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
11
- forceUpdate(callback?: (() => void) | undefined): void;
12
- readonly props: Readonly<any> & Readonly<{
13
- children?: React.ReactNode;
14
- }>;
15
- state: Readonly<any>;
16
- refs: {
17
- [key: string]: React.ReactInstance;
18
- };
19
- componentDidMount?(): void;
20
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
21
- componentWillUnmount?(): void;
22
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
23
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
24
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
25
- componentWillMount?(): void;
26
- UNSAFE_componentWillMount?(): void;
27
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
28
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
29
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
30
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
31
- };
32
- new (props: any, context: any): {
33
- handleToggle: (event: any) => any;
34
- render(): JSX.Element;
35
- context: any;
36
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
37
- forceUpdate(callback?: (() => void) | undefined): void;
38
- readonly props: Readonly<any> & Readonly<{
39
- children?: React.ReactNode;
40
- }>;
41
- state: Readonly<any>;
42
- refs: {
43
- [key: string]: React.ReactInstance;
44
- };
45
- componentDidMount?(): void;
46
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
47
- componentWillUnmount?(): void;
48
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
49
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
50
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
51
- componentWillMount?(): void;
52
- UNSAFE_componentWillMount?(): void;
53
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
54
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
55
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
56
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
57
- };
58
- propTypes: any;
59
- contextType?: React.Context<any> | undefined;
60
- };
61
- export default _default;
62
- import * as React from "react";
@@ -1,3 +0,0 @@
1
- export default function _default(): {
2
- onKeyDown(event: any, editor: any, next: any): any;
3
- };
@@ -1 +0,0 @@
1
- export function getCharacterCount(editor: any): number;
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- export function PastePlugin({ richTextAPI: { logShortcutAction } }: {
2
- richTextAPI: {
3
- logShortcutAction: any;
4
- };
5
- }): {
6
- onPaste(_event: any, editor: any, next: any): void;
7
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export function create(): any;
@@ -1,3 +0,0 @@
1
- export function PasteHtmlPlugin(): {
2
- onPaste(event: any, editor: any, next: any): void;
3
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export function PasteTextPlugin(): {
2
- onPaste(event: any, editor: any, next: any): void;
3
- };
@@ -1,10 +0,0 @@
1
- export default QuotePlugin;
2
- declare function QuotePlugin({ type, richTextAPI: { logShortcutAction } }: {
3
- type?: any;
4
- richTextAPI: {
5
- logShortcutAction: any;
6
- };
7
- }): {
8
- renderNode: (props: any, _editor: any, next: any) => any;
9
- onKeyDown: (e: any, editor: any, next: any) => any;
10
- };
@@ -1,2 +0,0 @@
1
- export function isSelectionInQuote(editor: any): boolean;
2
- export function applyChange(editor: any): boolean;
@@ -1,64 +0,0 @@
1
- export function UnderlinedPlugin({ richTextAPI }: {
2
- richTextAPI: any;
3
- }): {
4
- renderMark: (props: any, _editor: any, next: any) => any;
5
- onKeyDown(event: any, editor: any, next: any): any;
6
- };
7
- declare var _default: {
8
- new (props: any): {
9
- handleToggle: (event: any) => any;
10
- render(): JSX.Element;
11
- context: any;
12
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
13
- forceUpdate(callback?: (() => void) | undefined): void;
14
- readonly props: Readonly<any> & Readonly<{
15
- children?: React.ReactNode;
16
- }>;
17
- state: Readonly<any>;
18
- refs: {
19
- [key: string]: React.ReactInstance;
20
- };
21
- componentDidMount?(): void;
22
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
23
- componentWillUnmount?(): void;
24
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
25
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
26
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
27
- componentWillMount?(): void;
28
- UNSAFE_componentWillMount?(): void;
29
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
30
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
31
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
32
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
33
- };
34
- new (props: any, context: any): {
35
- handleToggle: (event: any) => any;
36
- render(): JSX.Element;
37
- context: any;
38
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
39
- forceUpdate(callback?: (() => void) | undefined): void;
40
- readonly props: Readonly<any> & Readonly<{
41
- children?: React.ReactNode;
42
- }>;
43
- state: Readonly<any>;
44
- refs: {
45
- [key: string]: React.ReactInstance;
46
- };
47
- componentDidMount?(): void;
48
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
49
- componentWillUnmount?(): void;
50
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
51
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
52
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
53
- componentWillMount?(): void;
54
- UNSAFE_componentWillMount?(): void;
55
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
56
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
57
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
58
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
59
- };
60
- propTypes: any;
61
- contextType?: React.Context<any> | undefined;
62
- };
63
- export default _default;
64
- import React from "react";
@@ -1,63 +0,0 @@
1
- declare function _default({ type, title, children, applyChange, }: {
2
- type: any;
3
- title: any;
4
- children: any;
5
- applyChange?: ((editor: any, type: any) => any) | undefined;
6
- }): (Block: any) => {
7
- new (props: any): {
8
- handleSelect: (event: any) => any;
9
- render(): JSX.Element;
10
- context: any;
11
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
12
- forceUpdate(callback?: (() => void) | undefined): void;
13
- readonly props: Readonly<any> & Readonly<{
14
- children?: React.ReactNode;
15
- }>;
16
- state: Readonly<any>;
17
- refs: {
18
- [key: string]: React.ReactInstance;
19
- };
20
- componentDidMount?(): void;
21
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
22
- componentWillUnmount?(): void;
23
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
24
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
25
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
26
- componentWillMount?(): void;
27
- UNSAFE_componentWillMount?(): void;
28
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
29
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
30
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
31
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
32
- };
33
- new (props: any, context: any): {
34
- handleSelect: (event: any) => any;
35
- render(): JSX.Element;
36
- context: any;
37
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
38
- forceUpdate(callback?: (() => void) | undefined): void;
39
- readonly props: Readonly<any> & Readonly<{
40
- children?: React.ReactNode;
41
- }>;
42
- state: Readonly<any>;
43
- refs: {
44
- [key: string]: React.ReactInstance;
45
- };
46
- componentDidMount?(): void;
47
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
48
- componentWillUnmount?(): void;
49
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
50
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
51
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
52
- componentWillMount?(): void;
53
- UNSAFE_componentWillMount?(): void;
54
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
55
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
56
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
57
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
58
- };
59
- propTypes: any;
60
- contextType?: React.Context<any> | undefined;
61
- };
62
- export default _default;
63
- import * as React from "react";
@@ -1,65 +0,0 @@
1
- export function toggleChange(editor: any, type: any): boolean;
2
- declare function _default({ type, title, children, applyChange, isActive }: {
3
- type: any;
4
- title: any;
5
- children: any;
6
- applyChange?: ((editor: any, type: any) => boolean) | undefined;
7
- isActive?: ((editor: any, type: any) => any) | undefined;
8
- }): (Block: any) => {
9
- new (props: any): {
10
- handleToggle: (event: any) => any;
11
- render(): JSX.Element;
12
- context: any;
13
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
14
- forceUpdate(callback?: (() => void) | undefined): void;
15
- readonly props: Readonly<any> & Readonly<{
16
- children?: React.ReactNode;
17
- }>;
18
- state: Readonly<any>;
19
- refs: {
20
- [key: string]: React.ReactInstance;
21
- };
22
- componentDidMount?(): void;
23
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
24
- componentWillUnmount?(): void;
25
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
26
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
27
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
28
- componentWillMount?(): void;
29
- UNSAFE_componentWillMount?(): void;
30
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
31
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
32
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
33
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
34
- };
35
- new (props: any, context: any): {
36
- handleToggle: (event: any) => any;
37
- render(): JSX.Element;
38
- context: any;
39
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
40
- forceUpdate(callback?: (() => void) | undefined): void;
41
- readonly props: Readonly<any> & Readonly<{
42
- children?: React.ReactNode;
43
- }>;
44
- state: Readonly<any>;
45
- refs: {
46
- [key: string]: React.ReactInstance;
47
- };
48
- componentDidMount?(): void;
49
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
50
- componentWillUnmount?(): void;
51
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
52
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
53
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
54
- componentWillMount?(): void;
55
- UNSAFE_componentWillMount?(): void;
56
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
57
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
58
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
59
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
60
- };
61
- propTypes: any;
62
- contextType?: React.Context<any> | undefined;
63
- };
64
- export default _default;
65
- import * as React from "react";
@@ -1,12 +0,0 @@
1
- export default function _default(Tag: any, tagProps?: {}): {
2
- ({ attributes, children }: {
3
- attributes: any;
4
- children: any;
5
- }): JSX.Element;
6
- displayName: string;
7
- propTypes: {
8
- attributes: import("prop-types").Validator<object>;
9
- children: import("prop-types").Validator<string | number | boolean | {} | import("prop-types").ReactElementLike | import("prop-types").ReactNodeArray>;
10
- mark: import("prop-types").Validator<string>;
11
- };
12
- };
@@ -1,9 +0,0 @@
1
- export default function _default({ type, tagName, hotkey, richTextAPI }: {
2
- type: any;
3
- tagName: any;
4
- hotkey: any;
5
- richTextAPI: any;
6
- }): {
7
- renderMark: (props: any, _editor: any, next: any) => any;
8
- onKeyDown(event: any, editor: any, next: any): any;
9
- };
@@ -1,62 +0,0 @@
1
- declare function _default({ type, title, children }: {
2
- type: any;
3
- title: any;
4
- children: any;
5
- }): (Mark: any) => {
6
- new (props: any): {
7
- handleToggle: (event: any) => any;
8
- render(): JSX.Element;
9
- context: any;
10
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
11
- forceUpdate(callback?: (() => void) | undefined): void;
12
- readonly props: Readonly<any> & Readonly<{
13
- children?: React.ReactNode;
14
- }>;
15
- state: Readonly<any>;
16
- refs: {
17
- [key: string]: React.ReactInstance;
18
- };
19
- componentDidMount?(): void;
20
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
21
- componentWillUnmount?(): void;
22
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
23
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
24
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
25
- componentWillMount?(): void;
26
- UNSAFE_componentWillMount?(): void;
27
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
28
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
29
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
30
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
31
- };
32
- new (props: any, context: any): {
33
- handleToggle: (event: any) => any;
34
- render(): JSX.Element;
35
- context: any;
36
- setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
37
- forceUpdate(callback?: (() => void) | undefined): void;
38
- readonly props: Readonly<any> & Readonly<{
39
- children?: React.ReactNode;
40
- }>;
41
- state: Readonly<any>;
42
- refs: {
43
- [key: string]: React.ReactInstance;
44
- };
45
- componentDidMount?(): void;
46
- shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
47
- componentWillUnmount?(): void;
48
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
49
- getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
50
- componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
51
- componentWillMount?(): void;
52
- UNSAFE_componentWillMount?(): void;
53
- componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
54
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
55
- componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
56
- UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
57
- };
58
- propTypes: any;
59
- contextType?: React.Context<any> | undefined;
60
- };
61
- export default _default;
62
- import * as React from "react";
@@ -1,15 +0,0 @@
1
- export default function _default(Tag: any, tagProps?: {}): {
2
- ({ attributes, children, node }: {
3
- attributes: any;
4
- children: any;
5
- node: any;
6
- }): JSX.Element;
7
- displayName: string;
8
- propTypes: {
9
- attributes: import("prop-types").Validator<object>;
10
- children: import("prop-types").Validator<string | number | boolean | {} | import("prop-types").ReactElementLike | import("prop-types").ReactNodeArray>;
11
- node: import("prop-types").Validator<import("prop-types").InferProps<{
12
- type: import("prop-types").Validator<string>;
13
- }>>;
14
- };
15
- };
@@ -1,35 +0,0 @@
1
- export function document(props: any, ...nodes: any[]): any;
2
- export function block(type: any, props: any, ...nodes: any[]): any;
3
- export function inline(type: any, props: any, ...nodes: any[]): any;
4
- export function text(props: any, ...leaves: any[]): any;
5
- export function leaf(text?: string, ...marks: any[]): {
6
- object: string;
7
- text: string;
8
- marks: any[];
9
- };
10
- export function mark(type: any): {
11
- type: any;
12
- object: string;
13
- data: {};
14
- };
15
- export function emptyText(): any;
16
- export function emptyParagraph(): {
17
- type: BLOCKS;
18
- object: string;
19
- data: {};
20
- nodes: any[];
21
- };
22
- export function createPasteEvent(type: any, value: any): {
23
- dataTransfer: FakeDataTransfer;
24
- };
25
- export function createPasteHtmlEvent(html: any): {
26
- dataTransfer: FakeDataTransfer;
27
- };
28
- import { BLOCKS } from "@contentful/rich-text-types";
29
- declare class FakeDataTransfer {
30
- items: any[];
31
- types: any[];
32
- getData(key: any): any;
33
- setData(key: any, value: any): void;
34
- }
35
- export {};
@@ -1,31 +0,0 @@
1
- /**
2
- * All known origins for Rich Text actions
3
- * @type {object}
4
- */
5
- export const actionOrigin: object;
6
- export function createRichTextAPI({ sdk, onAction }: object): {
7
- sdk: {
8
- object;
9
- };
10
- logViewportAction: {
11
- function;
12
- };
13
- createActionLogger: {
14
- function;
15
- };
16
- createActionLogger: {
17
- function;
18
- };
19
- };
20
- /**
21
- * Describes the prop types a Rich Text editor plugin can expect.
22
- * @type {object}
23
- */
24
- export const EDITOR_PLUGIN_PROP_TYPES: object;
25
- /**
26
- * Describes the prop types a Rich Text toolbar plugin can expect.
27
- * @type {object}
28
- */
29
- export const TOOLBAR_PLUGIN_PROP_TYPES: object;
30
- declare function createActionLogger(onAction: any, origin: any): (name: any, data: any) => void;
31
- export {};