@atlaskit/editor-core 210.1.6 → 210.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/afm-cc/tsconfig.json +2 -2
  3. package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -2
  4. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +3 -5
  5. package/dist/cjs/ui/ContentStyles/index.js +3 -3
  6. package/dist/cjs/ui/ContentStyles/status.js +2 -2
  7. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +7 -9
  8. package/dist/cjs/ui/EditorContentContainer/styles/findReplaceStyles.js +1 -174
  9. package/dist/cjs/ui/Toolbar/Toolbar.js +6 -2
  10. package/dist/cjs/version-wrapper.js +1 -1
  11. package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -2
  12. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +3 -5
  13. package/dist/es2019/ui/ContentStyles/index.js +5 -5
  14. package/dist/es2019/ui/ContentStyles/status.js +2 -2
  15. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +8 -10
  16. package/dist/es2019/ui/EditorContentContainer/styles/findReplaceStyles.js +0 -225
  17. package/dist/es2019/ui/Toolbar/Toolbar.js +6 -2
  18. package/dist/es2019/version-wrapper.js +1 -1
  19. package/dist/esm/ui/Appearance/Comment/Comment.js +1 -2
  20. package/dist/esm/ui/Appearance/FullPage/FullPage.js +3 -5
  21. package/dist/esm/ui/ContentStyles/index.js +4 -4
  22. package/dist/esm/ui/ContentStyles/status.js +2 -2
  23. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +8 -10
  24. package/dist/esm/ui/EditorContentContainer/styles/findReplaceStyles.js +0 -173
  25. package/dist/esm/ui/Toolbar/Toolbar.js +6 -2
  26. package/dist/esm/version-wrapper.js +1 -1
  27. package/dist/types/CollapsedEditor/index.d.ts +1 -1
  28. package/dist/types/composable-editor/BaseThemeWrapper.d.ts +1 -1
  29. package/dist/types/composable-editor/editor-internal.d.ts +6 -6
  30. package/dist/types/composable-editor/hooks/useProviders.d.ts +4 -4
  31. package/dist/types/create-editor/ErrorBoundary.d.ts +4 -4
  32. package/dist/types/create-editor/ReactEditorView/useDispatchTransaction.d.ts +2 -2
  33. package/dist/types/create-editor/ReactEditorView.d.ts +16 -16
  34. package/dist/types/create-editor/create-schema.d.ts +1 -1
  35. package/dist/types/create-editor/create-universal-preset.d.ts +203 -195
  36. package/dist/types/create-editor/editorStateNotificationPlugin.d.ts +2 -2
  37. package/dist/types/create-editor/get-plugins.d.ts +13 -13
  38. package/dist/types/editor-appearances/FullPageEditor.d.ts +1 -1
  39. package/dist/types/presets/default.d.ts +21 -21
  40. package/dist/types/presets/universal.d.ts +214 -206
  41. package/dist/types/presets/useUniversalPreset.d.ts +202 -194
  42. package/dist/types/test-utils.d.ts +6 -6
  43. package/dist/types/types/editor-appearance-component.d.ts +23 -23
  44. package/dist/types/types/editor-config.d.ts +9 -9
  45. package/dist/types/types/editor-instance.d.ts +7 -7
  46. package/dist/types/types/editor-onchange.d.ts +1 -1
  47. package/dist/types/types/editor-props.d.ts +100 -100
  48. package/dist/types/types/i18n.d.ts +2 -2
  49. package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
  50. package/dist/types/ui/Addon/Dropdown/index.d.ts +1 -1
  51. package/dist/types/ui/Addon/types.d.ts +1 -1
  52. package/dist/types/ui/Appearance/Chromeless.d.ts +6 -6
  53. package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +2 -2
  54. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +3 -3
  55. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +11 -11
  56. package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +12 -12
  57. package/dist/types/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +3 -1
  58. package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +2 -2
  59. package/dist/types/ui/Appearance/FullPage/types.d.ts +2 -2
  60. package/dist/types/ui/ChromeCollapsed/index.d.ts +2 -2
  61. package/dist/types/ui/CollapsedEditor/index.d.ts +2 -2
  62. package/dist/types/ui/ContentStyles/index.d.ts +4 -4
  63. package/dist/types/ui/ContextPanel/index.d.ts +4 -4
  64. package/dist/types/ui/EditorContentContainer/EditorContentContainer.d.ts +3 -3
  65. package/dist/types/ui/EditorContentContainer/styles/findReplaceStyles.d.ts +0 -1
  66. package/dist/types/ui/PluginSlot/index.d.ts +10 -10
  67. package/dist/types/ui/PluginSlot/mount-plugin-hooks.d.ts +1 -1
  68. package/dist/types/ui/Toolbar/Toolbar.d.ts +4 -4
  69. package/dist/types/ui/Toolbar/ToolbarPortal.d.ts +2 -2
  70. package/dist/types/ui/Toolbar/toolbar-types.d.ts +11 -11
  71. package/dist/types/ui/ToolbarHelp/index.d.ts +1 -1
  72. package/dist/types/utils/deprecation-warnings.d.ts +2 -2
  73. package/dist/types/utils/performance/components/RenderTracking.d.ts +1 -1
  74. package/dist/types/utils/performance/plugin-performance-report.d.ts +4 -4
  75. package/dist/types/utils/performance/simple-measure-to-entries.d.ts +1 -1
  76. package/dist/types/utils/performance/track-transactions.d.ts +1 -1
  77. package/dist/types-ts4.5/CollapsedEditor/index.d.ts +1 -1
  78. package/dist/types-ts4.5/composable-editor/BaseThemeWrapper.d.ts +1 -1
  79. package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +7 -7
  80. package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +4 -4
  81. package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +4 -4
  82. package/dist/types-ts4.5/create-editor/ReactEditorView/useDispatchTransaction.d.ts +2 -2
  83. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +16 -16
  84. package/dist/types-ts4.5/create-editor/create-schema.d.ts +1 -1
  85. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +239 -231
  86. package/dist/types-ts4.5/create-editor/editorStateNotificationPlugin.d.ts +2 -2
  87. package/dist/types-ts4.5/create-editor/get-plugins.d.ts +13 -13
  88. package/dist/types-ts4.5/editor-appearances/FullPageEditor.d.ts +1 -1
  89. package/dist/types-ts4.5/presets/default.d.ts +21 -21
  90. package/dist/types-ts4.5/presets/universal.d.ts +250 -242
  91. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +238 -230
  92. package/dist/types-ts4.5/test-utils.d.ts +6 -6
  93. package/dist/types-ts4.5/types/editor-appearance-component.d.ts +23 -23
  94. package/dist/types-ts4.5/types/editor-config.d.ts +9 -9
  95. package/dist/types-ts4.5/types/editor-instance.d.ts +7 -7
  96. package/dist/types-ts4.5/types/editor-onchange.d.ts +1 -1
  97. package/dist/types-ts4.5/types/editor-props.d.ts +100 -100
  98. package/dist/types-ts4.5/types/i18n.d.ts +2 -2
  99. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
  100. package/dist/types-ts4.5/ui/Addon/Dropdown/index.d.ts +1 -1
  101. package/dist/types-ts4.5/ui/Addon/types.d.ts +1 -1
  102. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +6 -6
  103. package/dist/types-ts4.5/ui/Appearance/Comment/Toolbar.d.ts +2 -2
  104. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +3 -3
  105. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +13 -13
  106. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +12 -12
  107. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +3 -1
  108. package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +2 -2
  109. package/dist/types-ts4.5/ui/Appearance/FullPage/types.d.ts +2 -2
  110. package/dist/types-ts4.5/ui/ChromeCollapsed/index.d.ts +2 -2
  111. package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +2 -2
  112. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +4 -4
  113. package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +4 -4
  114. package/dist/types-ts4.5/ui/EditorContentContainer/EditorContentContainer.d.ts +3 -3
  115. package/dist/types-ts4.5/ui/EditorContentContainer/styles/findReplaceStyles.d.ts +0 -1
  116. package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +10 -10
  117. package/dist/types-ts4.5/ui/PluginSlot/mount-plugin-hooks.d.ts +1 -1
  118. package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +4 -4
  119. package/dist/types-ts4.5/ui/Toolbar/ToolbarPortal.d.ts +2 -2
  120. package/dist/types-ts4.5/ui/Toolbar/toolbar-types.d.ts +11 -11
  121. package/dist/types-ts4.5/ui/ToolbarHelp/index.d.ts +1 -1
  122. package/dist/types-ts4.5/utils/deprecation-warnings.d.ts +2 -2
  123. package/dist/types-ts4.5/utils/performance/components/RenderTracking.d.ts +1 -1
  124. package/dist/types-ts4.5/utils/performance/plugin-performance-report.d.ts +4 -4
  125. package/dist/types-ts4.5/utils/performance/simple-measure-to-entries.d.ts +1 -1
  126. package/dist/types-ts4.5/utils/performance/track-transactions.d.ts +1 -1
  127. package/package.json +6 -18
  128. package/dist/cjs/ui/Appearance/FullPage/getEditorViewModeSync.js +0 -43
  129. package/dist/es2019/ui/Appearance/FullPage/getEditorViewModeSync.js +0 -33
  130. package/dist/esm/ui/Appearance/FullPage/getEditorViewModeSync.js +0 -36
  131. package/dist/types/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +0 -3
  132. package/dist/types-ts4.5/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +0 -3
@@ -4,10 +4,10 @@
4
4
  */
5
5
  import React from 'react';
6
6
  interface MainToolbarWrapperProps {
7
- showKeyline: boolean;
8
- twoLineEditorToolbar: boolean;
9
7
  children: React.ReactNode;
10
8
  'data-testid'?: string;
9
+ showKeyline: boolean;
10
+ twoLineEditorToolbar: boolean;
11
11
  }
12
12
  /**
13
13
  * Wrapper component for the main toolbar that handles feature flag based styling
@@ -1,5 +1,5 @@
1
1
  export type ScrollContainerRefs = {
2
- scrollContainer: HTMLDivElement | null;
3
- contentArea: HTMLDivElement | null;
4
2
  containerArea: HTMLDivElement | null;
3
+ contentArea: HTMLDivElement | null;
4
+ scrollContainer: HTMLDivElement | null;
5
5
  };
@@ -5,9 +5,9 @@
5
5
  import React from 'react';
6
6
  import type { WrappedComponentProps } from 'react-intl-next';
7
7
  export interface Props {
8
- text?: string;
9
- onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
10
8
  label?: string;
9
+ onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
10
+ text?: string;
11
11
  }
12
12
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
13
13
  WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import type Editor from '../../editor';
3
3
  export interface Props {
4
- placeholder?: string;
5
4
  assistiveLabel?: string;
6
5
  children?: any;
7
6
  isExpanded?: boolean;
8
- onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
9
7
  onExpand?: () => void;
8
+ onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
9
+ placeholder?: string;
10
10
  }
11
11
  export type State = Object;
12
12
  export default class CollapsedEditor extends React.Component<Props, State> {
@@ -8,13 +8,13 @@ import { type Theme } from '@emotion/react';
8
8
  import type { EditorAppearance, FeatureFlags } from '@atlaskit/editor-common/types';
9
9
  export declare const linkStyles: SerializedStyles;
10
10
  type ContentStylesProps = {
11
- theme?: Theme;
11
+ appearance?: EditorAppearance;
12
12
  colorMode?: 'light' | 'dark';
13
13
  featureFlags?: FeatureFlags;
14
- viewMode?: 'view' | 'edit';
15
- typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed';
16
14
  isScrollable?: boolean;
17
- appearance?: EditorAppearance;
15
+ theme?: Theme;
16
+ typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed';
17
+ viewMode?: 'view' | 'edit';
18
18
  };
19
19
  export declare const placeholderStyles: SerializedStyles;
20
20
  type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
@@ -9,18 +9,18 @@ import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/ty
9
9
  import { type ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
10
10
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
11
11
  export type Props = {
12
- visible: boolean;
13
- editorAPI: PublicPluginAPI<[OptionalPlugin<ContextPanelPlugin>]> | undefined;
14
12
  children?: React.ReactElement;
15
- hasPadding?: boolean;
16
13
  customWidth?: number;
14
+ editorAPI: PublicPluginAPI<[OptionalPlugin<ContextPanelPlugin>]> | undefined;
15
+ hasPadding?: boolean;
16
+ visible: boolean;
17
17
  };
18
18
  export declare const panel: import("@emotion/react").SerializedStyles;
19
19
  export declare const content: import("@emotion/react").SerializedStyles;
20
20
  type SwappableContentAreaProps = {
21
- pluginContent?: React.ReactNode;
22
21
  editorView?: EditorView;
23
22
  intl: IntlShape;
23
+ pluginContent?: React.ReactNode;
24
24
  } & Props;
25
25
  export declare const SwappableContentArea: React.FC<import("react-intl-next").WithIntlProps<SwappableContentAreaProps>> & {
26
26
  WrappedComponent: React.ComponentType<SwappableContentAreaProps>;
@@ -5,12 +5,12 @@
5
5
  import React from 'react';
6
6
  import type { EditorAppearance, FeatureFlags } from '@atlaskit/editor-common/types';
7
7
  export type EditorContentContainerProps = {
8
- className?: string;
8
+ appearance?: EditorAppearance;
9
9
  children?: React.ReactNode;
10
+ className?: string;
10
11
  featureFlags?: FeatureFlags;
11
- viewMode?: 'view' | 'edit';
12
12
  isScrollable?: boolean;
13
- appearance?: EditorAppearance;
13
+ viewMode?: 'view' | 'edit';
14
14
  };
15
15
  /**
16
16
  * EditorContentStyles is a wrapper component that applies styles to its children
@@ -1,3 +1,2 @@
1
1
  export declare const findReplaceStyles: import("@emotion/react").SerializedStyles;
2
2
  export declare const findReplaceStylesNew: import("@emotion/react").SerializedStyles;
3
- export declare const findReplaceStylesNewNoImportant: import("@emotion/react").SerializedStyles;
@@ -11,20 +11,20 @@ import type { EditorAppearance, ReactHookFactory, UIComponentFactory } from '@at
11
11
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
12
12
  import type EditorActions from '../../actions';
13
13
  export interface Props {
14
- items?: UIComponentFactory[];
15
- pluginHooks?: ReactHookFactory[];
16
- editorView?: EditorView;
17
- editorActions?: EditorActions;
18
- eventDispatcher?: EventDispatcher;
19
- providerFactory: ProviderFactory;
20
14
  appearance?: EditorAppearance;
21
- popupsMountPoint?: HTMLElement;
22
- popupsBoundariesElement?: HTMLElement;
23
- popupsScrollableElement?: HTMLElement;
24
15
  containerElement: HTMLElement | null;
16
+ contentArea?: HTMLElement;
25
17
  disabled: boolean;
26
18
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
27
- contentArea?: HTMLElement;
19
+ editorActions?: EditorActions;
20
+ editorView?: EditorView;
21
+ eventDispatcher?: EventDispatcher;
22
+ items?: UIComponentFactory[];
23
+ pluginHooks?: ReactHookFactory[];
24
+ popupsBoundariesElement?: HTMLElement;
25
+ popupsMountPoint?: HTMLElement;
26
+ popupsScrollableElement?: HTMLElement;
27
+ providerFactory: ProviderFactory;
28
28
  wrapperElement: HTMLElement | null;
29
29
  }
30
30
  declare const PluginSlotComponent: React.MemoExoticComponent<({ items, editorView, editorActions, eventDispatcher, providerFactory, appearance, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, containerElement, disabled, dispatchAnalyticsEvent, wrapperElement, pluginHooks, }: Props) => jsx.JSX.Element | null>;
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import type { ReactHookFactory } from '@atlaskit/editor-common/types';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  interface MountPluginHooksProps {
5
+ containerElement: HTMLElement | null;
5
6
  editorView: EditorView | undefined;
6
7
  pluginHooks: ReactHookFactory[] | undefined;
7
- containerElement: HTMLElement | null;
8
8
  }
9
9
  export declare function MountPluginHooks({ pluginHooks, editorView, containerElement, }: MountPluginHooksProps): React.JSX.Element | null;
10
10
  export {};
@@ -12,11 +12,11 @@ import type { ToolbarProps } from './toolbar-types';
12
12
  * If making changes to this component please ensure to also update `<ToolbarNext />`.
13
13
  */
14
14
  export declare const Toolbar: (props: ToolbarProps) => JSX.Element;
15
- type NewToolbarProps = Pick<ToolbarUIContextType, 'popupsMountPoint'> & Pick<EditorToolbarContextType, 'editorAppearance'> & {
16
- toolbar: RegisterToolbar;
15
+ type NewToolbarProps = Pick<ToolbarUIContextType, 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement'> & Pick<EditorToolbarContextType, 'editorAppearance'> & {
17
16
  components: RegisterComponent[];
18
- editorView?: EditorView;
19
17
  editorAPI?: PublicPluginAPI<[ToolbarPlugin]>;
18
+ editorView?: EditorView;
19
+ toolbar: RegisterToolbar;
20
20
  };
21
21
  /**
22
22
  * Renders a primary toolbar, driven by components registed by `editor-plugin-toolbar`. `ToolbarModelRenderer` will just
@@ -24,5 +24,5 @@ type NewToolbarProps = Pick<ToolbarUIContextType, 'popupsMountPoint'> & Pick<Edi
24
24
  *
25
25
  * The majority of components UI should use `@atlaskit/editor-toolbar` components.
26
26
  */
27
- export declare const ToolbarNext: ({ toolbar, components, editorView, editorAPI, popupsMountPoint, editorAppearance, }: NewToolbarProps) => React.JSX.Element;
27
+ export declare const ToolbarNext: ({ toolbar, components, editorView, editorAPI, popupsMountPoint, editorAppearance, popupsBoundariesElement, popupsScrollableElement, }: NewToolbarProps) => React.JSX.Element;
28
28
  export {};
@@ -4,17 +4,17 @@
4
4
  */
5
5
  import React from 'react';
6
6
  type ToolbarPortalContextValue = {
7
+ isActive: boolean;
7
8
  Portal: React.ComponentType<{
8
9
  children: React.ReactNode;
9
10
  }>;
10
- isActive: boolean;
11
11
  };
12
12
  export declare const ToolbarPortalContextProvider: ({ children, portal, isActive, }: {
13
13
  children: React.ReactNode;
14
+ isActive: boolean;
14
15
  portal: React.ComponentType<{
15
16
  children: React.ReactNode;
16
17
  }>;
17
- isActive: boolean;
18
18
  }) => JSX.Element;
19
19
  export declare const useToolbarPortal: () => ToolbarPortalContextValue | undefined;
20
20
  export declare const ToolbarPortalMountPoint: () => JSX.Element | null;
@@ -5,29 +5,29 @@ import type { EditorAppearance, ToolbarSize, ToolbarUIComponentFactory } from '@
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
6
  import type EditorActions from '../../actions';
7
7
  export interface ToolbarBreakPoint {
8
- width: number;
9
8
  size: ToolbarSize;
9
+ width: number;
10
10
  }
11
11
  export interface ToolbarProps {
12
- items?: Array<ToolbarUIComponentFactory>;
13
- editorView: EditorView;
12
+ appearance?: EditorAppearance;
13
+ containerElement: HTMLElement | null;
14
+ disabled: boolean;
15
+ dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
14
16
  editorActions?: EditorActions;
17
+ editorView: EditorView;
15
18
  eventDispatcher: EventDispatcher;
16
- providerFactory: ProviderFactory;
17
- appearance?: EditorAppearance;
18
- popupsMountPoint?: HTMLElement;
19
+ hasMinWidth?: boolean;
20
+ items?: Array<ToolbarUIComponentFactory>;
19
21
  popupsBoundariesElement?: HTMLElement;
22
+ popupsMountPoint?: HTMLElement;
20
23
  popupsScrollableElement?: HTMLElement;
21
- disabled: boolean;
22
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
24
+ providerFactory: ProviderFactory;
23
25
  toolbarSize: ToolbarSize;
24
- containerElement: HTMLElement | null;
25
- hasMinWidth?: boolean;
26
26
  twoLineEditorToolbar?: boolean;
27
27
  }
28
28
  export type ToolbarWithSizeDetectorProps = Omit<ToolbarProps, 'toolbarSize'>;
29
29
  export interface ToolbarInnerProps extends ToolbarProps {
30
- isToolbarReducedSpacing: boolean;
31
30
  isReducedSpacing?: boolean;
31
+ isToolbarReducedSpacing: boolean;
32
32
  }
33
33
  export declare const toolbarTestIdPrefix = "ak-editor-toolbar-button";
@@ -4,9 +4,9 @@ import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import { type HelpDialogPlugin } from '@atlaskit/editor-plugins/help-dialog';
5
5
  import type { PositionType } from '@atlaskit/tooltip/types';
6
6
  interface Props {
7
+ editorApi?: ExtractInjectionAPI<HelpDialogPlugin> | undefined;
7
8
  title?: string;
8
9
  titlePosition?: PositionType;
9
- editorApi?: ExtractInjectionAPI<HelpDialogPlugin> | undefined;
10
10
  }
11
11
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
12
12
  WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
@@ -1,8 +1,8 @@
1
1
  export interface DeprecationWarning<Props> {
2
- property: string;
2
+ condition?: (props: Props) => boolean;
3
3
  description?: string;
4
+ property: string;
4
5
  type?: string;
5
- condition?: (props: Props) => boolean;
6
6
  }
7
7
  declare function deprecationWarnings<Props extends object>(className: string, props: Props, deprecations: Array<DeprecationWarning<Props>>): void;
8
8
  export default deprecationWarnings;
@@ -2,9 +2,9 @@ import type { ACTION, ACTION_SUBJECT, FireAnalyticsCallback } from '@atlaskit/ed
2
2
  type RenderActions = ACTION.RE_RENDERED;
3
3
  type RenderActionSubjects = ACTION_SUBJECT.EDITOR | ACTION_SUBJECT.REACT_EDITOR_VIEW;
4
4
  export type RenderTrackingProps<ComponentProps> = {
5
- componentProps: ComponentProps;
6
5
  action: RenderActions;
7
6
  actionSubject: RenderActionSubjects;
7
+ componentProps: ComponentProps;
8
8
  handleAnalyticsEvent: FireAnalyticsCallback;
9
9
  propsToIgnore?: Array<keyof ComponentProps>;
10
10
  useShallow?: boolean;
@@ -4,15 +4,15 @@ export interface OutlierReport {
4
4
  viewUpdateOutlier: number | undefined;
5
5
  }
6
6
  export interface PluginPerformanceReportOptions {
7
- usePerformanceMarks?: boolean;
7
+ outlierFactor: number;
8
+ outlierThreshold: number;
8
9
  samplingRate: number;
9
10
  slowThreshold: number;
10
- outlierThreshold: number;
11
- outlierFactor: number;
11
+ usePerformanceMarks?: boolean;
12
12
  }
13
13
  export type NodesCount = {
14
- nodeCount: NodeCount;
15
14
  extensionNodeCount: NodeCount;
15
+ nodeCount: NodeCount;
16
16
  };
17
17
  export declare class PluginPerformanceReport {
18
18
  private entry;
@@ -1,6 +1,6 @@
1
1
  interface Reading {
2
- name: string;
3
2
  duration: number;
3
+ name: string;
4
4
  startTime: number;
5
5
  }
6
6
  type ObservationCallback = (entries: PerformanceObserverEntryList) => void;
@@ -10,8 +10,8 @@ interface MeasureHelpers {
10
10
  stopMeasure: (measureName: string, onMeasureComplete?: (duration: number, startTime: number) => void) => void;
11
11
  }
12
12
  interface SimpleEntry {
13
- name: string;
14
13
  duration: number;
14
+ name: string;
15
15
  startTime: number;
16
16
  }
17
17
  type MeasureListener = (entry: SimpleEntry) => void;
@@ -8,9 +8,9 @@ export type EditorModule = {
8
8
  WithEditorActions: typeof EditorImports.WithEditorActions;
9
9
  } & EditorModules;
10
10
  export interface Props {
11
- placeholder?: string;
12
11
  isExpanded?: boolean;
13
12
  onClickToExpand?: () => void;
13
+ placeholder?: string;
14
14
  renderEditor: (Editor: typeof EditorImports.Editor, modules: EditorModule) => JSX.Element;
15
15
  }
16
16
  export interface State {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  type BaseThemeProps = {
3
- children: React.ReactNode;
4
3
  baseFontSize?: number;
4
+ children: React.ReactNode;
5
5
  };
6
6
  export declare function BaseThemeWrapper({ baseFontSize, children }: BaseThemeProps): React.JSX.Element;
7
7
  export {};
@@ -10,24 +10,24 @@ import type EditorActions from '../actions';
10
10
  import { type EditorAppearanceComponentProps } from '../types';
11
11
  import type { EditorNextProps } from '../types/editor-props';
12
12
  interface InternalProps {
13
- props: EditorNextProps;
14
- handleAnalyticsEvent: FireAnalyticsCallback;
13
+ AppearanceComponent: React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<[
14
+ ]>>>;
15
15
  createAnalyticsEvent: CreateUIAnalyticsEvent;
16
- handleSave: (view: EditorView) => void;
17
16
  editorActions: EditorActions;
17
+ handleAnalyticsEvent: FireAnalyticsCallback;
18
+ handleSave: (view: EditorView) => void;
18
19
  onEditorCreated: (instance: {
19
- view: EditorView;
20
20
  eventDispatcher: EventDispatcher;
21
21
  transformer?: Transformer<string>;
22
+ view: EditorView;
22
23
  }) => void;
23
24
  onEditorDestroyed: (_instance: {
24
- view: EditorView;
25
25
  transformer?: Transformer<string>;
26
+ view: EditorView;
26
27
  }) => void;
27
28
  preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
29
+ props: EditorNextProps;
28
30
  providerFactory: ProviderFactory;
29
- AppearanceComponent: React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<[
30
- ]>>>;
31
31
  }
32
32
  /**
33
33
  * EditorInternalComponent is used to capture the common component
@@ -11,6 +11,9 @@ import type { EmojiProvider } from '@atlaskit/emoji';
11
11
  import type { MentionProvider } from '@atlaskit/mention/resource';
12
12
  import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
13
13
  interface UseProvidersProps {
14
+ autoformattingProvider: Promise<AutoformattingProvider> | undefined;
15
+ cardProvider: Promise<CardProvider> | undefined;
16
+ contextIdentifierProvider: Promise<ContextIdentifierProvider> | undefined;
14
17
  editorApi: PublicPluginAPI<[
15
18
  OptionalPlugin<ContextIdentifierPlugin>,
16
19
  OptionalPlugin<MediaPlugin>,
@@ -20,12 +23,9 @@ interface UseProvidersProps {
20
23
  OptionalPlugin<CustomAutoformatPlugin>,
21
24
  OptionalPlugin<TasksAndDecisionsPlugin>
22
25
  ]> | undefined;
23
- contextIdentifierProvider: Promise<ContextIdentifierProvider> | undefined;
26
+ emojiProvider: Promise<EmojiProvider> | undefined;
24
27
  mediaProvider: Promise<MediaProvider> | undefined;
25
28
  mentionProvider: Promise<MentionProvider> | undefined;
26
- cardProvider: Promise<CardProvider> | undefined;
27
- emojiProvider: Promise<EmojiProvider> | undefined;
28
- autoformattingProvider: Promise<AutoformattingProvider> | undefined;
29
29
  taskDecisionProvider: Promise<TaskDecisionProvider> | undefined;
30
30
  }
31
31
  /**
@@ -5,13 +5,13 @@ import type { FeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { UserBrowserExtensionResults } from '@atlaskit/editor-common/utils';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  export type ErrorBoundaryProps = {
8
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
8
+ children: React.ReactNode;
9
9
  contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
10
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
10
11
  editorView?: EditorView;
11
- rethrow?: boolean;
12
- children: React.ReactNode;
13
- featureFlags: FeatureFlags;
14
12
  errorTracking?: boolean;
13
+ featureFlags: FeatureFlags;
14
+ rethrow?: boolean;
15
15
  };
16
16
  export type ErrorBoundaryState = {
17
17
  error?: Error;
@@ -5,9 +5,9 @@ import type { EditorViewStateUpdatedCallbackProps } from '../../types/editor-con
5
5
  import type { EditorOnChangeHandler } from '../../types/editor-onchange';
6
6
  type DispatchTransaction = (view: EditorView | undefined, tr: Transaction) => void;
7
7
  export declare const useDispatchTransaction: ({ onChange, dispatchAnalyticsEvent, onEditorViewUpdated, isRemoteReplaceDocumentTransaction, }: {
8
- onChange: EditorOnChangeHandler | undefined;
9
8
  dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
10
- onEditorViewUpdated: (params: EditorViewStateUpdatedCallbackProps) => void;
11
9
  isRemoteReplaceDocumentTransaction?: (tr: Transaction) => boolean;
10
+ onChange: EditorOnChangeHandler | undefined;
11
+ onEditorViewUpdated: (params: EditorViewStateUpdatedCallbackProps) => void;
12
12
  }) => DispatchTransaction;
13
13
  export {};
@@ -11,37 +11,37 @@ import { EditorView } from '@atlaskit/editor-prosemirror/view';
11
11
  import type { EditorConfig, EditorProps } from '../types';
12
12
  import type { EditorNextProps } from '../types/editor-props';
13
13
  export interface EditorViewProps extends WrappedComponentProps {
14
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
15
+ disabled?: boolean;
14
16
  editorProps: (EditorProps | EditorNextProps) & {
15
17
  preset?: EditorNextProps['preset'];
16
18
  };
17
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
18
- providerFactory: ProviderFactory;
19
- portalProviderAPI: PortalProviderAPI;
20
19
  nodeViewPortalProviderAPI: PortalProviderAPI;
21
- disabled?: boolean;
22
- render?: (props: {
23
- editor: JSX.Element;
24
- view?: EditorView;
25
- config: EditorConfig;
26
- eventDispatcher: EventDispatcher;
27
- transformer?: Transformer<string>;
28
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
29
- editorRef: React.RefObject<HTMLDivElement>;
30
- editorAPI: PublicPluginAPI<any> | undefined;
31
- }) => JSX.Element;
32
20
  onEditorCreated: (instance: {
33
- view: EditorView;
34
21
  config: EditorConfig;
35
22
  eventDispatcher: EventDispatcher;
36
23
  transformer?: Transformer<string>;
24
+ view: EditorView;
37
25
  }) => void;
38
26
  onEditorDestroyed: (instance: {
39
- view: EditorView;
40
27
  config: EditorConfig;
41
28
  eventDispatcher: EventDispatcher;
42
29
  transformer?: Transformer<string>;
30
+ view: EditorView;
43
31
  }) => void;
32
+ portalProviderAPI: PortalProviderAPI;
44
33
  preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
34
+ providerFactory: ProviderFactory;
35
+ render?: (props: {
36
+ config: EditorConfig;
37
+ dispatchAnalyticsEvent: DispatchAnalyticsEvent;
38
+ editor: JSX.Element;
39
+ editorAPI: PublicPluginAPI<any> | undefined;
40
+ editorRef: React.RefObject<HTMLDivElement>;
41
+ eventDispatcher: EventDispatcher;
42
+ transformer?: Transformer<string>;
43
+ view?: EditorView;
44
+ }) => JSX.Element;
45
45
  }
46
46
  export declare function ReactEditorView(props: EditorViewProps): React.JSX.Element;
47
47
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps>> & {
@@ -14,8 +14,8 @@ type toDOMType = (node: PMNode | PMMark) => DOMOutputSpec;
14
14
  * @returns {DOMOutputSpec} The modified DOMOutputSpec with additional metadata.
15
15
  */
16
16
  export declare const addMetadataAttributes: ({ nodeOrMark, domSpec, }: {
17
- nodeOrMark: PMNode | PMMark;
18
17
  domSpec: DOMOutputSpec;
18
+ nodeOrMark: PMNode | PMMark;
19
19
  }) => DOMOutputSpec;
20
20
  /**
21
21
  * 🧱 Internal Helper Function: Editor FE Platform