@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.
- package/README.md +4 -0
- package/dist/ContentfulEditorProvider.d.ts +6 -5
- package/dist/RichTextEditor.d.ts +2 -3
- package/dist/Toolbar/{EmbedEntityWidget.d.ts → components/EmbedEntityWidget.d.ts} +0 -1
- package/dist/{plugins/EmbeddedEntity/index.d.ts → Toolbar/components/EmbeddedEntityDropdownButton.d.ts} +1 -2
- package/dist/Toolbar/{StickyToolbarWrapper.d.ts → components/StickyToolbarWrapper.d.ts} +0 -0
- package/dist/Toolbar/index.d.ts +0 -1
- package/dist/dialogs/renderRichTextDialog.d.ts +0 -1
- package/dist/field-editor-rich-text.cjs.development.js +5720 -4525
- 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 +5592 -4397
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/editor.d.ts +22 -27
- package/dist/helpers/environment.d.ts +1 -0
- package/dist/helpers/extractNodes.d.ts +6 -0
- package/dist/helpers/transformers.d.ts +8 -0
- package/dist/helpers/validations.d.ts +1 -1
- package/dist/plugins/Break/createExitBreakPlugin.d.ts +2 -0
- package/dist/plugins/Break/createResetNodePlugin.d.ts +2 -0
- package/dist/plugins/Break/createSoftBreakPlugin.d.ts +2 -0
- package/dist/plugins/Break/index.d.ts +5 -0
- package/dist/plugins/DragAndDrop/index.d.ts +2 -2
- package/dist/plugins/EmbeddedEntityBlock/LinkedEntityBlock.d.ts +3 -2
- 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 +3 -9
- package/dist/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.d.ts +1 -0
- package/dist/plugins/EmbeddedEntityInline/index.d.ts +3 -5
- package/dist/plugins/Heading/components/Heading.d.ts +11 -0
- package/dist/plugins/Heading/components/ToolbarHeadingButton.d.ts +4 -0
- package/dist/plugins/Heading/createHeadingPlugin.d.ts +2 -0
- package/dist/plugins/Heading/index.d.ts +2 -20
- package/dist/plugins/Hr/index.d.ts +3 -5
- package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +4 -6
- 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 -12
- package/dist/plugins/Hyperlink/useEntityInfo.d.ts +16 -0
- package/dist/plugins/Hyperlink/utils.d.ts +5 -0
- package/dist/plugins/List/components/List.d.ts +3 -0
- package/dist/plugins/List/components/ListItem.d.ts +2 -0
- package/dist/plugins/List/components/ToolbarListButton.d.ts +4 -0
- package/dist/plugins/List/createListPlugin.d.ts +2 -0
- package/dist/plugins/List/index.d.ts +2 -15
- package/dist/plugins/List/insertListBreak.d.ts +2 -0
- package/dist/plugins/List/insertListFragment.d.ts +3 -0
- 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 +5 -0
- 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 +15 -0
- package/dist/plugins/List/withList.d.ts +4 -0
- package/dist/plugins/Marks/Bold.d.ts +11 -0
- package/dist/plugins/Marks/Code.d.ts +11 -0
- package/dist/plugins/Marks/Italic.d.ts +11 -0
- package/dist/plugins/Marks/Underline.d.ts +11 -0
- package/dist/plugins/Marks/components/MarkToolbarButton.d.ts +13 -0
- package/dist/plugins/Marks/helpers.d.ts +4 -0
- package/dist/plugins/Marks/index.d.ts +2 -0
- package/dist/plugins/Normalizer/baseRules.d.ts +2 -0
- package/dist/plugins/Normalizer/createNormalizerPlugin.d.ts +2 -0
- package/dist/plugins/Normalizer/index.d.ts +2 -0
- package/dist/plugins/Normalizer/types.d.ts +40 -0
- package/dist/plugins/Normalizer/utils.d.ts +8 -0
- package/dist/plugins/Normalizer/withNormalizer.d.ts +2 -0
- package/dist/plugins/Paragraph/Paragraph.d.ts +2 -0
- package/dist/plugins/Paragraph/createParagraphPlugin.d.ts +2 -0
- package/dist/plugins/Paragraph/index.d.ts +1 -7
- package/dist/plugins/Paragraph/utils.d.ts +2 -0
- package/dist/plugins/PasteHTML/createPasteHTMLPlugin.d.ts +8 -0
- package/dist/plugins/PasteHTML/index.d.ts +1 -0
- package/dist/plugins/PasteHTML/utils/sanitizeHTML.d.ts +1 -0
- package/dist/plugins/PasteHTML/utils/sanitizeSheets.d.ts +4 -0
- package/dist/plugins/Quote/components/Quote.d.ts +2 -0
- package/dist/plugins/Quote/components/ToolbarQuoteButton.d.ts +4 -0
- package/dist/plugins/Quote/createQuotePlugin.d.ts +2 -0
- package/dist/plugins/Quote/index.d.ts +2 -13
- package/dist/plugins/Quote/shouldResetQuote.d.ts +8 -0
- package/dist/plugins/Quote/toggleQuote.d.ts +5 -0
- package/dist/plugins/Quote/withQuote.d.ts +3 -0
- package/dist/plugins/SelectOnBackspace/createSelectOnBackspacePlugin.d.ts +2 -0
- package/dist/plugins/SelectOnBackspace/index.d.ts +1 -0
- package/dist/plugins/Table/actions/addColumn.d.ts +4 -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/addTableTrackingEvents.d.ts +2 -0
- package/dist/plugins/Table/components/Cell.d.ts +2 -0
- package/dist/plugins/Table/components/HeaderCell.d.ts +2 -0
- package/dist/plugins/Table/components/Row.d.ts +2 -0
- package/dist/plugins/Table/components/Table.d.ts +2 -0
- package/dist/plugins/Table/components/TableActions.d.ts +4 -0
- package/dist/plugins/Table/components/ToolbarButton.d.ts +4 -0
- package/dist/plugins/Table/createTablePlugin.d.ts +2 -0
- package/dist/plugins/Table/helpers.d.ts +15 -5
- package/dist/plugins/Table/index.d.ts +2 -189
- package/dist/plugins/Text/createTextPlugin.d.ts +2 -0
- package/dist/plugins/Text/index.d.ts +1 -2
- package/dist/plugins/Tracking/createTrackingPlugin.d.ts +10 -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/createVoidsPlugin.d.ts +2 -0
- package/dist/plugins/Voids/index.d.ts +1 -0
- package/dist/plugins/Voids/transformVoid.d.ts +6 -0
- package/dist/plugins/index.d.ts +5 -179
- package/dist/plugins/links-tracking.d.ts +6 -0
- package/dist/plugins/shared/EntityStatusIcon.d.ts +0 -1
- package/dist/plugins/shared/FetchingWrappedAssetCard.d.ts +1 -1
- package/dist/plugins/shared/FetchingWrappedEntryCard.d.ts +3 -3
- package/dist/plugins/shared/ToolbarButton.d.ts +0 -1
- package/dist/prepareDocument.d.ts +20 -0
- package/dist/test-utils/assertOutput.d.ts +7 -0
- package/dist/test-utils/createEditor.d.ts +10 -4
- package/dist/test-utils/index.d.ts +2 -0
- package/dist/test-utils/jsx.d.ts +2 -2
- package/dist/test-utils/mockPlugin.d.ts +2 -0
- package/dist/test-utils/randomId.d.ts +4 -0
- package/dist/test-utils/setEmptyDataAttribute.d.ts +6 -0
- package/dist/test-utils/validation.d.ts +1 -0
- package/dist/types.d.ts +34 -9
- package/dist/useOnValueChanged.d.ts +8 -0
- package/package.json +28 -17
- package/dist/TrackingProvider.d.ts +0 -11
- package/dist/helpers/deserializer.d.ts +0 -3
- package/dist/helpers/normalizers.d.ts +0 -15
- package/dist/helpers/sanitizeSlateDoc.d.ts +0 -18
- package/dist/helpers/truncate.d.ts +0 -1
- package/dist/plugins/Bold/index.d.ts +0 -12
- package/dist/plugins/Code/index.d.ts +0 -12
- package/dist/plugins/CommandPalette/CommandPanel/InViewport/InViewport.d.ts +0 -37
- package/dist/plugins/Hyperlink/EntryAssetTooltip.d.ts +0 -10
- package/dist/plugins/InsertBeforeFirstVoidBlock/index.d.ts +0 -2
- package/dist/plugins/Italic/index.d.ts +0 -12
- package/dist/plugins/List/getListInsertFragment.d.ts +0 -6
- package/dist/plugins/NewLine/index.d.ts +0 -2
- package/dist/plugins/Paste/index.d.ts +0 -2
- package/dist/plugins/Paste/sanitizers/helpers.d.ts +0 -7
- package/dist/plugins/Paste/sanitizers/index.d.ts +0 -3
- package/dist/plugins/Paste/sanitizers/removeComments.d.ts +0 -2
- package/dist/plugins/Paste/sanitizers/sanitizeEntityBlocks.d.ts +0 -6
- package/dist/plugins/Paste/sanitizers/sanitizeTables.d.ts +0 -2
- package/dist/plugins/Table/TableActions.d.ts +0 -5
- package/dist/plugins/Table/normalizers.d.ts +0 -2
- package/dist/plugins/Underline/index.d.ts +0 -12
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,180 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
serialize?: import("@udecode/plate").Serialize | undefined;
|
|
9
|
-
inlineTypes?: ((editor: import("@udecode/plate").PlateEditor<{}>) => string[]) | undefined;
|
|
10
|
-
renderElement?: import("@udecode/plate").RenderElement<{}> | undefined;
|
|
11
|
-
voidTypes?: ((editor: import("@udecode/plate").PlateEditor<{}>) => string[]) | undefined;
|
|
12
|
-
decorate?: import("@udecode/plate").Decorate<{}> | undefined;
|
|
13
|
-
injectChildComponent?: import("@udecode/plate").InjectComponent | import("@udecode/plate").InjectComponent[] | undefined;
|
|
14
|
-
injectParentComponent?: import("@udecode/plate").InjectComponent | import("@udecode/plate").InjectComponent[] | undefined;
|
|
15
|
-
onChange?: import("@udecode/plate").OnChange<{}> | undefined;
|
|
16
|
-
overrideProps?: import("@udecode/plate").OverrideProps<{}> | import("@udecode/plate").OverrideProps<{}>[] | undefined;
|
|
17
|
-
pluginKeys?: string | string[] | undefined;
|
|
18
|
-
onCopy?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").ClipboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
19
|
-
onCopyCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").ClipboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
20
|
-
onCut?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").ClipboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
21
|
-
onCutCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").ClipboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
22
|
-
onPaste?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").ClipboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
23
|
-
onPasteCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").ClipboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
24
|
-
onCompositionEnd?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").CompositionEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
25
|
-
onCompositionEndCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").CompositionEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
26
|
-
onCompositionStart?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").CompositionEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
27
|
-
onCompositionStartCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").CompositionEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
28
|
-
onCompositionUpdate?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").CompositionEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
29
|
-
onCompositionUpdateCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").CompositionEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
30
|
-
onFocus?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FocusEvent<Element, Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
31
|
-
onFocusCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FocusEvent<Element, Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
32
|
-
onBlur?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FocusEvent<Element, Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
33
|
-
onBlurCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FocusEvent<Element, Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
34
|
-
onDOMBeforeInput?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: Event) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
35
|
-
onBeforeInput?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
36
|
-
onBeforeInputCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
37
|
-
onInput?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
38
|
-
onInputCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
39
|
-
onReset?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
40
|
-
onResetCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
41
|
-
onSubmit?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
42
|
-
onSubmitCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
43
|
-
onInvalid?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
44
|
-
onInvalidCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").FormEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
45
|
-
onLoad?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
46
|
-
onLoadCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
47
|
-
onError?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
48
|
-
onErrorCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
49
|
-
onKeyDownCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").KeyboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
50
|
-
onKeyPress?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").KeyboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
51
|
-
onKeyPressCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").KeyboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
52
|
-
onKeyUp?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").KeyboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
53
|
-
onKeyUpCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").KeyboardEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
54
|
-
onAbort?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
55
|
-
onAbortCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
56
|
-
onCanPlay?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
57
|
-
onCanPlayCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
58
|
-
onCanPlayThrough?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
59
|
-
onCanPlayThroughCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
60
|
-
onDurationChange?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
61
|
-
onDurationChangeCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
62
|
-
onEmptied?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
63
|
-
onEmptiedCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
64
|
-
onEncrypted?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
65
|
-
onEncryptedCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
66
|
-
onEnded?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
67
|
-
onEndedCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
68
|
-
onLoadedData?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
69
|
-
onLoadedDataCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
70
|
-
onLoadedMetadata?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
71
|
-
onLoadedMetadataCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
72
|
-
onLoadStart?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
73
|
-
onLoadStartCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
74
|
-
onPause?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
75
|
-
onPauseCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
76
|
-
onPlay?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
77
|
-
onPlayCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
78
|
-
onPlaying?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
79
|
-
onPlayingCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
80
|
-
onProgress?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
81
|
-
onProgressCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
82
|
-
onRateChange?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
83
|
-
onRateChangeCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
84
|
-
onSeeked?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
85
|
-
onSeekedCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
86
|
-
onSeeking?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
87
|
-
onSeekingCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
88
|
-
onStalled?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
89
|
-
onStalledCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
90
|
-
onSuspend?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
91
|
-
onSuspendCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
92
|
-
onTimeUpdate?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
93
|
-
onTimeUpdateCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
94
|
-
onVolumeChange?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
95
|
-
onVolumeChangeCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
96
|
-
onWaiting?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
97
|
-
onWaitingCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
98
|
-
onAuxClick?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
99
|
-
onAuxClickCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
100
|
-
onClick?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
101
|
-
onClickCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
102
|
-
onContextMenu?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
103
|
-
onContextMenuCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
104
|
-
onDoubleClick?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
105
|
-
onDoubleClickCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
106
|
-
onDrag?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
107
|
-
onDragCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
108
|
-
onDragEnd?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
109
|
-
onDragEndCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
110
|
-
onDragEnter?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
111
|
-
onDragEnterCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
112
|
-
onDragExit?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
113
|
-
onDragExitCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
114
|
-
onDragLeave?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
115
|
-
onDragLeaveCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
116
|
-
onDragOver?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
117
|
-
onDragOverCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
118
|
-
onDragStart?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
119
|
-
onDragStartCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
120
|
-
onDrop?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
121
|
-
onDropCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").DragEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
122
|
-
onMouseDown?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
123
|
-
onMouseDownCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
124
|
-
onMouseEnter?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
125
|
-
onMouseLeave?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
126
|
-
onMouseMove?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
127
|
-
onMouseMoveCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
128
|
-
onMouseOut?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
129
|
-
onMouseOutCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
130
|
-
onMouseOver?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
131
|
-
onMouseOverCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
132
|
-
onMouseUp?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
133
|
-
onMouseUpCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").MouseEvent<Element, MouseEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
134
|
-
onSelect?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
135
|
-
onSelectCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").SyntheticEvent<Element, Event>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
136
|
-
onTouchCancel?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TouchEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
137
|
-
onTouchCancelCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TouchEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
138
|
-
onTouchEnd?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TouchEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
139
|
-
onTouchEndCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TouchEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
140
|
-
onTouchMove?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TouchEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
141
|
-
onTouchMoveCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TouchEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
142
|
-
onTouchStart?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TouchEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
143
|
-
onTouchStartCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TouchEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
144
|
-
onPointerDown?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
145
|
-
onPointerDownCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
146
|
-
onPointerMove?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
147
|
-
onPointerMoveCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
148
|
-
onPointerUp?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
149
|
-
onPointerUpCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
150
|
-
onPointerCancel?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
151
|
-
onPointerCancelCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
152
|
-
onPointerEnter?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
153
|
-
onPointerEnterCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
154
|
-
onPointerLeave?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
155
|
-
onPointerLeaveCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
156
|
-
onPointerOver?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
157
|
-
onPointerOverCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
158
|
-
onPointerOut?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
159
|
-
onPointerOutCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
160
|
-
onGotPointerCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
161
|
-
onGotPointerCaptureCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
162
|
-
onLostPointerCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
163
|
-
onLostPointerCaptureCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").PointerEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
164
|
-
onScroll?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").UIEvent<Element, UIEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
165
|
-
onScrollCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").UIEvent<Element, UIEvent>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
166
|
-
onWheel?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").WheelEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
167
|
-
onWheelCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").WheelEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
168
|
-
onAnimationStart?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").AnimationEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
169
|
-
onAnimationStartCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").AnimationEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
170
|
-
onAnimationEnd?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").AnimationEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
171
|
-
onAnimationEndCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").AnimationEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
172
|
-
onAnimationIteration?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").AnimationEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
173
|
-
onAnimationIterationCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").AnimationEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
174
|
-
onTransitionEnd?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TransitionEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
175
|
-
onTransitionEndCapture?: ((editor: import("@udecode/plate").PlateEditor<{}>) => (event: import("react").TransitionEvent<Element>) => import("@udecode/plate").HandlerReturnType) | undefined;
|
|
176
|
-
renderLeaf?: import("@udecode/plate").RenderLeaf<{}> | undefined;
|
|
177
|
-
})[];
|
|
178
|
-
export declare const pluginOptions: {
|
|
179
|
-
[x: string]: import("../types").CustomPluginOptions;
|
|
180
|
-
};
|
|
2
|
+
import { PlateProps } from '@udecode/plate-core';
|
|
3
|
+
import { RichTextPlugin } from '../types';
|
|
4
|
+
import { RichTextTrackingActionHandler } from './Tracking';
|
|
5
|
+
export declare const getPlugins: (sdk: FieldExtensionSDK, onAction: RichTextTrackingActionHandler) => RichTextPlugin[];
|
|
6
|
+
export declare const disableCorePlugins: PlateProps['disableCorePlugins'];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
|
+
declare type WithEntityFetchProps = {
|
|
3
|
+
onEntityFetchComplete: VoidFunction;
|
|
4
|
+
} & JSX.IntrinsicAttributes;
|
|
5
|
+
export declare function withLinkTracking(Component: React.ComponentType<WithEntityFetchProps>): (props: ComponentProps<typeof Component>) => JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
3
2
|
import { File } from '@contentful/field-editor-shared';
|
|
4
3
|
interface FetchingWrappedAssetCardProps {
|
|
@@ -9,6 +8,7 @@ interface FetchingWrappedAssetCardProps {
|
|
|
9
8
|
onEdit?: () => void;
|
|
10
9
|
onRemove?: () => unknown;
|
|
11
10
|
sdk: FieldExtensionSDK;
|
|
11
|
+
onEntityFetchComplete?: VoidFunction;
|
|
12
12
|
}
|
|
13
13
|
export declare function renderAssetInfo(props: {
|
|
14
14
|
entityFile: File;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
3
2
|
interface FetchingWrappedEntryCardProps {
|
|
4
3
|
entryId: string;
|
|
@@ -6,8 +5,9 @@ interface FetchingWrappedEntryCardProps {
|
|
|
6
5
|
isSelected: boolean;
|
|
7
6
|
locale: string;
|
|
8
7
|
sdk: FieldExtensionSDK;
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
onEntityFetchComplete?: VoidFunction;
|
|
9
|
+
onEdit?: VoidFunction;
|
|
10
|
+
onRemove?: VoidFunction;
|
|
11
11
|
}
|
|
12
12
|
export declare function FetchingWrappedEntryCard(props: FetchingWrappedEntryCardProps): JSX.Element;
|
|
13
13
|
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 contenful rich text document to the corresponding slate editor
|
|
17
|
+
* value
|
|
18
|
+
*/
|
|
19
|
+
export declare const documentToEditorValue: (doc: any) => any;
|
|
20
|
+
export declare const normalizeEditorValue: (value: Descendant[], options?: Pick<CreatePlateEditorOptions<RichTextEditor>, "plugins" | "disableCorePlugins" | "components" | "overrideByKey"> | undefined) => Descendant[] & any[];
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { FieldExtensionSDK } from '@contentful/app-sdk';
|
|
2
|
-
import {
|
|
2
|
+
import { RichTextTrackingActionHandler } from '../plugins/Tracking';
|
|
3
|
+
import { RichTextEditor, RichTextPlugin } from '../types';
|
|
4
|
+
export declare const normalize: (editor: RichTextEditor) => void;
|
|
3
5
|
export declare const createTestEditor: (options: {
|
|
4
|
-
input
|
|
6
|
+
input?: any;
|
|
5
7
|
sdk?: FieldExtensionSDK;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
trackingHandler?: RichTextTrackingActionHandler;
|
|
9
|
+
plugins?: RichTextPlugin[];
|
|
10
|
+
}) => {
|
|
11
|
+
editor: import("@udecode/plate-core").PlateEditor<RichTextEditor>;
|
|
12
|
+
normalize: () => void;
|
|
13
|
+
};
|
package/dist/test-utils/jsx.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mapping for JSX => Slate Node types
|
|
3
3
|
*
|
|
4
|
-
* Add items as needed.
|
|
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 "editor" | "text" | "selection" | "element" | "focus" | "anchor" | "cursor" | "fragment">(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: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function validateRichTextDocument(document: any): never[];
|
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { RenderElementProps
|
|
4
|
-
|
|
1
|
+
import { MARKS } from '@contentful/rich-text-types';
|
|
2
|
+
import { PlateEditor, PlatePlugin } from '@udecode/plate-core';
|
|
3
|
+
import { RenderElementProps } from 'slate-react';
|
|
4
|
+
import type { SoftBreakRule, ExitBreakRule, ResetNodePluginRule } from './plugins/Break';
|
|
5
|
+
import type { NormalizerRule } from './plugins/Normalizer';
|
|
6
|
+
import { TrackingPluginActions } from './plugins/Tracking';
|
|
7
|
+
export declare type CustomText = {
|
|
5
8
|
text: string;
|
|
9
|
+
[MARKS.BOLD]?: boolean;
|
|
10
|
+
[MARKS.CODE]?: boolean;
|
|
11
|
+
[MARKS.ITALIC]?: boolean;
|
|
12
|
+
[MARKS.UNDERLINE]?: boolean;
|
|
6
13
|
};
|
|
7
|
-
export declare type TextOrCustomElement = CustomElement |
|
|
14
|
+
export declare type TextOrCustomElement = CustomElement | CustomText;
|
|
8
15
|
export declare type CustomElement<T = unknown> = {
|
|
9
16
|
type: string;
|
|
10
17
|
children: TextOrCustomElement[];
|
|
@@ -14,12 +21,30 @@ export declare type CustomElement<T = unknown> = {
|
|
|
14
21
|
export declare type CustomRenderElementProps<T = any, O = any> = Omit<RenderElementProps, 'element'> & {
|
|
15
22
|
element: CustomElement<T>;
|
|
16
23
|
} & O;
|
|
17
|
-
export interface CustomPluginOptions extends Omit<PlatePluginOptions, 'component'> {
|
|
18
|
-
component?: React.FunctionComponent<CustomRenderElementProps> | React.FunctionComponent<RenderLeafProps>;
|
|
19
|
-
}
|
|
20
|
-
export declare type CustomSlatePluginOptions = Record<string, CustomPluginOptions>;
|
|
21
24
|
declare module 'slate' {
|
|
22
25
|
interface CustomTypes {
|
|
23
26
|
Element: CustomElement;
|
|
27
|
+
Text: CustomText;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
30
|
+
export interface RichTextPlugin extends PlatePlugin<RichTextEditor> {
|
|
31
|
+
/**
|
|
32
|
+
* @see createSoftBreakPlugin
|
|
33
|
+
*/
|
|
34
|
+
softBreak?: SoftBreakRule[];
|
|
35
|
+
/**
|
|
36
|
+
* @see createExitBreakPlugin
|
|
37
|
+
*/
|
|
38
|
+
exitBreak?: ExitBreakRule[];
|
|
39
|
+
/**
|
|
40
|
+
* @see createResetNodePlugin
|
|
41
|
+
*/
|
|
42
|
+
resetNode?: ResetNodePluginRule[];
|
|
43
|
+
/**
|
|
44
|
+
* @see createNormalizerPlugin
|
|
45
|
+
*/
|
|
46
|
+
normalizer?: NormalizerRule[];
|
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.22",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"tag": "next"
|
|
6
6
|
},
|
|
@@ -27,27 +27,35 @@
|
|
|
27
27
|
"prepublishOnly": "yarn build"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@contentful/contentful-slatejs-adapter": "^15.
|
|
31
|
-
"@contentful/f36-components": "
|
|
32
|
-
"@contentful/f36-icons": "
|
|
33
|
-
"@contentful/f36-tokens": "
|
|
34
|
-
"@contentful/field-editor-reference": "^4.0.
|
|
35
|
-
"@contentful/field-editor-shared": "^1.0.
|
|
36
|
-
"@contentful/rich-text-plain-text-renderer": "^15.
|
|
37
|
-
"@contentful/rich-text-types": "^15.
|
|
38
|
-
"@udecode/plate": "^
|
|
39
|
-
"@udecode/plate-
|
|
30
|
+
"@contentful/contentful-slatejs-adapter": "^15.11.0",
|
|
31
|
+
"@contentful/f36-components": "^4.0.33",
|
|
32
|
+
"@contentful/f36-icons": "^4.1.1",
|
|
33
|
+
"@contentful/f36-tokens": "^4.0.0",
|
|
34
|
+
"@contentful/field-editor-reference": "^4.0.7",
|
|
35
|
+
"@contentful/field-editor-shared": "^1.0.3",
|
|
36
|
+
"@contentful/rich-text-plain-text-renderer": "^15.11.1",
|
|
37
|
+
"@contentful/rich-text-types": "^15.11.1",
|
|
38
|
+
"@udecode/plate-basic-marks": "^10.4.0",
|
|
39
|
+
"@udecode/plate-break": "^10.4.0",
|
|
40
|
+
"@udecode/plate-core": "^10.4.0",
|
|
41
|
+
"@udecode/plate-list": "^10.4.0",
|
|
42
|
+
"@udecode/plate-paragraph": "^10.4.0",
|
|
43
|
+
"@udecode/plate-reset-node": "^10.4.0",
|
|
44
|
+
"@udecode/plate-select": "^10.4.0",
|
|
45
|
+
"@udecode/plate-serializer-docx": "^10.4.0",
|
|
46
|
+
"@udecode/plate-table": "^10.4.0",
|
|
47
|
+
"@udecode/plate-trailing-block": "^10.4.0",
|
|
40
48
|
"fast-deep-equal": "^3.1.3",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
49
|
+
"is-hotkey": "^0.2.0",
|
|
50
|
+
"is-plain-obj": "^3.0.0",
|
|
51
|
+
"slate": "^0.72.8",
|
|
43
52
|
"slate-history": "^0.66.0",
|
|
44
53
|
"slate-hyperscript": "^0.67.0",
|
|
45
|
-
"slate-react": "^0.
|
|
54
|
+
"slate-react": "^0.72.9"
|
|
46
55
|
},
|
|
47
56
|
"peerDependencies": {
|
|
48
57
|
"react": ">=16.14.0",
|
|
49
|
-
"react-dom": ">=16.14.0"
|
|
50
|
-
"slate": "^0.66.1"
|
|
58
|
+
"react-dom": ">=16.14.0"
|
|
51
59
|
},
|
|
52
60
|
"devDependencies": {
|
|
53
61
|
"@babel/core": "^7.9.6",
|
|
@@ -59,6 +67,9 @@
|
|
|
59
67
|
"@babel/preset-env": "7.12.11",
|
|
60
68
|
"@babel/preset-react": "7.13.13",
|
|
61
69
|
"@contentful/field-editor-test-utils": "^1.0.0",
|
|
62
|
-
"@contentful/rich-text-react-renderer": "^15.
|
|
70
|
+
"@contentful/rich-text-react-renderer": "^15.11.0",
|
|
71
|
+
"@types/is-hotkey": "^0.1.6",
|
|
72
|
+
"@udecode/plate-test-utils": "^3.2.0",
|
|
73
|
+
"react": ">=16.14.0"
|
|
63
74
|
}
|
|
64
75
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare type RichTextTrackingActionName = 'insertTable' | 'insertTableRow' | 'insertTableColumn' | 'removeTable' | 'removeTableRow' | 'removeTableColumn' | 'paste';
|
|
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,3 +0,0 @@
|
|
|
1
|
-
import { Deserialize, GetNodeDeserializerRule } from '@udecode/plate';
|
|
2
|
-
export declare function deserializeLeaf(type: string, rules: GetNodeDeserializerRule[]): Deserialize;
|
|
3
|
-
export declare function deserializeElement(type: string, rules: GetNodeDeserializerRule[]): Deserialize;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { NodeEntry } from 'slate';
|
|
2
|
-
import { PlateEditor } from '@udecode/plate-core';
|
|
3
|
-
import { CustomElement } from '../types';
|
|
4
|
-
export declare type Normalizer = (editor: PlateEditor, entry: NodeEntry<CustomElement>) => true | undefined;
|
|
5
|
-
/**
|
|
6
|
-
* Injects a custom element normalization handler.
|
|
7
|
-
*
|
|
8
|
-
* Handlers must explicity return "true" to indicate a pass.
|
|
9
|
-
* A pass is when a handler didn't encounter any normalization
|
|
10
|
-
* paths (i.e. all nodes were valid)
|
|
11
|
-
*
|
|
12
|
-
* Important read:
|
|
13
|
-
* https://docs.slatejs.org/concepts/11-normalizing#multi-pass-normalizing
|
|
14
|
-
*/
|
|
15
|
-
export declare const withNormalizer: (editor: PlateEditor, handler: Normalizer) => void;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BLOCKS, INLINES, Text } from '@contentful/rich-text-types';
|
|
2
|
-
import { TextOrCustomElement } from 'types';
|
|
3
|
-
declare type NodeType = BLOCKS | INLINES | Text['nodeType'];
|
|
4
|
-
/**
|
|
5
|
-
* Ensures "orphaned" text node elements (those without a parent capable of
|
|
6
|
-
* validly rendering a text child node) are wrapped with a suitable parent
|
|
7
|
-
* element to prevent failures on the validation layer.
|
|
8
|
-
*
|
|
9
|
-
* It is commonplace for third party plugins (including udecode) to reconcile
|
|
10
|
-
* deletion events by inserting such nodes into their schema. This
|
|
11
|
-
* subprocedure is intended as a guard against such cases.
|
|
12
|
-
*/
|
|
13
|
-
export declare function sanitizeSlateDoc(nodes?: TextOrCustomElement[], parentNodeType?: NodeType): TextOrCustomElement[];
|
|
14
|
-
/**
|
|
15
|
-
* Ensures incoming void nodes have a child leaf text element.
|
|
16
|
-
*/
|
|
17
|
-
export declare function sanitizeIncomingSlateDoc(nodes?: TextOrCustomElement[]): TextOrCustomElement[];
|
|
18
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function truncate(str: any, length: any): any;
|
|
@@ -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 ToolbarBoldButtonProps {
|
|
6
|
-
isDisabled?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function ToolbarBoldButton(props: ToolbarBoldButtonProps): JSX.Element | null;
|
|
9
|
-
export declare function Bold(props: Slate.RenderLeafProps): JSX.Element;
|
|
10
|
-
export declare function createBoldPlugin(): PlatePlugin;
|
|
11
|
-
export declare const withBoldOptions: CustomSlatePluginOptions;
|
|
12
|
-
export {};
|
|
@@ -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 ToolbarCodeButtonProps {
|
|
6
|
-
isDisabled?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function ToolbarCodeButton(props: ToolbarCodeButtonProps): JSX.Element | null;
|
|
9
|
-
export declare function Code(props: Slate.RenderLeafProps): JSX.Element;
|
|
10
|
-
export declare function createCodePlugin(): PlatePlugin;
|
|
11
|
-
export declare const withCodeOptions: CustomSlatePluginOptions;
|
|
12
|
-
export {};
|