@atlaskit/editor-core 189.4.5 → 189.4.8
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 +12 -0
- package/dist/cjs/plugins/extension/index.js +7 -5
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/extension/index.js +7 -5
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/extension/index.js +7 -5
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +3 -3
- package/tmp/api-report-tmp.d.ts +0 -745
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 189.4.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#56790](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/56790) [`ff577a7969d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ff577a7969d4) - ED-21266: Updated @atlaskit/adf-schema to 34.0.1
|
|
8
|
+
|
|
9
|
+
## 189.4.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#56781](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/56781) [`6875cea3f1b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6875cea3f1b3) - Fix bug where extension context panel is empty after the page width is reconfigured.
|
|
14
|
+
|
|
3
15
|
## 189.4.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -84,12 +84,14 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
84
84
|
plugin: function plugin() {
|
|
85
85
|
return new _safePlugin.SafePlugin({
|
|
86
86
|
view: function view(editorView) {
|
|
87
|
+
// Do not cleanup the editorViewRef on destroy
|
|
88
|
+
// because some functions may point to a stale
|
|
89
|
+
// reference and this means we will return null.
|
|
90
|
+
// EditorView is assumed to be stable so we do not need to
|
|
91
|
+
// cleanup.
|
|
92
|
+
// See: #hot-106316
|
|
87
93
|
editorViewRef.current = editorView;
|
|
88
|
-
return {
|
|
89
|
-
destroy: function destroy() {
|
|
90
|
-
editorViewRef.current = null;
|
|
91
|
-
}
|
|
92
|
-
};
|
|
94
|
+
return {};
|
|
93
95
|
}
|
|
94
96
|
});
|
|
95
97
|
}
|
|
@@ -76,12 +76,14 @@ const extensionPlugin = ({
|
|
|
76
76
|
plugin: () => {
|
|
77
77
|
return new SafePlugin({
|
|
78
78
|
view: editorView => {
|
|
79
|
+
// Do not cleanup the editorViewRef on destroy
|
|
80
|
+
// because some functions may point to a stale
|
|
81
|
+
// reference and this means we will return null.
|
|
82
|
+
// EditorView is assumed to be stable so we do not need to
|
|
83
|
+
// cleanup.
|
|
84
|
+
// See: #hot-106316
|
|
79
85
|
editorViewRef.current = editorView;
|
|
80
|
-
return {
|
|
81
|
-
destroy: () => {
|
|
82
|
-
editorViewRef.current = null;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
86
|
+
return {};
|
|
85
87
|
}
|
|
86
88
|
});
|
|
87
89
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "189.4.
|
|
2
|
+
export const version = "189.4.8";
|
|
@@ -77,12 +77,14 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
77
77
|
plugin: function plugin() {
|
|
78
78
|
return new SafePlugin({
|
|
79
79
|
view: function view(editorView) {
|
|
80
|
+
// Do not cleanup the editorViewRef on destroy
|
|
81
|
+
// because some functions may point to a stale
|
|
82
|
+
// reference and this means we will return null.
|
|
83
|
+
// EditorView is assumed to be stable so we do not need to
|
|
84
|
+
// cleanup.
|
|
85
|
+
// See: #hot-106316
|
|
80
86
|
editorViewRef.current = editorView;
|
|
81
|
-
return {
|
|
82
|
-
destroy: function destroy() {
|
|
83
|
-
editorViewRef.current = null;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
87
|
+
return {};
|
|
86
88
|
}
|
|
87
89
|
});
|
|
88
90
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "189.4.
|
|
2
|
+
export var version = "189.4.8";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "189.4.
|
|
3
|
+
"version": "189.4.8",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
43
|
-
"@atlaskit/adf-schema": "^34.0.
|
|
43
|
+
"@atlaskit/adf-schema": "^34.0.1",
|
|
44
44
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
45
45
|
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
46
46
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"@af/integration-testing": "*",
|
|
169
169
|
"@af/visual-regression": "*",
|
|
170
170
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
171
|
-
"@atlaskit/collab-provider": "9.17.
|
|
171
|
+
"@atlaskit/collab-provider": "9.17.2",
|
|
172
172
|
"@atlaskit/dropdown-menu": "^12.1.0",
|
|
173
173
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
174
174
|
"@atlaskit/editor-palette": "1.5.2",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,745 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/editor-core"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
/// <reference types="node" />
|
|
8
|
-
|
|
9
|
-
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
10
|
-
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
11
|
-
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
12
|
-
import type { ActivityProvider } from '@atlaskit/activity-provider';
|
|
13
|
-
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
14
|
-
import type { AnalyticsEventPayload as AnalyticsEventPayload_2 } from '@atlaskit/analytics-next/AnalyticsEvent';
|
|
15
|
-
import type { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
16
|
-
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugin-block-type';
|
|
17
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
18
|
-
import { CardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
19
|
-
import type { CodeBlockOptions } from '@atlaskit/editor-plugin-code-block';
|
|
20
|
-
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
21
|
-
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
22
|
-
import type { ContextUpdateHandler } from '@atlaskit/editor-common/types';
|
|
23
|
-
import type { DatePluginConfig } from '@atlaskit/editor-plugin-date';
|
|
24
|
-
import type { EditorActionsOptions } from '@atlaskit/editor-common/types';
|
|
25
|
-
import { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
26
|
-
import { EditorPlugin } from '@atlaskit/editor-common/types';
|
|
27
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
28
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
29
|
-
import { EmojiResource } from '@atlaskit/emoji/resource';
|
|
30
|
-
import { EmptyStateHandler } from '@atlaskit/editor-common/types';
|
|
31
|
-
import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
|
|
32
|
-
import { EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
33
|
-
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
34
|
-
import { EventEmitter as EventEmitter_2 } from 'events';
|
|
35
|
-
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
36
|
-
import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
37
|
-
import { ExtensionType } from '@atlaskit/editor-common/provider-factory';
|
|
38
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
39
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
40
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
|
|
41
|
-
import { jsx } from '@emotion/react';
|
|
42
|
-
import type { LayoutPluginOptions } from '@atlaskit/editor-plugin-layout';
|
|
43
|
-
import type { LinkingOptions } from '@atlaskit/editor-common/types';
|
|
44
|
-
import { MacroAttributes } from '@atlaskit/editor-common/provider-factory';
|
|
45
|
-
import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
46
|
-
import { MediaOptions } from '@atlaskit/editor-plugin-media/types';
|
|
47
|
-
import { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
|
|
48
|
-
import type { MediaState } from '@atlaskit/editor-plugin-media/types';
|
|
49
|
-
import type { MentionPluginConfig } from '@atlaskit/editor-plugin-mentions';
|
|
50
|
-
import { MentionProvider } from '@atlaskit/mention/resource';
|
|
51
|
-
import { MentionResource } from '@atlaskit/mention/resource';
|
|
52
|
-
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
53
|
-
import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
54
|
-
import type { PanelPluginConfig } from '@atlaskit/editor-plugin-panel';
|
|
55
|
-
import { PerformanceTracking } from '@atlaskit/editor-common/types';
|
|
56
|
-
import type { PlaceholderTextOptions } from '@atlaskit/editor-plugin-placeholder-text';
|
|
57
|
-
import type { PluginConfig } from '@atlaskit/editor-plugin-table/types';
|
|
58
|
-
import { PortalProvider } from '@atlaskit/editor-common/portal-provider';
|
|
59
|
-
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
60
|
-
import { PortalRenderer } from '@atlaskit/editor-common/portal-provider';
|
|
61
|
-
import type { PositionType } from '@atlaskit/tooltip/types';
|
|
62
|
-
import { PresenceProvider } from '@atlaskit/mention/resource';
|
|
63
|
-
import PropTypes from 'prop-types';
|
|
64
|
-
import type { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
65
|
-
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
66
|
-
import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
|
|
67
|
-
import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
|
|
68
|
-
import { default as React_2 } from 'react';
|
|
69
|
-
import type { ReactElement } from 'react';
|
|
70
|
-
import type { ReplaceRawValue } from '@atlaskit/editor-common/types';
|
|
71
|
-
import type { ResolvedEditorState } from '@atlaskit/editor-common/collab';
|
|
72
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
73
|
-
import type { SearchProvider } from '@atlaskit/editor-common/provider-factory';
|
|
74
|
-
import { setTextSelection } from '@atlaskit/editor-common/utils';
|
|
75
|
-
import type { TaskDecisionProvider } from '@atlaskit/task-decision';
|
|
76
|
-
import { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
77
|
-
import type { TextColorPluginConfig } from '@atlaskit/editor-plugin-text-color';
|
|
78
|
-
import type { TextFormattingOptions } from '@atlaskit/editor-common/types';
|
|
79
|
-
import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
|
|
80
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
81
|
-
import type { Transformer as Transformer_2 } from '@atlaskit/editor-common/types';
|
|
82
|
-
import { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
|
|
83
|
-
import { UIComponentFactory } from '@atlaskit/editor-common/types';
|
|
84
|
-
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
85
|
-
import { WithIntlProps } from 'react-intl-next';
|
|
86
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
87
|
-
|
|
88
|
-
export { ACTION }
|
|
89
|
-
|
|
90
|
-
export { ACTION_SUBJECT }
|
|
91
|
-
|
|
92
|
-
export { ACTION_SUBJECT_ID }
|
|
93
|
-
|
|
94
|
-
export { AnalyticsEventPayload }
|
|
95
|
-
|
|
96
|
-
// @public (undocumented)
|
|
97
|
-
type AnnotationCallback = (params: string) => void;
|
|
98
|
-
|
|
99
|
-
// @public (undocumented)
|
|
100
|
-
type AnnotationComponentProps = {
|
|
101
|
-
textSelection?: string;
|
|
102
|
-
dom?: HTMLElement;
|
|
103
|
-
onClose?: () => void;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
// @public (undocumented)
|
|
107
|
-
export type AnnotationInfo = {
|
|
108
|
-
id: string;
|
|
109
|
-
type: AnnotationTypes.INLINE_COMMENT;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
// @public (undocumented)
|
|
113
|
-
export interface AnnotationProviders {
|
|
114
|
-
// (undocumented)
|
|
115
|
-
inlineComment: InlineCommentAnnotationProvider;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// @public (undocumented)
|
|
119
|
-
export interface AnnotationState<Type, State> {
|
|
120
|
-
// (undocumented)
|
|
121
|
-
annotationType: Type;
|
|
122
|
-
// (undocumented)
|
|
123
|
-
id: string;
|
|
124
|
-
// (undocumented)
|
|
125
|
-
state: State;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// @public (undocumented)
|
|
129
|
-
export interface AnnotationTypeProvider<Type, State> {
|
|
130
|
-
// (undocumented)
|
|
131
|
-
disallowOnWhitespace?: boolean;
|
|
132
|
-
// (undocumented)
|
|
133
|
-
getState: (annotationIds: string[]) => Promise<AnnotationState<Type, State>[]>;
|
|
134
|
-
// (undocumented)
|
|
135
|
-
updateSubscriber?: AnnotationUpdateEmitter;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// @public (undocumented)
|
|
139
|
-
export class AnnotationUpdateEmitter extends EventEmitter_2 {
|
|
140
|
-
// (undocumented)
|
|
141
|
-
off(event: string, listener: AnnotationCallback | VisibilityCallback): this;
|
|
142
|
-
// (undocumented)
|
|
143
|
-
on(event: VisibilityEvent, listener: (isVisible: boolean) => void): this;
|
|
144
|
-
// (undocumented)
|
|
145
|
-
on(event: UpdateEvent, listener: (annotationId: string) => void): this;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// @public (undocumented)
|
|
149
|
-
type BeforeAndAfterToolbarComponents = {
|
|
150
|
-
before: ReactComponents;
|
|
151
|
-
after: ReactComponents;
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
export { CardProvider }
|
|
155
|
-
|
|
156
|
-
// @public (undocumented)
|
|
157
|
-
export class CollapsedEditor extends React_2.Component<Props, State> {
|
|
158
|
-
// (undocumented)
|
|
159
|
-
componentDidUpdate(): void;
|
|
160
|
-
// (undocumented)
|
|
161
|
-
editorComponent?: Editor;
|
|
162
|
-
// (undocumented)
|
|
163
|
-
functionalEditor?: boolean;
|
|
164
|
-
// (undocumented)
|
|
165
|
-
handleEditorRef: (editorRef?: Editor, editorRefCallback?: any) => void;
|
|
166
|
-
// (undocumented)
|
|
167
|
-
previouslyExpanded?: boolean;
|
|
168
|
-
// (undocumented)
|
|
169
|
-
render(): any;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// @public (undocumented)
|
|
173
|
-
export type Command = (state: EditorState, dispatch?: CommandDispatch, view?: EditorView) => boolean;
|
|
174
|
-
|
|
175
|
-
// @public (undocumented)
|
|
176
|
-
export type CommandDispatch = (tr: Transaction) => void;
|
|
177
|
-
|
|
178
|
-
// @public (undocumented)
|
|
179
|
-
export function ContextPanel(props: Props_4): jsx.JSX.Element;
|
|
180
|
-
|
|
181
|
-
// @public (undocumented)
|
|
182
|
-
export class Editor extends React_2.Component<EditorProps> {
|
|
183
|
-
constructor(props: EditorProps);
|
|
184
|
-
// (undocumented)
|
|
185
|
-
static defaultProps: EditorProps;
|
|
186
|
-
// (undocumented)
|
|
187
|
-
render(): jsx.JSX.Element;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// @public (undocumented)
|
|
191
|
-
export class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
192
|
-
// (undocumented)
|
|
193
|
-
__temporaryFixForConfigPanel(): Promise<void>;
|
|
194
|
-
// (undocumented)
|
|
195
|
-
appendText(text: string): boolean;
|
|
196
|
-
// (undocumented)
|
|
197
|
-
blur(): boolean;
|
|
198
|
-
// (undocumented)
|
|
199
|
-
clear(): boolean;
|
|
200
|
-
// (undocumented)
|
|
201
|
-
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload_2) => void;
|
|
202
|
-
// (undocumented)
|
|
203
|
-
focus(): boolean;
|
|
204
|
-
// (undocumented)
|
|
205
|
-
static from<T>(view: EditorView, eventDispatcher: EventDispatcher, transformer?: Transformer_2<T>): EditorActions<T>;
|
|
206
|
-
// (undocumented)
|
|
207
|
-
getNodeByFragmentLocalId(id: string): Node_2 | undefined;
|
|
208
|
-
// (undocumented)
|
|
209
|
-
getNodeByLocalId(id: string): Node_2 | undefined;
|
|
210
|
-
getResolvedEditorState: () => Promise<ResolvedEditorState | undefined>;
|
|
211
|
-
getSelectedNode(): Node_2 | undefined;
|
|
212
|
-
// (undocumented)
|
|
213
|
-
getValue(): Promise<T | JSONDocNode | undefined>;
|
|
214
|
-
// (undocumented)
|
|
215
|
-
isDocumentEmpty(): boolean;
|
|
216
|
-
// (undocumented)
|
|
217
|
-
_privateGetEditorView(): EditorView | undefined;
|
|
218
|
-
// (undocumented)
|
|
219
|
-
_privateGetEventDispatcher(): EventDispatcher | undefined;
|
|
220
|
-
// (undocumented)
|
|
221
|
-
_privateRegisterEditor(editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer_2<T>, getFeatureFlags?: () => FeatureFlags): void;
|
|
222
|
-
// (undocumented)
|
|
223
|
-
_privateSubscribe(cb: ContextUpdateHandler): void;
|
|
224
|
-
// (undocumented)
|
|
225
|
-
_privateUnregisterEditor(): void;
|
|
226
|
-
// (undocumented)
|
|
227
|
-
_privateUnsubscribe(cb: ContextUpdateHandler): void;
|
|
228
|
-
// (undocumented)
|
|
229
|
-
replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
|
|
230
|
-
shouldAddToHistory?: boolean): boolean;
|
|
231
|
-
// (undocumented)
|
|
232
|
-
replaceSelection(rawValue: Array<ReplaceRawValue> | ReplaceRawValue, tryToReplace?: boolean): boolean;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// @public (undocumented)
|
|
236
|
-
interface EditorBaseProps {
|
|
237
|
-
// (undocumented)
|
|
238
|
-
appearance?: EditorAppearance;
|
|
239
|
-
// (undocumented)
|
|
240
|
-
assistiveLabel?: string;
|
|
241
|
-
// (undocumented)
|
|
242
|
-
contentComponents?: ReactComponents;
|
|
243
|
-
// (undocumented)
|
|
244
|
-
contentTransformerProvider?: (schema: Schema) => Transformer_2<string>;
|
|
245
|
-
// (undocumented)
|
|
246
|
-
contextPanel?: ReactComponents;
|
|
247
|
-
// (undocumented)
|
|
248
|
-
defaultValue?: Node_2 | Object | string;
|
|
249
|
-
// (undocumented)
|
|
250
|
-
disabled?: boolean;
|
|
251
|
-
// (undocumented)
|
|
252
|
-
editorActions?: EditorActions;
|
|
253
|
-
// (undocumented)
|
|
254
|
-
errorReporterHandler?: ErrorReportingHandler;
|
|
255
|
-
// (undocumented)
|
|
256
|
-
extensionProviders?: ExtensionProvidersProp;
|
|
257
|
-
featureFlags?: {
|
|
258
|
-
[featureFlag: string]: boolean | string;
|
|
259
|
-
};
|
|
260
|
-
// @deprecated
|
|
261
|
-
inputSamplingLimit?: number;
|
|
262
|
-
// (undocumented)
|
|
263
|
-
maxHeight?: number;
|
|
264
|
-
// (undocumented)
|
|
265
|
-
minHeight?: number;
|
|
266
|
-
// (undocumented)
|
|
267
|
-
onCancel?: (editorView: EditorView) => void;
|
|
268
|
-
// (undocumented)
|
|
269
|
-
onChange?: EditorOnChangeHandler;
|
|
270
|
-
// (undocumented)
|
|
271
|
-
onDestroy?: () => void;
|
|
272
|
-
// (undocumented)
|
|
273
|
-
onEditorReady?: (editorActions: EditorActions) => void;
|
|
274
|
-
// (undocumented)
|
|
275
|
-
persistScrollGutter?: boolean;
|
|
276
|
-
// (undocumented)
|
|
277
|
-
placeholder?: string;
|
|
278
|
-
// (undocumented)
|
|
279
|
-
placeholderBracketHint?: string;
|
|
280
|
-
// (undocumented)
|
|
281
|
-
popupsBoundariesElement?: HTMLElement;
|
|
282
|
-
// (undocumented)
|
|
283
|
-
popupsMountPoint?: HTMLElement;
|
|
284
|
-
// (undocumented)
|
|
285
|
-
popupsScrollableElement?: HTMLElement;
|
|
286
|
-
// (undocumented)
|
|
287
|
-
primaryToolbarIconBefore?: ReactElement;
|
|
288
|
-
// (undocumented)
|
|
289
|
-
quickInsert?: QuickInsertOptions;
|
|
290
|
-
// (undocumented)
|
|
291
|
-
secondaryToolbarComponents?: ReactComponents;
|
|
292
|
-
// (undocumented)
|
|
293
|
-
shouldFocus?: boolean;
|
|
294
|
-
trackValidTransactions?: boolean | {
|
|
295
|
-
samplingRate: number;
|
|
296
|
-
};
|
|
297
|
-
// (undocumented)
|
|
298
|
-
UNSAFE_useAnalyticsContext?: boolean;
|
|
299
|
-
useStickyToolbar?: UseStickyToolbarType;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// @public (undocumented)
|
|
303
|
-
export class EditorContext extends React_2.Component<EditorContextProps, {}> {
|
|
304
|
-
constructor(props: EditorContextProps);
|
|
305
|
-
// (undocumented)
|
|
306
|
-
static childContextTypes: {
|
|
307
|
-
editorActions: PropTypes.Requireable<object>;
|
|
308
|
-
};
|
|
309
|
-
// (undocumented)
|
|
310
|
-
getChildContext(): {
|
|
311
|
-
editorActions: EditorActions<any>;
|
|
312
|
-
};
|
|
313
|
-
// (undocumented)
|
|
314
|
-
render(): JSX.Element;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// @public (undocumented)
|
|
318
|
-
type EditorContextProps = {
|
|
319
|
-
editorActions?: EditorActions;
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
// @public (undocumented)
|
|
323
|
-
export interface EditorInstance {
|
|
324
|
-
// (undocumented)
|
|
325
|
-
contentComponents: UIComponentFactory[];
|
|
326
|
-
// (undocumented)
|
|
327
|
-
contentTransformer?: Transformer<string>;
|
|
328
|
-
// (undocumented)
|
|
329
|
-
editorView: EditorView;
|
|
330
|
-
// (undocumented)
|
|
331
|
-
eventDispatcher: EventDispatcher;
|
|
332
|
-
// (undocumented)
|
|
333
|
-
insertMenuItems?: MenuItem[];
|
|
334
|
-
// (undocumented)
|
|
335
|
-
onEditorViewStateUpdatedCallbacks: {
|
|
336
|
-
pluginName: string;
|
|
337
|
-
callback: OnEditorViewStateUpdated;
|
|
338
|
-
}[];
|
|
339
|
-
// (undocumented)
|
|
340
|
-
primaryToolbarComponents: ToolbarUIComponentFactory[];
|
|
341
|
-
// (undocumented)
|
|
342
|
-
secondaryToolbarComponents: UIComponentFactory[];
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// @public (undocumented)
|
|
346
|
-
type EditorOnChangeHandler = (editorView: EditorView, meta: {
|
|
347
|
-
source: 'local' | 'remote';
|
|
348
|
-
}) => void;
|
|
349
|
-
|
|
350
|
-
export { EditorPlugin }
|
|
351
|
-
|
|
352
|
-
// @public (undocumented)
|
|
353
|
-
interface EditorPluginFeatureProps {
|
|
354
|
-
// (undocumented)
|
|
355
|
-
allowAnalyticsGASV3?: boolean;
|
|
356
|
-
// (undocumented)
|
|
357
|
-
allowBlockType?: BlockTypePluginOptions['allowBlockType'];
|
|
358
|
-
allowBorderMark?: boolean;
|
|
359
|
-
// (undocumented)
|
|
360
|
-
allowBreakout?: boolean;
|
|
361
|
-
// (undocumented)
|
|
362
|
-
allowConfluenceInlineComment?: boolean;
|
|
363
|
-
// (undocumented)
|
|
364
|
-
allowDate?: DatePluginConfig | boolean;
|
|
365
|
-
// (undocumented)
|
|
366
|
-
allowExpand?: boolean | {
|
|
367
|
-
allowInsertion?: boolean;
|
|
368
|
-
allowInteractiveExpand?: boolean;
|
|
369
|
-
};
|
|
370
|
-
// (undocumented)
|
|
371
|
-
allowExtension?: ExtensionConfig | boolean;
|
|
372
|
-
// (undocumented)
|
|
373
|
-
allowFindReplace?: FindReplaceOptions | boolean;
|
|
374
|
-
allowFragmentMark?: boolean;
|
|
375
|
-
// (undocumented)
|
|
376
|
-
allowHelpDialog?: boolean;
|
|
377
|
-
// (undocumented)
|
|
378
|
-
allowIndentation?: boolean;
|
|
379
|
-
// (undocumented)
|
|
380
|
-
allowJiraIssue?: boolean;
|
|
381
|
-
// (undocumented)
|
|
382
|
-
allowLayouts?: LayoutPluginOptions | boolean;
|
|
383
|
-
// (undocumented)
|
|
384
|
-
allowNestedTasks?: boolean;
|
|
385
|
-
allowNewInsertionBehaviour?: boolean;
|
|
386
|
-
// (undocumented)
|
|
387
|
-
allowPanel?: PanelPluginConfig | boolean;
|
|
388
|
-
// (undocumented)
|
|
389
|
-
allowRule?: boolean;
|
|
390
|
-
// (undocumented)
|
|
391
|
-
allowStatus?: boolean | {
|
|
392
|
-
menuDisabled: boolean;
|
|
393
|
-
};
|
|
394
|
-
// (undocumented)
|
|
395
|
-
allowTables?: PluginConfig | boolean;
|
|
396
|
-
// (undocumented)
|
|
397
|
-
allowTasksAndDecisions?: boolean;
|
|
398
|
-
// (undocumented)
|
|
399
|
-
allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
|
|
400
|
-
// (undocumented)
|
|
401
|
-
allowTextAlignment?: boolean;
|
|
402
|
-
// (undocumented)
|
|
403
|
-
allowTextColor?: TextColorPluginConfig | boolean;
|
|
404
|
-
autoScrollIntoView?: boolean;
|
|
405
|
-
// (undocumented)
|
|
406
|
-
codeBlock?: CodeBlockOptions;
|
|
407
|
-
// (undocumented)
|
|
408
|
-
elementBrowser?: {
|
|
409
|
-
showModal?: boolean;
|
|
410
|
-
replacePlusMenu?: boolean;
|
|
411
|
-
helpUrl?: string;
|
|
412
|
-
emptyStateHandler?: EmptyStateHandler;
|
|
413
|
-
};
|
|
414
|
-
// (undocumented)
|
|
415
|
-
extensionHandlers?: ExtensionHandlers;
|
|
416
|
-
// (undocumented)
|
|
417
|
-
feedbackInfo?: FeedbackInfo;
|
|
418
|
-
// (undocumented)
|
|
419
|
-
insertMenuItems?: MenuItem[];
|
|
420
|
-
// (undocumented)
|
|
421
|
-
maxContentSize?: number;
|
|
422
|
-
// (undocumented)
|
|
423
|
-
mention?: MentionPluginConfig;
|
|
424
|
-
// @deprecated
|
|
425
|
-
mentionInsertDisplayName?: boolean;
|
|
426
|
-
// (undocumented)
|
|
427
|
-
saveOnEnter?: boolean;
|
|
428
|
-
// (undocumented)
|
|
429
|
-
showIndentationButtons?: boolean;
|
|
430
|
-
// @deprecated (undocumented)
|
|
431
|
-
smartLinks?: CardOptions;
|
|
432
|
-
// (undocumented)
|
|
433
|
-
textFormatting?: TextFormattingOptions;
|
|
434
|
-
// @deprecated
|
|
435
|
-
UNSAFE_allowBorderMark?: boolean;
|
|
436
|
-
// @deprecated (undocumented)
|
|
437
|
-
UNSAFE_cards?: CardOptions;
|
|
438
|
-
// (undocumented)
|
|
439
|
-
uploadErrorHandler?: (state: MediaState) => void;
|
|
440
|
-
// (undocumented)
|
|
441
|
-
waitForMediaUpload?: boolean;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// @public (undocumented)
|
|
445
|
-
type EditorProduct = 'bitbucket' | 'confluence' | 'jira' | 'stride' | undefined;
|
|
446
|
-
|
|
447
|
-
// @public (undocumented)
|
|
448
|
-
export interface EditorProps extends EditorBaseProps, EditorPluginFeatureProps, EditorSharedPropsWithPlugins, EditorProviderProps {
|
|
449
|
-
// @deprecated (undocumented)
|
|
450
|
-
dangerouslyAppendPlugins?: {
|
|
451
|
-
__plugins: EditorPlugin[];
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
// @public (undocumented)
|
|
456
|
-
interface EditorProviderProps {
|
|
457
|
-
// (undocumented)
|
|
458
|
-
activityProvider?: Promise<ActivityProvider>;
|
|
459
|
-
// (undocumented)
|
|
460
|
-
annotationProviders?: AnnotationProviders;
|
|
461
|
-
// (undocumented)
|
|
462
|
-
autoformattingProvider?: Providers['autoformattingProvider'];
|
|
463
|
-
// (undocumented)
|
|
464
|
-
collabEditProvider?: Providers['collabEditProvider'];
|
|
465
|
-
// (undocumented)
|
|
466
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
467
|
-
// (undocumented)
|
|
468
|
-
emojiProvider?: Providers['emojiProvider'];
|
|
469
|
-
// (undocumented)
|
|
470
|
-
legacyImageUploadProvider?: Providers['imageUploadProvider'];
|
|
471
|
-
// (undocumented)
|
|
472
|
-
macroProvider?: Providers['macroProvider'];
|
|
473
|
-
// (undocumented)
|
|
474
|
-
mentionProvider?: Promise<MentionProvider>;
|
|
475
|
-
// (undocumented)
|
|
476
|
-
presenceProvider?: Promise<any>;
|
|
477
|
-
// (undocumented)
|
|
478
|
-
searchProvider?: Promise<SearchProvider>;
|
|
479
|
-
// (undocumented)
|
|
480
|
-
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
// @public (undocumented)
|
|
484
|
-
interface EditorSharedPropsWithPlugins {
|
|
485
|
-
// (undocumented)
|
|
486
|
-
allowUndoRedoButtons?: boolean;
|
|
487
|
-
// (undocumented)
|
|
488
|
-
collabEdit?: CollabEditOptions;
|
|
489
|
-
// (undocumented)
|
|
490
|
-
hideAvatarGroup?: boolean;
|
|
491
|
-
linking?: LinkingOptions;
|
|
492
|
-
// (undocumented)
|
|
493
|
-
media?: MediaOptions;
|
|
494
|
-
// (undocumented)
|
|
495
|
-
onSave?: (editorView: EditorView) => void;
|
|
496
|
-
performanceTracking?: PerformanceTracking;
|
|
497
|
-
// (undocumented)
|
|
498
|
-
primaryToolbarComponents?: PrimaryToolbarComponents;
|
|
499
|
-
// (undocumented)
|
|
500
|
-
sanitizePrivateContent?: boolean;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
export { EmojiResource }
|
|
504
|
-
|
|
505
|
-
export { EVENT_TYPE }
|
|
506
|
-
|
|
507
|
-
// @public (undocumented)
|
|
508
|
-
interface ExtensionConfig {
|
|
509
|
-
// (undocumented)
|
|
510
|
-
allowAutoSave?: boolean;
|
|
511
|
-
// (undocumented)
|
|
512
|
-
allowBreakout?: boolean;
|
|
513
|
-
// (undocumented)
|
|
514
|
-
allowExtendFloatingToolbars?: boolean;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
// @public (undocumented)
|
|
518
|
-
type ExtensionProviders = (ExtensionProvider | Promise<ExtensionProvider>)[];
|
|
519
|
-
|
|
520
|
-
// @public (undocumented)
|
|
521
|
-
type ExtensionProvidersProp = ExtensionProviders | ExtensionProvidersWithEditorAction;
|
|
522
|
-
|
|
523
|
-
// @public (undocumented)
|
|
524
|
-
type ExtensionProvidersWithEditorAction = (editorActions?: EditorActions) => ExtensionProviders;
|
|
525
|
-
|
|
526
|
-
export { ExtensionType }
|
|
527
|
-
|
|
528
|
-
// @public (undocumented)
|
|
529
|
-
type FeedbackInfo = {
|
|
530
|
-
product?: string;
|
|
531
|
-
packageVersion?: string;
|
|
532
|
-
packageName?: string;
|
|
533
|
-
labels?: Array<string>;
|
|
534
|
-
sessionId?: string;
|
|
535
|
-
contentId?: string;
|
|
536
|
-
tabId?: string;
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
// @public (undocumented)
|
|
540
|
-
type FindReplaceOptions = {
|
|
541
|
-
allowMatchCase?: boolean;
|
|
542
|
-
};
|
|
543
|
-
|
|
544
|
-
// @public (undocumented)
|
|
545
|
-
export function getNodesCount(node: Node_2): Record<string, number>;
|
|
546
|
-
|
|
547
|
-
// @public (undocumented)
|
|
548
|
-
export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationTypes.INLINE_COMMENT, InlineCommentState> & {
|
|
549
|
-
createComponent?: React_2.ComponentType<InlineCommentCreateComponentProps>;
|
|
550
|
-
viewComponent?: React_2.ComponentType<InlineCommentViewComponentProps>;
|
|
551
|
-
isToolbarAbove?: boolean;
|
|
552
|
-
};
|
|
553
|
-
|
|
554
|
-
// @public (undocumented)
|
|
555
|
-
export type InlineCommentCreateComponentProps = AnnotationComponentProps & {
|
|
556
|
-
onCreate: (id: string) => void;
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
// @public (undocumented)
|
|
560
|
-
export type InlineCommentState = {
|
|
561
|
-
resolved: boolean;
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
// @public (undocumented)
|
|
565
|
-
export type InlineCommentViewComponentProps = AnnotationComponentProps & {
|
|
566
|
-
annotations: Array<AnnotationInfo>;
|
|
567
|
-
onResolve: (id: string) => void;
|
|
568
|
-
onDelete?: (id: string) => void;
|
|
569
|
-
annotationsList?: string[];
|
|
570
|
-
};
|
|
571
|
-
|
|
572
|
-
export { INPUT_METHOD }
|
|
573
|
-
|
|
574
|
-
export { MacroAttributes }
|
|
575
|
-
|
|
576
|
-
export { MacroProvider }
|
|
577
|
-
|
|
578
|
-
// @public (undocumented)
|
|
579
|
-
export const measurements: {
|
|
580
|
-
EDITOR_MOUNTED: string;
|
|
581
|
-
PROSEMIRROR_RENDERED: string;
|
|
582
|
-
PROSEMIRROR_CONTENT_RENDERED: string;
|
|
583
|
-
ON_EDITOR_READY_CALLBACK: string;
|
|
584
|
-
PASTE: string;
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
export { MediaOptions }
|
|
588
|
-
|
|
589
|
-
export { MediaProvider_2 as MediaProvider }
|
|
590
|
-
|
|
591
|
-
export { MentionProvider }
|
|
592
|
-
|
|
593
|
-
export { MentionResource }
|
|
594
|
-
|
|
595
|
-
// @public (undocumented)
|
|
596
|
-
const name_2: string;
|
|
597
|
-
export { name_2 as name }
|
|
598
|
-
|
|
599
|
-
// @public (undocumented)
|
|
600
|
-
type OnEditorViewStateUpdated = (props: {
|
|
601
|
-
readonly originalTransaction: Readonly<Transaction>;
|
|
602
|
-
readonly transactions: ReadonlyArray<Transaction>;
|
|
603
|
-
readonly oldEditorState: Readonly<EditorState>;
|
|
604
|
-
readonly newEditorState: Readonly<EditorState>;
|
|
605
|
-
}) => void;
|
|
606
|
-
|
|
607
|
-
export { PortalProvider }
|
|
608
|
-
|
|
609
|
-
export { PortalProviderAPI }
|
|
610
|
-
|
|
611
|
-
export { PortalRenderer }
|
|
612
|
-
|
|
613
|
-
export { PresenceProvider }
|
|
614
|
-
|
|
615
|
-
// @public (undocumented)
|
|
616
|
-
type PrimaryToolbarComponents = BeforeAndAfterToolbarComponents | ReactComponents;
|
|
617
|
-
|
|
618
|
-
// @public (undocumented)
|
|
619
|
-
interface Props {
|
|
620
|
-
// (undocumented)
|
|
621
|
-
children?: any;
|
|
622
|
-
// (undocumented)
|
|
623
|
-
isExpanded?: boolean;
|
|
624
|
-
// (undocumented)
|
|
625
|
-
onExpand?: () => void;
|
|
626
|
-
// (undocumented)
|
|
627
|
-
onFocus?: (e: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
628
|
-
// (undocumented)
|
|
629
|
-
placeholder?: string;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
// @public (undocumented)
|
|
633
|
-
interface Props_2 {
|
|
634
|
-
// (undocumented)
|
|
635
|
-
title?: string;
|
|
636
|
-
// (undocumented)
|
|
637
|
-
titlePosition?: PositionType;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
// @public (undocumented)
|
|
641
|
-
interface Props_3 {
|
|
642
|
-
// @deprecated (undocumented)
|
|
643
|
-
labels?: string[];
|
|
644
|
-
// @deprecated (undocumented)
|
|
645
|
-
packageName?: string;
|
|
646
|
-
// @deprecated (undocumented)
|
|
647
|
-
packageVersion?: string;
|
|
648
|
-
// (undocumented)
|
|
649
|
-
popupsBoundariesElement?: HTMLElement;
|
|
650
|
-
// (undocumented)
|
|
651
|
-
popupsMountPoint?: HTMLElement;
|
|
652
|
-
// (undocumented)
|
|
653
|
-
popupsScrollableElement?: HTMLElement;
|
|
654
|
-
// (undocumented)
|
|
655
|
-
product?: EditorProduct;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
// @public (undocumented)
|
|
659
|
-
type Props_4 = {
|
|
660
|
-
visible: boolean;
|
|
661
|
-
children?: React_2.ReactElement;
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
export { QuickInsertItem }
|
|
665
|
-
|
|
666
|
-
export { QuickInsertProvider }
|
|
667
|
-
|
|
668
|
-
// @public (undocumented)
|
|
669
|
-
type ReactComponents = ReactElement<any> | ReactElement<any>[];
|
|
670
|
-
|
|
671
|
-
export { setTextSelection }
|
|
672
|
-
|
|
673
|
-
// @public (undocumented)
|
|
674
|
-
interface State {
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
export { TeamMentionResource }
|
|
678
|
-
|
|
679
|
-
// @public (undocumented)
|
|
680
|
-
export function ToolbarFeedback(props: Props_3): jsx.JSX.Element;
|
|
681
|
-
|
|
682
|
-
// @public (undocumented)
|
|
683
|
-
export const ToolbarHelp: React_2.FC<WithIntlProps<Props_2 & WrappedComponentProps<"intl">>> & {
|
|
684
|
-
WrappedComponent: React_2.ComponentType<Props_2 & WrappedComponentProps<"intl">>;
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
export { TypeAheadItem }
|
|
688
|
-
|
|
689
|
-
// @public (undocumented)
|
|
690
|
-
export type UpdateEvent = 'create' | 'delete' | 'resolve' | 'setselectedannotation' | 'unresolve';
|
|
691
|
-
|
|
692
|
-
// @public (undocumented)
|
|
693
|
-
export const version: string;
|
|
694
|
-
|
|
695
|
-
// @public (undocumented)
|
|
696
|
-
type VisibilityCallback = (params: boolean) => void;
|
|
697
|
-
|
|
698
|
-
// @public (undocumented)
|
|
699
|
-
type VisibilityEvent = 'setvisibility';
|
|
700
|
-
|
|
701
|
-
// @public (undocumented)
|
|
702
|
-
export class WithEditorActions extends React_2.Component<WithEditorActionsProps, any> {
|
|
703
|
-
// (undocumented)
|
|
704
|
-
componentDidMount(): void;
|
|
705
|
-
// (undocumented)
|
|
706
|
-
componentWillUnmount(): void;
|
|
707
|
-
// (undocumented)
|
|
708
|
-
context: {
|
|
709
|
-
editorActions: EditorActions;
|
|
710
|
-
};
|
|
711
|
-
// (undocumented)
|
|
712
|
-
static contextTypes: {
|
|
713
|
-
editorActions: PropTypes.Validator<object>;
|
|
714
|
-
};
|
|
715
|
-
// (undocumented)
|
|
716
|
-
render(): React_2.ReactElement<any, React_2.JSXElementConstructor<any> | string> | null;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
// @public (undocumented)
|
|
720
|
-
interface WithEditorActionsProps {
|
|
721
|
-
// (undocumented)
|
|
722
|
-
render(actions: EditorActions): React_2.ReactElement<any> | null;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
// @public (undocumented)
|
|
726
|
-
export class WithHelpTrigger extends React_2.Component<WithHelpTriggerProps, any> {
|
|
727
|
-
// (undocumented)
|
|
728
|
-
static contextTypes: {
|
|
729
|
-
editorActions: PropTypes.Validator<object>;
|
|
730
|
-
};
|
|
731
|
-
// (undocumented)
|
|
732
|
-
openHelp: () => void;
|
|
733
|
-
// (undocumented)
|
|
734
|
-
render(): React_2.ReactNode;
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
// @public (undocumented)
|
|
738
|
-
interface WithHelpTriggerProps {
|
|
739
|
-
// (undocumented)
|
|
740
|
-
render: (openHelp: () => void) => React_2.ReactNode;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
// (No @packageDocumentation comment for this package)
|
|
744
|
-
|
|
745
|
-
```
|