@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,20 +9,20 @@ 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;
12
+ children?: React.ReactElement;
13
+ customWidth?: number;
13
14
  editorAPI: PublicPluginAPI<[
14
15
  OptionalPlugin<ContextPanelPlugin>
15
16
  ]> | undefined;
16
- children?: React.ReactElement;
17
17
  hasPadding?: boolean;
18
- customWidth?: number;
18
+ visible: boolean;
19
19
  };
20
20
  export declare const panel: import("@emotion/react").SerializedStyles;
21
21
  export declare const content: import("@emotion/react").SerializedStyles;
22
22
  type SwappableContentAreaProps = {
23
- pluginContent?: React.ReactNode;
24
23
  editorView?: EditorView;
25
24
  intl: IntlShape;
25
+ pluginContent?: React.ReactNode;
26
26
  } & Props;
27
27
  export declare const SwappableContentArea: React.FC<import("react-intl-next").WithIntlProps<SwappableContentAreaProps>> & {
28
28
  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,13 +12,13 @@ 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<[
20
18
  ToolbarPlugin
21
19
  ]>;
20
+ editorView?: EditorView;
21
+ toolbar: RegisterToolbar;
22
22
  };
23
23
  /**
24
24
  * Renders a primary toolbar, driven by components registed by `editor-plugin-toolbar`. `ToolbarModelRenderer` will just
@@ -26,5 +26,5 @@ type NewToolbarProps = Pick<ToolbarUIContextType, 'popupsMountPoint'> & Pick<Edi
26
26
  *
27
27
  * The majority of components UI should use `@atlaskit/editor-toolbar` components.
28
28
  */
29
- export declare const ToolbarNext: ({ toolbar, components, editorView, editorAPI, popupsMountPoint, editorAppearance, }: NewToolbarProps) => React.JSX.Element;
29
+ export declare const ToolbarNext: ({ toolbar, components, editorView, editorAPI, popupsMountPoint, editorAppearance, popupsBoundariesElement, popupsScrollableElement, }: NewToolbarProps) => React.JSX.Element;
30
30
  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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "210.1.6",
3
+ "version": "210.1.8",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@atlaskit/activity-provider": "^2.5.0",
42
- "@atlaskit/adf-schema": "^50.2.1",
42
+ "@atlaskit/adf-schema": "^50.2.2",
43
43
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
44
44
  "@atlaskit/analytics-next": "^11.1.0",
45
45
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
@@ -63,7 +63,7 @@
63
63
  "@atlaskit/platform-feature-flags-react": "^0.2.0",
64
64
  "@atlaskit/react-ufo": "^4.4.0",
65
65
  "@atlaskit/task-decision": "^19.2.0",
66
- "@atlaskit/tmp-editor-statsig": "^11.5.0",
66
+ "@atlaskit/tmp-editor-statsig": "^11.6.0",
67
67
  "@atlaskit/tokens": "^6.0.0",
68
68
  "@atlaskit/tooltip": "^20.4.0",
69
69
  "@atlaskit/width-detector": "^5.0.0",
@@ -80,7 +80,7 @@
80
80
  "uuid": "^3.1.0"
81
81
  },
82
82
  "peerDependencies": {
83
- "@atlaskit/editor-common": "^107.28.0",
83
+ "@atlaskit/editor-common": "^107.30.0",
84
84
  "@atlaskit/link-provider": "^3.7.0",
85
85
  "@atlaskit/media-core": "^37.0.0",
86
86
  "react": "^18.2.0",
@@ -94,7 +94,7 @@
94
94
  "@atlaskit/analytics-listeners": "^9.0.0",
95
95
  "@atlaskit/collab-provider": "^11.3.0",
96
96
  "@atlaskit/editor-plugin-annotation": "^3.3.0",
97
- "@atlaskit/editor-plugin-card": "^7.4.0",
97
+ "@atlaskit/editor-plugin-card": "^7.5.0",
98
98
  "@atlaskit/editor-plugin-list": "^5.1.0",
99
99
  "@atlaskit/editor-plugin-paste": "^4.1.0",
100
100
  "@atlaskit/link-provider": "^3.7.0",
@@ -106,7 +106,7 @@
106
106
  "@atlaskit/primitives": "^14.11.0",
107
107
  "@atlaskit/renderer": "^120.5.0",
108
108
  "@atlaskit/section-message": "^8.5.0",
109
- "@atlaskit/smart-card": "^40.12.0",
109
+ "@atlaskit/smart-card": "^40.13.0",
110
110
  "@atlaskit/synchrony-test-helpers": "workspace:^",
111
111
  "@atlaskit/toggle": "^15.1.0",
112
112
  "@atlaskit/util-data-test": "^18.1.0",
@@ -161,12 +161,6 @@
161
161
  "platform_editor_reduce_scroll_jump_on_editor_start": {
162
162
  "type": "boolean"
163
163
  },
164
- "platform_editor_sync_editor_view_mode_state": {
165
- "type": "boolean"
166
- },
167
- "platform_editor_sync_editor_view_mode_state_revert": {
168
- "type": "boolean"
169
- },
170
164
  "annotations_defensive_node_name_calculations": {
171
165
  "type": "boolean",
172
166
  "referenceOnly": "true"
@@ -503,9 +497,6 @@
503
497
  "platform_editor_fix_code_block_bg_color_in_macro_2": {
504
498
  "type": "boolean"
505
499
  },
506
- "platform_editor_editor_container_a11y_focus": {
507
- "type": "boolean"
508
- },
509
500
  "platform_editor_vanilla_codebidi_warning": {
510
501
  "type": "boolean"
511
502
  },
@@ -519,9 +510,6 @@
519
510
  "type": "boolean",
520
511
  "referenceOnly": true
521
512
  },
522
- "platform_editor_find_and_replace_improvements_1": {
523
- "type": "boolean"
524
- },
525
513
  "platform_editor_task_check_status_fix": {
526
514
  "type": "boolean",
527
515
  "referenceOnly": true
@@ -1,43 +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.getEditorViewMode = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
- // Retrieve the initial config value from the editor view plugin preset
11
- var getViewModeSync = function getViewModeSync(preset) {
12
- var _editorViewModePlugin;
13
- if (!(0, _platformFeatureFlags.fg)('platform_editor_sync_editor_view_mode_state') || (0, _platformFeatureFlags.fg)('platform_editor_sync_editor_view_mode_state_revert')) {
14
- return undefined;
15
- }
16
- // @ts-expect-error - data is a private property
17
- var editorViewModePlugin = preset.data.find(function (p) {
18
- if (Array.isArray(p)) {
19
- var _p = (0, _slicedToArray2.default)(p, 2),
20
- plugin = _p[0],
21
- config = _p[1];
22
- return plugin({
23
- config: config
24
- }).name === 'editorViewMode';
25
- } else {
26
- var _p2;
27
- return (p === null || p === void 0 || (_p2 = p({
28
- config: undefined
29
- })) === null || _p2 === void 0 ? void 0 : _p2.name) === 'editorViewMode';
30
- }
31
- });
32
- // If we have set a default value on the view mode (index 1) then we can return the mode, otherwise we haven't set by default
33
- return Array.isArray(editorViewModePlugin) ? (_editorViewModePlugin = editorViewModePlugin[1]) === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode : undefined;
34
- };
35
-
36
- // Temporary to ensure view mode is always set synchronously
37
- // TODO: ED-27194 - Make editorAPI be set synchronously and we can remove this code
38
- var getEditorViewMode = exports.getEditorViewMode = function getEditorViewMode(editorViewModeState, preset) {
39
- if (!(editorViewModeState !== null && editorViewModeState !== void 0 && editorViewModeState.mode)) {
40
- return getViewModeSync(preset);
41
- }
42
- return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
43
- };
@@ -1,33 +0,0 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
- // Retrieve the initial config value from the editor view plugin preset
3
- const getViewModeSync = preset => {
4
- var _editorViewModePlugin;
5
- if (!fg('platform_editor_sync_editor_view_mode_state') || fg('platform_editor_sync_editor_view_mode_state_revert')) {
6
- return undefined;
7
- }
8
- // @ts-expect-error - data is a private property
9
- const editorViewModePlugin = preset.data.find(p => {
10
- if (Array.isArray(p)) {
11
- const [plugin, config] = p;
12
- return plugin({
13
- config
14
- }).name === 'editorViewMode';
15
- } else {
16
- var _p;
17
- return (p === null || p === void 0 ? void 0 : (_p = p({
18
- config: undefined
19
- })) === null || _p === void 0 ? void 0 : _p.name) === 'editorViewMode';
20
- }
21
- });
22
- // If we have set a default value on the view mode (index 1) then we can return the mode, otherwise we haven't set by default
23
- return Array.isArray(editorViewModePlugin) ? (_editorViewModePlugin = editorViewModePlugin[1]) === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode : undefined;
24
- };
25
-
26
- // Temporary to ensure view mode is always set synchronously
27
- // TODO: ED-27194 - Make editorAPI be set synchronously and we can remove this code
28
- export const getEditorViewMode = (editorViewModeState, preset) => {
29
- if (!(editorViewModeState !== null && editorViewModeState !== void 0 && editorViewModeState.mode)) {
30
- return getViewModeSync(preset);
31
- }
32
- return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
33
- };
@@ -1,36 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
- // Retrieve the initial config value from the editor view plugin preset
4
- var getViewModeSync = function getViewModeSync(preset) {
5
- var _editorViewModePlugin;
6
- if (!fg('platform_editor_sync_editor_view_mode_state') || fg('platform_editor_sync_editor_view_mode_state_revert')) {
7
- return undefined;
8
- }
9
- // @ts-expect-error - data is a private property
10
- var editorViewModePlugin = preset.data.find(function (p) {
11
- if (Array.isArray(p)) {
12
- var _p = _slicedToArray(p, 2),
13
- plugin = _p[0],
14
- config = _p[1];
15
- return plugin({
16
- config: config
17
- }).name === 'editorViewMode';
18
- } else {
19
- var _p2;
20
- return (p === null || p === void 0 || (_p2 = p({
21
- config: undefined
22
- })) === null || _p2 === void 0 ? void 0 : _p2.name) === 'editorViewMode';
23
- }
24
- });
25
- // If we have set a default value on the view mode (index 1) then we can return the mode, otherwise we haven't set by default
26
- return Array.isArray(editorViewModePlugin) ? (_editorViewModePlugin = editorViewModePlugin[1]) === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode : undefined;
27
- };
28
-
29
- // Temporary to ensure view mode is always set synchronously
30
- // TODO: ED-27194 - Make editorAPI be set synchronously and we can remove this code
31
- export var getEditorViewMode = function getEditorViewMode(editorViewModeState, preset) {
32
- if (!(editorViewModeState !== null && editorViewModeState !== void 0 && editorViewModeState.mode)) {
33
- return getViewModeSync(preset);
34
- }
35
- return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
36
- };
@@ -1,3 +0,0 @@
1
- import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
2
- import type { ComponentProps } from './FullPage';
3
- export declare const getEditorViewMode: (editorViewModeState: Pick<EditorViewModePluginState, "mode"> | undefined | null, preset: ComponentProps["preset"]) => ViewMode;
@@ -1,3 +0,0 @@
1
- import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
2
- import type { ComponentProps } from './FullPage';
3
- export declare const getEditorViewMode: (editorViewModeState: Pick<EditorViewModePluginState, "mode"> | undefined | null, preset: ComponentProps["preset"]) => ViewMode;