@atlaskit/editor-core 150.0.2 → 151.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/dist/cjs/actions/index.js +5 -23
- package/dist/cjs/create-editor/ErrorBoundary.js +113 -79
- package/dist/cjs/create-editor/ReactEditorView.js +145 -31
- package/dist/cjs/create-editor/create-plugins-list.js +8 -2
- package/dist/cjs/editor.js +101 -40
- package/dist/cjs/labs/next/presets/cxhtml.js +2 -1
- package/dist/cjs/plugins/analytics/types/enums.js +3 -1
- package/dist/cjs/plugins/base/index.js +4 -3
- package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +66 -36
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -1
- package/dist/cjs/plugins/card/index.js +13 -2
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +1 -0
- package/dist/cjs/plugins/card/pm-plugins/main.js +7 -2
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +10 -3
- package/dist/cjs/plugins/code-bidi-warning/index.js +25 -0
- package/dist/cjs/plugins/code-bidi-warning/plugin-key.js +11 -0
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/main.js +43 -0
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +118 -0
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/reducer.js +12 -0
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/types.js +5 -0
- package/dist/cjs/plugins/code-block/index.js +10 -6
- package/dist/cjs/plugins/code-block/nodeviews/highlighting-code-block.js +16 -5
- package/dist/cjs/plugins/code-block/pm-plugins/main.js +12 -3
- package/dist/cjs/plugins/code-block/toolbar.js +1 -1
- package/dist/cjs/plugins/emoji/styles.js +1 -1
- package/dist/cjs/plugins/extension/pm-plugins/main.js +1 -4
- package/dist/cjs/plugins/extension/toolbar.js +28 -23
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +9 -3
- package/dist/cjs/plugins/find-replace/ui/Find.js +27 -7
- package/dist/cjs/plugins/hyperlink/HyperlinkToolbarAppearance.js +2 -2
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +3 -3
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
- package/dist/cjs/plugins/hyperlink/utils.js +6 -69
- package/dist/cjs/plugins/index.js +8 -0
- package/dist/cjs/plugins/media/index.js +14 -3
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +24 -10
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +179 -0
- package/dist/cjs/plugins/media/pm-plugins/main.js +18 -9
- package/dist/cjs/plugins/media/toolbar/index.js +49 -17
- package/dist/cjs/plugins/media/toolbar/utils.js +20 -2
- package/dist/cjs/plugins/media/utils/media-files.js +67 -1
- package/dist/cjs/plugins/mentions/type-ahead/index.js +39 -3
- package/dist/cjs/plugins/panel/index.js +2 -3
- package/dist/cjs/plugins/panel/message.js +47 -0
- package/dist/cjs/plugins/panel/toolbar.js +64 -84
- package/dist/cjs/plugins/panel/utils.js +2 -2
- package/dist/cjs/plugins/paste/linkify-md-plugin.js +3 -3
- package/dist/cjs/plugins/rank.js +1 -1
- package/dist/cjs/plugins/status/styles.js +1 -1
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
- package/dist/cjs/profiler/render-count.js +82 -0
- package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -5
- package/dist/cjs/utils/react-hooks/use-component-renderer-tracking/index.js +55 -19
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +6 -28
- package/dist/es2019/create-editor/ErrorBoundary.js +73 -60
- package/dist/es2019/create-editor/ReactEditorView.js +130 -23
- package/dist/es2019/create-editor/create-plugins-list.js +9 -3
- package/dist/es2019/editor.js +74 -35
- package/dist/es2019/labs/next/presets/cxhtml.js +2 -1
- package/dist/es2019/plugins/analytics/types/enums.js +3 -1
- package/dist/es2019/plugins/base/index.js +4 -3
- package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +63 -35
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -1
- package/dist/es2019/plugins/card/index.js +7 -2
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +1 -0
- package/dist/es2019/plugins/card/pm-plugins/main.js +9 -2
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +12 -5
- package/dist/es2019/plugins/code-bidi-warning/index.js +15 -0
- package/dist/es2019/plugins/code-bidi-warning/plugin-key.js +2 -0
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/main.js +31 -0
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +88 -0
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/reducer.js +3 -0
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/types.js +1 -0
- package/dist/es2019/plugins/code-block/index.js +6 -1
- package/dist/es2019/plugins/code-block/nodeviews/highlighting-code-block.js +16 -4
- package/dist/es2019/plugins/code-block/pm-plugins/main.js +50 -39
- package/dist/es2019/plugins/code-block/toolbar.js +1 -1
- package/dist/es2019/plugins/emoji/styles.js +2 -0
- package/dist/es2019/plugins/extension/pm-plugins/main.js +1 -4
- package/dist/es2019/plugins/extension/toolbar.js +30 -25
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +9 -4
- package/dist/es2019/plugins/find-replace/ui/Find.js +27 -6
- package/dist/es2019/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -1
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -1
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
- package/dist/es2019/plugins/hyperlink/utils.js +3 -59
- package/dist/es2019/plugins/index.js +2 -1
- package/dist/es2019/plugins/media/index.js +13 -4
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +16 -7
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +88 -0
- package/dist/es2019/plugins/media/pm-plugins/main.js +20 -11
- package/dist/es2019/plugins/media/toolbar/index.js +44 -15
- package/dist/es2019/plugins/media/toolbar/utils.js +16 -0
- package/dist/es2019/plugins/media/utils/media-files.js +68 -2
- package/dist/es2019/plugins/mentions/type-ahead/index.js +21 -2
- package/dist/es2019/plugins/panel/index.js +3 -4
- package/dist/es2019/plugins/panel/message.js +38 -0
- package/dist/es2019/plugins/panel/toolbar.js +52 -71
- package/dist/es2019/plugins/panel/utils.js +2 -2
- package/dist/es2019/plugins/paste/linkify-md-plugin.js +2 -2
- package/dist/es2019/plugins/rank.js +1 -1
- package/dist/es2019/plugins/status/styles.js +2 -0
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
- package/dist/es2019/profiler/render-count.js +60 -0
- package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -2
- package/dist/es2019/utils/react-hooks/use-component-renderer-tracking/index.js +51 -18
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +6 -24
- package/dist/esm/create-editor/ErrorBoundary.js +113 -78
- package/dist/esm/create-editor/ReactEditorView.js +146 -31
- package/dist/esm/create-editor/create-plugins-list.js +9 -3
- package/dist/esm/editor.js +100 -40
- package/dist/esm/labs/next/presets/cxhtml.js +2 -1
- package/dist/esm/plugins/analytics/types/enums.js +3 -1
- package/dist/esm/plugins/base/index.js +4 -3
- package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +64 -36
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -1
- package/dist/esm/plugins/card/index.js +13 -2
- package/dist/esm/plugins/card/nodeviews/embedCard.js +1 -0
- package/dist/esm/plugins/card/pm-plugins/main.js +7 -2
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +12 -5
- package/dist/esm/plugins/code-bidi-warning/index.js +17 -0
- package/dist/esm/plugins/code-bidi-warning/plugin-key.js +2 -0
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/main.js +30 -0
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +96 -0
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/reducer.js +3 -0
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/types.js +1 -0
- package/dist/esm/plugins/code-block/index.js +10 -6
- package/dist/esm/plugins/code-block/nodeviews/highlighting-code-block.js +16 -5
- package/dist/esm/plugins/code-block/pm-plugins/main.js +11 -3
- package/dist/esm/plugins/code-block/toolbar.js +1 -1
- package/dist/esm/plugins/emoji/styles.js +1 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +1 -4
- package/dist/esm/plugins/extension/toolbar.js +28 -23
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +9 -4
- package/dist/esm/plugins/find-replace/ui/Find.js +27 -7
- package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +2 -2
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
- package/dist/esm/plugins/hyperlink/utils.js +3 -59
- package/dist/esm/plugins/index.js +2 -1
- package/dist/esm/plugins/media/index.js +14 -4
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +24 -10
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +147 -0
- package/dist/esm/plugins/media/pm-plugins/main.js +19 -11
- package/dist/esm/plugins/media/toolbar/index.js +47 -19
- package/dist/esm/plugins/media/toolbar/utils.js +15 -1
- package/dist/esm/plugins/media/utils/media-files.js +60 -2
- package/dist/esm/plugins/mentions/type-ahead/index.js +39 -3
- package/dist/esm/plugins/panel/index.js +3 -4
- package/dist/esm/plugins/panel/message.js +38 -0
- package/dist/esm/plugins/panel/toolbar.js +57 -77
- package/dist/esm/plugins/panel/utils.js +2 -2
- package/dist/esm/plugins/paste/linkify-md-plugin.js +2 -2
- package/dist/esm/plugins/rank.js +1 -1
- package/dist/esm/plugins/status/styles.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
- package/dist/esm/profiler/render-count.js +57 -0
- package/dist/esm/ui/Appearance/Comment/Comment.js +6 -5
- package/dist/esm/utils/react-hooks/use-component-renderer-tracking/index.js +53 -20
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +6 -6
- package/dist/types/create-editor/ReactEditorView.d.ts +15 -3
- package/dist/types/editor.d.ts +2 -0
- package/dist/types/plugins/analytics/index.d.ts +1 -1
- package/dist/types/plugins/analytics/types/enums.d.ts +4 -2
- package/dist/types/plugins/analytics/types/events.d.ts +7 -2
- package/dist/types/plugins/analytics/types/general-events.d.ts +4 -1
- package/dist/types/plugins/analytics/types/index.d.ts +1 -1
- package/dist/types/plugins/analytics/types/insert-events.d.ts +6 -1
- package/dist/types/plugins/analytics/types/link-tool-bar-events.d.ts +1 -0
- package/dist/types/plugins/base/index.d.ts +1 -0
- package/dist/types/plugins/base/pm-plugins/frozen-editor.d.ts +3 -2
- package/dist/types/plugins/card/pm-plugins/main.d.ts +2 -3
- package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +2 -1
- package/dist/types/plugins/card/types.d.ts +6 -0
- package/dist/types/plugins/code-bidi-warning/index.d.ts +3 -0
- package/dist/types/plugins/code-bidi-warning/plugin-key.d.ts +2 -0
- package/dist/types/plugins/code-bidi-warning/pm-plugins/main.d.ts +3 -0
- package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +7 -0
- package/dist/types/plugins/code-bidi-warning/pm-plugins/reducer.d.ts +3 -0
- package/dist/types/plugins/code-bidi-warning/pm-plugins/types.d.ts +5 -0
- package/dist/types/plugins/code-block/nodeviews/highlighting-code-block.d.ts +11 -2
- package/dist/types/plugins/code-block/pm-plugins/main.d.ts +5 -1
- package/dist/types/plugins/extension/types.d.ts +0 -2
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/types.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +1 -1
- package/dist/types/plugins/hyperlink/HyperlinkToolbarAppearance.d.ts +1 -1
- package/dist/types/plugins/hyperlink/utils.d.ts +0 -21
- package/dist/types/plugins/index.d.ts +1 -0
- package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +27 -0
- package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -2
- package/dist/types/plugins/media/toolbar/utils.d.ts +2 -0
- package/dist/types/plugins/media/utils/media-files.d.ts +8 -0
- package/dist/types/plugins/panel/message.d.ts +37 -0
- package/dist/types/plugins/panel/toolbar.d.ts +4 -37
- package/dist/types/plugins/panel/types.d.ts +1 -0
- package/dist/types/profiler/render-count.d.ts +14 -0
- package/dist/types/types/feature-flags.d.ts +17 -0
- package/dist/types/ui/LinkSearch/types.d.ts +1 -0
- package/dist/types/utils/react-hooks/use-component-renderer-tracking/index.d.ts +17 -1
- package/package.json +21 -18
- package/dist/cjs/plugins/caption/nodeviews/index.test.js +0 -135
- package/dist/cjs/plugins/caption/pm-plugins/keymap.test.js +0 -203
- package/dist/cjs/plugins/caption/pm-plugins/main.test.js +0 -141
- package/dist/cjs/plugins/code-block/language-list.test.js +0 -74
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -101
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -98
- package/dist/cjs/plugins/media/commands/captions.test.js +0 -149
- package/dist/cjs/plugins/media/commands/linking.test.js +0 -296
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -50
- package/dist/cjs/plugins/panel/toolbar.test.js +0 -250
- package/dist/cjs/ui/ColorPickerButton/index.test.js +0 -123
- package/dist/cjs/ui/PortalProvider/index.test.js +0 -139
- package/dist/es2019/plugins/caption/nodeviews/index.test.js +0 -122
- package/dist/es2019/plugins/caption/pm-plugins/keymap.test.js +0 -193
- package/dist/es2019/plugins/caption/pm-plugins/main.test.js +0 -132
- package/dist/es2019/plugins/code-block/language-list.test.js +0 -69
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -83
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -85
- package/dist/es2019/plugins/media/commands/captions.test.js +0 -126
- package/dist/es2019/plugins/media/commands/linking.test.js +0 -208
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -41
- package/dist/es2019/plugins/panel/toolbar.test.js +0 -200
- package/dist/es2019/ui/ColorPickerButton/index.test.js +0 -88
- package/dist/es2019/ui/PortalProvider/index.test.js +0 -115
- package/dist/esm/plugins/caption/nodeviews/index.test.js +0 -125
- package/dist/esm/plugins/caption/pm-plugins/keymap.test.js +0 -195
- package/dist/esm/plugins/caption/pm-plugins/main.test.js +0 -124
- package/dist/esm/plugins/code-block/language-list.test.js +0 -71
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -92
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -85
- package/dist/esm/plugins/media/commands/captions.test.js +0 -135
- package/dist/esm/plugins/media/commands/linking.test.js +0 -268
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -41
- package/dist/esm/plugins/panel/toolbar.test.js +0 -230
- package/dist/esm/ui/ColorPickerButton/index.test.js +0 -107
- package/dist/esm/ui/PortalProvider/index.test.js +0 -129
|
@@ -3,8 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { EditorState } from 'prosemirror-state';
|
|
5
5
|
import { DirectEditorProps, EditorView } from 'prosemirror-view';
|
|
6
|
+
import { Node as PMNode } from 'prosemirror-model';
|
|
6
7
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
8
|
import { ErrorReporter, ProviderFactory, Transformer } from '@atlaskit/editor-common';
|
|
9
|
+
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
8
10
|
import { Dispatch, EventDispatcher } from '../event-dispatcher';
|
|
9
11
|
import { AnalyticsEventPayload, DispatchAnalyticsEvent, FULL_WIDTH_MODE } from '../plugins/analytics';
|
|
10
12
|
import { EditorAppearance, EditorConfig, EditorReactContext, EditorPlugin, EditorProps } from '../types';
|
|
@@ -19,6 +21,7 @@ export interface EditorViewProps {
|
|
|
19
21
|
portalProviderAPI: PortalProviderAPI;
|
|
20
22
|
allowAnalyticsGASV3?: boolean;
|
|
21
23
|
disabled?: boolean;
|
|
24
|
+
experienceStore?: ExperienceStore;
|
|
22
25
|
render?: (props: {
|
|
23
26
|
editor: JSX.Element;
|
|
24
27
|
view?: EditorView;
|
|
@@ -52,12 +55,14 @@ export default class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
52
55
|
proseMirrorRenderedSeverity?: SEVERITY;
|
|
53
56
|
transactionTracker: TransactionTracker;
|
|
54
57
|
validTransactionCount: number;
|
|
58
|
+
experienceStore?: ExperienceStore;
|
|
55
59
|
static contextTypes: {
|
|
56
60
|
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<any>;
|
|
57
61
|
intl: ReactIntl.IntlShape;
|
|
58
62
|
};
|
|
59
63
|
private canDispatchTransactions;
|
|
60
|
-
private focusTimeoutId
|
|
64
|
+
private focusTimeoutId?;
|
|
65
|
+
private reliabilityInterval?;
|
|
61
66
|
private pluginPerformanceObserver;
|
|
62
67
|
private featureFlags;
|
|
63
68
|
private onPluginObservation;
|
|
@@ -67,6 +72,11 @@ export default class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
67
72
|
constructor(props: EditorViewProps & T, context: EditorReactContext);
|
|
68
73
|
UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
|
|
69
74
|
formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
|
|
75
|
+
resetEditorState: ({ doc, shouldScrollToBottom, }: {
|
|
76
|
+
doc: string;
|
|
77
|
+
shouldScrollToBottom: boolean;
|
|
78
|
+
}) => void;
|
|
79
|
+
blur: () => void;
|
|
70
80
|
reconfigureState: (props: EditorViewProps) => void;
|
|
71
81
|
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
72
82
|
componentDidMount(): void;
|
|
@@ -78,13 +88,15 @@ export default class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
78
88
|
createEditorState: (options: {
|
|
79
89
|
props: EditorViewProps;
|
|
80
90
|
context: EditorReactContext;
|
|
81
|
-
|
|
91
|
+
doc?: string | Object | PMNode<any> | undefined;
|
|
92
|
+
resetting?: boolean | undefined;
|
|
93
|
+
selectionAtStart?: boolean | undefined;
|
|
82
94
|
}) => EditorState<any>;
|
|
83
95
|
private onEditorViewStateUpdated;
|
|
84
96
|
private trackValidTransactions;
|
|
85
97
|
private dispatchTransaction;
|
|
86
98
|
getDirectEditorProps: (state?: EditorState<any> | undefined) => DirectEditorProps;
|
|
87
|
-
createEditorView
|
|
99
|
+
private createEditorView;
|
|
88
100
|
handleEditorViewRef: (node: HTMLDivElement) => void;
|
|
89
101
|
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
|
|
90
102
|
private editor;
|
package/dist/types/editor.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export default class Editor extends React.Component<EditorProps, State> {
|
|
|
27
27
|
private editorActions;
|
|
28
28
|
private createAnalyticsEvent?;
|
|
29
29
|
private editorSessionId;
|
|
30
|
+
private experienceStore?;
|
|
31
|
+
private startTime?;
|
|
30
32
|
constructor(props: EditorProps, context: Context);
|
|
31
33
|
componentDidMount(): void;
|
|
32
34
|
componentDidUpdate(prevProps: EditorProps): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import analyticsPlugin from './plugin';
|
|
2
2
|
export { ACTION_SUBJECT_ID, ACTION_SUBJECT, ACTION, BROWSER_FREEZE_INTERACTION_TYPE, EVENT_TYPE, FULL_WIDTH_MODE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, MODE, PasteContents, PasteSources, PasteTypes, PLATFORMS, PUNC, SYMBOL, TABLE_ACTION, TABLE_BREAKOUT, TRIGGER_METHOD, USER_CONTEXT, DELETE_DIRECTION, LIST_TEXT_SCENARIOS, } from './types';
|
|
3
|
-
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, CommonListAnalyticsAttributes, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, ErrorEventPayload, FormatEventPayload, GeneralEventPayload, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, SubstituteEventPayload, TableEventPayload, } from './types';
|
|
3
|
+
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, CommonListAnalyticsAttributes, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, ErrorEventPayload, ErrorEventAttributes, FormatEventPayload, GeneralEventPayload, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, SubstituteEventPayload, TableEventPayload, } from './types';
|
|
4
4
|
export { withAnalytics, addAnalytics, findInsertLocation, getAnalyticsEventsFromTransaction, getSelectionType, getStateContext, mapActionSubjectIdToAttributes, } from './utils';
|
|
5
5
|
export declare const analyticsPluginKey: import("prosemirror-state").PluginKey<any, any>;
|
|
6
6
|
export default analyticsPlugin;
|
|
@@ -88,7 +88,8 @@ export declare enum ACTION {
|
|
|
88
88
|
RENDERED = "rendered",
|
|
89
89
|
ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
|
|
90
90
|
ON_CHANGE_CALLBACK = "onChangeCalled",
|
|
91
|
-
REMOVE_ICON = "removedIcon"
|
|
91
|
+
REMOVE_ICON = "removedIcon",
|
|
92
|
+
UFO_SESSION_COMPLETE = "ufoSessionComplete"
|
|
92
93
|
}
|
|
93
94
|
export declare enum INPUT_METHOD {
|
|
94
95
|
ASCII = "ascii",
|
|
@@ -217,8 +218,9 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
217
218
|
LINK = "link",
|
|
218
219
|
LINK_PREVIEW = "linkPreview",
|
|
219
220
|
MEDIA = "media",
|
|
220
|
-
MEDIA_SINGLE = "mediaSingle",
|
|
221
221
|
MEDIA_GROUP = "mediaGroup",
|
|
222
|
+
MEDIA_INLINE = "mediaInline",
|
|
223
|
+
MEDIA_SINGLE = "mediaSingle",
|
|
222
224
|
MEDIA_LINK = "mediaLink",
|
|
223
225
|
MENTION = "mention",
|
|
224
226
|
NESTED_EXPAND = "nestedExpand",
|
|
@@ -77,7 +77,7 @@ declare type ContentComponentErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SU
|
|
|
77
77
|
position: number;
|
|
78
78
|
docSize: number;
|
|
79
79
|
}, undefined>;
|
|
80
|
-
declare type
|
|
80
|
+
export declare type ErrorEventAttributes = {
|
|
81
81
|
error: Error;
|
|
82
82
|
errorInfo: React.ErrorInfo;
|
|
83
83
|
product?: string;
|
|
@@ -85,6 +85,11 @@ declare type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTI
|
|
|
85
85
|
errorId?: string;
|
|
86
86
|
docStructure?: string | SimplifiedNode;
|
|
87
87
|
browserExtensions?: UserBrowserExtensionResults;
|
|
88
|
+
};
|
|
89
|
+
declare type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, ErrorEventAttributes, undefined>;
|
|
90
|
+
declare type ComponentCrashAdditionalInfoErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED_ADDITIONAL_INFORMATION, ACTION_SUBJECT.EDITOR, undefined, {
|
|
91
|
+
errorStack: string;
|
|
92
|
+
errorId: string;
|
|
88
93
|
}, undefined>;
|
|
89
|
-
export declare type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | ComponentCrashErrorAEP;
|
|
94
|
+
export declare type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP;
|
|
90
95
|
export {};
|
|
@@ -57,6 +57,9 @@ declare type EditorRenderedAEP<T> = OperationalAEP<ACTION.RE_RENDERED, ACTION_SU
|
|
|
57
57
|
propsDifference: PropsDifference<T> | ShallowPropsDifference<T>;
|
|
58
58
|
count: number;
|
|
59
59
|
}, undefined>;
|
|
60
|
+
export declare type UfoSessionCompletePayloadAEP = OperationalAEP<ACTION.UFO_SESSION_COMPLETE, ACTION_SUBJECT.EDITOR, undefined, {
|
|
61
|
+
interval: number;
|
|
62
|
+
}, undefined>;
|
|
60
63
|
declare type BrowserFreezePayload = OperationalAEPWithObjectId<ACTION.BROWSER_FREEZE, ACTION_SUBJECT.EDITOR, undefined, {
|
|
61
64
|
freezeTime: number;
|
|
62
65
|
nodeSize: number;
|
|
@@ -145,5 +148,5 @@ declare type RichMediaLayoutAEP = TrackAEP<ACTION.SELECTED, ACTION_SUBJECT.MEDIA
|
|
|
145
148
|
declare type CodeBlockLanguageSelectedAEP = TrackAEP<ACTION.LANGUAGE_SELECTED, ACTION_SUBJECT.CODE_BLOCK, undefined, {
|
|
146
149
|
language: string;
|
|
147
150
|
}, undefined>;
|
|
148
|
-
export declare type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP;
|
|
151
|
+
export declare type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP;
|
|
149
152
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TRIGGER_METHOD, CONTENT_COMPONENT, FLOATING_CONTROLS_TITLE, } from './enums';
|
|
2
|
-
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, ErrorEventPayload, } from './events';
|
|
2
|
+
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, ErrorEventPayload, ErrorEventAttributes, } from './events';
|
|
3
3
|
export type { FormatEventPayload } from './format-events';
|
|
4
4
|
export type { SubstituteEventPayload } from './substitute-events';
|
|
5
5
|
export type { GeneralEventPayload } from './general-events';
|
|
@@ -76,6 +76,11 @@ declare type InsertMediaGroupAEP = InsertAEP<ACTION_SUBJECT_ID.MEDIA, {
|
|
|
76
76
|
fileExtension?: string;
|
|
77
77
|
type: ACTION_SUBJECT_ID.MEDIA_SINGLE | ACTION_SUBJECT_ID.MEDIA_GROUP;
|
|
78
78
|
}, undefined>;
|
|
79
|
+
declare type InsertMediaInlineAEP = InsertAEP<ACTION_SUBJECT_ID.MEDIA, {
|
|
80
|
+
inputMethod?: InputMethodInsertMedia;
|
|
81
|
+
fileExtension?: string;
|
|
82
|
+
type: ACTION_SUBJECT_ID.MEDIA_INLINE;
|
|
83
|
+
}, undefined>;
|
|
79
84
|
export declare type InputMethodInsertLink = INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.CLIPBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.AUTO_DETECT | INPUT_METHOD.MANUAL;
|
|
80
85
|
declare type InsertLinkAEP = InsertAEP<ACTION_SUBJECT_ID.LINK, {
|
|
81
86
|
inputMethod: InputMethodInsertLink;
|
|
@@ -119,5 +124,5 @@ declare type InsertNodeViaExtensionAPIAEP = InsertAEP<undefined, {
|
|
|
119
124
|
declare type InsertPlaceholderTextAEP = InsertAEP<ACTION_SUBJECT_ID.PLACEHOLDER_TEXT, {
|
|
120
125
|
inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU;
|
|
121
126
|
}, undefined>;
|
|
122
|
-
export declare type InsertEventPayload = InsertDividerAEP | InsertLineBreakAEP | InsertPanelAEP | InsertCodeBlockAEP | InsertTableAEP | InsertExpandAEP | InsertActionDecisionAEP | InsertEmojiAEP | InsertStatusAEP | InsertMediaSingleAEP | InsertMediaGroupAEP | InsertLinkAEP | InsertLinkPreviewAEP | InsertMediaLinkAEP | InsertSmartLinkAEP | InsertLayoutAEP | InsertExtensionAEP | InsertNodeViaExtensionAPIAEP | InsertDateAEP | InsertPlaceholderTextAEP;
|
|
127
|
+
export declare type InsertEventPayload = InsertDividerAEP | InsertLineBreakAEP | InsertPanelAEP | InsertCodeBlockAEP | InsertTableAEP | InsertExpandAEP | InsertActionDecisionAEP | InsertEmojiAEP | InsertStatusAEP | InsertMediaSingleAEP | InsertMediaGroupAEP | InsertMediaInlineAEP | InsertLinkAEP | InsertLinkPreviewAEP | InsertMediaLinkAEP | InsertSmartLinkAEP | InsertLayoutAEP | InsertExtensionAEP | InsertNodeViaExtensionAPIAEP | InsertDateAEP | InsertPlaceholderTextAEP;
|
|
123
128
|
export {};
|
|
@@ -67,6 +67,7 @@ export declare type SelectedSearchResultsAEP = UIAEP<ACTION.SELECTED, ACTION_SUB
|
|
|
67
67
|
resultCount: number;
|
|
68
68
|
selectedResultId: string;
|
|
69
69
|
selectedRelativePosition: number;
|
|
70
|
+
prefetch: boolean;
|
|
70
71
|
}, undefined>;
|
|
71
72
|
export declare type EditLinkToolbarAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.SMART_LINK | ACTION_SUBJECT.HYPERLINK, ACTION_SUBJECT_ID.EDIT_LINK, {}, undefined>;
|
|
72
73
|
export declare type UnlinkToolbarAEP = UIAEP<ACTION.UNLINK, ACTION_SUBJECT.SMART_LINK | ACTION_SUBJECT.HYPERLINK, ACTION_SUBJECT_ID.CARD_INLINE | undefined, {}, undefined>;
|
|
@@ -6,6 +6,7 @@ export interface BasePluginOptions {
|
|
|
6
6
|
allowInlineCursorTarget?: boolean;
|
|
7
7
|
inputTracking?: InputTracking;
|
|
8
8
|
browserFreezeTracking?: BrowserFreezetracking;
|
|
9
|
+
ufo?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare const isChromeWithSelectionBug: boolean;
|
|
11
12
|
declare const basePlugin: (options?: BasePluginOptions | undefined) => EditorPlugin;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Plugin } from 'prosemirror-state';
|
|
1
|
+
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
2
2
|
import { DispatchAnalyticsEvent } from '../../analytics';
|
|
3
3
|
import { InputTracking, BrowserFreezetracking } from '../../../types/performance-tracking';
|
|
4
|
+
export declare const frozenEditorPluginKey: PluginKey<any, any>;
|
|
4
5
|
export declare const DEFAULT_FREEZE_THRESHOLD = 600;
|
|
5
6
|
export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
6
7
|
export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
7
8
|
export declare const DEFAULT_TRACK_SEVERITY_THRESHOLD_NORMAL = 100;
|
|
8
9
|
export declare const DEFAULT_TRACK_SEVERITY_THRESHOLD_DEGRADED = 500;
|
|
9
|
-
declare const _default: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, inputTracking?: InputTracking | undefined, browserFreezeTracking?: BrowserFreezetracking | undefined) => Plugin<any, any>;
|
|
10
|
+
declare const _default: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, inputTracking?: InputTracking | undefined, browserFreezeTracking?: BrowserFreezetracking | undefined, ufo?: boolean | undefined) => Plugin<any, any>;
|
|
10
11
|
export default _default;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'prosemirror-state';
|
|
2
|
-
import {
|
|
2
|
+
import { CardPluginOptions } from '../types';
|
|
3
3
|
import { PMPluginFactoryParams } from '../../../types';
|
|
4
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
4
|
export { pluginKey } from './plugin-key';
|
|
6
|
-
export declare const createPlugin: (
|
|
5
|
+
export declare const createPlugin: (options: CardPluginOptions) => ({ portalProviderAPI, eventDispatcher, providerFactory, dispatchAnalyticsEvent, }: PMPluginFactoryParams) => Plugin<any, any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { OutstandingRequests, Request } from '../../types';
|
|
4
|
-
|
|
4
|
+
import { CardOptions } from '@atlaskit/editor-common';
|
|
5
|
+
export declare const resolveWithProvider: (view: EditorView, outstandingRequests: OutstandingRequests, provider: CardProvider, request: Request, options: CardOptions) => Promise<void | import("@atlaskit/smart-card").InlineCardAdf | import("@atlaskit/smart-card").BlockCardAdf | import("@atlaskit/smart-card").EmbedCardAdf>;
|
|
5
6
|
export declare const handleProvider: (_: 'cardProvider', provider: Promise<CardProvider> | undefined, view: EditorView) => void;
|
|
@@ -2,6 +2,7 @@ import { INPUT_METHOD, ACTION } from '../analytics/types/enums';
|
|
|
2
2
|
import { CardProvider, CardAppearance, CardAdf } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
4
4
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
|
+
import { CardOptions } from '@atlaskit/editor-common';
|
|
5
6
|
export declare type CardInfo = {
|
|
6
7
|
title?: string;
|
|
7
8
|
url?: string;
|
|
@@ -27,6 +28,11 @@ export declare type CardPluginState = {
|
|
|
27
28
|
smartLinkEvents?: SmartLinkEvents;
|
|
28
29
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
29
30
|
};
|
|
31
|
+
export declare type CardPluginOptions = CardOptions & {
|
|
32
|
+
platform: 'mobile' | 'web';
|
|
33
|
+
fullWidthMode?: boolean;
|
|
34
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
35
|
+
};
|
|
30
36
|
export declare type SetProvider = {
|
|
31
37
|
type: 'SET_PROVIDER';
|
|
32
38
|
provider: CardProvider | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DecorationSet } from 'prosemirror-view';
|
|
2
|
+
import { Node as PmNode } from 'prosemirror-model';
|
|
3
|
+
export declare const createPluginState: (dispatch: import("../../../event-dispatcher").Dispatch<any>, initialState: import("./types").CodeBidiWarningPluginState | ((state: import("prosemirror-state").EditorState<any>) => import("./types").CodeBidiWarningPluginState)) => import("prosemirror-state").StateField<import("./types").CodeBidiWarningPluginState, import("prosemirror-model").Schema<any, any>>, getPluginState: (state: import("prosemirror-state").EditorState<any>) => import("./types").CodeBidiWarningPluginState;
|
|
4
|
+
export declare function createBidiWarningsDecorationSetFromDoc({ doc, codeBidiWarningLabel, }: {
|
|
5
|
+
doc: PmNode<any>;
|
|
6
|
+
codeBidiWarningLabel: string;
|
|
7
|
+
}): DecorationSet<any>;
|
|
@@ -2,6 +2,10 @@ import { EditorView } from 'prosemirror-view';
|
|
|
2
2
|
import { Node } from 'prosemirror-model';
|
|
3
3
|
import { getPosHandlerNode, getPosHandler } from '../../../nodeviews/';
|
|
4
4
|
import React from 'react';
|
|
5
|
+
declare type CodeBidiWarningOptions = {
|
|
6
|
+
label: string;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
};
|
|
5
9
|
export declare class CodeBlockView {
|
|
6
10
|
node: Node;
|
|
7
11
|
dom: HTMLElement;
|
|
@@ -11,11 +15,12 @@ export declare class CodeBlockView {
|
|
|
11
15
|
highlighter: React.ReactElement | null;
|
|
12
16
|
getPos: getPosHandlerNode;
|
|
13
17
|
view: EditorView;
|
|
18
|
+
codeBidiWarningOptions: CodeBidiWarningOptions;
|
|
14
19
|
measurements: number[];
|
|
15
20
|
count: number;
|
|
16
21
|
shouldDebounce: boolean;
|
|
17
22
|
timer: number | null;
|
|
18
|
-
constructor(node: Node, view: EditorView, getPos: getPosHandlerNode);
|
|
23
|
+
constructor(node: Node, view: EditorView, getPos: getPosHandlerNode, codeBidiWarningOptions: CodeBidiWarningOptions);
|
|
19
24
|
private measure;
|
|
20
25
|
private highlight;
|
|
21
26
|
private ensureLineNumbers;
|
|
@@ -25,4 +30,8 @@ export declare class CodeBlockView {
|
|
|
25
30
|
target: Element;
|
|
26
31
|
}): boolean;
|
|
27
32
|
}
|
|
28
|
-
export declare const highlightingCodeBlockNodeView: (
|
|
33
|
+
export declare const highlightingCodeBlockNodeView: ({ codeBidiWarnings, codeBidiWarningLabel, }: {
|
|
34
|
+
codeBidiWarnings?: boolean | undefined;
|
|
35
|
+
codeBidiWarningLabel: string;
|
|
36
|
+
}) => (node: Node, view: EditorView, getPos: getPosHandler) => CodeBlockView;
|
|
37
|
+
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { Plugin } from 'prosemirror-state';
|
|
2
|
-
|
|
2
|
+
import { EditorReactContext } from '../../../types/editor-react-context';
|
|
3
|
+
export declare const createPlugin: ({ useLongPressSelection, reactContext, }: {
|
|
4
|
+
useLongPressSelection?: boolean | undefined;
|
|
5
|
+
reactContext: () => EditorReactContext;
|
|
6
|
+
}) => Plugin<any, any>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
2
1
|
import { ContextIdentifierProvider } from '@atlaskit/editor-common';
|
|
3
2
|
import { UpdateExtension, ExtensionProvider, Parameters, TransformBefore, TransformAfter } from '@atlaskit/editor-common/extensions';
|
|
4
3
|
export declare type ExtensionState<T extends Parameters = Parameters> = {
|
|
5
|
-
layout: ExtensionLayout;
|
|
6
4
|
localId?: string;
|
|
7
5
|
autoSaveResolve?: () => void;
|
|
8
6
|
showEditButton: boolean;
|
|
@@ -4,4 +4,4 @@ import type { FeatureFlags } from '../../types/feature-flags';
|
|
|
4
4
|
*
|
|
5
5
|
* Useful for analytics and analysis purposes.
|
|
6
6
|
*/
|
|
7
|
-
export declare function getEnabledFeatureFlagKeys(featureFlags: FeatureFlags): ("newInsertionBehaviour" | "interactiveExpand" | "placeholderBracketHint" | "placeholderHints" | "moreTextColors" | "findReplace" | "findReplaceMatchCase" | "extensionLocalIdGeneration" | "keyboardAccessibleDatepicker" | "addColumnWithCustomStep" | "undoRedoButtons" | "catchAllTracking" | "nextEmojiNodeView" | "stickyHeadersOptimization" | "initialRenderOptimization" | "mouseMoveOptimization" | "tableRenderOptimization" | "tableOverflowShadowsOptimization" | "codeBlockSyntaxHighlighting" | "queueAnalytics" | "extendFloatingToolbar" | "displayInlineBlockForInlineNodes" | "useUnpredictableInputRule" | "showAvatarGroupAsPlugin" | "errorBoundaryDocStructure" | "synchronyErrorDocStructure" | "enableViewUpdateSubscription" | "collabAvatarScroll")[];
|
|
7
|
+
export declare function getEnabledFeatureFlagKeys(featureFlags: FeatureFlags): ("newInsertionBehaviour" | "interactiveExpand" | "placeholderBracketHint" | "placeholderHints" | "moreTextColors" | "findReplace" | "findReplaceMatchCase" | "extensionLocalIdGeneration" | "keyboardAccessibleDatepicker" | "addColumnWithCustomStep" | "undoRedoButtons" | "catchAllTracking" | "nextEmojiNodeView" | "stickyHeadersOptimization" | "initialRenderOptimization" | "mouseMoveOptimization" | "tableRenderOptimization" | "tableOverflowShadowsOptimization" | "codeBlockSyntaxHighlighting" | "codeBidiWarnings" | "queueAnalytics" | "extendFloatingToolbar" | "displayInlineBlockForInlineNodes" | "useUnpredictableInputRule" | "showAvatarGroupAsPlugin" | "errorBoundaryDocStructure" | "synchronyErrorDocStructure" | "enableViewUpdateSubscription" | "collabAvatarScroll" | "ufo")[];
|
|
@@ -74,7 +74,7 @@ declare type FloatingToolbarSelectBase<T, V = SelectOption> = {
|
|
|
74
74
|
options: V[];
|
|
75
75
|
hidden?: boolean;
|
|
76
76
|
hideExpandIcon?: boolean;
|
|
77
|
-
defaultValue?: V;
|
|
77
|
+
defaultValue?: V | null;
|
|
78
78
|
placeholder?: string;
|
|
79
79
|
onChange: (selected: V) => T;
|
|
80
80
|
filterOption?: ((option: V, rawInput: string) => boolean) | null;
|
|
@@ -18,7 +18,7 @@ export interface Props {
|
|
|
18
18
|
mountPoint?: HTMLElement;
|
|
19
19
|
boundariesElement?: HTMLElement;
|
|
20
20
|
scrollableElement?: HTMLElement;
|
|
21
|
-
defaultValue?: SelectOption;
|
|
21
|
+
defaultValue?: SelectOption | null;
|
|
22
22
|
placeholder?: string;
|
|
23
23
|
onChange?: (change: ValueType<SelectOption>) => void;
|
|
24
24
|
width?: number;
|
|
@@ -23,6 +23,6 @@ export declare class HyperlinkToolbarAppearance extends Component<HyperlinkToolb
|
|
|
23
23
|
private getProvider;
|
|
24
24
|
private resolveUrl;
|
|
25
25
|
componentDidMount: () => Promise<void>;
|
|
26
|
-
|
|
26
|
+
UNSAFE_componentWillReceiveProps(nextProps: HyperlinkToolbarAppearanceProps): void;
|
|
27
27
|
render(): JSX.Element | null;
|
|
28
28
|
}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
import { Slice, Schema } from 'prosemirror-model';
|
|
2
|
-
export declare const LINK_REGEXP: RegExp;
|
|
3
|
-
export interface Match {
|
|
4
|
-
schema: any;
|
|
5
|
-
index: number;
|
|
6
|
-
lastIndex: number;
|
|
7
|
-
raw: string;
|
|
8
|
-
text: string;
|
|
9
|
-
url: string;
|
|
10
|
-
length?: number;
|
|
11
|
-
input?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function getLinkMatch(str: string): Match | LinkifyMatch | null;
|
|
14
2
|
/**
|
|
15
3
|
* Instance of class LinkMatcher are used in autoformatting in place of Regex.
|
|
16
4
|
* Hence it has been made similar to regex with an exec method.
|
|
@@ -26,12 +14,3 @@ export declare function normalizeUrl(url?: string | null): string;
|
|
|
26
14
|
export declare function linkifyContent(schema: Schema): (slice: Slice) => Slice;
|
|
27
15
|
export declare function getLinkDomain(url: string): string;
|
|
28
16
|
export declare function isFromCurrentDomain(url: string): boolean;
|
|
29
|
-
export interface LinkifyMatch {
|
|
30
|
-
index: number;
|
|
31
|
-
lastIndex: number;
|
|
32
|
-
raw: string;
|
|
33
|
-
url: string;
|
|
34
|
-
text: string;
|
|
35
|
-
schema: string;
|
|
36
|
-
}
|
|
37
|
-
export declare const linkifyMatch: (text: string) => LinkifyMatch[];
|
|
@@ -63,3 +63,4 @@ export { default as clipboardPlugin } from './clipboard';
|
|
|
63
63
|
export { default as undoRedoPlugin } from './undo-redo';
|
|
64
64
|
export { default as avatarGroupPlugin } from './avatar-group';
|
|
65
65
|
export { default as viewUpdateSubscriptionPlugin } from './view-update-subscription';
|
|
66
|
+
export { default as codeBidiWarningPlugin } from './code-bidi-warning';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Node as PMNode } from 'prosemirror-model';
|
|
2
|
+
import { EditorView, NodeView } from 'prosemirror-view';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { EventDispatcher } from '../../../event-dispatcher';
|
|
5
|
+
import { getPosHandler, ReactNodeView } from '../../../nodeviews/';
|
|
6
|
+
import { FileIdentifier } from '@atlaskit/media-client';
|
|
7
|
+
import { MediaProvider, ProviderFactory } from '@atlaskit/editor-common';
|
|
8
|
+
import { PortalProviderAPI } from '../../../../src/ui/PortalProvider';
|
|
9
|
+
export interface MediaInlineProps {
|
|
10
|
+
mediaProvider: Promise<MediaProvider>;
|
|
11
|
+
identifier: FileIdentifier;
|
|
12
|
+
node: PMNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const MediaInline: React.FC<MediaInlineProps>;
|
|
15
|
+
export interface MediaInlineNodeViewProps {
|
|
16
|
+
providerFactory: ProviderFactory;
|
|
17
|
+
}
|
|
18
|
+
export declare class MediaInlineNodeView extends ReactNodeView<MediaInlineNodeViewProps> {
|
|
19
|
+
createDomRef(): HTMLSpanElement;
|
|
20
|
+
getContentDOM(): {
|
|
21
|
+
dom: HTMLSpanElement;
|
|
22
|
+
};
|
|
23
|
+
ignoreMutation(): boolean;
|
|
24
|
+
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
25
|
+
render(props: MediaInlineNodeViewProps): JSX.Element;
|
|
26
|
+
}
|
|
27
|
+
export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
@@ -36,7 +36,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
36
36
|
private customPicker?;
|
|
37
37
|
private removeOnCloseListener;
|
|
38
38
|
private openMediaPickerBrowser?;
|
|
39
|
-
private
|
|
39
|
+
private onPopupToggleCallback;
|
|
40
40
|
private reactContext;
|
|
41
41
|
pickers: PickerFacade[];
|
|
42
42
|
pickerPromises: Array<Promise<PickerFacade>>;
|
|
@@ -64,7 +64,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
64
64
|
shouldUseMediaPickerPopup: () => boolean;
|
|
65
65
|
showMediaPicker: () => void;
|
|
66
66
|
setBrowseFn: (browseFn: () => void) => void;
|
|
67
|
-
onPopupToggle: (
|
|
67
|
+
onPopupToggle: (onPopupToggleCallback: (isOpen: boolean) => void) => void;
|
|
68
68
|
/**
|
|
69
69
|
* Returns a promise that is resolved after all pending operations have been finished.
|
|
70
70
|
* An optional timeout will cause the promise to reject if the operation takes too long
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { MediaBaseAttributes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { EditorState } from 'prosemirror-state';
|
|
2
3
|
import { MediaPluginState } from '../pm-plugins/types';
|
|
3
4
|
export declare const getSelectedMediaContainerNodeAttrs: (mediaPluginState: MediaPluginState) => MediaBaseAttributes | null;
|
|
4
5
|
export declare const downloadMedia: (mediaPluginState: MediaPluginState) => Promise<boolean>;
|
|
6
|
+
export declare const removeMediaGroupNode: (state: EditorState) => import("prosemirror-state").Transaction<any>;
|
|
@@ -5,6 +5,14 @@ export interface Range {
|
|
|
5
5
|
start: number;
|
|
6
6
|
end: number;
|
|
7
7
|
}
|
|
8
|
+
export declare const canInsertMediaInline: (state: EditorState) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Create a new media inline to insert the new media.
|
|
11
|
+
* @param view Editor view
|
|
12
|
+
* @param mediaState Media file to be added to the editor
|
|
13
|
+
* @param collection Collection for the media to be added
|
|
14
|
+
*/
|
|
15
|
+
export declare const insertMediaInlineNode: (view: EditorView, mediaState: MediaState, collection: string, inputMethod?: import("../../analytics").INPUT_METHOD.CLIPBOARD | import("../../analytics").INPUT_METHOD.DRAG_AND_DROP | import("../../analytics").INPUT_METHOD.PICKER_CLOUD | undefined) => boolean;
|
|
8
16
|
/**
|
|
9
17
|
* Insert a media into an existing media group
|
|
10
18
|
* or create a new media group to insert the new media.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const messages: {
|
|
2
|
+
info: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
note: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
success: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
warning: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
error: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
emoji: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
backgroundColor: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -6,42 +6,9 @@ import { NodeType } from 'prosemirror-model';
|
|
|
6
6
|
import { Command } from '../../types';
|
|
7
7
|
import { ProviderFactory } from '@atlaskit/editor-common';
|
|
8
8
|
import { FormattedMessage } from 'react-intl';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
defaultMessage: string;
|
|
13
|
-
description: string;
|
|
14
|
-
};
|
|
15
|
-
note: {
|
|
16
|
-
id: string;
|
|
17
|
-
defaultMessage: string;
|
|
18
|
-
description: string;
|
|
19
|
-
};
|
|
20
|
-
success: {
|
|
21
|
-
id: string;
|
|
22
|
-
defaultMessage: string;
|
|
23
|
-
description: string;
|
|
24
|
-
};
|
|
25
|
-
warning: {
|
|
26
|
-
id: string;
|
|
27
|
-
defaultMessage: string;
|
|
28
|
-
description: string;
|
|
29
|
-
};
|
|
30
|
-
error: {
|
|
31
|
-
id: string;
|
|
32
|
-
defaultMessage: string;
|
|
33
|
-
description: string;
|
|
34
|
-
};
|
|
35
|
-
emoji: {
|
|
36
|
-
id: string;
|
|
37
|
-
defaultMessage: string;
|
|
38
|
-
description: string;
|
|
39
|
-
};
|
|
40
|
-
backgroundColor: {
|
|
41
|
-
id: string;
|
|
42
|
-
defaultMessage: string;
|
|
43
|
-
description: string;
|
|
44
|
-
};
|
|
9
|
+
import { PanelType } from '@atlaskit/adf-schema';
|
|
10
|
+
export declare const panelIconMap: {
|
|
11
|
+
[key in Exclude<PanelType, PanelType.CUSTOM>]: string;
|
|
45
12
|
};
|
|
46
|
-
export declare const getToolbarItems: (formatMessage: (messageDescriptor: FormattedMessage.MessageDescriptor) => string, panelNodeType: NodeType, isCustomPanelEnabled: boolean, providerFactory: ProviderFactory, activePanelType?: string | undefined, activePanelColor?: string | undefined, activePanelIcon?: string | undefined) => FloatingToolbarItem<Command>[];
|
|
13
|
+
export declare const getToolbarItems: (formatMessage: (messageDescriptor: FormattedMessage.MessageDescriptor) => string, panelNodeType: NodeType, isCustomPanelEnabled: boolean, isCustomPanelEditable: boolean, providerFactory: ProviderFactory, activePanelType?: string | undefined, activePanelColor?: string | undefined, activePanelIcon?: string | undefined) => FloatingToolbarItem<Command>[];
|
|
47
14
|
export declare const getToolbarConfig: (state: EditorState, intl: InjectedIntl, options: PanelPluginOptions | undefined, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum ProfiledComponentIds {
|
|
3
|
+
editor = "Editor",
|
|
4
|
+
appearance = "FullPageEditor",
|
|
5
|
+
reactEditorView = "ReactEditorView",
|
|
6
|
+
contentArea = "FullPageContentArea",
|
|
7
|
+
toolbar = "FullPageToolbar",
|
|
8
|
+
mention = "MentionNodeView"
|
|
9
|
+
}
|
|
10
|
+
declare type RenderCountProfilerProps = {
|
|
11
|
+
componentId: keyof typeof ProfiledComponentIds;
|
|
12
|
+
};
|
|
13
|
+
export declare const RenderCountProfiler: React.FC<RenderCountProfilerProps>;
|
|
14
|
+
export {};
|
|
@@ -179,6 +179,15 @@ export declare type FeatureFlags = {
|
|
|
179
179
|
* @default false
|
|
180
180
|
*/
|
|
181
181
|
codeBlockSyntaxHighlighting?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* @description
|
|
184
|
+
* Disables decorating code snippets with bidi character warnings
|
|
185
|
+
* when they are used in inline code and code blocks.
|
|
186
|
+
*
|
|
187
|
+
* @see https://product-fabric.atlassian.net/browse/ED-13860
|
|
188
|
+
* @default true
|
|
189
|
+
*/
|
|
190
|
+
codeBidiWarnings?: boolean;
|
|
182
191
|
/**
|
|
183
192
|
* @description
|
|
184
193
|
* Yield to user interaction work before sending analytics
|
|
@@ -242,5 +251,13 @@ export declare type FeatureFlags = {
|
|
|
242
251
|
* @default false
|
|
243
252
|
*/
|
|
244
253
|
collabAvatarScroll?: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* @description
|
|
256
|
+
* Enable UFO experiences
|
|
257
|
+
*
|
|
258
|
+
* @see https://product-fabric.atlassian.net/browse/ED-13059
|
|
259
|
+
* @default false
|
|
260
|
+
*/
|
|
261
|
+
ufo?: boolean;
|
|
245
262
|
};
|
|
246
263
|
export declare type FeatureFlagKey = keyof FeatureFlags;
|