@atlaskit/editor-core 195.6.0 → 195.6.2

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 (106) hide show
  1. package/.eslintrc.js +2 -0
  2. package/CHANGELOG.md +21 -0
  3. package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +1 -1
  4. package/codemods/migrates/remove-config-panel-width-prop.ts +1 -1
  5. package/codemods/migrates/rename-editor-to-editor-migration-component.ts +1 -1
  6. package/codemods/migrates/rename-smartlinks-prop.ts +1 -1
  7. package/codemods/utils.ts +11 -4
  8. package/dist/cjs/CollapsedEditor/index.js +1 -0
  9. package/dist/cjs/actions/index.js +6 -1
  10. package/dist/cjs/composable-editor/editor-internal.js +6 -2
  11. package/dist/cjs/create-editor/ReactEditorView.js +3 -10
  12. package/dist/cjs/create-editor/create-editor.js +0 -1
  13. package/dist/cjs/create-editor/create-plugins-list.js +3 -1
  14. package/dist/cjs/create-editor/create-universal-preset.js +3 -1
  15. package/dist/cjs/presets/context.js +3 -0
  16. package/dist/cjs/test-utils.js +3 -1
  17. package/dist/cjs/ui/ContextPanel/index.js +2 -0
  18. package/dist/cjs/ui/Toolbar/ToolbarInner.js +3 -4
  19. package/dist/cjs/ui/ToolbarFeedback/index.js +1 -0
  20. package/dist/cjs/ui/WithHelpTrigger/index.js +2 -0
  21. package/dist/cjs/use-preset.js +2 -0
  22. package/dist/cjs/utils/action.js +1 -0
  23. package/dist/cjs/utils/deprecation-warnings.js +2 -2
  24. package/dist/cjs/utils/performance/instrumented-plugin.js +2 -0
  25. package/dist/cjs/version-wrapper.js +1 -1
  26. package/dist/es2019/CollapsedEditor/index.js +3 -0
  27. package/dist/es2019/actions/index.js +6 -1
  28. package/dist/es2019/composable-editor/editor-internal.js +6 -2
  29. package/dist/es2019/create-editor/ReactEditorView.js +3 -6
  30. package/dist/es2019/create-editor/create-editor.js +0 -1
  31. package/dist/es2019/create-editor/create-plugins-list.js +3 -1
  32. package/dist/es2019/create-editor/create-universal-preset.js +3 -1
  33. package/dist/es2019/presets/context.js +4 -0
  34. package/dist/es2019/test-utils.js +3 -1
  35. package/dist/es2019/ui/Appearance/Mobile.js +1 -0
  36. package/dist/es2019/ui/ContextPanel/index.js +2 -0
  37. package/dist/es2019/ui/Toolbar/ToolbarInner.js +3 -4
  38. package/dist/es2019/ui/ToolbarFeedback/index.js +1 -0
  39. package/dist/es2019/ui/WithHelpTrigger/index.js +2 -0
  40. package/dist/es2019/use-preset.js +3 -0
  41. package/dist/es2019/utils/action.js +1 -0
  42. package/dist/es2019/utils/deprecation-warnings.js +2 -2
  43. package/dist/es2019/utils/performance/instrumented-plugin.js +2 -0
  44. package/dist/es2019/version-wrapper.js +1 -1
  45. package/dist/esm/CollapsedEditor/index.js +2 -0
  46. package/dist/esm/actions/index.js +6 -1
  47. package/dist/esm/composable-editor/editor-internal.js +6 -2
  48. package/dist/esm/create-editor/ReactEditorView.js +3 -10
  49. package/dist/esm/create-editor/create-editor.js +0 -1
  50. package/dist/esm/create-editor/create-plugins-list.js +3 -1
  51. package/dist/esm/create-editor/create-universal-preset.js +3 -1
  52. package/dist/esm/presets/context.js +4 -0
  53. package/dist/esm/test-utils.js +3 -1
  54. package/dist/esm/ui/ContextPanel/index.js +2 -0
  55. package/dist/esm/ui/Toolbar/ToolbarInner.js +3 -4
  56. package/dist/esm/ui/ToolbarFeedback/index.js +1 -0
  57. package/dist/esm/ui/WithHelpTrigger/index.js +2 -0
  58. package/dist/esm/use-preset.js +3 -0
  59. package/dist/esm/utils/action.js +1 -0
  60. package/dist/esm/utils/deprecation-warnings.js +2 -2
  61. package/dist/esm/utils/performance/instrumented-plugin.js +2 -0
  62. package/dist/esm/version-wrapper.js +1 -1
  63. package/dist/types/CollapsedEditor/index.d.ts +7 -7
  64. package/dist/types/EditorWithActions/index.d.ts +1 -6
  65. package/dist/types/create-editor/ReactEditorView.d.ts +3 -5
  66. package/dist/types/create-editor/get-plugins.d.ts +4 -4
  67. package/dist/types/types/editor-props.d.ts +1 -1
  68. package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +6 -1
  69. package/dist/types/ui/Addon/ClickAreaMobile/index.d.ts +1 -1
  70. package/dist/types/ui/Addon/Dropdown/index.d.ts +1 -1
  71. package/dist/types/ui/Addon/click-area-helper.d.ts +1 -1
  72. package/dist/types/ui/Addon/types.d.ts +3 -3
  73. package/dist/types/ui/Appearance/Chromeless.d.ts +1 -1
  74. package/dist/types/ui/Appearance/FullPage/BeforeWrapper.d.ts +1 -1
  75. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  76. package/dist/types/ui/CollapsedEditor/index.d.ts +2 -2
  77. package/dist/types/ui/ContentStyles/index.d.ts +2 -1
  78. package/dist/types/ui/PluginSlot/index.d.ts +1 -1
  79. package/dist/types/ui/WithEditorActions/index.d.ts +2 -2
  80. package/dist/types/ui/WithFlash/index.d.ts +1 -1
  81. package/dist/types/ui/WithHelpTrigger/index.d.ts +1 -1
  82. package/dist/types/use-preset.d.ts +2 -1
  83. package/dist/types/utils/deprecation-warnings.d.ts +3 -3
  84. package/dist/types-ts4.5/CollapsedEditor/index.d.ts +7 -7
  85. package/dist/types-ts4.5/EditorWithActions/index.d.ts +1 -6
  86. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +3 -5
  87. package/dist/types-ts4.5/create-editor/get-plugins.d.ts +4 -4
  88. package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
  89. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/index.d.ts +6 -1
  90. package/dist/types-ts4.5/ui/Addon/ClickAreaMobile/index.d.ts +1 -1
  91. package/dist/types-ts4.5/ui/Addon/Dropdown/index.d.ts +1 -1
  92. package/dist/types-ts4.5/ui/Addon/click-area-helper.d.ts +1 -1
  93. package/dist/types-ts4.5/ui/Addon/types.d.ts +3 -3
  94. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +1 -1
  95. package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper.d.ts +1 -1
  96. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  97. package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +2 -2
  98. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -1
  99. package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +1 -1
  100. package/dist/types-ts4.5/ui/WithEditorActions/index.d.ts +2 -2
  101. package/dist/types-ts4.5/ui/WithFlash/index.d.ts +1 -1
  102. package/dist/types-ts4.5/ui/WithHelpTrigger/index.d.ts +1 -1
  103. package/dist/types-ts4.5/use-preset.d.ts +2 -1
  104. package/dist/types-ts4.5/utils/deprecation-warnings.d.ts +3 -3
  105. package/docs/4-annotations.tsx +1 -0
  106. package/package.json +9 -13
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import type EditorActions from '../../actions';
4
4
  export interface WithEditorActionsProps {
5
- render(actions: EditorActions): React.ReactElement<any> | null;
5
+ render(actions: EditorActions): React.ReactElement | null;
6
6
  }
7
- export default class WithEditorActions extends React.Component<WithEditorActionsProps, any> {
7
+ export default class WithEditorActions extends React.Component<WithEditorActionsProps> {
8
8
  static contextTypes: {
9
9
  editorActions: PropTypes.Validator<object>;
10
10
  };
@@ -6,7 +6,7 @@ import React from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  export interface Props {
8
8
  animate: boolean;
9
- children?: any;
9
+ children?: React.ReactNode;
10
10
  }
11
11
  export default class WithFlash extends React.Component<Props> {
12
12
  private toggle;
@@ -4,7 +4,7 @@ import type EditorActions from '../../actions';
4
4
  interface WithHelpTriggerProps {
5
5
  render: (openHelp: () => void) => React.ReactNode;
6
6
  }
7
- export default class WithHelpTrigger extends React.Component<WithHelpTriggerProps, any> {
7
+ export default class WithHelpTrigger extends React.Component<WithHelpTriggerProps> {
8
8
  static contextTypes: {
9
9
  editorActions: PropTypes.Validator<object>;
10
10
  };
@@ -1,7 +1,8 @@
1
1
  import type { DependencyList } from 'react';
2
2
  import { type AllEditorPresetPluginTypes, EditorPresetBuilder, type ExtractPresetAPI } from '@atlaskit/editor-common/preset';
3
3
  interface PresetAPI<Preset extends EditorPresetBuilder<any, any>> {
4
- editorApi: (Preset extends EditorPresetBuilder<any, any> ? ExtractPresetAPI<Preset> : never) | undefined;
4
+ editorApi: // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
+ (Preset extends EditorPresetBuilder<any, any> ? ExtractPresetAPI<Preset> : never) | undefined;
5
6
  preset: Preset;
6
7
  }
7
8
  /**
@@ -1,8 +1,8 @@
1
- export interface DeprecationWarning {
1
+ export interface DeprecationWarning<Props> {
2
2
  property: string;
3
3
  description?: string;
4
4
  type?: string;
5
- condition?: (props: any) => boolean;
5
+ condition?: (props: Props) => boolean;
6
6
  }
7
- declare const deprecationWarnings: (className: string, props: any, deprecations: Array<DeprecationWarning>) => void;
7
+ declare function deprecationWarnings<Props extends object>(className: string, props: Props, deprecations: Array<DeprecationWarning<Props>>): void;
8
8
  export default deprecationWarnings;
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
2
  import type * as EditorImports from '../index';
3
+ type EditorModules = {
4
+ [x: string]: any;
5
+ };
3
6
  export type EditorModule = {
4
7
  EditorContext: typeof EditorImports.EditorContext;
5
8
  WithEditorActions: typeof EditorImports.WithEditorActions;
6
- } & {
7
- [x: string]: any;
8
- };
9
+ } & EditorModules;
9
10
  export interface Props {
10
11
  placeholder?: string;
11
12
  isExpanded?: boolean;
@@ -13,14 +14,13 @@ export interface Props {
13
14
  renderEditor: (Editor: typeof EditorImports.Editor, modules: EditorModule) => JSX.Element;
14
15
  }
15
16
  export interface State {
16
- editorModules?: {
17
- [x: string]: any;
18
- };
17
+ editorModules?: EditorModules;
19
18
  }
20
19
  export default class CollapsedEditor extends React.Component<Props, State> {
21
- static editorModules: any;
20
+ static editorModules: EditorModules;
22
21
  state: State;
23
22
  componentDidMount(): void;
24
23
  loadEditorModules(): void;
25
24
  render(): JSX.Element;
26
25
  }
26
+ export {};
@@ -2,12 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import type EditorActions from '../actions';
4
4
  import type { EditorProps } from '../editor';
5
- export interface EditorWithActionsPropsOverride extends EditorProps {
6
- onSave?: any;
7
- onChange?: any;
8
- onCancel?: any;
9
- }
10
- export interface EditorWithActionsProps extends EditorWithActionsPropsOverride {
5
+ export interface EditorWithActionsProps extends Omit<EditorProps, 'onSave' | 'onChange' | 'onCancel'> {
11
6
  onSave?: (actions: EditorActions) => void;
12
7
  onChange?: (actions: EditorActions) => void;
13
8
  onCancel?: (actions: EditorActions) => void;
@@ -17,7 +17,7 @@ import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
17
17
  import { EventDispatcher } from '../event-dispatcher';
18
18
  import type { Dispatch } from '../event-dispatcher';
19
19
  import type { SetEditorAPI } from '../presets/context';
20
- import type { EditorAppearance, EditorConfig, EditorPlugin, EditorProps, EditorReactContext } from '../types';
20
+ import type { EditorAppearance, EditorConfig, EditorPlugin, EditorProps } from '../types';
21
21
  import type { EditorNextProps } from '../types/editor-props';
22
22
  import { TransactionTracker } from '../utils/performance/track-transactions';
23
23
  export interface EditorViewProps {
@@ -56,12 +56,11 @@ export interface EditorViewProps {
56
56
  }
57
57
  interface CreateEditorStateOptions {
58
58
  props: EditorViewProps;
59
- context: EditorReactContext;
60
59
  doc?: string | Object | PMNode;
61
60
  resetting?: boolean;
62
61
  selectionAtStart?: boolean;
63
62
  }
64
- export declare class ReactEditorView<T = {}> extends React.Component<EditorViewProps & WrappedComponentProps & T, {}, EditorReactContext> {
63
+ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewProps & WrappedComponentProps & T, {}> {
65
64
  view?: EditorView;
66
65
  eventDispatcher: EventDispatcher;
67
66
  contentTransformer?: Transformer<string>;
@@ -77,7 +76,6 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
77
76
  static contextTypes: {
78
77
  getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
79
78
  };
80
- context: EditorReactContext;
81
79
  private canDispatchTransactions;
82
80
  private focusTimeoutId?;
83
81
  private reliabilityInterval?;
@@ -89,7 +87,7 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
89
87
  private getPluginNames;
90
88
  private countNodes;
91
89
  private isTransactionTrackingExplicitlyDisabled;
92
- constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
90
+ constructor(props: EditorViewProps & WrappedComponentProps & T);
93
91
  getEditorState: () => EditorState | undefined;
94
92
  getEditorView: () => EditorView | undefined;
95
93
  UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
@@ -1,11 +1,12 @@
1
1
  import type { IntlShape } from 'react-intl-next';
2
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
+ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
2
4
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
5
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
6
  import type { ReactHookFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
5
7
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
6
8
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
7
9
  import type { Dispatch, EventDispatcher } from '../event-dispatcher';
8
- import type { EditorReactContext } from '../types/editor-react-context';
9
10
  import type { FeatureFlags } from '../types/feature-flags';
10
11
  import type { MarkConfig, NodeConfig } from '../types/pm-config';
11
12
  export type LightPMPluginFactoryParams = {
@@ -15,9 +16,8 @@ export type LightPMPluginFactoryParams = {
15
16
  providerFactory: ProviderFactory;
16
17
  props: {};
17
18
  prevProps?: {};
18
- portalProviderAPI: any;
19
- reactContext: () => EditorReactContext;
20
- dispatchAnalyticsEvent: any;
19
+ portalProviderAPI: PortalProviderAPI;
20
+ dispatchAnalyticsEvent: DispatchAnalyticsEvent;
21
21
  featureFlags: FeatureFlags;
22
22
  getIntl: () => IntlShape;
23
23
  };
@@ -33,7 +33,7 @@ import type { EmptyStateHandler } from './empty-state-handler';
33
33
  import type { ExtensionConfig } from './extension-config';
34
34
  import type { PerformanceTracking } from './performance-tracking';
35
35
  export type { UseStickyToolbarType };
36
- export type ReactComponents = ReactElement<any> | ReactElement<any>[];
36
+ export type ReactComponents = ReactElement | ReactElement[];
37
37
  type ExtensionProviders = (ExtensionProvider | Promise<ExtensionProvider>)[];
38
38
  type ExtensionProvidersWithEditorAction = (editorActions?: EditorActions) => ExtensionProviders;
39
39
  export type ExtensionProvidersProp = ExtensionProviders | ExtensionProvidersWithEditorAction;
@@ -1,8 +1,13 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
1
6
  import { jsx } from '@emotion/react';
2
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
8
  export interface Props {
4
9
  editorView?: EditorView;
5
- children?: any;
10
+ children?: React.ReactNode;
6
11
  editorDisabled?: boolean;
7
12
  }
8
13
  export declare const ClickAreaBlock: ({ editorView, editorDisabled, children }: Props) => jsx.JSX.Element;
@@ -8,7 +8,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
8
  export interface Props {
9
9
  editorView?: EditorView;
10
10
  minHeight: number;
11
- children?: any;
11
+ children?: React.ReactNode;
12
12
  persistScrollGutter?: boolean;
13
13
  isExpanded?: boolean;
14
14
  editorDisabled?: boolean;
@@ -12,7 +12,7 @@ export interface Props {
12
12
  editorActions: EditorActions;
13
13
  togglePopup: () => void;
14
14
  }
15
- export default class DropdownWrapper extends React.Component<Props, any> {
15
+ export default class DropdownWrapper extends React.Component<Props> {
16
16
  render(): jsx.JSX.Element;
17
17
  private handleClick;
18
18
  }
@@ -9,5 +9,5 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  * 2. if another modal is open (e.g. delete confirmation modal for confluence table) then ignore clicks as they shouldn't influence editor state
10
10
  */
11
11
  export declare const checkForModal: (target: HTMLElement | null) => boolean;
12
- declare const clickAreaClickHandler: (view: EditorView, event: React.MouseEvent<any>) => false | undefined;
12
+ declare const clickAreaClickHandler: (view: EditorView, event: React.MouseEvent<HTMLElement>) => false | undefined;
13
13
  export { clickAreaClickHandler };
@@ -1,16 +1,16 @@
1
1
  /// <reference types="react" />
2
2
  import type EditorActions from '../../actions';
3
- export type RenderOnClickHandler = (editorActions: EditorActions, closePopup: () => void) => React.ReactElement<any>;
3
+ export type RenderOnClickHandler = (editorActions: EditorActions, closePopup: () => void) => React.ReactElement;
4
4
  export interface AddonActions {
5
5
  actionOnClick?: (editorActions: EditorActions) => void;
6
6
  renderOnClick?: RenderOnClickHandler;
7
7
  }
8
8
  export interface AddonCommonProps extends AddonActions {
9
- icon: React.ReactElement<any>;
9
+ icon: React.ReactElement;
10
10
  }
11
11
  export interface AddonProps extends AddonCommonProps {
12
12
  onClick?: (actions: AddonActions) => void;
13
- children?: React.ReactElement<any>[];
13
+ children?: React.ReactElement[];
14
14
  }
15
15
  export interface AddonConfiguration extends AddonCommonProps {
16
16
  text: string;
@@ -10,7 +10,7 @@ import type { EditorAppearanceComponentProps } from '../../types';
10
10
  type AppearanceProps = EditorAppearanceComponentProps<[
11
11
  OptionalPlugin<MaxContentSizePlugin>
12
12
  ]>;
13
- export default class Editor extends React.Component<AppearanceProps, any> {
13
+ export default class Editor extends React.Component<AppearanceProps> {
14
14
  static displayName: string;
15
15
  private appearance;
16
16
  private containerElement;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { ReactElement } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
- type ReactComponents = ReactElement<any> | ReactElement<any>[];
7
+ type ReactComponents = ReactElement | ReactElement[];
8
8
  export declare const BeforePrimaryToolbarWrapper: (props: {
9
9
  beforePrimaryToolbarComponents: ReactComponents | undefined;
10
10
  }) => jsx.JSX.Element;
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  export declare const fullPageEditorWrapper: import("@emotion/react").SerializedStyles;
3
3
  export declare const ScrollContainer: import("react").ForwardRefExoticComponent<Pick<{
4
- theme?: any;
4
+ theme?: import("@emotion/react").Theme | undefined;
5
5
  colorMode?: "light" | "dark" | undefined;
6
6
  featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
7
7
  viewMode?: "view" | "edit" | undefined;
8
8
  } & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "id" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "children" | "key" | "name" | "width" | "property" | "type" | "content" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "value" | "list" | "open" | "accessKey" | "dir" | "className" | "role" | "start" | "action" | "step" | "wrap" | "color" | "height" | "translate" | "hidden" | keyof {
9
- theme?: any;
9
+ theme?: import("@emotion/react").Theme | undefined;
10
10
  colorMode?: "light" | "dark" | undefined;
11
11
  featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
12
12
  viewMode?: "view" | "edit" | undefined;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import Editor from '../../editor';
2
+ import type Editor from '../../editor';
3
3
  export interface Props {
4
4
  placeholder?: string;
5
5
  children?: any;
@@ -14,6 +14,6 @@ export default class CollapsedEditor extends React.Component<Props, State> {
14
14
  previouslyExpanded?: boolean;
15
15
  functionalEditor?: boolean;
16
16
  componentDidUpdate(): void;
17
- handleEditorRef: (editorRef?: Editor, editorRefCallback?: any) => void;
17
+ handleEditorRef: (editorRef?: Editor, editorRefCallback?: ((editor: Editor | undefined) => void) | undefined) => void;
18
18
  render(): any;
19
19
  }
@@ -4,10 +4,11 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import type { SerializedStyles } from '@emotion/react';
7
+ import { type Theme } from '@emotion/react';
7
8
  import type { FeatureFlags } from '../../types/feature-flags';
8
9
  export declare const linkStyles: SerializedStyles;
9
10
  type ContentStylesProps = {
10
- theme?: any;
11
+ theme?: Theme;
11
12
  colorMode?: 'light' | 'dark';
12
13
  featureFlags?: FeatureFlags;
13
14
  viewMode?: 'view' | 'edit';
@@ -28,7 +28,7 @@ export interface Props {
28
28
  contentArea?: HTMLElement;
29
29
  wrapperElement: HTMLElement | null;
30
30
  }
31
- export default class PluginSlot extends React.Component<Props, any> {
31
+ export default class PluginSlot extends React.Component<Props> {
32
32
  static displayName: string;
33
33
  transitionEvent: "transitionend" | undefined;
34
34
  shouldComponentUpdate(nextProps: Props): boolean;
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import type EditorActions from '../../actions';
4
4
  export interface WithEditorActionsProps {
5
- render(actions: EditorActions): React.ReactElement<any> | null;
5
+ render(actions: EditorActions): React.ReactElement | null;
6
6
  }
7
- export default class WithEditorActions extends React.Component<WithEditorActionsProps, any> {
7
+ export default class WithEditorActions extends React.Component<WithEditorActionsProps> {
8
8
  static contextTypes: {
9
9
  editorActions: PropTypes.Validator<object>;
10
10
  };
@@ -6,7 +6,7 @@ import React from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  export interface Props {
8
8
  animate: boolean;
9
- children?: any;
9
+ children?: React.ReactNode;
10
10
  }
11
11
  export default class WithFlash extends React.Component<Props> {
12
12
  private toggle;
@@ -4,7 +4,7 @@ import type EditorActions from '../../actions';
4
4
  interface WithHelpTriggerProps {
5
5
  render: (openHelp: () => void) => React.ReactNode;
6
6
  }
7
- export default class WithHelpTrigger extends React.Component<WithHelpTriggerProps, any> {
7
+ export default class WithHelpTrigger extends React.Component<WithHelpTriggerProps> {
8
8
  static contextTypes: {
9
9
  editorActions: PropTypes.Validator<object>;
10
10
  };
@@ -1,7 +1,8 @@
1
1
  import type { DependencyList } from 'react';
2
2
  import { type AllEditorPresetPluginTypes, EditorPresetBuilder, type ExtractPresetAPI } from '@atlaskit/editor-common/preset';
3
3
  interface PresetAPI<Preset extends EditorPresetBuilder<any, any>> {
4
- editorApi: (Preset extends EditorPresetBuilder<any, any> ? ExtractPresetAPI<Preset> : never) | undefined;
4
+ editorApi: // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
+ (Preset extends EditorPresetBuilder<any, any> ? ExtractPresetAPI<Preset> : never) | undefined;
5
6
  preset: Preset;
6
7
  }
7
8
  /**
@@ -1,8 +1,8 @@
1
- export interface DeprecationWarning {
1
+ export interface DeprecationWarning<Props> {
2
2
  property: string;
3
3
  description?: string;
4
4
  type?: string;
5
- condition?: (props: any) => boolean;
5
+ condition?: (props: Props) => boolean;
6
6
  }
7
- declare const deprecationWarnings: (className: string, props: any, deprecations: Array<DeprecationWarning>) => void;
7
+ declare function deprecationWarnings<Props extends object>(className: string, props: Props, deprecations: Array<DeprecationWarning<Props>>): void;
8
8
  export default deprecationWarnings;
@@ -220,6 +220,7 @@ class SplitExample extends React.Component<{ initialAdf: object }> {
220
220
  }}
221
221
  >
222
222
  <p>Paragraph node's content:</p>
223
+ {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
223
224
  {code`${JSON.stringify((adf as any).content[0].content, null, 2)}`}
224
225
  </div>
225
226
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "195.6.0",
3
+ "version": "195.6.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,13 +45,13 @@
45
45
  "@atlaskit/analytics-next": "^10.1.0",
46
46
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
47
47
  "@atlaskit/button": "^20.1.0",
48
- "@atlaskit/editor-common": "^87.13.0",
48
+ "@atlaskit/editor-common": "^88.0.0",
49
49
  "@atlaskit/editor-plugins": "^4.1.0",
50
50
  "@atlaskit/editor-prosemirror": "5.0.1",
51
51
  "@atlaskit/editor-shared-styles": "^2.13.0",
52
52
  "@atlaskit/emoji": "^67.7.0",
53
- "@atlaskit/icon": "^22.13.0",
54
- "@atlaskit/media-card": "^78.0.0",
53
+ "@atlaskit/icon": "^22.14.0",
54
+ "@atlaskit/media-card": "^78.1.0",
55
55
  "@atlaskit/mention": "^23.2.0",
56
56
  "@atlaskit/platform-feature-flags": "^0.3.0",
57
57
  "@atlaskit/spinner": "^16.3.0",
@@ -80,14 +80,14 @@
80
80
  "react-intl-next": "npm:react-intl@^5.18.1"
81
81
  },
82
82
  "devDependencies": {
83
- "@af/editor-examples-helpers": "0.2.0",
83
+ "@af/editor-examples-helpers": "0.3.1",
84
84
  "@af/editor-libra": "*",
85
85
  "@af/visual-regression": "*",
86
86
  "@atlaskit/adf-utils": "^19.8.0",
87
87
  "@atlaskit/analytics-listeners": "^8.11.0",
88
- "@atlaskit/collab-provider": "9.37.2",
88
+ "@atlaskit/collab-provider": "9.37.3",
89
89
  "@atlaskit/editor-json-transformer": "^8.18.0",
90
- "@atlaskit/editor-plugin-annotation": "1.19.0",
90
+ "@atlaskit/editor-plugin-annotation": "1.19.2",
91
91
  "@atlaskit/editor-plugin-card": "^2.13.0",
92
92
  "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
93
93
  "@atlaskit/editor-plugin-list": "^3.8.0",
@@ -97,7 +97,7 @@
97
97
  "@atlaskit/logo": "^14.2.0",
98
98
  "@atlaskit/media-core": "^34.3.0",
99
99
  "@atlaskit/media-integration-test-helpers": "^3.1.0",
100
- "@atlaskit/media-test-helpers": "^34.0.0",
100
+ "@atlaskit/media-test-helpers": "^34.1.0",
101
101
  "@atlaskit/modal-dialog": "^12.15.0",
102
102
  "@atlaskit/primitives": "^12.0.0",
103
103
  "@atlaskit/renderer": "^109.50.0",
@@ -108,7 +108,7 @@
108
108
  "@atlaskit/visual-regression": "*",
109
109
  "@atlassian/adf-schema-json": "^1.22.0",
110
110
  "@atlassian/feature-flags-test-utils": "*",
111
- "@atlassian/search-provider": "2.4.108",
111
+ "@atlassian/search-provider": "2.4.111",
112
112
  "@emotion/jest": "^11.8.0",
113
113
  "@storybook/addon-knobs": "^5.3.18",
114
114
  "@testing-library/react": "^12.1.5",
@@ -240,10 +240,6 @@
240
240
  "platform.editor.core.increase-full-page-guttering": {
241
241
  "type": "boolean"
242
242
  },
243
- "platform.editor.no-telecursors-for-viewmode-users_hok8o": {
244
- "type": "boolean",
245
- "referenceOnly": "true"
246
- },
247
243
  "platform_editor_tables_padding_increase": {
248
244
  "type": "boolean",
249
245
  "referenceOnly": "true"