@atlaskit/editor-core 187.2.3 → 187.2.5

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.
@@ -1,2257 +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
- /// <reference types="react" />
9
-
10
- import { AbstractMentionResource } from '@atlaskit/mention/resource';
11
- import { ACTION } from '@atlaskit/editor-common/analytics';
12
- import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
13
- import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
14
- import { ActivityProvider } from '@atlaskit/activity-provider';
15
- import { AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
16
- import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
17
- import { AnalyticsEventPayload as AnalyticsEventPayload_2 } from '@atlaskit/analytics-next/AnalyticsEvent';
18
- import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
19
- import { AnnotationTypes } from '@atlaskit/adf-schema';
20
- import { BrowserFreezetracking } from '@atlaskit/editor-common/types';
21
- import { CardOptions } from '@atlaskit/editor-common/card';
22
- import { CardProvider } from '@atlaskit/editor-common/provider-factory';
23
- import { Color } from '@atlaskit/status/element';
24
- import { Command as Command_2 } from '@atlaskit/editor-common/types';
25
- import { ComponentType } from 'react';
26
- import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
27
- import { ContextUpdateHandler } from '@atlaskit/editor-common/types';
28
- import { createTable } from '@atlaskit/editor-plugin-table/commands';
29
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
30
- import { CreateUIAnalyticsEvent as CreateUIAnalyticsEvent_2 } from '@atlaskit/analytics-next/types';
31
- import { darkModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
32
- import { DecorationSet } from 'prosemirror-view';
33
- import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
34
- import { DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
35
- import { DirectEditorProps } from 'prosemirror-view';
36
- import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
37
- import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
38
- import { DropdownOptionT } from '@atlaskit/editor-common/types';
39
- import { EditorActionsOptions } from '@atlaskit/editor-common/types';
40
- import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
41
- import { EditorAppearance } from '@atlaskit/editor-common/types';
42
- import { FeatureFlags as EditorFeatureFlags } from '@atlaskit/editor-common/types';
43
- import { EditorPlugin } from '@atlaskit/editor-common/types';
44
- import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
45
- import { EditorReactContext } from '@atlaskit/editor-common/types';
46
- import { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
47
- import { EditorState } from 'prosemirror-state';
48
- import { EditorView } from 'prosemirror-view';
49
- import { EmojiResource } from '@atlaskit/emoji/resource';
50
- import { EmptyStateHandler } from '@atlaskit/editor-common/types';
51
- import { ErrorReporter } from '@atlaskit/editor-common/utils';
52
- import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
53
- import { EVENT_TYPE } from '@atlaskit/editor-common/analytics';
54
- import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
55
- import { EventEmitter as EventEmitter_2 } from 'events';
56
- import { ExperienceStore } from '@atlaskit/editor-common/ufo';
57
- import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
58
- import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
59
- import { ExtensionType } from '@atlaskit/editor-common/provider-factory';
60
- import { FC } from 'react';
61
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
62
- import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
63
- import { FloatingToolbarButton } from '@atlaskit/editor-common/types';
64
- import { FloatingToolbarColorPicker } from '@atlaskit/editor-common/types';
65
- import { FloatingToolbarConfig } from '@atlaskit/editor-common/types';
66
- import { FloatingToolbarDatePicker } from '@atlaskit/editor-common/types';
67
- import { FloatingToolbarDropdown } from '@atlaskit/editor-common/types';
68
- import { FloatingToolbarEmojiPicker } from '@atlaskit/editor-common/types';
69
- import { FloatingToolbarInput } from '@atlaskit/editor-common/types';
70
- import { FloatingToolbarItem } from '@atlaskit/editor-common/types';
71
- import { FloatingToolbarListPicker } from '@atlaskit/editor-common/types';
72
- import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
73
- import { FloatingToolbarSelect } from '@atlaskit/editor-common/types';
74
- import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
75
- import { GapCursorSelection } from '@atlaskit/editor-common/selection';
76
- import { Side as GapCursorSide } from '@atlaskit/editor-common/selection';
77
- import { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
78
- import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
79
- import { HeadingLevelsAndNormalText } from '@atlaskit/editor-common/types';
80
- import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
81
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
82
- import { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
83
- import { InputTracking } from '@atlaskit/editor-common/types';
84
- import { IntlShape } from 'react-intl-next';
85
- import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
86
- import { jsx } from '@emotion/react';
87
- import { lightModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
88
- import type { LinkingOptions } from '@atlaskit/editor-common/types';
89
- import { MacroAttributes } from '@atlaskit/editor-common/provider-factory';
90
- import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
91
- import { MarkConfig } from '@atlaskit/editor-common/types';
92
- import { MediaClientConfig } from '@atlaskit/media-core';
93
- import { MediaFeatureFlags } from '@atlaskit/media-common';
94
- import { MediaFeatureFlags as MediaFeatureFlags_2 } from '@atlaskit/media-common/mediaFeatureFlags';
95
- import { MediaFile } from '@atlaskit/media-picker/types';
96
- import { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
97
- import type { MentionDescription } from '@atlaskit/mention';
98
- import { MentionProvider } from '@atlaskit/mention/resource';
99
- import type { MentionProvider as MentionProvider_2 } from '@atlaskit/mention';
100
- import { MentionResource } from '@atlaskit/mention/resource';
101
- import { MenuItem } from '@atlaskit/editor-common/ui-menu';
102
- import { default as messages } from '@atlaskit/editor-common/messages';
103
- import { NextEditorPlugin } from '@atlaskit/editor-common/types';
104
- import { Node as Node_2 } from 'prosemirror-model';
105
- import { NodeConfig } from '@atlaskit/editor-common/types';
106
- import { NodeType } from 'prosemirror-model';
107
- import { NodeView } from 'prosemirror-view';
108
- import { OptionalPlugin } from '@atlaskit/editor-common/types';
109
- import { PaletteColor } from '@atlaskit/editor-common/ui-color';
110
- import { PerformanceTracking } from '@atlaskit/editor-common/types';
111
- import { PluginConfig } from '@atlaskit/editor-plugin-table/types';
112
- import { PluginKey } from 'prosemirror-state';
113
- import { PMPlugin } from '@atlaskit/editor-common/types';
114
- import { PortalProvider } from '@atlaskit/editor-common/portal-provider';
115
- import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
116
- import { PortalRenderer } from '@atlaskit/editor-common/portal-provider';
117
- import { PositionType } from '@atlaskit/tooltip/types';
118
- import { PresenceProvider } from '@atlaskit/mention/resource';
119
- import { PresenceResource } from '@atlaskit/mention/resource';
120
- import PropTypes from 'prop-types';
121
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
122
- import { Providers } from '@atlaskit/editor-common/provider-factory';
123
- import { PureComponent } from 'react';
124
- import { QuickInsertActionInsert } from '@atlaskit/editor-common/provider-factory';
125
- import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
126
- import { QuickInsertItemId } from '@atlaskit/editor-common/provider-factory';
127
- import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
128
- import { default as React_2 } from 'react';
129
- import { ReactElement } from 'react';
130
- import type { ReactHookFactory } from '@atlaskit/editor-common/types';
131
- import { RefObject } from 'react';
132
- import { ReplaceRawValue } from '@atlaskit/editor-common/types';
133
- import type { ResolvedEditorState } from '@atlaskit/collab-provider';
134
- import { RichMediaLayout } from '@atlaskit/adf-schema';
135
- import { Schema } from 'prosemirror-model';
136
- import type { SearchProvider } from '@atlaskit/editor-common/provider-factory';
137
- import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
138
- import type { SelectOption } from '@atlaskit/editor-common/types';
139
- import { setTextSelection } from '@atlaskit/editor-common/utils';
140
- import { SEVERITY } from '@atlaskit/editor-common/utils';
141
- import { TaskDecisionProvider } from '@atlaskit/task-decision';
142
- import { TeamMentionResource } from '@atlaskit/mention/team-resource';
143
- import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
144
- import { Transaction } from 'prosemirror-state';
145
- import { TransactionTracking } from '@atlaskit/editor-common/types';
146
- import { Transformer as Transformer_2 } from '@atlaskit/editor-common/types';
147
- import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
148
- import type { TypeAheadItem } from '@atlaskit/editor-common/types';
149
- import type { TypeAheadItem as TypeAheadItem_2 } from '@atlaskit/editor-common/provider-factory';
150
- import type { TypeAheadStats } from '@atlaskit/editor-common/types';
151
- import { UIComponentFactory } from '@atlaskit/editor-common/types';
152
- import { UploadEndEventPayload } from '@atlaskit/media-picker/types';
153
- import { UploadErrorEventPayload } from '@atlaskit/media-picker/types';
154
- import { UploadParams } from '@atlaskit/media-picker/types';
155
- import { UploadPreviewUpdateEventPayload } from '@atlaskit/media-picker/types';
156
- import type { WeekDay } from '@atlaskit/calendar/types';
157
- import type { widthPlugin } from '@atlaskit/editor-plugin-width';
158
- import { WithIntlProps } from 'react-intl-next';
159
- import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
160
- import { WrappedComponentProps } from 'react-intl-next';
161
-
162
- export { AbstractMentionResource }
163
-
164
- export { ACTION }
165
-
166
- export { ACTION_SUBJECT }
167
-
168
- export { ACTION_SUBJECT_ID }
169
-
170
- // @public (undocumented)
171
- type AddItemTransactionCreator = (opts: {
172
- state: EditorState;
173
- tr: Transaction;
174
- list: NodeType;
175
- item: NodeType;
176
- listLocalId: string;
177
- itemLocalId: string;
178
- }) => Transaction | null;
179
-
180
- // @public (undocumented)
181
- type AllowedBlockTypes = 'blockquote' | 'codeBlock' | 'hardBreak' | 'heading';
182
-
183
- // @public (undocumented)
184
- interface AllSelectionData {
185
- // (undocumented)
186
- type: 'all';
187
- }
188
-
189
- export { AnalyticsEventPayload }
190
-
191
- // @public (undocumented)
192
- type AnnotationComponentProps = {
193
- textSelection?: string;
194
- dom?: HTMLElement;
195
- onClose?: () => void;
196
- };
197
-
198
- // @public (undocumented)
199
- export type AnnotationInfo = {
200
- id: string;
201
- type: AnnotationTypes.INLINE_COMMENT;
202
- };
203
-
204
- // @public (undocumented)
205
- export interface AnnotationProviders {
206
- // (undocumented)
207
- inlineComment: InlineCommentAnnotationProvider;
208
- }
209
-
210
- // @public (undocumented)
211
- export interface AnnotationState<Type, State> {
212
- // (undocumented)
213
- annotationType: Type;
214
- // (undocumented)
215
- id: string;
216
- // (undocumented)
217
- state: State;
218
- }
219
-
220
- // @public (undocumented)
221
- export interface AnnotationTypeProvider<Type, State> {
222
- // (undocumented)
223
- disallowOnWhitespace?: boolean;
224
- // (undocumented)
225
- getState: (annotationIds: string[]) => Promise<AnnotationState<Type, State>[]>;
226
- // (undocumented)
227
- updateSubscriber?: AnnotationUpdateEmitter;
228
- }
229
-
230
- // @public (undocumented)
231
- export class AnnotationUpdateEmitter extends EventEmitter_2 {
232
- // (undocumented)
233
- on(event: VisibilityEvent, listener: (isVisible: boolean) => void): this;
234
- // (undocumented)
235
- on(event: UpdateEvent, listener: (annotationId: string) => void): this;
236
- }
237
-
238
- // @public (undocumented)
239
- interface BasePluginOptions {
240
- // (undocumented)
241
- allowInlineCursorTarget?: boolean;
242
- // (undocumented)
243
- allowScrollGutter?: ScrollGutterPluginOptions;
244
- // (undocumented)
245
- browserFreezeTracking?: BrowserFreezetracking;
246
- // (undocumented)
247
- inputTracking?: InputTracking;
248
- // (undocumented)
249
- ufo?: boolean;
250
- }
251
-
252
- // @public (undocumented)
253
- export class BaseReactEditorView<T = {}> extends ReactEditorView_2<T> {
254
- }
255
-
256
- // @public (undocumented)
257
- type BeforeAndAfterToolbarComponents = {
258
- before: ReactComponents;
259
- after: ReactComponents;
260
- };
261
-
262
- // @public (undocumented)
263
- export const blockPluginStateKey: PluginKey<BlockTypeState>;
264
-
265
- // @public (undocumented)
266
- interface BlockType {
267
- // (undocumented)
268
- level?: HeadingLevelsAndNormalText;
269
- // (undocumented)
270
- name: string;
271
- // (undocumented)
272
- nodeName: string;
273
- // (undocumented)
274
- tagName?: string;
275
- // (undocumented)
276
- title: MessageDescriptor;
277
- }
278
-
279
- // @public (undocumented)
280
- export type BlockTypeInputMethod = INPUT_METHOD.FORMATTING | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TOOLBAR;
281
-
282
- // @public (undocumented)
283
- interface BlockTypePluginOptions {
284
- // (undocumented)
285
- allowBlockType?: {
286
- exclude?: Array<AllowedBlockTypes>;
287
- };
288
- // (undocumented)
289
- isUndoRedoButtonsEnabled?: boolean;
290
- // (undocumented)
291
- lastNodeMustBeParagraph?: boolean;
292
- }
293
-
294
- // @public (undocumented)
295
- export type BlockTypeState = {
296
- currentBlockType: BlockType;
297
- blockTypesDisabled: boolean;
298
- availableBlockTypes: BlockType[];
299
- availableWrapperBlockTypes: BlockType[];
300
- };
301
-
302
- export { CardProvider }
303
-
304
- // @public (undocumented)
305
- interface CellSelectionData {
306
- // (undocumented)
307
- anchor: number;
308
- // (undocumented)
309
- head: number;
310
- // (undocumented)
311
- type: 'cell';
312
- }
313
-
314
- // @public (undocumented)
315
- export const changeColor: (color: string) => Command;
316
-
317
- // @public (undocumented)
318
- export const clearEditorContent: Command;
319
-
320
- // @public (undocumented)
321
- type CloseOptions = {
322
- insertCurrentQueryAsRawText: boolean;
323
- attachCommand?: Command;
324
- };
325
-
326
- // @public (undocumented)
327
- interface CodeBlockOptions extends LongPressSelectionPluginOptions {
328
- // (undocumented)
329
- allowCompositionInputOverride?: boolean;
330
- // (undocumented)
331
- allowCopyToClipboard?: boolean;
332
- // (undocumented)
333
- appearance?: EditorAppearance | undefined;
334
- }
335
-
336
- // @public (undocumented)
337
- interface CollabAnalyticsProps {
338
- EXPERIMENTAL_allowInternalErrorAnalytics?: boolean;
339
- }
340
-
341
- // @public (undocumented)
342
- type CollabEditOptions = {
343
- provider?: Providers['collabEditProvider'];
344
- userId?: string;
345
- useNativePlugin?: boolean;
346
- } & CollabInviteToEditProps & CollabAnalyticsProps;
347
-
348
- // @public (undocumented)
349
- interface CollabInviteToEditProps {
350
- // (undocumented)
351
- inviteToEditComponent?: React.ComponentType<InviteToEditComponentProps>;
352
- // (undocumented)
353
- inviteToEditHandler?: (event: React.MouseEvent<HTMLElement>) => void;
354
- // (undocumented)
355
- isInviteToEditButtonSelected?: boolean;
356
- }
357
-
358
- // @public (undocumented)
359
- export class CollapsedEditor extends React_2.Component<Props, State> {
360
- // (undocumented)
361
- componentDidUpdate(): void;
362
- // (undocumented)
363
- editorComponent?: Editor | EditorNext;
364
- // (undocumented)
365
- handleEditorRef: (editorRef?: Editor, editorRefCallback?: any) => void;
366
- // (undocumented)
367
- previouslyExpanded?: boolean;
368
- // (undocumented)
369
- render(): JSX.Element;
370
- }
371
-
372
- // @public (undocumented)
373
- export type Command = (state: EditorState, dispatch?: CommandDispatch, view?: EditorView) => boolean;
374
-
375
- // @public (undocumented)
376
- export type CommandDispatch = (tr: Transaction) => void;
377
-
378
- // @public (undocumented)
379
- export const commitStatusPicker: () => (editorView: EditorView) => void;
380
-
381
- // @public (undocumented)
382
- type ConfigWithNodeInfo = {
383
- config: FloatingToolbarConfig | undefined;
384
- pos: number;
385
- node: Node_2;
386
- };
387
-
388
- // @public (undocumented)
389
- type Context = {
390
- editorActions?: EditorActions;
391
- intl: IntlShape;
392
- };
393
-
394
- // @public (undocumented)
395
- export function ContextPanel(props: Props_4): jsx.JSX.Element;
396
-
397
- // @public (undocumented)
398
- interface CreateEditorStateOptions {
399
- // (undocumented)
400
- context: EditorReactContext;
401
- // (undocumented)
402
- doc?: Object | Node_2 | string;
403
- // (undocumented)
404
- props: EditorViewProps;
405
- // (undocumented)
406
- resetting?: boolean;
407
- // (undocumented)
408
- selectionAtStart?: boolean;
409
- }
410
-
411
- // @public (undocumented)
412
- export const createQuickInsertTools: (editorView: EditorView) => {
413
- getItems: (query: string, options?: QuickInsertPluginOptions) => QuickInsertItem[];
414
- };
415
-
416
- export { createTable }
417
-
418
- // @public (undocumented)
419
- export const createTypeAheadTools: (editorView: EditorView) => {
420
- isOpen: () => TypeAheadHandler | false;
421
- currentQuery: () => string | undefined;
422
- close: (options?: CloseOptions) => boolean;
423
- openMention: (inputMethod: TypeAheadInputMethod) => boolean;
424
- searchMention: (query?: string) => {
425
- type: (appendValue: string) => Promise<TypeAheadItem_2[]> | undefined;
426
- result: () => Promise<TypeAheadItem_2[] | undefined>;
427
- close: (options?: CloseOptions) => boolean;
428
- insert: ({ index, mode }: {
429
- index: number;
430
- mode?: SelectItemMode | undefined;
431
- }) => Promise<void>;
432
- };
433
- openQuickInsert: (inputMethod: TypeAheadInputMethod) => boolean;
434
- searchQuickInsert: (query?: string) => {
435
- type: (appendValue: string) => Promise<TypeAheadItem_2[]> | undefined;
436
- result: () => Promise<TypeAheadItem_2[] | undefined>;
437
- close: (options?: CloseOptions) => boolean;
438
- insert: ({ index, mode }: {
439
- index: number;
440
- mode?: SelectItemMode | undefined;
441
- }) => Promise<void>;
442
- };
443
- openEmoji: (inputMethod: TypeAheadInputMethod) => boolean;
444
- searchEmoji: (query?: string) => {
445
- type: (appendValue: string) => Promise<TypeAheadItem_2[]> | undefined;
446
- result: () => Promise<TypeAheadItem_2[] | undefined>;
447
- close: (options?: CloseOptions) => boolean;
448
- insert: ({ index, mode }: {
449
- index: number;
450
- mode?: SelectItemMode | undefined;
451
- }) => Promise<void>;
452
- };
453
- insertItemMention: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
454
- insertItemEmoji: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
455
- insertItemQuickInsert: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
456
- };
457
-
458
- // @public (undocumented)
459
- export interface CustomMediaPicker {
460
- // (undocumented)
461
- destroy(): void;
462
- // (undocumented)
463
- emit(event: string, data: any): void;
464
- // (undocumented)
465
- on(event: string, cb: Listener): void;
466
- // (undocumented)
467
- removeAllListeners(event: any): void;
468
- // (undocumented)
469
- setUploadParams(uploadParams: UploadParams): void;
470
- }
471
-
472
- export { darkModeStatusColorPalette }
473
-
474
- // @public (undocumented)
475
- export const dateMessages: {
476
- editText: {
477
- id: string;
478
- defaultMessage: string;
479
- description: string;
480
- };
481
- };
482
-
483
- // @public (undocumented)
484
- interface DatePluginConfig {
485
- // (undocumented)
486
- weekStartDay?: WeekDay;
487
- }
488
-
489
- // @public (undocumented)
490
- export const datePluginKey: PluginKey<DatePluginState>;
491
-
492
- // @public (undocumented)
493
- export type DatePluginState = {
494
- isQuickInsertAction?: boolean;
495
- isNew: boolean;
496
- showDatePickerAt: null | number;
497
- isDateEmpty: boolean;
498
- focusDateInput: boolean;
499
- };
500
-
501
- // @public
502
- export function dateToDateType(date: Date): DateType;
503
-
504
- // @public (undocumented)
505
- type DateType = {
506
- year: number;
507
- month: number;
508
- day?: number;
509
- };
510
-
511
- // @public (undocumented)
512
- export function dedupe<T>(list?: T[], iteratee?: (p: T) => T | T[keyof T]): T[];
513
-
514
- export { DEFAULT_BORDER_COLOR }
515
-
516
- // @public (undocumented)
517
- type DefaultPresetPluginOptions = {
518
- paste: PastePluginOptions;
519
- base?: BasePluginOptions;
520
- blockType?: BlockTypePluginOptions;
521
- placeholder?: PlaceholderPluginOptions;
522
- textFormatting?: TextFormattingOptions;
523
- submitEditor?: EditorProps['onSave'];
524
- annotationProviders?: AnnotationProviders;
525
- quickInsert?: QuickInsertPluginOptions;
526
- codeBlock?: CodeBlockOptions;
527
- selection?: SelectionPluginOptions;
528
- cardOptions?: CardOptions;
529
- hyperlinkOptions?: HyperlinkPluginOptions;
530
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
531
- typeAhead?: TypeAheadPluginOptions;
532
- allowAnalyticsGASV3?: boolean;
533
- performanceTracking?: EditorProps['performanceTracking'];
534
- };
535
-
536
- // @public
537
- export const deleteDate: () => Command;
538
-
539
- export { DropdownOptionT }
540
-
541
- // @public (undocumented)
542
- export class Editor extends React_2.Component<EditorProps> {
543
- // (undocumented)
544
- static defaultProps: EditorProps;
545
- // (undocumented)
546
- render(): jsx.JSX.Element;
547
- }
548
-
549
- // @public (undocumented)
550
- export class EditorActions<T = any> implements EditorActionsOptions<T> {
551
- // (undocumented)
552
- __temporaryFixForConfigPanel(): Promise<void>;
553
- // (undocumented)
554
- appendText(text: string): boolean;
555
- // (undocumented)
556
- blur(): boolean;
557
- // (undocumented)
558
- clear(): boolean;
559
- // (undocumented)
560
- dispatchAnalyticsEvent: (payload: AnalyticsEventPayload_2) => void;
561
- // (undocumented)
562
- focus(): boolean;
563
- // (undocumented)
564
- static from<T>(view: EditorView, eventDispatcher: EventDispatcher, transformer?: Transformer_2<T>): EditorActions<T>;
565
- // (undocumented)
566
- getNodeByFragmentLocalId(id: string): Node_2 | undefined;
567
- // (undocumented)
568
- getNodeByLocalId(id: string): Node_2 | undefined;
569
- getResolvedEditorState: () => Promise<ResolvedEditorState | undefined>;
570
- getSelectedNode(): Node_2 | undefined;
571
- // (undocumented)
572
- getValue(): Promise<T | JSONDocNode | undefined>;
573
- // (undocumented)
574
- isDocumentEmpty(): boolean;
575
- // (undocumented)
576
- _privateGetEditorView(): EditorView | undefined;
577
- // (undocumented)
578
- _privateGetEventDispatcher(): EventDispatcher | undefined;
579
- // (undocumented)
580
- _privateRegisterEditor(editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer_2<T>, getFeatureFlags?: () => EditorFeatureFlags): void;
581
- // (undocumented)
582
- _privateSubscribe(cb: ContextUpdateHandler): void;
583
- // (undocumented)
584
- _privateUnregisterEditor(): void;
585
- // (undocumented)
586
- _privateUnsubscribe(cb: ContextUpdateHandler): void;
587
- // (undocumented)
588
- replaceDocument(rawValue: any, shouldScrollToBottom?: boolean,
589
- shouldAddToHistory?: boolean): boolean;
590
- // (undocumented)
591
- replaceSelection(rawValue: Array<ReplaceRawValue> | ReplaceRawValue, tryToReplace?: boolean): boolean;
592
- }
593
-
594
- // @public (undocumented)
595
- interface EditorBaseProps {
596
- // (undocumented)
597
- appearance?: EditorAppearance;
598
- // (undocumented)
599
- assistiveLabel?: string;
600
- // (undocumented)
601
- codeBlock?: CodeBlockOptions;
602
- // (undocumented)
603
- contentComponents?: ReactComponents;
604
- // (undocumented)
605
- contentTransformerProvider?: (schema: Schema) => Transformer_2<string>;
606
- // (undocumented)
607
- contextPanel?: ReactComponents;
608
- // (undocumented)
609
- defaultValue?: Node_2 | Object | string;
610
- // (undocumented)
611
- disabled?: boolean;
612
- // (undocumented)
613
- editorActions?: EditorActions;
614
- // (undocumented)
615
- errorReporterHandler?: ErrorReportingHandler;
616
- // (undocumented)
617
- extensionProviders?: ExtensionProvidersProp;
618
- featureFlags?: {
619
- [featureFlag: string]: boolean | string;
620
- };
621
- // @deprecated
622
- inputSamplingLimit?: number;
623
- // (undocumented)
624
- maxHeight?: number;
625
- // (undocumented)
626
- minHeight?: number;
627
- // (undocumented)
628
- onCancel?: (editorView: EditorView) => void;
629
- // (undocumented)
630
- onChange?: EditorOnChangeHandler;
631
- // (undocumented)
632
- onDestroy?: () => void;
633
- // (undocumented)
634
- onEditorReady?: (editorActions: EditorActions) => void;
635
- // (undocumented)
636
- persistScrollGutter?: boolean;
637
- // (undocumented)
638
- placeholder?: string;
639
- // (undocumented)
640
- placeholderBracketHint?: string;
641
- // (undocumented)
642
- popupsBoundariesElement?: HTMLElement;
643
- // (undocumented)
644
- popupsMountPoint?: HTMLElement;
645
- // (undocumented)
646
- popupsScrollableElement?: HTMLElement;
647
- // (undocumented)
648
- primaryToolbarIconBefore?: ReactElement;
649
- // (undocumented)
650
- quickInsert?: QuickInsertOptions;
651
- // (undocumented)
652
- secondaryToolbarComponents?: ReactComponents;
653
- // (undocumented)
654
- shouldFocus?: boolean;
655
- // (undocumented)
656
- textFormatting?: TextFormattingOptions;
657
- trackValidTransactions?: boolean | {
658
- samplingRate: number;
659
- };
660
- // (undocumented)
661
- UNSAFE_useAnalyticsContext?: boolean;
662
- useStickyToolbar?: UseStickyToolbarType;
663
- }
664
-
665
- // @public (undocumented)
666
- interface EditorConfig {
667
- // (undocumented)
668
- contentComponents: UIComponentFactory[];
669
- // (undocumented)
670
- marks: MarkConfig[];
671
- // (undocumented)
672
- nodes: NodeConfig[];
673
- // (undocumented)
674
- onEditorViewStateUpdatedCallbacks: Array<{
675
- pluginName: string;
676
- callback: (props: EditorViewStateUpdatedCallbackProps) => void;
677
- }>;
678
- // (undocumented)
679
- pluginHooks: ReactHookFactory[];
680
- // (undocumented)
681
- pmPlugins: Array<PMPlugin>;
682
- // (undocumented)
683
- primaryToolbarComponents: ToolbarUIComponentFactory[];
684
- // (undocumented)
685
- secondaryToolbarComponents: UIComponentFactory[];
686
- }
687
-
688
- // @public (undocumented)
689
- export class EditorContext extends React_2.Component<EditorContextProps, {}> {
690
- constructor(props: EditorContextProps);
691
- // (undocumented)
692
- static childContextTypes: {
693
- editorActions: PropTypes.Requireable<object>;
694
- };
695
- // (undocumented)
696
- getChildContext(): {
697
- editorActions: EditorActions<any>;
698
- };
699
- // (undocumented)
700
- render(): JSX.Element;
701
- }
702
-
703
- // @public (undocumented)
704
- type EditorContextProps = {
705
- editorActions?: EditorActions;
706
- };
707
-
708
- // @public (undocumented)
709
- const editorDisabledPlugin: NextEditorPlugin<'editorDisabled', {
710
- sharedState: EditorDisabledPluginState;
711
- }>;
712
-
713
- // @public (undocumented)
714
- type EditorDisabledPluginState = {
715
- editorDisabled: boolean;
716
- };
717
-
718
- export { EditorFeatureFlags }
719
-
720
- // @public (undocumented)
721
- export interface EditorInstance {
722
- // (undocumented)
723
- contentComponents: UIComponentFactory[];
724
- // (undocumented)
725
- contentTransformer?: Transformer<string>;
726
- // (undocumented)
727
- editorView: EditorView;
728
- // (undocumented)
729
- eventDispatcher: EventDispatcher;
730
- // (undocumented)
731
- insertMenuItems?: MenuItem[];
732
- // (undocumented)
733
- onEditorViewStateUpdatedCallbacks: {
734
- pluginName: string;
735
- callback: OnEditorViewStateUpdated;
736
- }[];
737
- // (undocumented)
738
- primaryToolbarComponents: ToolbarUIComponentFactory[];
739
- // (undocumented)
740
- secondaryToolbarComponents: UIComponentFactory[];
741
- }
742
-
743
- // @public (undocumented)
744
- class EditorNext extends React_2.Component<EditorNextProps> {
745
- constructor(props: EditorNextProps, context: Context);
746
- // (undocumented)
747
- static contextTypes: {
748
- editorActions: PropTypes.Requireable<object>;
749
- };
750
- // (undocumented)
751
- static defaultProps: {
752
- appearance: string;
753
- disabled: boolean;
754
- quickInsert: boolean;
755
- };
756
- // (undocumented)
757
- static propTypes: {
758
- preset: ({ preset }: Pick<EditorNextProps, 'preset'>) => Error | null;
759
- minHeight: ({ appearance, minHeight, }: Pick<EditorProps, "appearance" | "minHeight">) => Error | null;
760
- };
761
- // (undocumented)
762
- render(): jsx.JSX.Element;
763
- }
764
-
765
- // @public (undocumented)
766
- interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithPlugins, EditorProviderProps {
767
- // (undocumented)
768
- preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
769
- }
770
-
771
- // @public (undocumented)
772
- type EditorOnChangeHandler = (editorView: EditorView, meta: {
773
- source: 'local' | 'remote';
774
- }) => void;
775
-
776
- export { EditorPlugin }
777
-
778
- // @public (undocumented)
779
- interface EditorPluginFeatureProps {
780
- // (undocumented)
781
- allowBlockType?: BlockTypePluginOptions['allowBlockType'];
782
- // (undocumented)
783
- allowBreakout?: boolean;
784
- // (undocumented)
785
- allowConfluenceInlineComment?: boolean;
786
- // (undocumented)
787
- allowDate?: DatePluginConfig | boolean;
788
- // (undocumented)
789
- allowExpand?: boolean | {
790
- allowInsertion?: boolean;
791
- allowInteractiveExpand?: boolean;
792
- };
793
- // (undocumented)
794
- allowExtension?: ExtensionConfig | boolean;
795
- // (undocumented)
796
- allowFindReplace?: FindReplaceOptions | boolean;
797
- allowFragmentMark?: boolean;
798
- // (undocumented)
799
- allowHelpDialog?: boolean;
800
- // (undocumented)
801
- allowIndentation?: boolean;
802
- // (undocumented)
803
- allowJiraIssue?: boolean;
804
- // (undocumented)
805
- allowLayouts?: LayoutPluginOptions | boolean;
806
- // (undocumented)
807
- allowNestedTasks?: boolean;
808
- allowNewInsertionBehaviour?: boolean;
809
- // (undocumented)
810
- allowPanel?: PanelPluginConfig | boolean;
811
- // (undocumented)
812
- allowRule?: boolean;
813
- // (undocumented)
814
- allowStatus?: boolean | {
815
- menuDisabled: boolean;
816
- };
817
- // (undocumented)
818
- allowTasksAndDecisions?: boolean;
819
- // (undocumented)
820
- allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
821
- // (undocumented)
822
- allowTextAlignment?: boolean;
823
- autoScrollIntoView?: boolean;
824
- // (undocumented)
825
- elementBrowser?: {
826
- showModal?: boolean;
827
- replacePlusMenu?: boolean;
828
- helpUrl?: string;
829
- emptyStateHandler?: EmptyStateHandler;
830
- };
831
- // (undocumented)
832
- extensionHandlers?: ExtensionHandlers;
833
- // (undocumented)
834
- feedbackInfo?: FeedbackInfo;
835
- // (undocumented)
836
- maxContentSize?: number;
837
- // (undocumented)
838
- mention?: MentionPluginConfig;
839
- // @deprecated
840
- mentionInsertDisplayName?: boolean;
841
- // (undocumented)
842
- saveOnEnter?: boolean;
843
- UNSAFE_allowBorderMark?: boolean;
844
- // (undocumented)
845
- uploadErrorHandler?: (state: MediaState) => void;
846
- // (undocumented)
847
- waitForMediaUpload?: boolean;
848
- }
849
-
850
- // @public (undocumented)
851
- interface EditorPresetProps {
852
- // (undocumented)
853
- excludes?: Set<string>;
854
- // (undocumented)
855
- experimental?: Array<string>;
856
- // (undocumented)
857
- featureFlags?: EditorFeatureFlags;
858
- }
859
-
860
- // @public (undocumented)
861
- type EditorProduct = 'bitbucket' | 'confluence' | 'jira' | 'stride' | undefined;
862
-
863
- // @public (undocumented)
864
- export interface EditorProps extends EditorBaseProps, EditorPluginFeatureProps, EditorSharedPropsWithPlugins, EditorProviderProps {
865
- // @deprecated (undocumented)
866
- dangerouslyAppendPlugins?: {
867
- __plugins: EditorPlugin[];
868
- };
869
- }
870
-
871
- // @public (undocumented)
872
- interface EditorProviderProps {
873
- // (undocumented)
874
- activityProvider?: Promise<ActivityProvider>;
875
- // (undocumented)
876
- annotationProviders?: AnnotationProviders;
877
- // (undocumented)
878
- autoformattingProvider?: Providers['autoformattingProvider'];
879
- // (undocumented)
880
- collabEditProvider?: Providers['collabEditProvider'];
881
- // (undocumented)
882
- emojiProvider?: Providers['emojiProvider'];
883
- // (undocumented)
884
- legacyImageUploadProvider?: Providers['imageUploadProvider'];
885
- // (undocumented)
886
- macroProvider?: Providers['macroProvider'];
887
- // (undocumented)
888
- mentionProvider?: Promise<MentionProvider>;
889
- // (undocumented)
890
- presenceProvider?: Promise<any>;
891
- // (undocumented)
892
- searchProvider?: Promise<SearchProvider>;
893
- // (undocumented)
894
- taskDecisionProvider?: Promise<TaskDecisionProvider>;
895
- }
896
-
897
- // @public (undocumented)
898
- interface EditorSharedPropsWithPlugins {
899
- // (undocumented)
900
- allowAnalyticsGASV3?: boolean;
901
- // (undocumented)
902
- allowTables?: PluginConfig | boolean;
903
- // (undocumented)
904
- allowTextColor?: TextColorPluginConfig | boolean;
905
- // (undocumented)
906
- allowUndoRedoButtons?: boolean;
907
- // (undocumented)
908
- collabEdit?: CollabEditOptions;
909
- // (undocumented)
910
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
911
- // (undocumented)
912
- insertMenuItems?: MenuItem[];
913
- linking?: LinkingOptions;
914
- // (undocumented)
915
- media?: MediaOptions;
916
- // (undocumented)
917
- onSave?: (editorView: EditorView) => void;
918
- performanceTracking?: PerformanceTracking;
919
- // (undocumented)
920
- primaryToolbarComponents?: PrimaryToolbarComponents;
921
- // (undocumented)
922
- sanitizePrivateContent?: boolean;
923
- // @deprecated (undocumented)
924
- smartLinks?: CardOptions;
925
- // @deprecated (undocumented)
926
- UNSAFE_cards?: CardOptions;
927
- }
928
-
929
- // @public (undocumented)
930
- interface EditorViewProps {
931
- // (undocumented)
932
- allowAnalyticsGASV3?: boolean;
933
- // (undocumented)
934
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
935
- // (undocumented)
936
- disabled?: boolean;
937
- // (undocumented)
938
- editorProps: EditorNextProps | EditorProps;
939
- // (undocumented)
940
- experienceStore?: ExperienceStore;
941
- // (undocumented)
942
- onEditorCreated: (instance: {
943
- view: EditorView;
944
- config: EditorConfig;
945
- eventDispatcher: EventDispatcher;
946
- transformer?: Transformer_2<string>;
947
- }) => void;
948
- // (undocumented)
949
- onEditorDestroyed: (instance: {
950
- view: EditorView;
951
- config: EditorConfig;
952
- eventDispatcher: EventDispatcher;
953
- transformer?: Transformer_2<string>;
954
- }) => void;
955
- // (undocumented)
956
- portalProviderAPI: PortalProviderAPI;
957
- // (undocumented)
958
- preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
959
- // (undocumented)
960
- providerFactory: ProviderFactory;
961
- // (undocumented)
962
- render?: (props: {
963
- editor: JSX.Element;
964
- view?: EditorView;
965
- config: EditorConfig;
966
- eventDispatcher: EventDispatcher;
967
- transformer?: Transformer_2<string>;
968
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
969
- editorRef: React_2.RefObject<HTMLDivElement>;
970
- }) => JSX.Element;
971
- }
972
-
973
- // @public (undocumented)
974
- type EditorViewStateUpdatedCallbackProps = {
975
- readonly originalTransaction: Readonly<Transaction>;
976
- readonly transactions: readonly Transaction[];
977
- readonly oldEditorState: Readonly<EditorState>;
978
- readonly newEditorState: Readonly<EditorState>;
979
- };
980
-
981
- export { EmojiResource }
982
-
983
- export { EVENT_TYPE }
984
-
985
- export { EventDispatcher }
986
-
987
- // @public (undocumented)
988
- interface ExtensionConfig {
989
- // (undocumented)
990
- allowAutoSave?: boolean;
991
- // (undocumented)
992
- allowBreakout?: boolean;
993
- // (undocumented)
994
- allowExtendFloatingToolbars?: boolean;
995
- }
996
-
997
- // @public (undocumented)
998
- type ExtensionProviders = (ExtensionProvider | Promise<ExtensionProvider>)[];
999
-
1000
- // @public (undocumented)
1001
- type ExtensionProvidersProp = ExtensionProviders | ExtensionProvidersWithEditorAction;
1002
-
1003
- // @public (undocumented)
1004
- type ExtensionProvidersWithEditorAction = (editorActions?: EditorActions) => ExtensionProviders;
1005
-
1006
- export { ExtensionType }
1007
-
1008
- // @public (undocumented)
1009
- type FeedbackInfo = {
1010
- product?: string;
1011
- packageVersion?: string;
1012
- packageName?: string;
1013
- labels?: Array<string>;
1014
- sessionId?: string;
1015
- contentId?: string;
1016
- tabId?: string;
1017
- };
1018
-
1019
- // @public (undocumented)
1020
- type FindReplaceOptions = {
1021
- allowMatchCase?: boolean;
1022
- };
1023
-
1024
- export { FloatingToolbarButton }
1025
-
1026
- export { FloatingToolbarColorPicker }
1027
-
1028
- export { FloatingToolbarConfig }
1029
-
1030
- export { FloatingToolbarDatePicker }
1031
-
1032
- export { FloatingToolbarDropdown }
1033
-
1034
- export { FloatingToolbarEmojiPicker }
1035
-
1036
- export { FloatingToolbarInput }
1037
-
1038
- export { FloatingToolbarItem }
1039
-
1040
- export { FloatingToolbarListPicker }
1041
-
1042
- // @public
1043
- export const floatingToolbarPluginKey: PluginKey<FloatingToolbarPluginState>;
1044
-
1045
- // @public (undocumented)
1046
- export type FloatingToolbarPluginState = Record<'getConfigWithNodeInfo', (state: EditorState) => ConfigWithNodeInfo | null | undefined>;
1047
-
1048
- export { FloatingToolbarSelect }
1049
-
1050
- export { GapCursorSelection }
1051
-
1052
- export { GapCursorSide }
1053
-
1054
- // @public (undocumented)
1055
- interface GapSelectionData {
1056
- // (undocumented)
1057
- pos: number;
1058
- // (undocumented)
1059
- type: 'gapcursor';
1060
- }
1061
-
1062
- // @public (undocumented)
1063
- export function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
1064
-
1065
- // @public (undocumented)
1066
- export const getListCommands: () => {
1067
- indentList: typeof indentList;
1068
- outdentList: typeof outdentList;
1069
- toggleOrderedList: typeof toggleOrderedList;
1070
- toggleBulletList: typeof toggleBulletList;
1071
- };
1072
-
1073
- // @public (undocumented)
1074
- export function getNodesCount(node: Node_2): Record<string, number>;
1075
-
1076
- // @public (undocumented)
1077
- type getPosHandler = boolean | getPosHandlerNode;
1078
-
1079
- // @public (undocumented)
1080
- type getPosHandlerNode = () => number | undefined;
1081
-
1082
- // @public
1083
- export function hasVisibleContent(node: Node_2): boolean;
1084
-
1085
- // @public
1086
- export const historyPluginKey: PluginKey<HistoryPluginState>;
1087
-
1088
- // @public (undocumented)
1089
- export interface HistoryPluginState {
1090
- // (undocumented)
1091
- canRedo: boolean;
1092
- // (undocumented)
1093
- canUndo: boolean;
1094
- }
1095
-
1096
- // @public (undocumented)
1097
- function indentList(inputMethod?: InputMethod): Command;
1098
-
1099
- // @public (undocumented)
1100
- export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationTypes.INLINE_COMMENT, InlineCommentState> & {
1101
- createComponent?: React_2.ComponentType<InlineCommentCreateComponentProps>;
1102
- viewComponent?: React_2.ComponentType<InlineCommentViewComponentProps>;
1103
- isToolbarAbove?: boolean;
1104
- };
1105
-
1106
- // @public (undocumented)
1107
- export type InlineCommentCreateComponentProps = AnnotationComponentProps & {
1108
- onCreate: (id: string) => void;
1109
- };
1110
-
1111
- // @public (undocumented)
1112
- export type InlineCommentState = {
1113
- resolved: boolean;
1114
- };
1115
-
1116
- // @public (undocumented)
1117
- export type InlineCommentViewComponentProps = AnnotationComponentProps & {
1118
- annotations: Array<AnnotationInfo>;
1119
- onResolve: (id: string) => void;
1120
- onDelete?: (id: string) => void;
1121
- };
1122
-
1123
- export { INPUT_METHOD }
1124
-
1125
- // @public (undocumented)
1126
- type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
1127
-
1128
- // @public (undocumented)
1129
- type InputMethod_2 = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
1130
-
1131
- // @public (undocumented)
1132
- export type InsertBlockInputMethodToolbar = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.TOOLBAR;
1133
-
1134
- // @public (undocumented)
1135
- export function insertBlockType(name: string): Command;
1136
-
1137
- // @public (undocumented)
1138
- export const insertBlockTypesWithAnalytics: (name: string, inputMethod: BlockTypeInputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command_2;
1139
-
1140
- // @public (undocumented)
1141
- export const insertDate: (date?: DateType, inputMethod?: InsertBlockInputMethodToolbar, commitMethod?: INPUT_METHOD.KEYBOARD | INPUT_METHOD.PICKER, enterPressed?: boolean) => Command;
1142
-
1143
- // @public (undocumented)
1144
- export const insertExpand: Command;
1145
-
1146
- // @public (undocumented)
1147
- export const insertHorizontalRule: (inputMethod: INPUT_METHOD.FORMATTING | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TOOLBAR, featureFlags: EditorFeatureFlags) => Command;
1148
-
1149
- // @public (undocumented)
1150
- type InsertItemProps = {
1151
- contentItem: TypeAheadItem_2;
1152
- query: string;
1153
- sourceListItem: TypeAheadItem_2[];
1154
- };
1155
-
1156
- // @public (undocumented)
1157
- export const insertMediaSingleNode: (view: EditorView, mediaState: MediaState, inputMethod?: InputMethodInsertMedia, collection?: string, alignLeftOnInsert?: boolean, newInsertionBehaviour?: boolean) => boolean;
1158
-
1159
- // @public (undocumented)
1160
- export const insertTaskDecisionCommand: (listType: TaskDecisionListType, inputMethod?: INPUT_METHOD.FORMATTING | INPUT_METHOD.QUICK_INSERT | InsertBlockInputMethodToolbar, addItem?: AddItemTransactionCreator, listLocalId?: string, itemLocalId?: string) => Command;
1161
-
1162
- // @public (undocumented)
1163
- type InviteToEditButtonProps = {
1164
- onClick: (event: React.MouseEvent<HTMLElement>) => void;
1165
- selected: boolean;
1166
- };
1167
-
1168
- // @public (undocumented)
1169
- type InviteToEditComponentProps = {
1170
- children: ReactElement<InviteToEditButtonProps>;
1171
- };
1172
-
1173
- // @public (undocumented)
1174
- interface LayoutPluginOptions extends LongPressSelectionPluginOptions {
1175
- // (undocumented)
1176
- allowBreakout?: boolean;
1177
- // (undocumented)
1178
- UNSAFE_addSidebarLayouts?: boolean;
1179
- // (undocumented)
1180
- UNSAFE_allowSingleColumnLayout?: boolean;
1181
- }
1182
-
1183
- export { lightModeStatusColorPalette }
1184
-
1185
- // @public (undocumented)
1186
- type Listener = (data: any) => void;
1187
-
1188
- // @public (undocumented)
1189
- export type ListInputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
1190
-
1191
- // @public (undocumented)
1192
- export interface ListState {
1193
- // (undocumented)
1194
- bulletListActive: boolean;
1195
- // (undocumented)
1196
- bulletListDisabled: boolean;
1197
- // (undocumented)
1198
- decorationSet: DecorationSet;
1199
- // (undocumented)
1200
- orderedListActive: boolean;
1201
- // (undocumented)
1202
- orderedListDisabled: boolean;
1203
- }
1204
-
1205
- // @public (undocumented)
1206
- export const listStateKey: PluginKey<ListState>;
1207
-
1208
- // @public (undocumented)
1209
- interface LongPressSelectionPluginOptions {
1210
- // (undocumented)
1211
- useLongPressSelection?: boolean;
1212
- }
1213
-
1214
- export { MacroAttributes }
1215
-
1216
- export { MacroProvider }
1217
-
1218
- // @public (undocumented)
1219
- interface MeasureHelpers {
1220
- // (undocumented)
1221
- startMeasure: (measureName: string) => void;
1222
- // (undocumented)
1223
- stopMeasure: (measureName: string, onMeasureComplete?: (duration: number, startTime: number) => void) => void;
1224
- }
1225
-
1226
- // @public (undocumented)
1227
- type MeasureListener = (entry: SimpleEntry) => void;
1228
-
1229
- // @public (undocumented)
1230
- export const measurements: {
1231
- EDITOR_MOUNTED: string;
1232
- PROSEMIRROR_RENDERED: string;
1233
- PROSEMIRROR_CONTENT_RENDERED: string;
1234
- ON_EDITOR_READY_CALLBACK: string;
1235
- PASTE: string;
1236
- };
1237
-
1238
- // @public (undocumented)
1239
- interface MediaNodeWithPosHandler {
1240
- // (undocumented)
1241
- getPos: ProsemirrorGetPosHandler;
1242
- // (undocumented)
1243
- node: Node_2;
1244
- }
1245
-
1246
- // @public (undocumented)
1247
- export interface MediaOptions {
1248
- // (undocumented)
1249
- alignLeftOnInsert?: boolean;
1250
- // (undocumented)
1251
- allowAdvancedToolBarOptions?: boolean;
1252
- // (undocumented)
1253
- allowAltTextOnImages?: boolean;
1254
- // (undocumented)
1255
- allowBreakoutSnapPoints?: boolean;
1256
- // (undocumented)
1257
- allowDropzoneDropLine?: boolean;
1258
- // (undocumented)
1259
- allowLazyLoading?: boolean;
1260
- // (undocumented)
1261
- allowLinking?: boolean;
1262
- // (undocumented)
1263
- allowMarkingUploadsAsIncomplete?: boolean;
1264
- // (undocumented)
1265
- allowMediaGroup?: boolean;
1266
- // (undocumented)
1267
- allowMediaSingle?: MediaSingleOptions | boolean;
1268
- // (undocumented)
1269
- allowMediaSingleEditable?: boolean;
1270
- // (undocumented)
1271
- allowRemoteDimensionsFetch?: boolean;
1272
- // (undocumented)
1273
- allowResizing?: boolean;
1274
- // (undocumented)
1275
- allowResizingInTables?: boolean;
1276
- // (undocumented)
1277
- allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
1278
- // (undocumented)
1279
- altTextValidator?: (value: string) => string[];
1280
- // (undocumented)
1281
- customDropzoneContainer?: HTMLElement;
1282
- // (undocumented)
1283
- customMediaPicker?: CustomMediaPicker;
1284
- // (undocumented)
1285
- editorSelectionAPI?: EditorSelectionAPI;
1286
- // (undocumented)
1287
- enableDownloadButton?: boolean;
1288
- // (undocumented)
1289
- featureFlags?: MediaFeatureFlags;
1290
- // (undocumented)
1291
- fullWidthEnabled?: boolean;
1292
- // (undocumented)
1293
- getEditorFeatureFlags?: GetEditorFeatureFlags;
1294
- // (undocumented)
1295
- isCopyPasteEnabled?: boolean;
1296
- // (undocumented)
1297
- provider?: Providers['mediaProvider'];
1298
- // (undocumented)
1299
- uploadErrorHandler?: (state: MediaState) => void;
1300
- // (undocumented)
1301
- useForgePlugins?: boolean;
1302
- // (undocumented)
1303
- waitForMediaUpload?: boolean;
1304
- }
1305
-
1306
- // @public (undocumented)
1307
- export const mediaPlugin: NextEditorPlugin<'media', {
1308
- pluginConfiguration: MediaOptions | undefined;
1309
- dependencies: [
1310
- typeof featureFlagsPlugin,
1311
- OptionalPlugin<typeof analyticsPlugin>,
1312
- typeof gridPlugin,
1313
- typeof widthPlugin,
1314
- typeof decorationsPlugin,
1315
- FloatingToolbarPlugin,
1316
- typeof editorDisabledPlugin
1317
- ];
1318
- sharedState: MediaPluginState | null;
1319
- }>;
1320
-
1321
- // @public (undocumented)
1322
- export const mediaPluginKey: PluginKey<MediaPluginState>;
1323
-
1324
- // @public (undocumented)
1325
- type MediaPluginOptions = {
1326
- providerFactory: ProviderFactory;
1327
- nodeViews: {
1328
- [name: string]: (node: Node_2, view: EditorView, getPos: getPosHandler) => NodeView;
1329
- };
1330
- errorReporter?: ErrorReporter;
1331
- uploadErrorHandler?: (state: MediaState) => void;
1332
- waitForMediaUpload?: boolean;
1333
- customDropzoneContainer?: HTMLElement;
1334
- customMediaPicker?: CustomMediaPicker;
1335
- allowResizing: boolean;
1336
- };
1337
-
1338
- // @public (undocumented)
1339
- interface MediaPluginState {
1340
- // (undocumented)
1341
- addPendingTask: (promise: Promise<any>) => void;
1342
- // (undocumented)
1343
- allowsUploads: boolean;
1344
- // (undocumented)
1345
- allUploadsFinished: boolean;
1346
- // (undocumented)
1347
- destroy(): void;
1348
- // (undocumented)
1349
- dispatch?: Dispatch;
1350
- // (undocumented)
1351
- editingMediaSinglePos?: number;
1352
- // (undocumented)
1353
- element?: HTMLElement;
1354
- // (undocumented)
1355
- findMediaNode: (id: string) => MediaNodeWithPosHandler | null;
1356
- // (undocumented)
1357
- getMediaOptions: () => MediaPluginOptions;
1358
- // (undocumented)
1359
- handleDrag: (dragState: 'enter' | 'leave') => void;
1360
- // (undocumented)
1361
- handleMediaGroupUpdate: (oldNodes: Node_2[], newNodes: Node_2[]) => void;
1362
- // (undocumented)
1363
- handleMediaNodeMount: (node: Node_2, getPos: ProsemirrorGetPosHandler) => void;
1364
- // (undocumented)
1365
- handleMediaNodeRemoval: (node: Node_2 | undefined, getPos: ProsemirrorGetPosHandler) => void;
1366
- // (undocumented)
1367
- handleMediaNodeUnmount: (oldNode: Node_2) => void;
1368
- // (undocumented)
1369
- ignoreLinks: boolean;
1370
- // (undocumented)
1371
- insertFile: (mediaState: MediaState, onMediaStateChanged: MediaStateEventSubscriber, pickerType?: string) => void;
1372
- // (undocumented)
1373
- isFullscreen: boolean;
1374
- // (undocumented)
1375
- layout: RichMediaLayout;
1376
- // (undocumented)
1377
- mediaClientConfig?: MediaClientConfig;
1378
- // (undocumented)
1379
- mediaNodes: MediaNodeWithPosHandler[];
1380
- // (undocumented)
1381
- mediaOptions?: MediaOptions;
1382
- // (undocumented)
1383
- mediaProvider?: MediaProvider_2;
1384
- // (undocumented)
1385
- onContextIdentifierProvider: (_name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
1386
- // (undocumented)
1387
- onPopupPickerClose: () => void;
1388
- // (undocumented)
1389
- onPopupToggle: (onPopupToogleCallback: (isOpen: boolean) => void) => void;
1390
- // (undocumented)
1391
- options: MediaPluginOptions;
1392
- // (undocumented)
1393
- pickerPromises: Array<Promise<PickerFacade>>;
1394
- // (undocumented)
1395
- pickers: PickerFacade[];
1396
- // (undocumented)
1397
- removeSelectedMediaContainer: () => boolean;
1398
- // (undocumented)
1399
- selectedMediaContainerNode: () => Node_2 | undefined;
1400
- // (undocumented)
1401
- setBrowseFn: (browseFn: () => void) => void;
1402
- // (undocumented)
1403
- setMediaProvider: (mediaProvider?: Promise<MediaProvider_2>) => Promise<void>;
1404
- // (undocumented)
1405
- setView(view: EditorView): void;
1406
- // (undocumented)
1407
- showDropzone: boolean;
1408
- // (undocumented)
1409
- showEditingDialog?: boolean;
1410
- // (undocumented)
1411
- showMediaPicker: () => void;
1412
- // (undocumented)
1413
- splitMediaGroup: () => boolean;
1414
- // (undocumented)
1415
- updateAndDispatch(props: Partial<Pick<this, 'allUploadsFinished' | 'allowsUploads' | 'isFullscreen'>>): void;
1416
- // (undocumented)
1417
- updateElement(): void;
1418
- // (undocumented)
1419
- updateMediaSingleNodeAttrs: (id: string, attrs: object) => boolean | undefined;
1420
- // (undocumented)
1421
- uploadMediaClientConfig?: MediaClientConfig;
1422
- // (undocumented)
1423
- waitForMediaUpload: boolean;
1424
- // (undocumented)
1425
- waitForPendingTasks: (timeout?: number, lastTask?: Promise<MediaState | null>) => Promise<MediaState | null>;
1426
- }
1427
-
1428
- export { MediaProvider_2 as MediaProvider }
1429
-
1430
- // @public (undocumented)
1431
- interface MediaSingleOptions {
1432
- // (undocumented)
1433
- disableLayout?: boolean;
1434
- }
1435
-
1436
- // @public (undocumented)
1437
- export interface MediaState {
1438
- // (undocumented)
1439
- collection?: string;
1440
- // (undocumented)
1441
- contextId?: string;
1442
- // (undocumented)
1443
- dimensions?: {
1444
- width: number | undefined;
1445
- height: number | undefined;
1446
- };
1447
- // (undocumented)
1448
- error?: {
1449
- name: string;
1450
- description: string;
1451
- };
1452
- // (undocumented)
1453
- fileMimeType?: string;
1454
- // (undocumented)
1455
- fileName?: string;
1456
- // (undocumented)
1457
- fileSize?: number;
1458
- // (undocumented)
1459
- id: string;
1460
- publicId?: string;
1461
- // (undocumented)
1462
- scaleFactor?: number;
1463
- // (undocumented)
1464
- status?: MediaStateStatus;
1465
- }
1466
-
1467
- // @public (undocumented)
1468
- type MediaStateEvent = MediaState;
1469
-
1470
- // @public (undocumented)
1471
- type MediaStateEventListener = (evt: MediaStateEvent) => void;
1472
-
1473
- // @public (undocumented)
1474
- type MediaStateEventSubscriber = (listener: MediaStateEventListener) => void;
1475
-
1476
- // @public (undocumented)
1477
- type MediaStateStatus = 'cancelled' | 'error' | 'mobile-upload-end' | 'preview' | 'ready' | 'unknown';
1478
-
1479
- // @public (undocumented)
1480
- interface MentionPluginConfig {
1481
- // (undocumented)
1482
- HighlightComponent?: React.ComponentType;
1483
- // (undocumented)
1484
- insertDisplayName?: boolean;
1485
- }
1486
-
1487
- // @public (undocumented)
1488
- export const mentionPluginKey: PluginKey<MentionPluginState>;
1489
-
1490
- // @public (undocumented)
1491
- export type MentionPluginState = {
1492
- mentionProvider?: MentionProvider_2;
1493
- contextIdentifierProvider?: ContextIdentifierProvider;
1494
- mentions?: Array<MentionDescription>;
1495
- };
1496
-
1497
- export { MentionProvider }
1498
-
1499
- export { MentionResource }
1500
-
1501
- // @public (undocumented)
1502
- interface MessageDescriptor {
1503
- // (undocumented)
1504
- defaultMessage: string;
1505
- // (undocumented)
1506
- description: string;
1507
- // (undocumented)
1508
- id: string;
1509
- }
1510
-
1511
- export { messages }
1512
-
1513
- // @public (undocumented)
1514
- type MobileUploadEndEventPayload = {
1515
- readonly file: MediaFile & {
1516
- readonly collectionName?: string;
1517
- readonly publicId?: string;
1518
- };
1519
- };
1520
-
1521
- // @public (undocumented)
1522
- const name_2: string;
1523
- export { name_2 as name }
1524
-
1525
- // @public (undocumented)
1526
- type NewMediaEvent = (state: MediaState, onStateChanged: MediaStateEventSubscriber, pickerType?: string) => void;
1527
-
1528
- // @public (undocumented)
1529
- interface NodeSelectionData {
1530
- // (undocumented)
1531
- anchor: number;
1532
- // (undocumented)
1533
- type: 'node';
1534
- }
1535
-
1536
- // @public (undocumented)
1537
- type OnEditorViewStateUpdated = (props: {
1538
- readonly originalTransaction: Readonly<Transaction>;
1539
- readonly transactions: ReadonlyArray<Transaction>;
1540
- readonly oldEditorState: Readonly<EditorState>;
1541
- readonly newEditorState: Readonly<EditorState>;
1542
- }) => void;
1543
-
1544
- // @public (undocumented)
1545
- export const openDatePicker: () => Command;
1546
-
1547
- // @public (undocumented)
1548
- function outdentList(inputMethod: InputMethod_2 | undefined, featureFlags: EditorFeatureFlags): Command;
1549
-
1550
- export { PaletteColor }
1551
-
1552
- // @public (undocumented)
1553
- interface PanelPluginConfig {
1554
- // (undocumented)
1555
- allowCustomPanel?: boolean;
1556
- // (undocumented)
1557
- allowCustomPanelEdit?: boolean;
1558
- }
1559
-
1560
- // @public (undocumented)
1561
- type PastePluginOptions = {
1562
- cardOptions?: CardOptions;
1563
- sanitizePrivateContent?: boolean;
1564
- };
1565
-
1566
- // @public (undocumented)
1567
- class PickerFacade {
1568
- constructor(pickerType: PickerType, config: PickerFacadeConfig, pickerConfig?: CustomMediaPicker | null | undefined, analyticsName?: string);
1569
- // (undocumented)
1570
- readonly config: PickerFacadeConfig;
1571
- // (undocumented)
1572
- destroy(): void;
1573
- // (undocumented)
1574
- erroredFiles: Set<string>;
1575
- // (undocumented)
1576
- handleMobileUploadEnd: (event: MobileUploadEndEventPayload) => void;
1577
- // (undocumented)
1578
- handleReady: (event: UploadEndEventPayload) => void;
1579
- // (undocumented)
1580
- handleUploadError: ({ error, fileId }: UploadErrorEventPayload) => void;
1581
- // (undocumented)
1582
- handleUploadPreviewUpdate: (event: UploadPreviewUpdateEventPayload) => void;
1583
- // (undocumented)
1584
- init(): Promise<PickerFacade>;
1585
- // (undocumented)
1586
- get mediaPicker(): CustomMediaPicker | undefined;
1587
- // (undocumented)
1588
- onDrag(cb: (state: 'enter' | 'leave') => any): void;
1589
- // (undocumented)
1590
- onNewMedia(cb: NewMediaEvent): void;
1591
- // (undocumented)
1592
- readonly pickerConfig?: CustomMediaPicker | null | undefined;
1593
- // (undocumented)
1594
- setUploadParams(params: UploadParams): void;
1595
- // (undocumented)
1596
- get type(): PickerType;
1597
- }
1598
-
1599
- // @public (undocumented)
1600
- type PickerFacadeConfig = {
1601
- mediaClientConfig: MediaClientConfig;
1602
- errorReporter: ErrorReportingHandler;
1603
- featureFlags?: MediaFeatureFlags_2;
1604
- };
1605
-
1606
- // @public (undocumented)
1607
- type PickerType = 'clipboard' | 'customMediaPicker' | 'dropzone';
1608
-
1609
- // @public (undocumented)
1610
- interface PlaceholderPluginOptions {
1611
- // (undocumented)
1612
- placeholder?: string;
1613
- // (undocumented)
1614
- placeholderBracketHint?: string;
1615
- }
1616
-
1617
- // @public (undocumented)
1618
- interface PlaceholderTextOptions {
1619
- // (undocumented)
1620
- allowInserting?: boolean;
1621
- }
1622
-
1623
- export { PortalProvider }
1624
-
1625
- export { PortalProviderAPI }
1626
-
1627
- export { PortalRenderer }
1628
-
1629
- export { PresenceProvider }
1630
-
1631
- export { PresenceResource }
1632
-
1633
- // @public (undocumented)
1634
- type PrimaryToolbarComponents = BeforeAndAfterToolbarComponents | ReactComponents;
1635
-
1636
- // @public (undocumented)
1637
- const processItems: (items: Array<QuickInsertHandler | QuickInsertItem>, intl: IntlShape, extendedActions?: Record<string, Function>) => QuickInsertItem[];
1638
-
1639
- // @public (undocumented)
1640
- export const processQuickInsertItems: typeof processItems;
1641
-
1642
- // @public (undocumented)
1643
- interface Props {
1644
- // (undocumented)
1645
- children?: any;
1646
- // (undocumented)
1647
- isExpanded?: boolean;
1648
- // (undocumented)
1649
- onExpand?: () => void;
1650
- // (undocumented)
1651
- onFocus?: (e: React_2.FocusEvent<HTMLInputElement>) => void;
1652
- // (undocumented)
1653
- placeholder?: string;
1654
- }
1655
-
1656
- // @public (undocumented)
1657
- interface Props_2 {
1658
- // (undocumented)
1659
- title?: string;
1660
- // (undocumented)
1661
- titlePosition?: PositionType;
1662
- }
1663
-
1664
- // @public (undocumented)
1665
- interface Props_3 {
1666
- // @deprecated (undocumented)
1667
- labels?: string[];
1668
- // @deprecated (undocumented)
1669
- packageName?: string;
1670
- // @deprecated (undocumented)
1671
- packageVersion?: string;
1672
- // (undocumented)
1673
- popupsBoundariesElement?: HTMLElement;
1674
- // (undocumented)
1675
- popupsMountPoint?: HTMLElement;
1676
- // (undocumented)
1677
- popupsScrollableElement?: HTMLElement;
1678
- // (undocumented)
1679
- product?: EditorProduct;
1680
- }
1681
-
1682
- // @public (undocumented)
1683
- type Props_4 = {
1684
- visible: boolean;
1685
- children?: React_2.ReactElement;
1686
- };
1687
-
1688
- // @public (undocumented)
1689
- type Props_5 = {
1690
- oldPluginState: TypeAheadPluginState;
1691
- newPluginState: TypeAheadPluginState;
1692
- };
1693
-
1694
- // @public (undocumented)
1695
- type ProsemirrorGetPosHandler = () => number | undefined;
1696
-
1697
- export { QuickInsertActionInsert }
1698
-
1699
- // @public (undocumented)
1700
- type QuickInsertHandler = ((intl: IntlShape) => Array<QuickInsertItem>) | Array<QuickInsertItem>;
1701
-
1702
- export { QuickInsertItem }
1703
-
1704
- export { QuickInsertItemId }
1705
-
1706
- // @public (undocumented)
1707
- type QuickInsertOptions = boolean | {
1708
- provider: Promise<QuickInsertProvider>;
1709
- };
1710
-
1711
- // @public (undocumented)
1712
- export const quickInsertPluginKey: PluginKey<QuickInsertPluginState>;
1713
-
1714
- // @public (undocumented)
1715
- interface QuickInsertPluginOptions {
1716
- // (undocumented)
1717
- disableDefaultItems?: boolean;
1718
- // (undocumented)
1719
- elementBrowserHelpUrl?: string;
1720
- // (undocumented)
1721
- emptyStateHandler?: EmptyStateHandler;
1722
- // (undocumented)
1723
- enableElementBrowser?: boolean;
1724
- // (undocumented)
1725
- headless?: boolean;
1726
- }
1727
-
1728
- // @public (undocumented)
1729
- export type QuickInsertPluginState = {
1730
- isElementBrowserModalOpen: boolean;
1731
- lazyDefaultItems: () => QuickInsertItem[];
1732
- providedItems?: QuickInsertItem[];
1733
- provider?: QuickInsertProvider;
1734
- emptyStateHandler?: EmptyStateHandler;
1735
- };
1736
-
1737
- export { QuickInsertProvider }
1738
-
1739
- // @public (undocumented)
1740
- type ReactComponents = ReactElement<any> | ReactElement<any>[];
1741
-
1742
- // @public (undocumented)
1743
- export const ReactEditorView: FC<WithIntlProps<EditorViewProps & WrappedComponentProps<"intl">>> & {
1744
- WrappedComponent: ComponentType<EditorViewProps & WrappedComponentProps<"intl">>;
1745
- };
1746
-
1747
- // @public (undocumented)
1748
- class ReactEditorView_2<T = {}> extends React_2.Component<EditorViewProps & WrappedComponentProps & T, {}, EditorReactContext> {
1749
- constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
1750
- // (undocumented)
1751
- blur: () => void;
1752
- // (undocumented)
1753
- componentDidMount(): void;
1754
- componentWillUnmount(): void;
1755
- // (undocumented)
1756
- config: EditorConfig;
1757
- // (undocumented)
1758
- contentTransformer?: Transformer_2<string>;
1759
- // (undocumented)
1760
- static contextTypes: {
1761
- getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
1762
- };
1763
- // (undocumented)
1764
- createEditorState: (options: CreateEditorStateOptions) => EditorState;
1765
- // (undocumented)
1766
- dispatch: Dispatch;
1767
- // (undocumented)
1768
- dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
1769
- // (undocumented)
1770
- editorRef: React_2.RefObject<HTMLDivElement>;
1771
- // (undocumented)
1772
- editorState: EditorState;
1773
- // (undocumented)
1774
- errorReporter: ErrorReporter;
1775
- // (undocumented)
1776
- eventDispatcher: EventDispatcher;
1777
- // (undocumented)
1778
- experienceStore?: ExperienceStore;
1779
- // (undocumented)
1780
- formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
1781
- // (undocumented)
1782
- getDirectEditorProps: (state?: EditorState) => DirectEditorProps;
1783
- // (undocumented)
1784
- getEditorState: () => EditorState | undefined;
1785
- // (undocumented)
1786
- getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
1787
- // (undocumented)
1788
- handleAnalyticsEvent: FireAnalyticsCallback;
1789
- // (undocumented)
1790
- handleEditorViewRef: (node: HTMLDivElement) => void;
1791
- // (undocumented)
1792
- proseMirrorRenderedSeverity?: SEVERITY;
1793
- // (undocumented)
1794
- reconfigureState(props: EditorViewProps): void;
1795
- // (undocumented)
1796
- render(): JSX.Element;
1797
- // (undocumented)
1798
- resetEditorState: ({ doc, shouldScrollToBottom, }: {
1799
- doc: string;
1800
- shouldScrollToBottom: boolean;
1801
- }) => void;
1802
- // (undocumented)
1803
- transactionTracker: TransactionTracker;
1804
- // (undocumented)
1805
- get transactionTracking(): TransactionTracking;
1806
- // (undocumented)
1807
- UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
1808
- // (undocumented)
1809
- validTransactionCount: number;
1810
- // (undocumented)
1811
- view?: EditorView;
1812
- }
1813
-
1814
- // @public (undocumented)
1815
- interface RectData {
1816
- // (undocumented)
1817
- left: number;
1818
- // (undocumented)
1819
- top: number;
1820
- }
1821
-
1822
- // @public (undocumented)
1823
- export const removeStatus: (showStatusPickerAt: number) => Command;
1824
-
1825
- // @public (undocumented)
1826
- type ScrollGutterPluginOptions = {
1827
- getScrollElement?: (view: EditorView) => HTMLElement | null;
1828
- allowCustomScrollHandler?: boolean;
1829
- persistScrollGutter?: boolean;
1830
- gutterSize?: number;
1831
- };
1832
-
1833
- // @public (undocumented)
1834
- export type SelectionData = AllSelectionData | CellSelectionData | GapSelectionData | NodeSelectionData | TextSelectionData;
1835
-
1836
- // @public (undocumented)
1837
- export interface SelectionDataState {
1838
- // (undocumented)
1839
- markTypes: string[];
1840
- // (undocumented)
1841
- nodeTypes: string[];
1842
- // (undocumented)
1843
- rect: RectData;
1844
- // (undocumented)
1845
- selection: SelectionData;
1846
- }
1847
-
1848
- // @public (undocumented)
1849
- export const selectionPluginKey: PluginKey<any>;
1850
-
1851
- // @public (undocumented)
1852
- interface SelectionPluginOptions extends LongPressSelectionPluginOptions {
1853
- }
1854
-
1855
- export { SelectOption }
1856
-
1857
- // @public (undocumented)
1858
- export function setBlockType(name: string): Command;
1859
-
1860
- // @public (undocumented)
1861
- export function setBlockTypeWithAnalytics(name: string, inputMethod: BlockTypeInputMethod): Command;
1862
-
1863
- // @public (undocumented)
1864
- export const setIsExpanded: (isExpanded: boolean) => Command_2;
1865
-
1866
- // @public (undocumented)
1867
- export const setKeyboardHeight: (keyboardHeight: number) => Command_2;
1868
-
1869
- // @public (undocumented)
1870
- export const setMobilePaddingTop: (paddingTop: number) => Command_2;
1871
-
1872
- // @public (undocumented)
1873
- export const setStatusPickerAt: (showStatusPickerAt: null | number) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
1874
-
1875
- export { setTextSelection }
1876
-
1877
- // @public (undocumented)
1878
- interface SimpleEntry {
1879
- // (undocumented)
1880
- duration: number;
1881
- // (undocumented)
1882
- name: string;
1883
- // (undocumented)
1884
- startTime: number;
1885
- }
1886
-
1887
- // @public (undocumented)
1888
- interface State {
1889
- }
1890
-
1891
- // @public (undocumented)
1892
- interface State_2 {
1893
- // (undocumented)
1894
- jiraIssueCollectorScriptLoading: boolean;
1895
- // (undocumented)
1896
- showOptOutOption?: boolean;
1897
- // (undocumented)
1898
- target?: HTMLElement;
1899
- }
1900
-
1901
- // @public (undocumented)
1902
- export const statusMessages: {
1903
- placeholder: {
1904
- id: string;
1905
- defaultMessage: string;
1906
- description: string;
1907
- };
1908
- editText: {
1909
- id: string;
1910
- defaultMessage: string;
1911
- description: string;
1912
- };
1913
- editColor: {
1914
- id: string;
1915
- defaultMessage: string;
1916
- description: string;
1917
- };
1918
- };
1919
-
1920
- // @public (undocumented)
1921
- export const statusPluginKey: PluginKey<StatusState>;
1922
-
1923
- // @public (undocumented)
1924
- export type StatusState = {
1925
- isNew: boolean;
1926
- showStatusPickerAt: null | number;
1927
- };
1928
-
1929
- // @public (undocumented)
1930
- export type StatusType = {
1931
- color: Color;
1932
- text: string;
1933
- localId?: string;
1934
- };
1935
-
1936
- // @public (undocumented)
1937
- type SubscribeToToolbarAndPickerUpdates = (editorView: EditorView, cb: (args: SubscribeToToolbarAndPickerUpdatesCallbackArgs) => void) => () => void;
1938
-
1939
- // @public (undocumented)
1940
- export const subscribeToToolbarAndPickerUpdates: SubscribeToToolbarAndPickerUpdates;
1941
-
1942
- // @public (undocumented)
1943
- type SubscribeToToolbarAndPickerUpdatesCallbackArgs = {
1944
- dateState?: DatePluginState;
1945
- statusState?: StatusState;
1946
- toolbarConfig: ConfigWithNodeInfo | null | undefined;
1947
- };
1948
-
1949
- // @public (undocumented)
1950
- type SubscribeTypeAheadUpdates = (editorView: EditorView, cb: (props: Props_5) => void) => () => void;
1951
-
1952
- // @public (undocumented)
1953
- export const subscribeTypeAheadUpdates: SubscribeTypeAheadUpdates;
1954
-
1955
- // @public (undocumented)
1956
- export type TaskDecisionInputMethod = INPUT_METHOD.FORMATTING | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
1957
-
1958
- // @public (undocumented)
1959
- type TaskDecisionListType = 'decisionList' | 'taskList';
1960
-
1961
- export { TeamMentionResource }
1962
-
1963
- // @public (undocumented)
1964
- type TextColorDefaultColor = {
1965
- color: string;
1966
- label: string;
1967
- };
1968
-
1969
- // @public (undocumented)
1970
- interface TextColorPluginConfig {
1971
- // (undocumented)
1972
- defaultColor?: TextColorDefaultColor;
1973
- }
1974
-
1975
- // @public (undocumented)
1976
- export const textColorPluginKey: PluginKey<TextColorPluginState>;
1977
-
1978
- // @public (undocumented)
1979
- export type TextColorPluginState = {
1980
- palette: Array<PaletteColor>;
1981
- defaultColor: string;
1982
- disabled?: boolean;
1983
- color: null | string;
1984
- };
1985
-
1986
- // @public (undocumented)
1987
- export type TextFormattingInputMethodBasic = INPUT_METHOD.FORMATTING | INPUT_METHOD.SHORTCUT | TextFormattingInputMethodToolbar;
1988
-
1989
- // @public (undocumented)
1990
- export type TextFormattingInputMethodToolbar = INPUT_METHOD.TOOLBAR;
1991
-
1992
- // @public (undocumented)
1993
- interface TextFormattingOptions {
1994
- // (undocumented)
1995
- disableCode?: boolean;
1996
- // (undocumented)
1997
- disableSmartTextCompletion?: boolean;
1998
- // (undocumented)
1999
- disableSuperscriptAndSubscript?: boolean;
2000
- // (undocumented)
2001
- disableUnderline?: boolean;
2002
- // (undocumented)
2003
- responsiveToolbarMenu?: boolean;
2004
- }
2005
-
2006
- // @public (undocumented)
2007
- export interface TextFormattingState {
2008
- // (undocumented)
2009
- codeActive?: boolean;
2010
- // (undocumented)
2011
- codeDisabled?: boolean;
2012
- // (undocumented)
2013
- codeHidden?: boolean;
2014
- // (undocumented)
2015
- emActive?: boolean;
2016
- // (undocumented)
2017
- emDisabled?: boolean;
2018
- // (undocumented)
2019
- emHidden?: boolean;
2020
- // (undocumented)
2021
- strikeActive?: boolean;
2022
- // (undocumented)
2023
- strikeDisabled?: boolean;
2024
- // (undocumented)
2025
- strikeHidden?: boolean;
2026
- // (undocumented)
2027
- strongActive?: boolean;
2028
- // (undocumented)
2029
- strongDisabled?: boolean;
2030
- // (undocumented)
2031
- strongHidden?: boolean;
2032
- // (undocumented)
2033
- subscriptActive?: boolean;
2034
- // (undocumented)
2035
- subscriptDisabled?: boolean;
2036
- // (undocumented)
2037
- subscriptHidden?: boolean;
2038
- // (undocumented)
2039
- superscriptActive?: boolean;
2040
- // (undocumented)
2041
- superscriptDisabled?: boolean;
2042
- // (undocumented)
2043
- superscriptHidden?: boolean;
2044
- // (undocumented)
2045
- underlineActive?: boolean;
2046
- // (undocumented)
2047
- underlineDisabled?: boolean;
2048
- // (undocumented)
2049
- underlineHidden?: boolean;
2050
- }
2051
-
2052
- // @public (undocumented)
2053
- export const textFormattingStateKey: PluginKey<TextFormattingState>;
2054
-
2055
- // @public (undocumented)
2056
- interface TextSelectionData {
2057
- // (undocumented)
2058
- anchor: number;
2059
- // (undocumented)
2060
- head: number;
2061
- // (undocumented)
2062
- type: 'text';
2063
- }
2064
-
2065
- // @public (undocumented)
2066
- function toggleBulletList(view: EditorView, inputMethod?: ListInputMethod): boolean;
2067
-
2068
- // @public (undocumented)
2069
- export const toggleCode: () => Command;
2070
-
2071
- // @public (undocumented)
2072
- export const toggleCodeWithAnalytics: ({ inputMethod, }: {
2073
- inputMethod: TextFormattingInputMethodBasic;
2074
- }) => Command;
2075
-
2076
- // @public (undocumented)
2077
- export const toggleEm: () => Command;
2078
-
2079
- // @public (undocumented)
2080
- export const toggleEmWithAnalytics: ({ inputMethod, }: {
2081
- inputMethod: TextFormattingInputMethodBasic;
2082
- }) => Command;
2083
-
2084
- // @public (undocumented)
2085
- function toggleOrderedList(view: EditorView, inputMethod?: ListInputMethod): boolean;
2086
-
2087
- // @public (undocumented)
2088
- export const toggleStrike: () => Command;
2089
-
2090
- // @public (undocumented)
2091
- export const toggleStrikeWithAnalytics: ({ inputMethod, }: {
2092
- inputMethod: TextFormattingInputMethodBasic;
2093
- }) => Command;
2094
-
2095
- // @public (undocumented)
2096
- export const toggleStrong: () => Command;
2097
-
2098
- // @public (undocumented)
2099
- export const toggleStrongWithAnalytics: ({ inputMethod, }: {
2100
- inputMethod: TextFormattingInputMethodBasic;
2101
- }) => Command;
2102
-
2103
- // @public (undocumented)
2104
- export const toggleSubscript: () => Command;
2105
-
2106
- // @public (undocumented)
2107
- export const toggleSubscriptWithAnalytics: ({ inputMethod, }: {
2108
- inputMethod: TextFormattingInputMethodBasic;
2109
- }) => Command;
2110
-
2111
- // @public (undocumented)
2112
- export const toggleSuperscript: () => Command;
2113
-
2114
- // @public (undocumented)
2115
- export const toggleSuperscriptWithAnalytics: ({ inputMethod, }: {
2116
- inputMethod: TextFormattingInputMethodBasic;
2117
- }) => Command;
2118
-
2119
- // @public (undocumented)
2120
- export const toggleUnderline: () => Command;
2121
-
2122
- // @public (undocumented)
2123
- export const toggleUnderlineWithAnalytics: ({ inputMethod, }: {
2124
- inputMethod: TextFormattingInputMethodBasic;
2125
- }) => Command;
2126
-
2127
- // @public (undocumented)
2128
- export class ToolbarFeedback extends PureComponent<Props_3, State_2> {
2129
- constructor(props: Props_3);
2130
- // (undocumented)
2131
- static contextTypes: {
2132
- editorActions: PropTypes.Validator<object>;
2133
- };
2134
- // (undocumented)
2135
- render(): jsx.JSX.Element | null;
2136
- // (undocumented)
2137
- showJiraCollectorDialogCallback?: () => void;
2138
- // (undocumented)
2139
- state: State_2;
2140
- }
2141
-
2142
- // @public (undocumented)
2143
- export const ToolbarHelp: React_2.FC<WithIntlProps<Props_2 & WrappedComponentProps<"intl">>> & {
2144
- WrappedComponent: React_2.ComponentType<Props_2 & WrappedComponentProps<"intl">>;
2145
- };
2146
-
2147
- // @public (undocumented)
2148
- class TransactionTracker {
2149
- // (undocumented)
2150
- addMeasureListener(listener: MeasureListener): void;
2151
- // (undocumented)
2152
- bumpDispatchCounter: (options: TransactionTracking) => number;
2153
- // (undocumented)
2154
- getMeasureHelpers: (options: TransactionTracking) => MeasureHelpers;
2155
- // (undocumented)
2156
- removeMeasureListener(listener: MeasureListener): void;
2157
- // (undocumented)
2158
- shouldTrackTransaction(options: TransactionTracking): boolean;
2159
- }
2160
-
2161
- // @public (undocumented)
2162
- type TypeAheadInputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
2163
-
2164
- export { TypeAheadItem }
2165
-
2166
- // @public (undocumented)
2167
- export const typeAheadPluginKey: PluginKey<TypeAheadPluginState>;
2168
-
2169
- // @public (undocumented)
2170
- type TypeAheadPluginOptions = {
2171
- isMobile?: boolean;
2172
- createAnalyticsEvent?: CreateUIAnalyticsEvent_2;
2173
- useBetterTypeaheadNavigation?: boolean;
2174
- };
2175
-
2176
- // @public (undocumented)
2177
- export type TypeAheadPluginState = {
2178
- decorationSet: DecorationSet;
2179
- decorationElement: HTMLElement | null;
2180
- typeAheadHandlers: Array<TypeAheadHandler>;
2181
- query: string;
2182
- items: Array<TypeAheadItem>;
2183
- triggerHandler?: TypeAheadHandler;
2184
- selectedIndex: number;
2185
- stats: TypeAheadStatsSerializable | null;
2186
- inputMethod: TypeAheadInputMethod | null;
2187
- };
2188
-
2189
- // @public (undocumented)
2190
- interface TypeAheadStatsSerializable extends TypeAheadStats {
2191
- // (undocumented)
2192
- serialize: () => TypeAheadStats;
2193
- }
2194
-
2195
- // @public (undocumented)
2196
- export type UpdateEvent = 'create' | 'delete' | 'resolve' | 'unresolve';
2197
-
2198
- // @public (undocumented)
2199
- export const updateStatus: (status?: StatusType) => Command;
2200
-
2201
- // @public (undocumented)
2202
- export const updateStatusWithAnalytics: (inputMethod: InsertBlockInputMethodToolbar, status?: StatusType) => Command;
2203
-
2204
- // @public (undocumented)
2205
- type UseStickyToolbarType = RefObject<HTMLElement> | boolean | {
2206
- offsetTop: number;
2207
- };
2208
-
2209
- // @public (undocumented)
2210
- export const version: string;
2211
-
2212
- // @public (undocumented)
2213
- type VisibilityEvent = 'setvisibility';
2214
-
2215
- // @public (undocumented)
2216
- export class WithEditorActions extends React_2.Component<WithEditorActionsProps, any> {
2217
- // (undocumented)
2218
- componentDidMount(): void;
2219
- // (undocumented)
2220
- componentWillUnmount(): void;
2221
- // (undocumented)
2222
- context: {
2223
- editorActions: EditorActions;
2224
- };
2225
- // (undocumented)
2226
- static contextTypes: {
2227
- editorActions: PropTypes.Validator<object>;
2228
- };
2229
- // (undocumented)
2230
- render(): React_2.ReactElement<any, React_2.JSXElementConstructor<any> | string> | null;
2231
- }
2232
-
2233
- // @public (undocumented)
2234
- interface WithEditorActionsProps {
2235
- // (undocumented)
2236
- render(actions: EditorActions): React_2.ReactElement<any> | null;
2237
- }
2238
-
2239
- // @public (undocumented)
2240
- export class WithHelpTrigger extends React_2.Component<{
2241
- render: (openHelp: () => void) => React_2.ReactNode;
2242
- }, any> {
2243
- // (undocumented)
2244
- static contextTypes: {
2245
- editorActions: PropTypes.Validator<object>;
2246
- };
2247
- // (undocumented)
2248
- openHelp: () => void;
2249
- // (undocumented)
2250
- render(): React_2.ReactNode;
2251
- }
2252
-
2253
- export { WithPluginState }
2254
-
2255
- // (No @packageDocumentation comment for this package)
2256
-
2257
- ```