@atlaskit/editor-core 187.4.11 → 187.5.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/editor-next/index.js +93 -115
  3. package/dist/cjs/editor.js +8 -2
  4. package/dist/cjs/ui/CollapsedEditor/index.js +7 -1
  5. package/dist/cjs/version-wrapper.js +1 -1
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/es2019/editor-next/index.js +91 -77
  8. package/dist/es2019/editor.js +8 -2
  9. package/dist/es2019/ui/CollapsedEditor/index.js +7 -1
  10. package/dist/es2019/version-wrapper.js +1 -1
  11. package/dist/es2019/version.json +1 -1
  12. package/dist/esm/editor-next/index.js +92 -115
  13. package/dist/esm/editor.js +8 -2
  14. package/dist/esm/ui/CollapsedEditor/index.js +7 -1
  15. package/dist/esm/version-wrapper.js +1 -1
  16. package/dist/esm/version.json +1 -1
  17. package/dist/types/editor-next/editor-internal.d.ts +9 -9
  18. package/dist/types/editor-next/index.d.ts +8 -32
  19. package/dist/types/editor.d.ts +1 -1
  20. package/dist/types/types/editor-props.d.ts +32 -32
  21. package/dist/types/ui/CollapsedEditor/index.d.ts +3 -3
  22. package/dist/types-ts4.5/editor-next/editor-internal.d.ts +9 -9
  23. package/dist/types-ts4.5/editor-next/index.d.ts +8 -32
  24. package/dist/types-ts4.5/editor.d.ts +1 -1
  25. package/dist/types-ts4.5/types/editor-props.d.ts +32 -32
  26. package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +3 -3
  27. package/package.json +3 -3
  28. package/report.api.md +12 -41
  29. package/tmp/api-report-tmp.d.ts +12 -38
  30. package/dist/cjs/editor-next/utils/editorPropTypes.js +0 -36
  31. package/dist/cjs/editor-next/utils/onEditorCreated.js +0 -28
  32. package/dist/es2019/editor-next/utils/editorPropTypes.js +0 -29
  33. package/dist/es2019/editor-next/utils/onEditorCreated.js +0 -21
  34. package/dist/esm/editor-next/utils/editorPropTypes.js +0 -28
  35. package/dist/esm/editor-next/utils/onEditorCreated.js +0 -21
  36. package/dist/types/editor-next/utils/editorPropTypes.d.ts +0 -19
  37. package/dist/types/editor-next/utils/onEditorCreated.d.ts +0 -12
  38. package/dist/types-ts4.5/editor-next/utils/editorPropTypes.d.ts +0 -19
  39. package/dist/types-ts4.5/editor-next/utils/onEditorCreated.d.ts +0 -12
@@ -1,39 +1,39 @@
1
- import { ReactElement, RefObject } from 'react';
2
- import { Node, Schema } from 'prosemirror-model';
3
- import { EditorView } from 'prosemirror-view';
4
- import { ActivityProvider } from '@atlaskit/activity-provider';
5
- import { CardOptions } from '@atlaskit/editor-common/card';
1
+ import type { ReactElement, RefObject } from 'react';
2
+ import type { Node, Schema } from 'prosemirror-model';
3
+ import type { EditorView } from 'prosemirror-view';
4
+ import type { ActivityProvider } from '@atlaskit/activity-provider';
5
+ import type { CardOptions } from '@atlaskit/editor-common/card';
6
6
  import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
7
- import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
7
+ import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
8
8
  import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
9
9
  import type { AllEditorPresetPluginTypes, Transformer } from '@atlaskit/editor-common/types';
10
10
  import type { LinkingOptions } from '@atlaskit/editor-common/types';
11
11
  import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
12
- import { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugin-table/types';
13
- import { MentionProvider } from '@atlaskit/mention/resource';
14
- import { TaskDecisionProvider } from '@atlaskit/task-decision';
15
- import EditorActions from '../actions';
16
- import { AnnotationProviders } from '../plugins/annotation/types';
17
- import { BlockTypePluginOptions } from '../plugins/block-type/types';
18
- import { CodeBlockOptions } from '../plugins/code-block/types';
19
- import { CollabEditOptions } from '../plugins/collab-edit/types';
20
- import { DatePluginConfig } from '../plugins/date/types';
21
- import { FindReplaceOptions } from '../plugins/find-replace/types';
22
- import { LayoutPluginOptions } from '../plugins/layout/types';
23
- import { MediaOptions, MediaState } from '../plugins/media/types';
24
- import { MentionPluginConfig } from '../plugins/mentions/types';
25
- import { PanelPluginConfig } from '../plugins/panel/types';
26
- import { PlaceholderTextOptions } from '../plugins/placeholder-text/types';
27
- import { QuickInsertOptions } from '../plugins/quick-insert/types';
28
- import { TextColorPluginConfig } from '../plugins/text-color/pm-plugins/main';
29
- import { TextFormattingOptions } from '../plugins/text-formatting/types';
30
- import { MenuItem } from '../ui/DropdownMenu/types';
31
- import { EditorAppearance } from './editor-appearance';
32
- import { EditorOnChangeHandler } from './editor-onchange';
33
- import { EditorPlugin } from './editor-plugin';
34
- import { EmptyStateHandler } from './empty-state-handler';
35
- import { ExtensionConfig } from './extension-config';
36
- import { PerformanceTracking } from './performance-tracking';
12
+ import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugin-table/types';
13
+ import type { MentionProvider } from '@atlaskit/mention/resource';
14
+ import type { TaskDecisionProvider } from '@atlaskit/task-decision';
15
+ import type EditorActions from '../actions';
16
+ import type { AnnotationProviders } from '../plugins/annotation/types';
17
+ import type { BlockTypePluginOptions } from '../plugins/block-type/types';
18
+ import type { CodeBlockOptions } from '../plugins/code-block/types';
19
+ import type { CollabEditOptions } from '../plugins/collab-edit/types';
20
+ import type { DatePluginConfig } from '../plugins/date/types';
21
+ import type { FindReplaceOptions } from '../plugins/find-replace/types';
22
+ import type { LayoutPluginOptions } from '../plugins/layout/types';
23
+ import type { MediaOptions, MediaState } from '../plugins/media/types';
24
+ import type { MentionPluginConfig } from '../plugins/mentions/types';
25
+ import type { PanelPluginConfig } from '../plugins/panel/types';
26
+ import type { PlaceholderTextOptions } from '../plugins/placeholder-text/types';
27
+ import type { QuickInsertOptions } from '../plugins/quick-insert/types';
28
+ import type { TextColorPluginConfig } from '../plugins/text-color/pm-plugins/main';
29
+ import type { TextFormattingOptions } from '../plugins/text-formatting/types';
30
+ import type { MenuItem } from '../ui/DropdownMenu/types';
31
+ import type { EditorAppearance } from './editor-appearance';
32
+ import type { EditorOnChangeHandler } from './editor-onchange';
33
+ import type { EditorPlugin } from './editor-plugin';
34
+ import type { EmptyStateHandler } from './empty-state-handler';
35
+ import type { ExtensionConfig } from './extension-config';
36
+ import type { PerformanceTracking } from './performance-tracking';
37
37
  export type ReactComponents = ReactElement<any> | ReactElement<any>[];
38
38
  type ExtensionProviders = (ExtensionProvider | Promise<ExtensionProvider>)[];
39
39
  type ExtensionProvidersWithEditorAction = (editorActions?: EditorActions) => ExtensionProviders;
@@ -153,7 +153,6 @@ export interface EditorSharedPropsWithPlugins {
153
153
  insertMenuItems?: MenuItem[];
154
154
  primaryToolbarComponents?: PrimaryToolbarComponents;
155
155
  allowUndoRedoButtons?: boolean;
156
- allowTextColor?: boolean | TextColorPluginConfig;
157
156
  allowTables?: boolean | TablesPluginConfig;
158
157
  /** @deprecated Use smartLinks instead. */
159
158
  UNSAFE_cards?: CardOptions;
@@ -256,5 +255,6 @@ export interface EditorPluginFeatureProps {
256
255
  uploadErrorHandler?: (state: MediaState) => void;
257
256
  waitForMediaUpload?: boolean;
258
257
  extensionHandlers?: ExtensionHandlers;
258
+ allowTextColor?: boolean | TextColorPluginConfig;
259
259
  }
260
260
  export {};
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import Editor from '../../editor';
3
- import EditorNext from '../../editor-next';
4
3
  export interface Props {
5
4
  placeholder?: string;
6
5
  children?: any;
@@ -11,9 +10,10 @@ export interface Props {
11
10
  export interface State {
12
11
  }
13
12
  export default class CollapsedEditor extends React.Component<Props, State> {
14
- editorComponent?: Editor | EditorNext;
13
+ editorComponent?: Editor;
15
14
  previouslyExpanded?: boolean;
15
+ functionalEditor?: boolean;
16
16
  componentDidUpdate(): void;
17
17
  handleEditorRef: (editorRef?: Editor, editorRefCallback?: any) => void;
18
- render(): JSX.Element;
18
+ render(): any;
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.4.11",
3
+ "version": "187.5.5",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -95,7 +95,7 @@
95
95
  "@atlaskit/radio": "^5.6.0",
96
96
  "@atlaskit/section-message": "^6.4.0",
97
97
  "@atlaskit/select": "^16.5.0",
98
- "@atlaskit/smart-card": "^26.10.0",
98
+ "@atlaskit/smart-card": "^26.11.0",
99
99
  "@atlaskit/smart-user-picker": "^6.1.0",
100
100
  "@atlaskit/spinner": "^15.5.0",
101
101
  "@atlaskit/status": "^1.3.0",
@@ -156,7 +156,7 @@
156
156
  "@atlaskit/inline-dialog": "^13.6.0",
157
157
  "@atlaskit/link-analytics": "^8.2.0",
158
158
  "@atlaskit/link-provider": "^1.6.0",
159
- "@atlaskit/link-test-helpers": "^4.2.0",
159
+ "@atlaskit/link-test-helpers": "^5.0.0",
160
160
  "@atlaskit/media-core": "^34.1.0",
161
161
  "@atlaskit/media-integration-test-helpers": "^3.0.0",
162
162
  "@atlaskit/media-test-helpers": "^33.0.0",
package/report.api.md CHANGED
@@ -22,7 +22,7 @@ import { AbstractMentionResource } from '@atlaskit/mention/resource';
22
22
  import { ACTION } from '@atlaskit/editor-common/analytics';
23
23
  import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
24
24
  import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
25
- import { ActivityProvider } from '@atlaskit/activity-provider';
25
+ import type { ActivityProvider } from '@atlaskit/activity-provider';
26
26
  import type { AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
27
27
  import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
28
28
  import { AnalyticsEventPayload as AnalyticsEventPayload_2 } from '@atlaskit/analytics-next/AnalyticsEvent';
@@ -52,7 +52,7 @@ import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
52
52
  import { EditorAppearance } from '@atlaskit/editor-common/types';
53
53
  import { FeatureFlags as EditorFeatureFlags } from '@atlaskit/editor-common/types';
54
54
  import { EditorPlugin } from '@atlaskit/editor-common/types';
55
- import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
55
+ import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
56
56
  import { EditorReactContext } from '@atlaskit/editor-common/types';
57
57
  import { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
58
58
  import { EditorState } from 'prosemirror-state';
@@ -119,7 +119,7 @@ import { NodeView } from 'prosemirror-view';
119
119
  import { OptionalPlugin } from '@atlaskit/editor-common/types';
120
120
  import { PaletteColor } from '@atlaskit/editor-common/ui-color';
121
121
  import { PerformanceTracking } from '@atlaskit/editor-common/types';
122
- import { PluginConfig } from '@atlaskit/editor-plugin-table/types';
122
+ import type { PluginConfig } from '@atlaskit/editor-plugin-table/types';
123
123
  import { PluginKey } from 'prosemirror-state';
124
124
  import { PMPlugin } from '@atlaskit/editor-common/types';
125
125
  import { PortalProvider } from '@atlaskit/editor-common/portal-provider';
@@ -139,17 +139,17 @@ import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
139
139
  import { default as React_2 } from 'react';
140
140
  import { ReactElement } from 'react';
141
141
  import type { ReactHookFactory } from '@atlaskit/editor-common/types';
142
- import { RefObject } from 'react';
142
+ import type { RefObject } from 'react';
143
143
  import { ReplaceRawValue } from '@atlaskit/editor-common/types';
144
144
  import type { ResolvedEditorState } from '@atlaskit/collab-provider';
145
145
  import { RichMediaLayout } from '@atlaskit/adf-schema';
146
- import { Schema } from 'prosemirror-model';
146
+ import type { Schema } from 'prosemirror-model';
147
147
  import type { SearchProvider } from '@atlaskit/editor-common/provider-factory';
148
148
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
149
149
  import type { SelectOption } from '@atlaskit/editor-common/types';
150
150
  import { setTextSelection } from '@atlaskit/editor-common/utils';
151
151
  import type { SEVERITY } from '@atlaskit/editor-common/utils';
152
- import { TaskDecisionProvider } from '@atlaskit/task-decision';
152
+ import type { TaskDecisionProvider } from '@atlaskit/task-decision';
153
153
  import { TeamMentionResource } from '@atlaskit/mention/team-resource';
154
154
  import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
155
155
  import { Transaction } from 'prosemirror-state';
@@ -378,13 +378,15 @@ export class CollapsedEditor extends React_2.Component<Props, State> {
378
378
  // (undocumented)
379
379
  componentDidUpdate(): void;
380
380
  // (undocumented)
381
- editorComponent?: Editor | EditorNext;
381
+ editorComponent?: Editor;
382
+ // (undocumented)
383
+ functionalEditor?: boolean;
382
384
  // (undocumented)
383
385
  handleEditorRef: (editorRef?: Editor, editorRefCallback?: any) => void;
384
386
  // (undocumented)
385
387
  previouslyExpanded?: boolean;
386
388
  // (undocumented)
387
- render(): JSX.Element;
389
+ render(): any;
388
390
  }
389
391
 
390
392
  // @public (undocumented)
@@ -407,12 +409,6 @@ type ConfigWithNodeInfo = {
407
409
  node: Node_2;
408
410
  };
409
411
 
410
- // @public (undocumented)
411
- type Context = {
412
- editorActions?: EditorActions;
413
- intl: IntlShape;
414
- };
415
-
416
412
  // @public (undocumented)
417
413
  export function ContextPanel(props: Props_4): jsx.JSX.Element;
418
414
 
@@ -806,31 +802,6 @@ export interface EditorInstance {
806
802
  secondaryToolbarComponents: UIComponentFactory[];
807
803
  }
808
804
 
809
- // @public (undocumented)
810
- class EditorNext extends React_2.Component<EditorNextProps> {
811
- constructor(props: EditorNextProps, context: Context);
812
- // (undocumented)
813
- static contextTypes: {
814
- editorActions: PropTypes.Requireable<object>;
815
- };
816
- // (undocumented)
817
- static defaultProps: {
818
- appearance: string;
819
- disabled: boolean;
820
- quickInsert: boolean;
821
- };
822
- // (undocumented)
823
- static propTypes: {
824
- preset: ({ preset }: Pick<EditorNextProps, 'preset'>) => Error | null;
825
- minHeight: ({
826
- appearance,
827
- minHeight,
828
- }: Pick<EditorProps, 'appearance' | 'minHeight'>) => Error | null;
829
- };
830
- // (undocumented)
831
- render(): jsx.JSX.Element;
832
- }
833
-
834
805
  // @public (undocumented)
835
806
  interface EditorNextProps
836
807
  extends EditorBaseProps,
@@ -899,6 +870,8 @@ interface EditorPluginFeatureProps {
899
870
  allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
900
871
  // (undocumented)
901
872
  allowTextAlignment?: boolean;
873
+ // (undocumented)
874
+ allowTextColor?: TextColorPluginConfig | boolean;
902
875
  autoScrollIntoView?: boolean;
903
876
  // (undocumented)
904
877
  elementBrowser?: {
@@ -984,8 +957,6 @@ interface EditorSharedPropsWithPlugins {
984
957
  // (undocumented)
985
958
  allowTables?: PluginConfig | boolean;
986
959
  // (undocumented)
987
- allowTextColor?: TextColorPluginConfig | boolean;
988
- // (undocumented)
989
960
  allowUndoRedoButtons?: boolean;
990
961
  // (undocumented)
991
962
  collabEdit?: CollabEditOptions;
@@ -11,7 +11,7 @@ import { AbstractMentionResource } from '@atlaskit/mention/resource';
11
11
  import { ACTION } from '@atlaskit/editor-common/analytics';
12
12
  import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
13
13
  import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
14
- import { ActivityProvider } from '@atlaskit/activity-provider';
14
+ import type { ActivityProvider } from '@atlaskit/activity-provider';
15
15
  import type { AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
16
16
  import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
17
17
  import { AnalyticsEventPayload as AnalyticsEventPayload_2 } from '@atlaskit/analytics-next/AnalyticsEvent';
@@ -41,7 +41,7 @@ import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
41
41
  import { EditorAppearance } from '@atlaskit/editor-common/types';
42
42
  import { FeatureFlags as EditorFeatureFlags } from '@atlaskit/editor-common/types';
43
43
  import { EditorPlugin } from '@atlaskit/editor-common/types';
44
- import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
44
+ import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
45
45
  import { EditorReactContext } from '@atlaskit/editor-common/types';
46
46
  import { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
47
47
  import { EditorState } from 'prosemirror-state';
@@ -108,7 +108,7 @@ import { NodeView } from 'prosemirror-view';
108
108
  import { OptionalPlugin } from '@atlaskit/editor-common/types';
109
109
  import { PaletteColor } from '@atlaskit/editor-common/ui-color';
110
110
  import { PerformanceTracking } from '@atlaskit/editor-common/types';
111
- import { PluginConfig } from '@atlaskit/editor-plugin-table/types';
111
+ import type { PluginConfig } from '@atlaskit/editor-plugin-table/types';
112
112
  import { PluginKey } from 'prosemirror-state';
113
113
  import { PMPlugin } from '@atlaskit/editor-common/types';
114
114
  import { PortalProvider } from '@atlaskit/editor-common/portal-provider';
@@ -128,17 +128,17 @@ import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
128
128
  import { default as React_2 } from 'react';
129
129
  import { ReactElement } from 'react';
130
130
  import type { ReactHookFactory } from '@atlaskit/editor-common/types';
131
- import { RefObject } from 'react';
131
+ import type { RefObject } from 'react';
132
132
  import { ReplaceRawValue } from '@atlaskit/editor-common/types';
133
133
  import type { ResolvedEditorState } from '@atlaskit/collab-provider';
134
134
  import { RichMediaLayout } from '@atlaskit/adf-schema';
135
- import { Schema } from 'prosemirror-model';
135
+ import type { Schema } from 'prosemirror-model';
136
136
  import type { SearchProvider } from '@atlaskit/editor-common/provider-factory';
137
137
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
138
138
  import type { SelectOption } from '@atlaskit/editor-common/types';
139
139
  import { setTextSelection } from '@atlaskit/editor-common/utils';
140
140
  import type { SEVERITY } from '@atlaskit/editor-common/utils';
141
- import { TaskDecisionProvider } from '@atlaskit/task-decision';
141
+ import type { TaskDecisionProvider } from '@atlaskit/task-decision';
142
142
  import { TeamMentionResource } from '@atlaskit/mention/team-resource';
143
143
  import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
144
144
  import { Transaction } from 'prosemirror-state';
@@ -360,13 +360,15 @@ export class CollapsedEditor extends React_2.Component<Props, State> {
360
360
  // (undocumented)
361
361
  componentDidUpdate(): void;
362
362
  // (undocumented)
363
- editorComponent?: Editor | EditorNext;
363
+ editorComponent?: Editor;
364
+ // (undocumented)
365
+ functionalEditor?: boolean;
364
366
  // (undocumented)
365
367
  handleEditorRef: (editorRef?: Editor, editorRefCallback?: any) => void;
366
368
  // (undocumented)
367
369
  previouslyExpanded?: boolean;
368
370
  // (undocumented)
369
- render(): JSX.Element;
371
+ render(): any;
370
372
  }
371
373
 
372
374
  // @public (undocumented)
@@ -385,12 +387,6 @@ type ConfigWithNodeInfo = {
385
387
  node: Node_2;
386
388
  };
387
389
 
388
- // @public (undocumented)
389
- type Context = {
390
- editorActions?: EditorActions;
391
- intl: IntlShape;
392
- };
393
-
394
390
  // @public (undocumented)
395
391
  export function ContextPanel(props: Props_4): jsx.JSX.Element;
396
392
 
@@ -740,28 +736,6 @@ export interface EditorInstance {
740
736
  secondaryToolbarComponents: UIComponentFactory[];
741
737
  }
742
738
 
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
739
  // @public (undocumented)
766
740
  interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithPlugins, EditorProviderProps {
767
741
  // (undocumented)
@@ -820,6 +794,8 @@ interface EditorPluginFeatureProps {
820
794
  allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
821
795
  // (undocumented)
822
796
  allowTextAlignment?: boolean;
797
+ // (undocumented)
798
+ allowTextColor?: TextColorPluginConfig | boolean;
823
799
  autoScrollIntoView?: boolean;
824
800
  // (undocumented)
825
801
  elementBrowser?: {
@@ -901,8 +877,6 @@ interface EditorSharedPropsWithPlugins {
901
877
  // (undocumented)
902
878
  allowTables?: PluginConfig | boolean;
903
879
  // (undocumented)
904
- allowTextColor?: TextColorPluginConfig | boolean;
905
- // (undocumented)
906
880
  allowUndoRedoButtons?: boolean;
907
881
  // (undocumented)
908
882
  collabEdit?: CollabEditOptions;
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.defaultProps = void 0;
7
- exports.propTypes = propTypes;
8
- /**
9
- *
10
- * Logic for Editor prop types (ie. `static propTypes = propTypes(message)`)
11
- * for use with 'prop-types' library
12
- *
13
- * @param errorMessage
14
- * @returns Editor prop-types
15
- */
16
- function propTypes(errorMessage) {
17
- return {
18
- minHeight: function minHeight(_ref) {
19
- var appearance = _ref.appearance,
20
- _minHeight = _ref.minHeight;
21
- if (_minHeight && appearance && !['comment', 'chromeless'].includes(appearance)) {
22
- return new Error(errorMessage);
23
- }
24
- return null;
25
- }
26
- };
27
- }
28
- var defaultProps = {
29
- appearance: 'comment',
30
- disabled: false,
31
- extensionHandlers: {},
32
- allowHelpDialog: true,
33
- allowNewInsertionBehaviour: true,
34
- quickInsert: true
35
- };
36
- exports.defaultProps = defaultProps;
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = onEditorCreated;
8
- var _analytics = require("@atlaskit/editor-common/analytics");
9
- var _ufo = require("@atlaskit/editor-common/ufo");
10
- var _utils = require("@atlaskit/editor-common/utils");
11
- var _measureEnum = _interopRequireDefault(require("../../utils/performance/measure-enum"));
12
- var _sendDurationAnalytics = _interopRequireDefault(require("./sendDurationAnalytics"));
13
- function onEditorCreated(instance, props, setExperienceStore, getExperienceStore, getCreateAnalyticsEvent, editorActions, startTime, registerEditorForActions) {
14
- var _props$featureFlags;
15
- registerEditorForActions(instance.view, instance.eventDispatcher, instance.transformer);
16
- if ((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.ufo) {
17
- var _getExperienceStore;
18
- setExperienceStore(_ufo.ExperienceStore.getInstance(instance.view));
19
- (_getExperienceStore = getExperienceStore()) === null || _getExperienceStore === void 0 ? void 0 : _getExperienceStore.start(_ufo.EditorExperience.loadEditor, startTime);
20
- }
21
- if (props.onEditorReady) {
22
- var _props$performanceTra, _props$performanceTra2, _props$featureFlags2;
23
- var measureEditorReady = (props === null || props === void 0 ? void 0 : (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.onEditorReadyCallbackTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled) || ((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.ufo);
24
- measureEditorReady && (0, _utils.startMeasure)(_measureEnum.default.ON_EDITOR_READY_CALLBACK);
25
- props.onEditorReady(editorActions);
26
- measureEditorReady && (0, _utils.stopMeasure)(_measureEnum.default.ON_EDITOR_READY_CALLBACK, (0, _sendDurationAnalytics.default)(_analytics.ACTION.ON_EDITOR_READY_CALLBACK, props, getExperienceStore, getCreateAnalyticsEvent()));
27
- }
28
- }
@@ -1,29 +0,0 @@
1
- /**
2
- *
3
- * Logic for Editor prop types (ie. `static propTypes = propTypes(message)`)
4
- * for use with 'prop-types' library
5
- *
6
- * @param errorMessage
7
- * @returns Editor prop-types
8
- */
9
- export function propTypes(errorMessage) {
10
- return {
11
- minHeight: ({
12
- appearance,
13
- minHeight
14
- }) => {
15
- if (minHeight && appearance && !['comment', 'chromeless'].includes(appearance)) {
16
- return new Error(errorMessage);
17
- }
18
- return null;
19
- }
20
- };
21
- }
22
- export const defaultProps = {
23
- appearance: 'comment',
24
- disabled: false,
25
- extensionHandlers: {},
26
- allowHelpDialog: true,
27
- allowNewInsertionBehaviour: true,
28
- quickInsert: true
29
- };
@@ -1,21 +0,0 @@
1
- import { ACTION } from '@atlaskit/editor-common/analytics';
2
- import { EditorExperience, ExperienceStore } from '@atlaskit/editor-common/ufo';
3
- import { startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
4
- import measurements from '../../utils/performance/measure-enum';
5
- import sendDurationAnalytics from './sendDurationAnalytics';
6
- export default function onEditorCreated(instance, props, setExperienceStore, getExperienceStore, getCreateAnalyticsEvent, editorActions, startTime, registerEditorForActions) {
7
- var _props$featureFlags;
8
- registerEditorForActions(instance.view, instance.eventDispatcher, instance.transformer);
9
- if ((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.ufo) {
10
- var _getExperienceStore;
11
- setExperienceStore(ExperienceStore.getInstance(instance.view));
12
- (_getExperienceStore = getExperienceStore()) === null || _getExperienceStore === void 0 ? void 0 : _getExperienceStore.start(EditorExperience.loadEditor, startTime);
13
- }
14
- if (props.onEditorReady) {
15
- var _props$performanceTra, _props$performanceTra2, _props$featureFlags2;
16
- const measureEditorReady = (props === null || props === void 0 ? void 0 : (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.onEditorReadyCallbackTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled) || ((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.ufo);
17
- measureEditorReady && startMeasure(measurements.ON_EDITOR_READY_CALLBACK);
18
- props.onEditorReady(editorActions);
19
- measureEditorReady && stopMeasure(measurements.ON_EDITOR_READY_CALLBACK, sendDurationAnalytics(ACTION.ON_EDITOR_READY_CALLBACK, props, getExperienceStore, getCreateAnalyticsEvent()));
20
- }
21
- }
@@ -1,28 +0,0 @@
1
- /**
2
- *
3
- * Logic for Editor prop types (ie. `static propTypes = propTypes(message)`)
4
- * for use with 'prop-types' library
5
- *
6
- * @param errorMessage
7
- * @returns Editor prop-types
8
- */
9
- export function propTypes(errorMessage) {
10
- return {
11
- minHeight: function minHeight(_ref) {
12
- var appearance = _ref.appearance,
13
- _minHeight = _ref.minHeight;
14
- if (_minHeight && appearance && !['comment', 'chromeless'].includes(appearance)) {
15
- return new Error(errorMessage);
16
- }
17
- return null;
18
- }
19
- };
20
- }
21
- export var defaultProps = {
22
- appearance: 'comment',
23
- disabled: false,
24
- extensionHandlers: {},
25
- allowHelpDialog: true,
26
- allowNewInsertionBehaviour: true,
27
- quickInsert: true
28
- };
@@ -1,21 +0,0 @@
1
- import { ACTION } from '@atlaskit/editor-common/analytics';
2
- import { EditorExperience, ExperienceStore } from '@atlaskit/editor-common/ufo';
3
- import { startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
4
- import measurements from '../../utils/performance/measure-enum';
5
- import sendDurationAnalytics from './sendDurationAnalytics';
6
- export default function onEditorCreated(instance, props, setExperienceStore, getExperienceStore, getCreateAnalyticsEvent, editorActions, startTime, registerEditorForActions) {
7
- var _props$featureFlags;
8
- registerEditorForActions(instance.view, instance.eventDispatcher, instance.transformer);
9
- if ((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.ufo) {
10
- var _getExperienceStore;
11
- setExperienceStore(ExperienceStore.getInstance(instance.view));
12
- (_getExperienceStore = getExperienceStore()) === null || _getExperienceStore === void 0 ? void 0 : _getExperienceStore.start(EditorExperience.loadEditor, startTime);
13
- }
14
- if (props.onEditorReady) {
15
- var _props$performanceTra, _props$performanceTra2, _props$featureFlags2;
16
- var measureEditorReady = (props === null || props === void 0 ? void 0 : (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.onEditorReadyCallbackTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled) || ((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.ufo);
17
- measureEditorReady && startMeasure(measurements.ON_EDITOR_READY_CALLBACK);
18
- props.onEditorReady(editorActions);
19
- measureEditorReady && stopMeasure(measurements.ON_EDITOR_READY_CALLBACK, sendDurationAnalytics(ACTION.ON_EDITOR_READY_CALLBACK, props, getExperienceStore, getCreateAnalyticsEvent()));
20
- }
21
- }
@@ -1,19 +0,0 @@
1
- import type { IntlShape } from 'react-intl-next';
2
- import EditorActions from '../../actions';
3
- import { EditorProps } from '../../types/editor-props';
4
- export type Context = {
5
- editorActions?: EditorActions;
6
- intl: IntlShape;
7
- };
8
- /**
9
- *
10
- * Logic for Editor prop types (ie. `static propTypes = propTypes(message)`)
11
- * for use with 'prop-types' library
12
- *
13
- * @param errorMessage
14
- * @returns Editor prop-types
15
- */
16
- export declare function propTypes(errorMessage: string): {
17
- minHeight: ({ appearance, minHeight, }: Pick<EditorProps, 'appearance' | 'minHeight'>) => Error | null;
18
- };
19
- export declare const defaultProps: EditorProps;
@@ -1,12 +0,0 @@
1
- import { EditorView } from 'prosemirror-view';
2
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- import { Transformer } from '@atlaskit/editor-common/types';
4
- import { ExperienceStore } from '@atlaskit/editor-common/ufo';
5
- import EditorActions from '../../actions';
6
- import { EventDispatcher } from '../../event-dispatcher';
7
- import { EditorNextProps, EditorProps } from '../../types/editor-props';
8
- export default function onEditorCreated(instance: {
9
- view: EditorView;
10
- eventDispatcher: EventDispatcher;
11
- transformer?: Transformer<string>;
12
- }, props: EditorProps | EditorNextProps, setExperienceStore: (experienceStore: ExperienceStore) => void, getExperienceStore: () => ExperienceStore | undefined, getCreateAnalyticsEvent: () => CreateUIAnalyticsEvent | undefined, editorActions: EditorActions, startTime: number | undefined, registerEditorForActions: (editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer<string>) => void): void;
@@ -1,19 +0,0 @@
1
- import type { IntlShape } from 'react-intl-next';
2
- import EditorActions from '../../actions';
3
- import { EditorProps } from '../../types/editor-props';
4
- export type Context = {
5
- editorActions?: EditorActions;
6
- intl: IntlShape;
7
- };
8
- /**
9
- *
10
- * Logic for Editor prop types (ie. `static propTypes = propTypes(message)`)
11
- * for use with 'prop-types' library
12
- *
13
- * @param errorMessage
14
- * @returns Editor prop-types
15
- */
16
- export declare function propTypes(errorMessage: string): {
17
- minHeight: ({ appearance, minHeight, }: Pick<EditorProps, 'appearance' | 'minHeight'>) => Error | null;
18
- };
19
- export declare const defaultProps: EditorProps;
@@ -1,12 +0,0 @@
1
- import { EditorView } from 'prosemirror-view';
2
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- import { Transformer } from '@atlaskit/editor-common/types';
4
- import { ExperienceStore } from '@atlaskit/editor-common/ufo';
5
- import EditorActions from '../../actions';
6
- import { EventDispatcher } from '../../event-dispatcher';
7
- import { EditorNextProps, EditorProps } from '../../types/editor-props';
8
- export default function onEditorCreated(instance: {
9
- view: EditorView;
10
- eventDispatcher: EventDispatcher;
11
- transformer?: Transformer<string>;
12
- }, props: EditorProps | EditorNextProps, setExperienceStore: (experienceStore: ExperienceStore) => void, getExperienceStore: () => ExperienceStore | undefined, getCreateAnalyticsEvent: () => CreateUIAnalyticsEvent | undefined, editorActions: EditorActions, startTime: number | undefined, registerEditorForActions: (editorView: EditorView, eventDispatcher: EventDispatcher, contentTransformer?: Transformer<string>) => void): void;